|
@@ -27,15 +27,19 @@
|
|
|
<el-timeline>
|
|
|
<el-timeline-item v-for="(item, index) in nodeModelsData" :key="index" placement="top" :timestamp="item.nodeName">
|
|
|
<div class="flex">
|
|
|
+ <!-- type: 1[审核人] 2[抄送人] 4[条件路由] 5[子流程] 6[延时处理] 7[触发器] 8[并行路由] 9[包容路由] 10[路由分支]-->
|
|
|
<template v-if="item.type === 1">
|
|
|
+
|
|
|
<div v-if="[2, 5].indexOf(item.setType) > -1">
|
|
|
<el-tag v-if="item.setType === 5" type="primary">{{ setTypeOptions_config[item.setType] }}</el-tag>
|
|
|
<el-tag v-if="item.setType === 2" type="primary">{{
|
|
|
item.examineLevel === 1 ? '直接主管' : `发起人的第${item.examineLevel}级主管`
|
|
|
}}</el-tag>
|
|
|
</div>
|
|
|
+
|
|
|
<template v-if="item.setType === 4">
|
|
|
- <div v-if="item.selectMode === 3" class="mr-2">
|
|
|
+ <!-- item.nodeCandidate里面的type属性 type:1|0 角色|用户-->
|
|
|
+ <div v-if="item.nodeCandidate.type === 1" class="mr-2">
|
|
|
<el-tooltip content="添加角色" placement="bottom">
|
|
|
<el-button style="width: 32px" @click="selectHandler(item, 3)">
|
|
|
<svg-icon style="font-size: 18px" icon-class="flow-group-add" />
|
|
@@ -43,7 +47,7 @@
|
|
|
</el-tooltip>
|
|
|
</div>
|
|
|
|
|
|
- <div v-else class="mr-2">
|
|
|
+ <div v-if="item.nodeCandidate.type === 0" class="mr-2">
|
|
|
<el-tooltip content="添加用户" placement="bottom">
|
|
|
<el-button style="width: 32px" @click="selectHandler(item, 1)">
|
|
|
<svg-icon style="font-size: 18px" icon-class="flow-user-add" />
|
|
@@ -54,10 +58,12 @@
|
|
|
</template>
|
|
|
|
|
|
<template v-else>{{ item.nodeName }}</template>
|
|
|
- <div v-if="item.selectMode === 0" class="flex flex-wrap gap-[6px]">
|
|
|
+
|
|
|
+ <div v-if="item.selectMode === 1" class="flex flex-wrap gap-[6px]">
|
|
|
<FlowNodeAvatar v-for="(childItem, childIndex) in item.nodeAssigneeList" :key="childIndex" :name="childItem.name" />
|
|
|
</div>
|
|
|
- <div v-if="item.selectMode === 1" class="flex flex-wrap gap-[6px]">
|
|
|
+
|
|
|
+ <div v-if="item.selectMode !== 1" class="flex flex-wrap gap-[6px]">
|
|
|
<FlowNodeAvatar v-for="(childItem, childIndex) in item.nodeAssigneeList" :key="childIndex" :name="childItem.name">
|
|
|
<template #avatar>
|
|
|
<svg-icon icon-class="flow-group" color="#fff" />
|
|
@@ -103,7 +109,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { computed, reactive, watch, toRefs } from 'vue'
|
|
|
+import {computed, reactive, watch, toRefs, nextTick} from 'vue'
|
|
|
import FileUpload from '@/components/FileUpload.vue'
|
|
|
import FlowNodeAvatar from '@/components/Flow/FlowNodeAvatar.vue'
|
|
|
import { nextNodesApi, processConsentTaskApi, processPreviousNodeNameApi, processRejectionTaskApi } from '@/api/flow/processTask'
|
|
@@ -234,7 +240,6 @@ const updateActive_assigneeMap = assignees => {
|
|
|
}
|
|
|
}
|
|
|
const selectHandler = (item, type) => {
|
|
|
- // 发起人自选 (1: 选择一个人, 2: 选择多个人 3: 自选角色)
|
|
|
// nodeModelsData.value数组中查找和nodeKey相匹配的对象值
|
|
|
const foundNode = findNodeByKey(item.nodeKey)
|
|
|
|
|
@@ -247,7 +252,9 @@ const selectHandler = (item, type) => {
|
|
|
|
|
|
active_assigneeKey.value = item.nodeKey
|
|
|
active_selectOpts.value = config.selectOpts || {}
|
|
|
- useSelectRef.value.open(item.selectMode === 3 ? 3 : 1, config.assignees)
|
|
|
+ nextTick(() => {
|
|
|
+ useSelectRef.value.open(type, config.assignees)
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
const submitForm = debounce(() => {
|