zmc
2023-08-15 60076cbbe1da6cc8ed3a4ebb8f67e92ea9be9e4a
src/sfc/ExceptionButton.vue
@@ -2,7 +2,7 @@
  根据父组件传递的设备编号和异常类型,异常开始时间和结束时间
  返回对应的异常信息 -->
<script >
import axios from 'axios';
import axiosInstance from '../utils/request.js'
  export default {
    props:{
@@ -21,7 +21,7 @@
    methods: {
        
        requestExceptionData(){
            axios.get('http://localhost:8080/fume/abnormaltwo',{params:{"devId":this.devId,"exceptionValue":this.exceptionValue,"beginTime":this.beginTime,"endTime":this.endTime }}).then(result =>{
            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)
            })
@@ -32,10 +32,7 @@
</script>
<template>
  <!-- <button  @click="requestExceptionData">
    <slot/>
  </button> -->
  <el-button class="button_info" type=''  @click="requestExceptionData">
  <el-button class="button_info" type='' text  @click="requestExceptionData">
    <slot/>
  </el-button>
</template>