From f7eab5893ad5ba8f14d66ddd9a3ecec78661fb74 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Sun, 15 Dec 2024 22:53:26 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20AI=E5=88=9B=E5=BB=BA=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E7=A1=AE=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../js/pages/manage/components/DialogWrapper.vue | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/resources/assets/js/pages/manage/components/DialogWrapper.vue b/resources/assets/js/pages/manage/components/DialogWrapper.vue index 44a6fb0c9..8ada3b24c 100644 --- a/resources/assets/js/pages/manage/components/DialogWrapper.vue +++ b/resources/assets/js/pages/manage/components/DialogWrapper.vue @@ -3216,6 +3216,15 @@ export default { }); }, + applyCreateBefore(type, event, el) { + $A.modalConfirm({ + content: `你确定要创建${type === 'task' ? '任务' : '子任务'}吗?`, + onOk: () => { + this.applyCreateTask(type, event, el); + } + }); + }, + async applyCreateTask(type, event, el) { const currentTarget = event.target; if (currentTarget.classList.contains('applying') || currentTarget.classList.contains('applied')) { @@ -3444,14 +3453,14 @@ export default { // 创建任务 if (target.classList.contains('apply-create-task-button')) { this.operateItem = this.findMsgByElement(el) - this.applyCreateTask('task', event, el) + this.applyCreateBefore('task', event, el) return; } // 创建子任务 if (target.classList.contains('apply-create-subtask-button')) { this.operateItem = this.findMsgByElement(el) - this.applyCreateTask('subtask', event, el) + this.applyCreateBefore('subtask', event, el) return; }