Ver código fonte

[Feat 0000] 通用的火灾粉尘首页配置

houzekong 1 mês atrás
pai
commit
b6328cb485

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

@@ -158,7 +158,8 @@
   .mini-board__value_E {
     font-size: 20px;
     font-weight: bold;
-    line-height: 76px;
+    margin-top: 30px;
+    // line-height: 76px;
   }
   .mini-board__label_E {
     line-height: 17px;

+ 54 - 2
src/views/vent/home/configurable/configurable.data.bd.ts

@@ -1,7 +1,7 @@
 import { Config } from '../../deviceManager/configurationTable/types';
 // 保德
 
-const BDdustMock = {
+export const BDdustMock = {
   allMineWarn: '低风险', //全矿井风险级别
   dustManageInfo: {
     //工作面风险监测
@@ -482,7 +482,7 @@ export const testConfigBDDust: Config[] = [
   },
 ];
 
-const BDfireMock = {
+export const BDfireMock = {
   allMineWarn: '低风险', //全矿井风险级别
   fireManageInfo: {
     //工作面风险监测
@@ -588,6 +588,32 @@ const BDfireMock = {
         favg: '0', //平均温度
         fibreTemperature:
           '[{"pos":1,"value":"17.8"},{"pos":2,"value":"18.0"},{"pos":3,"value":"18.5"},{"pos":4,"value":"18.6"},{"pos":5,"value":"18.4"},{"pos":6,"value":"18.1"}]',
+        fibreTemperatureArr: [
+          {
+            pos: 1,
+            value: '17.8',
+          },
+          {
+            pos: 2,
+            value: '18.0',
+          },
+          {
+            pos: 3,
+            value: '18.5',
+          },
+          {
+            pos: 4,
+            value: '18.6',
+          },
+          {
+            pos: 5,
+            value: '18.4',
+          },
+          {
+            pos: 6,
+            value: '18.1',
+          },
+        ],
         warnLevel: '低风险', //风险监测
       },
       {
@@ -597,6 +623,32 @@ const BDfireMock = {
         favg: '0', //平均温度
         fibreTemperature:
           '[{"pos":1,"value":"7.8"},{"pos":2,"value":"18.0"},{"pos":3,"value":"18.5"},{"pos":4,"value":"18.6"},{"pos":5,"value":"18.4"},{"pos":6,"value":"18.1"}]',
+        fibreTemperatureArr: [
+          {
+            pos: 1,
+            value: '17.8',
+          },
+          {
+            pos: 2,
+            value: '18.0',
+          },
+          {
+            pos: 3,
+            value: '18.5',
+          },
+          {
+            pos: 4,
+            value: '18.6',
+          },
+          {
+            pos: 5,
+            value: '18.4',
+          },
+          {
+            pos: 6,
+            value: '18.1',
+          },
+        ],
         warnLevel: '低风险', //风险监测
       },
     ],

+ 59 - 52
src/views/vent/home/configurable/configurable.data.ts

@@ -1,4 +1,5 @@
 import { Config } from '../../deviceManager/configurationTable/types';
+import { BDdustMock, BDfireMock } from './configurable.data.bd';
 
 export const testConfigVent: Config[] = [
   {
@@ -510,7 +511,7 @@ export const testConfigDust: Config[] = [
       list: [],
       complex_list: [
         {
-          type: 'A',
+          type: 'C',
           readFrom: 'dustManageInfo.sysList',
           mapFromData: true,
           items: [
@@ -535,12 +536,12 @@ export const testConfigDust: Config[] = [
         },
       ],
       preset: [],
-      // mock: BDdustMock,
+      mock: BDdustMock,
     },
     showStyle: {
-      size: 'width:450px;height:750px;',
+      size: 'width:450px;height:860px;',
       version: '保德',
-      position: 'top:170px;left:0;',
+      position: 'top:60px;left:0;',
     },
   },
   {
@@ -593,6 +594,7 @@ export const testConfigDust: Config[] = [
       list: [],
       complex_list: [],
       preset: [],
+      mock: BDdustMock,
     },
     showStyle: {
       size: 'width:1000px;height:280px;',
@@ -630,7 +632,7 @@ export const testConfigDust: Config[] = [
       chart: [],
       gallery: [
         {
-          type: 'E',
+          type: 'A',
           readFrom: 'atomObj',
           items: [
             {
@@ -662,7 +664,7 @@ export const testConfigDust: Config[] = [
       complex_list: [],
       preset: [],
       to: 'http://10.248.210.154:8801',
-      // mock: BDdustMock,
+      mock: BDdustMock,
     },
     showStyle: {
       size: 'width:450px;height:280px;',
@@ -723,7 +725,7 @@ export const testConfigDust: Config[] = [
       list: [],
       complex_list: [],
       preset: [],
-      // mock: BDdustMock,
+      mock: BDdustMock,
     },
     showStyle: {
       size: 'width:450px;height:280px;',
@@ -785,7 +787,7 @@ export const testConfigDust: Config[] = [
       list: [],
       complex_list: [],
       preset: [],
-      // mock: BDdustMock,
+      mock: BDdustMock,
     },
     showStyle: {
       size: 'width:450px;height:280px;',
@@ -871,7 +873,7 @@ export const testConfigFire: Config[] = [
         },
       ],
       preset: [],
-      // mock: BDfireMock,
+      mock: BDfireMock,
     },
     showStyle: {
       size: 'width:450px;height:280px;',
@@ -954,13 +956,13 @@ export const testConfigFire: Config[] = [
     },
   },
   {
-    deviceType: 'obfObj.arrayDev',
+    deviceType: '',
     moduleName: '矿井火情走势',
     pageType: '',
     moduleData: {
       header: {
-        show: true,
-        showSelector: true,
+        show: false,
+        showSelector: false,
         showSlot: false,
         selector: {
           value: '${strinstallpos}',
@@ -982,17 +984,17 @@ export const testConfigFire: Config[] = [
       board: [],
       chart: [
         {
-          type: 'line_area',
-          readFrom: '',
-          legend: { show: true },
-          xAxis: [{ show: true }],
-          yAxis: [{ show: true, name: '温度(℃)', position: 'left' }],
+          type: 'pie',
+          readFrom: 'sgGxObj',
+          legend: { show: false },
+          xAxis: [{ show: false }],
+          yAxis: [{ show: false, name: '温度(℃)', position: 'left' }],
           series: [
             {
-              label: '${strinstallpos}',
-              readFrom: 'fibreTemperatureArr',
-              xprop: 'pos',
-              yprop: 'value',
+              label: '',
+              readFrom: 'btArray',
+              xprop: 'name',
+              yprop: 'val',
             },
           ],
         },
@@ -1003,7 +1005,7 @@ export const testConfigFire: Config[] = [
       list: [],
       complex_list: [],
       preset: [],
-      // mock: BDfireMock,
+      mock: BDfireMock,
     },
     showStyle: {
       size: 'width:450px;height:280px;',
@@ -1061,7 +1063,7 @@ export const testConfigFire: Config[] = [
       list: [],
       complex_list: [],
       preset: [],
-      // mock: BDfireMock,
+      mock: BDfireMock,
     },
     showStyle: {
       size: 'width:1000px;height:280px;',
@@ -1092,9 +1094,10 @@ export const testConfigFire: Config[] = [
       },
       slice: {
         direction: 'column',
-        basis: ['40%', '60%'],
+        basis: ['30%', '50%', '20%'],
+        ignoreOverflow: true,
       },
-      layout: ['gallery_list', 'list'],
+      layout: ['gallery_list', 'blast_delta', 'list'],
       board: [],
       chart: [],
       // chart: [
@@ -1198,36 +1201,40 @@ export const testConfigFire: Config[] = [
               color: 'blue',
               info: '',
             },
-            {
-              label: '乙烯',
-              value: '${c2h4Val}',
-              color: 'blue',
-              info: '',
-            },
-            {
-              label: '甲烷',
-              value: '${ch4Val}',
-              color: 'blue',
-              info: '',
-            },
-            {
-              label: '乙炔',
-              value: '${c2h2Val}',
-              color: 'blue',
-              info: '',
-            },
-            {
-              label: '压差',
-              value: '${dpVal}',
-              color: 'blue',
-              info: '',
-            },
+            // {
+            //   label: '乙烯',
+            //   value: '${c2h4Val}',
+            //   color: 'blue',
+            //   info: '',
+            // },
+            // {
+            //   label: '甲烷',
+            //   value: '${ch4Val}',
+            //   color: 'blue',
+            //   info: '',
+            // },
+            // {
+            //   label: '乙炔',
+            //   value: '${c2h2Val}',
+            //   color: 'blue',
+            //   info: '',
+            // },
+            // {
+            //   label: '压差',
+            //   value: '${dpVal}',
+            //   color: 'blue',
+            //   info: '',
+            // },
           ],
         },
       ],
       complex_list: [],
-      preset: [],
-      // mock: BDfireMock,
+      preset: [
+        {
+          readFrom: '',
+        },
+      ],
+      mock: BDfireMock,
     },
     showStyle: {
       size: 'width:450px;height:570px;',
@@ -1292,7 +1299,7 @@ export const testConfigFire: Config[] = [
       list: [],
       complex_list: [],
       preset: [],
-      // mock: BDfireMock,
+      mock: BDfireMock,
     },
     showStyle: {
       size: 'width:450px;height:280px;',

+ 4 - 4
src/views/vent/home/configurable/dust.vue

@@ -70,7 +70,7 @@
   import ModuleEnhanced from './components/ModuleEnhanced.vue';
   import ModuleOriginal from './components/ModuleOriginal.vue';
   import ModuleCommon from './components/ModuleCommon.vue';
-  // import { testConfigBuErTai } from './configurable.data';
+  import { testConfigDust } from './configurable.data';
   // import { useRoute } from 'vue-router';
   import VentModal from '/@/components/vent/micro/ventModal.vue';
 
@@ -85,7 +85,7 @@
   const hiddenList = computed(() => {
     return enhancedConfigs.value.filter((e) => e.visible === false);
   });
-  const { configs, isOriginal, isCommon, fetchConfigs } = useInitConfigs();
+  const { configs, isOriginal, isCommon /** fetchConfigs */ } = useInitConfigs();
 
   const enhancedConfigs = computed<EnhancedConfig[]>(() => {
     return configs.value.map((c) => {
@@ -97,8 +97,8 @@
   });
 
   onMounted(() => {
-    // configs.value = testConfigB;
-    fetchConfigs('vent');
+    configs.value = testConfigDust;
+    // fetchConfigs('vent');
   });
 </script>
 <style lang="less" scoped>

+ 4 - 4
src/views/vent/home/configurable/fire.vue

@@ -70,7 +70,7 @@
   import ModuleEnhanced from './components/ModuleEnhanced.vue';
   import ModuleOriginal from './components/ModuleOriginal.vue';
   import ModuleCommon from './components/ModuleCommon.vue';
-  // import { testConfigBuErTai } from './configurable.data';
+  import { testConfigFire } from './configurable.data';
   // import { useRoute } from 'vue-router';
   import VentModal from '/@/components/vent/micro/ventModal.vue';
 
@@ -85,7 +85,7 @@
   const hiddenList = computed(() => {
     return enhancedConfigs.value.filter((e) => e.visible === false);
   });
-  const { configs, isOriginal, isCommon, fetchConfigs } = useInitConfigs();
+  const { configs, isOriginal, isCommon /** fetchConfigs */ } = useInitConfigs();
 
   const enhancedConfigs = computed<EnhancedConfig[]>(() => {
     return configs.value.map((c) => {
@@ -97,8 +97,8 @@
   });
 
   onMounted(() => {
-    // configs.value = testConfigB;
-    fetchConfigs('vent');
+    configs.value = testConfigFire;
+    // fetchConfigs('vent');
   });
 </script>
 <style lang="less" scoped>

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

@@ -85,7 +85,7 @@
   const hiddenList = computed(() => {
     return enhancedConfigs.value.filter((e) => e.visible === false);
   });
-  const { configs, isOriginal, isCommon, fetchConfigs } = useInitConfigs();
+  const { configs, isOriginal, isCommon /** fetchConfigs */ } = useInitConfigs();
 
   const enhancedConfigs = computed<EnhancedConfig[]>(() => {
     return configs.value.map((c) => {