From c239c27dc4beafe6a3c735298e65a659d57fb0ae Mon Sep 17 00:00:00 2001 From: sunshuaizhong Date: Thu, 19 Mar 2020 17:03:33 +0800 Subject: [PATCH] 1 --- ruoyi-ui/package.json | 4 +- ruoyi-ui/src/main.js | 2 +- ruoyi-ui/src/utils/request.js | 60 +++--- ruoyi-ui/src/views/login.vue | 2 +- .../src/views/monitor/logininfor/index.vue | 149 +++++-------- ruoyi-ui/src/views/system/config/index.vue | 200 ++++++----------- ruoyi-ui/src/views/system/dict/data.vue | 196 +++++------------ ruoyi-ui/src/views/system/dict/index.vue | 201 ++++++------------ ruoyi-ui/vue.config.js | 6 +- .../src/main/resources/application-druid.yml | 14 +- ruoyi/src/main/resources/application.yml | 18 +- ruoyi/src/main/resources/logback.xml | 16 +- 12 files changed, 291 insertions(+), 577 deletions(-) diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json index ceb331e29..a9effe799 100644 --- a/ruoyi-ui/package.json +++ b/ruoyi-ui/package.json @@ -14,7 +14,7 @@ "test:ci": "npm run lint && npm run test:unit", "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml", "new": "plop" - }, + }, "husky": { "hooks": { "pre-commit": "lint-staged" @@ -45,7 +45,7 @@ "vue-cropper": "0.4.9", "axios": "0.18.1", "echarts": "4.2.1", - "element-ui": "2.11.1", + "element-ui": "2.13.0", "fuse.js": "3.4.4", "js-cookie": "2.2.0", "jsencrypt": "3.0.0-rc.1", diff --git a/ruoyi-ui/src/main.js b/ruoyi-ui/src/main.js index fbd3d6d31..d50c997e2 100644 --- a/ruoyi-ui/src/main.js +++ b/ruoyi-ui/src/main.js @@ -10,7 +10,7 @@ import './assets/styles/element-variables.scss' import '@/assets/styles/index.scss' // global css import '@/assets/styles/ruoyi.scss' // ruoyi css import App from './App' -import store from './store' +import store from './store' import router from './router' import permission from './directive/permission' diff --git a/ruoyi-ui/src/utils/request.js b/ruoyi-ui/src/utils/request.js index 4ea9568a3..e7db73588 100644 --- a/ruoyi-ui/src/utils/request.js +++ b/ruoyi-ui/src/utils/request.js @@ -27,39 +27,39 @@ service.interceptors.request.use( // 响应拦截器 service.interceptors.response.use(res => { - const code = res.data.code - if (code === 401) { - MessageBox.confirm( - '登录状态已过期,您可以继续留在该页面,或者重新登录', - '系统提示', - { - confirmButtonText: '重新登录', - cancelButtonText: '取消', - type: 'warning' - } - ).then(() => { - store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug - }) + const code = res.data.code + if (code === 401) { + MessageBox.confirm( + '登录状态已过期,您可以继续留在该页面,或者重新登录', + '系统提示', + { + confirmButtonText: '重新登录', + cancelButtonText: '取消', + type: 'warning' + } + ).then(() => { + store.dispatch('LogOut').then(() => { + location.reload() // 为了重新实例化vue-router对象 避免bug }) - } else if (code !== 200) { - Notification.error({ - title: res.data.msg - }) - return Promise.reject('error') - } else { - return res.data - } - }, - error => { - console.log('err' + error) - Message({ - message: error.message, - type: 'error', - duration: 5 * 1000 }) - return Promise.reject(error) + } else if (code !== 200) { + Notification.error({ + title: res.data.msg + }) + return Promise.reject('error') + } else { + return res.data } +}, +error => { + console.log('err' + error) + Message({ + message: error.message, + type: 'error', + duration: 5 * 1000 + }) + return Promise.reject(error) +} ) export default service diff --git a/ruoyi-ui/src/views/login.vue b/ruoyi-ui/src/views/login.vue index b63d0461f..c8d476da9 100644 --- a/ruoyi-ui/src/views/login.vue +++ b/ruoyi-ui/src/views/login.vue @@ -147,7 +147,7 @@ export default { display: flex; justify-content: center; align-items: center; - height: 100%; + height: 100%; background-image: url("../assets/image/login-background.jpg"); background-size: cover; } diff --git a/ruoyi-ui/src/views/monitor/logininfor/index.vue b/ruoyi-ui/src/views/monitor/logininfor/index.vue index e2f422ea2..a0c660f6b 100644 --- a/ruoyi-ui/src/views/monitor/logininfor/index.vue +++ b/ruoyi-ui/src/views/monitor/logininfor/index.vue @@ -2,39 +2,14 @@
- + - + - - + + @@ -57,33 +32,10 @@ - 删除 - - - 清空 - - - 导出 + 删除 + 清空 + 导出 @@ -103,21 +55,15 @@ - +
- + diff --git a/ruoyi-ui/src/views/system/config/index.vue b/ruoyi-ui/src/views/system/config/index.vue index 354f7e051..2cf9c0084 100644 --- a/ruoyi-ui/src/views/system/config/index.vue +++ b/ruoyi-ui/src/views/system/config/index.vue @@ -2,33 +2,14 @@
- + - + - + @@ -50,44 +31,14 @@ + 新增 - 新增 + 修改 - 修改 - - - 删除 - - - 导出 + 删除 + 导出 @@ -105,56 +56,26 @@ - + - - - - - - - - - + + + - {{dict.dictLabel}} + {{ dict.dictLabel }} - - - +