Procházet zdrojové kódy

[Feat 0000]预警分析监测字段更新

bobo04052021@163.com před 5 měsíci
rodič
revize
bea0d8e02c

+ 2 - 2
src/views/analysis/warningAnalysis/airLeakStatus/airLeakStatus.data.ts

@@ -44,11 +44,11 @@ export const columns: BasicColumn[] = [
   },
   {
     title: '密闭内压力',
-    dataIndex: 'interPressure',
+    dataIndex: 'sourcePressure',
   },
   {
     title: '密闭外压力',
-    dataIndex: 'outerPressure',
+    dataIndex: 'sourcePressure',
   },
   {
     title: '是否漏风',

+ 13 - 13
src/views/analysis/warningAnalysis/airLeakStatus/index.vue

@@ -5,22 +5,22 @@
       <TabPane tab="实时监测" key="realtime">
         <div class="board-info">
           <div :key="index" v-for="(item, index) in boardData" class="board-item">
-            <MiniBoard type="E" :label="item.label" :value="item.value" layout="label-top" />
+            <MiniBoard type="A" :label="item.label" :value="item.value" layout="label-top" />
           </div>
         </div>
         <!-- 实时数据表格 -->
         <BasicTable @register="registerTable" :scroll="{ x: 'max-content' }" :style="{ padding: 0 }">
           <template #action="{ record }">
-            <div class="action-buttons">
-              <!-- 操作按钮 -->
-              <button @click="openModal(record, 'detail')" class="action-btn detail-btn" title="操作">
+            <!-- <div class="action-buttons"> -->
+            <!-- 操作按钮 -->
+            <!-- <button @click="openModal(record, 'detail')" class="action-btn detail-btn" title="操作">
                 <span class="action-text">详情</span>
-              </button>
-              <!-- 已解决按钮 -->
-              <button @click="openModal(record, 'resolved')" class="action-btn resolved-btn" title="已解决">
-                <span class="action-text">解决</span>
-              </button>
-            </div>
+              </button> -->
+            <!-- 已解决按钮 -->
+            <button @click="openModal(record, 'resolved')" class="action-btn resolved-btn" title="已解决">
+              <span class="action-text">解决</span>
+            </button>
+            <!-- </div> -->
           </template>
         </BasicTable>
       </TabPane>
@@ -123,7 +123,7 @@ const [registerTable] = useTable({
   showIndexColumn: false,
   canResize: false,
   actionColumn: {
-    width: 120,
+    width: 150,
     title: '操作',
     dataIndex: 'action',
     slots: { customRender: 'action' },
@@ -216,8 +216,8 @@ const [registerHistoryTable] = useTable({
     showAdvancedButton: false,
     schemaGroupNames: ['常规查询'],
   },
-  pagination: false,
-  striped: false,
+  pagination: true,
+  striped: true,
   useSearchForm: true,
   bordered: true,
   showIndexColumn: false,

+ 9 - 4
src/views/analysis/warningAnalysis/autoFireAnalysis/autoFire.api.ts

@@ -31,10 +31,15 @@ export const getProvinceAlarm = (params) =>
   });
 //查询密闭列表
 export const getGoafData = (params) =>
-  defHttp.post({
-    url: Api.getGoafData,
-    params,
-  });
+  defHttp.post(
+    {
+      url: Api.getGoafData,
+      params,
+    },
+    {
+      joinParamsToUrl: true,
+    }
+  );
 //查询预警历史数据
 export const getProvinceAlarmHistory = (params) =>
   defHttp.post(

+ 2 - 2
src/views/analysis/warningAnalysis/autoFireAnalysis/autoFireAnalysis.data.ts

@@ -52,7 +52,7 @@ export const columns: BasicColumn[] = [
   },
   {
     title: 'CO浓度(ppm)',
-    dataIndex: 'COVal',
+    dataIndex: 'coVal',
   },
   {
     title: 'CO日增率',
@@ -60,7 +60,7 @@ export const columns: BasicColumn[] = [
   },
   {
     title: 'O2浓度(ppm)',
-    dataIndex: 'O2Val',
+    dataIndex: 'o2Val',
   },
   {
     title: '温度(℃)',

+ 10 - 10
src/views/analysis/warningAnalysis/autoFireAnalysis/index.vue

@@ -15,7 +15,7 @@
           />
         </div>
         <!-- 实时数据表格 -->
-        <BasicTable @register="registerTable" :scroll="{ x: 'max-content' }">
+        <BasicTable @register="registerTable" :scroll="{ x: 'max-content' }" :style="{ padding: 0 }">
           <template #action="{ record }">
             <div class="action-buttons">
               <!-- 操作按钮 -->
@@ -29,7 +29,7 @@
 
       <TabPane tab="历史数据" key="history">
         <!-- 历史数据表格 -->
-        <BasicTable @register="registerHistoryTable" :scroll="{ x: 'max-content' }">
+        <BasicTable @register="registerHistoryTable" :scroll="{ x: 'max-content' }" :style="{ padding: 0 }">
           <template #action="{ record }">
             <div class="action-buttons">
               <button @click="openModal(record, 'history')" class="action-btn">
@@ -69,7 +69,7 @@ const visibleModal = ref(false);
 //煤矿列表数据
 const deviceOptions = ref([]);
 const goafOptions = ref([]);
-const mineCode = 100003;
+const mineCode = ref('');
 const goafId = ref('');
 const boardData = ref([
   {
@@ -119,13 +119,13 @@ const [registerTable] = useTable({
   bordered: true,
   showIndexColumn: false,
   canResize: false,
-  actionColumn: {
-    width: 60,
-    title: '操作',
-    dataIndex: 'action',
-    slots: { customRender: 'action' },
-    fixed: undefined,
-  },
+  // actionColumn: {
+  //   width: 60,
+  //   title: '操作',
+  //   dataIndex: 'action',
+  //   slots: { customRender: 'action' },
+  //   fixed: undefined,
+  // },
 });
 
 // 注册历史数据表格

+ 8 - 5
src/views/analysis/warningAnalysis/fireAreaJudgeAnalysis/fireAreaJudge.api.ts

@@ -4,7 +4,7 @@ enum Api {
   getProvinceAlarm = '/province/alarm/getProvinceAlarm',
   getMineData = '/province/mineData/getMineData',
   getProvinceAlarmNum = '/province/alarm/getProvinceAlarmNum',
-  getGoafData = '/province/device/getGoafDList',
+  getGoafData = '/province/device/getGoafList',
   getProvinceAlarmHistory = '/province/alarm/getProvinceAlarmHistory',
   getEnfMineTreeData = '/jeecg-system/sys/user/getEnfMineTreeData',
 }
@@ -31,10 +31,13 @@ export const getProvinceAlarm = (params) =>
   });
 //查询密闭列表
 export const getGoafData = (params) =>
-  defHttp.post({
-    url: Api.getGoafData,
-    params,
-  });
+  defHttp.post(
+    {
+      url: Api.getGoafData,
+      params,
+    },
+    { joinParamsToUrl: true }
+  );
 //查询预警历史数据
 export const getProvinceAlarmHistory = (params) =>
   defHttp.post(

+ 4 - 4
src/views/analysis/warningAnalysis/fireAreaJudgeAnalysis/fireAreaJudgeAnalysis.data.ts

@@ -56,19 +56,19 @@ export const columns: BasicColumn[] = [
   },
   {
     title: 'O2浓度(ppm)',
-    dataIndex: 'O2Val',
+    dataIndex: 'o2Val',
   },
   {
     title: 'C2H4浓度(ppm)',
-    dataIndex: 'C2H4Val',
+    dataIndex: 'c2h4Val',
   },
   {
     title: 'C2H2浓度(ppm)',
-    dataIndex: 'C2H2Val',
+    dataIndex: 'c2h2Val',
   },
   {
     title: 'CO浓度(ppm)',
-    dataIndex: 'COVal',
+    dataIndex: 'coVal',
   },
   {
     title: '出水温度(℃)',

+ 7 - 12
src/views/analysis/warningAnalysis/fireAreaJudgeAnalysis/index.vue

@@ -111,13 +111,13 @@ const [registerTable] = useTable({
   bordered: true,
   showIndexColumn: false,
   canResize: false,
-  actionColumn: {
-    width: 120,
-    title: '详情',
-    dataIndex: 'action',
-    slots: { customRender: 'action' },
-    fixed: undefined,
-  },
+  // actionColumn: {
+  //   width: 120,
+  //   title: '详情',
+  //   dataIndex: 'action',
+  //   slots: { customRender: 'action' },
+  //   fixed: undefined,
+  // },
 });
 
 // 注册历史数据表格
@@ -169,12 +169,7 @@ const [registerHistoryTable] = useTable({
         label: '采空区查询',
         field: 'goafId',
         component: 'Select',
-        defaultValue: goafOptions.value[0] ? goafOptions.value[0]['value'] : '',
         componentProps: {
-          showSearch: true,
-          filterOption: (input: string, option: any) => {
-            return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
-          },
           options: goafOptions,
           onChange: async (e, option) => {
             goafId.value = e;

+ 7 - 7
src/views/analysis/warningAnalysis/overlimitAlarm/index.vue

@@ -120,13 +120,13 @@ const [registerTable] = useTable({
   bordered: true,
   showIndexColumn: false,
   canResize: false,
-  actionColumn: {
-    width: 120,
-    title: '详情',
-    dataIndex: 'action',
-    slots: { customRender: 'action' },
-    fixed: undefined,
-  },
+  // actionColumn: {
+  //   width: 120,
+  //   title: '详情',
+  //   dataIndex: 'action',
+  //   slots: { customRender: 'action' },
+  //   fixed: undefined,
+  // },
 });
 
 // 注册历史数据表格

+ 9 - 4
src/views/analysis/warningAnalysis/overlimitAlarm/overlimit.api.ts

@@ -31,10 +31,15 @@ export const getProvinceAlarm = (params) =>
   });
 //查询密闭列表
 export const getGoafData = (params) =>
-  defHttp.post({
-    url: Api.getGoafData,
-    params,
-  });
+  defHttp.post(
+    {
+      url: Api.getGoafData,
+      params,
+    },
+    {
+      joinParamsToUrl: true,
+    }
+  );
 //查询预警历史数据
 export const getProvinceAlarmHistory = (params) =>
   defHttp.post(

+ 2 - 2
src/views/analysis/warningAnalysis/overlimitAlarm/overlimitAlarm.data.ts

@@ -52,7 +52,7 @@ export const columns: BasicColumn[] = [
   },
   {
     title: 'CO浓度(ppm)',
-    dataIndex: 'COVal',
+    dataIndex: 'coVal',
   },
   {
     title: 'CO日增率',
@@ -60,7 +60,7 @@ export const columns: BasicColumn[] = [
   },
   {
     title: 'O2浓度(ppm)',
-    dataIndex: 'O2Val',
+    dataIndex: 'o2Val',
   },
   {
     title: '温度(℃)',

+ 12 - 17
src/views/analysis/warningAnalysis/pressureDiffAnalysis/index.vue

@@ -17,16 +17,16 @@
         <!-- 实时数据表格 -->
         <BasicTable @register="registerTable" :scroll="{ x: 'max-content' }" :style="{ padding: 0 }">
           <template #action="{ record }">
-            <div class="action-buttons">
-              <!-- 操作按钮 -->
-              <button @click="openModal(record, 'detail')" class="action-btn detail-btn" title="操作">
+            <!-- <div class="action-buttons"> -->
+            <!-- 操作按钮 -->
+            <!-- <button @click="openModal(record, 'detail')" class="action-btn detail-btn" title="操作">
                 <span class="action-text">详情</span>
-              </button>
-              <!-- 已解决按钮 -->
-              <button @click="openModal(record, 'resolved')" class="action-btn resolved-btn" title="已解决">
-                <span class="action-text">解决</span>
-              </button>
-            </div>
+              </button> -->
+            <!-- 已解决按钮 -->
+            <button @click="openModal(record, 'resolved')" class="action-btn resolved-btn" title="已解决">
+              <span class="action-text">解决</span>
+            </button>
+            <!-- </div> -->
           </template>
         </BasicTable>
       </TabPane>
@@ -139,11 +139,11 @@ const [registerTable] = useTable({
   showIndexColumn: false,
   canResize: false,
   actionColumn: {
-    width: 120,
+    width: 80,
     title: '操作',
     dataIndex: 'action',
     slots: { customRender: 'action' },
-    fixed: undefined,
+    // fixed: undefined,
   },
 });
 
@@ -196,13 +196,8 @@ const [registerHistoryTable] = useTable({
         label: '采空区查询',
         field: 'goafId',
         component: 'Select',
-        defaultValue: goafOptions.value[0] ? goafOptions.value[0]['value'] : '',
         componentProps: {
-          showSearch: true,
-          filterOption: (input: string, option: any) => {
-            return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
-          },
-          options: goafOptions,
+          options: goafOptions.value,
           onChange: async (e, option) => {
             goafId.value = e;
           },

+ 9 - 4
src/views/analysis/warningAnalysis/pressureDiffAnalysis/pressureDiff.api.ts

@@ -31,10 +31,15 @@ export const getProvinceAlarm = (params) =>
   });
 //查询密闭列表
 export const getGoafData = (params) =>
-  defHttp.post({
-    url: Api.getGoafData,
-    params,
-  });
+  defHttp.post(
+    {
+      url: Api.getGoafData,
+      params,
+    },
+    {
+      joinParamsToUrl: true,
+    }
+  );
 //查询预警历史数据
 export const getProvinceAlarmHistory = (params) =>
   defHttp.post(

+ 2 - 2
src/views/analysis/warningAnalysis/pressureDiffAnalysis/pressureDiffAnalysis.data.ts

@@ -52,11 +52,11 @@ export const columns: BasicColumn[] = [
   },
   {
     title: '密闭内压力',
-    dataIndex: 'interPressure',
+    dataIndex: 'sourcePressure',
   },
   {
     title: '密闭外压力',
-    dataIndex: 'outerPressure',
+    dataIndex: 'sourcePressure',
   },
   {
     title: '是否漏风',

+ 17 - 10
src/views/analysis/warningAnalysis/sealRiskJudgeAnalysis/index.vue

@@ -122,12 +122,12 @@ const [registerTable] = useTable({
   bordered: true,
   showIndexColumn: false,
   canResize: false,
-  actionColumn: {
-    width: 60,
-    title: '操作',
-    dataIndex: 'action',
-    slots: { customRender: 'action' },
-  },
+  // actionColumn: {
+  //   width: 60,
+  //   title: '操作',
+  //   dataIndex: 'action',
+  //   slots: { customRender: 'action' },
+  // },
 });
 
 // 注册历史数据表格
@@ -179,16 +179,17 @@ const [registerHistoryTable] = useTable({
         label: '采空区查询',
         field: 'goafId',
         component: 'Select',
-        defaultValue: goafOptions.value[0] ? goafOptions.value[0]['value'] : '',
         componentProps: {
           showSearch: true,
-          filterOption: (input: string, option: any) => {
+          filterOption: (input, option) => {
             return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
           },
-          options: goafOptions,
-          onChange: async (e, option) => {
+          options: goafOptions.value,
+          onChange: (e) => {
             goafId.value = e;
           },
+          // 可选:无数据时显示提示
+          placeholder: '请先选择煤矿获取采空区数据',
         },
         colProps: {
           span: 6,
@@ -288,6 +289,12 @@ const getGoafDataList = async (mineId) => {
       value: item['deviceCode'],
     };
   });
+  // 可选:数据加载后自动选中第一个选项(如果需要)
+  if (goafOptions.value.length > 0) {
+    goafId.value = goafOptions.value[0]['value'];
+  } else {
+    goafId.value = ''; // 无数据时清空选中值
+  }
 };
 async function getAlarmTotalData() {
   const params = {

+ 9 - 4
src/views/analysis/warningAnalysis/sealRiskJudgeAnalysis/sealRiskJudge.api.ts

@@ -31,10 +31,15 @@ export const getProvinceAlarm = (params) =>
   });
 //查询密闭列表
 export const getGoafData = (params) =>
-  defHttp.post({
-    url: Api.getGoafData,
-    params,
-  });
+  defHttp.post(
+    {
+      url: Api.getGoafData,
+      params,
+    },
+    {
+      joinParamsToUrl: true,
+    }
+  );
 //查询预警历史数据
 export const getProvinceAlarmHistory = (params) =>
   defHttp.post(

+ 5 - 5
src/views/analysis/warningAnalysis/sealRiskJudgeAnalysis/sealRiskJudgeAnalysis.data.ts

@@ -52,23 +52,23 @@ export const columns: BasicColumn[] = [
   },
   {
     title: 'CO(ppm)',
-    dataIndex: 'COVal',
+    dataIndex: 'coVal',
   },
   {
     title: 'CH4(%)',
-    dataIndex: 'CH4Val',
+    dataIndex: 'ch4Val',
   },
   {
     title: 'C2H4(ppm)',
-    dataIndex: 'C2H4Val',
+    dataIndex: 'c2h4Val',
   },
   {
     title: 'C2H2(ppm)',
-    dataIndex: 'C2H2Val',
+    dataIndex: 'c2h2Val',
   },
   {
     title: 'O2(%)',
-    dataIndex: 'O2Val',
+    dataIndex: 'o2Val',
   },
   {
     title: '爆炸危险性',