├── backend ├── backend │ ├── __init__.py │ ├── __pycache__ │ │ ├── asgi.cpython-37.pyc │ │ ├── urls.cpython-37.pyc │ │ ├── urls.cpython-38.pyc │ │ ├── wsgi.cpython-37.pyc │ │ ├── wsgi.cpython-38.pyc │ │ ├── config.cpython-37.pyc │ │ ├── detect.cpython-37.pyc │ │ ├── detect.cpython-38.pyc │ │ ├── views.cpython-37.pyc │ │ ├── views.cpython-38.pyc │ │ ├── __init__.cpython-37.pyc │ │ ├── __init__.cpython-38.pyc │ │ ├── routing.cpython-37.pyc │ │ ├── settings.cpython-37.pyc │ │ ├── settings.cpython-38.pyc │ │ ├── image_process.cpython-37.pyc │ │ └── image_process.cpython-38.pyc │ ├── conf │ │ ├── __pycache__ │ │ │ └── env.cpython-37.pyc │ │ └── env.py │ ├── utils │ │ ├── __pycache__ │ │ │ ├── model.cpython-37.pyc │ │ │ ├── backends.cpython-37.pyc │ │ │ ├── filters.cpython-37.pyc │ │ │ ├── manager.cpython-37.pyc │ │ │ ├── swagger.cpython-37.pyc │ │ │ ├── viewSet.cpython-37.pyc │ │ │ ├── pagination.cpython-37.pyc │ │ │ ├── permission.cpython-37.pyc │ │ │ ├── softModel.cpython-37.pyc │ │ │ ├── validator.cpython-37.pyc │ │ │ ├── jsonResponse.cpython-37.pyc │ │ │ ├── requestUtils.cpython-37.pyc │ │ │ ├── coreInitialize.cpython-37.pyc │ │ │ ├── apiLogMiddleware.cpython-37.pyc │ │ │ ├── softDeletManager.cpython-37.pyc │ │ │ └── softDeleteManager.cpython-37.pyc │ │ ├── pagination.py │ │ ├── backends.py │ │ ├── softDeleteManager.py │ │ ├── swagger.py │ │ ├── jsonResponse.py │ │ └── validator.py │ ├── wsgi.py │ ├── routing.py │ ├── asgi.py │ └── views.py ├── apps │ ├── detect │ │ ├── __init__.py │ │ ├── migrations │ │ │ ├── __init__.py │ │ │ ├── __pycache__ │ │ │ │ ├── __init__.cpython-37.pyc │ │ │ │ └── 0001_initial.cpython-37.pyc │ │ │ └── 0001_initial.py │ │ ├── admin.py │ │ ├── tests.py │ │ ├── __pycache__ │ │ │ ├── admin.cpython-37.pyc │ │ │ ├── apps.cpython-37.pyc │ │ │ ├── models.cpython-37.pyc │ │ │ ├── models.cpython-38.pyc │ │ │ ├── result.cpython-37.pyc │ │ │ ├── result.cpython-38.pyc │ │ │ ├── __init__.cpython-37.pyc │ │ │ ├── __init__.cpython-38.pyc │ │ │ └── consumers.cpython-37.pyc │ │ ├── apps.py │ │ ├── serializer.py │ │ ├── result.py │ │ ├── models.py │ │ └── consumers.py │ ├── monitor │ │ ├── __init__.py │ │ ├── migrations │ │ │ ├── __init__.py │ │ │ └── __pycache__ │ │ │ │ └── __init__.cpython-37.pyc │ │ ├── models.py │ │ ├── tests.py │ │ ├── admin.py │ │ ├── views.py │ │ ├── __pycache__ │ │ │ ├── apps.cpython-37.pyc │ │ │ ├── admin.cpython-37.pyc │ │ │ ├── models.cpython-37.pyc │ │ │ └── __init__.cpython-37.pyc │ │ └── apps.py │ └── system │ │ ├── __init__.py │ │ ├── fixtures │ │ ├── __init__.py │ │ ├── backdata │ │ │ ├── auth_user.xlsx │ │ │ ├── auth_group.xlsx │ │ │ ├── system_area.xlsx │ │ │ ├── system_dept.xlsx │ │ │ ├── system_menu.xlsx │ │ │ ├── system_role.xlsx │ │ │ ├── system_user.xlsx │ │ │ ├── detected_img.xlsx │ │ │ ├── django_session.xlsx │ │ │ ├── system_config.xlsx │ │ │ ├── system_postion.xlsx │ │ │ ├── auth_permission.xlsx │ │ │ ├── auth_user_groups.xlsx │ │ │ ├── django_admin_log.xlsx │ │ │ ├── system_login_log.xlsx │ │ │ ├── system_role_dept.xlsx │ │ │ ├── system_role_menu.xlsx │ │ │ ├── django_content_type.xlsx │ │ │ ├── django_migrations.xlsx │ │ │ ├── system_dictionary.xlsx │ │ │ ├── system_menu_button.xlsx │ │ │ ├── system_user_groups.xlsx │ │ │ ├── system_user_roles.xlsx │ │ │ ├── captcha_captchastore.xlsx │ │ │ ├── system_user_position.xlsx │ │ │ ├── auth_group_permissions.xlsx │ │ │ ├── system_role_permission.xlsx │ │ │ ├── auth_user_user_permissions.xlsx │ │ │ └── system_user_user_permissions.xlsx │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-37.pyc │ │ │ ├── initialize.cpython-37.pyc │ │ │ └── coreInitialize.cpython-37.pyc │ │ ├── init_role.json │ │ ├── init_dept.json │ │ ├── init_user.json │ │ └── initialize.py │ │ ├── management │ │ ├── __init__.py │ │ ├── commands │ │ │ ├── __init__.py │ │ │ ├── __pycache__ │ │ │ │ ├── init.cpython-37.pyc │ │ │ │ ├── __init__.cpython-37.pyc │ │ │ │ └── init_area.cpython-37.pyc │ │ │ └── init.py │ │ └── __pycache__ │ │ │ └── __init__.cpython-37.pyc │ │ ├── migrations │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── 0009_area.cpython-37.pyc │ │ │ ├── __init__.cpython-37.pyc │ │ │ ├── __init__.cpython-38.pyc │ │ │ ├── 0001_initial.cpython-37.pyc │ │ │ ├── 0001_initial.cpython-38.pyc │ │ │ ├── 0005_filelist.cpython-37.pyc │ │ │ ├── 0003_user_mobile.cpython-37.pyc │ │ │ ├── 0004_apiwhitelist.cpython-37.pyc │ │ │ ├── 0006_operationlog.cpython-37.pyc │ │ │ ├── 0002_role_data_range.cpython-37.pyc │ │ │ ├── 0002_auto_20220821_1936.cpython-37.pyc │ │ │ ├── 0007_remove_role_datas.cpython-37.pyc │ │ │ └── 0008_auto_20221011_2051.cpython-37.pyc │ │ ├── 0007_remove_role_datas.py │ │ ├── 0003_user_mobile.py │ │ ├── 0008_auto_20221011_2051.py │ │ ├── 0002_role_data_range.py │ │ ├── 0005_filelist.py │ │ └── 0004_apiwhitelist.py │ │ ├── admin.py │ │ ├── __pycache__ │ │ ├── admin.cpython-37.pyc │ │ ├── admin.cpython-38.pyc │ │ ├── apps.cpython-37.pyc │ │ ├── apps.cpython-38.pyc │ │ ├── urls.cpython-37.pyc │ │ ├── views.cpython-37.pyc │ │ ├── models.cpython-37.pyc │ │ ├── models.cpython-38.pyc │ │ ├── result.cpython-37.pyc │ │ ├── result.cpython-38.pyc │ │ ├── __init__.cpython-37.pyc │ │ ├── __init__.cpython-38.pyc │ │ ├── consumers.cpython-37.pyc │ │ ├── serializer.cpython-37.pyc │ │ ├── dataset_process.cpython-37.pyc │ │ ├── dataset_process.cpython-38.pyc │ │ └── dataset_preocess.cpython-37.pyc │ │ ├── config │ │ ├── __pycache__ │ │ │ ├── cfg.cpython-37.pyc │ │ │ └── dispatch.cpython-37.pyc │ │ └── cfg.py │ │ ├── views │ │ ├── __pycache__ │ │ │ ├── areaViews.cpython-37.pyc │ │ │ ├── deptViews.cpython-37.pyc │ │ │ ├── fileViews.cpython-37.pyc │ │ │ ├── menuViews.cpython-37.pyc │ │ │ ├── roleViews.cpython-37.pyc │ │ │ ├── userViews.cpython-37.pyc │ │ │ ├── loginViews.cpython-37.pyc │ │ │ ├── loginLogViews.cpython-37.pyc │ │ │ ├── dictionaryViews.cpython-37.pyc │ │ │ ├── menuButtonViews.cpython-37.pyc │ │ │ ├── apiWhiteListViews.cpython-37.pyc │ │ │ ├── operationLogViews.cpython-37.pyc │ │ │ └── systemConfigViews.cpython-37.pyc │ │ ├── areaViews.py │ │ ├── fileViews.py │ │ ├── loginLogViews.py │ │ ├── menuButtonViews.py │ │ ├── apiWhiteListViews.py │ │ ├── operationLogViews.py │ │ ├── roleViews.py │ │ ├── menuViews.py │ │ └── dictionaryViews.py │ │ ├── apps.py │ │ ├── serializers │ │ ├── __pycache__ │ │ │ ├── areaSerializer.cpython-37.pyc │ │ │ ├── deptSerializer.cpython-37.pyc │ │ │ ├── fileSerializer.cpython-37.pyc │ │ │ ├── menuSerializer.cpython-37.pyc │ │ │ ├── roleSerializer.cpython-37.pyc │ │ │ ├── userSerializer.cpython-37.pyc │ │ │ ├── loginLogSerializer.cpython-37.pyc │ │ │ ├── loginSerizalizer.cpython-37.pyc │ │ │ ├── dictionarySerializer.cpython-37.pyc │ │ │ ├── menuButtonSerializer.cpython-37.pyc │ │ │ ├── apiWhiteListSerializer.cpython-37.pyc │ │ │ ├── customModelSerializer.cpython-37.pyc │ │ │ ├── operationLogSerializer.cpython-37.pyc │ │ │ └── systemConfigSerializer.cpython-37.pyc │ │ ├── loginLogSerializer.py │ │ ├── menuButtonSerializer.py │ │ ├── fileSerializer.py │ │ ├── operationLogSerializer.py │ │ ├── apiWhiteListSerializer.py │ │ └── areaSerializer.py │ │ └── urls.py ├── thirdparty │ ├── __pycache__ │ │ ├── config.cpython-37.pyc │ │ ├── detect.cpython-37.pyc │ │ └── detect.cpython-38.pyc │ ├── yolov5_config.json │ └── config.py ├── media │ └── files │ │ └── c │ │ └── a │ │ └── ca4adafa8eff028a77eb606bfe849ffb.jpeg └── manage.py ├── frontend ├── src │ ├── plugins │ │ ├── system │ │ │ ├── iconfont │ │ │ │ └── index.ts │ │ │ ├── iconify │ │ │ │ └── index.ts │ │ │ ├── open │ │ │ │ └── index.ts │ │ │ ├── fast-crud │ │ │ │ ├── icon-selector │ │ │ │ │ ├── components │ │ │ │ │ │ ├── font-awesome-4.7.0 │ │ │ │ │ │ │ └── fonts │ │ │ │ │ │ │ │ ├── FontAwesome.otf │ │ │ │ │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ │ │ │ │ ├── fontawesome-webfont.woff │ │ │ │ │ │ │ │ └── fontawesome-webfont.woff2 │ │ │ │ │ │ └── fs-fa-icon.vue │ │ │ │ │ ├── type │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ └── types.ts │ │ │ │ │ └── index.ts │ │ │ │ └── area-selector │ │ │ │ │ ├── area-data.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ └── type │ │ │ │ │ └── index.ts │ │ │ ├── api │ │ │ │ └── index.ts │ │ │ ├── log │ │ │ │ └── index.ts │ │ │ └── error │ │ │ │ └── index.ts │ │ ├── permission │ │ │ ├── directive │ │ │ │ └── permission │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── permission.ts │ │ │ │ │ └── util.permission.ts │ │ │ └── index.ts │ │ └── index.ts │ ├── assets │ │ ├── 404.gif │ │ ├── logo.png │ │ ├── MenuLogo.png │ │ └── vue.svg │ ├── views │ │ ├── system │ │ │ ├── fileList │ │ │ │ └── index.vue │ │ │ ├── function │ │ │ │ ├── redireative.vue │ │ │ │ ├── redirect.vue │ │ │ │ └── refresh.vue │ │ │ ├── messageCenter │ │ │ │ └── index.vue │ │ │ ├── error │ │ │ │ └── 404 │ │ │ │ │ └── 404.vue │ │ │ ├── log │ │ │ │ ├── loginLog │ │ │ │ │ └── index.vue │ │ │ │ └── operationLog │ │ │ │ │ └── index.vue │ │ │ ├── areas │ │ │ │ └── index.vue │ │ │ ├── whiteList │ │ │ │ └── index.vue │ │ │ ├── dept │ │ │ │ └── index.vue │ │ │ ├── menuButton │ │ │ │ └── index.vue │ │ │ ├── config │ │ │ │ └── components │ │ │ │ │ └── addTab.vue │ │ │ └── dictionary │ │ │ │ └── subDictionary │ │ │ │ └── index.vue │ │ ├── Home │ │ │ └── Home.vue │ │ └── DataManage │ │ │ ├── DetectDataManage.vue │ │ │ └── OrginDataManage.vue │ ├── types │ │ ├── md5-d.ts │ │ ├── fast-crud.d.ts │ │ └── axios-vue.d.ts │ ├── shims-vue.d.ts │ ├── vite-env.d.ts │ ├── utils │ │ ├── common │ │ │ ├── structInterface.ts │ │ │ └── cookies.ts │ │ ├── index.ts │ │ └── system │ │ │ └── open.ts │ ├── apis │ │ ├── test.ts │ │ ├── system │ │ │ ├── index.ts │ │ │ ├── apiWhiteList.ts │ │ │ ├── loginRegister.ts │ │ │ ├── menuButton.ts │ │ │ ├── systemLog.ts │ │ │ ├── role.ts │ │ │ ├── dept.ts │ │ │ ├── area.ts │ │ │ ├── systemConfig.ts │ │ │ ├── menu.ts │ │ │ ├── dictionary.ts │ │ │ └── user.ts │ │ └── index.ts │ ├── configs │ │ └── index.ts │ ├── stores │ │ ├── system-permission.ts │ │ ├── system-user.ts │ │ ├── index.ts │ │ ├── system-setting.ts │ │ └── system-log.ts │ ├── App.vue │ ├── main.ts │ ├── components │ │ ├── HelloWorld.vue │ │ └── ImageCard.vue │ ├── style.css │ ├── layout │ │ └── components │ │ │ ├── headerUser │ │ │ └── headerUser.vue │ │ │ ├── headerBar │ │ │ └── headerBar.vue │ │ │ ├── logo │ │ │ └── logo.vue │ │ │ └── tabs │ │ │ └── components │ │ │ ├── contextmenuList.vue │ │ │ └── contextMenu.vue │ ├── setting.ts │ └── router │ │ └── staticRoutes.ts ├── .vscode │ └── extensions.json ├── .env.test ├── tsconfig.node.json ├── .env.preview ├── .env.development ├── .env ├── .gitignore ├── index.html ├── .env.production ├── public │ ├── index.html │ └── vite.svg ├── tsconfig.json ├── vite.config.ts ├── README.md └── package.json ├── images └── 二维码.png ├── .gitignore └── .vscode └── launch.json /backend/backend/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/apps/detect/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/apps/monitor/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/apps/system/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/apps/detect/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/apps/monitor/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/apps/system/fixtures/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/apps/system/management/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/apps/system/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/apps/system/management/commands/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frontend/src/plugins/system/iconfont/index.ts: -------------------------------------------------------------------------------- 1 | import "./iconfont.js.js" 2 | -------------------------------------------------------------------------------- /frontend/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["Vue.volar"] 3 | } 4 | -------------------------------------------------------------------------------- /images/二维码.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/images/二维码.png -------------------------------------------------------------------------------- /backend/apps/detect/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /backend/apps/detect/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /backend/apps/monitor/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /backend/apps/monitor/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /backend/apps/system/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /backend/apps/monitor/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /backend/apps/monitor/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render 2 | 3 | # Create your views here. 4 | -------------------------------------------------------------------------------- /frontend/src/assets/404.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/frontend/src/assets/404.gif -------------------------------------------------------------------------------- /frontend/src/plugins/system/iconify/index.ts: -------------------------------------------------------------------------------- 1 | // import "@iconify/iconify"; 2 | import "@purge-icons/generated"; 3 | -------------------------------------------------------------------------------- /frontend/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/frontend/src/assets/logo.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | frontend/node_modules/ 2 | frontend-vcli/node_modules/ 3 | images/correct 4 | images/detected 5 | images/orgin 6 | -------------------------------------------------------------------------------- /frontend/src/assets/MenuLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/frontend/src/assets/MenuLogo.png -------------------------------------------------------------------------------- /backend/backend/__pycache__/asgi.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/backend/__pycache__/asgi.cpython-37.pyc -------------------------------------------------------------------------------- /backend/backend/__pycache__/urls.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/backend/__pycache__/urls.cpython-37.pyc -------------------------------------------------------------------------------- /backend/backend/__pycache__/urls.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/backend/__pycache__/urls.cpython-38.pyc -------------------------------------------------------------------------------- /backend/backend/__pycache__/wsgi.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/backend/__pycache__/wsgi.cpython-37.pyc -------------------------------------------------------------------------------- /backend/backend/__pycache__/wsgi.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/backend/__pycache__/wsgi.cpython-38.pyc -------------------------------------------------------------------------------- /backend/backend/__pycache__/config.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/backend/__pycache__/config.cpython-37.pyc -------------------------------------------------------------------------------- /backend/backend/__pycache__/detect.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/backend/__pycache__/detect.cpython-37.pyc -------------------------------------------------------------------------------- /backend/backend/__pycache__/detect.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/backend/__pycache__/detect.cpython-38.pyc -------------------------------------------------------------------------------- /backend/backend/__pycache__/views.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/backend/__pycache__/views.cpython-37.pyc -------------------------------------------------------------------------------- /backend/backend/__pycache__/views.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/backend/__pycache__/views.cpython-38.pyc -------------------------------------------------------------------------------- /backend/apps/detect/__pycache__/admin.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/detect/__pycache__/admin.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/detect/__pycache__/apps.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/detect/__pycache__/apps.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/monitor/__pycache__/apps.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/monitor/__pycache__/apps.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/__pycache__/admin.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/__pycache__/admin.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/__pycache__/admin.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/__pycache__/admin.cpython-38.pyc -------------------------------------------------------------------------------- /backend/apps/system/__pycache__/apps.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/__pycache__/apps.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/__pycache__/apps.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/__pycache__/apps.cpython-38.pyc -------------------------------------------------------------------------------- /backend/apps/system/__pycache__/urls.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/__pycache__/urls.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/__pycache__/views.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/__pycache__/views.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/fixtures/backdata/auth_user.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/fixtures/backdata/auth_user.xlsx -------------------------------------------------------------------------------- /backend/backend/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/backend/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /backend/backend/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/backend/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /backend/backend/__pycache__/routing.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/backend/__pycache__/routing.cpython-37.pyc -------------------------------------------------------------------------------- /backend/backend/__pycache__/settings.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/backend/__pycache__/settings.cpython-37.pyc -------------------------------------------------------------------------------- /backend/backend/__pycache__/settings.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/backend/__pycache__/settings.cpython-38.pyc -------------------------------------------------------------------------------- /backend/backend/conf/__pycache__/env.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/backend/conf/__pycache__/env.cpython-37.pyc -------------------------------------------------------------------------------- /backend/thirdparty/__pycache__/config.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/thirdparty/__pycache__/config.cpython-37.pyc -------------------------------------------------------------------------------- /backend/thirdparty/__pycache__/detect.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/thirdparty/__pycache__/detect.cpython-37.pyc -------------------------------------------------------------------------------- /backend/thirdparty/__pycache__/detect.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/thirdparty/__pycache__/detect.cpython-38.pyc -------------------------------------------------------------------------------- /backend/apps/detect/__pycache__/models.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/detect/__pycache__/models.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/detect/__pycache__/models.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/detect/__pycache__/models.cpython-38.pyc -------------------------------------------------------------------------------- /backend/apps/detect/__pycache__/result.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/detect/__pycache__/result.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/detect/__pycache__/result.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/detect/__pycache__/result.cpython-38.pyc -------------------------------------------------------------------------------- /backend/apps/monitor/__pycache__/admin.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/monitor/__pycache__/admin.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/monitor/__pycache__/models.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/monitor/__pycache__/models.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/__pycache__/models.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/__pycache__/models.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/__pycache__/models.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/__pycache__/models.cpython-38.pyc -------------------------------------------------------------------------------- /backend/apps/system/__pycache__/result.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/__pycache__/result.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/__pycache__/result.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/__pycache__/result.cpython-38.pyc -------------------------------------------------------------------------------- /backend/apps/system/fixtures/backdata/auth_group.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/fixtures/backdata/auth_group.xlsx -------------------------------------------------------------------------------- /backend/apps/system/fixtures/backdata/system_area.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/fixtures/backdata/system_area.xlsx -------------------------------------------------------------------------------- /backend/apps/system/fixtures/backdata/system_dept.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/fixtures/backdata/system_dept.xlsx -------------------------------------------------------------------------------- /backend/apps/system/fixtures/backdata/system_menu.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/fixtures/backdata/system_menu.xlsx -------------------------------------------------------------------------------- /backend/apps/system/fixtures/backdata/system_role.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/fixtures/backdata/system_role.xlsx -------------------------------------------------------------------------------- /backend/apps/system/fixtures/backdata/system_user.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/fixtures/backdata/system_user.xlsx -------------------------------------------------------------------------------- /backend/backend/utils/__pycache__/model.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/backend/utils/__pycache__/model.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/detect/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/detect/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/detect/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/detect/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /backend/apps/detect/__pycache__/consumers.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/detect/__pycache__/consumers.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/monitor/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/monitor/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /backend/apps/system/__pycache__/consumers.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/__pycache__/consumers.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/__pycache__/serializer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/__pycache__/serializer.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/config/__pycache__/cfg.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/config/__pycache__/cfg.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/fixtures/backdata/detected_img.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/fixtures/backdata/detected_img.xlsx -------------------------------------------------------------------------------- /backend/apps/system/fixtures/backdata/django_session.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/fixtures/backdata/django_session.xlsx -------------------------------------------------------------------------------- /backend/apps/system/fixtures/backdata/system_config.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/fixtures/backdata/system_config.xlsx -------------------------------------------------------------------------------- /backend/apps/system/fixtures/backdata/system_postion.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/fixtures/backdata/system_postion.xlsx -------------------------------------------------------------------------------- /backend/backend/__pycache__/image_process.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/backend/__pycache__/image_process.cpython-37.pyc -------------------------------------------------------------------------------- /backend/backend/__pycache__/image_process.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/backend/__pycache__/image_process.cpython-38.pyc -------------------------------------------------------------------------------- /backend/backend/utils/__pycache__/backends.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/backend/utils/__pycache__/backends.cpython-37.pyc -------------------------------------------------------------------------------- /backend/backend/utils/__pycache__/filters.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/backend/utils/__pycache__/filters.cpython-37.pyc -------------------------------------------------------------------------------- /backend/backend/utils/__pycache__/manager.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/backend/utils/__pycache__/manager.cpython-37.pyc -------------------------------------------------------------------------------- /backend/backend/utils/__pycache__/swagger.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/backend/utils/__pycache__/swagger.cpython-37.pyc -------------------------------------------------------------------------------- /backend/backend/utils/__pycache__/viewSet.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/backend/utils/__pycache__/viewSet.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/fixtures/backdata/auth_permission.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/fixtures/backdata/auth_permission.xlsx -------------------------------------------------------------------------------- /backend/apps/system/fixtures/backdata/auth_user_groups.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/fixtures/backdata/auth_user_groups.xlsx -------------------------------------------------------------------------------- /backend/apps/system/fixtures/backdata/django_admin_log.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/fixtures/backdata/django_admin_log.xlsx -------------------------------------------------------------------------------- /backend/apps/system/fixtures/backdata/system_login_log.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/fixtures/backdata/system_login_log.xlsx -------------------------------------------------------------------------------- /backend/apps/system/fixtures/backdata/system_role_dept.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/fixtures/backdata/system_role_dept.xlsx -------------------------------------------------------------------------------- /backend/apps/system/fixtures/backdata/system_role_menu.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/fixtures/backdata/system_role_menu.xlsx -------------------------------------------------------------------------------- /backend/backend/utils/__pycache__/pagination.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/backend/utils/__pycache__/pagination.cpython-37.pyc -------------------------------------------------------------------------------- /backend/backend/utils/__pycache__/permission.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/backend/utils/__pycache__/permission.cpython-37.pyc -------------------------------------------------------------------------------- /backend/backend/utils/__pycache__/softModel.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/backend/utils/__pycache__/softModel.cpython-37.pyc -------------------------------------------------------------------------------- /backend/backend/utils/__pycache__/validator.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/backend/utils/__pycache__/validator.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/__pycache__/dataset_process.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/__pycache__/dataset_process.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/__pycache__/dataset_process.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/__pycache__/dataset_process.cpython-38.pyc -------------------------------------------------------------------------------- /backend/apps/system/config/__pycache__/dispatch.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/config/__pycache__/dispatch.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/fixtures/backdata/django_content_type.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/fixtures/backdata/django_content_type.xlsx -------------------------------------------------------------------------------- /backend/apps/system/fixtures/backdata/django_migrations.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/fixtures/backdata/django_migrations.xlsx -------------------------------------------------------------------------------- /backend/apps/system/fixtures/backdata/system_dictionary.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/fixtures/backdata/system_dictionary.xlsx -------------------------------------------------------------------------------- /backend/apps/system/fixtures/backdata/system_menu_button.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/fixtures/backdata/system_menu_button.xlsx -------------------------------------------------------------------------------- /backend/apps/system/fixtures/backdata/system_user_groups.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/fixtures/backdata/system_user_groups.xlsx -------------------------------------------------------------------------------- /backend/apps/system/fixtures/backdata/system_user_roles.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/fixtures/backdata/system_user_roles.xlsx -------------------------------------------------------------------------------- /backend/apps/system/views/__pycache__/areaViews.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/views/__pycache__/areaViews.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/views/__pycache__/deptViews.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/views/__pycache__/deptViews.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/views/__pycache__/fileViews.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/views/__pycache__/fileViews.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/views/__pycache__/menuViews.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/views/__pycache__/menuViews.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/views/__pycache__/roleViews.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/views/__pycache__/roleViews.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/views/__pycache__/userViews.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/views/__pycache__/userViews.cpython-37.pyc -------------------------------------------------------------------------------- /backend/backend/utils/__pycache__/jsonResponse.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/backend/utils/__pycache__/jsonResponse.cpython-37.pyc -------------------------------------------------------------------------------- /backend/backend/utils/__pycache__/requestUtils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/backend/utils/__pycache__/requestUtils.cpython-37.pyc -------------------------------------------------------------------------------- /backend/media/files/c/a/ca4adafa8eff028a77eb606bfe849ffb.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/media/files/c/a/ca4adafa8eff028a77eb606bfe849ffb.jpeg -------------------------------------------------------------------------------- /backend/apps/system/__pycache__/dataset_preocess.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/__pycache__/dataset_preocess.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/fixtures/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/fixtures/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/fixtures/backdata/captcha_captchastore.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/fixtures/backdata/captcha_captchastore.xlsx -------------------------------------------------------------------------------- /backend/apps/system/fixtures/backdata/system_user_position.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/fixtures/backdata/system_user_position.xlsx -------------------------------------------------------------------------------- /backend/apps/system/views/__pycache__/loginViews.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/views/__pycache__/loginViews.cpython-37.pyc -------------------------------------------------------------------------------- /backend/backend/utils/__pycache__/coreInitialize.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/backend/utils/__pycache__/coreInitialize.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/detect/migrations/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/detect/migrations/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/monitor/migrations/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/monitor/migrations/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/fixtures/__pycache__/initialize.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/fixtures/__pycache__/initialize.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/fixtures/backdata/auth_group_permissions.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/fixtures/backdata/auth_group_permissions.xlsx -------------------------------------------------------------------------------- /backend/apps/system/fixtures/backdata/system_role_permission.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/fixtures/backdata/system_role_permission.xlsx -------------------------------------------------------------------------------- /backend/apps/system/management/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/management/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/migrations/__pycache__/0009_area.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/migrations/__pycache__/0009_area.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/migrations/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/migrations/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/migrations/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/migrations/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /backend/apps/system/views/__pycache__/loginLogViews.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/views/__pycache__/loginLogViews.cpython-37.pyc -------------------------------------------------------------------------------- /backend/backend/utils/__pycache__/apiLogMiddleware.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/backend/utils/__pycache__/apiLogMiddleware.cpython-37.pyc -------------------------------------------------------------------------------- /backend/backend/utils/__pycache__/softDeletManager.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/backend/utils/__pycache__/softDeletManager.cpython-37.pyc -------------------------------------------------------------------------------- /backend/backend/utils/__pycache__/softDeleteManager.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/backend/utils/__pycache__/softDeleteManager.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/detect/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class DetectConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'apps.detect' 7 | -------------------------------------------------------------------------------- /backend/apps/monitor/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class MonitorConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'apps.monitor' 7 | -------------------------------------------------------------------------------- /backend/apps/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 = 'apps.system' 7 | -------------------------------------------------------------------------------- /backend/apps/system/fixtures/backdata/auth_user_user_permissions.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/fixtures/backdata/auth_user_user_permissions.xlsx -------------------------------------------------------------------------------- /backend/apps/system/views/__pycache__/dictionaryViews.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/views/__pycache__/dictionaryViews.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/views/__pycache__/menuButtonViews.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/views/__pycache__/menuButtonViews.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/detect/migrations/__pycache__/0001_initial.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/detect/migrations/__pycache__/0001_initial.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/fixtures/__pycache__/coreInitialize.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/fixtures/__pycache__/coreInitialize.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/fixtures/backdata/system_user_user_permissions.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/fixtures/backdata/system_user_user_permissions.xlsx -------------------------------------------------------------------------------- /backend/apps/system/management/commands/__pycache__/init.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/management/commands/__pycache__/init.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/migrations/__pycache__/0001_initial.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/migrations/__pycache__/0001_initial.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/migrations/__pycache__/0001_initial.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/migrations/__pycache__/0001_initial.cpython-38.pyc -------------------------------------------------------------------------------- /backend/apps/system/migrations/__pycache__/0005_filelist.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/migrations/__pycache__/0005_filelist.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/views/__pycache__/apiWhiteListViews.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/views/__pycache__/apiWhiteListViews.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/views/__pycache__/operationLogViews.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/views/__pycache__/operationLogViews.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/views/__pycache__/systemConfigViews.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/views/__pycache__/systemConfigViews.cpython-37.pyc -------------------------------------------------------------------------------- /frontend/.env.test: -------------------------------------------------------------------------------- 1 | # 测试环境 2 | 3 | # 页面 title 前缀 4 | VITE_APP_TITLE=企业级后台管理系统 5 | # 启用权限管理 6 | VITE_APP_PM_ENABLED = true 7 | # 后端接口地址及端口(域名) 8 | VITE_APP_API = "http://127.0.0.1:8000/" 9 | 10 | -------------------------------------------------------------------------------- /backend/apps/system/migrations/__pycache__/0003_user_mobile.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/migrations/__pycache__/0003_user_mobile.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/serializers/__pycache__/areaSerializer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/serializers/__pycache__/areaSerializer.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/serializers/__pycache__/deptSerializer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/serializers/__pycache__/deptSerializer.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/serializers/__pycache__/fileSerializer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/serializers/__pycache__/fileSerializer.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/serializers/__pycache__/menuSerializer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/serializers/__pycache__/menuSerializer.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/serializers/__pycache__/roleSerializer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/serializers/__pycache__/roleSerializer.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/serializers/__pycache__/userSerializer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/serializers/__pycache__/userSerializer.cpython-37.pyc -------------------------------------------------------------------------------- /frontend/src/views/system/fileList/index.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /backend/apps/system/management/commands/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/management/commands/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/management/commands/__pycache__/init_area.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/management/commands/__pycache__/init_area.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/migrations/__pycache__/0004_apiwhitelist.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/migrations/__pycache__/0004_apiwhitelist.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/migrations/__pycache__/0006_operationlog.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/migrations/__pycache__/0006_operationlog.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/serializers/__pycache__/loginLogSerializer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/serializers/__pycache__/loginLogSerializer.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/serializers/__pycache__/loginSerizalizer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/serializers/__pycache__/loginSerizalizer.cpython-37.pyc -------------------------------------------------------------------------------- /frontend/src/types/md5-d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: yifeng 3 | * @Date: 2022-09-18 17:30:47 4 | * @LastEditors: yifeng 5 | * @LastEditTime: 2022-09-18 17:30:47 6 | * @Description: 7 | */ 8 | declare module 'js-md5' -------------------------------------------------------------------------------- /frontend/src/views/system/function/redireative.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /frontend/src/views/system/messageCenter/index.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /backend/apps/system/migrations/__pycache__/0002_role_data_range.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/migrations/__pycache__/0002_role_data_range.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/serializers/__pycache__/dictionarySerializer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/serializers/__pycache__/dictionarySerializer.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/serializers/__pycache__/menuButtonSerializer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/serializers/__pycache__/menuButtonSerializer.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/migrations/__pycache__/0002_auto_20220821_1936.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/migrations/__pycache__/0002_auto_20220821_1936.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/migrations/__pycache__/0007_remove_role_datas.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/migrations/__pycache__/0007_remove_role_datas.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/migrations/__pycache__/0008_auto_20221011_2051.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/migrations/__pycache__/0008_auto_20221011_2051.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/serializers/__pycache__/apiWhiteListSerializer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/serializers/__pycache__/apiWhiteListSerializer.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/serializers/__pycache__/customModelSerializer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/serializers/__pycache__/customModelSerializer.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/serializers/__pycache__/operationLogSerializer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/serializers/__pycache__/operationLogSerializer.cpython-37.pyc -------------------------------------------------------------------------------- /backend/apps/system/serializers/__pycache__/systemConfigSerializer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/backend/apps/system/serializers/__pycache__/systemConfigSerializer.cpython-37.pyc -------------------------------------------------------------------------------- /frontend/src/shims-vue.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | declare module '*.vue' { 3 | import type { DefineComponent } from 'vue' 4 | const component: DefineComponent<{}, {}, any> 5 | export default component 6 | } 7 | 8 | -------------------------------------------------------------------------------- /frontend/src/types/fast-crud.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: yifeng 3 | * @Date: 2022-09-18 10:55:37 4 | * @LastEditors: yifeng 5 | * @LastEditTime: 2022-09-18 10:56:44 6 | * @Description: 7 | */ 8 | declare module "@fast-crud/ui-element"; 9 | -------------------------------------------------------------------------------- /frontend/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | declare module '*.vue' { 4 | import type { DefineComponent } from 'vue' 5 | const component: DefineComponent<{}, {}, any> 6 | export default component 7 | } 8 | -------------------------------------------------------------------------------- /frontend/src/plugins/system/open/index.ts: -------------------------------------------------------------------------------- 1 | import open from '@/utils/system/open' 2 | 3 | 4 | function install(app, options: any = {}) { 5 | app.config.globalProperties.$open = open; 6 | 7 | } 8 | 9 | export default { 10 | install 11 | } -------------------------------------------------------------------------------- /frontend/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "module": "ESNext", 5 | "moduleResolution": "Node", 6 | "allowSyntheticDefaultImports": true 7 | }, 8 | "include": ["vite.config.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /frontend/.env.preview: -------------------------------------------------------------------------------- 1 | # 预览环境 2 | # 指定构建模式 3 | NODE_ENV=production 4 | 5 | # 标记当前构建方式 6 | VUE_APP_BUILD_MODE=PREVIEW 7 | 8 | # 页面 title 前缀 9 | VUE_APP_TITLE=企业级后台管理系统 10 | 11 | # 部署路径 12 | VUE_APP_PUBLIC_PATH=/ 13 | # 启用权限管理 14 | VUE_APP_PM_ENABLED = true 15 | -------------------------------------------------------------------------------- /frontend/src/plugins/system/fast-crud/icon-selector/components/font-awesome-4.7.0/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/frontend/src/plugins/system/fast-crud/icon-selector/components/font-awesome-4.7.0/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /backend/apps/system/fixtures/init_role.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "管理员", 4 | "key": "admin", 5 | "sort": 1, 6 | "status": true, 7 | "admin": true, 8 | "data_range": 3, 9 | "remark": null 10 | } 11 | ] 12 | -------------------------------------------------------------------------------- /frontend/src/plugins/system/fast-crud/icon-selector/components/font-awesome-4.7.0/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/frontend/src/plugins/system/fast-crud/icon-selector/components/font-awesome-4.7.0/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /frontend/src/plugins/system/fast-crud/icon-selector/components/font-awesome-4.7.0/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/frontend/src/plugins/system/fast-crud/icon-selector/components/font-awesome-4.7.0/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /frontend/src/plugins/system/fast-crud/icon-selector/components/font-awesome-4.7.0/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/frontend/src/plugins/system/fast-crud/icon-selector/components/font-awesome-4.7.0/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /frontend/src/plugins/system/fast-crud/icon-selector/components/font-awesome-4.7.0/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yifeng-two/django-vue3-admin/HEAD/frontend/src/plugins/system/fast-crud/icon-selector/components/font-awesome-4.7.0/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /frontend/.env.development: -------------------------------------------------------------------------------- 1 | # 开发环境 2 | ENV='development' 3 | # 页面 title 前缀 4 | VITE_APP_TITLE=企业级后台管理系统 5 | VITE_APP_VERSION ="1.0.0" 6 | NODE_ENV='development' 7 | ENV_CONFIG ='dev' 8 | # 启用权限管理 9 | VITE_APP_PM_ENABLED = true 10 | # 后端接口地址及端口(域名) 11 | VITE_APP_API = "http://127.0.0.1:8000" 12 | 13 | -------------------------------------------------------------------------------- /frontend/src/plugins/system/api/index.ts: -------------------------------------------------------------------------------- 1 | import api from '@/apis' 2 | 3 | // export default { 4 | // install (Vue) { 5 | // Vue.prototype.$api = api 6 | // } 7 | // } 8 | 9 | function install(app, options: any = {}) { 10 | app.config.globalProperties.$api = api; 11 | 12 | } 13 | 14 | export default { 15 | install 16 | } -------------------------------------------------------------------------------- /frontend/src/plugins/system/fast-crud/area-selector/area-data.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: yifeng 3 | * @Date: 2022-10-18 19:39:52 4 | * @LastEditors: yifeng 5 | * @LastEditTime: 2022-10-18 19:39:53 6 | * @Description: 7 | */ 8 | const pcaData = () => import('china-division/dist/pca-code.json') 9 | export default pcaData().then(ret => { return ret.default }) -------------------------------------------------------------------------------- /frontend/.env: -------------------------------------------------------------------------------- 1 | # 所有环境默认 2 | 3 | # 页面 title 前缀 4 | VITE_APP_TITLE=DVue 5 | 6 | # 网络请求公用地址 7 | VITE_APP_API=/api/ 8 | 9 | # 仓库地址 10 | # VUE_APP_REPO=https://github.com/d2-projects/d2-admin-start-kit 11 | 12 | # 国际化配置 13 | VITE_APP_I18N_LOCALE=zh-chs 14 | VITE_APP_I18N_FALLBACK_LOCALE=en 15 | 16 | # element 颜色 17 | # VITE_APP_ELEMENT_COLOR=#409EFF 18 | -------------------------------------------------------------------------------- /frontend/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /frontend/src/utils/common/structInterface.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: yifeng 3 | * @Date: 2022-09-13 22:54:40 4 | * @LastEditors: yifeng 5 | * @LastEditTime: 2022-09-13 22:54:41 6 | * @Description: 7 | */ 8 | export interface DbSchema { 9 | sys: {}, 10 | database: {} 11 | } 12 | export interface dbAcceptParma { 13 | dbName: string, 14 | path: string, 15 | value: boolean | string, 16 | user: boolean 17 | } -------------------------------------------------------------------------------- /frontend/src/plugins/system/fast-crud/area-selector/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: yifeng 3 | * @Date: 2022-10-18 19:34:29 4 | * @LastEditors: yifeng 5 | * @LastEditTime: 2022-10-18 19:41:50 6 | * @Description: 7 | */ 8 | import FsExtendsType from "./type"; 9 | import { App } from "vue"; 10 | 11 | export const FsExtendsAreaSelect = { 12 | install(app:App, options) { 13 | app.use(FsExtendsType, options); 14 | } 15 | }; -------------------------------------------------------------------------------- /backend/apps/system/migrations/0007_remove_role_datas.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.14 on 2022-10-10 21:25 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('system', '0006_operationlog'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='role', 15 | name='datas', 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /frontend/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | django-vue 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /frontend/src/apis/test.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: yifeng 3 | * @Date: 2022-09-06 22:55:03 4 | * @LastEditors: yifeng 5 | * @LastEditTime: 2022-09-28 22:34:01 6 | * @Description: 7 | */ 8 | import axiosInstance from '@/utils/net/axiosInstance' 9 | 10 | export const getImages = () => { 11 | // return axiosInstance.get(`/api/showImage`) 12 | return axiosInstance({ 13 | url: "/api/showImage", 14 | method: 'get', 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /frontend/.env.production: -------------------------------------------------------------------------------- 1 | # 生产环境 2 | # 指定构建模式 3 | ENV='production' 4 | 5 | # 页面 title 前缀 6 | VITE_APP_TITLE=企业级后台管理系统 7 | 8 | VITE_APP_VERSION ="1.0.0" 9 | 10 | NODE_ENV='production' 11 | 12 | ENV_CONFIG ='prod' 13 | # 启用权限管理 14 | VITE_APP_PM_ENABLED = true 15 | # 后端接口地址及端口(域名) 16 | VITE_APP_API = "http://127.0.0.1:8000" 17 | 18 | # 标记当前构建方式 19 | VITE_APP_BUILD_MODE=PREVIEW 20 | 21 | # 部署路径 22 | VITE_APP_PUBLIC_PATH=/ 23 | # 启用权限管理 24 | VITE_APP_PM_ENABLED = true 25 | -------------------------------------------------------------------------------- /backend/backend/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for ImageDetect 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', 'backend.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /frontend/src/assets/vue.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/backend/routing.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Author: yifeng 3 | Date: 2022-08-14 16:49:50 4 | LastEditors: yifeng 5 | LastEditTime: 2022-08-27 23:10:07 6 | Description: 7 | ''' 8 | from django.urls import re_path 9 | from django.urls import path 10 | from apps.detect.consumers import SendResultConsumer 11 | 12 | websocket_urlpatterns = [ 13 | # re_path(r'ws/(?P\w+)/$', SendResultConsumer.as_asgi()), 14 | # re_path(r'ws/(?P\w+)/$', SendResultConsumer.as_asgi()), 15 | path('test', SendResultConsumer.as_asgi()), 16 | ] -------------------------------------------------------------------------------- /frontend/src/configs/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: yifeng 3 | * @Date: 2022-08-14 21:55:39 4 | * @LastEditors: yifeng 5 | * @LastEditTime: 2022-09-06 22:31:23 6 | * @Description: 7 | */ 8 | 9 | const BASE_URL = "127.0.0.1"; 10 | 11 | // axios基本路径参数设置 12 | const AXIOS_PROTOCL = 'http' 13 | const AXIOS_PORT = '8000'; 14 | export const AXIOS_BASE_URL = `${AXIOS_PROTOCL}://${BASE_URL}:${AXIOS_PORT}/` 15 | 16 | 17 | // websocket基本路径参数设置 18 | const WS_PORT = '8000'; 19 | export const WS_ADDRESS = `ws://${BASE_URL}:${WS_PORT}`; 20 | -------------------------------------------------------------------------------- /backend/apps/detect/serializer.py: -------------------------------------------------------------------------------- 1 | from rest_framework import serializers 2 | 3 | from detect.models import DetectImage 4 | 5 | 6 | class DetectImageModelSerializer(serializers.ModelSerializer): 7 | class Meta: 8 | model = DetectImage 9 | fields = '__all__' 10 | 11 | 12 | class DetectImageSerializer(serializers.Serializer): 13 | # id = serializers.AutoField() 14 | filename = serializers.CharField() 15 | detected_filename = serializers.CharField() 16 | detect_result = serializers.CharField() 17 | -------------------------------------------------------------------------------- /frontend/src/plugins/system/fast-crud/area-selector/type/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: yifeng 3 | * @Date: 2022-10-18 19:34:53 4 | * @LastEditors: yifeng 5 | * @LastEditTime: 2022-10-18 19:40:42 6 | * @Description: 7 | */ 8 | import { useTypes } from "@fast-crud/fast-crud"; 9 | import { App } from "vue"; 10 | import types from "./types"; 11 | 12 | //兼容旧版本 13 | export default { 14 | install(app:App, options) { 15 | const newTypes = types(); 16 | const { addTypes } = useTypes(); 17 | addTypes(newTypes); 18 | } 19 | }; -------------------------------------------------------------------------------- /frontend/src/plugins/system/fast-crud/icon-selector/type/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: yifeng 3 | * @Date: 2022-10-13 21:20:04 4 | * @LastEditors: yifeng 5 | * @LastEditTime: 2022-10-13 21:20:04 6 | * @Description: 7 | */ 8 | import { useTypes } from "@fast-crud/fast-crud"; 9 | import { App } from "vue"; 10 | import types from "./types"; 11 | 12 | //兼容旧版本 13 | export default { 14 | install(app:App, options) { 15 | const newTypes = types(); 16 | const { addTypes } = useTypes(); 17 | addTypes(newTypes); 18 | } 19 | }; -------------------------------------------------------------------------------- /frontend/src/stores/system-permission.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: yifeng 3 | * @Date: 2022-10-09 20:10:32 4 | * @LastEditors: yifeng 5 | * @LastEditTime: 2022-10-09 20:36:22 6 | * @Description: 7 | */ 8 | import { defineStore } from "pinia"; 9 | import useDbStore from "./system-db"; 10 | 11 | const usePermissionStore = defineStore('system/permission', { 12 | state: () => ({ 13 | // 用户信息 14 | info: {} 15 | }), 16 | getters: { 17 | doubleCount: (state) => state.info, 18 | }, 19 | 20 | }) 21 | 22 | export default usePermissionStore; 23 | -------------------------------------------------------------------------------- /frontend/src/types/axios-vue.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: yifeng 3 | * @Date: 2022-09-12 10:42:16 4 | * @LastEditors: yifeng 5 | * @LastEditTime: 2022-09-12 17:39:51 6 | * @Description: 7 | */ 8 | /* eslint-disable no-undef */ 9 | /* eslint-disable no-unused-vars */ 10 | 11 | 12 | import axios from 'axios' 13 | // declare module 'axios' { 14 | // interface AxiosInstance { 15 | // (config: AxiosRequestConfig): Promise 16 | // } 17 | // } 18 | declare module 'axios' { 19 | export interface AxiosResponse extends Promise {} 20 | } -------------------------------------------------------------------------------- /frontend/src/views/system/function/redirect.vue: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /backend/apps/system/serializers/loginLogSerializer.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Author: yifeng 3 | Date: 2022-10-07 18:35:43 4 | LastEditors: yifeng 5 | LastEditTime: 2022-10-07 18:36:52 6 | Description: 7 | ''' 8 | 9 | from apps.system.models import LoginLog 10 | from apps.system.serializers.customModelSerializer import CustomModelSerializer 11 | 12 | 13 | class LoginLogSerializer(CustomModelSerializer): 14 | """ 15 | 登录日志权限-序列化器 16 | """ 17 | class Meta: 18 | model = LoginLog 19 | fields = "__all__" 20 | read_only_fields = ["id"] 21 | -------------------------------------------------------------------------------- /backend/apps/system/migrations/0003_user_mobile.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.14 on 2022-09-02 19:15 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('system', '0002_role_data_range'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='user', 15 | name='mobile', 16 | field=models.CharField(blank=True, help_text='电话', max_length=255, null=True, verbose_name='电话'), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /backend/apps/system/serializers/menuButtonSerializer.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Author: yifeng 3 | Date: 2022-08-28 19:25:51 4 | LastEditors: yifeng 5 | LastEditTime: 2022-09-01 23:54:51 6 | Description: 7 | ''' 8 | from apps.system.models import MenuButton 9 | from apps.system.serializers.customModelSerializer import CustomModelSerializer 10 | 11 | 12 | class MenuButtonSerializer(CustomModelSerializer): 13 | """ 14 | 菜单按钮-序列化器 15 | """ 16 | 17 | class Meta: 18 | model = MenuButton 19 | fields = "__all__" 20 | read_only_fields = ["id"] 21 | -------------------------------------------------------------------------------- /backend/thirdparty/yolov5_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "source":"data/images/correct", 3 | "weights": "runs/train/exp6/weights/best.pt", 4 | "data": "data/MyVOC.yaml", 5 | "save_dir":"D:/develop/django-vue/images/detected", 6 | "device": "cpu", 7 | "imgsz": 640, 8 | "conf_thres": 0.35, 9 | "iou_thres": 0.45, 10 | "agnostic_nms":false, 11 | "max_det":300, 12 | "augment": false, 13 | "save_img": true, 14 | "save_txt":false, 15 | "save_conf":false, 16 | "half": false, 17 | "dnn": false, 18 | "view_img":false, 19 | "hide_labels":false, 20 | "hide_conf":false 21 | } -------------------------------------------------------------------------------- /frontend/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: yifeng 3 | * @Date: 2022-08-14 21:54:03 4 | * @LastEditors: yifeng 5 | * @LastEditTime: 2022-09-28 22:36:25 6 | * @Description: 7 | */ 8 | // import { initWebSocket, sendWebsocket, closeWebsocket } from "./websocket" 9 | // export { 10 | // initWebSocket, 11 | // sendWebsocket, 12 | // closeWebsocket 13 | // } 14 | export { createSocket } from "./net/websocket"; 15 | export * from "./validators/loginValidators"; 16 | export * from "./validators/registerValidators"; 17 | export * from "./net/axiosInstance" 18 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // 使用 IntelliSense 了解相关属性。 3 | // 悬停以查看现有属性的描述。 4 | // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "Python: Current File", 9 | "type": "python", 10 | "request": "launch", 11 | "program": "${file}", 12 | "console": "integratedTerminal", 13 | "justMyCode": true, 14 | "args": [ 15 | "init", 16 | ], 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /frontend/src/plugins/permission/directive/permission/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue' 2 | import {permission} from './permission' 3 | import permissionUtil from './util.permission' 4 | 5 | const install = function (app: App, options: any = {}) { 6 | 7 | app.directive('permission', permission) 8 | app.config.globalProperties.hasPermissions = permissionUtil.hasPermissions 9 | // if (window.Vue) { 10 | // window.permission = permission 11 | // app.use(install); // eslint-disable-line 12 | // } 13 | } 14 | 15 | export default { 16 | install 17 | } 18 | 19 | -------------------------------------------------------------------------------- /backend/apps/system/migrations/0008_auto_20221011_2051.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.14 on 2022-10-11 20:51 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('system', '0007_remove_role_datas'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RenameModel( 14 | old_name='Postion', 15 | new_name='Position', 16 | ), 17 | migrations.AlterModelTable( 18 | name='position', 19 | table='system_position', 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /frontend/src/apis/system/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: yifeng 3 | * @Date: 2022-07-17 17:01:45 4 | * @LastEditors: yifeng 5 | * @LastEditTime: 2022-10-18 19:56:08 6 | * @Description: 7 | */ 8 | // appfront/src/api/index.js 9 | // import Vue from 'vue' 10 | 11 | export * from './loginRegister' 12 | export * from './user' 13 | export * from './dictionary' 14 | export * from './role' 15 | export * from './dept' 16 | export * from './menu' 17 | export * from './menuButton' 18 | 19 | export * from './systemConfig' 20 | export * from './systemLog' 21 | export * from './apiWhiteList' 22 | export * from './area' -------------------------------------------------------------------------------- /frontend/src/plugins/permission/directive/permission/permission.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @创建文件时间: 2021-06-27 10:14:26 3 | * @Auther: 猿小天 4 | * @最后修改人: 猿小天 5 | * @最后修改时间: 2021-07-27 23:00:10 6 | * 联系Qq:1638245306 7 | * @文件介绍: 自定义指令-权限控制 8 | */ 9 | import permissionUtil from './util.permission' 10 | export const permission = (el, binding, vnode)=> { 11 | const { value } = binding 12 | const hasPermission = permissionUtil.hasPermissions(value) 13 | if (import.meta.env.VITE_APP_PM_ENABLED) { 14 | if (!hasPermission) { 15 | el.parentNode && el.parentNode.removeChild(el) 16 | } 17 | } 18 | } 19 | 20 | -------------------------------------------------------------------------------- /backend/thirdparty/config.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Author: yifeng 3 | Date: 2022-08-11 19:56:39 4 | LastEditors: yifeng 5 | LastEditTime: 2022-08-27 18:57:23 6 | Description: 7 | ''' 8 | 9 | import os 10 | 11 | base_path = os.getcwd() 12 | 13 | orgin_path = os.path.join(base_path, "images/orgin") 14 | 15 | save_path = os.path.join(base_path, "images/detected") 16 | 17 | net_path = "http://localhost/images/detected" 18 | 19 | database_dict_key = ['filename', 'detected_filename', 'detect_result', 'create_date_time'] 20 | 21 | front_dict_key = ['name', 'src', 'result'] 22 | 23 | config_file = "./thirdparty/yolov5_config.json" -------------------------------------------------------------------------------- /backend/apps/detect/result.py: -------------------------------------------------------------------------------- 1 | import time 2 | from apps.detect.models import DetectImage 3 | 4 | 5 | def store_data_by_model(data): 6 | now = time.localtime() 7 | now_time = time.strftime("%Y-%m-%d %H:%M:%S", now) 8 | for item in data: 9 | row_data = DetectImage.objects.create(filename=item.get("filename"), 10 | detected_filename=item.get("detected_filename"), 11 | detect_result=item.get("detect_result"), 12 | create_date_time=now_time) 13 | row_data.save() -------------------------------------------------------------------------------- /frontend/src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 14 | 15 | 25 | -------------------------------------------------------------------------------- /frontend/src/views/system/error/404/404.vue: -------------------------------------------------------------------------------- 1 | 8 | 13 | 19 | > -------------------------------------------------------------------------------- /frontend/src/views/system/function/refresh.vue: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | 25 | -------------------------------------------------------------------------------- /backend/apps/system/migrations/0002_role_data_range.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.14 on 2022-09-02 19:13 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('system', '0001_initial'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='role', 15 | name='data_range', 16 | field=models.IntegerField(choices=[(0, '仅本人数据权限'), (1, '本部门及以下数据权限'), (2, '本部门数据权限'), (3, '全部数据权限'), (4, '自定数据权限')], default=0, help_text='数据权限范围', verbose_name='数据权限范围'), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /frontend/src/plugins/system/fast-crud/icon-selector/type/types.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: yifeng 3 | * @Date: 2022-10-13 21:19:26 4 | * @LastEditors: yifeng 5 | * @LastEditTime: 2022-10-16 13:16:36 6 | * @Description: 7 | */ 8 | export default function () { 9 | return { 10 | "icon-select": { 11 | form: { 12 | component: { 13 | name: "fs-icon-select" 14 | } 15 | }, 16 | column: { 17 | align: 'center', 18 | component: { 19 | name: "fs-single-icon", 20 | } 21 | }, 22 | } 23 | }; 24 | } -------------------------------------------------------------------------------- /backend/apps/system/views/areaViews.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Author: yifeng 3 | Date: 2022-10-18 19:10:27 4 | LastEditors: yifeng 5 | LastEditTime: 2022-10-18 19:11:40 6 | Description: 7 | ''' 8 | from apps.system.models import Area 9 | from apps.system.serializers.areaSerializer import AreaSerializer, AreaCreateUpdateSerializer 10 | from backend.utils.viewSet import CustomModelViewSet 11 | 12 | 13 | class AreaViewSet(CustomModelViewSet): 14 | """ 15 | 地区管理接口 16 | list:查询 17 | create:新增 18 | update:修改 19 | retrieve:单例 20 | destroy:删除 21 | """ 22 | queryset = Area.objects.all() 23 | serializer_class = AreaSerializer 24 | extra_filter_backends = [] 25 | -------------------------------------------------------------------------------- /backend/apps/system/views/fileViews.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Author: yifeng 3 | Date: 2022-10-02 12:28:15 4 | LastEditors: yifeng 5 | LastEditTime: 2022-10-02 12:30:20 6 | Description: 7 | ''' 8 | from apps.system.models import FileList 9 | from apps.system.serializers.fileSerializer import FileSerializer 10 | from backend.utils.viewSet import CustomModelViewSet 11 | 12 | 13 | class FileViewSet(CustomModelViewSet): 14 | """ 15 | 文件管理接口 16 | list:查询 17 | create:新增 18 | update:修改 19 | retrieve:单例 20 | destroy:删除 21 | """ 22 | queryset = FileList.objects.all() 23 | serializer_class = FileSerializer 24 | filter_fields = ['name', ] 25 | permission_classes = [] -------------------------------------------------------------------------------- /backend/apps/system/views/loginLogViews.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Author: yifeng 3 | Date: 2022-10-07 18:29:06 4 | LastEditors: yifeng 5 | LastEditTime: 2022-10-07 18:36:43 6 | Description: 7 | ''' 8 | from apps.system.models import LoginLog 9 | from apps.system.serializers.loginLogSerializer import LoginLogSerializer 10 | from backend.utils.viewSet import CustomModelViewSet 11 | 12 | 13 | 14 | 15 | class LoginLogViewSet(CustomModelViewSet): 16 | """ 17 | 登录日志接口 18 | list:查询 19 | create:新增 20 | update:修改 21 | retrieve:单例 22 | destroy:删除 23 | """ 24 | queryset = LoginLog.objects.all() 25 | serializer_class = LoginLogSerializer 26 | extra_filter_backends = [] -------------------------------------------------------------------------------- /backend/apps/system/views/menuButtonViews.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Author: yifeng 3 | Date: 2022-08-28 19:27:53 4 | LastEditors: yifeng 5 | LastEditTime: 2022-09-01 23:55:31 6 | Description: 7 | ''' 8 | from apps.system.models import MenuButton 9 | from apps.system.serializers.menuButtonSerializer import MenuButtonSerializer 10 | from backend.utils.viewSet import CustomModelViewSet 11 | 12 | 13 | class MenuButtonViewSet(CustomModelViewSet): 14 | """ 15 | 菜单按钮接口 16 | list:查询 17 | create:新增 18 | update:修改 19 | retrieve:单例 20 | destroy:删除 21 | """ 22 | queryset = MenuButton.objects.all() 23 | serializer_class = MenuButtonSerializer 24 | extra_filter_backends = [] -------------------------------------------------------------------------------- /backend/apps/system/views/apiWhiteListViews.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Author: yifeng 3 | Date: 2022-10-16 21:45:55 4 | LastEditors: yifeng 5 | LastEditTime: 2022-10-16 21:45:56 6 | Description: 7 | ''' 8 | from apps.system.models import ApiWhiteList 9 | from apps.system.serializers.apiWhiteListSerializer import ApiWhiteListSerializer 10 | from backend.utils.viewSet import CustomModelViewSet 11 | 12 | 13 | class ApiWhiteListViewSet(CustomModelViewSet): 14 | """ 15 | 接口白名单 16 | list:查询 17 | create:新增 18 | update:修改 19 | retrieve:单例 20 | destroy:删除 21 | """ 22 | queryset = ApiWhiteList.objects.all() 23 | serializer_class = ApiWhiteListSerializer 24 | # permission_classes = [] -------------------------------------------------------------------------------- /frontend/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /backend/apps/system/views/operationLogViews.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Author: yifeng 3 | Date: 2022-10-07 18:53:25 4 | LastEditors: yifeng 5 | LastEditTime: 2022-10-07 18:53:26 6 | Description: 7 | ''' 8 | from apps.system.models import OperationLog 9 | from apps.system.serializers.operationLogSerializer import OperationLogSerializer 10 | from backend.utils.viewSet import CustomModelViewSet 11 | 12 | 13 | class OperationLogViewSet(CustomModelViewSet): 14 | """ 15 | 操作日志接口 16 | list:查询 17 | create:新增 18 | update:修改 19 | retrieve:单例 20 | destroy:删除 21 | """ 22 | queryset = OperationLog.objects.order_by('-create_datetime') 23 | serializer_class = OperationLogSerializer 24 | # permission_classes = [] -------------------------------------------------------------------------------- /backend/backend/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for ImageDetect 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 | 12 | from django.core.asgi import get_asgi_application 13 | from channels.routing import ProtocolTypeRouter, URLRouter 14 | from backend import routing 15 | 16 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings') 17 | 18 | # application = get_asgi_application() 19 | application = ProtocolTypeRouter({ 20 | "http": get_asgi_application(), 21 | "websocket": URLRouter(routing.websocket_urlpatterns) 22 | }) 23 | -------------------------------------------------------------------------------- /frontend/src/apis/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: yifeng 3 | * @Date: 2022-10-07 17:32:33 4 | * @LastEditors: yifeng 5 | * @LastEditTime: 2022-10-07 17:48:56 6 | * @Description: 7 | */ 8 | import { assign, map } from 'lodash' 9 | // import faker from 'faker/locale/zh_CN' 10 | import { axiosService, axiosInstance } from '@/utils/net/axiosInstance' 11 | import * as tools from '@/utils/system/tools' 12 | 13 | // const files = require.context('./modules', true, /\.api\.js$/) 14 | const files = import.meta.glob('/src/apis/system/*.ts') 15 | const generators = files.keys().map(key => files(key).default) 16 | 17 | export default assign({}, ...map(generators, generator => generator({ 18 | axiosService, 19 | axiosInstance, 20 | tools 21 | }))) -------------------------------------------------------------------------------- /backend/apps/system/serializers/fileSerializer.py: -------------------------------------------------------------------------------- 1 | from rest_framework import serializers 2 | from apps.system.models import FileList 3 | from apps.system.serializers.customModelSerializer import CustomModelSerializer 4 | 5 | 6 | class FileSerializer(CustomModelSerializer): 7 | url = serializers.SerializerMethodField(read_only=True) 8 | 9 | def get_url(self, instance): 10 | return 'media/' + str(instance.url) 11 | 12 | class Meta: 13 | model = FileList 14 | fields = "__all__" 15 | 16 | def create(self, validated_data): 17 | validated_data['name'] = str(self.initial_data.get('file')) 18 | validated_data['url'] = self.initial_data.get('file') 19 | return super().create(validated_data) 20 | -------------------------------------------------------------------------------- /frontend/src/plugins/permission/index.ts: -------------------------------------------------------------------------------- 1 | 2 | import { App } from 'vue'; 3 | import permissionDirective from './directive/permission' 4 | 5 | function install(app: App, options: any = {}) { 6 | 7 | const isEnabled = import.meta.env.VITE_APP_PM_ENABLED === 'true' 8 | // function isInited() { 9 | // if (!isEnabled) { 10 | // console.warn('PM is disabled') 11 | // return true 12 | // } 13 | // return store.getters['permission/inited'] 14 | // } 15 | 16 | // 开启权限模块 17 | if (isEnabled) { 18 | // 注册v-permission指令, 用于控制按钮权限 19 | app.use(permissionDirective) 20 | // console.log('PM is abled'); 21 | 22 | }else{ 23 | console.warn('PM is disabled') 24 | } 25 | } 26 | 27 | export default { 28 | install 29 | } -------------------------------------------------------------------------------- /backend/apps/detect/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | 4 | # Create your models here. 5 | class DetectImage(models.Model): 6 | 7 | id = models.AutoField("id", primary_key=True) 8 | filename = models.CharField("文件名", max_length=50) 9 | detected_filename = models.CharField("文件名", max_length=50) 10 | detect_result = models.CharField("检测结果", max_length=10) 11 | create_date_time = models.DateTimeField("检测时间", max_length=40) 12 | 13 | class Meta: 14 | db_table = "detected_img" 15 | verbose_name = "检测数据表" 16 | verbose_name_plural = verbose_name 17 | 18 | def __str__(self): 19 | return self.filename 20 | 21 | # def get_absolute_url(self): 22 | # return reverse("_detail", kwargs={"pk": self.pk}) -------------------------------------------------------------------------------- /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', 'backend.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 | 22 | if __name__ == '__main__': 23 | main() 24 | -------------------------------------------------------------------------------- /backend/apps/system/serializers/operationLogSerializer.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Author: yifeng 3 | Date: 2022-10-07 18:51:31 4 | LastEditors: yifeng 5 | LastEditTime: 2022-10-07 18:52:38 6 | Description: 7 | ''' 8 | 9 | from apps.system.models import OperationLog 10 | from apps.system.serializers.customModelSerializer import CustomModelSerializer 11 | 12 | 13 | class OperationLogSerializer(CustomModelSerializer): 14 | """ 15 | 日志-序列化器 16 | """ 17 | 18 | class Meta: 19 | model = OperationLog 20 | fields = "__all__" 21 | read_only_fields = ["id"] 22 | 23 | 24 | class OperationLogCreateUpdateSerializer(CustomModelSerializer): 25 | """ 26 | 操作日志 创建/更新时的列化器 27 | """ 28 | 29 | class Meta: 30 | model = OperationLog 31 | fields = '__all__' 32 | -------------------------------------------------------------------------------- /frontend/src/main.ts: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from '@/App.vue' 3 | import router from '@/router' 4 | 5 | import ElementPlus from 'element-plus' 6 | import * as ElementPlusIconsVue from '@element-plus/icons-vue' 7 | import zhCn from 'element-plus/es/locale/lang/zh-cn' 8 | import 'element-plus/dist/index.css' 9 | 10 | import 'font-awesome/css/font-awesome.min.css' 11 | 12 | import plugin from "@/plugins"; 13 | import store from "@/stores" 14 | 15 | const app = createApp(App) 16 | for (const [key, component] of Object.entries(ElementPlusIconsVue)) { 17 | app.component(key, component) 18 | } 19 | app.use(router) 20 | app.use(ElementPlus, { 21 | locale: zhCn, 22 | }) 23 | // app.use(createPinia()) 24 | app.use(store) 25 | // 引入FastCrud 26 | app.use(plugin) 27 | 28 | app.mount('#app') 29 | -------------------------------------------------------------------------------- /frontend/src/plugins/system/log/index.ts: -------------------------------------------------------------------------------- 1 | import useLogStore from '@/stores/system-log' 2 | import Log from '@/utils/common/log.print' 3 | import { App } from 'vue' 4 | 5 | 6 | function install(app:App, options: any = {}) { 7 | 8 | const logStore = useLogStore() 9 | // 快速打印 log 10 | app.config.globalProperties.$log = { 11 | ...Log, 12 | push(data: any) { 13 | if (typeof data === 'string') { 14 | // 如果传递来的数据是字符串 15 | // 赋值给 message 字段 16 | // 为了方便使用 17 | // eg: this.$log.push('foo text') 18 | logStore.push({ 19 | message: data 20 | }) 21 | } else if (typeof data === 'object') { 22 | // 如果传递来的数据是对象 23 | logStore.push(data) 24 | } 25 | } 26 | } 27 | 28 | } 29 | 30 | export default { 31 | install 32 | } -------------------------------------------------------------------------------- /frontend/src/views/Home/Home.vue: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /frontend/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "useDefineForClassFields": true, 5 | "module": "ESNext", 6 | "moduleResolution": "Node", 7 | "strict": true, 8 | "jsx": "preserve", 9 | "jsxFactory": "h", 10 | "jsxFragmentFactory": "Fragment", 11 | "sourceMap": true, 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "esModuleInterop": true, 15 | "lib": ["ESNext", "DOM"], 16 | "skipLibCheck": true, 17 | "baseUrl": "./", 18 | "types": [ 19 | "vite/client" 20 | ], 21 | 22 | "paths": { 23 | "@/*": [ 24 | "./src/*" 25 | ], 26 | }, 27 | "suppressImplicitAnyIndexErrors": true, 28 | }, 29 | "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"], 30 | "references": [{ "path": "./tsconfig.node.json" }] 31 | } 32 | -------------------------------------------------------------------------------- /backend/apps/system/fixtures/init_dept.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "DVAdmin团队", 4 | "sort": 1, 5 | "owner": "", 6 | "phone": "", 7 | "email": "", 8 | "status": true, 9 | "parent": null, 10 | "children": [ 11 | { 12 | "name": "运营部", 13 | "sort": 2, 14 | "owner": "", 15 | "phone": "", 16 | "email": "", 17 | "status": true, 18 | "parent": 1, 19 | "children": [] 20 | }, 21 | { 22 | "name": "技术部", 23 | "sort": 1, 24 | "owner": "", 25 | "phone": "", 26 | "email": "", 27 | "status": true, 28 | "parent": 3, 29 | "children": [] 30 | } 31 | ] 32 | } 33 | ] 34 | -------------------------------------------------------------------------------- /frontend/src/plugins/system/fast-crud/icon-selector/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: yifeng 3 | * @Date: 2022-10-12 20:57:18 4 | * @LastEditors: yifeng 5 | * @LastEditTime: 2022-10-16 13:19:11 6 | * @Description: 7 | */ 8 | import FsExtendsType from "./type"; 9 | export * from "./type"; 10 | import { utils } from "@fast-crud/fast-crud"; 11 | import { App } from "vue"; 12 | const asyncModules = import.meta.glob("./components/*.vue"); 13 | const asyncModules2 = import.meta.glob("./components/*.tsx"); 14 | const FsExtendsComponents = { 15 | install(app:App) { 16 | //加载异步组件,异步组件将会被懒加载,所以不用担心打包之后的体积问题 17 | utils.vite.installAsyncComponents(app, asyncModules, []); 18 | utils.vite.installAsyncComponents(app, asyncModules2, []); 19 | } 20 | }; 21 | 22 | export const FsExtendsIconSelect = { 23 | install(app:App, options) { 24 | app.use(FsExtendsType, options); 25 | app.use(FsExtendsComponents); 26 | } 27 | }; -------------------------------------------------------------------------------- /frontend/src/plugins/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: yifeng 3 | * @Date: 2022-09-18 10:16:27 4 | * @LastEditors: yifeng 5 | * @LastEditTime: 2022-10-09 21:23:04 6 | * @Description: 7 | */ 8 | import "@/plugins/system/iconify"; 9 | // import "@/plugins/iconfont"; 10 | import FastCrud from "@/plugins/system/fast-crud"; 11 | 12 | // 功能插件 13 | import pluginApi from '@/plugins/system/api' 14 | import pluginError from '@/plugins/system/error' 15 | import pluginLog from '@/plugins/system/log' 16 | // import pluginOpen from '@/plugins/system/open' 17 | 18 | import pluginPermission from '@/plugins/permission' 19 | import { App } from "vue"; 20 | 21 | function install(app: App, options: any = {}) { 22 | 23 | app.use(pluginPermission,options) 24 | // app.use(pluginApi) 25 | // app.use(pluginOpen) 26 | app.use(pluginError,options) 27 | app.use(pluginLog,options) 28 | app.use(FastCrud,options); 29 | 30 | } 31 | 32 | export default { 33 | install 34 | } -------------------------------------------------------------------------------- /frontend/src/components/HelloWorld.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 33 | 34 | 39 | -------------------------------------------------------------------------------- /backend/apps/system/serializers/apiWhiteListSerializer.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Author: yifeng 3 | Date: 2022-10-16 21:43:34 4 | LastEditors: yifeng 5 | LastEditTime: 2022-10-16 21:48:01 6 | Description: 7 | ''' 8 | from apps.system.models import ApiWhiteList 9 | from apps.system.serializers.customModelSerializer import CustomModelSerializer 10 | 11 | 12 | class ApiWhiteListSerializer(CustomModelSerializer): 13 | """ 14 | 接口白名单-序列化器 15 | """ 16 | 17 | class Meta: 18 | model = ApiWhiteList 19 | fields = "__all__" 20 | read_only_fields = ["id"] 21 | 22 | 23 | class ApiWhiteListInitSerializer(CustomModelSerializer): 24 | """ 25 | 初始化获取数信息(用于生成初始化json文件) 26 | """ 27 | 28 | class Meta: 29 | model = ApiWhiteList 30 | fields = ['url', 'method', 'enable_datasource', 'creator', 'dept_belong_id'] 31 | read_only_fields = ["id"] 32 | extra_kwargs = { 33 | 'creator': {'write_only': True}, 34 | 'dept_belong_id': {'write_only': True} 35 | } 36 | -------------------------------------------------------------------------------- /backend/apps/system/serializers/areaSerializer.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Author: yifeng 3 | Date: 2022-10-18 19:09:00 4 | LastEditors: yifeng 5 | LastEditTime: 2022-10-18 19:11:31 6 | Description: 7 | ''' 8 | from rest_framework import serializers 9 | 10 | from apps.system.models import Area 11 | from apps.system.serializers.customModelSerializer import CustomModelSerializer 12 | from backend.utils.viewSet import CustomModelViewSet 13 | 14 | 15 | class AreaSerializer(CustomModelSerializer): 16 | """ 17 | 地区-序列化器 18 | """ 19 | pcode_count = serializers.SerializerMethodField(read_only=True) 20 | 21 | def get_pcode_count(self, instance: Area): 22 | return Area.objects.filter(pcode=instance).count() 23 | 24 | class Meta: 25 | model = Area 26 | fields = "__all__" 27 | read_only_fields = ["id"] 28 | 29 | 30 | class AreaCreateUpdateSerializer(CustomModelSerializer): 31 | """ 32 | 地区管理 创建/更新时的列化器 33 | """ 34 | 35 | class Meta: 36 | model = Area 37 | fields = '__all__' 38 | 39 | -------------------------------------------------------------------------------- /frontend/src/views/DataManage/DetectDataManage.vue: -------------------------------------------------------------------------------- 1 | 8 | 24 | 25 | 34 | -------------------------------------------------------------------------------- /frontend/src/apis/system/apiWhiteList.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: yifeng 3 | * @Date: 2022-10-16 21:30:53 4 | * @LastEditors: yifeng 5 | * @LastEditTime: 2022-10-16 21:34:34 6 | * @Description: 7 | */ 8 | import axiosInstance from '@/utils/net/axiosInstance' 9 | 10 | export const apiWhiteListBaseUrl = '/api/system/api_white_list/' 11 | 12 | export function getApiWhiteList (query) { 13 | return axiosInstance({ 14 | url: apiWhiteListBaseUrl, 15 | method: 'get', 16 | params: query 17 | }) 18 | } 19 | 20 | export function createApiWhite (obj, id) { 21 | const data = { ...obj, menu: id } 22 | return axiosInstance({ 23 | url: apiWhiteListBaseUrl, 24 | method: 'post', 25 | data: data 26 | }) 27 | } 28 | 29 | export function updateApiWhite (obj) { 30 | return axiosInstance({ 31 | url: apiWhiteListBaseUrl + obj.id + '/', 32 | method: 'put', 33 | data: obj 34 | }) 35 | } 36 | 37 | export function deleteApiWhite (id) { 38 | return axiosInstance({ 39 | url: apiWhiteListBaseUrl + id + '/', 40 | method: 'delete', 41 | data: { id } 42 | }) 43 | } -------------------------------------------------------------------------------- /frontend/src/apis/system/loginRegister.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: yifeng 3 | * @Date: 2022-09-06 20:14:42 4 | * @LastEditors: yifeng 5 | * @LastEditTime: 2022-10-04 16:49:07 6 | * @Description: 7 | */ 8 | import axiosInstance from '@/utils/net/axiosInstance' 9 | 10 | // 用户登录接口 11 | export function sysUserLogin(data) { 12 | return axiosInstance({ 13 | url: "api/login/", 14 | method: 'post', 15 | data:data 16 | }) 17 | } 18 | 19 | // 用户登出接口 20 | export function sysUserLogout(data) { 21 | return axiosInstance({ 22 | url: "api/logout/", 23 | method: 'post', 24 | data:data 25 | }) 26 | } 27 | 28 | // 获取验证码接口 29 | export function getCaptcha() { 30 | // return axiosInstance.get("api/captcha/") 31 | return axiosInstance({ 32 | url: "api/captcha/", 33 | method: 'get', 34 | }) 35 | } 36 | 37 | // 获取验证码状态接口 38 | export function getCaptchaStatus() { 39 | // return axiosInstance.get("api/captcha/status") 40 | return axiosInstance({ 41 | url: "api/captcha/status", 42 | method: 'get', 43 | }) 44 | } -------------------------------------------------------------------------------- /backend/apps/detect/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.14 on 2022-08-31 12:57 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | initial = True 9 | 10 | dependencies = [ 11 | ] 12 | 13 | operations = [ 14 | migrations.CreateModel( 15 | name='DetectImage', 16 | fields=[ 17 | ('id', models.AutoField(primary_key=True, serialize=False, verbose_name='id')), 18 | ('filename', models.CharField(max_length=50, verbose_name='文件名')), 19 | ('detected_filename', models.CharField(max_length=50, verbose_name='文件名')), 20 | ('detect_result', models.CharField(max_length=10, verbose_name='检测结果')), 21 | ('create_date_time', models.DateTimeField(max_length=40, verbose_name='检测时间')), 22 | ], 23 | options={ 24 | 'verbose_name': '检测数据表', 25 | 'verbose_name_plural': '检测数据表', 26 | 'db_table': 'detected_img', 27 | }, 28 | ), 29 | ] 30 | -------------------------------------------------------------------------------- /frontend/src/apis/system/menuButton.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: yifeng 3 | * @Date: 2022-09-30 20:21:20 4 | * @LastEditors: yifeng 5 | * @LastEditTime: 2022-09-30 20:26:26 6 | * @Description: 7 | */ 8 | import axiosInstance from '@/utils/net/axiosInstance' 9 | 10 | const menuButtonBaseUrl = "/api/system/menu_button/" 11 | 12 | 13 | export function getMenuButtonList (query: any) { 14 | return axiosInstance({ 15 | url: menuButtonBaseUrl, 16 | method: 'get', 17 | params: query 18 | }) 19 | } 20 | 21 | export function addMenuButton (obj: any, id:string) { 22 | const data = { ...obj, menu: id } 23 | return axiosInstance({ 24 | url: menuButtonBaseUrl, 25 | method: 'post', 26 | data: data 27 | }) 28 | } 29 | 30 | export function updateMenuButton (obj: any) { 31 | return axiosInstance({ 32 | url: menuButtonBaseUrl + obj.id + '/', 33 | method: 'put', 34 | data: obj 35 | }) 36 | } 37 | 38 | export function deleteMenuButton (id: string) { 39 | return axiosInstance({ 40 | url: menuButtonBaseUrl + id + '/', 41 | method: 'delete', 42 | data: { id } 43 | }) 44 | } -------------------------------------------------------------------------------- /backend/backend/views.py: -------------------------------------------------------------------------------- 1 | from django.http import HttpResponse, JsonResponse 2 | from thirdparty.detect import getDetectImages 3 | 4 | # Create your views here. 5 | def welcome(request): 6 | return HttpResponse("

Welcome to my tiny twitter!

") 7 | 8 | #region 9 | # def showImage(request): 10 | 11 | # imageUrls = [{ 12 | # 'id': 1, 13 | # 'name': "0.jpg", 14 | # 'src': "http://localhost/images/orgin/1.jpg", 15 | # 'result': "false" 16 | # }, { 17 | # 'id': 4, 18 | # 'name': "8.jpg", 19 | # 'src': "http://localhost/images/orgin/4.jpg", 20 | # 'result': "true" 21 | # }, { 22 | # 'id': 6, 23 | # 'name': "8.jpg", 24 | # 'src': "http://localhost/images/orgin/6.jpg", 25 | # 'result': "false" 26 | # }, { 27 | # 'id': 8, 28 | # 'name': "8.jpg", 29 | # 'src': "http://localhost/images/orgin/8.jpg", 30 | # 'result': "true" 31 | # }] 32 | # return JsonResponse(imageUrls, safe=False) 33 | #endregion 34 | 35 | def showImage(request): 36 | 37 | imageUrls = getDetectImages() 38 | return JsonResponse(imageUrls, safe=False) 39 | -------------------------------------------------------------------------------- /frontend/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig, loadEnv } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | import { createHtmlPlugin } from "vite-plugin-html"; 4 | import PurgeIcons from 'vite-plugin-purge-icons'; 5 | 6 | import vueJsx from '@vitejs/plugin-vue-jsx'; 7 | //这个配置 为了在html中使用 环境变量 8 | // const getViteEnv = (mode, target) => { 9 | // return loadEnv(mode, process.cwd())[target]; 10 | // }; 11 | 12 | // https://vitejs.dev/config/ 13 | export default ({ mode })=> defineConfig({ 14 | plugins: [ 15 | vue(), 16 | vueJsx(), 17 | // createHtmlPlugin({ 18 | // inject: { 19 | // data: { 20 | // //将环境变量 VITE_APP_TITLE 赋值给 title 方便 html页面使用 title 获取系统标题 21 | // title: getViteEnv(mode, "VITE_APP_TITLE"), 22 | // }, 23 | // }, 24 | // }), 25 | PurgeIcons({ 26 | /* PurgeIcons Options */ 27 | }) 28 | ], 29 | // define: { 30 | // // 'process.env': process.env 31 | // 'process.env': { 32 | // 'BASE_URL':"http://localhost:5173/" 33 | // } 34 | // }, 35 | resolve: { 36 | alias: { 37 | '@': "/src/", 38 | '@components': '/src/components', 39 | } 40 | }, 41 | 42 | }) 43 | -------------------------------------------------------------------------------- /backend/apps/system/fixtures/init_user.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "username": "admin", 4 | "email": "dvadmin@django-vue-admin.com", 5 | "mobile": "18888888888", 6 | "avatar": "", 7 | "name": "管理员", 8 | "gender": 1, 9 | "user_type": 0, 10 | "dept": 1, 11 | "role": [], 12 | "first_name": "", 13 | "last_name": "", 14 | "is_staff": true, 15 | "is_active": true, 16 | "password": "pbkdf2_sha256$260000$g17x5wlSiW1FZAh1Eudchw$ZeSAqj3Xak0io8v/pmPW0BX9EX5R2zFXDwbbD68oBFk=", 17 | "last_login": null, 18 | "is_superuser": false 19 | }, 20 | { 21 | "username": "superadmin", 22 | "email": "dvadmin@django-vue-admin.com", 23 | "mobile": "13333333333", 24 | "avatar": null, 25 | "name": "超级管理员", 26 | "gender": 1, 27 | "user_type": 0, 28 | "dept": 1, 29 | "role": [], 30 | "first_name": "", 31 | "last_name": "", 32 | "is_staff": true, 33 | "is_active": true, 34 | "password": "pbkdf2_sha256$260000$g17x5wlSiW1FZAh1Eudchw$ZeSAqj3Xak0io8v/pmPW0BX9EX5R2zFXDwbbD68oBFk=", 35 | "last_login": null, 36 | "is_superuser": true 37 | } 38 | ] 39 | -------------------------------------------------------------------------------- /frontend/src/stores/system-user.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: yifeng 3 | * @Date: 2022-09-11 13:54:12 4 | * @LastEditors: yifeng 5 | * @LastEditTime: 2022-10-04 12:59:44 6 | * @Description: 7 | */ 8 | import { defineStore } from "pinia"; 9 | import useDbStore from "./system-db"; 10 | 11 | const useUserStore = defineStore('system/user', { 12 | state: () => ({ 13 | // 用户信息 14 | info: {} 15 | }), 16 | actions: { 17 | 18 | /** 19 | * @description 设置用户数据 20 | * @param {Object} context 21 | * @param {*} info info 22 | */ 23 | async set(info: any) { 24 | const dbStore = useDbStore() 25 | // store 赋值 26 | this.info = info 27 | // 持久化 28 | await dbStore.set({ 29 | dbName: 'sys', 30 | path: 'user.info', 31 | value: info, 32 | user: true 33 | }) 34 | }, 35 | /** 36 | * @description 从数据库取用户数据 37 | * @param {Object} context 38 | */ 39 | async load() { 40 | const dbStore = useDbStore() 41 | // store 赋值 42 | this.info = await dbStore.get({ 43 | dbName: 'sys', 44 | path: 'user.info', 45 | defaultValue: {}, 46 | user: true 47 | }) 48 | } 49 | } 50 | }) 51 | 52 | export default useUserStore; 53 | 54 | -------------------------------------------------------------------------------- /frontend/src/apis/system/systemLog.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: yifeng 3 | * @Date: 2022-10-05 14:57:00 4 | * @LastEditors: yifeng 5 | * @LastEditTime: 2022-10-05 15:22:46 6 | * @Description: 7 | */ 8 | import axiosInstance from '@/utils/net/axiosInstance' 9 | 10 | export const sysLoginLogBaseUrl = '/api/system/login_log/' 11 | 12 | export function getSystemLogList (query) { 13 | return axiosInstance({ 14 | url: sysLoginLogBaseUrl, 15 | method: 'get', 16 | params: query 17 | }) 18 | } 19 | 20 | 21 | // 系统操作日志 22 | export const sysOperationLogBaseUrl = '/api/system/operation_log/' 23 | 24 | export function getOperationLogList (query) { 25 | return axiosInstance({ 26 | url: sysOperationLogBaseUrl, 27 | method: 'get', 28 | params: query 29 | }) 30 | } 31 | export function addOperationLog (obj) { 32 | return axiosInstance({ 33 | url: sysOperationLogBaseUrl, 34 | method: 'post', 35 | data: obj 36 | }) 37 | } 38 | 39 | export function updateOperationLog (obj) { 40 | return axiosInstance({ 41 | url: sysOperationLogBaseUrl + obj.id + '/', 42 | method: 'put', 43 | data: obj 44 | }) 45 | } 46 | export function deleteOperationLog (id) { 47 | return axiosInstance({ 48 | url: sysOperationLogBaseUrl + id + '/', 49 | method: 'delete', 50 | data: { id } 51 | }) 52 | } -------------------------------------------------------------------------------- /backend/backend/utils/pagination.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Author: yifeng 3 | Date: 2022-09-27 21:48:54 4 | LastEditors: yifeng 5 | LastEditTime: 2022-09-27 21:48:54 6 | Description: 7 | ''' 8 | from collections import OrderedDict 9 | 10 | from django.core import paginator 11 | from django.core.paginator import Paginator as DjangoPaginator 12 | from rest_framework.pagination import PageNumberPagination 13 | from rest_framework.response import Response 14 | 15 | 16 | class CustomPagination(PageNumberPagination): 17 | page_size = 10 18 | page_size_query_param = "limit" 19 | max_page_size = 999 20 | django_paginator_class = DjangoPaginator 21 | 22 | def get_paginated_response(self, data): 23 | code = 2000 24 | msg = 'success' 25 | res = { 26 | "page": int(self.get_page_number(self.request, paginator)) or 1, 27 | "total": self.page.paginator.count, 28 | "limit": int(self.get_page_size(self.request)) or 10, 29 | "data": data 30 | } 31 | if not data: 32 | code = 2000 33 | msg = "暂无数据" 34 | res['data'] = [] 35 | 36 | return Response( 37 | OrderedDict([ 38 | ('code', code), 39 | ('msg', msg), 40 | # ('total',self.page.paginator.count), 41 | ('data', res), 42 | ])) 43 | -------------------------------------------------------------------------------- /backend/apps/system/views/roleViews.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Author: yifeng 3 | Date: 2022-09-01 23:58:14 4 | LastEditors: yifeng 5 | LastEditTime: 2022-10-10 20:17:42 6 | Description: 7 | ''' 8 | from rest_framework.decorators import action 9 | 10 | from apps.system.models import Role, Menu 11 | from apps.system.serializers.roleSerializer import (RoleCreateUpdateSerializer, RoleSerializer, 12 | MenuPermissonSerializer) 13 | from backend.utils.viewSet import CustomModelViewSet 14 | from backend.utils.jsonResponse import SuccessResponse 15 | 16 | 17 | class RoleViewSet(CustomModelViewSet): 18 | """ 19 | 角色管理接口 20 | list:查询 21 | create:新增 22 | update:修改 23 | retrieve:单例 24 | destroy:删除 25 | """ 26 | queryset = Role.objects.all() 27 | serializer_class = RoleSerializer 28 | create_serializer_class = RoleCreateUpdateSerializer 29 | update_serializer_class = RoleCreateUpdateSerializer 30 | 31 | @action(methods=['GET'], detail=True, permission_classes=[]) 32 | def roleId_get_menu(self, request, *args, **kwargs): 33 | """通过角色id获取该角色用于的菜单""" 34 | # instance = self.get_object() 35 | # queryset = instance.menu.all() 36 | queryset = Menu.objects.filter(status=1).all() 37 | serializer = MenuPermissonSerializer(queryset, many=True) 38 | return SuccessResponse(data=serializer.data) 39 | -------------------------------------------------------------------------------- /frontend/src/stores/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: yifeng 3 | * @Date: 2022-08-06 21:18:11 4 | * @LastEditors: yifeng 5 | * @LastEditTime: 2022-10-12 18:19:21 6 | * @Description: 7 | */ 8 | import { createPinia } from "pinia"; 9 | import { App } from "vue"; 10 | import useAccountStore from "./system-account"; 11 | import useMenuStore from "./system-menu"; 12 | import usePageStore from "./system-page"; 13 | import useSettingStore from "./system-setting"; 14 | import useUserStore from "./system-user"; 15 | 16 | interface IAppStore { 17 | userStore: ReturnType; 18 | menuStore: ReturnType; 19 | accountStore: ReturnType; 20 | pageStore: ReturnType; 21 | } 22 | 23 | const appStore: IAppStore = {} as IAppStore; 24 | 25 | /** 26 | * 注册app状态库 27 | */ 28 | export const registerStore = () => { 29 | appStore.userStore = useUserStore(); 30 | appStore.menuStore = useMenuStore(); 31 | appStore.accountStore = useAccountStore(); 32 | appStore.pageStore = usePageStore(); 33 | 34 | }; 35 | // export default appStore; 36 | function install(app:App, options: any = {}) { 37 | app.use(createPinia()); 38 | const settingStore =useSettingStore() 39 | const accountStore = useAccountStore() 40 | settingStore.load() 41 | accountStore.load() 42 | 43 | } 44 | 45 | export default { 46 | install 47 | } 48 | 49 | 50 | -------------------------------------------------------------------------------- /backend/backend/utils/backends.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Author: yifeng 3 | Date: 2022-09-04 22:00:32 4 | LastEditors: yifeng 5 | LastEditTime: 2022-09-04 22:01:47 6 | Description: 7 | ''' 8 | import hashlib 9 | import logging 10 | 11 | from django.contrib.auth import get_user_model 12 | from django.contrib.auth.backends import ModelBackend 13 | from django.utils import timezone 14 | 15 | logger = logging.getLogger(__name__) 16 | UserModel = get_user_model() 17 | 18 | 19 | class CustomBackend(ModelBackend): 20 | """ 21 | Django原生认证方式 22 | """ 23 | def authenticate(self, request, username=None, password=None, **kwargs): 24 | msg = '%s 正在使用本地登录...' % username 25 | logger.info(msg) 26 | if username is None: 27 | username = kwargs.get(UserModel.USERNAME_FIELD) 28 | try: 29 | user = UserModel._default_manager.get_by_natural_key(username) 30 | except UserModel.DoesNotExist: 31 | UserModel().set_password(password) 32 | else: 33 | check_password = user.check_password(password) 34 | if not check_password: 35 | check_password = user.check_password( 36 | hashlib.md5(password.encode(encoding='UTF-8')).hexdigest()) 37 | if check_password and self.user_can_authenticate(user): 38 | user.last_login = timezone.now() 39 | user.save() 40 | return user 41 | -------------------------------------------------------------------------------- /frontend/README.md: -------------------------------------------------------------------------------- 1 | # Vue 3 + TypeScript + Vite 2 | 3 | This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 ` 50 | -------------------------------------------------------------------------------- /frontend/src/views/system/log/operationLog/index.vue: -------------------------------------------------------------------------------- 1 | 8 | 14 | 15 | -------------------------------------------------------------------------------- /frontend/src/views/system/areas/index.vue: -------------------------------------------------------------------------------- 1 | 8 | 14 | 15 | -------------------------------------------------------------------------------- /frontend/src/apis/system/dept.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: yifeng 3 | * @Date: 2022-09-25 21:33:19 4 | * @LastEditors: yifeng 5 | * @LastEditTime: 2022-10-12 19:57:58 6 | * @Description: 7 | */ 8 | import axiosInstance from '@/utils/net/axiosInstance' 9 | import XEUtils from 'xe-utils'; 10 | 11 | export const deptBaseUrl = "/api/system/dept/"; 12 | 13 | /** 14 | * 列表查询 15 | */ 16 | export function getDeptList (query: any) { 17 | // query.limit = 999; 18 | return axiosInstance({ 19 | url: deptBaseUrl, 20 | method: 'get', 21 | params: query 22 | }).then(res => { 23 | // 将列表数据转换为树形数据 24 | res.data.data = XEUtils.toArrayTree(res.data.data, { parentKey: 'parent' }) 25 | return res 26 | }) 27 | } 28 | 29 | /** 30 | * 新增 31 | */ 32 | export function createDept (obj: any) { 33 | return axiosInstance({ 34 | url: deptBaseUrl, 35 | method: 'post', 36 | data: obj 37 | }) 38 | } 39 | 40 | /** 41 | * 修改 42 | */ 43 | export function updateDept (obj: any) { 44 | return axiosInstance({ 45 | url: deptBaseUrl + obj.id + '/', 46 | method: 'put', 47 | data: obj 48 | }) 49 | } 50 | 51 | /** 52 | * 删除 53 | */ 54 | export function deleteDept (id: string) { 55 | return axiosInstance({ 56 | url: deptBaseUrl + id + '/', 57 | method: 'delete', 58 | data: { id } 59 | }) 60 | } 61 | 62 | /** 63 | * 部门懒加载 64 | */ 65 | export function deptLazyLoad (query: any) { 66 | return axiosInstance({ 67 | url: '/api/system/dept_lazy_tree/', 68 | method: 'get', 69 | params: query 70 | }) 71 | } 72 | -------------------------------------------------------------------------------- /frontend/src/plugins/system/fast-crud/icon-selector/components/fs-fa-icon.vue: -------------------------------------------------------------------------------- 1 | 8 | 11 | 50 | -------------------------------------------------------------------------------- /backend/backend/utils/softDeleteManager.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Author: yifeng 3 | Date: 2022-08-27 21:15:31 4 | LastEditors: yifeng 5 | LastEditTime: 2022-09-04 19:22:26 6 | Description: 7 | ''' 8 | from django.db import models 9 | from django.db.models.query import QuerySet 10 | 11 | 12 | # 自定义软删除查询基类 13 | class SoftDeleteQuerySet(QuerySet): 14 | def delete(self, soft_delete=True): 15 | """ 16 | 重写删除方法 17 | 当soft_delete为True时表示软删除,则修改删除时间为当前时间,否则直接删除 18 | :param soft: Boolean 是否软删除,默认是 19 | :return: Tuple eg.(3, {'lqModel.Test': 3}) 20 | """ 21 | if soft_delete: 22 | return self.update(is_deleted=True) 23 | else: 24 | return super(SoftDeleteQuerySet, self).delete() 25 | 26 | 27 | class SoftDeleteManager(models.Manager): 28 | """支持软删除""" 29 | def __init__(self, *args, **kwargs): 30 | self.__add_is_del_filter = False 31 | super(SoftDeleteManager, self).__init__(*args, **kwargs) 32 | 33 | def filter(self, *args, **kwargs): 34 | # 考虑是否主动传入is_deleted 35 | if not kwargs.get('is_deleted') is None: 36 | self.__add_is_del_filter = True 37 | return super(SoftDeleteManager, self).filter(*args, **kwargs) 38 | 39 | def get_queryset(self): 40 | if self.__add_is_del_filter: 41 | return SoftDeleteQuerySet(self.model, using=self._db).exclude(is_deleted=False) 42 | return SoftDeleteQuerySet(self.model).exclude(is_deleted=True) 43 | 44 | def get_by_natural_key(self, name): 45 | return SoftDeleteQuerySet(self.model).get(username=name) 46 | -------------------------------------------------------------------------------- /frontend/src/plugins/permission/directive/permission/util.permission.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @创建文件时间: 2021-06-27 10:14:26 3 | * @Auther: 猿小天 4 | * @最后修改人: 猿小天 5 | * @最后修改时间: 2021-08-09 21:51:29 6 | * 联系Qq:1638245306 7 | * @文件介绍: 权限控制 8 | */ 9 | import XEUtils from 'xe-utils' 10 | import { useRouter } from 'vue-router' 11 | export default { 12 | hasPermissions (value: any) { 13 | const router = useRouter() 14 | if (import.meta.env.VITE_APP_PM_ENABLED) { 15 | const path = router.currentRoute.value.path;// 当前路由 16 | // console.log('path',path); 17 | 18 | let need: any[] = [] 19 | if (typeof value === 'string') { 20 | need.push(value) 21 | } else if (value && value instanceof Array && value.length > 0) { 22 | need = need.concat(value) 23 | } 24 | if (need.length === 0) { 25 | throw new Error('need permissions! Like v-permission="usersphere:user:view" ') 26 | } 27 | // 获取所有的菜单路由(包含权限) 28 | let menuTree = sessionStorage.getItem('menuData') 29 | menuTree = JSON.parse(menuTree) 30 | const userPermissionList = XEUtils.toTreeArray(menuTree) 31 | const permissionList = [] 32 | for (const item of userPermissionList) { 33 | if (item.menuPermission) { 34 | for (const per of item.menuPermission) { 35 | permissionList.push(item.path + ':' + per) 36 | } 37 | } 38 | } 39 | // console.log(permissionList.includes(path + ':' + value)); 40 | 41 | return permissionList.includes(path + ':' + value) 42 | } 43 | return true 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /frontend/src/apis/system/area.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: yifeng 3 | * @Date: 2022-10-18 19:52:39 4 | * @LastEditors: yifeng 5 | * @LastEditTime: 2022-10-20 21:08:57 6 | * @Description: 7 | */ 8 | import { axiosInstance } from "@/utils" 9 | 10 | export const areaBaseUrl = "/api/system/area/"; 11 | 12 | export async function getAreaList(query: any) { 13 | if (query.pcode === undefined || query.pcode === null || query.pcode.length === 0) { 14 | query.level = 1 15 | } 16 | const res = await axiosInstance({ 17 | url: areaBaseUrl, 18 | method: 'get', 19 | params: { ...query, limit: 100 } 20 | }); 21 | // 将列表数据转换为树形数据 22 | res.data.data.map(value => { 23 | value.hasChildren = value.pcode_count !== 0; 24 | }); 25 | return await res; 26 | } 27 | 28 | export function createArea(obj: any) { 29 | return axiosInstance({ 30 | url: areaBaseUrl, 31 | method: 'post', 32 | data: obj 33 | }) 34 | } 35 | 36 | export function updateArea(obj: any) { 37 | return axiosInstance({ 38 | url: areaBaseUrl + obj.id + '/', 39 | method: 'put', 40 | data: obj 41 | }) 42 | } 43 | 44 | export function deleteArea(id: string) { 45 | return axiosInstance({ 46 | url: areaBaseUrl + id + '/', 47 | method: 'delete', 48 | data: { id } 49 | }) 50 | } 51 | 52 | // lazy load 53 | export async function getAreaListByLazy(query: any) { 54 | const ret = await axiosInstance({ 55 | url: areaBaseUrl, 56 | method: 'get', 57 | params: query 58 | }); 59 | return ret; 60 | 61 | } -------------------------------------------------------------------------------- /frontend/src/views/system/whiteList/index.vue: -------------------------------------------------------------------------------- 1 | 8 | 14 | 15 | -------------------------------------------------------------------------------- /backend/backend/utils/swagger.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Author: yifeng 3 | Date: 2022-09-04 20:03:44 4 | LastEditors: yifeng 5 | LastEditTime: 2022-09-04 20:03:45 6 | Description: 7 | ''' 8 | from drf_yasg.generators import OpenAPISchemaGenerator 9 | from drf_yasg.inspectors import SwaggerAutoSchema 10 | 11 | from backend.settings import SWAGGER_SETTINGS 12 | 13 | 14 | def get_summary(string): 15 | if string is not None: 16 | result = string.strip().replace(" ", "").split("\n") 17 | return result[0] 18 | 19 | 20 | class CustomSwaggerAutoSchema(SwaggerAutoSchema): 21 | def get_tags(self, operation_keys=None): 22 | tags = super().get_tags(operation_keys) 23 | if "api" in tags and operation_keys: 24 | # `operation_keys` 内容像这样 ['v1', 'prize_join_log', 'create'] 25 | tags[0] = operation_keys[SWAGGER_SETTINGS.get('AUTO_SCHEMA_TYPE', 2)] 26 | return tags 27 | 28 | def get_summary_and_description(self): 29 | summary_and_description = super().get_summary_and_description() 30 | summary = get_summary(self.__dict__.get('view').__doc__) 31 | description = summary_and_description[1] 32 | return summary, description 33 | 34 | 35 | class CustomOpenAPISchemaGenerator(OpenAPISchemaGenerator): 36 | def get_schema(self, request=None, public=False): 37 | """Generate a :class:`.Swagger` object with custom tags""" 38 | 39 | swagger = super().get_schema(request, public) 40 | swagger.tags = [ 41 | { 42 | "name": "token", 43 | "description": "认证相关" 44 | }, 45 | ] 46 | return swagger -------------------------------------------------------------------------------- /backend/apps/system/management/commands/init.py: -------------------------------------------------------------------------------- 1 | import logging 2 | 3 | from django.core.management.base import BaseCommand 4 | 5 | from backend import settings 6 | 7 | logger = logging.getLogger(__name__) 8 | 9 | 10 | class Command(BaseCommand): 11 | """ 12 | 项目初始化命令: python manage.py init 13 | """ 14 | 15 | def add_arguments(self, parser): 16 | parser.add_argument( 17 | "init_name", 18 | nargs="*", 19 | type=str, 20 | ) 21 | parser.add_argument("-y", nargs="*") 22 | parser.add_argument("-Y", nargs="*") 23 | parser.add_argument("-n", nargs="*") 24 | parser.add_argument("-N", nargs="*") 25 | 26 | def handle(self, *args, **options): 27 | reset = False 28 | if isinstance(options.get("y"), list) or isinstance(options.get("Y"), list): 29 | reset = True 30 | if isinstance(options.get("n"), list) or isinstance(options.get("N"), list): 31 | reset = False 32 | for app in settings.INSTALLED_APPS: 33 | try: 34 | exec( 35 | f""" 36 | from {app}.fixtures.initialize import Initialize 37 | Initialize(reset={reset},app="{app}").run() 38 | """ 39 | ) 40 | except ModuleNotFoundError: 41 | # 兼容之前版本初始化 42 | try: 43 | exec( 44 | f""" 45 | from {app}.initialize import main 46 | main(reset={reset}) 47 | """ 48 | ) 49 | except ModuleNotFoundError: 50 | pass 51 | print("初始化数据完成!") 52 | -------------------------------------------------------------------------------- /frontend/src/style.css: -------------------------------------------------------------------------------- 1 | :root { 2 | font-family: Inter, Avenir, Helvetica, Arial, sans-serif; 3 | font-size: 16px; 4 | line-height: 24px; 5 | font-weight: 400; 6 | 7 | color-scheme: light dark; 8 | color: rgba(255, 255, 255, 0.87); 9 | background-color: #242424; 10 | 11 | font-synthesis: none; 12 | text-rendering: optimizeLegibility; 13 | -webkit-font-smoothing: antialiased; 14 | -moz-osx-font-smoothing: grayscale; 15 | -webkit-text-size-adjust: 100%; 16 | } 17 | 18 | a { 19 | font-weight: 500; 20 | color: #646cff; 21 | text-decoration: inherit; 22 | } 23 | a:hover { 24 | color: #535bf2; 25 | } 26 | 27 | body { 28 | margin: 0; 29 | display: flex; 30 | place-items: center; 31 | min-width: 320px; 32 | min-height: 100vh; 33 | } 34 | 35 | h1 { 36 | font-size: 3.2em; 37 | line-height: 1.1; 38 | } 39 | 40 | button { 41 | border-radius: 8px; 42 | border: 1px solid transparent; 43 | padding: 0.6em 1.2em; 44 | font-size: 1em; 45 | font-weight: 500; 46 | font-family: inherit; 47 | background-color: #1a1a1a; 48 | cursor: pointer; 49 | transition: border-color 0.25s; 50 | } 51 | button:hover { 52 | border-color: #646cff; 53 | } 54 | button:focus, 55 | button:focus-visible { 56 | outline: 4px auto -webkit-focus-ring-color; 57 | } 58 | 59 | .card { 60 | padding: 2em; 61 | } 62 | 63 | #app { 64 | max-width: 1280px; 65 | margin: 0 auto; 66 | padding: 2rem; 67 | text-align: center; 68 | } 69 | 70 | @media (prefers-color-scheme: light) { 71 | :root { 72 | color: #213547; 73 | background-color: #ffffff; 74 | } 75 | a:hover { 76 | color: #747bff; 77 | } 78 | button { 79 | background-color: #f9f9f9; 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /frontend/src/layout/components/headerUser/headerUser.vue: -------------------------------------------------------------------------------- 1 | 8 | 24 | 49 | -------------------------------------------------------------------------------- /backend/apps/system/views/menuViews.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Author: yifeng 3 | Date: 2022-08-28 19:26:59 4 | LastEditors: yifeng 5 | LastEditTime: 2022-10-06 21:23:45 6 | Description: 7 | ''' 8 | from rest_framework.decorators import action 9 | 10 | from apps.system.models import Menu 11 | from apps.system.serializers.menuSerializer import (MenuCreateSerializer, MenuSerializer, 12 | WebRouterSerializer) 13 | from backend.utils.viewSet import CustomModelViewSet 14 | from backend.utils.jsonResponse import SuccessResponse 15 | 16 | 17 | class MenuViewSet(CustomModelViewSet): 18 | """ 19 | 菜单管理接口 20 | list:查询 21 | create:新增 22 | update:修改 23 | retrieve:单例 24 | destroy:删除 25 | """ 26 | queryset = Menu.objects.all() 27 | serializer_class = MenuSerializer 28 | create_serializer_class = MenuCreateSerializer 29 | update_serializer_class = MenuCreateSerializer 30 | search_fields = ['name', 'status'] 31 | filter_fields = ['parent', 'name', 'status', 'is_link', 'visible', 'cache', 'is_catalog'] 32 | # extra_filter_backends = [] 33 | 34 | @action(methods=['GET'], detail=False, permission_classes=[]) 35 | def web_router(self, request): 36 | """用于前端获取当前角色的路由""" 37 | user = request.user 38 | queryset = self.queryset.filter(status=1) 39 | if not user.is_superuser: 40 | menuIds = user.roles.values_list('menu__id', flat=True) 41 | queryset = Menu.objects.filter(id__in=menuIds, status=1) 42 | serializer = WebRouterSerializer(queryset, many=True, request=request) 43 | data = serializer.data 44 | return SuccessResponse(data=data, total=len(data), msg="获取成功") -------------------------------------------------------------------------------- /frontend/src/layout/components/headerBar/headerBar.vue: -------------------------------------------------------------------------------- 1 | 8 | 20 | 37 | 38 | -------------------------------------------------------------------------------- /frontend/src/apis/system/systemConfig.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: yifeng 3 | * @Date: 2022-10-04 14:14:17 4 | * @LastEditors: yifeng 5 | * @LastEditTime: 2022-10-05 23:02:39 6 | * @Description: 7 | */ 8 | import axiosInstance from '@/utils/net/axiosInstance' 9 | 10 | export const sysConfigBaseUrl = '/api/system/system_config/' 11 | 12 | export const sysSettingBaseUrl = '/api/init/settings/' 13 | 14 | export function getSysSettingInitInfo() { 15 | return axiosInstance({ 16 | url: sysSettingBaseUrl, 17 | method: 'get' 18 | }) 19 | } 20 | 21 | export function getSysConfigList(query) { 22 | return axiosInstance({ 23 | url: sysConfigBaseUrl, 24 | method: 'get', 25 | params: query 26 | }) 27 | } 28 | 29 | export function saveContent(id, data) { 30 | return axiosInstance({ 31 | url: sysConfigBaseUrl + 'save_content/', 32 | method: 'put', 33 | data: data 34 | }) 35 | } 36 | 37 | export function createConfig(obj) { 38 | return axiosInstance({ 39 | url: sysConfigBaseUrl, 40 | method: 'post', 41 | data: obj 42 | }) 43 | } 44 | 45 | export function updateConfig(obj) { 46 | return axiosInstance({ 47 | url: sysConfigBaseUrl + obj.id + '/', 48 | method: 'put', 49 | data: obj 50 | }) 51 | } 52 | 53 | export function deleteConfig(id) { 54 | return axiosInstance({ 55 | url: sysConfigBaseUrl + id + '/', 56 | method: 'delete', 57 | data: { id } 58 | }) 59 | } 60 | 61 | /* 62 | 获取所有的model及字段信息 63 | */ 64 | export function getAssociationTable() { 65 | return axiosInstance({ 66 | url: sysConfigBaseUrl + 'get_association_table/', 67 | method: 'get', 68 | params: {} 69 | }) 70 | } 71 | -------------------------------------------------------------------------------- /frontend/src/layout/components/logo/logo.vue: -------------------------------------------------------------------------------- 1 | 8 | 15 | 21 | 22 | 53 | 69 | -------------------------------------------------------------------------------- /frontend/src/utils/common/cookies.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: yifeng 3 | * @Date: 2022-09-11 14:55:30 4 | * @LastEditors: yifeng 5 | * @LastEditTime: 2022-10-16 11:24:38 6 | * @Description: 7 | */ 8 | import Cookies from 'js-cookie' 9 | 10 | interface cookieMethod { 11 | /** 12 | * @description 存储 cookie 值 13 | * @param {String} name cookie name 14 | * @param {String} value cookie value 15 | * @param {Object} setting cookie setting 16 | */ 17 | set(name: string, value: string, cookieSetting: Object): void; 18 | 19 | /** 20 | * @description 拿到 cookie 值 21 | * @param {String} name cookie name 22 | */ 23 | get(name: string): string | null; 24 | 25 | /** 26 | * @description 拿到 cookie 全部的值 27 | */ 28 | getAll(): Object; 29 | 30 | /** 31 | * @description 删除 cookie 32 | * @param {String} name cookie name 33 | */ 34 | remove(name: string): string ; 35 | } 36 | 37 | class cookieClass implements cookieMethod { 38 | set(name: string = 'default', value: string = '', cookieSetting: Object = {}): void { 39 | const currentCookieSetting = { 40 | expires: 1 41 | } 42 | Object.assign(currentCookieSetting, cookieSetting) 43 | Cookies.set(`system-${import.meta.env.VITE_APP_VERSION}-${name}`, value, currentCookieSetting) 44 | } 45 | get(name: string = 'default'): string { 46 | return Cookies.get(`system-${import.meta.env.VITE_APP_VERSION}-${name}`) 47 | } 48 | getAll(): Object { 49 | return Cookies.get() 50 | } 51 | remove(name: string = 'default'): string { 52 | return Cookies.remove(`system-${import.meta.env.VITE_APP_VERSION}-${name}`) 53 | } 54 | } 55 | 56 | const cookies = new cookieClass() 57 | 58 | export default cookies 59 | -------------------------------------------------------------------------------- /backend/apps/detect/consumers.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Author: yifeng 3 | Date: 2022-08-14 16:53:37 4 | LastEditors: yifeng 5 | LastEditTime: 2022-08-27 23:24:13 6 | Description: 7 | ''' 8 | import json 9 | from channels.generic.websocket import WebsocketConsumer 10 | from channels.exceptions import StopConsumer 11 | from thirdparty.detect import detectImage 12 | from apps.detect.result import store_data_by_model 13 | from yolov5.yolov5 import Darknet 14 | from thirdparty.config import config_file 15 | 16 | #region 17 | # imageUrls = [{ 18 | # 'id': 1, 19 | # 'name': "0.jpg", 20 | # 'src': "http://localhost/images/orgin/1.jpg", 21 | # 'result': "false" 22 | # }, { 23 | # 'id': 4, 24 | # 'name': "8.jpg", 25 | # 'src': "http://localhost/images/orgin/4.jpg", 26 | # 'result': "true" 27 | # }, { 28 | # 'id': 6, 29 | # 'name': "8.jpg", 30 | # 'src': "http://localhost/images/orgin/6.jpg", 31 | # 'result': "false" 32 | # }, { 33 | # 'id': 8, 34 | # 'name': "8.jpg", 35 | # 'src': "http://localhost/images/orgin/8.jpg", 36 | # 'result': "true" 37 | # }] 38 | #endregion 39 | 40 | 41 | class SendResultConsumer(WebsocketConsumer): 42 | # 当Websocket创建连接时 43 | def websocket_connect(self, event): 44 | print("已连接") 45 | self.accept() 46 | # 数据处理 47 | darknet = Darknet(config_file=config_file) 48 | # for i in range(2): 49 | imageUrls = detectImage(darknet) 50 | self.send(json.dumps(imageUrls)) 51 | # time.sleep(2) 52 | 53 | # 当Websocket接收到消息时 54 | def websocket_receive(self, text_data=None, bytes_data=None): 55 | print("已收到消息") 56 | 57 | # 当Websocket发生断开连接时 58 | def websocket_disconnect(self, code): 59 | print("已断开") 60 | raise StopConsumer() -------------------------------------------------------------------------------- /frontend/src/apis/system/menu.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: yifeng 3 | * @Date: 2022-09-14 21:09:58 4 | * @LastEditors: yifeng 5 | * @LastEditTime: 2022-10-10 19:27:04 6 | * @Description: 7 | */ 8 | 9 | import axiosInstance from "@/utils/net/axiosInstance" 10 | import { roleBaseUrl } from "./role" 11 | const menuBaseUrl = "/api/system/menu/" 12 | 13 | // 获取路由接口 14 | export function getWebRouter() { 15 | // return axiosInstance.get("/api/system/menu/web_router/") 16 | return axiosInstance({ 17 | url: menuBaseUrl + 'web_router/', 18 | method: 'get', 19 | }) 20 | } 21 | 22 | /** 23 | * 列表查询 24 | */ 25 | export function getMenuList(query: any) { 26 | query.limit = 999 27 | return axiosInstance({ 28 | url: menuBaseUrl, 29 | method: 'get', 30 | params: { ...query, limit: 999 } 31 | }).then(res => { 32 | // 将列表数据转换为树形数据 33 | // res.data.data = XEUtils.toArrayTree(res.data.data, { parentKey: 'parent', strict: false }) 34 | return res 35 | }) 36 | } 37 | 38 | /** 39 | * 新增 40 | */ 41 | export function createMenu(obj: any) { 42 | return axiosInstance({ 43 | url: menuBaseUrl, 44 | method: 'post', 45 | data: obj 46 | }) 47 | } 48 | 49 | /** 50 | * 修改 51 | */ 52 | export function updateMenu(obj: any) { 53 | return axiosInstance({ 54 | url: menuBaseUrl + obj.id + '/', 55 | method: 'put', 56 | data: obj 57 | }) 58 | } 59 | 60 | /** 61 | * 删除 62 | */ 63 | export function deleteMenu(id: string) { 64 | return axiosInstance({ 65 | url: menuBaseUrl + id + '/', 66 | method: 'delete', 67 | data: { id } 68 | }) 69 | } 70 | 71 | // 通过角色id,获取菜单数据 72 | export async function getMenuDataByRoleId(obj) { 73 | const res = await axiosInstance({ 74 | url: roleBaseUrl + obj.id + '/roleId_get_menu/', 75 | method: 'get', 76 | params: {} 77 | }) 78 | return res.data.data 79 | } -------------------------------------------------------------------------------- /backend/apps/system/views/dictionaryViews.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Author: yifeng 3 | Date: 2022-09-02 22:23:04 4 | LastEditors: yifeng 5 | LastEditTime: 2022-09-02 22:25:23 6 | Description: 7 | ''' 8 | 9 | from rest_framework.views import APIView 10 | 11 | from apps.system.config import dispatch 12 | from apps.system.models import Dictionary 13 | from apps.system.serializers.dictionarySerializer import DictionarySerializer 14 | from backend.utils.viewSet import CustomModelViewSet 15 | from backend.utils.jsonResponse import SuccessResponse 16 | 17 | 18 | class DictionaryViewSet(CustomModelViewSet): 19 | """ 20 | 字典管理接口 21 | list:查询 22 | create:新增 23 | update:修改 24 | retrieve:单例 25 | destroy:删除 26 | """ 27 | queryset = Dictionary.objects.all() 28 | serializer_class = DictionarySerializer 29 | extra_filter_backends = [] 30 | search_fields = ['label'] 31 | 32 | 33 | class InitDictionaryViewSet(APIView): 34 | """ 35 | 获取初始化配置 36 | """ 37 | authentication_classes = [] 38 | permission_classes = [] 39 | queryset = Dictionary.objects.all() 40 | 41 | def get(self, request): 42 | dictionary_key = self.request.query_params.get('dictionary_key') 43 | if dictionary_key: 44 | if dictionary_key == 'all': 45 | data = [ele for ele in dispatch.get_dictionary_config().values()] 46 | if not data: 47 | dispatch.refresh_dictionary() 48 | data = [ele for ele in dispatch.get_dictionary_config().values()] 49 | else: 50 | data = self.queryset.filter(parent__value=dictionary_key, 51 | status=True).values('label', 'value', 'type', 'color') 52 | return SuccessResponse(data=data, msg="获取成功") 53 | return SuccessResponse(data=[], msg="获取成功") 54 | -------------------------------------------------------------------------------- /frontend/src/plugins/system/error/index.ts: -------------------------------------------------------------------------------- 1 | import { get, isObject } from 'lodash' 2 | import Log from '@/utils/common/log.print' 3 | import useLogStore from '@/stores/system-log' 4 | import { nextTick } from 'vue' 5 | 6 | function install(app, options: any = {}) { 7 | const logStore = useLogStore() 8 | function writeLog (logType: string) { 9 | return (error, vm, info = '') => { 10 | nextTick(() => { 11 | logStore.push({ 12 | message: `${info}: ${isObject(error) ? error.message : error}`, 13 | type: logType, 14 | meta: { 15 | error, 16 | vm 17 | } 18 | }) 19 | if (import.meta.env.NODE_ENV !== 'development') return 20 | Log.capsule('D2Admin', 'ErrorHandler', logType) 21 | Log.danger('>>>>>> 错误信息 >>>>>>') 22 | console.log(info) 23 | Log.danger('>>>>>> Vue 实例 >>>>>>') 24 | console.log(vm) 25 | Log.danger('>>>>>> Error >>>>>>') 26 | console.log(error) 27 | }) 28 | } 29 | } 30 | if (import.meta.env.NODE_ENV === 'development') { 31 | app.config.warnHandler = writeLog('warning') 32 | } 33 | app.config.errorHandler = writeLog('danger') 34 | window.onunhandledrejection = error => { 35 | logStore.push({ 36 | message: get(error, 'reason.message', 'Unknown error'), 37 | type: 'danger', 38 | meta: { 39 | error: get(error, 'reason'), 40 | trace: get(error, 'reason.stack') 41 | } 42 | }) 43 | } 44 | window.onerror = (event, source, lineno, colno, error) => { 45 | logStore.push({ 46 | message: get(error, 'message', 'Unknown error'), 47 | type: 'danger', 48 | meta: { 49 | error, 50 | trace: get(error, 'stack'), 51 | source: `${source}@${lineno}:${colno}`, 52 | event: event 53 | } 54 | }) 55 | } 56 | } 57 | 58 | 59 | export default { 60 | install 61 | } -------------------------------------------------------------------------------- /frontend/src/apis/system/dictionary.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: yifeng 3 | * @Date: 2022-09-18 11:50:27 4 | * @LastEditors: yifeng 5 | * @LastEditTime: 2022-09-30 20:25:58 6 | * @Description: 7 | */ 8 | import axiosInstance from '@/utils/net/axiosInstance' 9 | import XEUtils from 'xe-utils'; 10 | 11 | const dictBaseUrl = "/api/system/dictionary/"; 12 | 13 | const dictInitUrl = "/api/init/dictionary/"; 14 | 15 | export function getInitDicts(query: any) { 16 | return axiosInstance({ 17 | url: dictInitUrl, 18 | method: "get", 19 | params: query, 20 | }) 21 | } 22 | 23 | export function getDictList(query:any) { 24 | return axiosInstance({ 25 | url: dictBaseUrl, 26 | method: "get", 27 | params: query, 28 | }).then(res => { 29 | // 将列表数据转换为树形数据 30 | res.data.data = XEUtils.toArrayTree(res.data.data, { parentKey: 'parent' }) 31 | return res 32 | }) 33 | } 34 | 35 | export function addDict(obj: any) { 36 | return axiosInstance({ 37 | url: dictBaseUrl, 38 | method: "post", 39 | data: obj 40 | }); 41 | } 42 | 43 | export function updateDict(obj: { id: string; }) { 44 | return axiosInstance({ 45 | url: dictBaseUrl + obj.id + '/', 46 | method: "put", 47 | data: obj 48 | }); 49 | } 50 | 51 | export function deleteDict(id: string) { 52 | return axiosInstance({ 53 | url: dictBaseUrl + id + '/', 54 | method: "delete", 55 | params: { id } 56 | }); 57 | } 58 | 59 | export function batchDeleteDict(keys: any) { 60 | return axiosInstance({ 61 | url: dictBaseUrl + 'multiple_delete/', 62 | method: 'delete', 63 | data: { keys } 64 | }) 65 | } 66 | 67 | export function getDict(id: string) { 68 | return axiosInstance({ 69 | url: dictBaseUrl + id + '/', 70 | method: "get", 71 | params: { id } 72 | }); 73 | } -------------------------------------------------------------------------------- /frontend/src/layout/components/tabs/components/contextmenuList.vue: -------------------------------------------------------------------------------- 1 | 8 | 21 | 22 | 43 | 44 | -------------------------------------------------------------------------------- /frontend/src/components/ImageCard.vue: -------------------------------------------------------------------------------- 1 | 8 | 24 | 25 | 48 | 49 | 79 | -------------------------------------------------------------------------------- /frontend/src/views/DataManage/OrginDataManage.vue: -------------------------------------------------------------------------------- 1 | 8 | 22 | 60 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /frontend/src/views/system/dept/index.vue: -------------------------------------------------------------------------------- 1 | 8 | 14 | 15 | -------------------------------------------------------------------------------- /frontend/src/setting.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: yifeng 3 | * @Date: 2022-09-13 22:05:18 4 | * @LastEditors: yifeng 5 | * @LastEditTime: 2022-09-13 22:05:18 6 | * @Description: 7 | */ 8 | export default { 9 | // 快捷键 10 | // 支持快捷键 例如 ctrl+shift+s 11 | hotkey: { 12 | search: { 13 | open: 's', 14 | close: 'esc' 15 | } 16 | }, 17 | // 侧边栏默认配置 18 | menu: { 19 | asideCollapse: false, 20 | asideTransition: true 21 | }, 22 | // 在读取持久化数据失败时默认页面 23 | page: { 24 | opened: [ 25 | { 26 | name: 'index', 27 | fullPath: '/index', 28 | meta: { 29 | title: '控制台', 30 | auth: false 31 | } 32 | } 33 | ] 34 | }, 35 | // 菜单搜索 36 | search: { 37 | enable: true 38 | }, 39 | // 注册的主题 40 | theme: { 41 | list: [ 42 | { 43 | title: 'd2admin 经典', 44 | name: 'd2', 45 | preview: 'image/theme/d2/preview@2x.png' 46 | }, 47 | { 48 | title: 'Chester', 49 | name: 'chester', 50 | preview: 'image/theme/chester/preview@2x.jpg' 51 | }, 52 | { 53 | title: 'Element', 54 | name: 'element', 55 | preview: 'image/theme/element/preview@2x.jpg' 56 | }, 57 | { 58 | title: '紫罗兰', 59 | name: 'violet', 60 | preview: 'image/theme/violet/preview@2x.jpg' 61 | }, 62 | { 63 | title: '简约线条', 64 | name: 'line', 65 | backgroundImage: 'image/theme/line/bg.jpg', 66 | preview: 'image/theme/line/preview@2x.jpg' 67 | }, 68 | { 69 | title: '流星', 70 | name: 'star', 71 | backgroundImage: 'image/theme/star/bg.jpg', 72 | preview: 'image/theme/star/preview@2x.jpg' 73 | }, 74 | { 75 | title: 'Tomorrow Night Blue (vsCode)', 76 | name: 'tomorrow-night-blue', 77 | preview: 'image/theme/tomorrow-night-blue/preview@2x.jpg' 78 | } 79 | ] 80 | }, 81 | // 是否默认开启页面切换动画 82 | transition: { 83 | active: true 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /frontend/src/views/system/menuButton/index.vue: -------------------------------------------------------------------------------- 1 | 8 | 14 | 15 | -------------------------------------------------------------------------------- /frontend/src/views/system/config/components/addTab.vue: -------------------------------------------------------------------------------- 1 | 8 | 24 | 25 | 70 | 71 | 74 | -------------------------------------------------------------------------------- /frontend/src/router/staticRoutes.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: yifeng 3 | * @Date: 2022-09-17 00:21:03 4 | * @LastEditors: yifeng 5 | * @LastEditTime: 2022-10-15 22:01:16 6 | * @Description: 7 | */ 8 | import layoutHeaderAside from '@/layout/layout.vue' 9 | const frameIn = [{ 10 | path: '/', 11 | redirect: { name: 'index' }, 12 | component: layoutHeaderAside, 13 | children: [ 14 | // 控制台 15 | { 16 | path: 'index', 17 | name: 'index', 18 | meta: { 19 | title: '工作台', 20 | auth: true 21 | }, 22 | component: import('@/views/dashboard/workbench/index.vue') 23 | }, 24 | { 25 | path: 'userInfo', 26 | name: 'userInfo', 27 | meta: { 28 | title: '个人信息', 29 | auth: true 30 | }, 31 | component: () => import('@/layout/components/headerUser/userInfo.vue') 32 | }, 33 | // 刷新页面 必须保留 34 | { 35 | path: 'refresh', 36 | name: 'refresh', 37 | hidden: true, 38 | component: import('@/views/system/function/refresh.vue') 39 | }, 40 | // 页面重定向 必须保留 41 | { 42 | path: 'redirect/:route*', 43 | name: 'redirect', 44 | hidden: true, 45 | component: import('@/views/system/function/redirect.vue') 46 | }, 47 | { 48 | path: '/home', 49 | name: 'home', 50 | meta: { 51 | auth: true 52 | }, 53 | component: import('@/views/Home/Home.vue') 54 | }, 55 | ] 56 | }] 57 | /** 58 | * 在主框架之外显示 59 | * 登录页面 60 | */ 61 | const frameOut = [{ 62 | path: '/login', 63 | name: 'login', 64 | component: import('@/views/system/loginRegister/loginRegister.vue'), 65 | }] 66 | /** 67 | * 错误页面 68 | */ 69 | const errorPage = [{ 70 | path: '/:catchAll(.*)', 71 | name: '/404', 72 | component: () => import('@/views/system/error/404/404.vue'), 73 | }] 74 | 75 | export const staticRoutes = frameIn 76 | 77 | export default [ 78 | ...frameIn, 79 | ...frameOut, 80 | ...errorPage 81 | ] -------------------------------------------------------------------------------- /backend/backend/conf/env.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Author: yifeng 3 | Date: 2022-10-07 20:03:13 4 | LastEditors: yifeng 5 | LastEditTime: 2022-10-07 20:49:19 6 | Description: 7 | ''' 8 | 9 | import os 10 | # from backend.settings import BASE_DIR 11 | 12 | # ================================================= # 13 | # *************** mysql数据库 配置 *************** # 14 | # ================================================= # 15 | # 数据库 ENGINE ,默认演示使用 sqlite3 数据库,正式环境建议使用 mysql 数据库 16 | # sqlite3 设置 17 | # DATABASE_ENGINE = 'django.db.backends.mysql' 18 | # DATABASE_NAME = 'dvamin', 19 | 20 | # 使用mysql时,改为此配置 21 | DATABASE_ENGINE = "django.db.backends.mysql" 22 | DATABASE_NAME = 'detect' # mysql 时使用 23 | 24 | # 数据库地址 改为自己数据库地址 25 | DATABASE_HOST = "127.0.0.1" 26 | # # 数据库端口 27 | DATABASE_PORT = '3306' 28 | # # 数据库用户名 29 | DATABASE_USER = "root" 30 | # # 数据库密码 31 | DATABASE_PASSWORD = "123456" 32 | 33 | # 表前缀 34 | # TABLE_PREFIX = "dvadmin_" 35 | # ================================================= # 36 | # ******** redis配置,无redis 可不进行配置 ******** # 37 | # ================================================= # 38 | # REDIS_PASSWORD = '' 39 | # REDIS_HOST = '127.0.0.1' 40 | # REDIS_URL = f'redis://:{REDIS_PASSWORD or ""}@{REDIS_HOST}:6380' 41 | 42 | # ================================================= # 43 | # ****************** 功能 启停 ******************* # 44 | # ================================================= # 45 | DEBUG = True 46 | # 启动登录详细概略获取(通过调用api获取ip详细地址。如果是内网,关闭即可) 47 | ENABLE_LOGIN_ANALYSIS_LOG = True 48 | 49 | # 启动登录访问日志 50 | LOGIN_LOG_ENABLE = False 51 | # 登录接口 /api/token/ 是否需要验证码认证,用于测试,正式环境建议取消 52 | LOGIN_NO_CAPTCHA_AUTH = True 53 | # 启动接口访问日志 54 | API_LOG_ENABLE = False 55 | # API_LOG_METHODS = 'ALL' # ['POST', 'DELETE'] 56 | API_LOG_METHODS = ["POST", "UPDATE", "DELETE", "PUT"] # ['POST', 'DELETE'] 57 | API_MODEL_MAP = { 58 | "/token/": "登录模块", 59 | "/api/login/": "登录模块", 60 | "/api/plugins_market/plugins/": "插件市场", 61 | } 62 | 63 | 64 | # ================================================= # 65 | # ****************** 其他 配置 ******************* # 66 | # ================================================= # 67 | 68 | ALLOWED_HOSTS = ["*"] 69 | 70 | # daphne启动命令 71 | #daphne application.asgi:application -b 0.0.0.0 -p 8000 72 | -------------------------------------------------------------------------------- /frontend/src/stores/system-setting.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: yifeng 3 | * @Date: 2022-09-11 13:54:05 4 | * @LastEditors: yifeng 5 | * @LastEditTime: 2022-10-07 17:31:53 6 | * @Description: 7 | */ 8 | import { getSysSettingInitInfo } from '@/apis/system' 9 | import { defineStore } from 'pinia' 10 | import useDbStore from './system-db' 11 | 12 | const useSettingStore = defineStore('system/setting', { 13 | state: () => ({ 14 | systemInfo: {} as any 15 | }), 16 | actions: { 17 | /** 18 | * @description 获取配置 19 | * @param {Object} state state 20 | * @param {String} key active 21 | * @param {Object} value active 22 | */ 23 | async get(key: string | number) { 24 | return this.systemInfo[key] 25 | }, 26 | /** 27 | * @description 赋值系统配置 28 | * @param {Object} state state 29 | * @param {Object} value active 30 | */ 31 | async set(value: any) { 32 | this.systemInfo = value 33 | // this.keepRecord = value['login.keep_record'] 34 | return this.systemInfo 35 | }, 36 | /** 37 | * @description 请求最新配置 38 | * @param {Object} context 39 | */ 40 | async init() { 41 | const dbStore = useDbStore() 42 | // 请求配置 43 | getSysSettingInitInfo().then((res) => { 44 | // 赋值 45 | dbStore.set({ 46 | dbName: 'sys', 47 | path: 'settings.init', 48 | value: res.data, 49 | user: true 50 | }) 51 | this.load() 52 | }) 53 | }, 54 | /** 55 | * @description 本地加载配置 56 | * @param {Object} context 57 | */ 58 | async load() { 59 | const dbStore = useDbStore() 60 | // store 赋值 61 | const data = await dbStore.get({ 62 | dbName: 'sys', 63 | path: 'settings.init', 64 | defaultValue: {}, 65 | user: true 66 | }) 67 | this.set(data) 68 | } 69 | }, 70 | 71 | }) 72 | 73 | export default useSettingStore; -------------------------------------------------------------------------------- /backend/apps/system/migrations/0005_filelist.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.14 on 2022-10-02 12:31 2 | 3 | import apps.system.models 4 | from django.conf import settings 5 | from django.db import migrations, models 6 | import django.db.models.deletion 7 | 8 | 9 | class Migration(migrations.Migration): 10 | 11 | dependencies = [ 12 | ('system', '0004_apiwhitelist'), 13 | ] 14 | 15 | operations = [ 16 | migrations.CreateModel( 17 | name='FileList', 18 | fields=[ 19 | ('id', models.BigAutoField(help_text='Id', primary_key=True, serialize=False, verbose_name='Id')), 20 | ('description', models.CharField(blank=True, help_text='描述', max_length=255, null=True, verbose_name='描述')), 21 | ('modifier', models.CharField(blank=True, help_text='修改人', max_length=255, null=True, verbose_name='修改人')), 22 | ('dept_belong_id', models.CharField(blank=True, help_text='数据归属部门', max_length=255, null=True, verbose_name='数据归属部门')), 23 | ('update_datetime', models.DateTimeField(auto_now=True, help_text='修改时间', null=True, verbose_name='修改时间')), 24 | ('create_datetime', models.DateTimeField(auto_now_add=True, help_text='创建时间', null=True, verbose_name='创建时间')), 25 | ('is_deleted', models.BooleanField(db_index=True, default=False, help_text='是否软删除', verbose_name='是否软删除')), 26 | ('name', models.CharField(blank=True, help_text='名称', max_length=50, null=True, verbose_name='名称')), 27 | ('url', models.FileField(upload_to=apps.system.models.media_file_name)), 28 | ('md5sum', models.CharField(blank=True, help_text='文件md5', max_length=36, verbose_name='文件md5')), 29 | ('creator', models.ForeignKey(db_constraint=False, help_text='创建人', null=True, on_delete=django.db.models.deletion.SET_NULL, related_query_name='creator_query', to=settings.AUTH_USER_MODEL, verbose_name='创建人')), 30 | ], 31 | options={ 32 | 'verbose_name': '文件管理', 33 | 'verbose_name_plural': '文件管理', 34 | 'db_table': 'system_file_list', 35 | 'ordering': ('-create_datetime',), 36 | }, 37 | ), 38 | ] 39 | -------------------------------------------------------------------------------- /backend/apps/system/migrations/0004_apiwhitelist.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.14 on 2022-09-27 19:38 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | import django.db.models.deletion 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('system', '0003_user_mobile'), 12 | ] 13 | 14 | operations = [ 15 | migrations.CreateModel( 16 | name='ApiWhiteList', 17 | fields=[ 18 | ('id', models.BigAutoField(help_text='Id', primary_key=True, serialize=False, verbose_name='Id')), 19 | ('description', models.CharField(blank=True, help_text='描述', max_length=255, null=True, verbose_name='描述')), 20 | ('modifier', models.CharField(blank=True, help_text='修改人', max_length=255, null=True, verbose_name='修改人')), 21 | ('dept_belong_id', models.CharField(blank=True, help_text='数据归属部门', max_length=255, null=True, verbose_name='数据归属部门')), 22 | ('update_datetime', models.DateTimeField(auto_now=True, help_text='修改时间', null=True, verbose_name='修改时间')), 23 | ('create_datetime', models.DateTimeField(auto_now_add=True, help_text='创建时间', null=True, verbose_name='创建时间')), 24 | ('is_deleted', models.BooleanField(db_index=True, default=False, help_text='是否软删除', verbose_name='是否软删除')), 25 | ('url', models.CharField(help_text='url地址', max_length=200, verbose_name='url')), 26 | ('method', models.IntegerField(blank=True, default=0, help_text='接口请求方法', null=True, verbose_name='接口请求方法')), 27 | ('enable_datasource', models.BooleanField(blank=True, default=True, help_text='激活数据权限', verbose_name='激活数据权限')), 28 | ('creator', models.ForeignKey(db_constraint=False, help_text='创建人', null=True, on_delete=django.db.models.deletion.SET_NULL, related_query_name='creator_query', to=settings.AUTH_USER_MODEL, verbose_name='创建人')), 29 | ], 30 | options={ 31 | 'verbose_name': '接口白名单', 32 | 'verbose_name_plural': '接口白名单', 33 | 'db_table': 'api_white_list', 34 | 'ordering': ('-create_datetime',), 35 | }, 36 | ), 37 | ] 38 | -------------------------------------------------------------------------------- /frontend/src/views/system/dictionary/subDictionary/index.vue: -------------------------------------------------------------------------------- 1 | 8 | 14 | 15 | -------------------------------------------------------------------------------- /frontend/src/utils/system/open.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: yifeng 3 | * @Date: 2022-10-07 17:25:32 4 | * @LastEditors: yifeng 5 | * @LastEditTime: 2022-10-07 17:28:20 6 | * @Description: 7 | */ 8 | 9 | /** 10 | * @description 更新标题 11 | * @param {String} titleText 标题 12 | */ 13 | util.title = function (titleText) { 14 | const processTitle = process.env.VUE_APP_TITLE || 'D2Admin' 15 | window.document.title = `${processTitle}${titleText ? ` | ${titleText}` : ''}` 16 | } 17 | 18 | /** 19 | * @description 打开新页面 20 | * @param {String} url 地址 21 | */ 22 | util.open = function (url) { 23 | var a = document.createElement('a') 24 | a.setAttribute('href', url) 25 | a.setAttribute('target', '_blank') 26 | a.setAttribute('id', 'd2admin-link-temp') 27 | document.body.appendChild(a) 28 | a.click() 29 | document.body.removeChild(document.getElementById('d2admin-link-temp')) 30 | } 31 | /** 32 | * @description 校验是否为租户模式。租户模式把域名替换成 域名 加端口 33 | */ 34 | util.baseURL = function () { 35 | var baseURL = process.env.VUE_APP_API 36 | if (window.pluginsAll && window.pluginsAll.indexOf('dvadmin-tenant-web') !== -1) { 37 | // document.domain 38 | var host = baseURL.split('/')[2] 39 | var prot = host.split(':')[1] || 80 40 | host = document.domain + ':' + prot 41 | baseURL = baseURL.split('/')[0] + '//' + baseURL.split('/')[1] + host + '/' + (baseURL.split('/')[3] || '') 42 | } 43 | if (!baseURL.endsWith('/')) { 44 | baseURL += '/' 45 | } 46 | return baseURL 47 | } 48 | /** 49 | * 自动生成ID 50 | */ 51 | util.autoCreateCode = function () { 52 | return dayjs().format('YYYYMMDDHHmmssms') + Math.round(Math.random() * 80 + 20) 53 | } 54 | /** 55 | * 自动生成短 ID 56 | */ 57 | util.autoShortCreateCode = function () { 58 | var Num = '' 59 | for (var i = 0; i < 4; i++) { 60 | Num += Math.floor(Math.random() * 10) 61 | } 62 | return dayjs().format('YYMMDD') + Num 63 | } 64 | 65 | /** 66 | * 生产随机字符串 67 | */ 68 | util.randomString = function (e) { 69 | e = e || 32 70 | var t = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678' 71 | var a = t.length 72 | var n = '' 73 | for (let i = 0; i < e; i++) n += t.charAt(Math.floor(Math.random() * a)) 74 | return n 75 | } 76 | 77 | export default util 78 | -------------------------------------------------------------------------------- /frontend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "frontend", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite --mode development", 8 | "build": "vue-tsc --noEmit && vite build", 9 | "preview": "vite preview", 10 | "test": "vite --mode test", 11 | "prod": "vite --mode production", 12 | "serve": "vite preview" 13 | }, 14 | "dependencies": { 15 | "@element-plus/icons-vue": "^2.0.9", 16 | "@fast-crud/fast-crud": "^1.3.0", 17 | "@fast-crud/ui-element": "^1.3.0", 18 | "@iconify/iconify": "^3.0.0", 19 | "axios": "^0.27.2", 20 | "china-division": "^2.5.0", 21 | "core-js": "^3.8.3", 22 | "dts-generator": "^3.0.0", 23 | "echarts": "^5.3.3", 24 | "element-plus": "^2.2.11", 25 | "font-awesome": "^4.7.0", 26 | "js-cookie": "^3.0.1", 27 | "js-md5": "^0.7.3", 28 | "lodash": "^4.17.21", 29 | "lowdb": "2.1", 30 | "nprogress": "^0.2.0", 31 | "path-browserify": "^1.0.1", 32 | "pinia": "^2.0.22", 33 | "pinia-plugin-persist": "^1.0.0", 34 | "vite-plugin-html": "^3.2.0", 35 | "vue": "^3.2.37", 36 | "vue-class-component": "^8.0.0-0", 37 | "vue-i18n": "^9.2.2", 38 | "vue-router": "^4.1.5", 39 | "vxe-table": "^4.3.5", 40 | "vxe-utils": "^2.0.1", 41 | "xe-utils": "^3.5.7" 42 | }, 43 | "devDependencies": { 44 | "@babel/core": "^7.12.16", 45 | "@babel/eslint-parser": "^7.12.16", 46 | "@iconify/json": "^2.1.111", 47 | "@types/js-cookie": "^3.0.2", 48 | "@types/node": "^18.7.18", 49 | "@types/nprogress": "^0.2.0", 50 | "@typescript-eslint/eslint-plugin": "^5.4.0", 51 | "@typescript-eslint/parser": "^5.4.0", 52 | "@vitejs/plugin-vue": "^3.1.0", 53 | "@vitejs/plugin-vue-jsx": "^2.0.1", 54 | "@vue/cli-plugin-babel": "~5.0.0", 55 | "@vue/cli-plugin-eslint": "~5.0.0", 56 | "@vue/cli-plugin-typescript": "~5.0.0", 57 | "@vue/cli-service": "~5.0.0", 58 | "@vue/eslint-config-typescript": "^9.1.0", 59 | "eslint": "^7.32.0", 60 | "eslint-plugin-vue": "^8.0.3", 61 | "node-sass": "^7.0.1", 62 | "sass": "^1.54.9", 63 | "sass-loader": "^13.0.2", 64 | "style-loader": "^3.3.1", 65 | "typescript": "^4.6.4", 66 | "vite": "^3.1.0", 67 | "vite-plugin-purge-icons": "^0.9.1", 68 | "vue-tsc": "^0.40.4" 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /backend/backend/utils/jsonResponse.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Author: yifeng 3 | Date: 2022-08-28 21:23:41 4 | LastEditors: yifeng 5 | LastEditTime: 2022-08-28 21:23:41 6 | Description: 7 | ''' 8 | 9 | from rest_framework.response import Response 10 | 11 | 12 | class SuccessResponse(Response): 13 | """ 14 | 标准响应成功的返回, SuccessResponse(data)或者SuccessResponse(data=data) 15 | (1)默认code返回2000, 不支持指定其他返回码 16 | """ 17 | def __init__(self, 18 | data=None, 19 | msg='success', 20 | status=None, 21 | template_name=None, 22 | headers=None, 23 | exception=False, 24 | content_type=None, 25 | page=1, 26 | limit=1, 27 | total=1): 28 | std_data = { 29 | "code": 2000, 30 | "data": { 31 | "page": page, 32 | "limit": limit, 33 | "total": total, 34 | "data": data 35 | }, 36 | "msg": msg 37 | } 38 | super().__init__(std_data, status, template_name, headers, exception, content_type) 39 | 40 | 41 | class DetailResponse(Response): 42 | """ 43 | 不包含分页信息的接口返回,主要用于单条数据查询 44 | (1)默认code返回2000, 不支持指定其他返回码 45 | """ 46 | def __init__( 47 | self, 48 | data=None, 49 | msg='success', 50 | status=None, 51 | template_name=None, 52 | headers=None, 53 | exception=False, 54 | content_type=None, 55 | ): 56 | std_data = {"code": 2000, "data": data, "msg": msg} 57 | super().__init__(std_data, status, template_name, headers, exception, content_type) 58 | 59 | 60 | class ErrorResponse(Response): 61 | """ 62 | 标准响应错误的返回,ErrorResponse(msg='xxx') 63 | (1)默认错误码返回400, 也可以指定其他返回码:ErrorResponse(code=xxx) 64 | """ 65 | def __init__(self, 66 | data=None, 67 | msg='error', 68 | code=400, 69 | status=None, 70 | template_name=None, 71 | headers=None, 72 | exception=False, 73 | content_type=None): 74 | std_data = {"code": code, "data": data, "msg": msg} 75 | super().__init__(std_data, status, template_name, headers, exception, content_type) 76 | -------------------------------------------------------------------------------- /backend/apps/system/config/cfg.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Author: yifeng 3 | Date: 2022-08-28 16:27:28 4 | LastEditors: yifeng 5 | LastEditTime: 2022-09-02 19:21:46 6 | Description: 7 | ''' 8 | # Note: const data for system models and system init data 9 | 10 | # 初始化需要执行的列表,用来初始化后执行 11 | INITIALIZE_LIST = [] 12 | INITIALIZE_RESET_LIST = [] 13 | # 系统配置 14 | SYSTEM_CONFIG = {} 15 | # 字典配置 16 | DICTIONARY_CONFIG = {} 17 | 18 | 19 | # 用户表 20 | # 性别 21 | GENDER_CHOICES = ( 22 | (0, "未知"), 23 | (1, "男"), 24 | (2, "女"), 25 | ) 26 | # 用户类型 27 | USER_TYPE = ( 28 | (0, "后台用户"), 29 | (1, "前台用户"), 30 | ) 31 | # 头像地址 32 | AVATAR_URL = '/media/default/avatar.png' 33 | 34 | MENU_TYPE_CHOICES = (('0', '目录'), ('1', '菜单'), ('2', '接口')) 35 | 36 | ORGANIZATION_TYPE_CHOICES = (('0', '公司'), ('1', '部门')) 37 | 38 | # 角色表 39 | # 数据权限 40 | DATA_TYPE_CHOICES = (('0', '全部'), ('5', '自定义'), ('1', '同级及以下'), ('2', '本级及以下'), 41 | ('3', '本级'), ('4', '仅本人')) 42 | 43 | DATASCOPE_CHOICES = ( 44 | (0, "仅本人数据权限"), 45 | (1, "本部门及以下数据权限"), 46 | (2, "本部门数据权限"), 47 | (3, "全部数据权限"), 48 | (4, "自定数据权限"),) 49 | 50 | # 职位/岗位表 51 | # 岗位状态 52 | STATUS_CHOICES = ( 53 | (0, "离职"), 54 | (1, "在职"), 55 | ) 56 | 57 | # 菜单表 58 | # 是否外链 59 | ISLINK_CHOICES = ( 60 | (False, "否"), 61 | (True, "是"), 62 | ) 63 | 64 | # 菜单按钮表 65 | # 接口请求方法 66 | METHOD_CHOICES = ( 67 | (0, "GET"), 68 | (1, "POST"), 69 | (2, "PUT"), 70 | (3, "DELETE"), 71 | ) 72 | 73 | # 字典表 74 | # 数据值类型 75 | TYPE_LIST = ( 76 | (0, "text"), 77 | (1, "number"), 78 | (2, "date"), 79 | (3, "datetime"), 80 | (4, "time"), 81 | (5, "files"), 82 | (6, "boolean"), 83 | (7, "images"), 84 | ) 85 | 86 | # 系统配置表 87 | # 表单类型 88 | FORM_ITEM_TYPE_LIST = ( 89 | (0, "text"), 90 | (1, "datetime"), 91 | (2, "date"), 92 | (3, "textarea"), 93 | (4, "select"), 94 | (5, "checkbox"), 95 | (6, "radio"), 96 | (7, "img"), 97 | (8, "file"), 98 | (9, "switch"), 99 | (10, "number"), 100 | (11, "array"), 101 | (12, "imgs"), 102 | (13, "foreignkey"), 103 | (14, "manytomany"), 104 | (15, "time"), 105 | ) -------------------------------------------------------------------------------- /backend/backend/utils/validator.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Author: yifeng 3 | Date: 2022-08-28 20:25:29 4 | LastEditors: yifeng 5 | LastEditTime: 2022-08-28 20:25:30 6 | Description: 7 | ''' 8 | 9 | from django.db import DataError 10 | from rest_framework.exceptions import APIException 11 | from rest_framework.validators import UniqueValidator 12 | 13 | 14 | class CustomValidationError(APIException): 15 | """ 16 | 继承并重写验证器返回的结果,避免暴露字段 17 | """ 18 | 19 | def __init__(self, detail): 20 | self.detail = detail 21 | 22 | 23 | def qs_exists(queryset): 24 | try: 25 | return queryset.exists() 26 | except (TypeError, ValueError, DataError): 27 | return False 28 | 29 | 30 | def qs_filter(queryset, **kwargs): 31 | try: 32 | return queryset.filter(**kwargs) 33 | except (TypeError, ValueError, DataError): 34 | return queryset.none() 35 | 36 | 37 | class CustomUniqueValidator(UniqueValidator): 38 | """ 39 | 继承,重写必填字段的验证器结果,防止字段暴露 40 | """ 41 | 42 | def filter_queryset(self, value, queryset, field_name): 43 | """ 44 | Filter the queryset to all instances matching the given attribute. 45 | """ 46 | filter_kwargs = {'%s__%s' % (field_name, self.lookup): value} 47 | return qs_filter(queryset, **filter_kwargs) 48 | 49 | def exclude_current_instance(self, queryset, instance): 50 | """ 51 | If an instance is being updated, then do not include 52 | that instance itself as a uniqueness conflict. 53 | """ 54 | if instance is not None: 55 | return queryset.exclude(pk=instance.pk) 56 | return queryset 57 | 58 | def __call__(self, value, serializer_field): 59 | # Determine the underlying model field name. This may not be the 60 | # same as the serializer field name if `source=<>` is set. 61 | field_name = serializer_field.source_attrs[-1] 62 | # Determine the existing instance, if this is an update operation. 63 | instance = getattr(serializer_field.parent, 'instance', None) 64 | 65 | queryset = self.queryset 66 | queryset = self.filter_queryset(value, queryset, field_name) 67 | queryset = self.exclude_current_instance(queryset, instance) 68 | if qs_exists(queryset): 69 | raise CustomValidationError(self.message) 70 | 71 | def __repr__(self): 72 | return super().__repr__() 73 | -------------------------------------------------------------------------------- /frontend/src/layout/components/tabs/components/contextMenu.vue: -------------------------------------------------------------------------------- 1 | 8 | 13 | 14 | 76 | 77 | -------------------------------------------------------------------------------- /frontend/src/stores/system-log.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: yifeng 3 | * @Date: 2022-09-17 16:42:22 4 | * @LastEditors: yifeng 5 | * @LastEditTime: 2022-10-07 17:19:51 6 | * @Description: 7 | */ 8 | import { defineStore } from "pinia"; 9 | import dayjs from 'dayjs' 10 | import { get } from "lodash"; 11 | import cookies from "@/utils/common/cookies"; 12 | import useUserStore from "./system-user"; 13 | 14 | 15 | const useLogStore = defineStore('system/log', { 16 | state: () => ({ 17 | // 错误日志 18 | // + 日志条目的属性 19 | // - message 必须 日志信息 20 | // - type 非必须 类型 success | warning | info(默认) | danger 21 | // - time 必须 日志记录时间 22 | // - meta 非必须 其它携带信息 23 | log: [] as any 24 | }), 25 | getters: { 26 | // doubleCount: (state) => state.counter * 2, 27 | /** 28 | * @description 返回现存 log (all) 的条数 29 | */ 30 | length: (state) => { 31 | return state.log.length 32 | }, 33 | /** 34 | * @description 返回现存 log (error) 的条数 35 | */ 36 | lengthError: (state) => { 37 | return state.log.filter(log => log.type === 'danger').length 38 | } 39 | }, 40 | actions: { 41 | /** 42 | * @description 添加一个日志 43 | * @param {Object} context 44 | * @param {String} param message {String} 信息 45 | * @param {String} param type {String} 类型 46 | * @param {Object} payload meta {Object} 附带的信息 47 | */ 48 | push({ message, type = 'info', meta }) { 49 | const userStore = useUserStore() 50 | this.log.push({ 51 | message, 52 | type, 53 | time: dayjs().format('YYYY-MM-DD HH:mm:ss'), 54 | meta: { 55 | // 当前用户信息 56 | user: userStore.info, 57 | // 当前用户的 uuid 58 | uuid: cookies.get('uuid'), 59 | // 当前的 token 60 | token: cookies.get('token'), 61 | // 当前地址 62 | url: get(window, 'location.href', ''), 63 | // 用户设置 64 | ...meta 65 | } 66 | }) 67 | }, 68 | /** 69 | * @description 清空日志 70 | * @param {Object} state state 71 | */ 72 | clean() { 73 | // store 赋值 74 | this.log = [] 75 | } 76 | } 77 | }) 78 | export default useLogStore -------------------------------------------------------------------------------- /backend/apps/system/fixtures/initialize.py: -------------------------------------------------------------------------------- 1 | # 初始化 2 | import os 3 | 4 | import django 5 | 6 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "backend.settings") 7 | django.setup() 8 | 9 | from apps.system.serializers.userSerializer import UserInitSerializer 10 | from apps.system.serializers.menuSerializer import MenuInitSerializer 11 | from apps.system.serializers.roleSerializer import RoleInitSerializer 12 | from apps.system.serializers.deptSerializer import DeptInitSerializer 13 | from apps.system.serializers.dictionarySerializer import DictionaryInitSerializer 14 | from apps.system.serializers.systemConfigSerializer import SystemConfigInitSerializer 15 | # from system.views.api_white_list import ApiWhiteListInitSerializer 16 | from backend.utils.coreInitialize import CoreInitialize 17 | 18 | 19 | class Initialize(CoreInitialize): 20 | def init_dept(self): 21 | """ 22 | 初始化部门信息 23 | """ 24 | self.init_base(DeptInitSerializer, unique_fields=['name', 'parent']) 25 | 26 | def init_role(self): 27 | """ 28 | 初始化角色信息 29 | """ 30 | self.init_base(RoleInitSerializer, unique_fields=['key']) 31 | 32 | def init_user(self): 33 | """ 34 | 初始化用户信息 35 | """ 36 | self.init_base(UserInitSerializer, unique_fields=['username']) 37 | 38 | def init_menu(self): 39 | """ 40 | 初始化菜单信息 41 | """ 42 | self.init_base(MenuInitSerializer, 43 | unique_fields=['name', 'web_path', 'component', 'component_name']) 44 | 45 | # def init_api_white_list(self): 46 | # """ 47 | # 初始API白名单 48 | # """ 49 | # self.init_base(ApiWhiteListInitSerializer, unique_fields=['url', 'method', ]) 50 | 51 | def init_dictionary(self): 52 | """ 53 | 初始化字典表 54 | """ 55 | self.init_base(DictionaryInitSerializer, unique_fields=[ 56 | 'value', 57 | 'parent', 58 | ]) 59 | 60 | def init_system_config(self): 61 | """ 62 | 初始化系统配置表 63 | """ 64 | self.init_base(SystemConfigInitSerializer, unique_fields=[ 65 | 'key', 66 | 'parent', 67 | ]) 68 | 69 | def run(self): 70 | self.init_dept() 71 | self.init_role() 72 | self.init_user() 73 | self.init_menu() 74 | # self.init_api_white_list() 75 | self.init_system_config() 76 | self.init_dictionary() 77 | # self.init_system_config() 78 | 79 | 80 | if __name__ == "__main__": 81 | Initialize(app='apps.system').run() 82 | -------------------------------------------------------------------------------- /backend/apps/system/urls.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Author: yifeng 3 | Date: 2022-08-10 20:56:03 4 | LastEditors: yifeng 5 | LastEditTime: 2022-10-18 19:12:03 6 | Description: 7 | ''' 8 | from django.urls import path 9 | from rest_framework.routers import SimpleRouter 10 | from apps.system.views.deptViews import DeptViewSet 11 | from apps.system.views.menuButtonViews import MenuButtonViewSet 12 | from apps.system.views.menuViews import MenuViewSet 13 | from apps.system.views.roleViews import RoleViewSet 14 | from apps.system.views.userViews import UserViewSet 15 | from apps.system.views.dictionaryViews import DictionaryViewSet 16 | from apps.system.views.systemConfigViews import SystemConfigViewSet 17 | from apps.system.views.fileViews import FileViewSet 18 | from apps.system.views.loginLogViews import LoginLogViewSet 19 | from apps.system.views.operationLogViews import OperationLogViewSet 20 | from apps.system.views.apiWhiteListViews import ApiWhiteListViewSet 21 | from apps.system.views.areaViews import AreaViewSet 22 | 23 | # system_router = DefaultRouter() 24 | system_router = SimpleRouter() 25 | system_router.register(r'menu', MenuViewSet) 26 | system_router.register(r'menu_button', MenuButtonViewSet) 27 | system_router.register(r'role', RoleViewSet) 28 | system_router.register(r'dept', DeptViewSet) 29 | system_router.register(r'user', UserViewSet) 30 | system_router.register(r'dictionary', DictionaryViewSet) 31 | system_router.register(r'system_config', SystemConfigViewSet) 32 | system_router.register(r'operation_log', OperationLogViewSet) 33 | system_router.register(r'area', AreaViewSet) 34 | system_router.register(r'file', FileViewSet) 35 | system_router.register(r'api_white_list', ApiWhiteListViewSet) 36 | # system_router.register(r'message_center',MessageCenterViewSet) 37 | 38 | urlpatterns = [ 39 | # path('admin/', admin.site.urls), 40 | # path('', include(system_router.urls)), 41 | path('system_config/save_content/', SystemConfigViewSet.as_view({'put': 'save_content'})), 42 | path('system_config/get_association_table/', 43 | SystemConfigViewSet.as_view({'get': 'get_association_table'})), 44 | path('system_config/get_table_data//', 45 | SystemConfigViewSet.as_view({'get': 'get_table_data'})), 46 | path('system_config/get_relation_info/', 47 | SystemConfigViewSet.as_view({'get': 'get_relation_info'})), 48 | path('login_log/', LoginLogViewSet.as_view({'get': 'list'})), 49 | path('login_log//', LoginLogViewSet.as_view({'get': 'retrieve'})), 50 | path('dept_lazy_tree/', DeptViewSet.as_view({'get': 'dept_lazy_tree'})), 51 | ] 52 | urlpatterns += system_router.urls 53 | -------------------------------------------------------------------------------- /frontend/src/apis/system/user.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: yifeng 3 | * @Date: 2022-09-14 21:09:58 4 | * @LastEditors: yifeng 5 | * @LastEditTime: 2022-10-02 10:52:49 6 | * @Description: 7 | */ 8 | import axiosInstance from '@/utils/net/axiosInstance' 9 | 10 | const userBaseUrl = "/api/system/user/"; 11 | 12 | export function getUserList(query: any) { 13 | return axiosInstance({ 14 | url: userBaseUrl, 15 | method: "get", 16 | data: { ...query } 17 | }); 18 | } 19 | 20 | export function addUser(obj: any) { 21 | return axiosInstance({ 22 | url: userBaseUrl, 23 | method: "post", 24 | data: obj 25 | }); 26 | } 27 | 28 | export function updateUser(obj: any) { 29 | return axiosInstance({ 30 | url: userBaseUrl + obj.id + '/', 31 | method: "put", 32 | data: obj 33 | }); 34 | } 35 | 36 | export function deleteUser(id: string) { 37 | return axiosInstance({ 38 | url: userBaseUrl + id + '/', 39 | method: "delete", 40 | params: { id } 41 | }); 42 | } 43 | 44 | export function batchDeleteUser(keys: any) { 45 | return axiosInstance({ 46 | url: userBaseUrl + 'multiple_delete/', 47 | method: 'delete', 48 | data: { keys } 49 | }) 50 | } 51 | 52 | export function getUser(id: string) { 53 | return axiosInstance({ 54 | url: userBaseUrl + id + '/', 55 | method: "get", 56 | params: { id } 57 | }); 58 | } 59 | 60 | /** 61 | * 重置密码 62 | * @param obj 63 | * @returns {*} 64 | * @constructor 65 | */ 66 | export function resetPassword(obj: { id: string; }) { 67 | return axiosInstance({ 68 | url: userBaseUrl + obj.id + '/reset_password/', 69 | method: 'put', 70 | data: obj 71 | }) 72 | } 73 | 74 | /** 75 | * 重设密码 76 | * @param obj 77 | * @returns {*} 78 | * @constructor 79 | */ 80 | export function changePassword(id: string, params: any) { 81 | return axiosInstance({ 82 | url: userBaseUrl + id + '/change_password/', 83 | method: 'put', 84 | data: params 85 | }) 86 | } 87 | 88 | /** 89 | * 更新用户信息 90 | * @param obj 91 | * @returns {*} 92 | * @constructor 93 | */ 94 | export function updateUserInfo( params: any) { 95 | return axiosInstance({ 96 | url: userBaseUrl + 'update_user_info/', 97 | method: 'put', 98 | data: params 99 | }) 100 | } 101 | 102 | /** 103 | * 获取用户信息 104 | * @param obj 105 | * @returns {*} 106 | * @constructor 107 | */ 108 | export function getUserInfo( ) { 109 | return axiosInstance({ 110 | url: userBaseUrl + 'user_info/', 111 | method: 'get', 112 | data: {} 113 | }) 114 | } --------------------------------------------------------------------------------