@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,23 @@
|
|
1
|
+
|
2
|
+
const index = import.meta.url.indexOf('?')
|
3
|
+
|
4
|
+
const url = `./1/index.mjs${index > -1 ? import.meta.url.substring(index) : ''}`
|
5
|
+
|
6
|
+
let remark0, close0, getStruct0
|
7
|
+
|
8
|
+
/**
|
9
|
+
* @type {import('./1/type').Storage}
|
10
|
+
*/
|
11
|
+
const storage = await new Promise((resolve, reject) => import(url)
|
12
|
+
.then(modules => {
|
13
|
+
remark0 = modules.remark
|
14
|
+
close0 = modules.close
|
15
|
+
getStruct0 = modules.getStruct
|
16
|
+
resolve(modules.default)
|
17
|
+
}).catch(error => reject(error)))
|
18
|
+
|
19
|
+
export const remark = remark0
|
20
|
+
export const close = close0
|
21
|
+
export const getStruct = getStruct0
|
22
|
+
|
23
|
+
export default storage
|
@@ -0,0 +1,67 @@
|
|
1
|
+
import {colEqual, colIncludes, Pools} from "../common/tools.mjs";
|
2
|
+
import store from "./store/index.mjs";
|
3
|
+
|
4
|
+
const map = new Pools()
|
5
|
+
|
6
|
+
map.set('/getDeptList', data => {
|
7
|
+
|
8
|
+
return store.sysDept.filter(dept => colIncludes(data.deptName, dept.deptName) && colEqual(data.status, dept.status))
|
9
|
+
})
|
10
|
+
|
11
|
+
const exclude = (dept, id) => {
|
12
|
+
|
13
|
+
if (dept.deptId === id || dept.parentId === id) return false
|
14
|
+
|
15
|
+
const d = store.sysDept.find(d => d.deptId === dept.parentId)
|
16
|
+
|
17
|
+
if (d === undefined) return true
|
18
|
+
|
19
|
+
return exclude(d, id)
|
20
|
+
}
|
21
|
+
|
22
|
+
map.set('/getDeptListExcludeById', id => {
|
23
|
+
|
24
|
+
return store.sysDept.filter(dept => exclude(dept, id))
|
25
|
+
})
|
26
|
+
|
27
|
+
map.set('/getMenuList', data => {
|
28
|
+
|
29
|
+
return store.sysMenu.filter(menu => colIncludes(data.menuName, menu.menuName) && colEqual(data.status, menu.status))
|
30
|
+
})
|
31
|
+
|
32
|
+
function buildMenu(menus, pid = 0) {
|
33
|
+
|
34
|
+
return menus.filter(menu => menu.parentId === pid).map(menu => {
|
35
|
+
|
36
|
+
const m = {
|
37
|
+
id: menu.menuId,
|
38
|
+
label: menu.menuName,
|
39
|
+
}
|
40
|
+
|
41
|
+
const children = buildMenu(menus, menu.menuId)
|
42
|
+
|
43
|
+
if (children.length > 0) {
|
44
|
+
|
45
|
+
m.children = children
|
46
|
+
}
|
47
|
+
|
48
|
+
return m
|
49
|
+
})
|
50
|
+
}
|
51
|
+
|
52
|
+
map.set('/getTreeSelect', _ => {
|
53
|
+
|
54
|
+
return buildMenu(store.sysMenu)
|
55
|
+
})
|
56
|
+
|
57
|
+
map.set('/getRoleMenuTreeSelect', id => {
|
58
|
+
|
59
|
+
return {
|
60
|
+
checkedKeys: store.sysRoleMenu
|
61
|
+
.filter(roleMenu => roleMenu.roleId === Number.parseInt(id))
|
62
|
+
.map(roleMenu => roleMenu.menuId),
|
63
|
+
menus: buildMenu(store.sysMenu)
|
64
|
+
}
|
65
|
+
})
|
66
|
+
|
67
|
+
export default map
|
package/store1/tool.mjs
ADDED
@@ -0,0 +1,472 @@
|
|
1
|
+
import {colIncludes, page, Pools, rowSlice, update} from "../common/tools.mjs";
|
2
|
+
import store, {getStruct, remark} from "./store/index.mjs";
|
3
|
+
import Query from "tools2/mysql2ssh2.mjs";
|
4
|
+
import {mysql, serverDir} from "../common/config.mjs";
|
5
|
+
import {
|
6
|
+
columnNameNotEdit,
|
7
|
+
columnNameNotList,
|
8
|
+
columnNameNotQuery, generator, getHtmlByType,
|
9
|
+
hungarianToCamel,
|
10
|
+
o2l, objKeyHungarianToCamel, typeChange
|
11
|
+
} from "../admin/tool/helper.mjs";
|
12
|
+
import {pm2} from "../common/pm2.mjs";
|
13
|
+
|
14
|
+
const map = new Pools()
|
15
|
+
|
16
|
+
map.set('/updateGenTable', data => {
|
17
|
+
|
18
|
+
const table = store.genTable.find(table => table.tableId === data.tableId)
|
19
|
+
|
20
|
+
if (table === undefined) return Promise.reject('表信息不存在,刷新重试')
|
21
|
+
|
22
|
+
update(table, data)
|
23
|
+
|
24
|
+
for (const column of data.columns) {
|
25
|
+
|
26
|
+
const col = store.genTableColumn.find(col => col.columnId === column.columnId)
|
27
|
+
|
28
|
+
if (col === undefined) continue
|
29
|
+
|
30
|
+
update(col, column)
|
31
|
+
}
|
32
|
+
// todo
|
33
|
+
console.log(data.params)
|
34
|
+
})
|
35
|
+
|
36
|
+
const query = new Query(mysql)
|
37
|
+
|
38
|
+
const importTable = data => {
|
39
|
+
|
40
|
+
const tablesName = data.tables.split(',')
|
41
|
+
|
42
|
+
for (const [key, value] of Object.entries(getStruct())) {
|
43
|
+
|
44
|
+
if (!tablesName.includes(key)) continue
|
45
|
+
|
46
|
+
const comment = value[remark]
|
47
|
+
|
48
|
+
store.genTable.push({
|
49
|
+
tableName: key,
|
50
|
+
tableComment: comment || key,
|
51
|
+
functionAuthor: data.userName,
|
52
|
+
functionName: key[0].toUpperCase() + key.substring(1),
|
53
|
+
className: key,
|
54
|
+
packageName: key.startsWith('sys') ? 'system' : 'business',
|
55
|
+
moduleName: key.startsWith('sys') ? 'system' : 'business',
|
56
|
+
businessName: key,
|
57
|
+
createBy: data.userName,
|
58
|
+
createTime: new Date(),
|
59
|
+
})
|
60
|
+
|
61
|
+
const {tableId} = store.genTable.find(t => t.tableName === key) || {}
|
62
|
+
|
63
|
+
for (const [k, v] of Object.entries(value)) {
|
64
|
+
|
65
|
+
store.genTableColumn.push({
|
66
|
+
tableId,
|
67
|
+
columnName: k,
|
68
|
+
columnComment: v.remark,
|
69
|
+
columnType: typeChange[v.type],
|
70
|
+
isPk: (v.type === 'id' || Reflect.has(v, 'step')) ? '1' : '0',
|
71
|
+
isIncrement: Reflect.has(v, 'step') ? '1' : '0',
|
72
|
+
isRequired: '0',
|
73
|
+
isInsert: '1',
|
74
|
+
isEdit: columnNameNotEdit.some(name => k.toLowerCase().endsWith(name)) ? '0' : '1',
|
75
|
+
isList: columnNameNotList.some(name => k.toLowerCase().endsWith(name)) ? '0' : '1',
|
76
|
+
isQuery: columnNameNotQuery.some(name => k.toLowerCase().endsWith(name)) ? '0' : '1',
|
77
|
+
htmlType: getHtmlByType(typeChange[v.type], k),
|
78
|
+
queryType: k.toLowerCase().endsWith('name') ? 'LIKE' : 'EQ',
|
79
|
+
sort: 1,
|
80
|
+
createBy: data.userName,
|
81
|
+
createTime: new Date(),
|
82
|
+
})
|
83
|
+
}
|
84
|
+
}
|
85
|
+
}
|
86
|
+
|
87
|
+
map.set('/genTableImportTable', async data => {
|
88
|
+
|
89
|
+
if (data.other === 'true') return importTable(data)
|
90
|
+
|
91
|
+
const tablesName = data.tables.split(',')
|
92
|
+
|
93
|
+
const tables = await query(`SELECT table_name, table_comment, create_time, update_time FROM
|
94
|
+
information_schema.tables WHERE table_name NOT LIKE 'qrtz_%' AND table_name NOT LIKE 'gen_%' AND
|
95
|
+
table_schema = (SELECT DATABASE()) AND table_name IN (?)`, tablesName)
|
96
|
+
|
97
|
+
const tablesColumn = []
|
98
|
+
|
99
|
+
for (let name of tablesName) {
|
100
|
+
|
101
|
+
tablesColumn.push(await query(`SELECT column_name, (CASE WHEN (is_nullable = 'no' && column_key != 'PRI')
|
102
|
+
THEN '1' ELSE null END) AS is_required, (CASE WHEN column_key = 'PRI' THEN '1' ELSE '0' END) AS is_pk,
|
103
|
+
ordinal_position AS sort, column_comment, (CASE WHEN extra = 'auto_increment' THEN '1' ELSE '0' END) AS is_increment,
|
104
|
+
column_type FROM information_schema.columns WHERE table_schema = (SELECT DATABASE()) AND table_name = ?
|
105
|
+
ORDER BY ordinal_position`, name))
|
106
|
+
}
|
107
|
+
|
108
|
+
for (let [i, table] of tables.entries()) {
|
109
|
+
|
110
|
+
table = o2l(table)
|
111
|
+
|
112
|
+
store.genTable.push({
|
113
|
+
tableName: table.table_name,
|
114
|
+
tableComment: table.table_comment || table.table_name,
|
115
|
+
functionAuthor: data.userName,
|
116
|
+
functionName: hungarianToCamel(table.table_name, true),
|
117
|
+
className: hungarianToCamel(table.table_name),
|
118
|
+
packageName: table.table_name.startsWith('sys') ? 'system' : 'business',
|
119
|
+
moduleName: table.table_name.startsWith('sys') ? 'system' : 'business',
|
120
|
+
businessName: table.table_name,
|
121
|
+
createBy: data.userName,
|
122
|
+
createTime: new Date(),
|
123
|
+
})
|
124
|
+
|
125
|
+
const {tableId} = store.genTable.find(t => t.tableName === table.table_name) || {}
|
126
|
+
|
127
|
+
for (let column of tablesColumn[i]) {
|
128
|
+
|
129
|
+
column = o2l(column)
|
130
|
+
|
131
|
+
store.genTableColumn.push({
|
132
|
+
tableId,
|
133
|
+
columnName: column.column_name,
|
134
|
+
columnComment: column.column_comment,
|
135
|
+
columnType: column.column_type,
|
136
|
+
isPk: column.is_pk,
|
137
|
+
isIncrement: column.is_increment,
|
138
|
+
isRequired: column.is_required,
|
139
|
+
isInsert: '1',
|
140
|
+
isEdit: columnNameNotEdit.some(name => column.column_name.endsWith(name)) ? '0' : '1',
|
141
|
+
isList: columnNameNotList.some(name => column.column_name.endsWith(name)) ? '0' : '1',
|
142
|
+
isQuery: columnNameNotQuery.some(name => column.column_name.endsWith(name)) ? '0' : '1',
|
143
|
+
htmlType: getHtmlByType(column.column_type, column.column_name),
|
144
|
+
queryType: column.column_name.endsWith('name') ? 'LIKE' : 'EQ',
|
145
|
+
sort: column.sort,
|
146
|
+
createBy: data.userName,
|
147
|
+
createTime: new Date(),
|
148
|
+
})
|
149
|
+
}
|
150
|
+
}
|
151
|
+
})
|
152
|
+
|
153
|
+
map.set('/genTableImportTable2', data => importTable(data))
|
154
|
+
|
155
|
+
map.set('/batchGenCode', data => {
|
156
|
+
|
157
|
+
const table = store.genTable.find(table => table.tableName === data.tables)
|
158
|
+
|
159
|
+
const columns = store.genTableColumn.filter(tableColumn => tableColumn.tableId === table.tableId)
|
160
|
+
|
161
|
+
return generator(table, columns, '$$$')
|
162
|
+
})
|
163
|
+
|
164
|
+
const toolGenDb = data => {
|
165
|
+
|
166
|
+
const rows = Object.entries(getStruct()).map(([key, value]) => ({
|
167
|
+
tableName: key,
|
168
|
+
tableComment: value[remark]
|
169
|
+
})).filter(item => !item.tableName.startsWith('sys')
|
170
|
+
&& !store.genTable.some(table => table.tableName === item.tableName))
|
171
|
+
|
172
|
+
return {
|
173
|
+
rows: rowSlice(rows, data),
|
174
|
+
total: rows.length
|
175
|
+
}
|
176
|
+
}
|
177
|
+
|
178
|
+
map.set('/toolGenDbList', data => {
|
179
|
+
|
180
|
+
if (data.other === 'true') return toolGenDb(data)
|
181
|
+
|
182
|
+
const values = []
|
183
|
+
|
184
|
+
let str = `FROM information_schema.tables
|
185
|
+
\t\tWHERE table_schema = (SELECT DATABASE())
|
186
|
+
\t\tAND table_name NOT LIKE 'qrtz_%' AND table_name NOT LIKE 'gen_%'`
|
187
|
+
|
188
|
+
const tableName = store.genTable.map(table => table.tableName)
|
189
|
+
|
190
|
+
if (tableName.length) {
|
191
|
+
|
192
|
+
str += ` AND table_name NOT IN (?)`
|
193
|
+
|
194
|
+
values.push(tableName)
|
195
|
+
}
|
196
|
+
|
197
|
+
if (data.tableName) {
|
198
|
+
|
199
|
+
str += ` AND lower(table_name) LIKE LOWER(CONCAT('%', ?, '%'))`
|
200
|
+
|
201
|
+
values.push(data.tableName)
|
202
|
+
}
|
203
|
+
|
204
|
+
if (data.tableComment) {
|
205
|
+
|
206
|
+
str += ` AND LOWER(table_comment) LIKE LOWER(CONCAT('%', ?, '%'))`
|
207
|
+
|
208
|
+
values.push(data.tableComment)
|
209
|
+
}
|
210
|
+
|
211
|
+
if (data.pageNum) {
|
212
|
+
|
213
|
+
values.push((data.pageNum - 1) * data.pageSize)
|
214
|
+
values.push(parseInt(data.pageSize))
|
215
|
+
}
|
216
|
+
|
217
|
+
return Promise.all([
|
218
|
+
query(`SELECT table_name, table_comment, create_time, update_time ${str} LIMIT ?, ?`, ...values),
|
219
|
+
query(`SELECT COUNT(*) ${str}`, ...values),
|
220
|
+
]).then(([rows, count]) => ({
|
221
|
+
rows: objKeyHungarianToCamel(rows),
|
222
|
+
total: count[0]['COUNT(*)']
|
223
|
+
}))
|
224
|
+
})
|
225
|
+
|
226
|
+
map.set('/toolGenDbList2', data => toolGenDb(data))
|
227
|
+
|
228
|
+
map.set('/genPreview', id => {
|
229
|
+
|
230
|
+
return generator(
|
231
|
+
store.genTable.find(table => table.tableId == id),
|
232
|
+
store.genTableColumn.filter(tableColumn => tableColumn.tableId == id),
|
233
|
+
"../../spd.mjs"
|
234
|
+
)
|
235
|
+
})
|
236
|
+
|
237
|
+
map.set('/toolPm2List', data => {
|
238
|
+
|
239
|
+
const list1 = pm2.list
|
240
|
+
|
241
|
+
list1.forEach(item => item.status = item.status === 'online' ? 0 : 1)
|
242
|
+
|
243
|
+
const list2 = []
|
244
|
+
|
245
|
+
for (const item of store.service) {
|
246
|
+
|
247
|
+
const service = list1.find(s => s.name === item.name)
|
248
|
+
|
249
|
+
if (service) {
|
250
|
+
|
251
|
+
service.host = item.host
|
252
|
+
service.port = item.port
|
253
|
+
service.type = item.type
|
254
|
+
service.remark = item.remark
|
255
|
+
|
256
|
+
item.status = service.status
|
257
|
+
|
258
|
+
} else {
|
259
|
+
|
260
|
+
pm2.add(item.name, `${item.param1 || ''} ${item.path
|
261
|
+
? `"${serverDir}/${item.path}.mjs"` : ''} ${item.param2 || ''}`)
|
262
|
+
|
263
|
+
item.status = 0
|
264
|
+
|
265
|
+
list2.push(item)
|
266
|
+
}
|
267
|
+
}
|
268
|
+
|
269
|
+
return page([...list1, ...list2], data)
|
270
|
+
})
|
271
|
+
|
272
|
+
map.set('/toolPm2AddService', data => {
|
273
|
+
|
274
|
+
if (store.service.some(service => service.name === data.name)) return Promise.reject('服务已存在')
|
275
|
+
|
276
|
+
const result = pm2.add(data.name, `${data.arg1 || ''} ${data.path
|
277
|
+
? `"${serverDir}/${data.path}.mjs"` : ''} ${data.arg2 || ''}`)
|
278
|
+
|
279
|
+
if (result === false) return Promise.reject('服务已存在')
|
280
|
+
|
281
|
+
store.service.push(data)
|
282
|
+
})
|
283
|
+
|
284
|
+
map.set('/toolPm2RemoveService', name => {
|
285
|
+
|
286
|
+
pm2.del(name)
|
287
|
+
|
288
|
+
store.service.remove(store.service.find(s => s.name === name))
|
289
|
+
store.serviceData.remove(...store.serviceData.filter(s => s.name === name))
|
290
|
+
})
|
291
|
+
|
292
|
+
map.set('/toolPm2ChangeStatus', data => {
|
293
|
+
|
294
|
+
if ([0, 1].includes(data.status)) {
|
295
|
+
|
296
|
+
const service = store.service.find(service => service.name === data.name)
|
297
|
+
if (service) service.status = data.status
|
298
|
+
}
|
299
|
+
|
300
|
+
switch (data.status) {
|
301
|
+
|
302
|
+
case 0:
|
303
|
+
|
304
|
+
pm2.start(data.name)
|
305
|
+
break
|
306
|
+
|
307
|
+
case 1:
|
308
|
+
|
309
|
+
pm2.stop(data.name)
|
310
|
+
break
|
311
|
+
}
|
312
|
+
})
|
313
|
+
|
314
|
+
map.set('/toolPm2Data', data => {
|
315
|
+
|
316
|
+
if (!store.service.some(service => service.name === data.name))
|
317
|
+
|
318
|
+
return Promise.reject('服务不存在')
|
319
|
+
|
320
|
+
const item = store.serviceData.find(s => s.id == data.id)
|
321
|
+
|
322
|
+
if (item) {
|
323
|
+
|
324
|
+
item.method = data.method
|
325
|
+
item.remark = data.remark
|
326
|
+
|
327
|
+
return
|
328
|
+
}
|
329
|
+
|
330
|
+
if (store.serviceData.some(s => s.name === data.name && s.method === data.method))
|
331
|
+
|
332
|
+
return Promise.reject('方法已存在')
|
333
|
+
|
334
|
+
store.serviceData.push(data)
|
335
|
+
})
|
336
|
+
|
337
|
+
map.set('/toolPm2DataList', data => page(store.serviceData.filter(s => s.name === data.name), data))
|
338
|
+
|
339
|
+
map.set('/toolPm2RemoveData', ids => {
|
340
|
+
|
341
|
+
for (const id of ids.toString().split(',')) {
|
342
|
+
|
343
|
+
store.serviceData.remove(...store.serviceData.indexById(id))
|
344
|
+
}
|
345
|
+
})
|
346
|
+
|
347
|
+
map.set('/toolPm2Export', _ => {
|
348
|
+
|
349
|
+
let funCode = ''
|
350
|
+
|
351
|
+
const code1 = `${store.service.filter(service => service.type === 1).map(item => {
|
352
|
+
const Name = item.name[0].toUpperCase() + item.name.substring(1)
|
353
|
+
funCode += `
|
354
|
+
${item.name}: {`
|
355
|
+
const code = store.serviceData.filter(service => service.name === item.name).map(service => {
|
356
|
+
const name = service.method[0].toUpperCase() + service.method.substring(1)
|
357
|
+
const index1 = service.remark.indexOf('***')
|
358
|
+
const index2 = service.remark.indexOf('***', index1 + 3)
|
359
|
+
const paramClass = service.remark.substring(1, index1 - 1).replace(/\n /g, '\n')
|
360
|
+
const returnClass = service.remark.substring(index1 + 5, index2 - 1).replace(/\n /g, '\n')
|
361
|
+
let remark = service.remark.substring(index2 + 4)
|
362
|
+
if (remark) {
|
363
|
+
remark = `
|
364
|
+
/**
|
365
|
+
* ${remark.replace(/\n/g, '\n * ')}
|
366
|
+
*/`
|
367
|
+
}
|
368
|
+
remark += `
|
369
|
+
${service.method}(`
|
370
|
+
let code = ''
|
371
|
+
if (paramClass) {
|
372
|
+
if (paramClass.includes(':')) {
|
373
|
+
code += `
|
374
|
+
interface ${Name}${name}Param {
|
375
|
+
${paramClass.replace(/\n/g, '\n ')}
|
376
|
+
}
|
377
|
+
`
|
378
|
+
remark += `_: ${Name}${name}Param`
|
379
|
+
} else {
|
380
|
+
remark += `_: ${paramClass}`
|
381
|
+
}
|
382
|
+
}
|
383
|
+
remark += '): Promise'
|
384
|
+
if (returnClass) {
|
385
|
+
if (returnClass.includes(':')) {
|
386
|
+
code += `
|
387
|
+
interface ${Name}${name}Return {
|
388
|
+
${returnClass.replace(/\n/g, '\n ')}
|
389
|
+
}
|
390
|
+
`
|
391
|
+
remark += `<${Name}${name}Return>`
|
392
|
+
} else {
|
393
|
+
remark += `<${returnClass}>`
|
394
|
+
}
|
395
|
+
} else {
|
396
|
+
remark += `<any>`
|
397
|
+
}
|
398
|
+
funCode += remark
|
399
|
+
return code
|
400
|
+
}).join('')
|
401
|
+
funCode += '\n }'
|
402
|
+
return code
|
403
|
+
}).join('')}
|
404
|
+
export interface Service {${funCode}
|
405
|
+
}
|
406
|
+
`
|
407
|
+
|
408
|
+
const code2 = `
|
409
|
+
/**
|
410
|
+
* @type {import('./type').Service}
|
411
|
+
*/
|
412
|
+
export const service = {${store.service.filter(service => service.type === 1).map(item => `
|
413
|
+
${item.name}: {${store.serviceData.filter(service => service.name === item.name).map(service => `
|
414
|
+
${service.method}: '${item.host}:${item.port}/${service.method}'`).join(',')}
|
415
|
+
}`).join(',')}\n}`
|
416
|
+
|
417
|
+
return [code1, code2]
|
418
|
+
})
|
419
|
+
|
420
|
+
map.set('/toolPm2StoreList', data => {
|
421
|
+
|
422
|
+
const rows = Object.entries(getStruct()).map(([key, value]) => ({
|
423
|
+
name: key,
|
424
|
+
remark: value[remark],
|
425
|
+
total: store[key].length
|
426
|
+
})).filter(store => data.user.perms.includes('*:*:*') || !['sysDept', 'sysPost', 'sysRole', 'sysMenu'
|
427
|
+
, 'sysUserRole', 'sysRoleMenu', 'sysRoleDept', 'sysUser', 'sysUserPost', 'sysOperLog', 'sysDictType'
|
428
|
+
, 'sysDictData', 'sysLogininfor', 'sysJob', 'sysJobLog', 'sysConfig', 'sysNotice', 'genTable'
|
429
|
+
, 'genTableColumn', 'permissions'].includes(store.name)
|
430
|
+
&& colIncludes(data.name, store.name)
|
431
|
+
&& colIncludes(data.remark, store.remark)
|
432
|
+
)
|
433
|
+
|
434
|
+
return {
|
435
|
+
rows: rowSlice(rows, data),
|
436
|
+
total: rows.length
|
437
|
+
}
|
438
|
+
})
|
439
|
+
|
440
|
+
map.set('/toolPm2StoreDataUpdate', data => {
|
441
|
+
|
442
|
+
const [item] = page(store[data.name], data.old, undefined, true)
|
443
|
+
|
444
|
+
if (item === undefined) return Promise.reject('数据不存在')
|
445
|
+
|
446
|
+
for (const [key, value] of Object.entries(data.new)) {
|
447
|
+
|
448
|
+
if (item[key] == value) continue
|
449
|
+
|
450
|
+
item[key] = value
|
451
|
+
}
|
452
|
+
})
|
453
|
+
|
454
|
+
map.set('/toolPm2RemoveStoreData', data => {
|
455
|
+
|
456
|
+
for (const item of data.list) {
|
457
|
+
|
458
|
+
store[data.name].remove(store[data.name].find(it => {
|
459
|
+
|
460
|
+
for (const [key, value] of Object.entries(item)) {
|
461
|
+
|
462
|
+
if (!Reflect.has(it, key)) return false
|
463
|
+
|
464
|
+
if (it[key] != value) return false
|
465
|
+
}
|
466
|
+
|
467
|
+
return true
|
468
|
+
}))
|
469
|
+
}
|
470
|
+
})
|
471
|
+
|
472
|
+
export default map
|