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