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 @@