From 2cb2247d7ebaf19af4c5d944d724dc28b620f05f Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Mon, 2 Aug 2021 17:33:42 +0800 Subject: [PATCH] =?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 --- src/views/newDraw/drawForm.vue | 122 ++++++++++++++++++++++----------- src/views/newDraw/edit.vue | 2 +- 2 files changed, 83 insertions(+), 41 deletions(-) diff --git a/src/views/newDraw/drawForm.vue b/src/views/newDraw/drawForm.vue index df19c29db..526a3bf52 100644 --- a/src/views/newDraw/drawForm.vue +++ b/src/views/newDraw/drawForm.vue @@ -5,36 +5,48 @@ 返回
-
- 绘图配置 -
- - - - - - - - - - - - - - - - - - -
- 修改 - 删除 -
+ + + + + + + + + + + + + + + + + + + + + +
+ 修改 + 删除 +
+
+ + + + + + + + + +
+
@@ -53,6 +65,8 @@ export default { }, data() { return { + enabledTab:'drawSetting', + modifyElementTab:'', form: { code: '', type: '', @@ -60,18 +74,35 @@ export default { position: [0, 0], rotation: 0, scale: [1, 1] + }, + allowModifyList:[], + modifyElementForm:{ + shape:{}, + style:{} } }; }, methods: { - selectChange(compose) { - // this.form.code = compose.code; - // this.form.type = compose.type; - // this.form.name = compose.name; - // this.form.position = compose.position; - // this.form.rotation = compose.rotation; - // this.form.scale = compose.scale; - this.form = compose; + selectChange({code, type, name, position, rotation, scale, shapeList}) { + this.form = {code, type, name, position, rotation, scale}; + this.allowModifyList = []; + shapeList.forEach(shape=>{ + if (shape.editAttrList && shape.editAttrList.length > 0) { + this.allowModifyList.push({code:shape.code, editAttrList:shape.editAttrList, name:shape.name}); + // style + // shape + // code: (...) + // editAttrList: (...) + // name: "Polyline_0_0.78816" + } + }); + if (this.allowModifyList.length > 0) { + const currentModify = this.allowModifyList[0]; + this.modifyElementTab = currentModify.code; + // currentModify.editAttrList.forEach(each=>{ + // this.modifyElementForm[each.attrType][each.attrName] = ''; + // }); + } }, modelChange(code) { const compose = this.model.find(item => item.code === code); @@ -102,9 +133,20 @@ export default { + + diff --git a/src/views/newDraw/edit.vue b/src/views/newDraw/edit.vue index 11752620e..7d38ef7d3 100644 --- a/src/views/newDraw/edit.vue +++ b/src/views/newDraw/edit.vue @@ -2,7 +2,7 @@
-
+
{{ item.name }}