From 544b930e48c1ac49a71e5aab74e4769b9337a9eb Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Wed, 5 Feb 2020 17:06:42 +0800 Subject: [PATCH] =?UTF-8?q?iscs=20=20=E7=9F=A9=E5=BD=A2=E5=8F=B3=E9=94=AE?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iscs/iscsDraw/iscsCommonElem/rect.vue | 18 +++++++++++++++++- .../iscs/iscsDraw/iscsCommonElem/text.vue | 17 ++++++++++++++++- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/src/views/iscs/iscsDraw/iscsCommonElem/rect.vue b/src/views/iscs/iscsDraw/iscsCommonElem/rect.vue index bf6ad2ca2..565084ffb 100644 --- a/src/views/iscs/iscsDraw/iscsCommonElem/rect.vue +++ b/src/views/iscs/iscsDraw/iscsCommonElem/rect.vue @@ -68,7 +68,23 @@ export default { 'iscs' ]) }, - watch: { + watch:{ + '$store.state.iscs.rightClickCount': function (val) { + const model = this.$store.getters['iscs/updateDeviceData']; + if (model._type === 'IscsRect' ) { + this.buttonText = '修改'; + this.showDeleteButton = true; + this.isUpdate = true; + this.form.code = model.code; + this.form.fillColor = model.fillColor; + this.form.borderWidth = model.borderWidth; + this.form.strokeColor = model.strokeColor; + this.form.width = model.width; + this.form.height = model.height; + this.form.x = model.point.x; + this.form.y = model.point.y; + } + } }, mounted() {}, methods: { diff --git a/src/views/iscs/iscsDraw/iscsCommonElem/text.vue b/src/views/iscs/iscsDraw/iscsCommonElem/text.vue index 063334852..dbe1e1819 100644 --- a/src/views/iscs/iscsDraw/iscsCommonElem/text.vue +++ b/src/views/iscs/iscsDraw/iscsCommonElem/text.vue @@ -73,7 +73,22 @@ export default { 'iscs' ]) }, - watch: { + watch:{ + '$store.state.iscs.rightClickCount': function (val) { + const model = this.$store.getters['iscs/updateDeviceData']; + if (model._type === 'IscsText' ) { + this.buttonText = '修改'; + this.showDeleteButton = true; + this.isUpdate = true; + this.form.code = model.code; + this.form.context = model.context; + this.form.fontSize = model.fontSize; + this.form.fontWeight = model.fontWeight; + this.form.textFill = model.textFill; + this.form.x = model.point.x; + this.form.y = model.point.y; + } + } }, mounted() {}, methods: {