|
|
@ -388,7 +388,7 @@ |
|
|
title="人员详情" |
|
|
title="人员详情" |
|
|
:visible.sync="details" |
|
|
:visible.sync="details" |
|
|
width="30%" |
|
|
width="30%" |
|
|
:before-close="handleClose"> |
|
|
:before-close="handleClosePeoView"> |
|
|
<el-form> |
|
|
<el-form> |
|
|
<el-form-item label="姓名" > |
|
|
<el-form-item label="姓名" > |
|
|
<el-input v-model="peoForm.name" placeholder="姓名" :disabled="true"></el-input> |
|
|
<el-input v-model="peoForm.name" placeholder="姓名" :disabled="true"></el-input> |
|
|
@ -686,12 +686,14 @@ export default { |
|
|
|
|
|
|
|
|
// 用户所属组织ID |
|
|
// 用户所属组织ID |
|
|
userAgencyId: localStorage.getItem("agencyId"), |
|
|
userAgencyId: localStorage.getItem("agencyId"), |
|
|
|
|
|
// 修改时操作的用户staffId |
|
|
|
|
|
userStaffId: '', |
|
|
// 当前被操作的组织的ID |
|
|
// 当前被操作的组织的ID |
|
|
currentAgencyId: localStorage.getItem("agencyId"), |
|
|
currentAgencyId: localStorage.getItem("agencyId"), |
|
|
// 当前被操作的部门的ID |
|
|
// 当前被操作的部门的ID |
|
|
currentDepartmentId:'', |
|
|
currentDepartmentId:'14f572e724eecf7668b655505d789cab', |
|
|
// 当前被操作的网格的ID |
|
|
// 当前被操作的网格的ID |
|
|
currentGridOrgId:'', |
|
|
currentGridOrgId:'63d5ff92ea981b1c58e4914ac894c610', |
|
|
|
|
|
|
|
|
// 经纬度坐标 |
|
|
// 经纬度坐标 |
|
|
lat:'11', |
|
|
lat:'11', |
|
|
@ -941,15 +943,27 @@ export default { |
|
|
methods:{ |
|
|
methods:{ |
|
|
// 点击后获取id |
|
|
// 点击后获取id |
|
|
handleChange (e) { |
|
|
handleChange (e) { |
|
|
|
|
|
console.log(e) |
|
|
this.transferForm.orgId = e[1] |
|
|
this.transferForm.orgId = e[1] |
|
|
if(this.transferForm.orgId != null || ''){ |
|
|
if(this.transferForm.orgId != null || ''){ |
|
|
if(this.transferForm.orgId === 0){ |
|
|
if(this.transferForm.orgId === 0){ |
|
|
|
|
|
if(e[2] == null || ''){ |
|
|
|
|
|
this.transferForm.orgType = 'dept' |
|
|
|
|
|
this.transferForm.orgId = "14f572e724eecf7668b655505d789cab" |
|
|
|
|
|
}else{ |
|
|
this.transferForm.orgId = e[2] |
|
|
this.transferForm.orgId = e[2] |
|
|
this.transferForm.orgType = 'dept' |
|
|
this.transferForm.orgType = 'dept' |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
if(e[2] == null || ''){ |
|
|
|
|
|
this.transferForm.orgType = 'grid' |
|
|
|
|
|
this.transferForm.orgId = "63d5ff92ea981b1c58e4914ac894c610" |
|
|
} else { |
|
|
} else { |
|
|
this.transferForm.orgId = e[2] |
|
|
this.transferForm.orgId = e[2] |
|
|
this.transferForm.orgType = 'grid' |
|
|
this.transferForm.orgType = 'grid' |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
}else{ |
|
|
}else{ |
|
|
this.transferForm.orgId = e[0] |
|
|
this.transferForm.orgId = e[0] |
|
|
this.transferForm.orgType = 'agency' |
|
|
this.transferForm.orgType = 'agency' |
|
|
@ -1169,25 +1183,28 @@ export default { |
|
|
const url = "/gov/org/staff/editstaff" |
|
|
const url = "/gov/org/staff/editstaff" |
|
|
|
|
|
|
|
|
let params = { |
|
|
let params = { |
|
|
orgType:this.peoForm.orgType, |
|
|
staffId:this.userStaffId, |
|
|
name:this.peoForm.name, |
|
|
name:this.peoForm.name, |
|
|
mobile:this.peoForm.mobile, |
|
|
mobile:this.peoForm.mobile, |
|
|
gender:this.peoForm.gender, |
|
|
gender:this.peoForm.gender === '男' ? 1 : 0, |
|
|
workType:this.peoForm.post, |
|
|
workType:this.peoForm.post, |
|
|
roles:this.peoForm.duty, |
|
|
roles:this.peoForm.duty, |
|
|
orgId:this.submitOrgid, |
|
|
agencyId:this.userAgencyId, |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const { data, code, msg } = await requestPost(url,params) |
|
|
const { data, code, msg } = await requestPost(url,params) |
|
|
|
|
|
|
|
|
if(code === 0) { |
|
|
if(code === 0) { |
|
|
this.$message.success("添加成功") |
|
|
this.$message.success("修改成功") |
|
|
this.dialogVisiblePeo = false |
|
|
this.modifyPeo = false |
|
|
this.peoForm = [] |
|
|
|
|
|
this.getAgencyList() |
|
|
this.getAgencyList() |
|
|
this.getDepartmentList() |
|
|
this.getDepartmentList() |
|
|
this.getGridList() |
|
|
this.getGridList() |
|
|
this.getAgencyStaffListData() |
|
|
this.getAgencyStaffListData() |
|
|
|
|
|
this.getDepartmentStaffListData() |
|
|
|
|
|
this.getGridStaffListData() |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
this.$message.error(msg) |
|
|
this.$message.error(msg) |
|
|
} |
|
|
} |
|
|
@ -1233,6 +1250,11 @@ export default { |
|
|
}) |
|
|
}) |
|
|
.catch(_ => {}); |
|
|
.catch(_ => {}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
// 人员查看叉号关闭 |
|
|
|
|
|
handleClosePeoView(done){ |
|
|
|
|
|
this.insertFormRest() |
|
|
|
|
|
done(); |
|
|
|
|
|
}, |
|
|
// 社区新增弹框重置函数 |
|
|
// 社区新增弹框重置函数 |
|
|
insertFormRest(){ |
|
|
insertFormRest(){ |
|
|
this.insertForm.name = '', |
|
|
this.insertForm.name = '', |
|
|
@ -1445,34 +1467,14 @@ export default { |
|
|
this.peoForm.orgType = 'agency' |
|
|
this.peoForm.orgType = 'agency' |
|
|
this.submitOrgid = this.currentAgencyId |
|
|
this.submitOrgid = this.currentAgencyId |
|
|
}, |
|
|
}, |
|
|
// 修改人员 |
|
|
|
|
|
xiuPeo(row){ |
|
|
|
|
|
this.modifyPeo = true |
|
|
|
|
|
this.peoForm.orgType = 'agency' |
|
|
|
|
|
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 |
|
|
|
|
|
}, |
|
|
|
|
|
// 新增社区人员 |
|
|
// 新增社区人员 |
|
|
addCommunityPeo(){ |
|
|
addCommunityPeo(){ |
|
|
this.dialogVisiblePeo = true |
|
|
this.dialogVisiblePeo = true |
|
|
this.peoForm.orgType = 'dept' |
|
|
this.peoForm.orgType = 'dept' |
|
|
this.submitOrgid = this.currentDepartmentId |
|
|
this.submitOrgid = this.currentDepartmentId |
|
|
}, |
|
|
}, |
|
|
// 修改社区人员 |
|
|
|
|
|
xiuCommunityPeo(row){ |
|
|
|
|
|
this.modifyPeo = true |
|
|
|
|
|
this.peoForm.orgType = 'dept' |
|
|
|
|
|
this.submitOrgid = this.currentDepartmentId |
|
|
|
|
|
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 |
|
|
|
|
|
}, |
|
|
|
|
|
// 新增网格人员 |
|
|
// 新增网格人员 |
|
|
addGridPeo(){ |
|
|
addGridPeo(){ |
|
|
this.dialogVisiblePeo = true |
|
|
this.dialogVisiblePeo = true |
|
|
@ -1484,18 +1486,87 @@ export default { |
|
|
this.modifyPeo = true |
|
|
this.modifyPeo = true |
|
|
this.peoForm.orgType = 'grid' |
|
|
this.peoForm.orgType = 'grid' |
|
|
this.submitOrgid = this.currentGridOrgId |
|
|
this.submitOrgid = this.currentGridOrgId |
|
|
|
|
|
this.userStaffId = row.staffId |
|
|
|
|
|
|
|
|
|
|
|
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 === 1 ? '男' : '女' |
|
|
|
|
|
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) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
// 修改人员 |
|
|
|
|
|
async xiuPeo(row){ |
|
|
|
|
|
this.modifyPeo = true |
|
|
|
|
|
this.peoForm.orgType = 'agency' |
|
|
|
|
|
this.submitOrgid = this.currentAgencyId |
|
|
|
|
|
this.userStaffId = row.staffId |
|
|
|
|
|
|
|
|
const url = "/gov/org/staff/editstaffinit" |
|
|
const url = "/gov/org/staff/editstaffinit" |
|
|
|
|
|
|
|
|
let params = { |
|
|
let params = { |
|
|
staffId:row.staffId, |
|
|
staffId:row.staffId, |
|
|
agencyId:this.currentAgencyId |
|
|
agencyId:this.currentAgencyId |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const { data, code, msg } = await requestPost(url,params) |
|
|
const { data, code, msg } = await requestPost(url,params) |
|
|
|
|
|
|
|
|
if(code === 0){ |
|
|
if(code === 0){ |
|
|
|
|
|
this.peoForm.name = data.name |
|
|
|
|
|
this.peoForm.mobile = data.mobile |
|
|
|
|
|
this.peoForm.post = data.workType |
|
|
|
|
|
this.peoForm.gender = data.gender === 1 ? '男' : '女' |
|
|
|
|
|
// 已有的权限(职责) |
|
|
|
|
|
let existedRoleArr = [] |
|
|
|
|
|
data.roleList.forEach(function (sysRole) { |
|
|
|
|
|
if (sysRole.selected === true) { |
|
|
|
|
|
existedRoleArr.push(sysRole.roleId) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
this.peoForm.duty = existedRoleArr |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message.error(msg) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
// 修改社区人员 |
|
|
|
|
|
async xiuCommunityPeo(row){ |
|
|
|
|
|
this.modifyPeo = true |
|
|
|
|
|
this.peoForm.orgType = 'dept' |
|
|
|
|
|
this.submitOrgid = this.currentDepartmentId |
|
|
|
|
|
this.userStaffId = row.staffId |
|
|
|
|
|
|
|
|
|
|
|
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.name = data.name |
|
|
this.peoForm.mobile = data.mobile |
|
|
this.peoForm.mobile = data.mobile |
|
|
this.peoForm.gender = data.gender |
|
|
this.peoForm.gender = data.gender === 1 ? '男' : '女' |
|
|
this.peoForm.post = data.workType |
|
|
this.peoForm.post = data.workType |
|
|
// 已有的权限(职责) |
|
|
// 已有的权限(职责) |
|
|
let existedRoleArr = [] |
|
|
let existedRoleArr = [] |
|
|
@ -1508,6 +1579,8 @@ export default { |
|
|
}else { |
|
|
}else { |
|
|
this.$message.error(msg) |
|
|
this.$message.error(msg) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
// 取消禁用按钮 |
|
|
// 取消禁用按钮 |
|
|
cancelDisable(){ |
|
|
cancelDisable(){ |
|
|
@ -1628,6 +1701,9 @@ export default { |
|
|
this.getDepartmentList() |
|
|
this.getDepartmentList() |
|
|
this.getGridList() |
|
|
this.getGridList() |
|
|
this.getAgencyStaffListData() |
|
|
this.getAgencyStaffListData() |
|
|
|
|
|
this.getDepartmentStaffListData() |
|
|
|
|
|
this.getAgencyStaffListData() |
|
|
|
|
|
this.getGridStaffListData() |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
this.$message.error(msg) |
|
|
this.$message.error(msg) |
|
|
|