Showing
5 changed files
with
58 additions
and
20 deletions
@@ -4,6 +4,6 @@ const prodEnv = require('./prod.env') | @@ -4,6 +4,6 @@ const prodEnv = require('./prod.env') | ||
4 | 4 | ||
5 | module.exports = merge(prodEnv, { | 5 | module.exports = merge(prodEnv, { |
6 | NODE_ENV: '"development"', | 6 | NODE_ENV: '"development"', |
7 | - BASE_API: '"/aj-web"', | ||
8 | - MONITOR_GATEWAY: '"/mj"' | 7 | + BASE_API: '"http://127.0.0.1:8089"', |
8 | + MONITOR_GATEWAY: '"http://127.0.0.1:7895/mj"' | ||
9 | }) | 9 | }) |
@@ -75,13 +75,19 @@ export function getData(data) { | @@ -75,13 +75,19 @@ export function getData(data) { | ||
75 | let contextData = data.contextData; | 75 | let contextData = data.contextData; |
76 | if(contextData && Object.keys(contextData).length > 0){ | 76 | if(contextData && Object.keys(contextData).length > 0){ |
77 | for(var item in contextData ){ | 77 | for(var item in contextData ){ |
78 | - let val = getQueryVariable(item); | 78 | + let key = item; |
79 | + let val = getQueryVariable(key); | ||
79 | if(val && val != false){ | 80 | if(val && val != false){ |
80 | contextData[item] = val; | 81 | contextData[item] = val; |
81 | } | 82 | } |
82 | } | 83 | } |
83 | data.contextData = contextData; | 84 | data.contextData = contextData; |
84 | } | 85 | } |
86 | + let queryVariable = getQueryVariable('AuthVal'); | ||
87 | + if(!queryVariable){ | ||
88 | + queryVariable = localStorage.getItem("AuthVal"); | ||
89 | + } | ||
90 | + data.contextData['accessToken'] = queryVariable | ||
85 | return request({ | 91 | return request({ |
86 | url: 'reportDashboard/getData', | 92 | url: 'reportDashboard/getData', |
87 | method: 'post', | 93 | method: 'post', |
@@ -59,18 +59,31 @@ export default { | @@ -59,18 +59,31 @@ export default { | ||
59 | let flag = this.optionsSetUp.flag; | 59 | let flag = this.optionsSetUp.flag; |
60 | let reportCode = this.optionsSetUp.ajCode; | 60 | let reportCode = this.optionsSetUp.ajCode; |
61 | let title = this.optionsSetUp.buttonText; | 61 | let title = this.optionsSetUp.buttonText; |
62 | - let param = { | ||
63 | - type: 'openAJ', | ||
64 | - data: { | 62 | + // let param = { |
63 | + // type: 'openAJ', | ||
64 | + // data: { | ||
65 | + // resId: resId, | ||
66 | + // kpiId: kpiId, | ||
67 | + // flag: flag, | ||
68 | + // reportCode:reportCode, | ||
69 | + // title:title | ||
70 | + // } | ||
71 | + // | ||
72 | + // } | ||
73 | + // window.parent.postMessage(param, '*') | ||
74 | + | ||
75 | + let params = { | ||
65 | resId: resId, | 76 | resId: resId, |
66 | kpiId: kpiId, | 77 | kpiId: kpiId, |
67 | flag: flag, | 78 | flag: flag, |
68 | - reportCode:reportCode, | ||
69 | - title:title | 79 | + reportCode: reportCode, |
80 | + title: title | ||
70 | } | 81 | } |
71 | 82 | ||
72 | - } | ||
73 | - window.parent.postMessage(param, '*') | 83 | + window.top.postMessage({ |
84 | + type: 'openAJ', | ||
85 | + message: {'params': params} | ||
86 | + }, '*') | ||
74 | } | 87 | } |
75 | }, | 88 | }, |
76 | } | 89 | } |
1 | <template> | 1 | <template> |
2 | <div :style="styleObj"> | 2 | <div :style="styleObj"> |
3 | - <el-button type="primary" size="small" plain @click="openJimuReport">{{optionsSetUp.buttonText}}</el-button> | 3 | + <el-button type="primary" size="small" plain @click="openJimuReport">{{ optionsSetUp.buttonText }}</el-button> |
4 | </div> | 4 | </div> |
5 | 5 | ||
6 | </template> | 6 | </template> |
@@ -59,18 +59,32 @@ export default { | @@ -59,18 +59,32 @@ export default { | ||
59 | let flag = this.optionsSetUp.flag; | 59 | let flag = this.optionsSetUp.flag; |
60 | let reportCode = this.optionsSetUp.reportCode; | 60 | let reportCode = this.optionsSetUp.reportCode; |
61 | let title = this.optionsSetUp.buttonText; | 61 | let title = this.optionsSetUp.buttonText; |
62 | - let param = { | ||
63 | - type: 'openJimu', | ||
64 | - data: { | 62 | + // let param = { |
63 | + // type: 'openJimu', | ||
64 | + // data: { | ||
65 | + // resId: resId, | ||
66 | + // kpiId: kpiId, | ||
67 | + // flag: flag, | ||
68 | + // reportCode:reportCode, | ||
69 | + // title:title | ||
70 | + // } | ||
71 | + // | ||
72 | + // } | ||
73 | + // window.parent.postMessage(param, '*') | ||
74 | + | ||
75 | + | ||
76 | + let params = { | ||
65 | resId: resId, | 77 | resId: resId, |
66 | kpiId: kpiId, | 78 | kpiId: kpiId, |
67 | flag: flag, | 79 | flag: flag, |
68 | - reportCode:reportCode, | ||
69 | - title:title | 80 | + reportCode: reportCode, |
81 | + title: title | ||
70 | } | 82 | } |
71 | 83 | ||
72 | - } | ||
73 | - window.parent.postMessage(param, '*') | 84 | + window.top.postMessage({ |
85 | + type: 'openJimu', | ||
86 | + message: {'params': params} | ||
87 | + }, '*') | ||
74 | } | 88 | } |
75 | }, | 89 | }, |
76 | } | 90 | } |
@@ -149,8 +149,13 @@ export default { | @@ -149,8 +149,13 @@ export default { | ||
149 | this.$store.commit('CHANGE_TREE',data) | 149 | this.$store.commit('CHANGE_TREE',data) |
150 | }, | 150 | }, |
151 | setSrc(data,node){ | 151 | setSrc(data,node){ |
152 | - let origin=window.location.origin;//当前域名 | ||
153 | - let srcName=origin+'/#/bigscreen/viewer?reportCode='; | 152 | + let prePath = window.location.origin; |
153 | + let basePath = process.env.BASE_API; | ||
154 | + if(basePath.indexOf('http://') == -1){ | ||
155 | + prePath += basePath + "/index.html"; | ||
156 | + } | ||
157 | + console.log('=====>1111111111111111111'); | ||
158 | + let srcName = prePath + '/#/bigscreen/viewer?reportCode='; | ||
154 | // serviceCode,resourceCode | 159 | // serviceCode,resourceCode |
155 | let codeArr=[]; | 160 | let codeArr=[]; |
156 | let codeArrSecond=[]; | 161 | let codeArrSecond=[]; |
-
Please register or login to post a comment