@k3000/s1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +2 -0
- package/RuoYi-Vue3/.env.development +8 -0
- package/RuoYi-Vue3/.env.production +11 -0
- package/RuoYi-Vue3/.env.staging +11 -0
- package/RuoYi-Vue3/.github/FUNDING.yml +1 -0
- package/RuoYi-Vue3/LICENSE +20 -0
- package/RuoYi-Vue3/README.md +109 -0
- package/RuoYi-Vue3/bin/build.bat +12 -0
- package/RuoYi-Vue3/bin/package.bat +12 -0
- package/RuoYi-Vue3/bin/run-web.bat +12 -0
- package/RuoYi-Vue3/html/ie.html +46 -0
- package/RuoYi-Vue3/index.html +215 -0
- package/RuoYi-Vue3/package.json +44 -0
- package/RuoYi-Vue3/public/favicon.ico +0 -0
- package/RuoYi-Vue3/src/App.vue +15 -0
- package/RuoYi-Vue3/src/api/login.js +60 -0
- package/RuoYi-Vue3/src/api/menu.js +9 -0
- package/RuoYi-Vue3/src/api/monitor/cache.js +57 -0
- package/RuoYi-Vue3/src/api/monitor/job.js +71 -0
- package/RuoYi-Vue3/src/api/monitor/jobLog.js +26 -0
- package/RuoYi-Vue3/src/api/monitor/logininfor.js +34 -0
- package/RuoYi-Vue3/src/api/monitor/online.js +18 -0
- package/RuoYi-Vue3/src/api/monitor/operlog.js +26 -0
- package/RuoYi-Vue3/src/api/monitor/server.js +9 -0
- package/RuoYi-Vue3/src/api/system/config.js +60 -0
- package/RuoYi-Vue3/src/api/system/dept.js +52 -0
- package/RuoYi-Vue3/src/api/system/dict/data.js +52 -0
- package/RuoYi-Vue3/src/api/system/dict/type.js +60 -0
- package/RuoYi-Vue3/src/api/system/menu.js +60 -0
- package/RuoYi-Vue3/src/api/system/notice.js +44 -0
- package/RuoYi-Vue3/src/api/system/post.js +44 -0
- package/RuoYi-Vue3/src/api/system/role.js +119 -0
- package/RuoYi-Vue3/src/api/system/user.js +136 -0
- package/RuoYi-Vue3/src/api/tool/gen.js +85 -0
- package/RuoYi-Vue3/src/assets/401_images/401.gif +0 -0
- package/RuoYi-Vue3/src/assets/404_images/404.png +0 -0
- package/RuoYi-Vue3/src/assets/404_images/404_cloud.png +0 -0
- package/RuoYi-Vue3/src/assets/icons/svg/404.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/bug.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/build.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/button.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/cascader.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/chart.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/checkbox.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/clipboard.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/code.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/color.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/component.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/dashboard.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/date-range.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/date.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/dict.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/documentation.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/download.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/drag.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/druid.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/edit.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/education.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/email.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/example.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/excel.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/exit-fullscreen.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/eye-open.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/eye.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/form.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/fullscreen.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/github.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/guide.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/icon.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/input.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/international.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/job.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/language.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/link.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/list.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/lock.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/log.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/logininfor.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/message.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/money.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/monitor.svg +2 -0
- package/RuoYi-Vue3/src/assets/icons/svg/nested.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/number.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/online.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/password.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/pdf.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/people.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/peoples.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/phone.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/post.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/qq.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/question.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/radio.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/rate.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/redis-list.svg +2 -0
- package/RuoYi-Vue3/src/assets/icons/svg/redis.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/row.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/search.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/select.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/server.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/shopping.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/size.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/skill.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/slider.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/star.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/swagger.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/switch.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/system.svg +2 -0
- package/RuoYi-Vue3/src/assets/icons/svg/tab.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/table.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/textarea.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/theme.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/time-range.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/time.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/tool.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/tree-table.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/tree.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/upload.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/user.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/validCode.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/wechat.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/zip.svg +1 -0
- package/RuoYi-Vue3/src/assets/images/dark.svg +39 -0
- package/RuoYi-Vue3/src/assets/images/light.svg +39 -0
- package/RuoYi-Vue3/src/assets/images/login-background.jpg +0 -0
- package/RuoYi-Vue3/src/assets/images/pay.png +0 -0
- package/RuoYi-Vue3/src/assets/images/profile.jpg +0 -0
- package/RuoYi-Vue3/src/assets/logo/logo.png +0 -0
- package/RuoYi-Vue3/src/assets/styles/btn.scss +99 -0
- package/RuoYi-Vue3/src/assets/styles/element-ui.scss +96 -0
- package/RuoYi-Vue3/src/assets/styles/index.scss +184 -0
- package/RuoYi-Vue3/src/assets/styles/mixin.scss +66 -0
- package/RuoYi-Vue3/src/assets/styles/ruoyi.scss +281 -0
- package/RuoYi-Vue3/src/assets/styles/sidebar.scss +238 -0
- package/RuoYi-Vue3/src/assets/styles/transition.scss +49 -0
- package/RuoYi-Vue3/src/assets/styles/variables.module.scss +65 -0
- package/RuoYi-Vue3/src/components/Breadcrumb/index.vue +66 -0
- package/RuoYi-Vue3/src/components/Crontab/day.vue +174 -0
- package/RuoYi-Vue3/src/components/Crontab/hour.vue +133 -0
- package/RuoYi-Vue3/src/components/Crontab/index.vue +310 -0
- package/RuoYi-Vue3/src/components/Crontab/min.vue +126 -0
- package/RuoYi-Vue3/src/components/Crontab/month.vue +141 -0
- package/RuoYi-Vue3/src/components/Crontab/result.vue +540 -0
- package/RuoYi-Vue3/src/components/Crontab/second.vue +128 -0
- package/RuoYi-Vue3/src/components/Crontab/week.vue +197 -0
- package/RuoYi-Vue3/src/components/Crontab/year.vue +149 -0
- package/RuoYi-Vue3/src/components/DictTag/index.vue +82 -0
- package/RuoYi-Vue3/src/components/Editor/index.vue +251 -0
- package/RuoYi-Vue3/src/components/FileUpload/index.vue +207 -0
- package/RuoYi-Vue3/src/components/Hamburger/index.vue +41 -0
- package/RuoYi-Vue3/src/components/HeaderSearch/index.vue +187 -0
- package/RuoYi-Vue3/src/components/IconSelect/index.vue +111 -0
- package/RuoYi-Vue3/src/components/IconSelect/requireIcons.js +8 -0
- package/RuoYi-Vue3/src/components/ImagePreview/index.vue +92 -0
- package/RuoYi-Vue3/src/components/ImageUpload/index.vue +213 -0
- package/RuoYi-Vue3/src/components/Pagination/index.vue +105 -0
- package/RuoYi-Vue3/src/components/ParentView/index.vue +3 -0
- package/RuoYi-Vue3/src/components/RightToolbar/index.vue +134 -0
- package/RuoYi-Vue3/src/components/RuoYi/Doc/index.vue +13 -0
- package/RuoYi-Vue3/src/components/RuoYi/Git/index.vue +13 -0
- package/RuoYi-Vue3/src/components/Screenfull/index.vue +22 -0
- package/RuoYi-Vue3/src/components/SizeSelect/index.vue +45 -0
- package/RuoYi-Vue3/src/components/SvgIcon/index.vue +53 -0
- package/RuoYi-Vue3/src/components/SvgIcon/svgicon.js +10 -0
- package/RuoYi-Vue3/src/components/TopNav/index.vue +214 -0
- package/RuoYi-Vue3/src/components/TreeSelect/index.vue +156 -0
- package/RuoYi-Vue3/src/components/iFrame/index.vue +31 -0
- package/RuoYi-Vue3/src/directive/common/copyText.js +66 -0
- package/RuoYi-Vue3/src/directive/index.js +9 -0
- package/RuoYi-Vue3/src/directive/permission/hasPermi.js +28 -0
- package/RuoYi-Vue3/src/directive/permission/hasRole.js +28 -0
- package/RuoYi-Vue3/src/layout/components/AppMain.vue +68 -0
- package/RuoYi-Vue3/src/layout/components/IframeToggle/index.vue +25 -0
- package/RuoYi-Vue3/src/layout/components/InnerLink/index.vue +24 -0
- package/RuoYi-Vue3/src/layout/components/Navbar.vue +191 -0
- package/RuoYi-Vue3/src/layout/components/Settings/index.vue +209 -0
- package/RuoYi-Vue3/src/layout/components/Sidebar/Link.vue +40 -0
- package/RuoYi-Vue3/src/layout/components/Sidebar/Logo.vue +81 -0
- package/RuoYi-Vue3/src/layout/components/Sidebar/SidebarItem.vue +102 -0
- package/RuoYi-Vue3/src/layout/components/Sidebar/index.vue +54 -0
- package/RuoYi-Vue3/src/layout/components/TagsView/ScrollPane.vue +107 -0
- package/RuoYi-Vue3/src/layout/components/TagsView/index.vue +358 -0
- package/RuoYi-Vue3/src/layout/components/index.js +4 -0
- package/RuoYi-Vue3/src/layout/index.vue +114 -0
- package/RuoYi-Vue3/src/main.js +84 -0
- package/RuoYi-Vue3/src/permission.js +65 -0
- package/RuoYi-Vue3/src/plugins/auth.js +60 -0
- package/RuoYi-Vue3/src/plugins/cache.js +77 -0
- package/RuoYi-Vue3/src/plugins/download.js +79 -0
- package/RuoYi-Vue3/src/plugins/index.js +18 -0
- package/RuoYi-Vue3/src/plugins/modal.js +82 -0
- package/RuoYi-Vue3/src/plugins/tab.js +69 -0
- package/RuoYi-Vue3/src/router/index.js +175 -0
- package/RuoYi-Vue3/src/settings.js +47 -0
- package/RuoYi-Vue3/src/store/index.js +3 -0
- package/RuoYi-Vue3/src/store/modules/app.js +46 -0
- package/RuoYi-Vue3/src/store/modules/dict.js +57 -0
- package/RuoYi-Vue3/src/store/modules/permission.js +142 -0
- package/RuoYi-Vue3/src/store/modules/settings.js +38 -0
- package/RuoYi-Vue3/src/store/modules/tagsView.js +182 -0
- package/RuoYi-Vue3/src/store/modules/user.js +72 -0
- package/RuoYi-Vue3/src/utils/auth.js +15 -0
- package/RuoYi-Vue3/src/utils/dict.js +24 -0
- package/RuoYi-Vue3/src/utils/dynamicTitle.js +15 -0
- package/RuoYi-Vue3/src/utils/errorCode.js +6 -0
- package/RuoYi-Vue3/src/utils/index.js +390 -0
- package/RuoYi-Vue3/src/utils/jsencrypt.js +30 -0
- package/RuoYi-Vue3/src/utils/permission.js +51 -0
- package/RuoYi-Vue3/src/utils/request.js +152 -0
- package/RuoYi-Vue3/src/utils/ruoyi.js +246 -0
- package/RuoYi-Vue3/src/utils/scroll-to.js +58 -0
- package/RuoYi-Vue3/src/utils/theme.js +49 -0
- package/RuoYi-Vue3/src/utils/validate.js +93 -0
- package/RuoYi-Vue3/src/views/error/401.vue +82 -0
- package/RuoYi-Vue3/src/views/error/404.vue +227 -0
- package/RuoYi-Vue3/src/views/index.vue +1092 -0
- package/RuoYi-Vue3/src/views/login.vue +227 -0
- package/RuoYi-Vue3/src/views/monitor/cache/index.vue +132 -0
- package/RuoYi-Vue3/src/views/monitor/cache/list.vue +246 -0
- package/RuoYi-Vue3/src/views/monitor/druid/index.vue +13 -0
- package/RuoYi-Vue3/src/views/monitor/job/index.vue +501 -0
- package/RuoYi-Vue3/src/views/monitor/job/log.vue +283 -0
- package/RuoYi-Vue3/src/views/monitor/logininfor/index.vue +233 -0
- package/RuoYi-Vue3/src/views/monitor/online/index.vue +109 -0
- package/RuoYi-Vue3/src/views/monitor/operlog/index.vue +310 -0
- package/RuoYi-Vue3/src/views/monitor/server/index.vue +187 -0
- package/RuoYi-Vue3/src/views/redirect/index.vue +14 -0
- package/RuoYi-Vue3/src/views/register.vue +219 -0
- package/RuoYi-Vue3/src/views/system/config/index.vue +316 -0
- package/RuoYi-Vue3/src/views/system/dept/index.vue +283 -0
- package/RuoYi-Vue3/src/views/system/dict/data.vue +362 -0
- package/RuoYi-Vue3/src/views/system/dict/index.vue +323 -0
- package/RuoYi-Vue3/src/views/system/menu/index.vue +452 -0
- package/RuoYi-Vue3/src/views/system/notice/index.vue +292 -0
- package/RuoYi-Vue3/src/views/system/post/index.vue +287 -0
- package/RuoYi-Vue3/src/views/system/role/authUser.vue +179 -0
- package/RuoYi-Vue3/src/views/system/role/index.vue +584 -0
- package/RuoYi-Vue3/src/views/system/role/selectUser.vue +144 -0
- package/RuoYi-Vue3/src/views/system/user/authRole.vue +116 -0
- package/RuoYi-Vue3/src/views/system/user/index.vue +635 -0
- package/RuoYi-Vue3/src/views/system/user/profile/index.vue +87 -0
- package/RuoYi-Vue3/src/views/system/user/profile/resetPwd.vue +59 -0
- package/RuoYi-Vue3/src/views/system/user/profile/userAvatar.vue +180 -0
- package/RuoYi-Vue3/src/views/system/user/profile/userInfo.vue +67 -0
- package/RuoYi-Vue3/src/views/tool/build/index.vue +3 -0
- package/RuoYi-Vue3/src/views/tool/gen/basicInfoForm.vue +48 -0
- package/RuoYi-Vue3/src/views/tool/gen/createTable.vue +46 -0
- package/RuoYi-Vue3/src/views/tool/gen/editTable.vue +200 -0
- package/RuoYi-Vue3/src/views/tool/gen/genInfoForm.vue +306 -0
- package/RuoYi-Vue3/src/views/tool/gen/importTable.vue +126 -0
- package/RuoYi-Vue3/src/views/tool/gen/index.vue +310 -0
- package/RuoYi-Vue3/src/views/tool/swagger/index.vue +9 -0
- package/RuoYi-Vue3/vite/plugins/auto-import.js +12 -0
- package/RuoYi-Vue3/vite/plugins/compression.js +28 -0
- package/RuoYi-Vue3/vite/plugins/index.js +15 -0
- package/RuoYi-Vue3/vite/plugins/setup-extend.js +5 -0
- package/RuoYi-Vue3/vite/plugins/svg-icon.js +10 -0
- package/RuoYi-Vue3/vite.config.js +58 -0
- package/admin/README.MD +0 -0
- package/admin/base.mjs +447 -0
- package/admin/index.mjs +19 -0
- package/admin/monitor/job.mjs +24 -0
- package/admin/monitor/jobLog.mjs +8 -0
- package/admin/monitor/logininfor.mjs +23 -0
- package/admin/monitor/operlog.mjs +9 -0
- package/admin/monitor/server.mjs +54 -0
- package/admin/service.mjs +10 -0
- package/admin/system/component.mjs +16 -0
- package/admin/system/config.mjs +8 -0
- package/admin/system/dept.mjs +24 -0
- package/admin/system/dict.mjs +34 -0
- package/admin/system/login.mjs +119 -0
- package/admin/system/menu.mjs +33 -0
- package/admin/system/notice.mjs +8 -0
- package/admin/system/path.mjs +53 -0
- package/admin/system/post.mjs +8 -0
- package/admin/system/role.mjs +105 -0
- package/admin/system/user.mjs +93 -0
- package/admin/tool/gen.mjs +95 -0
- package/admin/tool/helper.mjs +1335 -0
- package/admin/tool/pm2.mjs +71 -0
- package/admin/tool/store.mjs +84 -0
- package/admin/tool/upload.mjs +112 -0
- package/app/README.MD +0 -0
- package/app/index.mjs +9 -0
- package/bin.mjs +211 -0
- package/build.mjs +25 -0
- package/common/README.MD +0 -0
- package/common/config.mjs +40 -0
- package/common/pm2.mjs +145 -0
- package/common/service.mjs +79 -0
- package/common/service0.mjs +468 -0
- package/common/tools.mjs +314 -0
- package/common/type.ts +498 -0
- package/file/README.MD +0 -0
- package/files/.env.production +11 -0
- package/files/gen.js +76 -0
- package/files/genImportTable.vue +120 -0
- package/files/genIndex.vue +309 -0
- package/files/genInfoForm.vue +302 -0
- package/files/login.vue +237 -0
- package/files/menu.js +68 -0
- package/files/menuIndex.vue +447 -0
- package/files/pm2.js +88 -0
- package/files/pm2Data.vue +335 -0
- package/files/pm2Index.vue +343 -0
- package/files/routerIndex.js +204 -0
- package/files/serverIndex.vue +215 -0
- package/files/store.js +96 -0
- package/files/storeData.vue +294 -0
- package/files/storeIndex.vue +245 -0
- package/files/upload.js +47 -0
- package/files/uploadIndex.vue +240 -0
- package/files/vite.config.js +58 -0
- package/index.mjs +28 -0
- package/jwt/README.MD +12 -0
- package/jwt/index.mjs +17 -0
- package/package.json +22 -0
- package/proxy/README.MD +0 -0
- package/proxy/index.mjs +16 -0
- package/static/README.MD +0 -0
- package/static/admin/assets/401-CYieuz9-.js +1 -0
- package/static/admin/assets/401-CYieuz9-.js.gz +0 -0
- package/static/admin/assets/401-DmT2Eyz6.css +1 -0
- package/static/admin/assets/401-HGF6Q5qM.gif +0 -0
- package/static/admin/assets/404-DFv5Zpvm.js +1 -0
- package/static/admin/assets/404-DFv5Zpvm.js.gz +0 -0
- package/static/admin/assets/404-Dy3nURRX.js +1 -0
- package/static/admin/assets/404-Dy3nURRX.js.gz +0 -0
- package/static/admin/assets/404-N4aRkdWY.png +0 -0
- package/static/admin/assets/404-uZCOR2Ze.css +1 -0
- package/static/admin/assets/404-uZCOR2Ze.css.gz +0 -0
- package/static/admin/assets/404_cloud-CPexjtDj.png +0 -0
- package/static/admin/assets/authRole-ma37t91O.js +1 -0
- package/static/admin/assets/authRole-ma37t91O.js.gz +0 -0
- package/static/admin/assets/authUser-C2Y6gkW3.js +1 -0
- package/static/admin/assets/authUser-C2Y6gkW3.js.gz +0 -0
- package/static/admin/assets/basicInfoForm-Cqv-g0Vq.js +1 -0
- package/static/admin/assets/basicInfoForm-Cqv-g0Vq.js.gz +0 -0
- package/static/admin/assets/bug-10dePVta.js +1 -0
- package/static/admin/assets/bug-10dePVta.js.gz +0 -0
- package/static/admin/assets/build-2jMyI6eP.js +1 -0
- package/static/admin/assets/build-2jMyI6eP.js.gz +0 -0
- package/static/admin/assets/button-BlSCM_GH.js +1 -0
- package/static/admin/assets/button-BlSCM_GH.js.gz +0 -0
- package/static/admin/assets/cache-CRGI5LFU.js +1 -0
- package/static/admin/assets/cascader-CXIOcY1C.js +1 -0
- package/static/admin/assets/cascader-CXIOcY1C.js.gz +0 -0
- package/static/admin/assets/chart-BsLMrzXU.js +1 -0
- package/static/admin/assets/checkbox-Bpiun3bf.js +1 -0
- package/static/admin/assets/checkbox-Bpiun3bf.js.gz +0 -0
- package/static/admin/assets/clipboard-DaV3cn7f.js +1 -0
- package/static/admin/assets/clipboard-DaV3cn7f.js.gz +0 -0
- package/static/admin/assets/code-DgJ8cT4a.js +1 -0
- package/static/admin/assets/color-y1Sshoou.js +1 -0
- package/static/admin/assets/color-y1Sshoou.js.gz +0 -0
- package/static/admin/assets/component-Djp9s69L.js +1 -0
- package/static/admin/assets/component-Djp9s69L.js.gz +0 -0
- package/static/admin/assets/createTable-CpixhIJI.js +1 -0
- package/static/admin/assets/createTable-CpixhIJI.js.gz +0 -0
- package/static/admin/assets/dashboard-Dy7qt_a2.js +1 -0
- package/static/admin/assets/dashboard-Dy7qt_a2.js.gz +0 -0
- package/static/admin/assets/data-B6ExfNCI.js +1 -0
- package/static/admin/assets/data-B6ExfNCI.js.gz +0 -0
- package/static/admin/assets/data-BNwnwlkO.js +34 -0
- package/static/admin/assets/data-BNwnwlkO.js.gz +0 -0
- package/static/admin/assets/data-C3FuPwta.css +1 -0
- package/static/admin/assets/data-DmSA0HcO.js +1 -0
- package/static/admin/assets/data-DmSA0HcO.js.gz +0 -0
- package/static/admin/assets/date-B1FSITvi.js +1 -0
- package/static/admin/assets/date-B1FSITvi.js.gz +0 -0
- package/static/admin/assets/date-range-B8MgYLb1.js +1 -0
- package/static/admin/assets/date-range-B8MgYLb1.js.gz +0 -0
- package/static/admin/assets/dict-Bi_GqSXR.js +1 -0
- package/static/admin/assets/dict-Bi_GqSXR.js.gz +0 -0
- package/static/admin/assets/documentation-uH9BvL5U.js +1 -0
- package/static/admin/assets/download-DeIzgQWH.js +1 -0
- package/static/admin/assets/download-DeIzgQWH.js.gz +0 -0
- package/static/admin/assets/drag-BG1_I1vT.js +1 -0
- package/static/admin/assets/druid-BybW_S_B.js +1 -0
- package/static/admin/assets/edit-D0DI9pAq.js +1 -0
- package/static/admin/assets/editTable-zr5bdAM7.js +1 -0
- package/static/admin/assets/editTable-zr5bdAM7.js.gz +0 -0
- package/static/admin/assets/education-47KsSYIl.js +1 -0
- package/static/admin/assets/email-Dig28Vt2.js +1 -0
- package/static/admin/assets/example-CnLLAFb9.js +1 -0
- package/static/admin/assets/excel-D3hj5F35.js +1 -0
- package/static/admin/assets/exit-fullscreen-dXhGKlQm.js +1 -0
- package/static/admin/assets/exit-fullscreen-dXhGKlQm.js.gz +0 -0
- package/static/admin/assets/eye-DqRz4sMZ.js +1 -0
- package/static/admin/assets/eye-DqRz4sMZ.js.gz +0 -0
- package/static/admin/assets/eye-open-BxlshWqB.js +1 -0
- package/static/admin/assets/eye-open-BxlshWqB.js.gz +0 -0
- package/static/admin/assets/form-BDTA_i-I.js +1 -0
- package/static/admin/assets/form-BDTA_i-I.js.gz +0 -0
- package/static/admin/assets/fullscreen-0JHt5yWX.js +1 -0
- package/static/admin/assets/gen-DLNrNhtb.js +1 -0
- package/static/admin/assets/genInfoForm-CMDsV5QX.js +1 -0
- package/static/admin/assets/genInfoForm-CMDsV5QX.js.gz +0 -0
- package/static/admin/assets/github-AJ0WQBa2.js +1 -0
- package/static/admin/assets/github-AJ0WQBa2.js.gz +0 -0
- package/static/admin/assets/guide-DZWUPi2j.js +1 -0
- package/static/admin/assets/icon-BtMv6Od8.js +1 -0
- package/static/admin/assets/icon-BtMv6Od8.js.gz +0 -0
- package/static/admin/assets/importTable-BsBsGfWB.js +1 -0
- package/static/admin/assets/importTable-BsBsGfWB.js.gz +0 -0
- package/static/admin/assets/index-1Gtzb1EG.css +1 -0
- package/static/admin/assets/index-1Gtzb1EG.css.gz +0 -0
- package/static/admin/assets/index-22TxXV_H.js +1 -0
- package/static/admin/assets/index-2PS_9Njt.js +1 -0
- package/static/admin/assets/index-2PS_9Njt.js.gz +0 -0
- package/static/admin/assets/index-2QWdVCKT.js +1 -0
- package/static/admin/assets/index-BH2yis6M.js +1 -0
- package/static/admin/assets/index-BYiWbDzj.js +137 -0
- package/static/admin/assets/index-BYiWbDzj.js.gz +0 -0
- package/static/admin/assets/index-BcoIBYYg.js +1 -0
- package/static/admin/assets/index-BcoIBYYg.js.gz +0 -0
- package/static/admin/assets/index-BdfyYxZX.css +1 -0
- package/static/admin/assets/index-BdfyYxZX.css.gz +0 -0
- package/static/admin/assets/index-BpFFXMK5.js +1 -0
- package/static/admin/assets/index-BpFFXMK5.js.gz +0 -0
- package/static/admin/assets/index-CKPU_AaL.js +1 -0
- package/static/admin/assets/index-CKPU_AaL.js.gz +0 -0
- package/static/admin/assets/index-CXsykB0X.js +1 -0
- package/static/admin/assets/index-CXsykB0X.js.gz +0 -0
- package/static/admin/assets/index-CfHRKVJR.js +1 -0
- package/static/admin/assets/index-CfHRKVJR.js.gz +0 -0
- package/static/admin/assets/index-ChrWcM7o.js +1 -0
- package/static/admin/assets/index-ChrWcM7o.js.gz +0 -0
- package/static/admin/assets/index-CyGqJLpz.css +1 -0
- package/static/admin/assets/index-Czuq8j-W.js +1 -0
- package/static/admin/assets/index-D5kEXJN3.js +1 -0
- package/static/admin/assets/index-D5kEXJN3.js.gz +0 -0
- package/static/admin/assets/index-D7sjRL--.js +1 -0
- package/static/admin/assets/index-D7sjRL--.js.gz +0 -0
- package/static/admin/assets/index-D9JRAPr4.js +1 -0
- package/static/admin/assets/index-D9JRAPr4.js.gz +0 -0
- package/static/admin/assets/index-DADWjT7Y.js +1 -0
- package/static/admin/assets/index-DADWjT7Y.js.gz +0 -0
- package/static/admin/assets/index-DUTtT4NU.js +1 -0
- package/static/admin/assets/index-DUTtT4NU.js.gz +0 -0
- package/static/admin/assets/index-DZR__uIb.js +1 -0
- package/static/admin/assets/index-DZR__uIb.js.gz +0 -0
- package/static/admin/assets/index-Da2r8G2b.js +1 -0
- package/static/admin/assets/index-Da2r8G2b.js.gz +0 -0
- package/static/admin/assets/index-DakybE_b.js +1 -0
- package/static/admin/assets/index-DakybE_b.js.gz +0 -0
- package/static/admin/assets/index-DdnU2rJ0.css +1 -0
- package/static/admin/assets/index-H21xXZr5.js +60 -0
- package/static/admin/assets/index-H21xXZr5.js.gz +0 -0
- package/static/admin/assets/index-PGDGQEbD.js +1 -0
- package/static/admin/assets/index-PGDGQEbD.js.gz +0 -0
- package/static/admin/assets/index-Rm6qYhrO.js +1 -0
- package/static/admin/assets/index-VG6ZkdYt.js +1 -0
- package/static/admin/assets/index-VG6ZkdYt.js.gz +0 -0
- package/static/admin/assets/index-YVnsjgTq.js +1 -0
- package/static/admin/assets/index-YVnsjgTq.js.gz +0 -0
- package/static/admin/assets/index-t3XJ47us.css +1 -0
- package/static/admin/assets/index-t3XJ47us.css.gz +0 -0
- package/static/admin/assets/index-xfai-fRy.js +1 -0
- package/static/admin/assets/index-xfai-fRy.js.gz +0 -0
- package/static/admin/assets/input-BJoPMnBW.js +1 -0
- package/static/admin/assets/international-CmzG1OHg.js +1 -0
- package/static/admin/assets/international-CmzG1OHg.js.gz +0 -0
- package/static/admin/assets/job-BcmuINx7.js +1 -0
- package/static/admin/assets/job-BcmuINx7.js.gz +0 -0
- package/static/admin/assets/job-COdMvNx2.js +1 -0
- package/static/admin/assets/language-CaW1LMEk.js +1 -0
- package/static/admin/assets/language-CaW1LMEk.js.gz +0 -0
- package/static/admin/assets/link-C93f4PgI.js +1 -0
- package/static/admin/assets/list-C7O8B4zW.js +1 -0
- package/static/admin/assets/list-C7O8B4zW.js.gz +0 -0
- package/static/admin/assets/list-DUaPnccL.js +1 -0
- package/static/admin/assets/list-DUaPnccL.js.gz +0 -0
- package/static/admin/assets/lock-Bexeb9hp.js +1 -0
- package/static/admin/assets/log-CF2F-nSs.js +1 -0
- package/static/admin/assets/log-CF2F-nSs.js.gz +0 -0
- package/static/admin/assets/log-g6qirYnf.js +1 -0
- package/static/admin/assets/log-g6qirYnf.js.gz +0 -0
- package/static/admin/assets/login-1ezV0PC1.css +1 -0
- package/static/admin/assets/login-1ezV0PC1.css.gz +0 -0
- package/static/admin/assets/login-BnkuYS6J.js +22 -0
- package/static/admin/assets/login-BnkuYS6J.js.gz +0 -0
- package/static/admin/assets/login-background-Yn3y1TP_.jpg +0 -0
- package/static/admin/assets/logininfor-Bm9ZYYR7.js +1 -0
- package/static/admin/assets/logininfor-Bm9ZYYR7.js.gz +0 -0
- package/static/admin/assets/logo-BjsPc2xl.png +0 -0
- package/static/admin/assets/menu-BIu3IsSF.js +1 -0
- package/static/admin/assets/message-UkR-VIBB.js +1 -0
- package/static/admin/assets/money-B1qqPuhn.js +1 -0
- package/static/admin/assets/monitor-gwnnVq4l.js +1 -0
- package/static/admin/assets/monitor-gwnnVq4l.js.gz +0 -0
- package/static/admin/assets/nested-B4d5u3hW.js +1 -0
- package/static/admin/assets/number-D4hB_nHC.js +1 -0
- package/static/admin/assets/number-D4hB_nHC.js.gz +0 -0
- package/static/admin/assets/online-C2ZP8pdY.js +1 -0
- package/static/admin/assets/online-C2ZP8pdY.js.gz +0 -0
- package/static/admin/assets/password-DfGvqQpB.js +1 -0
- package/static/admin/assets/password-DfGvqQpB.js.gz +0 -0
- package/static/admin/assets/pay-2ZbgPnxn.png +0 -0
- package/static/admin/assets/pdf-CD9mOGjJ.js +1 -0
- package/static/admin/assets/pdf-CD9mOGjJ.js.gz +0 -0
- package/static/admin/assets/people-CdGMHN63.js +1 -0
- package/static/admin/assets/people-CdGMHN63.js.gz +0 -0
- package/static/admin/assets/peoples-BRYsIqmI.js +1 -0
- package/static/admin/assets/phone-BpAUIz0g.js +1 -0
- package/static/admin/assets/phone-BpAUIz0g.js.gz +0 -0
- package/static/admin/assets/pm2-BkmkkE2A.js +1 -0
- package/static/admin/assets/post-DrLDyPY9.js +1 -0
- package/static/admin/assets/post-DrLDyPY9.js.gz +0 -0
- package/static/admin/assets/profile-DruvkrZU.jpg +0 -0
- package/static/admin/assets/qq-D8j4O83Y.js +1 -0
- package/static/admin/assets/qq-D8j4O83Y.js.gz +0 -0
- package/static/admin/assets/question-CvYWQbyW.js +1 -0
- package/static/admin/assets/question-CvYWQbyW.js.gz +0 -0
- package/static/admin/assets/radio-B0t9wPBQ.js +1 -0
- package/static/admin/assets/radio-B0t9wPBQ.js.gz +0 -0
- package/static/admin/assets/rate-CgnHQvKS.js +1 -0
- package/static/admin/assets/rate-CgnHQvKS.js.gz +0 -0
- package/static/admin/assets/redis-D4ECyT6a.js +1 -0
- package/static/admin/assets/redis-D4ECyT6a.js.gz +0 -0
- package/static/admin/assets/redis-list-BtKGPnqO.js +1 -0
- package/static/admin/assets/redis-list-BtKGPnqO.js.gz +0 -0
- package/static/admin/assets/register-B9RmZvjt.js +1 -0
- package/static/admin/assets/register-B9RmZvjt.js.gz +0 -0
- package/static/admin/assets/register-n3u7gqca.css +1 -0
- package/static/admin/assets/resetPwd-M0EIDnQk.js +1 -0
- package/static/admin/assets/resetPwd-M0EIDnQk.js.gz +0 -0
- package/static/admin/assets/role-XbHkNxnW.js +1 -0
- package/static/admin/assets/role-XbHkNxnW.js.gz +0 -0
- package/static/admin/assets/row-CRXKIHjm.js +1 -0
- package/static/admin/assets/row-CRXKIHjm.js.gz +0 -0
- package/static/admin/assets/search-CUfclCsR.js +1 -0
- package/static/admin/assets/select-DhuHHMxz.js +1 -0
- package/static/admin/assets/select-DhuHHMxz.js.gz +0 -0
- package/static/admin/assets/selectUser-DA_rE9J_.js +1 -0
- package/static/admin/assets/selectUser-DA_rE9J_.js.gz +0 -0
- package/static/admin/assets/server-unS7EyF7.js +1 -0
- package/static/admin/assets/shopping-CU1IRvxM.js +1 -0
- package/static/admin/assets/shopping-CU1IRvxM.js.gz +0 -0
- package/static/admin/assets/size-Cj9fB5Rp.js +1 -0
- package/static/admin/assets/skill-B8f_I4m_.js +1 -0
- package/static/admin/assets/skill-B8f_I4m_.js.gz +0 -0
- package/static/admin/assets/slider-BGfehM6X.js +1 -0
- package/static/admin/assets/star-kST8a72V.js +1 -0
- package/static/admin/assets/store-CX7IRN8X.js +1 -0
- package/static/admin/assets/swagger-BHGXZ2Jt.js +1 -0
- package/static/admin/assets/swagger-BHGXZ2Jt.js.gz +0 -0
- package/static/admin/assets/switch-CvaargRJ.js +1 -0
- package/static/admin/assets/system-DcNSH_Fq.js +1 -0
- package/static/admin/assets/system-DcNSH_Fq.js.gz +0 -0
- package/static/admin/assets/tab-nA3f0aBt.js +1 -0
- package/static/admin/assets/table-5PRh60AQ.js +1 -0
- package/static/admin/assets/test-CEJIIaDM.js +1 -0
- package/static/admin/assets/test-CEJIIaDM.js.gz +0 -0
- package/static/admin/assets/textarea-CJWXlgbJ.js +1 -0
- package/static/admin/assets/theme-CyGq941x.js +1 -0
- package/static/admin/assets/time-BVERp0sU.js +1 -0
- package/static/admin/assets/time-BVERp0sU.js.gz +0 -0
- package/static/admin/assets/time-range-D3dxgtLj.js +1 -0
- package/static/admin/assets/time-range-D3dxgtLj.js.gz +0 -0
- package/static/admin/assets/tool-D8kXk1l-.js +1 -0
- package/static/admin/assets/tool-D8kXk1l-.js.gz +0 -0
- package/static/admin/assets/tree-BCtS3oPD.js +1 -0
- package/static/admin/assets/tree-BCtS3oPD.js.gz +0 -0
- package/static/admin/assets/tree-table-CnOS99I9.js +1 -0
- package/static/admin/assets/tree-table-CnOS99I9.js.gz +0 -0
- package/static/admin/assets/type-BU7MsCG8.js +1 -0
- package/static/admin/assets/upload-BueI-Il1.js +1 -0
- package/static/admin/assets/upload-BueI-Il1.js.gz +0 -0
- package/static/admin/assets/user-DCGYGA9G.js +1 -0
- package/static/admin/assets/user-DCGYGA9G.js.gz +0 -0
- package/static/admin/assets/user-DqMuW5cU.js +1 -0
- package/static/admin/assets/userAvatar-BAmwMY1G.css +1 -0
- package/static/admin/assets/userAvatar-BAmwMY1G.css.gz +0 -0
- package/static/admin/assets/userAvatar-Bax34kaQ.js +7 -0
- package/static/admin/assets/userAvatar-Bax34kaQ.js.gz +0 -0
- package/static/admin/assets/userInfo-OvdBjEQX.js +1 -0
- package/static/admin/assets/userInfo-OvdBjEQX.js.gz +0 -0
- package/static/admin/assets/validCode-COB1iLxa.js +1 -0
- package/static/admin/assets/validCode-COB1iLxa.js.gz +0 -0
- package/static/admin/assets/wechat-lmQOcPZu.js +1 -0
- package/static/admin/assets/wechat-lmQOcPZu.js.gz +0 -0
- package/static/admin/assets/zip-DIOSZc69.js +1 -0
- package/static/admin/assets/zip-DIOSZc69.js.gz +0 -0
- package/static/admin/favicon.ico +0 -0
- package/static/admin/index.html +216 -0
- package/static/admin/index.html.gz +0 -0
- package/store1/README.MD +0 -0
- package/store1/generic.mjs +102 -0
- package/store1/index.mjs +30 -0
- package/store1/monitor.mjs +13 -0
- package/store1/role.mjs +137 -0
- package/store1/store/0/data +0 -0
- package/store1/store/0/index +0 -0
- package/store1/store/0/index.mjs +15 -0
- package/store1/store/1/buffer/464135 +1 -0
- package/store1/store/1/buffer/464587 +1 -0
- package/store1/store/1/data +0 -0
- package/store1/store/1/data-LAPTOP-S8G0S6EH +0 -0
- package/store1/store/1/index +0 -0
- package/store1/store/1/index-LAPTOP-S8G0S6EH +0 -0
- package/store1/store/1/index.mjs +4045 -0
- package/store1/store/1/type.ts +1492 -0
- package/store1/store/index.mjs +23 -0
- package/store1/store2/0/data +0 -0
- package/store1/store2/0/index +0 -0
- package/store1/store2/0/index.mjs +15 -0
- package/store1/store2/1/buffer/464135 +1 -0
- package/store1/store2/1/buffer/464587 +1 -0
- package/store1/store2/1/data +0 -0
- package/store1/store2/1/data-LAPTOP-S8G0S6EH +0 -0
- package/store1/store2/1/index +0 -0
- package/store1/store2/1/index-LAPTOP-S8G0S6EH +0 -0
- package/store1/store2/1/index.mjs +4045 -0
- package/store1/store2/1/type.ts +1492 -0
- package/store1/store2/index.mjs +23 -0
- package/store1/system.mjs +67 -0
- package/store1/tool.mjs +472 -0
- package/store1/user.mjs +228 -0
@@ -0,0 +1,72 @@
|
|
1
|
+
import { login, logout, getInfo } from '@/api/login'
|
2
|
+
import { getToken, setToken, removeToken } from '@/utils/auth'
|
3
|
+
import defAva from '@/assets/images/profile.jpg'
|
4
|
+
|
5
|
+
const useUserStore = defineStore(
|
6
|
+
'user',
|
7
|
+
{
|
8
|
+
state: () => ({
|
9
|
+
token: getToken(),
|
10
|
+
id: '',
|
11
|
+
name: '',
|
12
|
+
avatar: '',
|
13
|
+
roles: [],
|
14
|
+
permissions: []
|
15
|
+
}),
|
16
|
+
actions: {
|
17
|
+
// 登录
|
18
|
+
login(userInfo) {
|
19
|
+
const username = userInfo.username.trim()
|
20
|
+
const password = userInfo.password
|
21
|
+
const code = userInfo.code
|
22
|
+
const uuid = userInfo.uuid
|
23
|
+
return new Promise((resolve, reject) => {
|
24
|
+
login(username, password, code, uuid).then(res => {
|
25
|
+
setToken(res.token)
|
26
|
+
this.token = res.token
|
27
|
+
resolve()
|
28
|
+
}).catch(error => {
|
29
|
+
reject(error)
|
30
|
+
})
|
31
|
+
})
|
32
|
+
},
|
33
|
+
// 获取用户信息
|
34
|
+
getInfo() {
|
35
|
+
return new Promise((resolve, reject) => {
|
36
|
+
getInfo().then(res => {
|
37
|
+
const user = res.user
|
38
|
+
const avatar = (user.avatar == "" || user.avatar == null) ? defAva : import.meta.env.VITE_APP_BASE_API + user.avatar;
|
39
|
+
|
40
|
+
if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组
|
41
|
+
this.roles = res.roles
|
42
|
+
this.permissions = res.permissions
|
43
|
+
} else {
|
44
|
+
this.roles = ['ROLE_DEFAULT']
|
45
|
+
}
|
46
|
+
this.id = user.userId
|
47
|
+
this.name = user.userName
|
48
|
+
this.avatar = avatar
|
49
|
+
resolve(res)
|
50
|
+
}).catch(error => {
|
51
|
+
reject(error)
|
52
|
+
})
|
53
|
+
})
|
54
|
+
},
|
55
|
+
// 退出系统
|
56
|
+
logOut() {
|
57
|
+
return new Promise((resolve, reject) => {
|
58
|
+
logout(this.token).then(() => {
|
59
|
+
this.token = ''
|
60
|
+
this.roles = []
|
61
|
+
this.permissions = []
|
62
|
+
removeToken()
|
63
|
+
resolve()
|
64
|
+
}).catch(error => {
|
65
|
+
reject(error)
|
66
|
+
})
|
67
|
+
})
|
68
|
+
}
|
69
|
+
}
|
70
|
+
})
|
71
|
+
|
72
|
+
export default useUserStore
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import Cookies from 'js-cookie'
|
2
|
+
|
3
|
+
const TokenKey = 'Admin-Token'
|
4
|
+
|
5
|
+
export function getToken() {
|
6
|
+
return Cookies.get(TokenKey)
|
7
|
+
}
|
8
|
+
|
9
|
+
export function setToken(token) {
|
10
|
+
return Cookies.set(TokenKey, token)
|
11
|
+
}
|
12
|
+
|
13
|
+
export function removeToken() {
|
14
|
+
return Cookies.remove(TokenKey)
|
15
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import useDictStore from '@/store/modules/dict'
|
2
|
+
import { getDicts } from '@/api/system/dict/data'
|
3
|
+
|
4
|
+
/**
|
5
|
+
* 获取字典数据
|
6
|
+
*/
|
7
|
+
export function useDict(...args) {
|
8
|
+
const res = ref({});
|
9
|
+
return (() => {
|
10
|
+
args.forEach((dictType, index) => {
|
11
|
+
res.value[dictType] = [];
|
12
|
+
const dicts = useDictStore().getDict(dictType);
|
13
|
+
if (dicts) {
|
14
|
+
res.value[dictType] = dicts;
|
15
|
+
} else {
|
16
|
+
getDicts(dictType).then(resp => {
|
17
|
+
res.value[dictType] = resp.data.map(p => ({ label: p.dictLabel, value: p.dictValue, elTagType: p.listClass, elTagClass: p.cssClass }))
|
18
|
+
useDictStore().setDict(dictType, res.value[dictType]);
|
19
|
+
})
|
20
|
+
}
|
21
|
+
})
|
22
|
+
return toRefs(res.value);
|
23
|
+
})()
|
24
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import store from '@/store'
|
2
|
+
import defaultSettings from '@/settings'
|
3
|
+
import useSettingsStore from '@/store/modules/settings'
|
4
|
+
|
5
|
+
/**
|
6
|
+
* 动态修改标题
|
7
|
+
*/
|
8
|
+
export function useDynamicTitle() {
|
9
|
+
const settingsStore = useSettingsStore();
|
10
|
+
if (settingsStore.dynamicTitle) {
|
11
|
+
document.title = settingsStore.title + ' - ' + defaultSettings.title;
|
12
|
+
} else {
|
13
|
+
document.title = defaultSettings.title;
|
14
|
+
}
|
15
|
+
}
|
@@ -0,0 +1,390 @@
|
|
1
|
+
import { parseTime } from './ruoyi'
|
2
|
+
|
3
|
+
/**
|
4
|
+
* 表格时间格式化
|
5
|
+
*/
|
6
|
+
export function formatDate(cellValue) {
|
7
|
+
if (cellValue == null || cellValue == "") return "";
|
8
|
+
var date = new Date(cellValue)
|
9
|
+
var year = date.getFullYear()
|
10
|
+
var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
|
11
|
+
var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
|
12
|
+
var hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
|
13
|
+
var minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
|
14
|
+
var seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
|
15
|
+
return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds
|
16
|
+
}
|
17
|
+
|
18
|
+
/**
|
19
|
+
* @param {number} time
|
20
|
+
* @param {string} option
|
21
|
+
* @returns {string}
|
22
|
+
*/
|
23
|
+
export function formatTime(time, option) {
|
24
|
+
if (('' + time).length === 10) {
|
25
|
+
time = parseInt(time) * 1000
|
26
|
+
} else {
|
27
|
+
time = +time
|
28
|
+
}
|
29
|
+
const d = new Date(time)
|
30
|
+
const now = Date.now()
|
31
|
+
|
32
|
+
const diff = (now - d) / 1000
|
33
|
+
|
34
|
+
if (diff < 30) {
|
35
|
+
return '刚刚'
|
36
|
+
} else if (diff < 3600) {
|
37
|
+
// less 1 hour
|
38
|
+
return Math.ceil(diff / 60) + '分钟前'
|
39
|
+
} else if (diff < 3600 * 24) {
|
40
|
+
return Math.ceil(diff / 3600) + '小时前'
|
41
|
+
} else if (diff < 3600 * 24 * 2) {
|
42
|
+
return '1天前'
|
43
|
+
}
|
44
|
+
if (option) {
|
45
|
+
return parseTime(time, option)
|
46
|
+
} else {
|
47
|
+
return (
|
48
|
+
d.getMonth() +
|
49
|
+
1 +
|
50
|
+
'月' +
|
51
|
+
d.getDate() +
|
52
|
+
'日' +
|
53
|
+
d.getHours() +
|
54
|
+
'时' +
|
55
|
+
d.getMinutes() +
|
56
|
+
'分'
|
57
|
+
)
|
58
|
+
}
|
59
|
+
}
|
60
|
+
|
61
|
+
/**
|
62
|
+
* @param {string} url
|
63
|
+
* @returns {Object}
|
64
|
+
*/
|
65
|
+
export function getQueryObject(url) {
|
66
|
+
url = url == null ? window.location.href : url
|
67
|
+
const search = url.substring(url.lastIndexOf('?') + 1)
|
68
|
+
const obj = {}
|
69
|
+
const reg = /([^?&=]+)=([^?&=]*)/g
|
70
|
+
search.replace(reg, (rs, $1, $2) => {
|
71
|
+
const name = decodeURIComponent($1)
|
72
|
+
let val = decodeURIComponent($2)
|
73
|
+
val = String(val)
|
74
|
+
obj[name] = val
|
75
|
+
return rs
|
76
|
+
})
|
77
|
+
return obj
|
78
|
+
}
|
79
|
+
|
80
|
+
/**
|
81
|
+
* @param {string} input value
|
82
|
+
* @returns {number} output value
|
83
|
+
*/
|
84
|
+
export function byteLength(str) {
|
85
|
+
// returns the byte length of an utf8 string
|
86
|
+
let s = str.length
|
87
|
+
for (var i = str.length - 1; i >= 0; i--) {
|
88
|
+
const code = str.charCodeAt(i)
|
89
|
+
if (code > 0x7f && code <= 0x7ff) s++
|
90
|
+
else if (code > 0x7ff && code <= 0xffff) s += 2
|
91
|
+
if (code >= 0xDC00 && code <= 0xDFFF) i--
|
92
|
+
}
|
93
|
+
return s
|
94
|
+
}
|
95
|
+
|
96
|
+
/**
|
97
|
+
* @param {Array} actual
|
98
|
+
* @returns {Array}
|
99
|
+
*/
|
100
|
+
export function cleanArray(actual) {
|
101
|
+
const newArray = []
|
102
|
+
for (let i = 0; i < actual.length; i++) {
|
103
|
+
if (actual[i]) {
|
104
|
+
newArray.push(actual[i])
|
105
|
+
}
|
106
|
+
}
|
107
|
+
return newArray
|
108
|
+
}
|
109
|
+
|
110
|
+
/**
|
111
|
+
* @param {Object} json
|
112
|
+
* @returns {Array}
|
113
|
+
*/
|
114
|
+
export function param(json) {
|
115
|
+
if (!json) return ''
|
116
|
+
return cleanArray(
|
117
|
+
Object.keys(json).map(key => {
|
118
|
+
if (json[key] === undefined) return ''
|
119
|
+
return encodeURIComponent(key) + '=' + encodeURIComponent(json[key])
|
120
|
+
})
|
121
|
+
).join('&')
|
122
|
+
}
|
123
|
+
|
124
|
+
/**
|
125
|
+
* @param {string} url
|
126
|
+
* @returns {Object}
|
127
|
+
*/
|
128
|
+
export function param2Obj(url) {
|
129
|
+
const search = decodeURIComponent(url.split('?')[1]).replace(/\+/g, ' ')
|
130
|
+
if (!search) {
|
131
|
+
return {}
|
132
|
+
}
|
133
|
+
const obj = {}
|
134
|
+
const searchArr = search.split('&')
|
135
|
+
searchArr.forEach(v => {
|
136
|
+
const index = v.indexOf('=')
|
137
|
+
if (index !== -1) {
|
138
|
+
const name = v.substring(0, index)
|
139
|
+
const val = v.substring(index + 1, v.length)
|
140
|
+
obj[name] = val
|
141
|
+
}
|
142
|
+
})
|
143
|
+
return obj
|
144
|
+
}
|
145
|
+
|
146
|
+
/**
|
147
|
+
* @param {string} val
|
148
|
+
* @returns {string}
|
149
|
+
*/
|
150
|
+
export function html2Text(val) {
|
151
|
+
const div = document.createElement('div')
|
152
|
+
div.innerHTML = val
|
153
|
+
return div.textContent || div.innerText
|
154
|
+
}
|
155
|
+
|
156
|
+
/**
|
157
|
+
* Merges two objects, giving the last one precedence
|
158
|
+
* @param {Object} target
|
159
|
+
* @param {(Object|Array)} source
|
160
|
+
* @returns {Object}
|
161
|
+
*/
|
162
|
+
export function objectMerge(target, source) {
|
163
|
+
if (typeof target !== 'object') {
|
164
|
+
target = {}
|
165
|
+
}
|
166
|
+
if (Array.isArray(source)) {
|
167
|
+
return source.slice()
|
168
|
+
}
|
169
|
+
Object.keys(source).forEach(property => {
|
170
|
+
const sourceProperty = source[property]
|
171
|
+
if (typeof sourceProperty === 'object') {
|
172
|
+
target[property] = objectMerge(target[property], sourceProperty)
|
173
|
+
} else {
|
174
|
+
target[property] = sourceProperty
|
175
|
+
}
|
176
|
+
})
|
177
|
+
return target
|
178
|
+
}
|
179
|
+
|
180
|
+
/**
|
181
|
+
* @param {HTMLElement} element
|
182
|
+
* @param {string} className
|
183
|
+
*/
|
184
|
+
export function toggleClass(element, className) {
|
185
|
+
if (!element || !className) {
|
186
|
+
return
|
187
|
+
}
|
188
|
+
let classString = element.className
|
189
|
+
const nameIndex = classString.indexOf(className)
|
190
|
+
if (nameIndex === -1) {
|
191
|
+
classString += '' + className
|
192
|
+
} else {
|
193
|
+
classString =
|
194
|
+
classString.substr(0, nameIndex) +
|
195
|
+
classString.substr(nameIndex + className.length)
|
196
|
+
}
|
197
|
+
element.className = classString
|
198
|
+
}
|
199
|
+
|
200
|
+
/**
|
201
|
+
* @param {string} type
|
202
|
+
* @returns {Date}
|
203
|
+
*/
|
204
|
+
export function getTime(type) {
|
205
|
+
if (type === 'start') {
|
206
|
+
return new Date().getTime() - 3600 * 1000 * 24 * 90
|
207
|
+
} else {
|
208
|
+
return new Date(new Date().toDateString())
|
209
|
+
}
|
210
|
+
}
|
211
|
+
|
212
|
+
/**
|
213
|
+
* @param {Function} func
|
214
|
+
* @param {number} wait
|
215
|
+
* @param {boolean} immediate
|
216
|
+
* @return {*}
|
217
|
+
*/
|
218
|
+
export function debounce(func, wait, immediate) {
|
219
|
+
let timeout, args, context, timestamp, result
|
220
|
+
|
221
|
+
const later = function() {
|
222
|
+
// 据上一次触发时间间隔
|
223
|
+
const last = +new Date() - timestamp
|
224
|
+
|
225
|
+
// 上次被包装函数被调用时间间隔 last 小于设定时间间隔 wait
|
226
|
+
if (last < wait && last > 0) {
|
227
|
+
timeout = setTimeout(later, wait - last)
|
228
|
+
} else {
|
229
|
+
timeout = null
|
230
|
+
// 如果设定为immediate===true,因为开始边界已经调用过了此处无需调用
|
231
|
+
if (!immediate) {
|
232
|
+
result = func.apply(context, args)
|
233
|
+
if (!timeout) context = args = null
|
234
|
+
}
|
235
|
+
}
|
236
|
+
}
|
237
|
+
|
238
|
+
return function(...args) {
|
239
|
+
context = this
|
240
|
+
timestamp = +new Date()
|
241
|
+
const callNow = immediate && !timeout
|
242
|
+
// 如果延时不存在,重新设定延时
|
243
|
+
if (!timeout) timeout = setTimeout(later, wait)
|
244
|
+
if (callNow) {
|
245
|
+
result = func.apply(context, args)
|
246
|
+
context = args = null
|
247
|
+
}
|
248
|
+
|
249
|
+
return result
|
250
|
+
}
|
251
|
+
}
|
252
|
+
|
253
|
+
/**
|
254
|
+
* This is just a simple version of deep copy
|
255
|
+
* Has a lot of edge cases bug
|
256
|
+
* If you want to use a perfect deep copy, use lodash's _.cloneDeep
|
257
|
+
* @param {Object} source
|
258
|
+
* @returns {Object}
|
259
|
+
*/
|
260
|
+
export function deepClone(source) {
|
261
|
+
if (!source && typeof source !== 'object') {
|
262
|
+
throw new Error('error arguments', 'deepClone')
|
263
|
+
}
|
264
|
+
const targetObj = source.constructor === Array ? [] : {}
|
265
|
+
Object.keys(source).forEach(keys => {
|
266
|
+
if (source[keys] && typeof source[keys] === 'object') {
|
267
|
+
targetObj[keys] = deepClone(source[keys])
|
268
|
+
} else {
|
269
|
+
targetObj[keys] = source[keys]
|
270
|
+
}
|
271
|
+
})
|
272
|
+
return targetObj
|
273
|
+
}
|
274
|
+
|
275
|
+
/**
|
276
|
+
* @param {Array} arr
|
277
|
+
* @returns {Array}
|
278
|
+
*/
|
279
|
+
export function uniqueArr(arr) {
|
280
|
+
return Array.from(new Set(arr))
|
281
|
+
}
|
282
|
+
|
283
|
+
/**
|
284
|
+
* @returns {string}
|
285
|
+
*/
|
286
|
+
export function createUniqueString() {
|
287
|
+
const timestamp = +new Date() + ''
|
288
|
+
const randomNum = parseInt((1 + Math.random()) * 65536) + ''
|
289
|
+
return (+(randomNum + timestamp)).toString(32)
|
290
|
+
}
|
291
|
+
|
292
|
+
/**
|
293
|
+
* Check if an element has a class
|
294
|
+
* @param {HTMLElement} elm
|
295
|
+
* @param {string} cls
|
296
|
+
* @returns {boolean}
|
297
|
+
*/
|
298
|
+
export function hasClass(ele, cls) {
|
299
|
+
return !!ele.className.match(new RegExp('(\\s|^)' + cls + '(\\s|$)'))
|
300
|
+
}
|
301
|
+
|
302
|
+
/**
|
303
|
+
* Add class to element
|
304
|
+
* @param {HTMLElement} elm
|
305
|
+
* @param {string} cls
|
306
|
+
*/
|
307
|
+
export function addClass(ele, cls) {
|
308
|
+
if (!hasClass(ele, cls)) ele.className += ' ' + cls
|
309
|
+
}
|
310
|
+
|
311
|
+
/**
|
312
|
+
* Remove class from element
|
313
|
+
* @param {HTMLElement} elm
|
314
|
+
* @param {string} cls
|
315
|
+
*/
|
316
|
+
export function removeClass(ele, cls) {
|
317
|
+
if (hasClass(ele, cls)) {
|
318
|
+
const reg = new RegExp('(\\s|^)' + cls + '(\\s|$)')
|
319
|
+
ele.className = ele.className.replace(reg, ' ')
|
320
|
+
}
|
321
|
+
}
|
322
|
+
|
323
|
+
export function makeMap(str, expectsLowerCase) {
|
324
|
+
const map = Object.create(null)
|
325
|
+
const list = str.split(',')
|
326
|
+
for (let i = 0; i < list.length; i++) {
|
327
|
+
map[list[i]] = true
|
328
|
+
}
|
329
|
+
return expectsLowerCase
|
330
|
+
? val => map[val.toLowerCase()]
|
331
|
+
: val => map[val]
|
332
|
+
}
|
333
|
+
|
334
|
+
export const exportDefault = 'export default '
|
335
|
+
|
336
|
+
export const beautifierConf = {
|
337
|
+
html: {
|
338
|
+
indent_size: '2',
|
339
|
+
indent_char: ' ',
|
340
|
+
max_preserve_newlines: '-1',
|
341
|
+
preserve_newlines: false,
|
342
|
+
keep_array_indentation: false,
|
343
|
+
break_chained_methods: false,
|
344
|
+
indent_scripts: 'separate',
|
345
|
+
brace_style: 'end-expand',
|
346
|
+
space_before_conditional: true,
|
347
|
+
unescape_strings: false,
|
348
|
+
jslint_happy: false,
|
349
|
+
end_with_newline: true,
|
350
|
+
wrap_line_length: '110',
|
351
|
+
indent_inner_html: true,
|
352
|
+
comma_first: false,
|
353
|
+
e4x: true,
|
354
|
+
indent_empty_lines: true
|
355
|
+
},
|
356
|
+
js: {
|
357
|
+
indent_size: '2',
|
358
|
+
indent_char: ' ',
|
359
|
+
max_preserve_newlines: '-1',
|
360
|
+
preserve_newlines: false,
|
361
|
+
keep_array_indentation: false,
|
362
|
+
break_chained_methods: false,
|
363
|
+
indent_scripts: 'normal',
|
364
|
+
brace_style: 'end-expand',
|
365
|
+
space_before_conditional: true,
|
366
|
+
unescape_strings: false,
|
367
|
+
jslint_happy: true,
|
368
|
+
end_with_newline: true,
|
369
|
+
wrap_line_length: '110',
|
370
|
+
indent_inner_html: true,
|
371
|
+
comma_first: false,
|
372
|
+
e4x: true,
|
373
|
+
indent_empty_lines: true
|
374
|
+
}
|
375
|
+
}
|
376
|
+
|
377
|
+
// 首字母大小
|
378
|
+
export function titleCase(str) {
|
379
|
+
return str.replace(/( |^)[a-z]/g, L => L.toUpperCase())
|
380
|
+
}
|
381
|
+
|
382
|
+
// 下划转驼峰
|
383
|
+
export function camelCase(str) {
|
384
|
+
return str.replace(/_[a-z]/g, str1 => str1.substr(-1).toUpperCase())
|
385
|
+
}
|
386
|
+
|
387
|
+
export function isNumberStr(str) {
|
388
|
+
return /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(str)
|
389
|
+
}
|
390
|
+
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import JSEncrypt from 'jsencrypt/bin/jsencrypt.min'
|
2
|
+
|
3
|
+
// 密钥对生成 http://web.chacuo.net/netrsakeypair
|
4
|
+
|
5
|
+
const publicKey = 'MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKoR8mX0rGKLqzcWmOzbfj64K8ZIgOdH\n' +
|
6
|
+
'nzkXSOVOZbFu/TJhZ7rFAN+eaGkl3C4buccQd/EjEsj9ir7ijT7h96MCAwEAAQ=='
|
7
|
+
|
8
|
+
const privateKey = 'MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAqhHyZfSsYourNxaY\n' +
|
9
|
+
'7Nt+PrgrxkiA50efORdI5U5lsW79MmFnusUA355oaSXcLhu5xxB38SMSyP2KvuKN\n' +
|
10
|
+
'PuH3owIDAQABAkAfoiLyL+Z4lf4Myxk6xUDgLaWGximj20CUf+5BKKnlrK+Ed8gA\n' +
|
11
|
+
'kM0HqoTt2UZwA5E2MzS4EI2gjfQhz5X28uqxAiEA3wNFxfrCZlSZHb0gn2zDpWow\n' +
|
12
|
+
'cSxQAgiCstxGUoOqlW8CIQDDOerGKH5OmCJ4Z21v+F25WaHYPxCFMvwxpcw99Ecv\n' +
|
13
|
+
'DQIgIdhDTIqD2jfYjPTY8Jj3EDGPbH2HHuffvflECt3Ek60CIQCFRlCkHpi7hthh\n' +
|
14
|
+
'YhovyloRYsM+IS9h/0BzlEAuO0ktMQIgSPT3aFAgJYwKpqRYKlLDVcflZFCKY7u3\n' +
|
15
|
+
'UP8iWi1Qw0Y='
|
16
|
+
|
17
|
+
// 加密
|
18
|
+
export function encrypt(txt) {
|
19
|
+
const encryptor = new JSEncrypt()
|
20
|
+
encryptor.setPublicKey(publicKey) // 设置公钥
|
21
|
+
return encryptor.encrypt(txt) // 对数据进行加密
|
22
|
+
}
|
23
|
+
|
24
|
+
// 解密
|
25
|
+
export function decrypt(txt) {
|
26
|
+
const encryptor = new JSEncrypt()
|
27
|
+
encryptor.setPrivateKey(privateKey) // 设置私钥
|
28
|
+
return encryptor.decrypt(txt) // 对数据进行解密
|
29
|
+
}
|
30
|
+
|
@@ -0,0 +1,51 @@
|
|
1
|
+
import useUserStore from '@/store/modules/user'
|
2
|
+
|
3
|
+
/**
|
4
|
+
* 字符权限校验
|
5
|
+
* @param {Array} value 校验值
|
6
|
+
* @returns {Boolean}
|
7
|
+
*/
|
8
|
+
export function checkPermi(value) {
|
9
|
+
if (value && value instanceof Array && value.length > 0) {
|
10
|
+
const permissions = useUserStore().permissions
|
11
|
+
const permissionDatas = value
|
12
|
+
const all_permission = "*:*:*";
|
13
|
+
|
14
|
+
const hasPermission = permissions.some(permission => {
|
15
|
+
return all_permission === permission || permissionDatas.includes(permission)
|
16
|
+
})
|
17
|
+
|
18
|
+
if (!hasPermission) {
|
19
|
+
return false
|
20
|
+
}
|
21
|
+
return true
|
22
|
+
} else {
|
23
|
+
console.error(`need roles! Like checkPermi="['system:user:add','system:user:edit']"`)
|
24
|
+
return false
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
28
|
+
/**
|
29
|
+
* 角色权限校验
|
30
|
+
* @param {Array} value 校验值
|
31
|
+
* @returns {Boolean}
|
32
|
+
*/
|
33
|
+
export function checkRole(value) {
|
34
|
+
if (value && value instanceof Array && value.length > 0) {
|
35
|
+
const roles = useUserStore().roles
|
36
|
+
const permissionRoles = value
|
37
|
+
const super_admin = "admin";
|
38
|
+
|
39
|
+
const hasRole = roles.some(role => {
|
40
|
+
return super_admin === role || permissionRoles.includes(role)
|
41
|
+
})
|
42
|
+
|
43
|
+
if (!hasRole) {
|
44
|
+
return false
|
45
|
+
}
|
46
|
+
return true
|
47
|
+
} else {
|
48
|
+
console.error(`need roles! Like checkRole="['admin','editor']"`)
|
49
|
+
return false
|
50
|
+
}
|
51
|
+
}
|