zmc
2023-09-04 34257f504330191b1a698eb48b52217095db47fe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!-- 扬尘 异常文本按钮 点击查该店铺某时段的异常数据
 
**父组件
将该站点某时段的异常数据返回给父组件,父组件再返回给祖先组件
-->
<script>
import exceptionApi from '@/api/exceptionApi.js';
export default {
  props: {
    siteName: String,
    exceptionType: String,
    beginTime: String,
    endTime: String,
    
  },
  emits: ['submitExceptionData'],
  data() {
    return {
      //某个异常类型的全部数据
      // exceptionData:[]
    };
  },
 
  methods: {
    requestExceptionData() {
      // 不分页
      exceptionApi
        .exceptiondata1({
          siteName:  this.siteName,
          exceptionType:this.exceptionType,
          beginTime:this.beginTime,
          endTime:this.endTime
        }
        )
        .then((result) => {
          //将返回的结果传递给父组件
          this.$emit('submitExceptionData', result.data.data);
          // this.$emit('subloading',false)
        });
    }
  }
};
</script>
 
<template>
  <el-link @click="requestExceptionData" class="text"><slot /></el-link>
</template>
 
<style lang="scss" scoped>
.text {
  color: #000000;
}
// .text:hover{
//   color: #2876aa;
// }
</style>