diff --git a/src/apps/AppSpecialPeople/AppSpecialPeople.vue b/src/apps/AppSpecialPeople/AppSpecialPeople.vue index ced3e67e..e130bd80 100644 --- a/src/apps/AppSpecialPeople/AppSpecialPeople.vue +++ b/src/apps/AppSpecialPeople/AppSpecialPeople.vue @@ -108,7 +108,7 @@ export default { return this.user.girdCheckType != 0 }, isAdmin() { - return this.user.girdCheckType == 1 + return this.user.girdCheckType == 2 }, }, created() { diff --git a/src/apps/AppSpecialPeople/add.vue b/src/apps/AppSpecialPeople/add.vue index 91ca6ec3..39c50ea5 100644 --- a/src/apps/AppSpecialPeople/add.vue +++ b/src/apps/AppSpecialPeople/add.vue @@ -205,8 +205,10 @@ export default { onShow() { if (this.isEdit) { document.title = "编辑人员" - this.appId = this.$route.query.appId - this.getDetail() + if (!this.appId) { + let {appId: value} = this.$route.query + Promise.all([this.getDetail(), this.typeConfirm([{value}])]).then(() => this.$forceUpdate()) + } } else { document.title = '新增人员' if (this.$route.query.appId && !this.appId) { @@ -238,7 +240,7 @@ export default { typeConfirm(e) { this.appId = e[0].value this.appName = e[0].label - this.$http.post(`/app/appapplicationinfo/queryApplicationInfo?appId=${this.appId}`).then((res) => { + return this.$http.post(`/app/appapplicationinfo/queryApplicationInfo?appId=${this.appId}`).then((res) => { if (res?.data) { this.formData = {} let data = res.data @@ -469,13 +471,13 @@ export default { }, getDetail() { let {id, appId} = this.$route.query - id && this.$http.post("/app/appapplicationinfo/queryDetailById", null, { + return id ? this.$http.post("/app/appapplicationinfo/queryDetailById", null, { params: {id, appId} }).then(res => { if (res?.data) { this.formData = res.data } - }) + }) : Promise.resolve() } } }