Kaynağa Gözat

风门动画调整

hongrunxia 1 yıl önce
ebeveyn
işleme
53d47cb1d9

+ 6 - 5
index.html

@@ -7,13 +7,14 @@
     <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0" />
     <title><%= title %></title>
     <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" />
-    <link rel="preload" as="script" href="/js/config.js">
+    <!-- <link rel="preload" as="script" href="/js/config.js"> -->
     <!-- <link rel="icon" href="/logo.png" /> -->
     <!-- 全局配置 -->
-    <script defer src="/js/liveplayer-lib.min.js"></script>
-    <script defer src="/js/webrtcstreamer.js"></script>
-    <script defer src="/js/adapter.min.js"></script>
-    <script defer type="text/javascript" src="http://182.92.126.35:9050/web-apps/apps/api/documents/api.js"></script>
+    <script src="/js/config.js"></script>
+    <script src="/js/liveplayer-lib.min.js"></script>
+    <script src="/js/webrtcstreamer.js"></script>
+    <script src="/js/adapter.min.js"></script>
+    <script type="text/javascript" src="http://182.92.126.35:9050/web-apps/apps/api/documents/api.js"></script>
   </head>
   <body style="background-color: #09172C">
     <script>

+ 0 - 0
js/config.js


BIN
public/model/glft/mb/obfurage_2023-09-09.glb


+ 43 - 0
src/design/vent/modal.less

@@ -398,6 +398,49 @@
     //   // background: url('/@/assets/images/vent/bottom-tabs-r.png') no-repeat;
     //   // background-size: contain;
     // }
+    .dv_border_8{
+      position: relative;
+      .enter-detail {
+        color: #fff;
+        cursor: pointer;
+        position: absolute;
+        right: 120px;
+        top: -6px;
+        padding: 5px;
+        border-radius: 5px;
+        margin-left: 8px;
+        margin-right: 8px;
+        width: auto;
+        height: 33px !important;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        color: #fff;
+        padding: 5px 15px 5px 15px;
+        cursor: pointer;
+        right: 20px;
+        top: 6px;
+        z-index: 99;
+        &:hover {
+          background: linear-gradient(#2cd1ff55, #1eb0ff55);
+        }
+
+        &::before {
+          width: calc(100% - 6px);
+          height: 27px;
+          content: '';
+          position: absolute;
+          top: 3px;
+          right: 0;
+          left: 3px;
+          bottom: 0;
+          z-index: -1;
+          border-radius: inherit;
+          /*important*/
+          background: linear-gradient(#1fa6cb, #127cb5);
+        }
+      }
+    }
     .tabs-button-group {
       position: absolute;
       display: flex;

+ 1 - 1
src/hooks/setting/index.ts

@@ -14,7 +14,7 @@ const getUrl = () => {
     },
   })
     .then((response) => response.json())
-    .then((data) => (title = data.result['systemTitle']));
+    .then((data) => (title = data.result && data.result['systemTitle'] ? data.result['systemTitle'] : ''));
 };
 if (!title) {
   try {

+ 1 - 0
src/utils/threejs/main.worker.ts

@@ -48,6 +48,7 @@ export function initModalWorker() {
     'fire/balancePress_2023-07-20.glb',
     'yafeng/compressor_2023-07-10.glb',
     'gas/gasPump_2023-08-18.glb',
+    'mb/obfurage_2023-09-09.glb',
   ];
 
   const db: any = new Dexie('DB');

+ 7 - 0
src/utils/ventutil.ts

@@ -27,3 +27,10 @@ export function toEchartsData(list, option) {
   });
   return option;
 }
+
+export function formatNum(data) {
+  return new Intl.NumberFormat('ja-JP', {
+    minimumFractionDigits: 2,
+    maximumFractionDigits: 2,
+  }).format(data);
+}

+ 39 - 0
src/views/vent/monitorManager/comment/components/DetailModal.vue

@@ -0,0 +1,39 @@
+<template>
+  <BasicModal @register="register" title="预警详情" width="100%" v-bind="$attrs" @ok="onSubmit" @cancel="onSubmit" :defaultFullscreen="true">
+    <div>
+      1223
+    </div>
+  </BasicModal>
+</template>
+<script lang="ts" setup>
+
+import { onMounted, ref, defineEmits, onUnmounted, watch } from 'vue';
+import { BasicModal, useModalInner } from '/@/components/Modal';
+
+const emit = defineEmits(['close', 'register'])
+const props = defineProps({
+  
+})
+
+
+// 注册 modal
+const [register, { closeModal }] = useModalInner();
+
+async function onSubmit() {
+  emit('close')
+  closeModal();
+}
+
+onMounted(async () => {
+
+});
+onUnmounted(() => {
+
+});
+</script>
+<style scoped lang="less">
+
+  @import '/@/design/vent/color.less';
+  @import '/@/design/vent/modal.less';
+  
+</style>

+ 3 - 3
src/views/vent/monitorManager/compreMonitor/compre.data.ts

@@ -1,16 +1,16 @@
 export const param = [
   {
-    title: '总回风量',
+    title: '总回风量(m³/min)',
     code: 'fl',
     value: 2504,
   },
   {
-    title: '瓦斯浓度',
+    title: '瓦斯浓度(%)',
     code: 'gas',
     value: 2504,
   },
   {
-    title: '风排瓦斯量',
+    title: '风排瓦斯量(m³/min)',
     code: 'fpGas',
     value: 2504,
   },

+ 91 - 52
src/views/vent/monitorManager/compreMonitor/index.vue

@@ -1,39 +1,39 @@
 <template>
   <div class="scene-box">
-    <customHeader >智能通风综合监测</customHeader>
+    <customHeader>智能通风风排瓦斯监测</customHeader>
     <div class="center-container">
       <div class="top box">
-        <div class="title top-title">枣林</div>
+        <div class="title top-title">枣林风排瓦斯</div>
         <div class="items-top items-box">
-          <div  v-for="(item, n) in param" :key = n class="item" :class="`item${n+1}`">
+          <div v-for="(item, n) in param" :key=n class="item" :class="`item${n + 1}`">
             <template v-if="item.code != 'gas'">
               <div class="item-title">{{ item.title }}</div>
-              <div class="item-value">{{ dataSource[0] ? new Intl.NumberFormat('ja-JP').format(dataSource[0][item.code]): '-' }}</div>
+              <div class="item-value">{{ dataSource[0] ? formatNum(dataSource[0][item.code]) : '-' }}</div>
             </template>
             <div class="gas-item" v-else-if="dataSource[0] && dataSource[0][item.code]">
               <div class="gas" v-for="(gasItem, i) in dataSource[0][item.code]" :key="i">
                 <div class="title1">{{ gasItem['title'] }}</div>
-                <div class="title2">瓦斯浓度</div>
-                <div class="item-value">{{ gasItem['value'] ? new Intl.NumberFormat('ja-JP').format(gasItem['value']) : '-' }}</div>
+                <div class="title2">瓦斯浓度(%)</div>
+                <div class="item-value">{{ gasItem['value'] ? formatNum(gasItem['value']) : '-' }}</div>
               </div>
             </div>
-            
+
           </div>
         </div>
       </div>
       <div class="bottom box">
-        <div class="title bottom-title">刘家堰</div>
+        <div class="title bottom-title">刘家堰风排瓦斯</div>
         <div class="items-bottom items-box">
-          <div  v-for="(item, n) in param" :key = n class="item" :class="`item${n+1}`">
+          <div v-for="(item, n) in param" :key=n class="item" :class="`item${n + 1}`">
             <template v-if="item.code != 'gas'">
               <div class="item-title">{{ item.title }}</div>
-              <div class="item-value">{{ dataSource[1] ? new Intl.NumberFormat('ja-JP').format(dataSource[1][item.code]) : '-' }}</div>
+              <div class="item-value">{{ dataSource[1] ? formatNum(dataSource[1][item.code]) : '-' }}</div>
             </template>
             <div class="gas-item" v-else-if="dataSource[0] && dataSource[0][item.code]">
               <div class="gas" v-for="(gasItem, i) in dataSource[1][item.code]" :key="i">
                 <div class="title1">{{ gasItem['title'] }}</div>
-                <div class="title2">瓦斯浓度</div>
-                <div class="item-value">{{ gasItem['value'] ? new Intl.NumberFormat('ja-JP').format(gasItem['value']) : '-' }}</div>
+                <div class="title2">瓦斯浓度(%)</div>
+                <div class="item-value">{{ gasItem['value'] ? formatNum(gasItem['value']) : '-' }}</div>
               </div>
             </div>
           </div>
@@ -44,10 +44,11 @@
 </template>
 
 <script setup lang="ts">
-import { ref, onMounted, onUnmounted, nextTick } from 'vue';
+import { ref, onMounted, onUnmounted } from 'vue';
 import customHeader from '/@/views/vent/comment/components/customHeader.vue';
 import { param, httpParam, result1, result2 } from './compre.data'
 import { list } from './compre.api'
+import { formatNum } from '/@/utils/ventutil'
 
 type DataSource = {
   fl: number,
@@ -57,16 +58,39 @@ type DataSource = {
 const dataSource = ref<DataSource[]>([])
 
 let timer = null as unknown as NodeJS.Timer;
-async function getDataSource(t:NodeJS.Timer){
-  setTimeout(async() => {
+async function getDataSource(t: NodeJS.Timer) {
+  setTimeout(async () => {
     // const result1 = resultFn1()
     // const result2 = resultFn2()
     try {
-      for(let i=0; i < httpParam.length; i++){
+      for (let i = 0; i < httpParam.length; i++) {
         const item = httpParam[i]
-        const res = await list({ devcode: item.devcode })[0]
+        const result = await list({ devcode: item.devcode })
+        // console.log('综合监测返回数据------>', result, result1, result2)
+        let res = result[0]
+
+        // res = {
+        //   "createDt": null,
+        //   "monitDt": null,
+        //   "id": null,
+        //   "stationcode": null,
+        //   "devcode": "14010100313501MN0001053A10",
+        //   "devtypename": null,
+        //   "realvalue": Number(Math.random() * 100.68 + 12).toFixed(2),
+        //   "unit": "%CH4",
+        //   "adddate": "2023-09-08 16:54:19",
+        //   "devaddress": "五盘区一号回风巷瓦斯",
+        //   "uppervalue": null,
+        //   "lowervalue": null,
+        //   "uppervalueAlm": null,
+        //   "lowervalueAlm": null,
+        //   "dataType": "环境瓦斯",
+        //   "dataTypeCode": null,
+        //   "sigType": null,
+        //   "state": "正常"
+        // }
         if (res) {
-          switch(item.code){
+          switch (item.code) {
             case '1_fs1':
               result1[0]['fs'] = res['realvalue'];
               break;
@@ -91,10 +115,10 @@ async function getDataSource(t:NodeJS.Timer){
             case '2_gas2':
               result2[1]['gas'] = res['realvalue'];
               break;
-          } 
+          }
         }
       }
-      
+
       // 计算
       const data = [
         {
@@ -144,7 +168,7 @@ async function getDataSource(t:NodeJS.Timer){
 
       dataSource.value = data
     } catch (error) {
-      clearInterval(t)
+      // clearInterval(t)
     }
   }, 0)
 }
@@ -152,7 +176,7 @@ async function getDataSource(t:NodeJS.Timer){
 
 onMounted(async () => {
   await getDataSource(timer)
-  timer = setInterval(async() => {
+  timer = setInterval(async () => {
     await getDataSource(timer)
   }, 5000)
 });
@@ -163,57 +187,66 @@ onUnmounted(() => {
 
 </script>
 <style lang="less" scoped>
-.center-container{
+.center-container {
   width: 100%;
   height: 100%;
   display: flex;
   justify-content: center;
   align-items: center;
   flex-direction: column;
-  
-  .top{
+
+  .top {
     background: url('/@/assets/images/vent/compre-top.png') no-repeat;
     margin-top: 60px;
   }
-  .bottom{
+
+  .bottom {
     background: url('/@/assets/images/vent/compre-bottom.png') no-repeat;
     margin-top: 80px;
   }
-  .box{
+
+  .box {
     width: 1500px;
     height: 320px;
     background-size: contain;
     position: relative;
-    .title{
+
+    .title {
       width: 100%;
       position: absolute;
       color: #dddddd;
       text-align: center;
-      font-size: 28px;
+      font-size: 22px;
       font-weight: 600;
       text-shadow: 2px 2px 4px #00000088;
     }
-    .top-title{
-      top: 10px;
+
+    .top-title {
+      top: 14px;
     }
-    .bottom-title{
-      bottom: 25px;
+
+    .bottom-title {
+      bottom: 33px;
     }
 
   }
-  .items-top{
+
+  .items-top {
     margin-top: 130px;
   }
-  .items-bottom{
+
+  .items-bottom {
     margin-top: 45px;
   }
-  .items-box{
+
+  .items-box {
     width: 100%;
     height: 100%;
     display: flex;
     justify-content: space-around;
     padding: 0 40px;
-    .item{
+
+    .item {
       width: 375px;
       height: 132px;
       display: flex;
@@ -222,16 +255,19 @@ onUnmounted(() => {
       align-items: flex-start;
       padding-left: 160px;
       position: relative;
-      .item-title{
+
+      .item-title {
         color: #e8e8e8;
         margin-bottom: 10px;
         font-weight: 600;
       }
-      .item-value{
+
+      .item-value {
         font-size: 22px;
         font-family: 'douyuFont';
       }
-      .gas-item{
+
+      .gas-item {
         position: absolute;
         width: 100%;
         height: 100%;
@@ -241,14 +277,16 @@ onUnmounted(() => {
         left: 0px;
         padding: 0 60px;
         top: 20px;
-        .gas{
-          .title1{
+
+        .gas {
+          .title1 {
             color: #00d9ff;
             margin-bottom: 10px;
             font-size: 16px;
             font-weight: 600;
           }
-          .title2{
+
+          .title2 {
             color: #fff;
             margin-bottom: 10px;
             font-weight: 600;
@@ -256,22 +294,23 @@ onUnmounted(() => {
         }
       }
     }
-    .item1{
+
+    .item1 {
       background: url('/@/assets/images/vent/compre-3.png') no-repeat;
       color: #30B6FF;
     }
-    .item2{
+
+    .item2 {
       width: 507px;
       height: 135px;
       background: url('/@/assets/images/vent/compre-2-1.png') no-repeat;
       color: #A9B6FF;
-    } 
-    .item3{
+    }
+
+    .item3 {
       background: url('/@/assets/images/vent/compre-1.png') no-repeat;
       color: #27FDED;
-    } 
+    }
   }
-  
-} 
-  
-</style>
+
+}</style>

+ 101 - 0
src/views/vent/monitorManager/fanLocalMonitor/components/DetailModal.vue

@@ -0,0 +1,101 @@
+<template>
+  <BasicModal @register="register"  title="风机详情" width="100%" v-bind="$attrs" @ok="onSubmit" @cancel="onSubmit" :defaultFullscreen="true">
+    <div class="detail-box">
+      <div class="left-box">流程图</div>
+      <div class="right-box">
+        <div class="right-title">二部胶带机移变移动变电站控制详情</div>
+        <div class="detail-container">
+          <div class="detail-control">
+            <div>高压分闸</div>
+            <div>高压合闸</div>
+            <div>高压复位</div>
+            <div>低压复位</div>
+          </div>
+          <div class="detail-box">
+            <a-tabs class="tabs-box" v-model:activeKey="activeKey" @change="tabChange">
+              <a-tab-pane key="1" tab="运行状态">
+                    
+              </a-tab-pane>
+              <a-tab-pane key="2" tab="保护使能">
+                
+              </a-tab-pane>
+            </a-tabs>
+          </div>
+        </div>
+      </div>
+    </div>
+  </BasicModal>
+</template>
+<script lang="ts" setup>
+
+import { onMounted, ref, defineEmits, onUnmounted, watch } from 'vue';
+import { BasicModal, useModalInner } from '/@/components/Modal';
+
+const emit = defineEmits(['close', 'register'])
+const props = defineProps({
+  
+})
+const activeKey = ref('1')
+
+// 注册 modal
+const [register, { closeModal }] = useModalInner();
+
+const tabChange = (key) => {
+  activeKey.value = key
+}
+
+async function onSubmit() {
+  emit('close')
+  closeModal();
+}
+
+onMounted(async () => {
+
+});
+onUnmounted(() => {
+
+});
+</script>
+<style scoped lang="less">
+
+  @import '/@/design/vent/color.less';
+  @import '/@/design/vent/modal.less';
+  .detail-box{
+    width: 100%;
+    height: 100%;
+    padding: 10px;
+    display: flex;
+    justify-content: space-between;
+    .left-box{
+      width: 600px;
+      height: 100%;
+      border-right: 1px solid #ffffff22;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      font-size: 30px;
+    }
+    .right-box{
+      flex: 1;
+      height: 100%;
+      .right-title{
+        line-height: 60px;
+      }
+      .detail-container{
+        height: 100%;
+        display: flex;
+        justify-content: space-between;
+        
+        .detail-control{
+          width: 300px;
+          display: flex;
+          flex-direction: column;
+          background: #ffffff11;
+        }
+        .detail-box{
+
+        }
+      }
+    }
+  }
+</style>

+ 24 - 12
src/views/vent/monitorManager/fanLocalMonitor/index.vue

@@ -169,7 +169,11 @@
     </div>
 
     <div class="bottom-tabs-box" @mousedown="setDivHeight($event, 100, scroll, 125)">
-      <dv-border-box8 :dur="5"  :style="`top: 65px; padding: 5px; height: ${scroll.y + 120}px`" >
+      
+      <dv-border-box8 :dur="5" class="dv_border_8"  :style="`top: 65px; padding: 5px; height: ${scroll.y + 120}px`" >
+        <div class="enter-detail" @click="goDetail()">
+          <send-outlined class=""/>风机运行详情
+        </div>
         <a-tabs class="tabs-box" v-model:activeKey="activeKey" @change="tabChange">
           <a-tab-pane key="1" tab="实时监测">
             <GroupMonitorTable  v-if="activeKey === '1'" ref="MonitorDataTable" :dataSource="dataSource" columnsType="fanlocal_monitor" @selectRow="getSelectRow" :scroll="scroll"/>
@@ -303,16 +307,18 @@
       </div>
     </div>
   </a-modal>
+  <DetailModal @register="registerModal"/>
 </template>
 
 <script setup lang="ts">
-  import { ExclamationCircleFilled } from '@ant-design/icons-vue';
+  import { ExclamationCircleFilled, SendOutlined } from '@ant-design/icons-vue';
   import { onBeforeMount, ref, computed, onMounted, nextTick, toRaw, reactive, onUnmounted } from 'vue';
   import BarSingle from '../../../../components/chart/BarSingle.vue';
   import GroupMonitorTable from '../comment/GroupMonitorTable.vue';
   import HistoryTable from '../comment/HistoryTable.vue';
   import AlarmHistoryTable from '../comment/AlarmHistoryTable.vue';
   import HandlerHistoryTable from '../comment/HandlerHistoryTable.vue';
+  import DetailModal from './components/DetailModal.vue';
   import { mountedThree, setModelType, destroy, addCssText, addText, playSmoke } from './fanLocal.three';
   import lodash from 'lodash';
   import { getTableList, list } from '/@/views/vent/monitorManager/fanLocalMonitor/fanLocal.api';
@@ -326,7 +332,9 @@
   import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
   import { SvgIcon } from '/@/components/Icon';
   import { useRouter } from 'vue-router';
+  import { useModal } from '/@/components/Modal';
 
+  const [registerModal, { openModal, closeModal }] = useModal();
   const { currentRoute } = useRouter();
 
   const modalTypeArr = reactive({
@@ -440,6 +448,9 @@
     netStatus: '0', //通信状态
     fault: '气源压力超限',
   };
+  const dataSource = ref([]);
+  // 监测数据
+  const selectData = reactive(lodash.cloneDeep(initData));
 
   const deviceType = computed(() => selectData.deviceType);
 
@@ -447,8 +458,7 @@
     // return `https://sf1-hscdn-tos.pstatp.com/obj/media-fe/xgplayer_doc_video/flv/xgplayer-demo-360p.flv`;
     return ''
   };
-  // 监测数据
-  const selectData = reactive(lodash.cloneDeep(initData));
+  
 
   const tabChange = (activeKeyVal) => {
     activeKey.value = activeKeyVal;
@@ -460,15 +470,17 @@
   };
 
   const selectDevice = (key, val) => {
-  if (key === 'dataMonitorRowIndex') {
-    dataMonitorRowIndex.value = val;
-  } else {
-    warningMonitorRowIndex.value = val;
-  }
-};
-
-  const dataSource = ref([]);
+    if (key === 'dataMonitorRowIndex') {
+      dataMonitorRowIndex.value = val;
+    } else {
+      warningMonitorRowIndex.value = val;
+    }
+  };
 
+  //详情
+  function goDetail() {
+    openModal()
+  }
   //
   async function getDataSource(){
     const res = await list({ devicetype: 'fanlocal', pagetype: 'normal' });

+ 1 - 1
src/views/vent/monitorManager/gateMonitor/gate.threejs.ts

@@ -39,7 +39,7 @@ const mouseEvent = (event) => {
         fm2.mousedownModel.call(fm2, intersects);
       }
     });
-    console.log('摄像头控制信息', model.orbitControls, model.camera);
+    // console.log('摄像头控制信息', model.orbitControls, model.camera);
   }
 };
 

+ 34 - 45
src/views/vent/monitorManager/gateMonitor/index.vue

@@ -83,29 +83,23 @@
               :isShowPagination="false"
             >
               <template #filterCell="{ column, record }">
-                <template v-if="record.frontGateOpenCtrl">
+                <template v-if="record.frontGateOpenCtrl == 1 || record.frontGateOpenCtrl === true">
                   <a-tag v-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 0 && record.frontGateClose == 0" color="red">正在打开</a-tag>
                   <a-tag v-else-if="column.dataIndex === 'frontGateOpen'" color="processing">打开</a-tag>
-                  <!-- <a-tag v-if="column.dataIndex === 'frontGateOpen'" color="processing">打开</a-tag> -->
                 </template>
-                <template v-else>
+                <template v-else-if="record.frontGateOpenCtrl == 0 || record.frontGateOpenCtrl === false">
                   <a-tag v-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 0 && record.frontGateClose == 0" color="red">正在关闭</a-tag>
                   <a-tag v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 0 && record.frontGateClose == 1" color="default">关闭</a-tag>
                   <a-tag v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 1 && record.frontGateClose == 0" color="default">打开</a-tag>
-                  <!-- <a-tag v-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 0 && record.frontGateClose == 1" color="default">关闭</a-tag>
-                  <a-tag v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 1 && record.frontGateClose == 0" color="default">打开</a-tag> -->
                 </template>
-                <template v-if="record.rearGateOpenCtrl">
+                <template v-if="record.rearGateOpenCtrl == 1 || record.rearGateOpenCtrl === true">
                   <a-tag v-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 0 && record.rearGateClose == 0" color="red">正在打开</a-tag>
                   <a-tag v-else-if="column.dataIndex === 'rearGateOpen'" color="processing">打开</a-tag>
-                  <!-- <a-tag v-if="column.dataIndex === 'rearGateOpen'" color="processing">打开</a-tag> -->
                 </template>
-                <template v-else>
+                <template v-else-if="record.rearGateOpenCtrl == 0 || record.rearGateOpenCtrl === false">
                   <a-tag v-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 0 && record.rearGateClose == 0" color="red">正在关闭</a-tag>
                   <a-tag v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 0 && record.rearGateClose == 1" color="default">关闭</a-tag>
                   <a-tag v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 1 && record.rearGateClose == 0" color="default">打开</a-tag>
-                  <!-- <a-tag v-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 0 && record.rearGateClose == 1" color="default">关闭</a-tag>
-                  <a-tag v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 1 && record.rearGateClose == 0" color="default">打开</a-tag> -->
                 </template>
                 
                 <a-tag v-if="column.dataIndex === 'warnFlag'" :color="record.warnFlag == 0 ? 'green' : 'red'">{{
@@ -294,8 +288,10 @@
 
     const baseData: any = deviceBaseList.value.find((baseData: any) => baseData.id === selectRow.deviceID);
     Object.assign(selectData, initData, selectRow, baseData);
-    isFrontRunning = false //开关门动作是否在进行
-    isRearRunning = false //开关门动作是否在进行
+    isFrontOpenRunning = false //开关门动作是否在进行
+    isFrontCloseRunning = false //开关门动作是否在进行
+    isRearOpenRunning = false //开关门动作是否在进行
+    isRearCloseRunning = false //开关门动作是否在进行
     frontDeviceState = 0 //记录设备状态,为了与下一次监测数据做比较
     rearDeviceState = 0 //记录设备状态,为了与下一次监测数据做比较
     // const type = selectData.nwindownum == 1 ? 'singleWindow' : 'doubleWindow';
@@ -378,11 +374,11 @@
       return;
     }
 
-    if(isFrontRunning && (handlerState == 2 || handlerState == 1 || handlerState == 5 || handlerState == 6)){
+    if((isFrontOpenRunning || isFrontCloseRunning)  && (handlerState == 2 || handlerState == 1 || handlerState == 5 || handlerState == 6)){
       return
     }
 
-    if (isRearRunning && (handlerState == 3 || handlerState == 4 || handlerState == 5 || handlerState == 6)) {
+    if ((isRearOpenRunning || isRearCloseRunning) && (handlerState == 3 || handlerState == 4 || handlerState == 5 || handlerState == 6)) {
       return
     }
     
@@ -460,28 +456,30 @@
   };
 
   /** 开关门动画调用 */
-  let isFrontRunning = false //开关门动作是否在进行
-  let isRearRunning = false //开关门动作是否在进行
+  let isFrontOpenRunning = false //开关门动作是否在进行
+  let isFrontCloseRunning = false //开关门动作是否在进行
+  let isRearOpenRunning = false //开关门动作是否在进行
+  let isRearCloseRunning = false //开关门动作是否在进行
   let frontDeviceState = 0 //记录设备状态,为了与下一次监测数据做比较
   let rearDeviceState = 0 //记录设备状态,为了与下一次监测数据做比较  
   function monitorAnimation(selectData) {
     const timeScale = 0.003
-    if (selectData.frontGateOpenCtrl) {
-
+    if (selectData.frontGateOpenCtrl == 1 || selectData.frontGateOpenCtrl === true) {
+      isFrontCloseRunning = false
       if (selectData.frontGateOpen == 0 && selectData.frontGateClose == 0) {
         //打开前门1
         
-        if(!isFrontRunning){
+        if(!isFrontOpenRunning){
           frontDoorIsOpen.value = true
           backDoorIsOpen.value = true
-          isFrontRunning = true
+          isFrontOpenRunning = true
           play(1, timeScale)
           frontDeviceState = 1
         }
         
       }
       if (selectData.frontGateOpen == 1 && selectData.frontGateClose == 0) {
-        isFrontRunning = false
+        isFrontOpenRunning = false
         if (frontDeviceState != 1) {
           import.meta.env.VITE_GLOB_IS_SIMULATE ? play(1, timeScale) : play(1)
           frontDeviceState = 1
@@ -492,9 +490,9 @@
     } else {
       if (selectData.frontGateOpen == 0 && selectData.frontGateClose == 0) {
         //关闭前门
-        
-        if(!isFrontRunning){
-          isFrontRunning = true
+        isFrontOpenRunning = false
+        if(!isFrontCloseRunning){
+          isFrontCloseRunning = true
           play(2, timeScale)
           frontDeviceState = 2
           frontDoorIsOpen.value = true
@@ -502,7 +500,7 @@
         }
       }
       if (selectData.frontGateClose == 1 && selectData.frontGateOpen == 0) {
-        isFrontRunning = false
+        isFrontCloseRunning = false
         if (frontDeviceState == 1) {
           import.meta.env.VITE_GLOB_IS_SIMULATE ? play(2, timeScale) : play(2)
           frontDeviceState = 2
@@ -512,11 +510,12 @@
       }
     }
     
-    if (selectData.rearGateOpenCtrl) {
+    if (selectData.rearGateOpenCtrl == 1 || selectData.rearGateOpenCtrl === true) {
+      isRearCloseRunning = false
       if (selectData.rearGateOpen == 0 && selectData.rearGateClose == 0) {
         //打开后门
-        if(!isRearRunning){
-          isRearRunning = true
+        if(!isRearOpenRunning){
+          isRearOpenRunning = true
           play(3, timeScale)
           rearDeviceState = 3
           frontDoorIsOpen.value = true
@@ -525,7 +524,7 @@
         
       }
       if (selectData.rearGateOpen == 1 && selectData.rearGateClose == 0) {
-        isRearRunning = false
+        isRearOpenRunning = false
         
         if (rearDeviceState != 3) {
           rearDeviceState = 3
@@ -537,19 +536,17 @@
     } else {
       if (selectData.rearGateOpen == 0 && selectData.rearGateClose == 0) {
         //关闭后门
-        
-        if(!isRearRunning){
-          isRearRunning = true
+        isRearOpenRunning = false
+        if(!isRearCloseRunning){
+          isRearCloseRunning = true
           play(4, timeScale)
           rearDeviceState = 4
           frontDoorIsOpen.value = true
           backDoorIsOpen.value = true
         }
-        
       }
       if (selectData.rearGateClose == 1 && selectData.rearGateOpen == 0) {
-        isRearRunning = false
-        
+        isRearCloseRunning = false
         if (rearDeviceState == 3) {
           rearDeviceState = 4
           import.meta.env.VITE_GLOB_IS_SIMULATE ? play(4, timeScale) : play(4)
@@ -558,16 +555,8 @@
       }
     }
 
-    // if(!(selectData.frontGateOpen == 0 && selectData.frontGateClose == 0 && selectData.rearGateOpen == 0 && selectData.rearGateClose == 0)) {
-    //   if (selectData.frontGateOpenCtrl && selectData.rearGateOpenCtrl && selectData.frontGateOpen == 1 && selectData.rearGateOpen == 1) {
-    //     frontDoorIsOpen.value = true
-    //     backDoorIsOpen.value = true
-    //   }
-    //   if (!selectData.frontGateOpenCtrl && !selectData.rearGateOpenCtrl && selectData.frontGateClose == 1 && selectData.rearGateClose == 1) {
-    //     frontDoorIsOpen.value = false
-    //     backDoorIsOpen.value = false
-    //   }
-    // }
+    console.log('frontGateOpen:', selectData.frontGateOpen,'  frontGateClose:', selectData.frontGateClose, ' rearGateOpen:', selectData.rearGateOpen, '  rearGateClose:', selectData.rearGateClose, '  frontGateOpenCtrl:', selectData.frontGateOpenCtrl, '  rearGateOpenCtrl:', selectData.rearGateOpenCtrl)
+  
   }
   
   function handleCancel() {

+ 9 - 19
src/views/vent/monitorManager/obfurageMonitor/components/obfurageHome.vue

@@ -28,11 +28,6 @@
                     <span class="value" style="color: #FF3823; font-weight: 600;">15</span>
                   </div>
                   <div class="item-col">
-                    <SvgIcon class="icon" size="24" name="alarm-CO" />
-                    <span class="title">CO传感器</span>
-                    <span class="value">无</span>
-                  </div>
-                  <div class="item-col">
                     <SvgIcon class="icon" size="24" name="alarm-temperature" />
                     <span class="title">温度传感器</span>
                     <span class="value">无</span>
@@ -53,19 +48,14 @@
                     <span class="value" style="color: #FF9B17; font-weight: 600;">15</span>
                   </div>
                   <div class="item-col">
-                    <SvgIcon class="icon" size="22" name="warning-CO" />
-                    <span class="title">CO传感器</span>
-                    <span class="value">无</span>
-                  </div>
-                  <div class="item-col">
                     <SvgIcon class="icon" size="22" name="warning-temperature" />
                     <span class="title">温度传感器</span>
                     <span class="value">无</span>
                   </div>
                 </div>
                 <div class="alarm-box">
-                  <dv-scroll-board ref="scrollBoard" :config="warningConfig"
-                    style="width: 100%; height: 240px; overflow-y: auto; " />
+                  <!-- <dv-scroll-board ref="scrollBoard" :config="warningConfig"
+                    style="width: 100%; height: 240px; overflow-y: auto; " /> -->
                 </div>
               </div>
             </template>
@@ -307,13 +297,13 @@ onBeforeMount(() => {
 onMounted(() => {
   loading.value = true;
 
-  getMonitor(true)
-  // mountedThree().then(async () => {
-  //   await setModelType('obfurageBase');
-  //   loading.value = false;
-  //   timer = null
-  //   await getMonitor(true)
-  // });
+  // getMonitor(true)
+  mountedThree().then(async () => {
+    await setModelType('obfurage');
+    loading.value = false;
+    timer = null
+    await getMonitor(true)
+  });
 });
 
 onUnmounted(() => {

+ 2 - 2
src/views/vent/monitorManager/obfurageMonitor/obfurage.threejs.base.ts

@@ -41,8 +41,8 @@ class ChamberBase {
       this.model.setGLTFModel([this.modelName]).then((gltf) => {
         this.group = gltf[0];
         if (this.group) {
-          this.group?.scale.set(0.1, 0.1, 0.1);
-          this.group.position.y += 40;
+          // this.group?.scale.set(0.1, 0.1, 0.1);
+          // this.group.position.y += 40;
           resolve(null);
           this.addLight();
         }

+ 7 - 7
src/views/vent/monitorManager/obfurageMonitor/obfurage.threejs.ts

@@ -8,7 +8,7 @@ import useEvent from '../../../../utils/threejs/useEvent';
 let model: UseThree | undefined,
   obfurageBaseObj: ChamberBase | undefined,
   group: THREE.Object3D | undefined,
-  obfurageType = 'obfurageBase';
+  obfurageType = 'obfurage';
 
 const { mouseDownFn } = useEvent();
 
@@ -16,7 +16,7 @@ const { mouseDownFn } = useEvent();
 const mouseEvent = (event) => {
   if (event.button == 0) {
     mouseDownFn(<UseThree>model, <THREE.Object3D>group, event, (intersects) => {
-      if (obfurageType === 'obfurageBase') {
+      if (obfurageType === 'obfurage') {
         // obfurageBaseObj.mousedownModel.call(obfurageBaseObj, intersects);
       }
     });
@@ -38,7 +38,7 @@ const render = () => {
 };
 
 export const addChamberText = (selectData) => {
-  if (obfurageType === 'obfurageBase') {
+  if (obfurageType === 'obfurage') {
     // return obfurageBaseObj.addChamberText.call(obfurageBaseObj, selectData);
   }
 };
@@ -47,18 +47,18 @@ export const addChamberText = (selectData) => {
 export const setModelType = (type) => {
   obfurageType = type;
   return new Promise((resolve) => {
-    if (obfurageType === 'obfurageBase' && obfurageBaseObj && obfurageBaseObj.group) {
+    if (obfurageType === 'obfurage' && obfurageBaseObj && obfurageBaseObj.group) {
       group = obfurageBaseObj.group;
       const oldCameraPosition = { x: 124.736, y: 63.486, z: 103.337 };
       model?.scene?.add(obfurageBaseObj.group);
       setModalCenter(model?.scene);
-      model?.camera?.position.set(0, 0, 300);
+      model?.camera?.position.set(0, 0, 100);
       setTimeout(async () => {
         await animateCamera(
           oldCameraPosition,
           { x: 0, y: 0, z: 0 },
-          { x: 11.19, y: 400.13, z: 344.2 },
-          { x: 10.446, y: 0.875, z: -0.993 },
+          { x: 2.0742689924768984, y: 1.76596172882596, z: 4.091212734674865 },
+          { x: 0.1631971496294004, y: -0.2543056478797786, z: -0.325140666535655 },
           model,
           0.8
         );