Bläddra i källkod

安全监控分站问题修改

bobo04052021@163.com 4 månader sedan
förälder
incheckning
5fb1325609

+ 8 - 7
src/views/vent/safetyList/common/HistoryTable.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="history-table" v-if="loading">
-    <BasicTable ref="historyTable" @register="registerTable" :data-source="dataSource">
+    <BasicTable ref="historyTable" @register="registerTable" :data-source="dataSource" :columns="historyColumns">
       <template #form-submitBefore>
         <a-button type="primary" preIcon="ant-design:search-outlined" @click="getDataSource">查询</a-button>
         <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXlsFn">导出</a-button>
@@ -13,7 +13,7 @@
 //ts语法
 import { watchEffect, ref, watch, defineExpose, inject, nextTick, onMounted, computed } from 'vue';
 import { subStationList } from '../safetyList.api';
-// import { historyColumns } from '../historyLsit.data';
+import { historyColumns } from '../historyLsit.data';
 import { FormSchema } from '/@/components/Form/index';
 import { BasicTable } from '/@/components/Table';
 import { useListPage } from '/@/hooks/system/useListPage';
@@ -124,17 +124,18 @@ async function getDataSource() {
   dataSource.value = [];
   setLoading(true);
   const params = await resetFormParam();
-  const result = await defHttp.post(
+  const res = await defHttp.post(
     { url: '/safety/ventanalySubStation/get158StatusLog', params: params },
     { joinParamsToUrl: true, isTransformResponse: false }
   );
-  if (result['records'].length > 0) {
-    dataSource.value = result['records'];
+  console.log(res.result['records']);
+  if (res.result['records'].length > 0) {
+    dataSource.value = res.result['records'];
+    setLoading(false);
   } else {
     dataSource.value = [];
+    setLoading(false);
   }
-  // dataSource.value = result['records'];
-  setLoading(false);
 }
 //导入导出方法
 function onExportXlsFn() {

+ 1 - 1
src/views/vent/safetyList/common/detail.vue

@@ -875,7 +875,7 @@ async function stopDebug() {
 async function handleOk() {
   let res = await runDeviceMonitor({ devId: devId.value, devName: startupData.address });
   visibleModal.value = false;
-  getStationList1();
+  getStationList1({ subId: stationId.value, pageNo: pagination.current, pageSize: pagination.pageSize });
 }
 function handleCancel() {
   visibleModal.value = false;