diff --git a/app/view/page/taskManagement.html b/app/view/page/taskManagement.html index da067f8..8b461d2 100644 --- a/app/view/page/taskManagement.html +++ b/app/view/page/taskManagement.html @@ -61,10 +61,16 @@ - - mdi-text-box-outline - 查看 - + + + mdi-text-box-outline + 查看 + + + mdi-text-box-outline + 撤回 + + @@ -108,7 +114,7 @@ - + 历史审核记录 @@ -182,7 +188,7 @@ { text: "申请状态", value: "taskStatus" }, { text: "申请时间", value: "taskCreateAt", width: 300 }, { text: "结束时间", value: "taskFinishAt", width: 300 }, - { text: '操作', value: 'action', align: 'center', sortable: false, width: 80, class: 'fixed', cellClass: 'fixed' }, + { text: '操作', value: 'action', align: 'center', sortable: false, width: 150, class: 'fixed', cellClass: 'fixed' }, ], isViewDrawerShown: false, @@ -210,6 +216,11 @@ await this.prepareViewItemData(uiActionData); await this.openViewDrawer(); break; + case 'revokeTask': + await this.confirmRevokeItemDialog(); + await this.doRevokeTask(uiActionData); + await this.getTableData(); + break; default: console.error("[doUiAction] uiActionId not find", { uiActionId }); break; @@ -253,6 +264,33 @@ this.isViewDrawerShown = true; }, // ---------- 查看 uiAction >>>>>>>>>>>> -------- + // ---------- 撤回 uiAction >>>>>>>>>>>> -------- + async confirmRevokeItemDialog() { + if (await window.confirmDialog({title: "撤回", content: "确定撤回吗?"}) === false) { + throw new Error("[confirmDeleteItemDialog] 否"); + } + }, + async doRevokeTask({ taskId }) { + await window.vtoast.loading("修改数据"); + await window.jianghuAxios({ + data: { + appData: { + pageId: 'taskManagement', + actionId: 'updateItem', + actionData: { + taskStatus: 'end', + taskLineType: null, + taskEditUserList: null, + taskEditedUserList: null, + taskFinishAt: dayjs().format('YYYY-MM-DD HH:mm:ss') + }, + where: { taskId: taskId } + } + } + }) + await window.vtoast.success("修改数据成功"); + }, + // ---------- 撤回 uiAction >>>>>>>>>>>> -------- } })