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