|
@@ -6,20 +6,21 @@
|
|
|
:default-percent='leftpercent'
|
|
|
split="vertical">
|
|
|
<template slot="paneL">
|
|
|
-
|
|
|
- <el-tree :data="treeData"
|
|
|
- :props="defaultProps"
|
|
|
- node-key="id"
|
|
|
- default-expand-all
|
|
|
- v-if="hideLeft==1"
|
|
|
- :expand-on-click-node="false"
|
|
|
- @node-contextmenu="rightReportNodeEvent"
|
|
|
- @node-click="templateNameClick" class="lefttree1">
|
|
|
- <!-- <span class="custom-tree-node" slot-scope="{ node, data }">
|
|
|
- <i class="el-icon-folder" style="color: #DFBA49; margin-right: 5px;"></i>
|
|
|
- <span style="font-size: 15px;">{{ node.label }}</span>
|
|
|
- </span> -->
|
|
|
- <span class="custom-tree-node" slot-scope="{ node, data }">
|
|
|
+ <el-scrollbar class="tree-scroll">
|
|
|
+ <el-tree :data="treeData"
|
|
|
+ :props="defaultProps"
|
|
|
+ node-key="id"
|
|
|
+ default-expand-all
|
|
|
+ highlight-current
|
|
|
+ v-if="hideLeft==1"
|
|
|
+ :expand-on-click-node="false"
|
|
|
+ @node-contextmenu="rightReportNodeEvent"
|
|
|
+ @node-click="templateNameClick" class="lefttree">
|
|
|
+ <!-- <span class="custom-tree-node" slot-scope="{ node, data }">
|
|
|
+ <i class="el-icon-folder" style="color: #DFBA49; margin-right: 5px;"></i>
|
|
|
+ <span style="font-size: 15px;">{{ node.label }}</span>
|
|
|
+ </span> -->
|
|
|
+ <span class="custom-tree-node" slot-scope="{ node, data }">
|
|
|
<!-- <span style="font-size: 15px;">{{ node.label }}</span> -->
|
|
|
<svg-icon v-if="data.id == -1" icon-class="reports" />
|
|
|
<template v-else>
|
|
@@ -41,13 +42,14 @@
|
|
|
accept=".xlsx" style="display: none;"></input>
|
|
|
</span>
|
|
|
</span>
|
|
|
- </el-tree>
|
|
|
+ </el-tree>
|
|
|
+ </el-scrollbar>
|
|
|
<span style="position: absolute; right: 10px;top:300px">
|
|
|
<el-button type="text" size="mini" title="" @click="splitClickEvent" :icon="iconstr"></el-button>
|
|
|
</span>
|
|
|
</template>
|
|
|
<template slot="paneR">
|
|
|
- <iframe @load="load" id="myIframe" :src="iframeSrc"
|
|
|
+ <iframe @load="load(-1)" id="myIframe" :src="iframeSrc"
|
|
|
:style="{ 'height': '90vh', 'width': '100%', 'border': 'none', 'display': 'block' }"></iframe>
|
|
|
|
|
|
</template>
|
|
@@ -89,9 +91,7 @@ export default {
|
|
|
const loading = showLoading(this, '加载中,请稍候···')
|
|
|
const task = setInterval(() => {
|
|
|
loading.close()
|
|
|
- }, 200);
|
|
|
- //this.pollingReportData()
|
|
|
- },
|
|
|
+ }, 200); },
|
|
|
components: {
|
|
|
CommonTable
|
|
|
},
|
|
@@ -170,8 +170,11 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
|
|
|
- load() {
|
|
|
- console.log(this.reportId)
|
|
|
+ load(e) {
|
|
|
+ //console.log(this.reportId)
|
|
|
+ if(e==-1){
|
|
|
+ return;
|
|
|
+ }
|
|
|
const _this = this
|
|
|
const files = localStorage.getItem('IMPORT_FILES_JSON')
|
|
|
_this.sendMsg({
|
|
@@ -189,6 +192,9 @@ export default {
|
|
|
const json = event.data
|
|
|
if (json.cmd === 'close') {
|
|
|
//_this.$router.go(-1)
|
|
|
+ }else if(json.cmd==='newsave'){
|
|
|
+ console.log('newsave')
|
|
|
+ _this.getAllTableTemplate()
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -213,7 +219,7 @@ export default {
|
|
|
this.reportId = res.data.tableTemplateList[0].id
|
|
|
this.type = ''
|
|
|
}
|
|
|
- this.load()
|
|
|
+ this.load(this.reportId)
|
|
|
})
|
|
|
},
|
|
|
/** 报表名称点击事件 */
|
|
@@ -225,12 +231,12 @@ export default {
|
|
|
//checkReportChangeStatus()
|
|
|
this.reportId=data.id
|
|
|
this.type = ''
|
|
|
- this.load()
|
|
|
+ this.load(this.reportId)
|
|
|
},
|
|
|
addReportEvent(){
|
|
|
this.reportId=0
|
|
|
this.type = ''
|
|
|
- this.load()
|
|
|
+ this.load(this.reportId)
|
|
|
},
|
|
|
splitClickEvent(){
|
|
|
this.hideLeft = !this.hideLeft;
|
|
@@ -352,7 +358,7 @@ export default {
|
|
|
this.closeMenu();
|
|
|
this.reportId = this.chooseReportData.id;
|
|
|
this.type = 'export';
|
|
|
- this.load();
|
|
|
+ this.load(this.reportId);
|
|
|
},
|
|
|
/** 新增报表设计 */
|
|
|
addTableTemplateEvent() {
|
|
@@ -439,7 +445,7 @@ export default {
|
|
|
// })
|
|
|
_this.reportId = 0
|
|
|
_this.type = 'import'
|
|
|
- _this.load()
|
|
|
+ _this.load(_this.reportId)
|
|
|
document.getElementsByClassName('import-file-node')[0].value = ''
|
|
|
})
|
|
|
}
|
|
@@ -467,6 +473,9 @@ export default {
|
|
|
.sy-content{
|
|
|
//background: #646464 !important;
|
|
|
}
|
|
|
+.tree-scroll {
|
|
|
+ height: 90vh;
|
|
|
+}
|
|
|
.contextmenu {
|
|
|
margin: 0;
|
|
|
background: #fff;
|