Browse Source

党小组新增

shibei_master
HAHA 3 years ago
parent
commit
3cee5037f0
  1. 117
      src/views/modules/plugins/power/poweraxis.vue

117
src/views/modules/plugins/power/poweraxis.vue

@ -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)
}
}

Loading…
Cancel
Save