| | |
| | | rightBottomChart2: null, |
| | | rightBottomChart3: null, |
| | | rightBottomChart1Data: [], |
| | | timingAcquisition: null, |
| | | rightBottomChart2And3Data: [], |
| | | chartQuantity: 3, |
| | | hasLoadedChartDataQuantity: 0, |
| | |
| | | mounted() { |
| | | this.getEquipmentListByApi() |
| | | this.handleWindowResize() |
| | | // 组件挂载后启动定时器 |
| | | this.timingAcquisition = setInterval(() => { |
| | | this.getEquipmentStatusAndInfoByApi() |
| | | }, 2000) |
| | | |
| | | window.addEventListener('resize', this.handleWindowResize) |
| | | }, |
| | | beforeDestroy() { |
| | | window.removeEventListener('resize', this.handleWatchHistory) |
| | | // 组件销毁前清除定时器 |
| | | if (this.timingAcquisition) { |
| | | clearInterval(this.timingAcquisition) |
| | | } |
| | | }, |
| | | methods: { |
| | | getEquipmentListByApi() { |
| | |
| | | |
| | | getEquipmentStatusAndInfoByApi() { |
| | | const that = this |
| | | this.equipmentStatusAndInfoObj = {} |
| | | //this.equipmentStatusAndInfoObj = {} |
| | | signageApi.getEquipmentOperationStatusAndInfoApi(this.currentProductionId) |
| | | .then(res => { |
| | | if (res.success) { |