From 6108f3ce82bedffd30ca32fdc13c8b707b55271a Mon Sep 17 00:00:00 2001 From: zhl Date: Sat, 8 May 2021 16:23:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E7=BC=96=E8=BE=91=E6=B4=BB?= =?UTF-8?q?=E5=8A=A8=E6=97=B6,=20=E6=97=A0=E6=B3=95=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=B7=B2=E9=80=89=E9=A2=98=E5=BA=93=E5=88=86=E7=B1=BB=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/activity/edit.vue | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/views/activity/edit.vue b/src/views/activity/edit.vue index 1a3e7bb..0fb64a6 100644 --- a/src/views/activity/edit.vue +++ b/src/views/activity/edit.vue @@ -483,14 +483,15 @@ export default class extends Vue { this.initTimes() const id = this.$route.params?.id await this.getRemoteCategory() + if (id) { + await this.fetchData(id) + } if (UserModule.level === 1) { await this.getRemoteDeptList() } else { this.postForm.shop = UserModule.department } - if (id) { - await this.fetchData(id) - } + this.tempTagView = Object.assign({}, this.$route) } @@ -639,9 +640,7 @@ export default class extends Vue { if (this.postForm.qtypes?.length > 0) { this.typeSelected = this.postForm.qtypes - return - } - if (this.postForm.shop) { + } else if (this.postForm.shop) { let currentShop for (const p of this.allDepts) { if (p._id === this.postForm.shop) { @@ -654,8 +653,8 @@ export default class extends Vue { } else { this.typeSelected = [] } - this.$refs.typeTree.setCheckedKeys(this.typeSelected) } + this.$refs.typeTree.setCheckedKeys(this.typeSelected) } // begin of set puzzle types