Explorar o código

智能研报资源库版图编辑时显示发布时间

hbchen hai 10 meses
pai
achega
79ac35864f
Modificáronse 2 ficheiros con 7 adicións e 16 borrados
  1. 4 8
      src/views/smartReport/detail.vue
  2. 3 8
      src/views/smartReport/detailPdf.vue

+ 4 - 8
src/views/smartReport/detail.vue

@@ -23,7 +23,7 @@
           <header>{{reportInfo.Title}}</header>
           <div style=" box-sizing:border-box; color:#666; font-size:24px; overflow:hidden;">
             <span>{{ reportInfo.Author}}</span>
-            <span style="float:right;">{{reportInfo.CreateTime}}</span>
+            <span style="float:right;" v-if="[2,6].includes(reportInfo.State)">{{reportInfo.PublishTime}}</span>
           </div>
         </div>
         <div class="abstract" v-if="reportInfo && !!reportInfo.NeedSplice">
@@ -201,16 +201,12 @@ export default {
         : Data.Report.Title + "(" + Data.Report.CreateTime.substring(5, 7) + Data.Report.CreateTime.substring(8, 10) + ")";
       this.reportInfo = Data.Report || {};
       this.headImgStyle=this.reportInfo.HeadStyle?JSON.parse(this.reportInfo.HeadStyle):[]
-      this.headImgStyle.map(st =>{
-        st.value=st.value || st.label
-      })
       this.endImgStyle=this.reportInfo.EndStyle?JSON.parse(this.reportInfo.EndStyle):[]
-      this.endImgStyle.map(st =>{
-        st.value=st.value || st.label
-      })
       this.layoutBaseInfo['研报标题']=this.reportInfo.Title
       this.layoutBaseInfo['研报作者']=this.reportInfo.Author
-      this.layoutBaseInfo['创建时间']=this.reportInfo.CreateTime
+      // 已发布已通过的报告才显示发布时间
+      this.layoutBaseInfo['创建时间']=[2,6].includes(this.reportInfo.State)?this.reportInfo.PublishTime:''
+      
       this.Disclaimer = Data.Disclaimer || "";
       this.isshow = true;
       this.$nextTick(()=>{

+ 3 - 8
src/views/smartReport/detailPdf.vue

@@ -16,7 +16,7 @@
           <header>{{reportInfo.Title}}</header>
           <div style=" box-sizing:border-box; color:#666; font-size:24px; overflow:hidden;">
             <span>{{ reportInfo.Author}}</span>
-            <span style="float:right;">{{reportInfo.CreateTime}}</span>
+            <span style="float:right;" v-if="[2,6].includes(reportInfo.State)">{{reportInfo.PublishTime}}</span>
           </div>
         </div>
         <div class="abstract" v-if="reportInfo && !!reportInfo.NeedSplice">
@@ -81,16 +81,11 @@ export default {
       
       this.reportInfo = Data.Report;
       this.headImgStyle=this.reportInfo.HeadStyle?JSON.parse(this.reportInfo.HeadStyle):[]
-      this.headImgStyle.map(st =>{
-        st.value=st.value || st.label
-      })
       this.endImgStyle=this.reportInfo.EndStyle?JSON.parse(this.reportInfo.EndStyle):[]
-      this.endImgStyle.map(st =>{
-        st.value=st.value || st.label
-      })
       this.layoutBaseInfo['研报标题']=this.reportInfo.Title
       this.layoutBaseInfo['研报作者']=this.reportInfo.Author
-      this.layoutBaseInfo['创建时间']=this.reportInfo.CreateTime
+      // 已发布已通过的报告才显示发布时间
+      this.layoutBaseInfo['创建时间']=[2,6].includes(this.reportInfo.State)?this.reportInfo.PublishTime:''
       this.reportInfo.Content=this.setReportContent(this.reportInfo.Content)
       this.isshow = true;
       this.$nextTick(()=>{