| | |
| | | :isResizable="isResizable" |
| | | :stickSize="6" |
| | | > |
| | | <div class="single-device" :style="{ width: item.vw + 'px', height: item.vh + 'px' }"> |
| | | <div class="single-device" :style="{ width: item.vw + 'px', height: item.vh + 'px' }" |
| | | @mouseenter="openDetail(item)"> |
| | | <div class="device-status"> |
| | | <div |
| | | v-if="item.equipmentStatus == 2 || item.equipmentStatus == 1" |
| | |
| | | </div> |
| | | </div> |
| | | </dv-border-box-8> |
| | | |
| | | <EquipmentDetailModal ref="EquipmentDetailModal"></EquipmentDetailModal> |
| | | </dv-full-screen-container> |
| | | </template> |
| | | |
| | |
| | | import VueDragResize from 'vue-drag-resize' |
| | | import api from '@/api/mdc' |
| | | import { getFileAccessHttpUrl } from '@/api/manage' |
| | | import EquipmentDetailModal from './mdc/base/modules/WorkshopSignage/EquipmentDetailModal' |
| | | import { message } from 'ant-design-vue' |
| | | |
| | | message.config({ |
| | | maxCount: 3 |
| | | }) |
| | | |
| | | export default { |
| | | components: { |
| | | VueDragResize, |
| | | EquipmentDetailModal |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | { |
| | | label: '关机', |
| | | value: 0, |
| | | color: '#A8A8A8', |
| | | color: '#A8A8A8' |
| | | }, |
| | | { |
| | | label: '待机', |
| | | value: 2, |
| | | color: '#FFFF00', |
| | | color: '#FFFF00' |
| | | }, |
| | | { |
| | | label: '运行', |
| | | value: 3, |
| | | color: '#00EE00', |
| | | color: '#00EE00' |
| | | }, |
| | | { |
| | | label: '报警', |
| | | value: 22, |
| | | color: '#FF0000', |
| | | }, |
| | | ], // 设备状态指示灯列表 |
| | | color: '#FF0000' |
| | | } |
| | | ] // 设备状态指示灯列表 |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | this.timingAcquisition = null |
| | | } |
| | | }, |
| | | immediate: true, |
| | | }, |
| | | immediate: true |
| | | } |
| | | }, |
| | | methods: { |
| | | /** |
| | |
| | | if (res.code === 200) { |
| | | this.$notification.success({ |
| | | message: '消息', |
| | | description: res.message, |
| | | description: res.message |
| | | }) |
| | | this.isOperatingDevice = false |
| | | if (this.isSwitchChecked) { |
| | |
| | | } else { |
| | | this.$notification.warning({ |
| | | message: '消息', |
| | | description: '请开启功能后再进行保存', |
| | | description: '请开启功能后再进行保存' |
| | | }) |
| | | } |
| | | }, |
| | |
| | | this.isResizable = !this.isResizable |
| | | this.isDraggable = !this.isDraggable |
| | | }, |
| | | |
| | | openDetail(item) { |
| | | if (item.equipmentStatus == 0) { |
| | | // this.$message.warn("设备处于关机状态!"); |
| | | this.$message.warning('设备处于关机状态!') |
| | | return false |
| | | } |
| | | console.log(item) |
| | | console.log(this.$refs.EquipmentDetailModal) |
| | | this.$refs.EquipmentDetailModal.initData(item.equId) |
| | | this.$refs.EquipmentDetailModal.timerModel(item.equId) |
| | | // this.equipMessageTimer = setInterval(() => { |
| | | // setTimeout( this.$refs.equmentDetaiModel.initData(item.equipmentId),0) |
| | | // },1000*10) |
| | | }, |
| | | |
| | | }, |
| | | created() { |
| | | if (this.$route.params.id) { |
| | |
| | | // 确保销毁定时器及回收资源 |
| | | clearInterval(this.timingAcquisition) |
| | | this.timingAcquisition = null |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |