review:【antd/ele】【bpm】流程模型的迁移

This commit is contained in:
YunaiV
2025-12-21 22:41:03 +08:00
parent bc654c9d45
commit 835da00f2c
39 changed files with 85 additions and 62 deletions

View File

@@ -185,6 +185,7 @@ onMounted(() => {
<template>
<Page auto-content-height>
<!-- TODO @jason这里交互可以做成类似 vue3 + element-plus 那个一样滚动切换分类哈对标钉钉飞书哈 -->
<!-- 第一步通过流程定义的列表选择对应的流程 -->
<template v-if="!selectProcessDefinition">
<ElCard

View File

@@ -223,8 +223,8 @@ watch(
const loading = ref(false);
/** 初始化 */
onMounted(async () => {
loading.value = true;
try {
loading.value = true;
await getDetail();
// 获得用户列表
userOptions.value = await getSimpleUserList();

View File

@@ -1,6 +1,7 @@
<script setup lang="ts">
import { ref, watch } from 'vue';
// TODO @jason这个貌似暂时还没迁移的样子
// import { MyProcessViewer } from '#/views/bpm/components/bpmn-process-designer/package';
defineOptions({ name: 'ProcessInstanceBpmnViewer' });

View File

@@ -275,6 +275,7 @@ async function openPopover(type: string) {
}
}
Object.keys(popOverVisible.value).forEach((item) => {
// TODO @jason这里是不是保持和 antd 一致?
popOverVisible.value[item] = item === type;
});
}
@@ -704,6 +705,8 @@ function handleSignFinish(url: string) {
approveFormRef.value?.validateField('signPicUrl');
}
// TODO @jasonhandlePopoverVisible 需要要有么?
defineExpose({ loadTodoTask });
</script>
<template>
@@ -725,9 +728,9 @@ defineExpose({ loadTodoTask });
<template #reference>
<ElButton plain type="primary" @click="openPopover('approve')">
<IconifyIcon icon="lucide:check" />
<span class="ml-1">{{
getButtonDisplayName(BpmTaskOperationButtonTypeEnum.APPROVE)
}}</span>
<span class="ml-1">
{{ getButtonDisplayName(BpmTaskOperationButtonTypeEnum.APPROVE) }}
</span>
</ElButton>
</template>
<!-- 办理表单 -->
@@ -979,6 +982,7 @@ defineExpose({ loadTodoTask });
label-width="100px"
>
<ElFormItem label="新审批人" prop="assigneeUserId">
<!-- TODO @jason是不是用 unocss 哈antd 和 ele 都要改下 -->
<ElSelect
v-model="transferForm.assigneeUserId"
clearable
@@ -1040,9 +1044,11 @@ defineExpose({ loadTodoTask });
<template #reference>
<ElButton plain @click="openPopover('delegate')">
<IconifyIcon :size="14" icon="icon-park-outline:user-positioning" />
<span class="ml-1">{{
getButtonDisplayName(BpmTaskOperationButtonTypeEnum.DELEGATE)
}}</span>
<span class="ml-1">
{{
getButtonDisplayName(BpmTaskOperationButtonTypeEnum.DELEGATE)
}}
</span>
</ElButton>
</template>
<div class="flex flex-1 flex-col px-5 pt-5" v-loading="formLoading">
@@ -1116,9 +1122,11 @@ defineExpose({ loadTodoTask });
<template #reference>
<ElButton plain @click="openPopover('addSign')">
<IconifyIcon :size="14" icon="icon-park-outline:plus" />
<span class="ml-1">{{
getButtonDisplayName(BpmTaskOperationButtonTypeEnum.ADD_SIGN)
}}</span>
<span class="ml-1">
{{
getButtonDisplayName(BpmTaskOperationButtonTypeEnum.ADD_SIGN)
}}
</span>
</ElButton>
</template>
<div class="flex flex-1 flex-col px-5 pt-5" v-loading="formLoading">
@@ -1272,9 +1280,9 @@ defineExpose({ loadTodoTask });
<template #reference>
<ElButton plain @click="openPopover('return')">
<IconifyIcon :size="14" icon="lucide:arrow-left" />
<span class="ml-1">{{
getButtonDisplayName(BpmTaskOperationButtonTypeEnum.RETURN)
}}</span>
<span class="ml-1">
{{ getButtonDisplayName(BpmTaskOperationButtonTypeEnum.RETURN) }}
</span>
</ElButton>
</template>
<div class="flex flex-1 flex-col px-5 pt-5" v-loading="formLoading">

View File

@@ -54,7 +54,6 @@ const [Modal, modalApi] = useVbenModal({
</ElButton>
</ElTooltip>
</div>
<Vue3Signature
class="h-full flex-1 border border-solid border-gray-300"
ref="signature"

View File

@@ -86,6 +86,8 @@ function useGridColumns(): VxeTableGridOptions['columns'] {
];
}
// TODO @jason是不是要 const formRef = ref<formCreate>();
const formRef = ref();
const taskForm = ref<TaskForm>({
rule: [],
@@ -187,6 +189,7 @@ defineExpose({
</Grid>
</div>
<Modal class="w-3/5">
<!-- TODO @jason是不是 antd ele 保持统一 -->
<FormCreate
ref="formRef"
v-model="taskForm.value"