diff --git a/backend/src/main/java/io/dataease/service/system/SystemParameterService.java b/backend/src/main/java/io/dataease/service/system/SystemParameterService.java index f499dfd028..015858320e 100644 --- a/backend/src/main/java/io/dataease/service/system/SystemParameterService.java +++ b/backend/src/main/java/io/dataease/service/system/SystemParameterService.java @@ -8,14 +8,17 @@ import io.dataease.controller.sys.response.BasicInfo; import io.dataease.dto.SystemParameterDTO; import io.dataease.exception.DataEaseException; import io.dataease.plugins.common.base.domain.FileMetadata; +import io.dataease.plugins.common.base.domain.SysParamAssist; import io.dataease.plugins.common.base.domain.SystemParameter; import io.dataease.plugins.common.base.domain.SystemParameterExample; import io.dataease.plugins.common.base.mapper.SystemParameterMapper; import io.dataease.plugins.config.SpringContextUtil; import io.dataease.plugins.xpack.cas.dto.CasSaveResult; import io.dataease.plugins.xpack.cas.service.CasXpackService; +import io.dataease.plugins.xpack.display.service.DisplayXpackService; import io.dataease.service.FileService; import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; @@ -26,6 +29,7 @@ import javax.annotation.Resource; import javax.imageio.ImageIO; import java.io.IOException; import java.io.InputStream; +import java.io.UnsupportedEncodingException; import java.util.*; import java.util.concurrent.atomic.AtomicReference; @@ -231,6 +235,20 @@ public class SystemParameterService { systemParameterDTO.setFileName(fileMetadata.getName()); } } + if (systemParameter.getType().equalsIgnoreCase("blob")) { + Map beansOfType = SpringContextUtil.getApplicationContext().getBeansOfType((DisplayXpackService.class)); + DisplayXpackService displayXpackService = null; + if (beansOfType.keySet().size() > 0 && (displayXpackService = SpringContextUtil.getBean(DisplayXpackService.class)) != null) { + String paramValue = systemParameter.getParamValue(); + if (StringUtils.isNotBlank(paramValue)) { + long blobId = Long.parseLong(paramValue); + String content = displayXpackService.readBlob(blobId); + systemParameterDTO.setParamValue(content); + } + } else { + systemParameterDTO.setParamValue(null); + } + } dtoList.add(systemParameterDTO); } dtoList.sort(Comparator.comparingInt(SystemParameter::getSort)); diff --git a/backend/src/main/resources/db/migration/V39__1.14.sql b/backend/src/main/resources/db/migration/V39__1.14.sql index c56403fb58..9b6b96e7f9 100644 --- a/backend/src/main/resources/db/migration/V39__1.14.sql +++ b/backend/src/main/resources/db/migration/V39__1.14.sql @@ -22,3 +22,13 @@ INSERT INTO `sys_menu` VALUES (750, 2, 0, 2, '导入用户', NULL, NULL, 999, NU update system_parameter set sort = (sort + 1) where sort > 3; update system_parameter set sort = 4 where param_key = 'ui.favicon' + +INSERT INTO `system_parameter`(`param_key`, `param_value`, `type`, `sort`) VALUES ('ui.showFoot', NULL, 'text', 18); +INSERT INTO `system_parameter`(`param_key`, `param_value`, `type`, `sort`) VALUES ('ui.footContent', NULL, 'blob', 19); + +CREATE TABLE IF NOT EXISTS `sys_param_assist` ( + `id` BIGINT(21) NOT NULL AUTO_INCREMENT, + `content` MEDIUMBLOB COMMENT '内容', + PRIMARY KEY (id) +) + diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index 9b3f19b905..eae90eb142 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -1987,7 +1987,9 @@ export default { mobileBG: 'Mobile Login page BG', helpLink: 'Help Document Link', homeLink: 'Home Link', - defaultHomeLink: 'Default is the system built-in home page' + defaultHomeLink: 'Default is the system built-in home page', + showFoot: 'Show login page footer', + footContent: 'Foot content' }, auth: { diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js index e1aa224ded..f720d8054e 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -1995,7 +1995,9 @@ export default { mobileBG: '移動端登錄頁背景', helpLink: '幫助文檔鏈接', homeLink: '首頁鏈接', - defaultHomeLink: '默認為系統內置首頁' + defaultHomeLink: '默認為系統內置首頁', + showFoot: '顯示登錄頁腳', + footContent: '頁腳內容' }, auth: { diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index 3699378ee9..ea70df3db7 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -2005,8 +2005,9 @@ export default { mobileBG: '移动端登录页背景', helpLink: '帮助文档链接', homeLink: '首页链接', - defaultHomeLink: '默认为系统内置首页' - + defaultHomeLink: '默认为系统内置首页', + showFoot: '显示登录页脚', + footContent: '页脚内容' }, auth: { no_item_selected: '请在左侧选择组织、角色或用户', diff --git a/frontend/src/views/login/index.vue b/frontend/src/views/login/index.vue index a26f84aa25..bfa93fc323 100644 --- a/frontend/src/views/login/index.vue +++ b/frontend/src/views/login/index.vue @@ -1,64 +1,68 @@ @@ -101,7 +105,9 @@ export default { 'chart-tree', 'dataset-tree' ], - defaultType: 0 + defaultType: 0, + showFoot: false, + footContent: '' } }, computed: { @@ -200,6 +206,13 @@ export default { const faviconUrl = '/system/ui/image/' + this.uiInfo['ui.favicon'].paramValue changeFavicon(faviconUrl) } + if(this.uiInfo['ui.showFoot'] && this.uiInfo['ui.showFoot'].paramValue) { + this.showFoot = this.uiInfo['ui.showFoot'].paramValue === true || this.uiInfo['ui.showFoot'].paramValue === 'true' + if(this.showFoot) { + const content = this.uiInfo['ui.footContent'] && this.uiInfo['ui.footContent'].paramValue + this.footContent = content + } + } }, initCache() { this.clearLocalStorage.forEach(item => { @@ -386,4 +399,16 @@ export default { } } } +.dynamic-login-foot { + visibility: visible; + width: 100%; + position: fixed; + z-index: 302; + bottom: 0; + left: 0; + height: auto; + padding-top: 1px; + zoom: 1; + margin: 0; +}