Browse Source

fix:修复报告详情图表显示无权限

chenlei 1 month ago
parent
commit
a95a21d06a
2 changed files with 7 additions and 17 deletions
  1. 1 1
      src/views/chart/Detail.vue
  2. 6 16
      src/views/report/Detail.vue

+ 1 - 1
src/views/chart/Detail.vue

@@ -58,7 +58,7 @@ async function handleCollect() {
 }
 
 const chartRenderUrl = computed(() => {
-  return `${chartBaseUrl.value}/chart/preview?code=${chartInfo.value.UniqueCode}&source=etamini&token=${route.query.token}`
+  return `${chartBaseUrl.value}/chart/preview?code=${chartInfo.value.UniqueCode}&token=${route.query.token}`
 })
 
 

+ 6 - 16
src/views/report/Detail.vue

@@ -86,12 +86,6 @@ async function getReportInfo() {
     }else{
       htmlStr=reportInfo.value.Content
     }
-    if (userInfo.User.Status === 2) {
-      htmlStr=modifyReportContentIframeData(htmlStr)
-      htmlStr=formatIframeData(htmlStr)
-    }else{
-      htmlStr = modifyReportContentIframeData(htmlStr)
-    }
     splitReportContent(htmlStr)
 
     // 智能研报将富文本盒子高度设置为自动
@@ -106,17 +100,13 @@ async function getReportInfo() {
 }
 getReportInfo()
 
-// 修改报告中嵌入的图表地址
-function modifyReportContentIframeData(str){
-  let temStr=str.replace(/http:\/\/eta.dwfutures.com:8001/g,'https://dwresearch.dwfutures.com')
-  temStr=temStr.replace(/http:\/\/192.168.43.22:8001/g,'https://dwresearch.dwfutures.com')
-  return temStr.replace(/http:\/\/58.210.74.21:9100\/etastatic/g,'https://dwresearch.dwfutures.com/etastatic')
-}
+// // 修改报告中嵌入的图表地址
+// function modifyReportContentIframeData(str){
+//   let temStr=str.replace(/http:\/\/eta.dwfutures.com:8001/g,'https://dwresearch.dwfutures.com')
+//   temStr=temStr.replace(/http:\/\/192.168.43.22:8001/g,'https://dwresearch.dwfutures.com')
+//   return temStr.replace(/http:\/\/58.210.74.21:9100\/etastatic/g,'https://dwresearch.dwfutures.com/etastatic')
+// }
 
-// 给报告详情中图表加参数
-function formatIframeData(str) {
-  return str.replace(/\/chartshow\?code=/g, `/chartshow?source=etamini&token=${localStorage.getItem('token')}&reportId=${reportId}&code=`)
-}
 
 // 报告内容分页
 const pageSize=20