diff --git a/components.d.ts b/components.d.ts index 94c93f7..d6fb45b 100644 --- a/components.d.ts +++ b/components.d.ts @@ -21,8 +21,11 @@ declare module 'vue' { NDialogProvider: typeof import('naive-ui')['NDialogProvider'] NDivider: typeof import('naive-ui')['NDivider'] NDropdown: typeof import('naive-ui')['NDropdown'] + NEllipsis: typeof import('naive-ui')['NEllipsis'] + NEmpty: typeof import('naive-ui')['NEmpty'] NForm: typeof import('naive-ui')['NForm'] NFormItem: typeof import('naive-ui')['NFormItem'] + NGi: typeof import('naive-ui')['NGi'] NGrid: typeof import('naive-ui')['NGrid'] NGridItem: typeof import('naive-ui')['NGridItem'] NImage: typeof import('naive-ui')['NImage'] @@ -31,6 +34,7 @@ declare module 'vue' { NModal: typeof import('naive-ui')['NModal'] NNotificationProvider: typeof import('naive-ui')['NNotificationProvider'] NotPassed: typeof import('./src/components/NotPassed.vue')['default'] + NPopconfirm: typeof import('naive-ui')['NPopconfirm'] NPopover: typeof import('naive-ui')['NPopover'] NPopselect: typeof import('naive-ui')['NPopselect'] NProgress: typeof import('naive-ui')['NProgress'] @@ -40,7 +44,11 @@ declare module 'vue' { NSpace: typeof import('naive-ui')['NSpace'] NSpin: typeof import('naive-ui')['NSpin'] NSwitch: typeof import('naive-ui')['NSwitch'] + NTabPane: typeof import('naive-ui')['NTabPane'] + NTabs: typeof import('naive-ui')['NTabs'] NTag: typeof import('naive-ui')['NTag'] + NTimeline: typeof import('naive-ui')['NTimeline'] + NTimelineItem: typeof import('naive-ui')['NTimelineItem'] NTooltip: typeof import('naive-ui')['NTooltip'] NUpload: typeof import('naive-ui')['NUpload'] NUploadDragger: typeof import('naive-ui')['NUploadDragger'] diff --git a/src/api/final/index.ts b/src/api/final/index.ts index 10d4f30..fab2e62 100644 --- a/src/api/final/index.ts +++ b/src/api/final/index.ts @@ -68,31 +68,16 @@ export async function repetitionTask() { * @returns */ export async function getRepeatList(params: FinalParam) { - const notEmptyParams = pickBy(params, notEmpty) - - Object.keys(notEmptyParams).forEach((key) => { - const val = notEmptyParams[key] - - if (key === 'izuptime') { - const start = formatToDate2(val[0]) - const end = formatToDate2(val[1]) - notEmptyParams[key] = `${start}-${end}` - } - - if (Array.isArray(notEmptyParams[key])) - notEmptyParams[key] = val.join(',') - }) - const res = await http.request({ url: `/flow/task/repetitionTaskList`, method: 'get', - params: notEmptyParams, + params, }) - const { data: { list, totalPage, totalCount } } = res + const { data: { records, totalPage, totalCount } } = res return { pageCount: totalPage, - data: list, + data: records, totalCount, } } diff --git a/src/views/final/comp/RepeatTaskTableModal.vue b/src/views/final/comp/RepeatTaskTableModal.vue index 0b62d37..00947ed 100644 --- a/src/views/final/comp/RepeatTaskTableModal.vue +++ b/src/views/final/comp/RepeatTaskTableModal.vue @@ -40,10 +40,6 @@ onBeforeMount(() => { dicStore.fetchizstatusListt() }) -function showModal() { - show.value = true -} - function closeModal() { show.value = false } @@ -53,10 +49,6 @@ async function handleSumbit(e: MouseEvent) { closeModal() } -defineExpose({ - showModal, -}) - const columns: DataTableColumns = [ { type: 'selection', @@ -190,7 +182,7 @@ async function query(page: number, pageSize: number) { const result = await getRepeatList({ sortorder: 'asc', pageSize: pagination.pageSize, - currPage: 1, + pageNo: 1, sortname: '', }) console.log(666666) @@ -351,12 +343,21 @@ function rejectHandler(list) { const modal = unref(notPassModalRef)! as any modal.showModal(list) } -query(pagination.page, pagination.pageSize) +// query(pagination.page, pagination.pageSize) +function showModal() { + query(pagination.page, pagination.pageSize) + + show.value = true +} function reload() { selectionIds.value = [] checkedRowKeys.value = [] } + +defineExpose({ + showModal, +})