Selaa lähdekoodia

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

hbchen 6 kuukautta sitten
vanhempi
commit
034e3c02f9

+ 4 - 2
src/lang/modules/systemManage/BaseConfig.js

@@ -67,7 +67,8 @@ export const BaseConfigEn = {
     resource_label02:'Image Type',
     report_title:"Report Title",
     report_author:"Report Author",
-    report_creation_time:"Creation Time",
+    // report_creation_time:"Creation Time",
+    report_release_time:"Release Time",
     select_layout:"Select Layout",
     edit_layout:"Edit Layout",
     completed_step:"Completed Step",
@@ -169,7 +170,8 @@ export const BaseConfigZh = {
     resource_label02:'图片类型',
     report_title:"研报标题",
     report_author:"研报作者",
-    report_creation_time:"创建时间",
+    // report_creation_time:"创建时间",
+    report_release_time:"发布时间",
     select_layout:"选择版图",
     edit_layout:"编辑版图",
     completed_step:"已完成步骤",

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

@@ -22,7 +22,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">
@@ -143,16 +143,11 @@ export default {
                 if(res.Ret===200){
                     this.reportInfo=res.Data || {}
                     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:''
                     if(this.$route.query.type==='preview'){
                        this.content=sessionStorage.getItem('smartReportContent')
                        this.bgColor=sessionStorage.getItem('smartReportContentBg')

+ 9 - 4
src/views/system_manage/components/smartReportImgSet.vue

@@ -215,9 +215,13 @@ export default {
             },
             step:1,
             steps:[this.$t('SystemManage.BaseConfig.select_layout'),this.$t('SystemManage.BaseConfig.edit_layout')],
+            /**
+             * value不能变 
+             * 一开始定义为创建时间,后面改为发布时间
+             */
             layoutOptions:[{value:'研报标题',label:this.$t('SystemManage.BaseConfig.report_title')},//研报标题
                             {value:'研报作者',label:this.$t('SystemManage.BaseConfig.report_author')},//研报作者
-                            {value:'创建时间',label:this.$t('SystemManage.BaseConfig.report_creation_time')}],//创建时间
+                            {value:'创建时间',label:this.$t('SystemManage.BaseConfig.report_release_time')}],//发布时间
             layoutItems:[],
             // currentLayout:{},
             layoutFont:{
@@ -479,8 +483,8 @@ export default {
                 try {
                     this.layoutItems=this.formData.layout?JSON.parse(this.formData.layout).map(it =>{
                         return {
-                            value:it.value || it.label,
-                            label:this.convertLabel(it.value || it.label),
+                            value:it.value,
+                            label:this.convertLabel(it.value),
                             x:this.percent2Number(it.left,backgroundWidth),
                             y:this.percent2Number(it.top,backgroundGHeight),
                             z:1,
@@ -782,7 +786,8 @@ export default {
         }
     }
     .layout-background{
-        background-color: #D9D9D9;
+        // background-color: #D9D9D9;
+        border: solid 1px #D9D9D9;
         margin-left: 43px;
         width: 400px;
         text-align: center;