Browse Source

bug

shibei_master
zhaoyongnian 3 years ago
parent
commit
b23130d5cb
  1. 76
      src/views/modules/partymember/icpartyorg-add-or-update.vue
  2. 10
      src/views/modules/partymember/icpartyorgtree.vue

76
src/views/modules/partymember/icpartyorg-add-or-update.vue

@ -8,7 +8,7 @@
@keyup.enter.native="dataFormSubmitHandle()"
:label-width="$i18n.locale === 'en-US' ? '120px' : '100px'">
<el-form-item prop="partyOrgType" label="党组织类型">
<el-select :disabled="dataForm.id ? true : false" v-model="dataForm.partyOrgType" @change="changePartyOrgType" clearable placeholder="请选择党组织类型">
<el-select :disabled="dataForm.id || dataForm.orgId ? true : false" v-model="dataForm.partyOrgType" @change="changePartyOrgType" clearable placeholder="请选择党组织类型">
<el-option
v-for="item in partyOrgTypeList"
:key="item.value"
@ -32,9 +32,10 @@
:props="{ emitPath:false, checkStrictly: true, label: 'name', value: 'id', children: 'children' }"
:disabled="dataForm.id ? true : false"
:show-all-levels="false"
@change="changeAgencyOrg"
clearable />
</el-form-item>
<el-form-item prop="mySelectOrg" label="上级党组织">
<el-form-item v-if="!dataForm.sjdzzName" prop="mySelectOrg" label="上级党组织">
<el-cascader
style="width:300px"
v-model="dataForm.mySelectOrg"
@ -45,6 +46,9 @@
:disabled="dataForm.id || dataForm.orgId ? true : false"
clearable />
</el-form-item>
<el-form-item v-if="dataForm.sjdzzName" label="上级党组织">
<el-input :disabled="true" v-model="dataForm.sjdzzName" style="width:300px"></el-input>
</el-form-item>
<el-form-item label="党组织介绍" prop="introduction">
<el-input style="width:300px" v-model="dataForm.introduction" type="textarea" maxlength="500" placeholder="党组织介绍"></el-input>
</el-form-item>
@ -129,7 +133,8 @@
staffId:'',
orgPidName: '',
agencyName:'',
pid: ''
pid: '',
sjdzzName: '' //
},
orgListVisible: false,
agencyListVisible:false,
@ -151,12 +156,11 @@
this.agencyId = localStorage.getItem('agencyId')
this.dataForm.customerId = localStorage.getItem('customerId')
this.dataForm.staffId = localStorage.getItem('staffId')
//
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
this.dataForm.latitude = ''
//
this.setPartyOrgType()
this.getOrgList().then(() => {
if (this.dataForm.id) {
this.getInfo()
} else {
@ -165,13 +169,27 @@
this.dataForm.mySelectOrg = this.dataForm.orgId
this.dataForm.orgPid = this.dataForm.orgId
this.dataForm.orgPids = this.dataForm.orgPids ? this.dataForm.orgPids + ':' + this.dataForm.orgId : this.dataForm.orgId
this.dataForm.partyOrgType = this.dataForm._partyOrgType
if (this.dataForm.partyOrgType === '0') { // 0,1,2,3,4,5
this.dataForm.partyOrgType = '1'
} else if (this.dataForm.partyOrgType === '1') {
this.dataForm.partyOrgType = '2'
} else if (this.dataForm.partyOrgType === '2') {
this.dataForm.partyOrgType = '3'
} else if (this.dataForm.partyOrgType === '3') {
this.dataForm.partyOrgType = '4'
} else if (this.dataForm.partyOrgType === '4') {
this.dataForm.partyOrgType = '5'
}
console.log(this.dataForm.orgPid)
console.log(this.dataForm.orgPids)
// this.getOrgList()
} else {
this.dataForm.mySelectOrg = ''
}
}
})
this.setPartyOrgType()
})
},
//
@ -216,30 +234,37 @@
]
}
},
//
changeAgencyOrg () {
console.log(this.dataForm.agencyId)
this.getOrgList()
},
//
changePartyOrgType(value){
if(value != '5'){ //
this.dataForm.agencyId = ''
this.dataForm.agencyPids = ''
}
this.$http.get('/gov/org/customeragency/getOrgTreeByUserAndType', {params: {agencyId: this.agencyId, orgType:value}}).then(({data: res}) => {
if (res.code !== 0) {
return this.$message.error(res.internalMsg ? res.internalMsg : res.msg ? res.msg : '查询失败')
}
this.agencyOrgList = this.removeEmptyChildren(res.data)
}).catch(() => {})
//
this.getInfoAgencyLisy()
// this.$http.get('/gov/org/customeragency/getOrgTreeByUserAndType', {params: {agencyId: this.agencyId, orgType:value}}).then(({data: res}) => {
// if (res.code !== 0) {
// return this.$message.error(res.internalMsg ? res.internalMsg : res.msg ? res.msg : '')
// }
// this.agencyOrgList = this.removeEmptyChildren(res.data)
// }).catch(() => {})
},
//
getOrgList() {
return this.$http.get('/resi/partymember/icPartyOrg/getTreelist', {params: {agencyId: this.agencyId, orgPid: this.dataForm.id ? this.dataForm.pid : ''}}).then(({data: res}) => {
this.$http.get('/resi/partymember/icPartyOrg/getParentOrgList', {params: {agencyId: this.dataForm.agencyId, partyOrgType: this.dataForm.partyOrgType}}).then(({data: res}) => {
if (res.code !== 0) {
return this.$message.error(res.internalMsg ? res.internalMsg : res.msg ? res.msg : '查询失败')
}
this.orgList = this.removeEmptyChildren(res.data)
this.orgList.unshift({
partyOrgName: '一级组织',
id: '0'
});
// this.orgList.unshift({
// partyOrgName: '',
// id: '0'
// });
}).catch(() => {
})
},
@ -282,23 +307,20 @@
this.dataForm.mySelectOrg = this.dataForm.orgPid
//
this.dataForm.agencyId = this.dataForm.agencyId
//
this.getInfoAgencyLisy()
this.getOrgList()
console.log(':::::', JSON.stringify(this.dataForm))
this.initMap()
}).catch(() => {
})
//
this.getInfoAgencyLisy()
},
getInfoAgencyLisy(){
this.$http.get('/gov/org/customeragency/getOrgTreeByUserAndType',
{params:
{agencyId: this.agencyId,
orgType:this.dataForm.partyOrgType}
}).then(({data: res}) => {
this.$http.get('/gov/org/customeragency/getOrgTreeByUserAndType', {params: {agencyId: this.agencyId, orgType: this.dataForm.partyOrgType}}).then(({data: res}) => {
if (res.code !== 0) {
return this.$message.error(res.internalMsg ? res.internalMsg : res.msg ? res.msg : '查询失败')
}
this.agencyOrgList = res.data
this.agencyOrgList = this.removeEmptyChildren(res.data)
}).catch(() => {
})
},

10
src/views/modules/partymember/icpartyorgtree.vue

@ -24,12 +24,12 @@
size="small"
class="div-table-button--detail">{{'查看党员'}}</el-button>
<el-button v-if="(scope.row.agencyId == agencyId || scope.row.agencyPids.includes(agencyId)) && scope.row.partyOrgType != '5'"
@click="addOrUpdateHandle('', scope.row.id, scope.row.orgPids)"
@click="addOrUpdateHandle('', scope.row.id, scope.row.orgPids, '', scope.row.partyOrgType, scope.row.partyOrgName)"
type="text"
size="small"
class="div-table-button--add">新增下级</el-button>
<el-button v-if="scope.row.agencyId == agencyId || scope.row.agencyPids.includes(agencyId)"
@click="addOrUpdateHandle(scope.row.id, '', '', scope.row.pid)"
@click="addOrUpdateHandle(scope.row.id, '', '', scope.row.pid, '', '')"
type="text"
size="small"
class="div-table-button--edit">修改</el-button>
@ -106,8 +106,7 @@
this.tableLoading = false
},
// /
addOrUpdateHandle (id, orgId, orgPids, pid) {
console.log('pid:::::', pid)
addOrUpdateHandle (id, orgId, orgPids, pid, partyOrgType, partyOrgName) {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.dataForm.id = id
@ -115,7 +114,8 @@
this.$refs.addOrUpdate.dataForm.orgId = orgId //
this.$refs.addOrUpdate.dataForm.orgPids = orgPids
this.$refs.addOrUpdate.dataForm.pid = pid
this.$refs.addOrUpdate.dataForm._partyOrgType = partyOrgType
this.$refs.addOrUpdate.dataForm.sjdzzName = partyOrgName
this.$refs.addOrUpdate.init()
})
},

Loading…
Cancel
Save