From c2a548b45452581384895604c034cbecaf88c5cd Mon Sep 17 00:00:00 2001 From: zhangzq Date: Wed, 20 Mar 2024 15:04:24 +0800 Subject: [PATCH] =?UTF-8?q?add:=E5=BC=95=E5=85=A5bpmn?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/VueBpmn/PropertyPanel.vue | 28 ++++++++++++------- .../qd/src/views/components/VueBpmn/index.vue | 7 ++++- .../VueBpmn/palette/CustomPaletteProvider.js | 4 +-- 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/wms_pro/qd/src/views/components/VueBpmn/PropertyPanel.vue b/wms_pro/qd/src/views/components/VueBpmn/PropertyPanel.vue index af77b0dc..2b792280 100644 --- a/wms_pro/qd/src/views/components/VueBpmn/PropertyPanel.vue +++ b/wms_pro/qd/src/views/components/VueBpmn/PropertyPanel.vue @@ -7,6 +7,9 @@ + + + @@ -21,7 +24,7 @@ export default { - name: "PropertyPanel", + name: 'PropertyPanel', props: { modeler: { type: Object, @@ -93,7 +96,7 @@ export default { computed: { userTask() { if (!this.element) { - return; + return } return this.element.type === 'bpmn:UserTask' }, @@ -109,7 +112,8 @@ export default { form: { id: "", name: "", - color: null + color: null, + form_type: null }, element: {}, users: [ @@ -151,7 +155,6 @@ export default { this.modeler.on("selection.changed", e => { const element = e.newSelection[0]; this.element = element; - console.log(this.element); if (!element) return; this.form = { ...element.businessObject, @@ -182,11 +185,16 @@ export default { // 属性面板颜色,更新回流程节点 colorChange(color) { const modeling = this.modeler.get("modeling"); + + + modeling.setColor(this.element, { fill: null, stroke: color - }); - modeling.updateProperties(this.element, { color: color }); + }) + modeling.updateProperties(this.element, { color: color }) + // 设置扩展属性 + }, // 任务节点配置人员 addUser(properties) { @@ -206,11 +214,11 @@ export default { }, // 在这里我们封装一个通用的更新节点属性的方法 updateProperties(properties) { - const modeling = this.modeler.get("modeling"); - modeling.updateProperties(this.element, properties); + const modeling = this.modeler.get('modeling') + modeling.updateProperties(this.element, properties) } } -}; +}