|
@@ -3,20 +3,13 @@ import {
|
|
|
useQueryTableList,
|
|
useQueryTableList,
|
|
|
useTableExportEvent,
|
|
useTableExportEvent,
|
|
|
} from '@hooks';
|
|
} from '@hooks';
|
|
|
-import {GSErrorListData} from '@models';
|
|
|
|
|
-import {HUGE_TABLE_WIDTH, NORMAL_TABLE_WIDTH} from '@utils';
|
|
|
|
|
-import {ColumnsType} from 'antd/es/table';
|
|
|
|
|
|
|
+
|
|
|
import {FC} from 'react';
|
|
import {FC} from 'react';
|
|
|
import {context, pageContext, searchContext} from '../context';
|
|
import {context, pageContext, searchContext} from '../context';
|
|
|
import {exportGSErrorInterface, getGSErrorInterface} from '@apis';
|
|
import {exportGSErrorInterface, getGSErrorInterface} from '@apis';
|
|
|
import {Card} from 'antd';
|
|
import {Card} from 'antd';
|
|
|
import {Table, TableTools} from '@components';
|
|
import {Table, TableTools} from '@components';
|
|
|
-
|
|
|
|
|
-const columns: ColumnsType<GSErrorListData> = [
|
|
|
|
|
- {title: '请求地址', dataIndex: 'url', width: NORMAL_TABLE_WIDTH},
|
|
|
|
|
- {title: '错误信息', dataIndex: 'errorInfo', width: HUGE_TABLE_WIDTH},
|
|
|
|
|
- {title: '请求内容', dataIndex: 'dataVal', width: HUGE_TABLE_WIDTH},
|
|
|
|
|
-];
|
|
|
|
|
|
|
+import {useColumns} from './hooks';
|
|
|
|
|
|
|
|
const TableList: FC = function () {
|
|
const TableList: FC = function () {
|
|
|
const params = useContextSection(context, state => state[0]);
|
|
const params = useContextSection(context, state => state[0]);
|
|
@@ -31,6 +24,7 @@ const TableList: FC = function () {
|
|
|
context,
|
|
context,
|
|
|
fn: exportGSErrorInterface,
|
|
fn: exportGSErrorInterface,
|
|
|
});
|
|
});
|
|
|
|
|
+ const columns = useColumns(refetch);
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
<Card className='table-wrapper'>
|
|
<Card className='table-wrapper'>
|