From 510799690437e74ef284dba56ef2358685e4ca0f Mon Sep 17 00:00:00 2001 From: bqy_fe <1743369777@qq.com> Date: Tue, 30 Jan 2024 09:19:51 +0800 Subject: [PATCH] refactor(project): release 2.0 (#145) refactor(project): release 2.0 --- .env | 8 +- .env.development | 10 +- .env.production | 8 +- .eslintrc.js | 2 +- .gitattributes | 15 +- .vscode/settings.json | 53 +- .vscode/vue3.3.code-snippets | 2 +- mock/_createProductionServer.ts | 20 - mock/_util.ts | 64 - mock/demo/hero/index.ts | 37 - mock/demo/select-demo.ts | 28 - mock/log/_reqLog.data.ts | 602 -- mock/log/index.ts | 16 - mocks/_util.ts | 83 + {mock => mocks}/demo/hero/_heroList.json | 0 {mock => mocks}/demo/hero/_lolHeroList.json | 0 mocks/demo/hero/index.ts | 37 + mocks/demo/select.ts | 23 + mocks/index.ts | 22 + mocks/list.ts | 28 + mocks/user.ts | 24 + openapi.config.ts | 67 + package.json | 114 +- packages/mock-server/package.json | 36 + .../mock-server/src/browser/enableMocking.ts | 54 + packages/mock-server/src/browser/index.ts | 1 + .../mock-server/src/browser/vitePlugin.ts | 35 + packages/mock-server/src/buildLocalMswFile.ts | 60 + packages/mock-server/src/index.ts | 60 + packages/mock-server/src/mockServiceWorker.js | 299 + packages/mock-server/src/node/index.ts | 107 + .../mock-server/src/utils/isMatchHandler.ts | 44 + packages/mock-server/src/utils/log.ts | 7 + packages/mock-server/tsconfig.json | 28 + packages/mock-server/tsup.config.ts | 42 + packages/mock-server/types/module.d.ts | 4 + pnpm-lock.yaml | 7282 +++++++++++------ pnpm-workspace.yaml | 2 + src/App.vue | 1 - src/api/account/index.ts | 39 - src/api/account/model.d.ts | 50 - src/api/backend/api/account.ts | 59 + src/api/backend/api/auth.ts | 27 + src/api/backend/api/authEmail.ts | 15 + src/api/backend/api/businessTodo.ts | 82 + src/api/backend/api/captcha.ts | 22 + src/api/backend/api/health.ts | 68 + src/api/backend/api/index.ts | 48 + src/api/backend/api/systemDept.ts | 77 + src/api/backend/api/systemDictItem.ts | 91 + src/api/backend/api/systemDictType.ts | 99 + src/api/backend/api/systemEmail.ts | 15 + src/api/backend/api/systemLog.ts | 90 + src/api/backend/api/systemMenu.ts | 87 + src/api/backend/api/systemOnline.ts | 23 + src/api/backend/api/systemParamConfig.ts | 91 + src/api/backend/api/systemRole.ts | 91 + src/api/backend/api/systemServe.ts | 11 + src/api/backend/api/systemSse.ts | 17 + src/api/backend/api/systemTask.ts | 136 + src/api/backend/api/systemUser.ts | 110 + src/api/backend/api/toolsStorage.ts | 44 + src/api/backend/api/toolsUpload.ts | 35 + src/api/backend/api/typings.d.ts | 1121 +++ src/api/demo/hero.ts | 30 + src/api/demo/select.ts | 13 + src/api/demos/hero.ts | 53 - src/api/demos/select.ts | 18 - src/api/index.ts | 5 + src/api/login/index.ts | 30 - src/api/login/model.d.ts | 26 - src/api/netdisk/index.ts | 80 - src/api/netdisk/model.d.ts | 112 - src/api/netdisk/overview.ts | 8 - src/api/system/dept/index.ts | 96 - src/api/system/dept/model.d.ts | 68 - src/api/system/log/index.ts | 31 - src/api/system/log/model.d.ts | 42 - src/api/system/menu/index.ts | 56 - src/api/system/menu/model.d.ts | 77 - src/api/system/online/index.ts | 17 - src/api/system/online/model.d.ts | 15 - src/api/system/param-config/index.ts | 58 - src/api/system/param-config/model.d.ts | 46 - src/api/system/role/index.ts | 66 - src/api/system/role/model.d.ts | 55 - src/api/system/serve/index.ts | 9 - src/api/system/serve/model.d.ts | 42 - src/api/system/task/index.ts | 80 - src/api/system/task/model.d.ts | 57 - src/api/system/user/index.ts | 65 - src/api/system/user/model.d.ts | 75 - src/api/typings.d.ts | 14 +- .../basic/context-menu/src/ContextMenu.vue | 2 +- .../basic/excel/src/ExportExcelModal.tsx | 2 +- src/components/basic/icon/Icon.vue | 45 + src/components/basic/icon/index.ts | 8 + src/components/basic/icon/src/IconPicker.vue | 121 + .../svg-icon.vue => icon/src/SvgIcon.vue} | 17 +- .../{iconfont => icon/src}/icon-font.tsx | 1 + src/components/basic/icon/src/icons.data.ts | 14 + src/components/basic/icon/src/props.ts | 30 + src/components/basic/iconfont/index.ts | 2 - src/components/basic/icons-select/icons.json | 1311 --- src/components/basic/icons-select/index.vue | 72 - src/components/basic/iframe-page/index.ts | 3 +- src/components/basic/locale-picker/index.vue | 2 +- src/components/basic/svg-icon/index.ts | 3 - src/components/basic/tinymce/constants.ts | 37 + src/components/basic/tinymce/index.ts | 5 + src/components/basic/tinymce/index.vue | 53 + src/components/basic/tinymce/langs/index.ts | 7 + src/components/basic/tinymce/langs/zh_CN.js | 428 + src/components/basic/tinymce/plugins.ts | 50 + src/components/basic/tinymce/props.ts | 34 + .../src/components/table-action.vue | 173 +- .../table-settings/column-setting.vue | 4 +- .../src/components/table-settings/index.vue | 2 + .../table-settings/search-setting.vue | 23 + .../src/components/tool-bar/index.vue | 16 +- .../dynamic-table/src/dynamic-table.config.ts | 40 + .../core/dynamic-table/src/dynamic-table.ts | 46 +- .../core/dynamic-table/src/dynamic-table.vue | 33 +- .../core/dynamic-table/src/hooks/index.ts | 2 + .../dynamic-table/src/hooks/useColumns.tsx | 7 +- .../core/dynamic-table/src/hooks/useTable.tsx | 13 +- .../dynamic-table/src/hooks/useTableExpand.ts | 71 + .../dynamic-table/src/hooks/useTableForm.ts | 4 +- .../src/hooks/useTableMethods.tsx | 174 +- .../dynamic-table/src/hooks/useTableState.tsx | 18 +- .../core/dynamic-table/src/types/column.ts | 8 +- .../dynamic-table/src/types/tableAction.ts | 9 +- .../core/schema-form/src/hooks/useAdvanced.ts | 2 + .../core/schema-form/src/hooks/useForm.tsx | 7 +- .../schema-form/src/hooks/useFormEvents.ts | 45 +- .../schema-form/src/hooks/useFormState.ts | 2 +- .../schema-form/src/hooks/useLabelWidth.ts | 1 + .../core/schema-form/src/schema-form-item.ts | 4 +- .../core/schema-form/src/schema-form-item.vue | 57 +- .../core/schema-form/src/schema-form.ts | 11 +- .../core/schema-form/src/types/form.ts | 49 +- src/constants/env.ts | 7 + src/core/permission/index.ts | 66 - src/core/permission/modules/index.ts | 42 - src/core/permission/modules/netdisk/index.ts | 3 - src/core/permission/modules/netdisk/manage.ts | 19 - src/core/permission/modules/sys/dept.ts | 18 - src/core/permission/modules/sys/index.ts | 20 - src/core/permission/modules/sys/log.ts | 11 - src/core/permission/modules/sys/menu.ts | 13 - src/core/permission/modules/sys/online.ts | 10 - .../permission/modules/sys/param-config.ts | 13 - src/core/permission/modules/sys/role.ts | 14 - src/core/permission/modules/sys/serve.ts | 9 - src/core/permission/modules/sys/task.ts | 16 - src/core/permission/modules/sys/user.ts | 14 - src/core/permission/modules/types.ts | 4 - src/core/permission/utils.ts | 88 - src/core/socket/event-type.ts | 9 - src/core/socket/socket-io.ts | 264 - src/core/socket/useSocket.ts | 31 - src/directives/permission.ts | 24 - src/enums/httpEnum.ts | 2 +- src/hooks/useModal/index.ts | 10 +- src/hooks/useModal/types.ts | 6 +- src/hooks/useModal/useFormModal.tsx | 13 +- src/hooks/useModal/useModal.tsx | 10 +- src/layout/header/index.vue | 8 +- src/layout/menu/menu-item-content.vue | 6 +- src/layout/menu/menu-item.vue | 11 +- src/layout/menu/menu.vue | 10 +- src/layout/routerView/index.vue | 28 +- src/layout/tabs/tabs-view.vue | 69 +- src/locales/config.ts | 4 +- src/locales/lang/en-US/common.ts | 20 - src/locales/lang/en-US/component.ts | 28 - src/locales/lang/en-US/layout.ts | 115 - src/locales/lang/en-US/routes/account.ts | 4 - src/locales/lang/en-US/routes/basic.ts | 4 - src/locales/lang/en-US/routes/dashboard.ts | 6 - src/locales/lang/en-US/routes/demo.ts | 20 - src/locales/lang/{en_US.ts => en.ts} | 6 +- src/locales/lang/en/common.json | 20 + src/locales/lang/en/component.json | 28 + src/locales/lang/en/layout.json | 108 + src/locales/lang/en/routes/account.json | 4 + src/locales/lang/en/routes/basic.json | 4 + src/locales/lang/en/routes/dashboard.json | 6 + src/locales/lang/en/routes/demo.json | 20 + src/locales/lang/zh-CN/common.json | 22 + src/locales/lang/zh-CN/common.ts | 20 - src/locales/lang/zh-CN/component.json | 32 + src/locales/lang/zh-CN/component.ts | 32 - src/locales/lang/zh-CN/layout.json | 108 + src/locales/lang/zh-CN/layout.ts | 115 - src/locales/lang/zh-CN/routes/account.json | 4 + src/locales/lang/zh-CN/routes/account.ts | 4 - src/locales/lang/zh-CN/routes/basic.json | 4 + src/locales/lang/zh-CN/routes/basic.ts | 4 - src/locales/lang/zh-CN/routes/dashboard.json | 6 + src/locales/lang/zh-CN/routes/dashboard.ts | 6 - src/locales/lang/zh-CN/routes/demo.json | 20 + src/locales/lang/zh-CN/routes/demo.ts | 20 - src/locales/lang/zh_CN.ts | 2 +- src/main.ts | 20 +- src/permission/index.ts | 41 + src/permission/permCode.ts | 72 + src/plugins/antd.ts | 2 +- src/plugins/customComponents.ts | 13 - src/plugins/directives.ts | 12 - src/plugins/globalMethods.ts | 2 +- src/plugins/index.ts | 2 - src/polyfill.ts | 2 + src/router/asyncModules/index.ts | 11 +- src/router/generator-router.tsx | 169 - src/router/helper/routeHelper.tsx | 75 + src/router/index.ts | 20 +- src/router/router-guards.ts | 24 +- .../besidesLayout.ts => routes/basic.ts} | 29 +- src/router/routes/index.ts | 22 + .../modules}/account.ts | 0 .../modules}/dashboard.ts | 7 +- .../modules}/demos.ts | 85 +- .../modules}/externa-link.ts | 6 +- .../modules}/index.ts | 0 src/router/{ => routes}/outsideLayout.ts | 2 +- src/router/staticModules/error.ts | 45 - src/store/modules/user.ts | 218 +- src/store/modules/ws.ts | 90 - src/styles/common.less | 8 +- src/styles/index.less | 1 + src/styles/reset.css | 8 + src/styles/transition.less | 14 +- src/utils/Storage.ts | 8 +- src/utils/common.ts | 50 + src/utils/dateUtil.ts | 10 +- src/utils/log.ts | 9 + src/utils/request.ts | 144 +- src/views/account/about.vue | 26 +- src/views/dashboard/welcome/index.vue | 31 +- src/views/demos/custom-modal.vue | 2 +- .../demos/form/basic-form/form-schema.tsx | 4 +- src/views/demos/form/basic-form/index.vue | 4 +- src/views/demos/icons/Iconfont.vue | 2 +- src/views/demos/nested-routes/route-one.vue | 2 +- src/views/demos/nested-routes/route-three.vue | 2 +- src/views/demos/nested-routes/route-two.vue | 2 +- .../demos/tables/edit-row-table/columns.tsx | 14 +- .../demos/tables/edit-row-table/index.vue | 17 +- src/views/demos/tables/lol-table/columns.tsx | 8 +- src/views/demos/tables/lol-table/heroInfo.vue | 63 +- src/views/demos/tables/lol-table/index.vue | 12 +- .../demos/tables/search-table/columns.tsx | 8 +- src/views/demos/tables/search-table/index.vue | 57 +- src/views/demos/tables/wzry-table/columns.tsx | 23 +- src/views/demos/tables/wzry-table/index.vue | 33 +- src/views/error/comp-not-found.vue | 13 + src/views/login/index.vue | 12 +- src/views/netdisk/columns.tsx | 76 - .../components/file-operate-button-list.vue | 241 - .../components/file-preview-drawer.vue | 158 - .../netdisk/components/file-upload-drawer.vue | 170 - .../components/overview-header-item.vue | 59 - src/views/netdisk/formSchemas.ts | 80 - src/views/netdisk/manage.vue | 299 - src/views/netdisk/overview.vue | 226 - src/views/system/dept/columns.tsx | 28 + src/views/system/dept/formSchemas.ts | 39 + src/views/system/dept/index.vue | 108 + src/views/system/dict-item/columns.tsx | 77 + src/views/system/dict-item/formSchemas.ts | 61 + src/views/system/dict-item/index.vue | 137 + src/views/system/dict-type/columns.tsx | 67 + src/views/system/dict-type/formSchemas.ts | 36 + src/views/system/dict-type/index.vue | 136 + src/views/system/menu/columns.tsx | 111 + src/views/system/menu/formSchemas.tsx | 217 + .../system/{permission => }/menu/index.vue | 93 +- src/views/system/monitor/log/login/index.vue | 72 + src/views/system/monitor/login-log/index.vue | 66 - src/views/system/monitor/online/index.vue | 100 +- src/views/system/monitor/req-log/index.vue | 100 - src/views/system/monitor/serve/index.vue | 6 +- src/views/system/param-config/columns.tsx | 42 +- src/views/system/param-config/formSchemas.ts | 21 +- .../{config-list.vue => index.vue} | 63 +- src/views/system/permission/menu/columns.tsx | 92 - .../system/permission/menu/formSchemas.tsx | 155 - src/views/system/permission/user/index.vue | 380 - .../system/{permission => }/role/columns.tsx | 31 +- .../{permission => }/role/formSchemas.ts | 47 +- .../system/{permission => }/role/index.vue | 79 +- src/views/system/schedule/log/index.vue | 47 +- src/views/system/schedule/task/columns.tsx | 23 +- src/views/system/schedule/task/formSchemas.ts | 2 +- src/views/system/schedule/task/index.vue | 55 +- src/views/system/user/AvatarUpload.vue | 109 + src/views/system/user/DeptTree.vue | 113 + .../system/{permission => }/user/columns.tsx | 42 +- .../formSchemas.ts => user/formSchemas.tsx} | 61 +- src/views/system/user/index.vue | 214 + src/views/tool/email/formSchemas.tsx | 40 + src/views/tool/email/index.vue | 67 + src/views/tool/storage/columns.tsx | 152 + src/views/tool/storage/index.vue | 77 + src/views/tool/storage/upload-modal.vue | 131 + stylelint.config.js | 14 +- tsconfig.json | 45 +- types/env.d.ts | 2 +- types/global.d.ts | 25 + types/shims/shims-vue.d.ts | 12 +- types/vue-router.d.ts | 8 +- vite.config.ts | 44 +- 313 files changed, 13326 insertions(+), 11135 deletions(-) delete mode 100644 mock/_createProductionServer.ts delete mode 100644 mock/_util.ts delete mode 100644 mock/demo/hero/index.ts delete mode 100644 mock/demo/select-demo.ts delete mode 100644 mock/log/_reqLog.data.ts delete mode 100644 mock/log/index.ts create mode 100644 mocks/_util.ts rename {mock => mocks}/demo/hero/_heroList.json (100%) rename {mock => mocks}/demo/hero/_lolHeroList.json (100%) create mode 100644 mocks/demo/hero/index.ts create mode 100644 mocks/demo/select.ts create mode 100644 mocks/index.ts create mode 100644 mocks/list.ts create mode 100644 mocks/user.ts create mode 100644 openapi.config.ts create mode 100644 packages/mock-server/package.json create mode 100644 packages/mock-server/src/browser/enableMocking.ts create mode 100644 packages/mock-server/src/browser/index.ts create mode 100644 packages/mock-server/src/browser/vitePlugin.ts create mode 100644 packages/mock-server/src/buildLocalMswFile.ts create mode 100644 packages/mock-server/src/index.ts create mode 100644 packages/mock-server/src/mockServiceWorker.js create mode 100644 packages/mock-server/src/node/index.ts create mode 100644 packages/mock-server/src/utils/isMatchHandler.ts create mode 100644 packages/mock-server/src/utils/log.ts create mode 100644 packages/mock-server/tsconfig.json create mode 100644 packages/mock-server/tsup.config.ts create mode 100644 packages/mock-server/types/module.d.ts create mode 100644 pnpm-workspace.yaml delete mode 100644 src/api/account/index.ts delete mode 100644 src/api/account/model.d.ts create mode 100644 src/api/backend/api/account.ts create mode 100644 src/api/backend/api/auth.ts create mode 100644 src/api/backend/api/authEmail.ts create mode 100644 src/api/backend/api/businessTodo.ts create mode 100644 src/api/backend/api/captcha.ts create mode 100644 src/api/backend/api/health.ts create mode 100644 src/api/backend/api/index.ts create mode 100644 src/api/backend/api/systemDept.ts create mode 100644 src/api/backend/api/systemDictItem.ts create mode 100644 src/api/backend/api/systemDictType.ts create mode 100644 src/api/backend/api/systemEmail.ts create mode 100644 src/api/backend/api/systemLog.ts create mode 100644 src/api/backend/api/systemMenu.ts create mode 100644 src/api/backend/api/systemOnline.ts create mode 100644 src/api/backend/api/systemParamConfig.ts create mode 100644 src/api/backend/api/systemRole.ts create mode 100644 src/api/backend/api/systemServe.ts create mode 100644 src/api/backend/api/systemSse.ts create mode 100644 src/api/backend/api/systemTask.ts create mode 100644 src/api/backend/api/systemUser.ts create mode 100644 src/api/backend/api/toolsStorage.ts create mode 100644 src/api/backend/api/toolsUpload.ts create mode 100644 src/api/backend/api/typings.d.ts create mode 100644 src/api/demo/hero.ts create mode 100644 src/api/demo/select.ts delete mode 100644 src/api/demos/hero.ts delete mode 100644 src/api/demos/select.ts create mode 100644 src/api/index.ts delete mode 100644 src/api/login/index.ts delete mode 100644 src/api/login/model.d.ts delete mode 100644 src/api/netdisk/index.ts delete mode 100644 src/api/netdisk/model.d.ts delete mode 100644 src/api/netdisk/overview.ts delete mode 100644 src/api/system/dept/index.ts delete mode 100644 src/api/system/dept/model.d.ts delete mode 100644 src/api/system/log/index.ts delete mode 100644 src/api/system/log/model.d.ts delete mode 100644 src/api/system/menu/index.ts delete mode 100644 src/api/system/menu/model.d.ts delete mode 100644 src/api/system/online/index.ts delete mode 100644 src/api/system/online/model.d.ts delete mode 100644 src/api/system/param-config/index.ts delete mode 100644 src/api/system/param-config/model.d.ts delete mode 100644 src/api/system/role/index.ts delete mode 100644 src/api/system/role/model.d.ts delete mode 100644 src/api/system/serve/index.ts delete mode 100644 src/api/system/serve/model.d.ts delete mode 100644 src/api/system/task/index.ts delete mode 100644 src/api/system/task/model.d.ts delete mode 100644 src/api/system/user/index.ts delete mode 100644 src/api/system/user/model.d.ts create mode 100644 src/components/basic/icon/Icon.vue create mode 100644 src/components/basic/icon/index.ts create mode 100644 src/components/basic/icon/src/IconPicker.vue rename src/components/basic/{svg-icon/svg-icon.vue => icon/src/SvgIcon.vue} (74%) rename src/components/basic/{iconfont => icon/src}/icon-font.tsx (95%) create mode 100644 src/components/basic/icon/src/icons.data.ts create mode 100644 src/components/basic/icon/src/props.ts delete mode 100644 src/components/basic/iconfont/index.ts delete mode 100644 src/components/basic/icons-select/icons.json delete mode 100644 src/components/basic/icons-select/index.vue delete mode 100644 src/components/basic/svg-icon/index.ts create mode 100644 src/components/basic/tinymce/constants.ts create mode 100644 src/components/basic/tinymce/index.ts create mode 100644 src/components/basic/tinymce/index.vue create mode 100644 src/components/basic/tinymce/langs/index.ts create mode 100644 src/components/basic/tinymce/langs/zh_CN.js create mode 100644 src/components/basic/tinymce/plugins.ts create mode 100644 src/components/basic/tinymce/props.ts create mode 100644 src/components/core/dynamic-table/src/components/table-settings/search-setting.vue create mode 100644 src/components/core/dynamic-table/src/dynamic-table.config.ts create mode 100644 src/components/core/dynamic-table/src/hooks/useTableExpand.ts create mode 100644 src/constants/env.ts delete mode 100644 src/core/permission/index.ts delete mode 100644 src/core/permission/modules/index.ts delete mode 100644 src/core/permission/modules/netdisk/index.ts delete mode 100644 src/core/permission/modules/netdisk/manage.ts delete mode 100644 src/core/permission/modules/sys/dept.ts delete mode 100644 src/core/permission/modules/sys/index.ts delete mode 100644 src/core/permission/modules/sys/log.ts delete mode 100644 src/core/permission/modules/sys/menu.ts delete mode 100644 src/core/permission/modules/sys/online.ts delete mode 100644 src/core/permission/modules/sys/param-config.ts delete mode 100644 src/core/permission/modules/sys/role.ts delete mode 100644 src/core/permission/modules/sys/serve.ts delete mode 100644 src/core/permission/modules/sys/task.ts delete mode 100644 src/core/permission/modules/sys/user.ts delete mode 100644 src/core/permission/modules/types.ts delete mode 100644 src/core/permission/utils.ts delete mode 100644 src/core/socket/event-type.ts delete mode 100644 src/core/socket/socket-io.ts delete mode 100644 src/core/socket/useSocket.ts delete mode 100644 src/directives/permission.ts delete mode 100644 src/locales/lang/en-US/common.ts delete mode 100644 src/locales/lang/en-US/component.ts delete mode 100644 src/locales/lang/en-US/layout.ts delete mode 100644 src/locales/lang/en-US/routes/account.ts delete mode 100644 src/locales/lang/en-US/routes/basic.ts delete mode 100644 src/locales/lang/en-US/routes/dashboard.ts delete mode 100644 src/locales/lang/en-US/routes/demo.ts rename src/locales/lang/{en_US.ts => en.ts} (52%) create mode 100644 src/locales/lang/en/common.json create mode 100644 src/locales/lang/en/component.json create mode 100644 src/locales/lang/en/layout.json create mode 100644 src/locales/lang/en/routes/account.json create mode 100644 src/locales/lang/en/routes/basic.json create mode 100644 src/locales/lang/en/routes/dashboard.json create mode 100644 src/locales/lang/en/routes/demo.json create mode 100644 src/locales/lang/zh-CN/common.json delete mode 100644 src/locales/lang/zh-CN/common.ts create mode 100644 src/locales/lang/zh-CN/component.json delete mode 100644 src/locales/lang/zh-CN/component.ts create mode 100644 src/locales/lang/zh-CN/layout.json delete mode 100644 src/locales/lang/zh-CN/layout.ts create mode 100644 src/locales/lang/zh-CN/routes/account.json delete mode 100644 src/locales/lang/zh-CN/routes/account.ts create mode 100644 src/locales/lang/zh-CN/routes/basic.json delete mode 100644 src/locales/lang/zh-CN/routes/basic.ts create mode 100644 src/locales/lang/zh-CN/routes/dashboard.json delete mode 100644 src/locales/lang/zh-CN/routes/dashboard.ts create mode 100644 src/locales/lang/zh-CN/routes/demo.json delete mode 100644 src/locales/lang/zh-CN/routes/demo.ts create mode 100644 src/permission/index.ts create mode 100644 src/permission/permCode.ts delete mode 100644 src/plugins/customComponents.ts delete mode 100644 src/plugins/directives.ts create mode 100644 src/polyfill.ts delete mode 100644 src/router/generator-router.tsx create mode 100644 src/router/helper/routeHelper.tsx rename src/router/{staticModules/besidesLayout.ts => routes/basic.ts} (64%) create mode 100644 src/router/routes/index.ts rename src/router/{staticModules => routes/modules}/account.ts (100%) rename src/router/{staticModules => routes/modules}/dashboard.ts (76%) rename src/router/{staticModules => routes/modules}/demos.ts (72%) rename src/router/{staticModules => routes/modules}/externa-link.ts (64%) rename src/router/{staticModules => routes/modules}/index.ts (100%) rename src/router/{ => routes}/outsideLayout.ts (77%) delete mode 100644 src/router/staticModules/error.ts delete mode 100644 src/store/modules/ws.ts create mode 100644 src/styles/reset.css create mode 100644 src/utils/log.ts create mode 100644 src/views/error/comp-not-found.vue delete mode 100644 src/views/netdisk/columns.tsx delete mode 100644 src/views/netdisk/components/file-operate-button-list.vue delete mode 100644 src/views/netdisk/components/file-preview-drawer.vue delete mode 100644 src/views/netdisk/components/file-upload-drawer.vue delete mode 100644 src/views/netdisk/components/overview-header-item.vue delete mode 100644 src/views/netdisk/formSchemas.ts delete mode 100644 src/views/netdisk/manage.vue delete mode 100644 src/views/netdisk/overview.vue create mode 100644 src/views/system/dept/columns.tsx create mode 100644 src/views/system/dept/formSchemas.ts create mode 100644 src/views/system/dept/index.vue create mode 100644 src/views/system/dict-item/columns.tsx create mode 100644 src/views/system/dict-item/formSchemas.ts create mode 100644 src/views/system/dict-item/index.vue create mode 100644 src/views/system/dict-type/columns.tsx create mode 100644 src/views/system/dict-type/formSchemas.ts create mode 100644 src/views/system/dict-type/index.vue create mode 100644 src/views/system/menu/columns.tsx create mode 100644 src/views/system/menu/formSchemas.tsx rename src/views/system/{permission => }/menu/index.vue (53%) create mode 100644 src/views/system/monitor/log/login/index.vue delete mode 100644 src/views/system/monitor/login-log/index.vue delete mode 100644 src/views/system/monitor/req-log/index.vue rename src/views/system/param-config/{config-list.vue => index.vue} (55%) delete mode 100644 src/views/system/permission/menu/columns.tsx delete mode 100644 src/views/system/permission/menu/formSchemas.tsx delete mode 100644 src/views/system/permission/user/index.vue rename src/views/system/{permission => }/role/columns.tsx (58%) rename src/views/system/{permission => }/role/formSchemas.ts (60%) rename src/views/system/{permission => }/role/index.vue (52%) create mode 100644 src/views/system/user/AvatarUpload.vue create mode 100644 src/views/system/user/DeptTree.vue rename src/views/system/{permission => }/user/columns.tsx (75%) rename src/views/system/{permission/user/formSchemas.ts => user/formSchemas.tsx} (64%) create mode 100644 src/views/system/user/index.vue create mode 100644 src/views/tool/email/formSchemas.tsx create mode 100644 src/views/tool/email/index.vue create mode 100644 src/views/tool/storage/columns.tsx create mode 100644 src/views/tool/storage/index.vue create mode 100644 src/views/tool/storage/upload-modal.vue diff --git a/.env b/.env index 29a761759..a84741b88 100644 --- a/.env +++ b/.env @@ -1,14 +1,14 @@ -# 供docker构建时使用 -ENV = 'production' +# 项目名称 +VITE_APP_TITLE = Admin # 网站前缀 VITE_BASE_URL = / # base api -VITE_BASE_API = '/api/admin/' +VITE_BASE_API_URL = '/api/admin/' VITE_BASE_SOCKET_PATH = '/ws-api' VITE_BASE_SOCKET_NSP = '/admin' # mock api -VITE_MOCK_API = '/mock-api/' +VITE_MOCK_API = '/api/' diff --git a/.env.development b/.env.development index 0581dae46..11fc3dc1b 100644 --- a/.env.development +++ b/.env.development @@ -1,14 +1,12 @@ # 只在开发模式中被载入 +ENV = 'development' # 网站前缀 VITE_BASE_URL = / -# base api -VITE_BASE_API = '/api/admin/' +# base api url +VITE_BASE_API_URL = '/api' VITE_BASE_SOCKET_PATH = '/ws-api' -VITE_BASE_SOCKET_NSP = '/admin' - -# mock api -VITE_MOCK_API = '/mock-api/' +VITE_BASE_SOCKET_NSP = '/auth' VITE_DROP_CONSOLE = false diff --git a/.env.production b/.env.production index 3a024ada2..7bf371b7c 100644 --- a/.env.production +++ b/.env.production @@ -1,14 +1,12 @@ # 只在生产模式中被载入 +ENV = 'production' -# base api -VITE_BASE_API = 'https://nest-api.buqiyuan.site/api/admin/' +# base api url +VITE_BASE_API_URL = 'http://127.0.0.1:7001' VITE_BASE_SOCKET_PATH = '/ws-api' VITE_BASE_SOCKET_NSP = 'wss://nest-api.buqiyuan.site/admin' # 网站前缀 VITE_BASE_URL = /vue3-antdv-admin/ -# mock api -VITE_MOCK_API = '/mock-api/' - VITE_DROP_CONSOLE = true diff --git a/.eslintrc.js b/.eslintrc.js index 5d9f4f438..7de04ca1f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -28,7 +28,7 @@ module.exports = { ], overrides: [ { - files: ['*.ts', '*.tsx', '*.vue'], + files: ['*.ts', '*.js', '*.tsx', '*.vue'], rules: { 'no-undef': 'off', }, diff --git a/.gitattributes b/.gitattributes index d6e52a9f0..d4e5bd3ed 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,6 +1,11 @@ +# https://docs.github.com/cn/get-started/getting-started-with-git/configuring-git-to-handle-line-endings + +# Automatically normalize line endings (to LF) for all text-based files. * text=auto eol=lf -*.ts linguist-detectable=false -*.css linguist-detectable=false -*.scss linguist-detectable=false -*.js linguist-detectable=true -*.vue linguist-detectable=true + +# Declare files that will always have CRLF line endings on checkout. +*.{cmd,[cC][mM][dD]} text eol=crlf +*.{bat,[bB][aA][tT]} text eol=crlf + +# Denote all files that are truly binary and should not be modified. +*.{ico,png,jpg,jpeg,gif,webp,svg,woff,woff2} binary \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index c0d780b36..bd1d447e5 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,33 +1,11 @@ { "typescript.tsdk": "./node_modules/typescript/lib", - "typescript.preferences.importModuleSpecifier": "non-relative", + "volar.tsPlugin": true, + "volar.tsPluginStatus": false, "npm.packageManager": "pnpm", "editor.tabSize": 2, - "editor.formatOnSave": true, "editor.defaultFormatter": "esbenp.prettier-vscode", "files.eol": "\n", - "eslint.probe": [ - "javascript", - "javascriptreact", - "typescript", - "typescriptreact", - "html", - "vue", - "markdown", - "json", - "jsonc" - ], - "eslint.validate": [ - "javascript", - "javascriptreact", - "typescript", - "typescriptreact", - "html", - "vue", - "markdown", - "json", - "jsonc" - ], "search.exclude": { "**/node_modules": true, "**/*.log": true, @@ -78,7 +56,6 @@ }, "stylelint.enable": true, "stylelint.validate": ["css", "less", "postcss", "scss", "vue", "sass"], - "stylelint.packageManager": "pnpm", "path-intellisense.mappings": { "@/": "${workspaceRoot}/src" }, @@ -86,16 +63,10 @@ "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[typescript]": { - "editor.defaultFormatter": "esbenp.prettier-vscode", - "editor.codeActionsOnSave": { - "source.fixAll.eslint": true - } + "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[typescriptreact]": { - "editor.defaultFormatter": "esbenp.prettier-vscode", - "editor.codeActionsOnSave": { - "source.fixAll.eslint": true - } + "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[html]": { "editor.defaultFormatter": "esbenp.prettier-vscode" @@ -112,21 +83,23 @@ "[markdown]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, - "[jsonc]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.codeActionsOnSave": { + "source.fixAll.eslint": "explicit", + "source.fixAll.stylelint": "explicit" }, "[vue]": { "editor.codeActionsOnSave": { - "source.fixAll.eslint": true, - "source.fixAll.stylelint": true - } + "source.fixAll.eslint": "explicit", + "source.fixAll.stylelint": "explicit" + }, + "editor.defaultFormatter": "esbenp.prettier-vscode" }, "i18n-ally.localesPaths": ["src/locales/lang"], "i18n-ally.keystyle": "nested", "i18n-ally.sortKeys": true, "i18n-ally.namespace": true, - "i18n-ally.pathMatcher": "{locale}/{namespace}.{ext}", - "i18n-ally.enabledParsers": ["ts"], + "i18n-ally.pathMatcher": "{locale}/{namespaces}.{ext}", + "i18n-ally.enabledParsers": ["json"], "i18n-ally.sourceLanguage": "en", "i18n-ally.displayLanguage": "zh-CN", "i18n-ally.enabledFrameworks": ["vue", "react"] diff --git a/.vscode/vue3.3.code-snippets b/.vscode/vue3.3.code-snippets index b20ff8bb1..c4625ad95 100644 --- a/.vscode/vue3.3.code-snippets +++ b/.vscode/vue3.3.code-snippets @@ -5,7 +5,7 @@ "body": [ "\n", "