riku
2023-08-29 71b1532d5a3609f3125e15fbe65e4b34bb6c4e8b
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
<!-- 扬尘 异常文本按钮 点击查该店铺某时段的异常数据
 
**父组件
将该站点某时段的异常数据返回给父组件,父组件再返回给祖先组件
-->
<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(
          this.siteName,
          this.exceptionType,
          this.beginTime,
          this.endTime
        )
        .then((result) => {
          //将返回的结果传递给父组件
          this.$emit('submitExceptionData', result.data.data);
        });
    }
  }
};
</script>
 
<template>
  <el-link @click="requestExceptionData" class="text"><slot /></el-link>
</template>
 
<style lang="scss" scoped>
.text {
  color: #000000;
}
</style>