feat: [bpm][ele] 仿钉钉流程模型迁移
This commit is contained in:
@@ -291,8 +291,8 @@ defineExpose({ validate });
|
||||
<ImageUpload
|
||||
v-model:value="modelData.icon"
|
||||
:show-description="false"
|
||||
:width="120"
|
||||
:height="120"
|
||||
width="120px"
|
||||
height="120px"
|
||||
/>
|
||||
</ElFormItem>
|
||||
<ElFormItem label="流程描述" prop="description">
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed, nextTick, ref } from 'vue';
|
||||
import type { Ref } from 'vue';
|
||||
|
||||
import { computed, inject, nextTick, ref } from 'vue';
|
||||
|
||||
import { BpmModelType } from '@vben/constants';
|
||||
|
||||
@@ -7,23 +9,23 @@ import BpmModelEditor from './bpm-model-editor.vue';
|
||||
import SimpleModelDesign from './simple-model-design.vue';
|
||||
|
||||
const modelData = defineModel<any>(); // 创建本地数据副本
|
||||
// const processData = inject('processData') as Ref;
|
||||
const processData = inject('processData') as Ref;
|
||||
|
||||
const simpleDesign = ref();
|
||||
|
||||
/** 表单校验 */
|
||||
async function validate() {
|
||||
// 获取最新的流程数据
|
||||
// if (!processData.value) {
|
||||
// throw new Error('请设计流程');
|
||||
// }
|
||||
// if (modelData.value.type === BpmModelType.SIMPLE) {
|
||||
// // 简易设计器校验
|
||||
// const validateResult = await simpleDesign.value?.validateConfig();
|
||||
// if (!validateResult) {
|
||||
// throw new Error('请完善设计配置');
|
||||
// }
|
||||
// }
|
||||
if (!processData.value) {
|
||||
throw new Error('请设计流程');
|
||||
}
|
||||
if (modelData.value.type === BpmModelType.SIMPLE) {
|
||||
// 简易设计器校验
|
||||
const validateResult = await simpleDesign.value?.validateConfig();
|
||||
if (!validateResult) {
|
||||
throw new Error('请完善设计配置');
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { ref } from 'vue';
|
||||
|
||||
import { ContentWrap } from '@vben/common-ui';
|
||||
|
||||
// import { SimpleProcessDesigner } from '#/views/bpm/components/simple-process-design';
|
||||
import { SimpleProcessDesigner } from '#/views/bpm/components/simple-process-design';
|
||||
|
||||
defineOptions({ name: 'SimpleModelDesign' });
|
||||
|
||||
@@ -15,16 +15,16 @@ defineProps<{
|
||||
startUserIds?: number[];
|
||||
}>();
|
||||
|
||||
// const emit = defineEmits(['success']);
|
||||
const emit = defineEmits(['success']);
|
||||
|
||||
const designerRef = ref();
|
||||
|
||||
/** 保存成功回调 */
|
||||
// function handleSuccess(data?: any) {
|
||||
// if (data) {
|
||||
// emit('success', data);
|
||||
// }
|
||||
// }
|
||||
function handleSuccess(data?: any) {
|
||||
if (data) {
|
||||
emit('success', data);
|
||||
}
|
||||
}
|
||||
|
||||
/** 设计器配置校验 */
|
||||
async function validateConfig() {
|
||||
@@ -35,7 +35,7 @@ defineExpose({ validateConfig });
|
||||
</script>
|
||||
<template>
|
||||
<ContentWrap class="px-4 py-5">
|
||||
<!-- <SimpleProcessDesigner
|
||||
<SimpleProcessDesigner
|
||||
:model-form-id="modelFormId"
|
||||
:model-name="modelName"
|
||||
:model-form-type="modelFormType"
|
||||
@@ -43,6 +43,6 @@ defineExpose({ validateConfig });
|
||||
:start-user-ids="startUserIds"
|
||||
:start-dept-ids="startDeptIds"
|
||||
ref="designerRef"
|
||||
/> -->
|
||||
/>
|
||||
</ContentWrap>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user