申请人

This commit is contained in:
xueyuan committed 2023-02-10 15:58:26 +08:00
1 parent 37e20850a0
commit 255e44f1ae
2 files changed
+15 -2

No files matched your search

+14 -2
View File
@@ -86,8 +86,7 @@ class WorkflowService extends Service {
async createWorkflowTask() {
const { actionData } = this.ctx.request.body.appData;
const { jianghuKnex } = this.app;
const { group, formItemList, taskUserList, workflowConfigCustom, workflowId } = actionData;
const { userId, username } = this.ctx.userInfo;
const { formItemList, workflowConfigCustom, workflowId } = actionData;
let workflow = await jianghuKnex(tableEnum.workflow, this.ctx).where({workflowId}).first();
if(!workflow) {
@@ -121,6 +120,19 @@ class WorkflowService extends Service {
const lineTypeList = taskInfo.taskLineTypeList;
return {taskHistoryList, lineTypeList};
}
/**
* 审核列表写入用户名
*/
async appendUsername() {
const rows = this.ctx.body.appData.resultData.rows;
const { jianghuKnex } = this.app;
const userList = await jianghuKnex(tableEnum._view01_user).whereIn('userId', rows.map(item => item.taskInitUser)).select();
rows.forEach(item => {
const user = userList.find(it => it.userId === item.taskInitUser);
item.taskInitUsername = user.username;
});
}
}
module.exports = WorkflowService;
+1
View File
@@ -186,6 +186,7 @@
headers: [
{ text: '操作', value: 'action', align: 'center', sortable: false, width: 120, class: 'fixed', cellClass: 'fixed' },
{ text: "审批项", value: "taskTitle" },
{ text: "申请人", value: "taskInitUsername" },
{ text: "审核状态", value: "taskStatus" },
{ text: "操作者", value: "operationByUser", width: 120 },
{ text: "操作时间", value: "operationAt", width: 250 }