fix: 【BPM 工作流】选择发起人时 activityId 类型转换导致无法正确选择发起人的问题。
parent
01f929e10f
commit
370c257cf5
|
@ -109,9 +109,7 @@ export async function getProcessInstanceManagerPage(params: PageParam) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 新增流程实例 */
|
/** 新增流程实例 */
|
||||||
export async function createProcessInstance(
|
export async function createProcessInstance(data: any) {
|
||||||
data: BpmProcessInstanceApi.ProcessInstanceVO,
|
|
||||||
) {
|
|
||||||
return requestClient.post<BpmProcessInstanceApi.ProcessInstanceVO>(
|
return requestClient.post<BpmProcessInstanceApi.ProcessInstanceVO>(
|
||||||
'/bpm/process-instance/create',
|
'/bpm/process-instance/create',
|
||||||
data,
|
data,
|
||||||
|
|
|
@ -20,13 +20,14 @@ import {
|
||||||
BpmCandidateStrategyEnum,
|
BpmCandidateStrategyEnum,
|
||||||
BpmFieldPermissionType,
|
BpmFieldPermissionType,
|
||||||
BpmModelFormType,
|
BpmModelFormType,
|
||||||
|
BpmModelType,
|
||||||
BpmNodeIdEnum,
|
BpmNodeIdEnum,
|
||||||
BpmNodeTypeEnum,
|
BpmNodeTypeEnum,
|
||||||
decodeFields,
|
decodeFields,
|
||||||
setConfAndFields2,
|
setConfAndFields2,
|
||||||
} from '#/utils';
|
} from '#/utils';
|
||||||
|
import ProcessInstanceSimpleViewer from '#/views/bpm/processInstance/detail/modules/simple-bpm-viewer.vue';
|
||||||
import ProcessInstanceTimeline from '#/views/bpm/processInstance/detail/modules/time-line.vue';
|
import ProcessInstanceTimeline from '#/views/bpm/processInstance/detail/modules/time-line.vue';
|
||||||
|
|
||||||
// 类型定义
|
// 类型定义
|
||||||
interface ProcessFormData {
|
interface ProcessFormData {
|
||||||
rule: any[];
|
rule: any[];
|
||||||
|
@ -80,8 +81,8 @@ const detailForm = ref<ProcessFormData>({
|
||||||
|
|
||||||
const fApi = ref<ApiAttrs>();
|
const fApi = ref<ApiAttrs>();
|
||||||
const startUserSelectTasks = ref<UserTask[]>([]);
|
const startUserSelectTasks = ref<UserTask[]>([]);
|
||||||
const startUserSelectAssignees = ref<Record<number, string[]>>({});
|
const startUserSelectAssignees = ref<Record<string, string[]>>({});
|
||||||
const tempStartUserSelectAssignees = ref<Record<number, string[]>>({});
|
const tempStartUserSelectAssignees = ref<Record<string, string[]>>({});
|
||||||
const bpmnXML = ref<string | undefined>(undefined);
|
const bpmnXML = ref<string | undefined>(undefined);
|
||||||
const simpleJson = ref<string | undefined>(undefined);
|
const simpleJson = ref<string | undefined>(undefined);
|
||||||
const timelineRef = ref<any>();
|
const timelineRef = ref<any>();
|
||||||
|
@ -273,9 +274,7 @@ const handleCancel = () => {
|
||||||
/** 选择发起人 */
|
/** 选择发起人 */
|
||||||
const selectUserConfirm = (activityId: string, userList: any[]) => {
|
const selectUserConfirm = (activityId: string, userList: any[]) => {
|
||||||
if (!activityId || !Array.isArray(userList)) return;
|
if (!activityId || !Array.isArray(userList)) return;
|
||||||
startUserSelectAssignees.value[Number(activityId)] = userList.map(
|
startUserSelectAssignees.value[activityId] = userList.map((item) => item.id);
|
||||||
(item) => item.id,
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
defineExpose({ initProcessInfo });
|
defineExpose({ initProcessInfo });
|
||||||
|
@ -284,12 +283,11 @@ defineExpose({ initProcessInfo });
|
||||||
<template>
|
<template>
|
||||||
<Card
|
<Card
|
||||||
:title="getTitle"
|
:title="getTitle"
|
||||||
|
class="h-full overflow-hidden"
|
||||||
:body-style="{
|
:body-style="{
|
||||||
padding: '12px',
|
height: 'calc(100% - 112px)',
|
||||||
height: '100%',
|
paddingTop: '12px',
|
||||||
display: 'flex',
|
overflowY: 'auto',
|
||||||
flexDirection: 'column',
|
|
||||||
paddingBottom: '62px', // 预留 actions 区域高度
|
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<template #extra>
|
<template #extra>
|
||||||
|
@ -334,18 +332,25 @@ defineExpose({ initProcessInfo });
|
||||||
</Tabs.TabPane>
|
</Tabs.TabPane>
|
||||||
|
|
||||||
<Tabs.TabPane tab="流程图" key="flow" class="flex flex-1 overflow-hidden">
|
<Tabs.TabPane tab="流程图" key="flow" class="flex flex-1 overflow-hidden">
|
||||||
<div>待开发</div>
|
<div class="w-full">
|
||||||
|
<ProcessInstanceSimpleViewer
|
||||||
|
:simple-json="simpleJson"
|
||||||
|
v-if="selectProcessDefinition.modelType === BpmModelType.SIMPLE"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</Tabs.TabPane>
|
</Tabs.TabPane>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
|
||||||
<template #actions>
|
<template #actions>
|
||||||
<template v-if="activeTab === 'form'">
|
<template v-if="activeTab === 'form'">
|
||||||
<Space wrap class="flex h-[50px] w-full justify-center">
|
<Space wrap class="flex w-full justify-center">
|
||||||
<Button plain type="primary" @click="submitForm">
|
<Button plain type="primary" @click="submitForm">
|
||||||
<IconifyIcon icon="mdi:check" /> 发起
|
<IconifyIcon icon="icon-park-outline:check" />
|
||||||
|
发起
|
||||||
</Button>
|
</Button>
|
||||||
<Button plain type="default" @click="handleCancel">
|
<Button plain type="default" @click="handleCancel">
|
||||||
<IconifyIcon icon="mdi:close" /> 取消
|
<IconifyIcon icon="icon-park-outline:close" />
|
||||||
|
取消
|
||||||
</Button>
|
</Button>
|
||||||
</Space>
|
</Space>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue