Browse Source

update

shibei_master
YUJT 3 years ago
parent
commit
abc70a2fd4
  1. 349
      src/views/modules/base/organization/organization.vue

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

@ -4,9 +4,9 @@
<el-col :span="24" style="margin-left: 10px;margin-top: 10px;margin-bottom: 20px;">
<el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item v-for="(breadcrumb, index) in breadcrumbArr" :key="breadcrumb.id">
<el-link v-if="breadcrumb.id === currentBreadCrumbKey" type="primary" @click.native="refreshThisPage(index)">{{ breadcrumb.name }}</el-link>
<el-link v-if="breadcrumb.id === currentBreadcrumbKey" type="primary" @click.native="refreshThisPage(index)">{{ breadcrumb.name }}</el-link>
<el-link v-else type="info" @click.native="refreshThisPage(index)">{{ breadcrumb.name }}</el-link>
<el-link v-if="index === breadcrumbArr.length - 1" type="primary" @click.native="modifyOrgInfo" style="margin-left:10px;margin-top:0px;color:#3E8EF7;cursor:pointer" icon="el-icon-edit">编辑</el-link>
<el-link v-if="index === breadcrumbArr.length - 1" type="primary" @click.native="modifyOrgInfo" style="margin-left:10px;margin-top:0px;color:#3E8EF7;cursor:pointer" icon="el-icon-edit">修改</el-link>
</el-breadcrumb-item>
</el-breadcrumb>
</el-col>
@ -153,37 +153,13 @@
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot="header" slot-scope="scope">
<el-button size="mini"
type="primary"
icon="el-icon-plus"
@click="addCommunityPeo(scope.row)"
>新增</el-button>
<el-button size="mini" type="primary" icon="el-icon-plus" @click="addCommunityPeo(scope.row)">新增</el-button>
</template>
<template slot-scope="scope">
<el-button
size="mini"
type="warning"
icon="el-icon-edit"
@click="xiuCommunityPeo(scope.row)"
>修改</el-button>
<el-button
size="mini"
type="success"
icon="el-icon-view"
@click="lookAngency(scope.row)"
>查看</el-button>
<el-button
size="mini"
type="info"
icon="el-icon-rank"
@click="transfer(scope.row)"
>调动</el-button>
<el-button
size="mini"
type="danger"
icon="el-icon-circle-close"
@click="DisablePeo(scope.row)"
>禁用</el-button>
<el-button size="mini" type="warning" icon="el-icon-edit" @click="xiuCommunityPeo(scope.row)">修改</el-button>
<el-button size="mini" type="success" icon="el-icon-view" @click="lookAngency(scope.row)">查看</el-button>
<el-button size="mini" type="info" icon="el-icon-rank" @click="transfer(scope.row)">调动</el-button>
<el-button size="mini" type="danger" icon="el-icon-circle-close" @click="DisablePeo(scope.row)">禁用</el-button>
</template>
</el-table-column>
</el-table>
@ -201,37 +177,13 @@
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot="header" slot-scope="scope">
<el-button size="mini"
type="primary"
icon="el-icon-plus"
@click="addGridPeo(scope.row)"
>新增</el-button>
<el-button size="mini" type="primary" icon="el-icon-plus" @click="addGridPeo(scope.row)">新增</el-button>
</template>
<template>
<el-button
size="mini"
type="warning"
icon="el-icon-edit"
@click="xiuGridPeo(scope.row)"
>修改</el-button>
<el-button
size="mini"
type="success"
icon="el-icon-view"
@click="lookAngency(scope.row)"
>查看</el-button>
<el-button
size="mini"
type="info"
icon="el-icon-rank"
@click="transfer(scope.row)"
>调动</el-button>
<el-button
size="mini"
type="danger"
icon="el-icon-circle-close"
@click="DisablePeo(scope.row)"
>禁用</el-button>
<template slot-scope="scope">
<el-button size="mini" type="warning" icon="el-icon-edit" @click="xiuGridPeo(scope.row)">修改</el-button>
<el-button size="mini" type="success" icon="el-icon-view" @click="lookAngency(scope.row)">查看</el-button>
<el-button size="mini" type="info" icon="el-icon-rank" @click="transfer(scope.row)">调动</el-button>
<el-button size="mini" type="danger" icon="el-icon-circle-close" @click="DisablePeo(scope.row)">禁用</el-button>
</template>
</el-table-column>
</el-table>
@ -350,9 +302,9 @@
<el-select v-model="peoForm.duty" multiple placeholder="请选择">
<el-option
v-for="item in dutyList"
:key="item.value"
:label="item.label"
:value="item.value"
:key="item.roleId"
:label="item.roleName"
:value="item.roleId"
:disabled="item.disabled">
</el-option>
</el-select>
@ -379,7 +331,6 @@
<el-form-item label="手机号" prop="mobile">
<el-input v-model="peoForm.mobile" placeholder="请输入手机号"></el-input>
</el-form-item>
性别下拉框
<el-form-item label="性别" prop="gender">
<el-select v-model="peoForm.gender" clearable placeholder="性别">
<el-option v-for="item in genderList"
@ -389,7 +340,6 @@
</el-option>
</el-select>
</el-form-item>
专兼职下拉框
<el-form-item label="专兼职" prop="post">
<el-select v-model="peoForm.post" clearable placeholder="专兼职">
<el-option v-for="item in postList"
@ -399,14 +349,13 @@
</el-option>
</el-select>
</el-form-item>
职责下拉框
<el-form-item label="职责" prop="duty">
<el-select v-model="peoForm.duty" multiple placeholder="请选择">
<el-option
v-for="item in dutyList"
:key="item.value"
:label="item.label"
:value="item.value"
:key="item.roleId"
:label="item.roleName"
:value="item.roleId"
:disabled="item.disabled">
</el-option>
</el-select>
@ -735,18 +684,21 @@ export default {
//
gridStaffTableListData:[],
agencyId: localStorage.getItem("agencyId"),
gridOrgId:'',
departmentOrgId:'',
anId:localStorage.getItem("agencyId"),
// ID
userAgencyId: localStorage.getItem("agencyId"),
// ID
currentAgencyId: localStorage.getItem("agencyId"),
// ID
currentDepartmentId:'',
// ID
currentGridOrgId:'',
//
lat:'11',
lng:'11',
latitude:'39.984104',
longitude:'116.307503',
Navigation:'',
//
lat:'11',
lng:'11',
latitude:'11',
longitude:'11',
Navigation:'',
//
queryParams: {
deptName: undefined,
@ -766,12 +718,12 @@ export default {
deptList: [],
//
dialogVisible:false,
dialogVisibleGrid:false,
dialogVisiblePeo:false,
Disable:false,
details:false,
transferPeo:false,
dialogVisible: false,
dialogVisibleGrid: false,
dialogVisiblePeo: false,
Disable: false,
details: false,
transferPeo: false,
//
insertForm:{
departmentName:'',
@ -888,53 +840,38 @@ export default {
{value: 'parttime' , label: '兼职'}
],
//
dutyList:[
{value: 'agency_leader' , label: '单位领导'},
{value: 'dept_leader' , label: '部门领导'},
{value: 'party_principals' , label: '党建负责人'},
{value: 'manager' , label: '管理员'},
{value: 'staff' , label: '工作人员'},
{value: 'grid_manager' , label: '网格长'},
{value: 'grid_party_director' , label: '党建宣传员'},
{value: 'root_manager' , label: '超级管理员'},
{value: 'grid_member' , label: '网格员'},
dutyList:[],
//
modifyPeo:false,
submitOrgid:'',
//
options:[
{
value:'',
label:'',
children:[
{
value:'',
label:'',
children:[]
},
{
value:'',
label:'',
children:[]
}
],
}
],
// angencuId
//
entry:false,
//
modifyPeo:false,
submitOrgid:'',
//
options:[
{
value:'',
label:'',
children:[
{
value:'',
label:'',
children:[]
},
{
value:'',
label:'',
children:[]
}
],
}
],
selectValue: [],
selectValue: [],
//
breadcrumbArr: [],
// ID
currentBreadCrumbKey: '',
currentBreadcrumbKey: '',
//
zonings:[],
//
rules: {
rules: {
departmentName:[
{ required: true, message: '社区名称必填', trigger: 'blur' }
],
@ -948,7 +885,8 @@ export default {
this.getAgencyList()
this.getDepartmentList()
this.getGridList()
this.agencyPeo()
this.getAgencyStaffListData()
this.getRoleList()
// this.getNavigation()
//
this.assembleBreadcrumbArr(localStorage.getItem('agencyId'), 'agency')
@ -1002,7 +940,6 @@ export default {
methods:{
// id
handleChange (e) {
console.log(e)
this.transferForm.orgId = e[1]
if(this.transferForm.orgId != null || ''){
if(this.transferForm.orgId === 0){
@ -1016,14 +953,25 @@ export default {
this.transferForm.orgId = e[0]
this.transferForm.orgType = 'agency'
}
},
/** 查询系统工作人员角色(职责) */
async getRoleList () {
const url = "/gov/org/staff/rolelist"
let params = {
agencyId: this.currentAgencyId
}
const { data, code, msg } = await requestPost(url,params)
if(code === 0){
this.dutyList = data
}else{
this.$message.error(msg)
}
},
/** 查询组织列表 */
async getAgencyList(){
const url = "/gov/org/agency/agencylist"
let params = {
agencyId: this.agencyId
agencyId: this.currentAgencyId
}
const { data, code, msg } = await requestPost(url,params)
@ -1039,7 +987,7 @@ export default {
const url = "/gov/org/department/departmentlist"
let params = {
agencyId:this.agencyId
agencyId: this.currentAgencyId
}
const { data, code, msg } = await requestPost(url,params)
@ -1056,7 +1004,7 @@ export default {
const url = "/gov/org/grid/allgrids"
let params = {
agencyId:this.agencyId
agencyId: this.currentAgencyId
}
const { data, code, msg } = await requestPost(url,params)
@ -1069,11 +1017,11 @@ export default {
},
//
async GridPeo(){
async getGridStaffListData(){
const url = "/data/aggregator/org/stafflist"
let params = {
orgId:this.gridOrgId,
orgId:this.currentGridOrgId,
orgType:'grid',
pageNo:1,
pageSize:100
@ -1088,11 +1036,11 @@ export default {
}
},
//
async agencyPeo(){
async getAgencyStaffListData(){
const url = "/data/aggregator/org/stafflist"
let params = {
orgId:this.anId,
orgId: this.currentAgencyId,
orgType:'agency',
pageNo:1,
pageSize:100
@ -1108,11 +1056,11 @@ export default {
},
//
async communityPeo(){
async getDepartmentStaffListData(){
const url = "/data/aggregator/org/stafflist"
let params = {
orgId:this.departmentOrgId,
orgId:this.currentDepartmentId,
orgType:'dept',
pageNo:1,
pageSize:100
@ -1149,7 +1097,7 @@ export default {
this.getAgencyList()
this.getDepartmentList()
this.getGridList()
this.agencyPeo()
this.getAgencyStaffListData()
}else{
this.$message.error(msg)
}
@ -1179,7 +1127,7 @@ export default {
this.getAgencyList()
this.getDepartmentList()
this.getGridList()
this.agencyPeo()
this.getAgencyStaffListData()
} else {
this.$message.error(msg)
}
@ -1209,7 +1157,7 @@ export default {
this.getAgencyList()
this.getDepartmentList()
this.getGridList()
this.agencyPeo()
this.getAgencyStaffListData()
} else {
this.$message.error(msg)
}
@ -1238,7 +1186,7 @@ export default {
this.getAgencyList()
this.getDepartmentList()
this.getGridList()
this.agencyPeo()
this.getAgencyStaffListData()
} else {
this.$message.error(msg)
}
@ -1434,95 +1382,90 @@ export default {
this.gridStaffTableListData = []
this.departmentStaffTableListData =[]
this.agencyStaffTableListData = []
this.gridOrgId = gridId
this.currentGridOrgId = gridId
this.gridStaffTableFlag = true
this.departmentStaffTableFlag = false
this.currentAgencyStaffTableFlag = false
this.agencyTableFlag = false
this.departmentTableFlag = false
this.gridTableFlag = false
this.GridPeo()
this.getGridStaffListData()
this.assembleBreadcrumbArr(gridId, 'grid')
},
//
//
entryDepartment(departmentId){
this.gridStaffTableListData = []
this.departmentStaffTableListData = []
this.agencyStaffTableListData = []
this.departmentOrgId = departmentId
this.currentDepartmentId = departmentId
this.departmentStaffTableFlag = true
this.currentAgencyStaffTableFlag = false
this.gridStaffTableFlag = false
this.gridTableFlag = false
this.agencyTableFlag = false
this.departmentTableFlag = false
this.communityPeo()
this.getDepartmentStaffListData()
this.assembleBreadcrumbArr(departmentId, 'department')
},
//
entryAgency(agencyId){
this.currentAgencyId = agencyId
this.agencyTableListData = []
this.departmentTableListData = []
this.gridTableListData = []
this.gridStaffTableListData = []
this.agencyStaffTableListData = []
this.departmentStaffTableListData = []
this.agencyId = agencyId
this.getDepartmentList()
this.getGridList()
this.anId = agencyId
this.agencyPeo()
this.entry = true
this.agencyId = agencyId
this.getAgencyStaffListData()
this.getAgencyList()
this.assembleBreadcrumbArr(agencyId, 'agency')
},
//
addCommunity(row){
this.insertForm.agencyId = this.anId
this.insertForm.agencyId = this.currentAgencyId
this.dialogVisible = true
},
//
addGrid(row){
this.GridForm.agencyId = this.anId
this.GridForm.agencyId = this.currentAgencyId
this.getDictionaries()
this.dialogVisibleGrid = true
// this.initMap()
},
//
addPeo(row){
this.dialogVisiblePeo = true
this.peoForm.orgType = 'agency'
this.submitOrgid = this.anId
this.submitOrgid = this.currentAgencyId
},
//
xiuPeo(row){
this.modifyPeo = true
this.peoForm.orgType = 'agency'
this.submitOrgid = this.anId
this.submitOrgid = this.currentAgencyId
this.peoForm.name = row.name
this.peoForm.mobile = row.mobile
this.peoForm.gender = row.gender
this.peoForm.post = row.post
this.peoForm.duty = row.roles
console.log(row)
},
//
addCommunityPeo(){
this.dialogVisiblePeo = true
this.peoForm.orgType = 'dept'
this.submitOrgid = this.departmentOrgId
this.submitOrgid = this.currentDepartmentId
},
//
xiuCommunityPeo(row){
this.modifyPeo = true
this.peoForm.orgType = 'dept'
this.submitOrgid = this.departmentOrgId
this.submitOrgid = this.currentDepartmentId
this.peoForm.name = row.name
this.peoForm.mobile = row.mobile
this.peoForm.gender = row.gender
@ -1533,18 +1476,37 @@ export default {
addGridPeo(){
this.dialogVisiblePeo = true
this.peoForm.orgType = 'grid'
this.submitOrgid = this.gridOrgId
this.submitOrgid = this.currentGridOrgId
},
//
xiuGridPeo(row){
async xiuGridPeo(row){
this.modifyPeo = true
this.peoForm.orgType = 'grid'
this.submitOrgid = this.gridOrgId
this.peoForm.name = row.name
this.peoForm.mobile = row.mobile
this.peoForm.gender = row.gender
this.peoForm.post = row.post
this.peoForm.duty = row.roles
this.submitOrgid = this.currentGridOrgId
const url = "/gov/org/staff/editstaffinit"
let params = {
staffId: row.staffId,
agencyId: this.currentAgencyId
}
const { data, code, msg } = await requestPost(url,params)
if(code === 0){
this.peoForm.name = data.name
this.peoForm.mobile = data.mobile
this.peoForm.gender = data.gender
this.peoForm.post = data.workType
//
let existedRoleArr = []
data.roleList.forEach(function (sysRole) {
if (sysRole.selected === true) {
existedRoleArr.push(sysRole.roleId)
}
})
this.peoForm.duty = existedRoleArr
} else {
this.$message.error(msg)
}
},
//
cancelDisable(){
@ -1552,7 +1514,6 @@ export default {
},
//
DisablePeo(row){
console.log(row)
this.DisableForm.staffId = row.staffId
this.Disable = true
},
@ -1574,7 +1535,7 @@ export default {
this.getAgencyList()
this.getDepartmentList()
this.getGridList()
this.agencyPeo()
this.getAgencyStaffListData()
} else {
this.$message.error(msg)
}
@ -1595,10 +1556,7 @@ export default {
this.peoForm.activeTime = data.activeTime
this.peoForm.duty = data.roles
this.peoForm.zuzhi = data.orgName
console.log(row)
}
this.details = true
},
@ -1618,7 +1576,6 @@ export default {
const { data, code, msg } = await requestPost(url,params)
if(code === 0){
console.log(data)
this.options[0].label = data.agencyName
this.options[0].value = data.agencyId
@ -1647,7 +1604,6 @@ export default {
}else{
this.$message.error("树查询失败",msg)
}
},
//
@ -1670,7 +1626,7 @@ export default {
this.getAgencyList()
this.getDepartmentList()
this.getGridList()
this.agencyPeo()
this.getAgencyStaffListData()
} else {
this.$message.error(msg)
@ -1691,9 +1647,9 @@ export default {
// if(code === 0){
// this.Navigation = data.agencyName
// }
//
async assembleBreadcrumbArr (id, orgType) {
this.currentBreadCrumbKey = id
this.currentBreadcrumbKey = id
if (orgType === 'agency') {
const url = '/gov/org/agency/agencydetail'
let params = {
@ -1701,6 +1657,7 @@ export default {
}
const { data, code, msg } = await requestPost(url, params)
if(code === 0){
//
if (data.level === 'community') {
this.agencyTableFlag = false
} else {
@ -1794,8 +1751,8 @@ export default {
this.departmentStaffTableListData = []
this.gridTableListData = []
this.gridStaffTableListData = []
this.agencyId = orgId
this.anId = orgId
this.userAgencyId = orgId
this.currentAgencyId = orgId
this.agencyTableFlag = true
this.currentAgencyStaffTableFlag = true
@ -1804,12 +1761,11 @@ export default {
this.gridTableFlag = true
this.gridStaffTableFlag = false
this.assembleBreadcrumbArr(orgId, 'agency')
this.getAgencyList()
this.getDepartmentList()
this.getGridList()
this.agencyPeo()
this.entry = true
this.getAgencyList()
this.assembleBreadcrumbArr(orgId, 'agency')
this.getAgencyStaffListData()
}
//
//
@ -1819,7 +1775,7 @@ export default {
this.departmentStaffTableListData = []
this.gridStaffTableListData = []
this.departmentOrgId = orgId
this.currentDepartmentId = orgId
this.agencyTableFlag = false
this.currentAgencyStaffTableFlag = false
@ -1828,14 +1784,14 @@ export default {
this.gridTableFlag = false
this.gridStaffTableFlag = false
this.communityPeo()
this.getDepartmentStaffListData()
this.assembleBreadcrumbArr(orgId, 'department')
} else if (orgType === 'grid') {
this.agencyStaffTableListData = []
this.departmentStaffTableListData =[]
this.gridStaffTableListData = []
this.gridOrgId = orgId
this.currentGridOrgId = orgId
this.agencyTableFlag = false
this.currentAgencyStaffTableFlag = false
@ -1843,22 +1799,21 @@ export default {
this.departmentStaffTableFlag = false
this.gridTableFlag = false
this.gridStaffTableFlag = true
this.GridPeo()
this.getGridStaffListData()
this.assembleBreadcrumbArr(orgId, 'grid')
} */
},
//
async getUser(){
const url = '/data/report/screen/agency/agencydetail-multic'
const url = '/gov/org/agency/agencydetail'
let params = {
agencyId:localStorage.getItem('agencyId')
agencyId: localStorage.getItem('agencyId')
}
const { data, code, msg } = await requestPost(url,params)
if(code === 0){
console.log(data)
this.userForm.areaCode = data.areaCode
this.userForm.level = data.level
this.userForm.parentAgencyId = data.agencyId
@ -1923,7 +1878,7 @@ export default {
this.getAgencyList()
this.getDepartmentList()
this.getGridList()
this.agencyPeo()
this.getAgencyStaffListData()
}else {
this.$message.error(msg)
}

Loading…
Cancel
Save