| | |
| | | 根据父组件传递的设备编号和异常类型,异常开始时间和结束时间 |
| | | 返回对应的异常信息 --> |
| | | <script > |
| | | import axios from 'axios'; |
| | | import axiosInstance from '../utils/request.js' |
| | | |
| | | export default { |
| | | props:{ |
| | |
| | | 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) |
| | | }) |
| | |
| | | </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> |