Browse Source

1. 主风机工况曲线图设置
2. 解决风门类型字典翻译失败
3. 风窗模拟瓦斯风量设置风量最大限值

hongrunxia 2 months ago
parent
commit
932fc54cf0

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

@@ -10,10 +10,12 @@ const arrToColumns = (tableHeaderColumns = []) => {
   tableHeaderColumns.forEach((item: any) => {
     const columnsItem = {
       title: item.des, //_dictText
-      dataIndex: item.dict ? `${item.monitorcode}_dictText` : item.monitorcode,
+      // dataIndex: item.dict ? `${item.monitorcode}_dictText` : item.monitorcode,
+      dataIndex: item.monitorcode,
       width: item.width || 100,
       defaultHidden: !item.showflag,
       align: 'center',
+      dict: item.dict,
       // sorter: item.sort ? true : false,
       customRender: ({ text }) => {
         return text == null || text == '' || text == undefined ? '-' : text;

+ 18 - 0
src/utils/common/renderUtils.ts

@@ -54,6 +54,24 @@ const render = {
     }
     return isEmpty(text) || !renderTag ? h('span', text) : h(Tag, text);
   },
+
+  /**
+   * 根据字典编码 渲染
+   * @param v 值
+   * @param code 字典编码
+   * @param renderTag 是否使用tag渲染
+   */
+  renderDictText: (v, code) => {
+    let text = '';
+    const array = getDictItemsByCode(code) || [];
+    const obj = array.filter((item) => {
+      return item.value == v;
+    });
+    if (obj.length > 0) {
+      text = obj[0].text;
+    }
+    return text;
+  },
   /**
    * 渲染图片
    * @param text

+ 21 - 0
src/views/vent/monitorManager/compressor/components/nitrogenHome_dltj.vue

@@ -173,6 +173,26 @@
       </div>
       <div ref="playerRef" class="player-box" style=""> </div>
     </div>
+    <div class="modal-monitor">
+      <fourBorderBg id="downWindMonitor">
+        <div class="title">下风测监测 </div>
+        <div class="monitor-item" v-for="(data, index) in downWindData" :key="index">
+          <span class="monitor-title">{{ data.title }} :</span>
+          <span class="monitor-val" v-if="!refresh"
+            ><span class="val">
+              {{
+                monitorData.length > 0 && monitorData[0][data.code]
+                  ? data.raw
+                    ? monitorData[0][data.code]
+                    : parseFloat(monitorData[0][data.code]).toFixed(2)
+                  : '-'
+              }}
+            </span>
+            <span class="unit">{{ data.unit }}</span></span
+          >
+        </div>
+      </fourBorderBg>
+    </div>
   </div>
 </template>
 <script lang="ts" setup name="nitrogenHome">
@@ -184,6 +204,7 @@
   import BarAndLine from '/@/components/chart/BarAndLine.vue';
   import { deviceControlApi } from '/@/api/vent/index';
   // import { preMonitorListData, preFanMonitor, nitrogenMonitor } from '../nitrogen.data.dltj';
+  import { downWindData } from '../nitrogen.data';
   import { formatNum } from '/@/utils/ventutil';
   import { useCamera } from '/@/hooks/system/useCamera';
   import { message } from 'ant-design-vue';

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

@@ -245,8 +245,8 @@ export function getMonitorComponent() {
       return nitrogenHome;
     default:
       // nitrogenHome = defineAsyncComponent(() => import('./components/nitrogenHome_blt.vue'));
-      nitrogenHome = defineAsyncComponent(() => import('./components/nitrogenHome_bet.vue'));
-      // nitrogenHome = defineAsyncComponent(() => import('./components/nitrogenHome_blt.vue'));
+      // nitrogenHome = defineAsyncComponent(() => import('./components/nitrogenHome_bet.vue'));
+      nitrogenHome = defineAsyncComponent(() => import('./components/nitrogenHome_dltj.vue'));
       return nitrogenHome;
   }
 }

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

@@ -67,7 +67,7 @@ export function getMonitorComponent() {
       break;
     default:
       FiberModal = defineAsyncComponent(() => import('./modal/fiber.modal.sw.vue'));
-      // FiberModal = defineAsyncComponent(() => import('./modal/fiber.modal.vue'));
+    // FiberModal = defineAsyncComponent(() => import('./modal/fiber.modal.vue'));
     // FiberModal = defineAsyncComponent(() => import('./modal/fiber.modal-Gx.vue'));
     // FiberModal = defineAsyncComponent(() => import('./modal/fiber.modal.cct.vue'));
   }
@@ -521,11 +521,6 @@ export const haveHandlerArr = [
   'spray',
   'dustdev',
   'gate_linkdlfm',
-  'bundleSpyDayReport',
-  'dustDayReport',
-  'bundleDayReport',
-  // 'gasDayReport',
-
   // 'firemon',
 ]; // table无操作
 export const noWarningArr = [
@@ -543,5 +538,5 @@ export const haveSysDetailArr = ['forcFan', 'pulping']; //有场景详情的
 // export const haveSysDetailArr = ['']; //有场景详情的
 export const noHistoryArr = () =>
   History_Type['type'] == 'remote'
-    ? ['surface_history', 'majorpath', 'gasDayReport', 'dustDayReport', 'bundleDayReport', 'bundleSpyDayReport', 'gate_linkdlfm']
-    : ['majorpath', 'gasDayReport', 'dustDayReport', 'bundleDayReport', 'bundleSpyDayReport', 'gate_linkdlfm'];
+    ? ['surface_history', 'majorpath', 'gasDayReport', 'dustDayReport', 'bundleDayReport', 'bundleSpyDayReport', 'gasDay', 'gate_linkdlfm']
+    : ['majorpath', 'gasDayReport', 'dustDayReport', 'bundleDayReport', 'bundleSpyDayReport', 'gate_linkdlfm', 'gasDay'];

+ 3 - 6
src/views/vent/monitorManager/gateMonitor/index.vue

@@ -151,14 +151,10 @@
                   >点位异常</a-tag
                 >
                 <template v-if="column.dataIndex === 'ndoortype'">
-                  <span v-if="record.ndoortype == '0'">气动风门</span>
-                  <span v-else color="default">液压风门</span>
+                  <span>{{ render.renderDictText(record.ndoortype, 'ndoortype') }}</span>
                 </template>
                 <template v-if="column.dataIndex === 'doorUse'">
-                  <span v-if="record.doorUse == 1" color="default">行车风门</span>
-                  <span v-else-if="record.doorUse == 2">行人风门</span>
-                  <span v-else-if="record.doorUse == 3">短路风门</span>
-                  <span v-else-if="record.doorUse == 4">行车/短路风门</span>
+                  <span>{{ render.renderDictText(record.doorUse, 'doorUse') }}</span>
                 </template>
                 <template v-else-if="column.dataIndex === 'warnLevel'">
                   <a-tag v-if="record.warnLevel == '101'" color="green">低风险</a-tag>
@@ -335,6 +331,7 @@
   import { useCamera } from '/@/hooks/system/useCamera';
   import { usePermission } from '/@/hooks/web/usePermission';
   import { getDictItems } from '/@/api/common/api';
+  import { render } from '/@/utils/common/renderUtils';
 
   const { hasPermission } = usePermission();
 

+ 3 - 1
src/views/vent/monitorManager/mainFanMonitor/components/conditionAssistance.vue

@@ -27,7 +27,8 @@
           <template v-else>
             <div v-for="(item, index) in columns" class="info-item" :key="index">
               <div class="title">{{ item['title'] }}:</div>
-              <div class="value">{{ selectData && selectData[item['dataIndex']] ? selectData[item['dataIndex']] : '-' }}</div>
+              <div v-if="item['dict']" class="value">{{ render.renderDictText(selectData[item['dataIndex']], 'adjustmentMethod') }}</div>
+              <div v-else class="value">{{ selectData && selectData[item['dataIndex']] ? selectData[item['dataIndex']] : '-' }}</div>
             </div>
           </template>
         </div>
@@ -92,6 +93,7 @@
   import { formatNum } from '/@/utils/ventutil';
   import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
   import { useGlobSetting } from '/@/hooks/setting';
+  import { render } from '/@/utils/common/renderUtils';
   const { sysOrgCode } = useGlobSetting();
   const props = defineProps({
     deviceType: {

+ 3 - 2
src/views/vent/monitorManager/mainFanMonitor/index.vue

@@ -713,7 +713,7 @@
   <!-- 摄像头显示隐藏图标 -->
   <VideoCameraOutlined class="video-icon" :class="{ 'no-play': !showPlay }" @click="changePlay" />
   <!-- 工况辅助决策 -->
-  <ConditionAssistance @register="registerModal" :deviceType="deviceType" :selectData="selectData" />
+  <ConditionAssistance @register="registerModal" :deviceType="deviceType" :selectData="currentData" />
   <DeviceBaseInfo @register="registerModalDeviceEdit" :device-type="selectData['deviceType']" />
 </template>
 
@@ -813,6 +813,7 @@
     otherInfo: '',
     autoRoManual: null,
   });
+  const currentData = ref({});
 
   const deviceType = ref(selectData.deviceType);
   const rightColumns = ref<BasicColumn[]>([]);
@@ -928,7 +929,7 @@
     });
     const data: any = toRaw(dataSource.value[selectRowIndex.value]); //maxarea
     Object.assign(selectData, data);
-
+    currentData.value = data;
     // 存放echarts数据
     if (data && data['readTime']) {
       const dataList = cloneDeep(echartsDataList.value);

+ 2 - 4
src/views/vent/monitorManager/windowMonitor/components/gasSupplyAir.vue

@@ -239,7 +239,7 @@
           ];
         } else {
           const random = Math.random() - 0.5;
-          fWindowM3Temp.value = fWindowM3.value + random * 50;
+          fWindowM3Temp.value = fWindowM3.value + random * 10;
           gasTemp.value = gas.value + random * 0.01;
           echartsData.value = [
             ...echartsData.value,
@@ -270,10 +270,8 @@
   );
 
   function mock(maxArea?: number) {
-    debugger;
     if (maxArea) {
       // 每调用一次数据就增减一些
-      // frontWindowAngle 增加一些
       if (frontWindowAngle.value !== undefined && frontWindowAngle.value <= 90) {
         frontWindowAngle.value = Number(Math.min(frontWindowAngle.value + 3, 90).toFixed(0));
       }
@@ -281,7 +279,7 @@
         rearWindowAngle.value = Number(Math.min(rearWindowAngle.value + 3, 90).toFixed(0));
       }
       if (fWindowM3.value !== undefined) {
-        fWindowM3.value += 40 * index;
+        fWindowM3.value = Math.min((fWindowM3.value += 8 * index), 800);
       }
       if (gas.value !== undefined) {
         gas.value -= Number((0.001 * index).toFixed(3));