From fe29cab3d9bf8ddfeb1bc93a25a79c20276d8171 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期二, 30 十二月 2025 15:35:49 +0800
Subject: [PATCH] 最新版本541200007最新版本541200007
---
server/system_service/src/main/java/com/doumee/core/utils/Constants.java | 2
admin/src/views/index.vue | 5 +
admin/src/views/login.vue | 48 ++++++++++------
admin/src/api/system/common.js | 3 +
server/system_service/src/main/java/com/doumee/dao/system/vo/SystemConfigVo.java | 17 +++++
server/system_gateway/src/main/java/com/doumee/api/gateway/JwtAuthController.java | 14 ++++
admin/src/components/common/CommonHeader.vue | 38 ++++++++----
admin/public/index.html | 3
admin/src/router/index.js | 12 ++--
admin/src/store/index.js | 15 +++-
10 files changed, 112 insertions(+), 45 deletions(-)
diff --git a/admin/public/index.html b/admin/public/index.html
index 4dba259..942ca7d 100644
--- a/admin/public/index.html
+++ b/admin/public/index.html
@@ -5,7 +5,8 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
- <title>鑺滄箹鐑熻崏鏅烘収瀹夋秷瀹夊叏闃茶寖绯荤粺</title>
+ <title>
+ title: process.env.VUE_APP_TITLE,</title>
</head>
<body>
<noscript>
diff --git a/admin/src/api/system/common.js b/admin/src/api/system/common.js
index cc299e9..03ebdbf 100644
--- a/admin/src/api/system/common.js
+++ b/admin/src/api/system/common.js
@@ -9,6 +9,9 @@
export function loginByPassword (data) {
return request.post('/login', data)
}
+export function getSystemConfig () {
+ return request.get('/systemConfig')
+}
export function loginByPhone (data) {
return request.post('/loginByPhone', data)
}
diff --git a/admin/src/components/common/CommonHeader.vue b/admin/src/components/common/CommonHeader.vue
index 73c9470..8773c62 100644
--- a/admin/src/components/common/CommonHeader.vue
+++ b/admin/src/components/common/CommonHeader.vue
@@ -2,7 +2,7 @@
<div class="common-header">
<div class="header">
<div class="logo">
- <div class="title"> <img src="@/assets/system.png" alt="" />{{ title }}</div>
+ <div class="title"> <img src="@/assets/system.png" alt="" />{{sysConfig.subtitle || title }}</div>
<div class="list">
<div :class="index==currentIndex?'item active':'item'" v-for="(item,index) in topMenuList.list" :key="item.id" @click="getHeaderNav(item,index)" :index="index">{{item.label}}
<div v-if="index==currentIndex" class="linellae"></div>
@@ -81,7 +81,7 @@
<script>
import { mapState, mapMutations } from 'vuex'
import GlobalAlertWindow from './GlobalAlertWindow'
-import { logout, updatePwd } from '@/api/system/common'
+import { getSystemConfig, logout, updatePwd } from '@/api/system/common'
import { getAppHeaderNav } from '@/api'
export default {
name: 'CommonHeader',
@@ -128,13 +128,13 @@
}
},
computed: {
- ...mapState(['menuData', 'userInfo', 'topMenuList', 'currentIndex'])
+ ...mapState(['menuData', 'userInfo', 'topMenuList', 'currentIndex', 'sysConfig'])
// title () {
// return this.$route.meta.title
// }
},
created () {
-
+ this.getSystemConfig()
},
mounted () {
// needChangePwd 0 : 榛樿瀵嗙爜闇�瑕佷慨鏀癸紝1 涓嶉渶瑕�
@@ -155,13 +155,23 @@
}
},
methods: {
- ...mapMutations(['setUserInfo', 'switchCollapseMenu', 'clearUserInfo', 'setTopMenuCurrent', 'setCurrentIndex']),
+ ...mapMutations(['setUserInfo', 'switchCollapseMenu', 'clearUserInfo', 'setTopMenuCurrent', 'setCurrentIndex', 'setSysconfig']),
// 淇敼瀵嗙爜
changePwd () {
this.visible.changePwd = true
this.$nextTick(() => {
this.$refs.changePwdDataForm.resetFields()
})
+ },
+ getSystemConfig () {
+ if (!this.sysConfig.subTitle) {
+ getSystemConfig()
+ .then((res) => {
+ if (res && res.subtitle) {
+ this.setSysconfig(res)
+ }
+ })
+ }
},
validatePassword (rule, value, callback) {
if (!value) {
@@ -181,11 +191,11 @@
// } else {
// callback() // 楠岃瘉閫氳繃
// }
- let typeCount = 0;
- if (/[a-z]/.test(value)) typeCount++; // 灏忓啓瀛楁瘝
- if (/[A-Z]/.test(value)) typeCount++; // 澶у啓瀛楁瘝
- if (/\d/.test(value)) typeCount++; // 鏁板瓧
- if (/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/.test(value)) typeCount++; // 鐗规畩瀛楃
+ let typeCount = 0
+ if (/[a-z]/.test(value)) typeCount++ // 灏忓啓瀛楁瘝
+ if (/[A-Z]/.test(value)) typeCount++ // 澶у啓瀛楁瘝
+ if (/\d/.test(value)) typeCount++ // 鏁板瓧
+ if (/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/.test(value)) typeCount++ // 鐗规畩瀛楃
if (typeCount >= 3) {
callback()
} else {
@@ -193,11 +203,11 @@
}
}
},
- getHeaderNav (item,index) {
+ getHeaderNav (item, index) {
this.setCurrentIndex(index)
- if(item.linkType === 0){
+ if (item.linkType === 0) {
this.setTopMenuCurrent(item)
- }else{
+ } else {
if (item.url && item.url === 'goHKAF' && item.params != null) {
this.getHKAFHeaderNav(item.params, item.label)
} else if (item.url && item.url.indexOf('http') === 0) {
@@ -208,7 +218,7 @@
getHKAFHeaderNav (type, label) {
getAppHeaderNav(type).then(res => {
if (label === '瀹夐槻涓績') {
- let openWindow = window.open(res, '_blank')
+ const openWindow = window.open(res, '_blank')
// setTimeout(() => {
// openWindow.close()
// }, 7 * 1000)
diff --git a/admin/src/router/index.js b/admin/src/router/index.js
index e94e5e1..e4e4d6c 100644
--- a/admin/src/router/index.js
+++ b/admin/src/router/index.js
@@ -101,17 +101,17 @@
router.afterEach((to, from, failure) => {
setTimeout(function () {
computeTableHeightIndex()
- window.addEventListener('resize', function(){
- computeTableHeightIndex()}
+ window.addEventListener('resize', function () {
+ computeTableHeightIndex()
+ }
)
}, 1000)
-
})
function computeTableHeightIndex () {
const height = window.innerHeight
// console.log('beforeEach========================锛�' + height)
const height13 = getEleHeghtByClassName('common-header', 0)
- const height4 = getEleHeghtByClassName('table-pagination', 0,-20)
+ const height4 = getEleHeghtByClassName('table-pagination', 0, -20)
const height5 = document.getElementsByTagName('thead') && document.getElementsByTagName('thead')[0] ? document.getElementsByTagName('thead')[0].clientHeight : 0
if (document.getElementsByClassName('main_app') && document.getElementsByClassName('main_app')[0]) {
// console.log('main_app========================')
@@ -123,8 +123,8 @@
const height9 = getEleHeghtByClassName('static_wrap', 0)
const height10 = getEleHeghtByClassName('query_btns', 0)
const height11 = getEleHeghtByClassName('el-tabs-ele', 0)
- const height12 = getEleHeghtByClassName('platgroup_tabs', 0,20)
- router.app.$store.commit('setTableHeightNew', height -10 - height2 - height3 - height4 - height5 - height6 - height7 - height9 - height10 - height11 - height12 - height13)
+ const height12 = getEleHeghtByClassName('platgroup_tabs', 0, 20)
+ router.app.$store.commit('setTableHeightNew', height - 10 - height2 - height3 - height4 - height5 - height6 - height7 - height9 - height10 - height11 - height12 - height13)
// console.log('gableHeightNew', router.app.$store.state.tableHeightNew)
} else {
// console.log('tableLayout========================')
diff --git a/admin/src/store/index.js b/admin/src/store/index.js
index 65559a6..f2fb2f1 100644
--- a/admin/src/store/index.js
+++ b/admin/src/store/index.js
@@ -7,6 +7,7 @@
// 鐧诲綍鐢ㄦ埛淇℃伅
userInfo: null,
tableHeightNew: 300,
+ sysConfig: { title: '', subtitle: '' },
primaryColor: '#2080f7',
// 棣栭〉
homePage: null,
@@ -35,9 +36,13 @@
const mutations = {
// 璁剧疆椤堕儴鑿滃崟绱㈠紩
- setCurrentIndex(state, index) {
+ setCurrentIndex (state, index) {
console.log('璁剧疆椤堕儴鑿滃崟绱㈠紩', index)
state.currentIndex = index
+ },
+ setSysconfig (state, config) {
+ state.sysConfig = { title: config.title || '', subtitle: config.subtitle || '' }
+ document.title = state.sysConfig.title+ state.sysConfig.subtitle
},
// 鍒囨崲鑿滃崟鐘舵��
switchCollapseMenu (state, value) {
@@ -68,8 +73,8 @@
},
// 璁剧疆棣栭〉璺敱淇℃伅
setTopMenuCurrent (state, current) {
- console.log("setTopMenuCurrent",current)
- if(current.id !== state.topMenuCurrent.id){
+ console.log('setTopMenuCurrent', current)
+ if (current.id !== state.topMenuCurrent.id) {
state.topMenuList.list.forEach(item => {
console.log(item.id, item.id)
if (current.id == item.id) {
@@ -81,7 +86,7 @@
},
// 閲嶇疆鑿滃崟
resetMenus: (state) => {
- state.topMenuId=null
+ state.topMenuId = null
state.menuData.list = []
},
// tags
@@ -90,7 +95,7 @@
// findindex鎵捐鏍囷紝寰幆鍒ゆ柇涓�涓嬶紝濡傛灉绛変簬閭d箞灏变唬琛ㄦ湁鐩稿悓鐨勶紝灏变笉蹇呮坊鍔狅紝濡傛灉鎵句笉鍒伴偅灏辨槸-1.灏辨坊鍔�
// state.tags = [{ ...val, keepAlive: false }]
const result = state.tags.findIndex(item => item.index === val.index)
- if (result === -1) {
+ if (result === -1) {
state.tags.push({ ...val, keepAlive: false })
} else {
state.tags[result] = { ...val, keepAlive: false }
diff --git a/admin/src/views/index.vue b/admin/src/views/index.vue
index 455ce35..80f2190 100644
--- a/admin/src/views/index.vue
+++ b/admin/src/views/index.vue
@@ -4,7 +4,7 @@
<div class="home_header">
<div class="mb10 fs17">{{timeInfo}}濂斤紝{{ userInfo.realname }}</div>
<div class="fs13">
- 浠婂ぉ鏄� {{ nowDate }} {{ nowWeek }}锛屾杩庤闂櫤鎱х墿娴佸洯鍖哄畨娑堜竴浣撳寲绯荤粺
+ 浠婂ぉ鏄� {{ nowDate }} {{ nowWeek }}锛屾杩庤闂畕{sysConfig.subtitle || title}}
</div>
</div>
<div class="main">
@@ -218,6 +218,7 @@
import OperaCarUseBookWindow from '@/components/business/OperaCarUseBookWindow'
import OperaHiddenDangerWindow from '@/components/business/OperaHiddenDangerWindow'
import OperaVisitsDesWindow from '@/components/business/OperaVisitsDesWindow'
+import {mapState} from "vuex";
const colors = ['#52a4f7', '#7678f7', '#5fc6d5']
export default {
components: {
@@ -231,6 +232,7 @@
},
data () {
return {
+ title: process.env.VUE_APP_TITLE,
tabPosition: 'right',
colors,
timeInfo: '涓婂崍',
@@ -258,6 +260,7 @@
}
},
computed: {
+ ...mapState(['sysConfig']),
userInfo () {
return this.$store.state.userInfo
}
diff --git a/admin/src/views/login.vue b/admin/src/views/login.vue
index 88ffee6..5c64f46 100644
--- a/admin/src/views/login.vue
+++ b/admin/src/views/login.vue
@@ -3,8 +3,8 @@
<img src="@/assets/images/bg@2x.png" class="main_bg" alt="">
<div class="login_wrap">
<div class="login_img">
- <div class="h3" style="font-size: 30px; margin-left: 140px; margin-bottom: 0;">鑺滄箹鐑熻崏</div>
- <div class="h3">鏅烘収鐗╂祦鍥尯瀹夋秷涓�浣撳寲绯荤粺</div>
+ <div class="h3" style="font-size: 30px; margin-bottom: 0;">{{sysConfig.title || ''}}</div>
+ <div class="h3">{{sysConfig.subtitle || title}}</div>
</div>
<div class="form_wrap">
<div class="tabs">
@@ -73,22 +73,22 @@
</template>
<script>
-import { mapMutations } from 'vuex'
-import { getCaptcha, loginByPassword, sendSmsPost, loginByPhone } from '@/api/system/common'
-import Cookies from "js-cookie"
+import { mapMutations, mapState } from 'vuex'
+import { getCaptcha, loginByPassword, sendSmsPost, loginByPhone, getSystemConfig } from '@/api/system/common'
+import Cookies from 'js-cookie'
import { Message } from 'element-ui'
export default {
name: 'Login',
- data() {
+ data () {
return {
+ title: process.env.VUE_APP_TITLE,
loading: false,
isRemPsd: false,
username: '',
password: '',
phone: '',
downTime: 0,
-
smsCode: '',
activeTab: '0',
// 楠岃瘉鐮�
@@ -100,18 +100,30 @@
}
}
},
- mounted() {
+ computed: {
+ ...mapState(['sysConfig'])
+ },
+ mounted () {
this.username = localStorage.getItem('username') || ''
this.password = localStorage.getItem('password') || ''
this.phone = localStorage.getItem('phone') || ''
const isRemPsd = localStorage.getItem('isRemPsd') || false
this.isRemPsd = JSON.parse(isRemPsd)
this.refreshCaptcha()
+ this.getSystemConfig()
},
methods: {
- ...mapMutations(['setUserInfo']),
+ ...mapMutations(['setUserInfo', 'setSysconfig']),
+ getSystemConfig () {
+ getSystemConfig()
+ .then((res) => {
+ if (res && res.subtitle) {
+ this.setSysconfig(res)
+ }
+ })
+ },
// 鐧诲綍
- login() {
+ login () {
if (this.loading) {
return
}
@@ -167,9 +179,8 @@
this.loading = false
})
}
-
},
- getCode() {
+ getCode () {
console.log('getCode')
const { phone } = this
if (!phone || phone.length != 11) {
@@ -178,7 +189,7 @@
sendSmsPost({ phone, type: 0 }).then(res => {
Message.success('鐭俊鍙戦�佹垚鍔�')
this.downTime = 60
- let timer = setInterval(() => {
+ const timer = setInterval(() => {
if (this.downTime == 0) {
return clearInterval(timer)
}
@@ -186,11 +197,11 @@
}, 1000)
})
},
- tabClick(val) {
+ tabClick (val) {
this.activeTab = val
},
// 鍒锋柊楠岃瘉鐮�
- refreshCaptcha() {
+ refreshCaptcha () {
this.captcha.loading = true
getCaptcha()
.then(data => {
@@ -207,7 +218,7 @@
})
},
// 鐧诲綍鍓嶉獙璇�
- __check() {
+ __check () {
if (this.username.trim() === '') {
this.$tip.error('璇疯緭鍏ョ敤鎴峰悕')
return false
@@ -222,7 +233,7 @@
}
return true
}
- },
+ }
}
</script>
@@ -267,7 +278,6 @@
height: 600px;
background: url("../assets/images/login_img@2x.png");
background-size: 100% 100%;
- padding-left: 40px;
padding-top: 60px;
.h2 {
@@ -278,12 +288,14 @@
align-items: center;
justify-content: center;
border-radius: 4px;
+ text-align: center;
width: 208px;
display: flex;
margin-bottom: 12px;
}
.h3 {
+ text-align: center;
font-size: 28px;
font-weight: 700;
color: #fff;
diff --git a/server/system_gateway/src/main/java/com/doumee/api/gateway/JwtAuthController.java b/server/system_gateway/src/main/java/com/doumee/api/gateway/JwtAuthController.java
index c6ddd04..25974a0 100644
--- a/server/system_gateway/src/main/java/com/doumee/api/gateway/JwtAuthController.java
+++ b/server/system_gateway/src/main/java/com/doumee/api/gateway/JwtAuthController.java
@@ -1,5 +1,6 @@
package com.doumee.api.gateway;
+import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.config.annotation.LoginNoRequired;
import com.doumee.config.jwt.JwtProperties;
import com.doumee.config.jwt.JwtTokenUtil;
@@ -8,6 +9,7 @@
import com.doumee.core.exception.BusinessException;
import com.doumee.dao.system.dto.LoginCabinetDTO;
import com.doumee.dao.system.dto.LoginH5DTO;
+import com.doumee.dao.system.vo.SystemConfigVo;
import com.doumee.service.business.third.model.ApiResponse;
import com.doumee.service.business.third.model.LoginUserInfo;
import com.doumee.core.utils.Constants;
@@ -44,6 +46,8 @@
private SystemLoginService systemLoginService;
@Autowired
private CaptchaService captchaService;
+ @Autowired
+ private SystemDictDataBiz systemDictDataBiz;
/**
* @author Eva.Caesar Liu
@@ -56,6 +60,16 @@
}
@PreventRepeat(limit = 10, lockTime = 10000)
+ @ApiOperation("鑾峰彇绯荤粺閰嶇疆鍙傛暟")
+ @GetMapping("/systemConfig")
+ @LoginNoRequired
+ public ApiResponse<SystemConfigVo> systemConfig ( ) {
+ SystemConfigVo configVo = new SystemConfigVo();
+ configVo.setSubtitle(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.SYSTEM_SUBTITLE).getCode());
+ configVo.setTitle(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.SYSTEM_TITLE).getCode());
+ return ApiResponse.success(configVo);
+ }
+ @PreventRepeat(limit = 10, lockTime = 10000)
@ApiOperation("鐧诲綍")
@PostMapping("/login")
@LoginNoRequired
diff --git a/server/system_service/src/main/java/com/doumee/core/utils/Constants.java b/server/system_service/src/main/java/com/doumee/core/utils/Constants.java
index b5da3fd..7b93ec5 100644
--- a/server/system_service/src/main/java/com/doumee/core/utils/Constants.java
+++ b/server/system_service/src/main/java/com/doumee/core/utils/Constants.java
@@ -34,6 +34,8 @@
public static final String HK_PARAM ="HK_PARAM" ;
public static final String HK_WEBSITE_DOMAIN_URL ="HK_WEBSITE_DOMAIN_URL" ;
public static final String LED_CONTENT_SPEED ="LED_CONTENT_SPEED" ;
+ public static final String SYSTEM_TITLE ="SYSTEM_TITLE" ;
+ public static final String SYSTEM_SUBTITLE ="SYSTEM_SUBTITLE" ;
public static final String HK_HOST ="HK_HOST" ;
public static final String HK_APPKEY ="HK_APPKEY" ;
public static final String LOGIN_OUT_URL ="LOGIN_OUT" ;
diff --git a/server/system_service/src/main/java/com/doumee/dao/system/vo/SystemConfigVo.java b/server/system_service/src/main/java/com/doumee/dao/system/vo/SystemConfigVo.java
new file mode 100644
index 0000000..81e3e2d
--- /dev/null
+++ b/server/system_service/src/main/java/com/doumee/dao/system/vo/SystemConfigVo.java
@@ -0,0 +1,17 @@
+package com.doumee.dao.system.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel("绯荤粺閰嶇疆鍙傛暟")
+public class SystemConfigVo {
+
+ @ApiModelProperty(value = "涓绘爣棰�")
+ private String title;
+
+ @ApiModelProperty(value = "绯荤粺鍓爣棰�")
+ private String subtitle;
+
+}
--
Gitblit v1.9.3