diff --git a/src/views/newDraw/drawForm.vue b/src/views/newDraw/drawForm.vue index 526a3bf52..4ba6919fb 100644 --- a/src/views/newDraw/drawForm.vue +++ b/src/views/newDraw/drawForm.vue @@ -36,15 +36,16 @@ 删除 - - + + + + + - - - + --> @@ -66,7 +67,7 @@ export default { data() { return { enabledTab:'drawSetting', - modifyElementTab:'', + // modifyElementTab:'', form: { code: '', type: '', @@ -74,35 +75,46 @@ export default { position: [0, 0], rotation: 0, scale: [1, 1] - }, - allowModifyList:[], - modifyElementForm:{ - shape:{}, - style:{} } + // allowModifyList:[], + // modifyElementForm:{ + // code:'', + // shape:{}, + // style:{} + // } }; }, methods: { 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] = ''; - // }); - } + // this.allowModifyList = []; + // shapeList.forEach(shape=>{ + // if (shape.editAttrList && shape.editAttrList.length > 0) { + // const formGroup = []; + // const list = [{name:'绘图配置', type:'shape'}, {name:'样式配置', type:'style'}]; + // list.forEach(eachType=>{ + // // const styleList = elementConst[eachType.type]['formList'][eachType.type]; + // formGroup.push({name:eachType.name, type: eachType.type}); + // }); + // // styleList: + // // const styleList = []; + // // const shapeList = []; + // // shape.editAttrList.forEach(each=>{ + // // if (each.attrType == 'style') { styleList.push(each); } else { shapeList.push(each); } + // // }); + // // styleList:styleList, shapeList:shapeList, + // // this.allowModifyList.push({code:shape.code, editAttrList:shape.editAttrList, formGroup:formGroup, name:shape.name}); + // // name: "Polyline_0_0.78816" + // } + // }); + // if (this.allowModifyList.length > 0) { + // const currentModify = this.allowModifyList[0]; + // this.modifyElementTab = currentModify.code; + // this.modifyElementForm.code = currentModify.code; + // currentModify.editAttrList.forEach(editAttr=>{ + // this.modifyElementForm[editAttr.attrType][editAttr.attrName] = ''; + // }); + // } }, modelChange(code) { const compose = this.model.find(item => item.code === code); @@ -127,6 +139,9 @@ export default { }, back() { this.$router.go(-1); + }, + handleTabClick() { + } } };