用户管理

This commit is contained in:
lSun 2024-11-14 20:15:11 +08:00
parent 70bc20674b
commit b179c2d76c
6 changed files with 116 additions and 21 deletions

View File

@ -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(',');
// 00
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(",");

View File

@ -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(',');
// 00
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

View File

@ -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(',');
// 00
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("撤回成功");
});
})

View File

@ -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)
}

View File

@ -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(',');
// 00
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("撤回成功");
});
})

View File

@ -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)
}