用户管理
This commit is contained in:
parent
70bc20674b
commit
b179c2d76c
|
|
@ -137,7 +137,7 @@
|
|||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="出行人:" prop="orgHeadUserIdList">
|
||||
<el-select v-model="form.orgHeadUserIdList" multiple placeholder="部门负责人" filterable clearable style="width: 100%;">
|
||||
<el-select v-model="form.orgHeadUserIdList" multiple placeholder="请选择出行人" filterable clearable style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in personOptions"
|
||||
:key="item.userIds"
|
||||
|
|
@ -226,7 +226,7 @@
|
|||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="代理主持工作人员:" prop="hostUserId">
|
||||
<el-select v-model="form.hostUserId" multiple placeholder="人员角色" clearable>
|
||||
<el-select v-model="form.hostUserId" multiple placeholder="请选择人员姓名" clearable>
|
||||
<el-option
|
||||
v-for="item in userList"
|
||||
:key="item.userId"
|
||||
|
|
@ -529,6 +529,17 @@ export default {
|
|||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
var list = this.form.hostUserId.join(",");
|
||||
|
||||
// 将字符串分割成数组
|
||||
const userIdArray = list.split(',');
|
||||
// 检查数组中是否同时存在0和其他非0的值
|
||||
const containsZero = userIdArray.includes('0');
|
||||
const containsOtherValues = userIdArray.some(id => id !== '0');
|
||||
if (containsZero && containsOtherValues) {
|
||||
this.$modal.msgError("选择’/‘后不能在选择其他人员");
|
||||
return ;
|
||||
}
|
||||
|
||||
this.form.hostUserId = list;
|
||||
|
||||
var lists = this.form.orgHeadUserIdList.join(",");
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@
|
|||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="代理主持工作人员:" prop="hostUserId">
|
||||
<el-select v-model="form.hostUserId" multiple placeholder="人员角色" filterable clearable>
|
||||
<el-select v-model="form.hostUserId" multiple placeholder="请选择人员姓名" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in userList"
|
||||
:key="item.userId"
|
||||
|
|
@ -504,6 +504,16 @@ export default {
|
|||
if (valid) {
|
||||
console.log(this.form)
|
||||
var list = this.form.hostUserId.join(",");
|
||||
// 将字符串分割成数组
|
||||
const userIdArray = list.split(',');
|
||||
// 检查数组中是否同时存在0和其他非0的值
|
||||
const containsZero = userIdArray.includes('0');
|
||||
const containsOtherValues = userIdArray.some(id => id !== '0');
|
||||
if (containsZero && containsOtherValues) {
|
||||
this.$modal.msgError("选择’/‘后不能在选择其他人员");
|
||||
return ;
|
||||
}
|
||||
|
||||
this.form.hostUserId = list;
|
||||
if (this.form.id != undefined) {
|
||||
this.form.examineStatus = 0
|
||||
|
|
|
|||
|
|
@ -498,9 +498,13 @@ export default {
|
|||
console.log(this.form);
|
||||
|
||||
// 转换 hostUserId 字段为整数数组
|
||||
let numArr = this.form.hostUserId.split(",");
|
||||
let num = numArr.map(item => parseInt(item)); // 使用 map 简化代码
|
||||
this.$set(this.form, "hostUserId", num);
|
||||
if(this.form.hostUserId ==null){
|
||||
this.$set(this.form, "hostUserId", 0);
|
||||
}else{
|
||||
let numArr = this.form.hostUserId.split(",");
|
||||
let num = numArr.map(item => parseInt(item)); // 使用 map 简化代码
|
||||
this.$set(this.form, "hostUserId", num);
|
||||
}
|
||||
this.$set(this.form,"postName",postName)
|
||||
this.open = true;
|
||||
this.isView = false;
|
||||
|
|
@ -521,9 +525,13 @@ export default {
|
|||
console.log(this.form);
|
||||
|
||||
// 转换 hostUserId 字段为整数数组
|
||||
let numArr = this.form.hostUserId.split(",");
|
||||
let num = numArr.map(item => parseInt(item)); // 使用 map 简化代码
|
||||
this.$set(this.form, "hostUserId", num);
|
||||
if(this.form.hostUserId ==null){
|
||||
this.$set(this.form, "hostUserId", 0);
|
||||
}else{
|
||||
let numArr = this.form.hostUserId.split(",");
|
||||
let num = numArr.map(item => parseInt(item)); // 使用 map 简化代码
|
||||
this.$set(this.form, "hostUserId", num);
|
||||
}
|
||||
this.$set(this.form,"postName",postName)
|
||||
this.open = true;
|
||||
this.isView = true;
|
||||
|
|
@ -546,6 +554,17 @@ export default {
|
|||
if (valid) {
|
||||
console.log(this.form)
|
||||
var list = this.form.hostUserId.join(",");
|
||||
|
||||
// 将字符串分割成数组
|
||||
const userIdArray = list.split(',');
|
||||
// 检查数组中是否同时存在0和其他非0的值
|
||||
const containsZero = userIdArray.includes('0');
|
||||
const containsOtherValues = userIdArray.some(id => id !== '0');
|
||||
if (containsZero && containsOtherValues) {
|
||||
this.$modal.msgError("选择’/‘后不能在选择其他人员");
|
||||
return ;
|
||||
}
|
||||
|
||||
this.form.hostUserId = list;
|
||||
if (this.form.id != undefined) {
|
||||
this.form.examineStatus=0
|
||||
|
|
@ -565,13 +584,14 @@ export default {
|
|||
});
|
||||
},
|
||||
handleBack(row) {
|
||||
var that = this;
|
||||
this.$modal.confirm('是否确认撤回该申请?').then(function() {
|
||||
let param = {
|
||||
id:row.id,
|
||||
examineStatus:'3',
|
||||
}
|
||||
changeHolidayStatus(param).then(response => {
|
||||
this.getList();
|
||||
that.getList();
|
||||
this.$modal.msgSuccess("撤回成功");
|
||||
});
|
||||
})
|
||||
|
|
|
|||
|
|
@ -406,12 +406,21 @@ export default {
|
|||
},
|
||||
pass(){
|
||||
this.$refs["form"].validate(valid => {
|
||||
var name = "";
|
||||
const selectedOrg = this.orgList.find(org => org.id == this.form.orgId);
|
||||
if (selectedOrg) {
|
||||
name = selectedOrg.name;
|
||||
} else {
|
||||
name = '';
|
||||
}
|
||||
|
||||
if (valid) {
|
||||
let param = {
|
||||
id:this.form.id,
|
||||
examineStatus:'1',
|
||||
leaveType:"外出办事",
|
||||
examineOpinion:this.form.examineOpinion
|
||||
examineOpinion:this.form.examineOpinion,
|
||||
orgName: name
|
||||
}
|
||||
this.changExamStatus(param)
|
||||
}
|
||||
|
|
@ -419,12 +428,20 @@ export default {
|
|||
},
|
||||
reject(){
|
||||
this.$refs["form"].validate(valid => {
|
||||
var name = "";
|
||||
const selectedOrg = this.orgList.find(org => org.id == this.form.orgId);
|
||||
if (selectedOrg) {
|
||||
name = selectedOrg.name;
|
||||
} else {
|
||||
name = '';
|
||||
}
|
||||
if (valid) {
|
||||
let param = {
|
||||
id:this.form.id,
|
||||
examineStatus:'2',
|
||||
leaveType:"外出办事",
|
||||
examineOpinion:this.form.examineOpinion
|
||||
examineOpinion:this.form.examineOpinion,
|
||||
orgName:name
|
||||
}
|
||||
this.changExamStatus(param)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -483,9 +483,13 @@
|
|||
console.log(this.form);
|
||||
|
||||
// 转换 hostUserId 字段为整数数组
|
||||
let numArr = this.form.hostUserId.split(",");
|
||||
let num = numArr.map(item => parseInt(item)); // 使用 map 简化代码
|
||||
this.$set(this.form, "hostUserId", num);
|
||||
if(this.form.hostUserId ==null){
|
||||
this.$set(this.form, "hostUserId", 0);
|
||||
}else{
|
||||
let numArr = this.form.hostUserId.split(",");
|
||||
let num = numArr.map(item => parseInt(item)); // 使用 map 简化代码
|
||||
this.$set(this.form, "hostUserId", num);
|
||||
}
|
||||
this.$set(this.form,"postName",postName)
|
||||
// 更新视图状态
|
||||
this.open = true;
|
||||
|
|
@ -507,9 +511,13 @@
|
|||
console.log(this.form);
|
||||
|
||||
// 转换 hostUserId 字段为整数数组
|
||||
let numArr = this.form.hostUserId.split(",");
|
||||
let num = numArr.map(item => parseInt(item)); // 使用 map 简化代码
|
||||
this.$set(this.form, "hostUserId", num);
|
||||
if(this.form.hostUserId ==null){
|
||||
this.$set(this.form, "hostUserId", 0);
|
||||
}else{
|
||||
let numArr = this.form.hostUserId.split(",");
|
||||
let num = numArr.map(item => parseInt(item)); // 使用 map 简化代码
|
||||
this.$set(this.form, "hostUserId", num);
|
||||
}
|
||||
this.$set(this.form,"postName",postName)
|
||||
// 更新视图状态
|
||||
this.open = true;
|
||||
|
|
@ -533,6 +541,17 @@
|
|||
if (valid) {
|
||||
console.log(this.form)
|
||||
var list = this.form.hostUserId.join(",");
|
||||
|
||||
// 将字符串分割成数组
|
||||
const userIdArray = list.split(',');
|
||||
// 检查数组中是否同时存在0和其他非0的值
|
||||
const containsZero = userIdArray.includes('0');
|
||||
const containsOtherValues = userIdArray.some(id => id !== '0');
|
||||
if (containsZero && containsOtherValues) {
|
||||
this.$modal.msgError("选择’/‘后不能在选择其他人员");
|
||||
return ;
|
||||
}
|
||||
|
||||
this.form.hostUserId = list;
|
||||
if (this.form.id != undefined) {
|
||||
this.form.examineStatus=0
|
||||
|
|
@ -552,13 +571,14 @@
|
|||
});
|
||||
},
|
||||
handleBack(row) {
|
||||
var that = this;
|
||||
this.$modal.confirm('是否确认撤回该申请?').then(function() {
|
||||
let param = {
|
||||
id:row.id,
|
||||
examineStatus:'3',
|
||||
}
|
||||
changeHolidayStatus(param).then(response => {
|
||||
this.getList();
|
||||
that.getList();
|
||||
this.$modal.msgSuccess("撤回成功");
|
||||
});
|
||||
})
|
||||
|
|
|
|||
|
|
@ -406,12 +406,20 @@ export default {
|
|||
},
|
||||
pass(){
|
||||
this.$refs["form"].validate(valid => {
|
||||
var name = "";
|
||||
const selectedOrg = this.orgList.find(org => org.id == this.form.orgId);
|
||||
if (selectedOrg) {
|
||||
name = selectedOrg.name;
|
||||
} else {
|
||||
name = '';
|
||||
}
|
||||
if (valid) {
|
||||
let param = {
|
||||
id:this.form.id,
|
||||
examineStatus:'1',
|
||||
leaveType:"轮休",
|
||||
examineOpinion:this.form.examineOpinion
|
||||
examineOpinion:this.form.examineOpinion,
|
||||
orgName:name
|
||||
}
|
||||
this.changExamStatus(param)
|
||||
}
|
||||
|
|
@ -419,12 +427,21 @@ export default {
|
|||
},
|
||||
reject(){
|
||||
this.$refs["form"].validate(valid => {
|
||||
var name = "";
|
||||
const selectedOrg = this.orgList.find(org => org.id == this.form.orgId);
|
||||
if (selectedOrg) {
|
||||
name = selectedOrg.name;
|
||||
} else {
|
||||
name = '';
|
||||
}
|
||||
|
||||
if (valid) {
|
||||
let param = {
|
||||
id:this.form.id,
|
||||
examineStatus:'2',
|
||||
leaveType:"轮休",
|
||||
examineOpinion:this.form.examineOpinion
|
||||
examineOpinion:this.form.examineOpinion,
|
||||
orgName:name
|
||||
}
|
||||
this.changExamStatus(param)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue