Explorar o código

[Wip 0000] 保德可配置首页修改

houzekong hai 6 meses
pai
achega
b5ee14a665

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

@@ -142,9 +142,14 @@
     justify-content: space-between;
     text-align: center;
     padding-right: 20px;
+    margin-bottom: 10px;
 
+    .list-item__label {
+      font-size: 12px;
+    }
     .list-item__content_B {
       display: flex;
+      align-items: center;
     }
     .list-item__title_B {
       flex-basis: 24%;

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

@@ -87,12 +87,13 @@
     background-repeat: no-repeat;
   }
   .mini-board_E {
-    width: 95px;
-    height: 100px;
-    padding: 20px 0 0 0;
+    width: 30%;
+    height: 200px;
+    padding: 60px 5px 0 5px;
     background-image: url('/@/assets/images/home-container/configurable/board_bg_1.png');
     background-position: center bottom;
     background-repeat: no-repeat;
+    background-size: 100% 100%;
   }
 
   .mini-board__value_A {
@@ -140,11 +141,10 @@
   .mini-board__value_E {
     font-size: 20px;
     font-weight: bold;
-    height: 76px;
     line-height: 76px;
   }
   .mini-board__label_E {
     line-height: 17px;
-    height: 17px;
+    height: 60px;
   }
 </style>

+ 143 - 55
src/views/vent/home/configurable/configurable.data.ts

@@ -427,16 +427,16 @@ export const testConfigA: Config[] = [
   //   },
   // },
   {
-    deviceType: 'warn',
+    deviceType: 'dust',
     moduleName: '工作面监测',
     pageType: '',
     moduleData: {
       header: {
-        show: true,
-        showSelector: true,
-        showSlot: true,
+        show: false,
+        showSelector: false,
+        showSlot: false,
         selector: {
-          value: '${strinstallpos}',
+          value: '${name}',
         },
         slot: {
           value: '网络异常:${netstatus.val} 台',
@@ -449,51 +449,52 @@ export const testConfigA: Config[] = [
       },
       // layout: ['table'],
       // layout: ['list'],
-      layout: ['board'],
-      // layout: ['complex_list'],
+      // layout: ['board'],
+      layout: ['complex_list'],
       board: [
         {
           type: 'E',
           layout: 'label-top',
-          readFrom: 'readFromMe[0]',
+          readFrom: '',
           items: [
             {
-              label: 'A',
-              value: '${a}',
+              label: '火焰长度(mm)',
+              value: '>${flameLength}',
             },
             {
-              label: 'B',
-              value: '${b}',
+              label: '抑制煤层爆炸最低岩粉量(%)',
+              value: '${minDust}',
             },
             {
-              label: 'C',
-              value: '${c}',
+              label: '鉴定结论',
+              value: '${conclution}',
             },
           ],
         },
       ],
       chart: [],
       gallery: [],
+      gallery_list: [],
       table: [
         {
           type: 'C',
-          readFrom: 'readFromMe',
+          readFrom: 'dust',
           columns: [
             {
-              name: 'A',
-              prop: 'a',
+              name: '类别',
+              prop: 'name',
             },
             {
-              name: 'B',
-              prop: 'b',
+              name: '长度',
+              prop: 'flameLength',
             },
             {
-              name: 'C',
-              prop: 'c',
+              name: '结论',
+              prop: 'conclution',
             },
             {
-              name: 'D',
-              prop: 'd',
+              name: '岩粉量',
+              prop: 'minDust',
             },
           ],
         },
@@ -501,11 +502,11 @@ export const testConfigA: Config[] = [
       list: [
         {
           type: 'F',
-          readFrom: 'readFromMe[0]',
+          readFrom: 'worksurface',
           items: [
             {
-              label: 'A',
-              value: '${a}',
+              label: '${[0].name}',
+              value: '${[0]}',
               color: 'white',
               info: 'AInfo',
             },
@@ -526,35 +527,93 @@ export const testConfigA: Config[] = [
       ],
       complex_list: [
         {
-          type: 'B',
-          readFrom: 'readFromMe[0]',
+          type: 'A',
+          readFrom: 'worksurface',
           items: [
             {
-              title: 'TITLEA',
+              title: 'CO',
               contents: [
                 {
-                  label: 'A',
-                  value: '${a}',
-                  color: 'white',
-                  info: 'AInfo',
+                  label: '风险监测',
+                  value: '${[0].risk}',
+                  color: 'blue',
+                  info: '',
+                },
+                {
+                  label: '温度最大值',
+                  value: '${[0].max}℃',
+                  color: 'blue',
+                  info: '',
                 },
                 {
-                  label: 'B',
-                  value: '${b}',
+                  label: '气体异常值',
+                  value: '${[0].gas}',
+                  color: 'blue',
+                  info: '',
+                },
+                {
+                  label: '预测风险区域',
+                  value: '${[0].prediction}',
                   color: 'white',
-                  info: 'AInfo',
+                  info: '',
+                },
+              ],
+            },
+            {
+              title: '甲烷',
+              contents: [
+                {
+                  label: '风险监测',
+                  value: '${[1].risk}',
+                  color: 'blue',
+                  info: '',
                 },
                 {
-                  label: 'C',
-                  value: '${c}',
+                  label: '温度最大值',
+                  value: '${[1].max}℃',
+                  color: 'blue',
+                  info: '',
+                },
+                {
+                  label: '气体异常值',
+                  value: '${[1].gas}',
+                  color: 'blue',
+                  info: '',
+                },
+                {
+                  label: '预测风险区域',
+                  value: '${[1].prediction}',
                   color: 'white',
-                  info: 'AInfo',
+                  info: '',
+                },
+              ],
+            },
+            {
+              title: 'CH',
+              contents: [
+                {
+                  label: '风险监测',
+                  value: '${[2].risk}',
+                  color: 'blue',
+                  info: '',
+                },
+                {
+                  label: '温度最大值',
+                  value: '${[2].max}℃',
+                  color: 'blue',
+                  info: '',
                 },
                 {
-                  label: 'D',
-                  value: '${d}',
+                  label: '气体异常值',
+                  value: '${[2].gas}',
+                  color: 'blue',
+                  info: '',
+                },
+                {
+                  label: '预测风险区域',
+                  value: '${[2].prediction}',
                   color: 'white',
-                  info: 'DInfo',
+                  info: '',
                 },
               ],
             },
@@ -564,24 +623,53 @@ export const testConfigA: Config[] = [
       preset: [],
       to: 'https://baidu.com',
       mock: {
-        readFromMe: [
+        worksurface: [
+          {
+            name: '综采工作面1',
+            max: '6',
+            risk: '低',
+            gas: '0',
+            prediction: '暂无捏',
+          },
+          {
+            name: '综采工作面1',
+            max: '6',
+            risk: '低',
+            gas: '0',
+            prediction: '暂无捏',
+          },
+          {
+            name: '综采工作面1',
+            max: '6',
+            risk: '低',
+            gas: '0',
+            prediction: '暂无捏',
+          },
+        ],
+        dust: [
+          {
+            name: '10#煤层',
+            flameLength: '400',
+            minDust: '75',
+            conclution: '有爆炸性',
+          },
           {
-            a: 1,
-            b: 2,
-            c: 3,
-            d: 4,
+            name: '10#煤层',
+            flameLength: '400',
+            minDust: '75',
+            conclution: '有爆炸性',
           },
           {
-            a: 1,
-            b: 2,
-            c: 3,
-            d: 4,
+            name: '10#煤层',
+            flameLength: '400',
+            minDust: '75',
+            conclution: '有爆炸性',
           },
           {
-            a: 1,
-            b: 2,
-            c: 3,
-            d: 4,
+            name: '10#煤层',
+            flameLength: '400',
+            minDust: '75',
+            conclution: '有爆炸性',
           },
         ],
       },