|
|
@ -81,13 +81,25 @@ |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<!-- 网格党支部下拉框 --> |
|
|
|
<el-form-item label="所属上级网格党支部"> |
|
|
|
<el-select placeholder="请选择所属上级网格党支部"> |
|
|
|
<el-form-item label="所属上级网格党支部" v-show="GridPartyBranchSwitch"> |
|
|
|
<el-select v-model="addOrgForm.pid" placeholder="请选择所属上级网格党支部"> |
|
|
|
<el-option |
|
|
|
v-for="item in GridPartyBranchList" |
|
|
|
:key="item.orgId" |
|
|
|
:label="item.orgName" |
|
|
|
:value="item.orgId"> |
|
|
|
:key="item.id" |
|
|
|
:label="item.name" |
|
|
|
:value="item.id"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<!-- 党委下拉框 --> |
|
|
|
<el-form-item label="所属党委" v-show="partyCommSwitch"> |
|
|
|
<el-select v-model="addOrgForm.pid" placeholder="请选择所属党委"> |
|
|
|
<el-option |
|
|
|
v-for="item in PartyCommList" |
|
|
|
:key="item.id" |
|
|
|
:label="item.name" |
|
|
|
:value="item.id"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
@ -161,6 +173,8 @@ export default { |
|
|
|
agencytree:[], |
|
|
|
// 上级网格党支部列表 |
|
|
|
GridPartyBranchList:[], |
|
|
|
// 党委列表 |
|
|
|
PartyCommList:[], |
|
|
|
// 重新渲染表格状态 |
|
|
|
refreshTable: true, |
|
|
|
// 是否展开,默认全部展开 |
|
|
@ -169,8 +183,13 @@ export default { |
|
|
|
addDialogBox:false, |
|
|
|
// 组织列表开关 |
|
|
|
orgListSwitch:false, |
|
|
|
// 上级网格党支部列表 |
|
|
|
GridPartyBranchSwitch:false, |
|
|
|
// 党委下拉框列表开关 |
|
|
|
partyCommSwitch:false, |
|
|
|
// 确认删除弹窗 |
|
|
|
delWindow:false, |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
created(){ |
|
|
@ -194,7 +213,8 @@ export default { |
|
|
|
agencyId:this.addOrgForm.agencyId, |
|
|
|
agencyName:this.addOrgForm.agencyName, |
|
|
|
agencyType:this.addOrgForm.agencyType, |
|
|
|
categoryCode:this.addOrgForm.categoryCode |
|
|
|
categoryCode:this.addOrgForm.categoryCode, |
|
|
|
pid:this.addOrgForm.pid |
|
|
|
} |
|
|
|
|
|
|
|
const { data, code, msg } = await requestPost(url,params) |
|
|
@ -202,6 +222,9 @@ export default { |
|
|
|
if (code === 0) { |
|
|
|
this.$message.success("新增成功") |
|
|
|
this.addDialogBox = false |
|
|
|
this.orgListSwitch = false |
|
|
|
this.GridPartyBranchSwitch = false |
|
|
|
this.initTreeData() |
|
|
|
this.addOrgFormRest() |
|
|
|
} else { |
|
|
|
this.$message.error(msg) |
|
|
@ -233,7 +256,9 @@ export default { |
|
|
|
const { data, code, msg } = await requestPost(url,params) |
|
|
|
|
|
|
|
if (code === 0) { |
|
|
|
console.log(data) |
|
|
|
this.agencytree = data[0].subOrgList |
|
|
|
|
|
|
|
} else { |
|
|
|
this.$message.error(msg) |
|
|
|
} |
|
|
@ -258,10 +283,54 @@ export default { |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
// 获取上级网格党支部 |
|
|
|
async getGridPartyBranchList(){ |
|
|
|
const url = '/pli/power/axisStruct/GridPartyBranchList' |
|
|
|
|
|
|
|
let params = {} |
|
|
|
|
|
|
|
const { data, code, msg } = await requestPost(url,params) |
|
|
|
|
|
|
|
if (code === 0) { |
|
|
|
console.log(data) |
|
|
|
this.GridPartyBranchList = data |
|
|
|
} else { |
|
|
|
this.$message.error(msg) |
|
|
|
} |
|
|
|
}, |
|
|
|
// 获取上级组织党委 |
|
|
|
async getPartyCommList(){ |
|
|
|
const url = '/pli/power/axisStruct/getPartyCommList' |
|
|
|
|
|
|
|
let params = {} |
|
|
|
|
|
|
|
const { data, code, msg } = await requestPost(url,params) |
|
|
|
|
|
|
|
if (code === 0) { |
|
|
|
this.PartyCommList = data |
|
|
|
} else { |
|
|
|
this.$message.error(msg) |
|
|
|
} |
|
|
|
}, |
|
|
|
// 查父id |
|
|
|
// async getPid(){ |
|
|
|
// const url = '/pli/power/axisStruct/getPid' |
|
|
|
|
|
|
|
// let params = {} |
|
|
|
|
|
|
|
// const { data, code, msg } = await requestPost(url,params) |
|
|
|
|
|
|
|
// if (code === 0) { |
|
|
|
// this.addOrgForm.pid = data |
|
|
|
// } else { |
|
|
|
// this.$message.error(msg) |
|
|
|
// } |
|
|
|
// }, |
|
|
|
|
|
|
|
// 新增按钮 |
|
|
|
addNewOrg(){ |
|
|
|
this.addDialogBox = true |
|
|
|
this.addOrgForm.pid = '' |
|
|
|
this.getListSimple() |
|
|
|
this.getAgencyTree() |
|
|
|
}, |
|
|
@ -272,18 +341,20 @@ export default { |
|
|
|
this.initTreeData() |
|
|
|
}, |
|
|
|
/** 展开/折叠操作 */ |
|
|
|
toggleExpandAll() { |
|
|
|
this.refreshTable = false; |
|
|
|
this.isExpandAll = !this.isExpandAll; |
|
|
|
this.$nextTick(() => { |
|
|
|
this.refreshTable = true; |
|
|
|
}); |
|
|
|
}, |
|
|
|
// toggleExpandAll() { |
|
|
|
// this.refreshTable = false; |
|
|
|
// this.isExpandAll = !this.isExpandAll; |
|
|
|
// this.$nextTick(() => { |
|
|
|
// this.refreshTable = true; |
|
|
|
// }); |
|
|
|
// }, |
|
|
|
// 关闭对话框 |
|
|
|
handleClose(done) { |
|
|
|
this.$confirm('确认关闭?') |
|
|
|
.then(_ => { |
|
|
|
this.addOrgFormRest() |
|
|
|
this.orgListSwitch = false |
|
|
|
this.GridPartyBranchSwitch = false |
|
|
|
done(); |
|
|
|
}) |
|
|
|
.catch(_ => {}); |
|
|
@ -291,6 +362,8 @@ export default { |
|
|
|
// 取消新增按钮 |
|
|
|
cancelAdd(){ |
|
|
|
this.addDialogBox = false |
|
|
|
this.orgListSwitch = false |
|
|
|
this.GridPartyBranchSwitch = false |
|
|
|
this.addOrgFormRest() |
|
|
|
}, |
|
|
|
// 清空新增表单 |
|
|
@ -309,9 +382,22 @@ export default { |
|
|
|
this.addOrgForm.categoryCode = val |
|
|
|
if (val === 'community_party') { |
|
|
|
this.orgListSwitch = true |
|
|
|
this.GridPartyBranchSwitch = false |
|
|
|
this.partyCommSwitch = false |
|
|
|
this.addOrgForm.pid = 0 |
|
|
|
} |
|
|
|
if(val === 'grid_party') { |
|
|
|
this.orgListSwitch = false |
|
|
|
this.GridPartyBranchSwitch = false |
|
|
|
this.partyCommSwitch = true |
|
|
|
this.getPartyCommList() |
|
|
|
this.addOrgForm.pid = '' |
|
|
|
} |
|
|
|
if(val === 'group_party') { |
|
|
|
this.GridPartyBranchSwitch = true |
|
|
|
this.partyCommSwitch = false |
|
|
|
this.addOrgForm.pid = '' |
|
|
|
this.getGridPartyBranchList() |
|
|
|
} |
|
|
|
}, |
|
|
|
handelAgencyTree(val){ |
|
|
@ -337,6 +423,7 @@ export default { |
|
|
|
|
|
|
|
if (code === 0) { |
|
|
|
this.$message.success("删除成功") |
|
|
|
this.initTreeData() |
|
|
|
this.delWindow = false |
|
|
|
} else { |
|
|
|
this.$message.error(msg) |
|
|
@ -346,7 +433,9 @@ export default { |
|
|
|
canceldelWindow(){ |
|
|
|
this.delWindow = false |
|
|
|
}, |
|
|
|
|
|
|
|
handelGridParty(val){ |
|
|
|
console.log(val) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|