欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 财经 > 产业 > 基于jeecgboot-vue3的Flowable流程-集成仿钉钉流程(四)支持json和xml的显示

基于jeecgboot-vue3的Flowable流程-集成仿钉钉流程(四)支持json和xml的显示

2025/2/24 23:14:25 来源:https://blog.csdn.net/qq_40032778/article/details/140307128  浏览:    关键词:基于jeecgboot-vue3的Flowable流程-集成仿钉钉流程(四)支持json和xml的显示

因为这个项目license问题无法开源,更多技术支持与服务请加入我的知识星球。

1、相应的界面前端代码

<template><div class="formDesign"><FlowDesign :process="process" :fields="fields" :readOnly="readOnly"><el-switchinline-promptsize="large"active-text="正常模式"inactive-text="暗黑模式"@change="handleToggleDark"v-model="isDark"/><el-switchv-model="readOnly"size="large"active-text="只读模式"inactive-text="编辑模式"inline-prompt:active-value="true":inactive-value="false"/><el-button-group><el-button @click="viewJson" size="small" type="primary" round icon="View"> 查看Json</el-button></el-button-group><el-button-group><el-button @click="viewXmlBpmn" size="small" type="primary" round icon="View"> 查看XML </el-button></el-button-group><el-button-group><el-button @click="converterBpmn" size="small" type="primary" round icon="View"> 预览bpmn </el-button></el-button-group></FlowDesign><el-dialog title="预览" width="60%" v-model="previewModelVisible" append-to-body destroy-on-close><highlightjs :language="previewType" :code="previewResult" style="height: 80vh" /></el-dialog><!-- Bpmn流程图 --><el-dialog :title="processView.title" v-model="processView.open" width="70%" append-to-body><process-viewer :key="`designer-${processView.title}`" :xml="processView.xmlData" :style="{height: '500px'}" /></el-dialog></div></template>

2、相应的转换代码


const viewJson = () => {const processJson = JSON.stringify(process.value,undefined, 2); previewResult.value = processJson; previewType.value = 'json'previewModelVisible.value = true
}
const viewXmlBpmn = () => {const processModel = {code: 'test',name: '测试',icon: {name: 'el:HomeFilled',color: '#409EFF'},process: process.value,enable: true,version: 1,sort: 0,groupId: '',remark: ''}const xmlData = viewXml(processModel)xmlData.then((result) => {previewResult.value = resultpreviewType.value = 'xml'previewModelVisible.value = true})

3、效果图

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

热搜词