修改代码
This commit is contained in:
parent
2e45db73e5
commit
dc855fa6ef
@ -187,10 +187,9 @@ class JMap {
|
||||
case orders.Update:
|
||||
oldShape = this.$shapeFactory.removeShape(curShape);
|
||||
newShape = this.$shapeFactory.createShape(updateModel, action.shapeType);
|
||||
this.$painter.removeFromLayer(oldShape.type, oldShape.instanceHightLight);
|
||||
this.$painter.removeFromLayer(oldShape.type, newShape.instanceHightLight);
|
||||
this.$painter.remove(oldShape);
|
||||
this.$shapeFactory.addShape(newShape)
|
||||
this.$painter.removeFromLayer(oldShape.type, oldShape.instanceHightLight);
|
||||
this.$painter.remove(oldShape);
|
||||
this.$painter.add(newShape);
|
||||
break;
|
||||
case orders.Unbinding:
|
||||
|
@ -93,6 +93,8 @@
|
||||
<script>
|
||||
import elementConst from '@/iscs_new/core/form/elementConst';
|
||||
import EachFormItem from './eachFormItem';
|
||||
import * as utils from '@/iscs_new/utils/utils';
|
||||
|
||||
export default {
|
||||
name:'TableForm',
|
||||
components:{
|
||||
@ -152,7 +154,7 @@ export default {
|
||||
}
|
||||
const data = this.formModel.stateList[index];
|
||||
if (!data.style[data.defaultStyleSelect] && data.defaultStyleSelect) {
|
||||
const other = this.formModel.style[data.defaultStyleSelect];
|
||||
const other = utils.deepClone(this.formModel.style[data.defaultStyleSelect]);
|
||||
this.$set(this.formModel.stateList[index].style, data.defaultStyleSelect, other);
|
||||
}
|
||||
},
|
||||
@ -163,7 +165,7 @@ export default {
|
||||
}
|
||||
const data = this.formModel.stateList[index];
|
||||
if (!data.shape[data.defaultShapeSelect] && data.defaultShapeSelect) {
|
||||
const other = this.formModel.shape[data.defaultShapeSelect];
|
||||
const other = utils.deepClone(this.formModel.shape[data.defaultShapeSelect]);
|
||||
this.$set(this.formModel.stateList[index].shape, data.defaultShapeSelect, other);
|
||||
}
|
||||
},
|
||||
|
@ -202,8 +202,10 @@ export default {
|
||||
this.$refs['tableform' + this.statusTab][0].$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const model = utils.deepClone(this.$refs['tableform' + this.statusTab][0].formModel);
|
||||
model.stateList.map(state=>{ delete state.defaultStyleSelect; delete state.defaultShapeSelect; });
|
||||
debugger;
|
||||
model.stateList.forEach(state=>{
|
||||
delete state.defaultStyleSelect;
|
||||
delete state.defaultShapeSelect;
|
||||
});
|
||||
this.$refs.iscsCanvas.doAction([{model, action: {shapeType: shapeType.Element, order: orders.Update}}]);
|
||||
this.onSave();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user