Преглед изворни кода

1. 公司端首页图标点击调整

hongrunxia пре 9 месеци
родитељ
комит
c359c4d2b1

+ 14 - 9
src/layouts/default/sider/bottomSideder.vue

@@ -66,7 +66,7 @@
   import { PageEnum } from '/@/enums/pageEnum';
   import { useGlobSetting } from '/@/hooks/setting';
   import { unmountMicroApps } from '/@/qiankun';
-  import { watch } from 'vue';
+  import { useUserStoreWithOut } from '/@/store/modules/user';
 
   export default defineComponent({
     name: 'BottomSider',
@@ -80,6 +80,7 @@
       const go = useGo();
       const glob = useGlobSetting();
       const isShowMenu = ref(route.path.startsWith('/cad-viewer') ? 1 : 0);
+      const userStore = useUserStoreWithOut();
 
       function selectMenu(e: Event, programMenu) {
         e.stopPropagation();
@@ -120,17 +121,21 @@
       }
 
       function geHome() {
-        if (currentRoute.value.path.startsWith('/micro-vent-3dModal/dashboard/analysis')) {
-          if (glob.homePath == '/micro-vent-3dModal/dashboard/analysis' || PageEnum.BASE_HOME == '/micro-vent-3dModal/dashboard/analysis') {
-            actions.setGlobalState({ pageObj: { pageType: 'home' } });
-            go(glob.homePath || PageEnum.BASE_HOME);
-          }
+        if (userStore.getUserInfo.homePath) {
+          go(userStore.getUserInfo.homePath);
         } else {
-          if (glob.homePath == '/model3D/home' || PageEnum.BASE_HOME == '/model3D/home') {
+          if (currentRoute.value.path.startsWith('/micro-vent-3dModal/dashboard/analysis')) {
+            if (glob.homePath == '/micro-vent-3dModal/dashboard/analysis' || PageEnum.BASE_HOME == '/micro-vent-3dModal/dashboard/analysis') {
+              actions.setGlobalState({ pageObj: { pageType: 'home' } });
+              go(glob.homePath || PageEnum.BASE_HOME);
+            }
+          } else {
+            if (glob.homePath == '/model3D/home' || PageEnum.BASE_HOME == '/model3D/home') {
+              go(glob.homePath || PageEnum.BASE_HOME);
+              // location.reload()
+            }
             go(glob.homePath || PageEnum.BASE_HOME);
-            // location.reload()
           }
-          go(glob.homePath || PageEnum.BASE_HOME);
         }
       }
       function closeMenu(e?: Event) {

+ 2 - 2
src/views/vent/home/clique/index1.vue

@@ -57,8 +57,8 @@
   import iconLight from './components/icon-light.vue';
   // import mapComponent from './components/3Dmap/index.vue';
 
-  let mainTitle = ref('国家能源神东煤炭集团');
-  // let mainTitle = ref('XXXX集团');
+  // let mainTitle = ref('国家能源神东煤炭集团');
+  let mainTitle = ref('XXXX集团');
   function showDetail(code) {
     if (code) {
       // isShowDialog.value = true;

+ 2 - 1
src/views/vent/home/clique/testPage.vue

@@ -15,7 +15,8 @@
   import { computed, ref, inject } from 'vue';
   // import mapComponent from './components/3Dmap/index.vue';
   const globalConfig = inject('globalConfig');
-  const mainTitle = ref('国家能源神东煤炭集团');
+  // const mainTitle = ref('国家能源神东煤炭集团');
+  const mainTitle = ref('XXXX集团');
   const cards = ref<{ title: string }[]>(
     globalConfig.History_Type == 'vent'
       ? [

+ 22 - 33
src/views/vent/monitorManager/fanLocalMonitor/index.vue

@@ -297,7 +297,7 @@
           </a-tab-pane>
           <a-tab-pane key="3" tab="历史数据">
             <div class="tab-item" v-if="activeKey === '3'">
-              <HistoryTable :columns-type="`${selectData.deviceType}`" :device-type="`${devicekide}`" designScope="fanlocal-history" :scroll="scroll">
+              <!-- <HistoryTable :columns-type="`${selectData.deviceType}`" :device-type="`${devicekide}`" designScope="fanlocal-history" :scroll="scroll">
                 <template #filterCell="{ column, record }">
                   <a-tag v-if="column.dataIndex === 'warnFlag'" :color="record.warnFlag == '0' ? 'green' : 'red'">{{
                     record.warnFlag == '0' ? '正常' : '报警'
@@ -307,17 +307,13 @@
                   }}</a-tag>
                   <div v-if="record.nwindownum == 1 && column.dataIndex === 'rearArea'">/</div>
                 </template>
-              </HistoryTable>
+              </HistoryTable> -->
+              <HistoryTable class="w-100% h-100% mt-100px" :device-code="`${devicekide}`" :scroll="scroll" dict-code="fanlocal_dict" />
             </div>
           </a-tab-pane>
           <a-tab-pane key="4" tab="报警历史">
             <div class="tab-item" v-if="activeKey === '4'">
-              <AlarmHistoryTable
-                columns-type="alarm"
-                :device-type="`${devicekide}`"
-                designScope="alarm-history"
-                :scroll="scroll"
-              />
+              <AlarmHistoryTable columns-type="alarm" :device-type="`${devicekide}`" designScope="alarm-history" :scroll="scroll" />
             </div>
           </a-tab-pane>
           <a-tab-pane key="5" tab="操作历史">
@@ -475,7 +471,8 @@
   import { onBeforeMount, ref, watch, onMounted, nextTick, toRaw, reactive, onUnmounted, inject, unref } from 'vue';
   import BarSingle from '../../../../components/chart/BarSingle.vue';
   import GroupMonitorTable from '../comment/GroupMonitorTable.vue';
-  import HistoryTable from '../comment/HistoryTable.vue';
+  // import HistoryTable from '../comment/HistoryTable.vue';
+  import HistoryTable from '/@/views/vent/comment/history/HistoryTable.vue';
   import AlarmHistoryTable from '../comment/AlarmHistoryTable.vue';
   import HandlerHistoryTable from '../comment/HandlerHistoryTable.vue';
   import DeviceBaseInfo from '../comment/components/DeviceBaseInfo.vue';
@@ -503,7 +500,7 @@
   import { usePermission } from '/@/hooks/web/usePermission';
   import { useGlobSetting } from '/@/hooks/setting';
   import { useMessage } from '/@/hooks/web/useMessage';
-  
+
   const { hasPermission } = usePermission();
   const globalConfig = inject('globalConfig');
   const [registerModal, { openModal, closeModal }] = useModal();
@@ -975,7 +972,6 @@
           data.paramcode = 'CtrlFan1Start';
           deviceControlApi(data)
             .then((res) => {
-
               if (res.success) {
                 if (globalConfig.History_Type == 'remote') {
                   message.success('指令已下发至生产管控平台成功!');
@@ -985,7 +981,7 @@
                 modalTitle.value = '';
                 modalIsShow.value = false;
               } else {
-                message.error(res.message)
+                message.error(res.message);
               }
             })
             .catch((err) => {
@@ -1005,13 +1001,10 @@
                 modalTitle.value = '';
                 modalIsShow.value = false;
               } else {
-                message.error(res.message)
+                message.error(res.message);
               }
             })
-            .catch((err) => {
-
-
-            });
+            .catch((err) => {});
         } else if (mainWindIsShow1.value === 'stop' && mainWindIsShow2.value === 'stop') {
           // playSmoke(handType, '', frequency, 'stop');
         }
@@ -1040,7 +1033,7 @@
               modalTitle.value = '';
               modalIsShow.value = false;
             } else {
-              message.error(res.message)
+              message.error(res.message);
             }
           })
           .catch((err) => {
@@ -1070,11 +1063,10 @@
               modalTitle.value = '';
               modalIsShow.value = false;
             } else {
-              message.error(res.message)
+              message.error(res.message);
             }
           })
-          .catch((err) => {
-          });
+          .catch((err) => {});
       } else if (handType === 'changeSmoke') {
         if (selectData['Fan1StartStatus'] == '0' || !selectData['Fan1StartStatus']) {
           data.paramcode = 'CtrlFan1Start';
@@ -1089,14 +1081,13 @@
                 modalTitle.value = '';
                 modalIsShow.value = false;
               } else {
-                message.error(res.message)
+                message.error(res.message);
               }
 
               mainWindIsShow1.value = 'stop';
               mainWindIsShow2.value = 'open';
             })
-            .catch((err) => {
-            });
+            .catch((err) => {});
         } else if (selectData['Fan2StartStatus'] == '0' || !selectData['Fan2StartStatus']) {
           data.paramcode = 'CtrlFan2Start';
           deviceControlApi(data)
@@ -1110,13 +1101,12 @@
                 modalTitle.value = '';
                 modalIsShow.value = false;
               } else {
-                message.error(res.message)
+                message.error(res.message);
               }
               mainWindIsShow1.value = 'open';
               mainWindIsShow2.value = 'stop';
             })
-            .catch((err) => {
-            });
+            .catch((err) => {});
         }
         // // 一键倒机
         // if (mainWindIsShow1.value === 'open' && mainWindIsShow2.value === 'stop') {
@@ -1159,11 +1149,10 @@
               modalTitle.value = '';
               modalIsShow.value = false;
             } else {
-              message.error(res.message)
+              message.error(res.message);
             }
           })
-          .catch((err) => {
-          });
+          .catch((err) => {});
       } else if (handType === 'fan1ToFan2') {
         data.paramcode = 'CtrlFan1ToFan2';
         deviceControlApi(data).then(() => {
@@ -1176,7 +1165,7 @@
             modalTitle.value = '';
             modalIsShow.value = false;
           } else {
-            message.error(res.message)
+            message.error(res.message);
           }
         });
       } else if (handType === 'fan2ToFan1') {
@@ -1191,7 +1180,7 @@
             modalTitle.value = '';
             modalIsShow.value = false;
           } else {
-            message.error(res.message)
+            message.error(res.message);
           }
         });
       } else if (handType === 'gasAlarmSet') {
@@ -1242,7 +1231,7 @@
         modalTitle.value = '';
         modalIsShow.value = false;
       }
-    }
+    };
   }
 
   function cancel() {

+ 134 - 107
src/views/vent/monitorManager/gateMonitor/index.vue

@@ -1,6 +1,5 @@
 <template>
-  <div class="bg"
-    style="width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; overflow: hidden">
+  <div class="bg" style="width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; overflow: hidden">
     <a-spin :spinning="loading" />
     <div id="deviceDetail" class="device-detail">
       <div id="deviceCard" class="device-card" style="z-index: -1; position: absolute">
@@ -9,8 +8,11 @@
           <div class="left-box"></div>
           <div class="right-box">
             <div><span class="detail-title">规格型号:</span> <span>KJ-980-F</span></div>
-            <div><span class="detail-title">技术参数:</span>
-              <span>380V,电机功率22kW,50Hz,B级绝缘,额定电流42.2A,效率90.5%,能效等级3,接法角型,2940r/min,轴承6311/CM 6211/CM,功率因数0.89</span>
+            <div
+              ><span class="detail-title">技术参数:</span>
+              <span
+                >380V,电机功率22kW,50Hz,B级绝缘,额定电流42.2A,效率90.5%,能效等级3,接法角型,2940r/min,轴承6311/CM 6211/CM,功率因数0.89</span
+              >
             </div>
           </div>
         </div>
@@ -23,16 +25,12 @@
       <div class="top-center row">
         <div v-if="hasPermission('btn:control')" class="button-box" @click="playAnimation(1)">打开前门</div>
         <div v-if="hasPermission('btn:control')" class="button-box" @click="playAnimation(2)">关闭前门</div>
-        <div v-if="hasPermission('btn:control') && selectData.deviceType == 'gate_ss'" class="button-box"
-          @click="playAnimation(8)">打开中间门</div>
-        <div v-if="hasPermission('btn:control') && selectData.deviceType == 'gate_ss'" class="button-box"
-          @click="playAnimation(9)">关闭中间门</div>
+        <div v-if="hasPermission('btn:control') && selectData.deviceType == 'gate_ss'" class="button-box" @click="playAnimation(8)">打开中间门</div>
+        <div v-if="hasPermission('btn:control') && selectData.deviceType == 'gate_ss'" class="button-box" @click="playAnimation(9)">关闭中间门</div>
         <div v-if="hasPermission('btn:control')" class="button-box" @click="playAnimation(3)">打开后门</div>
         <div v-if="hasPermission('btn:control')" class="button-box" @click="playAnimation(4)">关闭后门</div>
-        <div v-if="hasPermission('btn:control') && selectData.deviceType != 'gate_ss'" class="button-box"
-          @click="playAnimation(5)">同时打开</div>
-        <div v-if="hasPermission('btn:control') && selectData.deviceType != 'gate_ss'" class="button-box"
-          @click="playAnimation(6)">同时关闭</div>
+        <div v-if="hasPermission('btn:control') && selectData.deviceType != 'gate_ss'" class="button-box" @click="playAnimation(5)">同时打开</div>
+        <div v-if="hasPermission('btn:control') && selectData.deviceType != 'gate_ss'" class="button-box" @click="playAnimation(6)">同时关闭</div>
       </div>
       <!-- 控制模式 -->
       <div class="top-right row">
@@ -71,46 +69,56 @@
       <dv-border-box8 :dur="5" :style="`padding: 5px; height: ${scroll.y + 120}px`">
         <a-tabs class="tabs-box" v-model:activeKey="activeKey" @change="tabChange">
           <a-tab-pane key="1" tab="实时监测">
-            <MonitorTable v-if="activeKey === '1'" ref="MonitorDataTable" class="monitor-table"
-              columnsType="gate_monitor" :isShowActionColumn="true" :dataSource="dataSource" design-scope="gate-monitor"
-              @selectRow="getSelectRow" :scroll="{ y: scroll.y - 40 }" title="风门监测" :isShowPagination="true">
+            <MonitorTable
+              v-if="activeKey === '1'"
+              ref="MonitorDataTable"
+              class="monitor-table"
+              columnsType="gate_monitor"
+              :isShowActionColumn="true"
+              :dataSource="dataSource"
+              design-scope="gate-monitor"
+              @selectRow="getSelectRow"
+              :scroll="{ y: scroll.y - 40 }"
+              title="风门监测"
+              :isShowPagination="true"
+            >
               <template #filterCell="{ column, record }">
-                <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="#46C66F">打开</a-tag>
-                <a-tag
-                  v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == '1' && record.frontGateClose == '1'"
-                  color="#FF0000">点位异常</a-tag>
-                <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="#46C66F">打开</a-tag>
-                <a-tag
-                  v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == '1' && record.rearGateClose == '1'"
-                  color="#FF0000">点位异常</a-tag>
-                <a-tag
-                  v-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '0' && record.midGateClose == '0'"
-                  color="red">正在运行</a-tag>
-                <a-tag
-                  v-else-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '0' && record.midGateClose == 1"
-                  color="default">关闭</a-tag>
-                <a-tag
-                  v-else-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '1' && record.midGateClose == '0'"
-                  color="#46C66F">打开</a-tag>
-                <a-tag
-                  v-else-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '1' && record.midGateClose == '1'"
-                  color="#FF0000">点位异常</a-tag>
+                <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="#46C66F"
+                  >打开</a-tag
+                >
+                <a-tag v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == '1' && record.frontGateClose == '1'" color="#FF0000"
+                  >点位异常</a-tag
+                >
+                <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="#46C66F"
+                  >打开</a-tag
+                >
+                <a-tag v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == '1' && record.rearGateClose == '1'" color="#FF0000"
+                  >点位异常</a-tag
+                >
+                <a-tag v-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '0' && record.midGateClose == '0'" color="red"
+                  >正在运行</a-tag
+                >
+                <a-tag v-else-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '0' && record.midGateClose == 1" color="default"
+                  >关闭</a-tag
+                >
+                <a-tag v-else-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '1' && record.midGateClose == '0'" color="#46C66F"
+                  >打开</a-tag
+                >
+                <a-tag v-else-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '1' && record.midGateClose == '1'" color="#FF0000"
+                  >点位异常</a-tag
+                >
                 <template v-if="column.dataIndex === 'ndoortype'">
                   <span v-if="record.ndoortype == '0'">气动风门</span>
                   <span v-else color="default">液压风门</span>
@@ -131,14 +139,13 @@
                 </template>
                 <a-tag v-else-if="column.dataIndex === 'warnFlag'" :color="record.warnFlag == '0' ? 'green' : 'red'">{{
                   record.warnFlag == '0' ? '正常' : '报警'
-                  }}</a-tag>
+                }}</a-tag>
                 <a-tag v-if="column.dataIndex === 'netStatus'" :color="record.netStatus == '0' ? '#f00' : 'green'">{{
                   record.netStatus == '0' ? '断开' : '连接'
-                  }}</a-tag>
+                }}</a-tag>
               </template>
               <template #action="{ record }">
-                <a v-if="globalConfig?.showReport" class="table-action-link"
-                  @click="deviceEdit($event, 'reportInfo', record)">报表录入</a>
+                <a v-if="globalConfig?.showReport" class="table-action-link" @click="deviceEdit($event, 'reportInfo', record)">报表录入</a>
                 <a class="table-action-link" @click="deviceEdit($event, 'deviceInfo', record)">设备编辑</a>
               </template>
             </MonitorTable>
@@ -153,42 +160,46 @@
             <div class="tab-item" v-if="activeKey === '3'">
               <HistoryTable columns-type="gate" device-type="gate" designScope="gate-history" :scroll="scroll">
                 <template #filterCell="{ column, record }">
-                  <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-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="#46C66F">打开</a-tag>
+                    color="#46C66F"
+                    >打开</a-tag
+                  >
                   <a-tag
                     v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == '1' && record.frontGateClose == '1'"
-                    color="#FF0000">点位异常</a-tag>
-                  <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="#46C66F">打开</a-tag>
-                  <a-tag
-                    v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == '1' && record.rearGateClose == '1'"
-                    color="#FF0000">点位异常</a-tag>
-                  <a-tag
-                    v-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '0' && record.midGateClose == '0'"
-                    color="red">正在运行</a-tag>
-                  <a-tag
-                    v-else-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '0' && record.midGateClose == 1"
-                    color="default">关闭</a-tag>
-                  <a-tag
-                    v-else-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '1' && record.midGateClose == '0'"
-                    color="#46C66F">打开</a-tag>
-                  <a-tag
-                    v-else-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '1' && record.midGateClose == '1'"
-                    color="#FF0000">点位异常</a-tag>
+                    color="#FF0000"
+                    >点位异常</a-tag
+                  >
+                  <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="#46C66F"
+                    >打开</a-tag
+                  >
+                  <a-tag v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == '1' && record.rearGateClose == '1'" color="#FF0000"
+                    >点位异常</a-tag
+                  >
+                  <a-tag v-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '0' && record.midGateClose == '0'" color="red"
+                    >正在运行</a-tag
+                  >
+                  <a-tag v-else-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '0' && record.midGateClose == 1" color="default"
+                    >关闭</a-tag
+                  >
+                  <a-tag v-else-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '1' && record.midGateClose == '0'" color="#46C66F"
+                    >打开</a-tag
+                  >
+                  <a-tag v-else-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '1' && record.midGateClose == '1'" color="#FF0000"
+                    >点位异常</a-tag
+                  >
                   <template v-if="column.dataIndex === 'ndoortype'">
                     <span v-if="record.ndoortype == '0'">气动风门</span>
                     <span v-else color="default">液压风门</span>
@@ -207,49 +218,64 @@
                     <a-tag v-else-if="record.warnLevel == '1001'" color="default">网络中断</a-tag>
                     <a-tag v-else color="green">正常</a-tag>
                   </template>
-                  <a-tag v-else-if="column.dataIndex === 'warnFlag'"
-                    :color="record.warnFlag == '0' ? 'green' : 'red'">{{
+                  <a-tag v-else-if="column.dataIndex === 'warnFlag'" :color="record.warnFlag == '0' ? 'green' : 'red'">{{
                     record.warnFlag == '0' ? '正常' : '报警'
-                    }}</a-tag>
+                  }}</a-tag>
                   <a-tag v-if="column.dataIndex === 'netStatus'" :color="record.netStatus == '0' ? '#f00' : 'green'">{{
                     record.netStatus == '0' ? '断开' : '连接'
-                    }}</a-tag>
+                  }}</a-tag>
                 </template>
               </HistoryTable>
             </div>
           </a-tab-pane>
           <a-tab-pane key="4" tab="报警历史">
             <div class="tab-item" v-if="activeKey === '4'">
-              <AlarmHistoryTable columns-type="alarm" device-type="gate" :device-list-api="getTableList"
-                designScope="alarm-history" :scroll="scroll">
+              <AlarmHistoryTable columns-type="alarm" device-type="gate" :device-list-api="getTableList" designScope="alarm-history" :scroll="scroll">
                 <template #filterCell="{ column, record }">
-                  <a-tag v-if="column.dataIndex === 'warnFlag'"
-                    :color="record.warnFlag == '0' ? 'green' : record.warnFlag == 1 ? '#FF5812' : 'gray'">
-                    {{ record.warnFlag == '0' ? '正常' : record.warnFlag == 1 ? '报警' : record.warnFlag == 2 ? '断开' : '未监测'
-                    }}</a-tag>
+                  <a-tag v-if="column.dataIndex === 'warnFlag'" :color="record.warnFlag == '0' ? 'green' : record.warnFlag == 1 ? '#FF5812' : 'gray'">
+                    {{ record.warnFlag == '0' ? '正常' : record.warnFlag == 1 ? '报警' : record.warnFlag == 2 ? '断开' : '未监测' }}</a-tag
+                  >
                   <a-tag v-if="column.dataIndex === 'netStatus'" :color="record.netStatus == '0' ? '#f00' : 'green'">{{
                     record.netStatus == '0' ? '断开' : '连接'
-                    }}</a-tag>
+                  }}</a-tag>
                 </template>
               </AlarmHistoryTable>
             </div>
           </a-tab-pane>
           <a-tab-pane key="5" tab="操作历史">
             <div class="tab-item" v-if="activeKey === '5'">
-              <HandlerHistoryTable columns-type="operator_history" device-type="gate" :device-list-api="getTableList"
-                designScope="alarm-history" :scroll="scroll" />
+              <HandlerHistoryTable
+                columns-type="operator_history"
+                device-type="gate"
+                :device-list-api="getTableList"
+                designScope="alarm-history"
+                :scroll="scroll"
+              />
             </div>
           </a-tab-pane>
         </a-tabs>
       </dv-border-box8>
     </div>
   </div>
-  <div ref="playerRef"
-    style="z-index: 999; position: absolute; top: 100px; right: 15px; width: 300px; height: 280px; margin: auto"> </div>
-  <LivePlayer id="fm-player1" style="height: 220px; width: 300px; position: absolute; top: 0px; z-index: -1"
-    ref="player1" :videoUrl="flvURL1()" muted live loading controls />
-  <HandleModal v-if="!globalConfig?.simulatedPassword" :modal-is-show="modalIsShow" :modal-title="modalTitle"
-    :modal-type="modalType" @handle-ok="handleOK" @handle-cancel="handleCancel" />
+  <div ref="playerRef" style="z-index: 999; position: absolute; top: 100px; right: 15px; width: 300px; height: 280px; margin: auto"> </div>
+  <LivePlayer
+    id="fm-player1"
+    style="height: 220px; width: 300px; position: absolute; top: 0px; z-index: -1"
+    ref="player1"
+    :videoUrl="flvURL1()"
+    muted
+    live
+    loading
+    controls
+  />
+  <HandleModal
+    v-if="!globalConfig?.simulatedPassword"
+    :modal-is-show="modalIsShow"
+    :modal-title="modalTitle"
+    :modal-type="modalType"
+    @handle-ok="handleOK"
+    @handle-cancel="handleCancel"
+  />
   <DeviceBaseInfo @register="registerModal" :device-type="selectData['deviceType']" />
 </template>
 
@@ -435,6 +461,7 @@
 
   // 播放动画
   function playAnimation(handlerState) {
+    debugger;
     switch (handlerState) {
       case 1: // 打开前门
         if (selectData.frontGateOpen == '0' && selectData.frontGateClose == '1') {
@@ -636,7 +663,7 @@
         break;
       case '7': // 远程与就地
         data.paramcode = 'autoRoManualControl';
-        data.value = selectData.autoRoManual;
+        data.value = selectData.contrlMod != 'loopCtrl' ? selectData.autoRoManual : '';
         selectData.autoRoManual = null;
     }
 

+ 76 - 60
src/views/vent/monitorManager/windrectMonitor/index.vue

@@ -1,6 +1,5 @@
 <template>
-  <div class="bg"
-    style="width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; overflow: hidden">
+  <div class="bg" style="width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; overflow: hidden">
     <a-spin :spinning="loading" />
     <div id="window3D" style="width: 100%; height: 100%; position: absolute; overflow: hidden"> </div>
   </div>
@@ -52,77 +51,71 @@
         </div>
         <a-tabs class="tabs-box" v-model:activeKey="activeKey" @change="tabChange">
           <a-tab-pane key="1" tab="实时监测">
-            <MonitorTable v-if="activeKey === '1'" ref="MonitorDataTable" columnsType="windrect_monitor"
-              :dataSource="dataSource" design-scope="windrect-monitor" @selectRow="getSelectRow"
-              :scroll="{ y: scroll.y - 40 }" title="测风装置监测" :isShowPagination="true" :isShowActionColumn="true">
+            <MonitorTable
+              v-if="activeKey === '1'"
+              ref="MonitorDataTable"
+              columnsType="windrect_monitor"
+              :dataSource="dataSource"
+              design-scope="windrect-monitor"
+              @selectRow="getSelectRow"
+              :scroll="{ y: scroll.y - 40 }"
+              title="测风装置监测"
+              :isShowPagination="true"
+              :isShowActionColumn="true"
+            >
               <template #filterCell="{ column, record }">
                 <a-tag v-if="column.dataIndex === 'netStatus'" :color="record.netStatus == '0' ? '#FF5812' : 'green'">{{
                   record.netStatus == '0' ? '断开' : '连接'
-                  }}</a-tag>
-                <a-tag v-if="column.dataIndex === 'warnFlag'"
-                  :color="record.warnFlag == '0' ? 'green' : record.warnFlag == 1 ? '#FF5812' : 'gray'">
-                  {{ record.warnFlag == '0' ? '正常' : record.warnFlag == 1 ? '报警' : record.warnFlag == 2 ? '断开' : '未监测'
-                  }}</a-tag>
-                <a-tag v-if="column.dataIndex === 'sign'"
-                  :color="record.sign == '0' ? '#95CF65' : record.sign == 1 ? '#4590EA' : '#9876AA'">
-                  {{ record.sign == '0' ? '高位' : record.sign == 1 ? '中位' : '低位' }}</a-tag>
+                }}</a-tag>
+                <a-tag v-if="column.dataIndex === 'warnFlag'" :color="record.warnFlag == '0' ? 'green' : record.warnFlag == 1 ? '#FF5812' : 'gray'">
+                  {{ record.warnFlag == '0' ? '正常' : record.warnFlag == 1 ? '报警' : record.warnFlag == 2 ? '断开' : '未监测' }}</a-tag
+                >
+                <a-tag v-if="column.dataIndex === 'sign'" :color="record.sign == '0' ? '#95CF65' : record.sign == 1 ? '#4590EA' : '#9876AA'">
+                  {{ record.sign == '0' ? '高位' : record.sign == 1 ? '中位' : '低位' }}</a-tag
+                >
                 <template v-if="record && column && column.dataIndex === 'isRun' && record.isRun">
-                  <a-tag v-if="record.isRun == -2 || record.isRun == -1"
-                    :color="record.isRun == -2 ? '#95CF65' : '#ED5700'">{{
+                  <a-tag v-if="record.isRun == -2 || record.isRun == -1" :color="record.isRun == -2 ? '#95CF65' : '#ED5700'">{{
                     record.isRun == -2 ? '空闲' : '等待'
-                    }}</a-tag>
+                  }}</a-tag>
                   <a-tag v-else-if="record.isRun == 100" color="#4693FF">空闲</a-tag>
                   <Progress v-else :percent="Number(record.isRun)" size="small" status="active" />
                 </template>
               </template>
               <template #action="{ record }">
-                <a v-if="globalConfig?.showReport" class="table-action-link"
-                  @click="deviceEdit($event, 'reportInfo', record)">报表录入</a>
+                <a v-if="globalConfig?.showReport" class="table-action-link" @click="deviceEdit($event, 'reportInfo', record)">报表录入</a>
                 <a class="table-action-link" @click="deviceEdit($event, 'deviceInfo', record)">设备编辑</a>
               </template>
             </MonitorTable>
           </a-tab-pane>
           <a-tab-pane key="2" tab="监测曲线图" force-render>
             <div class="tab-item" style="height: 280px" v-if="activeKey === '2'">
-              <DeviceEcharts chartsColumnsType="windrect_chart" xAxisPropType="strname" :dataSource="dataSource"
-                height="100%" :chartsColumns="chartsColumnList"
+              <DeviceEcharts
+                chartsColumnsType="windrect_chart"
+                xAxisPropType="strname"
+                :dataSource="dataSource"
+                height="100%"
+                :chartsColumns="chartsColumnList"
                 :device-list-api="list.bind(null, { devicetype: 'windrect', pagetype: 'normal' })"
-                device-type="windrect" />
+                device-type="windrect"
+              />
             </div>
           </a-tab-pane>
           <a-tab-pane key="3" tab="历史数据">
             <div class="tab-item">
-              <HistoryTable columns-type="windrect" device-type="windrect" designScope="windrect-history"
-                :scroll="scroll">
-                <!-- <template #filterCell="{ column, record }">
-                  <a-tag v-if="column.dataIndex === 'warnFlag'" :color="record.warnFlag == '0' ? 'green' : 'red'">{{
-                    record.warnFlag == '0' ? '正常' : '报警'
-                  }}</a-tag>
-                  <a-tag v-if="column.dataIndex === 'netStatus'" :color="record.netStatus == '0' ? 'default' : 'green'">{{
-                    record.netStatus == '0' ? '断开' : '连接'
-                  }}</a-tag>
-                  <div v-if="record.nwindownum == 1 && column.dataIndex === 'rearArea'">/</div>
-                </template> -->
-              </HistoryTable>
+              <HistoryTable columns-type="windrect" device-type="windrect" designScope="windrect-history" :scroll="scroll" />
             </div>
           </a-tab-pane>
           <a-tab-pane key="4" tab="报警历史">
             <div class="tab-item" v-if="activeKey === '4'">
-              <AlarmHistoryTable columns-type="alarm" device-type="windrect" designScope="alarm-history"
-                :device-list-api="getTableList" :scroll="scroll" />
-            </div>
-          </a-tab-pane>
-          <!-- <a-tab-pane v-if="hasPermission('windrect:handlerHistory')" key="5" tab="操作历史">
-            <div class="tab-item" v-if="activeKey === '5'">
-              <HandlerHistoryTable
-                columns-type="operator_history"
+              <AlarmHistoryTable
+                columns-type="alarm"
                 device-type="windrect"
-                :device-list-api="baseList"
-                designScope="operator_history"
+                designScope="alarm-history"
+                :device-list-api="getTableList"
                 :scroll="scroll"
               />
             </div>
-          </a-tab-pane> -->
+          </a-tab-pane>
           <a-tab-pane v-if="hasPermission('windrect:result')" key="6" tab="测风结果">
             <ResultTable v-if="activeKey === '6'" deviceType="windrect_list" :scroll="scroll" />
           </a-tab-pane>
@@ -130,28 +123,31 @@
       </dv-border-box8>
     </div>
   </div>
-  <div ref="playerRef"
-    style="z-index: 999; position: absolute; top: 100px; right: 10px; width: 300px; height: 280px; margin: auto"></div>
-  <BasicModal v-bind="$attrs" @register="registerModal" title="一键测风" width="900px" @ok="handleOk"
-    @cancel="handleCancel">
+  <div ref="playerRef" style="z-index: 999; position: absolute; top: 100px; right: 10px; width: 300px; height: 280px; margin: auto"></div>
+  <BasicModal v-bind="$attrs" @register="registerModal" title="一键测风" width="900px" @ok="handleOk" @cancel="handleCancel">
     <div class="head-line">
       <!-- <div class="vent-flex-row">
         <span>同时运行数量:</span>
         <a-input-number v-model:value="runNum" :min="1" :max="10" />
       </div> -->
       <div class="vent-flex-row">
-        <div v-for="(criticalPath, index) in criticalPathList" :key="index" class="button-box"
-          @click="selectCriticalPath(criticalPath.id)">{{
+        <div v-for="(criticalPath, index) in criticalPathList" :key="index" class="button-box" @click="selectCriticalPath(criticalPath.id)">{{
           criticalPath.systemname
-          }}</div>
+        }}</div>
       </div>
     </div>
     <div>
       <ModalTable ref="modalTable" deviceType="windrect_list" />
     </div>
   </BasicModal>
-  <HandleModal v-if="!globalConfig?.simulatedPassword" :modal-is-show="modalIsShow" modal-title="启动测风"
-    :modal-type="modalType" @handle-ok="controlDevice" @handle-cancel="handleCancelControl" />
+  <HandleModal
+    v-if="!globalConfig?.simulatedPassword"
+    :modal-is-show="modalIsShow"
+    modal-title="启动测风"
+    :modal-type="modalType"
+    @handle-ok="controlDevice"
+    @handle-cancel="handleCancelControl"
+  />
   <DeviceBaseInfo @register="regModal" :device-type="selectData['deviceType']" />
 </template>
 
@@ -623,11 +619,11 @@
   function openModel() {
     setModalProps({ visible: true });
   }
-  
+
   function resetHandle() {
-    resetWind({}).then((res:any) => {
-      message.info(res)
-    })
+    resetWind({}).then((res: any) => {
+      message.info(res);
+    });
   }
 
   function exportExcel(id) {
@@ -646,19 +642,37 @@
   }
 
   function controlDevice(passWord, type) {
+    debugger;
     try {
       if (type == 'sing') {
         testWind({ ids: [selectData.deviceID], maxnum: runNum.value, password: passWord || globalConfig?.simulatedPassword }).then((res) => {
-          message.success('开始测风。。。');
+          if (res.success) {
+            if (globalConfig.History_Type == 'remote') {
+              message.success('指令已下发至生产管控平台成功!');
+            } else {
+              message.success('指令已下发成功!');
+            }
+          } else {
+            message.error(res.message);
+          }
           modalIsShow.value = false;
         });
       } else if (type == 'multiple') {
         const ids = toRaw(modalTable.value.selectedRowKeys);
+        debugger;
         testWind({ ids: ids, maxnum: runNum.value, password: passWord || globalConfig?.simulatedPassword }).then((res) => {
-          message.success(res);
+          if (res.success) {
+            if (globalConfig.History_Type == 'remote') {
+              message.success('指令已下发至生产管控平台成功!');
+            } else {
+              message.success('指令已下发成功!');
+            }
+          } else {
+            message.error(res.message);
+          }
+          modalIsShow.value = false;
           setModalProps({ visible: false });
           modalTable.value.clearSelectedRowKeys();
-          modalIsShow.value = false;
         });
       } else if (type == 'autoClear') {
         const data = {
@@ -677,6 +691,8 @@
             } else {
               message.success('指令已下发成功!');
             }
+          } else {
+            message.error(res.message);
           }
           modalIsShow.value = false;
         });