Skip to content

Commit 666a523

Browse files
committed
流程定义查看流程图
1 parent 7ec3550 commit 666a523

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

src/views/bpm/definition/index.vue

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,16 @@
4343
v-if="formDetailVisible"
4444
/>
4545
</XModal>
46+
<!-- 流程模型图的预览 -->
47+
<XModal title="流程图" v-model="showBpmnOpen" width="80%" height="90%">
48+
<my-process-viewer
49+
key="designer"
50+
v-model="bpmnXML"
51+
:value="bpmnXML"
52+
v-bind="bpmnControlForm"
53+
:prefix="bpmnControlForm.prefix"
54+
/>
55+
</XModal>
4656
</ContentWrap>
4757
</template>
4858
<script setup lang="ts">
@@ -51,8 +61,12 @@ import * as DefinitionApi from '@/api/bpm/definition'
5161
// import * as ModelApi from '@/api/bpm/model'
5262
import { allSchemas } from './definition.data'
5363
import { setConfAndFields2 } from '@/utils/formCreate'
54-
55-
const message = useMessage() // 消息弹窗
64+
const bpmnXML = ref(null)
65+
const showBpmnOpen = ref(false)
66+
const bpmnControlForm = ref({
67+
prefix: 'flowable'
68+
})
69+
// const message = useMessage() // 消息弹窗
5670
const router = useRouter() // 路由
5771
const { query } = useRoute() // 查询参数
5872
@@ -89,7 +103,13 @@ const handleFormDetail = async (row) => {
89103
const handleBpmnDetail = (row) => {
90104
// TODO 芋艿:流程组件开发中
91105
console.log(row)
92-
message.success('流程组件开发中,预计 2 月底完成')
106+
DefinitionApi.getProcessDefinitionBpmnXMLApi(row).then((response) => {
107+
console.log(response, 'response')
108+
bpmnXML.value = response.bpmnXml
109+
// 弹窗打开
110+
showBpmnOpen.value = true
111+
})
112+
// message.success('流程组件开发中,预计 2 月底完成')
93113
}
94114
95115
// 点击任务分配按钮

0 commit comments

Comments
 (0)