Browse Source

Merge branch 'requirement_242' into debug

cldu 2 months ago
parent
commit
691d9bb940

BIN
src/assets/img/eta_base_config/Logo_ch_mini.jpg


BIN
src/assets/img/eta_base_config/Logo_en_mini.jpg


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

@@ -98,6 +98,8 @@ export const BaseConfigEn = {
     english_version:"English Version",
     chinese_version:"Chinese Version",
     recommended_ratio:"Recommended Ratio 4:1",
+    expand_menu:"Expand menu",
+    recommended_ratio_mini:"Collapse menu (recommended ratio 1:1)",
     pc_website_title_Tip:"Please enter the PC website name",
     mobile_website_title_Tip:"Please enter the mobile website name",
     system_logo:"System Logo",
@@ -204,6 +206,8 @@ export const BaseConfigZh = {
     english_version:"英文版",
     chinese_version:"中文版",
     recommended_ratio:"推荐比例4:1",
+    expand_menu:"展开菜单",
+    recommended_ratio_mini:"收起菜单(推荐比例1:1)",
     pc_website_title_Tip:"请输入PC端网站名称",
     mobile_website_title_Tip:"请输入移动端网站名称",
     system_logo:"系统logo",

+ 12 - 4
src/views/Home.vue

@@ -13,7 +13,7 @@
           <img
             class="logo_coll"
             v-else
-            :src="$setting.g_mini_logo"
+            :src="logoMini"
           />
         </div>
         <div
@@ -386,7 +386,11 @@ export default {
     logoLarge() {
       return this.$i18n.locale == 'en' ? this.$store.state.baseInfo.logoEn || require('@/assets/img/en/logo.png'): 
                                           this.$store.state.baseInfo.logoCh || this.$setting.g_logo
-    }
+    },
+    logoMini(){ 
+      return this.$i18n.locale == 'en' ? this.$store.state.baseInfo.LogoENMini || this.$setting.g_mini_logo:
+                                          this.$store.state.baseInfo.LogoCNMini || this.$setting.g_mini_logo
+    },
   },
   data() {
     return {
@@ -931,9 +935,13 @@ export default {
     getSystemInfo(){
       departInterence.getBaseInfo().then(res=>{
         if(res.Ret == 200){
-
           this.$store.commit('SET_BASE_INFO',
-            {logoCh:res.Data.LogoCn?res.Data.LogoCn.ConfVal:'',logoEn:res.Data.LogoEn?res.Data.LogoEn.ConfVal:''}
+            {
+              logoCh:res.Data.LogoCn?res.Data.LogoCn.ConfVal:'',
+              logoEn:res.Data.LogoEn?res.Data.LogoEn.ConfVal:'',
+              LogoCNMini:res.Data.LogoCnMini ? res.Data.LogoCnMini.ConfVal : '',
+              LogoENMini:res.Data.LogoEnMini ? res.Data.LogoEnMini.ConfVal : '',
+            }
           )
         }
       })

+ 46 - 6
src/views/system_manage/etaBaseConfig.vue

@@ -115,7 +115,9 @@
                             <div class="line-form-item-name">{{ $t('SystemManage.BaseConfig.system_logo') }}</div>
                             <div class="line-form-item-name" style="line-height: 30px;" v-permission="permissionBtn.baseConfigPermission.etaBaseConfig_login_systemLogo_pc">{{ $t('SystemManage.BaseConfig.pc') }}</div>
                             <div class="line-form-item" v-permission="permissionBtn.baseConfigPermission.etaBaseConfig_login_systemLogo_pc">
-                                <el-form-item :label="`${$t('SystemManage.BaseConfig.chinese_version')}(${$t('SystemManage.BaseConfig.recommended_ratio')})`" prop="LogoCN">
+                                <el-form-item 
+                                 :label="`${$t('SystemManage.BaseConfig.chinese_version')}(${$t('SystemManage.BaseConfig.expand_menu')}  ${$t('SystemManage.BaseConfig.recommended_ratio')})`" 
+                                 prop="LogoCN" style="width: 68%;">
                                     <ImgUpload 
                                     id="logo-image"
                                     :imgUrl="formData.LogoCN"
@@ -126,7 +128,23 @@
                                     />
                                     <ConfigAnnotation picHintText="" picName="LogoCN" @showImage="previewImage" :buttonText="$t('SystemManage.BaseConfig.view_example_text')"/>
                                 </el-form-item>
-                                <el-form-item :label="`${$t('SystemManage.BaseConfig.english_version')}(${$t('SystemManage.BaseConfig.recommended_ratio')})`" prop="LogoEN">
+
+                                <el-form-item :label="`${$t('SystemManage.BaseConfig.recommended_ratio_mini')}`" prop="LogoCNMini" style="width: 30%;">
+                                    <ImgUpload 
+                                    id="logo-image"
+                                    :imgUrl="formData.LogoCNMini"
+                                    :text="$t('SystemManage.BaseConfig.upload_image_tip')"
+                                    @showImage="showImage"
+                                    @upload="(file)=>handleUploadImage(file,'LogoCNMini')"
+                                    @remove="deleteFormImg('LogoCNMini')"
+                                    />
+                                    <ConfigAnnotation picHintText="" picName="LogoCNMini" @showImage="previewImage" :buttonText="$t('SystemManage.BaseConfig.view_example_text')"/>
+                                </el-form-item>
+                            </div>
+                            <div class="line-form-item" v-permission="permissionBtn.baseConfigPermission.etaBaseConfig_login_systemLogo_pc">
+                                <el-form-item 
+                                 :label="`${$t('SystemManage.BaseConfig.english_version')}(${$t('SystemManage.BaseConfig.expand_menu')}  ${$t('SystemManage.BaseConfig.recommended_ratio')})`" 
+                                 prop="LogoEN" style="width: 68%;">
                                     <ImgUpload 
                                         id="logo-image"
                                         :imgUrl="formData.LogoEN"
@@ -137,9 +155,20 @@
                                     />
                                     <ConfigAnnotation picHintText="" picName="LogoEN" @showImage="previewImage" :buttonText="$t('SystemManage.BaseConfig.view_example_text')"/>
                                 </el-form-item>
+                                <el-form-item :label="`${$t('SystemManage.BaseConfig.recommended_ratio_mini')}`" prop="LogoENMini" style="width: 30%;">
+                                    <ImgUpload 
+                                    id="logo-image"
+                                    :imgUrl="formData.LogoENMini"
+                                    :text="$t('SystemManage.BaseConfig.upload_image_tip')"
+                                    @showImage="showImage"
+                                    @upload="(file)=>handleUploadImage(file,'LogoENMini')"
+                                    @remove="deleteFormImg('LogoENMini')"
+                                    />
+                                    <ConfigAnnotation picHintText="" picName="LogoENMini" @showImage="previewImage" :buttonText="$t('SystemManage.BaseConfig.view_example_text')"/>
+                                </el-form-item>
                             </div>
                             <div class="line-form-item" v-permission="permissionBtn.baseConfigPermission.etaBaseConfig_login_systemLogo_mobile">
-                                <el-form-item :label="$t('SystemManage.BaseConfig.mobile')" prop="LogoMobile" style="width: 50%;">
+                                <el-form-item :label="$t('SystemManage.BaseConfig.mobile')" prop="LogoMobile" style="width: 68%;">
                                     <ImgUpload 
                                     id="logo-image"
                                     :imgUrl="formData.LogoMobile"
@@ -150,7 +179,7 @@
                                     />
                                     <ConfigAnnotation picHintText="" picName="LogoMobile" @showImage="previewImage" :buttonText="$t('SystemManage.BaseConfig.view_example_text')"/>
                                 </el-form-item>
-                                <div style="width: 50%;"></div>
+                                <div style="width: 30%;"></div>
                             </div>
                         </div>
                     </div>
@@ -596,6 +625,8 @@ export default {
                 LogoCN:'',//logo-中文版
                 LogoEN:'',//logo-英文版 
                 LogoMobile:'',//logo-移动端登录页
+                LogoCNMini:'',//logo-中文版收缩
+                LogoENMini:'',//logo-英文版收缩
 
                 ReportLogo: '',
                 ReportCenterLogoShow: false,//研报中心详情logo显示
@@ -634,6 +665,8 @@ export default {
                 LogoCN:[{ required: true, message: '请上传系统中文版Logo', trigger: 'blur' }],
                 LogoEN:[{ required: true, message: '请上传系统英文版Logo', trigger: 'blur' }],
                 LogoMobile:[{ required: true, message: '请上传系统移动端Logo', trigger: 'blur' }],
+                LogoCNMini:[{ required: true, message: '请上传系统中文版收起菜单Logo', trigger: 'blur' }],
+                LogoENMini:[{ required: true, message: '请上传系统英文版收起菜单Logo', trigger: 'blur' }],
             },//表单校验
             disclaimerConfig:{
                 toolbarButtons:[
@@ -693,7 +726,9 @@ export default {
                 'LogoCN':[require('@/assets/img/eta_base_config/Logo_ch.png')],
                 'LogoEN':[require('@/assets/img/eta_base_config/Logo_en.png')],
                 'LogoMobile':[require('@/assets/img/eta_base_config/ETA_mobile_logo.png')],  
-                'ReportLogo': [require('@/assets/img/eta_base_config/report_logo.png')]
+                'ReportLogo': [require('@/assets/img/eta_base_config/report_logo.png')],
+                'LogoCNMini':[require('@/assets/img/eta_base_config/Logo_ch_mini.jpg')],
+                'LogoENMini':[require('@/assets/img/eta_base_config/Logo_en_mini.jpg')],
             },
             /* loading */
             configLoading:null,
@@ -945,7 +980,12 @@ export default {
                         if(res.Ret!==200) return 
                         // 设置logo
                         this.$store.commit('SET_BASE_INFO',
-                            {logoCh:this.formData.LogoCN,logoEn:this.formData.LogoEN}
+                            {
+                               logoCh:this.formData.LogoCN,
+                               logoEn:this.formData.LogoEN,
+                               LogoCNMini:this.formData.LogoCNMini,
+                               LogoENMini:this.formData.LogoENMini,
+                            }
                         )
                         this.$message.success(this.$t('SystemManage.BaseConfig.tip_msg01')||'保存成功,请稍后到对应页面/项目查看')
                     })