Ver código fonte

1. 新增文件

hongrunxia 2 meses atrás
pai
commit
db0a337392

BIN
public/model/glft/ztfj/ztfj_2024-12-25.glb


+ 236 - 246
src/views/vent/monitorManager/comment/gaspatrolTable.vue

@@ -1,305 +1,295 @@
 <template>
-    <div class="gaspatrolTable">
-        <div class="search-area">
-            <a-row>
-                <a-col :span="5">
-                    <div class="area-item">
-                        <div class="item-text">巡检地点:</div>
-                        <a-input style="width: 240px" v-model:value="searchData.address" placeholder="请输入巡检地点"
-                            @change="addressInput" />
-                    </div>
-                </a-col>
-                <a-col :span="5">
-                    <div class="area-item">
-                        <div class="item-text">巡检员:</div>
-                        <a-input style="width: 240px" v-model:value="searchData.userName" placeholder="请输入巡检员"
-                            @change="userInput" />
-                    </div>
-                </a-col>
-                <a-col :span="5">
-                    <div class="area-item">
-                        <div class="item-text">巡检类型:</div>
-                        <a-select ref="select" v-model:value="searchData.insType" style="width: 240px"
-                            placeholder="请输入巡检类型" @change="insTypeChange">
-                            <a-select-option v-for="(item, index) in insTypeList" :key="item.value" :value="item.value">{{
-                                item.label }}</a-select-option>
-                        </a-select>
-                    </div>
-                </a-col>
-                <a-col :span="5">
-                    <div class="area-item">
-                        <div class="item-text">巡检班次:</div>
-                        <a-select ref="select" v-model:value="searchData.class" style="width: 240px"
-                            placeholder="请输入巡检班次" @change="classChange">
-                            <a-select-option v-for="(item, index) in classList" :key="item.value" :value="item.value">{{
-                                item.label }}</a-select-option>
-                        </a-select>
-                    </div>
-                </a-col>
-                <a-col :span="4">
-                    <a-button type="primary" preIcon="ant-design:search-outlined"
-                        style="margin-left: 10px;">查询</a-button>
-                    <a-button preIcon="ant-design:sync-outlined" style="margin: 0px 15px">重置</a-button>
-
-                </a-col>
-            </a-row>
-        </div>
-        <div class="content-area">
-            <a-table :columns="Columns" size="small"  :data-source="gaspatrolTableData" class="tableW"
-                :pagination="false">
-
-            </a-table>
-        </div>
+  <div class="gaspatrolTable">
+    <div class="search-area">
+      <a-row>
+        <a-col :span="5">
+          <div class="area-item">
+            <div class="item-text">巡检地点:</div>
+            <a-input style="width: 240px" v-model:value="searchData.address" placeholder="请输入巡检地点" @change="addressInput" />
+          </div>
+        </a-col>
+        <a-col :span="5">
+          <div class="area-item">
+            <div class="item-text">巡检员:</div>
+            <a-input style="width: 240px" v-model:value="searchData.userName" placeholder="请输入巡检员" @change="userInput" />
+          </div>
+        </a-col>
+        <a-col :span="5">
+          <div class="area-item">
+            <div class="item-text">巡检类型:</div>
+            <a-select ref="select" v-model:value="searchData.insType" style="width: 240px" placeholder="请输入巡检类型" @change="insTypeChange">
+              <a-select-option v-for="(item, index) in insTypeList" :key="item.value" :value="item.value">{{ item.label }}</a-select-option>
+            </a-select>
+          </div>
+        </a-col>
+        <a-col :span="5">
+          <div class="area-item">
+            <div class="item-text">巡检班次:</div>
+            <a-select ref="select" v-model:value="searchData.class" style="width: 240px" placeholder="请输入巡检班次" @change="classChange">
+              <a-select-option v-for="(item, index) in classList" :key="item.value" :value="item.value">{{ item.label }}</a-select-option>
+            </a-select>
+          </div>
+        </a-col>
+        <a-col :span="4">
+          <a-button type="primary" preIcon="ant-design:search-outlined" style="margin-left: 10px">查询</a-button>
+          <a-button preIcon="ant-design:sync-outlined" style="margin: 0px 15px">重置</a-button>
+        </a-col>
+      </a-row>
     </div>
+    <div class="content-area">
+      <a-table :columns="Columns" size="small" :data-source="gaspatrolTableData" class="tableW" :pagination="false" />
+    </div>
+  </div>
 </template>
 
 <script setup lang="ts">
-import { ref, reactive, onMounted, watch } from 'vue'
-import { gaspatrolColumnsOne, gaspatrolColumnsTwo, } from './comment.data'
-let props = defineProps({
+  import { ref, reactive, onMounted, watch } from 'vue';
+  import { gaspatrolColumnsOne, gaspatrolColumnsTwo } from './comment.data';
+  let props = defineProps({
     addressData: {
-        type: String,
-        default: ''
+      type: String,
+      default: '',
     },
     personData: {
-        type: String,
-        default: ''
+      type: String,
+      default: '',
     },
     instypeData: {
-        type: String,
-        default: ''
+      type: String,
+      default: '',
     },
     classData: {
-        type: String,
-        default: ''
+      type: String,
+      default: '',
     },
     tableData: {
-        type: Array,
-        default: () => {
-            return []
-        }
-    }
-})
+      type: Array,
+      default: () => {
+        return [];
+      },
+    },
+  });
 
-let searchData = reactive({
+  let searchData = reactive({
     address: '',
     userName: '',
     insType: '1',
-    class: 'night'
-})
-let insTypeList = reactive<any[]>([
+    class: 'night',
+  });
+  let insTypeList = reactive<any[]>([
     { label: '一次', value: '1' },
-    { label: '两次', value: '2' }
-])
-let classList = reactive<any[]>([
+    { label: '两次', value: '2' },
+  ]);
+  let classList = reactive<any[]>([
     { label: '夜班', value: 'night' },
     { label: '早班', value: 'early' },
     { label: '中班', value: 'noon' },
-])
-let Columns = ref<any[]>(gaspatrolColumnsOne)
-let gaspatrolTableData = ref<any[]>([])
-let $emit = defineEmits(['addressInput', 'userInput', 'insTypeChange', 'classChange'])
-//巡检类型选项切换
-let insTypeChange = (val) => {
-    searchData.insType = val
-    $emit('insTypeChange', val)
+  ]);
+  let Columns = ref<any[]>(gaspatrolColumnsOne);
+  let gaspatrolTableData = ref<any[]>([]);
+  let $emit = defineEmits(['addressInput', 'userInput', 'insTypeChange', 'classChange']);
+  //巡检类型选项切换
+  let insTypeChange = (val) => {
+    searchData.insType = val;
+    $emit('insTypeChange', val);
     if (val == '1') {
-        Columns.value = gaspatrolColumnsOne
+      Columns.value = gaspatrolColumnsOne;
     } else {
-        Columns.value = gaspatrolColumnsTwo
+      Columns.value = gaspatrolColumnsTwo;
     }
-}
-//巡检班次选项切换
-let classChange = (val) => {
-    searchData.class = val
-    $emit('classChange', val)
-}
-//巡检地点输入
-let addressInput = (val) => {
-    searchData.address = val.target.value
-    $emit('addressInput', searchData.address)
-}
-//巡检员输入
-let userInput = (val) => {
-    searchData.userName = val.target.value
-    $emit('userInput', searchData.userName)
-}
-watch(() => props.tableData, (newV, oldV) => {
-    if (newV && newV.length != 0) {
+  };
+  //巡检班次选项切换
+  let classChange = (val) => {
+    searchData.class = val;
+    $emit('classChange', val);
+  };
+  //巡检地点输入
+  let addressInput = (val) => {
+    searchData.address = val.target.value;
+    $emit('addressInput', searchData.address);
+  };
+  //巡检员输入
+  let userInput = (val) => {
+    searchData.userName = val.target.value;
+    $emit('userInput', searchData.userName);
+  };
+  watch(
+    () => props.tableData,
+    (newV, oldV) => {
+      if (newV && newV.length != 0) {
         if (searchData.insType == '1' && searchData.class == 'early') {
-            gaspatrolTableData.value = newV.map((el: any) => {
-                return {
-                    strInstallPos: el.strInstallPos,
-                    ch4One: el.ch4Early1,
-                    co2One: el.co2Early1,
-                    coOne: el.coEarly1,
-                    o2One: el.o2Early1,
-                    tOne: el.tearly1,
-                    timeOne: el.timeEarly1,
-                    checkPerson: el.checkPersonEarly,
-                }
-            })
+          gaspatrolTableData.value = newV.map((el: any) => {
+            return {
+              strInstallPos: el.strInstallPos,
+              ch4One: el.ch4Early1,
+              co2One: el.co2Early1,
+              coOne: el.coEarly1,
+              o2One: el.o2Early1,
+              tOne: el.tearly1,
+              timeOne: el.timeEarly1,
+              checkPerson: el.checkPersonEarly,
+            };
+          });
         } else if (searchData.insType == '2' && searchData.class == 'early') {
-            gaspatrolTableData.value = newV.map((el: any) => {
-                return {
-                    strInstallPos: el.strInstallPos,
-                    ch4One: el.ch4Early1,
-                    co2One: el.co2Early1,
-                    coOne: el.coEarly1,
-                    o2One: el.o2Early1,
-                    tOne: el.tearly1,
-                    timeOne: el.timeEarly1,
-                    ch4Two: el.ch4Early2,
-                    co2Two: el.co2Early2,
-                    coTwo: el.coEarly2,
-                    o2Two: el.o2Early2,
-                    tTwo: el.tearly2,
-                    timeTwo: el.timeEarly2,
-                    checkPerson: el.checkPersonEarly,
-                }
-            })
+          gaspatrolTableData.value = newV.map((el: any) => {
+            return {
+              strInstallPos: el.strInstallPos,
+              ch4One: el.ch4Early1,
+              co2One: el.co2Early1,
+              coOne: el.coEarly1,
+              o2One: el.o2Early1,
+              tOne: el.tearly1,
+              timeOne: el.timeEarly1,
+              ch4Two: el.ch4Early2,
+              co2Two: el.co2Early2,
+              coTwo: el.coEarly2,
+              o2Two: el.o2Early2,
+              tTwo: el.tearly2,
+              timeTwo: el.timeEarly2,
+              checkPerson: el.checkPersonEarly,
+            };
+          });
         } else if (searchData.insType == '1' && searchData.class == 'noon') {
-            gaspatrolTableData.value = newV.map((el: any) => {
-                return {
-                    strInstallPos: el.strInstallPos,
-                    ch4One: el.ch4Noon1,
-                    co2One: el.co2Noon1,
-                    coOne: el.coNoon1,
-                    o2One: el.o2Noon1,
-                    tOne: el.tnoon1,
-                    timeOne: el.timeNoon1,
-                    checkPerson: el.checkPersonNoon,
-                }
-            })
+          gaspatrolTableData.value = newV.map((el: any) => {
+            return {
+              strInstallPos: el.strInstallPos,
+              ch4One: el.ch4Noon1,
+              co2One: el.co2Noon1,
+              coOne: el.coNoon1,
+              o2One: el.o2Noon1,
+              tOne: el.tnoon1,
+              timeOne: el.timeNoon1,
+              checkPerson: el.checkPersonNoon,
+            };
+          });
         } else if (searchData.insType == '2' && searchData.class == 'noon') {
-            gaspatrolTableData.value = newV.map((el: any) => {
-                return {
-                    strInstallPos: el.strInstallPos,
-                    ch4One: el.ch4Noon1,
-                    co2One: el.co2Noon1,
-                    coOne: el.coNoon1,
-                    o2One: el.o2Noon1,
-                    tOne: el.tnoon1,
-                    timeOne: el.timeNoon1,
-                    ch4Two: el.ch4Noon2,
-                    co2Two: el.co2Noon2,
-                    coTwo: el.coNoon2,
-                    o2Two: el.o2Noon2,
-                    tTwo: el.tnoon2,
-                    timeTwo: el.timeNoon2,
-                    checkPerson: el.checkPersonNoon,
-                }
-            })
+          gaspatrolTableData.value = newV.map((el: any) => {
+            return {
+              strInstallPos: el.strInstallPos,
+              ch4One: el.ch4Noon1,
+              co2One: el.co2Noon1,
+              coOne: el.coNoon1,
+              o2One: el.o2Noon1,
+              tOne: el.tnoon1,
+              timeOne: el.timeNoon1,
+              ch4Two: el.ch4Noon2,
+              co2Two: el.co2Noon2,
+              coTwo: el.coNoon2,
+              o2Two: el.o2Noon2,
+              tTwo: el.tnoon2,
+              timeTwo: el.timeNoon2,
+              checkPerson: el.checkPersonNoon,
+            };
+          });
         } else if (searchData.insType == '1' && searchData.class == 'night') {
-            gaspatrolTableData.value = newV.map((el: any) => {
-                return {
-                    strInstallPos: el.strInstallPos,
-                    ch4One: el.ch4Night1,
-                    co2One: el.co2Night1,
-                    coOne: el.coNight1,
-                    o2One: el.o2Night1,
-                    tOne: el.tnight1,
-                    timeOne: el.timeNight1,
-                    checkPerson: el.checkPersonNight,
-                }
-            })
+          gaspatrolTableData.value = newV.map((el: any) => {
+            return {
+              strInstallPos: el.strInstallPos,
+              ch4One: el.ch4Night1,
+              co2One: el.co2Night1,
+              coOne: el.coNight1,
+              o2One: el.o2Night1,
+              tOne: el.tnight1,
+              timeOne: el.timeNight1,
+              checkPerson: el.checkPersonNight,
+            };
+          });
         } else if (searchData.insType == '2' && searchData.class == 'night') {
-            gaspatrolTableData.value = newV.map((el: any) => {
-                return {
-                    strInstallPos: el.strInstallPos,
-                    ch4One: el.ch4Night1,
-                    co2One: el.co2Night1,
-                    coOne: el.coNight1,
-                    o2One: el.o2Night1,
-                    tOne: el.tnight1,
-                    timeOne: el.timeNight1,
-                    ch4Two: el.ch4Night2,
-                    co2Two: el.co2Night2,
-                    coTwo: el.coNight2,
-                    o2Two: el.o2Night2,
-                    tTwo: el.tnight2,
-                    timeTwo: el.timeNight2,
-                    checkPerson: el.checkPersonNoon,
-                }
-            })
+          gaspatrolTableData.value = newV.map((el: any) => {
+            return {
+              strInstallPos: el.strInstallPos,
+              ch4One: el.ch4Night1,
+              co2One: el.co2Night1,
+              coOne: el.coNight1,
+              o2One: el.o2Night1,
+              tOne: el.tnight1,
+              timeOne: el.timeNight1,
+              ch4Two: el.ch4Night2,
+              co2Two: el.co2Night2,
+              coTwo: el.coNight2,
+              o2Two: el.o2Night2,
+              tTwo: el.tnight2,
+              timeTwo: el.timeNight2,
+              checkPerson: el.checkPersonNoon,
+            };
+          });
         } else {
-            gaspatrolTableData.value = newV.map((el: any) => {
-                return {
-                    strInstallPos: el.strInstallPos,
-                    ch4One: el.ch4Night1,
-                    co2One: el.co2Night1,
-                    coOne: el.coNight1,
-                    o2One: el.o2Night1,
-                    tOne: el.tnight1,
-                    timeOne: el.timeNight1,
-                    checkPerson: el.checkPersonNight,
-                }
-            })
+          gaspatrolTableData.value = newV.map((el: any) => {
+            return {
+              strInstallPos: el.strInstallPos,
+              ch4One: el.ch4Night1,
+              co2One: el.co2Night1,
+              coOne: el.coNight1,
+              o2One: el.o2Night1,
+              tOne: el.tnight1,
+              timeOne: el.timeNight1,
+              checkPerson: el.checkPersonNight,
+            };
+          });
         }
-        console.log( gaspatrolTableData.value,' gaspatrolTableData.value')
-    } else {
-        gaspatrolTableData.value = []
-    }
-
-},{immediate:true})
-onMounted(() => {
-    searchData.address = props.addressData
-    searchData.userName = props.personData
-    searchData.insType = props.instypeData
-    searchData.class = props.classData
-})
-
+        console.log(gaspatrolTableData.value, ' gaspatrolTableData.value');
+      } else {
+        gaspatrolTableData.value = [];
+      }
+    },
+    { immediate: true }
+  );
+  onMounted(() => {
+    searchData.address = props.addressData;
+    searchData.userName = props.personData;
+    searchData.insType = props.instypeData;
+    searchData.class = props.classData;
+  });
 </script>
 
 <style lang="less" scoped>
-@ventSpace: zxm;
+  @ventSpace: zxm;
 
-.gaspatrolTable {
+  .gaspatrolTable {
     .search-area {
-        margin: 15px;
+      margin: 15px;
 
-        .area-item {
-            display: flex;
-            align-items: center;
+      .area-item {
+        display: flex;
+        align-items: center;
 
-            .item-text {
-                color: #fff;
-            }
+        .item-text {
+          color: #fff;
         }
+      }
     }
 
     .zxm-picker,
     .zxm-input {
-        border: 1px solid #3ad8ff77;
-        background-color: #ffffff00;
-        color: #fff;
+      border: 1px solid #3ad8ff77;
+      background-color: #ffffff00;
+      color: #fff;
     }
-}
-
+  }
 
-:deep(.@{ventSpace}-table-body) {
+  :deep(.@{ventSpace}-table-body) {
     height: auto !important;
 
-    tr>td {
-        background: #ffffff00 !important;
+    tr > td {
+      background: #ffffff00 !important;
     }
 
     tr.@{ventSpace}-table-row-selected {
-        td {
-            background: #007cc415 !important;
-        }
+      td {
+        background: #007cc415 !important;
+      }
     }
-}
+  }
 
-:deep(.jeecg-basic-table .@{ventSpace}-table-wrapper .@{ventSpace}-table-title) {
+  :deep(.jeecg-basic-table .@{ventSpace}-table-wrapper .@{ventSpace}-table-title) {
     min-height: 0;
-}
+  }
 
-:deep(.@{ventSpace}-pagination) {
+  :deep(.@{ventSpace}-pagination) {
     margin-right: 20px !important;
-}
+  }
 
-:deep(.zxm-table-thead > tr > th:last-child) {
+  :deep(.zxm-table-thead > tr > th:last-child) {
     border-right: 1px solid #91e9fe55 !important;
-}
-</style>
+  }
+</style>

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

@@ -514,9 +514,9 @@ const onSelect: TreeProps['onSelect'] = (keys, e) => {
       selectedKeys.value = keys;
       treeNodeTitle.value = e.node.title;
 
-      // if (e.node.children?.length < 1 && timer) {
-      //   getMonitor(true);
-      // }
+      if (e.node.children?.length < 1 && timer) {
+        getMonitor(true);
+      }
     }, 1000);
   }
   // activeKey.value = '1';

+ 211 - 0
src/views/vent/monitorManager/nitrogen/nitrogen.dataTest.ts

@@ -0,0 +1,211 @@
+import { values } from 'xe-utils';
+
+export const monitorDataGroupArr = [[1, 2, 3]];
+export const prefix = ['PRE', 'PRE', 'PRE'];
+export type State = {
+  isRun: boolean;
+  fault: boolean;
+};
+export const preMonitorList = [
+  {
+    title: '加载压力',
+    code: 'PRE_CPR_LoadPre',
+    unit: 'MPa',
+    value: '76.76',
+  },
+  {
+    title: '卸载压力',
+    code: 'PRE_CPR_UnLoadPre',
+    unit: 'MPa',
+    child: [],
+    value: '46.87',
+  },
+  {
+    title: `主机温度`,
+    code: `PRE_HostTemp`,
+    unit: '℃',
+    child: [],
+    value: '58.87',
+  },
+  {
+    title: `冷却温度`,
+    code: `PRE_CPR_CoolantTemp`,
+    unit: '℃',
+    child: [],
+    value: '18.87',
+  },
+  {
+    title: `排气温度`,
+    code: `PRE_CPR_ExhaustTemp`,
+    unit: '℃',
+    child: [],
+    value: '98.94',
+  },
+  {
+    title: '加载时间',
+    code: 'PRE_CPR_LoadTime',
+    unit: 'h',
+    child: [],
+  },
+  {
+    title: '排气压力',
+    code: 'PRE_CPR_ExhaustPre',
+    unit: 'MPa',
+    child: [],
+    value: '19.54',
+  },
+
+  {
+    code: 'signal',
+    child: [
+      {
+        title: `加载卸载`,
+        code: `PRE_CPR_LoadorUnload`,
+        isWaring: false,
+      },
+    ],
+  },
+];
+export const cqgMonitorList = [];
+
+export const preFanMonitorData = [
+  {
+    title: `上位启动`,
+    code: `PRE_HMIStart`,
+    unit: 'signal',
+  },
+  {
+    title: `连接状态`,
+    code: `PRE2_HMIStop`,
+    unit: 'signal',
+  },
+  {
+    title: `上位停止`,
+    code: `PRE_AlamSignal`,
+    unit: 'warning',
+  },
+  {
+    title: `电流过载`,
+    code: `PRE_AlamSignal`,
+    unit: 'warning',
+  },
+  {
+    title: `故障信号`,
+    code: `PRE_FaultSignal`,
+    unit: 'warning',
+  },
+  {
+    title: '加载压力过大',
+    code: 'PRE_MOT_TotalRunTime',
+    unit: 'warning',
+  },
+  {
+    title: 'A相绕组温度',
+    code: 'PRE_MOT_PhaseATemp',
+    unit: '℃',
+    value: '45',
+  },
+  {
+    title: 'B相绕组温度',
+    code: 'PRE_MOT_PhaseBTemp',
+    unit: '℃',
+    value: '52',
+  },
+  {
+    title: 'C相绕组温度',
+    code: 'PRE_MOT_PhaseCTemp',
+    unit: '℃',
+    value: '50',
+  },
+  {
+    title: `A相绕组超温`,
+    code: `PRE_MOT_PhaseATempAlarm`,
+    unit: 'warning',
+  },
+  {
+    title: `B相绕组超温`,
+    code: `PRE_MOT_PhaseBTempAlarm`,
+    unit: 'warning',
+  },
+  {
+    title: `C相绕组超温`,
+    code: `PRE1_MOT_PhaseCTempAlarm`,
+    unit: 'warning',
+  },
+  {
+    title: '电机启动失败',
+    code: 'PRE_MOT_StartFail',
+    unit: 'warning',
+  },
+  {
+    title: '电机停止失败',
+    code: 'PRE_MOT_StopFail',
+    unit: 'warning',
+  },
+  {
+    title: '电流过载',
+    code: 'PRE_MOT_RunReturn',
+    unit: 'warning',
+  },
+  {
+    title: '振动幅度过大',
+    code: 'PRE_MOT_RunReturn',
+    unit: 'warning',
+  },
+];
+export const totalData = [
+  {
+    title: '总出风管流量',
+    code: 'TotalOutPipeFlow',
+    unit: 'm³/h',
+    value: '8435.67',
+  },
+  {
+    title: '总出风管压力',
+    code: 'TotalOutPipePre',
+    unit: 'bar',
+    value: '1435.12',
+  },
+];
+export const totalData1 = [];
+export const btnSet = [
+  {
+    title: '上位启动',
+    code: 'PRE_HMIStart',
+    type: 'btn',
+  },
+  {
+    title: '上位复位',
+    code: 'PRE_HMIReset',
+    type: 'btn',
+  },
+  {
+    title: '上位停止',
+    code: 'PRE_HMIStop',
+    type: 'btn',
+  },
+];
+
+export function getSysState(monitorData) {
+  const stateArr = <State[]>[];
+  monitorDataGroupArr.forEach((group) => {
+    const stateObj = { isRun: false, fault: false };
+    group.forEach((item) => {
+      if (monitorData['PRE_CPR_LoadorUnload'.replace('PRE', 'PRE' + item)]) {
+        stateObj.isRun = monitorData['PRE_CPR_LoadorUnload'.replace('PRE', 'PRE' + item)] == '1';
+      }
+
+      if (
+        monitorData['PRE_FaultSignal'.replace('PRE', 'PRE' + item)] ||
+        monitorData['PRE_FaultSignal1'.replace('PRE', 'PRE' + item)] ||
+        monitorData['PRE_MOT_PhaseAOverTemp'.replace('PRE', 'PRE' + item)] ||
+        monitorData['PRE_MOT_PhaseBOverTemp'.replace('PRE', 'PRE' + item)] ||
+        monitorData['PRE_MOT_PhaseCOverTemp'.replace('PRE', 'PRE' + item)]
+      ) {
+        stateObj.fault = true;
+      }
+    });
+    stateArr.push(stateObj);
+  });
+  return stateArr;
+}