Jelajahi Sumber

大柳塔-预警管控修改提交

lxh 3 bulan lalu
induk
melakukan
1a5f40713e

+ 48 - 15
src/views/vent/monitorManager/alarmMonitor/common.data.ts

@@ -1,5 +1,6 @@
 import { reactive, markRaw, defineAsyncComponent } from 'vue';
 import { getAssetURL } from '/@/utils/ui';
+import { useGlobSetting } from '/@/hooks/setting';
 
 //中间区域数据-通风
 export const centerAreaListT1 = [
@@ -26,7 +27,19 @@ export const centerAreaListB1 = [
 //内外因火灾菜单列表
 export const typeMenuList = [{ name: '内因火灾' }, { name: '外因火灾' }, { name: '火灾指标' }];
 //瓦斯监测菜单列表
-export const typeMenuListGas = [{ name: '预警监测' }, { name: '预警指标' },{ name: '瓦斯参数' },];
+export function getMonitorComponent() {
+  const { sysOrgCode } = useGlobSetting();
+  let typeMenuListGas;
+  switch (sysOrgCode) {
+    case 'sdmtjtdltmk': //大柳塔
+      typeMenuListGas = [{ name: '预警监测' }, { name: '预警指标' },];
+      return typeMenuListGas;
+    default:
+      typeMenuListGas = [{ name: '预警监测' }, { name: '预警指标' }, { name: '瓦斯参数' },];
+      return typeMenuListGas;
+  }
+}
+
 //当前加载组件
 export const componentName = {
   fireWork: markRaw(defineAsyncComponent(() => import('./common/fireWork.vue'))),
@@ -101,17 +114,17 @@ export const ventilateTopList = [
     list: [],
   },
   { id: 3, imgSrc: false, label: '', value: null, text: '--', list: [] },
-  {
-    id: 4,
-    imgSrc: false,
-    label: '其他信息',
-    value: null,
-    text: '',
-    list: [
-      { id: 0, label: 'O₂', value: '--' },
-      { id: 1, label: 'CO', value: '--' },
-    ],
-  },
+  // {
+  //   id: 4,
+  //   imgSrc: false,
+  //   label: '其他信息',
+  //   value: null,
+  //   text: '',
+  //   list: [
+  //     { id: 0, label: 'O₂', value: '--' },
+  //     { id: 1, label: 'CO', value: '--' },
+  //   ],
+  // },
 ];
 //束管监测选项列表
 export const contentList = [
@@ -231,14 +244,34 @@ export const tabLists = [
 ];
 //外因火灾-传感器table列
 export const columns = [
+  {
+    title: '序号',
+    dataIndex: '',
+    key: 'rowIndex',
+    width: 60,
+    align: 'center',
+    customRender: ({ index }) => {
+      return `${index + 1}`;
+    },
+  },
   { rowIndex: 1, dataIndex: 'strinstallpos', title: '名称', type: '1', align: 'center' },
-  { rowIndex: 2, dataIndex: 'warnLevel_str', title: '状态', type: '1', align: 'center' },
+  { rowIndex: 2, dataIndex: 'warnLevel_str',width:80, title: '状态', type: '1', align: 'center' },
   { rowIndex: 3, dataIndex: 'readTime', title: '时间', type: '1', align: 'center' },
 ];
 //外因火灾-烟雾传感器table列
 export const columnsSmoke = [
+  {
+    title: '序号',
+    dataIndex: '',
+    key: 'rowIndex',
+    width: 60,
+    align: 'center',
+    customRender: ({ index }) => {
+      return `${index + 1}`;
+    },
+  },
   { rowIndex: 1, dataIndex: 'strinstallpos', title: '名称', type: '1', align: 'center' },
-  { rowIndex: 2, dataIndex: 'val', title: '值', type: '1', align: 'center' },
-  { rowIndex: 3, dataIndex: 'warnLevel_str', title: '状态', type: '1', align: 'center' },
+  { rowIndex: 2, dataIndex: 'val', width:80, title: '值', type: '1', align: 'center' },
+  { rowIndex: 3, dataIndex: 'warnLevel_str', width:80,title: '状态', type: '1', align: 'center' },
   { rowIndex: 4, dataIndex: 'readTime', title: '时间', type: '1', align: 'center' },
 ];

+ 9 - 9
src/views/vent/monitorManager/alarmMonitor/common/mainWell.vue

@@ -48,7 +48,7 @@
             :data-source="monitorlistYw" :pagination="false">
             <template #bodyCell="{ column, text }">
               <template v-if="column.dataIndex === 'warnLevel_str'">
-                <div :style="{color:text=='报警' ? '#ff0000' : '#91e609'}">{{ text }}</div>
+                <div :style="{ color: text == '报警' ? '#ff0000' : '#91e609' }">{{ text }}</div>
               </template>
             </template>
             <span slot="action" slot-scope="text, record"></span>
@@ -57,7 +57,7 @@
             :pagination="false" :scroll="{ y: 273 }">
             <template #bodyCell="{ column, text }">
               <template v-if="column.dataIndex === 'warnLevel_str'">
-                <div :style="{color:text=='报警' ? '#ff0000' : '#91e609'}">{{ text }}</div>
+                <div :style="{ color: text == '报警' ? '#ff0000' : '#91e609' }">{{ text }}</div>
               </template>
             </template>
             <span slot="action" slot-scope="text, record"> </span>
@@ -66,7 +66,7 @@
             :data-source="monitorlistPl" :pagination="false">
             <template #bodyCell="{ column, text }">
               <template v-if="column.dataIndex === 'warnLevel_str'">
-                <div :style="{color:text=='报警' ? '#ff0000' : '#91e609'}">{{ text }}</div>
+                <div :style="{ color: text == '报警' ? '#ff0000' : '#91e609' }">{{ text }}</div>
               </template>
             </template>
             <span slot="action" slot-scope="text, record"> </span>
@@ -86,7 +86,7 @@
             :columns="columnsSmoke" :data-source="monitorlistYw" :pagination="false">
             <template #bodyCell="{ column, text }">
               <template v-if="column.dataIndex === 'warnLevel_str'">
-                <div :style="{color:text=='报警' ? '#ff0000' : '#91e609'}">{{ text }}</div>
+                <div :style="{ color: text == '报警' ? '#ff0000' : '#91e609' }">{{ text }}</div>
               </template>
             </template>
             <span slot="action" slot-scope="text, record"></span>
@@ -96,7 +96,7 @@
             :columns="columnsSmoke" :data-source="monitorlistWd" :pagination="false">
             <template #bodyCell="{ column, text }">
               <template v-if="column.dataIndex === 'warnLevel_str'">
-                <div :style="{color:text=='报警' ? '#ff0000' : '#91e609'}">{{ text }}</div>
+                <div :style="{ color: text == '报警' ? '#ff0000' : '#91e609' }">{{ text }}</div>
               </template>
             </template>
             <span slot="action" slot-scope="text, record"> </span>
@@ -105,7 +105,7 @@
             :columns="columns" :data-source="monitorlistPl" :pagination="false">
             <template #bodyCell="{ column, text }">
               <template v-if="column.dataIndex === 'warnLevel_str'">
-                <div :style="{color:text=='报警' ? '#ff0000' : '#91e609'}">{{ text }}</div>
+                <div :style="{ color: text == '报警' ? '#ff0000' : '#91e609' }">{{ text }}</div>
               </template>
             </template>
             <span slot="action" slot-scope="text, record"> </span>
@@ -114,7 +114,7 @@
             :pagination="false" :scroll="{ y: listData.fiber.length != 0 ? 60 : 120 }">
             <template #bodyCell="{ column, text }">
               <template v-if="column.dataIndex === 'warnLevel_str'">
-                <div :style="{color:text=='报警' ? '#ff0000' : '#91e609'}">{{ text }}</div>
+                <div :style="{ color: text == '报警' ? '#ff0000' : '#91e609' }">{{ text }}</div>
               </template>
             </template>
             <span slot="action" slot-scope="text, record"> </span>
@@ -419,7 +419,7 @@ watch(
           monitorlistYw.push({
             strinstallpos: el.strinstallpos,
             val: el.readData.smokeval,
-            // warnLevel_str: el.warnLevel_str == '正常' ? '低风险' : el.warnLevel_str,
+            warnLevel_str: el.warnLevel_str,
             readTime: el.readTime,
           });
         });
@@ -442,7 +442,7 @@ watch(
           monitorlistWd.push({
             strinstallpos: el.strinstallpos,
             val: el.readData.fireval,
-            // warnLevel_str: el.warnLevel_str == '正常' ? '低风险' : el.warnLevel_str,
+            warnLevel_str:el.warnLevel_str,
             readTime: el.readTime,
           });
         });

+ 5 - 2
src/views/vent/monitorManager/alarmMonitor/warn/gasWarn.vue

@@ -5,7 +5,7 @@
       style="position: absolute; left: 15px; top: 15px; color: #fff" @click="getBack">返回</a-button>
     <div class="alarm-menu">
       <div class="type-btn">
-        <div :class="activeIndex == index ? 'btn1' : 'btn'" v-for="(item, index) in typeMenuListGas" :key="index"
+        <div :class="activeIndex == index ? 'btn1' : 'btn'" :style="{width:sysOrgCode=='sdmtjtdltmk' ? '50%' : '33.33%' }" v-for="(item, index) in typeMenuListGas" :key="index"
           @click="btnClick(index)">
           {{ item.name }}
         </div>
@@ -103,9 +103,12 @@ import { useRouter } from 'vue-router';
 import CustomHeader from '/@/components/vent/customHeader.vue';
 import warnTargetGas from '../common/warnTargetGas.vue';
 import gasParamter from '../common/gasParamter.vue';
-import { typeMenuListGas } from '../common.data';
+import { getMonitorComponent } from '../common.data';
 import { usePermission } from '/@/hooks/web/usePermission';
+import { useGlobSetting } from '/@/hooks/setting';
 
+let typeMenuListGas=getMonitorComponent()
+const { sysOrgCode } = useGlobSetting();
 const { hasPermission } = usePermission();
 const { options, optionValue, getSelectRow, getSysDataSource } = useSystemSelect('sys_surface_caimei'); // 参数为场景类型(设备类型管理中可以查询到)
 //当前左侧激活菜单的索引

+ 41 - 41
src/views/vent/monitorManager/alarmMonitor/warn/ventilateWarn.vue

@@ -24,15 +24,15 @@
             <div :style="{ color: item.text == '正常' ? '#00d8ff' : '#ff2313' }"
               style="width: 100%; padding: 0px 10px; text-align: center; font-weight: bold" v-if="item.text">{{
                 item.text }}</div>
-            <div class="percent" v-if="item.list.length != 0">
-              <div class="title">{{ item.label }}</div>
-              <div class="value">
-                <div class="content-box" v-for="(items, ind) in item.list" :key="ind">
-                  <span style="color: #b3b8cc">{{ `${items.label} :` }}</span>
-                  <span style="color: #3df6ff; margin-left: 10px">{{ items.value }}</span>
-                </div>
-              </div>
-            </div>
+            // <div class="percent" v-if="item.list.length != 0">
+            //   <div class="title">{{ item.label }}</div>
+            //   <div class="value">
+            //     <div class="content-box" v-for="(items, ind) in item.list" :key="ind">
+            //       <span style="color: #b3b8cc">{{ `${items.label} :` }}</span>
+            //       <span style="color: #3df6ff; margin-left: 10px">{{ items.value }}</span>
+            //     </div>
+            //   </div>
+            // </div>
           </div>
         </div>
         <div class="bot-area">
@@ -381,7 +381,7 @@ onUnmounted(() => {
           }
 
           &:nth-child(4) {
-            flex: 0.6;
+            flex: 1;
             color: #b3b8cc;
             font-size: 16px;
             height: 100%;
@@ -389,37 +389,37 @@ onUnmounted(() => {
             border-image: linear-gradient(to bottom, transparent, rgba(2, 70, 136, 1), transparent) 1 1 1;
           }
 
-          &:nth-child(5) {
-            flex: 1.4;
-            height: 100%;
-
-            .percent {
-              width: 100%;
-              height: 82%;
-              padding: 0px 20px;
-              box-sizing: border-box;
-              display: flex;
-              flex-direction: column;
-              justify-content: space-around;
-
-              .title {
-                font-size: 14px;
-                padding: 5px 0px;
-                color: #b3b8cc;
-                text-align: center;
-              }
-
-              .value {
-                display: flex;
-                justify-content: space-between;
-
-                span {
-                  font-family: 'douyuFont';
-                  font-size: 18px;
-                }
-              }
-            }
-          }
+          // &:nth-child(5) {
+          //   flex: 1.4;
+          //   height: 100%;
+
+          //   .percent {
+          //     width: 100%;
+          //     height: 82%;
+          //     padding: 0px 20px;
+          //     box-sizing: border-box;
+          //     display: flex;
+          //     flex-direction: column;
+          //     justify-content: space-around;
+
+          //     .title {
+          //       font-size: 14px;
+          //       padding: 5px 0px;
+          //       color: #b3b8cc;
+          //       text-align: center;
+          //     }
+
+          //     .value {
+          //       display: flex;
+          //       justify-content: space-between;
+
+          //       span {
+          //         font-family: 'douyuFont';
+          //         font-size: 18px;
+          //       }
+          //     }
+          //   }
+          // }
 
           .pic {
             width: 30%;