create-meadminjs 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.js +3 -0
- package/bin/index.js +3 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +97 -0
- package/dist/file-zuupOgeh.js +78 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +98 -0
- package/package.json +38 -0
- package/template/meadmin/.editorconfig +11 -0
- package/template/meadmin/.env +21 -0
- package/template/meadmin/.eslintrc.json +7 -0
- package/template/meadmin/.husky/pre-commit +4 -0
- package/template/meadmin/.mocharc.json +6 -0
- package/template/meadmin/.prettierignore +30 -0
- package/template/meadmin/.prettierrc.cjs +47 -0
- package/template/meadmin/.vscode/extensions.json +3 -0
- package/template/meadmin/.vscode/settings.json +28 -0
- package/template/meadmin/README.md +41 -0
- package/template/meadmin/bootstrap.js +2 -0
- package/template/meadmin/meadmin.sql +571 -0
- package/template/meadmin/nx.json +10 -0
- package/template/meadmin/packageTemplate.json +80 -0
- package/template/meadmin/pnpm-workspace.yaml +4 -0
- package/template/meadmin/public/admin/.gitkeep +0 -0
- package/template/meadmin/public/index/.gitkeep +0 -0
- package/template/meadmin/public/index/images/layout/bannerCode.jpg +0 -0
- package/template/meadmin/public/index/images/layout/bannerGift.jpg +0 -0
- package/template/meadmin/public/index/images/layout/bannerManage.jpg +0 -0
- package/template/meadmin/src/app/admin/controller/base.controller.ts +6 -0
- package/template/meadmin/src/app/admin/controller/example/demo.controller.ts +98 -0
- package/template/meadmin/src/app/admin/controller/file.controller.ts +105 -0
- package/template/meadmin/src/app/admin/controller/login.controller.ts +81 -0
- package/template/meadmin/src/app/admin/controller/system/admin.controller.ts +73 -0
- package/template/meadmin/src/app/admin/controller/system/menu.controller.ts +80 -0
- package/template/meadmin/src/app/admin/controller/system/role.controller.ts +81 -0
- package/template/meadmin/src/app/admin/controller/user.controller.ts +86 -0
- package/template/meadmin/src/app/admin/controller/userFile.controller.ts +84 -0
- package/template/meadmin/src/app/admin/dto/captchaResult.dto.ts +8 -0
- package/template/meadmin/src/app/admin/dto/example/demoCreate.dto.ts +9 -0
- package/template/meadmin/src/app/admin/dto/example/demoQuery.dto.ts +20 -0
- package/template/meadmin/src/app/admin/dto/example/demoUpdate.dto.ts +11 -0
- package/template/meadmin/src/app/admin/dto/fileCreate.dto.ts +9 -0
- package/template/meadmin/src/app/admin/dto/fileQuery.dto.ts +20 -0
- package/template/meadmin/src/app/admin/dto/fileUp.dto.ts +28 -0
- package/template/meadmin/src/app/admin/dto/fileUpdate.dto.ts +11 -0
- package/template/meadmin/src/app/admin/dto/loginCaptchaParam.dto.ts +9 -0
- package/template/meadmin/src/app/admin/dto/loginInfoResult.dto.ts +24 -0
- package/template/meadmin/src/app/admin/dto/loginParam.dto.ts +13 -0
- package/template/meadmin/src/app/admin/dto/loginResult.dto.ts +10 -0
- package/template/meadmin/src/app/admin/dto/system/adminCreate.dto.ts +14 -0
- package/template/meadmin/src/app/admin/dto/system/adminQuery.dto.ts +30 -0
- package/template/meadmin/src/app/admin/dto/system/adminUpdate.dto.ts +24 -0
- package/template/meadmin/src/app/admin/dto/system/menuCreate.dto.ts +11 -0
- package/template/meadmin/src/app/admin/dto/system/menuQuery.dto.ts +20 -0
- package/template/meadmin/src/app/admin/dto/system/menuTreeAllResult.dto.ts +9 -0
- package/template/meadmin/src/app/admin/dto/system/menuUpdate.dto.ts +8 -0
- package/template/meadmin/src/app/admin/dto/system/roleCreate.dto.ts +11 -0
- package/template/meadmin/src/app/admin/dto/system/roleQuery.dto.ts +20 -0
- package/template/meadmin/src/app/admin/dto/system/roleTreeAllResult.dto.ts +12 -0
- package/template/meadmin/src/app/admin/dto/system/roleUpdate.dto.ts +14 -0
- package/template/meadmin/src/app/admin/dto/userCreate.dto.ts +9 -0
- package/template/meadmin/src/app/admin/dto/userFileCreate.dto.ts +9 -0
- package/template/meadmin/src/app/admin/dto/userFileQuery.dto.ts +20 -0
- package/template/meadmin/src/app/admin/dto/userFileUp.dto.ts +28 -0
- package/template/meadmin/src/app/admin/dto/userFileUpdate.dto.ts +11 -0
- package/template/meadmin/src/app/admin/dto/userQuery.dto.ts +26 -0
- package/template/meadmin/src/app/admin/dto/userUpdate.dto.ts +11 -0
- package/template/meadmin/src/app/admin/middleware/admin.middleware.ts +41 -0
- package/template/meadmin/src/app/admin/service/example/demo.service.ts +260 -0
- package/template/meadmin/src/app/admin/service/file.service.ts +123 -0
- package/template/meadmin/src/app/admin/service/login.serveice.ts +209 -0
- package/template/meadmin/src/app/admin/service/system/admin.service.ts +206 -0
- package/template/meadmin/src/app/admin/service/system/menu.service.ts +133 -0
- package/template/meadmin/src/app/admin/service/system/role.service.ts +161 -0
- package/template/meadmin/src/app/admin/service/user.service.ts +205 -0
- package/template/meadmin/src/app/admin/service/userFile.service.ts +126 -0
- package/template/meadmin/src/app/home.controller.ts +19 -0
- package/template/meadmin/src/app/index/controller/base.controller.ts +6 -0
- package/template/meadmin/src/app/index/controller/file.controller.ts +116 -0
- package/template/meadmin/src/app/index/controller/index.controller.ts +70 -0
- package/template/meadmin/src/app/index/controller/login.controller.ts +81 -0
- package/template/meadmin/src/app/index/controller/user.controller.ts +43 -0
- package/template/meadmin/src/app/index/dto/captchaResult.dto.ts +8 -0
- package/template/meadmin/src/app/index/dto/fileCreate.dto.ts +9 -0
- package/template/meadmin/src/app/index/dto/fileQuery.dto.ts +20 -0
- package/template/meadmin/src/app/index/dto/fileUp.dto.ts +28 -0
- package/template/meadmin/src/app/index/dto/fileUpdate.dto.ts +11 -0
- package/template/meadmin/src/app/index/dto/loginCaptchaParam.dto.ts +9 -0
- package/template/meadmin/src/app/index/dto/loginParam.dto.ts +13 -0
- package/template/meadmin/src/app/index/dto/loginResult.dto.ts +10 -0
- package/template/meadmin/src/app/index/dto/userCreate.dto.ts +26 -0
- package/template/meadmin/src/app/index/dto/userUpdate.dto.ts +33 -0
- package/template/meadmin/src/app/index/middleware/index.middleware.ts +28 -0
- package/template/meadmin/src/app/index/service/file.service.ts +127 -0
- package/template/meadmin/src/app/index/service/login.serveice.ts +178 -0
- package/template/meadmin/src/app/index/service/user.service.ts +87 -0
- package/template/meadmin/src/config/config.default.ts +154 -0
- package/template/meadmin/src/config/config.unittest.ts +7 -0
- package/template/meadmin/src/config/database.ts +30 -0
- package/template/meadmin/src/configuration.ts +107 -0
- package/template/meadmin/src/controller/api.controller.ts +21 -0
- package/template/meadmin/src/decorators/admin/permission.ts +41 -0
- package/template/meadmin/src/decorators/index/permission.ts +37 -0
- package/template/meadmin/src/decorators/index.ts +61 -0
- package/template/meadmin/src/decorators/sequelize.ts +65 -0
- package/template/meadmin/src/decorators/swagger.ts +170 -0
- package/template/meadmin/src/decorators/transactions.ts +42 -0
- package/template/meadmin/src/dict/code.enum.ts +8 -0
- package/template/meadmin/src/dto/page.dto.ts +16 -0
- package/template/meadmin/src/entities/abstract/adminBase.entity.ts +35 -0
- package/template/meadmin/src/entities/abstract/adminTree.entity.ts +258 -0
- package/template/meadmin/src/entities/abstract/base.entity.ts +69 -0
- package/template/meadmin/src/entities/abstract/indexBase.entity.ts +39 -0
- package/template/meadmin/src/entities/exampleBook.entity.ts +22 -0
- package/template/meadmin/src/entities/exampleDemo.entity.ts +104 -0
- package/template/meadmin/src/entities/file.entity.ts +68 -0
- package/template/meadmin/src/entities/systemAdmin.entity.ts +164 -0
- package/template/meadmin/src/entities/systemMenu.entity.ts +161 -0
- package/template/meadmin/src/entities/systemRole.entity.ts +99 -0
- package/template/meadmin/src/entities/user.entity.ts +160 -0
- package/template/meadmin/src/entities/userFile.entity.ts +68 -0
- package/template/meadmin/src/fileManage/index.ts +12 -0
- package/template/meadmin/src/fileManage/storage/base.ts +6 -0
- package/template/meadmin/src/fileManage/storage/local.ts +93 -0
- package/template/meadmin/src/filter/badRequest.filter.ts +14 -0
- package/template/meadmin/src/filter/default.filter.ts +28 -0
- package/template/meadmin/src/filter/forbidden.filter.ts +15 -0
- package/template/meadmin/src/filter/index.ts +6 -0
- package/template/meadmin/src/filter/notfound.filter.ts +10 -0
- package/template/meadmin/src/filter/unauthorized.filter.ts +15 -0
- package/template/meadmin/src/filter/validate.filter.ts +23 -0
- package/template/meadmin/src/helper/dotenv.ts +13 -0
- package/template/meadmin/src/helper/dto.ts +195 -0
- package/template/meadmin/src/helper/snowflake.ts +50 -0
- package/template/meadmin/src/helper/utils.ts +57 -0
- package/template/meadmin/src/interface.ts +12 -0
- package/template/meadmin/src/locales/en.json +13 -0
- package/template/meadmin/src/logger.ts +24 -0
- package/template/meadmin/src/middleware/report.middleware.ts +23 -0
- package/template/meadmin/src/response/apiBase.res.ts +12 -0
- package/template/meadmin/src/response/apiError.res.ts +6 -0
- package/template/meadmin/src/response/apiPage.res.ts +19 -0
- package/template/meadmin/src/response/apiSuccess.res.ts +17 -0
- package/template/meadmin/src/ruleType/index.ts +3 -0
- package/template/meadmin/src/ruleType/string.ts +29 -0
- package/template/meadmin/src/service/dataSourceManager.service.ts +55 -0
- package/template/meadmin/src/service/response.service.ts +65 -0
- package/template/meadmin/src/types/decorator.ts +31 -0
- package/template/meadmin/src/types/entity.ts +209 -0
- package/template/meadmin/src/types/fileManage.ts +48 -0
- package/template/meadmin/src/types/koa.interface.ts +12 -0
- package/template/meadmin/src/types/uploadOptions.ts +7 -0
- package/template/meadmin/test/controller/api.test.ts +17 -0
- package/template/meadmin/test/controller/home.test.ts +18 -0
- package/template/meadmin/test/setup.ts +15 -0
- package/template/meadmin/test/tsconfig.json +19 -0
- package/template/meadmin/tsconfig.json +28 -0
- package/template/meadmin/types/mwtsc.d.ts +9 -0
- package/template/meadmin/uploadFile/admin/.gitkeep +0 -0
- package/template/meadmin/uploadFile/index/.gitkeep +0 -0
- package/template/meadmin/view/admin/.prettierignore +28 -0
- package/template/meadmin/view/admin/.prettierrc.cjs +4 -0
- package/template/meadmin/view/admin/cli/autoImport.ts +3 -0
- package/template/meadmin/view/admin/eslint.config.js +91 -0
- package/template/meadmin/view/admin/index.html +65 -0
- package/template/meadmin/view/admin/packageTemplate.json +123 -0
- package/template/meadmin/view/admin/plugins/autoComponents.ts +10 -0
- package/template/meadmin/view/admin/plugins/autoImport.ts +64 -0
- package/template/meadmin/view/admin/plugins/autoImportApi.ts +14 -0
- package/template/meadmin/view/admin/plugins/babel.ts +25 -0
- package/template/meadmin/view/admin/plugins/index.ts +107 -0
- package/template/meadmin/view/admin/plugins/svgLoader.ts +22 -0
- package/template/meadmin/view/admin/plugins/vueSetUpExtend.ts +5 -0
- package/template/meadmin/view/admin/public/favicon.ico +0 -0
- package/template/meadmin/view/admin/public/logo.png +0 -0
- package/template/meadmin/view/admin/public/logo.svg +1 -0
- package/template/meadmin/view/admin/src/App.vue +46 -0
- package/template/meadmin/view/admin/src/api/api.model.ts +11 -0
- package/template/meadmin/view/admin/src/api/example/demo.ts +189 -0
- package/template/meadmin/view/admin/src/api/file.ts +124 -0
- package/template/meadmin/view/admin/src/api/login.ts +55 -0
- package/template/meadmin/view/admin/src/api/system/admin.ts +111 -0
- package/template/meadmin/view/admin/src/api/system/menu.ts +125 -0
- package/template/meadmin/view/admin/src/api/system/role.ts +111 -0
- package/template/meadmin/view/admin/src/api/user.ts +106 -0
- package/template/meadmin/view/admin/src/api/userFile.ts +121 -0
- package/template/meadmin/view/admin/src/app.ts +13 -0
- package/template/meadmin/view/admin/src/assets/images/404.svg +339 -0
- package/template/meadmin/view/admin/src/assets/images/captcha.png +0 -0
- package/template/meadmin/view/admin/src/components/meButton.vue +39 -0
- package/template/meadmin/view/admin/src/components/meComponent.ts +73 -0
- package/template/meadmin/view/admin/src/components/meDarkSwitch.vue +36 -0
- package/template/meadmin/view/admin/src/components/meDialog/hooks/minMax.ts +163 -0
- package/template/meadmin/view/admin/src/components/meDialog/index.vue +86 -0
- package/template/meadmin/view/admin/src/components/meFilesView.vue +52 -0
- package/template/meadmin/view/admin/src/components/meKeepAlive/core/Suspense.ts +15 -0
- package/template/meadmin/view/admin/src/components/meKeepAlive/core/apiAsyncComponent.ts +3 -0
- package/template/meadmin/view/admin/src/components/meKeepAlive/core/component.ts +5 -0
- package/template/meadmin/view/admin/src/components/meKeepAlive/core/componentPublicInstance.ts +6 -0
- package/template/meadmin/view/admin/src/components/meKeepAlive/core/devtools.ts +43 -0
- package/template/meadmin/view/admin/src/components/meKeepAlive/core/errorHandling.ts +17 -0
- package/template/meadmin/view/admin/src/components/meKeepAlive/core/renderer.ts +103 -0
- package/template/meadmin/view/admin/src/components/meKeepAlive/core/shapeFlags.ts +13 -0
- package/template/meadmin/view/admin/src/components/meKeepAlive/core/vnode.ts +9 -0
- package/template/meadmin/view/admin/src/components/meKeepAlive/index.ts +347 -0
- package/template/meadmin/view/admin/src/components/meLocaleSelect.vue +34 -0
- package/template/meadmin/view/admin/src/components/meNumber.vue +74 -0
- package/template/meadmin/view/admin/src/components/meSearchForm.vue +175 -0
- package/template/meadmin/view/admin/src/components/meSearchMenu/index.vue +87 -0
- package/template/meadmin/view/admin/src/components/meSearchMenu/useSearchMenu.ts +87 -0
- package/template/meadmin/view/admin/src/components/meSelectFile/index.vue +87 -0
- package/template/meadmin/view/admin/src/components/meSelectFile/meSelectFile.ts +3 -0
- package/template/meadmin/view/admin/src/components/meSelectList.vue +80 -0
- package/template/meadmin/view/admin/src/components/meSelectUserFile/index.vue +96 -0
- package/template/meadmin/view/admin/src/components/meSelectUserFile/meSelectUserFile.ts +3 -0
- package/template/meadmin/view/admin/src/components/meSetting.vue +20 -0
- package/template/meadmin/view/admin/src/components/meSettingMenu.vue +152 -0
- package/template/meadmin/view/admin/src/components/meSizeSelect.vue +28 -0
- package/template/meadmin/view/admin/src/components/meUpload.vue +114 -0
- package/template/meadmin/view/admin/src/components/meUploadUserFile.vue +114 -0
- package/template/meadmin/view/admin/src/components/meVxeTable/components/pagination.vue +67 -0
- package/template/meadmin/view/admin/src/components/meVxeTable/directives/resize.ts +31 -0
- package/template/meadmin/view/admin/src/components/meVxeTable/index.vue +287 -0
- package/template/meadmin/view/admin/src/components/meVxeTable/install.ts +30 -0
- package/template/meadmin/view/admin/src/components/meVxeTable/util.ts +11 -0
- package/template/meadmin/view/admin/src/components/meWangEditor/index.vue +121 -0
- package/template/meadmin/view/admin/src/components/meWangEditor/meWangEditor.scss +24 -0
- package/template/meadmin/view/admin/src/components/page.vue +24 -0
- package/template/meadmin/view/admin/src/components/service/meImageViewer.ts +23 -0
- package/template/meadmin/view/admin/src/config/index.ts +11 -0
- package/template/meadmin/view/admin/src/config/locale.ts +245 -0
- package/template/meadmin/view/admin/src/config/login.ts +5 -0
- package/template/meadmin/view/admin/src/config/theme.ts +19 -0
- package/template/meadmin/view/admin/src/dict/configEnum.ts +5 -0
- package/template/meadmin/view/admin/src/dict/eventEnmu.ts +14 -0
- package/template/meadmin/view/admin/src/dict/menuModeEnum.ts +5 -0
- package/template/meadmin/view/admin/src/dict/pageEnum.ts +6 -0
- package/template/meadmin/view/admin/src/directives/clickOutside.ts +2 -0
- package/template/meadmin/view/admin/src/entry-client.ts +8 -0
- package/template/meadmin/view/admin/src/entry-server.ts +69 -0
- package/template/meadmin/view/admin/src/env.d.ts +6 -0
- package/template/meadmin/view/admin/src/event/index.ts +30 -0
- package/template/meadmin/view/admin/src/event/module.ts +1 -0
- package/template/meadmin/view/admin/src/event/modules/core.ts +27 -0
- package/template/meadmin/view/admin/src/hooks/actionModel.ts +54 -0
- package/template/meadmin/view/admin/src/hooks/core/computedProxy.ts +10 -0
- package/template/meadmin/view/admin/src/hooks/index.ts +24 -0
- package/template/meadmin/view/admin/src/icons/index.ts +52 -0
- package/template/meadmin/view/admin/src/icons/svg/dashboard.svg +5 -0
- package/template/meadmin/view/admin/src/icons/svg/moon.svg +5 -0
- package/template/meadmin/view/admin/src/icons/svg/size.svg +5 -0
- package/template/meadmin/view/admin/src/icons/svg/sunny.svg +5 -0
- package/template/meadmin/view/admin/src/icons/svg/translation.svg +5 -0
- package/template/meadmin/view/admin/src/layout/components/expand.vue +18 -0
- package/template/meadmin/view/admin/src/layout/components/header/components/tagBar/components/contextmenu.vue +180 -0
- package/template/meadmin/view/admin/src/layout/components/header/components/tagBar/index.vue +322 -0
- package/template/meadmin/view/admin/src/layout/components/header/components/topBar/components/left.vue +59 -0
- package/template/meadmin/view/admin/src/layout/components/header/components/topBar/components/right/components/messageBox.vue +82 -0
- package/template/meadmin/view/admin/src/layout/components/header/components/topBar/components/right/components/user.vue +53 -0
- package/template/meadmin/view/admin/src/layout/components/header/components/topBar/components/right/index.vue +44 -0
- package/template/meadmin/view/admin/src/layout/components/header/components/topBar/components/topMenu.vue +33 -0
- package/template/meadmin/view/admin/src/layout/components/header/components/topBar/index.vue +30 -0
- package/template/meadmin/view/admin/src/layout/components/header/index.vue +15 -0
- package/template/meadmin/view/admin/src/layout/components/menu/components/menuItem.vue +72 -0
- package/template/meadmin/view/admin/src/layout/components/menu/index.vue +147 -0
- package/template/meadmin/view/admin/src/layout/components/page.vue +33 -0
- package/template/meadmin/view/admin/src/layout/components/title.vue +21 -0
- package/template/meadmin/view/admin/src/layout/index.vue +104 -0
- package/template/meadmin/view/admin/src/locales/helper.ts +127 -0
- package/template/meadmin/view/admin/src/locales/hooks.ts +50 -0
- package/template/meadmin/view/admin/src/locales/i18n.ts +16 -0
- package/template/meadmin/view/admin/src/locales/lang/en/default.json +65 -0
- package/template/meadmin/view/admin/src/locales/lang/en/index.ts +7 -0
- package/template/meadmin/view/admin/src/locales/lang/en/meTable.json +7 -0
- package/template/meadmin/view/admin/src/locales/lang/en/meVxeTable.ts +11 -0
- package/template/meadmin/view/admin/src/locales/lang/en/menu.json +1 -0
- package/template/meadmin/view/admin/src/locales/lang/en/rule.json +12 -0
- package/template/meadmin/view/admin/src/locales/lang/zh-cn/default.json +6 -0
- package/template/meadmin/view/admin/src/locales/lang/zh-cn/index.ts +7 -0
- package/template/meadmin/view/admin/src/locales/lang/zh-cn/meVxeTable.ts +2 -0
- package/template/meadmin/view/admin/src/main.ts +21 -0
- package/template/meadmin/view/admin/src/router/constant.ts +2 -0
- package/template/meadmin/view/admin/src/router/guard/index.ts +52 -0
- package/template/meadmin/view/admin/src/router/index.ts +115 -0
- package/template/meadmin/view/admin/src/setElGlobel.ts +16 -0
- package/template/meadmin/view/admin/src/store/index.ts +8 -0
- package/template/meadmin/view/admin/src/store/modules/global.ts +66 -0
- package/template/meadmin/view/admin/src/store/modules/route.ts +69 -0
- package/template/meadmin/view/admin/src/store/modules/setting.ts +46 -0
- package/template/meadmin/view/admin/src/store/modules/user.ts +115 -0
- package/template/meadmin/view/admin/src/styles/element-plus.scss +40 -0
- package/template/meadmin/view/admin/src/styles/index.scss +122 -0
- package/template/meadmin/view/admin/src/styles/transition.scss +33 -0
- package/template/meadmin/view/admin/src/styles/variables.scss +5 -0
- package/template/meadmin/view/admin/src/utils/fileMd5Work.ts +109 -0
- package/template/meadmin/view/admin/src/utils/fileUpload.ts +154 -0
- package/template/meadmin/view/admin/src/utils/formatting.ts +62 -0
- package/template/meadmin/view/admin/src/utils/helper.ts +315 -0
- package/template/meadmin/view/admin/src/utils/loading.ts +63 -0
- package/template/meadmin/view/admin/src/utils/log.ts +8 -0
- package/template/meadmin/view/admin/src/utils/mitt.ts +152 -0
- package/template/meadmin/view/admin/src/utils/nProgress.ts +31 -0
- package/template/meadmin/view/admin/src/utils/permission.ts +76 -0
- package/template/meadmin/view/admin/src/utils/request.ts +152 -0
- package/template/meadmin/view/admin/src/utils/userFileUpload.ts +154 -0
- package/template/meadmin/view/admin/src/utils/validate.ts +17 -0
- package/template/meadmin/view/admin/src/views/404.vue +50 -0
- package/template/meadmin/view/admin/src/views/example/demo/components/addOrUp.vue +118 -0
- package/template/meadmin/view/admin/src/views/example/demo/components/info.vue +56 -0
- package/template/meadmin/view/admin/src/views/example/demo/dict.ts +8 -0
- package/template/meadmin/view/admin/src/views/example/demo/index.vue +126 -0
- package/template/meadmin/view/admin/src/views/example/demo/lang/dict.ts +8 -0
- package/template/meadmin/view/admin/src/views/example/demo/lang/en.json +14 -0
- package/template/meadmin/view/admin/src/views/file/components/add.vue +24 -0
- package/template/meadmin/view/admin/src/views/file/components/info.vue +51 -0
- package/template/meadmin/view/admin/src/views/file/components/up.vue +72 -0
- package/template/meadmin/view/admin/src/views/file/index.vue +132 -0
- package/template/meadmin/view/admin/src/views/file/lang/en.json +11 -0
- package/template/meadmin/view/admin/src/views/login/components/header.vue +20 -0
- package/template/meadmin/view/admin/src/views/login/index.vue +163 -0
- package/template/meadmin/view/admin/src/views/redirect.vue +12 -0
- package/template/meadmin/view/admin/src/views/system/admin/components/addOrUp.vue +111 -0
- package/template/meadmin/view/admin/src/views/system/admin/components/info.vue +75 -0
- package/template/meadmin/view/admin/src/views/system/admin/dict.ts +7 -0
- package/template/meadmin/view/admin/src/views/system/admin/index.vue +145 -0
- package/template/meadmin/view/admin/src/views/system/admin/lang/en.json +19 -0
- package/template/meadmin/view/admin/src/views/system/menuRole/components/menu/components/addOrUp.vue +145 -0
- package/template/meadmin/view/admin/src/views/system/menuRole/components/menu/components/info.vue +68 -0
- package/template/meadmin/view/admin/src/views/system/menuRole/components/menu/dict.ts +36 -0
- package/template/meadmin/view/admin/src/views/system/menuRole/components/menu/index.vue +162 -0
- package/template/meadmin/view/admin/src/views/system/menuRole/components/menu/lang/en.json +20 -0
- package/template/meadmin/view/admin/src/views/system/menuRole/components/role/components/addOrUp.vue +94 -0
- package/template/meadmin/view/admin/src/views/system/menuRole/components/role/components/info.vue +59 -0
- package/template/meadmin/view/admin/src/views/system/menuRole/components/role/dict.ts +7 -0
- package/template/meadmin/view/admin/src/views/system/menuRole/components/role/index.vue +153 -0
- package/template/meadmin/view/admin/src/views/system/menuRole/components/role/lang/en.json +14 -0
- package/template/meadmin/view/admin/src/views/system/menuRole/index.vue +59 -0
- package/template/meadmin/view/admin/src/views/user/components/addOrUp.vue +120 -0
- package/template/meadmin/view/admin/src/views/user/components/info.vue +56 -0
- package/template/meadmin/view/admin/src/views/user/dict.ts +7 -0
- package/template/meadmin/view/admin/src/views/user/file/components/add.vue +24 -0
- package/template/meadmin/view/admin/src/views/user/file/components/info.vue +54 -0
- package/template/meadmin/view/admin/src/views/user/file/components/up.vue +82 -0
- package/template/meadmin/view/admin/src/views/user/file/index.vue +148 -0
- package/template/meadmin/view/admin/src/views/user/file/lang/en.json +17 -0
- package/template/meadmin/view/admin/src/views/user/index.vue +145 -0
- package/template/meadmin/view/admin/src/views/user/lang/en.json +18 -0
- package/template/meadmin/view/admin/template/components.d.ts +9 -0
- package/template/meadmin/view/admin/template/directives.d.ts +6 -0
- package/template/meadmin/view/admin/template/meIconComponents.d.ts +6 -0
- package/template/meadmin/view/admin/tsconfig.json +33 -0
- package/template/meadmin/view/admin/tsconfig.node.json +17 -0
- package/template/meadmin/view/admin/types/api.d.ts +15 -0
- package/template/meadmin/view/admin/types/auto-imports.d.ts +302 -0
- package/template/meadmin/view/admin/types/global.d.ts +60 -0
- package/template/meadmin/view/admin/types/globalComponents.d.ts +13 -0
- package/template/meadmin/view/admin/types/melIconComponents.d.d.ts +9 -0
- package/template/meadmin/view/admin/types/vue-router.d.ts +39 -0
- package/template/meadmin/view/admin/types/vueCustomProperties .d.ts +6 -0
- package/template/meadmin/view/admin/types/vueExtendType.d.ts +43 -0
- package/template/meadmin/view/admin/vite.config.ts +110 -0
- package/template/meadmin/view/index/.prettierignore +28 -0
- package/template/meadmin/view/index/.prettierrc.cjs +4 -0
- package/template/meadmin/view/index/README.md +84 -0
- package/template/meadmin/view/index/cli/autoImport.ts +3 -0
- package/template/meadmin/view/index/eslint.config.js +91 -0
- package/template/meadmin/view/index/index.html +22 -0
- package/template/meadmin/view/index/packageTemplate.json +122 -0
- package/template/meadmin/view/index/plugins/autoComponents.ts +10 -0
- package/template/meadmin/view/index/plugins/autoImport.ts +64 -0
- package/template/meadmin/view/index/plugins/autoImportApi.ts +14 -0
- package/template/meadmin/view/index/plugins/babel.ts +25 -0
- package/template/meadmin/view/index/plugins/index.ts +103 -0
- package/template/meadmin/view/index/plugins/svgLoader.ts +22 -0
- package/template/meadmin/view/index/plugins/vueSetUpExtend.ts +5 -0
- package/template/meadmin/view/index/public/favicon.ico +0 -0
- package/template/meadmin/view/index/public/logo.png +0 -0
- package/template/meadmin/view/index/public/logo.svg +1 -0
- package/template/meadmin/view/index/src/App.vue +30 -0
- package/template/meadmin/view/index/src/api/api.model.ts +11 -0
- package/template/meadmin/view/index/src/api/file.ts +123 -0
- package/template/meadmin/view/index/src/api/index.ts +25 -0
- package/template/meadmin/view/index/src/api/login.ts +72 -0
- package/template/meadmin/view/index/src/api/user.ts +42 -0
- package/template/meadmin/view/index/src/app.ts +39 -0
- package/template/meadmin/view/index/src/assets/images/404.svg +339 -0
- package/template/meadmin/view/index/src/assets/images/avatar.jpg +0 -0
- package/template/meadmin/view/index/src/components/meButton.vue +34 -0
- package/template/meadmin/view/index/src/components/meDialog/hooks/minMax.ts +166 -0
- package/template/meadmin/view/index/src/components/meDialog/index.vue +86 -0
- package/template/meadmin/view/index/src/components/meNumber.vue +74 -0
- package/template/meadmin/view/index/src/components/meSelectFile/index.vue +92 -0
- package/template/meadmin/view/index/src/components/meSelectFile/meSelectFile.ts +3 -0
- package/template/meadmin/view/index/src/components/meUpAvatar.vue +166 -0
- package/template/meadmin/view/index/src/components/meUpload.vue +111 -0
- package/template/meadmin/view/index/src/components/meVxeTable/components/pagination.vue +67 -0
- package/template/meadmin/view/index/src/components/meVxeTable/directives/resize.ts +31 -0
- package/template/meadmin/view/index/src/components/meVxeTable/index.vue +286 -0
- package/template/meadmin/view/index/src/components/meVxeTable/install.ts +18 -0
- package/template/meadmin/view/index/src/components/meVxeTable/util.ts +11 -0
- package/template/meadmin/view/index/src/components/meWangEditor/index.vue +121 -0
- package/template/meadmin/view/index/src/components/meWangEditor/meWangEditor.scss +24 -0
- package/template/meadmin/view/index/src/components/service/meImageViewer.ts +23 -0
- package/template/meadmin/view/index/src/config/index.ts +2 -0
- package/template/meadmin/view/index/src/config/login.ts +5 -0
- package/template/meadmin/view/index/src/dict/eventEnmu.ts +13 -0
- package/template/meadmin/view/index/src/dict/pageEnum.ts +8 -0
- package/template/meadmin/view/index/src/directives/clickOutside.ts +2 -0
- package/template/meadmin/view/index/src/entry-client.ts +8 -0
- package/template/meadmin/view/index/src/entry-server.ts +83 -0
- package/template/meadmin/view/index/src/env.d.ts +6 -0
- package/template/meadmin/view/index/src/event/index.ts +23 -0
- package/template/meadmin/view/index/src/hooks/actionModel.ts +54 -0
- package/template/meadmin/view/index/src/hooks/core/computedProxy.ts +10 -0
- package/template/meadmin/view/index/src/hooks/index.ts +24 -0
- package/template/meadmin/view/index/src/icons/index.ts +52 -0
- package/template/meadmin/view/index/src/icons/svg/dashboard.svg +5 -0
- package/template/meadmin/view/index/src/icons/svg/moon.svg +5 -0
- package/template/meadmin/view/index/src/icons/svg/size.svg +5 -0
- package/template/meadmin/view/index/src/icons/svg/sunny.svg +5 -0
- package/template/meadmin/view/index/src/icons/svg/translation.svg +5 -0
- package/template/meadmin/view/index/src/layout/default/components/footer.vue +22 -0
- package/template/meadmin/view/index/src/layout/default/components/header/components/menuItem.vue +69 -0
- package/template/meadmin/view/index/src/layout/default/components/header/components/user.vue +55 -0
- package/template/meadmin/view/index/src/layout/default/components/header/index.vue +53 -0
- package/template/meadmin/view/index/src/layout/default/index.vue +63 -0
- package/template/meadmin/view/index/src/layout/default/layout.scss +1 -0
- package/template/meadmin/view/index/src/layout/default/page.vue +11 -0
- package/template/meadmin/view/index/src/layout/layoutRoute.vue +13 -0
- package/template/meadmin/view/index/src/main.ts +28 -0
- package/template/meadmin/view/index/src/router/guard/index.ts +53 -0
- package/template/meadmin/view/index/src/router/index.ts +73 -0
- package/template/meadmin/view/index/src/router/routes/001-index.ts +42 -0
- package/template/meadmin/view/index/src/router/routes/002-demo.ts +12 -0
- package/template/meadmin/view/index/src/router/routes/003-user.ts +27 -0
- package/template/meadmin/view/index/src/router/routes/demo/001-demo.ts +36 -0
- package/template/meadmin/view/index/src/setElGlobel.ts +7 -0
- package/template/meadmin/view/index/src/store/index.ts +11 -0
- package/template/meadmin/view/index/src/store/module.ts +5 -0
- package/template/meadmin/view/index/src/store/modules/global.ts +52 -0
- package/template/meadmin/view/index/src/store/modules/route.ts +20 -0
- package/template/meadmin/view/index/src/store/modules/user.ts +98 -0
- package/template/meadmin/view/index/src/styles/element-plus.scss +40 -0
- package/template/meadmin/view/index/src/styles/index.scss +122 -0
- package/template/meadmin/view/index/src/styles/transition.scss +33 -0
- package/template/meadmin/view/index/src/styles/variables.scss +6 -0
- package/template/meadmin/view/index/src/utils/cookies.ts +59 -0
- package/template/meadmin/view/index/src/utils/fileMd5Work.ts +109 -0
- package/template/meadmin/view/index/src/utils/fileUpload.ts +156 -0
- package/template/meadmin/view/index/src/utils/helper.ts +261 -0
- package/template/meadmin/view/index/src/utils/loading.ts +71 -0
- package/template/meadmin/view/index/src/utils/log.ts +8 -0
- package/template/meadmin/view/index/src/utils/mitt.ts +152 -0
- package/template/meadmin/view/index/src/utils/nProgress.ts +52 -0
- package/template/meadmin/view/index/src/utils/request.ts +182 -0
- package/template/meadmin/view/index/src/utils/server.ts +73 -0
- package/template/meadmin/view/index/src/utils/validate.ts +17 -0
- package/template/meadmin/view/index/src/views/404.vue +50 -0
- package/template/meadmin/view/index/src/views/index/index.vue +137 -0
- package/template/meadmin/view/index/src/views/login/components/login.vue +117 -0
- package/template/meadmin/view/index/src/views/login/components/register.vue +192 -0
- package/template/meadmin/view/index/src/views/login/index.vue +147 -0
- package/template/meadmin/view/index/src/views/promiseError.vue +48 -0
- package/template/meadmin/view/index/src/views/redirect.vue +9 -0
- package/template/meadmin/view/index/src/views/user/components/editPass.vue +83 -0
- package/template/meadmin/view/index/src/views/user/components/userInfo.vue +91 -0
- package/template/meadmin/view/index/src/views/user/index.vue +67 -0
- package/template/meadmin/view/index/template/components.d.ts +9 -0
- package/template/meadmin/view/index/template/directives.d.ts +6 -0
- package/template/meadmin/view/index/template/meIconComponents.d.ts +6 -0
- package/template/meadmin/view/index/tsconfig.json +33 -0
- package/template/meadmin/view/index/tsconfig.node.json +17 -0
- package/template/meadmin/view/index/types/api.d.ts +15 -0
- package/template/meadmin/view/index/types/auto-imports.d.ts +301 -0
- package/template/meadmin/view/index/types/components.d.ts +25 -0
- package/template/meadmin/view/index/types/directives.d.ts +7 -0
- package/template/meadmin/view/index/types/global.d.ts +51 -0
- package/template/meadmin/view/index/types/globalComponents.d.ts +14 -0
- package/template/meadmin/view/index/types/meIconComponents.d.ts +11 -0
- package/template/meadmin/view/index/types/vue-router.d.ts +17 -0
- package/template/meadmin/view/index/types/vueCustomProperties .d.ts +6 -0
- package/template/meadmin/view/index/types/vueExtendType.d.ts +43 -0
- package/template/meadmin/view/index/vite.config.ts +92 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { PageParam, PageResult } from '@/api/api.model.js';
|
|
2
|
+
import { TreeArrayItem } from '@/utils/helper.js';
|
|
3
|
+
import request, { RequestOptions } from '@/utils/request.js';
|
|
4
|
+
import { SystemAdmin } from './admin.js';
|
|
5
|
+
import { SystemMenuInfo } from './menu.js';
|
|
6
|
+
|
|
7
|
+
//角色
|
|
8
|
+
export class SystemRole {
|
|
9
|
+
id?: string; //ID
|
|
10
|
+
parentId = '' as string | null; //父级id
|
|
11
|
+
roleName = '' as string; //角色名称
|
|
12
|
+
roleKey = '' as string; //角色标识
|
|
13
|
+
orderNum = 999 as number | undefined; //排序(降序)
|
|
14
|
+
status = 1 as 1 | 0 | undefined; //状态:1=启用;0=禁用
|
|
15
|
+
remark = '' as string; //备注
|
|
16
|
+
menus = [] as Array<SystemMenuInfo>; //具有权限菜单
|
|
17
|
+
createdAt = '' as string; //创建时间
|
|
18
|
+
updatedAt = '' as string; //最后更新时间
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type SystemRoleInfo = SystemRole & {
|
|
22
|
+
id: string; //ID
|
|
23
|
+
isSuper: 1 | 0; //超级管理员:1=是;0=不是
|
|
24
|
+
createdAdmin: Omit<SystemAdmin, 'createdAdmin' | 'updatedAdmin'> | null;
|
|
25
|
+
updatedAdmin: Omit<SystemAdmin, 'createdAdmin' | 'updatedAdmin'> | null;
|
|
26
|
+
};
|
|
27
|
+
//添加角色信息
|
|
28
|
+
export function addSystemRoleApi() {
|
|
29
|
+
return request<SystemRoleInfo, [SystemRole]>(
|
|
30
|
+
(data) => ({
|
|
31
|
+
url: 'system/role/add',
|
|
32
|
+
method: 'post',
|
|
33
|
+
data: data,
|
|
34
|
+
}),
|
|
35
|
+
{ success: true },
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type SystemRoleListResult = PageResult<SystemRoleInfo>;
|
|
40
|
+
export class SystemRoleListParam extends PageParam {
|
|
41
|
+
parentId?: string | null; //父级id
|
|
42
|
+
id?: string; //ID
|
|
43
|
+
roleName?: string; //角色名称
|
|
44
|
+
roleKey?: string; //角色标识
|
|
45
|
+
orderNum?: number; //排序(降序)
|
|
46
|
+
status?: 1 | 0; //状态:1=启用;0=禁用
|
|
47
|
+
remark?: string; //备注
|
|
48
|
+
menus?: Array<SystemMenuInfo> | null; //具有权限菜单
|
|
49
|
+
startCreatedAt?: string; //创建时间(起)
|
|
50
|
+
endCreatedAt?: string; //创建时间(止)
|
|
51
|
+
startUpdatedAt?: string; //最后更新时间(起)
|
|
52
|
+
endUpdatedAt?: string; //最后更新时间(止)
|
|
53
|
+
}
|
|
54
|
+
//获取角色列表
|
|
55
|
+
export function systemRoleListApi(options?: RequestOptions<SystemRoleListResult, [SystemRoleListParam]>) {
|
|
56
|
+
return request<SystemRoleListResult, [SystemRoleListParam]>(
|
|
57
|
+
(data) => ({
|
|
58
|
+
url: 'system/role/',
|
|
59
|
+
method: 'post',
|
|
60
|
+
data: data,
|
|
61
|
+
}),
|
|
62
|
+
Object.assign({ noLoading: true, clearEmpty: ['', undefined, null] }, options),
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export type SystemRoleTreeAll = TreeArrayItem<SystemRoleInfo & { menus: { id: string }[] }, 'children'>[];
|
|
67
|
+
//获取树形结构
|
|
68
|
+
export function systemRoleTreeAllApi(options?: RequestOptions<SystemRoleTreeAll, []>) {
|
|
69
|
+
return request<SystemRoleTreeAll, []>(
|
|
70
|
+
() => ({
|
|
71
|
+
url: 'system/role/treeAll',
|
|
72
|
+
method: 'get',
|
|
73
|
+
}),
|
|
74
|
+
Object.assign({ noLoading: true }, options),
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
//根据id获取角色详情
|
|
79
|
+
export function systemRoleInfoApi(options?: RequestOptions<SystemRoleInfo, [string]>) {
|
|
80
|
+
return request<SystemRoleInfo & { parent?: SystemRoleInfo | null }, [string]>(
|
|
81
|
+
(id) => ({
|
|
82
|
+
url: `system/role/info/${id}`,
|
|
83
|
+
method: 'get',
|
|
84
|
+
}),
|
|
85
|
+
Object.assign({ noLoading: true }, options),
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export type UpdateSystemRoleInfoParam = Partial<Omit<SystemRoleInfo, 'menus' | 'id' | 'createdAt' | 'updatedAt' | 'createdAdmin' | 'updatedAdmin'> & { menuIds: string[] }>;
|
|
90
|
+
//修改角色信息
|
|
91
|
+
export function updateSystemRoleApi(options?: RequestOptions<SystemRoleInfo, [string, UpdateSystemRoleInfoParam]>) {
|
|
92
|
+
return request<SystemRoleInfo, [string, UpdateSystemRoleInfoParam]>(
|
|
93
|
+
(id, data) => ({
|
|
94
|
+
url: `system/role/up/${id}`,
|
|
95
|
+
method: 'post',
|
|
96
|
+
data: data,
|
|
97
|
+
}),
|
|
98
|
+
Object.assign({ success: true, noLoading: true }, options),
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
//删除角色
|
|
103
|
+
export function delSystemRoleApi(options?: RequestOptions<null, [string]>) {
|
|
104
|
+
return request<null, [string]>(
|
|
105
|
+
(id) => ({
|
|
106
|
+
url: `system/role/del/${id}`,
|
|
107
|
+
method: 'post',
|
|
108
|
+
}),
|
|
109
|
+
Object.assign({ noLoading: true }, options),
|
|
110
|
+
);
|
|
111
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { PageParam, PageResult } from '@/api/api.model.js';
|
|
2
|
+
import request, { RequestOptions } from '@/utils/request.js';
|
|
3
|
+
import { UserFileInfo } from './userFile.js';
|
|
4
|
+
|
|
5
|
+
//前台用户
|
|
6
|
+
export class User {
|
|
7
|
+
username = '' as string; //用户名
|
|
8
|
+
nickname = '' as string; //昵称
|
|
9
|
+
password = '' as string; //密码
|
|
10
|
+
avatar = undefined as UserFileInfo | null | undefined; //头像
|
|
11
|
+
email = '' as string | null; //邮箱
|
|
12
|
+
mobile = '' as string | null; //手机号
|
|
13
|
+
loginFailure = undefined as number | undefined; //登录失败次数
|
|
14
|
+
lastLoginAt = '' as string | null; //最后登录时间
|
|
15
|
+
lastLoginIp = '' as string; //最后登录ip
|
|
16
|
+
status = undefined as 1 | 0 | undefined; //状态:1=启用;0=禁用
|
|
17
|
+
createdUserId = '' as string | null; //创建者Id
|
|
18
|
+
createdUser = undefined as User | null | undefined; //创建者
|
|
19
|
+
updatedUser = undefined as User | null | undefined; //最后更新者
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type UserInfo = User & {
|
|
23
|
+
id: string; //ID
|
|
24
|
+
createdAt: string; //创建时间
|
|
25
|
+
updatedAt: string; //最后更新时间
|
|
26
|
+
};
|
|
27
|
+
//添加用户信息
|
|
28
|
+
export function addUserApi() {
|
|
29
|
+
return request<UserInfo, [User]>(
|
|
30
|
+
(data) => ({
|
|
31
|
+
url: 'user/add',
|
|
32
|
+
method: 'post',
|
|
33
|
+
data: data,
|
|
34
|
+
}),
|
|
35
|
+
{ success: true },
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type UserListResult = PageResult<UserInfo>;
|
|
40
|
+
export class UserListParam extends PageParam {
|
|
41
|
+
id?: string; //ID
|
|
42
|
+
username?: string; //用户名
|
|
43
|
+
nickname?: string; //昵称
|
|
44
|
+
password?: string; //密码
|
|
45
|
+
avatar?: UserFileInfo | null; //头像
|
|
46
|
+
email?: string | null; //邮箱
|
|
47
|
+
mobile?: string | null; //手机号
|
|
48
|
+
loginFailure?: number; //登录失败次数
|
|
49
|
+
startLastLoginAt?: string | null; //最后登录时间(起)
|
|
50
|
+
endLastLoginAt?: string | null; //最后登录时间(止)
|
|
51
|
+
lastLoginIp?: string; //最后登录ip
|
|
52
|
+
status?: 1 | 0; //状态:1=启用;0=禁用
|
|
53
|
+
createdUserId?: string | null; //创建者Id
|
|
54
|
+
createdUser?: User | null; //创建者
|
|
55
|
+
updatedUser?: User | null; //最后更新者
|
|
56
|
+
startCreatedAt?: string; //创建时间(起)
|
|
57
|
+
endCreatedAt?: string; //创建时间(止)
|
|
58
|
+
startUpdatedAt?: string; //最后更新时间(起)
|
|
59
|
+
endUpdatedAt?: string; //最后更新时间(止)
|
|
60
|
+
}
|
|
61
|
+
//获取用户列表
|
|
62
|
+
export function userListApi(options?: RequestOptions<UserListResult, [UserListParam]>) {
|
|
63
|
+
return request<UserListResult, [UserListParam]>(
|
|
64
|
+
(data) => ({
|
|
65
|
+
url: 'user/',
|
|
66
|
+
method: 'post',
|
|
67
|
+
data: data,
|
|
68
|
+
}),
|
|
69
|
+
Object.assign({ noLoading: true, clearEmpty: ['', undefined, null] }, options),
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
//根据id获取用户详情
|
|
74
|
+
export function userInfoApi(options?: RequestOptions<UserInfo, [string]>) {
|
|
75
|
+
return request<UserInfo, [string]>(
|
|
76
|
+
(id) => ({
|
|
77
|
+
url: `user/info/${id}`,
|
|
78
|
+
method: 'get',
|
|
79
|
+
}),
|
|
80
|
+
Object.assign({ noLoading: true }, options),
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export type UpdateUserInfoParam = Omit<Partial<UserInfo>, 'id' | 'createdAt' | 'updatedAt'>;
|
|
85
|
+
//修改用户信息
|
|
86
|
+
export function updateUserApi(options?: RequestOptions<UserInfo, [string, UpdateUserInfoParam]>) {
|
|
87
|
+
return request<UserInfo, [string, UpdateUserInfoParam]>(
|
|
88
|
+
(id, data) => ({
|
|
89
|
+
url: `user/up/${id}`,
|
|
90
|
+
method: 'post',
|
|
91
|
+
data: data,
|
|
92
|
+
}),
|
|
93
|
+
Object.assign({ success: true, noLoading: true }, options),
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
//删除用户
|
|
98
|
+
export function delUserApi(options?: RequestOptions<null, [string]>) {
|
|
99
|
+
return request<null, [string]>(
|
|
100
|
+
(id) => ({
|
|
101
|
+
url: `user/del/${id}`,
|
|
102
|
+
method: 'post',
|
|
103
|
+
}),
|
|
104
|
+
Object.assign({ noLoading: true }, options),
|
|
105
|
+
);
|
|
106
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { PageParam, PageResult } from '@/api/api.model.js';
|
|
2
|
+
import { SystemAdminInfo } from '@/api/system/admin.js';
|
|
3
|
+
import request, { RequestOptions } from '@/utils/request.js';
|
|
4
|
+
import { UserInfo } from './user.js';
|
|
5
|
+
|
|
6
|
+
//用户附件表(前台)
|
|
7
|
+
export class UserFile {
|
|
8
|
+
createdUserId = '' as string | null; //创建者Id
|
|
9
|
+
createdUser = undefined as UserInfo | null | undefined; //创建者
|
|
10
|
+
updatedUser = undefined as UserInfo | null | undefined; //最后更新者
|
|
11
|
+
name = '' as string; //文件名
|
|
12
|
+
path = '' as string; //路径
|
|
13
|
+
mimeType = '' as string; //mime类型
|
|
14
|
+
size = undefined as number | null | undefined; //文件大小
|
|
15
|
+
storage = '' as string; //存储引擎
|
|
16
|
+
md5 = '' as string; //文件MD5值
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type UserFileInfo = UserFile & {
|
|
20
|
+
id: string; //ID
|
|
21
|
+
url: string;
|
|
22
|
+
size: number;
|
|
23
|
+
createdAt: string; //创建时间
|
|
24
|
+
updatedAt: string; //最后更新时间
|
|
25
|
+
createdAdmin: SystemAdminInfo | null; //创建者
|
|
26
|
+
updatedAdmin: SystemAdminInfo | null; //最后更新者
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* 上传文件
|
|
30
|
+
* FormData参数说明
|
|
31
|
+
* file File 文件
|
|
32
|
+
* md5 string md5值
|
|
33
|
+
* sharding '0'|'1' 分片上传:0=否;1=是
|
|
34
|
+
* chunkMd5 string 当前分片md5值
|
|
35
|
+
* chunkIndex string 当前片序号(从0开始)
|
|
36
|
+
* start string 当前分片起止位置(从0开始)
|
|
37
|
+
* over string 是否结束(需确保最后一个分片上传时其他分片请求已完成):0=否;1=是
|
|
38
|
+
*
|
|
39
|
+
* @returns
|
|
40
|
+
*/
|
|
41
|
+
export function uploadFileApi<T extends boolean = true>(returnAxios = true as T) {
|
|
42
|
+
return request<Partial<UserFileInfo>, [FormData], T>(
|
|
43
|
+
(data) => ({
|
|
44
|
+
url: 'userFile/upload',
|
|
45
|
+
method: 'post',
|
|
46
|
+
data: data,
|
|
47
|
+
headers: {
|
|
48
|
+
'Content-Type': 'multipart/form-data',
|
|
49
|
+
},
|
|
50
|
+
}),
|
|
51
|
+
{ success: false, noLoading: true },
|
|
52
|
+
returnAxios,
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export type UserFileListResult = PageResult<UserFileInfo>;
|
|
57
|
+
export class UserFileListParam extends PageParam {
|
|
58
|
+
createdUserId?: string | null; //创建者Id
|
|
59
|
+
createdUser?: UserFile | null; //创建者
|
|
60
|
+
updatedUser?: UserFile | null; //最后更新者
|
|
61
|
+
createdAdmin?: SystemAdminInfo | null; //创建者
|
|
62
|
+
updatedAdmin?: SystemAdminInfo | null; //最后更新者
|
|
63
|
+
id?: string; //ID
|
|
64
|
+
name?: string; //文件名
|
|
65
|
+
path?: string; //路径
|
|
66
|
+
mimeType?: string; //mime类型
|
|
67
|
+
size?: number | null; //文件大小
|
|
68
|
+
storage?: string; //存储引擎
|
|
69
|
+
md5?: string; //文件MD5值
|
|
70
|
+
url?: string | null; //文件url
|
|
71
|
+
startCreatedAt?: string; //创建时间(起)
|
|
72
|
+
endCreatedAt?: string; //创建时间(止)
|
|
73
|
+
startUpdatedAt?: string; //最后更新时间(起)
|
|
74
|
+
endUpdatedAt?: string; //最后更新时间(止)
|
|
75
|
+
}
|
|
76
|
+
//获取用户附件表(前台)列表
|
|
77
|
+
export function userFileListApi(options?: RequestOptions<UserFileListResult, [UserFileListParam]>) {
|
|
78
|
+
return request<UserFileListResult, [UserFileListParam]>(
|
|
79
|
+
(data) => ({
|
|
80
|
+
url: 'userFile/',
|
|
81
|
+
method: 'post',
|
|
82
|
+
data: data,
|
|
83
|
+
}),
|
|
84
|
+
Object.assign({ noLoading: true, clearEmpty: ['', undefined, null] }, options),
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
//根据id获取用户附件表(前台)详情
|
|
89
|
+
export function userFileInfoApi(options?: RequestOptions<UserFileInfo, [string]>) {
|
|
90
|
+
return request<UserFileInfo, [string]>(
|
|
91
|
+
(id) => ({
|
|
92
|
+
url: `userFile/info/${id}`,
|
|
93
|
+
method: 'get',
|
|
94
|
+
}),
|
|
95
|
+
Object.assign({ noLoading: true }, options),
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export type UpdateUserFileInfoParam = Omit<Partial<UserFileInfo>, 'id' | 'createdAt' | 'updatedAt' | 'createdAdmin' | 'updatedAdmin'>;
|
|
100
|
+
//修改用户附件表(前台)信息
|
|
101
|
+
export function updateUserFileApi(options?: RequestOptions<UserFileInfo, [string, UpdateUserFileInfoParam]>) {
|
|
102
|
+
return request<UserFileInfo, [string, UpdateUserFileInfoParam]>(
|
|
103
|
+
(id, data) => ({
|
|
104
|
+
url: `userFile/up/${id}`,
|
|
105
|
+
method: 'post',
|
|
106
|
+
data: data,
|
|
107
|
+
}),
|
|
108
|
+
Object.assign({ success: true, noLoading: true }, options),
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
//删除用户附件表(前台)
|
|
113
|
+
export function delUserFileApi(options?: RequestOptions<null, [string]>) {
|
|
114
|
+
return request<null, [string]>(
|
|
115
|
+
(id) => ({
|
|
116
|
+
url: `userFile/del/${id}`,
|
|
117
|
+
method: 'post',
|
|
118
|
+
}),
|
|
119
|
+
Object.assign({ noLoading: true }, options),
|
|
120
|
+
);
|
|
121
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import '@/event/module';
|
|
2
|
+
import layoutMenuItem from '@/layout/components/menu/components/menuItem.vue';
|
|
3
|
+
import '@/styles/index.scss';
|
|
4
|
+
import { App } from 'vue';
|
|
5
|
+
import { event, mitter } from './event';
|
|
6
|
+
export let app: App;
|
|
7
|
+
export async function bootscrapt(appObj: App) {
|
|
8
|
+
app = appObj;
|
|
9
|
+
app.config.globalProperties.$start = true;
|
|
10
|
+
await Promise.allSettled(mitter.emit(event.START, app));
|
|
11
|
+
app.component('LayoutMenuItem', layoutMenuItem);
|
|
12
|
+
mitter.emit(event.READY, app);
|
|
13
|
+
}
|