| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- <template>
- <el-container>
- <el-aside width="20%">
- <el-tree
- ref="trees"
- :data="nodeInfos"
- :props="defaultProps"
- node-key="id"
- @node-click="handleNodeClick">
- </el-tree>
- </el-aside>
- <el-main id="dxdcListMain" style="padding:5px 20px;">
- <div :style="{'width': '100%','height': iframeHeight + 'px'}">
- <iframe ref="frameMain" id="frameMain" name="frameMain" :src="tableSrc" frameborder="0" width="100%" height="100%" style="overflow: auto"></iframe>
- </div>
- </el-main>
- </el-container>
- </template>
- <script>
- import request from "@util/gw_ajax_request.js";
- import {getTrees} from "@util/gw_formatTree.js"
- import {getRyNodeProvincialScore} from '@api/reportApi.js'
- import {reportHosturl} from '@util/global_variable.js'
- export default {
- components: {
-
- },
- props: [],
- data() {
- return {
- iframeHeight: window.innerHeight - 100,
- nodeInfos: [],
- defaultProps: {
- children: 'children',
- label: 'pnm'
- },
- adCode: '3501',
- name: '福州市',
- tableSrc: '',
- id: '', //组id
- };
- },
- computed: {
- persId() {
- return localStorage.getItem("userid")
- ? localStorage.getItem("userid")
- : "1098101939614724096";
- }
- },
- mounted() {
- this.tableSrc = `${reportHosturl}/demo/reportJsp/showReport.jsp?rpx=fujian/LHPF_CITY&adCode=${this.adCode}&pname=${this.name}&id=${this.id}&persId=${this.persId}`
- this.getLeftTreeData()
- },
- watch: {
- adCode(val){
- this.tableSrc = `${reportHosturl}/demo/reportJsp/showReport.jsp?rpx=fujian/LHPF_CITY&adCode=${this.adCode}&pname=${this.name}&id=${this.id}&persId=${this.persId}`
- }
- },
- methods: {
- getLeftTreeData(){
- let params = {
- userId: this.persId,
- orgType: '023',
- level: '3'
- }
- getRyNodeProvincialScore(params).then(res=>{
- if(res.success){
- this.nodeInfos = getTrees(res.data)
- }
- })
- },
- handleNodeClick(data,node){
- if(node.isLeaf){
- this.adCode = data.id.substr(0,4)
- this.name = data.pnm
- this.id = data.pid
- }
- console.log(data)
- console.log(node)
- }
- }
- };
- </script>
- <style>
- </style>
|