Commit 44a3210a909b7d7d8936841d49540adec6c0c17b
Committed by
xp.Huang
1 parent
218fe711
fix: openapi应用调用记录跳转分页
Showing
2 changed files
with
7 additions
and
2 deletions
1 | +import moment from 'moment'; | |
1 | 2 | import { formatClassifyText } from '../../../api/config'; |
2 | 3 | import { DescItem } from '/@/components/Description'; |
3 | 4 | import { useI18n } from '/@/hooks/web/useI18n'; |
... | ... | @@ -27,5 +28,8 @@ export const formSchema: DescItem[] = [ |
27 | 28 | { |
28 | 29 | field: 'requestTime', |
29 | 30 | label: t('application.record.text.callTime'), |
31 | + render: (text) => { | |
32 | + return moment(text).format('YYYY-MM-DD HH:mm:ss'); | |
33 | + }, | |
30 | 34 | }, |
31 | 35 | ]; | ... | ... |
... | ... | @@ -15,7 +15,7 @@ |
15 | 15 | |
16 | 16 | const onCloseVal = ref(0); |
17 | 17 | |
18 | - const [registerTable, { reload, getForm, setTableData }] = useTable({ | |
18 | + const [registerTable, { reload, getForm, setTableData, setPagination }] = useTable({ | |
19 | 19 | api: applicationRecordPage, |
20 | 20 | immediate: false, |
21 | 21 | columns, |
... | ... | @@ -79,13 +79,14 @@ |
79 | 79 | |
80 | 80 | const setInitQueryTable = async () => { |
81 | 81 | if (getPathUrlName.value !== '') { |
82 | - const { items } = (await applicationRecordPage({ | |
82 | + const { items, total } = (await applicationRecordPage({ | |
83 | 83 | page: 1, |
84 | 84 | pageSize: 10, |
85 | 85 | applicationName: getPathUrlName.value, |
86 | 86 | })) as any; |
87 | 87 | nextTick(() => { |
88 | 88 | setTableData(items); |
89 | + setPagination({ total }); | |
89 | 90 | const { setFieldsValue, resetFields } = getForm(); |
90 | 91 | setFieldsValue({ |
91 | 92 | applicationName: getPathUrlName.value, | ... | ... |