|
|
|
|
@ -6,6 +6,10 @@
|
|
|
|
|
<template #name_default="{ row }">
|
|
|
|
|
<XTextButton :title="row.name" @click="handleBpmnDetail(row.id)" />
|
|
|
|
|
</template>
|
|
|
|
|
<!-- 流程分类 -->
|
|
|
|
|
<template #category_default="{ row }">
|
|
|
|
|
<DictTag :type="DICT_TYPE.BPM_MODEL_CATEGORY" :value="Number(row?.category)" />
|
|
|
|
|
</template>
|
|
|
|
|
<!-- 表单信息 -->
|
|
|
|
|
<template #formId_default="{ row }">
|
|
|
|
|
<XTextButton
|
|
|
|
|
@ -43,6 +47,16 @@
|
|
|
|
|
v-if="formDetailVisible"
|
|
|
|
|
/>
|
|
|
|
|
</XModal>
|
|
|
|
|
<!-- 流程模型图的预览 -->
|
|
|
|
|
<XModal title="流程图" v-model="showBpmnOpen" width="80%" height="90%">
|
|
|
|
|
<my-process-viewer
|
|
|
|
|
key="designer"
|
|
|
|
|
v-model="bpmnXML"
|
|
|
|
|
:value="bpmnXML"
|
|
|
|
|
v-bind="bpmnControlForm"
|
|
|
|
|
:prefix="bpmnControlForm.prefix"
|
|
|
|
|
/>
|
|
|
|
|
</XModal>
|
|
|
|
|
</ContentWrap>
|
|
|
|
|
</template>
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
@ -51,8 +65,14 @@ import * as DefinitionApi from '@/api/bpm/definition'
|
|
|
|
|
// import * as ModelApi from '@/api/bpm/model'
|
|
|
|
|
import { allSchemas } from './definition.data'
|
|
|
|
|
import { setConfAndFields2 } from '@/utils/formCreate'
|
|
|
|
|
import { DICT_TYPE } from '@/utils/dict'
|
|
|
|
|
|
|
|
|
|
const message = useMessage() // 消息弹窗
|
|
|
|
|
const bpmnXML = ref(null)
|
|
|
|
|
const showBpmnOpen = ref(false)
|
|
|
|
|
const bpmnControlForm = ref({
|
|
|
|
|
prefix: 'flowable'
|
|
|
|
|
})
|
|
|
|
|
// const message = useMessage() // 消息弹窗
|
|
|
|
|
const router = useRouter() // 路由
|
|
|
|
|
const { query } = useRoute() // 查询参数
|
|
|
|
|
|
|
|
|
|
@ -89,7 +109,13 @@ const handleFormDetail = async (row) => {
|
|
|
|
|
const handleBpmnDetail = (row) => {
|
|
|
|
|
// TODO 芋艿:流程组件开发中
|
|
|
|
|
console.log(row)
|
|
|
|
|
message.success('流程组件开发中,预计 2 月底完成')
|
|
|
|
|
DefinitionApi.getProcessDefinitionBpmnXMLApi(row).then((response) => {
|
|
|
|
|
console.log(response, 'response')
|
|
|
|
|
bpmnXML.value = response
|
|
|
|
|
// 弹窗打开
|
|
|
|
|
showBpmnOpen.value = true
|
|
|
|
|
})
|
|
|
|
|
// message.success('流程组件开发中,预计 2 月底完成')
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 点击任务分配按钮
|
|
|
|
|
@ -97,7 +123,7 @@ const handleAssignRule = (row) => {
|
|
|
|
|
router.push({
|
|
|
|
|
name: 'BpmTaskAssignRuleList',
|
|
|
|
|
query: {
|
|
|
|
|
modelId: row.id
|
|
|
|
|
processDefinitionId: row.id
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|