Browse Source

Merge branch 'master' of http://182.92.126.35:3000/hrx/mky-vent-base

lxh 9 months ago
parent
commit
94cdb0d138
26 changed files with 1254 additions and 1011 deletions
  1. 2 3
      public/js/config.js
  2. 2 2
      src/components/config/GlobalConfig.vue
  3. 4 0
      src/hooks/system/useCamera.ts
  4. 1 1
      src/hooks/web/useWebColumns.ts
  5. 0 1
      src/utils/dict/index.ts
  6. 0 1
      src/utils/http/axios/index.ts
  7. 0 1
      src/utils/threejs/useThree.ts
  8. 0 1
      src/views/vent/comment/threejs/FlyLine1.ts
  9. 10 3
      src/views/vent/monitorManager/comment/HistoryTable.vue
  10. 0 1
      src/views/vent/monitorManager/comment/MonitorTable.vue
  11. 7 7
      src/views/vent/monitorManager/compressor/components/nitrogenAlarmHistory.vue
  12. 262 81
      src/views/vent/monitorManager/compressor/components/nitrogenHome_dltj.vue
  13. 614 599
      src/views/vent/monitorManager/compressor/components/nitrogenHome_ln.vue
  14. 1 1
      src/views/vent/monitorManager/compressor/nitrogen.data.ts
  15. 5 5
      src/views/vent/monitorManager/deviceMonitor/components/device/device.data.ts
  16. 40 40
      src/views/vent/monitorManager/deviceMonitor/components/device/index.vue
  17. 22 20
      src/views/vent/monitorManager/deviceMonitor/components/device/modal/blastDelta.vue
  18. 121 103
      src/views/vent/monitorManager/deviceMonitor/components/device/modal/history-ball.vue
  19. 4 4
      src/views/vent/monitorManager/fanLocalMonitor/index.vue
  20. 1 1
      src/views/vent/monitorManager/gateMonitor/gate.threejs.ts
  21. 4 1
      src/views/vent/monitorManager/gateMonitor/gate.threejs.two.yj.ts
  22. 4 4
      src/views/vent/monitorManager/nitrogen/components/nitrogenHistory.vue
  23. 0 1
      src/views/vent/monitorManager/safetyMonitor/AlarmHistoryTable.vue
  24. 0 3
      src/views/vent/monitorManager/safetyMonitor/HistoryTable.vue
  25. 3 3
      src/views/vent/monitorManager/windrectMonitor/index.vue
  26. 147 124
      src/views/vent/reportManager/comment/report-modal.vue

+ 2 - 3
public/js/config.js

@@ -4,7 +4,7 @@ const VUE_APP_URL = {
 }
 const History_Type = {
   // type: 'remote', // remote、vent  (remote 代表的是历史查询走的装备院的接口,vent是走的咱们的,目前神东的项目都用remote, 其他矿用vent)
-  type: 'remote', // remote、vent
+  type: 'vent', // remote、vent
   deviceType: []
 }
 
@@ -13,5 +13,4 @@ const VENT_PARAM = {
   simulatedPassword: '',
   showReport: true,
   isoOpenSso: 'false'
-}
-// export { VUE_APP_URL, History_Type, VENT_PARAM }
+}

+ 2 - 2
src/components/config/GlobalConfig.vue

@@ -5,7 +5,7 @@
 <script setup lang="ts">
   import { provide } from 'vue';
   const globalConfig = {
-    // 你的全局配置  
+    // 你的全局配置
   };
   provide('globalConfig', globalConfig);
-</script>
+</script>

+ 4 - 0
src/hooks/system/useCamera.ts

@@ -340,6 +340,10 @@ export function useCamera() {
     playerDoms.forEach((dom) => {
       dom?.remove();
     });
+    playerList.forEach((player) => {
+      if (player.destroy) player.destroy();
+      player = null;
+    });
     videoParentDomList.length = 0;
     playerDoms.length = 0;
     playerList.length = 0;

+ 1 - 1
src/hooks/web/useWebColumns.ts

@@ -30,7 +30,7 @@ const arrToChartColumns = (tableHeaderColumns = []) => {
   tableHeaderColumns.forEach((item: any, i) => {
     const columnsItem = {
       legend: item.legend,
-      seriesName: item.unit,
+      seriesName: item.unit ? item.unit : '',
       ymax: item.ymax,
       yname: item.yname,
       linetype: item.linetype,

+ 0 - 1
src/utils/dict/index.ts

@@ -22,7 +22,6 @@ export const getDictItemsByCode = (code) => {
   //update-end-author:liusq---date:2023-10-13--for:【issues/777】列表 分类字典不显示
 
   // update-end--author:liaozhiyang---date:20230908---for:【QQYUN-6417】生产环境字典慢的问题
-
 };
 /**
  * 获取字典数组

+ 0 - 1
src/utils/http/axios/index.ts

@@ -30,7 +30,6 @@ const transform: AxiosTransform = {
    * @description: 处理请求数据。如果数据不是预期格式,可直接抛出错误
    */
   transformRequestHook: (res: AxiosResponse<Result>, options: RequestOptions) => {
-    debugger;
     const { t } = useI18n();
     const { isTransformResponse, isReturnNativeResponse } = options;
     // 是否返回原生响应头 比如:需要获取响应头时使用该属性

+ 0 - 1
src/utils/threejs/useThree.ts

@@ -271,7 +271,6 @@ class UseThree {
                     childResolve(object);
                   },
                   (err) => {
-                    debugger;
                     console.log(err);
                   }
                 );

+ 0 - 1
src/views/vent/comment/threejs/FlyLine1.ts

@@ -93,7 +93,6 @@ class Fly {
     if (this.frameId) return;
     const clock = new THREE.Clock(); // 时钟
     const h = () => {
-      
       this.frameId = requestAnimationFrame(h);
       const dt = clock.getDelta();
       this.progress += dt / this.circle; // 更新进度

+ 10 - 3
src/views/vent/monitorManager/comment/HistoryTable.vue

@@ -20,7 +20,7 @@
 
 <script lang="ts" setup>
   //ts语法
-  import { watchEffect, ref, watch, defineExpose, inject, nextTick, onMounted } from 'vue';
+  import { watchEffect, ref, watch, defineExpose, inject, nextTick, onMounted, computed } from 'vue';
   import { FormSchema } from '/@/components/Form/index';
   import { BasicTable } from '/@/components/Table';
   import { useListPage } from '/@/hooks/system/useListPage';
@@ -96,6 +96,7 @@
   const emit = defineEmits(['change']);
 
   const historyType = ref('');
+  const deviceKide = ref('');
   const columns = ref([]);
   const tableScroll = props.scroll.y ? ref({ y: props.scroll.y - 100 }) : ref({});
   let deviceOptions = ref([]);
@@ -109,7 +110,12 @@
     async (newVal) => {
       debugger;
       if (!newVal) return;
-      if (historyTable.value) getForm().resetFields();
+      deviceKide.value = newVal;
+      if (historyTable.value) {
+        getForm().resetFields();
+        // getForm().updateSchema();
+        // getForm();
+      }
       await getDeviceList();
       dataSource.value = [];
       const column = getTableHeaderColumns(newVal.includes('_history') ? newVal : newVal + '_history');
@@ -227,6 +233,7 @@
     formData['pageNo'] = pagination['current'];
     formData['pageSize'] = pagination['pageSize'];
     formData['column'] = 'createTime';
+    debugger;
     if (stationTypeStr !== 'redis') {
       formData['strtype'] = deviceTypeStr.value
         ? deviceTypeStr.value
@@ -326,7 +333,7 @@
                   },
                 },
                 {
-                  label: '查询设备',
+                  label: computed(() => `${deviceKide.value.startsWith('location') ? '查询人员' : '查询设备'}`),
                   field: 'gdeviceid',
                   component: 'Select',
                   defaultValue: deviceOptions.value[0] ? deviceOptions.value[0]['value'] : '',

+ 0 - 1
src/views/vent/monitorManager/comment/MonitorTable.vue

@@ -154,7 +154,6 @@
     },
     (newVal) => {
       console.log(newVal,'val-----')
-      debugger;
       if(!newVal) return
       const column =  getTableHeaderColumns(newVal.endsWith('_monitor') ? newVal : newVal+'_monitor')
       console.log('监测列表表头000------------>', newVal)

+ 7 - 7
src/views/vent/monitorManager/compressor/components/nitrogenAlarmHistory.vue

@@ -1,22 +1,22 @@
 <template>
   <div class="alarm-history">
-     <AlarmHistoryTable columns-type="alarm" device-type="nitrogen" :device-list-api="getTableList.bind(null, { devicekind: 'nitrogen' })" designScope="alarm-history" :scroll="{ y: 650 }"/>
+    <AlarmHistoryTable columns-type="alarm" device-type="nitrogen" designScope="alarm-history" :scroll="{ y: 650 }" />
   </div>
 </template>
 <script setup lang="ts">
   import AlarmHistoryTable from '../../comment/AlarmHistoryTable.vue';
-  import { getTableList } from '../nitrogen.api'
+
   const props = defineProps({
     deviceId: {
       type: String,
-      require: true
-    }
-  })
+      require: true,
+    },
+  });
 </script>
 <style lang="less" scoped>
-  .alarm-history{
+  .alarm-history {
     width: 100%;
     position: fixed;
     top: 100px;
   }
-</style>
+</style>

+ 262 - 81
src/views/vent/monitorManager/compressor/components/nitrogenHome_dltj.vue

@@ -9,7 +9,7 @@
     <div v-for="groupNum in monitorDataGroupNum" :key="groupNum" class="modal-monitor">
       <fourBorderBg :class="`kyj${groupNum}`" :id="`nitrogenMonitor${groupNum}`">
         <div class="title">空压机{{ groupNum }} </div>
-        <template v-for="(preMonitor, preMonitorIndex) in preMonitorList" :key="preMonitorIndex">
+        <template v-for="(preMonitor, preMonitorIndex) in preMonitorListData" :key="preMonitorIndex">
           <div v-if="preMonitor.code !== 'signal'" class="monitor-item">
             <span class="monitor-title">{{ preMonitor.title }}:</span>
             <span class="monitor-val"
@@ -46,7 +46,7 @@
       <div class="top-box">
         <!-- 中间区域控制按钮 -->
         <div class="center-item-box">
-          <div class="top-left">
+          <div class="top-left" v-if="airCompressorState.length > 0">
             <div class="button-box" @click="handlerDevice(airCompressorState[0], '主机启动')">上位机启动</div>
             <div class="button-box" @click="handlerDevice(airCompressorState[0], '主机停止')">上位机停止</div>
             <div class="button-box" @click="handlerDevice(airCompressorState[0], '备机启动')">上位复位</div>
@@ -56,14 +56,14 @@
             <div class="top-c-val">{{ monitorData['netStatus'] == 1 ? '连接' : monitorData['netStatus'] == 0 ? '断开' : '未知' }}</div>
           </div>
           <div class="top-right">
-            <div class="control-type">
+            <div class="control-type" v-if="monitorData['RemSelect'] !== undefined">
               <div class="control-title">空压机远近控切换:</div>
               <a-radio-group v-model:value="monitorData['RemSelect']">
                 <a-radio :value="`1`">远程</a-radio>
                 <a-radio :value="`0`">就地</a-radio>
               </a-radio-group>
             </div>
-            <div class="control-type">
+            <div class="control-type" v-if="monitorData['LocSelect'] !== undefined">
               <div class="control-title">制氮机远近控切换:</div>
               <a-radio-group v-model:value="monitorData['LocSelect']">
                 <a-radio :value="`1`">远程</a-radio>
@@ -74,25 +74,26 @@
         </div>
         <!-- 左边监测数据 -->
         <div class="lr-box left-box">
-          <ventBox1>
+          <ventBox1 v-if="deviceType != 'nitrogen_52507'">
             <template #title>
               <div>注氮机监测</div>
             </template>
             <template #container>
-              <div class="input-item" v-for="(preFan, index) in nitrogenMonitorData" :key="index">
+              <div class="input-item" v-for="(preFan, index) in nitrogenMonitor" :key="index">
                 <div class="title">{{ preFan.title }}</div>
-                <div v-if="preFan.unit !== 'signal'" class="value">{{
+                <div v-if="preFan.unit !== 'signal' && preFan.unit !== 'warning'" class="value">{{
                   monitorData[preFan.code] >= 0 ? formatNum(Number(monitorData[preFan.code])) : '-'
                 }}</div>
                 <div
                   v-else
                   :class="{
                     'signal-round': true,
-                    'signal-round-warning': monitorData[preFan.code] == '1',
+                    'signal-round-warning': monitorData[preFan.code] == '1' && preFan.unit == 'warning',
+                    'signal-round-run': monitorData[preFan.code] == '1' && preFan.unit == 'signal',
                     'signal-round-gry': monitorData[preFan.code] != '1',
                   }"
                 ></div>
-                <div class="unit">{{ preFan.unit !== 'signal' ? `(${preFan.unit})` : '' }}</div>
+                <div class="unit">{{ preFan.unit !== 'signal' && preFan.unit !== 'warning' ? `(${preFan.unit})` : '' }}</div>
               </div>
             </template>
           </ventBox1>
@@ -104,16 +105,19 @@
               <template #container>
                 <div class="monitor-box">
                   <div class="monitor-item">
-                    <div class="state-item" v-for="(preFan, index) in preFanMonitorData" :key="index">
-                      <div class="state-title">{{ preFan.title + (preFan.unit !== 'signal' ? `(${preFan.unit})` : '') }}</div>
-                      <div v-if="preFan.unit !== 'signal'" class="state-val">{{
+                    <div class="state-item" v-for="(preFan, index) in preFanMonitor" :key="index">
+                      <div class="state-title">{{
+                        preFan.title + (preFan.unit !== 'signal' && preFan.unit !== 'warning' ? `(${preFan.unit})` : '')
+                      }}</div>
+                      <div v-if="preFan.unit !== 'signal' && preFan.unit !== 'warning'" class="value">{{
                         monitorData[preFan.code + groupNum] >= 0 ? formatNum(Number(monitorData[preFan.code + groupNum])) : '-'
                       }}</div>
                       <div
                         v-else
                         :class="{
                           'signal-round': true,
-                          'signal-round-warning': monitorData[preFan.code + groupNum] == '1',
+                          'signal-round-warning': monitorData[preFan.code + groupNum] == '1' && preFan.unit == 'warning',
+                          'signal-round-run': monitorData[preFan.code + groupNum] == '1' && preFan.unit == 'signal',
                           'signal-round-gry': monitorData[preFan.code + groupNum] != '1',
                         }"
                       ></div>
@@ -149,14 +153,14 @@
   </div>
 </template>
 <script lang="ts" setup name="nitrogenHome">
-  import { onMounted, onUnmounted, ref, watch, reactive, defineProps, nextTick, inject } from 'vue';
+  import { onMounted, onUnmounted, ref, watch, reactive, defineProps, nextTick, inject, unref } from 'vue';
   import ventBox1 from '/@/components/vent/ventBox1.vue';
   import fourBorderBg from '../../../comment/components/fourBorderBg.vue';
   import { mountedThree, destroy, setModelType } from '../nitrogen.threejs';
   import { getDevice } from '../nitrogen.api';
   import BarAndLine from '/@/components/chart/BarAndLine.vue';
   import { deviceControlApi } from '/@/api/vent/index';
-  import { preMonitorList, preFanMonitorData, nitrogenMonitorData } from '../nitrogen.data.dltj';
+  // import { preMonitorListData, preFanMonitor, nitrogenMonitor } from '../nitrogen.data.dltj';
   import { formatNum } from '/@/utils/ventutil';
   import { useCamera } from '/@/hooks/system/useCamera';
   import { message } from 'ant-design-vue';
@@ -173,6 +177,7 @@
       require: true,
     },
   });
+
   const playerRef = ref();
   const refresh = ref(false);
   const modalTitle = ref(''); // 模态框标题显示内容,根据设备操作类型决定
@@ -202,7 +207,11 @@
       feature: {},
     },
   };
+  const preMonitorListData = ref<any[]>([]);
+  const preFanMonitor = ref<any[]>([]);
+  const nitrogenMonitor = ref<any[]>([]);
 
+  const deviceType = ref('');
   const monitorNetStatus = ref(0);
   const monitorDataGroupNum = ref(2);
 
@@ -255,6 +264,7 @@
     const res = await getDevice({ devicetype: 'sys', systemID, type: 'all' });
     if (res) {
       const result = res;
+      debugger;
       // const result = {
       //   cmd: 'monitordata',
       //   msgTxt: [
@@ -262,63 +272,181 @@
       //       datalist: [
       //         {
       //           msgType: null,
-      //           deviceID: '1760842915239510017',
-      //           strname: '52603注氮机',
-      //           strinstallpos: '52603注氮机',
+      //           deviceID: '1818548876779245569',
+      //           strname: '52507注氮机-2',
+      //           strinstallpos: '52507注氮机-2',
       //           fsectarea: 'null',
-      //           stationname: '52603注氮机',
-      //           deviceType: 'nitrogen_52603',
-      //           typeName: '52603注氮机',
+      //           stationname: '52507注氮机-2',
+      //           stationtype: 'redis',
+      //           deviceType: 'nitrogen_525072',
+      //           typeName: '52507注氮机2',
       //           netStatus: 1,
       //           warnFlag: 0,
       //           warnLevel: 0,
       //           warnLevel_str: '正常',
+      //           syswarnLevel: null,
+      //           syswarnLevel_str: null,
+      //           syswarnLevel_des: null,
       //           warnTime: null,
-      //           readTime: '2024-02-28 17:29:15',
+      //           readTime: '2024-08-04 17:59:25',
       //           warnDes: '',
       //           frontGateOpenCtrl: null,
       //           rearGateOpenCtrl: null,
       //           readData: {
-      //             ExhaustTemp1: '15',
+      //             FluxTotal12: '0.0',
+      //             RunTime42: '131072000',
+      //             NitrogenPurity2: '26',
+      //             ExhaustTemp2: '25.0',
       //             Status2: '0',
-      //             ExhaustTemp2: '26',
-      //             RunTime2: '2136',
-      //             RunTime1: '5127',
+      //             RunTime2: '0',
       //             sign: '0',
-      //             NitrogenPurity: '206.4',
-      //             SysVoltage1: '640',
-      //             SysVoltage2: '653',
-      //             CtrlMode2: '0',
-      //             ExhaustPreHighFault2: '1',
-      //             ExhaustPreHighFault1: '1',
-      //             HMIReset: '0',
-      //             HMIStop: '0',
-      //             InputFlux: '0',
-      //             LocSelect: '0',
-      //             OilPressureLowFault1: '1',
+      //             OilGasBarrel_SeparatorFault2: '0',
+      //             TotalFailureSignal2: '0',
+      //             InputFlux2: '5',
+      //             PhaseFailureFault12: '0',
+      //             RunTime22: '3080192',
+      //             LowVoltageFault2: '0',
+      //             SysVoltage2: '1158',
+      //             Fan_Current2: '0',
+      //             CtrlMode2: '1',
+      //             ExhaustPreHighFault2: '0',
+      //             ShortCutFaul2: '0',
+      //             OilGasBarrel_OverTempAlarm2: '0',
+      //             CloseFail2: '0',
+      //             OilGasBarrel_FilterBlockageFault2: '0',
+      //             HMIStartStop2: '0',
+      //             OilGasBarrel_OverTempAlarm12: '0',
+      //             OverVoltageFault2: '0',
+      //             OilGasBarrel_HighPressureFault2: '0',
+      //             Fan_OverloadFault2: '0',
       //             OilPressureLowFault2: '0',
       //             PhaseSequenceFault2: '0',
+      //             PhaseFailureFault2: '0',
+      //             RunTime32: '35323904',
+      //             MainMotor_OverTempFault2: '0',
+      //             FluxTotal22: '0.0',
+      //             PowerFault2: '0',
+      //             LoadorUnload2: '0',
+      //             PreMembraneTemperature2: '-19',
+      //             PhaseSequenceFault12: '0',
+      //             RunTime12: '393216',
+      //             ExhaustTemp12: '0',
+      //             TotalFailureSignal12: '0',
+      //             UnbalanceFault2: '0',
+      //             ExhaustPre2: '0',
+      //             MainMotor_OverloadFault2: '0',
+      //             NoWaterFault2: '0',
+      //             LoadTime2: '539',
+      //             MainMotor_Current2: '0',
+      //             isRun: '-2',
+      //             LeakageLock2: '0',
+      //             OpenFail2: '0',
+      //           },
+      //           readDataDes: null,
+      //           summaryHour: [],
+      //           summaryDay: [],
+      //           history: [],
+      //           dayhistory: [],
+      //           totalInfo: null,
+      //           sign: null,
+      //           cameras: [],
+      //           links: [],
+      //           other1: null,
+      //           other2: null,
+      //           other3: null,
+      //           remarkInfo: null,
+      //           linkInfo: null,
+      //           addrIndex: null,
+      //           warnLogNotOkCount: 0,
+      //         },
+      //       ],
+      //       avginfo: {
+      //         warnFlag: {
+      //           value: 0,
+      //         },
+      //       },
+      //       typeName: '52507注氮机2',
+      //       type: 'nitrogen_525072',
+      //     },
+      //     {
+      //       datalist: [
+      //         {
+      //           msgType: null,
+      //           deviceID: '1818546650996330498',
+      //           strname: '52507注氮机-1',
+      //           strinstallpos: '52507注氮机-1',
+      //           fsectarea: 'null',
+      //           stationname: '52507注氮机-1',
+      //           stationtype: 'redis',
+      //           deviceType: 'nitrogen_525071',
+      //           typeName: '52507注氮机1',
+      //           netStatus: 1,
+      //           warnFlag: 0,
+      //           warnLevel: 0,
+      //           warnLevel_str: '正常',
+      //           syswarnLevel: null,
+      //           syswarnLevel_str: null,
+      //           syswarnLevel_des: null,
+      //           warnTime: null,
+      //           readTime: '2024-08-04 17:59:25',
+      //           warnDes: '',
+      //           frontGateOpenCtrl: null,
+      //           rearGateOpenCtrl: null,
+      //           readData: {
+      //             RunTime41: '131072000',
+      //             NitrogenPurity1: '12',
+      //             ExhaustTemp1: '82.0',
+      //             RunTime21: '786432',
+      //             RunTime1: '1',
+      //             sign: '0',
+      //             OilGasBarrel_SeparatorFault1: '0',
+      //             InputFlux1: '13',
+      //             PhaseFailureFault11: '0',
+      //             LowVoltageFault1: '0',
+      //             SysVoltage1: '1149',
+      //             TotalFailureSignal1: '0',
+      //             Fan_Current1: '0',
+      //             ExhaustPreHighFault1: '0',
+      //             ShortCutFaul1: '0',
+      //             OilGasBarrel_OverTempAlarm1: '0',
+      //             CloseFail1: '0',
+      //             OilGasBarrel_FilterBlockageFault1: '0',
+      //             OilGasBarrel_OverTempAlarm11: '0',
+      //             HMIStartStop1: '0',
+      //             CtrlMode1: '1',
+      //             Fan_OverloadFault1: '0',
+      //             OilPressureLowFault1: '0',
+      //             OverVoltageFault1: '0',
+      //             OilGasBarrel_HighPressureFault1: '0',
+      //             PhaseFailureFault1: '0',
+      //             RunTime31: '70516736',
+      //             FluxTotal21: '0.0',
+      //             FluxTotal1: '0.01',
+      //             MainMotor_OverTempFault1: '0',
       //             PhaseSequenceFault1: '0',
-      //             LoadorUnload2: '1',
-      //             LoadorUnload1: '1',
-      //             CtrlMode1: '0',
-      //             PreMembraneTemperature: '15.4',
-      //             HMIStart: '0',
-      //             ExhaustPre2: '7',
-      //             ExhaustPre1: '8',
-      //             LoadTime2: '2133',
-      //             RemSelect: '0',
+      //             PowerFault1: '0',
+      //             LoadorUnload1: '0',
+      //             RunTime11: '3342336',
+      //             PhaseSequenceFault11: '0',
+      //             PreMembraneTemperature1: '25',
+      //             TotalFailureSignal11: '0',
+      //             UnbalanceFault1: '0',
+      //             ExhaustTemp11: '0',
+      //             ExhaustPre1: '89',
+      //             MainMotor_OverloadFault1: '0',
+      //             NoWaterFault1: '0',
       //             Status1: '0',
-      //             LoadTime1: '5121',
+      //             LoadTime1: '1086',
       //             isRun: '-2',
-      //             FluxTotal: '7242',
       //             LeakageLock1: '0',
-      //             LeakageLock2: '0',
+      //             MainMotor_Current1: '95',
+      //             OpenFail1: '0',
       //           },
       //           readDataDes: null,
       //           summaryHour: [],
       //           summaryDay: [],
       //           history: [],
+      //           dayhistory: [],
       //           totalInfo: null,
       //           sign: null,
       //           cameras: [],
@@ -327,6 +455,9 @@
       //           other2: null,
       //           other3: null,
       //           remarkInfo: null,
+      //           linkInfo: null,
+      //           addrIndex: null,
+      //           warnLogNotOkCount: 0,
       //         },
       //       ],
       //       avginfo: {
@@ -334,27 +465,31 @@
       //           value: 0,
       //         },
       //       },
-      //       typeName: '52603注氮机',
-      //       type: 'nitrogen_52603',
+      //       typeName: '52507注氮机1',
+      //       type: 'nitrogen_525071',
       //     },
       //     {
       //       subtype: 'sys_nitrogen',
       //       datalist: [
       //         {
-      //           msgType: null,
-      //           deviceID: '1760932094094950402',
-      //           strname: '注氮系统',
-      //           strinstallpos: '注氮系统',
+      //           msgType: '2',
+      //           deviceID: '1818821502634352642',
+      //           strname: '52507注氮系统',
+      //           strinstallpos: '52507注氮系统',
       //           fsectarea: 'null',
       //           stationname: null,
+      //           stationtype: null,
       //           deviceType: 'sys_nitrogen',
-      //           typeName: '注氮',
-      //           netStatus: 0,
+      //           typeName: '注氮系统',
+      //           netStatus: null,
       //           warnFlag: 0,
       //           warnLevel: null,
       //           warnLevel_str: null,
+      //           syswarnLevel: 0,
+      //           syswarnLevel_str: null,
+      //           syswarnLevel_des: null,
       //           warnTime: null,
-      //           readTime: '2024-02-28 17:21:14',
+      //           readTime: '2024-08-01 09:56:28',
       //           warnDes: '',
       //           frontGateOpenCtrl: null,
       //           rearGateOpenCtrl: null,
@@ -365,7 +500,8 @@
       //           readDataDes: null,
       //           summaryHour: [],
       //           summaryDay: [],
-      //           history: [],
+      //           history: null,
+      //           dayhistory: [],
       //           totalInfo: null,
       //           sign: null,
       //           cameras: [],
@@ -373,7 +509,10 @@
       //           other1: null,
       //           other2: null,
       //           other3: null,
-      //           remarkInfo: '设备断线',
+      //           remarkInfo: null,
+      //           linkInfo: null,
+      //           addrIndex: null,
+      //           warnLogNotOkCount: 0,
       //         },
       //       ],
       //       typeName: '综合监测系统',
@@ -383,34 +522,57 @@
       // };
 
       if (!result || result.msgTxt.length < 1) return;
+      let dataSoreDatas = {};
+      let netStatus = 0;
       result.msgTxt.forEach((item) => {
         if (item.type && item.type.startsWith('nitrogen')) {
           airCompressorState.length = 0;
-          let netStatus = 0;
-          monitorData.value = Object.assign(item['datalist'][0], item['datalist'][0]['readData']);
-          if (monitorData.value['netStatus'] == 1) {
-            netStatus = 1;
-          }
-          airCompressorState.push({
-            id: monitorData.value['deviceID'],
-            deviceType: monitorData.value['deviceType'],
-            HMIStart: monitorData.value['HMIStart'],
-            HMIStop: monitorData.value['HMIStop'],
-          });
-          monitorNetStatus.value = netStatus;
-          const airCompressor = { readTime: monitorData.value['readTime'].substring(11) };
-          const dataArr = lodash.cloneDeep(echartData.value);
-          //图表数据
-          if (dataArr.length <= 5) {
-            airCompressor[`FluxTotal`] = monitorData.value['FluxTotal'] || 0;
-            dataArr.push(airCompressor);
+
+          if (item.type.startsWith('nitrogen_52507')) {
+            if (deviceType.value !== 'nitrogen_52507') deviceType.value = 'nitrogen_52507';
+            dataSoreDatas = Object.assign(dataSoreDatas, item['datalist'][0], item['datalist'][0]['readData']);
+            if (item['datalist'][0]['netStatus']) {
+              netStatus = 1;
+            }
           } else {
-            dataArr.shift();
-            dataArr.push(airCompressor);
+            deviceType.value = '';
+            monitorData.value = Object.assign(item['datalist'][0], item['datalist'][0]['readData']);
+            if (monitorData.value['netStatus'] == 1) {
+              netStatus = 1;
+            }
+            airCompressorState.push({
+              id: monitorData.value['deviceID'],
+              deviceType: monitorData.value['deviceType'],
+              HMIStart: monitorData.value['HMIStart'],
+              HMIStop: monitorData.value['HMIStop'],
+            });
           }
-          echartData.value = dataArr;
         }
       });
+      if (JSON.stringify(dataSoreDatas) !== '{}') {
+        monitorData.value = dataSoreDatas;
+      }
+      monitorNetStatus.value = netStatus;
+      const dataArr = lodash.cloneDeep(echartData.value);
+
+      const airCompressor = { readTime: monitorData.value['readTime'].substring(11) };
+      if (JSON.stringify(dataSoreDatas) === '{}') {
+        airCompressor[`FluxTotal`] = monitorData.value['FluxTotal'] || 0;
+      } else {
+        airCompressor[`InputFlux`] = monitorData.value['InputFlux1'] + monitorData.value['InputFlux2'] || null;
+        monitorData.value['RunTime31'] = (Number(monitorData.value['RunTime31']) / 24).toFixed(0);
+        monitorData.value['RunTime41'] = (Number(monitorData.value['RunTime41']) / 24).toFixed(0);
+        monitorData.value['RunTime32'] = (Number(monitorData.value['RunTime32']) / 24).toFixed(0);
+        monitorData.value['RunTime42'] = (Number(monitorData.value['RunTime42']) / 24).toFixed(0);
+      }
+      //图表数据
+      if (dataArr.length <= 5) {
+        dataArr.push(airCompressor);
+      } else {
+        dataArr.shift();
+        dataArr.push(airCompressor);
+      }
+      echartData.value = dataArr;
       refresh.value = true;
       nextTick(() => {
         refresh.value = false;
@@ -483,6 +645,25 @@
       }
     });
   });
+  // 多套系统,不同点表
+  watch(
+    () => unref(deviceType),
+    async (type: string) => {
+      debugger;
+      if (type == 'nitrogen_52507') {
+        const { preMonitorList, preFanMonitorData, nitrogenMonitorData } = await import('../nitrogen.data.dlt1');
+        preMonitorListData.value = preMonitorList;
+        preFanMonitor.value = preFanMonitorData;
+        nitrogenMonitor.value = nitrogenMonitorData;
+      } else {
+        const { preMonitorList, preFanMonitorData, nitrogenMonitorData } = await import('../nitrogen.data.dltj');
+        preMonitorListData.value = preMonitorList;
+        preFanMonitor.value = preFanMonitorData;
+        nitrogenMonitor.value = nitrogenMonitorData;
+      }
+    },
+    { immediate: true }
+  );
 
   onMounted(async () => {
     await getMonitor(true);

+ 614 - 599
src/views/vent/monitorManager/compressor/components/nitrogenHome_ln.vue

@@ -1,7 +1,10 @@
 <template>
   <div id="nitrogen3D" style="width: 100%; height: 100%; position: absolute; overflow: hidden"></div>
-  <div id="nitrogenCss3D" class="threejs-Object-CSS"
-    style="width: 100%; height: 100%; position: absolute; pointer-events: none; overflow: hidden; z-index: 2; top: 0px; left: 0px">
+  <div
+    id="nitrogenCss3D"
+    class="threejs-Object-CSS"
+    style="width: 100%; height: 100%; position: absolute; pointer-events: none; overflow: hidden; z-index: 2; top: 0px; left: 0px"
+  >
     <a-spin :spinning="loading" />
     <div v-for="groupNum in monitorDataGroupNum" :key="groupNum" class="modal-monitor">
       <fourBorderBg :class="`kyj${groupNum}`" :id="`nitrogenMonitor${groupNum}`">
@@ -9,9 +12,10 @@
         <template v-for="(preMonitor, preMonitorIndex) in preMonitorList" :key="preMonitorIndex">
           <div v-if="preMonitor.code !== 'signal'" class="monitor-item">
             <span class="monitor-title">{{ preMonitor.title }}:</span>
-            <span class="monitor-val"><span class="val">{{ monitorData[groupNum] ?
-              monitorData[groupNum][preMonitor.code] : '-' }}</span><span class="unit">{{ preMonitor.unit
-                }}</span></span>
+            <span class="monitor-val"
+              ><span class="val">{{ monitorData[groupNum] ? monitorData[groupNum][preMonitor.code] : '-' }}</span
+              ><span class="unit">{{ preMonitor.unit }}</span></span
+            >
           </div>
         </template>
       </fourBorderBg>
@@ -64,13 +68,15 @@
             <template #container>
               <div class="input-item" v-for="(preFan, index) in nitrogenMonitorData" :key="index">
                 <div class="title">{{ preFan.title }}</div>
-                <div v-if="preFan.unit !== 'signal'" class="value">{{ monitorData[0] ?
-                  formatNum(Number(monitorData[0][preFan.code])) : '-' }}</div>
-                <div v-else :class="{
-                  'signal-round': true,
-                  'signal-round-warning': monitorData[0][preFan.code] == '1',
-                  'signal-round-run': monitorData[0][preFan.code] == '0',
-                }"></div>
+                <div v-if="preFan.unit !== 'signal'" class="value">{{ monitorData[0] ? formatNum(Number(monitorData[0][preFan.code])) : '-' }}</div>
+                <div
+                  v-else
+                  :class="{
+                    'signal-round': true,
+                    'signal-round-warning': monitorData[0][preFan.code] == '1',
+                    'signal-round-run': monitorData[0][preFan.code] == '0',
+                  }"
+                ></div>
                 <div class="unit">{{ preFan.unit !== 'signal' ? `(${preFan.unit})` : '' }}</div>
               </div>
             </template>
@@ -84,16 +90,18 @@
                 <div class="monitor-box">
                   <div class="monitor-item">
                     <div class="state-item" v-for="(preFan, index) in preFanMonitorData" :key="index">
-                      <div class="state-title">{{ preFan.title + (preFan.unit !== 'signal' && preFan.unit !== '' ?
-                        `(${preFan.unit})` : '') }}</div>
+                      <div class="state-title">{{ preFan.title + (preFan.unit !== 'signal' && preFan.unit !== '' ? `(${preFan.unit})` : '') }}</div>
                       <div v-if="preFan.unit !== 'signal'" class="state-val">{{
                         monitorData[groupNum] ? monitorData[groupNum][preFan.code] : '-'
                       }}</div>
-                      <div v-else :class="{
-                        'signal-round': true,
-                        'signal-round-warning': monitorData[groupNum][preFan.code] == '1',
-                        'signal-round-run': monitorData[groupNum][preFan.code] == '0',
-                      }"></div>
+                      <div
+                        v-else
+                        :class="{
+                          'signal-round': true,
+                          'signal-round-warning': monitorData[groupNum][preFan.code] == '1',
+                          'signal-round-run': monitorData[groupNum][preFan.code] == '0',
+                        }"
+                      ></div>
                     </div>
                   </div>
                 </div>
@@ -108,8 +116,15 @@
               <div>设备实时监测曲线</div>
             </template>
             <template #container>
-              <BarAndLine v-if="chartsColumns.length > 0" xAxisPropType="readTime" :dataSource="echartData"
-                height="340px" :chartsColumns="chartsColumns" chartsType="listMonitor" :option="echatsOption" />
+              <BarAndLine
+                v-if="chartsColumns.length > 0"
+                xAxisPropType="readTime"
+                :dataSource="echartData"
+                height="340px"
+                :chartsColumns="chartsColumns"
+                chartsType="listMonitor"
+                :option="echatsOption"
+              />
             </template>
           </ventBox1>
           <div ref="playerRef" style="height: auto; width: 100%; margin-top: 10px"></div>
@@ -119,708 +134,708 @@
   </div>
 </template>
 <script lang="ts" setup name="nitrogenHome">
-import { onMounted, onUnmounted, ref, watch, reactive, defineProps, nextTick, inject } from 'vue';
-import ventBox1 from '/@/components/vent/ventBox1.vue';
-import fourBorderBg from '../../../comment/components/fourBorderBg.vue';
-import { mountedThree, destroy, setModelType } from '../nitrogen.threejs';
-import { getDevice } from '../nitrogen.api';
-import BarAndLine from '/@/components/chart/BarAndLine.vue';
-import { deviceControlApi } from '/@/api/vent/index';
-import { preMonitorList, preFanMonitorData, nitrogenMonitorData } from '../nitrogen.data.ln';
-import { formatNum } from '/@/utils/ventutil';
-import { useCamera } from '/@/hooks/system/useCamera';
-import { message } from 'ant-design-vue';
-import lodash from 'lodash';
-
-const globalConfig = inject('globalConfig');
-
-const props = defineProps({
-  deviceId: {
-    type: String,
-    require: true,
-  },
-  modalType: {
-    type: String,
-    require: true,
-  },
-});
-const playerRef = ref();
-const refresh = ref(false);
-const modalTitle = ref(''); // 模态框标题显示内容,根据设备操作类型决定
-const modalType = ref(''); // 模态框内容显示类型,设备操作类型
-const modalIsShow = ref<boolean>(false); // 是否显示模态框
-const loading = ref(true);
-let kzParam = reactive<any>({
-  data: {},
-  isFw: null,
-});
-
-// const kyjs = ['1号空压机', '1号空压机', '1号空压机', '1号空压机'];
-const flvURL1 = () => {
-  // return `https://sf1-hscdn-tos.pstatp.com/obj/media-fe/xgplayer_doc_video/flv/xgplayer-demo-360p.flv`;
-  return '';
-};
-const colors = ['#FDB146', '#EE6666', '#9BCB75', '#03C2EC', '#DA3914', '#9C83D9'];
-const echatsOption = {
-  grid: {
-    top: '35%',
-    left: '15%',
-    right: '20px',
-    bottom: '8%',
-    // containLabel: true
-  },
-  toolbox: {
-    feature: {},
-  },
-};
-
-const monitorDataGroupNum = ref(0);
-const statusKyj = ref(''); //空压机工作状态
-const statusZdj = ref(''); //制氮机远近程状态
-
-let airCompressorState = reactive<any[]>([]);
-
-const chartsColumns = ref([
-  {
-    legend: '氮气流量',
-    seriesName: '(m³/h)',
-    ymax: 1000,
-    yname: 'm³/h',
-    linetype: 'line',
-    yaxispos: 'left',
-    color: '#FDB146',
-    sort: 1,
-    xRotate: 0,
-    dataIndex: 'nitrogen_flow_rate',
-  },
-]);
-const { getCamera, webRtcServer } = useCamera();
-
-const monitorData = reactive<any[]>([]);
-
-//图表数据
-let echartData = ref<any>([]);
-
-// https获取监测数据
-let timer: null | NodeJS.Timeout = null;
-async function getMonitor(flag?) {
-  if (Object.prototype.toString.call(timer) === '[object Null]') {
-    timer = await setTimeout(
-      async () => {
-        if (props.deviceId) {
-          await getDataSource(props.deviceId);
+  import { onMounted, onUnmounted, ref, watch, reactive, defineProps, nextTick, inject } from 'vue';
+  import ventBox1 from '/@/components/vent/ventBox1.vue';
+  import fourBorderBg from '../../../comment/components/fourBorderBg.vue';
+  import { mountedThree, destroy, setModelType } from '../nitrogen.threejs';
+  import { getDevice } from '../nitrogen.api';
+  import BarAndLine from '/@/components/chart/BarAndLine.vue';
+  import { deviceControlApi } from '/@/api/vent/index';
+  import { preMonitorList, preFanMonitorData, nitrogenMonitorData } from '../nitrogen.data.ln';
+  import { formatNum } from '/@/utils/ventutil';
+  import { useCamera } from '/@/hooks/system/useCamera';
+  import { message } from 'ant-design-vue';
+  import lodash from 'lodash';
+
+  const globalConfig = inject('globalConfig');
+
+  const props = defineProps({
+    deviceId: {
+      type: String,
+      require: true,
+    },
+    modalType: {
+      type: String,
+      require: true,
+    },
+  });
+  const playerRef = ref();
+  const refresh = ref(false);
+  const modalTitle = ref(''); // 模态框标题显示内容,根据设备操作类型决定
+  const modalType = ref(''); // 模态框内容显示类型,设备操作类型
+  const modalIsShow = ref<boolean>(false); // 是否显示模态框
+  const loading = ref(true);
+  let kzParam = reactive<any>({
+    data: {},
+    isFw: null,
+  });
+
+  // const kyjs = ['1号空压机', '1号空压机', '1号空压机', '1号空压机'];
+  const flvURL1 = () => {
+    // return `https://sf1-hscdn-tos.pstatp.com/obj/media-fe/xgplayer_doc_video/flv/xgplayer-demo-360p.flv`;
+    return '';
+  };
+  const colors = ['#FDB146', '#EE6666', '#9BCB75', '#03C2EC', '#DA3914', '#9C83D9'];
+  const echatsOption = {
+    grid: {
+      top: '35%',
+      left: '15%',
+      right: '20px',
+      bottom: '8%',
+      // containLabel: true
+    },
+    toolbox: {
+      feature: {},
+    },
+  };
+
+  const monitorDataGroupNum = ref(0);
+  const statusKyj = ref(''); //空压机工作状态
+  const statusZdj = ref(''); //制氮机远近程状态
+
+  let airCompressorState = reactive<any[]>([]);
+
+  const chartsColumns = ref([
+    {
+      legend: '氮气流量',
+      seriesName: '(m³/h)',
+      ymax: 1000,
+      yname: 'm³/h',
+      linetype: 'line',
+      yaxispos: 'left',
+      color: '#FDB146',
+      sort: 1,
+      xRotate: 0,
+      dataIndex: 'nitrogen_flow_rate',
+    },
+  ]);
+  const { getCamera, webRtcServer } = useCamera();
+
+  const monitorData = reactive<any[]>([]);
+
+  //图表数据
+  let echartData = ref<any>([]);
+
+  // https获取监测数据
+  let timer: null | NodeJS.Timeout = null;
+  async function getMonitor(flag?) {
+    if (Object.prototype.toString.call(timer) === '[object Null]') {
+      timer = await setTimeout(
+        async () => {
+          if (props.deviceId) {
+            await getDataSource(props.deviceId);
+          }
+          if (timer) {
+            timer = null;
+          }
+          await getMonitor();
+        },
+        flag ? 0 : 3000
+      );
+    }
+  }
+
+  async function getDataSource(systemID) {
+    const res = await getDevice({ devicetype: 'sys', systemID, type: 'all' });
+    if (res) {
+      const result = res;
+      if (!result || result.msgTxt.length < 1) return;
+      airCompressorState.length = 0;
+      monitorData.length = 0;
+      result.msgTxt.forEach((item) => {
+        if (item.type && item.type.startsWith('nitrogen_auto')) {
+          monitorData.splice(0, 0, { ...item['datalist'][0], ...item['datalist'][0].readData });
+        } else if (item.type && item.type.startsWith('nitrogen_air_compressor')) {
+          monitorData.push({ ...item['datalist'][0], ...item['datalist'][0].readData });
         }
-        if (timer) {
-          timer = null;
+        statusKyj.value = monitorData[1] ? monitorData[1]['operation_shutdown'] : '';
+        statusZdj.value = monitorData[0] ? monitorData[0]['remote_local'] : '';
+        monitorDataGroupNum.value = monitorData.length - 1;
+        airCompressorState.push({
+          id: monitorData[1] ? monitorData[1]['deviceID'] : '',
+          deviceType: monitorData[1] ? monitorData[1]['deviceType'] : '',
+        });
+        const airCompressor = { readTime: monitorData[0]['readTime'].substring(11) };
+        const dataArr = lodash.cloneDeep(echartData.value);
+        //图表数据
+        if (dataArr.length <= 5) {
+          airCompressor[`nitrogen_flow_rate`] = monitorData[0]['nitrogen_flow_rate'] || 0;
+          dataArr.push(airCompressor);
+        } else {
+          dataArr.shift();
+          airCompressor[`nitrogen_flow_rate`] = monitorData[0]['nitrogen_flow_rate'] || 0;
+          dataArr.push(airCompressor);
         }
-        await getMonitor();
-      },
-      flag ? 0 : 3000
-    );
-  }
-}
-
-async function getDataSource(systemID) {
-  const res = await getDevice({ devicetype: 'sys', systemID, type: 'all' });
-  if (res) {
-    const result = res;
-    if (!result || result.msgTxt.length < 1) return;
-    airCompressorState.length = 0;
-    monitorData.length = 0;
-    result.msgTxt.forEach((item) => {
-      if (item.type && item.type.startsWith('nitrogen_auto')) {
-        monitorData.splice(0, 0, { ...item['datalist'][0], ...item['datalist'][0].readData });
-      } else if (item.type && item.type.startsWith('nitrogen_air_compressor')) {
-        monitorData.push({ ...item['datalist'][0], ...item['datalist'][0].readData });
-      }
-      statusKyj.value = monitorData[1] ? monitorData[1]['operation_shutdown'] : '';
-      statusZdj.value = monitorData[0] ? monitorData[0]['remote_local'] : '';
-      monitorDataGroupNum.value = monitorData.length - 1;
-      airCompressorState.push({
-        id: monitorData[1] ? monitorData[1]['deviceID'] : '',
-        deviceType: monitorData[1] ? monitorData[1]['deviceType'] : '',
+        echartData.value = dataArr;
       });
-      const airCompressor = { readTime: monitorData[0]['readTime'].substring(11) };
-      const dataArr = lodash.cloneDeep(echartData.value);
-      //图表数据
-      if (dataArr.length <= 5) {
-        airCompressor[`nitrogen_flow_rate`] = monitorData[0]['nitrogen_flow_rate'] || 0;
-        dataArr.push(airCompressor);
-      } else {
-        dataArr.shift();
-        airCompressor[`nitrogen_flow_rate`] = monitorData[0]['nitrogen_flow_rate'] || 0;
-        dataArr.push(airCompressor);
+      refresh.value = true;
+      nextTick(() => {
+        refresh.value = false;
+      });
+    }
+  }
+
+  function handlerDevice(data, bol) {
+    kzParam.data = data;
+    kzParam.isFw = bol;
+    if (bol == '制氮机启动' || bol == '空压机启动') {
+      modalTitle.value = bol;
+      modalType.value = '1';
+      modalIsShow.value = true;
+      kzParam.data.start = true;
+      kzParam.data.stop = false;
+    } else {
+      modalTitle.value = bol;
+      modalType.value = '2';
+      modalIsShow.value = true;
+      kzParam.data.start = false;
+      kzParam.data.stop = true;
+    }
+  }
+  function handleOK(passWord, handlerState) {
+    console.log(kzParam, 'kz----------');
+    // if (passWord !== '123456') {
+    //   message.warning('密码不正确,请重新输入');
+    //   return;
+    // }
+
+    let data = {};
+    if (kzParam.isFw == '制氮机启动' || kzParam.isFw == '空压机启动') {
+      data = {
+        deviceid: kzParam.data.id,
+        devicetype: kzParam.data.deviceType,
+        password: passWord,
+        start: kzParam.data.start,
+      };
+    } else {
+      data = {
+        deviceid: kzParam.data.id,
+        password: passWord,
+        devicetype: kzParam.data.deviceType,
+        stop: kzParam.data.stop,
+      };
+    }
+
+    deviceControlApi(data).then((res) => {
+      // 模拟时开启
+      if (res.success) {
+        modalIsShow.value = false;
+        getDataSource(props.deviceId);
+        if (globalConfig.History_Type == 'remote') {
+          message.success('指令已下发至生产管控平台成功!');
+        } else {
+          message.success('指令已下发成功!');
+        }
       }
-      echartData.value = dataArr;
     });
-    refresh.value = true;
-    nextTick(() => {
-      refresh.value = false;
-    });
-  }
-}
-
-function handlerDevice(data, bol) {
-  kzParam.data = data;
-  kzParam.isFw = bol;
-  if (bol == '制氮机启动' || bol == '空压机启动') {
-    modalTitle.value = bol;
-    modalType.value = '1';
-    modalIsShow.value = true;
-    kzParam.data.start = true;
-    kzParam.data.stop = false;
-  } else {
-    modalTitle.value = bol;
-    modalType.value = '2';
-    modalIsShow.value = true;
-    kzParam.data.start = false;
-    kzParam.data.stop = true;
   }
-}
-function handleOK(passWord, handlerState) {
-  console.log(kzParam, 'kz----------');
-  // if (passWord !== '123456') {
-  //   message.warning('密码不正确,请重新输入');
-  //   return;
-  // }
-
-  let data = {};
-  if (kzParam.isFw == '制氮机启动' || kzParam.isFw == '空压机启动') {
-    data = {
-      deviceid: kzParam.data.id,
-      devicetype: kzParam.data.deviceType,
-      password: passWord,
-      start: kzParam.data.start,
-    };
-  } else {
-    data = {
-      deviceid: kzParam.data.id,
-      password: passWord,
-      devicetype: kzParam.data.deviceType,
-      stop: kzParam.data.stop,
-    };
+  function handleCancel() {
+    modalIsShow.value = false;
+    modalTitle.value = '';
+    modalType.value = '';
   }
 
-  deviceControlApi(data).then((res) => {
-    // 模拟时开启
-    if (res.success) {
-      modalIsShow.value = false;
-      getDataSource(props.deviceId);
-      if (globalConfig.History_Type == 'remote') {
-        message.success('指令已下发至生产管控平台成功!');
-      } else {
-        message.success('指令已下发成功!');
+  watch([monitorDataGroupNum, loading], ([newMonitorDataGroupNum, newLoading]) => {
+    nextTick(() => {
+      if (newMonitorDataGroupNum && !newLoading) {
+        setModelType(props.modalType, newMonitorDataGroupNum);
       }
-    }
+    });
   });
-}
-function handleCancel() {
-  modalIsShow.value = false;
-  modalTitle.value = '';
-  modalType.value = '';
-}
-
-watch([monitorDataGroupNum, loading], ([newMonitorDataGroupNum, newLoading]) => {
-  nextTick(() => {
-    if (newMonitorDataGroupNum && !newLoading) {
-      setModelType(props.modalType, newMonitorDataGroupNum);
-    }
+
+  onMounted(async () => {
+    await getMonitor(true);
+    await mountedThree().then(() => {
+      loading.value = false;
+    });
+    await getCamera(props.deviceId, playerRef.value);
   });
-});
 
-onMounted(async () => {
-  await getMonitor(true);
-  await mountedThree().then(() => {
-    loading.value = false;
+  onUnmounted(() => {
+    destroy();
+    if (webRtcServer.length > 0) {
+      webRtcServer.forEach((item) => {
+        item.disconnect();
+      });
+    }
+    if (timer) {
+      clearTimeout(timer);
+      timer = undefined;
+    }
   });
-  await getCamera(props.deviceId, playerRef.value);
-});
-
-onUnmounted(() => {
-  destroy();
-  if (webRtcServer.length > 0) {
-    webRtcServer.forEach((item) => {
-      item.disconnect();
-    });
-  }
-  if (timer) {
-    clearTimeout(timer);
-    timer = undefined;
-  }
-});
 </script>
 
 <style lang="less" scoped>
-@ventSpace: zxm;
-
-.nitrogen-box {
-  width: 100%;
-  height: 100%;
-  display: flex;
-  justify-content: center;
-}
-
-#nitrogenCss3D {
-  .modal-monitor {
-    width: 200px;
-    position: absolute;
-    left: 0px;
-    top: 0px;
-  }
+  @ventSpace: zxm;
 
-  &:deep(.win) {
-    margin: 0 !important;
-    background: #00000044;
-  }
-}
-
-.nitrogen-home {
-  width: 100%;
-  height: 100%;
-  position: fixed;
-  z-index: 9999;
-  display: flex;
-  flex-direction: column;
-  justify-content: center;
-  align-items: center;
-  pointer-events: none;
-  top: 20px;
-
-  .nitrogen-container {
+  .nitrogen-box {
     width: 100%;
-    height: calc(100% - 100px);
+    height: 100%;
     display: flex;
-    justify-content: space-between;
-    margin-bottom: 100px;
+    justify-content: center;
+  }
 
-    .device-state {
-      width: 100%;
+  #nitrogenCss3D {
+    .modal-monitor {
+      width: 200px;
       position: absolute;
-      top: 20px;
-      color: #e90000;
-      display: flex;
-      justify-content: center;
-      font-size: 20px;
+      left: 0px;
+      top: 0px;
+    }
+
+    &:deep(.win) {
+      margin: 0 !important;
+      background: #00000044;
     }
+  }
 
-    .top-box {
+  .nitrogen-home {
+    width: 100%;
+    height: 100%;
+    position: fixed;
+    z-index: 9999;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
+    pointer-events: none;
+    top: 20px;
+
+    .nitrogen-container {
       width: 100%;
-      padding: 10px;
-      overflow: hidden;
+      height: calc(100% - 100px);
       display: flex;
       justify-content: space-between;
-      // margin-top: 40px;
+      margin-bottom: 100px;
 
-      .center-item-box {
+      .device-state {
+        width: 100%;
         position: absolute;
-        left: 50%;
-        top: 50px;
-        transform: translate(-48%, 0);
-        width: calc(100% - 720px);
-        height: 50px;
+        top: 20px;
+        color: #e90000;
         display: flex;
-        align-items: center;
-        pointer-events: auto;
+        justify-content: center;
+        font-size: 20px;
+      }
 
-        .top-left {
+      .top-box {
+        width: 100%;
+        padding: 10px;
+        overflow: hidden;
+        display: flex;
+        justify-content: space-between;
+        // margin-top: 40px;
+
+        .center-item-box {
+          position: absolute;
+          left: 50%;
+          top: 50px;
+          transform: translate(-48%, 0);
+          width: calc(100% - 720px);
+          height: 50px;
           display: flex;
-          width: 42%;
-          color: #fff;
+          align-items: center;
+          pointer-events: auto;
 
-          .button-box {
-            position: relative;
-            width: auto;
-            height: 32px;
+          .top-left {
             display: flex;
-            align-items: center;
-            justify-content: center;
-            border-radius: 5px;
+            width: 42%;
             color: #fff;
-            padding: 10px 15px;
-            margin: 0px 10px;
-            box-sizing: border-box;
-            cursor: pointer;
-            background: linear-gradient(#1fa6cb, #127cb5);
-
-            &:hover {
-              background: linear-gradient(#1fa6cbcc, #127cb5cc);
+
+            .button-box {
+              position: relative;
+              width: auto;
+              height: 32px;
+              display: flex;
+              align-items: center;
+              justify-content: center;
+              border-radius: 5px;
+              color: #fff;
+              padding: 10px 15px;
+              margin: 0px 10px;
+              box-sizing: border-box;
+              cursor: pointer;
+              background: linear-gradient(#1fa6cb, #127cb5);
+
+              &:hover {
+                background: linear-gradient(#1fa6cbcc, #127cb5cc);
+              }
             }
           }
-        }
 
-        .top-center {
-          display: flex;
-          flex-direction: column;
-          //   flex: 1;
-          width: 15%;
-          justify-content: center;
-          align-items: left;
-          font-size: 14px;
-          color: #fff;
-          .top-c-label {
-            color: yellow;
+          .top-center {
+            display: flex;
+            flex-direction: column;
+            //   flex: 1;
+            width: 15%;
+            justify-content: center;
+            align-items: left;
+            font-size: 14px;
+            color: #fff;
+            .top-c-label {
+              color: yellow;
+            }
           }
-        }
-
-        .top-right {
-          display: flex;
-          //   flex: 2;
-          width: 43%;
-          justify-content: right;
-          align-items: center;
-          color: #fff;
 
-          .control-type {
+          .top-right {
             display: flex;
+            //   flex: 2;
+            width: 43%;
+            justify-content: right;
+            align-items: center;
             color: #fff;
 
-            .control-title {
-              color: #73e8fe;
+            .control-type {
+              display: flex;
+              color: #fff;
+
+              .control-title {
+                color: #73e8fe;
+              }
             }
           }
         }
-      }
-
-      .lr-box {
-        height: 100%;
-        display: flex;
-        flex-direction: column;
-        position: relative;
-        // overflow: hidden;
-        z-index: 9999;
-        pointer-events: auto;
-        overflow-y: auto;
-        overflow-x: hidden;
-        height: calc(100% - 70px);
-      }
 
-      .item {
-        width: 305px;
-        height: auto;
-        position: relative;
-        border-radius: 5px;
-        margin-top: 10px;
-        margin-bottom: 0px;
-        pointer-events: auto;
-        color: #fff;
-        // overflow: hidden;
-
-        &:first-child {
-          margin-top: 0px;
+        .lr-box {
+          height: 100%;
+          display: flex;
+          flex-direction: column;
+          position: relative;
+          // overflow: hidden;
+          z-index: 9999;
+          pointer-events: auto;
+          overflow-y: auto;
+          overflow-x: hidden;
+          height: calc(100% - 70px);
         }
 
-        .base-title {
-          color: #fff;
-          margin-bottom: 8px;
-          padding-left: 10px;
+        .item {
+          width: 305px;
+          height: auto;
           position: relative;
-          font-size: 16px;
-
-          &::after {
-            content: '';
-            position: absolute;
-            display: block;
-            width: 4px;
-            height: 12px;
-            top: 7px;
-            left: 0px;
-            background: #45d3fd;
-            border-radius: 4px;
-          }
-        }
+          border-radius: 5px;
+          margin-top: 10px;
+          margin-bottom: 0px;
+          pointer-events: auto;
+          color: #fff;
+          // overflow: hidden;
 
-        .monitor-item {
-          width: 100%;
-          display: flex;
-          flex-direction: row;
-          flex-wrap: wrap;
+          &:first-child {
+            margin-top: 0px;
+          }
 
-          .state-item {
-            width: 50%;
-            padding: 5px;
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
+          .base-title {
+            color: #fff;
+            margin-bottom: 8px;
+            padding-left: 10px;
+            position: relative;
+            font-size: 16px;
 
-            .state-title {
-              width: 100px;
-              color: #ffffffdd;
-              flex: 9;
-              font-size: 14px;
+            &::after {
+              content: '';
+              position: absolute;
+              display: block;
+              width: 4px;
+              height: 12px;
+              top: 7px;
+              left: 0px;
+              background: #45d3fd;
+              border-radius: 4px;
+            }
+          }
 
-              .unit {
-                // color: #ffffffbb;
+          .monitor-item {
+            width: 100%;
+            display: flex;
+            flex-direction: row;
+            flex-wrap: wrap;
+
+            .state-item {
+              width: 50%;
+              padding: 5px;
+              display: flex;
+              align-items: center;
+              justify-content: space-between;
+
+              .state-title {
+                width: 100px;
+                color: #ffffffdd;
+                flex: 9;
+                font-size: 14px;
+
+                .unit {
+                  // color: #ffffffbb;
+                }
               }
-            }
 
-            .state-val {
-              flex: 1;
-              color: #e4a300;
-              margin-right: 5px;
-              text-align: right;
-              font-size: 14px;
+              .state-val {
+                flex: 1;
+                color: #e4a300;
+                margin-right: 5px;
+                text-align: right;
+                font-size: 14px;
+              }
             }
           }
-        }
 
-        .signal-box {
-          margin: 5px 0;
-          display: flex;
-          align-items: center;
+          .signal-box {
+            margin: 5px 0;
+            display: flex;
+            align-items: center;
 
-          .signal-title {
-            color: #7af5ff;
-            margin: 0 5px;
-          }
+            .signal-title {
+              color: #7af5ff;
+              margin: 0 5px;
+            }
 
-          &:last-child {
-            margin-right: 0px;
+            &:last-child {
+              margin-right: 0px;
+            }
           }
-        }
 
-        .list-item {
-          padding: 0 10px;
-          display: flex;
-          justify-content: space-between;
-          align-items: center;
+          .list-item {
+            padding: 0 10px;
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
 
-          .item-data-key {
-            color: #ffffff99;
+            .item-data-key {
+              color: #ffffff99;
+            }
           }
-        }
 
-        .item-data-box {
-          color: #fff;
+          .item-data-box {
+            color: #fff;
 
-          .state-icon {
-            display: inline-block;
-            width: 12px;
-            height: 12px;
-            border-radius: 12px;
-          }
+            .state-icon {
+              display: inline-block;
+              width: 12px;
+              height: 12px;
+              border-radius: 12px;
+            }
 
-          .open {
-            border: 5px solid #133a56;
-            background: #4ecb73;
-          }
+            .open {
+              border: 5px solid #133a56;
+              background: #4ecb73;
+            }
 
-          .close {
-            border: 5px solid #192961;
-            background: #6d7898;
+            .close {
+              border: 5px solid #192961;
+              background: #6d7898;
+            }
           }
         }
-      }
 
-      .item-l {
-        width: 100%;
-
-        .monitor-box {
+        .item-l {
           width: 100%;
 
-          .parameter-title {
-            position: relative;
+          .monitor-box {
             width: 100%;
-            height: 14px;
-            margin-top: 10px;
 
-            .icon,
-            span {
-              position: absolute;
-              top: -10px;
+            .parameter-title {
+              position: relative;
+              width: 100%;
+              height: 14px;
+              margin-top: 10px;
+
+              .icon,
+              span {
+                position: absolute;
+                top: -10px;
+              }
             }
-          }
 
-          .group-parameter-title {
-            background-image: linear-gradient(to right, #39a3ff50, #39a3ff00);
+            .group-parameter-title {
+              background-image: linear-gradient(to right, #39a3ff50, #39a3ff00);
 
-            .icon {
-              left: -12px;
-              top: -17px;
-            }
+              .icon {
+                left: -12px;
+                top: -17px;
+              }
 
-            span {
-              left: 18px;
-            }
+              span {
+                left: 18px;
+              }
 
-            .item-col {
-              background-image: linear-gradient(to right, #39a3ff00, #39a3ff10);
+              .item-col {
+                background-image: linear-gradient(to right, #39a3ff00, #39a3ff10);
+              }
             }
-          }
 
-          .device-parameter-title {
-            background-image: linear-gradient(to right, #3df6ff40, #3df6ff00);
+            .device-parameter-title {
+              background-image: linear-gradient(to right, #3df6ff40, #3df6ff00);
 
-            .icon {
-              left: -10px;
-              top: -14px;
-            }
+              .icon {
+                left: -10px;
+                top: -14px;
+              }
 
-            span {
-              left: 18px;
-            }
+              span {
+                left: 18px;
+              }
 
-            .item-col {
-              background-image: linear-gradient(to right, #3df6ff10, #3df6ff00);
+              .item-col {
+                background-image: linear-gradient(to right, #3df6ff10, #3df6ff00);
+              }
             }
           }
         }
-      }
 
-      .right-box {
-        width: 300px;
-        margin-top: 50px;
-      }
+        .right-box {
+          width: 300px;
+          margin-top: 50px;
+        }
 
-      .left-box {
-        width: 335px;
-        margin-top: 80px;
+        .left-box {
+          width: 335px;
+          margin-top: 80px;
 
-        .input-item {
-          display: flex;
-          justify-content: space-between;
-          align-items: center;
-          padding: 4px 8px;
-          margin: 6px 0;
-          background-image: linear-gradient(to right, #39deff15, #3977e500);
+          .input-item {
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
+            padding: 4px 8px;
+            margin: 6px 0;
+            background-image: linear-gradient(to right, #39deff15, #3977e500);
 
-          .title {
-            width: 200px;
-          }
+            .title {
+              width: 200px;
+            }
 
-          .title-auto {
-            width: auto;
-          }
+            .title-auto {
+              width: auto;
+            }
 
-          .input-value {
-            width: 80px;
-            height: 28px;
-            line-height: 28px !important;
-            background: transparent !important;
-            border-color: #228da2 !important;
-            color: #fff !important;
-          }
+            .input-value {
+              width: 80px;
+              height: 28px;
+              line-height: 28px !important;
+              background: transparent !important;
+              border-color: #228da2 !important;
+              color: #fff !important;
+            }
 
-          .value {
-            width: 100px;
-            color: #00d8ff;
-            padding-right: 20px;
-          }
+            .value {
+              width: 100px;
+              color: #00d8ff;
+              padding-right: 20px;
+            }
 
-          .unit {
-            width: 80px;
+            .unit {
+              width: 80px;
+            }
           }
         }
       }
-    }
 
-    &:deep(.win) {
-      width: 100%;
-      margin: 0 !important;
+      &:deep(.win) {
+        width: 100%;
+        margin: 0 !important;
+      }
     }
   }
-}
-
-&:deep(.main) {
-  .title {
-    height: 34px;
-    text-align: center;
-    font-weight: 600;
-    color: #7af5ff;
-    // background-image: url('../../../assets/img/yfj/light.png');
-    background-repeat: no-repeat;
-    background-position-x: center;
-    background-position-y: 100%;
-    background-size: 80%;
-    font-size: 16px;
-  }
 
-  .monitor-item {
-    width: 200px;
-    display: flex;
-    flex-direction: row;
-    width: auto;
-    margin-bottom: 3px;
+  &:deep(.main) {
+    .title {
+      height: 34px;
+      text-align: center;
+      font-weight: 600;
+      color: #7af5ff;
+      // background-image: url('../../../assets/img/yfj/light.png');
+      background-repeat: no-repeat;
+      background-position-x: center;
+      background-position-y: 100%;
+      background-size: 80%;
+      font-size: 16px;
+    }
 
-    .monitor-val {
-      color: #ffb700;
+    .monitor-item {
+      width: 200px;
       display: flex;
+      flex-direction: row;
       width: auto;
+      margin-bottom: 3px;
 
-      .val {
-        width: 80px;
-        font-size: 14px;
-      }
+      .monitor-val {
+        color: #ffb700;
+        display: flex;
+        width: auto;
+
+        .val {
+          width: 80px;
+          font-size: 14px;
+        }
 
-      .unit {
-        color: #ffffffbb;
-        font-size: 14px;
+        .unit {
+          color: #ffffffbb;
+          font-size: 14px;
+        }
       }
     }
-  }
 
-  .monitor-title {
-    // width: 100px;
-    width: 125px;
-    color: #7af5ff;
-    font-weight: 400;
-    font-size: 14px;
-  }
+    .monitor-title {
+      // width: 100px;
+      width: 125px;
+      color: #7af5ff;
+      font-weight: 400;
+      font-size: 14px;
+    }
 
-  .signal-item {
-    display: flex;
-    justify-content: space-between;
-
-    // margin-bottom: 5px;
-    .signal-round {
-      display: inline-block;
-      width: 8px;
-      height: 8px;
-      border-radius: 50%;
-      margin: 0 10px;
-      position: relative;
-
-      &::after {
-        display: block;
-        content: '';
-        position: absolute;
-        width: 12px;
-        height: 12px;
-        top: -2px;
-        left: -2px;
+    .signal-item {
+      display: flex;
+      justify-content: space-between;
+
+      // margin-bottom: 5px;
+      .signal-round {
+        display: inline-block;
+        width: 8px;
+        height: 8px;
         border-radius: 50%;
+        margin: 0 10px;
+        position: relative;
+
+        &::after {
+          display: block;
+          content: '';
+          position: absolute;
+          width: 12px;
+          height: 12px;
+          top: -2px;
+          left: -2px;
+          border-radius: 50%;
+        }
       }
-    }
 
-    .signal-round-gry {
-      background-color: #858585;
+      .signal-round-gry {
+        background-color: #858585;
 
-      &::after {
-        background-color: #85858544;
-        box-shadow: 0 0 1px 1px #85858599;
+        &::after {
+          background-color: #85858544;
+          box-shadow: 0 0 1px 1px #85858599;
+        }
       }
-    }
 
-    .signal-round-run {
-      background-color: #67fc00;
+      .signal-round-run {
+        background-color: #67fc00;
 
-      &::after {
-        background-color: #67fc0044;
-        box-shadow: 0 0 1px 1px #c6ff77;
+        &::after {
+          background-color: #67fc0044;
+          box-shadow: 0 0 1px 1px #c6ff77;
+        }
       }
-    }
 
-    .signal-round-warning {
-      background-color: #e9170b;
+      .signal-round-warning {
+        background-color: #e9170b;
 
-      &::after {
-        background-color: #e9170b44;
-        box-shadow: 0 0 1px 1px #e9170b;
+        &::after {
+          background-color: #e9170b44;
+          box-shadow: 0 0 1px 1px #e9170b;
+        }
       }
     }
   }
-}
 
-:deep(.zxm-radio-wrapper) {
-  color: #fff !important;
-}
+  :deep(.zxm-radio-wrapper) {
+    color: #fff !important;
+  }
 </style>

+ 1 - 1
src/views/vent/monitorManager/compressor/nitrogen.data.ts

@@ -212,7 +212,7 @@ export const zhudanOption = reactive({
 
 export function getMonitorComponent() {
   const { sysOrgCode } = useGlobSetting();
-  // const sysOrgCode = 'sdmtjtltmk';
+  // const sysOrgCode = 'sdmtjtdltmk';
   let nitrogenHome;
   switch (sysOrgCode) {
     case 'sdmtjtdltmk': //dltj

+ 5 - 5
src/views/vent/monitorManager/deviceMonitor/components/device/device.data.ts

@@ -77,7 +77,7 @@ export const chartsColumnList = [
   {
     legend: '一氧化碳',
     seriesName: '(ppm)',
-    ymax: 30,
+    ymax: 15,
     yname: 'ppm',
     linetype: 'line',
     yaxispos: 'left',
@@ -89,7 +89,7 @@ export const chartsColumnList = [
   {
     legend: '乙炔',
     seriesName: '',
-    ymax: 30,
+    ymax: 15,
     yname: 'ppm',
     linetype: 'line',
     yaxispos: 'left',
@@ -101,7 +101,7 @@ export const chartsColumnList = [
   {
     legend: '乙烯',
     seriesName: '',
-    ymax: 30,
+    ymax: 15,
     yname: 'ppm',
     linetype: 'line',
     yaxispos: 'left',
@@ -113,7 +113,7 @@ export const chartsColumnList = [
   {
     legend: '二氧化碳',
     seriesName: '(%)',
-    ymax: 30,
+    ymax: 20,
     yname: '%',
     linetype: 'line',
     yaxispos: 'right',
@@ -125,7 +125,7 @@ export const chartsColumnList = [
   {
     legend: '甲烷',
     seriesName: '',
-    ymax: 30,
+    ymax: 20,
     yname: '%',
     linetype: 'line',
     yaxispos: 'right',

+ 40 - 40
src/views/vent/monitorManager/deviceMonitor/components/device/index.vue

@@ -77,7 +77,7 @@
           <FullscreenExitOutlined style="font-size: 18px" />
         </div>
         <!-- 是人员定位表单代码,由于放在tab中,表格对已知刷新,导致表单数据也在刷寻,造成输入一半的中文时会清空输入框的内容,导致的输入不上数据 -->
-        <div v-if="deviceType.startsWith('location')" class="location-form"
+        <div v-if="deviceType.startsWith('location') && activeKey == '1'" class="location-form"
           style="position: absolute; z-index: 9999; top: 50px">
           <div class="location-form-item">
             <span class="location-form-label">人员名称:</span>
@@ -220,40 +220,42 @@
                 </template>
                 <template #filterCell="{ column, record }">
                   <template v-if="deviceType.startsWith('gate')">
-                    <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>
-                    </template>
-                    <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>
-                    </template>
-                    <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>
-                    </template>
-                    <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>
-                    </template>
+                    <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 === 'doorUse'">
                       <span v-if="record.doorUse == 1" color="default">行车风门</span>
                       <span v-else-if="record.doorUse == 2">行人风门</span>
@@ -308,7 +310,6 @@
           </a-tab-pane>
           <a-tab-pane key="2" tab="历史数据" v-if="!noHistoryArr().find((item) => deviceType.startsWith(item))">
             <div class="tab-item">
-
               <template v-if="activeKey == '2' && deviceType.startsWith('firemon_normal')">
                 <HistoryBall :dataSource="dataSource"></HistoryBall>
               </template>
@@ -864,7 +865,7 @@ async function findTreeDataValue(obj) {
       if (item.children.length > 0) {
         findDeviceType(item.children, obj);
       }
-      if (obj.deviceType.startsWith('sys_')) {
+      if (obj.deviceType && obj.deviceType.startsWith('sys_')) {
         if (item.type == obj.deviceid) {
           deviceType.value = 'sys';
           systemID.value = obj.deviceid;
@@ -874,7 +875,7 @@ async function findTreeDataValue(obj) {
         }
       } else {
         if (!flag) {
-          if (item.type.startsWith(obj.deviceType)) {
+          if (obj.deviceType && item.type.startsWith(obj.deviceType)) {
             deviceType.value = item.type;
             selectedKeys.value = [item.key];
             expandedKeys.value = [item.key];
@@ -883,7 +884,7 @@ async function findTreeDataValue(obj) {
           }
           return false;
         } else {
-          if (item.type == obj.deviceType) {
+          if (obj.deviceType && item.type == obj.deviceType) {
             deviceType.value = item.type;
             selectedKeys.value = [item.key];
             expandedKeys.value = [item.key];
@@ -972,7 +973,6 @@ function setLocation() {
 watch(
   () => props.pageData,
   async (pageObj) => {
-    debugger;
     isRefresh.value = false;
     if (!treeData.value || treeData.value?.length < 1) {
       await getDeviceType();

+ 22 - 20
src/views/vent/monitorManager/deviceMonitor/components/device/modal/blastDelta.vue

@@ -348,26 +348,28 @@
   watch(
     () => props.posMonitor,
     (newV, oldV) => {
-      maxY1.value = parseFloat(newV.o2val);
-      maxX1.value = parseFloat(newV.coval) * 0.0001 + parseFloat(newV.gasval) + parseFloat(newV.ch2val) * 0.0001 + parseFloat(newV.chval) * 0.0001;
-      let btTriBlasts = JSON.parse(newV.btTriBlast);
-      coordinateA.x = btTriBlasts.A_x;
-      coordinateA.y = btTriBlasts.A_y;
-      coordinateB.x = btTriBlasts.B_x;
-      coordinateB.y = btTriBlasts.B_y;
-      coordinateE.x = btTriBlasts.E_x;
-      coordinateE.y = btTriBlasts.E_y;
-      coordinateF.x = btTriBlasts.F_x;
-      coordinateF.y = btTriBlasts.F_y;
-      coordinateG.x = btTriBlasts.G_x;
-      coordinateG.y = btTriBlasts.G_y;
-      if (
-        !((coordinateA.y - coordinateB.y) / (coordinateA.x - coordinateB.x)) ||
-        (coordinateA.y - coordinateB.y) / (coordinateA.x - coordinateB.x) == 1
-      ) {
-        getUnblast();
-      } else {
-        getBlast();
+      if (newV.btTriBlast) {
+        maxY1.value = parseFloat(newV.o2val);
+        maxX1.value = parseFloat(newV.coval) * 0.0001 + parseFloat(newV.gasval) + parseFloat(newV.ch2val) * 0.0001 + parseFloat(newV.chval) * 0.0001;
+        let btTriBlasts = JSON.parse(newV.btTriBlast);
+        coordinateA.x = btTriBlasts.A_x;
+        coordinateA.y = btTriBlasts.A_y;
+        coordinateB.x = btTriBlasts.B_x;
+        coordinateB.y = btTriBlasts.B_y;
+        coordinateE.x = btTriBlasts.E_x;
+        coordinateE.y = btTriBlasts.E_y;
+        coordinateF.x = btTriBlasts.F_x;
+        coordinateF.y = btTriBlasts.F_y;
+        coordinateG.x = btTriBlasts.G_x;
+        coordinateG.y = btTriBlasts.G_y;
+        if (
+          !((coordinateA.y - coordinateB.y) / (coordinateA.x - coordinateB.x)) ||
+          (coordinateA.y - coordinateB.y) / (coordinateA.x - coordinateB.x) == 1
+        ) {
+          getUnblast();
+        } else {
+          getBlast();
+        }
       }
     },
     { deep: true }

+ 121 - 103
src/views/vent/monitorManager/deviceMonitor/components/device/modal/history-ball.vue

@@ -1,137 +1,155 @@
 <template>
-    <div class="history-ball">
-        <div class="search-area">
-            <a-form :model="formSearch" labelAlign="center" :label-col="{ span: 5 }" :wrapper-col="{ span: 12 }">
-                <a-row>
-                    <a-col :span="4">
-                        <a-form-item label="开始时间:">
-                            <a-date-picker show-time  valueFormat="YYYY-MM-DD HH:mm:ss" placeholder="开始时间" size="small"
-                                v-model:value="formSearch.startTime" style="width:220px" />
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="4">
-                        <a-form-item label="结束时间:">
-                            <a-date-picker show-time  valueFormat="YYYY-MM-DD HH:mm:ss" placeholder="结束时间" size="small" v-model:value="formSearch.endTime"
-                                style="width:220px" />
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="4">
-                        <a-form-item label="查询设备:">
-                            <a-select v-model:value="formSearch.deviceId" style="width: 220px" size="small"
-                                placeholder="请选择...">
-                                <a-select-option v-for="item in deviceList" :key="item.deviceID">{{
-                                    item.strinstallpos }}</a-select-option>
-                            </a-select>
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="2">
-                        <a-button type="primary" style="margin-right: 10px;" @click="getSearch">查询</a-button>
-                        <a-button type="plain" @click="getReset">重置</a-button>
-                    </a-col>
-                </a-row>
-
-
-            </a-form>
-        </div>
-        <div class="echart-area">
-            <BarAndLine class="echarts-line" xAxisPropType="o2RealDate" :dataSource="historyList" height="100%" width="100%"
-                :chartsColumns="chartsColumns" :option="echatsOption" chartsType="listMonitor" />
-        </div>
+  <div class="history-ball">
+    <div class="search-area">
+      <a-form :model="formSearch" labelAlign="center" :label-col="{ span: 5 }" :wrapper-col="{ span: 12 }">
+        <a-row>
+          <a-col :span="4">
+            <a-form-item label="开始时间:">
+              <a-date-picker
+                show-time
+                valueFormat="YYYY-MM-DD HH:mm:ss"
+                placeholder="开始时间"
+                size="small"
+                v-model:value="formSearch.startTime"
+                style="width: 220px"
+              />
+            </a-form-item>
+          </a-col>
+          <a-col :span="4">
+            <a-form-item label="结束时间:">
+              <a-date-picker
+                show-time
+                valueFormat="YYYY-MM-DD HH:mm:ss"
+                placeholder="结束时间"
+                size="small"
+                v-model:value="formSearch.endTime"
+                style="width: 220px"
+              />
+            </a-form-item>
+          </a-col>
+          <a-col :span="4">
+            <a-form-item label="查询设备:">
+              <a-select v-model:value="formSearch.deviceId" style="width: 220px" size="small" placeholder="请选择...">
+                <a-select-option v-for="item in deviceList" :key="item.deviceID">{{ item.strinstallpos }}</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="2">
+            <a-button type="primary" style="margin-right: 10px" @click="getSearch">查询</a-button>
+            <a-button type="plain" @click="getReset">重置</a-button>
+          </a-col>
+        </a-row>
+      </a-form>
     </div>
+    <div class="echart-area">
+      <BarAndLine
+        class="echarts-line"
+        xAxisPropType="o2RealDate"
+        :dataSource="historyList"
+        height="100%"
+        width="100%"
+        :chartsColumns="chartsColumns"
+        :option="echatsOption"
+        chartsType="listMonitor"
+      />
+    </div>
+  </div>
 </template>
 <script lang="ts" setup>
-import { ref, reactive, onMounted, watch } from 'vue'
-import BarAndLine from '/@/components/chart/BarAndLine.vue';
-import { getHistoryData } from '../device.api.ts'
-import { chartsColumnListBall } from '../device.data';
-import dayjs from 'dayjs';
+  import { ref, reactive, onMounted, watch } from 'vue';
+  import BarAndLine from '/@/components/chart/BarAndLine.vue';
+  import { getHistoryData } from '../device.api.ts';
+  import { chartsColumnListBall } from '../device.data';
+  import dayjs from 'dayjs';
 
-let props = defineProps({
+  let props = defineProps({
     dataSource: {
-        type: Array,
-        default: () => {
-            return []
-        }
-    }
-})
-let formSearch = reactive({
+      type: Array,
+      default: () => {
+        return [];
+      },
+    },
+  });
+  let formSearch = reactive({
     pageNum: 1,
     pageSize: 1000,
     startTime: dayjs().add(-1, 'day').format('YYYY-MM-DD HH:mm:ss'),
     endTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
-    deviceId: ''
-})
-let deviceList = ref<any[]>([])
-let chartsColumns = chartsColumnListBall;
-const echatsOption = {
+    deviceId: '',
+  });
+  let deviceList = ref<any[]>([]);
+  let chartsColumns = chartsColumnListBall;
+  const echatsOption = {
     grid: {
-        top: '20%',
-        left: '10',
-        right: '65',
-        bottom: '5',
-        containLabel: true,
+      top: '20%',
+      left: '10',
+      right: '65',
+      bottom: '5',
+      containLabel: true,
     },
     toolbox: {
-        feature: {},
+      feature: {},
     },
-}
-let historyList=ref<any[]>([])
+  };
+  let historyList = ref<any[]>([]);
 
-//查询
-function getSearch(){
-    getSearchList()
-}
-//重置
-function getReset(){
-    formSearch.startTime=dayjs().add(-1, 'day').format('YYYY-MM-DD HH:mm:ss')
-    formSearch.endTime=dayjs().format('YYYY-MM-DD HH:mm:ss')
-    formSearch.deviceId=deviceList.value[0].deviceID
-    getSearchList()
-}
+  //查询
+  function getSearch() {
+    getSearchList();
+  }
+  //重置
+  function getReset() {
+    formSearch.startTime = dayjs().add(-1, 'day').format('YYYY-MM-DD HH:mm:ss');
+    formSearch.endTime = dayjs().format('YYYY-MM-DD HH:mm:ss');
+    formSearch.deviceId = deviceList.value[0].deviceID;
+    getSearchList();
+  }
 
-async function getSearchList() {
-    formSearch.deviceId=formSearch.deviceId ? formSearch.deviceId : deviceList.value[0].deviceID
-    let res = await getHistoryData({ ...formSearch })
+  async function getSearchList() {
+    formSearch.deviceId = formSearch.deviceId ? formSearch.deviceId : deviceList.value[0].deviceID;
+    let res = await getHistoryData({ ...formSearch });
     // console.log(res,'000000=======')
-    let result=res.records
-    historyList.value=result
-}
-watch(() => props.dataSource, (newV, oldV) => {
-    deviceList.value = newV
-    getSearchList()
-})
-
+    let result = res.records;
+    historyList.value = result;
+  }
+  watch(
+    () => props.dataSource,
+    (newV, oldV) => {
+      deviceList.value = newV;
+      getSearchList();
+    }
+  );
 </script>
 <style lang="less" scoped>
-.history-ball {
+  .history-ball {
     position: relative;
     height: 100%;
     overflow-y: auto;
 
     .search-area {
-        padding: 5px;
-        margin: 10px;
-        box-sizing: border-box;
+      padding: 5px;
+      margin: 10px;
+      box-sizing: border-box;
     }
 
     .echart-area {
-        height: calc(100% - 65px);
+      height: calc(100% - 65px);
 
-        .echarts-line {
-            width: calc(100% + 80px);
-            position: absolute;
-        }
+      .echarts-line {
+        width: calc(100% + 80px);
+        position: absolute;
+      }
     }
-}
+  }
 
-:deep(.zxm-form-item) {
+  :deep(.zxm-form-item) {
     margin-bottom: 0 !important;
-}
+  }
 
-:deep(.zxm-form-item-label > label) {
+  :deep(.zxm-form-item-label > label) {
     color: #fff;
-}
-:deep(.zxm-select-single.zxm-select-sm:not(.zxm-select-customize-input) .zxm-select-selector .zxm-select-selection-item){
+  }
+  :deep(.zxm-select-single.zxm-select-sm:not(.zxm-select-customize-input) .zxm-select-selector .zxm-select-selection-item) {
     line-height: 30px !important;
-}
-</style>
+  }
+</style>

+ 4 - 4
src/views/vent/monitorManager/fanLocalMonitor/index.vue

@@ -686,7 +686,7 @@
   const scroll = reactive({
     y: 180,
   });
-
+  const deviceTypeDicts = getDictItemsByCode('fanlocaltype');
   const gasWarningVal = ref(0.6); // 瓦斯最大报警值
   const playerRef = ref();
   const MonitorDataTable = ref();
@@ -736,7 +736,7 @@
   let selectData = reactive(lodash.cloneDeep(initData));
   const rightColumns = ref<BasicColumn[]>([]);
   const leftColumns = ref<BasicColumn[]>([]);
-  const devicekide = ref('fanlocal');
+  const devicekide = ref(deviceTypeDicts && deviceTypeDicts.length > 0 ? deviceTypeDicts[0]['value'] : 'fanlocal');
   const deviceType = ref(selectData.deviceType);
   const headElHeight = ref(0);
   let btnClick = ref(true); // 判断按钮是否可点
@@ -824,8 +824,8 @@
   //
   async function getDataSource() {
     if (devicekide.value) {
-      // const res = await list({ devicetype: devicekide.value, pagetype: 'normal' });
-      const res = await list({ devicetype: 'fanlocal', pagetype: 'normal' });
+      const res = await list({ devicetype: devicekide.value, pagetype: 'normal' });
+      // const res = await list({ devicetype: 'fanlocal', pagetype: 'normal' });
       if (res.msgTxt && res.msgTxt[0] && res.msgTxt[0].datalist && res.msgTxt[0].datalist.length > 0) {
         const dataArr = res.msgTxt[0].datalist || [];
         dataSource.value = [];

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

@@ -288,7 +288,7 @@ export const initCameraCanvas = async (playerVal1) => {
 
 export const mountedThree = (playerDom) => {
   const { sysOrgCode } = useGlobSetting();
-  // sysOrgCode = 'yjmdsankuang';
+  // const sysOrgCode = 'yjmdsankuang';
   return new Promise(async (resolve) => {
     model = new UseThree('#damper3D', '', '#deviceDetail');
     model.setEnvMap('test1');

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

@@ -452,7 +452,10 @@ class FmTwoYj {
       if (!this.model) {
         resolve(null);
       }
-      this.model.setGLTFModel(['Fm-two-Yj'], this.group).then(() => {
+      this.model.setGLTFModel('Fm-two-Yj').then((gltf) => {
+        const fmModal = gltf[0];
+        fmModal.name = 'Fm-two-Yj';
+        this.group?.add(fmModal);
         this.setModalPosition();
         // 初始化左右摇摆动画;
         this.initAnimation();

+ 4 - 4
src/views/vent/monitorManager/nitrogen/components/nitrogenHistory.vue

@@ -1,12 +1,12 @@
 <template>
   <div class="nitrogen-history">
-    <!-- <HistoryTable columns-type="forcFan" device-type="forcFan" designScope="forcFan_history" /> -->
-    <HistoryTable device-code="forcFan" dict-code="forcFan_dict" columns-code="forcFan_history" />
+    <HistoryTable columns-type="forcFan" device-type="forcFan" designScope="forcFan_history" />
+    <!-- <HistoryTable device-code="forcFan" dict-code="forcFan_dict" columns-code="forcFan_history" /> -->
   </div>
 </template>
 <script setup lang="ts">
-  // import HistoryTable from '/@/views/vent/monitorManager/comment/HistoryTable.vue';
-  import HistoryTable from '/@/views/vent/comment/history/HistoryTable.vue';
+  import HistoryTable from '/@/views/vent/monitorManager/comment/HistoryTable.vue';
+  // import HistoryTable from '/@/views/vent/comment/history/HistoryTable.vue';
 </script>
 <style lang="less" scoped>
   .nitrogen-history {

+ 0 - 1
src/views/vent/monitorManager/safetyMonitor/AlarmHistoryTable.vue

@@ -193,7 +193,6 @@
                 console.log('1111', e, option);
                 dataTypeName.value = e;
                 await getDeviceList();
-                debugger;
               },
             },
             colProps: {

+ 0 - 3
src/views/vent/monitorManager/safetyMonitor/HistoryTable.vue

@@ -110,7 +110,6 @@
       return props.columnsType;
     },
     async (newVal) => {
-      debugger;
       if (!newVal) return;
       if (historyTable.value) getForm().resetFields();
       await getDeviceList();
@@ -307,7 +306,6 @@
                 console.log('1111', e, option);
                 dataTypeName.value = e;
                 await getDeviceList();
-                debugger;
               },
             },
             colProps: {
@@ -368,7 +366,6 @@
 
   onMounted(async () => {
     await getDeviceList();
-    debugger;
     if (deviceOptions.value[0]) {
       stationType.value = deviceOptions.value[0]['stationtype'];
       historyType.value = deviceOptions.value[0]['strtype'] || deviceOptions.value[0]['devicekind'];

+ 3 - 3
src/views/vent/monitorManager/windrectMonitor/index.vue

@@ -45,9 +45,9 @@
     </div>
     <div class="bottom-tabs-box" @mousedown="setDivHeight($event, 350, scroll)">
       <dv-border-box8 :dur="5" :style="`padding: 5px; height: ${scroll.y + 120}px`">
-        <div v-if="hasPermission('windrect:handler')" class="tabs-button-group">
-          <a-button class="tabs-button" type="primary" @click="openModel">一键测风</a-button>
-          <a-button class="tabs-button" type="primary" @click="resetHandle">一键复位</a-button>
+        <div class="tabs-button-group">
+          <a-button v-if="hasPermission('windrect:handler')" class="tabs-button" type="primary" @click="openModel">一键测风</a-button>
+          <a-button v-if="hasPermission('windrect:reset')" class="tabs-button" type="primary" @click="resetHandle">一键复位</a-button>
         </div>
         <a-tabs class="tabs-box" v-model:activeKey="activeKey" @change="tabChange">
           <a-tab-pane key="1" tab="实时监测">

+ 147 - 124
src/views/vent/reportManager/comment/report-modal.vue

@@ -1,79 +1,85 @@
 <template>
-    <div class="report-add">
-        <a-form :model="formStates" labelAlign="center" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
-            <a-form-item label="所属部门编号:">
-                <!-- <a-select v-model:value="formStates.sysOrgCode" placeholder="请选择...">
+  <div class="report-add">
+    <a-form :model="formStates" labelAlign="center" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
+      <a-form-item label="所属部门编号:">
+        <!-- <a-select v-model:value="formStates.sysOrgCode" placeholder="请选择...">
                     <a-select-option v-for="item in sysOrgCodeList" :key="item.value">{{ item.label }}</a-select-option>
                 </a-select> -->
-                <a-tree-select v-model:value="formStates.sysOrgCode" show-search 
-                :dropdown-style="{ maxHeight: '200px', overflow: 'auto' }" placeholder="请选择部门..." allow-clear
-                tree-default-expand-all :tree-data="sysOrgCodeList" tree-node-filter-prop="title">
-                <template #title="{ value: val, title }">
-                    {{ title }}
-                </template>
-            </a-tree-select>
-            </a-form-item>
-            <a-form-item label="数据名称:">
-                <a-input v-model:value="formStates.name" placeholder="请输入..." />
-            </a-form-item>
-            <a-form-item label="集团报表单元格所在sheet页:">
-                <a-input v-model:value="formStates.groupSheet" placeholder="请输入..." />
-            </a-form-item>
-            <a-form-item label="集团报表单元格所在列:">
-                <a-input v-model:value="formStates.groupCol" placeholder="请输入..." />
-            </a-form-item>
-            <a-form-item label="集团报表单元格所在行:">
-                <a-input v-model:value="formStates.groupRow" placeholder="请输入..." />
-            </a-form-item>
-            <a-form-item label="矿报表单元格:">
-                <a-input v-model:value="formStates.sheet" placeholder="请输入sheet页,多个值中间用逗号隔开" style="width:189px;" />
-                <a-input v-model:value="formStates.col" placeholder="请输入col列,多个值中间用逗号隔开"
-                    style="width:188px;margin:0px 10px" />
-                <a-input v-model:value="formStates.row" placeholder="请输入row行,多个值中间用逗号隔开" style="width:189px" />
-            </a-form-item>
-            <a-form-item label="是否计算:">
-                <a-radio-group v-model:value="formStates.isCompute" name="radioGroup">
-                    <a-radio :value=true>是</a-radio>
-                    <a-radio :value=false>否</a-radio>
-                </a-radio-group>
-            </a-form-item>
-            <a-form-item label="计算公式:">
-                <JDictSelectTag v-model:value="formStates.formula" placeholder="请选择计算公式..." dictCode="report_formula" />
-            </a-form-item>
-        </a-form>
-        <div class="confirm-btn">
-            <a-button type="primary" @click="getConfirm" style="margin-right:15px">确定</a-button>
-            <a-button type="plain" @click="getCancel">取消</a-button>
-        </div>
+        <a-tree-select
+          v-model:value="formStates.sysOrgCode"
+          show-search
+          :dropdown-style="{ maxHeight: '200px', overflow: 'auto' }"
+          placeholder="请选择部门..."
+          allow-clear
+          tree-default-expand-all
+          :tree-data="sysOrgCodeList"
+          tree-node-filter-prop="title"
+        >
+          <template #title="{ value: val, title }">
+            {{ title }}
+          </template>
+        </a-tree-select>
+      </a-form-item>
+      <a-form-item label="数据名称:">
+        <a-input v-model:value="formStates.name" placeholder="请输入..." />
+      </a-form-item>
+      <a-form-item label="集团报表单元格所在sheet页:">
+        <a-input v-model:value="formStates.groupSheet" placeholder="请输入..." />
+      </a-form-item>
+      <a-form-item label="集团报表单元格所在列:">
+        <a-input v-model:value="formStates.groupCol" placeholder="请输入..." />
+      </a-form-item>
+      <a-form-item label="集团报表单元格所在行:">
+        <a-input v-model:value="formStates.groupRow" placeholder="请输入..." />
+      </a-form-item>
+      <a-form-item label="矿报表单元格:">
+        <a-input v-model:value="formStates.sheet" placeholder="请输入sheet页,多个值中间用逗号隔开" style="width: 189px" />
+        <a-input v-model:value="formStates.col" placeholder="请输入col列,多个值中间用逗号隔开" style="width: 188px; margin: 0px 10px" />
+        <a-input v-model:value="formStates.row" placeholder="请输入row行,多个值中间用逗号隔开" style="width: 189px" />
+      </a-form-item>
+      <a-form-item label="是否计算:">
+        <a-radio-group v-model:value="formStates.isCompute" name="radioGroup">
+          <a-radio :value="true">是</a-radio>
+          <a-radio :value="false">否</a-radio>
+        </a-radio-group>
+      </a-form-item>
+      <a-form-item label="计算公式:">
+        <JDictSelectTag v-model:value="formStates.formula" placeholder="请选择计算公式..." dictCode="report_formula" />
+      </a-form-item>
+    </a-form>
+    <div class="confirm-btn">
+      <a-button type="primary" @click="getConfirm" style="margin-right: 15px">确定</a-button>
+      <a-button type="plain" @click="getCancel">取消</a-button>
     </div>
+  </div>
 </template>
 
 <script setup lang="ts">
-import { ref, reactive, onMounted, watch } from 'vue'
-import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
-import { reportAdd, reportEdit } from '../reportManager.api'
+  import { ref, reactive, onMounted, watch } from 'vue';
+  import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
+  import { reportAdd, reportEdit } from '../reportManager.api';
 
-let props = defineProps({
+  let props = defineProps({
     sysOrgCodeList: {
-        type: Array,
-        default: () => {
-            return []
-        }
+      type: Array,
+      default: () => {
+        return [];
+      },
     },
     formState: {
-        type: Object,
-        default: () => {
-            return {}
-        }
+      type: Object,
+      default: () => {
+        return {};
+      },
     },
     isToggle: {
-        type: String,
-        default: ''
-    }
-})
+      type: String,
+      default: '',
+    },
+  });
 
-let formStates = reactive({
-    id:'',
+  let formStates = reactive({
+    id: '',
     sysOrgCode: '',
     formula: '',
     groupCol: '',
@@ -84,100 +90,117 @@ let formStates = reactive({
     sheet: '',
     col: '',
     row: '',
-    name: ''
-})
-let emit = defineEmits(['Close']);
-
-async function getConfirm() {
-    let mineCells = []
-    let paramRow = formStates.row.split(',')
-    let paramCol = formStates.col.split(',')
-    let paramSheet = formStates.sheet.split(',')
+    name: '',
+  });
+  let emit = defineEmits(['Close']);
+
+  async function getConfirm() {
+    let mineCells = [];
+    let paramRow = formStates.row.split(',');
+    let paramCol = formStates.col.split(',');
+    let paramSheet = formStates.sheet.split(',');
     paramRow.forEach((el, index) => {
-        mineCells.push({ sheet: paramSheet[index], col: paramCol[index], row: paramRow[index] })
-    })
+      mineCells.push({ sheet: paramSheet[index], col: paramCol[index], row: paramRow[index] });
+    });
     if (props.isToggle == 'add') {
-        let res = await reportAdd({ sysOrgCode: formStates.sysOrgCode, formula: formStates.formula, groupCol: formStates.groupCol, groupRow: formStates.groupRow, groupSheet: formStates.groupSheet, isCompute: formStates.isCompute, mineCells: JSON.stringify(mineCells), name: formStates.name })
-        console.log(res, '新增------------------')
-        emit('Close');
-
+      let res = await reportAdd({
+        sysOrgCode: formStates.sysOrgCode,
+        formula: formStates.formula,
+        groupCol: formStates.groupCol,
+        groupRow: formStates.groupRow,
+        groupSheet: formStates.groupSheet,
+        isCompute: formStates.isCompute,
+        mineCells: JSON.stringify(mineCells),
+        name: formStates.name,
+      });
+      console.log(res, '新增------------------');
+      emit('Close');
     } else {
-        let res = await reportEdit({ id:formStates.id, sysOrgCode: formStates.sysOrgCode, formula: formStates.formula, groupCol: formStates.groupCol, groupRow: formStates.groupRow, groupSheet: formStates.groupSheet, isCompute: formStates.isCompute, mineCells: JSON.stringify(mineCells), name: formStates.name })
-        console.log(res, '编辑------------------')
-        emit('Close');
+      let res = await reportEdit({
+        id: formStates.id,
+        sysOrgCode: formStates.sysOrgCode,
+        formula: formStates.formula,
+        groupCol: formStates.groupCol,
+        groupRow: formStates.groupRow,
+        groupSheet: formStates.groupSheet,
+        isCompute: formStates.isCompute,
+        mineCells: JSON.stringify(mineCells),
+        name: formStates.name,
+      });
+      console.log(res, '编辑------------------');
+      emit('Close');
     }
-
-}
-
-watch(() => props.formState, (newV) => {
-    formStates = Object.assign(formStates, newV)
-    let row = []
-    let col = []
-    let sheet = []
-    if (props.isToggle == 'edit') {
-        JSON.parse(formStates.mineCells).forEach(el => {
-            row.push(el.row)
-            col.push(el.col)
-            sheet.push(el.sheet)
-        })
-        formStates.col = col.join(',')
-        formStates.row = row.join(',')
-        formStates.sheet = sheet.join(',')
+  }
+
+  watch(
+    () => props.formState,
+    (newV) => {
+      formStates = Object.assign(formStates, newV);
+      let row = [];
+      let col = [];
+      let sheet = [];
+      if (props.isToggle == 'edit') {
+        JSON.parse(formStates.mineCells).forEach((el) => {
+          row.push(el.row);
+          col.push(el.col);
+          sheet.push(el.sheet);
+        });
+        formStates.col = col.join(',');
+        formStates.row = row.join(',');
+        formStates.sheet = sheet.join(',');
+      }
+    },
+    {
+      immediate: true,
+      deep: true,
     }
+  );
 
-}, {
-    immediate: true,
-    deep: true
-})
-
-
-
-onMounted(() => { })
-
+  onMounted(() => {});
 </script>
 
 <style lang="less" scoped>
-.report-add {
+  .report-add {
     position: relative;
     width: 100%;
     height: 100%;
     padding: 10px;
-    box-sizing: border-box
-}
+    box-sizing: border-box;
+  }
 
-.zxm-form {
+  .zxm-form {
     width: 80%;
     margin: 0px auto;
-}
+  }
 
-.confirm-btn {
+  .confirm-btn {
     width: 100%;
     margin: 10px 0px;
     text-align: center;
-}
+  }
 
-:deep(.zxm-form-item-label > label) {
+  :deep(.zxm-form-item-label > label) {
     color: #fff;
-}
+  }
 
-:deep(.zxm-select-selector) {
+  :deep(.zxm-select-selector) {
     width: 100%;
     color: #fff;
     border: 1px solid #3ad8ff77 !important;
     background-color: #ffffff00 !important;
-}
+  }
 
-:deep(.zxm-select-selection-item) {
+  :deep(.zxm-select-selection-item) {
     color: #fff !important;
-}
+  }
 
-:deep(.zxm-select-selection-placeholder) {
+  :deep(.zxm-select-selection-placeholder) {
     color: #ccc !important;
-}
+  }
 
-:deep(.zxm-input) {
+  :deep(.zxm-input) {
     color: #fff;
     border: 1px solid #3ad8ff77 !important;
     background-color: #ffffff00 !important;
-}
-</style>
+  }
+</style>