|
@@ -13,9 +13,9 @@
|
|
<template v-else>
|
|
<template v-else>
|
|
{{ v.name }}
|
|
{{ v.name }}
|
|
<!-- {{ v.local_name }} -->
|
|
<!-- {{ v.local_name }} -->
|
|
- <div style="display: flex; align-items: center; gap: 6px">
|
|
|
|
- <el-button :icon="Plus" style="width: 32px" @click="selectHandler" />
|
|
|
|
- <FlowNodeAvatar v-for="(item, index) in userList" id="1" :key="index" style="margin-top: 5px" />
|
|
|
|
|
|
+ <div v-if="v.type !== 0" style="display: flex; align-items: center; gap: 6px">
|
|
|
|
+ <el-button :icon="Plus" style="width: 32px" @click="selectHandler(v.name)" />
|
|
|
|
+ <FlowNodeAvatar v-for="(item, index) in userMap.get(v.name)" id="1" :key="index" style="margin-top: 5px" />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
</el-timeline-item>
|
|
</el-timeline-item>
|
|
@@ -27,7 +27,7 @@
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
import model from '@/api/flow/process'
|
|
import model from '@/api/flow/process'
|
|
import viewForm from '@/utils/form'
|
|
import viewForm from '@/utils/form'
|
|
-import { ref, inject, shallowRef, computed, reactive } from 'vue'
|
|
|
|
|
|
+import { ref, shallowRef, computed, reactive } from 'vue'
|
|
import { ElMessage } from 'element-plus'
|
|
import { ElMessage } from 'element-plus'
|
|
import { Plus } from '@element-plus/icons-vue'
|
|
import { Plus } from '@element-plus/icons-vue'
|
|
import UseSelect from '@/components/scWorkflow/select.vue'
|
|
import UseSelect from '@/components/scWorkflow/select.vue'
|
|
@@ -45,10 +45,13 @@ const emit = defineEmits<{
|
|
update: [value: string]
|
|
update: [value: string]
|
|
}>()
|
|
}>()
|
|
const updateModelValue = (bool: boolean) => emit('update:modelValue', bool)
|
|
const updateModelValue = (bool: boolean) => emit('update:modelValue', bool)
|
|
-const userList = ref([])
|
|
|
|
|
|
+const userMap = ref(new Map())
|
|
const useSelectRef = ref()
|
|
const useSelectRef = ref()
|
|
-const selectHandler = () => {
|
|
|
|
- useSelectRef.value.open(1, userList.value)
|
|
|
|
|
|
+const selectHandler = (name: string) => {
|
|
|
|
+ if (!userMap.value.get(name)) {
|
|
|
|
+ userMap.value.set(name, [])
|
|
|
|
+ }
|
|
|
|
+ useSelectRef.value.open(1, userMap.value.get(name))
|
|
}
|
|
}
|
|
const FormCreate = viewForm.$form()
|
|
const FormCreate = viewForm.$form()
|
|
const formOption = ref({
|
|
const formOption = ref({
|
|
@@ -62,10 +65,18 @@ const formOption = ref({
|
|
// 填写的数据存储(local_: 本地数据处理标识)
|
|
// 填写的数据存储(local_: 本地数据处理标识)
|
|
v.local_value = formData[v.field]
|
|
v.local_value = formData[v.field]
|
|
})
|
|
})
|
|
|
|
+ const assigneeMap = {}
|
|
|
|
+ userMap.value.forEach((v, k) => {
|
|
|
|
+ assigneeMap[k] = {
|
|
|
|
+ assigneeList: v,
|
|
|
|
+ type: 1
|
|
|
|
+ }
|
|
|
|
+ })
|
|
model
|
|
model
|
|
.processLaunchApi({
|
|
.processLaunchApi({
|
|
processId, // 流程ID
|
|
processId, // 流程ID
|
|
- processForm: JSON.stringify(processForm) // 流程表单JSON内容 & local_value 保存
|
|
|
|
|
|
+ processForm: JSON.stringify(processForm), // 流程表单JSON内容 & local_value 保存
|
|
|
|
+ assigneeMap: assigneeMap // 流程节点审批人
|
|
})
|
|
})
|
|
.then(res => {
|
|
.then(res => {
|
|
ElMessage.success('提交成功')
|
|
ElMessage.success('提交成功')
|