Browse Source

emm

feature
zxc 3 years ago
parent
commit
0784911c73
  1. 29
      src/views/modules/communityParty/stas/index.vue

29
src/views/modules/communityParty/stas/index.vue

@ -13,7 +13,12 @@
size="small" size="small"
:options="orgList" :options="orgList"
placeholder="请选择党组织" placeholder="请选择党组织"
:props="partyProps" :props="{
checkStrictly: true,
label: 'partyOrgName',
value: 'id',
children: 'children'
}"
@change="handleChangeOrg" @change="handleChangeOrg"
clearable/> clearable/>
</el-form-item> </el-form-item>
@ -123,7 +128,6 @@ export default {
}, },
tableData: [], tableData: [],
orgList: [], orgList: [],
allOrgList: [],
serviceTimeArea: '', serviceTimeArea: '',
partyOrg: { partyOrg: {
partyOrgType: '', partyOrgType: '',
@ -131,12 +135,7 @@ export default {
}, },
joinOrgIds: [], joinOrgIds: [],
tableLoading: false, tableLoading: false,
partyProps: { agencyId: ''
label: 'partyOrgName',
value: 'id',
checkStrictly: true,
joinOrgType: 'partyOrgType'
}
} }
}, },
components: { components: {
@ -148,7 +147,7 @@ export default {
async mounted () { async mounted () {
const { user } = this.$store.state const { user } = this.$store.state
this.agencyId = user.agencyId this.agencyId = user.agencyId
this.handleSearch() await this.handleSearch()
}, },
methods: { methods: {
@ -158,7 +157,6 @@ export default {
handleChangeOrg () { handleChangeOrg () {
if (this.joinOrgIds.length > 0 && this.joinOrgIds) { if (this.joinOrgIds.length > 0 && this.joinOrgIds) {
this.form.joinOrgId = this.joinOrgIds[this.joinOrgIds.length - 1] this.form.joinOrgId = this.joinOrgIds[this.joinOrgIds.length - 1]
} else { } else {
this.form.joinOrgId = '' this.form.joinOrgId = ''
} }
@ -171,10 +169,10 @@ export default {
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg) return this.$message.error(res.msg)
}else {
this.orgList = this.deepArrTOnull(res.data)
} }
this.orgList = this.deepArrTOnull(res.data) }).catch(() => {return this.$message.error("网络错误");})
})
.catch(() => {})
}, },
deepArrTOnull(arr) { deepArrTOnull(arr) {
let a = [] let a = []
@ -184,7 +182,6 @@ export default {
children: (item.children.length > 0 && this.deepArrTOnull(item.children) )|| null children: (item.children.length > 0 && this.deepArrTOnull(item.children) )|| null
} }
}) })
this.allOrgList = a
return a return a
}, },
async loadTable () { async loadTable () {
@ -199,10 +196,8 @@ export default {
if (this.form.joinOrgId === '' || this.form.joinOrgId === null || this.form.joinOrgId === undefined){ if (this.form.joinOrgId === '' || this.form.joinOrgId === null || this.form.joinOrgId === undefined){
let a = this.orgList[0] let a = this.orgList[0]
this.form.joinOrgId = a.id; this.form.joinOrgId = a.id;
this.form.joinOrgType = a.partyOrgType;
}else { }else {
this.form.joinOrgId = this.partyProps.value; this.form.joinOrgId = this.joinOrgIds[this.joinOrgIds.length - 1];
this.form.joinOrgType = this.partyProps.joinOrgType;
} }
console.log('start') console.log('start')
const url = "/resi/partymember/icPartyAct/patryactstatis" const url = "/resi/partymember/icPartyAct/patryactstatis"

Loading…
Cancel
Save