|
@@ -49,6 +49,11 @@
|
|
|
<el-button size="mini" @click="() => changeConState()" :disabled="state == -1">{{conButtonText}}</el-button>
|
|
|
</el-button-group>
|
|
|
|
|
|
+
|
|
|
+ <el-button-group>
|
|
|
+ <el-button size="mini" @click="() => save()" :disabled="state == -1">保存</el-button>
|
|
|
+ </el-button-group>
|
|
|
+
|
|
|
<!--选中信息-->
|
|
|
<div class="info">
|
|
|
<span>{{selectionInfo}}</span>
|
|
@@ -121,6 +126,7 @@
|
|
|
Watch
|
|
|
} from "vue-property-decorator";
|
|
|
import {DiagramEditor} from '@/lib/DiagramEditor';
|
|
|
+ import {Template} from '@/lib/DiagramModel';
|
|
|
|
|
|
@Component({})
|
|
|
export default class DiagramTemplate extends Vue {
|
|
@@ -389,6 +395,12 @@
|
|
|
this.conButtonText = this.editor.showContainer ? '隐藏容器' : '显示容器';
|
|
|
}
|
|
|
|
|
|
+ save(){
|
|
|
+ Template.clearParent(this.currentDiagram.template);
|
|
|
+ const params:any = {diagram: this.currentDiagram};
|
|
|
+ this.callAction("saveDiagram", params)
|
|
|
+ }
|
|
|
+
|
|
|
//切换编辑状态
|
|
|
changeState(state) {
|
|
|
this.state = state;
|