فهرست منبع

[Feat 0000] 开发保德新列表以及调整配置

houzekong 5 ماه پیش
والد
کامیت
157a41bff7

+ 2 - 1
src/views/vent/deviceManager/configurationTable/adapters.ts

@@ -38,7 +38,8 @@ export function getFormattedText(data: any, formatter: string, defaultValue?: an
 
   const [__, prop] = res;
   const val = defaultValue === undefined ? '-' : defaultValue;
-  return formatter.replace(exp, _.get(data, prop, val));
+  const txt = _.get(data, prop);
+  return formatter.replace(exp, _.isNil(txt) ? val : txt);
 }
 
 /** 获取 formatter 需要取的源 prop,用于在一些不支持 formatter 的组件中使用 */

+ 1 - 3
src/views/vent/deviceManager/configurationTable/types.ts

@@ -1,5 +1,3 @@
-import { ModulePositionMap, ModuleSizeMap } from './options';
-
 export interface Config {
   /** 模块的名称 */
   moduleName: string;
@@ -99,7 +97,7 @@ export interface ModuleDataBoard {
 
 export interface ModuleDataList {
   /** 列表预设的背景类型 */
-  type: 'timeline' | 'A' | 'B' | 'C' | 'D' | 'E' | 'F';
+  type: 'timeline' | 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G';
   /** 读取数据时的基础路径,如果配置了 header,应接着 Config.deviceType 配取值路径,反之应配置详尽路径 */
   readFrom: string;
   /** 核心配置,每个列表项对应一项 */

+ 2 - 2
src/views/vent/home/configurable/components/detail/ComplexList.vue

@@ -146,8 +146,8 @@
     justify-content: space-between;
     text-align: center;
     padding: 0 10%;
-    margin-top: 15px;
-    height: 40px;
+    margin-top: 5px;
+    height: 33px;
 
     .list-item__label {
       font-size: 11px;

+ 62 - 1
src/views/vent/home/configurable/components/detail/CustomList.vue

@@ -29,7 +29,7 @@
         prop: string;
         info: string;
       }[];
-      /** A B C D E */
+      /** A B C D E F G */
       type: string;
     }>(),
     {
@@ -180,6 +180,67 @@
   .list-item__content_F > div {
     flex-basis: 33.3%;
   }
+
+  .list_G {
+    background: none;
+  }
+  .list__wrapper_G {
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: space-between;
+  }
+  .list-item_G {
+    width: 170px;
+    height: 85px;
+    align-items: center;
+    text-align: center;
+    border: 1px solid rgba(25, 237, 255, 0.4);
+    box-shadow: inset 0 0 10px rgba(0, 197, 255, 0.6);
+    background: rgba(0, 0, 0, 0.1);
+    margin: 5px 15px;
+  }
+  .list-item__content_G {
+    position: relative;
+    width: 100%;
+    height: 100%;
+  }
+  .list-item__content_G > .list-item__label {
+    width: 70px;
+    height: 100%;
+    left: 0;
+    position: absolute;
+    font-size: 20px;
+    line-height: 85px;
+  }
+  .list-item__content_G > .list-item__info {
+    width: 100px;
+    height: 40px;
+    line-height: 40px;
+    right: 0;
+    position: absolute;
+  }
+  .list-item__content_G > .list-item__value {
+    width: 100px;
+    height: 40px;
+    line-height: 40px;
+    top: 40px;
+    right: 0;
+    position: absolute;
+    text-shadow: 0 0 25px #00fbfe;
+    background: linear-gradient(0deg, #45d3fd, #45d3fd, #61ddb1, #61ddb1);
+    font-style: normal;
+    background-size: cover;
+    font-family: electronicFont;
+    font-size: 30px;
+    -webkit-background-clip: text;
+    background-clip: text;
+    -webkit-text-fill-color: transparent;
+    // position: relative;
+    // top: -8px;
+    font-family: Arial, Helvetica, sans-serif;
+    font-size: 18px;
+    color: aliceblue;
+  }
   // .list-item__icon_red {
   //   background-image: url('@/assets/images/home-container/configurable/warn_icon_5.png');
   // }

+ 238 - 105
src/views/vent/home/configurable/configurable.data.ts

@@ -1518,6 +1518,23 @@ export const testConfigBDDust: Config[] = [
                 },
               ],
             },
+            {
+              title: '${[2].sysNamme}',
+              contents: [
+                {
+                  label: '风险监测',
+                  value: '${[2].warnLevel}',
+                  color: 'blue',
+                  info: '',
+                },
+                {
+                  label: '最高粉尘浓度',
+                  value: '${[2].maxVal}',
+                  color: 'blue',
+                  info: '',
+                },
+              ],
+            },
           ],
         },
       ],
@@ -1776,106 +1793,130 @@ export const testConfigBDDust: Config[] = [
   },
 ];
 
-// const BDfireMock = {
-//   allMineWarn: '低风险', //全矿井风险级别
-//   fireManageInfo: {
-//     //工作面风险监测
-//     totalNum: '5', //工作面总数
-//     dfxNum: '5', //工作面低风险数
-//     ybNum: '5', //工作面一般风险数
-//     jdNum: '5', //工作面较大风险数
-//     zdNum: '5', //工作面重大风险
-//     sysList: [
-//       {
-//         sysNamme: '工作面名称1', //工作面名称
-//         warnLevel: '低风险', //预警级别
-//         maxVal: '1.88', //最高温度
-//       },
-//       {
-//         sysNamme: '工作面名称2', //工作面名称
-//         warnLevel: '低风险', //预警级别
-//         maxVal: '1.88', //最高温度
-//       },
-//     ],
-//   },
-//   obfObj: {
-//     //密闭采空区监测系统
-//     maxC2H4: '', //乙烯最高值
-//     maxDp: '', //压差最大值
-//     maxTemperature: '', //温度最大值
-//     maxCo: '', //一氧化碳最大值
-//     maxCo2: '', //二氧化碳最大值
-//     maxCh4: '', //甲烷最大值
-//     maxC2h2: '', //乙炔最大值
-//     maxO2: '', //氧气最大值
-//   },
-//   btArray: [
-//     //工作面束管监测
-//     {
-//       name: 'CO', //数据名称(前端自己处理化学方程式的标识符)
-//       val: '0.2', //最大值
-//       strinstallpos: '位置1', //安装位置
-//       time: '2024-09-12 15:33:50',
-//     },
-//     {
-//       name: 'CO2', //数据名称(前端自己处理化学方程式的标识符)
-//       val: '0.3', //最大值
-//       strinstallpos: '位置1', //安装位置
-//       time: '2024-09-12 15:33:50',
-//     },
-//   ],
-//   pdArray: [
-//     //带式输送机防灭火监控系统
-//     {
-//       name: '光纤预警', //设备名称
-//       type: '最高温度', //参数类型
-//       val: '35.2', //参数值
-//     },
-//     {
-//       name: '一氧化碳预警',
-//       type: '最高浓度',
-//       val: '2.3',
-//     },
-//     {
-//       name: '烟雾预警',
-//       type: '最高浓度',
-//       val: '2.4',
-//     },
-//   ],
-//   dsArray: [
-//     //变电硐室防灭火监控系统
-//     {
-//       name: '光纤预警', //设备名称
-//       type: '最高温度', //参数类型
-//       val: '35.2', //参数值
-//     },
-//     {
-//       name: '一氧化碳预警',
-//       type: '最高浓度',
-//       val: '2.3',
-//     },
-//     {
-//       name: '烟雾预警',
-//       type: '最高浓度',
-//       val: '2.4',
-//     },
-//   ],
-//   aqjkArray: [
-//     //安全监控系统
-//     {
-//       strinstallpos: '位置1', //安装位置
-//       nowVal: '25.0', //温度
-//       warnLevel: '低风险', //预警级别
-//       time: '2024-09-12 15:33:50', //时间
-//     },
-//     {
-//       strinstallpos: '位置2', //安装位置
-//       nowVal: '25.0', //温度
-//       warnLevel: '低风险', //预警级别
-//       time: '2024-09-12 15:33:50', //时间
-//     },
-//   ],
-// };
+const BDfireMock = {
+  allMineWarn: '低风险', //全矿井风险级别
+  fireManageInfo: {
+    sysList: [
+      {
+        maxVal: 20.2,
+        sysId: 1746452629872402400,
+        warnLevel: '低风险',
+        sysNamme: '81203综放工作面',
+      },
+      {
+        maxVal: 29.6,
+        sysId: 1834591184917872600,
+        warnLevel: '低风险',
+        sysNamme: '上仓皮带',
+      },
+    ],
+    totalNum: 2,
+    jdNum: 0,
+    dfxNum: 2,
+    zdNum: 0,
+    ybNum: 0,
+  },
+  obfObj: {
+    //密闭采空区监测系统
+    maxC2H4: '', //乙烯最高值
+    maxDp: '', //压差最大值
+    maxTemperature: '', //温度最大值
+    maxCo: '', //一氧化碳最大值
+    maxCo2: '', //二氧化碳最大值
+    maxCh4: '', //甲烷最大值
+    maxC2h2: '', //乙炔最大值
+    maxO2: '', //氧气最大值
+  },
+  btArray: [
+    {
+      val: '0.0',
+      strinstallpos: '81202辅运1联巷',
+      name: 'CO',
+      time: '2024-09-18 16:15:40',
+    },
+    {
+      val: '0.84',
+      strinstallpos: '81202辅运1联巷',
+      name: 'CO2',
+      time: '2024-09-18 16:15:40',
+    },
+    {
+      val: '17.45',
+      strinstallpos: '81202辅运1联巷',
+      name: 'CH4',
+      time: '2024-09-18 16:15:40',
+    },
+    {
+      val: '0.0',
+      strinstallpos: '81202辅运1联巷',
+      name: 'C2H2',
+      time: '2024-09-18 16:15:40',
+    },
+    {
+      val: '0.0',
+      strinstallpos: '81202辅运1联巷',
+      name: 'C2H4',
+      time: '2024-09-18 16:15:40',
+    },
+    {
+      val: '20.35',
+      strinstallpos: '81203工作面上隅角',
+      name: 'O2',
+      time: '2024-09-18 16:15:40',
+    },
+  ],
+  pdArray: [
+    //带式输送机防灭火监控系统
+    {
+      name: '光纤预警', //设备名称
+      type: '最高温度', //参数类型
+      val: '35.2', //参数值
+    },
+    {
+      name: '一氧化碳预警',
+      type: '最高浓度',
+      val: '2.3',
+    },
+    {
+      name: '烟雾预警',
+      type: '最高浓度',
+      val: null,
+    },
+  ],
+  dsArray: [
+    //变电硐室防灭火监控系统
+    {
+      name: '光纤预警', //设备名称
+      type: '最高温度', //参数类型
+      val: '35.2', //参数值
+    },
+    {
+      name: '一氧化碳预警',
+      type: '最高浓度',
+      val: '2.3',
+    },
+    {
+      name: '烟雾预警',
+      type: '最高浓度',
+      val: '2.4',
+    },
+  ],
+  aqjkArray: [
+    //安全监控系统
+    {
+      strinstallpos: '位置1', //安装位置
+      nowVal: '25.0', //温度
+      warnLevel: '低风险', //预警级别
+      time: '2024-09-12 15:33:50', //时间
+    },
+    {
+      strinstallpos: '位置2', //安装位置
+      nowVal: '25.0', //温度
+      warnLevel: '低风险', //预警级别
+      time: '2024-09-12 15:33:50', //时间
+    },
+  ],
+};
 export const testConfigBDFire: Config[] = [
   {
     deviceType: '',
@@ -1940,17 +1981,17 @@ export const testConfigBDFire: Config[] = [
               ],
             },
             {
-              title: '${[0].sysNamme}',
+              title: '${[1].sysNamme}',
               contents: [
                 {
                   label: '风险监测',
-                  value: '${[0].warnLevel}',
+                  value: '${[1].warnLevel}',
                   color: 'blue',
                   info: '',
                 },
                 {
                   label: '最高温度',
-                  value: '${[0].maxVal}',
+                  value: '${[1].maxVal}',
                   color: 'blue',
                   info: '',
                 },
@@ -2082,7 +2123,7 @@ export const testConfigBDFire: Config[] = [
           readFrom: 'btArray',
           items: [
             {
-              title: 'O',
+              title: 'CO',
               contents: [
                 {
                   label: '最大浓度',
@@ -2127,6 +2168,98 @@ export const testConfigBDFire: Config[] = [
                 },
               ],
             },
+            {
+              title: 'CH₄',
+              contents: [
+                {
+                  label: '最大浓度',
+                  value: '${[2].val}ppm',
+                  color: 'blue',
+                  info: '',
+                },
+                {
+                  label: '位置',
+                  value: '${[2].strinstallpos}',
+                  color: 'blue',
+                  info: '',
+                },
+                {
+                  label: '时间',
+                  value: '${[2].time}',
+                  color: 'blue',
+                  info: '',
+                },
+              ],
+            },
+            {
+              title: 'C₂H₂',
+              contents: [
+                {
+                  label: '最大浓度',
+                  value: '${[3].val}ppm',
+                  color: 'blue',
+                  info: '',
+                },
+                {
+                  label: '位置',
+                  value: '${[3].strinstallpos}',
+                  color: 'blue',
+                  info: '',
+                },
+                {
+                  label: '时间',
+                  value: '${[3].time}',
+                  color: 'blue',
+                  info: '',
+                },
+              ],
+            },
+            {
+              title: 'C₂H₄',
+              contents: [
+                {
+                  label: '最大浓度',
+                  value: '${[4].val}ppm',
+                  color: 'blue',
+                  info: '',
+                },
+                {
+                  label: '位置',
+                  value: '${[4].strinstallpos}',
+                  color: 'blue',
+                  info: '',
+                },
+                {
+                  label: '时间',
+                  value: '${[4].time}',
+                  color: 'blue',
+                  info: '',
+                },
+              ],
+            },
+            {
+              title: 'O₂',
+              contents: [
+                {
+                  label: '最大浓度',
+                  value: '${[5].val}ppm',
+                  color: 'blue',
+                  info: '',
+                },
+                {
+                  label: '位置',
+                  value: '${[5].strinstallpos}',
+                  color: 'blue',
+                  info: '',
+                },
+                {
+                  label: '时间',
+                  value: '${[5].time}',
+                  color: 'blue',
+                  info: '',
+                },
+              ],
+            },
           ],
         },
       ],
@@ -2169,7 +2302,7 @@ export const testConfigBDFire: Config[] = [
       list: [
         {
           type: 'F',
-          readFrom: 'pdArray',
+          readFrom: 'dsArray',
           items: [
             {
               label: '光纤预警',

+ 17 - 17
src/views/vent/home/configurable/index.vue

@@ -33,16 +33,16 @@
         </div>
       </div>
     </div>
-    <div class="right-t">
-      <div class="tcontent-l" @click="redirectTo('/grout-home')">
+    <!-- <div class="right-t">
+      <div class="tcontent-l" @click="redirectTo('https://bing.cn')">
         <div>智能</div>
-        <div>浆系统</div>
+        <div>浆系统</div>
       </div>
-      <div class="tcontent-r" @click="redirectTo('/nitrogen-home')">
+      <div class="tcontent-r" @click="redirectTo('https://bing.cn')">
         <div>智能</div>
-        <div>注系统</div>
+        <div>注系统</div>
       </div>
-    </div>
+    </div> -->
     <ModuleBD
       v-for="cfg in configs"
       :key="cfg.deviceType"
@@ -64,31 +64,30 @@
   // import MonitorCenter from './components/MonitorCenter.vue';
   // import { useInitConfigs } from './hooks/useInit';
   import ModuleBD from './components/ModuleBD.vue';
-  import { testConfigBDFire } from './configurable.data';
+  import { testConfigBDDust } from './configurable.data';
   import VentModal from '/@/components/vent/micro/ventModal.vue';
-  import { getBDFireData } from './configurable.api';
+  import { getBDDustData } from './configurable.api';
 
-  const mainTitle = ref('保德煤矿火灾预警系统');
-  const pageType = 'BD_fire';
+  const mainTitle = ref('保德煤矿粉尘灾害预警系统');
+  const pageType = 'BD_dust';
 
   // const moduleCodes = ['fanlocal', 'fanmain' /** 'vc', 'ar', 'va', 'ws', 'dw' */];
 
-  const configs = ref(testConfigBDFire);
+  const configs = ref(testConfigBDDust);
   // const { configs, fetchConfigs } = useInitConfigs();
-
   const homedata = ref<any>({});
 
   onMounted(() => {
     // configs.value = testConfigB;
-    getBDFireData({}).then((r) => {
+    getBDDustData({}).then((r) => {
       homedata.value = r;
     });
     // fetchConfigs(pageType);
   });
 
-  function redirectTo(url) {
-    window.open(url);
-  }
+  // function redirectTo(url) {
+  //   window.open(url);
+  // }
 </script>
 <style lang="less" scoped>
   @font-face {
@@ -237,7 +236,6 @@
     display: flex;
     align-items: center;
     justify-content: space-around;
-    z-index: 1;
 
     .tcontent-l {
       flex: 1;
@@ -256,6 +254,7 @@
       text-align: center;
       padding-top: 40px;
       line-height: 50px;
+      cursor: pointer;
     }
     .tcontent-r {
       flex: 1;
@@ -274,6 +273,7 @@
       text-align: center;
       padding-top: 40px;
       line-height: 50px;
+      cursor: pointer;
     }
   }