diff --git a/src/views/iscs_new/components/eachFormItem.vue b/src/views/iscs_new/components/eachFormItem.vue
index c93470766..480393595 100644
--- a/src/views/iscs_new/components/eachFormItem.vue
+++ b/src/views/iscs_new/components/eachFormItem.vue
@@ -39,7 +39,7 @@
+
+
diff --git a/src/views/iscs_new/components/tableForm.vue b/src/views/iscs_new/components/tableForm.vue
index de5245e2d..234042b8c 100644
--- a/src/views/iscs_new/components/tableForm.vue
+++ b/src/views/iscs_new/components/tableForm.vue
@@ -24,21 +24,35 @@
@@ -92,11 +106,10 @@ export default {
},
data() {
return {
- formModel:{stateList:this.composeElem.stateList, style:this.composeElem.style, type:this.composeElem.type, shape:this.composeElem.shape},
+ formModel:this.composeElem,
+ // {stateList:this.composeElem.stateList, style:this.composeElem.style, type:this.composeElem.type, shape:this.composeElem.shape}
styleSelectList:[],
shapeSelectList:[],
- // defaultStyleSelect:'',
- defaultShapeSelect:'',
expandKeys:[]
};
},
@@ -107,7 +120,6 @@ export default {
const eachStyle = style.find(each=>{ return each.prop == eachStyleName; });
this.styleSelectList.push({value:eachStyleName, label:eachStyle.label});
});
- // this.defaultStyleSelect = this.styleSelectList[0].value;
const shapeNameList = Object.keys(this.formModel.shape);
const shape = elementConst[this.formModel.type]['formList']['shape'];
@@ -115,13 +127,17 @@ export default {
const eachShape = shape.find(each=>{ return each.prop == eachShapeName; });
this.shapeSelectList.push({value:eachShapeName, label:eachShape.label});
});
- this.defaultShapeSelect = this.shapeSelectList[0].value;
+ this.formModel.stateList.forEach(each=>{
+ each.defaultStyleSelect = this.styleSelectList[0].value;
+ each.defaultShapeSelect = this.shapeSelectList[0].value;
+ });
},
methods:{
addStatus() {
const length = this.formModel.stateList.length;
- this.formModel.stateList.push({id:length + 1, status:'', description:'', defaultStyleSelect:this.styleSelectList[0].value});
+ this.formModel.stateList.push({id:length + 1, status:'', description:'', defaultStyleSelect:this.styleSelectList[0].value,
+ defaultShapeSelect:this.shapeSelectList[0].value});
this.expandKeys.push(length + 1);
},
deleteStatus(index, row) {
@@ -135,8 +151,9 @@ export default {
this.$set(this.formModel.stateList[index], 'style', {});
}
const data = this.formModel.stateList[index];
- if (!data.style[data.defaultStyleSelect]) {
- this.$set(this.formModel.stateList[index].style, data.defaultStyleSelect, this.formModel.style[data.defaultStyleSelect]);
+ if (!data.style[data.defaultStyleSelect] && data.defaultStyleSelect) {
+ const other = this.formModel.style[data.defaultStyleSelect];
+ this.$set(this.formModel.stateList[index].style, data.defaultStyleSelect, other);
}
},
addShape(index) {
@@ -145,8 +162,9 @@ export default {
this.$set(this.formModel.stateList[index], 'shape', {});
}
const data = this.formModel.stateList[index];
- if (!data.shape[data.defaultStyleSelect]) {
- this.$set(this.formModel.stateList[index].style, data.defaultStyleSelect, this.formModel.shape[data.defaultStyleSelect]);
+ if (!data.shape[data.defaultShapeSelect] && data.defaultShapeSelect) {
+ const other = this.formModel.shape[data.defaultShapeSelect];
+ this.$set(this.formModel.stateList[index].shape, data.defaultShapeSelect, other);
}
},
expandChange(row, expandedRows) {
@@ -154,6 +172,9 @@ export default {
expandedRows.forEach(each=>{
this.expandKeys.push(each.id);
});
+ },
+ deleteShape({styleType, data, prop}) {
+ this.$delete(data, prop);
}
}
};
@@ -196,6 +217,7 @@ export default {
margin-top: 15px;
padding-left: 30px;
}
+// .eachStyleInfo .el-form-item{border-bottom: 1px #dedede solid;}