vue3集成bpmn

文章目录

  • 前言
  • 一、依赖
  • 二、汉化配置
    • 1.引入文件
    • 2.样式文件
  • 总结


前言

vue3 集成bpmn 配置工作流

一、依赖

"bpmn-js": "^7.3.1",
"bpmn-js-properties-panel": "^0.37.2",
"bpmn-moddle": "^6.0.0",
"camunda-bpmn-moddle": "^4.5.0",
"diagram-js-minimap": "2.0.4"

二、汉化配置

export default {// Labels"Activate the global connect tool": "激活全局连接工具","Append {type}": "追加 {type}","Append EndEvent": "追加 结束事件 ","Append Task": "追加 任务","Append Gateway": "追加 网关","Append Intermediate/Boundary Event": "追加 中间/边界 事件","Add Lane above": "在上面添加道","Divide into two Lanes": "分割成两个道","Divide into three Lanes": "分割成三个道","Add Lane below": "在下面添加道","Append compensation activity": "追加补偿活动","Change type": "修改类型","Connect using Association": "使用关联连接","Connect using Sequence/MessageFlow or Association":"使用顺序/消息流或者关联连接","Connect using DataInputAssociation": "使用数据输入关联连接","Remove": "移除","Activate the hand tool": "激活抓手工具","Activate the lasso tool": "激活套索工具","Activate the create/remove space tool": "激活创建/删除空间工具","Create expanded SubProcess": "创建扩展子过程","Create IntermediateThrowEvent/BoundaryEvent": "创建中间抛出事件/边界事件","Create Pool/Participant": "创建池/参与者","Parallel Multi Instance": "并行多重事件","Sequential Multi Instance": "时序多重事件","DataObjectReference": "数据对象参考","DataStoreReference": "数据存储参考","Loop": "循环","Ad-hoc": "即席","Create {type}": "创建 {type}","Create Task": "创建任务","Create StartEvent": "创建开始事件","Create EndEvent": "创建结束事件","Create Group": "创建组","Task": "任务","Send Task": "发送任务","Receive Task": "接收任务","User Task": "用户任务","Manual Task": "手工任务","Business Rule Task": "业务规则任务","Service Task": "服务任务","Script Task": "脚本任务","Call Activity": "调用活动","Sub Process (collapsed)": "子流程(折叠的)","Sub Process (expanded)": "子流程(展开的)","Start Event": "开始事件","StartEvent": "开始事件","Intermediate Throw Event": "中间事件","End Event": "结束事件","EndEvent": "结束事件","Create Gateway": "创建网关","GateWay": "网关","Create Intermediate/Boundary Event": "创建中间/边界事件","Message Start Event": "消息开始事件","Timer Start Event": "定时开始事件","Conditional Start Event": "条件开始事件","Signal Start Event": "信号开始事件","Error Start Event": "错误开始事件","Escalation Start Event": "升级开始事件","Compensation Start Event": "补偿开始事件","Message Start Event (non-interrupting)": "消息开始事件(非中断)","Timer Start Event (non-interrupting)": "定时开始事件(非中断)","Conditional Start Event (non-interrupting)": "条件开始事件(非中断)","Signal Start Event (non-interrupting)": "信号开始事件(非中断)","Escalation Start Event (non-interrupting)": "升级开始事件(非中断)","Message Intermediate Catch Event": "消息中间捕获事件","Message Intermediate Throw Event": "消息中间抛出事件","Timer Intermediate Catch Event": "定时中间捕获事件","Escalation Intermediate Throw Event": "升级中间抛出事件","Conditional Intermediate Catch Event": "条件中间捕获事件","Link Intermediate Catch Event": "链接中间捕获事件","Link Intermediate Throw Event": "链接中间抛出事件","Compensation Intermediate Throw Event": "补偿中间抛出事件","Signal Intermediate Catch Event": "信号中间捕获事件","Signal Intermediate Throw Event": "信号中间抛出事件","Message End Event": "消息结束事件","Escalation End Event": "定时结束事件","Error End Event": "错误结束事件","Cancel End Event": "取消结束事件","Compensation End Event": "补偿结束事件","Signal End Event": "信号结束事件","Terminate End Event": "终止结束事件","Message Boundary Event": "消息边界事件","Message Boundary Event (non-interrupting)": "消息边界事件(非中断)","Timer Boundary Event": "定时边界事件","Timer Boundary Event (non-interrupting)": "定时边界事件(非中断)","Escalation Boundary Event": "升级边界事件","Escalation Boundary Event (non-interrupting)": "升级边界事件(非中断)","Conditional Boundary Event": "条件边界事件","Conditional Boundary Event (non-interrupting)": "条件边界事件(非中断)","Error Boundary Event": "错误边界事件","Cancel Boundary Event": "取消边界事件","Signal Boundary Event": "信号边界事件","Signal Boundary Event (non-interrupting)": "信号边界事件(非中断)","Compensation Boundary Event": "补偿边界事件","Exclusive Gateway": "互斥网关","Parallel Gateway": "并行网关","Inclusive Gateway": "相容网关","Complex Gateway": "复杂网关","Event based Gateway": "事件网关","Transaction": "转运","Sub Process": "子流程","Event Sub Process": "事件子流程","Collapsed Pool": "折叠池","Expanded Pool": "展开池",// Errors"no parent for {element} in {parent}": "在{parent}里,{element}没有父类","no shape type specified": "没有指定的形状类型","flow elements must be children of pools/participants":"流元素必须是池/参与者的子类","out of bounds release": "out of bounds release","more than {count} child lanes": "子道大于{count} ","element required": "元素不能为空","diagram not part of bpmn:Definitions": "流程图不符合bpmn规范","no diagram to display": "没有可展示的流程图","no process or collaboration to display": "没有可展示的流程/协作","element {element} referenced by {referenced}#{property} not yet drawn":"由{referenced}#{property}引用的{element}元素仍未绘制","already rendered {element}": "{element} 已被渲染","failed to import {element}": "导入{element}失败",//属性面板的参数"Id": "编号","Name": "名称","General": "常规","Details": "详情","Message Name": "消息名称","Message": "消息","Initiator": "创建者","Asynchronous Continuations": "持续异步","Asynchronous Before": "异步前","Asynchronous After": "异步后","Job Configuration": "工作配置","Exclusive": "排除","Job Priority": "工作优先级","Retry Time Cycle": "重试时间周期","Documentation": "文档","Element Documentation": "元素文档","History Configuration": "历史配置","History Time To Live": "历史的生存时间","Forms": "表单","Form Key": "表单key","Form Fields": "表单字段","Business Key": "业务key","Form Field": "表单字段","ID": "编号","Type": "类型","Label": "名称","Default Value": "默认值","Validation": "校验","Add Constraint": "添加约束","Config": "配置","Properties": "属性","Add Property": "添加属性","Value": "值","Add": "添加","Values": "值","Add Value": "添加值","Listeners": "监听器","Execution Listener": "执行监听","Event Type": "事件类型","Listener Type": "监听器类型","Java Class": "Java类","Expression": "表达式","Must provide a value": "必须提供一个值","Delegate Expression": "代理表达式","Script": "脚本","Script Format": "脚本格式","Script Type": "脚本类型","Inline Script": "内联脚本","External Script": "外部脚本","Resource": "资源","Field Injection": "字段注入","Extensions": "扩展","Input/Output": "输入/输出","Input Parameters": "输入参数","Output Parameters": "输出参数","Parameters": "参数","Output Parameter": "输出参数","Timer Definition Type": "定时器定义类型","Timer Definition": "定时器定义","Date": "日期","Duration": "持续","Cycle": "循环","Signal": "信号","Signal Name": "信号名称","Escalation": "升级","Error": "错误","Link Name": "链接名称","Condition": "条件名称","Variable Name": "变量名称","Variable Event": "变量事件","Specify more than one variable change event as a comma separated list.":"多个变量事件以逗号隔开","Wait for Completion": "等待完成","Activity Ref": "活动参考","Version Tag": "版本标签","Executable": "可执行文件","External Task Configuration": "扩展任务配置","Task Priority": "任务优先级","External": "外部","Connector": "连接器","Must configure Connector": "必须配置连接器","Connector Id": "连接器编号","Implementation": "实现方式","Field Injections": "字段注入","Fields": "字段","Result Variable": "结果变量","Topic": "主题","Configure Connector": "配置连接器","Input Parameter": "输入参数","Assignee": "代理人","Candidate Users": "候选用户","Candidate Groups": "候选组","Due Date": "到期时间","Follow Up Date": "跟踪日期","Priority": "优先级","The follow up date as an EL expression (e.g. ${someDate} or an ISO date (e.g. 2015-06-26T09:54:00)":"跟踪日期必须符合EL表达式,如: ${someDate} ,或者一个ISO标准日期,如:2015-06-26T09:54:00","The due date as an EL expression (e.g. ${someDate} or an ISO date (e.g. 2015-06-26T09:54:00)":"跟踪日期必须符合EL表达式,如: ${someDate} ,或者一个ISO标准日期,如:2015-06-26T09:54:00","Variables": "变量","Candidate Starter Configuration": "候选开始配置","Task Listener": "任务监听器","Candidate Starter Groups": "候选开始组","Candidate Starter Users": "候选开始用户","Tasklist Configuration": "任务列表配置","Startable": "启动","Specify more than one group as a comma separated list.":"指定多个组,用逗号分隔","Specify more than one user as a comma separated list.":"指定多个用户,用逗号分隔","This maps to the process definition key.": "这会映射为流程定义的键","CallActivity Type": "调用活动类型","Condition Type": "条件类型","Create UserTask": "创建用户任务","Create CallActivity": "创建调用活动","Called Element": "调用元素","Create DataObjectReference": "创建数据对象引用","Create DataStoreReference": "创建数据存储引用","Multi Instance": "多实例","Loop Cardinality": "实例数量","Collection": "任务参与人列表","Element Variable": "元素变量","Completion Condition": "完成条件","Open minimap": "打开小地图","Close minimap": "关闭小地图",
};
import translations from "./zh";export default function customTranslate(template, replacements) {replacements = replacements || {};// Translatetemplate = translations[template] || template;// Replacereturn template.replace(/{([^}]+)}/g, function(_, key) {let str = replacements[key];if (translations[replacements[key]] !== null &&translations[replacements[key]] !== "undefined") {// eslint-disable-next-line no-mixed-spaces-and-tabsstr = translations[replacements[key]];// eslint-disable-next-line no-mixed-spaces-and-tabs}return str || "{" + key + "}";});
}

1.引入文件

代码如下(示例):

import { onMounted,reactive, markRaw} from 'vue';
// bpmn-js相关
import 'bpmn-js/dist/assets/diagram-js.css'; // 左边工具栏以及编辑节点的样式
import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css';
import BpmnModeler from 'bpmn-js/lib/Modeler';
// bpmn-js-properties-panel相关
import 'bpmn-js-properties-panel/dist/assets/bpmn-js-properties-panel.css'
import propertiesPanelModule from 'bpmn-js-properties-panel'
import propertiesProviderModule from 'bpmn-js-properties-panel/lib/provider/camunda'
import camundaModdleDescriptor from 'camunda-bpmn-moddle/resources/camunda'
// 引入汉化js
import translate from '@/assets/bpmn/translate.js'
// import {reactive, ref} from "vue/dist/vue";
const bpmn = reactive({bpmnModeler:null
})
onMounted(() => {var customTranslateModule = {translate: ['value', translate]}const containerEl = document.getElementById('container');const bpmnModeler = markRaw(new BpmnModeler({container: containerEl,// 添加控制板propertiesPanel: {parent: '#js-properties-panel'},// 右侧属性面板additionalModules: [propertiesPanelModule,propertiesProviderModule,customTranslateModule],moddleExtensions: {camunda: camundaModdleDescriptor}}));bpmnModeler.createDiagram(() => {bpmnModeler.get('canvas').zoom('fit-viewport');});bpmn.bpmnModeler =bpmnModeler})

2.样式文件

如下(示例):

<style>
.containerBox {height: calc(100vh - 160px);margin-top: 30px;
}.containerBox #container {height: calc(100vh - 160px);border: 1px solid rgb(121, 121, 121);
}.bpp-properties-panel [type=text] {box-sizing: border-box;
}.panel {width: 350px;position: absolute;top: 1px;right: 50px;height: 100%;overflow: auto;
}/* 右下角logo */
.bjs-powered-by {display: none;
}
</style>

总结

在这里插入图片描述
提示:这里对文章进行总结:
例如:以上就是今天要讲的内容,本文仅仅简单介绍了pandas的使用,而pandas提供了大量能使我们快速便捷地处理数据的函数和方法。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/253974.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

【学网攻】 第(23)节 -- PPP协议

系列文章目录 目录 系列文章目录 文章目录 前言 一、PPP协议是什么&#xff1f; 二、实验 1.引入 实验目的 实验背景你是某公司的网络管理员&#xff0c;现在需要与另一个公司进行通信,需要你配置PPP协议保证双方发送的人是真正的而非黑客 技术原理 实验步骤新建Pack…

专业排版设计软件:QuarkXPress 2024 for mac中文激活版

QuarkXPress 2024 for Mac是一款功能强大、易于使用、高质量输出的专业排版软件。无论您是出版业的专家还是初学者&#xff0c;都可以通过QuarkXPress 2024轻松创建出令人惊叹的出版物。 软件下载&#xff1a;QuarkXPress 2024 for mac中文激活版下载 QuarkXPress 2023 for Mac…

牛客网SQL264:查询每个日期新用户的次日留存率

官网链接&#xff1a; 牛客每个人最近的登录日期(五)_牛客题霸_牛客网牛客每天有很多人登录&#xff0c;请你统计一下牛客每个日期新用户的次日留存率。 有一个登录(login。题目来自【牛客题霸】https://www.nowcoder.com/practice/ea0c56cd700344b590182aad03cc61b8?tpId82 …

前后端数据校验

前端校验内容 前端开发中的必要校验&#xff0c;可以保证用户输入的数据的准确性、合法性和安全性。同时&#xff0c;这些校验也有助于提供良好的用户体验和防止不必要的错误提交到后端。 1、必填字段校验&#xff1a; 对于必填的字段&#xff0c;需确保用户输入了有效的数据…

双非本科准备秋招(19.2)—— 设计模式之保护式暂停

一、wait & notify wait能让线程进入waiting状态&#xff0c;这时候就需要比较一下和sleep的区别了。 sleep vs wait 1) sleep 是 Thread 方法&#xff0c;而 wait 是 Object 的方法 2) sleep 不需要强制和 synchronized 配合使用&#xff0c;但 wait 强制和 s…

Javaweb之SpringBootWeb案例之登录校验功能的详细解析

2. 登录校验 2.1 问题分析 我们已经完成了基础登录功能的开发与测试&#xff0c;在我们登录成功后就可以进入到后台管理系统中进行数据的操作。 但是当我们在浏览器中新的页面上输入地址&#xff1a;http://localhost:9528/#/system/dept&#xff0c;发现没有登录仍然可以进…

【PowerShell】修改Windows网络配置的常用命令

PowerShell&#xff08;PS&#xff09;是一种强大的任务自动化和管理框架&#xff0c;具有丰富的命令和语法&#xff0c;可以用于编写脚本来管理Windows操作系统和其他应用程序。它的开放式架构和跨平台支持使得它成为一个灵活和可扩展的工具。 在网络配置方面&#xff0c;Powe…

Python3 交叉编译 numpy pandas scipy scikit-learn

1. 概述 由于需要将Python3.7 和一些软件包交叉编译到 armv7 平台硬件&#xff0c;如果是arm64位的系统&#xff0c;很多包都有预编译好的版本&#xff0c;可直接下载。本文主要在基于 crossenv(https://github.com/benfogle/crossenv)环境下交叉编译。 2. 编译环境搭建 创建…

时光峰峦文物璀璨,预防性保护筑安全

在璀璨的历史长河中&#xff0c;珍贵文物如同时间的印记&#xff0c;承载着过往的辉煌。《人文山水时光峰峦——多彩贵州历史文化展》便是这样一场文化的盛宴&#xff0c;汇聚了众多首次露面的宝藏。然而&#xff0c;文物的保存对环境要求极为苛刻&#xff0c;温湿度波动都可能…

nodeJS 的 npm 设置国内高速镜像之淘宝镜像的方法

1、我们知道 nodeJS 是老外搞出来的&#xff0c;服务器放在了国外&#xff0c;国内的小朋友访问起来会比较慢&#xff0c;阿里巴巴的淘宝给出了有力支持&#xff0c;现在我们就将 nodeJS 的镜像地址切换为国内的淘宝镜像。 2、查看当前的镜像地址&#xff1a; npm get registr…

尚硅谷Ajax笔记

一天拿下 介绍二级目录三级目录 b站链接 介绍 ajax优缺点 http node.js下载配置好环境 express框架 切换到项目文件夹&#xff0c;执行下面两条命令 有报错,退出用管理员身份打开 或者再命令提示符用管理员身份打开 npm init --yes npm i express请求 <script>//引…

单片机无线发射的原理剖析

目录 一、EV1527编码格式 二、OOK&ASK的简单了解 三、433MHZ 四、单片机的地址ID 五、基于STC15W104单片机实现无线通信 无线发射主要运用到了三个知识点&#xff1a;EV1527格式&#xff1b;OOk&#xff1b;433MHZ。下面我们来分别阐述&#xff1a; EV1527是数据的编…

前端开发中不同语言【react-i18next】

目录 查看并设置语言 单页面&#xff1a;html lang ​编辑 浏览器 自定义翻译 原理/实现 react-i18next【hook只能在函数组件中】 设置 模块&#xff1a;staticData.ts 散(重复利用)&#xff1a;命名空间.json 应用 准备 html标签 查看并设置语言 单页面&#x…

网神 SecGate 3600 防火墙 route_ispinfo_import_save 文件上传漏洞

免责声明&#xff1a;文章来源互联网收集整理&#xff0c;请勿利用文章内的相关技术从事非法测试&#xff0c;由于传播、利用此文所提供的信息或者工具而造成的任何直接或者间接的后果及损失&#xff0c;均由使用者本人负责&#xff0c;所产生的一切不良后果与文章作者无关。该…

Excel——有效性、二级菜单联动

一、录入规范数据 1.手动输入序列录入有效性信息 选择需要录入有效性的所有单元格 选择【数据】——【有效性】——【有效性】 在【允许】输入的值之间选择【序列】 在【序列】输入框中输入想要选择的值&#xff0c;中间用逗号&#xff08;必须是英文逗号&#xff09;隔开 。…

同步和异步、阻塞与非阻塞

一、同步和异步的概念 首先同步和异步是访问数据的机制 同步&#xff1a;同步一般指主动请求并等待IO操作完成的方式异步&#xff1a;主动请求数据后便可以继续处理其它任务&#xff0c;随后等待IO操作完毕的通知 两者的区别&#xff1a;同步会一行一行执行代码&#xff0c;而…

Multisim14.0仿真(五十五)汽车转向灯设计

一、功能描述&#xff1a; 左转向&#xff1a;左侧指示灯循环依次闪亮&#xff1b; 右转向&#xff1a;右侧指示灯循环依次闪亮&#xff1b; 刹车&#xff1a; 所有灯常亮&#xff1b; 正常&#xff1a; 所有灯熄灭。 二、主要芯片&#xff1a; 74LS161D 74LS04D 74…

SpringCloud+RabbitMQ+Docker+Redis+搜索+分布式 基础(持续更新~)

具体操作&#xff1a; day2: 作用&#xff1a; 出现跨域问题 配相对应进行配置即可解决&#xff1a; IDEA连接的&#xff0c;在url最后加参数?useSSLfalse注意链接密码是123&#xff08;docker中mysql密码&#xff09; 注意&#xff0c;虚拟机中设置的密码和ip要和主机上…

GO语言集成开发 JetBrains GoLand 2023 中文

JetBrains GoLand 2023是一款专为Go语言开发者打造的集成开发环境&#xff08;IDE&#xff09;。它基于IntelliJ IDEA平台&#xff0c;提供了丰富的功能和工具&#xff0c;旨在提高开发效率和质量。GoLand 2023具备强大的Go语言支持&#xff0c;包括语法高亮、自动补全、代码提…

手把手教你设计接口自动化测试用例:提取接口信息并分析

随着市场需求的变化&#xff0c;大部分企业在招聘测试人员时&#xff0c;都会提出接口自动化测试的相关要求&#xff0c;为什么会这样呢&#xff1f; 目前&#xff0c;软件构架基本上都是前后端分离的&#xff0c;软件的主要功能由服务端提供。从整个软件测试市场来看&#xf…