diff --git a/components.d.ts b/components.d.ts index d6fb45b..94c93f7 100644 --- a/components.d.ts +++ b/components.d.ts @@ -21,11 +21,8 @@ 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'] @@ -34,7 +31,6 @@ 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'] @@ -44,11 +40,7 @@ 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/views/home/content/Content.vue b/src/views/home/content/Content.vue index 1290e6f..40e599f 100644 --- a/src/views/home/content/Content.vue +++ b/src/views/home/content/Content.vue @@ -252,12 +252,46 @@ async function oneCheck() { const asideVal = cloneDeep(configStore.getAsideValue) asideVal.izyear = dayjs(asideVal.izyear[0]).format("YYYY/MM/DD") + '-' + dayjs(asideVal.izyear[1]).format("YYYY/MM/DD") const tasksLoadingModal = queryRepeatedTasksModalRef.value as any + + console.log('calNum.value111111111111111', calNum.value, checkTaskStatus.value); + if(calNum.value == 0 && isRefresh.value) { + if(timer.value) { + clearInterval(timer.value); + } + timer.value = setInterval(() => { + console.log('calNum.value2222222222222', calNum.value,checkTaskStatus.value); + if (checkDuplicateNo.value) { + getCheckDuplicateStatus(checkDuplicateNo.value).then((res) => { + if (res.code === "OK") { + checkTaskStatus.value = res.data.status; + if(calNum.value < 90) { + calNum.value = calNum.value + 10; + } + configStore.setTimeNum(calNum.value); + if(checkTaskStatus.value === 2 || checkTaskStatus.value === 3) { + if(checkTaskStatus.value === 2) { + message.success('任务执行完毕,正在刷新数据...'); + }else { + message.error('查询异常'); + } + tasksLoadingModal.closeOnlyModal(); + configStore.setTimeNum(100); + if(timer.value) { + clearInterval(timer.value); + } + setTimeout(() => { + configStore.setTimeNum(0); + }, 1000); + } + }}) + } + }, 1000); + } // 查重任务编号,状态不为空,或者状态执行中.. - tasksLoadingModal.showModal() if(checkDuplicateNo.value && checkTaskStatus.value && checkTaskStatus.value===1){// 暂时rao - return; + tasksLoadingModal.showModal() + return; } - debugger //调用查重任务开启流程 oneClickCheckTaskPackage(asideVal).then((res) => { if (res.code === "OK") { @@ -455,8 +489,6 @@ function refresh(val?: any) { if ((checkTaskStatus.value === 2 || checkTaskStatus.value === 3) && isRefresh.value) { configStore.setTimeNum(100); - // const tasksLoadingModal = queryRepeatedTasksModalRef.value as any - // tasksLoadingModal.closeModal(); checkingTaskModal.closeModal() isRefresh.value = false if(checkTaskStatus.value === 2) { @@ -471,25 +503,7 @@ function refresh(val?: any) { loadMore() configStore.setTimeNum(0); } else if (checkTaskStatus.value === 1) { - // const tasksLoadingModal = queryRepeatedTasksModalRef.value as any - // tasksLoadingModal.showModal(); - if(calNum.value < 90) { - calNum.value = calNum.value + 10; - // console.log("calNum.value计算后的值",calNum.value); - } - configStore.setTimeNum(calNum.value); - // console.log("calNum.value timer.value外面------", timer.value, calNum.value, isRefresh.value); - if(calNum.value == 10 && isRefresh.value) { - if(timer.value) { - clearInterval(timer.value); - } - timer.value = setInterval(() => { - // console.log("calNum.value timer.value里面------", timer.value, calNum.value); - refresh(); - }, 200); - } - // checkingTaskModal.showModal() - // return + return } } }) diff --git a/src/views/home/content/modal/QueryRepeatedTasksModal.vue b/src/views/home/content/modal/QueryRepeatedTasksModal.vue index 81970a7..19f520a 100644 --- a/src/views/home/content/modal/QueryRepeatedTasksModal.vue +++ b/src/views/home/content/modal/QueryRepeatedTasksModal.vue @@ -29,9 +29,14 @@ function closeModal() { emit('closeCallback', true) } +function closeOnlyModal() { + show.value = false +} + defineExpose({ showModal, closeModal, + closeOnlyModal, }) const configStore = useConfig()