|
|
@@ -9,11 +9,26 @@ import {context, pageContext, searchContext} from '../context';
|
|
|
import {exportGSErrorInterface, getGSErrorInterface} from '@apis';
|
|
|
import {Card} from 'antd';
|
|
|
import {Table, TableTools} from '@components';
|
|
|
-import {useColumns} from './hooks';
|
|
|
+import {ColumnsType} from 'antd/es/table';
|
|
|
+import {GSErrorListData} from '@models';
|
|
|
+import {
|
|
|
+ NORMAL_TABLE_WIDTH,
|
|
|
+ HUGE_TABLE_WIDTH,
|
|
|
+ SMALL_TABLE_WIDTH,
|
|
|
+ MIDDLE_TABLE_WIDTH,
|
|
|
+} from '@utils';
|
|
|
+
|
|
|
+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},
|
|
|
+ {title: '请求类型', dataIndex: 'type', width: SMALL_TABLE_WIDTH},
|
|
|
+ {title: '请求时间', dataIndex: 'scrq', width: MIDDLE_TABLE_WIDTH},
|
|
|
+];
|
|
|
|
|
|
const TableList: FC = function() {
|
|
|
const params = useContextSection(context, state => state[0]);
|
|
|
- const [{data, count}, {refetch}] = useQueryTableList({
|
|
|
+ const [{data, count}] = useQueryTableList({
|
|
|
queryFn: getGSErrorInterface,
|
|
|
params,
|
|
|
pageContext,
|
|
|
@@ -24,7 +39,6 @@ const TableList: FC = function() {
|
|
|
context,
|
|
|
fn: exportGSErrorInterface,
|
|
|
});
|
|
|
- const columns = useColumns(refetch);
|
|
|
|
|
|
return (
|
|
|
<Card className="table-wrapper">
|