From 0784911c73ee6c844ef9591f6376ea6a538e6551 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 29 Aug 2022 16:30:27 +0800 Subject: [PATCH] emm --- .../modules/communityParty/stas/index.vue | 29 ++++++++----------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/src/views/modules/communityParty/stas/index.vue b/src/views/modules/communityParty/stas/index.vue index f6d3b989f..45042991e 100644 --- a/src/views/modules/communityParty/stas/index.vue +++ b/src/views/modules/communityParty/stas/index.vue @@ -13,7 +13,12 @@ size="small" :options="orgList" placeholder="请选择党组织" - :props="partyProps" + :props="{ + checkStrictly: true, + label: 'partyOrgName', + value: 'id', + children: 'children' + }" @change="handleChangeOrg" clearable/> @@ -123,7 +128,6 @@ export default { }, tableData: [], orgList: [], - allOrgList: [], serviceTimeArea: '', partyOrg: { partyOrgType: '', @@ -131,12 +135,7 @@ export default { }, joinOrgIds: [], tableLoading: false, - partyProps: { - label: 'partyOrgName', - value: 'id', - checkStrictly: true, - joinOrgType: 'partyOrgType' - } + agencyId: '' } }, components: { @@ -148,7 +147,7 @@ export default { async mounted () { const { user } = this.$store.state this.agencyId = user.agencyId - this.handleSearch() + await this.handleSearch() }, methods: { @@ -158,7 +157,6 @@ export default { handleChangeOrg () { if (this.joinOrgIds.length > 0 && this.joinOrgIds) { this.form.joinOrgId = this.joinOrgIds[this.joinOrgIds.length - 1] - } else { this.form.joinOrgId = '' } @@ -171,10 +169,10 @@ export default { .then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg) + }else { + this.orgList = this.deepArrTOnull(res.data) } - this.orgList = this.deepArrTOnull(res.data) - }) - .catch(() => {}) + }).catch(() => {return this.$message.error("网络错误");}) }, deepArrTOnull(arr) { let a = [] @@ -184,7 +182,6 @@ export default { children: (item.children.length > 0 && this.deepArrTOnull(item.children) )|| null } }) - this.allOrgList = a return a }, async loadTable () { @@ -199,10 +196,8 @@ export default { if (this.form.joinOrgId === '' || this.form.joinOrgId === null || this.form.joinOrgId === undefined){ let a = this.orgList[0] this.form.joinOrgId = a.id; - this.form.joinOrgType = a.partyOrgType; }else { - this.form.joinOrgId = this.partyProps.value; - this.form.joinOrgType = this.partyProps.joinOrgType; + this.form.joinOrgId = this.joinOrgIds[this.joinOrgIds.length - 1]; } console.log('start') const url = "/resi/partymember/icPartyAct/patryactstatis"