Преглед изворни кода

[Wip 0000] 密闭监测页面详情对接

houzekong пре 4 месеци
родитељ
комит
c3329aa10d

+ 3 - 2
src/components/Configurable/detail/CustomChart.vue

@@ -15,6 +15,7 @@
       chartConfig: ModuleDataChart;
       height?: string;
       width?: string;
+      chartOption?: EChartsOption;
     }>(),
     {
       chartData: () => [],
@@ -32,10 +33,10 @@
     const domWidth = inst ? inst.getWidth() : 500;
     // 依据每一个图表配置生成图表选项
     const { yAxis = [], xAxis = [], legend, order, type, sortBy, series, dataZoom = [] } = props.chartConfig;
-    const textStyle = {
+    const textStyle = get(props.chartOption, 'textStyle', {
       color: '#fff',
       // color: '#fff',
-    };
+    });
 
     let sorttedData: any[] = [];
     if (Array.isArray(props.chartData)) {

+ 19 - 2
src/views/monitor/sealedMonitor/components/RealtimeDetailsModal.vue

@@ -5,14 +5,21 @@
       <div v-for="(item, index) in modalDetailsData.basicInfo" :key="index" class="info-item">
         <span class="label">{{ item.label }}:</span>
         <span class="value" :class="getBasicInfoTagClass(item.value)">
-          {{ item.value }}
+          {{ dataRef[item.value] || '-' }}
         </span>
       </div>
     </div>
 
     <!-- 监测数据卡片 -->
     <div class="data-cards">
-      <MiniBoard v-for="(item, index) in modalDetailsData.board" :key="index" type="D" :label="item.label" :value="item.value" layout="val-top" />
+      <MiniBoard
+        v-for="(item, index) in modalDetailsData.board"
+        :key="index"
+        type="D"
+        :label="item.label"
+        :value="dataRef[item.value] || '-'"
+        layout="val-top"
+      />
     </div>
 
     <!-- 图表区域 -->
@@ -29,6 +36,11 @@
           <CustomChart
             :chart-data="modalDetailsData.gasConcentrationData"
             :chart-config="modalDetailsData.gasConcentrationConfig"
+            :chart-option="{
+              textStyle: {
+                color: '#000',
+              },
+            }"
             style="height: 100%; width: 100%"
           />
         </div>
@@ -39,6 +51,11 @@
           <CustomChart
             :chart-data="modalDetailsData.pressureData"
             :chart-config="modalDetailsData.pressureConfig"
+            :chart-option="{
+              textStyle: {
+                color: '#000',
+              },
+            }"
             style="height: 100%; width: 100%"
           />
         </div>

+ 17 - 17
src/views/monitor/sealedMonitor/monitor.data.ts

@@ -141,19 +141,19 @@ export const minesData = [
   },
 ];
 
-export const modalDetailsData: {} = {
+export const modalDetailsData = {
   basicInfo: [
     {
       label: '煤矿名称',
-      value: '神木市三江能源有限公司',
+      value: 'mineName',
     },
     {
-      label: '密闭名称',
-      value: 'xxxx采空区密闭',
+      label: '设备位置',
+      value: 'devicePos',
     },
     {
       label: '所属煤层',
-      value: 'xxxx煤层',
+      value: 'coalSeamName',
     },
     {
       label: '自燃情况',
@@ -161,53 +161,53 @@ export const modalDetailsData: {} = {
     },
     {
       label: '是否漏风',
-      value: '闭内气体涌出',
+      value: 'leakageAlarm',
     },
     {
       label: '自然发火隐患',
-      value: '低风险',
+      value: 'fireAlarm',
     },
     {
       label: '密闭启封判定',
-      value: '不可启封',
+      value: 'unsealAlarm',
     },
     {
       label: '爆炸危险性',
-      value: '低风险',
+      value: 'explosionAlarm',
     },
   ],
   board: [
     {
       label: 'CO(ppm)',
-      value: '21',
+      value: 'coVal',
     },
     {
       label: 'CO2(PPM)',
-      value: '21',
+      value: 'co2Val',
     },
     {
       label: 'O2(%)',
-      value: '24',
+      value: 'o2Val',
     },
     {
       label: 'CH4(%)',
-      value: '17',
+      value: 'ch4Val',
     },
     {
       label: 'C2H4(ppm)',
-      value: '23',
+      value: 'c2h4Val',
     },
     {
       label: 'C2H2(ppm)',
-      value: '14',
+      value: 'c2h2Val',
     },
     {
       label: '温度(℃)',
-      value: '14',
+      value: 'temperature',
     },
     {
       label: '压差(Pa)',
-      value: '14',
+      value: 'sourcePressure',
     },
   ],
   demoBlastData: {

+ 1 - 1
src/views/system/algorithm/algorithm.data.ts

@@ -569,7 +569,7 @@ export const schemasGoafLimit: FormSchema[] = [
   },
   {
     field: 'sourcePressure',
-    label: '压',
+    label: '压',
     labelWidth: 118,
     component: 'Input',
     slot: 'InputRangeGoaf',