Commit 6688ab229c3ebc81ff3c29a9ae22682ad618c9a7

Authored by xp.Huang
2 parents 218fe711 44a3210a

Merge branch 'fix/teambition/24-10-10' into 'main_dev'

fix: openapi应用调用记录跳转分页

See merge request yunteng/thingskit-front!1500
  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,
... ...