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 import { formatClassifyText } from '../../../api/config'; 2 import { formatClassifyText } from '../../../api/config';
2 import { DescItem } from '/@/components/Description'; 3 import { DescItem } from '/@/components/Description';
3 import { useI18n } from '/@/hooks/web/useI18n'; 4 import { useI18n } from '/@/hooks/web/useI18n';
@@ -27,5 +28,8 @@ export const formSchema: DescItem[] = [ @@ -27,5 +28,8 @@ export const formSchema: DescItem[] = [
27 { 28 {
28 field: 'requestTime', 29 field: 'requestTime',
29 label: t('application.record.text.callTime'), 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,7 +15,7 @@
15 15
16 const onCloseVal = ref(0); 16 const onCloseVal = ref(0);
17 17
18 - const [registerTable, { reload, getForm, setTableData }] = useTable({ 18 + const [registerTable, { reload, getForm, setTableData, setPagination }] = useTable({
19 api: applicationRecordPage, 19 api: applicationRecordPage,
20 immediate: false, 20 immediate: false,
21 columns, 21 columns,
@@ -79,13 +79,14 @@ @@ -79,13 +79,14 @@
79 79
80 const setInitQueryTable = async () => { 80 const setInitQueryTable = async () => {
81 if (getPathUrlName.value !== '') { 81 if (getPathUrlName.value !== '') {
82 - const { items } = (await applicationRecordPage({ 82 + const { items, total } = (await applicationRecordPage({
83 page: 1, 83 page: 1,
84 pageSize: 10, 84 pageSize: 10,
85 applicationName: getPathUrlName.value, 85 applicationName: getPathUrlName.value,
86 })) as any; 86 })) as any;
87 nextTick(() => { 87 nextTick(() => {
88 setTableData(items); 88 setTableData(items);
  89 + setPagination({ total });
89 const { setFieldsValue, resetFields } = getForm(); 90 const { setFieldsValue, resetFields } = getForm();
90 setFieldsValue({ 91 setFieldsValue({
91 applicationName: getPathUrlName.value, 92 applicationName: getPathUrlName.value,