Browse Source

Merge branch 'master' of http://182.92.126.35:3000/hrx/mky-vent-base

lxh 1 month ago
parent
commit
be30d2ec45

+ 1 - 1
src/layouts/default/header/index.vue

@@ -12,7 +12,7 @@
         'no-header': currentRoute.path.endsWith('home'),
       },
     ]"
-    style="z-index: 9999"
+    style="z-index: 1"
   >
     <!-- left start -->
     <div :class="`${prefixCls}-left`">

+ 19 - 17
src/views/vent/home/configurable/components/detail/CustomChart.vue

@@ -58,7 +58,7 @@
     }
 
     // 该项作为下面所有图表依赖的基准系列数据
-    const baseSeries: { name: string; data: [string, string] }[] = sorttedData.reduce((res: any[], baseData) => {
+    const baseSeries: { name: string; data: [string, string][] }[] = sorttedData.reduce((res: any[], baseData) => {
       series.forEach((serie) => {
         res.push({
           name: getFormattedText(baseData, serie.label),
@@ -105,7 +105,6 @@
 
     // 柱状图
     if (type === 'bar') {
-      const barGapMap = { 1: '-100%', 2: '-85%' };
       return {
         textStyle,
         grid: {
@@ -125,7 +124,7 @@
             type: 'category',
             axisLabel: {
               interval: 0,
-              width: 150,
+              width: 800 / get(baseSeries, '[0].data.length', 1),
               overflow: 'break',
             },
           };
@@ -142,25 +141,27 @@
         }),
         series: baseSeries.reduce((curr: EChartsOption[], serie, index) => {
           const colors = ['#66ffff', '#ffff66'];
-          curr.push({
-            ...serie,
-            type: 'pictorialBar',
-            symbol: 'circle',
-            symbolPosition: 'end',
-            symbolSize: [16, 16],
-            symbolOffset: [0, -8],
-            barGap: barGapMap[baseSeries.length],
-            yAxisIndex: index,
-            itemStyle: {
-              color: colors[index % colors.length],
-            },
-          });
+          if (baseSeries.length === 1) {
+            curr.push({
+              ...serie,
+              type: 'pictorialBar',
+              symbol: 'circle',
+              symbolPosition: 'end',
+              symbolSize: [20, 20],
+              symbolOffset: [0, -10],
+              barGap: '-100%',
+              yAxisIndex: index,
+              itemStyle: {
+                color: colors[index % colors.length],
+              },
+            });
+          }
           curr.push({
             ...serie,
             type: 'bar',
             silent: true,
             yAxisIndex: index,
-            barWidth: 8,
+            barWidth: 10,
             barGap: '100%',
             itemStyle: {
               color: new graphic.LinearGradient(0, 0, 0, 1, [
@@ -168,6 +169,7 @@
                 { offset: 0.2, color: colors[index % colors.length] },
                 { offset: 1, color: `${colors[index % colors.length]}22` },
               ]),
+              borderRadius: [5, 5, 0, 0],
             },
           });
 

+ 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) => {