# Conflicts:
#	src/views/iscs_new/iscsDraw/index.vue
This commit is contained in:
ival 2021-04-08 13:00:41 +08:00
commit edb841c38c

View File

@ -99,32 +99,32 @@ export default {
onSubmit(){
this.$refs['dataform'+this.enabledTab][0].$refs['form'].validate((valid) => {
if (valid) {
let formModel=this.$refs['dataform'+this.enabledTab][0].formModel;
let newModel=JSON.parse(JSON.stringify(formModel));
const formModel = this.$refs['dataform' + this.enabledTab][0].formModel;
const newModel = JSON.parse(JSON.stringify(formModel));
newModel.type = this.enabledTab;
newModel.code = utils.getUID(this.enabledTab)
newModel.code = utils.getUID(this.enabledTab);
this.$refs.iscsCanvas.doAction([{model: newModel, action: {shapeType: shapeType.Element, order: orders.ADD}}]);
}
});
},
onModify() {
this.$refs['dataform'+this.enabledTab][0].$refs['form'].validate((valid) => {
this.$refs['dataform' + this.enabledTab][0].$refs['form'].validate((valid) => {
if (valid) {
let model = this.$refs['dataform'+this.enabledTab][0].formModel;
const model = this.$refs['dataform' + this.enabledTab][0].formModel;
model.code = this.selected.code;
model.type = this.selected.type;
this.$refs.iscsCanvas.doAction([{model, action: {shapeType: shapeType.Element, order: orders.UPDATE}}]);
}
});
},
onDelete(){
this.$refs['dataform'+this.enabledTab][0].$refs['form'].validate((valid) => {
onDelete() {
this.$refs['dataform' + this.enabledTab][0].$refs['form'].validate((valid) => {
if (valid) {
let model = this.$refs['dataform'+this.enabledTab][0].formModel;
const model = this.$refs['dataform' + this.enabledTab][0].formModel;
model.code = this.selected.code;
model.type = this.selected.type;
this.$refs.iscsCanvas.doAction([{model, action: {shapeType: shapeType.Element, order: orders.DELETE}}]);
this.$refs['dataform'+this.enabledTab][0].init();
this.$refs['dataform' + this.enabledTab][0].init();
this.selected = null;
}
});