From d6cdc715b56c149a85be97bbf553963fd103420f Mon Sep 17 00:00:00 2001 From: aixianling Date: Mon, 31 Oct 2022 11:23:30 +0800 Subject: [PATCH] BUG 31150 --- .../components/organizationSetting.vue | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/project/pingchang/apps/AppOrganizationChange/components/organizationSetting.vue b/project/pingchang/apps/AppOrganizationChange/components/organizationSetting.vue index e37d0d5b..648f1d95 100644 --- a/project/pingchang/apps/AppOrganizationChange/components/organizationSetting.vue +++ b/project/pingchang/apps/AppOrganizationChange/components/organizationSetting.vue @@ -87,7 +87,8 @@ export default { computed: { ...mapState(['user']), isMakeUp: v => v.$route.hash == "#makeup", - pageTitle: v => v.isMakeUp ? "补录换届" : "换届设置" + pageTitle: v => v.isMakeUp ? "补录换届" : "换届设置", + oid: v => v.$route.query.oid }, watch: { 'form.type'() { @@ -95,7 +96,9 @@ export default { } }, created() { - this.org = new this.MODEL.PartyOrg(this.$route.query.oid) + if (!!this.oid) { + this.org = new this.MODEL.PartyOrg(this.oid) + } !!this.isMakeUp ? this.getSession() : this.getDetail() }, methods: { @@ -113,7 +116,7 @@ export default { pureBack: true, params: {id} }).then((res) => { - if (res?.data&&res?.code=='0') { + if (res?.data && res?.code == '0') { this.form = res.data } }) @@ -125,7 +128,7 @@ export default { pureBack: true, params: {organizationId} }).then((res) => { - if (res?.data&&res?.code=='0') { + if (res?.data && res?.code == '0') { this.form = res.data } }) @@ -146,7 +149,8 @@ export default { const action = `/app/${this.isMakeUp ? 'apporganizationgeneralelection' : 'apporganizationchangeconfig'}/${!!this.form.id ? 'update' : 'add'}` const addOrMakeup = !this.isMakeUp this.instance.post(action, { - ...this.form, organizationId, organizationName, addOrMakeup + organizationId, organizationName, + ...this.form, addOrMakeup }).then(res => { if (res.code == 0) { this.$message.success('提交成功')