From 4ff32511b91d8c3fa873b341184bf9e96eca21f4 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Tue, 8 Mar 2022 00:29:10 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E6=B7=BB=E5=8A=A0=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E9=80=89=E4=B8=AD=E8=87=AA=E5=B7=B1=EF=BC=8C?= =?UTF-8?q?=E5=A6=82=E6=9E=9C=E4=B8=8D=E9=80=89=E5=88=99=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=97=A0=E8=B4=9F=E8=B4=A3=E4=BA=BA=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/assets/js/pages/manage.vue | 2 +- resources/assets/js/pages/manage/calendar.vue | 2 +- .../assets/js/pages/manage/components/TaskAdd.vue | 12 ++++-------- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/resources/assets/js/pages/manage.vue b/resources/assets/js/pages/manage.vue index 9293d34fa..6e8436018 100644 --- a/resources/assets/js/pages/manage.vue +++ b/resources/assets/js/pages/manage.vue @@ -799,7 +799,7 @@ export default { onAddTask(data) { this.$refs.addTask.defaultPriority(); this.$refs.addTask.setData($A.isJson(data) ? data : { - 'owner': this.userId, + 'owner': [this.userId], 'column_id': data, }); this.addTaskShow = true; diff --git a/resources/assets/js/pages/manage/calendar.vue b/resources/assets/js/pages/manage/calendar.vue index 1b4423738..df0242557 100644 --- a/resources/assets/js/pages/manage/calendar.vue +++ b/resources/assets/js/pages/manage/calendar.vue @@ -328,7 +328,7 @@ export default { } Store.set('addTask', { times: [start, end], - owner: this.userId, + owner: [this.userId], beforeClose: () => { guide.clearGuideElement(); } diff --git a/resources/assets/js/pages/manage/components/TaskAdd.vue b/resources/assets/js/pages/manage/components/TaskAdd.vue index f2092fdb1..4e13769e4 100644 --- a/resources/assets/js/pages/manage/components/TaskAdd.vue +++ b/resources/assets/js/pages/manage/components/TaskAdd.vue @@ -176,7 +176,7 @@ export default { cascader: [], name: "", content: "", - owner: 0, + owner: [], add_assist: 1, project_id: 0, column_id: 0, @@ -247,11 +247,7 @@ export default { }, showAddAssist() { - const {owner} = this.addData; - if ($A.isArray(owner) && owner.includes(this.userId)) { - return false; - } - return owner != this.userId; + return !this.addData.owner.includes(this.userId); } }, watch: { @@ -376,8 +372,8 @@ export default { if (this.subName.trim() !== '') { this.addData.subtasks.push({ name: this.subName.trim(), + owner: [this.userId], times: [], - owner: this.userId }); this.subName = ''; } @@ -489,7 +485,7 @@ export default { cascader: [], name: "", content: "", - owner: 0, + owner: [], add_assist: 1, column_id: 0, times: [],