项目客户端前端配置 logo图片更换 代码调整

This commit is contained in:
joylink_cuiweidong 2022-10-31 16:50:12 +08:00
parent e9fc041b03
commit 88cec5d2b0

View File

@ -79,6 +79,7 @@ export default {
data() {
return {
dialogVisible: false,
loginProLogoImg:'',
row:null,
loading: false,
formModel:{
@ -125,7 +126,7 @@ export default {
return crules;
},
computedLoginLogo() {
return this.formModel.loginProLogo ? this.$store.state.user.ossUrl + '/logo/' + this.formModel.loginProLogo : '';
return this.loginProLogoImg ? this.$store.state.user.ossUrl + '/logo/' + this.loginProLogoImg : '';
},
title() {
return '修改前端配置';
@ -138,7 +139,6 @@ export default {
this.row = row;
const viewSetting = JSON.parse(row.viewSetting);
// this.formModel = Object.assign({}, viewSetting);
this.formModel.loginProtitle = viewSetting.loginProtitle || '';
this.formModel.loginOrgTitle = viewSetting.loginOrgTitle || '';
this.formModel.baseDevelopment = viewSetting.baseDevelopment || false;
@ -148,6 +148,7 @@ export default {
this.formModel.loginContectInformation = viewSetting.loginContectInformation || false;
this.formModel.loginProLogo = viewSetting.loginProLogo || '';
this.loginProLogoImg = this.formModel.loginProLogo;
this.formModel.loginProLogoWidth = viewSetting.loginProLogoWidth || 0;
this.formModel.homeProLogoWidth = viewSetting.homeProLogoWidth || 0;
@ -254,6 +255,7 @@ export default {
xhr.onreadystatechange = function() {
if (xhr.readyState === 4 && xhr.status == 200) {
that.formModel.loginProLogo = params.fileName;
that.loginProLogoImg = params.fileName + '?' + Math.random() * 1000;
} else if (xhr.status != 200) {
that.$message.error('上传失败,请稍后再试');
}