| | |
| | | <thead> |
| | | <tr> |
| | | <th>设备编号</th> |
| | | <th>设备名称</th> |
| | | <th>安装位置</th> |
| | | </tr> |
| | | </thead> |
| | | |
| | |
| | | <table> |
| | | <tr> |
| | | <td>设备名称</td> |
| | | <a-tooltip :title="setTooltipTittle(equipmentStatusAndInfoObj.equipmentName)"> |
| | | <td :style="{color:setNullValueFontColor(equipmentStatusAndInfoObj.equipmentName)}"> |
| | | {{equipmentStatusAndInfoObj.equipmentName|filterNullValue}} |
| | | <a-tooltip :title="setTooltipTittle(equipmentStatusAndInfoObj.equipmentAddress)"> |
| | | <td :style="{color:setNullValueFontColor(equipmentStatusAndInfoObj.equipmentAddress)}"> |
| | | {{equipmentStatusAndInfoObj.equipmentAddress|filterNullValue}} |
| | | </td> |
| | | </a-tooltip> |
| | | </tr> |
| | |
| | | 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) { |