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"
style="width: 100%">
<el-table-column prop="agencyName" label="组织名字" width="260"></el-table-column>
<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"
type="primary"
icon="el-icon-plus"
@ -64,8 +65,9 @@
</el-table>
<!-- 社区列表 -->
<el-table height="250"
<!-- 下级机关单位/基层科室列表 -->
<el-table v-show="officeList"
height="250"
:data="communityData"
style="width: 100%">
<el-table-column prop="departmentName" label="下级机关单位/基层科室" width="260"></el-table-column>
@ -89,7 +91,8 @@
</el-table>
<!-- 网格列表 -->
<el-table height="250"
<el-table v-show="GridList"
height="250"
:data="gridData"
style="width: 100%">
<el-table-column prop="gridName" label="网格名字" width="260"></el-table-column>
@ -113,20 +116,22 @@
</el-table>
<!-- 本级工作人员 -->
<el-table
<el-table v-show="levelWorkPeoList"
:data="agencyDataPeo"
style="width: 100%"
height="250">
<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 label="操作" align="center" class-name="small-padding fixed-width" >
<template slot-scope="scope">
<el-button v-if="entry"
<template slot="header" slot-scope="scope">
<el-button v-if="levelPeo"
size="mini"
type="primary"
icon="el-icon-plus"
@click="addPeo(scope.row)"
>新增</el-button>
</template>
<template slot-scope="scope">
<el-button
size="mini"
type="warning"
@ -155,20 +160,22 @@
</el-table-column>
</el-table>
<!-- 社区工作人员 -->
<el-table height="250"
<!-- 下级机关单位/基层科室工作人员 -->
<el-table height="250" v-show="ListOfOrganPersonnel"
:data="communityDataPeo"
style="width: 100%">
<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="name" 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">
<template slot-scope="scope">
<el-button
<template slot="header" slot-scope="scope">
<el-button v-if="deptPeo"
size="mini"
type="primary"
icon="el-icon-plus"
@click="addCommunityPeo(scope.row)"
>新增</el-button>
</template>
<template>
<el-button
size="mini"
type="warning"
@ -198,20 +205,22 @@
</el-table>
<!-- 网格工作人员 -->
<el-table
<el-table v-show="GridWorkPeoList"
:data="gridDataPeo"
style="width: 100%"
height="250">
<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 label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
<template slot="header" slot-scope="scope">
<el-button v-if="GridWorkPeo"
size="mini"
type="primary"
icon="el-icon-plus"
@click="addGridPeo(scope.row)"
>新增</el-button>
</template>
<template>
<el-button
size="mini"
type="warning"
@ -241,14 +250,14 @@
</el-table>
<!-- 新增社区 -->
<!-- 新增下级机关单位/基层科室 -->
<el-dialog
title="新增社区"
title="新增部门"
:visible.sync="dialogVisible"
width="30%"
:before-close="handleClose">
<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-form-item>
<el-form-item label="组织编码" prop="code">
@ -476,7 +485,8 @@
<el-input v-model="transferForm.name" placeholder="姓名"></el-input>
</el-form-item>
<el-form-item label="调动至">
<el-cascader
<el-cascader
clearable
:props="{ checkStrictly: true }"
v-model="selectValue"
:options="options"
@ -510,8 +520,28 @@ import { requestPost } from "@/js/dai/request";
export default {
data(){
return{
//
levelPeo:true,
//
deptPeo:false,
//
GridWorkPeo:false,
//
ListOfOrganPersonnel:false,
//
GridWorkPeoList:false,
//
OrganizationList:true,
//
levelWorkPeoList:true,
//
GridList:true,
//
officeList:true,
//
lat:'11',
lng:'11',
Navigation:'',
//
queryParams: {
deptName: undefined,
@ -643,7 +673,18 @@ export default {
{
value:'',
label:'',
children:[],
children:[
{
value:'',
label:'',
children:[]
},
{
value:'',
label:'',
children:[]
}
],
}
],
selectValue: [],
@ -665,6 +706,7 @@ export default {
this.getCommunityList()
this.getGridList()
this.agencyPeo()
this.getNavigation()
},
watch: {
@ -683,8 +725,22 @@ export default {
methods:{
// id
handleChange (e) {
console.log(e)
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(){
@ -1028,8 +1084,17 @@ export default {
this.communityDataPeo =[]
this.agencyDataPeo = []
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()
},
//
entryCommunity(row){
@ -1037,7 +1102,14 @@ export default {
this.communityDataPeo = []
this.agencyDataPeo = []
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()
},
@ -1057,6 +1129,8 @@ export default {
this.anId = row.agencyId
this.agencyPeo()
this.entry = true
this.levelPeo = true
this.OrganizationList = false
},
//
@ -1211,15 +1285,18 @@ export default {
value:item.deptId,
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 => {
const obj = {
value:item.gridId,
label:item.gridName
}
this.options[0].children.push(obj)
this.options[0].children[1].children.push(obj)
})
}else{
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) {

Loading…
Cancel
Save