| | |
| | | 将该站点某时段的异常数据返回给父组件,父组件再返回给祖先组件 |
| | | --> |
| | | <script> |
| | | import exceptionApi from '@/api/exceptionApi.js'; |
| | | export default { |
| | | props: { |
| | | siteName:String, |
| | | exceptionType:String, |
| | | beginTime:String, |
| | | endTime:String, |
| | | siteName: String, |
| | | exceptionType: String, |
| | | beginTime: String, |
| | | endTime: String |
| | | }, |
| | | emits: ['submitExceptionData'], |
| | | data() { |
| | |
| | | methods: { |
| | | requestExceptionData() { |
| | | // 不分页 |
| | | this.$http |
| | | .get('/dust/exceptiondata1', { |
| | | params: { |
| | | siteName: this.siteName, |
| | | exceptionType: this.exceptionType, |
| | | beginTime: this.beginTime, |
| | | endTime: this.endTime |
| | | } |
| | | }) |
| | | exceptionApi |
| | | .exceptiondata1( |
| | | this.siteName, |
| | | this.exceptionType, |
| | | this.beginTime, |
| | | this.endTime |
| | | ) |
| | | .then((result) => { |
| | | //将返回的结果传递给父组件 |
| | | this.$emit( |
| | | 'submitExceptionData', |
| | | result.data.data |
| | | ); |
| | | this.$emit('submitExceptionData', result.data.data); |
| | | }); |
| | | } |
| | | } |