From 8ff82208adc243b18e586ae4885f2dd82ac30be6 Mon Sep 17 00:00:00 2001 From: Jam Date: Sun, 27 Nov 2022 01:05:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8logicflow=E9=87=8D=E6=9E=84?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/view/component/flow/editLine.html | 20 +- app/view/component/flow/editNode.html | 15 +- app/view/component/flow/flowNode.html | 159 ---- app/view/component/flow/processFlow.html | 910 ++++++++--------------- app/view/page/taskHistoryManagement.html | 4 +- app/view/page/workflowEditor.html | 6 +- 6 files changed, 343 insertions(+), 771 deletions(-) delete mode 100644 app/view/component/flow/flowNode.html diff --git a/app/view/component/flow/editLine.html b/app/view/component/flow/editLine.html index 3e892c7..757ddcb 100644 --- a/app/view/component/flow/editLine.html +++ b/app/view/component/flow/editLine.html @@ -64,6 +64,12 @@ template: '#edit-line', vuetify: new Vuetify(), name: 'editLine', + props: { + lf: { + type: Object, + default: null + } + }, data() { return { line: { label: '' }, @@ -74,10 +80,10 @@ }, watch: { line: { - handler(val) { - if (this.isUpdate) { - this.$emit('line-save', this.line); - } + handler: function (line) { + this.lf.updateText(line.id, `${line.type}-${line.label}`); + this.lf.setProperties(line.id, line); + console.log(this.lf.getEdgeModelById(line.id)); }, deep: true } @@ -88,11 +94,11 @@ }, }, methods: { - init(item, lineTypeList) { + init(line, lineTypeList) { this.isUpdate = false; - this.line = item; + this.line = line.properties; this.lineTypeList = lineTypeList; - this.$nextTick(function () { + this.$nextTick(() => { this.isUpdate = true; }); }, diff --git a/app/view/component/flow/editNode.html b/app/view/component/flow/editNode.html index aa83d54..884d375 100644 --- a/app/view/component/flow/editNode.html +++ b/app/view/component/flow/editNode.html @@ -117,6 +117,10 @@ vuetify: new Vuetify(), name: 'editNode', props: { + lf: { + type: Object, + default: null + }, user: { type: Array, default: () => { @@ -152,6 +156,13 @@ } }, watch: { + node: { + handler: function (node) { + this.lf.updateText(node.id, node.label); + this.lf.setProperties(node.id, node); + }, + deep: true + } }, computed: { isMobile() { @@ -177,8 +188,8 @@ } }, methods: { - init(data, node) { - this.node = node; + init(node) { + this.node = node.properties; }, getOptionList() { if (!this.node.assignType) { diff --git a/app/view/component/flow/flowNode.html b/app/view/component/flow/flowNode.html deleted file mode 100644 index 6bc008f..0000000 --- a/app/view/component/flow/flowNode.html +++ /dev/null @@ -1,159 +0,0 @@ - - - - - diff --git a/app/view/component/flow/processFlow.html b/app/view/component/flow/processFlow.html index 55e72cc..14546a7 100644 --- a/app/view/component/flow/processFlow.html +++ b/app/view/component/flow/processFlow.html @@ -1,47 +1,13 @@