diff --git a/src/api/process/orgApply.js b/src/api/process/orgApply.js index 18caea9..3501dbf 100644 --- a/src/api/process/orgApply.js +++ b/src/api/process/orgApply.js @@ -86,3 +86,12 @@ export function getAttGroupList() { method: 'get' }) } + +// 查询部门列表 +export function listDept(query) { + return request({ + url: '/system/attDetails/orgList', + method: 'get', + params: query + }) +} diff --git a/src/views/process/evection/index.vue b/src/views/process/evection/index.vue index 5e70436..6e7a9a6 100644 --- a/src/views/process/evection/index.vue +++ b/src/views/process/evection/index.vue @@ -530,6 +530,18 @@ export default { return selectedUserNames.join(', '); }, + getSelectedUserNameEvecTion() { + const selectedUserIdsStr = this.form.hostUserId; + // 将字符串分割成字符串数组,并将每个元素转换为整数 + const selectedUserIds = selectedUserIdsStr.split(',').map(id => parseInt(id.trim(), 10)); + + const selectedUsers = this.userList.filter(option => selectedUserIds.includes(option.userId)); + + const selectedUserNames = selectedUsers.map(user => user.userName); + + return selectedUserNames.join(', '); + }, + /** 提交按钮 */ submitForm: function () { console.log(this.form) @@ -548,6 +560,10 @@ export default { } this.form.hostUserId = list; + var hostNameList = this.getSelectedUserNameEvecTion(); + this.form.hostUserName = hostNameList; + + var lists = this.form.orgHeadUserIdList.join(","); this.form.travelers = lists; diff --git a/src/views/process/leaveReporting/index.vue b/src/views/process/leaveReporting/index.vue index 9c98636..6df8901 100644 --- a/src/views/process/leaveReporting/index.vue +++ b/src/views/process/leaveReporting/index.vue @@ -345,9 +345,7 @@ export default { leaveDuration: [ {required: true, message: "休假时长不能为空", trigger: "blur"} ], - location: [ - {required: true, message: "地点不能为空", trigger: "blur"} - ], + isAgree: [ {required: true, message: "是否请示领导同意不能为空", trigger: "blur"} ], @@ -520,6 +518,9 @@ export default { } this.form.hostUserId = list; + var nameList = this.getSelectedUserNameLeave(); + this.form.hostUserName = nameList; + if (this.form.id != undefined) { this.form.examineStatus = 0 updateLeaveReporting(this.form).then(response => { @@ -537,6 +538,19 @@ export default { } }); }, + + getSelectedUserNameLeave() { + const selectedUserIdsStr = this.form.hostUserId; + // 将字符串分割成字符串数组,并将每个元素转换为整数 + const selectedUserIds = selectedUserIdsStr.split(',').map(id => parseInt(id.trim(), 10)); + + const selectedUsers = this.userList.filter(option => selectedUserIds.includes(option.userId)); + + const selectedUserNames = selectedUsers.map(user => user.userName); + + return selectedUserNames.join(', '); + }, + /** 删除按钮操作 */ handleDelete(row) { const Ids = row.id; diff --git a/src/views/process/orgApply/index.vue b/src/views/process/orgApply/index.vue index 996b523..6dd303c 100644 --- a/src/views/process/orgApply/index.vue +++ b/src/views/process/orgApply/index.vue @@ -229,11 +229,10 @@