|
@ -32,7 +32,7 @@ |
|
|
:props="optionProps" |
|
|
:props="optionProps" |
|
|
@change="handleChangeAgency" |
|
|
@change="handleChangeAgency" |
|
|
clearable></el-cascader> |
|
|
clearable></el-cascader> |
|
|
<span v-if="formType==='edit'">{{peoForm.orgName||'--'}}</span> |
|
|
<span v-if="formType==='edit'">{{peoForm.agencyName||'--'}}</span> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="专兼职" |
|
|
<el-form-item label="专兼职" |
|
|
prop="workType"> |
|
|
prop="workType"> |
|
@ -189,6 +189,14 @@ export default { |
|
|
|
|
|
|
|
|
// 添加人员 |
|
|
// 添加人员 |
|
|
async submitPeoDo () { |
|
|
async submitPeoDo () { |
|
|
|
|
|
if (this.peoForm.roles.length === 0) { |
|
|
|
|
|
this.$message.error("请选择职责"); |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
|
|
|
if (this.peoForm.newRoles.length === 0) { |
|
|
|
|
|
this.$message.error("请选择角色"); |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
const url = "/gov/org/staff/addstaffv2"; |
|
|
const url = "/gov/org/staff/addstaffv2"; |
|
|
// console.log('this.peoForm', this.peoForm) |
|
|
// console.log('this.peoForm', this.peoForm) |
|
|
// return false |
|
|
// return false |
|
@ -207,6 +215,15 @@ export default { |
|
|
|
|
|
|
|
|
// 人员修改 |
|
|
// 人员修改 |
|
|
async updatePeoDo () { |
|
|
async updatePeoDo () { |
|
|
|
|
|
|
|
|
|
|
|
if (this.peoForm.roles.length === 0) { |
|
|
|
|
|
this.$message.error("请选择职责"); |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
|
|
|
if (this.peoForm.newRoles.length === 0) { |
|
|
|
|
|
this.$message.error("请选择角色"); |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
const url = "/gov/org/staff/editstaff"; |
|
|
const url = "/gov/org/staff/editstaff"; |
|
|
|
|
|
|
|
|
let params = { |
|
|
let params = { |
|
@ -224,7 +241,7 @@ export default { |
|
|
if (code === 0) { |
|
|
if (code === 0) { |
|
|
this.$message.success("操作成功"); |
|
|
this.$message.success("操作成功"); |
|
|
|
|
|
|
|
|
|
|
|
this.dialogOk() |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
this.$message.error(msg); |
|
|
this.$message.error(msg); |
|
@ -249,14 +266,14 @@ export default { |
|
|
this.peoForm = { ...data }; |
|
|
this.peoForm = { ...data }; |
|
|
|
|
|
|
|
|
// 已有的权限(职责) |
|
|
// 已有的权限(职责) |
|
|
this.peoForm.roles = []; |
|
|
let existedDutyArr = []; |
|
|
data.roleList.forEach(function (sysDuty) { |
|
|
data.roleList.forEach(function (sysDuty) { |
|
|
if (sysDuty.selected === true) { |
|
|
if (sysDuty.selected === true) { |
|
|
this.peoForm.roles.push(sysDuty.roleId) |
|
|
this.peoForm.roles.push(sysDuty.roleId) |
|
|
existedDutyArr.push(sysDuty.roleId); |
|
|
existedDutyArr.push(sysDuty.roleId); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
// this.peoForm.roles = [...existedDutyArr]; |
|
|
this.peoForm.roles = existedDutyArr; |
|
|
// 已有的权限(角色) |
|
|
// 已有的权限(角色) |
|
|
let existedRoleArr = []; |
|
|
let existedRoleArr = []; |
|
|
data.newRoleList.forEach(function (sysRole) { |
|
|
data.newRoleList.forEach(function (sysRole) { |
|
|