| | |
| | | <el-button |
| | | type="primary" |
| | | class="p-events-auto el-button-custom" |
| | | @click="clearFetchingTask" |
| | | @click="pauseTask" |
| | | > |
| | | 停止 |
| | | {{ pause ? '继续' : '暂停' }} |
| | | </el-button> |
| | | </el-row> |
| | | <el-row class="m-t-2"> |
| | |
| | | import { |
| | | fetchHistoryData, |
| | | startLoopFetchRealTimeData, |
| | | clearFetchingTask |
| | | clearFetchingTask, |
| | | pauseTask |
| | | } from '@/utils/factor/data'; |
| | | import thirdPartyDataApi from '@/api/thirdPartyDataApi'; |
| | | import websocket from '@/api/websocket'; |
| | |
| | | // const mode = 'product'; |
| | | |
| | | export default { |
| | | components: { DashBoard, RealTimeTrend, DeviceChange, SourceTrace, UnderwayAdvice }, |
| | | components: { |
| | | DashBoard, |
| | | RealTimeTrend, |
| | | DeviceChange, |
| | | SourceTrace, |
| | | UnderwayAdvice |
| | | }, |
| | | setup() { |
| | | const { loading, fetchData } = useFetchData(10000); |
| | | return { loading, fetchData }; |
| | |
| | | // 新获取的监测数据 |
| | | factorDatas: new FactorDatas(), |
| | | // 全部监测数据 |
| | | allFactorDatas: new FactorDatas() |
| | | allFactorDatas: new FactorDatas(), |
| | | pause: false |
| | | }; |
| | | }, |
| | | watch: { |
| | |
| | | mode == 'debug' |
| | | ? { |
| | | deviceCode: this.deviceCode, |
| | | startTime: '2025-01-16 11:34:00', |
| | | endTime: '2025-01-16 11:35:00', |
| | | // startTime: '2025-01-16 11:34:00', |
| | | // endTime: '2025-01-16 11:35:00', |
| | | // startTime: '2025-01-20 12:40:00', |
| | | // startTime: '2024-12-27 08:30:00', |
| | | // startTime: '2024-12-13 16:35:00', |
| | | // startTime: '2024-11-27 11:50:41', // Pm, 中距离工地 |
| | | // startTime: '2024-08-30 15:28:00', // voc 近距离汽修 |
| | | startTime: '2024-07-23 15:22:00', |
| | | // startTime: '2024-07-23 14:39:00', |
| | | endTime: '2025-01-16 11:51:41', |
| | | page, |
| | | perPage: 100 |
| | | perPage: 10 |
| | | } |
| | | : { |
| | | deviceCode: this.deviceCode, |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | pauseTask() { |
| | | this.pause = pauseTask(); |
| | | }, |
| | | clearFetchingTask() { |
| | | clearFetchingTask(); |
| | | }, |