Files
yudao-ui-admin-vue3/src/views/bpm/simpleWorkflow/index.vue

31 lines
904 B
Vue
Raw Normal View History

<template>
2024-04-27 00:35:18 +08:00
<SimpleProcessDesigner :model-id="modelId"/>
</template>
2024-04-27 00:35:18 +08:00
<script setup lang='ts'>
import { SimpleProcessDesigner } from '@/components/SimpleProcessDesignerV2/src/';
import { getModel } from '@/api/bpm/model'
import { getForm, FormVO } from '@/api/bpm/form'
2024-04-27 00:35:18 +08:00
defineOptions({
name: 'SimpleWorkflowDesignEditor'
})
2024-04-27 00:35:18 +08:00
const { query } = useRoute() // 路由的查询
const modelId : string | undefined = query.modelId as string;
const formFields = ref<string[]>([])
const formType = ref(20);
provide('formFields', formFields)
2024-04-18 15:56:49 +08:00
provide('formType', formType)
2024-04-27 00:35:18 +08:00
onMounted( async () => {
const bpmnModel = await getModel(modelId);
if (bpmnModel) {
2024-04-18 15:56:49 +08:00
formType.value = bpmnModel.formType
if (formType.value === 10) {
const bpmnForm = await getForm(bpmnModel.formId) as unknown as FormVO
2024-04-27 00:35:18 +08:00
formFields.value = bpmnForm?.fields
}
}
})
</script>
2024-04-27 00:35:18 +08:00
<style lang='scss' scoped>
</style>