@@ -34,6 +34,8 @@ export default {
mixins: [ResizeMixin],
computed: {
...mapState({
+ theme: state => state.settings.theme,
+ sideTheme: state => state.settings.sideTheme,
sidebar: state => state.app.sidebar,
device: state => state.app.device,
showSettings: state => state.settings.showSettings,
diff --git a/ZR.Vue/src/main.js b/ZR.Vue/src/main.js
index 94685d3..2333caf 100644
--- a/ZR.Vue/src/main.js
+++ b/ZR.Vue/src/main.js
@@ -15,15 +15,20 @@ import permission from './directive/permission'
import './assets/icons' // icon
import './permission' // permission control
import { getDicts } from "@/api/system/dict/data";
-// import { getConfigKey } from "@/api/system/config";
+import { getConfigKey } from "@/api/system/config";
import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, download, handleTree } from "@/utils/ruoyi";
+//分页组件
import Pagination from "@/components/Pagination";
//自定义表格工具扩展
import RightToolbar from "@/components/RightToolbar"
+// 字典标签组件
+import DictTag from '@/components/DictTag'
+// 字典数据组件
+// import DictData from '@/components/DictData'
// 全局方法挂载
Vue.prototype.getDicts = getDicts
-// Vue.prototype.getConfigKey = getConfigKey
+Vue.prototype.getConfigKey = getConfigKey
Vue.prototype.parseTime = parseTime
Vue.prototype.resetForm = resetForm
Vue.prototype.addDateRange = addDateRange
@@ -47,6 +52,7 @@ Vue.prototype.msgInfo = function (msg) {
// 全局组件挂载
Vue.component('Pagination', Pagination)
Vue.component('RightToolbar', RightToolbar)
+Vue.component('DictTag', DictTag)
Vue.use(permission)
diff --git a/ZR.Vue/src/settings.js b/ZR.Vue/src/settings.js
index da84f4d..7223b32 100644
--- a/ZR.Vue/src/settings.js
+++ b/ZR.Vue/src/settings.js
@@ -1,8 +1,12 @@
module.exports = {
title: 'ZrAdmin.NET',
+ /**
+ * 侧边栏主题 深色主题theme-dark,浅色主题theme-light
+ */
+ sideTheme: 'theme-dark',
/**
- * 是否系统布局配置
+ * 显示是否系统布局配置
*/
showSettings: false,
diff --git a/ZR.Vue/src/store/modules/settings.js b/ZR.Vue/src/store/modules/settings.js
index a1152a9..8e90e89 100644
--- a/ZR.Vue/src/store/modules/settings.js
+++ b/ZR.Vue/src/store/modules/settings.js
@@ -1,14 +1,17 @@
-import variables from '@/assets/styles/element-variables.scss'
import defaultSettings from '@/settings'
-const { showSettings, tagsView, fixedHeader, sidebarLogo } = defaultSettings
+const { sideTheme, showSettings, tagsView, fixedHeader, sidebarLogo } = defaultSettings
+const storageSetting = JSON.parse(localStorage.getItem('layout-setting')) || ''
const state = {
- theme: variables.theme,
+ theme: storageSetting.theme || '#409EFF',
+ sideTheme: storageSetting.sideTheme || sideTheme,
showSettings: showSettings,
- tagsView: tagsView,
- fixedHeader: fixedHeader,
- sidebarLogo: sidebarLogo
+ tagsView: storageSetting.tagsView === undefined ? tagsView : storageSetting.tagsView,
+ fixedHeader: storageSetting.fixedHeader === undefined ? fixedHeader : storageSetting.fixedHeader,
+ sidebarLogo: storageSetting.sidebarLogo === undefined ? sidebarLogo : storageSetting.sidebarLogo,
+ // topNav: storageSetting.topNav === undefined ? topNav : storageSetting.topNav,
+ // dynamicTitle: storageSetting.dynamicTitle === undefined ? dynamicTitle : storageSetting.dynamicTitle
}
const mutations = {
@@ -20,6 +23,7 @@ const mutations = {
}
const actions = {
+ //修改布局设置
changeSetting({ commit }, data) {
commit('CHANGE_SETTING', data)
}
diff --git a/ZR.Vue/src/utils/request.js b/ZR.Vue/src/utils/request.js
index 1a883eb..b832f95 100644
--- a/ZR.Vue/src/utils/request.js
+++ b/ZR.Vue/src/utils/request.js
@@ -57,6 +57,8 @@ service.interceptors.response.use(res => {
location.href = '/index';
})
})
+
+ return Promise.reject()
}
else if (code == 0 || code == 110 || code == 101 || code == 403 || code == 500) {
Message({
@@ -91,8 +93,6 @@ service.interceptors.response.use(res => {
}
)
-
-
/**
* get方法,对应get请求
* @param {String} url [请求的url地址]
diff --git a/ZR.Vue/src/views/system/user/index.vue b/ZR.Vue/src/views/system/user/index.vue
index 1490266..ad0bf10 100644
--- a/ZR.Vue/src/views/system/user/index.vue
+++ b/ZR.Vue/src/views/system/user/index.vue
@@ -346,9 +346,9 @@ export default {
this.getDicts("sys_user_sex").then((response) => {
this.sexOptions = response.data;
});
- // this.getConfigKey("sys.user.initPassword").then(response => {
- // this.initPassword = response.msg;
- // });
+ this.getConfigKey("sys.user.initPassword").then(response => {
+ this.initPassword = response.data;
+ });
},
methods: {
/** 查询用户列表 */
diff --git a/ZRAdmin.xml b/ZRAdmin.xml
index e88b1f5..6eb99c0 100644
--- a/ZRAdmin.xml
+++ b/ZRAdmin.xml
@@ -281,11 +281,57 @@
-
+
+
+ 参数配置Controller
+
+ @author zhaorui
+ @date 2021-09-29
+
+
+
- 配置文件
+ 参数配置接口
+
+
+ 查询参数配置列表
+
+
+
+
+
+ 查询参数配置详情
+
+
+
+
+
+
+ 根据参数键名查询参数值
+
+
+
+
+
+
+ 添加参数配置
+
+
+
+
+
+ 更新参数配置
+
+
+
+
+
+ 删除参数配置
+
+
+
部门
diff --git a/document/admin-sqlserver.sql b/document/admin-sqlserver.sql
index 10ea56e..3c48712 100644
Binary files a/document/admin-sqlserver.sql and b/document/admin-sqlserver.sql differ