zmc
2023-08-15 9bfdf6ecef01397978c140aa4fbd8c4840d894fb
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
<script >
import axiosInstance from '../utils/request.js'
  export default {
    props:{
        devId:String,
        exceptionValue:String,
        beginTime:String,
        endTime:String,
    },
    emits:['submitExceptionData'],
    data() {
      return{
        //某个异常类型的全部数据
        exceptionData:[]
      }
    },
    methods: {
        
        requestExceptionData(){
            axiosInstance.get('/fume/abnormaltwo',{params:{"devId":this.devId,"exceptionValue":this.exceptionValue,"beginTime":this.beginTime,"endTime":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>