From 8507763b45720397e960923959cae6d72b87ebd9 Mon Sep 17 00:00:00 2001 From: Dragon <> Date: Sun, 31 Mar 2024 18:32:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=BB=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/final/index.ts | 38 +- src/views/final/comp/RepeatModal.vue | 11 +- src/views/final/comp/RepeatTaskTableModal.vue | 416 ++++++++++++------ src/views/final/content/Content.vue | 52 ++- 4 files changed, 357 insertions(+), 160 deletions(-) diff --git a/src/api/final/index.ts b/src/api/final/index.ts index e7249f8..10d4f30 100644 --- a/src/api/final/index.ts +++ b/src/api/final/index.ts @@ -30,11 +30,11 @@ export async function getFinalList(params: FinalParam) { params: notEmptyParams, }) - const { data: { list, totalPage,totalCount } } = res + const { data: { list, totalPage, totalCount } } = res return { pageCount: totalPage, data: list, - totalCount + totalCount, } } @@ -62,3 +62,37 @@ export async function repetitionTask() { method: 'get', }) } + +/** + * 获取审核列表 + * @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, + }) + + const { data: { list, totalPage, totalCount } } = res + return { + pageCount: totalPage, + data: list, + totalCount, + } +} diff --git a/src/views/final/comp/RepeatModal.vue b/src/views/final/comp/RepeatModal.vue index 8ae0db5..d0ed920 100644 --- a/src/views/final/comp/RepeatModal.vue +++ b/src/views/final/comp/RepeatModal.vue @@ -22,6 +22,7 @@ const { detail, total } = toRefs(state) const show = ref(false) function showModal(id) { + state.total = 0 getDetail(id) } @@ -45,7 +46,13 @@ function closeModal() { } async function reject() { - emit('reject', { a: 'todo' }) + const list = [] + state.detail.forEach((items) => { + items.repeatedTaskList.forEach((item) => { + list.push(item) + }) + }) + emit('reject', list) closeModal() } @@ -157,7 +164,7 @@ defineExpose({ border-radius: 8px; padding: 16px; padding-top: 0; - margin: 45px 12px 35px 38px; + margin: 25px 12px 35px 38px; .imgwrapper { width: 160px; diff --git a/src/views/final/comp/RepeatTaskTableModal.vue b/src/views/final/comp/RepeatTaskTableModal.vue index d0f6d99..0b62d37 100644 --- a/src/views/final/comp/RepeatTaskTableModal.vue +++ b/src/views/final/comp/RepeatTaskTableModal.vue @@ -1,101 +1,156 @@