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-select>
</el-form-item> </el-form-item>
<!-- 网格党支部下拉框 --> <!-- 网格党支部下拉框 -->
<el-form-item label="所属上级网格党支部"> <el-form-item label="所属上级网格党支部" v-show="GridPartyBranchSwitch">
<el-select placeholder="请选择所属上级网格党支部"> <el-select v-model="addOrgForm.pid" placeholder="请选择所属上级网格党支部">
<el-option <el-option
v-for="item in GridPartyBranchList" v-for="item in GridPartyBranchList"
:key="item.orgId" :key="item.id"
:label="item.orgName" :label="item.name"
:value="item.orgId"> :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-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -161,6 +173,8 @@ export default {
agencytree:[], agencytree:[],
// //
GridPartyBranchList:[], GridPartyBranchList:[],
//
PartyCommList:[],
// //
refreshTable: true, refreshTable: true,
// //
@ -169,8 +183,13 @@ export default {
addDialogBox:false, addDialogBox:false,
// //
orgListSwitch:false, orgListSwitch:false,
//
GridPartyBranchSwitch:false,
//
partyCommSwitch:false,
// //
delWindow:false, delWindow:false,
} }
}, },
created(){ created(){
@ -194,7 +213,8 @@ export default {
agencyId:this.addOrgForm.agencyId, agencyId:this.addOrgForm.agencyId,
agencyName:this.addOrgForm.agencyName, agencyName:this.addOrgForm.agencyName,
agencyType:this.addOrgForm.agencyType, agencyType:this.addOrgForm.agencyType,
categoryCode:this.addOrgForm.categoryCode categoryCode:this.addOrgForm.categoryCode,
pid:this.addOrgForm.pid
} }
const { data, code, msg } = await requestPost(url,params) const { data, code, msg } = await requestPost(url,params)
@ -202,6 +222,9 @@ export default {
if (code === 0) { if (code === 0) {
this.$message.success("新增成功") this.$message.success("新增成功")
this.addDialogBox = false this.addDialogBox = false
this.orgListSwitch = false
this.GridPartyBranchSwitch = false
this.initTreeData()
this.addOrgFormRest() this.addOrgFormRest()
} else { } else {
this.$message.error(msg) this.$message.error(msg)
@ -233,7 +256,9 @@ export default {
const { data, code, msg } = await requestPost(url,params) const { data, code, msg } = await requestPost(url,params)
if (code === 0) { if (code === 0) {
console.log(data)
this.agencytree = data[0].subOrgList this.agencytree = data[0].subOrgList
} else { } else {
this.$message.error(msg) 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(){ addNewOrg(){
this.addDialogBox = true this.addDialogBox = true
this.addOrgForm.pid = ''
this.getListSimple() this.getListSimple()
this.getAgencyTree() this.getAgencyTree()
}, },
@ -272,18 +341,20 @@ export default {
this.initTreeData() this.initTreeData()
}, },
/** 展开/折叠操作 */ /** 展开/折叠操作 */
toggleExpandAll() { // toggleExpandAll() {
this.refreshTable = false; // this.refreshTable = false;
this.isExpandAll = !this.isExpandAll; // this.isExpandAll = !this.isExpandAll;
this.$nextTick(() => { // this.$nextTick(() => {
this.refreshTable = true; // this.refreshTable = true;
}); // });
}, // },
// //
handleClose(done) { handleClose(done) {
this.$confirm('确认关闭?') this.$confirm('确认关闭?')
.then(_ => { .then(_ => {
this.addOrgFormRest() this.addOrgFormRest()
this.orgListSwitch = false
this.GridPartyBranchSwitch = false
done(); done();
}) })
.catch(_ => {}); .catch(_ => {});
@ -291,6 +362,8 @@ export default {
// //
cancelAdd(){ cancelAdd(){
this.addDialogBox = false this.addDialogBox = false
this.orgListSwitch = false
this.GridPartyBranchSwitch = false
this.addOrgFormRest() this.addOrgFormRest()
}, },
// //
@ -309,9 +382,22 @@ export default {
this.addOrgForm.categoryCode = val this.addOrgForm.categoryCode = val
if (val === 'community_party') { if (val === 'community_party') {
this.orgListSwitch = true this.orgListSwitch = true
this.GridPartyBranchSwitch = false
this.partyCommSwitch = false
this.addOrgForm.pid = 0
} }
if(val === 'grid_party') { if(val === 'grid_party') {
this.orgListSwitch = false 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){ handelAgencyTree(val){
@ -337,6 +423,7 @@ export default {
if (code === 0) { if (code === 0) {
this.$message.success("删除成功") this.$message.success("删除成功")
this.initTreeData()
this.delWindow = false this.delWindow = false
} else { } else {
this.$message.error(msg) this.$message.error(msg)
@ -346,7 +433,9 @@ export default {
canceldelWindow(){ canceldelWindow(){
this.delWindow = false this.delWindow = false
}, },
handelGridParty(val){
console.log(val)
}
} }

Loading…
Cancel
Save