Browse Source

提交

shibei_master
HAHA 3 years ago
parent
commit
358a450d9b
  1. 147
      src/views/modules/base/organization/organization.vue

147
src/views/modules/base/organization/organization.vue

@ -40,12 +40,13 @@
<!-- 组织列表 --> <!-- 组织列表 -->
<el-table height="250" <el-table v-show="OrganizationList"
height="250"
:data="tableData" :data="tableData"
style="width: 100%"> style="width: 100%">
<el-table-column prop="agencyName" label="组织名字" width="260"></el-table-column> <el-table-column prop="agencyName" label="组织名字" width="260"></el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot="header" slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" <el-button size="mini"
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-plus"
@ -64,8 +65,9 @@
</el-table> </el-table>
<!-- 社区列表 --> <!-- 下级机关单位/基层科室列表 -->
<el-table height="250" <el-table v-show="officeList"
height="250"
:data="communityData" :data="communityData"
style="width: 100%"> style="width: 100%">
<el-table-column prop="departmentName" label="下级机关单位/基层科室" width="260"></el-table-column> <el-table-column prop="departmentName" label="下级机关单位/基层科室" width="260"></el-table-column>
@ -89,7 +91,8 @@
</el-table> </el-table>
<!-- 网格列表 --> <!-- 网格列表 -->
<el-table height="250" <el-table v-show="GridList"
height="250"
:data="gridData" :data="gridData"
style="width: 100%"> style="width: 100%">
<el-table-column prop="gridName" label="网格名字" width="260"></el-table-column> <el-table-column prop="gridName" label="网格名字" width="260"></el-table-column>
@ -113,20 +116,22 @@
</el-table> </el-table>
<!-- 本级工作人员 --> <!-- 本级工作人员 -->
<el-table <el-table v-show="levelWorkPeoList"
:data="agencyDataPeo" :data="agencyDataPeo"
style="width: 100%" style="width: 100%"
height="250"> height="250">
<el-table-column prop="name" label="本级工作人员名字" width="260"></el-table-column> <el-table-column prop="name" label="本级工作人员名字" width="260"></el-table-column>
<el-table-column prop="roles" label="本级工作人员职责" width="260"></el-table-column> <el-table-column prop="roles" label="本级工作人员职责" width="260"></el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" > <el-table-column label="操作" align="center" class-name="small-padding fixed-width" >
<template slot-scope="scope"> <template slot="header" slot-scope="scope">
<el-button v-if="entry" <el-button v-if="levelPeo"
size="mini" size="mini"
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-plus"
@click="addPeo(scope.row)" @click="addPeo(scope.row)"
>新增</el-button> >新增</el-button>
</template>
<template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
type="warning" type="warning"
@ -155,20 +160,22 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 社区工作人员 --> <!-- 下级机关单位/基层科室工作人员 -->
<el-table height="250" <el-table height="250" v-show="ListOfOrganPersonnel"
:data="communityDataPeo" :data="communityDataPeo"
style="width: 100%"> style="width: 100%">
<el-table-column prop="name" label="社区工作人员名字" width="260"></el-table-column> <el-table-column prop="name" label="下级机关单位/基层科室工作人员" width="260"></el-table-column>
<el-table-column prop="roles" label="社区工作人员职责" width="260"></el-table-column> <el-table-column prop="roles" label="下级机关单位/基层科室工作人员职责" width="260"></el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot="header" slot-scope="scope">
<el-button <el-button v-if="deptPeo"
size="mini" size="mini"
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-plus"
@click="addCommunityPeo(scope.row)" @click="addCommunityPeo(scope.row)"
>新增</el-button> >新增</el-button>
</template>
<template>
<el-button <el-button
size="mini" size="mini"
type="warning" type="warning"
@ -198,20 +205,22 @@
</el-table> </el-table>
<!-- 网格工作人员 --> <!-- 网格工作人员 -->
<el-table <el-table v-show="GridWorkPeoList"
:data="gridDataPeo" :data="gridDataPeo"
style="width: 100%" style="width: 100%"
height="250"> height="250">
<el-table-column prop="name" label="网格工作人员名字" width="260"></el-table-column> <el-table-column prop="name" label="网格工作人员名字" width="260"></el-table-column>
<el-table-column prop="roles" label="网格工作人员职责" width="260"></el-table-column> <el-table-column prop="roles" label="网格工作人员职责" width="260"></el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot="header" slot-scope="scope">
<el-button <el-button v-if="GridWorkPeo"
size="mini" size="mini"
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-plus"
@click="addGridPeo(scope.row)" @click="addGridPeo(scope.row)"
>新增</el-button> >新增</el-button>
</template>
<template>
<el-button <el-button
size="mini" size="mini"
type="warning" type="warning"
@ -241,14 +250,14 @@
</el-table> </el-table>
<!-- 新增社区 --> <!-- 新增下级机关单位/基层科室 -->
<el-dialog <el-dialog
title="新增社区" title="新增部门"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="30%" width="30%"
:before-close="handleClose"> :before-close="handleClose">
<el-form :rules="rules"> <el-form :rules="rules">
<el-form-item label="社区名称" prop="departmentName"> <el-form-item label="部门名称" prop="departmentName">
<el-input v-model="insertForm.departmentName" placeholder="请输入部门名称"></el-input> <el-input v-model="insertForm.departmentName" placeholder="请输入部门名称"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="组织编码" prop="code"> <el-form-item label="组织编码" prop="code">
@ -476,7 +485,8 @@
<el-input v-model="transferForm.name" placeholder="姓名"></el-input> <el-input v-model="transferForm.name" placeholder="姓名"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="调动至"> <el-form-item label="调动至">
<el-cascader <el-cascader
clearable
:props="{ checkStrictly: true }" :props="{ checkStrictly: true }"
v-model="selectValue" v-model="selectValue"
:options="options" :options="options"
@ -510,8 +520,28 @@ import { requestPost } from "@/js/dai/request";
export default { export default {
data(){ data(){
return{ return{
//
levelPeo:true,
//
deptPeo:false,
//
GridWorkPeo:false,
//
ListOfOrganPersonnel:false,
//
GridWorkPeoList:false,
//
OrganizationList:true,
//
levelWorkPeoList:true,
//
GridList:true,
//
officeList:true,
//
lat:'11', lat:'11',
lng:'11', lng:'11',
Navigation:'',
// //
queryParams: { queryParams: {
deptName: undefined, deptName: undefined,
@ -643,7 +673,18 @@ export default {
{ {
value:'', value:'',
label:'', label:'',
children:[], children:[
{
value:'',
label:'',
children:[]
},
{
value:'',
label:'',
children:[]
}
],
} }
], ],
selectValue: [], selectValue: [],
@ -665,6 +706,7 @@ export default {
this.getCommunityList() this.getCommunityList()
this.getGridList() this.getGridList()
this.agencyPeo() this.agencyPeo()
this.getNavigation()
}, },
watch: { watch: {
@ -683,8 +725,22 @@ export default {
methods:{ methods:{
// id // id
handleChange (e) { handleChange (e) {
console.log(e)
this.transferForm.orgId = e[1] this.transferForm.orgId = e[1]
this.transferForm.orgType = 'dept' if(this.transferForm.orgId != null || ''){
if(this.transferForm.orgId === 0){
this.transferForm.orgId = e[2]
this.transferForm.orgType = 'dept'
} else {
this.transferForm.orgId = e[2]
this.transferForm.orgType = 'grid'
}
}else{
this.transferForm.orgId = e[0]
this.transferForm.orgType = 'agency'
}
}, },
/** 查询组织列表 */ /** 查询组织列表 */
async getAgencyList(){ async getAgencyList(){
@ -1028,8 +1084,17 @@ export default {
this.communityDataPeo =[] this.communityDataPeo =[]
this.agencyDataPeo = [] this.agencyDataPeo = []
this.gridOrgId = row.gridId this.gridOrgId = row.gridId
this.deptPeo = false
this.GridWorkPeo = true
this.levelPeo = false
this.GridWorkPeoList = true
this.ListOfOrganPersonnel = false
this.levelWorkPeoList = false
this.OrganizationList = false
this.officeList = false
this.GridPeo() this.GridPeo()
}, },
// //
entryCommunity(row){ entryCommunity(row){
@ -1037,7 +1102,14 @@ export default {
this.communityDataPeo = [] this.communityDataPeo = []
this.agencyDataPeo = [] this.agencyDataPeo = []
this.communityOrgId = row.departmentId this.communityOrgId = row.departmentId
this.levelPeo = false
this.deptPeo = true
this.GridWorkPeo = false
this.ListOfOrganPersonnel = true
this.levelWorkPeoList = false
this.GridWorkPeoList = false
this.GridList = false
this.OrganizationList = false
this.communityPeo() this.communityPeo()
}, },
@ -1057,6 +1129,8 @@ export default {
this.anId = row.agencyId this.anId = row.agencyId
this.agencyPeo() this.agencyPeo()
this.entry = true this.entry = true
this.levelPeo = true
this.OrganizationList = false
}, },
// //
@ -1211,15 +1285,18 @@ export default {
value:item.deptId, value:item.deptId,
label:item.deptName label:item.deptName
} }
this.options[0].children.push(ob) this.options[0].children[0].children.push(ob)
}) })
this.options[0].children[0].value = 0
this.options[0].children[0].label = "部门"
this.options[0].children[1].value = 1
this.options[0].children[1].label = "网格"
gr.forEach(item => { gr.forEach(item => {
const obj = { const obj = {
value:item.gridId, value:item.gridId,
label:item.gridName label:item.gridName
} }
this.options[0].children.push(obj) this.options[0].children[1].children.push(obj)
}) })
}else{ }else{
this.$message.error("树查询失败",msg) this.$message.error("树查询失败",msg)
@ -1254,6 +1331,22 @@ export default {
} }
}, },
//
async getNavigation(){
const url = "/gov/org/customeragency/orgtree"
let params = {
}
const { data, code, msg } = await requestPost(url,params)
if(code === 0){
this.Navigation = data.agencyName
}
},
/** 地图初始化 */ /** 地图初始化 */
initMap(_that) { initMap(_that) {

Loading…
Cancel
Save