Merge branch 'iscs' of https://git.code.tencent.com/lian-cbtc/jl-client into iscs
# Conflicts: # src/views/iscs_new/iscsDraw/index.vue
This commit is contained in:
commit
edb841c38c
@ -21,7 +21,7 @@
|
||||
</el-tabs>
|
||||
<div class="bottomBtnGroup">
|
||||
<el-button v-show="!selected" type="primary" size="small" @click="onSubmit">添加</el-button>
|
||||
<el-button v-show="selected" type="warning" size="small" @click="onModify">修改</el-button>
|
||||
<el-button v-show="selected" type="warning" size="small" @click="onModify">修改</el-button>
|
||||
<el-button v-show="selected" type="danger" size="small" @click="onDelete">删除</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
@ -52,7 +52,7 @@ export default {
|
||||
},
|
||||
widthLeft: Number(localStore.get('LeftWidth')) || 450,
|
||||
draftShow: false,
|
||||
selected: null,
|
||||
selected: null,
|
||||
enabledTab:'',
|
||||
showDeleteButton:false,
|
||||
elementList:[]
|
||||
@ -99,35 +99,35 @@ 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));
|
||||
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;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user