├── .gitattributes ├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── NOTICE ├── README.md ├── README.zh.md ├── backend ├── .gitignore ├── application │ ├── __init__.py │ ├── asgi.py │ ├── celery.py │ ├── dispatch.py │ ├── routing.py │ ├── settings.py │ ├── urls.py │ ├── websocketConfig.py │ └── wsgi.py ├── conf │ └── env.example.py ├── del_migrations.py ├── docker_start.sh ├── dvadmin │ ├── __init__.py │ ├── system │ │ ├── __init__.py │ │ ├── admin.py │ │ ├── apps.py │ │ ├── fixtures │ │ │ ├── __init__.py │ │ │ ├── initSerializer.py │ │ │ ├── init_apiwhitelist.json │ │ │ ├── init_dept.json │ │ │ ├── init_dictionary.json │ │ │ ├── init_menu.json │ │ │ ├── init_role.json │ │ │ ├── init_rolemenubuttonpermission.json │ │ │ ├── init_rolemenupermission.json │ │ │ ├── init_systemconfig.json │ │ │ ├── init_users.json │ │ │ └── initialize.py │ │ ├── management │ │ │ ├── __init__.py │ │ │ └── commands │ │ │ │ ├── __init__.py │ │ │ │ ├── generate_init_json.py │ │ │ │ ├── init.py │ │ │ │ └── init_area.py │ │ ├── migrations │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── signals.py │ │ ├── tasks.py │ │ ├── tests.py │ │ ├── urls.py │ │ ├── util │ │ │ └── pca-code.json │ │ └── views │ │ │ ├── __init__.py │ │ │ ├── api_white_list.py │ │ │ ├── area.py │ │ │ ├── clause.py │ │ │ ├── dept.py │ │ │ ├── dictionary.py │ │ │ ├── download_center.py │ │ │ ├── file_list.py │ │ │ ├── login.py │ │ │ ├── login_log.py │ │ │ ├── menu.py │ │ │ ├── menu_button.py │ │ │ ├── menu_field.py │ │ │ ├── message_center.py │ │ │ ├── operation_log.py │ │ │ ├── role.py │ │ │ ├── role_menu.py │ │ │ ├── role_menu_button_permission.py │ │ │ ├── system_config.py │ │ │ └── user.py │ └── utils │ │ ├── __init__.py │ │ ├── backends.py │ │ ├── core_initialize.py │ │ ├── crud_mixin.py │ │ ├── exception.py │ │ ├── field_permission.py │ │ ├── filters.py │ │ ├── git_utils.py │ │ ├── import_export.py │ │ ├── import_export_mixin.py │ │ ├── json_response.py │ │ ├── middleware.py │ │ ├── models.py │ │ ├── pagination.py │ │ ├── permission.py │ │ ├── request_util.py │ │ ├── serializers.py │ │ ├── string_util.py │ │ ├── swagger.py │ │ ├── validator.py │ │ └── viewset.py ├── gunicorn_conf.py ├── logs │ └── __init__.py ├── main.py ├── manage.py ├── plugins │ └── __init__.py ├── requirements.txt ├── static │ ├── captcha │ │ └── fonts │ │ │ ├── COPYRIGHT.TXT │ │ │ ├── README.TXT │ │ │ └── Vera.ttf │ ├── clause │ │ └── privacy.css │ ├── drf-yasg │ │ ├── README │ │ ├── README.gz │ │ ├── immutable.js │ │ ├── immutable.js.gz │ │ ├── immutable.min.js │ │ ├── immutable.min.js.gz │ │ ├── insQ.js │ │ ├── insQ.js.gz │ │ ├── insQ.min.js │ │ ├── insQ.min.js.gz │ │ ├── redoc-init.js │ │ ├── redoc-init.js.gz │ │ ├── redoc-old │ │ │ ├── LICENSE │ │ │ ├── LICENSE.gz │ │ │ ├── redoc.min.js │ │ │ ├── redoc.min.js.gz │ │ │ ├── redoc.min.js.map │ │ │ └── redoc.min.js.map.gz │ │ ├── redoc │ │ │ ├── LICENSE │ │ │ ├── LICENSE.gz │ │ │ ├── redoc-logo.png │ │ │ ├── redoc.min.js │ │ │ ├── redoc.min.js.gz │ │ │ ├── redoc.standalone.js.map │ │ │ └── redoc.standalone.js.map.gz │ │ ├── style.css │ │ ├── style.css.gz │ │ ├── swagger-ui-dist │ │ │ ├── LICENSE │ │ │ ├── LICENSE.gz │ │ │ ├── NOTICE │ │ │ ├── absolute-path.js │ │ │ ├── absolute-path.js.gz │ │ │ ├── favicon-32x32.png │ │ │ ├── index.css │ │ │ ├── index.css.gz │ │ │ ├── index.js │ │ │ ├── index.js.gz │ │ │ ├── oauth2-redirect.html │ │ │ ├── oauth2-redirect.html.gz │ │ │ ├── swagger-initializer.js │ │ │ ├── swagger-initializer.js.gz │ │ │ ├── swagger-ui-bundle.js │ │ │ ├── swagger-ui-bundle.js.gz │ │ │ ├── swagger-ui-bundle.js.map │ │ │ ├── swagger-ui-bundle.js.map.gz │ │ │ ├── swagger-ui-es-bundle-core.js │ │ │ ├── swagger-ui-es-bundle-core.js.gz │ │ │ ├── swagger-ui-es-bundle-core.js.map │ │ │ ├── swagger-ui-es-bundle-core.js.map.gz │ │ │ ├── swagger-ui-es-bundle.js │ │ │ ├── swagger-ui-es-bundle.js.gz │ │ │ ├── swagger-ui-es-bundle.js.map │ │ │ ├── swagger-ui-es-bundle.js.map.gz │ │ │ ├── swagger-ui-standalone-preset.js │ │ │ ├── swagger-ui-standalone-preset.js.gz │ │ │ ├── swagger-ui-standalone-preset.js.map │ │ │ ├── swagger-ui-standalone-preset.js.map.gz │ │ │ ├── swagger-ui.css │ │ │ ├── swagger-ui.css.gz │ │ │ ├── swagger-ui.css.map │ │ │ ├── swagger-ui.css.map.gz │ │ │ ├── swagger-ui.js.map │ │ │ └── swagger-ui.js.map.gz │ │ ├── swagger-ui-init.js │ │ └── swagger-ui-init.js.gz │ ├── logo.icns │ └── rest_framework │ │ ├── css │ │ ├── bootstrap-theme.min.css │ │ ├── bootstrap-theme.min.css.gz │ │ ├── bootstrap-theme.min.css.map │ │ ├── bootstrap-theme.min.css.map.gz │ │ ├── bootstrap-tweaks.css │ │ ├── bootstrap-tweaks.css.gz │ │ ├── bootstrap.min.css │ │ ├── bootstrap.min.css.gz │ │ ├── bootstrap.min.css.map │ │ ├── bootstrap.min.css.map.gz │ │ ├── default.css │ │ ├── default.css.gz │ │ ├── font-awesome-4.0.3.css │ │ ├── font-awesome-4.0.3.css.gz │ │ ├── prettify.css │ │ └── prettify.css.gz │ │ ├── docs │ │ ├── css │ │ │ ├── base.css │ │ │ ├── base.css.gz │ │ │ ├── highlight.css │ │ │ ├── highlight.css.gz │ │ │ ├── jquery.json-view.min.css │ │ │ └── jquery.json-view.min.css.gz │ │ ├── img │ │ │ ├── favicon.ico │ │ │ ├── favicon.ico.gz │ │ │ └── grid.png │ │ └── js │ │ │ ├── api.js │ │ │ ├── api.js.gz │ │ │ ├── highlight.pack.js │ │ │ ├── highlight.pack.js.gz │ │ │ ├── jquery.json-view.min.js │ │ │ └── jquery.json-view.min.js.gz │ │ ├── fonts │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.svg │ │ ├── fontawesome-webfont.svg.gz │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.ttf.gz │ │ ├── fontawesome-webfont.woff │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.svg.gz │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.ttf.gz │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ │ ├── img │ │ ├── glyphicons-halflings-white.png │ │ ├── glyphicons-halflings.png │ │ └── grid.png │ │ └── js │ │ ├── ajax-form.js │ │ ├── ajax-form.js.gz │ │ ├── bootstrap.min.js │ │ ├── bootstrap.min.js.gz │ │ ├── coreapi-0.1.1.js │ │ ├── coreapi-0.1.1.js.gz │ │ ├── csrf.js │ │ ├── csrf.js.gz │ │ ├── default.js │ │ ├── default.js.gz │ │ ├── jquery-3.5.1.min.js │ │ ├── jquery-3.5.1.min.js.gz │ │ ├── prettify-min.js │ │ └── prettify-min.js.gz └── templates │ ├── clause │ └── privacy.css │ ├── drf-yasg │ ├── redoc-old.html │ ├── redoc.html │ └── swagger-ui.html │ ├── privacy.html │ ├── rest_framework │ ├── admin.html │ ├── admin │ │ ├── detail.html │ │ ├── dict_value.html │ │ ├── list.html │ │ ├── list_value.html │ │ └── simple_list_value.html │ ├── api.html │ ├── base.html │ ├── docs │ │ ├── auth │ │ │ ├── basic.html │ │ │ ├── session.html │ │ │ └── token.html │ │ ├── document.html │ │ ├── error.html │ │ ├── index.html │ │ ├── interact.html │ │ ├── langs │ │ │ ├── javascript-intro.html │ │ │ ├── javascript.html │ │ │ ├── python-intro.html │ │ │ ├── python.html │ │ │ ├── shell-intro.html │ │ │ └── shell.html │ │ ├── link.html │ │ └── sidebar.html │ ├── filters │ │ ├── base.html │ │ ├── ordering.html │ │ └── search.html │ ├── horizontal │ │ ├── checkbox.html │ │ ├── checkbox_multiple.html │ │ ├── dict_field.html │ │ ├── fieldset.html │ │ ├── form.html │ │ ├── input.html │ │ ├── list_field.html │ │ ├── list_fieldset.html │ │ ├── radio.html │ │ ├── select.html │ │ ├── select_multiple.html │ │ └── textarea.html │ ├── inline │ │ ├── checkbox.html │ │ ├── checkbox_multiple.html │ │ ├── dict_field.html │ │ ├── fieldset.html │ │ ├── form.html │ │ ├── input.html │ │ ├── list_field.html │ │ ├── list_fieldset.html │ │ ├── radio.html │ │ ├── select.html │ │ ├── select_multiple.html │ │ └── textarea.html │ ├── login.html │ ├── login_base.html │ ├── pagination │ │ ├── numbers.html │ │ └── previous_and_next.html │ ├── raw_data_form.html │ ├── schema.js │ └── vertical │ │ ├── checkbox.html │ │ ├── checkbox_multiple.html │ │ ├── dict_field.html │ │ ├── fieldset.html │ │ ├── form.html │ │ ├── input.html │ │ ├── list_field.html │ │ ├── list_fieldset.html │ │ ├── radio.html │ │ ├── select.html │ │ ├── select_multiple.html │ │ └── textarea.html │ └── terms_service.html ├── crud-gen.sh ├── docker-compose.yml ├── docker_env ├── README.md ├── celery │ └── Dockerfile ├── django │ ├── Dockerfile │ └── DockerfileBuild ├── mysql │ ├── conf.d │ │ └── my.cnf │ └── launch.sh ├── nginx │ ├── my-80.conf │ └── my.conf ├── redis │ └── redis.conf └── web │ ├── Dockerfile │ └── DockerfileBuild ├── init.sh └── web ├── .env ├── .env.development ├── .env.local_prod ├── .env.production ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── .prettierrc.js ├── LICENSE ├── README.en.md ├── README.md ├── flowH5.config.ts ├── index.html ├── package.json ├── plugins.d.ts ├── postcss.config.js ├── public └── favicon.ico ├── shim.d.ts ├── source.d.ts ├── src ├── App.vue ├── api │ ├── login │ │ └── index.ts │ └── menu │ │ └── index.ts ├── assets │ ├── iconfont │ │ ├── iconfont.css │ │ ├── iconfont.js │ │ ├── iconfont.json │ │ ├── iconfont.ttf │ │ ├── iconfont.woff │ │ └── iconfont.woff2 │ ├── img │ │ ├── headerImage.png │ │ ├── menu-tree-head-icon.png │ │ ├── menu-tree-hidden-icon.png │ │ └── menu-tree-show-icon.png │ ├── login-bg.png │ ├── login-bg.svg │ ├── login-icon-two.svg │ ├── login-main.svg │ ├── logo-mini.svg │ └── style │ │ ├── reset.scss │ │ └── tailwind.css ├── components │ ├── auth │ │ ├── auth.vue │ │ ├── authAll.vue │ │ └── auths.vue │ ├── avatarSelector │ │ └── index.vue │ ├── calendar │ │ └── index.vue │ ├── cropper │ │ └── index.vue │ ├── dept-format │ │ └── index.vue │ ├── dvaSelect │ │ └── index.vue │ ├── editor │ │ ├── index.vue │ │ └── toolbar.ts │ ├── fileSelector │ │ ├── fileItem.vue │ │ ├── index.vue │ │ └── types.ts │ ├── foreignKey │ │ └── index.vue │ ├── iconSelector │ │ ├── index.vue │ │ └── list.vue │ ├── importExcel │ │ └── index.vue │ ├── manyToMany │ │ └── index.vue │ ├── noticeBar │ │ └── index.vue │ ├── svgIcon │ │ └── index.vue │ ├── table │ │ └── index.vue │ └── tableSelector │ │ └── index.vue ├── directive │ ├── authDirective.ts │ ├── customDirective.ts │ ├── index.ts │ └── sizeDirective.ts ├── i18n │ ├── index.ts │ ├── lang │ │ ├── en.ts │ │ ├── zh-cn.ts │ │ └── zh-tw.ts │ └── pages │ │ ├── formI18n │ │ ├── en.ts │ │ ├── zh-cn.ts │ │ └── zh-tw.ts │ │ └── login │ │ ├── en.ts │ │ ├── zh-cn.ts │ │ └── zh-tw.ts ├── layout │ ├── component │ │ ├── aside.vue │ │ ├── columnsAside.vue │ │ ├── header.vue │ │ └── main.vue │ ├── footer │ │ └── index.vue │ ├── index.vue │ ├── lockScreen │ │ └── index.vue │ ├── logo │ │ └── index.vue │ ├── main │ │ ├── classic.vue │ │ ├── columns.vue │ │ ├── defaults.vue │ │ └── transverse.vue │ ├── navBars │ │ ├── breadcrumb │ │ │ ├── breadcrumb.vue │ │ │ ├── closeFull.vue │ │ │ ├── index.vue │ │ │ ├── search.vue │ │ │ ├── setings.vue │ │ │ ├── user.vue │ │ │ └── userNews.vue │ │ ├── index.vue │ │ └── tagsView │ │ │ ├── contextmenu.vue │ │ │ └── tagsView.vue │ ├── navMenu │ │ ├── horizontal.vue │ │ ├── subItem.vue │ │ └── vertical.vue │ ├── routerView │ │ ├── iframes.vue │ │ ├── link.vue │ │ └── parent.vue │ └── upgrade │ │ └── index.vue ├── main.ts ├── plugin │ └── permission │ │ ├── directive.permission.ts │ │ ├── func.permission.ts │ │ ├── index.ts │ │ └── store.permission.ts ├── router │ ├── backEnd.ts │ ├── frontEnd.ts │ ├── index.ts │ └── route.ts ├── settings.ts ├── stores │ ├── btnPermission.ts │ ├── columnPermission.ts │ ├── dictionary.ts │ ├── frontendMenu.ts │ ├── index.ts │ ├── interface │ │ └── index.ts │ ├── keepAliveNames.ts │ ├── messageCenter.ts │ ├── modules │ │ └── dept.ts │ ├── requestOldRoutes.ts │ ├── routesList.ts │ ├── systemConfig.ts │ ├── tagsViewRoutes.ts │ ├── themeConfig.ts │ └── userInfo.ts ├── theme │ ├── app.scss │ ├── common │ │ └── transition.scss │ ├── dark.scss │ ├── element.scss │ ├── fa │ │ ├── css │ │ │ └── font-awesome.min.css │ │ └── fonts │ │ │ ├── FontAwesome.otf │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.svg │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ └── fontawesome-webfont.woff2 │ ├── fastCrud.scss │ ├── iconSelector.scss │ ├── index.scss │ ├── loading.scss │ ├── media │ │ ├── chart.scss │ │ ├── cityLinkage.scss │ │ ├── date.scss │ │ ├── dialog.scss │ │ ├── error.scss │ │ ├── form.scss │ │ ├── home.scss │ │ ├── index.scss │ │ ├── layout.scss │ │ ├── login.scss │ │ ├── media.scss │ │ ├── pagination.scss │ │ ├── personal.scss │ │ ├── scrollbar.scss │ │ └── tagsView.scss │ ├── mixins │ │ └── index.scss │ ├── other.scss │ ├── tableTool.scss │ └── waves.scss ├── types │ ├── axios.d.ts │ ├── global.d.ts │ ├── layout.d.ts │ ├── mitt.d.ts │ ├── pinia.d.ts │ └── views.d.ts ├── utils │ ├── arrayOperation.ts │ ├── authFunction.ts │ ├── baseUrl.ts │ ├── columnPermission.ts │ ├── commonCrud.ts │ ├── commonFunction.ts │ ├── cores.tsx │ ├── dictionary.ts │ ├── formatTime.ts │ ├── getStyleSheets.ts │ ├── loading.ts │ ├── menu.ts │ ├── message.ts │ ├── mitt.ts │ ├── other.ts │ ├── request.ts │ ├── service.ts │ ├── setIconfont.ts │ ├── storage.ts │ ├── theme.ts │ ├── tools.ts │ ├── toolsValidate.ts │ ├── upgrade.ts │ ├── wartermark.ts │ └── websocket.ts └── views │ ├── interface │ └── index.ts │ ├── plugins │ └── index.ts │ ├── system │ ├── areas │ │ ├── api.ts │ │ ├── crud.tsx │ │ └── index.vue │ ├── columns │ │ ├── api.ts │ │ ├── components │ │ │ ├── ColumnsFormCom │ │ │ │ └── index.vue │ │ │ ├── ColumnsTableCom │ │ │ │ ├── api.ts │ │ │ │ └── index.vue │ │ │ └── ItemCom │ │ │ │ ├── index.vue │ │ │ │ └── types.ts │ │ ├── index.vue │ │ └── types.ts │ ├── config │ │ ├── api.ts │ │ ├── components │ │ │ ├── addContent.vue │ │ │ ├── addTabs.vue │ │ │ ├── components │ │ │ │ ├── associationTable.vue │ │ │ │ └── crudTable.vue │ │ │ └── formContent.vue │ │ └── index.vue │ ├── demo │ │ ├── api.ts │ │ ├── crud.tsx │ │ └── index.vue │ ├── dept │ │ ├── api.ts │ │ ├── components │ │ │ ├── DeptFormCom │ │ │ │ └── index.vue │ │ │ ├── DeptTreeCom │ │ │ │ └── index.vue │ │ │ └── DeptUserCom │ │ │ │ ├── api.ts │ │ │ │ ├── crud.tsx │ │ │ │ └── index.vue │ │ ├── index.vue │ │ └── types.ts │ ├── dictionary │ │ ├── api.ts │ │ ├── crud.tsx │ │ ├── index.vue │ │ └── subDict │ │ │ ├── api.ts │ │ │ ├── crud.tsx │ │ │ └── index.vue │ ├── downloadCenter │ │ ├── api.ts │ │ ├── crud.tsx │ │ └── index.vue │ ├── error │ │ ├── 401.vue │ │ ├── 404.vue │ │ └── img404.png │ ├── fileList │ │ ├── api.ts │ │ ├── crud.tsx │ │ └── index.vue │ ├── home │ │ └── index.vue │ ├── log │ │ ├── loginLog │ │ │ ├── api.ts │ │ │ ├── crud.tsx │ │ │ └── index.vue │ │ └── operationLog │ │ │ ├── api.ts │ │ │ ├── crud.tsx │ │ │ └── index.vue │ ├── login │ │ ├── api.ts │ │ ├── component │ │ │ ├── account.vue │ │ │ ├── changePwd.vue │ │ │ ├── mobile.vue │ │ │ └── scan.vue │ │ └── index.vue │ ├── menu │ │ ├── api.ts │ │ ├── components │ │ │ ├── MenuButtonCom │ │ │ │ ├── api.ts │ │ │ │ ├── crud.tsx │ │ │ │ └── index.vue │ │ │ ├── MenuFieldCom │ │ │ │ ├── api.ts │ │ │ │ ├── crud.tsx │ │ │ │ └── index.vue │ │ │ ├── MenuFormCom │ │ │ │ └── index.vue │ │ │ └── MenuTreeCom │ │ │ │ └── index.vue │ │ ├── index.vue │ │ └── types.ts │ ├── messageCenter │ │ ├── api.ts │ │ ├── crud.tsx │ │ └── index.vue │ ├── personal │ │ ├── api.ts │ │ └── index.vue │ ├── role │ │ ├── api.ts │ │ ├── components │ │ │ ├── RoleDrawer.vue │ │ │ ├── RoleMenuBtn.vue │ │ │ ├── RoleMenuField.vue │ │ │ ├── RoleMenuTree.vue │ │ │ ├── RoleUsers.vue │ │ │ ├── addUsers │ │ │ │ ├── api.ts │ │ │ │ ├── crud.tsx │ │ │ │ └── index.vue │ │ │ ├── api.ts │ │ │ └── searchUsers │ │ │ │ ├── api.ts │ │ │ │ ├── crud.tsx │ │ │ │ └── index.vue │ │ ├── crud.tsx │ │ ├── index.vue │ │ ├── stores │ │ │ ├── RoleDrawerStores.ts │ │ │ ├── RoleMenuBtnStores.ts │ │ │ ├── RoleMenuFieldStores.ts │ │ │ ├── RoleMenuTreeStores.ts │ │ │ ├── RoleUserStores.ts │ │ │ └── RoleUsersStores.ts │ │ └── types.ts │ ├── user │ │ ├── api.ts │ │ ├── crud.tsx │ │ └── index.vue │ └── whiteList │ │ ├── api.ts │ │ ├── crud.tsx │ │ └── index.vue │ └── template │ ├── api.ts │ ├── crud.tsx │ └── index.vue ├── tailwind.config.js ├── tsconfig.json └── vite.config.ts /.gitattributes: -------------------------------------------------------------------------------- 1 | *.css linguist-language=Python 2 | *.less linguist-language=Python 3 | *.js linguist-language=Python 4 | *.html linguist-language=Python 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /backend/venv 2 | /backend/.idea 3 | .idea 4 | 5 | .history/ 6 | .vscode/ 7 | web/package-lock.json -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Django-Vue3-Admin 更新日志 2 | 3 | ## 正式发布v3.0.0版本 4 | ### 1.新增:列权限管理与授权; 5 | ### 2.新增:代码新版本发布后,进行升级提醒; 6 | ### 3.优化:角色管理中按钮权限的操作; 7 | ### 4.优化:websocket 连接状态显示; 8 | ### 5.优化:初始化获取系统配置与字典配置,进行动态渲染登录页面; 9 | ### 6.修复:登录页面中系统配置不生效问题; 10 | ### 7.其他优化 -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2021 李强 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. -------------------------------------------------------------------------------- /backend/application/__init__.py: -------------------------------------------------------------------------------- 1 | # This will make sure the app is always imported when 2 | # Django starts so that shared_task will use this app. 3 | from .celery import app as celery_app 4 | 5 | __all__ = ('celery_app',) -------------------------------------------------------------------------------- /backend/application/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for application project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | from channels.auth import AuthMiddlewareStack 12 | from channels.security.websocket import AllowedHostsOriginValidator 13 | from channels.routing import ProtocolTypeRouter, URLRouter 14 | from django.core.asgi import get_asgi_application 15 | 16 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'application.settings') 17 | os.environ["DJANGO_ALLOW_ASYNC_UNSAFE"] = "true" 18 | 19 | http_application = get_asgi_application() 20 | 21 | from application.routing import websocket_urlpatterns 22 | 23 | application = ProtocolTypeRouter({ 24 | "http": http_application, 25 | 'websocket': AllowedHostsOriginValidator( 26 | AuthMiddlewareStack( 27 | URLRouter( 28 | websocket_urlpatterns # 指明路由文件是devops/routing.py 29 | ) 30 | ) 31 | ), 32 | }) 33 | -------------------------------------------------------------------------------- /backend/application/routing.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from django.urls import path 3 | from application.websocketConfig import MegCenter 4 | 5 | websocket_urlpatterns = [ 6 | path('ws//', MegCenter.as_asgi()), # consumers.DvadminWebSocket 是该路由的消费者 7 | ] 8 | -------------------------------------------------------------------------------- /backend/application/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for backend project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'application.settings') 15 | os.environ["DJANGO_ALLOW_ASYNC_UNSAFE"] = "true" 16 | 17 | application = get_wsgi_application() 18 | -------------------------------------------------------------------------------- /backend/del_migrations.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | import os 4 | 5 | exclude = ["venv"] # 需要排除的文件目录 6 | for root, dirs, files in os.walk('.'): 7 | dirs[:] = list(set(dirs) - set(exclude)) 8 | if 'migrations' in dirs: 9 | dir = dirs[dirs.index('migrations')] 10 | for root_j, dirs_j, files_j in os.walk(os.path.join(root, dir)): 11 | for file_k in files_j: 12 | if file_k != '__init__.py': 13 | dst_file = os.path.join(root_j, file_k) 14 | print('删除文件>>> ', dst_file) 15 | os.remove(dst_file) -------------------------------------------------------------------------------- /backend/docker_start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # python manage.py makemigrations 3 | # python manage.py migrate 4 | # python manage.py init -y 5 | uvicorn application.asgi:application --port 8000 --host 0.0.0.0 --workers 4 6 | -------------------------------------------------------------------------------- /backend/dvadmin/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /backend/dvadmin/system/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/dvadmin/system/__init__.py -------------------------------------------------------------------------------- /backend/dvadmin/system/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /backend/dvadmin/system/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class SystemConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'dvadmin.system' 7 | -------------------------------------------------------------------------------- /backend/dvadmin/system/fixtures/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/dvadmin/system/fixtures/__init__.py -------------------------------------------------------------------------------- /backend/dvadmin/system/fixtures/init_apiwhitelist.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "url": "/api/system/dept_lazy_tree/", 4 | "method": 0, 5 | "enable_datasource": true 6 | } 7 | ] -------------------------------------------------------------------------------- /backend/dvadmin/system/fixtures/init_dept.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "DVAdmin团队", 4 | "key": "dvadmin", 5 | "sort": 1, 6 | "owner": "", 7 | "phone": "", 8 | "email": "", 9 | "status": true, 10 | "parent": null, 11 | "children": [ 12 | { 13 | "name": "运营部", 14 | "key": "", 15 | "sort": 2, 16 | "owner": "", 17 | "phone": "", 18 | "email": "", 19 | "status": true, 20 | "parent": 1, 21 | "children": [] 22 | }, 23 | { 24 | "name": "技术部", 25 | "key": "technology", 26 | "sort": 1, 27 | "owner": "", 28 | "phone": "", 29 | "email": "", 30 | "status": true, 31 | "parent": 3, 32 | "children": [] 33 | } 34 | ] 35 | } 36 | ] 37 | -------------------------------------------------------------------------------- /backend/dvadmin/system/fixtures/init_role.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "管理员", 4 | "key": "admin", 5 | "sort": 1, 6 | "status": true, 7 | "remark": null 8 | }, 9 | { 10 | "name": "用户", 11 | "key": "public", 12 | "sort": 2, 13 | "status": true, 14 | "remark": null 15 | } 16 | ] 17 | -------------------------------------------------------------------------------- /backend/dvadmin/system/fixtures/init_rolemenubuttonpermission.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "role__key": "admin", 4 | "menu_button__value": "menu:Search", 5 | "data_range": 0 6 | } 7 | ] 8 | -------------------------------------------------------------------------------- /backend/dvadmin/system/fixtures/init_rolemenupermission.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "role__key": "admin", 4 | "menu__web_path": "/system", 5 | "menu__component_name": "" 6 | }, 7 | { 8 | "role__key": "admin", 9 | "menu__web_path": "/menu", 10 | "menu__component_name": "menu" 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /backend/dvadmin/system/management/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/dvadmin/system/management/__init__.py -------------------------------------------------------------------------------- /backend/dvadmin/system/management/commands/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/dvadmin/system/management/commands/__init__.py -------------------------------------------------------------------------------- /backend/dvadmin/system/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/dvadmin/system/migrations/__init__.py -------------------------------------------------------------------------------- /backend/dvadmin/system/signals.py: -------------------------------------------------------------------------------- 1 | from django.dispatch import Signal 2 | # 初始化信号 3 | pre_init_complete = Signal() 4 | detail_init_complete = Signal() 5 | post_init_complete = Signal() 6 | # 租户初始化信号 7 | pre_tenants_init_complete = Signal() 8 | detail_tenants_init_complete = Signal() 9 | post_tenants_init_complete = Signal() 10 | post_tenants_all_init_complete = Signal() 11 | # 租户创建完成信号 12 | tenants_create_complete = Signal() 13 | -------------------------------------------------------------------------------- /backend/dvadmin/system/views/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/dvadmin/system/views/__init__.py -------------------------------------------------------------------------------- /backend/dvadmin/system/views/api_white_list.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | @author: 猿小天 5 | @contact: QQ:1638245306 6 | @Created on: 2022/1/1 001 9:34 7 | @Remark: 8 | """ 9 | from dvadmin.system.models import ApiWhiteList 10 | from dvadmin.utils.serializers import CustomModelSerializer 11 | from dvadmin.utils.viewset import CustomModelViewSet 12 | 13 | 14 | class ApiWhiteListSerializer(CustomModelSerializer): 15 | """ 16 | 接口白名单-序列化器 17 | """ 18 | 19 | class Meta: 20 | model = ApiWhiteList 21 | fields = "__all__" 22 | read_only_fields = ["id"] 23 | 24 | 25 | 26 | 27 | 28 | class ApiWhiteListViewSet(CustomModelViewSet): 29 | """ 30 | 接口白名单 31 | list:查询 32 | create:新增 33 | update:修改 34 | retrieve:单例 35 | destroy:删除 36 | """ 37 | queryset = ApiWhiteList.objects.all() 38 | serializer_class = ApiWhiteListSerializer 39 | # permission_classes = [] 40 | -------------------------------------------------------------------------------- /backend/dvadmin/system/views/clause.py: -------------------------------------------------------------------------------- 1 | from rest_framework.views import APIView 2 | from django.shortcuts import render 3 | 4 | 5 | class PrivacyView(APIView): 6 | """ 7 | 后台隐私政策 8 | """ 9 | permission_classes = [] 10 | 11 | def get(self, request, *args, **kwargs): 12 | return render(request, 'privacy.html') 13 | 14 | 15 | 16 | class TermsServiceView(APIView): 17 | """ 18 | 后台服务条款 19 | """ 20 | permission_classes = [] 21 | 22 | def get(self, request, *args, **kwargs): 23 | return render(request, 'terms_service.html') 24 | -------------------------------------------------------------------------------- /backend/dvadmin/system/views/login_log.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | @author: 猿小天 5 | @contact: QQ:1638245306 6 | @Created on: 2021/6/3 003 0:30 7 | @Remark: 按钮权限管理 8 | """ 9 | from dvadmin.system.models import LoginLog 10 | from dvadmin.utils.field_permission import FieldPermissionMixin 11 | from dvadmin.utils.serializers import CustomModelSerializer 12 | from dvadmin.utils.viewset import CustomModelViewSet 13 | 14 | 15 | class LoginLogSerializer(CustomModelSerializer): 16 | """ 17 | 登录日志权限-序列化器 18 | """ 19 | 20 | class Meta: 21 | model = LoginLog 22 | fields = "__all__" 23 | read_only_fields = ["id"] 24 | 25 | 26 | class LoginLogViewSet(CustomModelViewSet, FieldPermissionMixin): 27 | """ 28 | 登录日志接口 29 | list:查询 30 | create:新增 31 | update:修改 32 | retrieve:单例 33 | destroy:删除 34 | """ 35 | queryset = LoginLog.objects.all() 36 | serializer_class = LoginLogSerializer 37 | # extra_filter_class = [] 38 | -------------------------------------------------------------------------------- /backend/dvadmin/system/views/operation_log.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | @author: 李强 5 | @contact: QQ:1206709430 6 | @Created on: 2021/6/8 003 0:30 7 | @Remark: 操作日志管理 8 | """ 9 | 10 | from dvadmin.system.models import OperationLog 11 | from dvadmin.utils.serializers import CustomModelSerializer 12 | from dvadmin.utils.viewset import CustomModelViewSet 13 | 14 | 15 | class OperationLogSerializer(CustomModelSerializer): 16 | """ 17 | 日志-序列化器 18 | """ 19 | 20 | class Meta: 21 | model = OperationLog 22 | fields = "__all__" 23 | read_only_fields = ["id"] 24 | 25 | 26 | class OperationLogCreateUpdateSerializer(CustomModelSerializer): 27 | """ 28 | 操作日志 创建/更新时的列化器 29 | """ 30 | 31 | class Meta: 32 | model = OperationLog 33 | fields = '__all__' 34 | 35 | 36 | class OperationLogViewSet(CustomModelViewSet): 37 | """ 38 | 操作日志接口 39 | list:查询 40 | create:新增 41 | update:修改 42 | retrieve:单例 43 | destroy:删除 44 | """ 45 | queryset = OperationLog.objects.order_by('-create_datetime') 46 | serializer_class = OperationLogSerializer 47 | # permission_classes = [] 48 | -------------------------------------------------------------------------------- /backend/dvadmin/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/dvadmin/utils/__init__.py -------------------------------------------------------------------------------- /backend/dvadmin/utils/string_util.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | @author: 猿小天 5 | @contact: QQ:1638245306 6 | @Created on: 2021/8/21 021 9:48 7 | @Remark: 8 | """ 9 | import hashlib 10 | import random 11 | 12 | CHAR_SET = ("2", "3", "4", "5", 13 | "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", 14 | "J", "K", "L", "M", "N", "P", "Q", "R", "S", "T", "U", "V", 15 | "W", "X", "Y", "Z") 16 | 17 | 18 | def random_str(number=16): 19 | """ 20 | 返回特定长度的随机字符串(非进制) 21 | :return: 22 | """ 23 | result = "" 24 | for i in range(0, number): 25 | inx = random.randint(0, len(CHAR_SET) - 1) 26 | result += CHAR_SET[inx] 27 | return result 28 | 29 | 30 | def has_md5(str, salt='123456'): 31 | """ 32 | md5 加密 33 | :param str: 34 | :param salt: 35 | :return: 36 | """ 37 | # satl是盐值,默认是123456 38 | str = str + salt 39 | md = hashlib.md5() # 构造一个md5对象 40 | md.update(str.encode()) 41 | res = md.hexdigest() 42 | return res 43 | -------------------------------------------------------------------------------- /backend/logs/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/logs/__init__.py -------------------------------------------------------------------------------- /backend/main.py: -------------------------------------------------------------------------------- 1 | import multiprocessing 2 | import os 3 | import sys 4 | 5 | root_path = os.getcwd() 6 | sys.path.append(root_path) 7 | import uvicorn 8 | from application.settings import LOGGING 9 | 10 | if __name__ == '__main__': 11 | multiprocessing.freeze_support() 12 | workers = 4 13 | if os.sys.platform.startswith('win'): 14 | # Windows操作系统 15 | workers = None 16 | uvicorn.run("application.asgi:application", reload=False, host="0.0.0.0", port=8000, workers=workers, 17 | log_config=LOGGING) 18 | -------------------------------------------------------------------------------- /backend/manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """Django's command-line utility for administrative tasks.""" 3 | import os 4 | import sys 5 | 6 | 7 | def main(): 8 | """Run administrative tasks.""" 9 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'application.settings') 10 | try: 11 | from django.core.management import execute_from_command_line 12 | except ImportError as exc: 13 | raise ImportError( 14 | "Couldn't import Django. Are you sure it's installed and " 15 | "available on your PYTHONPATH environment variable? Did you " 16 | "forget to activate a virtual environment?" 17 | ) from exc 18 | execute_from_command_line(sys.argv) 19 | 20 | 21 | if __name__ == '__main__': 22 | main() 23 | -------------------------------------------------------------------------------- /backend/plugins/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /backend/requirements.txt: -------------------------------------------------------------------------------- 1 | Django==4.2.14 2 | django-comment-migrate==0.1.7 3 | django-cors-headers==4.4.0 4 | django-filter==24.2 5 | django-ranged-response==0.2.0 6 | djangorestframework==3.15.2 7 | django-restql==0.15.4 8 | django-simple-captcha==0.6.0 9 | django-timezone-field==7.0 10 | djangorestframework-simplejwt==5.3.1 11 | drf-yasg==1.21.7 12 | mysqlclient==2.2.0 13 | pypinyin==0.51.0 14 | ua-parser==0.18.0 15 | pyparsing==3.1.2 16 | openpyxl==3.1.5 17 | requests==2.32.3 18 | typing-extensions==4.12.2 19 | tzlocal==5.2 20 | channels==4.1.0 21 | channels-redis==4.2.0 22 | websockets==11.0.3 23 | user-agents==2.2.0 24 | six==1.16.0 25 | whitenoise==6.7.0 26 | psycopg2==2.9.9 27 | uvicorn==0.30.3 28 | gunicorn==22.0.0 29 | gevent==24.2.1 30 | Pillow==10.4.0 31 | pyinstaller==6.9.0 32 | dvadmin3-celery==3.1.6 -------------------------------------------------------------------------------- /backend/static/captcha/fonts/README.TXT: -------------------------------------------------------------------------------- 1 | Contained herin is the Bitstream Vera font family. 2 | 3 | The Copyright information is found in the COPYRIGHT.TXT file (along 4 | with being incorporated into the fonts themselves). 5 | 6 | The releases notes are found in the file "RELEASENOTES.TXT". 7 | 8 | We hope you enjoy Vera! 9 | 10 | Bitstream, Inc. 11 | The Gnome Project 12 | -------------------------------------------------------------------------------- /backend/static/captcha/fonts/Vera.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/captcha/fonts/Vera.ttf -------------------------------------------------------------------------------- /backend/static/drf-yasg/README: -------------------------------------------------------------------------------- 1 | Information about external resources 2 | 3 | The following files are taken from external resources or trees. 4 | 5 | Files: insQ.js 6 | insQ.min.js 7 | License: MIT 8 | Copyright: Zbyszek Tenerowicz 9 | Eryk Napierała 10 | Askar Yusupov 11 | Dan Dascalescu 12 | Source: https://github.com/naugtur/insertionQuery v1.0.3 13 | 14 | Files: immutable.js 15 | immutable.min.js 16 | License: MIT 17 | Copyright: 2014-present, Facebook, Inc 18 | Source: https://github.com/immutable-js/immutable-js/releases/tag/v3.8.2 19 | -------------------------------------------------------------------------------- /backend/static/drf-yasg/README.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/drf-yasg/README.gz -------------------------------------------------------------------------------- /backend/static/drf-yasg/immutable.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/drf-yasg/immutable.js.gz -------------------------------------------------------------------------------- /backend/static/drf-yasg/immutable.min.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/drf-yasg/immutable.min.js.gz -------------------------------------------------------------------------------- /backend/static/drf-yasg/insQ.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/drf-yasg/insQ.js.gz -------------------------------------------------------------------------------- /backend/static/drf-yasg/insQ.min.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/drf-yasg/insQ.min.js.gz -------------------------------------------------------------------------------- /backend/static/drf-yasg/redoc-init.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/drf-yasg/redoc-init.js.gz -------------------------------------------------------------------------------- /backend/static/drf-yasg/redoc-old/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015, Rebilly, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /backend/static/drf-yasg/redoc-old/LICENSE.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/drf-yasg/redoc-old/LICENSE.gz -------------------------------------------------------------------------------- /backend/static/drf-yasg/redoc-old/redoc.min.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/drf-yasg/redoc-old/redoc.min.js.gz -------------------------------------------------------------------------------- /backend/static/drf-yasg/redoc-old/redoc.min.js.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /backend/static/drf-yasg/redoc-old/redoc.min.js.map.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/drf-yasg/redoc-old/redoc.min.js.map.gz -------------------------------------------------------------------------------- /backend/static/drf-yasg/redoc/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015-present, Rebilly, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /backend/static/drf-yasg/redoc/LICENSE.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/drf-yasg/redoc/LICENSE.gz -------------------------------------------------------------------------------- /backend/static/drf-yasg/redoc/redoc-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/drf-yasg/redoc/redoc-logo.png -------------------------------------------------------------------------------- /backend/static/drf-yasg/redoc/redoc.min.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/drf-yasg/redoc/redoc.min.js.gz -------------------------------------------------------------------------------- /backend/static/drf-yasg/redoc/redoc.standalone.js.map.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/drf-yasg/redoc/redoc.standalone.js.map.gz -------------------------------------------------------------------------------- /backend/static/drf-yasg/style.css: -------------------------------------------------------------------------------- 1 | html { 2 | box-sizing: border-box; 3 | overflow: -moz-scrollbars-vertical; 4 | overflow-y: scroll; 5 | } 6 | 7 | *, 8 | *:before, 9 | *:after { 10 | box-sizing: inherit; 11 | } 12 | 13 | body { 14 | margin: 0; 15 | padding: 0; 16 | } 17 | 18 | body.swagger-body { 19 | background: #fafafa; 20 | } 21 | 22 | .hidden { 23 | display: none; 24 | } 25 | 26 | #django-session-auth > div { 27 | display: inline-block; 28 | } 29 | 30 | #django-session-auth .btn.authorize { 31 | padding: 10px 23px; 32 | } 33 | 34 | #django-session-auth .btn.authorize a { 35 | color: #49cc90; 36 | text-decoration: none; 37 | } 38 | 39 | #django-session-auth .hello { 40 | margin-right: 5px; 41 | } 42 | 43 | #django-session-auth .hello .django-session { 44 | font-weight: bold; 45 | } 46 | 47 | .label { 48 | display: inline; 49 | padding: .2em .6em .3em; 50 | font-weight: 700; 51 | line-height: 1; 52 | color: #fff; 53 | text-align: center; 54 | white-space: nowrap; 55 | vertical-align: baseline; 56 | border-radius: .25em; 57 | } 58 | 59 | .label-primary { 60 | background-color: #337ab7; 61 | } 62 | 63 | .divider { 64 | margin-right: 8px; 65 | background: #16222c44; 66 | width: 2px; 67 | } 68 | 69 | svg.swagger-defs { 70 | position: absolute; 71 | width: 0; 72 | height: 0; 73 | } 74 | -------------------------------------------------------------------------------- /backend/static/drf-yasg/style.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/drf-yasg/style.css.gz -------------------------------------------------------------------------------- /backend/static/drf-yasg/swagger-ui-dist/LICENSE.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/drf-yasg/swagger-ui-dist/LICENSE.gz -------------------------------------------------------------------------------- /backend/static/drf-yasg/swagger-ui-dist/NOTICE: -------------------------------------------------------------------------------- 1 | swagger-ui 2 | Copyright 2020-2021 SmartBear Software Inc. 3 | -------------------------------------------------------------------------------- /backend/static/drf-yasg/swagger-ui-dist/absolute-path.js: -------------------------------------------------------------------------------- 1 | /* 2 | * getAbsoluteFSPath 3 | * @return {string} When run in NodeJS env, returns the absolute path to the current directory 4 | * When run outside of NodeJS, will return an error message 5 | */ 6 | const getAbsoluteFSPath = function () { 7 | // detect whether we are running in a browser or nodejs 8 | if (typeof module !== "undefined" && module.exports) { 9 | return require("path").resolve(__dirname) 10 | } 11 | throw new Error('getAbsoluteFSPath can only be called within a Nodejs environment'); 12 | } 13 | 14 | module.exports = getAbsoluteFSPath 15 | -------------------------------------------------------------------------------- /backend/static/drf-yasg/swagger-ui-dist/absolute-path.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/drf-yasg/swagger-ui-dist/absolute-path.js.gz -------------------------------------------------------------------------------- /backend/static/drf-yasg/swagger-ui-dist/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/drf-yasg/swagger-ui-dist/favicon-32x32.png -------------------------------------------------------------------------------- /backend/static/drf-yasg/swagger-ui-dist/index.css: -------------------------------------------------------------------------------- 1 | html { 2 | box-sizing: border-box; 3 | overflow: -moz-scrollbars-vertical; 4 | overflow-y: scroll; 5 | } 6 | 7 | *, 8 | *:before, 9 | *:after { 10 | box-sizing: inherit; 11 | } 12 | 13 | body { 14 | margin: 0; 15 | background: #fafafa; 16 | } 17 | -------------------------------------------------------------------------------- /backend/static/drf-yasg/swagger-ui-dist/index.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/drf-yasg/swagger-ui-dist/index.css.gz -------------------------------------------------------------------------------- /backend/static/drf-yasg/swagger-ui-dist/index.js: -------------------------------------------------------------------------------- 1 | try { 2 | module.exports.SwaggerUIBundle = require("./swagger-ui-bundle.js") 3 | module.exports.SwaggerUIStandalonePreset = require("./swagger-ui-standalone-preset.js") 4 | } catch(e) { 5 | // swallow the error if there's a problem loading the assets. 6 | // allows this module to support providing the assets for browserish contexts, 7 | // without exploding in a Node context. 8 | // 9 | // see https://github.com/swagger-api/swagger-ui/issues/3291#issuecomment-311195388 10 | // for more information. 11 | } 12 | 13 | // `absolutePath` and `getAbsoluteFSPath` are both here because at one point, 14 | // we documented having one and actually implemented the other. 15 | // They were both retained so we don't break anyone's code. 16 | module.exports.absolutePath = require("./absolute-path.js") 17 | module.exports.getAbsoluteFSPath = require("./absolute-path.js") 18 | -------------------------------------------------------------------------------- /backend/static/drf-yasg/swagger-ui-dist/index.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/drf-yasg/swagger-ui-dist/index.js.gz -------------------------------------------------------------------------------- /backend/static/drf-yasg/swagger-ui-dist/oauth2-redirect.html.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/drf-yasg/swagger-ui-dist/oauth2-redirect.html.gz -------------------------------------------------------------------------------- /backend/static/drf-yasg/swagger-ui-dist/swagger-initializer.js: -------------------------------------------------------------------------------- 1 | window.onload = function() { 2 | // 3 | 4 | // the following lines will be replaced by docker/configurator, when it runs in a docker-container 5 | window.ui = SwaggerUIBundle({ 6 | url: "https://petstore.swagger.io/v2/swagger.json", 7 | dom_id: '#swagger-ui', 8 | deepLinking: true, 9 | presets: [ 10 | SwaggerUIBundle.presets.apis, 11 | SwaggerUIStandalonePreset 12 | ], 13 | plugins: [ 14 | SwaggerUIBundle.plugins.DownloadUrl 15 | ], 16 | layout: "StandaloneLayout" 17 | }); 18 | 19 | // 20 | }; 21 | -------------------------------------------------------------------------------- /backend/static/drf-yasg/swagger-ui-dist/swagger-initializer.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/drf-yasg/swagger-ui-dist/swagger-initializer.js.gz -------------------------------------------------------------------------------- /backend/static/drf-yasg/swagger-ui-dist/swagger-ui-bundle.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/drf-yasg/swagger-ui-dist/swagger-ui-bundle.js.gz -------------------------------------------------------------------------------- /backend/static/drf-yasg/swagger-ui-dist/swagger-ui-bundle.js.map.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/drf-yasg/swagger-ui-dist/swagger-ui-bundle.js.map.gz -------------------------------------------------------------------------------- /backend/static/drf-yasg/swagger-ui-dist/swagger-ui-es-bundle-core.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/drf-yasg/swagger-ui-dist/swagger-ui-es-bundle-core.js.gz -------------------------------------------------------------------------------- /backend/static/drf-yasg/swagger-ui-dist/swagger-ui-es-bundle-core.js.map.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/drf-yasg/swagger-ui-dist/swagger-ui-es-bundle-core.js.map.gz -------------------------------------------------------------------------------- /backend/static/drf-yasg/swagger-ui-dist/swagger-ui-es-bundle.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/drf-yasg/swagger-ui-dist/swagger-ui-es-bundle.js.gz -------------------------------------------------------------------------------- /backend/static/drf-yasg/swagger-ui-dist/swagger-ui-es-bundle.js.map.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/drf-yasg/swagger-ui-dist/swagger-ui-es-bundle.js.map.gz -------------------------------------------------------------------------------- /backend/static/drf-yasg/swagger-ui-dist/swagger-ui-standalone-preset.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/drf-yasg/swagger-ui-dist/swagger-ui-standalone-preset.js.gz -------------------------------------------------------------------------------- /backend/static/drf-yasg/swagger-ui-dist/swagger-ui-standalone-preset.js.map.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/drf-yasg/swagger-ui-dist/swagger-ui-standalone-preset.js.map.gz -------------------------------------------------------------------------------- /backend/static/drf-yasg/swagger-ui-dist/swagger-ui.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/drf-yasg/swagger-ui-dist/swagger-ui.css.gz -------------------------------------------------------------------------------- /backend/static/drf-yasg/swagger-ui-dist/swagger-ui.css.map.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/drf-yasg/swagger-ui-dist/swagger-ui.css.map.gz -------------------------------------------------------------------------------- /backend/static/drf-yasg/swagger-ui-dist/swagger-ui.js.map.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/drf-yasg/swagger-ui-dist/swagger-ui.js.map.gz -------------------------------------------------------------------------------- /backend/static/drf-yasg/swagger-ui-init.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/drf-yasg/swagger-ui-init.js.gz -------------------------------------------------------------------------------- /backend/static/logo.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/logo.icns -------------------------------------------------------------------------------- /backend/static/rest_framework/css/bootstrap-theme.min.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/rest_framework/css/bootstrap-theme.min.css.gz -------------------------------------------------------------------------------- /backend/static/rest_framework/css/bootstrap-theme.min.css.map.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/rest_framework/css/bootstrap-theme.min.css.map.gz -------------------------------------------------------------------------------- /backend/static/rest_framework/css/bootstrap-tweaks.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/rest_framework/css/bootstrap-tweaks.css.gz -------------------------------------------------------------------------------- /backend/static/rest_framework/css/bootstrap.min.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/rest_framework/css/bootstrap.min.css.gz -------------------------------------------------------------------------------- /backend/static/rest_framework/css/bootstrap.min.css.map.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/rest_framework/css/bootstrap.min.css.map.gz -------------------------------------------------------------------------------- /backend/static/rest_framework/css/default.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/rest_framework/css/default.css.gz -------------------------------------------------------------------------------- /backend/static/rest_framework/css/font-awesome-4.0.3.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/rest_framework/css/font-awesome-4.0.3.css.gz -------------------------------------------------------------------------------- /backend/static/rest_framework/css/prettify.css: -------------------------------------------------------------------------------- 1 | .com { color: #93a1a1; } 2 | .lit { color: #195f91; } 3 | .pun, .opn, .clo { color: #93a1a1; } 4 | .fun { color: #dc322f; } 5 | .str, .atv { color: #D14; } 6 | .kwd, .prettyprint .tag { color: #1e347b; } 7 | .typ, .atn, .dec, .var { color: teal; } 8 | .pln { color: #48484c; } 9 | 10 | .prettyprint { 11 | padding: 8px; 12 | background-color: #f7f7f9; 13 | border: 1px solid #e1e1e8; 14 | } 15 | .prettyprint.linenums { 16 | -webkit-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; 17 | -moz-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; 18 | box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; 19 | } 20 | 21 | /* Specify class=linenums on a pre to get line numbering */ 22 | ol.linenums { 23 | margin: 0 0 0 33px; /* IE indents via margin-left */ 24 | } 25 | ol.linenums li { 26 | padding-left: 12px; 27 | color: #bebec5; 28 | line-height: 20px; 29 | text-shadow: 0 1px 0 #fff; 30 | } -------------------------------------------------------------------------------- /backend/static/rest_framework/css/prettify.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/rest_framework/css/prettify.css.gz -------------------------------------------------------------------------------- /backend/static/rest_framework/docs/css/base.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/rest_framework/docs/css/base.css.gz -------------------------------------------------------------------------------- /backend/static/rest_framework/docs/css/highlight.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/rest_framework/docs/css/highlight.css.gz -------------------------------------------------------------------------------- /backend/static/rest_framework/docs/css/jquery.json-view.min.css: -------------------------------------------------------------------------------- 1 | .json-view{position:relative} 2 | .json-view .collapser{width:20px;height:18px;display:block;position:absolute;left:-1.7em;top:-.2em;z-index:5;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAD1JREFUeNpiYGBgOADE%2F3Hgw0DM4IRHgSsDFOzFInmMAQnY49ONzZRjDFiADT7dMLALiE8y4AGW6LoBAgwAuIkf%2F%2FB7O9sAAAAASUVORK5CYII%3D);background-repeat:no-repeat;background-position:center center;opacity:.5;cursor:pointer} 3 | .json-view .collapsed{-ms-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-khtml-transform:rotate(-90deg);-webkit-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)} 4 | .json-view .bl{display:block;padding-left:20px;margin-left:-20px;position:relative} 5 | .json-view{font-family:monospace} 6 | .json-view ul{list-style-type:none;padding-left:2em;border-left:1px dotted;margin:.3em} 7 | .json-view ul li{position:relative} 8 | .json-view .comments,.json-view .dots{display:none;-moz-user-select:none;-ms-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none} 9 | .json-view .comments{padding-left:.8em;font-style:italic;color:#888} 10 | .json-view .bool,.json-view .null,.json-view .num,.json-view .undef{font-weight:700;color:#1A01CC} 11 | .json-view .str{color:#800} -------------------------------------------------------------------------------- /backend/static/rest_framework/docs/css/jquery.json-view.min.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/rest_framework/docs/css/jquery.json-view.min.css.gz -------------------------------------------------------------------------------- /backend/static/rest_framework/docs/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/rest_framework/docs/img/favicon.ico -------------------------------------------------------------------------------- /backend/static/rest_framework/docs/img/favicon.ico.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/rest_framework/docs/img/favicon.ico.gz -------------------------------------------------------------------------------- /backend/static/rest_framework/docs/img/grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/rest_framework/docs/img/grid.png -------------------------------------------------------------------------------- /backend/static/rest_framework/docs/js/api.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/rest_framework/docs/js/api.js.gz -------------------------------------------------------------------------------- /backend/static/rest_framework/docs/js/highlight.pack.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/rest_framework/docs/js/highlight.pack.js.gz -------------------------------------------------------------------------------- /backend/static/rest_framework/docs/js/jquery.json-view.min.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/rest_framework/docs/js/jquery.json-view.min.js.gz -------------------------------------------------------------------------------- /backend/static/rest_framework/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/rest_framework/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /backend/static/rest_framework/fonts/fontawesome-webfont.svg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/rest_framework/fonts/fontawesome-webfont.svg.gz -------------------------------------------------------------------------------- /backend/static/rest_framework/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/rest_framework/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /backend/static/rest_framework/fonts/fontawesome-webfont.ttf.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/rest_framework/fonts/fontawesome-webfont.ttf.gz -------------------------------------------------------------------------------- /backend/static/rest_framework/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/rest_framework/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /backend/static/rest_framework/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/rest_framework/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /backend/static/rest_framework/fonts/glyphicons-halflings-regular.svg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/rest_framework/fonts/glyphicons-halflings-regular.svg.gz -------------------------------------------------------------------------------- /backend/static/rest_framework/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/rest_framework/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /backend/static/rest_framework/fonts/glyphicons-halflings-regular.ttf.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/rest_framework/fonts/glyphicons-halflings-regular.ttf.gz -------------------------------------------------------------------------------- /backend/static/rest_framework/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/rest_framework/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /backend/static/rest_framework/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/rest_framework/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /backend/static/rest_framework/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/rest_framework/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /backend/static/rest_framework/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/rest_framework/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /backend/static/rest_framework/img/grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/rest_framework/img/grid.png -------------------------------------------------------------------------------- /backend/static/rest_framework/js/ajax-form.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/rest_framework/js/ajax-form.js.gz -------------------------------------------------------------------------------- /backend/static/rest_framework/js/bootstrap.min.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/rest_framework/js/bootstrap.min.js.gz -------------------------------------------------------------------------------- /backend/static/rest_framework/js/coreapi-0.1.1.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/rest_framework/js/coreapi-0.1.1.js.gz -------------------------------------------------------------------------------- /backend/static/rest_framework/js/csrf.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/rest_framework/js/csrf.js.gz -------------------------------------------------------------------------------- /backend/static/rest_framework/js/default.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function() { 2 | // JSON highlighting. 3 | prettyPrint(); 4 | 5 | // Bootstrap tooltips. 6 | $('.js-tooltip').tooltip({ 7 | delay: 1000, 8 | container: 'body' 9 | }); 10 | 11 | // Deal with rounded tab styling after tab clicks. 12 | $('a[data-toggle="tab"]:first').on('shown', function(e) { 13 | $(e.target).parents('.tabbable').addClass('first-tab-active'); 14 | }); 15 | 16 | $('a[data-toggle="tab"]:not(:first)').on('shown', function(e) { 17 | $(e.target).parents('.tabbable').removeClass('first-tab-active'); 18 | }); 19 | 20 | $('a[data-toggle="tab"]').click(function() { 21 | document.cookie = "tabstyle=" + this.name + "; path=/"; 22 | }); 23 | 24 | // Store tab preference in cookies & display appropriate tab on load. 25 | var selectedTab = null; 26 | var selectedTabName = getCookie('tabstyle'); 27 | 28 | if (selectedTabName) { 29 | selectedTabName = selectedTabName.replace(/[^a-z-]/g, ''); 30 | } 31 | 32 | if (selectedTabName) { 33 | selectedTab = $('.form-switcher a[name=' + selectedTabName + ']'); 34 | } 35 | 36 | if (selectedTab && selectedTab.length > 0) { 37 | // Display whichever tab is selected. 38 | selectedTab.tab('show'); 39 | } else { 40 | // If no tab selected, display rightmost tab. 41 | $('.form-switcher a:first').tab('show'); 42 | } 43 | 44 | $(window).on('load', function() { 45 | $('#errorModal').modal('show'); 46 | }); 47 | }); 48 | -------------------------------------------------------------------------------- /backend/static/rest_framework/js/default.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/rest_framework/js/default.js.gz -------------------------------------------------------------------------------- /backend/static/rest_framework/js/jquery-3.5.1.min.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/rest_framework/js/jquery-3.5.1.min.js.gz -------------------------------------------------------------------------------- /backend/static/rest_framework/js/prettify-min.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/backend/static/rest_framework/js/prettify-min.js.gz -------------------------------------------------------------------------------- /backend/templates/drf-yasg/redoc-old.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 | 4 | 5 | {{ title }} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/admin/detail.html: -------------------------------------------------------------------------------- 1 | {% load rest_framework %} 2 | 3 | 4 | {% for key, value in results|items %} 5 | {% if key in details %} 6 | 7 | {% endif %} 8 | {% endfor %} 9 | 10 |
{{ key|capfirst }}{{ value|format_value }}
11 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/admin/dict_value.html: -------------------------------------------------------------------------------- 1 | {% load rest_framework %} 2 | 3 | 4 | {% for k, v in value|items %} 5 | 6 | 7 | 8 | 9 | {% endfor %} 10 | 11 |
{{ k|format_value }}{{ v|format_value }}
12 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/admin/list.html: -------------------------------------------------------------------------------- 1 | {% load rest_framework %} 2 | 3 | 4 | {% for column in columns%}{% endfor %} 5 | 6 | 7 | {% for row in results %} 8 | 9 | {% for key, value in row|items %} 10 | {% if key in columns %} 11 | 14 | {% endif %} 15 | {% endfor %} 16 | 23 | 24 | {% endfor %} 25 | 26 |
{{ column|capfirst }}
12 | {{ value|format_value }} 13 | 17 | {% if row.url %} 18 | 19 | {% else %} 20 | 21 | {% endif %} 22 |
27 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/admin/list_value.html: -------------------------------------------------------------------------------- 1 | {% load rest_framework %} 2 | 3 | 4 | {% for item in value %} 5 | 6 | 7 | 8 | 9 | {% endfor %} 10 | 11 |
{{ forloop.counter0 }}{{ item|format_value }}
12 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/admin/simple_list_value.html: -------------------------------------------------------------------------------- 1 | {% load rest_framework %} 2 | {% for item in value %}{% if not forloop.first%},{% endif %} {{item|format_value}}{% endfor %} 3 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/api.html: -------------------------------------------------------------------------------- 1 | {% extends "rest_framework/base.html" %} 2 | 3 | {# Override this template in your own templates directory to customize #} 4 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/docs/auth/basic.html: -------------------------------------------------------------------------------- 1 | {% load rest_framework %} 2 | 3 | 4 | 39 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/docs/auth/session.html: -------------------------------------------------------------------------------- 1 | {% load rest_framework %} 2 | 3 | 4 | 36 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/docs/document.html: -------------------------------------------------------------------------------- 1 | {% load rest_framework %} 2 | 3 |
4 |
5 |

{{ document.title }}

6 | {% if document.description %} 7 |

{% render_markdown document.description %}

8 | {% endif %} 9 |
10 |
11 | {% for html in lang_intro_htmls %} 12 | {% include html %} 13 | {% endfor %} 14 |
15 |
16 | {% if document|data %} 17 | {% for section_key, section in document|data|items %} 18 | {% if section_key %} 19 |

{{ section_key }} 20 |

21 | {% endif %} 22 | 23 | {% for link_key, link in section|schema_links|items %} 24 | {% include "rest_framework/docs/link.html" %} 25 | {% endfor %} 26 | {% endfor %} 27 | 28 | {% for link_key, link in document.links|items %} 29 | {% include "rest_framework/docs/link.html" %} 30 | {% endfor %} 31 | {% endif %} 32 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/docs/langs/javascript-intro.html: -------------------------------------------------------------------------------- 1 | {% load rest_framework %} 2 | {% load static %} 3 |
{% code html %}
4 | 
5 | {% endcode %}
6 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/docs/langs/javascript.html: -------------------------------------------------------------------------------- 1 | {% load rest_framework %} 2 |
{% code javascript %}var coreapi = window.coreapi  // Loaded by `coreapi.js`
 3 | var schema = window.schema    // Loaded by `schema.js`
 4 | 
 5 | // Initialize a client
 6 | var client = new coreapi.Client()
 7 | 
 8 | // Interact with the API endpoint
 9 | var action = [{% if section_key %}"{{ section_key }}", {% endif %}"{{ link_key }}"]
10 | {% if link.fields %}var params = {
11 | {% for field in link.fields %}    {{ field.name }}: ...{% if not loop.last %},{% endif %}
12 | {% endfor %}}
13 | {% endif %}client.action(schema, action{% if link.fields %}, params{% endif %}).then(function(result) {
14 |     // Return value is in 'result'
15 | }){% endcode %}
16 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/docs/langs/python-intro.html: -------------------------------------------------------------------------------- 1 | {% load rest_framework %} 2 |
{% code bash %}# Install the Python client library
3 | $ pip install coreapi{% endcode %}
4 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/docs/langs/python.html: -------------------------------------------------------------------------------- 1 | {% load rest_framework %} 2 |
{% code python %}import coreapi
 3 | 
 4 | # Initialize a client & load the schema document
 5 | client = coreapi.Client()
 6 | schema = client.get("{{ document.url }}"{% if schema_format %}, format="{{ schema_format }}"{% endif %})
 7 | 
 8 | # Interact with the API endpoint
 9 | action = [{% if section_key %}"{{ section_key }}", {% endif %}"{{ link_key }}"]
10 | {% if link.fields %}params = {
11 | {% for field in link.fields %}    "{{ field.name }}": ...{% if not loop.last %},{% endif %}
12 | {% endfor %}}
13 | {% endif %}result = client.action(schema, action{% if link.fields %}, params=params{% endif %}){% endcode %}
14 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/docs/langs/shell-intro.html: -------------------------------------------------------------------------------- 1 | {% load rest_framework %} 2 |
{% code bash %}# Install the command line client
3 | $ pip install coreapi-cli{% endcode %}
4 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/docs/langs/shell.html: -------------------------------------------------------------------------------- 1 | {% load rest_framework %} 2 |
{% code bash %}# Load the schema document
3 | $ coreapi get {{ document.url }}{% if schema_format %} --format {{ schema_format }}{% endif %}
4 | 
5 | # Interact with the API endpoint
6 | $ coreapi action {% if section_key %}{{ section_key }} {% endif %}{{ link_key|cut:"> " }}{% for field in link.fields %} -p {{ field.name }}=...{% endfor %}{% endcode %}
7 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/filters/base.html: -------------------------------------------------------------------------------- 1 | 17 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/filters/ordering.html: -------------------------------------------------------------------------------- 1 | {% load rest_framework %} 2 | {% load i18n %} 3 |

{% trans "Ordering" %}

4 |
5 | {% for key, label in options %} 6 | {% if key == current %} 7 | 8 | {{ label }} 9 | 10 | {% else %} 11 | {{ label }} 12 | {% endif %} 13 | {% endfor %} 14 |
15 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/filters/search.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 |

{% trans "Search" %}

3 |
4 |
5 |
6 | 7 | 8 | 9 | 10 |
11 |
12 |
13 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/horizontal/checkbox.html: -------------------------------------------------------------------------------- 1 |
2 | {% if field.label %} 3 | 6 | {% endif %} 7 | 8 |
9 | 10 | 11 | {% if field.errors %} 12 | {% for error in field.errors %} 13 | {{ error }} 14 | {% endfor %} 15 | {% endif %} 16 | 17 | {% if field.help_text %} 18 | {{ field.help_text|safe }} 19 | {% endif %} 20 |
21 |
22 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/horizontal/checkbox_multiple.html: -------------------------------------------------------------------------------- 1 | {% load rest_framework %} 2 | 3 |
4 | {% if field.label %} 5 | 8 | {% endif %} 9 | 10 |
11 | {% if style.inline %} 12 | {% for key, text in field.choices|items %} 13 | 17 | {% endfor %} 18 | {% else %} 19 | {% for key, text in field.choices|items %} 20 |
21 | 25 |
26 | {% endfor %} 27 | {% endif %} 28 | 29 | {% if field.errors %} 30 | {% for error in field.errors %} 31 | {{ error }} 32 | {% endfor %} 33 | {% endif %} 34 | 35 | {% if field.help_text %} 36 | {{ field.help_text|safe }} 37 | {% endif %} 38 |
39 |
40 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/horizontal/dict_field.html: -------------------------------------------------------------------------------- 1 |
2 | {% if field.label %} 3 | 6 | {% endif %} 7 | 8 |
9 |

Dictionaries are not currently supported in HTML input.

10 |
11 |
12 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/horizontal/fieldset.html: -------------------------------------------------------------------------------- 1 | {% load rest_framework %} 2 |
3 | {% if field.label %} 4 |
5 | 6 | {{ field.label }} 7 | 8 |
9 | {% endif %} 10 | 11 | {% for nested_field in field %} 12 | {% if not nested_field.read_only %} 13 | {% render_field nested_field style=style %} 14 | {% endif %} 15 | {% endfor %} 16 |
17 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/horizontal/form.html: -------------------------------------------------------------------------------- 1 | {% load rest_framework %} 2 | {% for field in form %} 3 | {% if not field.read_only %} 4 | {% render_field field style=style %} 5 | {% endif %} 6 | {% endfor %} 7 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/horizontal/input.html: -------------------------------------------------------------------------------- 1 |
2 | {% if field.label %} 3 | 6 | {% endif %} 7 | 8 |
9 | 10 | 11 | {% if field.errors %} 12 | {% for error in field.errors %} 13 | {{ error }} 14 | {% endfor %} 15 | {% endif %} 16 | 17 | {% if field.help_text %} 18 | {{ field.help_text|safe }} 19 | {% endif %} 20 |
21 |
22 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/horizontal/list_field.html: -------------------------------------------------------------------------------- 1 |
2 | {% if field.label %} 3 | 6 | {% endif %} 7 | 8 |
9 |

Lists are not currently supported in HTML input.

10 |
11 |
12 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/horizontal/list_fieldset.html: -------------------------------------------------------------------------------- 1 | {% load rest_framework %} 2 | 3 |
4 | {% if field.label %} 5 |
6 | 7 | {{ field.label }} 8 | 9 |
10 | {% endif %} 11 | 12 |

Lists are not currently supported in HTML input.

13 |
14 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/horizontal/select.html: -------------------------------------------------------------------------------- 1 | {% load rest_framework %} 2 | 3 |
4 | {% if field.label %} 5 | 8 | {% endif %} 9 | 10 |
11 | 25 | 26 | {% if field.errors %} 27 | {% for error in field.errors %} 28 | {{ error }} 29 | {% endfor %} 30 | {% endif %} 31 | 32 | {% if field.help_text %} 33 | {{ field.help_text|safe }} 34 | {% endif %} 35 |
36 |
37 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/horizontal/select_multiple.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | {% load rest_framework %} 3 | 4 | {% trans "No items to select." as no_items %} 5 | 6 |
7 | {% if field.label %} 8 | 11 | {% endif %} 12 | 13 |
14 | 27 | 28 | {% if field.errors %} 29 | {% for error in field.errors %} 30 | {{ error }} 31 | {% endfor %} 32 | {% endif %} 33 | 34 | {% if field.help_text %} 35 | {{ field.help_text|safe }} 36 | {% endif %} 37 |
38 |
39 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/horizontal/textarea.html: -------------------------------------------------------------------------------- 1 |
2 | {% if field.label %} 3 | 6 | {% endif %} 7 | 8 |
9 | 10 | 11 | {% if field.errors %} 12 | {% for error in field.errors %} 13 | {{ error }} 14 | {% endfor %} 15 | {% endif %} 16 | 17 | {% if field.help_text %} 18 | {{ field.help_text|safe }} 19 | {% endif %} 20 |
21 |
22 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/inline/checkbox.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 7 |
8 |
9 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/inline/checkbox_multiple.html: -------------------------------------------------------------------------------- 1 | {% load rest_framework %} 2 | 3 |
4 | {% if field.label %} 5 | 6 | {% endif %} 7 | 8 | {% for key, text in field.choices|items %} 9 |
10 | 14 |
15 | {% endfor %} 16 |
17 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/inline/dict_field.html: -------------------------------------------------------------------------------- 1 |
2 | {% if field.label %} 3 | 6 | {% endif %} 7 | 8 |

Dictionaries are not currently supported in HTML input.

9 |
10 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/inline/fieldset.html: -------------------------------------------------------------------------------- 1 | {% load rest_framework %} 2 | {% for nested_field in field %} 3 | {% if not nested_field.read_only %} 4 | {% render_field nested_field style=style %} 5 | {% endif %} 6 | {% endfor %} 7 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/inline/form.html: -------------------------------------------------------------------------------- 1 | {% load rest_framework %} 2 | {% for field in form %} 3 | {% if not field.read_only %} 4 | {% render_field field style=style %} 5 | {% endif %} 6 | {% endfor %} 7 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/inline/input.html: -------------------------------------------------------------------------------- 1 |
2 | {% if field.label %} 3 | 6 | {% endif %} 7 | 8 | 9 |
10 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/inline/list_field.html: -------------------------------------------------------------------------------- 1 |
2 | {% if field.label %} 3 | 6 | {% endif %} 7 | 8 |

Lists are not currently supported in HTML input.

9 |
10 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/inline/list_fieldset.html: -------------------------------------------------------------------------------- 1 | Lists are not currently supported in HTML input. 2 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/inline/radio.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | {% load rest_framework %} 3 | {% trans "None" as none_choice %} 4 | 5 |
6 | {% if field.label %} 7 | 10 | {% endif %} 11 | 12 | {% if field.allow_null or field.allow_blank %} 13 |
14 | 18 |
19 | {% endif %} 20 | 21 | {% for key, text in field.choices|items %} 22 |
23 | 27 |
28 | {% endfor %} 29 |
30 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/inline/select.html: -------------------------------------------------------------------------------- 1 | {% load rest_framework %} 2 | 3 |
4 | {% if field.label %} 5 | 8 | {% endif %} 9 | 10 | 24 |
25 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/inline/select_multiple.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | {% load rest_framework %} 3 | {% trans "No items to select." as no_items %} 4 | 5 |
6 | {% if field.label %} 7 | 10 | {% endif %} 11 | 12 | 25 |
26 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/inline/textarea.html: -------------------------------------------------------------------------------- 1 |
2 | {% if field.label %} 3 | 6 | {% endif %} 7 | 8 | 9 |
10 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/login.html: -------------------------------------------------------------------------------- 1 | {% extends "rest_framework/login_base.html" %} 2 | 3 | {# Override this template in your own templates directory to customize #} 4 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/pagination/numbers.html: -------------------------------------------------------------------------------- 1 |
    2 | {% if previous_url %} 3 |
  • 4 | 5 | 6 | 7 |
  • 8 | {% else %} 9 |
  • 10 | 11 | 12 | 13 |
  • 14 | {% endif %} 15 | 16 | {% for page_link in page_links %} 17 | {% if page_link.is_break %} 18 |
  • 19 | 20 |
  • 21 | {% else %} 22 | {% if page_link.is_active %} 23 |
  • 24 | {{ page_link.number }} 25 |
  • 26 | {% else %} 27 |
  • 28 | {{ page_link.number }} 29 |
  • 30 | {% endif %} 31 | {% endif %} 32 | {% endfor %} 33 | 34 | {% if next_url %} 35 |
  • 36 | 37 | 38 | 39 |
  • 40 | {% else %} 41 |
  • 42 | 43 | 44 | 45 |
  • 46 | {% endif %} 47 |
48 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/pagination/previous_and_next.html: -------------------------------------------------------------------------------- 1 |
    2 | {% if previous_url %} 3 | 6 | {% else %} 7 | 10 | {% endif %} 11 | 12 | {% if next_url %} 13 | 16 | {% else %} 17 | 20 | {% endif %} 21 |
22 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/raw_data_form.html: -------------------------------------------------------------------------------- 1 | {% load rest_framework %} 2 | {{ form.non_field_errors }} 3 | {% for field in form %} 4 |
5 | {{ field.label_tag|add_class:"col-sm-2 control-label" }} 6 |
7 | {{ field|add_class:"form-control" }} 8 | {{ field.help_text|safe }} 9 |
10 |
11 | {% endfor %} 12 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/schema.js: -------------------------------------------------------------------------------- 1 | var codec = new window.coreapi.codecs.CoreJSONCodec() 2 | var coreJSON = window.atob('{{ schema }}') 3 | window.schema = codec.decode(coreJSON) 4 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/vertical/checkbox.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 7 |
8 | 9 | {% if field.errors %} 10 | {% for error in field.errors %} 11 | {{ error }} 12 | {% endfor %} 13 | {% endif %} 14 | 15 | {% if field.help_text %} 16 | {{ field.help_text|safe }} 17 | {% endif %} 18 |
19 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/vertical/checkbox_multiple.html: -------------------------------------------------------------------------------- 1 | {% load rest_framework %} 2 | 3 |
4 | {% if field.label %} 5 | 6 | {% endif %} 7 | 8 | {% if style.inline %} 9 |
10 | {% for key, text in field.choices|items %} 11 | 15 | {% endfor %} 16 |
17 | {% else %} 18 | {% for key, text in field.choices|items %} 19 |
20 | 24 |
25 | {% endfor %} 26 | {% endif %} 27 | 28 | {% if field.errors %} 29 | {% for error in field.errors %} 30 | {{ error }} 31 | {% endfor %} 32 | {% endif %} 33 | 34 | {% if field.help_text %} 35 | {{ field.help_text|safe }} 36 | {% endif %} 37 |
38 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/vertical/dict_field.html: -------------------------------------------------------------------------------- 1 |
2 | {% if field.label %} 3 | 4 | {% endif %} 5 | 6 |

Dictionaries are not currently supported in HTML input.

7 |
8 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/vertical/fieldset.html: -------------------------------------------------------------------------------- 1 | {% load rest_framework %} 2 | 3 |
4 | {% if field.label %} 5 | 6 | {{ field.label }} 7 | 8 | {% endif %} 9 | 10 | {% for nested_field in field %} 11 | {% if not nested_field.read_only %} 12 | {% render_field nested_field style=style %} 13 | {% endif %} 14 | {% endfor %} 15 |
16 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/vertical/form.html: -------------------------------------------------------------------------------- 1 | {% load rest_framework %} 2 | {% for field in form %} 3 | {% if not field.read_only %} 4 | {% render_field field style=style %} 5 | {% endif %} 6 | {% endfor %} 7 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/vertical/input.html: -------------------------------------------------------------------------------- 1 |
2 | {% if field.label %} 3 | 4 | {% endif %} 5 | 6 | 7 | 8 | {% if field.errors %} 9 | {% for error in field.errors %} 10 | {{ error }} 11 | {% endfor %} 12 | {% endif %} 13 | 14 | {% if field.help_text %} 15 | {{ field.help_text|safe }} 16 | {% endif %} 17 |
18 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/vertical/list_field.html: -------------------------------------------------------------------------------- 1 |
2 | {% if field.label %} 3 | 4 | {% endif %} 5 | 6 |

Lists are not currently supported in HTML input.

7 |
8 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/vertical/list_fieldset.html: -------------------------------------------------------------------------------- 1 |
2 | {% if field.label %} 3 | 4 | {{ field.label }} 5 | 6 | {% endif %} 7 | 8 |

Lists are not currently supported in HTML input.

9 |
10 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/vertical/select.html: -------------------------------------------------------------------------------- 1 | {% load rest_framework %} 2 | 3 |
4 | {% if field.label %} 5 | 8 | {% endif %} 9 | 10 | 24 | 25 | {% if field.errors %} 26 | {% for error in field.errors %} 27 | {{ error }} 28 | {% endfor %} 29 | {% endif %} 30 | 31 | {% if field.help_text %} 32 | {{ field.help_text|safe }} 33 | {% endif %} 34 |
35 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/vertical/select_multiple.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | {% load rest_framework %} 3 | {% trans "No items to select." as no_items %} 4 | 5 |
6 | {% if field.label %} 7 | 10 | {% endif %} 11 | 12 | 25 | 26 | {% if field.errors %} 27 | {% for error in field.errors %}{{ error }}{% endfor %} 28 | {% endif %} 29 | 30 | {% if field.help_text %} 31 | {{ field.help_text|safe }} 32 | {% endif %} 33 |
34 | -------------------------------------------------------------------------------- /backend/templates/rest_framework/vertical/textarea.html: -------------------------------------------------------------------------------- 1 |
2 | {% if field.label %} 3 | 6 | {% endif %} 7 | 8 | 9 | 10 | {% if field.errors %} 11 | {% for error in field.errors %}{{ error }}{% endfor %} 12 | {% endif %} 13 | 14 | {% if field.help_text %} 15 | {{ field.help_text|safe }} 16 | {% endif %} 17 |
18 | -------------------------------------------------------------------------------- /docker_env/celery/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM registry.cn-zhangjiakou.aliyuncs.com/dvadmin-pro/dvadmin3-base-backend:latest 2 | WORKDIR /backend 3 | COPY ./backend/ . 4 | RUN awk 'BEGIN { cmd="cp -i ./conf/env.example.py ./conf/env.py "; print "n" |cmd; }' 5 | RUN python3 -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ -r requirements.txt 6 | CMD ["celery", "-A", "application", "worker", "-B", "--loglevel=info"] 7 | 8 | -------------------------------------------------------------------------------- /docker_env/django/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM registry.cn-zhangjiakou.aliyuncs.com/dvadmin-pro/dvadmin3-base-backend:latest 2 | WORKDIR /backend 3 | COPY ./backend/ . 4 | RUN ls ./conf/ 5 | RUN awk 'BEGIN { cmd="cp -i ./conf/env.example.py ./conf/env.py "; print "n" |cmd; }' 6 | RUN sed -i "s|DATABASE_HOST = '127.0.0.1'|DATABASE_HOST = '177.10.0.1'|g" ./conf/env.py 7 | RUN sed -i "s|REDIS_HOST = '127.0.0.1'|REDIS_HOST = '177.10.0.1'|g" ./conf/env.py 8 | RUN python3 -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ -r requirements.txt 9 | CMD ["sh","docker_start.sh"] 10 | -------------------------------------------------------------------------------- /docker_env/django/DockerfileBuild: -------------------------------------------------------------------------------- 1 | FROM python:3.10-alpine 2 | RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories 3 | RUN apk update && apk add bash bash-doc bash-completion git freetds-dev jpeg-dev linux-headers mysql-client mariadb-dev build-base libffi-dev openssl-dev zlib-dev bzip2-dev pcre-dev ncurses-dev readline-dev tk-dev postgresql-dev 4 | WORKDIR /backend 5 | COPY ./backend/requirements.txt . 6 | RUN python3 -m pip install -i https://mirrors.aliyun.com/pypi/simple/ -r requirements.txt 7 | -------------------------------------------------------------------------------- /docker_env/mysql/conf.d/my.cnf: -------------------------------------------------------------------------------- 1 | [mysql] 2 | #设置mysql客户端默认字符集 3 | default-character-set=utf8 4 | socket=/var/lib/mysql/mysql.sock 5 | 6 | 7 | [mysqld] 8 | # skip-grant-tables 9 | #mysql5.7以后的不兼容问题处理 10 | sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 11 | datadir=/var/lib/mysql 12 | socket=/var/lib/mysql/mysql.sock 13 | 14 | # Disabling symbolic-links is recommended to prevent assorted security risks 15 | symbolic-links=0 16 | # Settings user and group are ignored when systemd is used. 17 | # If you need to run mysqld under a different user or group, 18 | # customize your systemd unit file for mariadb according to the 19 | # instructions in http://fedoraproject.org/wiki/Systemdd 20 | #允许最大连接数 21 | max_connections=1000 22 | #服务端使用的字符集默认为8比特编码的latin1字符集 23 | character-set-server=utf8 24 | #创建新表时将使用的默认存储引擎 25 | default-storage-engine=INNODB 26 | lower_case_table_names=1 27 | max_allowed_packet=16M 28 | #设置时区 29 | default-time_zone='+8:00' 30 | 31 | [mysqld_safe] 32 | log-error=/var/log/mariadb/mariadb.log 33 | pid-file=/var/lib/mariadb/mariadb.pid 34 | -------------------------------------------------------------------------------- /docker_env/mysql/launch.sh: -------------------------------------------------------------------------------- 1 | cur_path=`pwd` 2 | docker rm mysql 3 | # docker pull mysql:5.7 4 | # docker pull mysql:5.5 5 | docker run -p 3306:3306 --privileged=true --name mysql -v $cur_path/logs:/logs -v $cur_path/data:/var/lib/mysql -v $cur_path/conf.d/my.cnf:/etc/mysql/mysql.conf.d/mysqld.cnf -v $cur_path/run/:/var/run/mysql -e MYSQL_ROOT_PASSWORD=q1w2e3r4 -d mysql:5.7 6 | -------------------------------------------------------------------------------- /docker_env/nginx/my-80.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | server_name localhost; 4 | client_max_body_size 100M; 5 | # 配置前端静态文件目录 6 | location / { 7 | index index.html index.htm; 8 | root /usr/share/nginx/html; 9 | try_files $uri $uri/ /index.html; 10 | # 禁止缓存html文件,避免前端页面不及时更新,需要用户手动刷新的情况 11 | if ($request_uri ~* "^/$|^/index.html|^/index.htm") { 12 | add_header Cache-Control "no-store"; 13 | } 14 | } 15 | 16 | location ~ ^/api/ { 17 | proxy_http_version 1.1; 18 | proxy_set_header Host $http_host; 19 | proxy_set_header X-Real-IP $remote_addr; 20 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 21 | proxy_set_header X-Forwarded-Proto $scheme; 22 | proxy_set_header X-Nginx-Proxy true; 23 | set_real_ip_from 0.0.0.0/0; 24 | proxy_set_header Upgrade $http_upgrade; 25 | proxy_set_header Connection "upgrade"; 26 | proxy_connect_timeout 600s; 27 | proxy_read_timeout 600s; 28 | proxy_send_timeout 600s; 29 | real_ip_header X-Forwarded-For; 30 | rewrite ^/api/(.*)$ /$1 break; #重写 31 | proxy_pass http://177.10.0.12:8000/; # 设置代理服务器的协议和地址 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /docker_env/redis/redis.conf: -------------------------------------------------------------------------------- 1 | ### 指定redis绑定的主机地址,注释掉这部分,使redis可以外部访问 2 | # bind 127.0.0.1 -::1 3 | ### 指定访问redis服务端的端口 4 | port 6379 5 | ### 指定客户端连接redis服务器时,当闲置的时间为多少(如300)秒时关闭连接(0表示禁用) 6 | timeout 0 7 | ### 默认情况下,Redis不作为守护进程运行。如果需要,请使用“yes” 8 | daemonize no 9 | ### 给redis设置密码,不需要密码的话则注释 10 | # requirepass dvadmin 11 | ### 开启redis持久化,默认为no 12 | appendonly yes 13 | ### 防止出现远程主机强迫关闭了一个现有的连接的错误 默认是300 14 | tcp-keepalive 300 15 | ### 指定redis数据库的日志级别,常用的日志级别有debug、verbose、notice、warning,不进行修改的情况下默认的是notice 16 | loglevel notice 17 | ### 指定redis数据库多长时间内(s)有多少次(c)更新操作时就把缓存中的数据同步到本地库,比如:save 600 2,指的是10分钟内有2次更新操作,就同步到本地库 18 | save 600 2 19 | ### 指定redis的最大内存。由于Redis 在启动时会把数据加载到内存中,当数据达到最大内存时,redis会自动把已经到期和即将到期的key值。所以可以根据需求调整自己的所需的最大内存 20 | maxmemory 500mb 21 | ### 设置了maxmemory的选项,redis内存使用达到上限。可以通过设置LRU算法来删除部分key,释放空间。默认是按照过期时间的,如果set时候没有加上过期时间就会导致数据写满maxmemory 22 | maxmemory-policy volatile-lru 23 | ### 设置外部网络连接redis服务,开启需配置bind ip或者设置访问密码,关闭此时外部网络可以直接访问 24 | # protected-mode yes 25 | -------------------------------------------------------------------------------- /docker_env/web/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM registry.cn-zhangjiakou.aliyuncs.com/dvadmin-pro/dvadmin3-base-web:18.20-alpine 2 | WORKDIR /web/ 3 | COPY web/. . 4 | RUN yarn install --registry=https://registry.npmmirror.com 5 | RUN yarn build 6 | 7 | FROM nginx:alpine 8 | COPY ./docker_env/nginx/my.conf /etc/nginx/conf.d/my.conf 9 | COPY --from=0 /web/dist /usr/share/nginx/html 10 | -------------------------------------------------------------------------------- /docker_env/web/DockerfileBuild: -------------------------------------------------------------------------------- 1 | FROM node:16.19-alpine 2 | WORKDIR / 3 | COPY ./web/package.json . 4 | RUN yarn install --registry=https://registry.npmmirror.com 5 | -------------------------------------------------------------------------------- /web/.env: -------------------------------------------------------------------------------- 1 | # port 端口号 2 | VITE_PORT = 8080 3 | VITE_API_URL = 'http://127.0.0.1:8000' 4 | # open 运行 npm run dev 时自动打开浏览器 5 | VITE_OPEN = false 6 | 7 | # public path 配置线上环境路径(打包)、本地通过 http-server 访问时,请置空即可 8 | VITE_PUBLIC_PATH = / 9 | -------------------------------------------------------------------------------- /web/.env.development: -------------------------------------------------------------------------------- 1 | # 本地环境 2 | ENV = 'development' 3 | 4 | # 本地环境接口地址 5 | VITE_API_URL = 'http://127.0.0.1:8001' 6 | 7 | # 是否启用按钮权限 8 | VITE_PM_ENABLED = true 9 | -------------------------------------------------------------------------------- /web/.env.local_prod: -------------------------------------------------------------------------------- 1 | # 线上环境 2 | ENV = 'local_prod' 3 | 4 | # 线上环境接口地址 5 | VITE_API_URL = '/' 6 | 7 | # 是否启用按钮权限 8 | VITE_PM_ENABLED = true 9 | VITE_PUBLIC_PATH = /web/ 10 | # dist目录 11 | VITE_DIST_PATH =../backend/templates/web/ -------------------------------------------------------------------------------- /web/.env.production: -------------------------------------------------------------------------------- 1 | # 线上环境 2 | ENV = 'production' 3 | 4 | # 线上环境接口地址 5 | VITE_API_URL = '/api' # docker-compose部署不需要修改,nginx容器自动代理了这个地址 6 | 7 | # 是否启用按钮权限 8 | VITE_PM_ENABLED = true 9 | -------------------------------------------------------------------------------- /web/.eslintignore: -------------------------------------------------------------------------------- 1 | 2 | *.sh 3 | node_modules 4 | lib 5 | *.md 6 | *.scss 7 | *.woff 8 | *.ttf 9 | .vscode 10 | .idea 11 | dist 12 | mock 13 | public 14 | bin 15 | build 16 | config 17 | index.html 18 | src/assets -------------------------------------------------------------------------------- /web/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | yarn.lock 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | # 构建版本文件,无需上传git 25 | public/version-build 26 | -------------------------------------------------------------------------------- /web/.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // 一行最多多少个字符 3 | printWidth: 150, 4 | // 指定每个缩进级别的空格数 5 | tabWidth: 2, 6 | // 使用制表符而不是空格缩进行 7 | useTabs: true, 8 | // 在语句末尾打印分号 9 | semi: true, 10 | // 使用单引号而不是双引号 11 | singleQuote: true, 12 | // 更改引用对象属性的时间 可选值"" 13 | quoteProps: 'as-needed', 14 | // 在JSX中使用单引号而不是双引号 15 | jsxSingleQuote: false, 16 | // 多行时尽可能打印尾随逗号。(例如,单行数组永远不会出现逗号结尾。) 可选值"",默认none 17 | trailingComma: 'es5', 18 | // 在对象文字中的括号之间打印空格 19 | bracketSpacing: true, 20 | // jsx 标签的反尖括号需要换行 21 | jsxBracketSameLine: false, 22 | // 在单独的箭头函数参数周围包括括号 always:(x) => x \ avoid:x => x 23 | arrowParens: 'always', 24 | // 这两个选项可用于格式化以给定字符偏移量(分别包括和不包括)开始和结束的代码 25 | rangeStart: 0, 26 | rangeEnd: Infinity, 27 | // 指定要使用的解析器,不需要写文件开头的 @prettier 28 | requirePragma: false, 29 | // 不需要自动在文件开头插入 @prettier 30 | insertPragma: false, 31 | // 使用默认的折行标准 always\never\preserve 32 | proseWrap: 'preserve', 33 | // 指定HTML文件的全局空格敏感度 css\strict\ignore 34 | htmlWhitespaceSensitivity: 'css', 35 | // Vue文件脚本和样式标签缩进 36 | vueIndentScriptAndStyle: false, 37 | // 换行符使用 lf 结尾是 可选值"" 38 | endOfLine: 'lf', 39 | }; 40 | -------------------------------------------------------------------------------- /web/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 DVAdmin,hugedream 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 11 | 15 | 16 | django-vue-admin 17 | 18 | 19 |
20 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /web/plugins.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'vue-grid-layout'; 2 | declare module 'qrcodejs2-fixes'; 3 | declare module 'splitpanes'; 4 | declare module 'js-cookie'; 5 | -------------------------------------------------------------------------------- /web/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /web/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/web/public/favicon.ico -------------------------------------------------------------------------------- /web/shim.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | // 声明文件,*.vue 后缀的文件交给 vue 模块来处理 4 | declare module '*.vue' { 5 | import type { DefineComponent } from 'vue'; 6 | const component: DefineComponent<{}, {}, any>; 7 | export default component; 8 | } 9 | 10 | // 声明文件,定义全局变量。其它 app.config.globalProperties.xxx,使用 getCurrentInstance() 来获取 11 | interface Window { 12 | nextLoading: boolean; 13 | } 14 | -------------------------------------------------------------------------------- /web/source.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.json'; 2 | declare module '*.png'; 3 | declare module '*.jpg'; 4 | declare module '*.scss'; 5 | declare module '*.ts'; 6 | declare module '*.js'; 7 | -------------------------------------------------------------------------------- /web/src/api/login/index.ts: -------------------------------------------------------------------------------- 1 | import request from '/@/utils/request'; 2 | 3 | /** 4 | * 登录api接口集合 5 | * @method signIn 用户登录 6 | * @method signOut 用户退出登录 7 | */ 8 | export function useLoginApi() { 9 | return { 10 | signIn: (params: object) => { 11 | return request({ 12 | url: '/user/signIn', 13 | method: 'post', 14 | data: params, 15 | }); 16 | }, 17 | signOut: (params: object) => { 18 | return request({ 19 | url: '/user/signOut', 20 | method: 'post', 21 | data: params, 22 | }); 23 | }, 24 | }; 25 | } 26 | -------------------------------------------------------------------------------- /web/src/api/menu/index.ts: -------------------------------------------------------------------------------- 1 | import { request } from "/@/utils/service"; 2 | 3 | /** 4 | * 后端控制菜单模拟json,路径在 https://gitee.com/lyt-top/vue-next-admin-images/tree/master/menu 5 | * 后端控制路由,isRequestRoutes 为 true,则开启后端控制路由 6 | * @method getMenuAdmin 获取后端动态路由菜单(admin) 7 | * @method getMenuTest 获取后端动态路由菜单(test) 8 | */ 9 | export function useMenuApi() { 10 | return { 11 | getSystemMenu: (params?: object) => { 12 | return request({ 13 | url: '/api/system/menu/web_router/', 14 | method: 'get', 15 | params, 16 | }); 17 | }, 18 | getMenuAdmin: (params?: object) => { 19 | return request({ 20 | url: '/gitee/lyt-top/vue-next-admin-images/raw/master/menu/adminMenu.json', 21 | method: 'get', 22 | params, 23 | }); 24 | }, 25 | getMenuTest: (params?: object) => { 26 | return request({ 27 | url: '/gitee/lyt-top/vue-next-admin-images/raw/master/menu/testMenu.json', 28 | method: 'get', 29 | params, 30 | }); 31 | }, 32 | }; 33 | } 34 | -------------------------------------------------------------------------------- /web/src/assets/iconfont/iconfont.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: "iconfont"; /* Project id 3882322 */ 3 | src: url('iconfont.woff2?t=1676892176164') format('woff2'), 4 | url('iconfont.woff?t=1676892176164') format('woff'), 5 | url('iconfont.ttf?t=1676892176164') format('truetype'); 6 | } 7 | 8 | .iconfont { 9 | font-family: "iconfont" !important; 10 | font-size: 16px; 11 | font-style: normal; 12 | -webkit-font-smoothing: antialiased; 13 | -moz-osx-font-smoothing: grayscale; 14 | } 15 | 16 | .icon-xiaoxizhongxin:before { 17 | content: "\e665"; 18 | } 19 | 20 | .icon-xitongshezhi:before { 21 | content: "\e7ba"; 22 | } 23 | 24 | .icon-caozuorizhi:before { 25 | content: "\e611"; 26 | } 27 | 28 | .icon-guanlidenglurizhi:before { 29 | content: "\ea45"; 30 | } 31 | 32 | .icon-rizhi:before { 33 | content: "\e60c"; 34 | } 35 | 36 | .icon-system:before { 37 | content: "\e684"; 38 | } 39 | 40 | .icon-Area:before { 41 | content: "\eaa2"; 42 | } 43 | 44 | .icon-file:before { 45 | content: "\e671"; 46 | } 47 | 48 | .icon-dict:before { 49 | content: "\e626"; 50 | } 51 | 52 | .icon-configure:before { 53 | content: "\e733"; 54 | } 55 | 56 | -------------------------------------------------------------------------------- /web/src/assets/iconfont/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/web/src/assets/iconfont/iconfont.ttf -------------------------------------------------------------------------------- /web/src/assets/iconfont/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/web/src/assets/iconfont/iconfont.woff -------------------------------------------------------------------------------- /web/src/assets/iconfont/iconfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/web/src/assets/iconfont/iconfont.woff2 -------------------------------------------------------------------------------- /web/src/assets/img/headerImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/web/src/assets/img/headerImage.png -------------------------------------------------------------------------------- /web/src/assets/img/menu-tree-head-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/web/src/assets/img/menu-tree-head-icon.png -------------------------------------------------------------------------------- /web/src/assets/img/menu-tree-hidden-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/web/src/assets/img/menu-tree-hidden-icon.png -------------------------------------------------------------------------------- /web/src/assets/img/menu-tree-show-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/web/src/assets/img/menu-tree-show-icon.png -------------------------------------------------------------------------------- /web/src/assets/login-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/web/src/assets/login-bg.png -------------------------------------------------------------------------------- /web/src/assets/style/reset.scss: -------------------------------------------------------------------------------- 1 | .fs-crud-container { 2 | .el-table thead { 3 | color: #606266; 4 | } 5 | .el-input__inner::placeholder { 6 | color: #dcdfe6; 7 | font-size: 12px; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /web/src/assets/style/tailwind.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; -------------------------------------------------------------------------------- /web/src/components/auth/auth.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 27 | -------------------------------------------------------------------------------- /web/src/components/auth/authAll.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 28 | -------------------------------------------------------------------------------- /web/src/components/auth/auths.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 33 | -------------------------------------------------------------------------------- /web/src/components/dept-format/index.vue: -------------------------------------------------------------------------------- 1 | 6 | 30 | -------------------------------------------------------------------------------- /web/src/components/fileSelector/types.ts: -------------------------------------------------------------------------------- 1 | export const SHOW = { 2 | IMAGE: 0b1000, // 图片 3 | VIDEO: 0b0100, // 视频 4 | AUDIO: 0b0010, // 音频 5 | OTHER: 0b0001, // 其他 6 | ALL: 0b1111, // 全部 7 | }; 8 | -------------------------------------------------------------------------------- /web/src/components/foreignKey/index.vue: -------------------------------------------------------------------------------- 1 | 7 | 42 | -------------------------------------------------------------------------------- /web/src/components/manyToMany/index.vue: -------------------------------------------------------------------------------- 1 | 7 | 39 | 47 | -------------------------------------------------------------------------------- /web/src/directive/authDirective.ts: -------------------------------------------------------------------------------- 1 | import type { App } from 'vue'; 2 | import { judementSameArr } from '/@/utils/arrayOperation'; 3 | import {BtnPermissionStore} from "/@/stores/btnPermission"; 4 | /** 5 | * 用户权限指令 6 | * @directive 单个权限验证(v-auth="xxx") 7 | * @directive 多个权限验证,满足一个则显示(v-auths="[xxx,xxx]") 8 | * @directive 多个权限验证,全部满足则显示(v-auth-all="[xxx,xxx]") 9 | */ 10 | export function authDirective(app: App) { 11 | // 单个权限验证(v-auth="xxx") 12 | app.directive('auth', { 13 | mounted(el, binding) { 14 | const stores = BtnPermissionStore(); 15 | if (!stores.data.some((v: string) => v === binding.value)) el.parentNode.removeChild(el); 16 | }, 17 | }); 18 | // 多个权限验证,满足一个则显示(v-auths="[xxx,xxx]") 19 | app.directive('auths', { 20 | mounted(el, binding) { 21 | let flag = false; 22 | const stores = BtnPermissionStore(); 23 | stores.data.map((val: string) => { 24 | binding.value.map((v: string) => { 25 | if (val === v) flag = true; 26 | }); 27 | }); 28 | if (!flag) el.parentNode.removeChild(el); 29 | }, 30 | }); 31 | // 多个权限验证,全部满足则显示(v-auth-all="[xxx,xxx]") 32 | app.directive('auth-all', { 33 | mounted(el, binding) { 34 | const stores = BtnPermissionStore(); 35 | const flag = judementSameArr(binding.value, stores.data); 36 | if (!flag) el.parentNode.removeChild(el); 37 | }, 38 | }); 39 | } 40 | -------------------------------------------------------------------------------- /web/src/directive/index.ts: -------------------------------------------------------------------------------- 1 | import type { App } from 'vue'; 2 | import { authDirective } from '/@/directive/authDirective'; 3 | import { wavesDirective, dragDirective } from '/@/directive/customDirective'; 4 | import {resizeObDirective} from '/@/directive/sizeDirective' 5 | /** 6 | * 导出指令方法:v-xxx 7 | * @methods authDirective 用户权限指令,用法:v-auth 8 | * @methods wavesDirective 按钮波浪指令,用法:v-waves 9 | * @methods dragDirective 自定义拖动指令,用法:v-drag 10 | */ 11 | export function directive(app: App) { 12 | // 用户权限指令 13 | authDirective(app); 14 | // 按钮波浪指令 15 | wavesDirective(app); 16 | // 自定义拖动指令 17 | dragDirective(app); 18 | // 监听窗口大小变化 19 | resizeObDirective(app) 20 | } 21 | -------------------------------------------------------------------------------- /web/src/directive/sizeDirective.ts: -------------------------------------------------------------------------------- 1 | import {App} from "vue/dist/vue"; 2 | 3 | const map = new WeakMap() 4 | const ob = new ResizeObserver((entries) => { 5 | for(const entry of entries){ 6 | const handler = map.get(entry.target); 7 | handler && handler({ 8 | width: entry.borderBoxSize[0].inlineSize, 9 | height: entry.borderBoxSize[0].blockSize 10 | }); 11 | } 12 | }); 13 | export function resizeObDirective(app: App){ 14 | app.directive('resizeOb', { 15 | mounted(el,binding) { 16 | map.set(el,binding.value); 17 | ob.observe(el); // 监听目标元素 18 | }, 19 | unmounted(el) { 20 | ob.unobserve(el); // 停止监听 21 | }, 22 | }) 23 | } 24 | -------------------------------------------------------------------------------- /web/src/i18n/pages/formI18n/en.ts: -------------------------------------------------------------------------------- 1 | // 定义内容 2 | export default { 3 | formI18nLabel: { 4 | name: 'name', 5 | email: 'email', 6 | autograph: 'autograph', 7 | }, 8 | formI18nPlaceholder: { 9 | name: 'Please enter your name', 10 | email: 'Please enter the users Department', 11 | autograph: 'Please enter the login account name', 12 | }, 13 | }; 14 | -------------------------------------------------------------------------------- /web/src/i18n/pages/formI18n/zh-cn.ts: -------------------------------------------------------------------------------- 1 | // 定义内容 2 | export default { 3 | formI18nLabel: { 4 | name: '姓名', 5 | email: '用户归属部门', 6 | autograph: '登陆账户名', 7 | }, 8 | formI18nPlaceholder: { 9 | name: '请输入姓名', 10 | email: '请输入用户归属部门', 11 | autograph: '请输入登陆账户名', 12 | }, 13 | }; 14 | -------------------------------------------------------------------------------- /web/src/i18n/pages/formI18n/zh-tw.ts: -------------------------------------------------------------------------------- 1 | // 定义内容 2 | export default { 3 | formI18nLabel: { 4 | name: '姓名', 5 | email: '用戶歸屬部門', 6 | autograph: '登入帳戶名', 7 | }, 8 | formI18nPlaceholder: { 9 | name: '請輸入姓名', 10 | email: '請輸入用戶歸屬部門', 11 | autograph: '請輸入登入帳戶名', 12 | }, 13 | }; 14 | -------------------------------------------------------------------------------- /web/src/i18n/pages/login/en.ts: -------------------------------------------------------------------------------- 1 | // 定义内容 2 | export default { 3 | label: { 4 | one1: 'User name login', 5 | two2: 'Mobile number', 6 | changePwd: 'Change The Password', 7 | }, 8 | link: { 9 | one3: 'Third party login', 10 | two4: 'Links', 11 | }, 12 | account: { 13 | accountPlaceholder1: 'Please enter your login account', 14 | accountPlaceholder2: 'Please enter your login password', 15 | accountPlaceholder3: 'Please enter the verification code', 16 | accountBtnText: 'Sign in', 17 | }, 18 | mobile: { 19 | placeholder1: 'Please input mobile phone number', 20 | placeholder2: 'Please enter the verification code', 21 | codeText: 'Get code', 22 | btnText: 'Sign in', 23 | msgText: 24 | 'Warm tip: it is recommended to use Google, Microsoft edge, version 79.0.1072.62 and above browsers, and 360 browser, please use speed mode', 25 | }, 26 | scan: { 27 | text: 'Open the mobile phone to scan and quickly log in / register', 28 | }, 29 | signInText: 'welcome back!', 30 | }; 31 | -------------------------------------------------------------------------------- /web/src/i18n/pages/login/zh-cn.ts: -------------------------------------------------------------------------------- 1 | // 定义内容 2 | export default { 3 | label: { 4 | one1: '账号密码登录', 5 | two2: '手机号登录', 6 | changePwd: '密码修改', 7 | }, 8 | link: { 9 | one3: '第三方登录', 10 | two4: '友情链接', 11 | }, 12 | account: { 13 | accountPlaceholder1: '请输入登录账号/邮箱/手机号', 14 | accountPlaceholder2: '请输入登录密码', 15 | accountPlaceholder3: '请输入验证码', 16 | accountPlaceholder4:'请输入新密码', 17 | accountPlaceholder5:'请再次输入新密码', 18 | accountBtnText: '登 录', 19 | }, 20 | mobile: { 21 | placeholder1: '请输入手机号', 22 | placeholder2: '请输入验证码', 23 | codeText: '获取验证码', 24 | btnText: '登 录', 25 | msgText: '* 温馨提示:建议使用谷歌、Microsoft Edge,版本 79.0.1072.62 及以上浏览器,360浏览器请使用极速模式', 26 | }, 27 | scan: { 28 | text: '打开手机扫一扫,快速登录/注册', 29 | }, 30 | signInText: '欢迎回来!', 31 | }; 32 | -------------------------------------------------------------------------------- /web/src/i18n/pages/login/zh-tw.ts: -------------------------------------------------------------------------------- 1 | // 定义内容 2 | export default { 3 | label: { 4 | one1: '用戶名登入', 5 | two2: '手機號登入', 6 | changePwd: '密码修改', 7 | }, 8 | link: { 9 | one3: '協力廠商登入', 10 | two4: '友情連結', 11 | }, 12 | account: { 13 | accountPlaceholder1: '請輸入登入賬號', 14 | accountPlaceholder2: '請輸入登入密碼', 15 | accountPlaceholder3: '請輸入驗證碼', 16 | accountBtnText: '登入', 17 | }, 18 | mobile: { 19 | placeholder1: '請輸入手機號', 20 | placeholder2: '請輸入驗證碼', 21 | codeText: '獲取驗證碼', 22 | btnText: '登入', 23 | msgText: '* 溫馨提示:建議使用穀歌、Microsoft Edge,版本79.0.1072.62及以上瀏覽器,360瀏覽器請使用極速模式', 24 | }, 25 | scan: { 26 | text: '打開手機掃一掃,快速登錄/注册', 27 | }, 28 | signInText: '歡迎回來!', 29 | }; 30 | -------------------------------------------------------------------------------- /web/src/layout/component/header.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 19 | -------------------------------------------------------------------------------- /web/src/layout/footer/index.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 12 | 13 | 25 | -------------------------------------------------------------------------------- /web/src/layout/navBars/breadcrumb/closeFull.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 22 | 23 | 54 | -------------------------------------------------------------------------------- /web/src/layout/navBars/index.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 27 | 28 | 36 | -------------------------------------------------------------------------------- /web/src/plugin/permission/directive.permission.ts: -------------------------------------------------------------------------------- 1 | import permissionUtil from './func.permission' 2 | export default { 3 | mounted (el:any, binding:any) { 4 | const { value } = binding 5 | const hasPermission = permissionUtil.hasPermissions(value) 6 | if (!hasPermission) { 7 | el.parentNode && el.parentNode.removeChild(el) 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /web/src/plugin/permission/func.permission.ts: -------------------------------------------------------------------------------- 1 | import XEUtils from 'xe-utils' 2 | import {BtnPermissionStore} from "/@/plugin/permission/store.permission"; 3 | 4 | export default { 5 | hasPermissions (value:string | string[]) { 6 | const BtnPermission = BtnPermissionStore().data 7 | if (import.meta.env.VITE_PM_ENABLED) { 8 | if(value instanceof Array){ 9 | return XEUtils.includeArrays(BtnPermission, value) 10 | }else if(typeof value === 'string'){ 11 | const index = XEUtils.arrayIndexOf(BtnPermission, value) 12 | return index>-1?true:false 13 | } 14 | } 15 | return true 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /web/src/plugin/permission/index.ts: -------------------------------------------------------------------------------- 1 | import permissionDirective from './directive.permission' 2 | import permissionFunc from './func.permission' 3 | export const RegisterPermission = function (app:any) { 4 | app.directive('permission', permissionDirective) 5 | app.provide('$hasPermissions',permissionFunc.hasPermissions) 6 | } 7 | -------------------------------------------------------------------------------- /web/src/plugin/permission/store.permission.ts: -------------------------------------------------------------------------------- 1 | import {defineStore} from "pinia"; 2 | import {DictionaryStates} from "/@/stores/interface"; 3 | import {request} from "/@/utils/service"; 4 | 5 | export const BtnPermissionStore = defineStore('BtnPermission', { 6 | state: (): DictionaryStates => ({ 7 | data: [] 8 | }), 9 | actions: { 10 | async getBtnPermissionStore() { 11 | request({ 12 | url: '/api/system/menu_button/menu_button_all_permission/', 13 | method: 'get', 14 | }).then((ret: { 15 | data: [] 16 | }) => { 17 | // 转换数据格式并保存到pinia 18 | let dataList = ret.data 19 | this.data=dataList 20 | }) 21 | }, 22 | }, 23 | persist: { 24 | enabled: true, 25 | }, 26 | }); 27 | -------------------------------------------------------------------------------- /web/src/stores/btnPermission.ts: -------------------------------------------------------------------------------- 1 | import {defineStore} from "pinia"; 2 | import {DictionaryStates} from "/@/stores/interface"; 3 | import {request} from "/@/utils/service"; 4 | 5 | export const BtnPermissionStore = defineStore('BtnPermission', { 6 | state: (): DictionaryStates => ({ 7 | data: [] 8 | }), 9 | actions: { 10 | async getBtnPermissionStore() { 11 | request({ 12 | url: '/api/system/menu_button/menu_button_all_permission/', 13 | method: 'get', 14 | }).then((ret: { 15 | data: [] 16 | }) => { 17 | // 转换数据格式并保存到pinia 18 | let dataList = ret.data 19 | this.data=dataList 20 | }) 21 | }, 22 | }, 23 | persist: { 24 | enabled: true, 25 | }, 26 | }); 27 | -------------------------------------------------------------------------------- /web/src/stores/columnPermission.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia'; 2 | 3 | export interface DataItemType { 4 | field_name: string; 5 | is_create: boolean; 6 | is_query: boolean; 7 | is_update: boolean; 8 | } 9 | 10 | export const useColumnPermission = defineStore('columnPermission', { 11 | state: () => ({ 12 | permission: [] as DataItemType[], 13 | }), 14 | 15 | actions: { 16 | setPermissionData(data: DataItemType[]) { 17 | this.permission = data; 18 | }, 19 | }, 20 | }); 21 | -------------------------------------------------------------------------------- /web/src/stores/index.ts: -------------------------------------------------------------------------------- 1 | // https://pinia.vuejs.org/ 2 | import { createPinia } from 'pinia'; 3 | 4 | // 创建 5 | const pinia = createPinia(); 6 | 7 | // 导出 8 | export default pinia; 9 | -------------------------------------------------------------------------------- /web/src/stores/keepAliveNames.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia'; 2 | 3 | /** 4 | * 路由缓存列表 5 | * @methods setCacheKeepAlive 设置要缓存的路由 names(开启 Tagsview) 6 | * @methods addCachedView 添加要缓存的路由 names(关闭 Tagsview) 7 | * @methods delCachedView 删除要缓存的路由 names(关闭 Tagsview) 8 | * @methods delOthersCachedViews 右键菜单`关闭其它`,删除要缓存的路由 names(关闭 Tagsview) 9 | * @methods delAllCachedViews 右键菜单`全部关闭`,删除要缓存的路由 names(关闭 Tagsview) 10 | */ 11 | export const useKeepALiveNames = defineStore('keepALiveNames', { 12 | state: (): KeepAliveNamesState => ({ 13 | keepAliveNames: [], 14 | cachedViews: [], 15 | }), 16 | actions: { 17 | async setCacheKeepAlive(data: Array) { 18 | this.keepAliveNames = data; 19 | }, 20 | async addCachedView(view: any) { 21 | if (view.meta.isKeepAlive) this.cachedViews?.push(view.name); 22 | }, 23 | async delCachedView(view: any) { 24 | const index = this.cachedViews.indexOf(view.name); 25 | index > -1 && this.cachedViews.splice(index, 1); 26 | }, 27 | async delOthersCachedViews(view: any) { 28 | if (view.meta.isKeepAlive) this.cachedViews = [view.name]; 29 | else this.cachedViews = []; 30 | }, 31 | async delAllCachedViews() { 32 | this.cachedViews = []; 33 | }, 34 | }, 35 | }); 36 | -------------------------------------------------------------------------------- /web/src/stores/messageCenter.ts: -------------------------------------------------------------------------------- 1 | import {defineStore} from "pinia"; 2 | /** 3 | * 消息中心 4 | */ 5 | export const messageCenterStore = defineStore('messageCenter', { 6 | state: () => ({ 7 | // 未读消息 8 | unread: 0 9 | }), 10 | actions: { 11 | async setUnread (number:any) { 12 | this.unread = number 13 | } 14 | }, 15 | }); 16 | -------------------------------------------------------------------------------- /web/src/stores/modules/dept.ts: -------------------------------------------------------------------------------- 1 | import {defineStore} from "pinia"; 2 | import {request} from "/@/utils/service"; 3 | import XEUtils from "xe-utils"; 4 | import {toRaw} from 'vue' 5 | export const useDeptInfoStore = defineStore('deptInfo', { 6 | state:()=>( 7 | { 8 | list:[], 9 | tree:[], 10 | } 11 | ), 12 | actions:{ 13 | async requestDeptInfo() { 14 | // 请求部门信息 15 | const ret = await request({ 16 | url: '/api/system/dept/all_dept/' 17 | }) 18 | this.list = ret.data 19 | this.tree = XEUtils.toArrayTree(ret.data,{parentKey:'parent',strict:true}) 20 | }, 21 | async getDeptById(id:any){ 22 | 23 | }, 24 | async getParentDeptById(id: any){ 25 | const tree = toRaw(this.tree) 26 | const obj = XEUtils.findTree(tree, item => item.id == id) 27 | return obj 28 | } 29 | } 30 | }) 31 | -------------------------------------------------------------------------------- /web/src/stores/requestOldRoutes.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia'; 2 | 3 | /** 4 | * 后端返回原始路由(未处理时) 5 | * @methods setCacheKeepAlive 设置接口原始路由数据 6 | */ 7 | export const useRequestOldRoutes = defineStore('requestOldRoutes', { 8 | state: (): RequestOldRoutesState => ({ 9 | requestOldRoutes: [], 10 | }), 11 | actions: { 12 | async setRequestOldRoutes(routes: Array) { 13 | this.requestOldRoutes = routes; 14 | }, 15 | }, 16 | }); 17 | -------------------------------------------------------------------------------- /web/src/stores/routesList.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia'; 2 | 3 | /** 4 | * 路由列表 5 | * @methods setRoutesList 设置路由数据 6 | * @methods setColumnsMenuHover 设置分栏布局菜单鼠标移入 boolean 7 | * @methods setColumnsNavHover 设置分栏布局最左侧导航鼠标移入 boolean 8 | */ 9 | export const useRoutesList = defineStore('routesList', { 10 | state: (): RoutesListState => ({ 11 | routesList: [], 12 | isColumnsMenuHover: false, 13 | isColumnsNavHover: false, 14 | }), 15 | actions: { 16 | async setRoutesList(data: Array) { 17 | this.routesList = data; 18 | }, 19 | async setColumnsMenuHover(bool: Boolean) { 20 | this.isColumnsMenuHover = bool; 21 | }, 22 | async setColumnsNavHover(bool: Boolean) { 23 | this.isColumnsNavHover = bool; 24 | }, 25 | async addRoutesList(data: Array) { 26 | this.routesList.push(data); 27 | } 28 | }, 29 | }); 30 | -------------------------------------------------------------------------------- /web/src/stores/systemConfig.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia'; 2 | import { ConfigStates } from './interface'; 3 | import { request } from '../utils/service'; 4 | export const urlPrefix = '/api/init/settings/'; 5 | 6 | /** 7 | * 系统配置数据 8 | * @methods getSystemConfig 获取系统配置数据 9 | */ 10 | export const SystemConfigStore = defineStore('SystemConfig', { 11 | state: (): ConfigStates => ({ 12 | systemConfig: {}, 13 | }), 14 | actions: { 15 | async getSystemConfigs() { 16 | request({ 17 | url: urlPrefix, 18 | method: 'get', 19 | }).then((ret: { data: [] }) => { 20 | // 转换数据格式并保存到pinia 21 | this.systemConfig = JSON.parse(JSON.stringify(ret.data)); 22 | }); 23 | }, 24 | }, 25 | persist: { 26 | enabled: true, 27 | }, 28 | }); 29 | -------------------------------------------------------------------------------- /web/src/stores/tagsViewRoutes.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia'; 2 | import { Session } from '/@/utils/storage'; 3 | 4 | /** 5 | * TagsView 路由列表 6 | * @methods setTagsViewRoutes 设置 TagsView 路由列表 7 | * @methods setCurrenFullscreen 设置开启/关闭全屏时的 boolean 状态 8 | */ 9 | export const useTagsViewRoutes = defineStore('tagsViewRoutes', { 10 | state: (): TagsViewRoutesState => ({ 11 | tagsViewRoutes: [], 12 | isTagsViewCurrenFull: false, 13 | }), 14 | actions: { 15 | async setTagsViewRoutes(data: Array) { 16 | this.tagsViewRoutes = data; 17 | }, 18 | setCurrenFullscreen(bool: Boolean) { 19 | Session.set('isTagsViewCurrenFull', bool); 20 | this.isTagsViewCurrenFull = bool; 21 | }, 22 | }, 23 | }); 24 | -------------------------------------------------------------------------------- /web/src/theme/fa/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/web/src/theme/fa/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /web/src/theme/fa/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/web/src/theme/fa/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /web/src/theme/fa/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/web/src/theme/fa/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /web/src/theme/fa/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/web/src/theme/fa/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /web/src/theme/fa/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/web/src/theme/fa/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /web/src/theme/fastCrud.scss: -------------------------------------------------------------------------------- 1 | .fs-page { 2 | background-color: rgb(255, 255, 255); 3 | border-radius: 10px; 4 | height: 88vh !important; 5 | } 6 | -------------------------------------------------------------------------------- /web/src/theme/iconSelector.scss: -------------------------------------------------------------------------------- 1 | /* Popover 弹出框(图标选择器) 2 | ------------------------------- */ 3 | .icon-selector-popper { 4 | padding: 0 !important; 5 | .icon-selector-warp { 6 | height: 260px; 7 | overflow: hidden; 8 | position: relative; 9 | .icon-selector-warp-title { 10 | position: absolute; 11 | height: 40px; 12 | line-height: 40px; 13 | left: 15px; 14 | } 15 | .el-tabs__header { 16 | display: flex; 17 | justify-content: flex-end; 18 | padding: 0 15px; 19 | border-bottom: 1px solid var(--el-border-color-light); 20 | margin: 0 !important; 21 | .el-tabs__nav-wrap { 22 | &::after { 23 | height: 0 !important; 24 | } 25 | .el-tabs__item { 26 | padding: 0 5px !important; 27 | } 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /web/src/theme/index.scss: -------------------------------------------------------------------------------- 1 | @import './app.scss'; 2 | @import 'common/transition.scss'; 3 | @import './other.scss'; 4 | @import './element.scss'; 5 | @import './media/media.scss'; 6 | @import './waves.scss'; 7 | @import './dark.scss'; 8 | @import './fa/css/font-awesome.min.css'; 9 | -------------------------------------------------------------------------------- /web/src/theme/media/cityLinkage.scss: -------------------------------------------------------------------------------- 1 | @import './index.scss'; 2 | 3 | /* 页面宽度小于576px 4 | ------------------------------- */ 5 | @media screen and (max-width: $xs) { 6 | .el-cascader__dropdown.el-popper { 7 | overflow: auto; 8 | max-width: 100%; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /web/src/theme/media/date.scss: -------------------------------------------------------------------------------- 1 | @import './index.scss'; 2 | 3 | /* 页面宽度小于768px 4 | ------------------------------- */ 5 | @media screen and (max-width: $sm) { 6 | // 时间选择器适配 7 | .el-date-range-picker { 8 | width: 100vw; 9 | .el-picker-panel__body { 10 | min-width: 100%; 11 | .el-date-range-picker__content { 12 | .el-date-range-picker__header div { 13 | margin-left: 22px; 14 | margin-right: 0px; 15 | } 16 | & + .el-date-range-picker__content { 17 | .el-date-range-picker__header div { 18 | margin-left: 0px; 19 | margin-right: 22px; 20 | } 21 | } 22 | } 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /web/src/theme/media/dialog.scss: -------------------------------------------------------------------------------- 1 | @import './index.scss'; 2 | 3 | /* 页面宽度小于800px 4 | ------------------------------- */ 5 | @media screen and (max-width: 800px) { 6 | .el-dialog { 7 | width: 90% !important; 8 | } 9 | .el-dialog.is-fullscreen { 10 | width: 100% !important; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /web/src/theme/media/error.scss: -------------------------------------------------------------------------------- 1 | @import './index.scss'; 2 | 3 | /* 页面宽度小于768px 4 | ------------------------------- */ 5 | @media screen and (max-width: $sm) { 6 | .error { 7 | .error-flex { 8 | flex-direction: column-reverse !important; 9 | height: auto !important; 10 | width: 100% !important; 11 | } 12 | .right, 13 | .left { 14 | flex: unset !important; 15 | display: flex !important; 16 | } 17 | .left-item { 18 | margin: auto !important; 19 | } 20 | .right img { 21 | max-width: 450px !important; 22 | @extend .left-item; 23 | } 24 | } 25 | } 26 | 27 | /* 页面宽度大于768px小于992px 28 | ------------------------------- */ 29 | @media screen and (min-width: $sm) and (max-width: $md) { 30 | .error { 31 | .error-flex { 32 | padding-left: 30px !important; 33 | } 34 | } 35 | } 36 | 37 | /* 页面宽度小于1200px 38 | ------------------------------- */ 39 | @media screen and (max-width: $lg) { 40 | .error { 41 | .error-flex { 42 | padding: 0 30px; 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /web/src/theme/media/form.scss: -------------------------------------------------------------------------------- 1 | @import './index.scss'; 2 | 3 | /* 页面宽度小于576px 4 | ------------------------------- */ 5 | @media screen and (max-width: $xs) { 6 | .el-form-item__label { 7 | width: 100% !important; 8 | text-align: left !important; 9 | // 移动端 label 右对齐问题 10 | justify-content: flex-start !important; 11 | } 12 | .el-form-item__content { 13 | margin-left: 0 !important; 14 | } 15 | .el-form-item { 16 | // 响应式表单时,登录页需要重新处理 17 | display: unset !important; 18 | } 19 | // 表格演示中的表单筛选 20 | .table-form-btn { 21 | display: flex !important; 22 | .el-form-item__label { 23 | width: auto !important; 24 | } 25 | } 26 | // 表格演示中的表单筛选最大高度,适配移动端 27 | .table-search-container { 28 | max-height: 160px; 29 | overflow: auto; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /web/src/theme/media/home.scss: -------------------------------------------------------------------------------- 1 | @import './index.scss'; 2 | 3 | /* 页面宽度小于768px 4 | ------------------------------- */ 5 | @media screen and (max-width: $sm) { 6 | .home-media, 7 | .home-media-sm { 8 | margin-top: 15px; 9 | } 10 | } 11 | 12 | /* 页面宽度小于1200px 13 | ------------------------------- */ 14 | @media screen and (max-width: $lg) { 15 | .home-media-lg { 16 | margin-top: 15px; 17 | } 18 | .home-monitor { 19 | .flex-warp-item { 20 | width: 33.33% !important; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /web/src/theme/media/index.scss: -------------------------------------------------------------------------------- 1 | /* 栅格布局(媒体查询变量) 2 | * https://developer.mozilla.org/zh-CN/docs/Learn/CSS/CSS_layout/Media_queries 3 | * $us ≥376px 响应式栅格 4 | * $xs ≥576px 响应式栅格 5 | * $sm ≥768px 响应式栅格 6 | * $md ≥992px 响应式栅格 7 | * $lg ≥1200px 响应式栅格 8 | * $xl ≥1920px 响应式栅格 9 | ------------------------------- */ 10 | $us: 376px; 11 | $xs: 576px; 12 | $sm: 768px; 13 | $md: 992px; 14 | $lg: 1200px; 15 | $xl: 1920px; 16 | -------------------------------------------------------------------------------- /web/src/theme/media/layout.scss: -------------------------------------------------------------------------------- 1 | @import './index.scss'; 2 | 3 | /* 页面宽度小于576px 4 | ------------------------------- */ 5 | @media screen and (max-width: $xs) { 6 | // MessageBox 弹框 7 | .el-message-box { 8 | width: 80% !important; 9 | } 10 | } 11 | 12 | /* 页面宽度小于768px 13 | ------------------------------- */ 14 | @media screen and (max-width: $sm) { 15 | // Breadcrumb 面包屑 16 | .layout-navbars-breadcrumb-hide { 17 | display: none; 18 | } 19 | // 外链视图 20 | .layout-view-link { 21 | a { 22 | max-width: 80%; 23 | text-align: center; 24 | } 25 | } 26 | // 菜单搜索 27 | .layout-search-dialog { 28 | .el-autocomplete { 29 | width: 80% !important; 30 | } 31 | } 32 | } 33 | 34 | /* 页面宽度小于1000px 35 | ------------------------------- */ 36 | @media screen and (max-width: 1000px) { 37 | // 布局配置 38 | .layout-drawer-content-flex { 39 | position: relative; 40 | &::after { 41 | content: '手机版不支持切换布局'; 42 | position: absolute; 43 | top: 0; 44 | right: 0; 45 | bottom: 0; 46 | left: 0; 47 | z-index: 1; 48 | text-align: center; 49 | height: 140px; 50 | line-height: 140px; 51 | background: rgba(255, 255, 255, 0.9); 52 | color: #666666; 53 | } 54 | } 55 | // pagination 分页中的工具栏 56 | .table-footer-tool { 57 | display: none !important; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /web/src/theme/media/media.scss: -------------------------------------------------------------------------------- 1 | @import './login.scss'; 2 | @import './error.scss'; 3 | @import './layout.scss'; 4 | @import './personal.scss'; 5 | @import './tagsView.scss'; 6 | @import './home.scss'; 7 | @import './chart.scss'; 8 | @import './form.scss'; 9 | @import './scrollbar.scss'; 10 | @import './pagination.scss'; 11 | @import './dialog.scss'; 12 | @import './cityLinkage.scss'; 13 | @import './date.scss'; 14 | -------------------------------------------------------------------------------- /web/src/theme/media/pagination.scss: -------------------------------------------------------------------------------- 1 | @import './index.scss'; 2 | 3 | /* 页面宽度小于576px 4 | ------------------------------- */ 5 | @media screen and (max-width: $xs) { 6 | .el-pager, 7 | .el-pagination__jump { 8 | display: none !important; 9 | } 10 | // 默认居中对齐 11 | .el-pagination, 12 | .table-footer { 13 | justify-content: center !important; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /web/src/theme/media/personal.scss: -------------------------------------------------------------------------------- 1 | @import './index.scss'; 2 | 3 | /* 页面宽度小于768px 4 | ------------------------------- */ 5 | @media screen and (max-width: $sm) { 6 | .personal-info { 7 | padding-left: 0 !important; 8 | margin-top: 15px; 9 | } 10 | .personal-recommend-col { 11 | margin-bottom: 15px; 12 | &:last-of-type { 13 | margin-bottom: 0; 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /web/src/theme/media/scrollbar.scss: -------------------------------------------------------------------------------- 1 | @import './index.scss'; 2 | 3 | /* 页面宽度小于768px 4 | ------------------------------- */ 5 | @media screen and (max-width: $sm) { 6 | // 滚动条的宽度 7 | ::-webkit-scrollbar { 8 | width: 3px !important; 9 | height: 3px !important; 10 | } 11 | ::-webkit-scrollbar-track-piece { 12 | background-color: var(--next-bg-main-color); 13 | } 14 | // 滚动条的设置 15 | ::-webkit-scrollbar-thumb { 16 | background-color: rgba(144, 147, 153, 0.3); 17 | background-clip: padding-box; 18 | min-height: 28px; 19 | border-radius: 5px; 20 | transition: 0.3s background-color; 21 | } 22 | ::-webkit-scrollbar-thumb:hover { 23 | background-color: rgba(144, 147, 153, 0.5); 24 | } 25 | // element plus scrollbar 26 | .el-scrollbar__bar.is-vertical { 27 | width: 2px !important; 28 | } 29 | .el-scrollbar__bar.is-horizontal { 30 | height: 2px !important; 31 | } 32 | } 33 | 34 | /* 页面宽度大于768px 35 | ------------------------------- */ 36 | @media screen and (min-width: 769px) { 37 | // 滚动条的宽度 38 | ::-webkit-scrollbar { 39 | width: 7px; 40 | height: 7px; 41 | } 42 | ::-webkit-scrollbar-track-piece { 43 | background-color: var(--next-bg-main-color); 44 | } 45 | // 滚动条的设置 46 | ::-webkit-scrollbar-thumb { 47 | background-color: rgba(144, 147, 153, 0.3); 48 | background-clip: padding-box; 49 | min-height: 28px; 50 | border-radius: 5px; 51 | transition: 0.3s background-color; 52 | } 53 | ::-webkit-scrollbar-thumb:hover { 54 | background-color: rgba(144, 147, 153, 0.5); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /web/src/theme/media/tagsView.scss: -------------------------------------------------------------------------------- 1 | @import './index.scss'; 2 | 3 | /* 页面宽度小于768px 4 | ------------------------------- */ 5 | @media screen and (max-width: $sm) { 6 | .tags-view-form { 7 | .tags-view-form-col { 8 | margin-bottom: 20px; 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /web/src/theme/mixins/index.scss: -------------------------------------------------------------------------------- 1 | /* 第三方图标字体间距/大小设置 2 | ------------------------------- */ 3 | @mixin generalIcon { 4 | font-size: 14px !important; 5 | display: inline-block; 6 | vertical-align: middle; 7 | margin-right: 5px; 8 | width: 24px; 9 | text-align: center; 10 | justify-content: center; 11 | } 12 | 13 | /* 文本不换行 14 | ------------------------------- */ 15 | @mixin text-no-wrap() { 16 | text-overflow: ellipsis; 17 | overflow: hidden; 18 | white-space: nowrap; 19 | } 20 | 21 | /* 多行文本溢出 22 | ------------------------------- */ 23 | @mixin text-ellipsis($line: 2) { 24 | overflow: hidden; 25 | word-break: break-all; 26 | text-overflow: ellipsis; 27 | display: -webkit-box; 28 | -webkit-line-clamp: $line; 29 | -webkit-box-orient: vertical; 30 | } 31 | 32 | /* 滚动条(页面未使用) div 中使用: 33 | ------------------------------- */ 34 | // .test { 35 | // @include scrollBar; 36 | // } 37 | @mixin scrollBar { 38 | // 滚动条凹槽的颜色,还可以设置边框属性 39 | &::-webkit-scrollbar-track-piece { 40 | background-color: #f8f8f8; 41 | } 42 | // 滚动条的宽度 43 | &::-webkit-scrollbar { 44 | width: 9px; 45 | height: 9px; 46 | } 47 | // 滚动条的设置 48 | &::-webkit-scrollbar-thumb { 49 | background-color: #dddddd; 50 | background-clip: padding-box; 51 | min-height: 28px; 52 | } 53 | &::-webkit-scrollbar-thumb:hover { 54 | background-color: #bbb; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /web/src/theme/other.scss: -------------------------------------------------------------------------------- 1 | /* wangeditor 富文本编辑器 2 | ------------------------------- */ 3 | .editor-container { 4 | z-index: 10; // 用于 wangeditor 点击全屏时 5 | .w-e-toolbar { 6 | border: 1px solid var(--el-border-color-light, #ebeef5) !important; 7 | border-bottom: 1px solid var(--el-border-color-light, #ebeef5) !important; 8 | border-top-left-radius: 3px; 9 | border-top-right-radius: 3px; 10 | z-index: 2 !important; 11 | } 12 | .w-e-text-container { 13 | border: 1px solid var(--el-border-color-light, #ebeef5) !important; 14 | border-top: none !important; 15 | border-bottom-left-radius: 3px; 16 | border-bottom-right-radius: 3px; 17 | z-index: 1 !important; 18 | } 19 | } 20 | 21 | [data-theme='dark'] { 22 | // textarea - css vars 23 | --w-e-textarea-bg-color: var(--el-color-white) !important; 24 | --w-e-textarea-color: var(--el-text-color-primary) !important; 25 | 26 | // toolbar - css vars 27 | --w-e-toolbar-color: var(--el-text-color-primary) !important; 28 | --w-e-toolbar-bg-color: var(--el-color-white) !important; 29 | --w-e-toolbar-active-color: var(--el-text-color-primary) !important; 30 | --w-e-toolbar-active-bg-color: var(--next-color-menu-hover) !important; 31 | --w-e-toolbar-border-color: var(--el-border-color-light, #ebeef5) !important; 32 | 33 | // modal - css vars 34 | --w-e-modal-button-bg-color: var(--el-color-primary) !important; 35 | --w-e-modal-button-border-color: var(--el-color-primary) !important; 36 | } 37 | -------------------------------------------------------------------------------- /web/src/theme/tableTool.scss: -------------------------------------------------------------------------------- 1 | .table-tool-popper { 2 | padding: 0 !important; 3 | .tool-box { 4 | display: flex; 5 | border-bottom: 1px solid var(--el-border-color-lighter); 6 | box-sizing: border-box; 7 | color: var(--el-text-color-primary); 8 | height: 40px; 9 | align-items: center; 10 | } 11 | .tool-sortable { 12 | max-height: 303px; 13 | .tool-sortable-item { 14 | display: flex; 15 | box-sizing: border-box; 16 | color: var(--el-text-color-primary); 17 | align-items: center; 18 | padding: 0 12px; 19 | &:hover { 20 | background: var(--el-fill-color-lighter); 21 | } 22 | i { 23 | opacity: 0.7; 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /web/src/types/axios.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import * as axios from 'axios'; 3 | 4 | // 扩展 axios 数据返回类型,可自行扩展 5 | declare module 'axios' { 6 | export interface AxiosResponse { 7 | code: number; 8 | data: T; 9 | message: string; 10 | type?: string; 11 | [key: string]: T; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /web/src/types/layout.d.ts: -------------------------------------------------------------------------------- 1 | // aside 2 | declare type AsideState = { 3 | menuList: RouteRecordRaw[]; 4 | clientWidth: number; 5 | }; 6 | 7 | // columnsAside 8 | declare type ColumnsAsideState = { 9 | columnsAsideList: T[]; 10 | liIndex: number; 11 | liOldIndex: null | number; 12 | liHoverIndex: null | number; 13 | liOldPath: null | string; 14 | difference: number; 15 | routeSplit: string[]; 16 | }; 17 | 18 | // navBars breadcrumb 19 | declare type BreadcrumbState = { 20 | breadcrumbList: T[]; 21 | routeSplit: string[]; 22 | routeSplitFirst: string; 23 | routeSplitIndex: number; 24 | }; 25 | 26 | // navBars search 27 | declare type SearchState = { 28 | isShowSearch: boolean; 29 | menuQuery: string; 30 | tagsViewList: T[]; 31 | }; 32 | 33 | // navBars tagsView 34 | declare type TagsViewState = { 35 | routeActive: string | T; 36 | routePath: string | unknown; 37 | dropdown: { 38 | x: string | number; 39 | y: string | number; 40 | }; 41 | sortable: T; 42 | tagsRefsIndex: number; 43 | tagsViewList: T[]; 44 | tagsViewRoutesList: T[]; 45 | }; 46 | 47 | // navBars parent 48 | declare type ParentViewState = { 49 | refreshRouterViewKey: string; 50 | iframeRefreshKey: string; 51 | keepAliveNameList: string[]; 52 | iframeList: T[]; 53 | }; 54 | 55 | // navBars link 56 | declare type LinkViewState = { 57 | title: string; 58 | isLink: string; 59 | query: any; 60 | }; 61 | -------------------------------------------------------------------------------- /web/src/types/mitt.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * mitt 事件类型定义 3 | * 4 | * @method openSetingsDrawer 打开布局设置弹窗 5 | * @method restoreDefault 分栏布局,鼠标移入、移出数据显示 6 | * @method setSendColumnsChildren 分栏布局,鼠标移入、移出菜单数据传入到 navMenu 下的菜单中 7 | * @method setSendClassicChildren 经典布局,开启切割菜单时,菜单数据传入到 navMenu 下的菜单中 8 | * @method getBreadcrumbIndexSetFilterRoutes 布局设置弹窗,开启切割菜单时,菜单数据传入到 navMenu 下的菜单中 9 | * @method layoutMobileResize 浏览器窗口改变时,用于适配移动端界面显示 10 | * @method openOrCloseSortable 布局设置弹窗,开启 TagsView 拖拽 11 | * @method openShareTagsView 布局设置弹窗,开启 TagsView 共用 12 | * @method onTagsViewRefreshRouterView tagsview 刷新界面 13 | * @method onCurrentContextmenuClick tagsview 右键菜单每项点击时 14 | */ 15 | declare type MittType = { 16 | openSetingsDrawer?: string; 17 | restoreDefault?: string; 18 | setSendColumnsChildren: T; 19 | setSendClassicChildren: T; 20 | getBreadcrumbIndexSetFilterRoutes?: string; 21 | layoutMobileResize: T; 22 | openOrCloseSortable?: string; 23 | openShareTagsView?: string; 24 | onTagsViewRefreshRouterView?: T; 25 | onCurrentContextmenuClick?: T; 26 | }; 27 | 28 | // mitt 参数类型定义 29 | declare type LayoutMobileResize = { 30 | layout: string; 31 | clientWidth: number; 32 | }; 33 | 34 | // mitt 参数菜单类型 35 | declare type MittMenu = { 36 | children: RouteRecordRaw[]; 37 | item?: RouteItem; 38 | }; 39 | -------------------------------------------------------------------------------- /web/src/utils/authFunction.ts: -------------------------------------------------------------------------------- 1 | import { judementSameArr } from '/@/utils/arrayOperation'; 2 | import {BtnPermissionStore} from "/@/stores/btnPermission"; 3 | /** 4 | * 单个权限验证 5 | * @param value 权限值 6 | * @returns 有权限,返回 `true`,反之则反 7 | */ 8 | export function auth(value: string): boolean { 9 | const stores = BtnPermissionStore(); 10 | return stores.data.some((v: string) => v === value); 11 | } 12 | 13 | /** 14 | * 多个权限验证,满足一个则为 true 15 | * @param value 权限值 16 | * @returns 有权限,返回 `true`,反之则反 17 | */ 18 | export function auths(value: Array): boolean { 19 | let flag = false; 20 | const stores = BtnPermissionStore(); 21 | stores.data.map((val: string) => { 22 | value.map((v: string) => { 23 | if (val === v) flag = true; 24 | }); 25 | }); 26 | return flag; 27 | } 28 | 29 | /** 30 | * 多个权限验证,全部满足则为 true 31 | * @param value 权限值 32 | * @returns 有权限,返回 `true`,反之则反 33 | */ 34 | export function authAll(value: Array): boolean { 35 | const stores = BtnPermissionStore(); 36 | return judementSameArr(value, stores.data); 37 | } 38 | -------------------------------------------------------------------------------- /web/src/utils/columnPermission.ts: -------------------------------------------------------------------------------- 1 | import XEUtils from 'xe-utils'; 2 | import {useColumnPermission} from '/@/stores/columnPermission'; 3 | 4 | type permissionType = 'is_create' | 'is_query' | 'is_update'; 5 | 6 | export const columnPermission = (key: string, type: permissionType): boolean => { 7 | const permissions = useColumnPermission().permission || []; 8 | 9 | return !!permissions.some((i) => i.field_name === key && i[type]); 10 | }; 11 | 12 | /** 13 | * 处理字段信息权限 14 | * @param func 获取字段信息的接口函数 15 | * @param crudOptions 原始的crudOptions信息 16 | * @param excludeColumn 需要排除的列 17 | */ 18 | export const handleColumnPermission = async (func: Function, crudOptions: any,excludeColumn:string[]=[]) => { 19 | const res = await func(); 20 | if(crudOptions.pagination==undefined){ 21 | crudOptions['pagination'] = { 22 | show:true 23 | } 24 | } 25 | const columns = crudOptions.columns; 26 | const excludeColumns = ['checked','_index','id', 'create_datetime', 'update_datetime'].concat(excludeColumn) 27 | XEUtils.eachTree(columns, (item, key) => { 28 | if (!excludeColumns.includes(String(key)) && key in res.data) { 29 | // 如果列表不可见,则禁止在列设置中选择 30 | // 只有列表不可见,才修改列配置,这样才不影响默认的配置 31 | if (!res.data[key]['is_query']) { 32 | item.column.show = false; 33 | item.column.columnSetDisabled = true; 34 | } 35 | item.addForm = { show: res.data[key]['is_create'] }; 36 | item.editForm = { show: res.data[key]['is_update'] }; 37 | } 38 | }); 39 | return crudOptions 40 | } 41 | -------------------------------------------------------------------------------- /web/src/utils/cores.tsx: -------------------------------------------------------------------------------- 1 | import mitt, { Emitter } from 'mitt'; 2 | 3 | export interface TaskProps { 4 | name: string; 5 | custom?: any; 6 | } 7 | 8 | // 定义自定义事件类型 9 | export type BusEvents = { 10 | onNewTask: TaskProps | undefined; 11 | }; 12 | 13 | export interface Task { 14 | id: number; 15 | handle: string; 16 | data: any; 17 | createTime: Date; 18 | custom?: any; 19 | } 20 | 21 | export interface Core { 22 | bus: Emitter; 23 | // eslint-disable-next-line no-unused-vars 24 | showNotification(body: string, title?: string): Notification | undefined; 25 | taskList: Map; 26 | } 27 | 28 | const bus = mitt(); 29 | export function getSystemNotification(body: string, title?: string) { 30 | if (!title) { 31 | title = '通知'; 32 | } 33 | return new Notification(title ?? '通知', { 34 | body: body, 35 | }); 36 | } 37 | export function showSystemNotification(body: string, title?: string): Notification | undefined { 38 | if (Notification.permission === 'granted') { 39 | return getSystemNotification(body, title); 40 | } else if (Notification.permission !== 'denied') { 41 | Notification.requestPermission().then((permission) => { 42 | if (permission === 'granted') { 43 | return getSystemNotification(body, title); 44 | } 45 | }); 46 | } 47 | return void 0; 48 | } 49 | const taskList = new Map(); 50 | 51 | export function useCore(): Core { 52 | return { 53 | bus, 54 | showNotification: showSystemNotification, 55 | taskList, 56 | }; 57 | } 58 | -------------------------------------------------------------------------------- /web/src/utils/dictionary.ts: -------------------------------------------------------------------------------- 1 | import { toRaw } from 'vue'; 2 | import { DictionaryStore } from '/@/stores/dictionary'; 3 | 4 | /** 5 | * @method 获取指定name字典 6 | */ 7 | export const dictionary = (name: string,key?:string|number|undefined) => { 8 | const dict = DictionaryStore() 9 | const dictionary = toRaw(dict.data) 10 | if(key!=undefined){ 11 | const obj = dictionary[name].find((item:any) => item.value === key) 12 | return obj?obj.label:'' 13 | }else{ 14 | return dictionary[name] 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /web/src/utils/loading.ts: -------------------------------------------------------------------------------- 1 | import { nextTick } from 'vue'; 2 | import '/@/theme/loading.scss'; 3 | import { showUpgrade } from "/@/utils/upgrade"; 4 | 5 | 6 | /** 7 | * 页面全局 Loading 8 | * @method start 创建 loading 9 | * @method done 移除 loading 10 | */ 11 | export const NextLoading = { 12 | // 创建 loading 13 | start: () => { 14 | // 显示升级提示 15 | showUpgrade() 16 | const bodys: Element = document.body; 17 | const div = document.createElement('div'); 18 | div.setAttribute('class', 'loading-next'); 19 | const htmls = ` 20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 | `; 34 | div.innerHTML = htmls; 35 | bodys.insertBefore(div, bodys.childNodes[0]); 36 | window.nextLoading = true; 37 | }, 38 | // 移除 loading 39 | done: (time: number = 0) => { 40 | nextTick(() => { 41 | setTimeout(() => { 42 | window.nextLoading = false; 43 | const el = document.querySelector('.loading-next'); 44 | el?.parentNode?.removeChild(el); 45 | }, time); 46 | }); 47 | }, 48 | }; 49 | -------------------------------------------------------------------------------- /web/src/utils/message.ts: -------------------------------------------------------------------------------- 1 | import { ElMessage, ElNotification, MessageOptions } from 'element-plus'; 2 | 3 | export function message(message: string, option?: MessageOptions) { 4 | ElMessage({ message, ...option }); 5 | } 6 | export function successMessage(message: string, option?: MessageOptions) { 7 | ElMessage({ message, type: 'success' }); 8 | } 9 | export function warningMessage(message: string, option?: MessageOptions) { 10 | ElMessage({ message, ...option, type: 'warning' }); 11 | } 12 | export function errorMessage(message: string, option?: MessageOptions) { 13 | ElMessage({ message, ...option, type: 'error' }); 14 | } 15 | export function infoMessage(message: string, option?: MessageOptions) { 16 | ElMessage({ message, ...option, type: 'info' }); 17 | } 18 | 19 | export function notification(message: string) { 20 | ElNotification({ message }); 21 | } 22 | export function successNotification(message: string) { 23 | ElNotification({ message, type: 'success' }); 24 | } 25 | export function warningNotification(message: string) { 26 | ElNotification({ message, type: 'warning' }); 27 | } 28 | export function errorNotification(message: string) { 29 | ElNotification({ message, type: 'error' }); 30 | } 31 | export function infoNotification(message: string) { 32 | ElNotification({ message, type: 'info' }); 33 | } 34 | -------------------------------------------------------------------------------- /web/src/utils/mitt.ts: -------------------------------------------------------------------------------- 1 | // https://www.npmjs.com/package/mitt 2 | import mitt, { Emitter } from 'mitt'; 3 | 4 | // 类型 5 | const emitter: Emitter = mitt(); 6 | 7 | // 导出 8 | export default emitter; 9 | -------------------------------------------------------------------------------- /web/src/utils/setIconfont.ts: -------------------------------------------------------------------------------- 1 | // 字体图标 url 2 | const cssCdnUrlList: Array = [ 3 | '//at.alicdn.com/t/font_2298093_y6u00apwst.css', 4 | '//at.alicdn.com/t/c/font_3882322_9ah7y8m9175.css', //dvadmin3项目用icon 5 | //'//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' 6 | ]; 7 | // 第三方 js url 8 | const jsCdnUrlList: Array = []; 9 | 10 | // 动态批量设置字体图标 11 | export function setCssCdn() { 12 | if (cssCdnUrlList.length <= 0) return false; 13 | cssCdnUrlList.map((v) => { 14 | let link = document.createElement('link'); 15 | link.rel = 'stylesheet'; 16 | link.href = v; 17 | link.crossOrigin = 'anonymous'; 18 | document.getElementsByTagName('head')[0].appendChild(link); 19 | }); 20 | } 21 | 22 | // 动态批量设置第三方js 23 | export function setJsCdn() { 24 | if (jsCdnUrlList.length <= 0) return false; 25 | jsCdnUrlList.map((v) => { 26 | let link = document.createElement('script'); 27 | link.src = v; 28 | document.body.appendChild(link); 29 | }); 30 | } 31 | 32 | /** 33 | * 批量设置字体图标、动态js 34 | * @method cssCdn 动态批量设置字体图标 35 | * @method jsCdn 动态批量设置第三方js 36 | */ 37 | const setIntroduction = { 38 | // 设置css 39 | cssCdn: () => { 40 | setCssCdn(); 41 | }, 42 | // 设置js 43 | jsCdn: () => { 44 | setJsCdn(); 45 | }, 46 | }; 47 | 48 | // 导出函数方法 49 | export default setIntroduction; 50 | -------------------------------------------------------------------------------- /web/src/utils/storage.ts: -------------------------------------------------------------------------------- 1 | import Cookies from 'js-cookie'; 2 | 3 | /** 4 | * window.localStorage 浏览器永久缓存 5 | * @method set 设置永久缓存 6 | * @method get 获取永久缓存 7 | * @method remove 移除永久缓存 8 | * @method clear 移除全部永久缓存 9 | */ 10 | export const Local = { 11 | // 设置永久缓存 12 | set(key: string, val: any) { 13 | window.localStorage.setItem(key, JSON.stringify(val)); 14 | }, 15 | // 获取永久缓存 16 | get(key: string) { 17 | let json = window.localStorage.getItem(key); 18 | return JSON.parse(json); 19 | }, 20 | // 移除永久缓存 21 | remove(key: string) { 22 | window.localStorage.removeItem(key); 23 | }, 24 | // 移除全部永久缓存 25 | clear() { 26 | window.localStorage.clear(); 27 | }, 28 | }; 29 | 30 | /** 31 | * window.sessionStorage 浏览器临时缓存 32 | * @method set 设置临时缓存 33 | * @method get 获取临时缓存 34 | * @method remove 移除临时缓存 35 | * @method clear 移除全部临时缓存 36 | */ 37 | export const Session = { 38 | // 设置临时缓存 39 | set(key: string, val: any) { 40 | if (key === 'token') return Cookies.set(key, val); 41 | window.sessionStorage.setItem(key, JSON.stringify(val)); 42 | }, 43 | // 获取临时缓存 44 | get(key: string) { 45 | if (key === 'token') return Cookies.get(key); 46 | let json = window.sessionStorage.getItem(key); 47 | return JSON.parse(json); 48 | }, 49 | // 移除临时缓存 50 | remove(key: string) { 51 | if (key === 'token') return Cookies.remove(key); 52 | window.sessionStorage.removeItem(key); 53 | }, 54 | // 移除全部临时缓存 55 | clear() { 56 | Cookies.remove('token'); 57 | window.sessionStorage.clear(); 58 | }, 59 | }; 60 | -------------------------------------------------------------------------------- /web/src/views/interface/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * 后端API接口响应数据 4 | */ 5 | interface APIResponseData { 6 | code?: number; 7 | data: []; 8 | msg?: string; 9 | } 10 | -------------------------------------------------------------------------------- /web/src/views/plugins/index.ts: -------------------------------------------------------------------------------- 1 | import { defineAsyncComponent, AsyncComponentLoader } from 'vue'; 2 | export let pluginsAll: any = []; 3 | // 扫描插件目录并注册插件 4 | export const scanAndInstallPlugins = (app: any) => { 5 | const components = import.meta.glob('./**/*.ts'); 6 | const pluginNames = new Set(); 7 | // 遍历对象并注册异步组件 8 | for (const [key, value] of Object.entries(components)) { 9 | const name = key.slice(key.lastIndexOf('/') + 1, key.lastIndexOf('.')); 10 | app.component(name, defineAsyncComponent(value as AsyncComponentLoader)); 11 | const pluginsName = key.match(/\/([^\/]*)\//)?.[1]; 12 | pluginNames.add(pluginsName); 13 | } 14 | const dreamComponents = import.meta.glob('/node_modules/@great-dream/**/*.ts'); 15 | // 遍历对象并注册异步组件 16 | for (let [key, value] of Object.entries(dreamComponents)) { 17 | key = key.replace('node_modules/@great-dream/', ''); 18 | const name = key.slice(key.lastIndexOf('/') + 1, key.lastIndexOf('.')); 19 | app.component(name, defineAsyncComponent(value as AsyncComponentLoader)); 20 | const pluginsName = key.match(/\/([^\/]*)\//)?.[1]; 21 | pluginNames.add(pluginsName); 22 | } 23 | pluginsAll = Array.from(pluginNames); 24 | console.log('已发现插件:', pluginsAll); 25 | for (const pluginName of pluginsAll) { 26 | const plugin = import(`./${pluginName}/index.ts`); 27 | plugin.then((module) => { 28 | app.use(module.default) 29 | console.log(`${pluginName}插件已加载`) 30 | }).catch((error) => { 31 | console.log(`${pluginName}插件下无index.ts`) 32 | }) 33 | } 34 | }; 35 | -------------------------------------------------------------------------------- /web/src/views/system/areas/api.ts: -------------------------------------------------------------------------------- 1 | import { request } from '/@/utils/service'; 2 | import { UserPageQuery, AddReq, DelReq, EditReq, InfoReq } from '@fast-crud/fast-crud'; 3 | 4 | export const apiPrefix = '/api/system/area/'; 5 | export function GetList(query: UserPageQuery) { 6 | return request({ 7 | url: apiPrefix, 8 | method: 'get', 9 | params: query, 10 | }); 11 | } 12 | export function GetObj(id: InfoReq) { 13 | return request({ 14 | url: apiPrefix + id, 15 | method: 'get', 16 | }); 17 | } 18 | 19 | export function AddObj(obj: AddReq) { 20 | return request({ 21 | url: apiPrefix, 22 | method: 'post', 23 | data: obj, 24 | }); 25 | } 26 | 27 | export function UpdateObj(obj: EditReq) { 28 | return request({ 29 | url: apiPrefix + obj.id + '/', 30 | method: 'put', 31 | data: obj, 32 | }); 33 | } 34 | 35 | export function DelObj(id: DelReq) { 36 | return request({ 37 | url: apiPrefix + id + '/', 38 | method: 'delete', 39 | data: { id }, 40 | }); 41 | } 42 | export function GetPermission() { 43 | return request({ 44 | url: apiPrefix + 'field_permission/', 45 | method: 'get', 46 | }); 47 | } 48 | -------------------------------------------------------------------------------- /web/src/views/system/areas/index.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 26 | -------------------------------------------------------------------------------- /web/src/views/system/columns/api.ts: -------------------------------------------------------------------------------- 1 | import { request } from '/@/utils/service'; 2 | import { PageQuery } from './types' 3 | 4 | export function getRoleList(query: PageQuery) { 5 | return request({ 6 | url: '/api/system/role/', 7 | method: 'get', 8 | params: query, 9 | }); 10 | } 11 | 12 | export function getMenuList(query: PageQuery) { 13 | return request({ 14 | url: '/api/system/menu/', 15 | method: 'get', 16 | params: {is_catalog:0,...query}, 17 | }); 18 | } 19 | 20 | export function getModelList() { 21 | return request({ 22 | url: '/api/system/column/get_models/', 23 | method: 'get', 24 | }); 25 | } 26 | -------------------------------------------------------------------------------- /web/src/views/system/columns/components/ColumnsTableCom/api.ts: -------------------------------------------------------------------------------- 1 | import { request } from '/@/utils/service'; 2 | import { CurrentInfoType, AddColumnsDataType } from '../../types' 3 | 4 | export function getColumnsData(query: any) { 5 | return request({ 6 | url: '/api/system/column/', 7 | method: 'get', 8 | params: query, 9 | }); 10 | } 11 | 12 | export function automatchColumnsData(data: CurrentInfoType) { 13 | return request({ 14 | url: '/api/system/column/auto_match_fields/', 15 | method: 'post', 16 | data, 17 | }); 18 | } 19 | 20 | export function addColumnsData(data: AddColumnsDataType) { 21 | return request({ 22 | url: '/api/system/column/', 23 | method: 'post', 24 | data 25 | }); 26 | } 27 | 28 | export function deleteColumnsData(id: number) { 29 | return request({ 30 | url: `/api/system/column/${id}/`, 31 | method: 'delete', 32 | }); 33 | } 34 | 35 | export function updateColumnsData(data: AddColumnsDataType) { 36 | return request({ 37 | url: `/api/system/column/${data.id}/`, 38 | method: 'put', 39 | data 40 | }); 41 | } 42 | -------------------------------------------------------------------------------- /web/src/views/system/columns/components/ItemCom/types.ts: -------------------------------------------------------------------------------- 1 | export interface PageQuery { 2 | page: number; 3 | limit: number; 4 | } 5 | 6 | export interface RoleItemType { 7 | id: number | string; 8 | modifier_name: string; 9 | creator_name: string; 10 | create_datetime: string; 11 | update_datetime: string; 12 | description: string; 13 | modifier: string; 14 | dept_belong_id: number | string | null, 15 | name: string; 16 | key: string; 17 | sort: number; 18 | status: boolean; 19 | admin: boolean; 20 | creator: string; 21 | } 22 | 23 | export interface RoleInfoStateType { 24 | current: string; 25 | page: number; 26 | limit: number; 27 | data: any[], 28 | total: number; 29 | } -------------------------------------------------------------------------------- /web/src/views/system/columns/types.ts: -------------------------------------------------------------------------------- 1 | export interface PageQuery { 2 | page: number; 3 | limit: number; 4 | } 5 | 6 | export interface APIResponseData { 7 | code?: number; 8 | data: any; 9 | msg?: string; 10 | } 11 | 12 | export interface CurrentInfoType { 13 | role: string; 14 | model: string; 15 | app: string; 16 | 17 | menu: string; 18 | } 19 | 20 | export interface ModelItemType { 21 | app: string; 22 | key: string; 23 | title: string; 24 | showText?: string; 25 | } 26 | 27 | export interface AddColumnsDataType extends CurrentInfoType { 28 | id?: number | string; 29 | field_name: string; 30 | title: string; 31 | is_query: boolean; 32 | is_create: boolean; 33 | is_update: boolean; 34 | } 35 | 36 | export interface ColumnsFormDataType { 37 | id?: number | string; 38 | field_name: string; 39 | title: string; 40 | is_create: boolean; 41 | is_update: boolean; 42 | is_query: boolean; 43 | } 44 | -------------------------------------------------------------------------------- /web/src/views/system/config/api.ts: -------------------------------------------------------------------------------- 1 | import { request } from '/@/utils/service'; 2 | import { UserPageQuery, AddReq, DelReq, EditReq, InfoReq } from '@fast-crud/fast-crud'; 3 | import XEUtils from 'xe-utils'; 4 | 5 | export const apiPrefix = '/api/system/system_config/'; 6 | export function GetList(query: UserPageQuery) { 7 | return request({ 8 | url: apiPrefix, 9 | method: 'get', 10 | params: query, 11 | }); 12 | } 13 | export function GetObj(id: InfoReq) { 14 | return request({ 15 | url: apiPrefix + id, 16 | method: 'get', 17 | }); 18 | } 19 | 20 | export function AddObj(obj: AddReq) { 21 | return request({ 22 | url: apiPrefix, 23 | method: 'post', 24 | data: obj, 25 | }); 26 | } 27 | 28 | export function UpdateObj(obj: EditReq) { 29 | return request({ 30 | url: apiPrefix + obj.id + '/', 31 | method: 'put', 32 | data: obj, 33 | }); 34 | } 35 | 36 | export function DelObj(id: DelReq) { 37 | return request({ 38 | url: apiPrefix + id + '/', 39 | method: 'delete', 40 | data: { id }, 41 | }); 42 | } 43 | 44 | /* 45 | 获取所有的model及字段信息 46 | */ 47 | export function GetAssociationTable() { 48 | return request({ 49 | url: apiPrefix + 'get_association_table/', 50 | method: 'get', 51 | params: {}, 52 | }); 53 | } 54 | 55 | export function saveContent(data: any) { 56 | return request({ 57 | url: apiPrefix + 'save_content/', 58 | method: 'put', 59 | data: data, 60 | }); 61 | } 62 | -------------------------------------------------------------------------------- /web/src/views/system/demo/api.ts: -------------------------------------------------------------------------------- 1 | import { request } from '/@/utils/service'; 2 | import { UserPageQuery, AddReq, DelReq, EditReq, InfoReq } from '@fast-crud/fast-crud'; 3 | 4 | export const apiPrefix = '/api/system/login_log/'; 5 | export function GetList(query: UserPageQuery) { 6 | return request({ 7 | url: apiPrefix, 8 | method: 'get', 9 | params: query, 10 | }); 11 | } 12 | export function GetObj(id: InfoReq) { 13 | return request({ 14 | url: apiPrefix + id, 15 | method: 'get', 16 | }); 17 | } 18 | 19 | export function AddObj(obj: AddReq) { 20 | return request({ 21 | url: apiPrefix, 22 | method: 'post', 23 | data: obj, 24 | }); 25 | } 26 | 27 | export function UpdateObj(obj: EditReq) { 28 | return request({ 29 | url: apiPrefix + obj.id + '/', 30 | method: 'put', 31 | data: obj, 32 | }); 33 | } 34 | 35 | export function DelObj(id: DelReq) { 36 | return request({ 37 | url: apiPrefix + id + '/', 38 | method: 'delete', 39 | data: { id }, 40 | }); 41 | } 42 | -------------------------------------------------------------------------------- /web/src/views/system/dictionary/api.ts: -------------------------------------------------------------------------------- 1 | import { request } from '/@/utils/service'; 2 | import { PageQuery, AddReq, DelReq, EditReq, InfoReq } from '@fast-crud/fast-crud'; 3 | import XEUtils from 'xe-utils'; 4 | 5 | export const apiPrefix = '/api/system/dictionary/'; 6 | export function GetList(query: PageQuery) { 7 | return request({ 8 | url: apiPrefix, 9 | method: 'get', 10 | params: query, 11 | }) 12 | } 13 | export function GetObj(id: InfoReq) { 14 | return request({ 15 | url: apiPrefix + id, 16 | method: 'get', 17 | }); 18 | } 19 | 20 | export function AddObj(obj: AddReq) { 21 | return request({ 22 | url: apiPrefix, 23 | method: 'post', 24 | data: obj, 25 | }); 26 | } 27 | 28 | export function UpdateObj(obj: EditReq) { 29 | return request({ 30 | url: apiPrefix + obj.id + '/', 31 | method: 'put', 32 | data: obj, 33 | }); 34 | } 35 | 36 | export function DelObj(id: DelReq) { 37 | return request({ 38 | url: apiPrefix + id + '/', 39 | method: 'delete', 40 | data: { id }, 41 | }); 42 | } 43 | -------------------------------------------------------------------------------- /web/src/views/system/dictionary/index.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 22 | -------------------------------------------------------------------------------- /web/src/views/system/dictionary/subDict/api.ts: -------------------------------------------------------------------------------- 1 | import { request } from '/@/utils/service'; 2 | import { UserPageQuery, AddReq, DelReq, EditReq, InfoReq } from '@fast-crud/fast-crud'; 3 | 4 | export const apiPrefix = '/api/system/dictionary/'; 5 | export function GetList(query: UserPageQuery) { 6 | return request({ 7 | url: apiPrefix, 8 | method: 'get', 9 | params: query, 10 | }); 11 | } 12 | export function GetObj(id: InfoReq) { 13 | return request({ 14 | url: apiPrefix + id+'/', 15 | method: 'get', 16 | }); 17 | } 18 | 19 | export function AddObj(obj: AddReq) { 20 | return request({ 21 | url: apiPrefix, 22 | method: 'post', 23 | data: obj, 24 | }); 25 | } 26 | 27 | export function UpdateObj(obj: EditReq) { 28 | return request({ 29 | url: apiPrefix + obj.id + '/', 30 | method: 'put', 31 | data: obj, 32 | }); 33 | } 34 | 35 | export function DelObj(id: DelReq) { 36 | return request({ 37 | url: apiPrefix + id + '/', 38 | method: 'delete', 39 | data: { }, 40 | }); 41 | } 42 | -------------------------------------------------------------------------------- /web/src/views/system/dictionary/subDict/index.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 41 | -------------------------------------------------------------------------------- /web/src/views/system/downloadCenter/api.ts: -------------------------------------------------------------------------------- 1 | import { request } from '/@/utils/service'; 2 | import { PageQuery, AddReq, DelReq, EditReq, InfoReq } from '@fast-crud/fast-crud'; 3 | 4 | export const apiPrefix = '/api/system/download_center/'; 5 | 6 | export function GetPermission() { 7 | return request({ 8 | url: apiPrefix + 'field_permission/', 9 | method: 'get', 10 | }); 11 | } 12 | 13 | export function GetList(query: PageQuery) { 14 | return request({ 15 | url: apiPrefix, 16 | method: 'get', 17 | params: query, 18 | }); 19 | } 20 | export function GetObj(id: InfoReq) { 21 | return request({ 22 | url: apiPrefix + id, 23 | method: 'get', 24 | }); 25 | } 26 | 27 | export function AddObj(obj: AddReq) { 28 | return request({ 29 | url: apiPrefix, 30 | method: 'post', 31 | data: obj, 32 | }); 33 | } 34 | 35 | export function UpdateObj(obj: EditReq) { 36 | return request({ 37 | url: apiPrefix + obj.id + '/', 38 | method: 'put', 39 | data: obj, 40 | }); 41 | } 42 | 43 | export function DelObj(id: DelReq) { 44 | return request({ 45 | url: apiPrefix + id + '/', 46 | method: 'delete', 47 | data: { id }, 48 | }); 49 | } 50 | -------------------------------------------------------------------------------- /web/src/views/system/downloadCenter/index.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 43 | -------------------------------------------------------------------------------- /web/src/views/system/error/img404.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huge-dream/django-vue3-admin/1e500bd683f4666427b01aa673a864fa7ece9185/web/src/views/system/error/img404.png -------------------------------------------------------------------------------- /web/src/views/system/fileList/api.ts: -------------------------------------------------------------------------------- 1 | import { request } from '/@/utils/service'; 2 | import { UserPageQuery, AddReq, DelReq, EditReq, InfoReq } from '@fast-crud/fast-crud'; 3 | 4 | export const apiPrefix = '/api/system/file/'; 5 | export function GetList(query: UserPageQuery) { 6 | return request({ 7 | url: apiPrefix, 8 | method: 'get', 9 | params: query, 10 | }); 11 | } 12 | export function GetObj(id: InfoReq) { 13 | return request({ 14 | url: apiPrefix + id, 15 | method: 'get', 16 | }); 17 | } 18 | 19 | export function AddObj(obj: AddReq) { 20 | return request({ 21 | url: apiPrefix, 22 | method: 'post', 23 | data: obj, 24 | }); 25 | } 26 | 27 | export function UpdateObj(obj: EditReq) { 28 | return request({ 29 | url: apiPrefix + obj.id + '/', 30 | method: 'put', 31 | data: obj, 32 | }); 33 | } 34 | 35 | export function DelObj(id: DelReq) { 36 | return request({ 37 | url: apiPrefix + id + '/', 38 | method: 'delete', 39 | data: { id }, 40 | }); 41 | } 42 | -------------------------------------------------------------------------------- /web/src/views/system/log/loginLog/api.ts: -------------------------------------------------------------------------------- 1 | import { request } from '/@/utils/service'; 2 | import { UserPageQuery, AddReq, DelReq, EditReq, InfoReq } from '@fast-crud/fast-crud'; 3 | 4 | export const apiPrefix = '/api/system/login_log/'; 5 | export function GetList(query: UserPageQuery) { 6 | return request({ 7 | url: apiPrefix, 8 | method: 'get', 9 | params: query, 10 | }); 11 | } 12 | export function GetObj(id: InfoReq) { 13 | return request({ 14 | url: apiPrefix + id, 15 | method: 'get', 16 | }); 17 | } 18 | 19 | export function AddObj(obj: AddReq) { 20 | return request({ 21 | url: apiPrefix, 22 | method: 'post', 23 | data: obj, 24 | }); 25 | } 26 | 27 | export function UpdateObj(obj: EditReq) { 28 | return request({ 29 | url: apiPrefix + obj.id + '/', 30 | method: 'put', 31 | data: obj, 32 | }); 33 | } 34 | 35 | export function DelObj(id: DelReq) { 36 | return request({ 37 | url: apiPrefix + id + '/', 38 | method: 'delete', 39 | data: { id }, 40 | }); 41 | } 42 | 43 | export function GetPermission() { 44 | return request({ 45 | url: apiPrefix + 'field_permission/', 46 | method: 'get', 47 | }); 48 | } 49 | -------------------------------------------------------------------------------- /web/src/views/system/log/loginLog/index.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 26 | -------------------------------------------------------------------------------- /web/src/views/system/log/operationLog/api.ts: -------------------------------------------------------------------------------- 1 | import { request } from '/@/utils/service'; 2 | import { UserPageQuery, AddReq, DelReq, EditReq, InfoReq } from '@fast-crud/fast-crud'; 3 | 4 | export const apiPrefix = '/api/system/operation_log/'; 5 | export function GetList(query: UserPageQuery) { 6 | return request({ 7 | url: apiPrefix, 8 | method: 'get', 9 | params: query, 10 | }); 11 | } 12 | export function GetObj(id: InfoReq) { 13 | return request({ 14 | url: apiPrefix + id, 15 | method: 'get', 16 | }); 17 | } 18 | 19 | export function AddObj(obj: AddReq) { 20 | return request({ 21 | url: apiPrefix, 22 | method: 'post', 23 | data: obj, 24 | }); 25 | } 26 | 27 | export function UpdateObj(obj: EditReq) { 28 | return request({ 29 | url: apiPrefix + obj.id + '/', 30 | method: 'put', 31 | data: obj, 32 | }); 33 | } 34 | 35 | export function DelObj(id: DelReq) { 36 | return request({ 37 | url: apiPrefix + id + '/', 38 | method: 'delete', 39 | data: { id }, 40 | }); 41 | } 42 | -------------------------------------------------------------------------------- /web/src/views/system/log/operationLog/index.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 20 | -------------------------------------------------------------------------------- /web/src/views/system/login/api.ts: -------------------------------------------------------------------------------- 1 | import { request } from "/@/utils/service"; 2 | 3 | export function getCaptcha() { 4 | return request({ 5 | url: '/api/captcha/', 6 | method: 'get', 7 | }); 8 | } 9 | export function login(params: object) { 10 | return request({ 11 | url: '/api/login/', 12 | method: 'post', 13 | data: params 14 | }); 15 | } 16 | 17 | export function loginChangePwd(data: object) { 18 | return request({ 19 | url: '/api/system/user/login_change_password/', 20 | method: 'post', 21 | data: data 22 | }); 23 | } 24 | 25 | export function getUserInfo() { 26 | return request({ 27 | url: '/api/system/user/user_info/', 28 | method: 'get', 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /web/src/views/system/menu/components/MenuButtonCom/api.ts: -------------------------------------------------------------------------------- 1 | import { request } from '/@/utils/service'; 2 | import { PageQuery, AddReq, DelReq, EditReq, InfoReq } from '@fast-crud/fast-crud'; 3 | 4 | export const apiPrefix = '/api/system/menu_button/'; 5 | export function GetList(query: PageQuery) { 6 | return request({ 7 | url: apiPrefix, 8 | method: 'get', 9 | params: query, 10 | }); 11 | } 12 | export function GetObj(id: InfoReq) { 13 | return request({ 14 | url: apiPrefix + id, 15 | method: 'get', 16 | }); 17 | } 18 | 19 | export function AddObj(obj: AddReq) { 20 | return request({ 21 | url: apiPrefix, 22 | method: 'post', 23 | data: obj, 24 | }); 25 | } 26 | 27 | export function UpdateObj(obj: any) { 28 | return request({ 29 | url: apiPrefix + obj.id + '/', 30 | method: 'put', 31 | data: obj, 32 | }); 33 | } 34 | 35 | export function DelObj(id: DelReq) { 36 | return request({ 37 | url: apiPrefix + id + '/', 38 | method: 'delete', 39 | data: { id }, 40 | }); 41 | } 42 | 43 | export function BatchAdd(obj: AddReq) { 44 | return request({ 45 | url: apiPrefix + 'batch_create/', 46 | method: 'post', 47 | data: obj, 48 | }); 49 | } 50 | 51 | export function BatchDelete(keys: any) { 52 | return request({ 53 | url: apiPrefix + 'multiple_delete/', 54 | method: 'delete', 55 | data: { keys }, 56 | }); 57 | } 58 | -------------------------------------------------------------------------------- /web/src/views/system/messageCenter/api.ts: -------------------------------------------------------------------------------- 1 | import {request} from '/@/utils/service'; 2 | import {PageQuery, AddReq, DelReq, EditReq, InfoReq} from '@fast-crud/fast-crud'; 3 | 4 | export const apiPrefix = '/api/system/message_center/'; 5 | 6 | export function GetList(query: PageQuery) { 7 | return request({ 8 | url: apiPrefix, 9 | method: 'get', 10 | params: query, 11 | }); 12 | } 13 | 14 | export function GetObj(id: InfoReq) { 15 | return request({ 16 | url: apiPrefix + id + '/', 17 | method: 'get', 18 | }); 19 | } 20 | 21 | /** 22 | * 获取自己接收的消息 23 | * @param query 24 | * @returns {*} 25 | * @constructor 26 | */ 27 | export function GetSelfReceive (query:PageQuery) { 28 | return request({ 29 | url: apiPrefix + 'get_self_receive/', 30 | method: 'get', 31 | params: query 32 | }) 33 | } 34 | 35 | export function AddObj(obj: AddReq) { 36 | return request({ 37 | url: apiPrefix, 38 | method: 'post', 39 | data: obj, 40 | }); 41 | } 42 | 43 | 44 | 45 | 46 | export function UpdateObj(obj: EditReq) { 47 | return request({ 48 | url: apiPrefix + obj.id + '/', 49 | method: 'put', 50 | data: obj, 51 | }); 52 | } 53 | 54 | export function DelObj(id: DelReq) { 55 | return request({ 56 | url: apiPrefix + id + '/', 57 | method: 'delete', 58 | data: {id}, 59 | }); 60 | } 61 | -------------------------------------------------------------------------------- /web/src/views/system/messageCenter/index.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 36 | -------------------------------------------------------------------------------- /web/src/views/system/personal/api.ts: -------------------------------------------------------------------------------- 1 | import { request } from '/@/utils/service'; 2 | import { PageQuery, AddReq, DelReq, EditReq, InfoReq } from '@fast-crud/fast-crud'; 3 | import { apiPrefix } from '/@/views/system/messageCenter/api'; 4 | export function GetUserInfo(query: PageQuery) { 5 | return request({ 6 | url: '/api/system/user/user_info/', 7 | method: 'get', 8 | params: query, 9 | }); 10 | } 11 | 12 | /** 13 | * 更新用户信息 14 | * @param data 15 | */ 16 | export function updateUserInfo(data: AddReq) { 17 | return request({ 18 | url: '/api/system/user/update_user_info/', 19 | method: 'put', 20 | data: data, 21 | }); 22 | } 23 | 24 | /** 25 | * 获取自己接收的消息 26 | * @param query 27 | * @returns {*} 28 | * @constructor 29 | */ 30 | export function GetSelfReceive(query: PageQuery) { 31 | return request({ 32 | url: '/api/system/message_center/get_self_receive/', 33 | method: 'get', 34 | params: query, 35 | }); 36 | } 37 | 38 | /*** 39 | * 修改密码 40 | * @param data 41 | */ 42 | export function UpdatePassword(data: EditReq) { 43 | return request({ 44 | url: '/api/system/user/change_password/', 45 | method: 'put', 46 | data: data, 47 | }); 48 | } 49 | 50 | /*** 51 | * 上传头像 52 | * @param data 53 | */ 54 | export function uploadAvatar(data: AddReq) { 55 | return request({ 56 | url: 'api/system/file/', 57 | method: 'post', 58 | data: data, 59 | headers: { 60 | 'Content-Type': 'multipart/form-data', 61 | }, 62 | }); 63 | } 64 | -------------------------------------------------------------------------------- /web/src/views/system/role/api.ts: -------------------------------------------------------------------------------- 1 | import { request } from '/@/utils/service'; 2 | import { PageQuery, AddReq, DelReq, EditReq, InfoReq } from '@fast-crud/fast-crud'; 3 | 4 | export const apiPrefix = '/api/system/role/'; 5 | 6 | export function GetPermission() { 7 | return request({ 8 | url: apiPrefix + 'field_permission/', 9 | method: 'get', 10 | }); 11 | } 12 | 13 | export function GetList(query: PageQuery) { 14 | return request({ 15 | url: apiPrefix, 16 | method: 'get', 17 | params: query, 18 | }); 19 | } 20 | export function GetObj(id: InfoReq) { 21 | return request({ 22 | url: apiPrefix + id, 23 | method: 'get', 24 | }); 25 | } 26 | 27 | export function AddObj(obj: AddReq) { 28 | return request({ 29 | url: apiPrefix, 30 | method: 'post', 31 | data: obj, 32 | }); 33 | } 34 | 35 | export function UpdateObj(obj: EditReq) { 36 | return request({ 37 | url: apiPrefix + obj.id + '/', 38 | method: 'put', 39 | data: obj, 40 | }); 41 | } 42 | 43 | export function DelObj(id: DelReq) { 44 | return request({ 45 | url: apiPrefix + id + '/', 46 | method: 'delete', 47 | data: { id }, 48 | }); 49 | } 50 | -------------------------------------------------------------------------------- /web/src/views/system/role/components/RoleUsers.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 36 | -------------------------------------------------------------------------------- /web/src/views/system/role/components/addUsers/api.ts: -------------------------------------------------------------------------------- 1 | import { request } from '/@/utils/service'; 2 | import { UserPageQuery} from '@fast-crud/fast-crud'; 3 | 4 | /** 5 | * 当前角色查询未授权的用户 6 | * @param role_id 角色id 7 | * @param query 查询条件 需要有角色id 8 | * @returns 9 | */ 10 | export function getRoleUsersUnauthorized(query: UserPageQuery) { 11 | query["authorized"] = 0; // 未授权的用户 12 | return request({ 13 | url: '/api/system/role/get_role_users/', 14 | method: 'get', 15 | params: query, 16 | }); 17 | } 18 | /** 19 | * 当前用户角色添加用户 20 | * @param role_id 角色id 21 | * @param users_id 用户id数组 22 | * @returns 23 | */ 24 | export function addRoleUsers(role_id: number, users_id: Array) { 25 | return request({ 26 | url: `/api/system/role/${role_id}/add_role_users/`, 27 | method: 'post', 28 | data: {users_id: users_id}, 29 | }); 30 | } -------------------------------------------------------------------------------- /web/src/views/system/role/components/searchUsers/api.ts: -------------------------------------------------------------------------------- 1 | import { request } from '/@/utils/service'; 2 | import { UserPageQuery} from '@fast-crud/fast-crud'; 3 | 4 | /** 5 | * 当前角色查询授权的用户 6 | * @param query 查询条件 需要有角色id 7 | * @returns 8 | */ 9 | export function getRoleUsersAuthorized(query: UserPageQuery) { 10 | query["authorized"] = 1; // 授权的用户 11 | return request({ 12 | url: '/api/system/role/get_role_users/', 13 | method: 'get', 14 | params: query, 15 | }); 16 | } 17 | /** 18 | * 当前角色删除授权的用户 19 | * @param role_id 角色id 20 | * @param user_id 用户id数组 21 | * @returns 22 | */ 23 | export function removeRoleUser(role_id: number, user_id: Array) { 24 | return request({ 25 | url: `/api/system/role/${role_id}/remove_role_user/`, 26 | method: 'delete', 27 | data: {user_id: user_id}, 28 | }); 29 | } 30 | 31 | 32 | /** 33 | * 当前用户角色添加用户 34 | * @param role_id 角色id 35 | * @param data 用户id数组 36 | * @returns 37 | */ 38 | export function addRoleUsers(role_id: number, data: Array) { 39 | return request({ 40 | url: `/api/system/role/${role_id}/add_role_users/`, 41 | method: 'post', 42 | data: {users_id: data}, 43 | }); 44 | } -------------------------------------------------------------------------------- /web/src/views/system/role/stores/RoleDrawerStores.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia'; 2 | import { RoleDrawerType } from '../types'; 3 | /** 4 | * 权限配置:抽屉 5 | */ 6 | const initialState: RoleDrawerType = { 7 | drawerVisible: false, 8 | roleId: undefined, 9 | roleName: undefined, 10 | users: [], 11 | }; 12 | 13 | export const RoleDrawerStores = defineStore('RoleDrawerStores', { 14 | state: (): RoleDrawerType => ({ 15 | ...initialState, 16 | }), 17 | actions: { 18 | /** 19 | * 打开权限修改抽屉 20 | */ 21 | handleDrawerOpen(row: any) { 22 | this.drawerVisible = true; 23 | this.set_state(row); 24 | }, 25 | set_state(row: any) { 26 | this.roleName = row.name; 27 | this.roleId = row.id; 28 | this.users = row.users; 29 | }, 30 | /** 31 | * 关闭权限修改抽屉 32 | */ 33 | handleDrawerClose() { 34 | Object.assign(this.$state, initialState); 35 | }, 36 | }, 37 | }); 38 | -------------------------------------------------------------------------------- /web/src/views/system/role/stores/RoleMenuBtnStores.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia'; 2 | import { RoleMenuBtnType } from '../types'; 3 | /** 4 | * 权限配置:角色-菜单-按钮 5 | */ 6 | 7 | export const RoleMenuBtnStores = defineStore('RoleMenuBtnStores', { 8 | state: (): RoleMenuBtnType[] => [], 9 | actions: { 10 | /** 11 | * 初始化 12 | */ 13 | setState(data: RoleMenuBtnType[]) { 14 | this.$state = data; 15 | this.$state.length = data.length; 16 | }, 17 | updateState(data: RoleMenuBtnType) { 18 | const index = this.$state.findIndex((item) => item.id === data.id); 19 | if (index !== -1) { 20 | this.$state[index] = data; 21 | } 22 | }, 23 | }, 24 | }); 25 | -------------------------------------------------------------------------------- /web/src/views/system/role/stores/RoleMenuFieldStores.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia'; 2 | import { RoleMenuFieldType, RoleMenuFieldHeaderType } from '../types'; 3 | /** 4 | * 权限配置:角色-菜单-列字段 5 | */ 6 | 7 | export const RoleMenuFieldStores = defineStore('RoleMenuFieldStores', { 8 | state: (): RoleMenuFieldType[] => [], 9 | actions: { 10 | /** 重置 */ 11 | setState(data: RoleMenuFieldType[]) { 12 | this.$state = data; 13 | this.$state.length = data.length; 14 | }, 15 | }, 16 | }); 17 | 18 | export const RoleMenuFieldHeaderStores = defineStore('RoleMenuFieldHeaderStores', { 19 | state: (): RoleMenuFieldHeaderType[] => [ 20 | { value: 'is_create', label: '新增可见', disabled: 'disabled_create', checked: false }, 21 | { value: 'is_update', label: '编辑可见', disabled: 'disabled_update', checked: false }, 22 | { value: 'is_query', label: '列表可见', disabled: 'disabled_query', checked: false }, 23 | ], 24 | }); 25 | -------------------------------------------------------------------------------- /web/src/views/system/role/stores/RoleMenuTreeStores.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia'; 2 | import { RoleMenuTreeType } from '../types'; 3 | /** 4 | * 权限抽屉:角色-菜单 5 | */ 6 | 7 | export const RoleMenuTreeStores = defineStore('RoleMenuTreeStores', { 8 | state: (): RoleMenuTreeType => ({ 9 | id: 0, 10 | parent: 0, 11 | name: '', 12 | isCheck: false, 13 | is_catalog: false, 14 | }), 15 | actions: { 16 | /** 赋值 */ 17 | setRoleMenuTree(data: RoleMenuTreeType) { 18 | this.$state = data; 19 | }, 20 | }, 21 | }); 22 | -------------------------------------------------------------------------------- /web/src/views/system/role/stores/RoleUserStores.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia'; 2 | 3 | /** 4 | * 权限抽屉:角色-用户 5 | */ 6 | 7 | export const RoleUserStores = defineStore('RoleUserStores', { 8 | state: (): any => ({ 9 | drawerVisible: false, 10 | role_id: undefined, 11 | role_name: undefined, 12 | }), 13 | actions: { 14 | /** 15 | * 打开权限修改抽屉 16 | */ 17 | handleDrawerOpen(row: any) { 18 | this.drawerVisible = true; 19 | this.role_name = row.name; 20 | this.role_id = row.id; 21 | }, 22 | /** 23 | * 关闭权限修改抽屉 24 | */ 25 | handleDrawerClose() { 26 | this.drawerVisible = false; 27 | }, 28 | }, 29 | }); 30 | -------------------------------------------------------------------------------- /web/src/views/system/role/stores/RoleUsersStores.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia'; 2 | import { RoleUsersType } from '../types'; 3 | import { getAllUsers } from '../components/api'; 4 | import XEUtils from 'xe-utils'; 5 | /** 6 | * 权限抽屉:角色-用户 7 | */ 8 | 9 | export const RoleUsersStores = defineStore('RoleUsersStores', { 10 | state: (): RoleUsersType => ({ 11 | all_users: [], 12 | right_users: [], 13 | }), 14 | actions: { 15 | get_all_users() { 16 | getAllUsers().then((res: any) => { 17 | this.$state.all_users = res; 18 | }); 19 | }, 20 | set_right_users(users: any) { 21 | this.$state.right_users = XEUtils.map(users, (item: any) => item.id); 22 | }, 23 | }, 24 | }); 25 | -------------------------------------------------------------------------------- /web/src/views/system/whiteList/api.ts: -------------------------------------------------------------------------------- 1 | import { request } from '/@/utils/service'; 2 | import { UserPageQuery, AddReq, DelReq, EditReq, InfoReq } from '@fast-crud/fast-crud'; 3 | 4 | export const apiPrefix = '/api/system/api_white_list/'; 5 | export function GetList(query: UserPageQuery) { 6 | return request({ 7 | url: apiPrefix, 8 | method: 'get', 9 | params: query, 10 | }); 11 | } 12 | export function GetObj(id: InfoReq) { 13 | return request({ 14 | url: apiPrefix + id, 15 | method: 'get', 16 | }); 17 | } 18 | 19 | export function AddObj(obj: AddReq) { 20 | return request({ 21 | url: apiPrefix, 22 | method: 'post', 23 | data: obj, 24 | }); 25 | } 26 | 27 | export function UpdateObj(obj: EditReq) { 28 | return request({ 29 | url: apiPrefix + obj.id + '/', 30 | method: 'put', 31 | data: obj, 32 | }); 33 | } 34 | 35 | export function DelObj(id: DelReq) { 36 | return request({ 37 | url: apiPrefix + id + '/', 38 | method: 'delete', 39 | data: { id }, 40 | }); 41 | } 42 | -------------------------------------------------------------------------------- /web/src/views/system/whiteList/index.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 19 | -------------------------------------------------------------------------------- /web/src/views/template/api.ts: -------------------------------------------------------------------------------- 1 | import { request,downloadFile } from '/@/utils/service'; 2 | import { PageQuery, AddReq, DelReq, EditReq, InfoReq } from '@fast-crud/fast-crud'; 3 | 4 | export const apiPrefix = '/api/VIEWSETNAME/'; 5 | 6 | export function GetList(query: PageQuery) { 7 | return request({ 8 | url: apiPrefix, 9 | method: 'get', 10 | params: query, 11 | }); 12 | } 13 | export function GetObj(id: InfoReq) { 14 | return request({ 15 | url: apiPrefix + id, 16 | method: 'get', 17 | }); 18 | } 19 | 20 | export function AddObj(obj: AddReq) { 21 | return request({ 22 | url: apiPrefix, 23 | method: 'post', 24 | data: obj, 25 | }); 26 | } 27 | 28 | export function UpdateObj(obj: EditReq) { 29 | return request({ 30 | url: apiPrefix + obj.id + '/', 31 | method: 'put', 32 | data: obj, 33 | }); 34 | } 35 | 36 | export function DelObj(id: DelReq) { 37 | return request({ 38 | url: apiPrefix + id + '/', 39 | method: 'delete', 40 | data: { id }, 41 | }); 42 | } 43 | 44 | export function exportData(params:any){ 45 | return downloadFile({ 46 | url: apiPrefix + 'export_data/', 47 | params: params, 48 | method: 'get' 49 | }) 50 | } -------------------------------------------------------------------------------- /web/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: ['./index.html', './src/**/*.{vue,js}'], 4 | theme: { 5 | extend: { 6 | height: { 7 | 'screen/2': '50vh', 8 | }, 9 | }, 10 | }, 11 | plugins: [], 12 | }; 13 | --------------------------------------------------------------------------------