当前位置: 首页 > news >正文

基于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、效果图

http://www.lryc.cn/news/396045.html

相关文章:

  • 【k8s安装redis】k8s安装单机版redis实现高性能高可用
  • Scala 数据类型
  • Java Executors类的9种创建线程池的方法及应用场景分析
  • LY/T 3359-2023 耐化学腐蚀高压装饰层积板检测
  • 【linux/shell】如何创建脚本函数库并在其他脚本中调用
  • Instruct-GS2GS:通过用户指令编辑 GS 三维场景
  • disql使用
  • SpringBoot Mybatis-Plus 日志带参数
  • 【WebGIS平台】传统聚落建筑科普数字化建模平台
  • Zookeeper分布式锁原理说明【简单易理解】
  • 去除Win32 Tab Control控件每个选项卡上的深色对话框背景
  • iis部署前后端分离项目(React前端,Node.js后端)
  • 【前端项目笔记】9 数据报表
  • 等保测评推动哈尔滨数字化转型中的安全保障
  • #pragma 指令
  • 【Excel】 批量跳转图片
  • 网站更新改版了
  • 初识大模型
  • Open3D SVD算法实现对应点集配准
  • bWAPP靶场安装
  • SpringBoot + MyBatisPlus 实现多租户分库
  • 【数据挖掘】银行信用卡风险大数据分析与挖掘
  • 使用 Qt 和 ECharts 进行数据可视化
  • 【机器学习】在【Pycharm】中的实践教程:使用【逻辑回归模型】进行【乳腺癌检测】
  • 【搭建Nacos服务】centos7 docker从0搭建Nacos服务
  • 将 build.gradle 配置从 Groovy 迁移到 Kotlin
  • 5G(NR) NTN 卫星组网架构
  • WEB安全-文件上传漏洞
  • Python函数 之 函数基础
  • 昇思25天学习打卡营第11天|SSD目标检测