Răsfoiți Sursa

思山岭铁矿风门同控-更新

lxh 5 luni în urmă
părinte
comite
c7dc2c7180

+ 2 - 0
package.json

@@ -131,6 +131,8 @@
     "@vitejs/plugin-legacy": "^2.0.0",
     "@vitejs/plugin-vue": "^4.3.3",
     "@vitejs/plugin-vue-jsx": "^3.0.2",
+    "@vue-office/docx": "^1.6.3",
+    "@vue-office/pdf": "^2.0.10",
     "@vue/compiler-sfc": "^3.3.4",
     "@vue/test-utils": "^2.4.1",
     "autoprefixer": "^10.4.16",

+ 6 - 0
src/views/vent/monitorManager/airDoor/airdoor.data.ts

@@ -229,6 +229,12 @@ export let controlOptionList = [
   { label: '自动', value: '自动' },
 ]
 
+//门的同步开关状态
+export let doorStatus={
+  openOrclose:false,
+  statusCode:''
+}
+
 
 
 

+ 51 - 3
src/views/vent/monitorManager/airDoor/components/door-content-r.vue

@@ -22,13 +22,31 @@
           <div class="title-detail" @click="handlerDetail(item.deviceID)">详情</div>
         </div>
         <div class="box-content">
+          <!-- plc时钟显示 -->
+          <div class="timePlcNow">2025-12-4 13:23:24</div>
           <!-- 二三维信息 -->
-          <gateSVG v-if="item.gateStyle == 'fm_fc_ssl'" :ref="(el) => setChildRef(el, index)" :identify="index"></gateSVG>
-           <gateDualSVG v-else :ref="(el) => setChildRef(el, index)" :identify="index">
+          <gateSVG v-if="item.gateStyle == 'fm_fc_ssl'" :ref="(el) => setChildRef(el, index)" :identify="index">
+          </gateSVG>
+          <gateDualSVG v-else :ref="(el) => setChildRef(el, index)" :identify="index">
           </gateDualSVG>
         </div>
         <img src="@/assets/images/camera.png" alt="" @click="handlerCamera(item, index)" />
+        <div class="setting-time">
+          <div>
+            <span>定时开启时间:</span>
+            <span class="set-time">13:23:24</span>
+          </div>
+          <div>
+            <span>启用状态:</span>
+            <span  class="set-time">启用</span>
+          </div>
+          <div>
+            <span>定时关闭时间:</span>
+            <span class="set-time">13:23:24</span>
+          </div>
+        </div>
       </div>
+
     </div>
     <!-- 同步开启/关闭弹窗 -->
     <syncModal :visible="visible" @handleCancel="handleCancel" @handleOk="handleOk"></syncModal>
@@ -59,6 +77,7 @@ import gateSVG from './gateSVG.ssl.vue'
 import operationModal from './operationModal.vue'
 import { useRouter } from 'vue-router';
 import { devicecontrol, insertSyncRule, GetSyncRule } from '../airdoor.api'
+import { doorStatus } from '../airdoor.data'
 // import { getModelComponent } from '../airdoor.data'
 import { useMessage } from '/@/hooks/web/useMessage';
 import { SvgIcon } from '/@/components/Icon';
@@ -106,7 +125,13 @@ async function handleOk(param) {
   let res = await devicecontrol({ deviceids: deviceStr, paramcode: paramcode, password: param.pass || globalConfig?.simulatedPassword })
   if (res) {
     visible.value = param.visib
-    visibleStatus.value = ''
+    // visibleStatus.value = ''
+    doorStatus.openOrclose = true
+    doorStatus.statusCode = visibleStatus.value
+    setTimeout(() => {
+      doorStatus.openOrclose = false
+      doorStatus.statusCode = ''
+    }, 60000 * 5)
   }
 }
 //取消
@@ -263,6 +288,29 @@ watch(() => props.infoData, (newV, oldV) => {
         height: calc(100% - 40px);
       }
 
+      .timePlcNow {
+        position: absolute;
+        right: 5px;
+        top: 0px;
+        color: #fff;
+        font-size: 12px;
+
+      }
+
+      .setting-time {
+        width: 100%;
+        position: absolute;
+        bottom: -25px;
+        left: 0;
+        display: flex;
+        justify-content: space-between;
+        color: #fff;
+        font-size: 12px;
+      }
+      .set-time{
+           color: rgba(60, 242, 255);
+      }
+
       img {
         position: absolute;
         right: 20px;

+ 17 - 18
src/views/vent/monitorManager/airDoor/components/door-menu-l.vue

@@ -1,14 +1,23 @@
 <template>
   <div class="door-status-list">
     <div class="list-content" v-for="(item, index) in menuDatas" :key="index">
-      <div class="item-label">{{ item.strinstallpos }}</div>
-      <div :class="item.statusC == '正常' ? 'item-status' : 'item-status-warn'">{{ item.statusC }}</div>
+      <div class="item-label">{{ item.strinstallpos }} </div>
+      <!-- <div :class="item.netStatus == '1' ? 'item-status' : 'item-status-warn'">{{ doorStatus.openOrclose ?
+        item.ndoorcount == '2' ? item.readData.frontGateOpen == '1' && item.readData.rearGateOpen == '1' ? '同步打开' :
+          item.readData.frontGateOpen == '0' && item.readData.rearGateOpen == '0' ? '同步关闭' : '状态异常' :
+          item.readData.frontGateOpen == '1' ? '同步打开' : item.readData.frontGateOpen == '0' ? '同步关闭' : '状态异常' :
+        item.netStatus == '0' ? '断开' : '连接' }}</div> -->
+       
+      <div :class="item.netStatus == '1' ? 'item-status' : 'item-status-warn'">{{ doorStatus.openOrclose ?
+        doorStatus.statusCode == 'open' ? '打开成功' : doorStatus.statusCode == 'close' ? '关闭正常' : '操作异常' : item.netStatus == '0'
+          ? '断开' : '连接' }}</div>
     </div>
   </div>
 </template>
 
 <script setup lang="ts">
-import { ref, watch } from 'vue'
+import { ref, watch, watchEffect } from 'vue'
+import { doorStatus } from '../airdoor.data'
 
 let props = defineProps({
   menuData: {
@@ -21,16 +30,8 @@ let props = defineProps({
 
 let menuDatas = ref<any[]>([])
 
-watch(() => props.menuData, (newV, oldV) => {
-  console.log(newV, 'menuData')
-  if (newV.length) {
-    menuDatas.value = newV.map((el: any) => {
-      return {
-        ...el,
-        statusC:el.ndoorcount=='2' ? el.readData.frontGateOpen == '1' && el.readData.rearGateOpen == '1' ? '正常' : '异常' : el.readData.frontGateOpen == '1' ? '正常' : '异常'
-      }
-    })
-  }
+watchEffect(() => {
+  menuDatas.value = props.menuData
 })
 
 </script>
@@ -66,20 +67,18 @@ watch(() => props.menuData, (newV, oldV) => {
     box-sizing: border-box;
 
     .item-label {
-      width: calc(100% - 50px);
+      width: calc(100% - 70px);
     }
 
     .item-status {
-      width: 40px;
+      width: 70px;
       text-align: right;
-      margin-left: 10px;
       color: #16e65c;
     }
 
     .item-status-warn {
-      width: 40px;
+      width: 70px;
       text-align: right;
-      margin-left: 10px;
       color: #f00808;
     }
   }