Merge remote-tracking branch 'upstream/master' into dev_lcw

# Conflicts:
#	pom.xml
#	ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysUserController.java
#	ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
This commit is contained in:
hsdllcw
2025-05-23 14:31:52 +08:00
24 changed files with 133 additions and 282 deletions

View File

@@ -10,15 +10,7 @@ import ThemePicker from "@/components/ThemePicker"
export default {
name: "App",
components: { ThemePicker },
metaInfo() {
return {
title: this.$store.state.settings.dynamicTitle && this.$store.state.settings.title,
titleTemplate: title => {
return title ? `${title} - ${process.env.VUE_APP_TITLE}` : process.env.VUE_APP_TITLE
}
}
}
components: { ThemePicker }
}
</script>
<style scoped>

View File

@@ -5,7 +5,6 @@
<slot />
</div>
</div>
<!-- eslint-disable-next-line -->
<div :style="{backgroundImage: `url(${image})`}" class="pan-thumb"></div>
</div>
</template>

View File

@@ -17,7 +17,7 @@ const install = function(Vue) {
if (window.Vue) {
window['hasRole'] = hasRole
window['hasPermi'] = hasPermi
Vue.use(install) // eslint-disable-line
Vue.use(install)
}
export default install

View File

@@ -144,6 +144,7 @@ export default {
key: 'dynamicTitle',
value: val
})
this.$store.dispatch('settings/setTitle', this.$store.state.settings.title)
}
},
},

View File

@@ -33,8 +33,6 @@ import ImageUpload from "@/components/ImageUpload"
import ImagePreview from "@/components/ImagePreview"
// 字典标签组件
import DictTag from '@/components/DictTag'
// 头部标签组件
import VueMeta from 'vue-meta'
// 字典数据组件
import DictData from '@/components/DictData'
@@ -60,7 +58,6 @@ Vue.component('ImagePreview', ImagePreview)
Vue.use(directive)
Vue.use(plugins)
Vue.use(VueMeta)
DictData.install()
/**

View File

@@ -1,4 +1,9 @@
module.exports = {
/**
* 网页标题
*/
title: process.env.VUE_APP_TITLE,
/**
* 侧边栏主题 深色主题theme-dark浅色主题theme-light
*/

View File

@@ -1,4 +1,5 @@
import defaultSettings from '@/settings'
import { useDynamicTitle } from '@/utils/dynamicTitle'
const { sideTheme, showSettings, topNav, tagsView, fixedHeader, sidebarLogo, dynamicTitle } = defaultSettings
@@ -30,6 +31,7 @@ const actions = {
// 设置网页标题
setTitle({ commit }, title) {
state.title = title
useDynamicTitle()
}
}

View File

@@ -1,3 +1,5 @@
import router from '@/router'
import { MessageBox, } from 'element-ui'
import { login, logout, getInfo, refreshToken } from '@/api/login'
import { getToken, setToken, setExpiresIn, removeToken } from '@/utils/auth'
import { isEmpty } from "@/utils/validate"
@@ -27,7 +29,7 @@ const user = {
SET_NAME: (state, name) => {
state.name = name
},
SET_NICK_NAME: (state, nickName) =>{
SET_NICK_NAME: (state, nickName) => {
state.nickName = nickName
},
SET_AVATAR: (state, avatar) => {
@@ -78,6 +80,18 @@ const user = {
commit('SET_NAME', user.userName)
commit('SET_NICK_NAME', user.nickName)
commit('SET_AVATAR', avatar)
/* 初始密码提示 */
if(res.isDefaultModifyPwd) {
MessageBox.confirm('您的密码还是初始密码,请修改密码!', '安全提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => {
router.push({ name: 'Profile', params: { activeTab: 'resetPwd' } })
}).catch(() => {})
}
/* 过期密码提示 */
if(!res.isDefaultModifyPwd && res.isPasswordExpired) {
MessageBox.confirm('您的密码已过期,请尽快修改密码!', '安全提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => {
router.push({ name: 'Profile', params: { activeTab: 'resetPwd' } })
}).catch(() => {})
}
resolve(res)
}).catch(error => {
reject(error)

View File

@@ -0,0 +1,13 @@
import store from '@/store'
import defaultSettings from '@/settings'
/**
* 动态修改标题
*/
export function useDynamicTitle() {
if (store.state.settings.dynamicTitle) {
document.title = store.state.settings.title + ' - ' + defaultSettings.title
} else {
document.title = defaultSettings.title
}
}

View File

@@ -1,4 +1,3 @@
/* eslint-disable max-len */
import { trigger } from './config'
let confGlobal

View File

@@ -44,7 +44,7 @@
<div slot="header" class="clearfix">
<span>基本资料</span>
</div>
<el-tabs v-model="activeTab">
<el-tabs v-model="selectedTab">
<el-tab-pane label="基本资料" name="userinfo">
<userInfo :user="user" />
</el-tab-pane>
@@ -72,10 +72,14 @@ export default {
user: {},
roleGroup: {},
postGroup: {},
activeTab: "userinfo"
selectedTab: "userinfo"
}
},
created() {
const activeTab = this.$route.params && this.$route.params.activeTab
if (activeTab) {
this.selectedTab = activeTab
}
this.getUser()
},
methods: {

View File

@@ -115,7 +115,6 @@ export default {
},
computed: {},
watch: {
// eslint-disable-next-line func-names
'formData.value': function (val) {
this.dataType = isNumberStr(val) ? 'number' : 'string'
}

View File

@@ -190,7 +190,6 @@ export default {
}
},
watch: {
// eslint-disable-next-line func-names
'activeData.label': function (val, oldVal) {
if (
this.activeData.placeholder === undefined