Browse Source

Merge branch 'eta2.4.5'

shanbinzhang 6 days ago
parent
commit
63d1d4d128

+ 2 - 1
src/CustomElement/EtaChart.ce.vue

@@ -35,7 +35,8 @@ async function getChartData(){
             IsReplace:1
         }): await chartInfoByCode({
             UniqueCode:params.code,
-            IsReplace:1
+            IsReplace:1,
+            AuthToken: params.authToken || ''
         })
         if(res.Ret!==200) return
         chartInfo.value=res.Data.ChartInfo

+ 2 - 1
src/CustomElement/EtaTable.ce.vue

@@ -31,7 +31,8 @@ async function getTableData(){
         UniqueCode: params.code,
         FromScene: Number(params.fromScene||''),
         ReferencedId: Number(params.sourceId||''),
-        Uuid: params.uid||""
+        Uuid: params.uid||"",
+        AuthToken: params.authToken || ''
     });
     if(res.Ret !== 200) return
 

+ 10 - 0
src/api/common.js

@@ -93,4 +93,14 @@ export function getSystemInfo(){
  */
 export function uploadImgAPi(params) {
     return post('/banner/upload',params)
+}
+
+
+/**
+ * 获取复制链接
+ * @param {*} params 
+ * @returns 
+ */
+export function shareGenerate(params){
+    return post('/report/share/generate',params)
 }

+ 5 - 0
src/api/etaConfig.js

@@ -8,4 +8,9 @@ import { get,post } from "./index";
  */
 export const getBaseConfig = params =>{
     return get('/business_conf/fetch',params)
+}
+
+  /* 图表分享的临时有效期token */
+export const getChartShareToken = params => {
+    return get('/datamanage/chart_info/common/general_token',params)
 }

+ 6 - 2
src/hooks/useReportApprove.js

@@ -6,14 +6,17 @@ export function useReportApprove(){
     let isApprove = ref(false)
     let isOtherApprove = ref(false)
     let hasApproveFlow = ref(false)
+    const isLinkChartExpired = ref(false)//报告插入的图表是否开启有效期
+
     const configSettingStore = useConfigSettingStore()
     const { etaConfigInfo } = storeToRefs(configSettingStore)
     //获取基本配置,判断是否走审批流
     const getEtaConfig = async()=>{
         await configSettingStore.getBaseConfigSetting()
-        const {IsReportApprove='',ReportApproveType=''} = etaConfigInfo.value
+        const {IsReportApprove='',ReportApproveType='',IsOpenChartExpired} = etaConfigInfo.value
         isApprove.value = IsReportApprove==='true'?true:false
         isOtherApprove.value = isApprove.value&&ReportApproveType==='other' 
+        isLinkChartExpired.value = IsOpenChartExpired==='true'?true:false;
     }
     //检查分类是否存在审批流
     const checkClassifyNameArr = (type=1,classify=[])=>{
@@ -33,6 +36,7 @@ export function useReportApprove(){
         isOtherApprove,
         hasApproveFlow,
         getEtaConfig,
-        checkClassifyNameArr
+        checkClassifyNameArr,
+        isLinkChartExpired
     }
 }

+ 7 - 1
src/views/chartETA/ChartDetail.vue

@@ -6,6 +6,7 @@ import { useRoute, useRouter } from 'vue-router'
 import { useWindowSize } from '@vueuse/core'
 import {yearSelectOpt,sameOptionType} from '@/hooks/chart/config'
 import {useChartRender} from '@/hooks/chart/render'
+import { getChartShareExpireToken } from './hooks/useChartSharedToken'
 import moment from 'moment'
 import EdbInfo from './components/EdbInfo.vue'
 import SourceDetail from './components/SourceDetail.vue'
@@ -394,7 +395,12 @@ async function getShareLink(){
     }
     if(!confirmFlag.value) return 
     // const linkUrl = `${import.meta.env.VITE_CHART_LINK}?code=${chartInfo.value.UniqueCode}&fromType=share&lang=${currentLang}`
-    const linkUrl = `${publicSettingStore.publicSetting.ChartViewUrl}/chartshow?code=${chartInfo.value.UniqueCode}&fromType=share&lang=${currentLang}`
+
+    //临时权限token
+    const res = await getChartShareExpireToken(chartInfo.value.UniqueCode);
+    if(res.Ret !== 200) return
+
+    const linkUrl = `${publicSettingStore.publicSetting.ChartViewUrl}/chartshow?code=${chartInfo.value.UniqueCode}&fromType=share&lang=${currentLang}&authToken=${res.Data}`
     //console.log('url',linkUrl)
     if(navigator.clipboard&&window.isSecureContext){
          try{

+ 15 - 0
src/views/chartETA/hooks/useChartSharedToken.js

@@ -0,0 +1,15 @@
+
+import { getBaseConfig,getChartShareToken } from '@/api/etaConfig.js';
+
+/* 分享图表link时 加有效期超时无权限 Source chart/table*/
+export async function getChartShareExpireToken(UniqueCode='',Source="chart") {
+    const res = await getBaseConfig();
+    if(res.Ret!==200) return
+    
+    const { IsOpenChartExpired } = res.Data;
+    let needCheckAuth = IsOpenChartExpired==='true'?true:false;
+    
+    if(!needCheckAuth) return { Data:'',Ret:200 }
+    return await getChartShareToken({ UniqueCode,Source })
+
+}

+ 7 - 2
src/views/myETA/ChartDetail.vue

@@ -22,6 +22,7 @@ import ChartSaveOther from './components/ChartSaveOther.vue'
 import _ from 'lodash';
 import { useWindowSize } from '@vueuse/core'
 import {setClipboardData} from '@/hooks/common'
+import { getChartShareExpireToken } from '@/views/chartETA/hooks/useChartSharedToken'
 import SetChartEnName from '@/components/SetChartEnName.vue'
 import {useCachedViewsStore} from '@/store/modules/cachedViews'
 import AddChartToMyETA from '@/views/chartETA/components/AddChartToMyETA.vue'
@@ -587,9 +588,13 @@ async function handleChartRefresh(){
 }
 
 //分享
-function handleChartShare(){
+async function handleChartShare(){
     // const url=import.meta.env.VITE_CHART_LINK+`?code=${chartInfo.value.UniqueCode}&fromType=share&lang=ch`
-    const url=publicSettingStore.publicSetting.ChartViewUrl+`/chartshow?code=${chartInfo.value.UniqueCode}&fromType=share&lang=ch`
+    //临时权限token
+    const res = await getChartShareExpireToken(chartInfo.value.UniqueCode);
+    if(res.Ret !== 200) return
+
+    const url=publicSettingStore.publicSetting.ChartViewUrl+`/chartshow?code=${chartInfo.value.UniqueCode}&fromType=share&lang=ch&authToken=${res.Data}`
     setClipboardData(url)
 }
 //保存图表:目前myETA里能保存的只有ETA图库的图和商品价格曲线图

+ 25 - 6
src/views/report/EditReport.vue

@@ -7,6 +7,7 @@ import ReportPublishTimeSet from './components/ReportPublishTimeSet.vue'
 import apiReport from '@/api/report'
 // import {getSystemInfo} from '@/api/common'
 import moment from 'moment'
+import { getChartShareToken } from '@/api/etaConfig.js';
 import { showToast,showDialog } from 'vant'
 import { useRoute, useRouter } from 'vue-router'
 import {useCachedViewsStore} from '@/store/modules/cachedViews'
@@ -18,7 +19,7 @@ import { useReportHandles,useChapterRepoprtHandles } from './hooks/useReport'
 
 const cachedViewsStore=useCachedViewsStore()
 const publicSettingStore = usePublicSettingStore()
-const {isApprove,hasApproveFlow,getEtaConfig,checkClassifyNameArr} = useReportApprove()
+const {isApprove,hasApproveFlow,getEtaConfig,checkClassifyNameArr,isLinkChartExpired} = useReportApprove()
 const router=useRouter()
 const route=useRoute()
 const {checkAuthBtn} = useAuthBtn()
@@ -157,6 +158,18 @@ async function handleReportBaseInfoChange(e){
     showReportBaseInfo.value=false
 }
 
+
+async function getLinkAuthToken(UniqueCode,Source='chart') {
+    let authToken = ''
+    if(isLinkChartExpired.value) { //开启了图表有效期
+        const res = await getChartShareToken({ UniqueCode,Source })
+        if(res.Ret !== 200) return
+        authToken = res.Data;
+    }
+
+    return authToken;
+}
+
 // 报告插入数据弹窗
 const showReportInsertPop=ref(false)
 /**
@@ -164,7 +177,7 @@ const showReportInsertPop=ref(false)
  * type:iframe/img 插入的为iframe或者图片
  * chartType: chart-图表,sheet-表格
  */
-function handleInsert({list,type,chartType}){
+async function handleInsert({list,type,chartType}){
     reportContentEditorIns.events.focus()
     if(lastFocusPosition.value){
         reportContentEditorIns.selection.get().removeAllRanges()
@@ -172,21 +185,27 @@ function handleInsert({list,type,chartType}){
     }
     if(type==='iframe'){
         let link=publicSettingStore.publicSetting.ChartViewUrl;
+
         if(chartType==='chart'){
             // link=import.meta.env.MODE==='production'?'https://chartlib.hzinsights.com/chartshow':'https://charttest.hzinsights.com/chartshow'
             link=link+'/chartshow'
-            list.forEach(item => {
+            list.forEach(async(item) => {
+                //临时权限token
+                let authToken = await getLinkAuthToken(item);
                 const isETAForumChart=item.startsWith('isETAForumChart_')?true:false
                 reportContentEditorIns.html.insert(`<p style='text-align:left; margin-top:10px;'>
-						<iframe src='${link}?code=${isETAForumChart?item.replace(/^isETAForumChart_/, ''):item}&fromPage=&isETAForumChart=${isETAForumChart}' width='100%' height='350' style='border-width:0px; min-height:350px;'></iframe>
+						<iframe src='${link}?code=${isETAForumChart?item.replace(/^isETAForumChart_/, ''):item}&fromPage=&isETAForumChart=${isETAForumChart}&authToken=${authToken}' width='100%' height='350' style='border-width:0px; min-height:350px;'></iframe>
 					</p>`,false)
             });
         }else if(chartType==='sheet'){
             // link=import.meta.env.MODE==='production'?'https://chartlib.hzinsights.com/sheetshow':'https://charttest.hzinsights.com/sheetshow'
             link=link+'/sheetshow'
-            list.forEach(item => {
+            list.forEach(async(item) => {
+                //临时权限token
+                let authToken = await getLinkAuthToken(item,'table');
+
                 reportContentEditorIns.html.insert(`<p style='text-align:left; margin-top:10px;'>
-						<iframe src='${link}?code=${item}' class='iframe${item}'  width='100%' style='border-width:0px;'></iframe>
+						<iframe src='${link}?code=${item}&authToken=${authToken}' class='iframe${item}'  width='100%' style='border-width:0px;'></iframe>
 					</p>`,false)
             });
         }

+ 71 - 17
src/views/report/PreviewDetail.vue

@@ -1,6 +1,8 @@
 <script setup name="ReportPreview">
 import { ref,computed, nextTick, reactive,toRefs } from 'vue'
 import { useRoute, useRouter } from "vue-router";
+import {getSystemInfo,shareGenerate} from '@/api/common'
+import {Base64} from 'js-base64'
 import apiReport from '@/api/report'
 import AudioBox from './components/AudioBox.vue'
 import {showToast} from 'vant'
@@ -8,6 +10,8 @@ import {reportManageBtn,useAuthBtn} from '@/hooks/useAuthBtn'
 import { copyText } from 'vue3-clipboard'
 import {usePublicSettingStore} from '@/store/modules/publicSetting'
 import vueQr from 'vue-qr/src/packages/vue-qr.vue'
+import { useConfigSettingStore } from '@/store/modules/etaConfig'
+import { storeToRefs } from 'pinia'
 
 
 const {checkAuthBtn} = useAuthBtn()
@@ -35,8 +39,20 @@ function formatSmartStyle() {
     })
 }
 
+const configStore = useConfigSettingStore()
+const { etaConfigInfo } = storeToRefs(configStore)
+    //获取基本配置,判断是否走审批流
+async function getEtaConfig(){
+    await configStore.getBaseConfigSetting()
+}
+getEtaConfig()
+const dynamicClassName = computed(() => {
+    return etaConfigInfo.value.IsOpenChartExpired==='true'?'select-text-disabled':'';
+})
+
 // 获取报告详情
 let reportInfo=ref(null)
+let shareUrls=ref(null)
 const smartState = reactive({
     bgColor:'',
     headImgStyle:null,//版头style
@@ -69,6 +85,7 @@ async function getReportDetail(){
         if(res.Data.ReportLayout===2){
             formatSmartStyle()
         }
+        getSystemInfoFun()
     }
 }
 if(route.query.id==-1){
@@ -84,36 +101,73 @@ const { bgColor,headImgStyle,endImgStyle,layoutBaseInfo } = toRefs(smartState)
 
 
 const showImgPop = ref(false)
-const linkUrl = computed(() =>{
-    console.log(publicSettingStore)
+const handleCopyLink = (type) =>{
     let str=''
+    let url=''
     const baseUrl= publicSettingStore.publicSetting.ReportViewUrl;
     if(reportInfo.value.ReportCode){
         // 设置水印文案
-        let waterMarkStr= '';
+        // let waterMarkStr= '';
 
         str= reportInfo.value.ReportLayout===1 
-            ? `${baseUrl}/reportshare_crm_report?code=${reportInfo.value.ReportCode}&flag=${waterMarkStr}& ${reportInfo.value.Title}`
-            : `${baseUrl}/reportshare_smart_report?code=${reportInfo.value.ReportCode}&flag=${waterMarkStr}& ${reportInfo.value.Title}`
+            ? `${baseUrl}/reportshare_crm_report?code=${reportInfo.value.ReportCode}&flag=${waterMarkStr.value}& ${reportInfo.value.Title}`
+            : `${baseUrl}/reportshare_smart_report?code=${reportInfo.value.ReportCode}& ${reportInfo.value.Title}`
+
+        const params={
+            "Url":str,
+            "ReportId":reportInfo.value.Id
+        } 
+        shareGenerate(params).then(res=>{
+            if(res.Ret===200){
+                console.log(res)
+                if(location.port=='5173'){
+                    url='http://8.136.199.33:8611'
+                }else{
+                    url=location.origin
+                }
+                shareUrls.value=url+'/v1/share/'+res.Data.UrlToken
+
+                if(type==='urcode') {
+                    showImgPop.value=true 
+                }else {
+                    copyText(shareUrls.value,undefined,(error,event)=>{
+                        if(error){
+                            showToast('复制链接失败')
+
+                            throw new Error('复制数据失败'+JSON.stringify(error))
+                        }else{
+                            showToast('复制链接成功')
+                        }
+                    })
+                }
+            }
+        })
     }
-    
-    return str
+}
+const shareCodeUrls = computed(() => {
+    let index = shareUrls.value.indexOf(' ');
+    return shareUrls.value.substring(0,index)
 })
-function handleCopyLink() {
-    copyText(linkUrl.value,undefined,(error,event)=>{
-        if(error){
-            showToast('复制链接成功')
 
-            throw new Error('复制数据失败'+JSON.stringify(error))
-        }else{
-            showToast('复制链接成功')
+const waterMarkStr=ref('')
+const getSystemInfoFun=()=>{
+    getSystemInfo().then(res=>{
+        if(res.Ret===200){
+          const systemUserInfo=res.Data
+          // 设置水印文案
+          let waterMarkString=''
+          if(systemUserInfo){
+            waterMarkString=`${systemUserInfo.RealName}${systemUserInfo.Mobile?systemUserInfo.Mobile:systemUserInfo.Email}`
+            waterMarkString=encodeURIComponent(waterMarkString)
+            waterMarkStr.value=Base64.encode(waterMarkString)
+          }
         }
     })
 }
 </script>
 
 <template>
-    <div class="report-detail-page" v-if="reportInfo" :style="{backgroundColor:bgColor}">
+    <div class="report-detail-page" :class="dynamicClassName" v-if="reportInfo" :style="{backgroundColor:bgColor}">
         <!-- <div class="top-stage-box" v-if="$route.query.id!=-1">
             <span class="stage">第{{reportInfo.Stage}}期 / {{reportInfo.Frequency}}</span>
         </div> -->
@@ -177,7 +231,7 @@ function handleCopyLink() {
                 <img class="icon" src="@/assets/imgs/report/icon_copy.png" alt="">
                 <div>复制链接</div>
             </div>
-            <div class="item" @click="showImgPop=true" v-permission="reportManageBtn.reportManage_reportView_wechartShare">
+            <div class="item" @click="handleCopyLink('urcode')" v-permission="reportManageBtn.reportManage_reportView_wechartShare">
                 <img class="icon" src="@/assets/imgs/report/icon_wx_black.png" alt="">
                 <div>微信分享</div>
             </div>
@@ -189,7 +243,7 @@ function handleCopyLink() {
         v-model:show="showImgPop" 
         round
     >
-        <vue-qr :text="linkUrl" colorDark="#333" colorLight="#fff" :dotScale="1"></vue-qr>
+        <vue-qr :text="shareCodeUrls" colorDark="#333" colorLight="#fff" :dotScale="1"></vue-qr>
     </van-popup>
 </template>
 

+ 1 - 1
src/views/report/chapter/Preview.vue

@@ -25,7 +25,7 @@ async function getChapterDetail(){
 getChapterDetail()
 </script>
 <template>
-    <div class="report-detail-page" v-if="reportInfo">
+    <div class="report-detail-page select-text-disabled" v-if="reportInfo">
         <h1 class="report-title">{{reportInfo.Title}}</h1>
         <div class="auth-box">
             <span>{{reportInfo.Author}}</span>

+ 36 - 17
src/views/report/smartReport/EditReport.vue

@@ -4,6 +4,7 @@ import { V3ColorPicker } from "v3-color-picker-teleport"
 import ReportInsertContent from '../components/reportInsert/Index.vue'
 import ReportPublishTimeSet from '../components/ReportPublishTimeSet.vue'
 import apiReport from '@/api/report'
+import { getChartShareToken } from '@/api/etaConfig.js';
 import _ from 'lodash'
 import moment from 'moment'
 import { showToast,showDialog } from 'vant'
@@ -26,7 +27,7 @@ import ReportLayoutImg from './components/ReportLayoutImg.vue'
 
 const cachedViewsStore=useCachedViewsStore()
 const publicSettingStore = usePublicSettingStore()
-const {isApprove,hasApproveFlow,getEtaConfig,checkClassifyNameArr} = useReportApprove()
+const {isApprove,hasApproveFlow,getEtaConfig,checkClassifyNameArr,isLinkChartExpired} = useReportApprove()
 const router=useRouter()
 const route=useRoute()
 const {checkAuthBtn} = useAuthBtn()
@@ -159,6 +160,18 @@ watch(
 )
 
 
+async function getLinkAuthToken(UniqueCode,Source='chart') {
+    let authToken = ''
+    if(isLinkChartExpired.value) { //开启了图表有效期
+        const res = await getChartShareToken({ UniqueCode,Source })
+        if(res.Ret !== 200) return
+        authToken = res.Data;
+    }
+
+    return authToken;
+}
+
+
 /* map类型对应组件 */
 function getComponentName(item){
   const temMap=new Map([
@@ -499,7 +512,7 @@ function handleOpenComPop(e) {
   showReportInsertPop.value = true
 }
 /* 插入图表表格 */
-function handleChartInsert({list,type,chartType}){
+async function handleChartInsert({list,type,chartType}){
 		console.log(list,type,chartType)
     let tempCompDataArr=[]
     
@@ -509,30 +522,36 @@ function handleChartInsert({list,type,chartType}){
 
           link=link+'/chartshow'
 
-          tempCompDataArr = list.map(item =>{
+					for(let item of list) {
+						//临时权限token
+						const authToken = await getLinkAuthToken(item);
 						const isETAForumChart=item.startsWith('isETAForumChart_')?true:false
-						console.log(item,isETAForumChart);
-						return {
+						tempCompDataArr.push({
 							compId:3,
 							compType:'chart',
 							id:getCompId(3),
-							content:`${link}?code=${isETAForumChart?item.replace(/^isETAForumChart_/, ''):item}&isETAForumChart=${isETAForumChart}`,
+							content:`${link}?code=${isETAForumChart?item.replace(/^isETAForumChart_/, ''):item}&isETAForumChart=${isETAForumChart}&authToken=${authToken}`,
 							titleText: '',
 							style:'height:350px',
 							child:[]
-						}
-					})
+						})
+					}
         }else if(chartType==='sheet'){
             link=link+'/sheetshow'
-            tempCompDataArr = list.map(item =>({
-                compId:4,
-                compType:'sheet',
-                id:getCompId(4),
-                content:`${link}?code=${item}&fromScene=1`,
-                titleText: '',
-                style:'',
-                child:[]
-            }))
+
+						for(let item of list) {
+							//临时权限token
+							const authToken = await getLinkAuthToken(item,'table');
+							tempCompDataArr.push({
+								compId:4,
+								compType:'sheet',
+								id:getCompId(4),
+								content:`${link}?code=${item}&fromScene=1&authToken=${authToken}`,
+								titleText: '',
+								style:'',
+								child:[]
+							})
+						}
         }
     }else if(type==='img'){
 

+ 23 - 5
src/views/reportEn/AddReport.vue

@@ -5,6 +5,7 @@ import ReportInsertContent from '../report/components/reportInsert/Index.vue'
 import ReportPublishTimeSet from '@/views/report/components/ReportPublishTimeSet.vue'
 import apiReportEn from '@/api/reportEn'
 import apiChart from '@/api/chart'
+import { getChartShareToken } from '@/api/etaConfig.js';
 import {getSystemInfo} from '@/api/common'
 import moment from 'moment'
 import { showToast,showDialog } from 'vant'
@@ -20,7 +21,7 @@ const cachedViewsStore=useCachedViewsStore()
 const router=useRouter()
 const route=useRoute()
 const publicSettingStore = usePublicSettingStore()
-const {isApprove,hasApproveFlow,getEtaConfig,checkClassifyNameArr} = useReportApprove()
+const {isApprove,hasApproveFlow,getEtaConfig,checkClassifyNameArr,isLinkChartExpired} = useReportApprove()
 
 const {lastFocusPosition,frolaEditorContentChange,imgUploadFlag,initFroalaEditor}=useInitFroalaEditor()
 
@@ -160,6 +161,18 @@ function handleSaveOverview(){
 }
 
 
+async function getLinkAuthToken(UniqueCode,Source='chart') {
+    let authToken = ''
+    if(isLinkChartExpired.value) { //开启了图表有效期
+        const res = await getChartShareToken({ UniqueCode,Source })
+        if(res.Ret !== 200) return
+        authToken = res.Data;
+    }
+
+    return authToken;
+}
+
+
 // 报告插入数据弹窗
 const showReportInsertPop=ref(false)
 /**
@@ -178,18 +191,23 @@ function handleInsert({list,type,chartType}){
         if(chartType==='chart'){
             // link=import.meta.env.MODE==='production'?'https://chartlib.hzinsights.com/chartshow':'https://charttest.hzinsights.com/chartshow'
             link=link+'/chartshow'
-            list.forEach(item => {
+            list.forEach(async(item) => {
+                //临时权限token
+                let authToken = await getLinkAuthToken(item);
                 const isETAForumChart=item.startsWith('isETAForumChart_')?true:false
                 reportContentIns.html.insert(`<p style='text-align:left; margin-top:10px;'>
-						<iframe src='${link}?code=${isETAForumChart?item.replace(/^isETAForumChart_/, ''):item}&fromPage=en&isETAForumChart=${isETAForumChart}' width='100%' height='350' style='border-width:0px; min-height:350px;'></iframe>
+						<iframe src='${link}?code=${isETAForumChart?item.replace(/^isETAForumChart_/, ''):item}&fromPage=en&isETAForumChart=${isETAForumChart}&authToken=${authToken}' width='100%' height='350' style='border-width:0px; min-height:350px;'></iframe>
 					</p>`)
             });
         }else if(chartType==='sheet'){
             // link=import.meta.env.MODE==='production'?'https://chartlib.hzinsights.com/sheetshow':'https://charttest.hzinsights.com/sheetshow'
             link=link+'/sheetshow'
-            list.forEach(item => {
+            list.forEach(async(item) => {
+                //临时权限token
+                let authToken = await getLinkAuthToken(item,'table');
+
                 reportContentIns.html.insert(`<p style='text-align:left; margin-top:10px;'>
-						<iframe src='${link}?code=${item}' class='iframe${item}'  width='100%' style='border-width:0px;'></iframe>
+						<iframe src='${link}?code=${item}&authToken=${authToken}' class='iframe${item}'  width='100%' style='border-width:0px;'></iframe>
 					</p>`)
             });
         }

+ 15 - 2
src/views/reportEn/Detail.vue

@@ -1,9 +1,11 @@
 <script setup name="reportEnDetail">
-import {ref} from 'vue'
+import {ref,computed} from 'vue'
 import { useRoute, useRouter } from "vue-router";
 import apiReportEn from '@/api/reportEn'
 import { showToast,showDialog } from 'vant';
 import {enReportManageBtn,useAuthBtn} from '@/hooks/useAuthBtn'
+import { useConfigSettingStore } from '@/store/modules/etaConfig'
+import { storeToRefs } from 'pinia'
 const {checkAuthBtn} = useAuthBtn()
 
 const route=useRoute()
@@ -58,10 +60,21 @@ async function goEdit(){
     })
 }
 
+const configStore = useConfigSettingStore()
+const { etaConfigInfo } = storeToRefs(configStore)
+    //获取基本配置,判断是否走审批流
+async function getEtaConfig(){
+    await configStore.getBaseConfigSetting()
+}
+getEtaConfig()
+const dynamicClassName = computed(() => {
+    return etaConfigInfo.value.IsOpenChartExpired==='true'?'select-text-disabled':'';
+})
+
 </script>
 
 <template>
-    <div class="report-detail-page" v-if="reportInfo">
+    <div class="report-detail-page" :class="dynamicClassName" v-if="reportInfo">
         <div class="top-stage-box" v-if="route.query.id>0">
             <span class="stage">第{{reportInfo.Stage}}期 / {{reportInfo.Frequency}}</span>
             <img v-if="reportInfo.State==1&&checkAuthBtn(enReportManageBtn.enReport_reportEdit)" class="edit-icon" src="@/assets/imgs/report/icon_edit2.png" alt="" @click="goEdit">