Browse Source

Merge branch 'ETA2.5.4' into debug

cldu 4 days ago
parent
commit
0f701d9ca4

+ 6 - 0
src/request/api.ts

@@ -113,4 +113,10 @@ export const SheetApi = {
 	refreshInfo:(params:IFreshParams) => {
 		return get('excel_info/refresh',params)
 	}
+}
+
+export const DisclaimerApi = {
+	getDisclaimer: () => { //免责声明
+		return get('common/disclaimer')
+	}
 }

+ 5 - 0
src/router/index.ts

@@ -33,6 +33,11 @@ export const routes: AppRouteRecordRaw[] = [
     component: () => import('@/views/sheetShow/index.vue'),
     name: '表格详情',
   },
+  {
+    path: '/disclaimershow',
+    component: () => import('@/views/disclaimerShow/index.vue'),
+    name: '免责声明',
+  },
 ];
 
 const router = createRouter({

+ 12 - 2
src/views/chartShow/index.vue

@@ -1,6 +1,6 @@
 <!--  -->
 <template>
-  <div class="chart-show">
+  <div class="chart-show" @click="outWrapClick">
     <header class="chart-header" @click="openNew">
       <span 
         class="chart-title" 
@@ -130,6 +130,7 @@ export default defineComponent({
     const haveData = ref(false);
     const code = ref(route.query.code);
     const isShare = ref(route.query.fromType === 'share');
+    const clickId = route.query.clickId || '';
     // 语言 中英文 ch en  默认中文
     const language = ref(route.query.fromPage || route.query.lang || 'zh');
     const IsCollect=ref(false)//图表是否收藏
@@ -240,6 +241,14 @@ export default defineComponent({
       
     }
 
+    const outWrapClick = () => {
+       if(!clickId) return;
+       window.parent.postMessage({
+          type: 'freeReportIframeClick',
+          clickId: clickId,
+       },'*')
+    }
+
     return {
       ...toRefs(state),
       loading,
@@ -253,7 +262,8 @@ export default defineComponent({
       copyText,
       handleChangeChartCollect,
       IsCollect,
-      haveAuth
+      haveAuth,
+      outWrapClick
     };
   },
 });

+ 38 - 0
src/views/disclaimerShow/index.vue

@@ -0,0 +1,38 @@
+<script setup lang='ts'>
+import { ref } from 'vue';
+import { useRoute } from 'vue-router';
+import { DisclaimerApi } from '@/request/api';
+
+const route = useRoute();
+const isEn = route.query.lang == 'zh' ? false : true;
+const clickId = route.query.clickId || '';
+const disclaimer = ref('');
+
+async function getDisclaimer(){
+    const res = await DisclaimerApi.getDisclaimer();
+    if(res.Ret != 200) return;
+    disclaimer.value = isEn ? res.Data.DisclaimerEn : res.Data.Disclaimer
+}
+
+const outWrapClick = () => {
+   if(!clickId) return;
+   window.parent.postMessage({
+      type: 'freeReportIframeClick',
+      clickId: clickId,
+   },'*')
+}
+
+getDisclaimer();
+
+</script>
+
+<template>
+   <div style="font-size: 14px;" @click="outWrapClick">
+      <div style="margin-bottom: 4px;">{{ isEn ? 'Disclaimers' : '免责声明' }}:</div>
+      <div v-html="disclaimer"></div>
+   </div>
+</template>
+
+<style lang='less' scoped>
+
+</style>

+ 10 - 0
src/views/sheetShow/index.vue

@@ -13,6 +13,7 @@ import NoAuth from '@/components/noAuth.vue';
 
 const route = useRoute();
 const code = ref(route.query.code || '')
+const clickId = route.query.clickId || '';
 
 // route.query.fromScene 1智能研报 2研报列表 3英文研报
 // verison 2 可拖拽行高列宽 接收参数sourceId (reportId||pptId)  uid插入时唯一编码
@@ -73,6 +74,14 @@ const refreshSheet = async()=>{
     getInfo('refresh')
 }
 
+const outWrapClick = () => {
+   if(!clickId) return;
+   window.parent.postMessage({
+      type: 'freeReportIframeClick',
+      clickId: clickId,
+   },'*')
+}
+
 </script>
 
 <template>
@@ -82,6 +91,7 @@ const refreshSheet = async()=>{
     v-loading="loading"
     element-loading-spinner="el-icon-loading"
     element-loading-text="加载中..."
+    @click="outWrapClick"
   >
     <!-- <h3 class="title">{{info.ExcelName}}</h3> -->
     <template v-if="haveAuth">