From 8272d0653f69c8d48f6572612ac54029cf3b6db1 Mon Sep 17 00:00:00 2001 From: bestlee Date: Wed, 16 Sep 2026 09:20:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=85=E6=88=91=E5=A4=84=E7=90=86-=E5=85=B3?= =?UTF-8?q?=E9=97=AD=E5=8F=98=E6=9B=B4=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/elegant/routes.ts | 2 +- src/service/api/myTasks.ts | 17 ++++++++- src/views/my/pending/index.vue | 63 +++++++++++++++++++++------------- 3 files changed, 57 insertions(+), 25 deletions(-) diff --git a/src/router/elegant/routes.ts b/src/router/elegant/routes.ts index 2c57368..1509780 100644 --- a/src/router/elegant/routes.ts +++ b/src/router/elegant/routes.ts @@ -198,7 +198,7 @@ export const generatedRoutes: GeneratedRoute[] = [ path: '/my/highriskdetail', component: 'view.my_highriskdetail', meta: { - title: '高风险场景详情', + title: '变更详情', constant: true, hideInMenu: true, i18nKey: 'route.my_highriskdetail' diff --git a/src/service/api/myTasks.ts b/src/service/api/myTasks.ts index 3ec0993..3dfdc65 100644 --- a/src/service/api/myTasks.ts +++ b/src/service/api/myTasks.ts @@ -14,4 +14,19 @@ export function myTasksWithdrawApi(id:number,data: {reason:string}) { method: 'post', data, }); -} \ No newline at end of file +} +// 关闭变更 +export function myTasksCloseApi(change_id:number) { + return request({ + url: `/api/changes/${change_id}/close`, + method: 'post', + }); +} +// 资料关闭 +export function myTasksCloseMaterialApi(change_id:number,data: any) { + return request({ + url: `/api/materials/${change_id}/material-close`, + method: 'post', + data, + }); +} diff --git a/src/views/my/pending/index.vue b/src/views/my/pending/index.vue index 9694d87..e5ea011 100644 --- a/src/views/my/pending/index.vue +++ b/src/views/my/pending/index.vue @@ -5,7 +5,7 @@ import { useThemeStore } from '@/store/modules/theme'; import { useRouterPush } from '@/hooks/common/router'; import { tagTextColor, tagBgColor, tagBorderColor } from '@/utils/common'; import { systemConfigApi } from '@/service/api/system'; -import { myTasksListApi, myTasksWithdrawApi } from '@/service/api/myTasks'; +import { myTasksListApi, myTasksWithdrawApi, myTasksCloseApi } from '@/service/api/myTasks'; const themeStore = useThemeStore(); const { routerPushByKey } = useRouterPush(); @@ -88,27 +88,34 @@ const opts = computed(() => { return list; }); -// 打开详情 -const openDetail = (c: any) => { - routerPushByKey("my_highriskdetail",{ query: { id: c.id.toString() } }); -}; -// 打开处置申请、修改重报 -const openDisposal = (c: any,type:string = '') => { - currentRow.value = c; - if(type==='reject'){ - window.$message?.info("该任务暂无处置申请"); - return; +// 打开详情、修改重报 +const openDetail = (c: any,type:string = '') => { + if(type==='detail'){ + routerPushByKey("my_highriskdetail",{ query: { id: c.change_id.toString() } }); } + if(type==='edit'){ + routerPushByKey("my_initiatechange",{ query: { id: c.change_id.toString() } }); + } +}; +// 打开资料关闭 +const openDocClose = (c: any) => { + currentRow.value = c; + // routerPushByKey("my_docclose",{ query: { id: c.change_id.toString() } }); +}; +// 打开处置申请 +const openDisposal = (c: any,) => { + currentRow.value = c; disposalModal.value = true; }; -// 打开资料关闭、关闭变更 -const openClosure = (c: any,type:string = '') => { - if(type==='reject'){ - window.$message?.info("关闭该变更(驳回后不再推进,流程终止并归档备查)"); - return; + +// 关闭变更 +const closeChange = async (c: any) => { + const {error} = await myTasksCloseApi(c?.change_id); + if(!error){ + window.$message?.success(`关闭变更成功`); + getList(); } }; - // 打开进度 const openProgress = (c: any) => { currentRow.value = c; @@ -374,23 +381,33 @@ onMounted(() => {
- 详情 + 详情 进度 撤回
- 详情 + 详情 进度 处置申请 - 资料关闭 + 资料关闭
- 详情 + 详情 进度 - 修改重报 - 关闭变更 + 修改重报 + + + 确定关闭该变更吗? +