Explorar el Código

[Feat 0000]预警分析模块下查询条件变更,样式优化

bobo04052021@163.com hace 3 meses
padre
commit
ef4d790692

+ 7 - 4
src/views/analysis/warningAnalysis/airLeakStatus/airLeak.api.ts

@@ -20,10 +20,13 @@ export const getProvinceAlarmNum = (params) =>
   );
 //查询煤矿列表
 export const getMineData = (params) =>
-  defHttp.post({
-    url: Api.getMineData,
-    params,
-  });
+  defHttp.post(
+    {
+      url: Api.getMineData,
+      params,
+    },
+    { joinParamsToUrl: true }
+  );
 //查询密闭列表
 export const getGoafData = (params) =>
   defHttp.post(

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

@@ -80,6 +80,7 @@ const visibleModal = ref(false);
 const visibleresolveModal = ref(false);
 const resolveValue = ref('');
 const resolveId = ref('');
+const mineCodeList = ref('');
 //煤矿列表数据
 const deviceOptions = ref([]);
 const goafOptions = ref([]);
@@ -105,7 +106,7 @@ const [registerTable] = useTable({
     schemas: [
       {
         label: '煤矿名称',
-        field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
+        field: 'mineCodeList', // 对应组件的value.mineCode(最终传给Table的查询参数)
         component: 'MineCascader', // 自定义组件名
         colProps: { span: 6 },
       },
@@ -119,7 +120,7 @@ const [registerTable] = useTable({
   bordered: true,
   showIndexColumn: false,
   actionColumn: {
-    width: 120,
+    width: 80,
     title: '操作',
     dataIndex: 'action',
     slots: { customRender: 'action' },
@@ -242,17 +243,17 @@ const openModal = (record, type) => {
     historyModalRef.value?.showModal(record);
   }
 };
-async function fetchAlarmData(id) {
-  const params = {
-    // 填写所需参数
-    alarmType: 'leakageAlarm',
-    mineId: id,
-    pageNo: 1,
-    pageSize: 50,
-  };
-  const result = await getProvinceAlarm(params);
-  minesData.value = result.records;
-}
+// async function fetchAlarmData(id) {
+//   const params = {
+//     // 填写所需参数
+//     alarmType: 'leakageAlarm',
+//     mineCodeList: id,
+//     pageNo: 1,
+//     pageSize: 50,
+//   };
+//   const result = await getProvinceAlarm(params);
+//   minesData.value = result.records;
+// }
 async function getAlarmTotalData() {
   const params = {
     alarmType: 'leakageAlarm',
@@ -278,6 +279,8 @@ const getMineDataList = async () => {
       value: item['mineCode'],
     };
   });
+  mineCodeList.value = deviceOptions.value.map((item) => item.value).join(',');
+  // fetchAlarmData(mineCodeList.value);
 };
 const getGoafDataList = async (mineId) => {
   const params = {

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

@@ -39,7 +39,7 @@ export const columns: BasicColumn[] = [
   {
     title: '煤矿名称',
     dataIndex: 'mineName',
-    width: 100,
+    width: 200,
   },
   {
     title: '密闭名称',

+ 25 - 19
src/views/analysis/warningAnalysis/autoFireAnalysis/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="monitoring-page">
     <!-- 新增Tabs组件区分实时/历史数据 -->
-    <Tabs v-model:activeKey="activeTab" type="line" style="margin-bottom: 16px">
+    <Tabs v-model:activeKey="activeTab" type="line" class="common-page-tabs">
       <TabPane tab="实时监测" key="realtime">
         <div class="board-info">
           <MiniBoard
@@ -19,8 +19,8 @@
           <template #action="{ record }">
             <div class="action-buttons">
               <!-- 操作按钮 -->
-              <button @click="openModal(record, 'detail')" class="action-btn detail-btn" title="操作">
-                <span class="action-text">详情</span>
+              <button @click="openModal(record, 'resolved')" class="action-btn resolved-btn" title="已解决">
+                <span class="action-text">解决</span>
               </button>
             </div>
           </template>
@@ -42,14 +42,15 @@
     </Tabs>
     <!-- 弹窗组件 -->
     <a-modal
-      style="top: 30%; left: 170px"
-      v-model:visible="visibleModal"
-      :width="450"
-      title="实时监测数据"
-      @ok="handleOkEdit"
+      style="height: 400px"
+      v-model:visible="visibleresolveModal"
+      :width="600"
+      centered
+      title="密闭漏风处理情况"
+      @ok="handleOkEdit()"
       @cancel="handleCancelEdit"
     >
-      <a-table></a-table>
+      <a-textarea style="width: 90%; margin-left: 20px; margin-right: 20px" v-model:value="resolveValue" placeholder="请输入解决情况" :rows="4" />
     </a-modal>
   </div>
 </template>
@@ -71,6 +72,8 @@ const deviceOptions = ref([]);
 const goafOptions = ref([]);
 const mineCode = ref('');
 const goafId = ref('');
+const visibleresolveModal = ref(false); //解决弹窗状态
+const resolveValue = ref('');
 const boardData = ref([
   {
     label: '存在风险情况数量',
@@ -104,7 +107,7 @@ const [registerTable] = useTable({
     schemas: [
       {
         label: '煤矿名称',
-        field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
+        field: 'mineCodeList', // 对应组件的value.mineCode(最终传给Table的查询参数)
         component: 'MineCascader', // 自定义组件名
         colProps: { span: 6 },
         rules: [],
@@ -118,13 +121,13 @@ const [registerTable] = useTable({
   useSearchForm: true,
   bordered: true,
   showIndexColumn: false,
-  // actionColumn: {
-  //   width: 60,
-  //   title: '操作',
-  //   dataIndex: 'action',
-  //   slots: { customRender: 'action' },
-  //   fixed: undefined,
-  // },
+  actionColumn: {
+    width: 80,
+    title: '操作',
+    dataIndex: 'action',
+    slots: { customRender: 'action' },
+    fixed: undefined,
+  },
 });
 
 // 注册历史数据表格
@@ -231,6 +234,9 @@ const openModal = (record, type) => {
   if (type === 'realtime') {
     // 可向实时弹窗传递当前记录数据
     realtimeModalRef.value?.showModal(record);
+  } else if (type === 'resolved') {
+    visibleresolveModal.value = true;
+    record.isResolved = resolveValue.value || '';
   } else if (type === 'detail') {
     visibleModal.value = true;
   } else {
@@ -239,10 +245,10 @@ const openModal = (record, type) => {
   }
 };
 const handleOkEdit = () => {
-  visibleModal.value = false;
+  visibleresolveModal.value = false;
 };
 const handleCancelEdit = () => {
-  visibleModal.value = false;
+  visibleresolveModal.value = false;
 };
 async function fetchAlarmData(id) {
   const params = {

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

@@ -39,7 +39,7 @@ export const columns: BasicColumn[] = [
   {
     title: '煤矿名称',
     dataIndex: 'mineName',
-    width: 200,
+    width: 160,
   },
   {
     title: '密闭名称',

+ 25 - 19
src/views/analysis/warningAnalysis/fireAreaJudgeAnalysis/index.vue

@@ -18,9 +18,9 @@
       <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="操作">
-              <span class="action-text">详情</span>
+            <!-- 已解决按钮 -->
+            <button @click="openModal(record, 'resolved')" class="action-btn resolved-btn" title="已解决">
+              <span class="action-text">解决</span>
             </button>
           </div>
         </template>
@@ -42,14 +42,15 @@
   </Tabs>
   <!-- 弹窗组件 -->
   <a-modal
-    style="top: 30%; left: 170px"
-    v-model:visible="visibleModal"
-    :width="450"
-    title="实时监测数据"
-    @ok="handleOkEdit"
+    style="height: 400px"
+    v-model:visible="visibleresolveModal"
+    :width="600"
+    centered
+    title="密闭漏风处理情况"
+    @ok="handleOkEdit()"
     @cancel="handleCancelEdit"
   >
-    <a-table></a-table>
+    <a-textarea style="width: 90%; margin-left: 20px; margin-right: 20px" v-model:value="resolveValue" placeholder="请输入解决情况" :rows="4" />
   </a-modal>
 </template>
 
@@ -70,6 +71,8 @@ const deviceOptions = ref([]);
 const goafOptions = ref([]);
 const mineCode = ref('');
 const goafId = ref('');
+const visibleresolveModal = ref(false);
+const resolveValue = ref('');
 const boardData = ref([
   {
     label: '采空区数量',
@@ -95,7 +98,7 @@ const [registerTable] = useTable({
     schemas: [
       {
         label: '煤矿名称',
-        field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
+        field: 'mineCodeList', // 对应组件的value.mineCode(最终传给Table的查询参数)
         component: 'MineCascader', // 自定义组件名
         colProps: { span: 6 },
         rules: [],
@@ -109,13 +112,13 @@ const [registerTable] = useTable({
   useSearchForm: true,
   bordered: true,
   showIndexColumn: false,
-  // actionColumn: {
-  //   width: 120,
-  //   title: '详情',
-  //   dataIndex: 'action',
-  //   slots: { customRender: 'action' },
-  //   fixed: undefined,
-  // },
+  actionColumn: {
+    width: 80,
+    title: '详情',
+    dataIndex: 'action',
+    slots: { customRender: 'action' },
+    fixed: undefined,
+  },
 });
 
 // 注册历史数据表格
@@ -222,6 +225,9 @@ const openModal = (record, type) => {
   if (type === 'realtime') {
     // 可向实时弹窗传递当前记录数据
     realtimeModalRef.value?.showModal(record);
+  } else if (type === 'resolved') {
+    visibleresolveModal.value = true;
+    record.isResolved = resolveValue.value || '';
   } else if (type === 'detail') {
     visibleModal.value = true;
   } else {
@@ -230,10 +236,10 @@ const openModal = (record, type) => {
   }
 };
 const handleOkEdit = () => {
-  visibleModal.value = false;
+  visibleresolveModal.value = false;
 };
 const handleCancelEdit = () => {
-  visibleModal.value = false;
+  visibleresolveModal.value = false;
 };
 async function fetchAlarmData(id) {
   const params = {

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

@@ -19,8 +19,8 @@
         <template #action="{ record }">
           <div class="action-buttons">
             <!-- 操作按钮 -->
-            <button @click="openModal(record, 'detail')" class="action-btn detail-btn" title="操作">
-              <span class="action-text">详情</span>
+            <button @click="openModal(record, 'resolved')" class="action-btn detail-btn" title="已解决">
+              <span class="action-text">解决</span>
             </button>
           </div>
         </template>
@@ -71,6 +71,8 @@ const deviceOptions = ref([]);
 const goafOptions = ref([]);
 const mineCode = ref('');
 const goafId = ref('');
+const visibleresolveModal = ref(false);
+const resolveValue = ref('');
 const boardData = ref([
   {
     label: '存在风险情况数量',
@@ -104,7 +106,7 @@ const [registerTable] = useTable({
     schemas: [
       {
         label: '煤矿名称',
-        field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
+        field: 'mineCodeList', // 对应组件的value.mineCode(最终传给Table的查询参数)
         component: 'MineCascader', // 自定义组件名
         colProps: { span: 6 },
         rules: [],
@@ -119,8 +121,8 @@ const [registerTable] = useTable({
   bordered: true,
   showIndexColumn: false,
   actionColumn: {
-    width: 120,
-    title: '详情',
+    width: 80,
+    title: '操作',
     dataIndex: 'action',
     slots: { customRender: 'action' },
     fixed: undefined,
@@ -231,6 +233,9 @@ const openModal = (record, type) => {
   if (type === 'realtime') {
     // 可向实时弹窗传递当前记录数据
     realtimeModalRef.value?.showModal(record);
+  } else if (type === 'resolved') {
+    visibleresolveModal.value = true;
+    record.isResolved = resolveValue.value || '';
   } else if (type === 'detail') {
     visibleModal.value = true;
   } else {
@@ -239,10 +244,10 @@ const openModal = (record, type) => {
   }
 };
 const handleOkEdit = () => {
-  visibleModal.value = false;
+  visibleresolveModal.value = false;
 };
 const handleCancelEdit = () => {
-  visibleModal.value = false;
+  visibleresolveModal.value = false;
 };
 async function fetchAlarmData(id) {
   const params = {

+ 2 - 2
src/views/analysis/warningAnalysis/pressureDiffAnalysis/index.vue

@@ -122,7 +122,7 @@ const [registerTable] = useTable({
     schemas: [
       {
         label: '煤矿名称',
-        field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
+        field: 'mineCodeList', // 对应组件的value.mineCode(最终传给Table的查询参数)
         component: 'MineCascader', // 自定义组件名
         colProps: { span: 6 },
         rules: [],
@@ -137,7 +137,7 @@ const [registerTable] = useTable({
   bordered: true,
   showIndexColumn: false,
   actionColumn: {
-    width: 120,
+    width: 80,
     title: '操作',
     dataIndex: 'action',
     slots: { customRender: 'action' },

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

@@ -18,8 +18,8 @@
       <BasicTable @register="registerTable" :scroll="{ x: 'max-content' }" :style="{ padding: 0 }">
         <!-- 核心:判断record是否有有效数据,无则显示- -->
         <template #action="{ record }">
-          <button @click="openModal(record, 'detail')" class="action-btn detail-btn" title="操作">
-            <span class="action-text">详情</span>
+          <button @click="openModal(record, 'resolved')" class="action-btn detail-btn" title="已解决">
+            <span class="action-text">解决</span>
           </button>
         </template>
         <template #empty>
@@ -73,6 +73,8 @@ const deviceOptions = ref([]);
 const goafOptions = ref([]);
 const mineCode = ref('');
 const goafId = ref('');
+const visibleresolveModal = ref(false);
+const resolveValue = ref('');
 const boardData = ref([
   {
     label: '采空区数量',
@@ -106,7 +108,7 @@ const [registerTable] = useTable({
     schemas: [
       {
         label: '煤矿名称',
-        field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
+        field: 'mineCodeList', // 对应组件的value.mineCode(最终传给Table的查询参数)
         component: 'MineCascader', // 自定义组件名
         colProps: { span: 6 },
         rules: [],
@@ -120,12 +122,13 @@ const [registerTable] = useTable({
   useSearchForm: true,
   bordered: true,
   showIndexColumn: false,
-  // actionColumn: {
-  //   width: 60,
-  //   title: '操作',
-  //   dataIndex: 'action',
-  //   slots: { customRender: 'action' },
-  // },
+  actionColumn: {
+    width: 80,
+    title: '操作',
+    dataIndex: 'action',
+    slots: { customRender: 'action' },
+    fixed: undefined,
+  },
 });
 
 // 注册历史数据表格
@@ -232,6 +235,9 @@ const openModal = (record, type) => {
   if (type === 'realtime') {
     // 可向实时弹窗传递当前记录数据
     realtimeModalRef.value?.showModal(record);
+  } else if (type === 'resolved') {
+    visibleresolveModal.value = true;
+    record.isResolved = resolveValue.value || '';
   } else if (type === 'detail') {
     visibleModal.value = true;
   } else {
@@ -240,10 +246,10 @@ const openModal = (record, type) => {
   }
 };
 const handleOkEdit = () => {
-  visibleModal.value = false;
+  visibleresolveModal.value = false;
 };
 const handleCancelEdit = () => {
-  visibleModal.value = false;
+  visibleresolveModal.value = false;
 };
 async function fetchAlarmData(id) {
   const params = {

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

@@ -39,7 +39,7 @@ export const columns: BasicColumn[] = [
   {
     title: '煤矿名称',
     dataIndex: 'mineName',
-    width: 200,
+    width: 160,
   },
   {
     title: '密闭名称',