sasp-flow-render 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/index.js +108 -0
  2. package/package.json +21 -0
  3. package/router.js +13 -0
  4. package/src/assets/font/iconfont.css +1158 -0
  5. package/src/assets/font/iconfont.eot +0 -0
  6. package/src/assets/font/iconfont.js +1 -0
  7. package/src/assets/font/iconfont.svg +827 -0
  8. package/src/assets/font/iconfont.ttf +0 -0
  9. package/src/assets/font/iconfont.woff +0 -0
  10. package/src/assets/images/card_zwsj.png +0 -0
  11. package/src/assets/images/dataStore.png +0 -0
  12. package/src/assets/images/dataStore_icon.png +0 -0
  13. package/src/assets/images/draft.png +0 -0
  14. package/src/assets/images/edit_icon.png +0 -0
  15. package/src/assets/images/end.png +0 -0
  16. package/src/assets/images/end_icon.png +0 -0
  17. package/src/assets/images/gateway.png +0 -0
  18. package/src/assets/images/gateway_icon.png +0 -0
  19. package/src/assets/images/globalConnect_icon.png +0 -0
  20. package/src/assets/images/group_icon.png +0 -0
  21. package/src/assets/images/hander_icon.png +0 -0
  22. package/src/assets/images/icon_ quality.png +0 -0
  23. package/src/assets/images/lasso_icon.png +0 -0
  24. package/src/assets/images/mobile_preview.png +0 -0
  25. package/src/assets/images/participant_icon.png +0 -0
  26. package/src/assets/images/publicProcess_icon.png +0 -0
  27. package/src/assets/images/remind_example.png +0 -0
  28. package/src/assets/images/space_icon.png +0 -0
  29. package/src/assets/images/start.png +0 -0
  30. package/src/assets/images/start_icon.png +0 -0
  31. package/src/assets/images/subprocess_icon.png +0 -0
  32. package/src/assets/images/tab_set_example.png +0 -0
  33. package/src/assets/images/timer.png +0 -0
  34. package/src/assets/images/timer_icon.png +0 -0
  35. package/src/assets/images/userTask_icon.png +0 -0
  36. package/src/assets/images/user_task.png +0 -0
  37. package/src/assets/js/api/apiFlow.js +219 -0
  38. package/src/assets/js/flowInstall.js +25 -0
  39. package/src/assets/js/global/cacheGlobal.js +110 -0
  40. package/src/assets/js/global/flowGlobal.js +61 -0
  41. package/src/assets/js/global/flowUserGlobal.js +35 -0
  42. package/src/assets/js/global/interfaceCache.js +31 -0
  43. package/src/assets/js/storageIO.js +106 -0
  44. package/src/components/flowChart.vue +463 -0
  45. package/src/components/flowInst/css/flowInstList.scss +193 -0
  46. package/src/components/flowInst/flowInstList.vue +818 -0
  47. package/src/components/flowInst/flowInstTab.vue +2858 -0
  48. package/src/components/flowInst/popup/flowInstForm.vue +54 -0
  49. package/src/components/flowRoamRecords.vue +768 -0
  50. package/src/components/messageMould/messageMould.vue +547 -0
  51. package/src/components/roamRecord.vue +567 -0
  52. package/src/components/userSelect.vue +537 -0
  53. package/src/views/flowInstView.vue +178 -0
  54. package/src/views/menuRouter/flowMenuRouter.vue +260 -0
  55. package/src/views/menuRouter/flowResRouter.vue +223 -0
  56. package/src/views/popup/css/flowMain.scss +156 -0
  57. package/src/views/popup/event/compoment/diy/info.txt +1 -0
  58. package/src/views/popup/event/compoment/eventParentConfig.vue +45 -0
  59. package/src/views/popup/event/js/loadFlowEventPlugin.js +279 -0
  60. package/src/views/popup/js/controls/CustomContextPad.js +310 -0
  61. package/src/views/popup/js/controls/CustomPalette.js +303 -0
  62. package/src/views/popup/js/controls/CustomRenderer.js +219 -0
  63. package/src/views/popup/js/controls/index.js +11 -0
  64. package/src/views/popup/js/customModeler/CustomModeler.js +22 -0
  65. package/src/views/popup/js/translations/customTranslate.js +14 -0
  66. package/src/views/popup/js/translations/translations.js +234 -0
  67. package/src/views/popup/js/utils/utils.js +53 -0
  68. package/src/views/test.vue +79 -0
@@ -0,0 +1,219 @@
1
+ import BaseRenderer from 'diagram-js/lib/draw/BaseRenderer' // 引入默认的renderer
2
+ import { customElements, customConfig,hasLabelElements } from '../utils/utils'
3
+ import {
4
+ append as svgAppend,
5
+ attr as svgAttr,
6
+ create as svgCreate
7
+ } from 'tiny-svg';
8
+
9
+ const HIGH_PRIORITY = 1500;// 最高优先级
10
+
11
+ export default class CustomRenderer extends BaseRenderer { // 继承BaseRenderer
12
+ constructor(eventBus, bpmnRenderer) {
13
+ super(eventBus, HIGH_PRIORITY);
14
+ this.bpmnRenderer = bpmnRenderer;
15
+
16
+ // 重新定义原有画线方法,避免死循环
17
+ this.bpmnRenderer.drawConnectionOld = this.bpmnRenderer.drawConnection;
18
+ }
19
+
20
+ canRender(element) {
21
+ // ignore labels
22
+ return !element.labelTarget;
23
+ }
24
+
25
+ /**
26
+ * 绘制节点
27
+ * @param parentNode
28
+ * @param element
29
+ * @returns {*}
30
+ */
31
+ drawShape(parentNode, element) { // 核心函数就是绘制shape
32
+ const type = element.type;// 获取到类型
33
+ let tmpType = "";
34
+ if (customElements.includes(type)) { // or customConfig[type]
35
+ tmpType = type;
36
+ if(element.id.indexOf('Activity_draft')>-1 || (element.hasOwnProperty("nodeType")&&element.nodeType=="draft")){
37
+ tmpType = "bpmn:AcivitiyDraft";
38
+ }
39
+ const { url, attr } = customConfig[tmpType];
40
+ const customIcon = svgCreate('image', { // 在这里创建了一个image
41
+ ...attr,
42
+ href: url
43
+ });
44
+ if(type != 'bpmn:UserTask'){ //用户任务单独设置
45
+ element['width'] = attr.width; // 这里我是取了巧, 直接修改了元素的宽高
46
+ element['height'] = attr.height;
47
+ svgAppend(parentNode, customIcon);
48
+ }
49
+
50
+ // 判断是否有name属性来决定是否要渲染出label
51
+ if (!hasLabelElements.includes(type) && element.businessObject) {
52
+ if(!element.businessObject.name){
53
+ element.businessObject['name'] = '';
54
+ }
55
+ let name = element.businessObject.name;
56
+ const text = svgCreate('foreignObject', {
57
+ x: (attr.x + attr.width)/2 + 10,
58
+ y: 30, // y取的是父元素的y+height+20
59
+ width:"70px",
60
+ height:"60px",
61
+ "font-size": "12",
62
+ "fill": "#00000",
63
+ "overflow-wrap":"break-word",
64
+ "text-anchor": "middle",
65
+ "dominant-baseline": "middle"
66
+ });
67
+
68
+ const rect = svgCreate('rect',{
69
+ "width": 100,
70
+ 'height':80,
71
+ "x":0,
72
+ "y":0,
73
+ "rx": 5,
74
+ "ry": 5,
75
+ "fill":"white",
76
+ "fill-opacity":0.95,
77
+ "stroke":"#3384fe",
78
+ "stroke-width":"2px"
79
+ });
80
+ text.innerHTML = name; //默认用户任务
81
+ svgAppend(parentNode,rect);
82
+ svgAppend(parentNode, text);
83
+ if(type == 'bpmn:UserTask' || tmpType == "bpmn:AcivitiyDraft"){
84
+ element['width'] = 100;
85
+ element['height'] = 80;
86
+ element['rx'] = 5;
87
+ element['ry'] = 5;
88
+ element['style'] = "stroke: black;stroke-width: 2px;fill: white;fill-opacity: 0.95;";
89
+ svgAppend(parentNode, customIcon);
90
+ }
91
+ }
92
+ return customIcon;
93
+ }
94
+
95
+ const shape = this.bpmnRenderer.drawShape(parentNode, element);
96
+ setShapeProperties(shape, element); //初始化颜色
97
+ return shape;
98
+ }
99
+
100
+ getShapePath(shape) {
101
+ return this.bpmnRenderer.getShapePath(shape);
102
+ }
103
+
104
+ drawConnection(parentNode, element) {
105
+ const bpmnRenderer = this.bpmnRenderer;
106
+ let vm = this;
107
+ let customConnectionColor = function(visuals, connection){
108
+ let res = bpmnRenderer.drawConnectionOld(visuals, connection);
109
+ if(!document.getElementById("gateWayLineColorRange")){
110
+ let defsDoc;
111
+ let arr = Array.prototype.slice.call( document.getElementsByTagName("svg") );
112
+ for(let elem of arr){
113
+ if(elem.getAttribute("data-element-id")){
114
+ defsDoc = elem.getElementsByTagName("defs")[0];
115
+ break;
116
+ }
117
+ }
118
+ let addElement = function(x, y) {
119
+ let markerElement = document.createElementNS('http://www.w3.org/2000/svg', 'marker');
120
+ markerElement.setAttribute('refX', x);
121
+ markerElement.setAttribute('refY', y);
122
+ markerElement.setAttribute('viewBox', "0 0 20 20");
123
+ markerElement.setAttribute('markerWidth', "10");
124
+ markerElement.setAttribute('markerHeight', "10");
125
+ markerElement.setAttribute('orient', "auto");
126
+ markerElement.setAttribute('id', "gateWayLineColorRange");
127
+ markerElement.setAttribute('fill', 'red');
128
+ let pathDom = document.createElementNS('http://www.w3.org/2000/svg', 'path');
129
+ pathDom.setAttribute("d","M 1 5 L 11 10 L 1 15 Z");
130
+ pathDom.setAttribute("style","fill: #409EFF; stroke-width: 1px; stroke-linecap: round; stroke-dasharray: 10000, 1; stroke: rgb(64, 158, 255);");
131
+ markerElement.appendChild(pathDom);
132
+ defsDoc.appendChild(markerElement);
133
+ };
134
+ addElement(10,10);
135
+ }
136
+ if(connection.source){
137
+ if(connection.source.type == "bpmn:ParallelGateway" || connection.source.type == "bpmn:ExclusiveGateway" || connection.source.type == "bpmn:InclusiveGateway"){
138
+ visuals.childNodes[0].style.stroke = "#FF8C1A";
139
+
140
+ visuals.childNodes[0].style['marker-end'] = 'url("#gateWayLineColorRange")';
141
+ let marker = document.querySelector("#gateWayLineColorRange");
142
+
143
+ if (marker != null) {
144
+ marker.childNodes[0].style.fill = "#FF8C1A";
145
+ marker.childNodes[0].style.stroke = "#FF8C1A";
146
+ }
147
+ }else{
148
+ visuals.childNodes[0].style.stroke = "black"; // #409EFF
149
+
150
+ let eleId = visuals.childNodes[0].style['marker-end'].split('"')[1];
151
+ let marker = document.querySelector(eleId);
152
+ if (marker != null) {
153
+ marker.childNodes[0].style.fill = "black";
154
+ marker.childNodes[0].style.stroke = "black";
155
+ }
156
+ }
157
+ }
158
+ return res;
159
+ };
160
+ vm.bpmnRenderer.drawConnection = customConnectionColor;
161
+ }
162
+ }
163
+
164
+ CustomRenderer.$inject = ['eventBus', 'bpmnRenderer'];
165
+
166
+ const propertiesConfig = { //默认颜色
167
+ 'bpmn:StartEvent': {
168
+ fill: '#12c2e9'
169
+ },
170
+ 'bpmn:UserTask': {
171
+ stroke: '#3384fe',
172
+ strokeWidth: 2,
173
+ },
174
+ 'bpmn:EndEvent': {
175
+ // stroke: '#f64f59',
176
+ fill: '#f64f59'
177
+ },
178
+ 'bpmn:ExclusiveGateway':{ //排他网关
179
+ stroke: '#ed8d21',
180
+ strokeWidth: 4
181
+ },
182
+
183
+ 'bpmn:InclusiveGateway':{ //包容网关
184
+ stroke: '#ed8d21',
185
+ strokeWidth: 4
186
+ },
187
+ // ParallelGateway
188
+ 'bpmn:ParallelGateway':{ //并行网关
189
+ stroke: '#ed8d21',
190
+ strokeWidth: 4
191
+ },
192
+
193
+ 'bpmn:Participant':{ //泳道
194
+ stroke: '#3384fe',
195
+ strokeWidth: 1,
196
+ },
197
+
198
+ 'bpmn:Group':{ //分组
199
+ stroke: '#3384fe',
200
+ strokeWidth: 2,
201
+ },
202
+
203
+ 'bpmn:SubProcess':{ //子流程
204
+ stroke:'3384fe',
205
+ strokeWidth:2,
206
+ }
207
+
208
+ };
209
+
210
+ function setShapeProperties(shape, element){
211
+ const type = element.type; // 获取到的类型
212
+ if (propertiesConfig[type]) {
213
+ const properties = propertiesConfig[type];
214
+ Object.keys(properties).forEach(prop => {
215
+ shape.style.setProperty(prop, properties[prop])
216
+ });
217
+ }
218
+
219
+ }
@@ -0,0 +1,11 @@
1
+ import CustomContextPad from './CustomContextPad';
2
+ import CustomeRender from './CustomRenderer';
3
+ import CustomPalette from './CustomPalette';
4
+
5
+
6
+ export default {
7
+ __init__: [ 'customContextPad','customeRender', 'customPalette' ],
8
+ customContextPad: [ 'type', CustomContextPad ],
9
+ customeRender: ['type',CustomeRender],
10
+ customPalette: [ 'type', CustomPalette ]
11
+ };
@@ -0,0 +1,22 @@
1
+ //不用系统默认控件,使用自定义方便顺序调整
2
+ import Modeler from 'bpmn-js/lib/Modeler'
3
+ import inherits from 'inherits'
4
+ import CustomModule from '../controls'
5
+
6
+
7
+ export default function CustomModeler(options) {
8
+ Modeler.call(this, options);
9
+ this._customElements = []
10
+ }
11
+
12
+ inherits(CustomModeler, Modeler);
13
+
14
+ CustomModeler.prototype.bindEditBtnCallBack = function(func){
15
+ CustomModule.customContextPad[1].prototype.editBtnCallBack = func;
16
+ }
17
+
18
+ CustomModeler.prototype._modules = [].concat(
19
+ CustomModeler.prototype._modules, [
20
+ CustomModule
21
+ ]
22
+ );
@@ -0,0 +1,14 @@
1
+ import translations from './translations';
2
+
3
+
4
+ export default function customTranslate(template, replacements) {
5
+ replacements = replacements || {};
6
+
7
+ // Translate
8
+ template = translations[template] || template;
9
+
10
+ // Replace
11
+ return template.replace(/{([^}]+)}/g, function (_, key) {
12
+ return replacements[key] || '{' + key + '}';
13
+ });
14
+ }
@@ -0,0 +1,234 @@
1
+ /**
2
+ * This is a sample file that should be replaced with the actual translation.
3
+ *
4
+ * Checkout https://github.com/bpmn-io/bpmn-js-i18n for a list of available
5
+ * translations and labels to translate.
6
+ */
7
+ export default {
8
+ 'Activate the hand tool': '选择',
9
+ 'Activate the lasso tool': '批量选择',
10
+ 'Activate the create/remove space tool': '从横/纵切面批量调整',
11
+ 'Activate the global connect tool': '连线',
12
+ 'Create StartEvent': '添加开始节点',
13
+
14
+ 'Create Intermediate/Boundary Event': '添加中间/边界事件',
15
+
16
+ 'Create EndEvent': '添加结束节点',
17
+ 'Create Gateway': '添加条件流转',
18
+ 'Create Task': '添加任务',
19
+ 'Create UserTask': '添加用户任务',
20
+ "Create Timer": '添加定时器',
21
+ 'Create expanded SubProcess': '添加子流程',
22
+ 'Create Pool/Participant': '添加泳道',
23
+ 'Create Group': '添加分组',
24
+ 'Create DataStoreReference': '添加数据操作节点',
25
+ 'Create ExclusiveGateway': '添加条件流转节点',
26
+ 'Create process block': '添加公共流程块节点',
27
+
28
+ 'User Task': '用户任务',
29
+
30
+ 'Append Gateway': '添加条件流转',
31
+ 'Append Task': '添加任务',
32
+ 'Append UserTask': '添加用户任务',
33
+ 'Append TextAnnotation': '添加说明文本',
34
+ 'Append NodeEdit': '节点编辑',
35
+
36
+ 'Exclusive Gateway': '专用网关',
37
+ 'Parallel Gateway': '并行网关',
38
+ 'Inclusive Gateway': '包容性网关',
39
+ 'Complex Gateway': '复杂网关',
40
+ 'Event based Gateway': '基于事件的网格',
41
+ 'Message Start Event': '消息启动事件',
42
+ 'Timer Start Event': '定时启动事件',
43
+ 'Conditional Start Event': '条件启动事件',
44
+ 'Signal Start Event': '信号启动事件',
45
+ 'Error Start Event': '错误启动事件',
46
+ 'Escalation Start Event': '升级启动事件',
47
+ 'Compensation Start Event': '补偿启动事件',
48
+ 'Message Start Event (non-interrupting)': '消息启动事件 (非中断)',
49
+ 'Timer Start Event (non-interrupting)': '定时启动事件 (非中断)',
50
+ 'Conditional Start Event (non-interrupting)': '条件启动事件 (非中断)',
51
+ 'Signal Start Event (non-interrupting)': '信号启动事件 (非中断)',
52
+ 'Escalation Start Event (non-interrupting)': '升级启动事件 (非中断)',
53
+
54
+
55
+ 'Append {type}': '添加 {type}',
56
+ 'Add Lane above': '在上面添加道',
57
+ 'Divide into two Lanes': '分割成两个道',
58
+ 'Divide into three Lanes': '分割成三个道',
59
+ 'Add Lane below': '在下面添加道',
60
+ 'Append compensation activity': '追加补偿活动',
61
+ 'Change type': '修改类型',
62
+ 'Connect using Association': '使用关联连接',
63
+ 'Connect using Sequence/MessageFlow or Association': '添加连接线',
64
+ 'Connect using DataInputAssociation': '使用数据输入关联连接',
65
+ 'Remove': '移除',
66
+ 'Create IntermediateThrowEvent/BoundaryEvent': '创建中间抛出事件/边界事件',
67
+ 'Parallel Multi Instance': '并行多重事件',
68
+ 'Sequential Multi Instance': '时序多重事件',
69
+ 'DataObjectReference': '数据对象参考',
70
+ 'DataStoreReference': '数据存储参考',
71
+ 'Loop': '循环',
72
+ 'Ad-hoc': '即席',
73
+ 'Create {type}': '创建 {type}',
74
+ 'Task': '任务',
75
+ 'Send Task': '发送任务',
76
+ 'Receive Task': '接收任务',
77
+ 'Manual Task': '手工任务',
78
+ 'Business Rule Task': '业务规则任务',
79
+ 'Service Task': '服务任务',
80
+ 'Script Task': '脚本任务',
81
+ 'Call Activity': '调用活动',
82
+ 'Sub Process (collapsed)': '子流程(折叠的)',
83
+ 'Sub Process (expanded)': '子流程(展开的)',
84
+ 'Start Event': '开始事件',
85
+ 'StartEvent': '开始事件',
86
+ 'Intermediate Throw Event': '中间事件',
87
+ 'End Event': '结束事件',
88
+ 'EndEvent': '结束事件',
89
+ 'Message Intermediate Catch Event': '消息中间捕获事件',
90
+ 'Message Intermediate Throw Event': '消息中间抛出事件',
91
+ 'Timer Intermediate Catch Event': '定时中间捕获事件',
92
+ 'Escalation Intermediate Throw Event': '升级中间抛出事件',
93
+ 'Conditional Intermediate Catch Event': '条件中间捕获事件',
94
+ 'Link Intermediate Catch Event': '链接中间捕获事件',
95
+ 'Link Intermediate Throw Event': '链接中间抛出事件',
96
+ 'Compensation Intermediate Throw Event': '补偿中间抛出事件',
97
+ 'Signal Intermediate Catch Event': '信号中间捕获事件',
98
+ 'Signal Intermediate Throw Event': '信号中间抛出事件',
99
+ 'Message End Event': '消息结束事件',
100
+ 'Escalation End Event': '定时结束事件',
101
+ 'Error End Event': '错误结束事件',
102
+ 'Cancel End Event': '取消结束事件',
103
+ 'Compensation End Event': '补偿结束事件',
104
+ 'Signal End Event': '信号结束事件',
105
+ 'Terminate End Event': '终止结束事件',
106
+ 'Message Boundary Event': '消息边界事件',
107
+ 'Message Boundary Event (non-interrupting)': '消息边界事件(非中断)',
108
+ 'Timer Boundary Event': '定时边界事件',
109
+ 'Timer Boundary Event (non-interrupting)': '定时边界事件(非中断)',
110
+ 'Escalation Boundary Event': '升级边界事件',
111
+ 'Escalation Boundary Event (non-interrupting)': '升级边界事件(非中断)',
112
+ 'Conditional Boundary Event': '条件边界事件',
113
+ 'Conditional Boundary Event (non-interrupting)': '条件边界事件(非中断)',
114
+ 'Error Boundary Event': '错误边界事件',
115
+ 'Cancel Boundary Event': '取消边界事件',
116
+ 'Signal Boundary Event': '信号边界事件',
117
+ 'Signal Boundary Event (non-interrupting)': '信号边界事件(非中断)',
118
+ 'Compensation Boundary Event': '补偿边界事件',
119
+ 'Transaction': '转运',
120
+ 'Sub Process': '子流程',
121
+ 'Event Sub Process': '事件子流程',
122
+ 'Collapsed Pool': '折叠池',
123
+ 'Expanded Pool': '展开池',
124
+
125
+ // Errors
126
+ 'no parent for {element} in {parent}': '在{parent}里,{element}没有父类',
127
+ 'no shape type specified': '没有指定的形状类型',
128
+ 'flow elements must be children of pools/participants': '流元素必须是池/参与者的子类',
129
+ 'out of bounds release': 'out of bounds release',
130
+ 'more than {count} child lanes': '子道大于{count} ',
131
+ 'element required': '元素不能为空',
132
+ 'diagram not part of bpmn:Definitions': '流程图不符合bpmn规范',
133
+ 'no diagram to display': '没有可展示的流程图',
134
+ 'no process or collaboration to display': '没有可展示的流程/协作',
135
+ 'element {element} referenced by {referenced}#{property} not yet drawn': '由{referenced}#{property}引用的{element}元素仍未绘制',
136
+ 'already rendered {element}': '{element} 已被渲染',
137
+ 'failed to import {element}': '导入{element}失败',
138
+ //属性面板的参数
139
+ 'Id': '编号',
140
+ 'Name': '名称',
141
+ 'General': '常规',
142
+ 'Details': '详情',
143
+ 'Message Name': '消息名称',
144
+ 'Message': '消息',
145
+ 'Initiator': '创建者',
146
+ 'Asynchronous Continuations': '持续异步',
147
+ 'Asynchronous Before': '异步前',
148
+ 'Asynchronous After': '异步后',
149
+ 'Job Configuration': '工作配置',
150
+ 'Exclusive': '排除',
151
+ 'Job Priority': '工作优先级',
152
+ 'Retry Time Cycle': '重试时间周期',
153
+ 'Documentation': '文档',
154
+ 'Element Documentation': '元素文档',
155
+ 'History Configuration': '历史配置',
156
+ 'History Time To Live': '历史的生存时间',
157
+ 'Forms': '表单',
158
+ 'Form Key': '表单key',
159
+ 'Form Fields': '表单字段',
160
+ 'Business Key': '业务key',
161
+ 'Form Field': '表单字段',
162
+ 'ID': '编号',
163
+ 'Type': '类型',
164
+ 'Label': '名称',
165
+ 'Default Value': '默认值',
166
+ 'Validation': '校验',
167
+ 'Add Constraint': '添加约束',
168
+ 'Config': '配置',
169
+ 'Properties': '属性',
170
+ 'Add Property': '添加属性',
171
+ 'Value': '值',
172
+ 'Listeners': '监听器',
173
+ 'Execution Listener': '执行监听',
174
+ 'Event Type': '事件类型',
175
+ 'Listener Type': '监听器类型',
176
+ 'Java Class': 'Java类',
177
+ 'Expression': '表达式',
178
+ 'Must provide a value': '必须提供一个值',
179
+ 'Delegate Expression': '代理表达式',
180
+ 'Script': '脚本',
181
+ 'Script Format': '脚本格式',
182
+ 'Script Type': '脚本类型',
183
+ 'Inline Script': '内联脚本',
184
+ 'External Script': '外部脚本',
185
+ 'Resource': '资源',
186
+ 'Field Injection': '字段注入',
187
+ 'Extensions': '扩展',
188
+ 'Input/Output': '输入/输出',
189
+ 'Input Parameters': '输入参数',
190
+ 'Output Parameters': '输出参数',
191
+ 'Parameters': '参数',
192
+ 'Output Parameter': '输出参数',
193
+ 'Timer Definition Type': '定时器定义类型',
194
+ 'Timer Definition': '定时器定义',
195
+ 'Date': '日期',
196
+ 'Duration': '持续',
197
+ 'Cycle': '循环',
198
+ 'Signal': '信号',
199
+ 'Signal Name': '信号名称',
200
+ 'Escalation': '升级',
201
+ 'Error': '错误',
202
+ 'Link Name': '链接名称',
203
+ 'Condition': '条件名称',
204
+ 'Variable Name': '变量名称',
205
+ 'Variable Event': '变量事件',
206
+ 'Specify more than one variable change event as a comma separated list.': '多个变量事件以逗号隔开',
207
+ 'Wait for Completion': '等待完成',
208
+ 'Activity Ref': '活动参考',
209
+ 'Version Tag': '版本标签',
210
+ 'Executable': '可执行文件',
211
+ 'External Task Configuration': '扩展任务配置',
212
+ 'Task Priority': '任务优先级',
213
+ 'External': '外部',
214
+ 'Connector': '连接器',
215
+ 'Must configure Connector': '必须配置连接器',
216
+ 'Connector Id': '连接器编号',
217
+ 'Implementation': '实现方式',
218
+ 'Field Injections': '字段注入',
219
+ 'Fields': '字段',
220
+ 'Result Variable': '结果变量',
221
+ 'Topic': '主题',
222
+ 'Configure Connector': '配置连接器',
223
+ 'Input Parameter': '输入参数',
224
+ 'Assignee': '代理人',
225
+ 'Candidate Users': '候选用户',
226
+ 'Candidate Groups': '候选组',
227
+ 'Due Date': '到期时间',
228
+ 'Follow Up Date': '跟踪日期',
229
+ 'Priority': '优先级',
230
+ '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',
231
+ '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',
232
+ 'Variables': '变量',
233
+ 'Open minimap':'小地图',
234
+ };
@@ -0,0 +1,53 @@
1
+ const customElements = ['bpmn:StartEvent','bpmn:EndEvent','bpmn:DataStoreReference','bpmn:IntermediateCatchEvent','bpmn:ParallelGateway','bpmn:InclusiveGateway','bpmn:ExclusiveGateway','bpmn:AcivitiyDraft','bpmn:UserTask','bpmn:BoundaryEvent'];
2
+ const customConfig = { // 自定义元素的配置
3
+ 'bpmn:StartEvent': { //开始节点
4
+ 'url': require('../../../../assets/images/start.png'),//vue 引入图片方式
5
+ 'attr': { x: 0, y: 0, width: 36, height: 36 }
6
+ },
7
+
8
+ 'bpmn:AcivitiyDraft':{ //开始草稿
9
+ 'url': require('../../../../assets/images/draft.png'),//
10
+ 'attr': { x: 4, y: 4, width: 24, height: 24 }
11
+ },
12
+
13
+ 'bpmn:EndEvent':{ //结束节点
14
+ 'url': require('../../../../assets/images/end.png'),//vue 引入图片方式
15
+ 'attr': { x: 0, y: 0, width: 36, height: 36 }
16
+ },
17
+ 'bpmn:DataStoreReference':{//数据操作节点
18
+ 'url': require('../../../../assets/images/dataStore.png'),//
19
+ 'attr': { x: 0, y: 0, width: 36, height: 36 }
20
+ },
21
+
22
+ 'bpmn:IntermediateCatchEvent':{//定时器节点
23
+ 'url': require('../../../../assets/images/timer.png'),//
24
+ 'attr': { x: 0, y: 0, width: 36, height: 36 }
25
+ },
26
+
27
+ 'bpmn:BoundaryEvent':{//定时器节点
28
+ 'url': require('../../../../assets/images/timer.png'),//
29
+ 'attr': { x: 0, y: 0, width: 36, height: 36 }
30
+ },
31
+
32
+ 'bpmn:UserTask':{ //用户任务图标
33
+ 'url': require('../../../../assets/images/userTask_icon.png'),//
34
+ 'attr': { x: 4, y: 4, width: 24, height: 24 }
35
+ },
36
+ 'bpmn:ParallelGateway':{ //并行网关
37
+ 'url': require('../../../../assets/images/gateway.png'),//
38
+ 'attr': { x: 0, y: 0, width: 50, height: 50 }
39
+ },
40
+ 'bpmn:InclusiveGateway':{ //并行网关
41
+ 'url': require('../../../../assets/images/gateway.png'),//
42
+ 'attr': { x: 0, y: 0, width: 50, height: 50 }
43
+ },
44
+ 'bpmn:ExclusiveGateway':{ //排他网关
45
+ 'url': require('../../../../assets/images/gateway.png'),//
46
+ 'attr': { x: 0, y: 0, width: 50, height: 50 }
47
+ },
48
+ 'bpmn:Group':{ //公共区域图标
49
+
50
+ }
51
+ };
52
+ const hasLabelElements = ['bpmn:StartEvent','bpmn:EndEvent','bpmn:DataStoreReference','bpmn:IntermediateCatchEvent','bpmn:ParallelGateway','bpmn:InclusiveGateway','bpmn:ExclusiveGateway','bpmn:BoundaryEvent']; // 一开始就有label标签的元素类型
53
+ export { customElements, customConfig, hasLabelElements }
@@ -0,0 +1,79 @@
1
+ <template>
2
+ <flow-inst-view :flow-id="flowId"
3
+ :loginUser="loginUser"
4
+ :saveFormInfo="saveFormInfo"
5
+ :initFormInfo="initFormInfo"
6
+ >
7
+ <div slot="formInfo">
8
+ <el-form :model="formData" size="small">
9
+ <el-row>
10
+ <template v-for="(item,index) in arr">
11
+ <el-col :span="12">
12
+ <el-form-item label="键" label-width="80px">
13
+ <el-input v-model="item.key"></el-input>
14
+ </el-form-item>
15
+ </el-col>
16
+ <el-col :span="12">
17
+ <el-form-item label="值" label-width="80px">
18
+ <el-input v-model="item.value"></el-input>
19
+ </el-form-item>
20
+ </el-col>
21
+ </template>
22
+ </el-row>
23
+ <el-button @click="arr.push({key:'',value:''})">添加</el-button>
24
+ </el-form>
25
+ </div>
26
+ </flow-inst-view>
27
+ </template>
28
+
29
+ <script>
30
+ import FlowInstView from "./flowInstView";
31
+ export default {
32
+ name: "test",
33
+ components: {FlowInstView},
34
+ data(){
35
+ return {
36
+ userId:this.$route.query.userCode,
37
+ userName:this.$route.query.userName,
38
+ loginUser:{id:'263a310920b64074a0fc916a99aa4d41',userName:'武玉峰'},
39
+ param:this.$route.query,
40
+ flowId:this.$route.query.flowId,
41
+ formData:{},
42
+ arr:[{key:'',value:''}],
43
+ }
44
+ },
45
+ created() {
46
+ if(this.userId){
47
+ this.loginUser.id = this.userId;
48
+ this.loginUser.userName = this.userName;
49
+ }
50
+ if(!this.flowId){
51
+ this.$message.error("请设置流程ID,否则流程无法正常运行!");
52
+ }
53
+ },
54
+ methods:{
55
+ initFormInfo(type,dataId,fieldOperate,flowInstId){
56
+ console.log(type);
57
+ console.log(dataId);
58
+ console.log("操作权限:");
59
+ console.log(fieldOperate);
60
+ console.log("操作权限end");
61
+ console.log(flowInstId);
62
+ },
63
+ saveFormInfo(){
64
+ let formData = {};
65
+ this.arr.forEach(item => {
66
+ if(item.key){
67
+ formData[item.key] = item.value || '';
68
+ }
69
+ })
70
+ console.log(formData);
71
+ return formData;
72
+ }
73
+ }
74
+ }
75
+ </script>
76
+
77
+ <style scoped>
78
+
79
+ </style>