我的审批展示逻辑

This commit is contained in:
ChenXinXin committed 2024-05-06 15:08:16 +08:00
1 parent c44365e44f
commit d2cfd28e41
5 files changed
+39 -20

No files matched your search

+4 -5
View File
@@ -3,7 +3,7 @@
<v-navigation-drawer v-model="isDrawerShown" v-if="isDrawerShown" :permanent="isDrawerShown" fixed temporary right width="90%" class="elevation-24">
<!-- 抽屉标题 -->
<v-row no-gutters>
<span class="text-h7 font-weight-bold pa-4">【{{taskData.workflowName}}】创建审批</span>
<span class="text-h7 font-weight-bold pa-4">【{{taskData.taskTemplateGroup}}——{{taskData.workflowName}}】创建审批</span>
</v-row>
<!-- {{taskData.workflowForm}} -->
<!-- 表单 -->
@@ -481,9 +481,9 @@ Vue.component("create-task-drawer", {
break;
case 'number':
if(condition.express != 'between'){
isMatch[index] = eval(answer + condition.express + condition.option)
isMatch[index] = eval(Number(answer) + condition.express + condition.option)
}else{
if(condition.option.begin <= answer && answer <= condition.option.end){
if(condition.option.begin <= Number(answer) && Number(answer) <= condition.option.end){
isMatch[index] = true
}
}
@@ -543,8 +543,7 @@ Vue.component("create-task-drawer", {
}
},
prepareDoWorkItem() {
const { workflowInfo, workflowForm, workflowConfig, } = this.taskData
const { workflowName, taskTemplateGroup } = workflowInfo
const { workflowInfo, workflowForm, workflowConfig, workflowName, taskTemplateGroup, } = this.taskData
var curNode = this.curWorkflow[0]
var taskLineType = this.taskData.workflowConfig.lineList.filter(line => line.sourceNodeId == curNode.id)[0]?.properties.type
var taskViewUserList = this.curWorkflow.reduce((acc, cur) => acc.concat(cur.properties.userIdList), [] )
@@ -11,7 +11,7 @@
<div class="jh-page-second-bar px-8">
<v-row class="align-center">
<v-col cols="12" xs="12" sm="12" md="4" xl="3">
<div class="py-4 text-body-1 font-weight-bold">我的任务
<div class="py-4 text-body-1 font-weight-bold">我的审批
<!-- 帮助页按钮 -->
<span role="button" class="success--text font-weight-regular jh-font-size-13 ml-2" @click="isHelpPageDrawerShown = true">
<v-icon size="13" class="success--text">mdi-help-circle-outline</v-icon>帮助
@@ -288,16 +288,10 @@
pageId: 'todo',
actionId: 'selectItemList',
actionData: {},
where: { taskStatus: 'running' },
whereLike: { taskEditUserList: this.userId },
orderBy: [{ column: 'operationAt', order: 'desc' }]
}
}
});
const rows = result.data.appData.resultData.rows;
this.tableData = rows.filter(item => !item.taskEditedUserList || !item.taskEditedUserList.includes(this.userId));
this.tableData = result.data.appData.resultData;
this.isTableLoading = false;
},
async getHistoryData() {
@@ -309,12 +303,14 @@
actionId: 'selectHistoryList',
actionData: {},
whereLike: { taskEditUserList: '<$ ctx.userInfo.userId $>', taskConfigId: 'approvalTask-' },
orderBy: [{ column: 'id', order: 'desc' }]
orderBy: [{ column: 'operationAt', order: 'desc' }]
}
}
});
const rows = result.data.appData.resultData.rows;
var rows = result.data.appData.resultData.rows;
// 根据taskId去重
rows = _.uniqBy(rows, 'taskId')
rows.forEach(row => {
row.operationAt = dayjs(row.operationAt).format('YYYY-MM-DD HH:mm:ss');
});
+2 -1
View File
@@ -130,7 +130,8 @@
return {
workflowId, workflowName,
taskTemplateIcon: info.taskTemplateIcon,
taskTemplateGroup: info.taskTemplateGroup || '未命名',
taskTemplateGroup: info.taskTemplateGroup || '未分类',
workflowInfo: info,
workflowForm: JSON.parse(workflowForm),
workflowConfig: JSON.parse(workflowConfig),
}
@@ -177,7 +177,7 @@
isTableLoading: true,
tableData: [],
headers: [
{ text: "审批项", value: "taskTitle", width: 150 },
{ text: "审批项", value: "taskTitle", width: 350 },
{ text: "审核状态", value: "taskStatus" },
{ text: "操作者", value: "operationByUser", width: 120 },
{ text: "操作时间", value: "operationAt", width: 250 },