1、车间看板页面修改设备详情弹窗触发条件由悬浮改为单击
2、大屏车间管理页面增加有关设备编号字体颜色各项功能,由用户自行设置
| | |
| | | :stickSize="6" |
| | | > |
| | | <div class="single-device" :style="{ width: item.vw + 'px', height: item.vh + 'px' }" |
| | | @mouseenter="openDetail(item)"> |
| | | @click="openDetail(item)"> |
| | | <div class="device-status"> |
| | | <div |
| | | v-if="item.equipmentStatus == 2 || item.equipmentStatus == 1" |
| | |
| | | class="device-image" |
| | | ></div> |
| | | </div> |
| | | <div class="device-id" :style="{ fontSize: item.fontSize + 'px' }"> |
| | | <div class="device-id" id="deviceId" |
| | | :style="{ fontSize: item.fontSize + 'px',color:workshopDetails.equipmentIdColor }"> |
| | | {{ item.equipmentId }} |
| | | </div> |
| | | </div> |
| | |
| | | this.$refs.deviceContainerRef.style.backgroundImage = `url(${this.getImgView( |
| | | this.workshopDetails.backgroundImage |
| | | )})` |
| | | |
| | | |
| | | }) |
| | | }, |
| | | |
| | |
| | | } |
| | | |
| | | .content-container { |
| | | position: relative; |
| | | width: 100%; |
| | | height: 100%; |
| | | height: calc(100% - 80px); |
| | | background-repeat: no-repeat; |
| | | background-size: 100% 100%; |
| | | |
| | |
| | | handleCancel() { |
| | | this.$emit('close') |
| | | this.visible = false |
| | | this.modalNode.removeEventListener('mouseleave', this.closeModal) |
| | | // this.modalNode.removeEventListener('mouseleave', this.closeModal) |
| | | if(this.modalTimer){ |
| | | clearInterval(this.modalTimer) |
| | | this.modalTimer = null |
| | |
| | | }, |
| | | |
| | | getModalNode() { |
| | | console.log(document.querySelector('.ant-modal-content')) |
| | | this.modalNode = document.querySelector('.ant-modal-content') |
| | | this.timeout = setTimeout(() => { |
| | | this.modalNode.addEventListener('mouseleave', this.closeModal) |
| | | }, 100) |
| | | // console.log(document.querySelector('.ant-modal-content')) |
| | | // this.modalNode = document.querySelector('.ant-modal-content') |
| | | // this.timeout = setTimeout(() => { |
| | | // this.modalNode.addEventListener('mouseleave', this.closeModal) |
| | | // }, 100) |
| | | }, |
| | | |
| | | closeModal() { |
| | |
| | | scopedSlots: { customRender: 'backgroundImage' }, |
| | | }, |
| | | { |
| | | title: '设备编号颜色', |
| | | dataIndex: 'equipmentIdColor', |
| | | align: 'center', |
| | | }, |
| | | { |
| | | title: '操作', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | |
| | | <a-form-model-item label="车间背景图" required prop="backgroundImage"> |
| | | <j-image-upload class="avatar-uploader" text="上传" v-model="model.backgroundImage"></j-image-upload> |
| | | </a-form-model-item> |
| | | <a-form-model-item label="设备编号颜色"> |
| | | <a-input type="color" v-model="model.equipmentIdColor"></a-input> |
| | | </a-form-model-item> |
| | | </a-form-model> |
| | | </a-spin> |
| | | </a-modal> |
| | |
| | | |
| | | export default { |
| | | name: 'WorkshopModal', |
| | | components: {}, |
| | | data() { |
| | | return { |
| | | title: '操作', |
| | |
| | | { min: 0, max: 64, message: '长度不超过 64 个字符', trigger: 'blur' }, |
| | | { validator: this.validateRoleCode } |
| | | ], |
| | | backgroundImage:[ |
| | | backgroundImage: [ |
| | | { required: true, message: '请上传车间背景图!' } |
| | | ] |
| | | } |