From f409a5ea59614945ecd7196e2255ef61bbb8ec3c Mon Sep 17 00:00:00 2001
From: qushaowei <qushaowei@163.com>
Date: 星期三, 22 十一月 2023 19:15:01 +0800
Subject: [PATCH] Merge branch 'master' of http://117.34.109.166:18448/r/vue_mdc_430 into develop

---
 src/views/WorkshopSignage.vue |   89 ++++++++++++++++++++++++--------------------
 1 files changed, 49 insertions(+), 40 deletions(-)

diff --git a/src/views/WorkshopSignage.vue b/src/views/WorkshopSignage.vue
index 81b35a5..7c0379b 100644
--- a/src/views/WorkshopSignage.vue
+++ b/src/views/WorkshopSignage.vue
@@ -2,7 +2,7 @@
   <dv-full-screen-container class="full-screen-container">
     <header class="page-header">
       {{ workshopDetails.workshopName }}
-      <div class="header-right" v-has="'home:saveDevicePositionAndSize'">
+      <div class="header-left" v-has="'home:saveDevicePositionAndSize'">
         <a-space>
           <span v-if="!isSwitchChecked">寮�鍚姛鑳�</span>
           <span v-else>鍏抽棴鍔熻兘</span>
@@ -14,7 +14,14 @@
             :disabled="isSwitchChecked"
           />
         </a-space>
-        <a-button type="primary" icon="save" size="large" @click="saveDevicePositionAndSizeByApi">淇濆瓨浣嶇疆 </a-button>
+        <a-button type="primary" icon="save" size="large" @click="saveDevicePositionAndSizeByApi">淇濆瓨浣嶇疆</a-button>
+      </div>
+      <div class="device-status-info">
+        <div v-for="item in deviceStatusList" :key="item.value" class="single-status-info">
+          <div>{{ item.label }}</div>
+          <div class="status-square" :style="{ backgroundColor: item.color }"></div>
+          <div>{{ getDeviceNumberByStatus(item.value) }}</div>
+        </div>
       </div>
     </header>
 
@@ -30,14 +37,14 @@
           v-on:resizing="resize($event, index)"
           v-on:dragging="resize($event, index)"
           :parentLimitation="true"
-          :minw="100"
-          :minh="100"
+          :minw="70"
+          :minh="70"
           :isDraggable="isDraggable"
           :isResizable="isResizable"
           :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"
@@ -64,18 +71,13 @@
                 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>
         </VueDragResize>
-        <div class="device-status-info">
-          <div v-for="item in deviceStatusList" :key="item.value" class="single-status-info">
-            <div>{{ item.label }}</div>
-            <div class="status-square" :style="{ backgroundColor: item.color }"></div>
-            <div>{{ getDeviceNumberByStatus(item.value) }}</div>
-          </div>
-        </div>
+
       </div>
     </dv-border-box-8>
 
@@ -183,6 +185,8 @@
           this.$refs.deviceContainerRef.style.backgroundImage = `url(${this.getImgView(
             this.workshopDetails.backgroundImage
           )})`
+
+
         })
       },
 
@@ -267,19 +271,21 @@
       },
 
       openDetail(item) {
-        if (item.equipmentStatus == 0) {
-          // this.$message.warn("璁惧澶勪簬鍏虫満鐘舵�侊紒");
-          this.$message.warning('璁惧澶勪簬鍏虫満鐘舵�侊紒')
-          return false
+        if (!this.isSwitchChecked) {
+          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)
         }
-        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() {
@@ -312,30 +318,23 @@
       text-align: center;
       position: relative;
 
-      .header-right {
+      .header-left {
         width: 450px;
         position: absolute;
-        right: 0px;
+        left: 0px;
         top: 35px;
         display: flex;
         justify-content: space-evenly;
         align-items: center;
         font-size: 16px;
       }
-    }
-
-    .content-container {
-      position: relative;
-      width: 100%;
-      height: 100%;
-      background-repeat: no-repeat;
-      background-size: 100% 100%;
 
       .device-status-info {
+        font-size: 16px;
         width: 400px;
         position: absolute;
-        top: 5px;
-        right: 5px;
+        top: 40px;
+        right: 40px;
         display: flex;
         align-items: center;
         justify-content: space-between;
@@ -354,6 +353,14 @@
           }
         }
       }
+    }
+
+    .content-container {
+      width: 100%;
+      height: calc(100% - 80px);
+      background-repeat: no-repeat;
+      background-size: 100% 100%;
+
 
       .single-device {
         position: absolute;
@@ -373,13 +380,15 @@
           width: 100%;
           height: 100%;
           display: flex;
-          justify-content: space-between;
+          align-items:end ;
+
 
           .status-image {
             background-size: 100% 100%;
             background-repeat: no-repeat;
-            width: 45px;
-            margin-right: 10px;
+            width: 10px;
+            height: 60%;
+            margin-right: 5px;
           }
 
           .device-image {

--
Gitblit v1.9.3