From fc0b26266005dcd0baf90323a9146929d0619aa4 Mon Sep 17 00:00:00 2001 From: jzfai <869653722@qq.com> Date: Thu, 20 Apr 2023 13:50:48 +0800 Subject: [PATCH] add init loading page and remove $ref --- eslintrc/.eslintrc-auto-import.json | 3 - index.html | 26 ++- mock/{example.ts => example.js} | 0 mock/system.js | 25 +++ src/api/system.js | 31 +++ src/api/user.js | 31 --- src/assets/gif/dianchi.gif | Bin 0 -> 17972 bytes src/icons/SvgIcon.vue | 16 +- src/layout/app-main/Navbar.vue | 13 +- src/layout/app-main/TagsView.vue | 2 + src/layout/sidebar/MenuIcon.vue | 21 +- src/lib/el-svg-icon.js | 10 + src/main.js | 4 + src/permission.js | 26 +-- src/router/index.js | 80 +------ src/settings.js | 2 +- src/styles/init-loading.css | 17 ++ src/styles/reset-elemenet-plus-style.scss | 5 + src/views/charts/index.vue | 7 - src/views/dashboard/index.vue | 12 +- src/views/error-log/error-generator.vue | 79 ------- src/views/error-log/index.vue | 148 ------------- src/views/error-page/401.vue | 93 -------- src/views/error-page/404.vue | 225 -------------------- src/views/excel/index.vue | 7 - src/views/guid/index.vue | 7 - src/views/login/index.vue | 65 +++--- src/views/other/index.vue | 7 - src/views/rbac-test/TestAddEdit.vue | 5 - src/views/rbac-test/TestButton.vue | 14 -- src/views/rbac-test/TestDetail.vue | 5 - src/views/rbac-test/TestMenu.vue | 22 -- src/views/rich-text/index.vue | 7 - src/views/roles-codes/button-permission.vue | 7 - src/views/roles-codes/code-index.vue | 4 - src/views/roles-codes/index.vue | 29 --- src/views/roles-codes/role-index.vue | 3 - src/views/table/index.vue | 7 - typings/auto-imports.d.ts | 3 - vite.config.js | 4 +- 40 files changed, 185 insertions(+), 887 deletions(-) rename mock/{example.ts => example.js} (100%) create mode 100644 mock/system.js create mode 100644 src/api/system.js delete mode 100644 src/api/user.js create mode 100644 src/assets/gif/dianchi.gif create mode 100644 src/lib/el-svg-icon.js create mode 100644 src/styles/init-loading.css delete mode 100644 src/views/charts/index.vue delete mode 100644 src/views/error-log/error-generator.vue delete mode 100644 src/views/error-log/index.vue delete mode 100644 src/views/error-page/401.vue delete mode 100644 src/views/error-page/404.vue delete mode 100644 src/views/excel/index.vue delete mode 100644 src/views/guid/index.vue delete mode 100644 src/views/other/index.vue delete mode 100644 src/views/rbac-test/TestAddEdit.vue delete mode 100644 src/views/rbac-test/TestButton.vue delete mode 100644 src/views/rbac-test/TestDetail.vue delete mode 100644 src/views/rbac-test/TestMenu.vue delete mode 100644 src/views/rich-text/index.vue delete mode 100644 src/views/roles-codes/button-permission.vue delete mode 100644 src/views/roles-codes/code-index.vue delete mode 100644 src/views/roles-codes/index.vue delete mode 100644 src/views/roles-codes/role-index.vue delete mode 100644 src/views/table/index.vue diff --git a/eslintrc/.eslintrc-auto-import.json b/eslintrc/.eslintrc-auto-import.json index 4653a7a..c195699 100644 --- a/eslintrc/.eslintrc-auto-import.json +++ b/eslintrc/.eslintrc-auto-import.json @@ -36,8 +36,6 @@ "isReadonly": true, "isRef": true, "langTitle": true, - "loginOutReq": true, - "loginReq": true, "markRaw": true, "nextTick": true, "onActivated": true, @@ -93,7 +91,6 @@ "useSlots": true, "useTable": true, "useTagsViewStore": true, - "userInfoReq": true, "watch": true, "watchEffect": true, "watchPostEffect": true, diff --git a/index.html b/index.html index 210b9eb..b88bb8e 100644 --- a/index.html +++ b/index.html @@ -1,13 +1,19 @@ - - - - - <%= title %> - - -
- - + + + + + + <%= title %> + + +
+
+ +
正在加载系统资源,请耐心等待
+
+
+ + diff --git a/mock/example.ts b/mock/example.js similarity index 100% rename from mock/example.ts rename to mock/example.js diff --git a/mock/system.js b/mock/system.js new file mode 100644 index 0000000..abd877f --- /dev/null +++ b/mock/system.js @@ -0,0 +1,25 @@ +const system = { + url: '/mock/login', + method: 'post', + response: () => { + return { + code: 20000, + jwtToken:"666666" + } + } +} + +const loginOut = { + url: '/mock/loginOut', + method: 'post', + response: () => { + return { + code: 200, + title: 'mock请求测试' + } + } +} + +export default [ + system,loginOut +] diff --git a/src/api/system.js b/src/api/system.js new file mode 100644 index 0000000..1029b74 --- /dev/null +++ b/src/api/system.js @@ -0,0 +1,31 @@ +//获取用户信息 +import axiosReq from 'axios' +// export const userInfoReq = (): Promise => { +// return new Promise((resolve) => { +// const reqConfig = { +// url: '/basis-func/user/getUserInfo', +// params: { plateFormId: 2 }, +// method: 'post' +// } +// axiosReq(reqConfig).then(({ data }) => { +// resolve(data) +// }) +// }) +// } + +//登录 +export const loginReq = (subForm) => { + return axiosReq({ + url: '/mock/login', + params: subForm, + method: 'post' + }) +} + +//退出登录 +export const loginOutReq = () => { + return axiosReq({ + url: '/mock/loginOut', + method: 'post' + }) +} diff --git a/src/api/user.js b/src/api/user.js deleted file mode 100644 index 11df21f..0000000 --- a/src/api/user.js +++ /dev/null @@ -1,31 +0,0 @@ -//获取用户信息 -import axiosReq from '@/utils/axios-req' -export const userInfoReq = () => { - return new Promise((resolve) => { - const reqConfig = { - url: '/basis-func/user/getUserInfo', - params: { plateFormId: 2 }, - method: 'post' - } - axiosReq(reqConfig).then(({ data }) => { - resolve(data) - }) - }) -} - -//登录 -export const loginReq = (subForm) => { - return axiosReq({ - url: '/basis-func/user/loginValid', - params: subForm, - method: 'post' - }) -} - -//退出登录 -export const loginOutReq = () => { - return axiosReq({ - url: '/basis-func/user/loginValid', - method: 'post' - }) -} diff --git a/src/assets/gif/dianchi.gif b/src/assets/gif/dianchi.gif new file mode 100644 index 0000000000000000000000000000000000000000..a54aa66de82cb121352344fd6e1848d3383fc080 GIT binary patch literal 17972 zcmeI(cT|(v+BWcUY~Y9m5mahIM^t)|qJWSfMS77YC80wI2~7b(I?_W2rFT&}0i~vZ z5}JTir742aJ0iRR)T5*4{pOpQGw-Z3?Dee01B8DzE5CJJ_kIGBl@Ss)JpYr(Ps=}T ztv!48{QUFJd-v|$w{PG6{re9bIB@XbK@t)YQc}`GhYtPn%P)ryA0{IsJ96a6(W6I? z9XodX_;GS_@)IXcP*6~uJb99ml9Gyw>eQ)Ir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DlWo+ z5JQiB!%?no3uDp7*O8{EJ5!`AnsyF+rm?r{(9n2)73Yk5QTi@wiF)ueni^Dk`}F>y z@lakKtb9#cOHIl^`!YoDlEn=%Tce8(5PoknE|e8(jy+S60}$=7J>A>RhT8`lpSv>A zy|1$2kM#T1F~(Q3yf0mO7sEflEAL=PoEQ=hOBNRw|DcDz2Saj``oi>Q(OkwAO#UiK zP4Pko?Ri36nJw`mfTeX=1oUZ`R3If;h01t)D)A!_9~=3`I}+5b^%rA18#MBjEL}bZ z6rJrUG<3EQqkhiWS8DE^?`o-*bTwBfo?mrB1G*CrsWmN{*j3WL#KWYLK*V`@Ou&cH zp*wydV`35X8gysv4*{=O9X{U6>)nEqc9ncpvJMZR7PK0r2rvd;OOf(63Bd__hcXD< zIy4EO@NEHHs!JVy;7Wo>mb^v6Z{c%Z1yO*}{#fKu6yJIYG1}^?DYrI5hpicySsiQc zM=!$r>ibWCkH?GSXSqoQm-#&J8*-s%alnxwCV2t<~rdj`sE-3*MM# z@uVt+UqOK{ErQ`^kVUNmI2KV{vhYbnn;O7=XMb8PfLwpFeX~C2xSF{W@qe$wlmB>M{=We6^FuH@!^2$={|i7gso(lc7=x4xQ;hP+d@vW zrCgr`4z+h(xqR6!Sav1Tt^!&#k8~xuRcndW^9uf6{;3wUoV9>um#Xzsai7BlJ$+Qu zJt3-TU_(YoET7Cc6=WFeIyWPM$(*Ol_Q3*Wy!?Uyk~cGEVhgj5zAe;}zL_xh zhHT_hUv7QpTky^^K@xn7THJf-SU~+)=>1nvh+_i$t^H>Z$rlD;QX7i0gab!xBsW{b zq?X0w*Hd^rQ-A++KR1N;!FFmGr^-F*jKu@Kb|~+q zd!X&oY}3Do#0xGDJ!v(?zM@Rw|4GGIK$SXp*bTTdMwIZSwgVpr0RjLq(O{yAM+|7j zlZh&lIBS8|4q(GZtWljiQ @@ -14,7 +14,11 @@ const props = defineProps({ className: { type: String, default: '' - } + }, + color: { + type: String, + default: '' + }, }) const iconName = computed(() => `#icon-${props.iconClass}`) @@ -27,14 +31,6 @@ const svgClass = computed(() => { diff --git a/src/lib/el-svg-icon.js b/src/lib/el-svg-icon.js new file mode 100644 index 0000000..4431719 --- /dev/null +++ b/src/lib/el-svg-icon.js @@ -0,0 +1,10 @@ +import * as components from '@element-plus/icons-vue' + +export default { + install: (app) => { + for (const key in components) { + const componentConfig = components[key]; + app.component(componentConfig.name, componentConfig); + } + }, +}; diff --git a/src/main.js b/src/main.js index 5fff7dd..524e81c 100644 --- a/src/main.js +++ b/src/main.js @@ -28,6 +28,10 @@ import './permission' import 'element-plus/dist/index.css' const app = createApp(App) + +//import element-plus svg icon +import ElSvgIcon from "@/lib/el-svg-icon" +app.use(ElSvgIcon) //router app.use(router) diff --git a/src/permission.js b/src/permission.js index 6b4ea67..0964f25 100644 --- a/src/permission.js +++ b/src/permission.js @@ -1,9 +1,8 @@ import router from '@/router' -import { filterAsyncRouter, progressClose, progressStart } from '@/hooks/use-permission' +import {progressClose, progressStart } from '@/hooks/use-permission' import { useBasicStore } from '@/store/basic' -import { userInfoReq } from '@/api/user' import { langTitle } from '@/hooks/use-common' -import settings from './settings' +import settings from "@/settings"; //路由进入前拦截 //to:将要进入的页面 vue-router4.0 不推荐使用next() @@ -22,25 +21,8 @@ router.beforeEach(async (to) => { if (to.path === '/login') { return '/' } else { - //2.判断是否获取用户信息 - if (!basicStore.getUserInfo) { - try { - const userData = await userInfoReq() - //3.动态路由权限筛选 - filterAsyncRouter(userData) - //4.保存用户信息到store - basicStore.setUserInfo(userData) - //5.再次执行路由跳转 - return { ...to, replace: true } - } catch (e) { - console.error(`route permission error${e}`) - basicStore.resetState() - progressClose() - return `/login?redirect=${to.path}` - } - } else { - return true - } + basicStore.setFilterAsyncRoutes([]) + return true } } else { if (!whiteList.includes(to.path)) { diff --git a/src/router/index.js b/src/router/index.js index f695527..c1e84a1 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1,6 +1,5 @@ import { createRouter, createWebHashHistory } from 'vue-router' import basicDemo from './modules/basic-demo' - import Layout from '@/layout/index.vue' export const constantRoutes = [ @@ -15,7 +14,6 @@ export const constantRoutes = [ } ] }, - { path: '/login', component: () => import('@/views/login/index.vue'), @@ -41,50 +39,21 @@ export const constantRoutes = [ name: 'Dashboard', component: () => import('@/views/dashboard/index.vue'), //using el svg icon, the elSvgIcon first when at the same time using elSvgIcon and icon - meta: { title: 'Dashboard', elSvgIcon: 'Fold', affix: true } + meta: { title: 'Dashboard', icon: 'dashboard', affix: true } } ] }, - // { - // path: '/RBAC', - // component: Layout, - // children: [ - // { - // path: 'https://github.jzfai.top/low-code-platform/#/permission-center/user-table-query', - // meta: { title: 'RBAC', icon: 'skill' } - // } - // ] - // }, { path: '/setting-switch', component: Layout, + alwaysShow:true, + meta: { title: 'Setting Switch', elSvgIcon: 'Fold' }, children: [ { path: 'index', component: () => import('@/views/setting-switch/index.vue'), name: 'SettingSwitch', - meta: { title: 'Setting Switch', icon: 'example' } - } - ] - }, - - { - path: '/error-log', - component: Layout, - meta: { title: 'Error Log', icon: 'eye' }, - alwaysShow: true, - children: [ - { - path: 'error-log', - component: () => import('@/views/error-log/index.vue'), - name: 'ErrorLog', - meta: { title: 'Error Index' } - }, - { - path: 'error-generator', - component: () => import('@/views/error-log/error-generator.vue'), - name: 'ErrorGenerator', - meta: { title: 'Error Generator' } + meta: { title: 'Setting Switch', elSvgIcon: 'example' } } ] }, @@ -146,49 +115,12 @@ export const constantRoutes = [ } ] }, - basicDemo + basicDemo, ] //角色和code数组动态路由 export const roleCodeRoutes = [ - { - path: '/roles-codes', - component: Layout, - redirect: '/roles-codes/page', - alwaysShow: true, // will always show the root menu - name: 'Permission', - meta: { - title: 'Permission', - icon: 'lock', - roles: ['admin', 'editor'] // you can set roles in root nav - }, - children: [ - { - path: 'index', - component: () => import('@/views/roles-codes/index.vue'), - name: 'RolesCodes', - meta: { title: 'Permission Switch' } - }, - { - path: 'roleIndex', - component: () => import('@/views/roles-codes/role-index.vue'), - name: 'RoleIndex', - meta: { title: 'Role Index', roles: ['admin'] } - }, - { - path: 'code-index', - component: () => import('@/views/roles-codes/code-index.vue'), - name: 'CodeIndex', - meta: { title: 'Code Index', code: 16 } - }, - { - path: 'button-permission', - component: () => import('@/views/roles-codes/button-permission.vue'), - name: 'ButtonPermission', - meta: { title: 'Button Permission' } - } - ] - } + ] /** * asyncRoutes diff --git a/src/settings.js b/src/settings.js index 15ffc99..e56fca8 100644 --- a/src/settings.js +++ b/src/settings.js @@ -45,7 +45,7 @@ export const settings = { * @type {boolean} true | false * @description Whether need animation of main area */ - mainNeedAnimation: false, + mainNeedAnimation: true, /** * @type {boolean} true | false * @description Whether need nprogress diff --git a/src/styles/init-loading.css b/src/styles/init-loading.css new file mode 100644 index 0000000..169110f --- /dev/null +++ b/src/styles/init-loading.css @@ -0,0 +1,17 @@ +/*开屏loading样式设置*/ +.loader-wrapper{ + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + height: 80vh; +} + +.loading-gif{ + +} + +.load_title{ + margin-top: 30px; + font-size: 16px; +} diff --git a/src/styles/reset-elemenet-plus-style.scss b/src/styles/reset-elemenet-plus-style.scss index c7a101f..8b0ba95 100644 --- a/src/styles/reset-elemenet-plus-style.scss +++ b/src/styles/reset-elemenet-plus-style.scss @@ -2,3 +2,8 @@ .el-scrollbar__view { padding-bottom: 80px; } + + +.el-scrollbar{ + --el-menu-base-level-padding:15px; +} diff --git a/src/views/charts/index.vue b/src/views/charts/index.vue deleted file mode 100644 index a6ab424..0000000 --- a/src/views/charts/index.vue +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ffc4aff..3cd6551 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -1,29 +1,29 @@