Commit 7c52a88c authored by dragondean@qq.com's avatar dragondean@qq.com
parents 79999e6c 35583ecb
...@@ -19,7 +19,7 @@ if (process.env.npm_config_preview || rawArgv.includes('--preview')) { ...@@ -19,7 +19,7 @@ if (process.env.npm_config_preview || rawArgv.includes('--preview')) {
app.use( app.use(
publicPath, publicPath,
serveStatic('./dist', { serveStatic('./dist', {
index: ['index.html', '/'] index: ['', '/']
}) })
) )
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
"author": "捷道", "author": "捷道",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"local": "vue-cli-service serve --mode local",
"dev": "vue-cli-service serve", "dev": "vue-cli-service serve",
"build:dev": "vue-cli-service build --mode dev", "build:dev": "vue-cli-service build --mode dev",
"build:prod": "vue-cli-service build", "build:prod": "vue-cli-service build",
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
<el-button :size="headerButtonSize" icon="el-icon-refresh" @click="processRestart" /> <el-button :size="headerButtonSize" icon="el-icon-refresh" @click="processRestart" />
</el-tooltip> </el-tooltip>
</el-button-group> </el-button-group>
<el-button :size="headerButtonSize" :type="headerButtonType" icon="el-icon-plus" @click="processSave">保存模型</el-button> <el-button :size="headerButtonSize" :type="headerButtonType" icon="el-icon-plus" @click="processSave" :disabled = "simulationStatus">保存模型</el-button>
</template> </template>
<!-- 用于打开本地文件--> <!-- 用于打开本地文件-->
<input type="file" id="files" ref="refFile" style="display: none" accept=".xml, .bpmn" @change="importLocalFile" /> <input type="file" id="files" ref="refFile" style="display: none" accept=".xml, .bpmn" @change="importLocalFile" />
...@@ -118,6 +118,7 @@ export default { ...@@ -118,6 +118,7 @@ export default {
componentName: "MyProcessDesigner", componentName: "MyProcessDesigner",
props: { props: {
value: String, // xml 字符串 value: String, // xml 字符串
valueWatch: true, // xml 字符串的 watch 状态
processId: String, // 流程 key 标识 processId: String, // 流程 key 标识
processName: String, // 流程 name 名字 processName: String, // 流程 name 名字
formId: Number, // 流程 form 表单编号 formId: Number, // 流程 form 表单编号
...@@ -252,11 +253,6 @@ export default { ...@@ -252,11 +253,6 @@ export default {
this.bpmnModeler = null; this.bpmnModeler = null;
}); });
}, },
watch: {
value: function (newValue) { // 在 xmlString 发生变化时,重新创建,从而绘制流程图
this.createNewDiagram(newValue);
}
},
methods: { methods: {
initBpmnModeler() { initBpmnModeler() {
if (this.bpmnModeler) return; if (this.bpmnModeler) return;
...@@ -307,7 +303,7 @@ export default { ...@@ -307,7 +303,7 @@ export default {
let newName = this.processName || `业务流程_${new Date().getTime()}`; let newName = this.processName || `业务流程_${new Date().getTime()}`;
let xmlString = xml || DefaultEmptyXML(newId, newName, this.prefix); let xmlString = xml || DefaultEmptyXML(newId, newName, this.prefix);
try { try {
console.log(this.bpmnModeler.importXML); // console.log(this.bpmnModeler.importXML);
let { warnings } = await this.bpmnModeler.importXML(xmlString); let { warnings } = await this.bpmnModeler.importXML(xmlString);
if (warnings && warnings.length) { if (warnings && warnings.length) {
warnings.forEach(warn => console.warn(warn)); warnings.forEach(warn => console.warn(warn));
...@@ -459,7 +455,7 @@ export default { ...@@ -459,7 +455,7 @@ export default {
this.previewModelVisible = true; this.previewModelVisible = true;
}); });
}, },
/* ------------------------------------------------ 道源码 methods ------------------------------------------------------ */ /* ------------------------------------------------ 道源码 methods ------------------------------------------------------ */
async processSave() { async processSave() {
const { err, xml } = await this.bpmnModeler.saveXML(); const { err, xml } = await this.bpmnModeler.saveXML();
// 读取异常时抛出异常 // 读取异常时抛出异常
...@@ -478,8 +474,3 @@ export default { ...@@ -478,8 +474,3 @@ export default {
} }
}; };
</script> </script>
<style scoped>
.my-process-designer{
height: calc(100vh - 84px - 40px);
}
</style>
...@@ -90,15 +90,14 @@ export default { ...@@ -90,15 +90,14 @@ export default {
let xmlString = xml || DefaultEmptyXML(newId, newName, this.prefix); let xmlString = xml || DefaultEmptyXML(newId, newName, this.prefix);
try { try {
// console.log(this.bpmnModeler.importXML); // console.log(this.bpmnModeler.importXML);
let { warnings } = await this.bpmnModeler.importXML(xmlString) let { warnings } = await this.bpmnModeler.importXML(xmlString);
// 220906 增加一个缩放,自动适应尺寸
this.bpmnModeler.get('canvas').zoom('fit-viewport');
if (warnings && warnings.length) { if (warnings && warnings.length) {
warnings.forEach(warn => console.warn(warn)); warnings.forEach(warn => console.warn(warn));
} }
// 高亮流程图 // 高亮流程图
await this.highlightDiagram(); await this.highlightDiagram();
const canvas = this.bpmnModeler.get('canvas');
canvas.zoom("fit-viewport", "auto");
} catch (e) { } catch (e) {
console.error(e); console.error(e);
// console.error(`[Process Designer Warn]: ${e?.message || e}`); // console.error(`[Process Designer Warn]: ${e?.message || e}`);
...@@ -117,23 +116,25 @@ export default { ...@@ -117,23 +116,25 @@ export default {
let todoActivity = activityList.find(m => !m.endTime) // 找到待办的任务 let todoActivity = activityList.find(m => !m.endTime) // 找到待办的任务
let endActivity = activityList[activityList.length - 1] // 获得最后一个任务 let endActivity = activityList[activityList.length - 1] // 获得最后一个任务
// debugger // debugger
console.log(this.bpmnModeler.getDefinitions().rootElements[0].flowElements); // console.log(this.bpmnModeler.getDefinitions().rootElements[0].flowElements);
this.bpmnModeler.getDefinitions().rootElements[0].flowElements?.forEach(n => { this.bpmnModeler.getDefinitions().rootElements[0].flowElements?.forEach(n => {
let activity = activityList.find(m => m.key === n.id) // 找到对应的活动 let activity = activityList.find(m => m.key === n.id) // 找到对应的活动
if (n.$type === 'bpmn:UserTask') { // 用户任务
if (!activity) { if (!activity) {
return; return;
} }
if (n.$type === 'bpmn:UserTask') { // 用户任务
// 处理用户任务的高亮 // 处理用户任务的高亮
const task = this.taskList.find(m => m.id === activity.taskId); // 找到活动对应的 taskId const task = this.taskList.find(m => m.id === activity.taskId); // 找到活动对应的 taskId
if (task) { if (!task) {
return;
}
// 高亮任务
canvas.addMarker(n.id, this.getResultCss(task.result)); canvas.addMarker(n.id, this.getResultCss(task.result));
// 如果非通过,就不走后面的线条了 // 如果非通过,就不走后面的线条了
if (task.result !== 2) { if (task.result !== 2) {
return; return;
} }
}
// 处理 outgoing 出线 // 处理 outgoing 出线
const outgoing = this.getActivityOutgoing(activity); const outgoing = this.getActivityOutgoing(activity);
outgoing?.forEach(nn => { outgoing?.forEach(nn => {
...@@ -157,9 +158,6 @@ export default { ...@@ -157,9 +158,6 @@ export default {
} }
}); });
} else if (n.$type === 'bpmn:ExclusiveGateway') { // 排它网关 } else if (n.$type === 'bpmn:ExclusiveGateway') { // 排它网关
if (!activity) {
return
}
// 设置【bpmn:ExclusiveGateway】排它网关的高亮 // 设置【bpmn:ExclusiveGateway】排它网关的高亮
canvas.addMarker(n.id, this.getActivityHighlightCss(activity)); canvas.addMarker(n.id, this.getActivityHighlightCss(activity));
// 查找需要高亮的连线 // 查找需要高亮的连线
...@@ -184,9 +182,6 @@ export default { ...@@ -184,9 +182,6 @@ export default {
canvas.addMarker(matchNN.id, this.getActivityHighlightCss(matchActivity)); canvas.addMarker(matchNN.id, this.getActivityHighlightCss(matchActivity));
} }
} else if (n.$type === 'bpmn:ParallelGateway') { // 并行网关 } else if (n.$type === 'bpmn:ParallelGateway') { // 并行网关
if (!activity) {
return
}
// 设置【bpmn:ParallelGateway】并行网关的高亮 // 设置【bpmn:ParallelGateway】并行网关的高亮
canvas.addMarker(n.id, this.getActivityHighlightCss(activity)); canvas.addMarker(n.id, this.getActivityHighlightCss(activity));
n.outgoing?.forEach(nn => { n.outgoing?.forEach(nn => {
...@@ -212,6 +207,17 @@ export default { ...@@ -212,6 +207,17 @@ export default {
return; return;
} }
canvas.addMarker(n.id, this.getResultCss(this.processInstance.result)); canvas.addMarker(n.id, this.getResultCss(this.processInstance.result));
} else if (n.$type === 'bpmn:ServiceTask'){ //服务任务
if(activity.startTime>0 && activity.endTime===0){//进入执行,标识进行色
canvas.addMarker(n.id, this.getResultCss(1));
}
if(activity.endTime>0){// 执行完成,节点标识完成色, 所有outgoing标识完成色。
canvas.addMarker(n.id, this.getResultCss(2));
const outgoing = this.getActivityOutgoing(activity)
outgoing?.forEach(out=>{
canvas.addMarker(out.id,this.getResultCss(2))
})
}
} }
}) })
}, },
...@@ -219,13 +225,13 @@ export default { ...@@ -219,13 +225,13 @@ export default {
return activity.endTime ? 'highlight' : 'highlight-todo'; return activity.endTime ? 'highlight' : 'highlight-todo';
}, },
getResultCss(result) { getResultCss(result) {
if (result === 1) { if (result === 1) { // 审批中
return 'highlight-todo'; return 'highlight-todo';
} else if (result === 2) { } else if (result === 2) { // 已通过
return 'highlight'; return 'highlight';
} else if (result === 3) { } else if (result === 3) { // 不通过
return 'highlight-reject'; return 'highlight-reject';
} else if (result === 4) { } else if (result === 4) { // 已取消
return 'highlight-cancel'; return 'highlight-cancel';
} }
return ''; return '';
...@@ -267,6 +273,10 @@ export default { ...@@ -267,6 +273,10 @@ export default {
!this.elementOverlayIds && (this.elementOverlayIds = {}); !this.elementOverlayIds && (this.elementOverlayIds = {});
!this.overlays && (this.overlays = this.bpmnModeler.get("overlays")); !this.overlays && (this.overlays = this.bpmnModeler.get("overlays"));
// 展示信息 // 展示信息
const activity = this.activityList.find(m => m.key === element.id);
if (!activity) {
return;
}
if (!this.elementOverlayIds[element.id] && element.type !== "bpmn:Process") { if (!this.elementOverlayIds[element.id] && element.type !== "bpmn:Process") {
let html = `<div class="element-overlays"> let html = `<div class="element-overlays">
<p>Elemet id: ${element.id}</p> <p>Elemet id: ${element.id}</p>
...@@ -278,10 +288,6 @@ export default { ...@@ -278,10 +288,6 @@ export default {
<p>创建时间:${this.parseTime(this.processInstance.createTime)}`; <p>创建时间:${this.parseTime(this.processInstance.createTime)}`;
} else if (element.type === 'bpmn:UserTask') { } else if (element.type === 'bpmn:UserTask') {
// debugger // debugger
const activity = this.activityList.find(m => m.key === element.id);
if (!activity) {
return;
}
let task = this.taskList.find(m => m.id === activity.taskId); // 找到活动对应的 taskId let task = this.taskList.find(m => m.id === activity.taskId); // 找到活动对应的 taskId
if (!task) { if (!task) {
return; return;
...@@ -293,9 +299,17 @@ export default { ...@@ -293,9 +299,17 @@ export default {
if (task.endTime) { if (task.endTime) {
html += `<p>结束时间:${this.parseTime(task.endTime)}</p>` html += `<p>结束时间:${this.parseTime(task.endTime)}</p>`
} }
if (task.comment) { if (task.reason) {
html += `<p>审批建议:${task.comment}</p>` html += `<p>审批建议:${task.reason}</p>`
} }
} else if (element.type === 'bpmn:ServiceTask' && this.processInstance) {
if(activity.startTime>0){
html = `<p>创建时间:${this.parseTime(activity.startTime)}</p>`;
}
if(activity.endTime>0){
html += `<p>结束时间:${this.parseTime(activity.endTime)}</p>`
}
console.log(html)
} else if (element.type === 'bpmn:EndEvent' && this.processInstance) { } else if (element.type === 'bpmn:EndEvent' && this.processInstance) {
html = `<p>结果:${this.getDictDataLabel(this.DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT, this.processInstance.result)}</p>`; html = `<p>结果:${this.getDictDataLabel(this.DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT, this.processInstance.result)}</p>`;
if (this.processInstance.endTime) { if (this.processInstance.endTime) {
...@@ -317,7 +331,8 @@ export default { ...@@ -317,7 +331,8 @@ export default {
}; };
</script> </script>
<style scoped> <style>
/** 处理中 */ /** 处理中 */
.highlight-todo.djs-connection > .djs-visual > path { .highlight-todo.djs-connection > .djs-visual > path {
stroke: #1890ff !important; stroke: #1890ff !important;
...@@ -331,13 +346,13 @@ export default { ...@@ -331,13 +346,13 @@ export default {
fill-opacity: 0.2 !important; fill-opacity: 0.2 !important;
} }
/deep/.highlight-todo.djs-connection > .djs-visual > path { :deep(.highlight-todo.djs-connection > .djs-visual > path) {
stroke: #1890ff !important; stroke: #1890ff !important;
stroke-dasharray: 4px !important; stroke-dasharray: 4px !important;
fill-opacity: 0.2 !important; fill-opacity: 0.2 !important;
marker-end: url(#sequenceflow-end-_E7DFDF-_E7DFDF-803g1kf6zwzmcig1y2ulm5egr); marker-end: url(#sequenceflow-end-_E7DFDF-_E7DFDF-803g1kf6zwzmcig1y2ulm5egr);
} }
/deep/.highlight-todo.djs-shape .djs-visual > :nth-child(1) { :deep(.highlight-todo.djs-shape .djs-visual > :nth-child(1)) {
fill: #1890ff !important; fill: #1890ff !important;
stroke: #1890ff !important; stroke: #1890ff !important;
stroke-dasharray: 4px !important; stroke-dasharray: 4px !important;
...@@ -366,20 +381,20 @@ export default { ...@@ -366,20 +381,20 @@ export default {
fill: green !important; /* color elements as green */ fill: green !important; /* color elements as green */
} }
/deep/.highlight.djs-shape .djs-visual > :nth-child(1) { :deep(.highlight.djs-shape .djs-visual > :nth-child(1)) {
fill: green !important; fill: green !important;
stroke: green !important; stroke: green !important;
fill-opacity: 0.2 !important; fill-opacity: 0.2 !important;
} }
/deep/.highlight.djs-shape .djs-visual > :nth-child(2) { :deep(.highlight.djs-shape .djs-visual > :nth-child(2)) {
fill: green !important; fill: green !important;
} }
/deep/.highlight.djs-shape .djs-visual > path { :deep(.highlight.djs-shape .djs-visual > path) {
fill: green !important; fill: green !important;
fill-opacity: 0.2 !important; fill-opacity: 0.2 !important;
stroke: green !important; stroke: green !important;
} }
/deep/.highlight.djs-connection > .djs-visual > path { :deep(.highlight.djs-connection > .djs-visual > path) {
stroke: green !important; stroke: green !important;
} }
...@@ -405,20 +420,20 @@ export default { ...@@ -405,20 +420,20 @@ export default {
fill: red !important; /* color elements as green */ fill: red !important; /* color elements as green */
} }
/deep/.highlight-reject.djs-shape .djs-visual > :nth-child(1) { :deep(.highlight-reject.djs-shape .djs-visual > :nth-child(1)) {
fill: red !important; fill: red !important;
stroke: red !important; stroke: red !important;
fill-opacity: 0.2 !important; fill-opacity: 0.2 !important;
} }
/deep/.highlight-reject.djs-shape .djs-visual > :nth-child(2) { :deep(.highlight-reject.djs-shape .djs-visual > :nth-child(2)) {
fill: red !important; fill: red !important;
} }
/deep/.highlight-reject.djs-shape .djs-visual > path { :deep(.highlight-reject.djs-shape .djs-visual > path) {
fill: red !important; fill: red !important;
fill-opacity: 0.2 !important; fill-opacity: 0.2 !important;
stroke: red !important; stroke: red !important;
} }
/deep/.highlight-reject.djs-connection > .djs-visual > path { :deep(.highlight-reject.djs-connection > .djs-visual > path) {
stroke: red !important; stroke: red !important;
} }
...@@ -444,20 +459,20 @@ export default { ...@@ -444,20 +459,20 @@ export default {
fill: grey !important; /* color elements as green */ fill: grey !important; /* color elements as green */
} }
/deep/.highlight-cancel.djs-shape .djs-visual > :nth-child(1) { :deep(.highlight-cancel.djs-shape .djs-visual > :nth-child(1)) {
fill: grey !important; fill: grey !important;
stroke: grey !important; stroke: grey !important;
fill-opacity: 0.2 !important; fill-opacity: 0.2 !important;
} }
/deep/.highlight-cancel.djs-shape .djs-visual > :nth-child(2) { :deep(.highlight-cancel.djs-shape .djs-visual > :nth-child(2)) {
fill: grey !important; fill: grey !important;
} }
/deep/.highlight-cancel.djs-shape .djs-visual > path { :deep(.highlight-cancel.djs-shape .djs-visual > path) {
fill: grey !important; fill: grey !important;
fill-opacity: 0.2 !important; fill-opacity: 0.2 !important;
stroke: grey !important; stroke: grey !important;
} }
/deep/.highlight-cancel.djs-connection > .djs-visual > path { :deep(.highlight-cancel.djs-connection > .djs-visual > path) {
stroke: grey !important; stroke: grey !important;
} }
......
...@@ -49,14 +49,14 @@ export default function ContextPadProvider( ...@@ -49,14 +49,14 @@ export default function ContextPadProvider(
} }
eventBus.on("create.end", 250, function(event) { eventBus.on("create.end", 250, function(event) {
var context = event.context, const context = event.context,
shape = context.shape; shape = context.shape
if (!hasPrimaryModifier(event) || !contextPad.isOpen(shape)) { if (!hasPrimaryModifier(event) || !contextPad.isOpen(shape)) {
return; return;
} }
var entries = contextPad.getEntries(shape); const entries = contextPad.getEntries(shape)
if (entries.replace) { if (entries.replace) {
entries.replace.action.click(event, shape); entries.replace.action.click(event, shape);
...@@ -81,7 +81,7 @@ ContextPadProvider.$inject = [ ...@@ -81,7 +81,7 @@ ContextPadProvider.$inject = [
]; ];
ContextPadProvider.prototype.getContextPadEntries = function(element) { ContextPadProvider.prototype.getContextPadEntries = function(element) {
var contextPad = this._contextPad, const contextPad = this._contextPad,
modeling = this._modeling, modeling = this._modeling,
elementFactory = this._elementFactory, elementFactory = this._elementFactory,
connect = this._connect, connect = this._connect,
...@@ -90,15 +90,15 @@ ContextPadProvider.prototype.getContextPadEntries = function(element) { ...@@ -90,15 +90,15 @@ ContextPadProvider.prototype.getContextPadEntries = function(element) {
canvas = this._canvas, canvas = this._canvas,
rules = this._rules, rules = this._rules,
autoPlace = this._autoPlace, autoPlace = this._autoPlace,
translate = this._translate; translate = this._translate
var actions = {}; const actions = {}
if (element.type === "label") { if (element.type === "label") {
return actions; return actions;
} }
var businessObject = element.businessObject; const businessObject = element.businessObject
function startConnect(event, element) { function startConnect(event, element) {
connect.start(event, element); connect.start(event, element);
...@@ -109,21 +109,21 @@ ContextPadProvider.prototype.getContextPadEntries = function(element) { ...@@ -109,21 +109,21 @@ ContextPadProvider.prototype.getContextPadEntries = function(element) {
} }
function getReplaceMenuPosition(element) { function getReplaceMenuPosition(element) {
var Y_OFFSET = 5; const Y_OFFSET = 5
var diagramContainer = canvas.getContainer(), const diagramContainer = canvas.getContainer(),
pad = contextPad.getPad(element).html; pad = contextPad.getPad(element).html
var diagramRect = diagramContainer.getBoundingClientRect(), const diagramRect = diagramContainer.getBoundingClientRect(),
padRect = pad.getBoundingClientRect(); padRect = pad.getBoundingClientRect()
var top = padRect.top - diagramRect.top; const top = padRect.top - diagramRect.top
var left = padRect.left - diagramRect.left; const left = padRect.left - diagramRect.left
var pos = { const pos = {
x: left, x: left,
y: top + padRect.height + Y_OFFSET y: top + padRect.height + Y_OFFSET
}; }
return pos; return pos;
} }
...@@ -145,19 +145,19 @@ ContextPadProvider.prototype.getContextPadEntries = function(element) { ...@@ -145,19 +145,19 @@ ContextPadProvider.prototype.getContextPadEntries = function(element) {
} }
function appendStart(event, element) { function appendStart(event, element) {
var shape = elementFactory.createShape(assign({ type: type }, options)); const shape = elementFactory.createShape(assign({ type: type }, options))
create.start(event, shape, { create.start(event, shape, {
source: element source: element
}); });
} }
var append = autoPlace const append = autoPlace
? function(event, element) { ? function(event, element) {
var shape = elementFactory.createShape(assign({ type: type }, options)); const shape = elementFactory.createShape(assign({ type: type }, options))
autoPlace.append(element, shape); autoPlace.append(element, shape)
} }
: appendStart; : appendStart
return { return {
group: "model", group: "model",
...@@ -182,7 +182,7 @@ ContextPadProvider.prototype.getContextPadEntries = function(element) { ...@@ -182,7 +182,7 @@ ContextPadProvider.prototype.getContextPadEntries = function(element) {
} }
if (isAny(businessObject, ["bpmn:Lane", "bpmn:Participant"]) && isExpanded(businessObject)) { if (isAny(businessObject, ["bpmn:Lane", "bpmn:Participant"]) && isExpanded(businessObject)) {
var childLanes = getChildLanes(element); const childLanes = getChildLanes(element)
assign(actions, { assign(actions, {
"lane-insert-above": { "lane-insert-above": {
...@@ -302,9 +302,9 @@ ContextPadProvider.prototype.getContextPadEntries = function(element) { ...@@ -302,9 +302,9 @@ ContextPadProvider.prototype.getContextPadEntries = function(element) {
title: translate("Change type"), title: translate("Change type"),
action: { action: {
click: function(event, element) { click: function(event, element) {
var position = assign(getReplaceMenuPosition(element), { const position = assign(getReplaceMenuPosition(element), {
cursor: { x: event.x, y: event.y } cursor: { x: event.x, y: event.y }
}); })
popupMenu.open(element, "bpmn-replace", position); popupMenu.open(element, "bpmn-replace", position);
} }
...@@ -350,7 +350,7 @@ ContextPadProvider.prototype.getContextPadEntries = function(element) { ...@@ -350,7 +350,7 @@ ContextPadProvider.prototype.getContextPadEntries = function(element) {
} }
// delete element entry, only show if allowed by rules // delete element entry, only show if allowed by rules
var deleteAllowed = rules.allowed("elements.delete", { elements: [element] }); let deleteAllowed = rules.allowed('elements.delete', { elements: [element] })
if (isArray(deleteAllowed)) { if (isArray(deleteAllowed)) {
// was the element returned as a deletion candidate? // was the element returned as a deletion candidate?
...@@ -376,10 +376,10 @@ ContextPadProvider.prototype.getContextPadEntries = function(element) { ...@@ -376,10 +376,10 @@ ContextPadProvider.prototype.getContextPadEntries = function(element) {
// helpers ///////// // helpers /////////
function isEventType(eventBo, type, definition) { function isEventType(eventBo, type, definition) {
var isType = eventBo.$instanceOf(type); const isType = eventBo.$instanceOf(type)
var isDefinition = false; let isDefinition = false
var definitions = eventBo.eventDefinitions || []; const definitions = eventBo.eventDefinitions || []
forEach(definitions, function(def) { forEach(definitions, function(def) {
if (def.$type === definition) { if (def.$type === definition) {
isDefinition = true; isDefinition = true;
......
"use strict"; "use strict";
var some = require("min-dash").some; const some = require('min-dash').some
var ALLOWED_TYPES = { const ALLOWED_TYPES = {
FailedJobRetryTimeCycle: ["bpmn:StartEvent", "bpmn:BoundaryEvent", "bpmn:IntermediateCatchEvent", "bpmn:Activity"], FailedJobRetryTimeCycle: ['bpmn:StartEvent', 'bpmn:BoundaryEvent', 'bpmn:IntermediateCatchEvent', 'bpmn:Activity'],
Connector: ["bpmn:EndEvent", "bpmn:IntermediateThrowEvent"], Connector: ['bpmn:EndEvent', 'bpmn:IntermediateThrowEvent'],
Field: ["bpmn:EndEvent", "bpmn:IntermediateThrowEvent"] Field: ['bpmn:EndEvent', 'bpmn:IntermediateThrowEvent']
}; }
function is(element, type) { function is(element, type) {
return element && typeof element.$instanceOf === "function" && element.$instanceOf(type); return element && typeof element.$instanceOf === "function" && element.$instanceOf(type);
...@@ -32,8 +32,8 @@ function anyType(element, types) { ...@@ -32,8 +32,8 @@ function anyType(element, types) {
} }
function isAllowed(propName, propDescriptor, newElement) { function isAllowed(propName, propDescriptor, newElement) {
var name = propDescriptor.name, const name = propDescriptor.name,
types = ALLOWED_TYPES[name.replace(/activiti:/, "")]; types = ALLOWED_TYPES[name.replace(/activiti:/, '')]
return name === propName && anyType(newElement, types); return name === propName && anyType(newElement, types);
} }
...@@ -42,8 +42,8 @@ function ActivitiModdleExtension(eventBus) { ...@@ -42,8 +42,8 @@ function ActivitiModdleExtension(eventBus) {
eventBus.on( eventBus.on(
"property.clone", "property.clone",
function(context) { function(context) {
var newElement = context.newElement, const newElement = context.newElement,
propDescriptor = context.propertyDescriptor; propDescriptor = context.propertyDescriptor
this.canCloneProperty(newElement, propDescriptor); this.canCloneProperty(newElement, propDescriptor);
}, },
......
"use strict"; "use strict";
var isFunction = require("min-dash").isFunction, const isFunction = require('min-dash').isFunction,
isObject = require("min-dash").isObject, isObject = require('min-dash').isObject,
some = require("min-dash").some; some = require('min-dash').some
var WILDCARD = "*"; const WILDCARD = '*'
function CamundaModdleExtension(eventBus) { function CamundaModdleExtension(eventBus) {
var self = this; const self = this
eventBus.on("moddleCopy.canCopyProperty", function(context) { eventBus.on("moddleCopy.canCopyProperty", function(context) {
var property = context.property, const property = context.property,
parent = context.parent; parent = context.parent
return self.canCopyProperty(property, parent); return self.canCopyProperty(property, parent);
}); });
...@@ -45,14 +45,14 @@ CamundaModdleExtension.prototype.canCopyProperty = function(property, parent) { ...@@ -45,14 +45,14 @@ CamundaModdleExtension.prototype.canCopyProperty = function(property, parent) {
CamundaModdleExtension.prototype.canHostInputOutput = function(parent) { CamundaModdleExtension.prototype.canHostInputOutput = function(parent) {
// allowed in camunda:Connector // allowed in camunda:Connector
var connector = getParent(parent, "camunda:Connector"); const connector = getParent(parent, 'camunda:Connector')
if (connector) { if (connector) {
return true; return true;
} }
// special rules inside bpmn:FlowNode // special rules inside bpmn:FlowNode
var flowNode = getParent(parent, "bpmn:FlowNode"); const flowNode = getParent(parent, 'bpmn:FlowNode')
if (!flowNode) { if (!flowNode) {
return false; return false;
...@@ -62,15 +62,13 @@ CamundaModdleExtension.prototype.canHostInputOutput = function(parent) { ...@@ -62,15 +62,13 @@ CamundaModdleExtension.prototype.canHostInputOutput = function(parent) {
return false; return false;
} }
if (is(flowNode, "bpmn:SubProcess") && flowNode.get("triggeredByEvent")) { return !(is(flowNode, "bpmn:SubProcess") && flowNode.get("triggeredByEvent"));
return false;
}
return true;
}; };
CamundaModdleExtension.prototype.canHostConnector = function(parent) { CamundaModdleExtension.prototype.canHostConnector = function(parent) {
var serviceTaskLike = getParent(parent, "camunda:ServiceTaskLike"); const serviceTaskLike = getParent(parent, 'camunda:ServiceTaskLike')
if (is(serviceTaskLike, "bpmn:MessageEventDefinition")) { if (is(serviceTaskLike, "bpmn:MessageEventDefinition")) {
// only allow on throw and end events // only allow on throw and end events
...@@ -81,13 +79,13 @@ CamundaModdleExtension.prototype.canHostConnector = function(parent) { ...@@ -81,13 +79,13 @@ CamundaModdleExtension.prototype.canHostConnector = function(parent) {
}; };
CamundaModdleExtension.prototype.canHostIn = function(parent) { CamundaModdleExtension.prototype.canHostIn = function(parent) {
var callActivity = getParent(parent, "bpmn:CallActivity"); const callActivity = getParent(parent, 'bpmn:CallActivity')
if (callActivity) { if (callActivity) {
return true; return true;
} }
var signalEventDefinition = getParent(parent, "bpmn:SignalEventDefinition"); const signalEventDefinition = getParent(parent, 'bpmn:SignalEventDefinition')
if (signalEventDefinition) { if (signalEventDefinition) {
// only allow on throw and end events // only allow on throw and end events
...@@ -129,9 +127,9 @@ function getParent(element, type) { ...@@ -129,9 +127,9 @@ function getParent(element, type) {
function isAllowedInParent(property, parent) { function isAllowedInParent(property, parent) {
// (1) find property descriptor // (1) find property descriptor
var descriptor = property.$type && property.$model.getTypeDescriptor(property.$type); const descriptor = property.$type && property.$model.getTypeDescriptor(property.$type)
var allowedIn = descriptor && descriptor.meta && descriptor.meta.allowedIn; const allowedIn = descriptor && descriptor.meta && descriptor.meta.allowedIn
if (!allowedIn || isWildcard(allowedIn)) { if (!allowedIn || isWildcard(allowedIn)) {
return true; return true;
......
"use strict"; "use strict";
var some = require("min-dash").some; const some = require('min-dash').some
var ALLOWED_TYPES = { const ALLOWED_TYPES = {
FailedJobRetryTimeCycle: ["bpmn:StartEvent", "bpmn:BoundaryEvent", "bpmn:IntermediateCatchEvent", "bpmn:Activity"], FailedJobRetryTimeCycle: ['bpmn:StartEvent', 'bpmn:BoundaryEvent', 'bpmn:IntermediateCatchEvent', 'bpmn:Activity'],
Connector: ["bpmn:EndEvent", "bpmn:IntermediateThrowEvent"], Connector: ['bpmn:EndEvent', 'bpmn:IntermediateThrowEvent'],
Field: ["bpmn:EndEvent", "bpmn:IntermediateThrowEvent"] Field: ['bpmn:EndEvent', 'bpmn:IntermediateThrowEvent']
}; }
function is(element, type) { function is(element, type) {
return element && typeof element.$instanceOf === "function" && element.$instanceOf(type); return element && typeof element.$instanceOf === "function" && element.$instanceOf(type);
...@@ -32,8 +32,8 @@ function anyType(element, types) { ...@@ -32,8 +32,8 @@ function anyType(element, types) {
} }
function isAllowed(propName, propDescriptor, newElement) { function isAllowed(propName, propDescriptor, newElement) {
var name = propDescriptor.name, const name = propDescriptor.name,
types = ALLOWED_TYPES[name.replace(/flowable:/, "")]; types = ALLOWED_TYPES[name.replace(/flowable:/, '')]
return name === propName && anyType(newElement, types); return name === propName && anyType(newElement, types);
} }
...@@ -42,8 +42,8 @@ function FlowableModdleExtension(eventBus) { ...@@ -42,8 +42,8 @@ function FlowableModdleExtension(eventBus) {
eventBus.on( eventBus.on(
"property.clone", "property.clone",
function(context) { function(context) {
var newElement = context.newElement, const newElement = context.newElement,
propDescriptor = context.propertyDescriptor; propDescriptor = context.propertyDescriptor
this.canCloneProperty(newElement, propDescriptor); this.canCloneProperty(newElement, propDescriptor);
}, },
......
...@@ -10,18 +10,18 @@ F.prototype = PaletteProvider.prototype; // 核心,将父类的原型赋值给 ...@@ -10,18 +10,18 @@ F.prototype = PaletteProvider.prototype; // 核心,将父类的原型赋值给
// 利用中介函数重写原型链方法 // 利用中介函数重写原型链方法
F.prototype.getPaletteEntries = function() { F.prototype.getPaletteEntries = function() {
var actions = {}, const actions = {},
create = this._create, create = this._create,
elementFactory = this._elementFactory, elementFactory = this._elementFactory,
spaceTool = this._spaceTool, spaceTool = this._spaceTool,
lassoTool = this._lassoTool, lassoTool = this._lassoTool,
handTool = this._handTool, handTool = this._handTool,
globalConnect = this._globalConnect, globalConnect = this._globalConnect,
translate = this._translate; translate = this._translate
function createAction(type, group, className, title, options) { function createAction(type, group, className, title, options) {
function createListener(event) { function createListener(event) {
var shape = elementFactory.createShape(assign({ type: type }, options)); const shape = elementFactory.createShape(assign({ type: type }, options))
if (options) { if (options) {
shape.businessObject.di.isExpanded = options.isExpanded; shape.businessObject.di.isExpanded = options.isExpanded;
...@@ -30,7 +30,7 @@ F.prototype.getPaletteEntries = function() { ...@@ -30,7 +30,7 @@ F.prototype.getPaletteEntries = function() {
create.start(event, shape); create.start(event, shape);
} }
var shortType = type.replace(/^bpmn:/, ""); const shortType = type.replace(/^bpmn:/, '')
return { return {
group: group, group: group,
...@@ -44,19 +44,19 @@ F.prototype.getPaletteEntries = function() { ...@@ -44,19 +44,19 @@ F.prototype.getPaletteEntries = function() {
} }
function createSubprocess(event) { function createSubprocess(event) {
var subProcess = elementFactory.createShape({ const subProcess = elementFactory.createShape({
type: "bpmn:SubProcess", type: 'bpmn:SubProcess',
x: 0, x: 0,
y: 0, y: 0,
isExpanded: true isExpanded: true
}); })
var startEvent = elementFactory.createShape({ const startEvent = elementFactory.createShape({
type: "bpmn:StartEvent", type: 'bpmn:StartEvent',
x: 40, x: 40,
y: 82, y: 82,
parent: subProcess parent: subProcess
}); })
create.start(event, [subProcess, startEvent], { create.start(event, [subProcess, startEvent], {
hints: { hints: {
......
...@@ -19,18 +19,18 @@ export default function PaletteProvider(palette, create, elementFactory, spaceTo ...@@ -19,18 +19,18 @@ export default function PaletteProvider(palette, create, elementFactory, spaceTo
PaletteProvider.$inject = ["palette", "create", "elementFactory", "spaceTool", "lassoTool", "handTool", "globalConnect", "translate"]; PaletteProvider.$inject = ["palette", "create", "elementFactory", "spaceTool", "lassoTool", "handTool", "globalConnect", "translate"];
PaletteProvider.prototype.getPaletteEntries = function() { PaletteProvider.prototype.getPaletteEntries = function() {
var actions = {}, const actions = {},
create = this._create, create = this._create,
elementFactory = this._elementFactory, elementFactory = this._elementFactory,
spaceTool = this._spaceTool, spaceTool = this._spaceTool,
lassoTool = this._lassoTool, lassoTool = this._lassoTool,
handTool = this._handTool, handTool = this._handTool,
globalConnect = this._globalConnect, globalConnect = this._globalConnect,
translate = this._translate; translate = this._translate
function createAction(type, group, className, title, options) { function createAction(type, group, className, title, options) {
function createListener(event) { function createListener(event) {
var shape = elementFactory.createShape(assign({ type: type }, options)); const shape = elementFactory.createShape(assign({ type: type }, options))
if (options) { if (options) {
shape.businessObject.di.isExpanded = options.isExpanded; shape.businessObject.di.isExpanded = options.isExpanded;
...@@ -39,7 +39,7 @@ PaletteProvider.prototype.getPaletteEntries = function() { ...@@ -39,7 +39,7 @@ PaletteProvider.prototype.getPaletteEntries = function() {
create.start(event, shape); create.start(event, shape);
} }
var shortType = type.replace(/^bpmn:/, ""); const shortType = type.replace(/^bpmn:/, '')
return { return {
group: group, group: group,
...@@ -53,19 +53,19 @@ PaletteProvider.prototype.getPaletteEntries = function() { ...@@ -53,19 +53,19 @@ PaletteProvider.prototype.getPaletteEntries = function() {
} }
function createSubprocess(event) { function createSubprocess(event) {
var subProcess = elementFactory.createShape({ const subProcess = elementFactory.createShape({
type: "bpmn:SubProcess", type: 'bpmn:SubProcess',
x: 0, x: 0,
y: 0, y: 0,
isExpanded: true isExpanded: true
}); })
var startEvent = elementFactory.createShape({ const startEvent = elementFactory.createShape({
type: "bpmn:StartEvent", type: 'bpmn:StartEvent',
x: 40, x: 40,
y: 82, y: 82,
parent: subProcess parent: subProcess
}); })
create.start(event, [subProcess, startEvent], { create.start(event, [subProcess, startEvent], {
hints: { hints: {
......
...@@ -163,7 +163,6 @@ export default { ...@@ -163,7 +163,6 @@ export default {
// 初始化数据 // 初始化数据
initFormOnChanged(element) { initFormOnChanged(element) {
let activatedElement = element; let activatedElement = element;
// debugger
if (!activatedElement) { if (!activatedElement) {
activatedElement = activatedElement =
window.bpmnInstances.elementRegistry.find(el => el.type === "bpmn:Process") ?? window.bpmnInstances.elementRegistry.find(el => el.type === "bpmn:Process") ??
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<div class="panel-tab__content"> <div class="panel-tab__content">
<el-form size="mini" label-width="90px" :model="model" :rules="rules" @submit.native.prevent> <el-form size="mini" label-width="90px" :model="model" :rules="rules" @submit.native.prevent>
<div v-if="elementBaseInfo.$type === 'bpmn:Process'"> <!-- 如果是 Process 信息的时候,使用自定义表单 --> <div v-if="elementBaseInfo.$type === 'bpmn:Process'"> <!-- 如果是 Process 信息的时候,使用自定义表单 -->
<el-form-item label="流程标识" prop="key"> <el-form-item label="流程标识" prop="key">
<el-input v-model="model.key" placeholder="请输入流标标识" <el-input v-model="model.key" placeholder="请输入流标标识"
:disabled="model.id !== undefined && model.id.length > 0" @change="handleKeyUpdate" /> :disabled="model.id !== undefined && model.id.length > 0" @change="handleKeyUpdate" />
...@@ -66,6 +67,7 @@ export default { ...@@ -66,6 +67,7 @@ export default {
}, },
methods: { methods: {
resetBaseInfo() { resetBaseInfo() {
debugger;
this.bpmnElement = window?.bpmnInstances?.bpmnElement; this.bpmnElement = window?.bpmnInstances?.bpmnElement;
this.elementBaseInfo = JSON.parse(JSON.stringify(this.bpmnElement.businessObject)); this.elementBaseInfo = JSON.parse(JSON.stringify(this.bpmnElement.businessObject));
}, },
...@@ -74,7 +76,7 @@ export default { ...@@ -74,7 +76,7 @@ export default {
if (!value) { if (!value) {
return; return;
} }
if (!value.match(/[a-zA-Z_][\-_.0-9_a-zA-Z$]*/)) { if (!value.match(/[a-zA-Z_][\-_.0-9a-zA-Z$]*/)) {
console.log('key 不满足 XML NCName 规则,所以不进行赋值'); console.log('key 不满足 XML NCName 规则,所以不进行赋值');
return; return;
} }
...@@ -101,6 +103,7 @@ export default { ...@@ -101,6 +103,7 @@ export default {
const attrObj = Object.create(null); const attrObj = Object.create(null);
attrObj[key] = this.elementBaseInfo[key]; attrObj[key] = this.elementBaseInfo[key];
if (key === "id") { if (key === "id") {
debugger;
window.bpmnInstances.modeling.updateProperties(this.bpmnElement, { window.bpmnInstances.modeling.updateProperties(this.bpmnElement, {
id: this.elementBaseInfo[key], id: this.elementBaseInfo[key],
di: { id: `${this.elementBaseInfo[key]}_di` } di: { id: `${this.elementBaseInfo[key]}_di` }
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="表达式" v-if="flowConditionForm.conditionType && flowConditionForm.conditionType === 'expression'" key="express"> <el-form-item label="表达式" v-if="flowConditionForm.conditionType && flowConditionForm.conditionType === 'expression'" key="express">
<el-input v-model="flowConditionForm.body" clearable @change="updateFlowCondition" /> <el-input v-model="flowConditionForm.body" style="width:192px;" clearable @change="updateFlowCondition" />
</el-form-item> </el-form-item>
<template v-if="flowConditionForm.conditionType && flowConditionForm.conditionType === 'script'"> <template v-if="flowConditionForm.conditionType && flowConditionForm.conditionType === 'script'">
<el-form-item label="脚本语言" key="language"> <el-form-item label="脚本语言" key="language">
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<el-form-item label="循环基数" key="loopCardinality"> <el-form-item label="循环基数" key="loopCardinality">
<el-input v-model="loopInstanceForm.loopCardinality" clearable @change="updateLoopCardinality" /> <el-input v-model="loopInstanceForm.loopCardinality" clearable @change="updateLoopCardinality" />
</el-form-item> </el-form-item>
<el-form-item label="集合" key="collection"> <el-form-item label="集合" key="collection" v-show="false">
<el-input v-model="loopInstanceForm.collection" clearable @change="updateLoopBase" /> <el-input v-model="loopInstanceForm.collection" clearable @change="updateLoopBase" />
</el-form-item> </el-form-item>
<el-form-item label="元素变量" key="elementVariable"> <el-form-item label="元素变量" key="elementVariable">
...@@ -131,7 +131,7 @@ export default { ...@@ -131,7 +131,7 @@ export default {
if (type === "SequentialMultiInstance") { if (type === "SequentialMultiInstance") {
this.multiLoopInstance = window.bpmnInstances.moddle.create("bpmn:MultiInstanceLoopCharacteristics", { isSequential: true }); this.multiLoopInstance = window.bpmnInstances.moddle.create("bpmn:MultiInstanceLoopCharacteristics", { isSequential: true });
} else { } else {
this.multiLoopInstance = window.bpmnInstances.moddle.create("bpmn:MultiInstanceLoopCharacteristics"); this.multiLoopInstance = window.bpmnInstances.moddle.create("bpmn:MultiInstanceLoopCharacteristics", { collection: "${coll_userList}" });
} }
window.bpmnInstances.modeling.updateProperties(this.bpmnElement, { window.bpmnInstances.modeling.updateProperties(this.bpmnElement, {
loopCharacteristics: this.multiLoopInstance loopCharacteristics: this.multiLoopInstance
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: 100%; width: 100%;
height: 100%; height: 500px;
box-sizing: border-box; box-sizing: border-box;
.my-process-designer__header { .my-process-designer__header {
width: 100%; width: 100%;
...@@ -141,11 +141,11 @@ ...@@ -141,11 +141,11 @@
} }
} }
pre { pre {
/* margin: 0; margin: 0;
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
max-height: calc(80vh - 32px); max-height: calc(80vh - 32px);
overflow-y: auto; */ overflow-y: auto;
} }
.hljs { .hljs {
word-break: break-word; word-break: break-word;
......
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 流程设计器,负责绘制流程等 --> <!-- 流程设计器,负责绘制流程等 -->
<my-process-designer :key="`designer-${reloadIndex}`" v-model="xmlString" v-bind="controlForm" <my-process-designer v-if="xmlString !== undefined" :key="`designer-${reloadIndex}`" v-model="xmlString" v-bind="controlForm"
keyboard ref="processDesigner" @init-finished="initModeler" keyboard ref="processDesigner" @init-finished="initModeler"
@save="save"/> @save="save"/>
...@@ -29,7 +30,7 @@ export default { ...@@ -29,7 +30,7 @@ export default {
components: { MyProcessPalette }, components: { MyProcessPalette },
data() { data() {
return { return {
xmlString: "", // BPMN XML xmlString: undefined, // BPMN XML
modeler: null, modeler: null,
reloadIndex: 0, reloadIndex: 0,
controlDrawerVisible: false, controlDrawerVisible: false,
...@@ -38,7 +39,7 @@ export default { ...@@ -38,7 +39,7 @@ export default {
simulation: true, simulation: true,
labelEditing: false, labelEditing: false,
labelVisible: false, labelVisible: false,
prefix: "activiti", prefix: "flowable",
headerButtonSize: "mini", headerButtonSize: "mini",
additionalModel: [CustomContentPadProvider, CustomPaletteProvider] additionalModel: [CustomContentPadProvider, CustomPaletteProvider]
}, },
...@@ -53,6 +54,7 @@ export default { ...@@ -53,6 +54,7 @@ export default {
created() { created() {
// 如果 modelId 非空,说明是修改流程模型 // 如果 modelId 非空,说明是修改流程模型
const modelId = this.$route.query && this.$route.query.modelId const modelId = this.$route.query && this.$route.query.modelId
if (modelId) { if (modelId) {
getModel(modelId).then(response => { getModel(modelId).then(response => {
this.xmlString = response.data.bpmnXml this.xmlString = response.data.bpmnXml
...@@ -68,24 +70,8 @@ export default { ...@@ -68,24 +70,8 @@ export default {
initModeler(modeler) { initModeler(modeler) {
setTimeout(() => { setTimeout(() => {
this.modeler = modeler; this.modeler = modeler;
console.log(modeler);
}, 10); }, 10);
}, },
reloadProcessDesigner(deep) {
this.controlForm.additionalModel = [];
for (let key in this.addis) {
if (this.addis[key]) {
this.controlForm.additionalModel.push(this.addis[key]);
}
}
deep && (this.xmlString = undefined);
this.reloadIndex += 1;
this.modeler = null; // 避免 panel 异常
// if (deep) {
// this.xmlString = undefined;
// this.$refs.processDesigner.processRestart();
// }
},
save(bpmnXml) { save(bpmnXml) {
const data = { const data = {
...this.model, ...this.model,
...@@ -129,9 +115,6 @@ export default { ...@@ -129,9 +115,6 @@ export default {
// display: inline-grid; // display: inline-grid;
// grid-template-columns: 100px auto max-content; // grid-template-columns: 100px auto max-content;
//} //}
.app-container{
min-height: calc(100vh - 84px);
}
.demo-control-bar { .demo-control-bar {
position: fixed; position: fixed;
right: 8px; right: 8px;
...@@ -174,9 +157,9 @@ export default { ...@@ -174,9 +157,9 @@ export default {
color: #fafafa; color: #fafafa;
} }
/* .my-process-designer { .my-process-designer {
height: calc(100vh - 84px); height: calc(100vh - 84px);
} */ }
.process-panel__container { .process-panel__container {
position: absolute; position: absolute;
right: 0; right: 0;
......
...@@ -38,10 +38,10 @@ ...@@ -38,10 +38,10 @@
<!-- 操作工具栏 --> <!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['bpm:process-instance:query']">{{$t('发起流程')}}</el-button> v-hasPermi="['bpm:process-instance:query']">{{$t('发起流程')}}</el-button>
</el-col> --> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment