hongrunxia пре 1 година
родитељ
комит
882c493423

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

@@ -166,7 +166,11 @@
         pageSizeOptions: ['5', '10', '20'],
       } : false,
       beforeFetch: (params) => {
-        return Object.assign(params, { column: 'createTime' });
+        if(props.deviceType?.startsWith('safetymonitor')){
+          return Object.assign(params, { filterParams: {'dataTypeName': params['dataTypeName'], strinstallpos: params['strinstallpos'] } });
+        }else{
+          return Object.assign(params, { column: 'createTime' });
+        }
       },
     },
   });

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

@@ -280,6 +280,7 @@ const onSelect: TreeProps['onSelect'] = (keys, e) => {
   } else {
     systemType.value = e.node.type
     deviceType.value = e.node.type
+    actions.setGlobalState({ locationObj: { pageType: deviceType.value }, pageObj: null });
   }
   selectedKeys.value = keys
   treeNodeTitle.value = e.node.title
@@ -304,7 +305,7 @@ async function getDeviceType() {
     let key = '0'
     const getData = (resultList, dataSourceList, keyVal) => {
       resultList.forEach((item, index) => {
-        if (item.children && item.children.length > 0) {
+        if (item.deviceType != 'sys'  && item.children && item.children.length > 0) {
           const children = getData(item.children, [], `${keyVal}-${index}`)
           dataSourceList.push({
             children: children,
@@ -435,6 +436,9 @@ function goDetail(record?) {
     } else if (deviceType.value.indexOf("chamber") != -1) {
       const newPage = router.resolve({ path: '/chamber-home', query: { id: activeID.value } })
       window.open(newPage.href, '_blank')
+    } else if (deviceType.value.indexOf("safetymonitor") != -1) {
+      const newPage = router.resolve({ path: '/monitorChannel/device-monitor/safetymonitor', query: { id: activeID.value } })
+      window.open(newPage.href, '_blank')
     } else {
       message.info('待开发。。。')
     }

+ 12 - 10
src/views/vent/monitorManager/gasPumpMonitor/components/gasPumpHome.vue

@@ -16,14 +16,16 @@
                 <div class="parameter-title group-parameter-title"><SvgIcon class="icon" size="14" name="pulp-title"/><span>{{ key }}#抽采泵</span></div>
                 <div class="input-box">
                   <div v-for="(item, index) in pumpMonitorData" class="input-item" :key="index">
-                    <div class="title">{{ item.title }}:</div>
-                    <template v-if="item.type !== 'sign'">
-                      <div class="value">{{ selectData && selectData[item.code.replace('CentrifugalPump', `CentrifugalPump${key}`)] ? formatNum(selectData[item.code.replace('CentrifugalPump', `CentrifugalPump${key}`)]) : '-' }}</div>
-                    </template>
-                    <template v-else>
-                      <div class="value">
-                        <span :class="{ 'signal-round': true, 'signal-round-run': selectData[item.code.replace('CentrifugalPump', `CentrifugalPump${key}`)], 'signal-round-gry': !selectData[item.code.replace('CentrifugalPump', `CentrifugalPump${key}`)] }"></span>
-                      </div>
+                    <template v-if="selectData[item.code.replace('CentrifugalPump', `CentrifugalPump${key}`)] != undefined">
+                      <div class="title">{{ item.title }}:</div>
+                      <template v-if="item.type !== 'sign'">
+                        <div class="value">{{ selectData && selectData[item.code.replace('CentrifugalPump', `CentrifugalPump${key}`)] ? formatNum(selectData[item.code.replace('CentrifugalPump', `CentrifugalPump${key}`)]) : '-' }}</div>
+                      </template>
+                      <template v-else>
+                        <div class="value">
+                          <span :class="{ 'signal-round': true, 'signal-round-run': selectData[item.code.replace('CentrifugalPump', `CentrifugalPump${key}`)] == '1', 'signal-round-gry': !selectData[item.code.replace('CentrifugalPump', `CentrifugalPump${key}`)] }"></span>
+                        </div>
+                      </template>
                     </template>
                   </div>
                 </div>
@@ -126,8 +128,8 @@
                 <div class="device-row" v-for="(valveType, index) in valveCtrlType" :key="index">
                   <div class="state"  >#{{ key }}{{ valveType.title }}</div>
                   <div class="state" v-for="(state, i) in valveState" :key="i" >
-                    <span v-if="state.code == '_CtrlMode'">{{ selectData[`CentrifugalPump${key}_${valveType.code}${key}${state.code}`] ? selectData[`CentrifugalPump${key}_${valveType.code}${key}${state.code}`] : '-' }}</span>
-                    <span v-else :class="{ 'signal-round': true, 'signal-round-run': selectData[`CentrifugalPump${key}_${valveType.code}${key}${state.code}`] == '1', 'signal-round-gry': !selectData[`CentrifugalPump${key}_${valveType.code}${key}${state.code}`] }"></span>
+                    <span v-if="state.code == '_CtrlMode'">{{ selectData[`CentrifugalPump${key}_${valveType.code}${key}${state.code}`] == '1' ? '控制' : '-' }}</span>
+                    <span v-else :class="{ 'signal-round': true, 'signal-round-run': selectData[`CentrifugalPump${key}_${valveType.code}${key}${state.code}`] == '1', 'signal-round-gry': selectData[`CentrifugalPump${key}_${valveType.code}${key}${state.code}`] == '0' }"></span>
                   </div>
                 </div>
               </div>

+ 10 - 5
src/views/vent/monitorManager/safetyMonitor/index.vue

@@ -8,7 +8,7 @@
         <template v-else-if="activeKey == '1' && deviceType">
           <MonitorTable ref="monitorTable" :columnsType="`${deviceType}_monitor`" :dataSource="dataSource"
             design-scope="device_monitor" :isShowPagination="false" :isShowActionColumn="true" title="设备监测"
-            :form-config="deviceType == 'safetymonitor' ? formConfig : undefined" :scroll="scroll">
+            :form-config="deviceType == 'safetymonitor' ? formConfig : undefined" >
             <template #filterCell="{ column, record }">
               <template v-if="deviceType.startsWith('gate')">
                 <template v-if="record.frontGateOpenCtrl == 1 || record.frontGateOpenCtrl === true">
@@ -93,7 +93,7 @@
         <div class="tab-item">
           <HistoryTable ref="historyTable" v-if="activeKey == '2'" :columns-type="`${deviceType}`"
             :device-type="deviceType" :device-list-api="getDeviceList.bind(null, { devicekind: deviceType })"
-            designScope="device-history" :scroll="scroll" @change="changeHis" />
+            designScope="device-history" @change="changeHis" />
         </div>
         <!-- 图表 -->
         <!-- <div v-if="alive" style="width:100%;height:280px;margin: 20px 0px;">
@@ -118,14 +118,14 @@
         <div class="tab-item">
           <AlarmHistoryTable ref="alarmHistoryTable" v-if="activeKey == '3'" columns-type="alarm"
             :device-type="deviceType" :device-list-api="getDeviceList.bind(null, { devicekind: deviceType })"
-            :scroll="scroll" designScope="alarm-history" />
+            designScope="alarm-history" />
         </div>
       </a-tab-pane>
       <a-tab-pane key="4" tab="操作历史" v-if="deviceType !== 'safetymonitor'">
         <div class="tab-item">
           <HandlerHistoryTable ref="handlerHistoryTable" v-if="activeKey == '4'" columns-type="operatorhistory"
             :device-type="deviceType" :device-list-api="getDeviceList.bind(null, { devicekind: deviceType })"
-            :scroll="scroll" designScope="operator-history" />
+            designScope="operator-history" />
         </div>
       </a-tab-pane>
     </a-tabs>
@@ -228,7 +228,7 @@ function getMonitor(flag?) {
 };
 
 async function getDataSource() {
-  const res = await list({ devicetype: deviceType.value, pagetype: 'normal' })
+  const res = await list({ devicetype: deviceType.value, filterParams: { dataTypeName: '', strinstallpos: '' } })
   if (res.msgTxt.length > 0) {
     dataSource.value = res.msgTxt[0].datalist || [];
     dataSource.value.filter((data: any) => {
@@ -270,6 +270,7 @@ onUnmounted(() => {
 
   .tabs-box {
     width: calc(100% - 12px) !important;
+    height: 100% !important;
     bottom: 3px !important;
   }
 
@@ -438,6 +439,10 @@ onUnmounted(() => {
     }
   }
 
+  .@{ventSpace}-tabs-content{
+    height: 100% !important;
+  }
+
   .@{ventSpace}-tabs-tab.@{ventSpace}-tabs-tab-active .@{ventSpace}-tabs-tab-btn {
     color: aqua;
   }

+ 13 - 8
src/views/vent/monitorManager/safetyMonitor/safety.data.ts

@@ -14,24 +14,29 @@ export const formConfig = {
   showResetButton: false,
   baseColProps: {
     // offset: 0.5,
-    xs: 24,
-    sm: 24,
-    md: 24,
-    lg: 9,
-    xl: 7,
-    xxl: 4,
+    // xs: 24,
+    // sm: 24,
+    // md: 24,
+    // lg: 9,
+    // xl: 7,
+    // xxl: 4,
   },
   schemas: [
     {
       label: '设备类型',
-      field: 'DataType',
+      field: 'dataTypeName',
       component: 'ApiSelect',
       componentProps: {
-        api: safetyDeviceList.bind(null, { devicetype: 'safetymonitor', code: 'DataType' }),
+        api: safetyDeviceList.bind(null, { devicetype: 'safetymonitor', code: 'dataTypeName' }),
         labelField: 'name',
         valueField: 'code',
       },
     },
+    {
+      label: '设备安装地点',
+      field: 'strinstallpos',
+      component: 'Input',
+    },
   ],
 };