|
@@ -5,7 +5,7 @@
|
|
<el-col :span="6" >
|
|
<el-col :span="6" >
|
|
<div style="height: 100vh;overflow: scroll;">
|
|
<div style="height: 100vh;overflow: scroll;">
|
|
<el-tree :data="diagrams" :props="{children: 'children', label: nodeLabel, value: 'id'}"
|
|
<el-tree :data="diagrams" :props="{children: 'children', label: nodeLabel, value: 'id'}"
|
|
- @node-click="open"
|
|
|
|
|
|
+ @node-click="openOnClick"
|
|
default-expand-all
|
|
default-expand-all
|
|
:expand-on-click-node="false">
|
|
:expand-on-click-node="false">
|
|
<span class="custom-tree-node" slot-scope="{ node, data }">
|
|
<span class="custom-tree-node" slot-scope="{ node, data }">
|
|
@@ -278,11 +278,25 @@
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
- //在编辑器中打开模板文件
|
|
|
|
- open(data){
|
|
|
|
|
|
+ //点击左侧树时打开系统图
|
|
|
|
+ openOnClick(data){
|
|
if(data.objType == 'folder') //文件夹
|
|
if(data.objType == 'folder') //文件夹
|
|
return;
|
|
return;
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ if(data.template == null){
|
|
|
|
+ this['$axios'].get(this['$common'].url + "diagram0/getDiagram?id=" + data.id)
|
|
|
|
+ .then(res => {
|
|
|
|
+ this.open(res.data.data);
|
|
|
|
+ })
|
|
|
|
+ .catch(err => {
|
|
|
|
+ //console.log(err);
|
|
|
|
+ });
|
|
|
|
+ } else
|
|
|
|
+ this.open(data);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //在编辑器中打开模板文件
|
|
|
|
+ open(data){
|
|
if(this.currentDiagram != data) {
|
|
if(this.currentDiagram != data) {
|
|
this.currentDiagram = data;
|
|
this.currentDiagram = data;
|
|
this.selectionInfo = '~';
|
|
this.selectionInfo = '~';
|