From 26ed24d33938738db0b41d1969383a969878293d Mon Sep 17 00:00:00 2001
From: joylink_cuiweidong <364937672@qq.com>
Date: Thu, 8 Apr 2021 11:23:24 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/iscs_new/iscsDraw/index.vue | 66 +++++++++++++--------------
1 file changed, 33 insertions(+), 33 deletions(-)
diff --git a/src/views/iscs_new/iscsDraw/index.vue b/src/views/iscs_new/iscsDraw/index.vue
index a36ef19a9..7f0190e19 100644
--- a/src/views/iscs_new/iscsDraw/index.vue
+++ b/src/views/iscs_new/iscsDraw/index.vue
@@ -21,7 +21,7 @@
添加
- 修改
+ 修改
删除
@@ -52,7 +52,7 @@ export default {
},
widthLeft: Number(localStore.get('LeftWidth')) || 450,
draftShow: false,
- selected: null,
+ selected: null,
enabledTab:'',
showDeleteButton:false,
elementList:[]
@@ -85,45 +85,45 @@ export default {
},
onSelectTab() {
},
- onSelected(val) {
- if (val) {
- this.selected = JSON.parse(JSON.stringify(val));
- } else {
- this.selected = null;
- }
- },
- onSubmit(){
- this.$refs['dataform'+this.enabledTab][0].$refs['form'].validate((valid) => {
+ onSelected(val) {
+ if (val) {
+ this.selected = JSON.parse(JSON.stringify(val));
+ } else {
+ this.selected = null;
+ }
+ },
+ 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));
- newModel.type = this.enabledTab;
- newModel.code = utils.getUID(this.enabledTab)
- this.$refs.iscsCanvas.doAction([{model: newModel, action: {shapeType: shapeType.Element, order: orders.ADD}}]);
+ 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);
+ this.$refs.iscsCanvas.doAction([{model: newModel, action: {shapeType: shapeType.Element, order: orders.ADD}}]);
}
});
},
- onModify() {
- this.$refs['dataform'+this.enabledTab][0].$refs['form'].validate((valid) => {
+ onModify() {
+ this.$refs['dataform' + this.enabledTab][0].$refs['form'].validate((valid) => {
if (valid) {
- let 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}}]);
+ 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;
- 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.selected = null;
+ 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.selected = null;
}
- });
+ });
}
}
};