From 6f15c2f6696a46cf2daac55de716284f2e32fba6 Mon Sep 17 00:00:00 2001 From: sheng <15292050171@163.com> Date: Tue, 10 Oct 2023 15:44:13 +0800 Subject: [PATCH 01/40] =?UTF-8?q?feat(=E9=83=A8=E9=97=A8=E7=AE=A1=E7=90=86?= =?UTF-8?q?):=20=E9=87=8D=E8=AE=BE=E5=AF=86=E7=A0=81=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/.env.development | 2 +- .../system/dept/components/DeptUserCom/api.ts | 16 +++-- .../dept/components/DeptUserCom/crud.tsx | 1 + .../dept/components/DeptUserCom/index.vue | 67 ++++++++++++++++++- 4 files changed, 78 insertions(+), 8 deletions(-) diff --git a/web/.env.development b/web/.env.development index 1c3ca5db3..c200ba42c 100644 --- a/web/.env.development +++ b/web/.env.development @@ -2,7 +2,7 @@ ENV = 'development' # 本地环境接口地址 -VITE_API_URL = 'http://127.0.0.1:8000' +VITE_API_URL = 'http://huge-dream.natapp1.cc/' # 是否启用按钮权限 VITE_PM_ENABLED = true diff --git a/web/src/views/system/dept/components/DeptUserCom/api.ts b/web/src/views/system/dept/components/DeptUserCom/api.ts index 561fa1044..28602c720 100644 --- a/web/src/views/system/dept/components/DeptUserCom/api.ts +++ b/web/src/views/system/dept/components/DeptUserCom/api.ts @@ -1,13 +1,13 @@ import { request, downloadFile } from '/@/utils/service'; import { PageQuery, AddReq, DelReq, EditReq, InfoReq } from '@fast-crud/fast-crud'; -type GetListType = PageQuery & { show_all: string } +type GetListType = PageQuery & { show_all: string }; export const apiPrefix = '/api/system/user/'; export function GetDept(query: PageQuery) { return request({ - url: "/api/system/dept/dept_lazy_tree/", + url: '/api/system/dept/dept_lazy_tree/', method: 'get', params: query, }); @@ -55,8 +55,8 @@ export function exportData(params: any) { return downloadFile({ url: apiPrefix + 'export_data/', params: params, - method: 'get' - }) + method: 'get', + }); } export function getDeptInfoById(id: string, type: string) { @@ -65,3 +65,11 @@ export function getDeptInfoById(id: string, type: string) { method: 'get', }); } + +export function resetPwd(id: number, data: { [key: string]: string }) { + return request({ + url: `/api/system/user/${id}/reset_password/`, + method: 'put', + data, + }); +} diff --git a/web/src/views/system/dept/components/DeptUserCom/crud.tsx b/web/src/views/system/dept/components/DeptUserCom/crud.tsx index 36bc11ba1..fb2e155af 100644 --- a/web/src/views/system/dept/components/DeptUserCom/crud.tsx +++ b/web/src/views/system/dept/components/DeptUserCom/crud.tsx @@ -103,6 +103,7 @@ export const createCrudOptions = function ({ crudExpose, context }: CreateCrudOp }, click: (ctx: any) => { const { row } = ctx; + context?.handleResetPwdOpen(row); }, }, }, diff --git a/web/src/views/system/dept/components/DeptUserCom/index.vue b/web/src/views/system/dept/components/DeptUserCom/index.vue index d05522d68..922a8fb23 100644 --- a/web/src/views/system/dept/components/DeptUserCom/index.vue +++ b/web/src/views/system/dept/components/DeptUserCom/index.vue @@ -43,16 +43,31 @@ 导入 + + + + + + + + + 取消 + 保存 + + + - - diff --git a/web/src/views/system/role/components/PermissionComCopy/api.ts b/web/src/views/system/role/components/PermissionComCopy/api.ts deleted file mode 100644 index 9d4c59002..000000000 --- a/web/src/views/system/role/components/PermissionComCopy/api.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { request } from "/@/utils/service"; - -export function getDataPermissionRange() { - return request({ - url: '/api/system/role_menu_button_permission/data_scope/', - method: 'get', - }) -} -export function getDataPermissionDept() { - return request({ - url: '/api/system/role_menu_button_permission/role_to_dept_all/', - method: 'get' - }) -} - -export function getDataPermissionMenu() { - return request({ - url: '/api/system/role_menu_button_permission/get_role_permissions/', - method: 'get' - }) -} \ No newline at end of file diff --git a/web/src/views/system/role/components/PermissionComCopy/index.vue b/web/src/views/system/role/components/PermissionComCopy/index.vue deleted file mode 100644 index 1d08e995c..000000000 --- a/web/src/views/system/role/components/PermissionComCopy/index.vue +++ /dev/null @@ -1,235 +0,0 @@ - - - - 数据授权 - - - {{ item.label }} - - - - - - - 菜单授权 - - - - - {{ node.label }} - - - - - - - - - - - - - - - - - - - - 确定 - 取消 - - - - - - - - - diff --git a/web/src/views/system/role/components/PermissionComCopy/types.ts b/web/src/views/system/role/components/PermissionComCopy/types.ts deleted file mode 100644 index 6abb63da1..000000000 --- a/web/src/views/system/role/components/PermissionComCopy/types.ts +++ /dev/null @@ -1,20 +0,0 @@ -export interface DataPermissionRangeType { - label: string; - value: number; -} - -export interface CustomDataPermissionDeptType { - id: number; - name: string; - patent: number; - children: CustomDataPermissionDeptType[] -} - -export interface CustomDataPermissionMenuType { - id: number; - name: string; - is_catalog: boolean; - menuPermission: { id: number; name: string; value: string }[] | null; - columns: { id: number; name: string; title: string }[] | null; - children: CustomDataPermissionMenuType[] -} \ No newline at end of file diff --git a/web/src/views/system/role/components/PermissionComNew/index.vue b/web/src/views/system/role/components/PermissionComNew/index.vue index 0e5d159ff..db6f332f9 100644 --- a/web/src/views/system/role/components/PermissionComNew/index.vue +++ b/web/src/views/system/role/components/PermissionComNew/index.vue @@ -1,6 +1,8 @@ + :before-close="handleDrawerClose" + :destroy-on-close="true" + > diff --git a/web/src/views/system/role/crud.tsx b/web/src/views/system/role/crud.tsx index b97878548..8c9f56a8c 100644 --- a/web/src/views/system/role/crud.tsx +++ b/web/src/views/system/role/crud.tsx @@ -183,40 +183,6 @@ export const createCrudOptions = function ({ value: 1, }, }, - admin: { - title: '是否管理员', - search: { show: false }, - type: 'dict-radio', - dict: dict({ - data: [ - { - label: '是', - value: true, - color: 'success', - }, - { - label: '否', - value: false, - color: 'danger', - }, - ], - }), - column: { - minWidth: 130, - sortable: 'custom', - show: columnPermission('admin', 'is_query'), - }, - addForm: { - show: columnPermission('admin', 'is_create'), - }, - editForm: { - show: columnPermission('admin', 'is_update'), - }, - form: { - rules: [{ required: true, message: '是否管理员必填' }], - value: false, - }, - }, status: { title: '状态', search: { show: true }, diff --git a/web/src/views/system/role/index.vue b/web/src/views/system/role/index.vue index 8e2ef4f4c..f5d40115d 100644 --- a/web/src/views/system/role/index.vue +++ b/web/src/views/system/role/index.vue @@ -18,7 +18,6 @@ import { useColumnPermission } from '/@/stores/columnPermission'; import { GetPermission } from './api'; import { useExpose, useCrud } from '@fast-crud/fast-crud'; import { createCrudOptions } from './crud'; -import permission from './components/PermissionCom/index.vue'; import PermissionComNew from './components/PermissionComNew/index.vue'; let drawerVisible = ref(false); -- Gitee From 4ac8ed7627fc4621e5132d83e54468382b54da3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8C=BF=E5=B0=8F=E5=A4=A9?= <1638245306@qq.com> Date: Mon, 20 Nov 2023 17:19:20 +0800 Subject: [PATCH 14/40] =?UTF-8?q?refactor:=20=E9=87=8D=E6=9E=84=E6=9D=83?= =?UTF-8?q?=E9=99=90=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1.更新字段管理 --- backend/dvadmin/system/models.py | 2 +- backend/dvadmin/system/urls.py | 4 +-- .../system/views/{column.py => menu_field.py} | 35 +++++++------------ backend/dvadmin/utils/field_permission.py | 10 +++--- backend/dvadmin/utils/models.py | 5 +-- backend/dvadmin/utils/viewset.py | 9 ++--- 6 files changed, 25 insertions(+), 40 deletions(-) rename backend/dvadmin/system/views/{column.py => menu_field.py} (72%) diff --git a/backend/dvadmin/system/models.py b/backend/dvadmin/system/models.py index 79eb23664..ea7224d5f 100644 --- a/backend/dvadmin/system/models.py +++ b/backend/dvadmin/system/models.py @@ -179,7 +179,7 @@ class Menu(CoreModel): ordering = ("sort",) class MenuField(CoreModel): - model = models.CharField(max_length=64, verbose_name='表名',null=True,blank=True) + model = models.CharField(max_length=64, verbose_name='表名') menu = models.ForeignKey(to='Menu', on_delete=models.CASCADE, verbose_name='菜单', db_constraint=False) field_name = models.CharField(max_length=64, verbose_name='模型表字段名') title = models.CharField(max_length=64, verbose_name='字段显示名') diff --git a/backend/dvadmin/system/urls.py b/backend/dvadmin/system/urls.py index 4e11c0492..512c39994 100644 --- a/backend/dvadmin/system/urls.py +++ b/backend/dvadmin/system/urls.py @@ -16,7 +16,7 @@ from dvadmin.system.views.role_menu import RoleMenuPermissionViewSet from dvadmin.system.views.role_menu_button_permission import RoleMenuButtonPermissionViewSet from dvadmin.system.views.system_config import SystemConfigViewSet from dvadmin.system.views.user import UserViewSet -from dvadmin.system.views.column import ColumnViewSet +from dvadmin.system.views.menu_field import MenuFieldViewSet system_url = routers.SimpleRouter() system_url.register(r'menu', MenuViewSet) @@ -33,7 +33,7 @@ system_url.register(r'system_config', SystemConfigViewSet) system_url.register(r'message_center', MessageCenterViewSet) system_url.register(r'role_menu_button_permission', RoleMenuButtonPermissionViewSet) system_url.register(r'role_menu_permission', RoleMenuPermissionViewSet) -system_url.register(r'column', ColumnViewSet) +system_url.register(r'column', MenuFieldViewSet) urlpatterns = [ diff --git a/backend/dvadmin/system/views/column.py b/backend/dvadmin/system/views/menu_field.py similarity index 72% rename from backend/dvadmin/system/views/column.py rename to backend/dvadmin/system/views/menu_field.py index 993be5258..8f6cd1aee 100644 --- a/backend/dvadmin/system/views/column.py +++ b/backend/dvadmin/system/views/menu_field.py @@ -11,7 +11,7 @@ from dvadmin.utils.serializers import CustomModelSerializer from dvadmin.utils.json_response import DetailResponse, ErrorResponse, SuccessResponse -class ColumnSerializer(CustomModelSerializer): +class MenuFieldSerializer(CustomModelSerializer): """ 列权限序列化器 """ @@ -22,32 +22,24 @@ class ColumnSerializer(CustomModelSerializer): read_only_fields = ['id'] -class ColumnViewSet(CustomModelViewSet): +class MenuFieldViewSet(CustomModelViewSet): """ 列权限视图集 """ queryset = MenuField.objects.all() - serializer_class = ColumnSerializer + serializer_class = MenuFieldSerializer def list(self, request, *args, **kwargs): - app_name = request.query_params.get('app') - model_name = request.query_params.get('model') menu = request.query_params.get('menu') if not menu: return SuccessResponse([]) queryset = self.filter_queryset(self.get_queryset().filter(menu=menu)) - # page = self.paginate_queryset(queryset) - # if page is not None: - # serializer = self.get_serializer(page, many=True, request=request) - # return self.get_paginated_response(serializer.data) serializer = self.get_serializer(queryset, many=True, request=request) return SuccessResponse(data=serializer.data, msg="获取成功") def create(self, request, *args, **kwargs): payload = request.data - print(11,get_custom_app_models()) for model in apps.get_models(): - print(model.__name__) if payload.get('model') == model.__name__: break else: @@ -62,34 +54,31 @@ class ColumnViewSet(CustomModelViewSet): def get_models(self, request): """获取所有项目app下的model""" res = [] - for app in get_custom_app_models(): - for model in app: - res.append({ - 'app': model['app'], - 'title': model['verbose'], - 'key': model['model'] - }) + for model in get_custom_app_models(): + res.append({ + 'app': model['app'], + 'title': model['verbose'], + 'key': model['model'] + }) return DetailResponse(res) @action(methods=['POST'], detail=False, permission_classes=[IsAuthenticated]) def auto_match_fields(self, request): """自动匹配已有的字段""" menu_id = request.data.get('menu') - app_name = request.data.get('app') model_name = request.data.get('model') - if not menu_id or not model_name or not app_name: + if not menu_id or not model_name: return ErrorResponse( msg='参数错误') - for model in get_custom_app_models(app_name): + for model in get_custom_app_models(): if model['model'] != model_name: continue for field in model['fields']: if MenuField.objects.filter( - menu_id=menu_id, app=app_name, model=model_name, field_name=field['name'] + menu_id=menu_id, model=model_name, field_name=field['name'] ).exists(): continue data = { 'menu': menu_id, - 'app': app_name, 'model': model_name, 'field_name': field['name'], 'title': str(field['title']), diff --git a/backend/dvadmin/utils/field_permission.py b/backend/dvadmin/utils/field_permission.py index 1c969a07e..20b4cb953 100644 --- a/backend/dvadmin/utils/field_permission.py +++ b/backend/dvadmin/utils/field_permission.py @@ -15,16 +15,14 @@ class FieldPermissionMixin: 获取字段权限 """ finded = False - for app in get_custom_app_models(): - for model in app: - if model['object'] is self.serializer_class.Meta.model: - finded = True - break + for model in get_custom_app_models(): + if model['object'] is self.serializer_class.Meta.model: + finded = True + break if finded: break if finded is False: return [] - print(266666,model) user = request.user if user.is_superuser==1: data = MenuField.objects.filter( model=model['model']).values('field_name') diff --git a/backend/dvadmin/utils/models.py b/backend/dvadmin/utils/models.py index 8ea800723..e33152808 100644 --- a/backend/dvadmin/utils/models.py +++ b/backend/dvadmin/utils/models.py @@ -141,6 +141,7 @@ def get_custom_app_models(app_name=None): return get_model_from_app(app_name) res = [] for app in settings.CUSTOM_APPS: - # print(222,get_model_from_app(app)) - res.append(get_model_from_app(app)) + all_models = get_model_from_app(app) + for model in all_models: + res.append(model) return res diff --git a/backend/dvadmin/utils/viewset.py b/backend/dvadmin/utils/viewset.py index 6b47457ea..a20b9be26 100644 --- a/backend/dvadmin/utils/viewset.py +++ b/backend/dvadmin/utils/viewset.py @@ -82,12 +82,9 @@ class CustomModelViewSet(ModelViewSet, ImportSerializerMixin, ExportSerializerMi def get_menu_field(self, serializer_class): """获取字段权限""" finded = False - for app in get_custom_app_models(): - for model in app: - if model['object'] is serializer_class.Meta.model: - finded = True - break - if finded: + for model in get_custom_app_models(): + if model['object'] is serializer_class.Meta.model: + finded = True break if finded is False: return [] -- Gitee From 645f43c887bc660e9c0457cf8052aaf8381faaec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8C=BF=E5=B0=8F=E5=A4=A9?= <1638245306@qq.com> Date: Mon, 20 Nov 2023 19:03:14 +0800 Subject: [PATCH 15/40] =?UTF-8?q?refactor:=20=E9=87=8D=E6=9E=84=E6=9D=83?= =?UTF-8?q?=E9=99=90=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1.更新字段管理 --- .../menu/components/MenuFieldCom/api.ts | 65 +++++ .../menu/components/MenuFieldCom/crud.tsx | 228 ++++++++++++++++++ .../menu/components/MenuFieldCom/index.vue | 110 +++++++++ 3 files changed, 403 insertions(+) create mode 100644 web/src/views/system/menu/components/MenuFieldCom/api.ts create mode 100644 web/src/views/system/menu/components/MenuFieldCom/crud.tsx create mode 100644 web/src/views/system/menu/components/MenuFieldCom/index.vue diff --git a/web/src/views/system/menu/components/MenuFieldCom/api.ts b/web/src/views/system/menu/components/MenuFieldCom/api.ts new file mode 100644 index 000000000..eccde5558 --- /dev/null +++ b/web/src/views/system/menu/components/MenuFieldCom/api.ts @@ -0,0 +1,65 @@ +import { request } from '/@/utils/service'; +import { UserPageQuery, AddReq, DelReq, EditReq, InfoReq } from '@fast-crud/fast-crud'; +import XEUtils from "xe-utils"; +import {CurrentInfoType} from "/@/views/system/columns/types"; + +export const apiPrefix = '/api/system/column/'; +export function GetList(query: UserPageQuery) { + return request({ + url: apiPrefix, + method: 'get', + params: query, + }); +} +export function GetObj(id: InfoReq) { + return request({ + url: apiPrefix + id, + method: 'get', + }); +} + +export function AddObj(obj: AddReq) { + return request({ + url: apiPrefix, + method: 'post', + data: obj, + }); +} + +export function UpdateObj(obj: EditReq) { + return request({ + url: apiPrefix + obj.id + '/', + method: 'put', + data: obj, + }); +} + +export function DelObj(id: DelReq) { + return request({ + url: apiPrefix + id + '/', + method: 'delete', + data: { id }, + }); +} + +/** + * 获取所有model + */ +export function getModelList() { + return request({ + url: '/api/system/column/get_models/', + method: 'get', + }); +} + +/** + * 自动匹配field + * @param data + */ +export function automatchColumnsData(data: CurrentInfoType) { + return request({ + url: '/api/system/column/auto_match_fields/', + method: 'post', + data, + }); +} diff --git a/web/src/views/system/menu/components/MenuFieldCom/crud.tsx b/web/src/views/system/menu/components/MenuFieldCom/crud.tsx new file mode 100644 index 000000000..a99a1a40d --- /dev/null +++ b/web/src/views/system/menu/components/MenuFieldCom/crud.tsx @@ -0,0 +1,228 @@ +import * as api from './api'; +import { dict, UserPageQuery, AddReq, DelReq, EditReq, compute, CreateCrudOptionsProps, CreateCrudOptionsRet } from '@fast-crud/fast-crud'; +import { request } from '/@/utils/service'; +import { dictionary } from '/@/utils/dictionary'; + +import { inject } from 'vue'; + + + +export const createCrudOptions = function ({ crudExpose, props,modelDialog,selectOptions,allModelData }: CreateCrudOptionsProps): CreateCrudOptionsRet { + const pageRequest = async (query: UserPageQuery) => { + // return await api.GetList(query); + if (selectOptions.value.id) { + return await api.GetList({ menu: selectOptions.value.id } as any); + } else { + return undefined; + } + }; + const editRequest = async ({ form, row }: EditReq) => { + form.id = row.id; + return await api.UpdateObj(form); + }; + const delRequest = async ({ row }: DelReq) => { + return await api.DelObj(row.id); + }; + const addRequest = async ({ form }: AddReq) => { + form.menu = selectOptions.value.id; + return await api.AddObj(form); + }; + + + + //权限判定 + const hasPermissions = inject('$hasPermissions'); + + return { + crudOptions: { + request: { + pageRequest, + addRequest, + editRequest, + delRequest, + }, + pagination: { + show: false, + }, + actionbar: { + buttons: { + auto: { + text: '自动匹配', + type: 'success', + click: () => { + return modelDialog.value=true; + }, + }, + }, + }, + rowHandle: { + //固定右侧 + fixed: 'right', + }, + form: { + col: { span: 24 }, + labelWidth: '110px', + wrapper: { + is: 'el-dialog', + width: '600px', + }, + }, + columns: { + _index: { + title: '序号', + form: { show: false }, + column: { + //type: 'index', + align: 'center', + width: '70px', + columnSetDisabled: true, //禁止在列设置中选择 + //@ts-ignore + formatter: (context) => { + //计算序号,你可以自定义计算规则,此处为翻页累加 + let index = context.index ?? 1; + let pagination: any = crudExpose!.crudBinding.value.pagination; + return ((pagination.currentPage ?? 1) - 1) * pagination.pageSize + index + 1; + }, + }, + }, + model: { + title: 'model', + type: 'dict-select', + dict:dict({ + url:'/api/system/column/get_models/', + label:'title', + value:'key' + }), + form: { + rules: [ + // 表单校验规则 + { + required: true, + message: '必填项', + }, + ], + component: { + span: 12, + }, + }, + }, + title: { + title: '中文名', + sortable: 'custom', + search: { + show: true, + }, + type: 'text', + form: { + rules: [ + // 表单校验规则 + { + required: true, + message: '必填项', + }, + ], + component: { + span: 12, + }, + }, + }, + field_name: { + title: '字段名', + type: 'text', + search: { + show: true, + }, + form: { + rules: [ + // 表单校验规则 + { + required: true, + message: '必填项', + }, + ], + component: { + span: 12, + }, + }, + }, + + // is_create: { + // title: '创建时显示', + // sortable: 'custom', + // search: { + // disabled: true, + // }, + // type: 'dict-switch', + // dict: dict({ + // data: [ + // { value: true, label: '启用' }, + // { value: false, label: '禁用' }, + // ], + // }), + // form: { + // value: true, + // }, + // column: { + // valueChange(context){ + // return api.UpdateObj(context.row) + // }, + // component: { + // name: 'fs-dict-switch', + // }, + // }, + // }, + // is_update: { + // title: '编辑时显示', + // search: { + // show: true, + // }, + // type: 'dict-switch', + // dict: dict({ + // data: [ + // { value: true, label: '启用' }, + // { value: false, label: '禁用' }, + // ], + // }), + // form: { + // value: true, + // }, + // column: { + // component: { + // name: 'fs-dict-switch', + // onChange: compute((context) => { + // //动态onChange方法测试 + // return () => { + // console.log('onChange', context.row.switch); + // }; + // }), + // }, + // }, + // }, + // is_query: { + // title: '列表中显示', + // type: 'dict-switch', + // dict: dict({ + // data: [ + // { value: true, label: '启用' }, + // { value: false, label: '禁用' }, + // ], + // }), + // form: { + // value: true, + // }, + // column: { + // component: { + // name: 'fs-dict-switch', + // onChange: compute((context) => { + // //动态onChange方法测试 + // return () => { + // console.log('onChange', context.row.switch); + // }; + // }), + // }, + // }, + // }, + }, + }, + }; +}; diff --git a/web/src/views/system/menu/components/MenuFieldCom/index.vue b/web/src/views/system/menu/components/MenuFieldCom/index.vue new file mode 100644 index 000000000..ec3822bb0 --- /dev/null +++ b/web/src/views/system/menu/components/MenuFieldCom/index.vue @@ -0,0 +1,110 @@ + + + + + 已选择:{{ props.model }} + + + + + {{ item.app + '--' + item.title + '(' + item.key + ')' }} + + + + + + 取消 + + 确定 + + + + + + + + + + + + + + + -- Gitee From 54e4d23cf725efda483302346776ba5f310ff70f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8C=BF=E5=B0=8F=E5=A4=A9?= <1638245306@qq.com> Date: Tue, 21 Nov 2023 14:21:08 +0800 Subject: [PATCH 16/40] =?UTF-8?q?refactor:=20=E9=87=8D=E6=9E=84=E6=9D=83?= =?UTF-8?q?=E9=99=90=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1.更新字段管理 --- web/src/views/system/menu/index.vue | 4 ++-- web/src/views/system/role/crud.tsx | 7 +++++++ web/src/views/system/user/crud.tsx | 1 - 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/web/src/views/system/menu/index.vue b/web/src/views/system/menu/index.vue index aea35292f..0637a3fe7 100644 --- a/web/src/views/system/menu/index.vue +++ b/web/src/views/system/menu/index.vue @@ -15,12 +15,12 @@ - + - + diff --git a/web/src/views/system/role/crud.tsx b/web/src/views/system/role/crud.tsx index 8c9f56a8c..f8916507b 100644 --- a/web/src/views/system/role/crud.tsx +++ b/web/src/views/system/role/crud.tsx @@ -47,6 +47,13 @@ export const createCrudOptions = function ({ editRequest, delRequest, }, + actionbar: { + buttons: { + add: { + show: hasPermissions('role:Create') + } + } + }, rowHandle: { //固定右侧 fixed: 'right', diff --git a/web/src/views/system/user/crud.tsx b/web/src/views/system/user/crud.tsx index d165f696b..2165cf4b6 100644 --- a/web/src/views/system/user/crud.tsx +++ b/web/src/views/system/user/crud.tsx @@ -44,7 +44,6 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp buttons: { add: { show: hasPermissions('user:Create') - // show:true }, export:{ text:"导出",//按钮文字 -- Gitee From 0286ca003fe826f71b71be835ee49a76decbfc6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BC=BA?= <1206709430@qq.com> Date: Tue, 21 Nov 2023 16:01:42 +0800 Subject: [PATCH 17/40] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0.gitignore?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/.gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/backend/.gitignore b/backend/.gitignore index 047099f90..6c50cc968 100644 --- a/backend/.gitignore +++ b/backend/.gitignore @@ -98,5 +98,4 @@ media/ __pypackages__/ package-lock.json gunicorn.pid -plugins/* !plugins/__init__.py -- Gitee From c04b33ed316d585ffb40c32b26ae93dbac12d4db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8C=BF=E5=B0=8F=E5=A4=A9?= <1638245306@qq.com> Date: Tue, 21 Nov 2023 17:51:19 +0800 Subject: [PATCH 18/40] =?UTF-8?q?refactor:=20=E9=87=8D=E6=9E=84=E6=9D=83?= =?UTF-8?q?=E9=99=90=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1.更新字段管理 --- backend/dvadmin/system/fixtures/initSerializer.py | 2 +- backend/dvadmin/system/fixtures/init_role.json | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/backend/dvadmin/system/fixtures/initSerializer.py b/backend/dvadmin/system/fixtures/initSerializer.py index fc701bc7c..a2d74f653 100644 --- a/backend/dvadmin/system/fixtures/initSerializer.py +++ b/backend/dvadmin/system/fixtures/initSerializer.py @@ -128,7 +128,7 @@ class RoleInitSerializer(CustomModelSerializer): class Meta: model = Role - fields = ['name', 'key', 'sort', 'status', 'admin', + fields = ['name', 'key', 'sort', 'status', 'creator', 'dept_belong_id'] read_only_fields = ["id"] extra_kwargs = { diff --git a/backend/dvadmin/system/fixtures/init_role.json b/backend/dvadmin/system/fixtures/init_role.json index 6fb63fe10..f1678e57f 100644 --- a/backend/dvadmin/system/fixtures/init_role.json +++ b/backend/dvadmin/system/fixtures/init_role.json @@ -4,7 +4,6 @@ "key": "admin", "sort": 1, "status": true, - "admin": true, "remark": null }, { @@ -12,7 +11,6 @@ "key": "public", "sort": 2, "status": true, - "admin": true, "remark": null } ] -- Gitee From 6045312f7ebcdd96673237208142d9011c998a68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8C=BF=E5=B0=8F=E5=A4=A9?= <1638245306@qq.com> Date: Tue, 21 Nov 2023 19:22:00 +0800 Subject: [PATCH 19/40] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dvadmin/system/fixtures/init_menu.json | 98 ------------------- 1 file changed, 98 deletions(-) diff --git a/backend/dvadmin/system/fixtures/init_menu.json b/backend/dvadmin/system/fixtures/init_menu.json index 9d514fe54..2c26ccc61 100644 --- a/backend/dvadmin/system/fixtures/init_menu.json +++ b/backend/dvadmin/system/fixtures/init_menu.json @@ -82,46 +82,6 @@ } ] }, - { - "name": "菜单按钮", - "icon": "dot-circle-o", - "sort": 2, - "is_link": false, - "is_catalog": false, - "web_path": "/menuButton", - "component": "system/menuButton/index", - "component_name": "menuButton", - "status": true, - "cache": false, - "visible": false, - "children": [], - "menu_button": [ - { - "name": "查询", - "value": "menu_button:Search", - "api": "/api/system/menu_button/", - "method": 0 - }, - { - "name": "新增", - "value": "menu_button:Create", - "api": "/api/system/menu_button/", - "method": 1 - }, - { - "name": "编辑", - "value": "menu_button:Update", - "api": "/api/system/menu_button/{id}/", - "method": 2 - }, - { - "name": "删除", - "value": "menu_button:Delete", - "api": "/api/system/menu_button/{id}/", - "method": 3 - } - ] - }, { "name": "部门管理", "icon": "ele-OfficeBuilding", @@ -250,64 +210,6 @@ } ] }, - { - "name": "列管理", - "icon": "iconfont icon-bolangneng", - "sort": 5, - "is_link": false, - "is_catalog": false, - "web_path": "/columns", - "component": "system/columns/index", - "component_name": "columns", - "status": true, - "cache": false, - "visible": true, - "children": [], - "menu_button": [ - { - "name": "查询", - "value": "column:Search", - "api": "/api/system/column/", - "method": 0 - }, - { - "name": "详情", - "value": "column:Retrieve", - "api": "/api/system/column/{id}/", - "method": 0 - }, - { - "name": "新增", - "value": "column:Create", - "api": "/api/system/column/", - "method": 1 - }, - { - "name": "编辑", - "value": "column:Update", - "api": "/api/system/column/{id}/", - "method": 2 - }, - { - "name": "删除", - "value": "column:Delete", - "api": "/api/system/column/{id}/", - "method": 3 - }, - { - "name": "所有模型表", - "value": "column:AllModel", - "api": "/api/system/column/get_models/", - "method": 0 - }, - { - "name": "自动匹配所有字段", - "value": "column:AutoMatch", - "api": "/api/system/column/auto_match_fields/", - "method": 1 - } - ] - }, { "name": "用户管理", "icon": "iconfont icon-icon-", -- Gitee From fb8b0a5ac6f87e5adf2ac1b6e6cc80357447df15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8C=BF=E5=B0=8F=E5=A4=A9?= <1638245306@qq.com> Date: Tue, 21 Nov 2023 21:21:58 +0800 Subject: [PATCH 20/40] =?UTF-8?q?refactor:=20=E9=87=8D=E6=9E=84=E6=9D=83?= =?UTF-8?q?=E9=99=90=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1.更新字段管理 --- .../views/system/dept/components/DeptFormCom/index.vue | 2 +- .../views/system/dept/components/DeptUserCom/crud.tsx | 1 - .../views/system/dept/components/DeptUserCom/index.vue | 2 +- web/src/views/system/messageCenter/crud.tsx | 9 +++++++++ 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/web/src/views/system/dept/components/DeptFormCom/index.vue b/web/src/views/system/dept/components/DeptFormCom/index.vue index f28851f82..445069b14 100644 --- a/web/src/views/system/dept/components/DeptFormCom/index.vue +++ b/web/src/views/system/dept/components/DeptFormCom/index.vue @@ -19,7 +19,7 @@ - + diff --git a/web/src/views/system/dept/components/DeptUserCom/crud.tsx b/web/src/views/system/dept/components/DeptUserCom/crud.tsx index 0eaa096e7..afeaf9ae1 100644 --- a/web/src/views/system/dept/components/DeptUserCom/crud.tsx +++ b/web/src/views/system/dept/components/DeptUserCom/crud.tsx @@ -266,7 +266,6 @@ export const createCrudOptions = function ({ crudExpose, context }: CreateCrudOp url: '/api/system/role/', value: 'id', label: 'name', - isTree: true, getData: async ({ url }: { url: string }) => { return request({ url: url, diff --git a/web/src/views/system/dept/components/DeptUserCom/index.vue b/web/src/views/system/dept/components/DeptUserCom/index.vue index 922a8fb23..6538f204b 100644 --- a/web/src/views/system/dept/components/DeptUserCom/index.vue +++ b/web/src/views/system/dept/components/DeptUserCom/index.vue @@ -251,10 +251,10 @@ const handleResetPwdSubmit = async () => { }; onMounted(() => { - crudExpose.doRefresh(); deptCountChart = init(deptCountBar.value as HTMLElement); deptSexChart = init(deptSexPie.value as HTMLElement); getDeptInfo(); + crudExpose.doRefresh(); }); defineExpose({ diff --git a/web/src/views/system/messageCenter/crud.tsx b/web/src/views/system/messageCenter/crud.tsx index aebef1e8f..427e69923 100644 --- a/web/src/views/system/messageCenter/crud.tsx +++ b/web/src/views/system/messageCenter/crud.tsx @@ -47,6 +47,15 @@ export const createCrudOptions = function ({ crudExpose, tabActivted }: { crudEx editRequest, delRequest, }, + actionbar:{ + buttons:{ + add:{ + show:computed(() =>{ + return tabActivted.value !== 'receive' + }) + }, + } + }, rowHandle: { fixed:'right', width:150, -- Gitee From dd2dcd4ad1232d458211d24cfdc51fa031021acb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BC=BA?= <1206709430@qq.com> Date: Wed, 22 Nov 2023 17:52:39 +0800 Subject: [PATCH 21/40] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96docker?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker_env/web/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker_env/web/Dockerfile b/docker_env/web/Dockerfile index 7f7fc2b52..9d465d100 100644 --- a/docker_env/web/Dockerfile +++ b/docker_env/web/Dockerfile @@ -1,7 +1,7 @@ FROM registry.cn-zhangjiakou.aliyuncs.com/dvadmin-pro/dvadmin3-base-web:16.19-alpine WORKDIR /web/ COPY web/. . -RUN yarn install +RUN yarn install --registry=https://registry.npm.taobao.org RUN yarn build FROM nginx:alpine -- Gitee From 0131d31808ba56c05981045133b79a1d3a06e971 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BC=BA?= <1206709430@qq.com> Date: Wed, 22 Nov 2023 21:58:10 +0800 Subject: [PATCH 22/40] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96docker?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker_env/nginx/my.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker_env/nginx/my.conf b/docker_env/nginx/my.conf index 30fa2108d..e1db0b7a2 100644 --- a/docker_env/nginx/my.conf +++ b/docker_env/nginx/my.conf @@ -28,6 +28,6 @@ server { proxy_send_timeout 600s; real_ip_header X-Forwarded-For; rewrite ^/api/(.*)$ /$1 break; #重写 - proxy_pass http://177.8.0.12:8000/; # 设置代理服务器的协议和地址 + proxy_pass http://177.10.0.12:8000/; # 设置代理服务器的协议和地址 } } -- Gitee From 2baba8e36f11146a973d2c99d6324fd46769a2dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BC=BA?= <1206709430@qq.com> Date: Thu, 23 Nov 2023 16:19:35 +0800 Subject: [PATCH 23/40] =?UTF-8?q?feat:=20=E7=89=88=E6=9C=AC=E5=8D=87?= =?UTF-8?q?=E7=BA=A7=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/package.json | 2 +- web/src/i18n/lang/en.ts | 248 ++++++++++++++------------- web/src/i18n/lang/zh-cn.ts | 272 ++++++++++++++++-------------- web/src/i18n/pages/login/zh-cn.ts | 2 +- web/src/layout/upgrade/index.vue | 8 +- 5 files changed, 275 insertions(+), 257 deletions(-) diff --git a/web/package.json b/web/package.json index 807cd61bd..43b7cb8e5 100644 --- a/web/package.json +++ b/web/package.json @@ -62,7 +62,7 @@ "@typescript-eslint/parser": "^5.46.0", "@vitejs/plugin-vue": "^4.0.0", "@vue/compiler-sfc": "^3.2.45", - "eslint": "^8.29.0", + "eslint": "^8.54.0", "eslint-plugin-vue": "^9.8.0", "prettier": "^2.8.1", "sass": "^1.56.2", diff --git a/web/src/i18n/lang/en.ts b/web/src/i18n/lang/en.ts index 3b6541b60..721897587 100644 --- a/web/src/i18n/lang/en.ts +++ b/web/src/i18n/lang/en.ts @@ -1,123 +1,131 @@ // 定义内容 export default { - router: { - home: 'home', - system: 'system', - systemMenu: 'systemMenu', - systemRole: 'systemRole', - systemUser: 'systemUser', - systemDept: 'systemDept', - systemDic: 'systemDic', - limits: 'limits', - limitsFrontEnd: 'FrontEnd', - limitsFrontEndPage: 'FrontEndPage', - limitsFrontEndBtn: 'FrontEndBtn', - limitsBackEnd: 'BackEnd', - limitsBackEndEndPage: 'BackEndEndPage', - personal: 'personal', - }, - staticRoutes: { - signIn: 'signIn', - notFound: 'notFound', - noPower: 'noPower', - }, - user: { - title0: 'Component size', - title1: 'Language switching', - title2: 'Menu search', - title3: 'Layout configuration', - title4: 'news', - title5: 'Full screen on', - title6: 'Full screen off', - dropdownLarge: 'large', - dropdownDefault: 'default', - dropdownSmall: 'small', - dropdown1: 'home page', - dropdown2: 'Personal Center', - dropdown3: '404', - dropdown4: '401', - dropdown5: 'Log out', - dropdown6: 'Code warehouse', - searchPlaceholder: 'Menu search: support Chinese, routing path', - newTitle: 'notice', - newBtn: 'All read', - newGo: 'Go to the notification center', - newDesc: 'No notice', - logOutTitle: 'Tips', - logOutMessage: 'This operation will log out. Do you want to continue?', - logOutConfirm: 'determine', - logOutCancel: 'cancel', - logOutExit: 'Exiting', - }, - tagsView: { - refresh: 'refresh', - close: 'close', - closeOther: 'closeOther', - closeAll: 'closeAll', - fullscreen: 'fullscreen', - closeFullscreen: 'closeFullscreen', - }, - notFound: { - foundTitle: 'Wrong address input, please re-enter the address~', - foundMsg: 'You can check the web address first, and then re-enter or give us feedback.', - foundBtn: 'Back to home page', - }, - noAccess: { - accessTitle: 'You are not authorized to operate~', - accessMsg: 'Contact information: add QQ group discussion 665452019', - accessBtn: 'Reauthorization', - }, - layout: { - configTitle: 'Layout configuration', - oneTitle: 'Global Themes', - twoTopTitle: 'top bar set up', - twoMenuTitle: 'Menu set up', - twoColumnsTitle: 'Columns set up', - twoTopBar: 'Top bar background', - twoTopBarColor: 'Top bar default font color', - twoIsTopBarColorGradual: 'Top bar gradient', - twoMenuBar: 'Menu background', - twoMenuBarColor: 'Menu default font color', - twoIsMenuBarColorGradual: 'Menu gradient', - twoColumnsMenuBar: 'Column menu background', - twoColumnsMenuBarColor: 'Default font color bar menu', - twoIsColumnsMenuBarColorGradual: 'Column gradient', - threeTitle: 'Interface settings', - threeIsCollapse: 'Menu horizontal collapse', - threeIsUniqueOpened: 'Menu accordion', - threeIsFixedHeader: 'Fixed header', - threeIsClassicSplitMenu: 'Classic layout split menu', - threeIsLockScreen: 'Open the lock screen', - threeLockScreenTime: 'screen locking(s/s)', - fourTitle: 'Interface display', - fourIsShowLogo: 'Sidebar logo', - fourIsBreadcrumb: 'Open breadcrumb', - fourIsBreadcrumbIcon: 'Open breadcrumb icon', - fourIsTagsview: 'Open tagsview', - fourIsTagsviewIcon: 'Open tagsview Icon', - fourIsCacheTagsView: 'Enable tagsview cache', - fourIsSortableTagsView: 'Enable tagsview drag', - fourIsShareTagsView: 'Enable tagsview sharing', - fourIsFooter: 'Open footer', - fourIsGrayscale: 'Grey model', - fourIsInvert: 'Color weak mode', - fourIsDark: 'Dark Mode', - fourIsWartermark: 'Turn on watermark', - fourWartermarkText: 'Watermark copy', - fiveTitle: 'Other settings', - fiveTagsStyle: 'Tagsview style', - fiveAnimation: 'page animation', - fiveColumnsAsideStyle: 'Column style', - fiveColumnsAsideLayout: 'Column layout', - sixTitle: 'Layout switch', - sixDefaults: 'One', - sixClassic: 'Two', - sixTransverse: 'Three', - sixColumns: 'Four', - tipText: 'Click the button below to copy the layout configuration to `/src/stores/themeConfig.ts` It has been modified in.', - copyText: 'replication configuration', - resetText: 'restore default', - copyTextSuccess: 'Copy succeeded!', - copyTextError: 'Copy failed!', - }, + router: { + home: 'home', + system: 'system', + systemMenu: 'systemMenu', + systemRole: 'systemRole', + systemUser: 'systemUser', + systemDept: 'systemDept', + systemDic: 'systemDic', + limits: 'limits', + limitsFrontEnd: 'FrontEnd', + limitsFrontEndPage: 'FrontEndPage', + limitsFrontEndBtn: 'FrontEndBtn', + limitsBackEnd: 'BackEnd', + limitsBackEndEndPage: 'BackEndEndPage', + personal: 'personal', + }, + staticRoutes: { + signIn: 'signIn', + notFound: 'notFound', + noPower: 'noPower', + }, + user: { + title0: 'Component size', + title1: 'Language switching', + title2: 'Menu search', + title3: 'Layout configuration', + title4: 'news', + title5: 'Full screen on', + title6: 'Full screen off', + dropdownLarge: 'large', + dropdownDefault: 'default', + dropdownSmall: 'small', + dropdown1: 'home page', + dropdown2: 'Personal Center', + dropdown3: '404', + dropdown4: '401', + dropdown5: 'Log out', + dropdown6: 'Code warehouse', + searchPlaceholder: 'Menu search: support Chinese, routing path', + newTitle: 'notice', + newBtn: 'All read', + newGo: 'Go to the notification center', + newDesc: 'No notice', + logOutTitle: 'Tips', + logOutMessage: 'This operation will log out. Do you want to continue?', + logOutConfirm: 'determine', + logOutCancel: 'cancel', + logOutExit: 'Exiting', + }, + tagsView: { + refresh: 'refresh', + close: 'close', + closeOther: 'closeOther', + closeAll: 'closeAll', + fullscreen: 'fullscreen', + closeFullscreen: 'closeFullscreen', + }, + notFound: { + foundTitle: 'Wrong address input, please re-enter the address~', + foundMsg: 'You can check the web address first, and then re-enter or give us feedback.', + foundBtn: 'Back to home page', + }, + noAccess: { + accessTitle: 'You are not authorized to operate~', + accessMsg: 'Contact information: add QQ group discussion 665452019', + accessBtn: 'Reauthorization', + }, + layout: { + configTitle: 'Layout configuration', + oneTitle: 'Global Themes', + twoTopTitle: 'top bar set up', + twoMenuTitle: 'Menu set up', + twoColumnsTitle: 'Columns set up', + twoTopBar: 'Top bar background', + twoTopBarColor: 'Top bar default font color', + twoIsTopBarColorGradual: 'Top bar gradient', + twoMenuBar: 'Menu background', + twoMenuBarColor: 'Menu default font color', + twoIsMenuBarColorGradual: 'Menu gradient', + twoColumnsMenuBar: 'Column menu background', + twoColumnsMenuBarColor: 'Default font color bar menu', + twoIsColumnsMenuBarColorGradual: 'Column gradient', + threeTitle: 'Interface settings', + threeIsCollapse: 'Menu horizontal collapse', + threeIsUniqueOpened: 'Menu accordion', + threeIsFixedHeader: 'Fixed header', + threeIsClassicSplitMenu: 'Classic layout split menu', + threeIsLockScreen: 'Open the lock screen', + threeLockScreenTime: 'screen locking(s/s)', + fourTitle: 'Interface display', + fourIsShowLogo: 'Sidebar logo', + fourIsBreadcrumb: 'Open breadcrumb', + fourIsBreadcrumbIcon: 'Open breadcrumb icon', + fourIsTagsview: 'Open tagsview', + fourIsTagsviewIcon: 'Open tagsview Icon', + fourIsCacheTagsView: 'Enable tagsview cache', + fourIsSortableTagsView: 'Enable tagsview drag', + fourIsShareTagsView: 'Enable tagsview sharing', + fourIsFooter: 'Open footer', + fourIsGrayscale: 'Grey model', + fourIsInvert: 'Color weak mode', + fourIsDark: 'Dark Mode', + fourIsWartermark: 'Turn on watermark', + fourWartermarkText: 'Watermark copy', + fiveTitle: 'Other settings', + fiveTagsStyle: 'Tagsview style', + fiveAnimation: 'page animation', + fiveColumnsAsideStyle: 'Column style', + fiveColumnsAsideLayout: 'Column layout', + sixTitle: 'Layout switch', + sixDefaults: 'One', + sixClassic: 'Two', + sixTransverse: 'Three', + sixColumns: 'Four', + tipText: 'Click the button below to copy the layout configuration to `/src/stores/themeConfig.ts` It has been modified in.', + copyText: 'replication configuration', + resetText: 'restore default', + copyTextSuccess: 'Copy succeeded!', + copyTextError: 'Copy failed!', + }, + upgrade: { + title: 'New version upgrade', + msg: 'It\'s a new version. Update it now!Don\'t worry, update quickly oh!', + desc: 'Tip: The update restores the default configuration', + btnOne: 'Cruel refusal', + btnTwo: 'Update now', + btnTwoLoading: 'updating', + }, }; diff --git a/web/src/i18n/lang/zh-cn.ts b/web/src/i18n/lang/zh-cn.ts index 567cb9aaf..6fc6ef3dc 100644 --- a/web/src/i18n/lang/zh-cn.ts +++ b/web/src/i18n/lang/zh-cn.ts @@ -1,134 +1,144 @@ // 定义内容 export default { - router: { - home: '首页', - system: '系统管理', - config: '常规配置', - log: '日志管理', - /* 常规配置 */ - configSystem: '系统配置', - configDict: '字典管理', - configArea: '地区管理', - configFile: '附件管理', - /* 系统管理 */ - systemMenu: '菜单管理', - systemRole: '角色管理', - systemUser: '用户管理', - systemDept: '部门管理', - /* 日志管理 */ - loginLog: '登录日志', - operationLog: '操作日志', - systemApiWhiteList: '接口白名单', - limits: '权限管理', - limitsFrontEnd: '前端控制', - limitsFrontEndPage: '页面权限', - limitsFrontEndBtn: '按钮权限', - limitsBackEnd: '后端控制', - limitsBackEndEndPage: '页面权限', - personal: '个人中心', - }, - staticRoutes: { - signIn: '登录', - notFound: '找不到此页面', - noPower: '没有权限', - }, - user: { - title0: '组件大小', - title1: '语言切换', - title2: '菜单搜索', - title3: '布局配置', - title4: '消息', - title5: '开全屏', - title6: '关全屏', - dropdownLarge: '大型', - dropdownDefault: '默认', - dropdownSmall: '小型', - dropdown1: '首页', - dropdown2: '个人中心', - dropdown3: '404', - dropdown4: '401', - dropdown5: '退出登录', - dropdown6: '代码仓库', - searchPlaceholder: '菜单搜索:支持中文、路由路径', - newTitle: '通知', - newBtn: '全部已读', - newGo: '前往通知中心', - newDesc: '暂无通知', - logOutTitle: '提示', - logOutMessage: '此操作将退出登录, 是否继续?', - logOutConfirm: '确定', - logOutCancel: '取消', - logOutExit: '退出中', - }, - tagsView: { - refresh: '刷新', - close: '关闭', - closeOther: '关闭其它', - closeAll: '全部关闭', - fullscreen: '当前页全屏', - closeFullscreen: '关闭全屏', - }, - notFound: { - foundTitle: '地址输入错误,请重新输入地址~', - foundMsg: '您可以先检查网址,然后重新输入或给我们反馈问题。', - foundBtn: '返回首页', - }, - noAccess: { - accessTitle: '您未被授权,没有操作权限~', - accessMsg: '联系方式:加QQ群探讨 665452019', - accessBtn: '重新授权', - }, - layout: { - configTitle: '布局配置', - oneTitle: '全局主题', - twoTopTitle: '顶栏设置', - twoMenuTitle: '菜单设置', - twoColumnsTitle: '分栏设置', - twoTopBar: '顶栏背景', - twoTopBarColor: '顶栏默认字体颜色', - twoIsTopBarColorGradual: '顶栏背景渐变', - twoMenuBar: '菜单背景', - twoMenuBarColor: '菜单默认字体颜色', - twoIsMenuBarColorGradual: '菜单背景渐变', - twoColumnsMenuBar: '分栏菜单背景', - twoColumnsMenuBarColor: '分栏菜单默认字体颜色', - twoIsColumnsMenuBarColorGradual: '分栏菜单背景渐变', - threeTitle: '界面设置', - threeIsCollapse: '菜单水平折叠', - threeIsUniqueOpened: '菜单手风琴', - threeIsFixedHeader: '固定 Header', - threeIsClassicSplitMenu: '经典布局分割菜单', - threeIsLockScreen: '开启锁屏', - threeLockScreenTime: '自动锁屏(s/秒)', - fourTitle: '界面显示', - fourIsShowLogo: '侧边栏 Logo', - fourIsBreadcrumb: '开启 Breadcrumb', - fourIsBreadcrumbIcon: '开启 Breadcrumb 图标', - fourIsTagsview: '开启 Tagsview', - fourIsTagsviewIcon: '开启 Tagsview 图标', - fourIsCacheTagsView: '开启 TagsView 缓存', - fourIsSortableTagsView: '开启 TagsView 拖拽', - fourIsShareTagsView: '开启 TagsView 共用', - fourIsFooter: '开启 Footer', - fourIsGrayscale: '灰色模式', - fourIsInvert: '色弱模式', - fourIsDark: '深色模式', - fourIsWartermark: '开启水印', - fourWartermarkText: '水印文案', - fiveTitle: '其它设置', - fiveTagsStyle: 'Tagsview 风格', - fiveAnimation: '主页面切换动画', - fiveColumnsAsideStyle: '分栏高亮风格', - fiveColumnsAsideLayout: '分栏布局风格', - sixTitle: '布局切换', - sixDefaults: '默认', - sixClassic: '经典', - sixTransverse: '横向', - sixColumns: '分栏', - tipText: '点击下方按钮,复制布局配置去 `src/stores/themeConfig.ts` 中修改。', - copyText: '一键复制配置', - resetText: '一键恢复默认', - copyTextSuccess: '复制成功!', - copyTextError: '复制失败!', - }, + router: { + home: '首页', + system: '系统管理', + config: '常规配置', + log: '日志管理', + /* 常规配置 */ + configSystem: '系统配置', + configDict: '字典管理', + configArea: '地区管理', + configFile: '附件管理', + /* 系统管理 */ + systemMenu: '菜单管理', + systemRole: '角色管理', + systemUser: '用户管理', + systemDept: '部门管理', + /* 日志管理 */ + loginLog: '登录日志', + operationLog: '操作日志', + systemApiWhiteList: '接口白名单', + limits: '权限管理', + limitsFrontEnd: '前端控制', + limitsFrontEndPage: '页面权限', + limitsFrontEndBtn: '按钮权限', + limitsBackEnd: '后端控制', + limitsBackEndEndPage: '页面权限', + personal: '个人中心', + }, + staticRoutes: { + signIn: '登录', + notFound: '找不到此页面', + noPower: '没有权限', + }, + user: { + title0: '组件大小', + title1: '语言切换', + title2: '菜单搜索', + title3: '布局配置', + title4: '消息', + title5: '开全屏', + title6: '关全屏', + dropdownLarge: '大型', + dropdownDefault: '默认', + dropdownSmall: '小型', + dropdown1: '首页', + dropdown2: '个人中心', + dropdown3: '404', + dropdown4: '401', + dropdown5: '退出登录', + dropdown6: '代码仓库', + searchPlaceholder: '菜单搜索:支持中文、路由路径', + newTitle: '通知', + newBtn: '全部已读', + newGo: '前往通知中心', + newDesc: '暂无通知', + logOutTitle: '提示', + logOutMessage: '此操作将退出登录, 是否继续?', + logOutConfirm: '确定', + logOutCancel: '取消', + logOutExit: '退出中', + }, + tagsView: { + refresh: '刷新', + close: '关闭', + closeOther: '关闭其它', + closeAll: '全部关闭', + fullscreen: '当前页全屏', + closeFullscreen: '关闭全屏', + }, + notFound: { + foundTitle: '地址输入错误,请重新输入地址~', + foundMsg: '您可以先检查网址,然后重新输入或给我们反馈问题。', + foundBtn: '返回首页', + }, + noAccess: { + accessTitle: '您未被授权,没有操作权限~', + accessMsg: '联系方式:加QQ群探讨 665452019', + accessBtn: '重新授权', + }, + layout: { + configTitle: '布局配置', + oneTitle: '全局主题', + twoTopTitle: '顶栏设置', + twoMenuTitle: '菜单设置', + twoColumnsTitle: '分栏设置', + twoTopBar: '顶栏背景', + twoTopBarColor: '顶栏默认字体颜色', + twoIsTopBarColorGradual: '顶栏背景渐变', + twoMenuBar: '菜单背景', + twoMenuBarColor: '菜单默认字体颜色', + twoMenuBarActiveColor: '菜单高亮背景色', + twoIsMenuBarColorGradual: '菜单背景渐变', + twoColumnsMenuBar: '分栏菜单背景', + twoColumnsMenuBarColor: '分栏菜单默认字体颜色', + twoIsColumnsMenuBarColorGradual: '分栏菜单背景渐变', + twoIsColumnsMenuHoverPreload: '分栏菜单滑鼠悬停预加载', + threeTitle: '界面设置', + threeIsCollapse: '菜单水平折叠', + threeIsUniqueOpened: '菜单手风琴', + threeIsFixedHeader: '固定 Header', + threeIsClassicSplitMenu: '经典布局分割菜单', + threeIsLockScreen: '开启锁屏', + threeLockScreenTime: '自动锁屏(s/秒)', + fourTitle: '界面显示', + fourIsShowLogo: '侧边栏 Logo', + fourIsBreadcrumb: '开启 Breadcrumb', + fourIsBreadcrumbIcon: '开启 Breadcrumb 图标', + fourIsTagsview: '开启 Tagsview', + fourIsTagsviewIcon: '开启 Tagsview 图标', + fourIsCacheTagsView: '开启 TagsView 缓存', + fourIsSortableTagsView: '开启 TagsView 拖拽', + fourIsShareTagsView: '开启 TagsView 共用', + fourIsFooter: '开启 Footer', + fourIsGrayscale: '灰色模式', + fourIsInvert: '色弱模式', + fourIsDark: '深色模式', + fourIsWartermark: '开启水印', + fourWartermarkText: '水印文案', + fiveTitle: '其它设置', + fiveTagsStyle: 'Tagsview 风格', + fiveAnimation: '主页面切换动画', + fiveColumnsAsideStyle: '分栏高亮风格', + fiveColumnsAsideLayout: '分栏布局风格', + sixTitle: '布局切换', + sixDefaults: '默认', + sixClassic: '经典', + sixTransverse: '横向', + sixColumns: '分栏', + tipText: '点击下方按钮,复制布局配置去 `src/stores/themeConfig.ts` 中修改。', + copyText: '一键复制配置', + resetText: '一键恢复默认', + copyTextSuccess: '复制成功!', + copyTextError: '复制失败!', + }, + upgrade: { + title: '新版本升级', + msg: '新版本来啦,马上更新尝鲜吧!不用担心,更新很快的哦!', + desc: '提示:更新会还原默认配寘', + btnOne: '残忍拒绝', + btnTwo: '马上更新', + btnTwoLoading: '更新中', + }, }; diff --git a/web/src/i18n/pages/login/zh-cn.ts b/web/src/i18n/pages/login/zh-cn.ts index 61f994d2d..6ab9813aa 100644 --- a/web/src/i18n/pages/login/zh-cn.ts +++ b/web/src/i18n/pages/login/zh-cn.ts @@ -1,7 +1,7 @@ // 定义内容 export default { label: { - one1: '用户名登录', + one1: '账号密码登录', two2: '手机号登录', }, link: { diff --git a/web/src/layout/upgrade/index.vue b/web/src/layout/upgrade/index.vue index 7fe861a78..e36101265 100644 --- a/web/src/layout/upgrade/index.vue +++ b/web/src/layout/upgrade/index.vue @@ -76,10 +76,10 @@ const delayShow = () => { }; // 页面加载时 onMounted(() => { - // delayShow(); - // setTimeout(() => { - // state.btnTxt = t('message.upgrade.btnTwo'); - // }, 200); + delayShow(); + setTimeout(() => { + state.btnTxt = t('message.upgrade.btnTwo'); + }, 200); }); -- Gitee From 6172dea399222bd1a251634dc3670b1913c5d5e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BC=BA?= <1206709430@qq.com> Date: Thu, 23 Nov 2023 16:33:19 +0800 Subject: [PATCH 24/40] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E5=95=86?= =?UTF-8?q?=E4=B8=9A=E6=8E=88=E6=9D=83=E6=A0=87=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/layout/component/main.vue | 2 +- web/src/layout/footer/index.vue | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/web/src/layout/component/main.vue b/web/src/layout/component/main.vue index fd3f59993..9250d1e6a 100644 --- a/web/src/layout/component/main.vue +++ b/web/src/layout/component/main.vue @@ -4,7 +4,7 @@ - + diff --git a/web/src/layout/footer/index.vue b/web/src/layout/footer/index.vue index 526cd8fc9..67e6e5c07 100644 --- a/web/src/layout/footer/index.vue +++ b/web/src/layout/footer/index.vue @@ -1,8 +1,7 @@ - + + + + + + + + + + + - + + + + + {{ userInfos.username === '' ? 'common' : userInfos.username }} @@ -79,7 +103,7 @@ - - diff --git a/web/src/views/system/user/crud.tsx b/web/src/views/system/user/crud.tsx index 2165cf4b6..44b97a5d5 100644 --- a/web/src/views/system/user/crud.tsx +++ b/web/src/views/system/user/crud.tsx @@ -3,7 +3,7 @@ import { dict, UserPageQuery, AddReq, DelReq, EditReq, compute, CreateCrudOption import { request } from '/@/utils/service'; import { dictionary } from '/@/utils/dictionary'; import { successMessage } from '/@/utils/message'; -import { inject } from 'vue'; +import { auth } from '/@/utils/authFunction'; export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOptionsRet { const pageRequest = async (query: UserPageQuery) => { @@ -24,8 +24,6 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp return await api.exportData(query) } - //权限判定 - const hasPermissions:any = inject('$hasPermissions'); return { crudOptions: { @@ -43,7 +41,7 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp actionbar: { buttons: { add: { - show: hasPermissions('user:Create') + show: auth('user:Create') }, export:{ text:"导出",//按钮文字 @@ -65,17 +63,17 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp edit: { iconRight: 'Edit', type: 'text', - show: hasPermissions('user:Update'), + show: auth('user:Update'), }, remove: { iconRight: 'Delete', type: 'text', - show: hasPermissions('user:Delete'), + show: auth('user:Delete'), }, custom: { text: '重设密码', type: 'text', - show: hasPermissions('user:ResetPassword'), + show: auth('user:ResetPassword'), tooltip: { placement: 'top', content: '重设密码', diff --git a/web/src/views/system/whiteList/crud.tsx b/web/src/views/system/whiteList/crud.tsx index e6dade926..7104cdaed 100644 --- a/web/src/views/system/whiteList/crud.tsx +++ b/web/src/views/system/whiteList/crud.tsx @@ -1,237 +1,251 @@ import * as api from './api'; -import { dict, UserPageQuery, AddReq, DelReq, EditReq, compute, CreateCrudOptionsProps, CreateCrudOptionsRet } from '@fast-crud/fast-crud'; -import { request } from '/@/utils/service'; -import { dictionary } from '/@/utils/dictionary'; -import { successMessage } from '/@/utils/message'; -import {inject} from "vue"; +import { + dict, + UserPageQuery, + AddReq, + DelReq, + EditReq, + compute, + CreateCrudOptionsProps, + CreateCrudOptionsRet +} from '@fast-crud/fast-crud'; +import {request} from '/@/utils/service'; +import {dictionary} from '/@/utils/dictionary'; +import {successMessage} from '/@/utils/message'; +import {auth} from '/@/utils/authFunction' -export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOptionsRet { - const pageRequest = async (query: UserPageQuery) => { - return await api.GetList(query); - }; - const editRequest = async ({ form, row }: EditReq) => { - form.id = row.id; - return await api.UpdateObj(form); - }; - const delRequest = async ({ row }: DelReq) => { - return await api.DelObj(row.id); - }; - const addRequest = async ({ form }: AddReq) => { - return await api.AddObj(form); - }; +export const createCrudOptions = function ({crudExpose}: CreateCrudOptionsProps): CreateCrudOptionsRet { + const pageRequest = async (query: UserPageQuery) => { + return await api.GetList(query); + }; + const editRequest = async ({form, row}: EditReq) => { + form.id = row.id; + return await api.UpdateObj(form); + }; + const delRequest = async ({row}: DelReq) => { + return await api.DelObj(row.id); + }; + const addRequest = async ({form}: AddReq) => { + return await api.AddObj(form); + }; - //权限判定 - const hasPermissions = inject("$hasPermissions") - return { - crudOptions: { - request: { - pageRequest, - addRequest, - editRequest, - delRequest, - }, - rowHandle: { - //固定右侧 - fixed: 'right', - width: 150, - buttons: { - view: { - show: false, - }, - edit: { - iconRight: 'Edit', - type: 'text', - show:hasPermissions("api_white_list:Update") - }, - remove: { - iconRight: 'Delete', - type: 'text', - show:hasPermissions("api_white_list:Delete") - }, - }, - }, - form: { - col: { span: 24 }, - labelWidth: '110px', - wrapper: { - is: 'el-dialog', - width: '600px', - }, - }, - columns: { - _index: { - title: '序号', - form: { show: false }, - column: { - //type: 'index', - align: 'center', - width: '70px', - columnSetDisabled: true, //禁止在列设置中选择 - //@ts-ignore - formatter: (context) => { - //计算序号,你可以自定义计算规则,此处为翻页累加 - let index = context.index ?? 1; - let pagination: any = crudExpose!.crudBinding.value.pagination; - return ((pagination.currentPage ?? 1) - 1) * pagination.pageSize + index + 1; - }, - }, - }, - search: { - title: '关键词', - column: { - show: false, - }, - search: { - show: true, - component: { - props: { - clearable: true, - }, - placeholder: '请输入关键词', - }, - }, - form: { - show: false, - component: { - props: { - clearable: true, - }, - }, - }, - }, - method: { - title: '请求方式', - sortable: 'custom', - search: { - disabled: false, - }, - type: 'dict-select', - dict: dict({ - data: [ - { - label: 'GET', - value: 0, - }, - { - label: 'POST', - value: 1, - }, - { - label: 'PUT', - value: 2, - }, - { - label: 'DELETE', - value: 3, - }, - { - label: 'PATCH', - value: 4, - }, - ], - }), - column:{ - minWidth: 120, - }, - form: { - rules: [ - // 表单校验规则 - { - required: true, - message: '必填项', - }, - ], - component: { - span: 12, - }, - itemProps: { - class: { yxtInput: true }, - }, - }, - }, - url: { - title: '接口地址', - sortable: 'custom', - search: { - disabled: true, - }, - type: 'dict-select', - dict: dict({ - async getData(dict: any) { - return request('/swagger.json').then((ret: any) => { - const res = Object.keys(ret.paths); - const data = []; - for (const item of res) { - const obj = { label: '', value: '' }; - obj.label = item; - obj.value = item; - data.push(obj); - } - return data; - }); - }, - }), - column:{ - minWidth: 200, - }, - form: { - rules: [ - // 表单校验规则 - { - required: true, - message: '必填项', - }, - ], - component: { - span: 24, - props: { - elProps: { - allowCreate: true, - filterable: true, - clearable: true, - }, - }, - }, - itemProps: { - class: { yxtInput: true }, - }, - helper: { - position: 'label', - tooltip: { - placement: 'top-start', - }, - text: '请正确填写,以免请求时被拦截。匹配单例使用正则,例如:/api/xx/.*?/', - }, - }, - }, - enable_datasource: { - title: '数据权限认证', - search: { - disabled: false, - }, - type: 'dict-radio', - column: { - minWidth:120, - component: { - name: 'fs-dict-switch', - activeText: '', - inactiveText: '', - style: '--el-switch-on-color: var(--el-color-primary); --el-switch-off-color: #dcdfe6', - onChange: compute((context) => { - return () => { - api.UpdateObj(context.row).then((res: APIResponseData) => { - successMessage(res.msg as string); - }); - }; - }), - }, - }, - dict: dict({ - data: dictionary('button_status_bool'), - }), - }, - }, - }, - }; + return { + crudOptions: { + request: { + pageRequest, + addRequest, + editRequest, + delRequest, + }, + actionbar: { + buttons: { + add: { + show: auth('api_white_list:Create') + } + } + }, + rowHandle: { + //固定右侧 + fixed: 'right', + width: 150, + buttons: { + view: { + show: false, + }, + edit: { + iconRight: 'Edit', + type: 'text', + show: auth("api_white_list:Update") + }, + remove: { + iconRight: 'Delete', + type: 'text', + show: auth("api_white_list:Delete") + }, + }, + }, + form: { + col: {span: 24}, + labelWidth: '110px', + wrapper: { + is: 'el-dialog', + width: '600px', + }, + }, + columns: { + _index: { + title: '序号', + form: {show: false}, + column: { + //type: 'index', + align: 'center', + width: '70px', + columnSetDisabled: true, //禁止在列设置中选择 + //@ts-ignore + formatter: (context) => { + //计算序号,你可以自定义计算规则,此处为翻页累加 + let index = context.index ?? 1; + let pagination: any = crudExpose!.crudBinding.value.pagination; + return ((pagination.currentPage ?? 1) - 1) * pagination.pageSize + index + 1; + }, + }, + }, + search: { + title: '关键词', + column: { + show: false, + }, + search: { + show: true, + component: { + props: { + clearable: true, + }, + placeholder: '请输入关键词', + }, + }, + form: { + show: false, + component: { + props: { + clearable: true, + }, + }, + }, + }, + method: { + title: '请求方式', + sortable: 'custom', + search: { + disabled: false, + }, + type: 'dict-select', + dict: dict({ + data: [ + { + label: 'GET', + value: 0, + }, + { + label: 'POST', + value: 1, + }, + { + label: 'PUT', + value: 2, + }, + { + label: 'DELETE', + value: 3, + }, + { + label: 'PATCH', + value: 4, + }, + ], + }), + column: { + minWidth: 120, + }, + form: { + rules: [ + // 表单校验规则 + { + required: true, + message: '必填项', + }, + ], + component: { + span: 12, + }, + itemProps: { + class: {yxtInput: true}, + }, + }, + }, + url: { + title: '接口地址', + sortable: 'custom', + search: { + disabled: true, + }, + type: 'dict-select', + dict: dict({ + async getData(dict: any) { + return request('/swagger.json').then((ret: any) => { + const res = Object.keys(ret.paths); + const data = []; + for (const item of res) { + const obj = {label: '', value: ''}; + obj.label = item; + obj.value = item; + data.push(obj); + } + return data; + }); + }, + }), + column: { + minWidth: 200, + }, + form: { + rules: [ + // 表单校验规则 + { + required: true, + message: '必填项', + }, + ], + component: { + span: 24, + props: { + elProps: { + allowCreate: true, + filterable: true, + clearable: true, + }, + }, + }, + itemProps: { + class: {yxtInput: true}, + }, + helper: { + position: 'label', + tooltip: { + placement: 'top-start', + }, + text: '请正确填写,以免请求时被拦截。匹配单例使用正则,例如:/api/xx/.*?/', + }, + }, + }, + enable_datasource: { + title: '数据权限认证', + search: { + disabled: false, + }, + type: 'dict-radio', + column: { + minWidth: 120, + component: { + name: 'fs-dict-switch', + activeText: '', + inactiveText: '', + style: '--el-switch-on-color: var(--el-color-primary); --el-switch-off-color: #dcdfe6', + onChange: compute((context) => { + return () => { + api.UpdateObj(context.row).then((res: APIResponseData) => { + successMessage(res.msg as string); + }); + }; + }), + }, + }, + dict: dict({ + data: dictionary('button_status_bool'), + }), + }, + }, + }, + }; }; -- Gitee From fca82c093a960b948223484347851dfb0140b23a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BC=BA?= <1206709430@qq.com> Date: Fri, 24 Nov 2023 15:25:41 +0800 Subject: [PATCH 27/40] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96deep?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/layout/navBars/breadcrumb/user.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/layout/navBars/breadcrumb/user.vue b/web/src/layout/navBars/breadcrumb/user.vue index 620a07690..61793c974 100644 --- a/web/src/layout/navBars/breadcrumb/user.vue +++ b/web/src/layout/navBars/breadcrumb/user.vue @@ -299,7 +299,7 @@ const messageCenter = messageCenterStore(); } .online-status{ cursor: pointer; - :deep .el-badge__content.is-fixed { + :deep(.el-badge__content.is-fixed) { top: 30px; font-size: 14px; left: 5px; @@ -311,7 +311,7 @@ const messageCenter = messageCenterStore(); } .online-down{ cursor: pointer; - :deep .el-badge__content.is-fixed { + :deep(.el-badge__content.is-fixed) { top: 30px; font-size: 14px; left: 5px; -- Gitee From 4b77fb903c0970c3a72b6a0716e8e8a4a3535981 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8C=BF=E5=B0=8F=E5=A4=A9?= <1638245306@qq.com> Date: Fri, 24 Nov 2023 15:37:47 +0800 Subject: [PATCH 28/40] =?UTF-8?q?refactor:=20=E6=A3=80=E6=B5=8B=E7=9B=AE?= =?UTF-8?q?=E5=89=8D=E6=89=80=E6=9C=89=E8=8F=9C=E5=8D=95=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/layout/upgrade/index.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/src/layout/upgrade/index.vue b/web/src/layout/upgrade/index.vue index 89654ca95..a10795434 100644 --- a/web/src/layout/upgrade/index.vue +++ b/web/src/layout/upgrade/index.vue @@ -17,15 +17,15 @@ {{ getThemeConfig.globalTitle }} {{ $t('message.upgrade.msg') }} - + CHANGELOG.md {{ $t('message.upgrade.desc') }} - {{ $t('message.upgrade.btnOne') }} - {{ state.btnTxt }} + {{ $t('message.upgrade.btnOne') }} + {{ state.btnTxt }} -- Gitee From f291885d57ca3a2d2cb48841702054c668e0e89f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8C=BF=E5=B0=8F=E5=A4=A9?= <1638245306@qq.com> Date: Sun, 26 Nov 2023 11:03:26 +0800 Subject: [PATCH 29/40] =?UTF-8?q?1.=E6=9B=B4=E6=96=B0=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E6=9D=83=E9=99=90=E5=88=9D=E5=A7=8B=E5=8C=96=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dvadmin/system/fixtures/init_menu.json | 1314 +++++++++-------- 1 file changed, 687 insertions(+), 627 deletions(-) diff --git a/backend/dvadmin/system/fixtures/init_menu.json b/backend/dvadmin/system/fixtures/init_menu.json index 2c26ccc61..a054af292 100644 --- a/backend/dvadmin/system/fixtures/init_menu.json +++ b/backend/dvadmin/system/fixtures/init_menu.json @@ -1,644 +1,704 @@ [ - { - "name": "系统管理", - "icon": "iconfont icon-xitongshezhi", + { + "name": "系统管理", + "icon": "iconfont icon-xitongshezhi", + "sort": 1, + "is_link": false, + "is_catalog": true, + "web_path": "/system", + "component": "", + "component_name": "", + "status": true, + "cache": false, + "visible": true, + "children": [ + { + "name": "菜单管理", + "icon": "iconfont icon-caidan", "sort": 1, "is_link": false, - "is_catalog": true, - "web_path": "/system", - "component": "", - "component_name": "", + "is_catalog": false, + "web_path": "/menu", + "component": "system/menu/index", + "component_name": "menu", "status": true, "cache": false, "visible": true, - "children": [ - { - "name": "菜单管理", - "icon": "iconfont icon-caidan", - "sort": 1, - "is_link": false, - "is_catalog": false, - "web_path": "/menu", - "component": "system/menu/index", - "component_name": "menu", - "status": true, - "cache": false, - "visible": true, - "children": [], - "menu_button": [ - { - "name": "查询", - "value": "menu:Search", - "api": "/api/system/menu/", - "method": 0 - }, - { - "name": "详情", - "value": "menu:Retrieve", - "api": "/api/system/menu/{id}/", - "method": 0 - }, - { - "name": "新增", - "value": "menu:Create", - "api": "/api/system/menu/", - "method": 1 - }, - { - "name": "编辑", - "value": "menu:Update", - "api": "/api/system/menu/{id}/", - "method": 2 - }, - { - "name": "删除", - "value": "menu:Delete", - "api": "/api/system/menu/{id}/", - "method": 3 - }, - { - "name": "查询所有", - "value": "menu:SearchAll", - "api": "/api/system/menu/get_all_menu/", - "method": 0 - }, - { - "name": "路由", - "value": "menu:router", - "api": "/api/system/menu/web_router/", - "method": 0 - }, - { - "name": "上移", - "value": "menu:MoveUp", - "api": "/api/system/menu/mode_up/", - "method": 1 - }, - { - "name": "下移", - "value": "menu:MoveDown", - "api": "/api/system/menu/mode_down/", - "method": 1 - } - ] - }, - { - "name": "部门管理", - "icon": "ele-OfficeBuilding", - "sort": 3, - "is_link": false, - "is_catalog": false, - "web_path": "/dept", - "component": "system/dept/index", - "component_name": "dept", - "status": true, - "cache": false, - "visible": true, - "children": [], - "menu_button": [ - { - "name": "查询", - "value": "dept:Search", - "api": "/api/system/dept/", - "method": 0 - }, - { - "name": "详情", - "value": "dept:Retrieve", - "api": "/api/system/dept/{id}/", - "method": 0 - }, - { - "name": "新增", - "value": "dept:Create", - "api": "/api/system/dept/", - "method": 1 - }, - { - "name": "编辑", - "value": "dept:Update", - "api": "/api/system/dept/{id}/", - "method": 2 - }, - { - "name": "删除", - "value": "dept:Delete", - "api": "/api/system/dept/{id}/", - "method": 3 - }, - { - "name": "查询所有", - "value": "dept:SearchAll", - "api": "/api/system/dept/all_dept/", - "method": 0 - }, - { - "name": "懒加载查询所有", - "value": "dept:LazySearchAll", - "api": "/api/system/dept/dept_lazy_tree/", - "method": 0 - }, - { - "name": "上移", - "value": "dept:MoveUp", - "api": "/api/system/dept/mode_up/", - "method": 1 - }, - { - "name": "下移", - "value": "dept:MoveDown", - "api": "/api/system/dept/mode_down/", - "method": 1 - }, - { - "name": "头信息", - "value": "dept:HeaderInfo", - "api": "/api/system/dept/dept_info/", - "method": 0 - } - ] - }, - { - "name": "角色管理", - "icon": "ele-ColdDrink", - "sort": 4, - "is_link": false, - "is_catalog": false, - "web_path": "/role", - "component": "system/role/index", - "component_name": "role", - "status": true, - "cache": false, - "visible": true, - "children": [], - "menu_button": [ - { - "name": "查询", - "value": "role:Search", - "api": "/api/system/role/", - "method": 0 - }, - { - "name": "详情", - "value": "role:Retrieve", - "api": "/api/system/role/{id}/", - "method": 0 - }, - { - "name": "新增", - "value": "role:Create", - "api": "/api/system/role/", - "method": 1 - }, - { - "name": "编辑", - "value": "role:Update", - "api": "/api/system/role/{id}/", - "method": 2 - }, - { - "name": "保存", - "value": "role:Save", - "api": "/api/system/role/{id}/", - "method": 2 - }, - { - "name": "删除", - "value": "role:Delete", - "api": "/api/system/role/{id}/", - "method": 3 - } - ] - }, - { - "name": "用户管理", - "icon": "iconfont icon-icon-", - "sort": 6, - "is_link": false, - "is_catalog": false, - "web_path": "/user", - "component": "system/user/index", - "component_name": "user", - "status": true, - "cache": false, - "visible": true, - "children": [], - "menu_button": [ - { - "name": "查询", - "value": "user:Search", - "api": "/api/system/user/", - "method": 0 - }, - { - "name": "详情", - "value": "user:Retrieve", - "api": "/api/system/user/{id}/", - "method": 0 - }, - { - "name": "新增", - "value": "user:Create", - "api": "/api/system/user/", - "method": 1 - }, - { - "name": "导出", - "value": "user:Export", - "api": "/api/system/user/export/", - "method": 1 - }, - { - "name": "导入", - "value": "user:Import", - "api": "/api/system/user/import/", - "method": 1 - }, - { - "name": "编辑", - "value": "user:Update", - "api": "/api/system/user/{id}/", - "method": 2 - }, - { - "name": "重设密码", - "value": "user:ResetPassword", - "api": "/api/system/user/{id}/reset_password/", - "method": 2 - }, - { - "name": "重置密码", - "value": "user:DefaultPassword", - "api": "/api/system/user/{id}/reset_to_default_password/", - "method": 2 - }, - { - "name": "删除", - "value": "user:Delete", - "api": "/api/system/user/{id}/", - "method": 3 - } - ] - }, - { - "name": "消息中心", - "icon": "iconfont icon-xiaoxizhongxin", - "sort": 7, - "is_link": false, - "is_catalog": false, - "web_path": "/messageCenter", - "component": "system/messageCenter/index", - "component_name": "messageCenter", - "status": true, - "cache": false, - "visible": true, - "children": [], - "menu_button": [ - { - "name": "查询", - "value": "messageCenter:Search", - "api": "/api/system/message_center/", - "method": 0 - }, - { - "name": "详情", - "value": "messageCenter:Retrieve", - "api": "/api/system/message_center/{id}/", - "method": 0 - }, - { - "name": "新增", - "value": "messageCenter:Create", - "api": "/api/system/message_center/", - "method": 1 - }, - { - "name": "编辑", - "value": "messageCenter:Update", - "api": "/api/system/message_center/{id}/", - "method": 2 - }, - { - "name": "删除", - "value": "messageCenter:Delete", - "api": "/api/system/menu/{id}/", - "method": 3 - } - ] - }, - { - "name": "接口白名单", - "icon": "ele-SetUp", - "sort": 8, - "is_link": false, - "is_catalog": false, - "web_path": "/apiWhiteList", - "component": "system/whiteList/index", - "component_name": "whiteList", - "status": true, - "cache": false, - "visible": true, - "children": [], - "menu_button": [ - { - "name": "查询", - "value": "api_white_list:Search", - "api": "/api/system/api_white_list/", - "method": 0 - }, - { - "name": "详情", - "value": "api_white_list:Retrieve", - "api": "/api/system/api_white_list/{id}/", - "method": 0 - }, - { - "name": "新增", - "value": "api_white_list:Create", - "api": "/api/system/api_white_list/", - "method": 1 - }, - { - "name": "编辑", - "value": "api_white_list:Update", - "api": "/api/system/api_white_list/{id}/", - "method": 2 - }, - { - "name": "删除", - "value": "api_white_list:Delete", - "api": "/api/system/api_white_list/{id}/", - "method": 3 - } - ] - } - ], - "menu_button": [] - }, - { - "name": "常规配置", - "icon": "iconfont icon-configure", + "children": [], + "menu_button": [ + { + "name": "查询", + "value": "menu:Search", + "api": "/api/system/menu/", + "method": 0 + }, + { + "name": "详情", + "value": "menu:Retrieve", + "api": "/api/system/menu/{id}/", + "method": 0 + }, + { + "name": "新增", + "value": "menu:Create", + "api": "/api/system/menu/", + "method": 1 + }, + { + "name": "编辑", + "value": "menu:Update", + "api": "/api/system/menu/{id}/", + "method": 2 + }, + { + "name": "删除", + "value": "menu:Delete", + "api": "/api/system/menu/{id}/", + "method": 3 + }, + { + "name": "查询所有", + "value": "menu:SearchAll", + "api": "/api/system/menu/get_all_menu/", + "method": 0 + }, + { + "name": "路由", + "value": "menu:router", + "api": "/api/system/menu/web_router/", + "method": 0 + }, + { + "name": "上移", + "value": "menu:MoveUp", + "api": "/api/system/menu/mode_up/", + "method": 1 + }, + { + "name": "下移", + "value": "menu:MoveDown", + "api": "/api/system/menu/mode_down/", + "method": 1 + }, + { + "name": "新增按钮权限", + "value": "btn:Create", + "api": "/api/system/menu_button/", + "method": 1 + }, + { + "name": "修改按钮权限", + "value": "btn:Update", + "api": "/api/system/menu_button/{id}/", + "method": 2 + }, + { + "name": "查询按钮权限", + "value": "btn:Search", + "api": "/api/system/menu_button/", + "method": 0 + }, + { + "name": "删除按钮权限", + "value": "btn:Delete", + "api": "/api/system/menu_button/{id}/", + "method": 3 + }, + { + "name": "查询列权限", + "value": "column:Search", + "api": "/api/system/column/", + "method": 0 + }, + { + "name": "新增列权限", + "value": "column:Create", + "api": "/api/system/column/", + "method": 1 + }, + { + "name": "编辑列权限", + "value": "column:Update", + "api": "/api/system/column/{id}/", + "method": 2 + }, + { + "name": "删除列权限", + "value": "column:Delete", + "api": "/api/system/column/{id}/", + "method": 3 + }, + { + "name": "自动匹配列权限", + "value": "column:Match", + "api": "/api/system/column/auto_match_fields/", + "method": 1 + } + ] + }, + { + "name": "部门管理", + "icon": "ele-OfficeBuilding", + "sort": 3, + "is_link": false, + "is_catalog": false, + "web_path": "/dept", + "component": "system/dept/index", + "component_name": "dept", + "status": true, + "cache": false, + "visible": true, + "children": [], + "menu_button": [ + { + "name": "查询", + "value": "dept:Search", + "api": "/api/system/dept/", + "method": 0 + }, + { + "name": "详情", + "value": "dept:Retrieve", + "api": "/api/system/dept/{id}/", + "method": 0 + }, + { + "name": "新增", + "value": "dept:Create", + "api": "/api/system/dept/", + "method": 1 + }, + { + "name": "编辑", + "value": "dept:Update", + "api": "/api/system/dept/{id}/", + "method": 2 + }, + { + "name": "删除", + "value": "dept:Delete", + "api": "/api/system/dept/{id}/", + "method": 3 + }, + { + "name": "查询所有", + "value": "dept:SearchAll", + "api": "/api/system/dept/all_dept/", + "method": 0 + }, + { + "name": "懒加载查询所有", + "value": "dept:LazySearchAll", + "api": "/api/system/dept/dept_lazy_tree/", + "method": 0 + }, + { + "name": "上移", + "value": "dept:MoveUp", + "api": "/api/system/dept/mode_up/", + "method": 1 + }, + { + "name": "下移", + "value": "dept:MoveDown", + "api": "/api/system/dept/mode_down/", + "method": 1 + }, + { + "name": "头信息", + "value": "dept:HeaderInfo", + "api": "/api/system/dept/dept_info/", + "method": 0 + } + ] + }, + { + "name": "角色管理", + "icon": "ele-ColdDrink", + "sort": 4, + "is_link": false, + "is_catalog": false, + "web_path": "/role", + "component": "system/role/index", + "component_name": "role", + "status": true, + "cache": false, + "visible": true, + "children": [], + "menu_button": [ + { + "name": "查询", + "value": "role:Search", + "api": "/api/system/role/", + "method": 0 + }, + { + "name": "详情", + "value": "role:Retrieve", + "api": "/api/system/role/{id}/", + "method": 0 + }, + { + "name": "新增", + "value": "role:Create", + "api": "/api/system/role/", + "method": 1 + }, + { + "name": "编辑", + "value": "role:Update", + "api": "/api/system/role/{id}/", + "method": 2 + }, + { + "name": "保存", + "value": "role:Save", + "api": "/api/system/role/{id}/", + "method": 2 + }, + { + "name": "删除", + "value": "role:Delete", + "api": "/api/system/role/{id}/", + "method": 3 + }, + { + "name": "权限配置", + "value": "role:Permission", + "api": "/api/system/role/{id}/", + "method": 0 + } + ] + }, + { + "name": "用户管理", + "icon": "iconfont icon-icon-", + "sort": 6, + "is_link": false, + "is_catalog": false, + "web_path": "/user", + "component": "system/user/index", + "component_name": "user", + "status": true, + "cache": false, + "visible": true, + "children": [], + "menu_button": [ + { + "name": "查询", + "value": "user:Search", + "api": "/api/system/user/", + "method": 0 + }, + { + "name": "详情", + "value": "user:Retrieve", + "api": "/api/system/user/{id}/", + "method": 0 + }, + { + "name": "新增", + "value": "user:Create", + "api": "/api/system/user/", + "method": 1 + }, + { + "name": "导出", + "value": "user:Export", + "api": "/api/system/user/export/", + "method": 1 + }, + { + "name": "导入", + "value": "user:Import", + "api": "/api/system/user/import/", + "method": 1 + }, + { + "name": "编辑", + "value": "user:Update", + "api": "/api/system/user/{id}/", + "method": 2 + }, + { + "name": "重设密码", + "value": "user:ResetPassword", + "api": "/api/system/user/{id}/reset_password/", + "method": 2 + }, + { + "name": "重置密码", + "value": "user:DefaultPassword", + "api": "/api/system/user/{id}/reset_to_default_password/", + "method": 2 + }, + { + "name": "删除", + "value": "user:Delete", + "api": "/api/system/user/{id}/", + "method": 3 + } + ] + }, + { + "name": "消息中心", + "icon": "iconfont icon-xiaoxizhongxin", + "sort": 7, + "is_link": false, + "is_catalog": false, + "web_path": "/messageCenter", + "component": "system/messageCenter/index", + "component_name": "messageCenter", + "status": true, + "cache": false, + "visible": true, + "children": [], + "menu_button": [ + { + "name": "查询", + "value": "messageCenter:Search", + "api": "/api/system/message_center/", + "method": 0 + }, + { + "name": "详情", + "value": "messageCenter:Retrieve", + "api": "/api/system/message_center/{id}/", + "method": 0 + }, + { + "name": "新增", + "value": "messageCenter:Create", + "api": "/api/system/message_center/", + "method": 1 + }, + { + "name": "编辑", + "value": "messageCenter:Update", + "api": "/api/system/message_center/{id}/", + "method": 2 + }, + { + "name": "删除", + "value": "messageCenter:Delete", + "api": "/api/system/menu/{id}/", + "method": 3 + } + ] + }, + { + "name": "接口白名单", + "icon": "ele-SetUp", + "sort": 8, + "is_link": false, + "is_catalog": false, + "web_path": "/apiWhiteList", + "component": "system/whiteList/index", + "component_name": "whiteList", + "status": true, + "cache": false, + "visible": true, + "children": [], + "menu_button": [ + { + "name": "查询", + "value": "api_white_list:Search", + "api": "/api/system/api_white_list/", + "method": 0 + }, + { + "name": "详情", + "value": "api_white_list:Retrieve", + "api": "/api/system/api_white_list/{id}/", + "method": 0 + }, + { + "name": "新增", + "value": "api_white_list:Create", + "api": "/api/system/api_white_list/", + "method": 1 + }, + { + "name": "编辑", + "value": "api_white_list:Update", + "api": "/api/system/api_white_list/{id}/", + "method": 2 + }, + { + "name": "删除", + "value": "api_white_list:Delete", + "api": "/api/system/api_white_list/{id}/", + "method": 3 + } + ] + } + ], + "menu_button": [] + }, + { + "name": "常规配置", + "icon": "iconfont icon-configure", + "sort": 2, + "is_link": false, + "is_catalog": true, + "web_path": "/generalConfig", + "component": "", + "component_name": "", + "status": true, + "cache": false, + "visible": true, + "children": [ + { + "name": "系统配置", + "icon": "iconfont icon-system", + "sort": 0, + "is_link": false, + "is_catalog": false, + "web_path": "/config", + "component": "system/config/index", + "component_name": "config", + "status": true, + "cache": false, + "visible": true, + "children": [], + "menu_button": [ + { + "name": "查询", + "value": "system_config:Search", + "api": "/api/system/system_config/", + "method": 0 + }, + { + "name": "详情", + "value": "system_config:Retrieve", + "api": "/api/system/system_config/{id}/", + "method": 0 + }, + { + "name": "新增", + "value": "system_config:Create", + "api": "/api/system/system_config/", + "method": 1 + }, + { + "name": "编辑", + "value": "system_config:Update", + "api": "/api/system/system_config/{id}/", + "method": 2 + }, + { + "name": "删除", + "value": "system_config:Delete", + "api": "/api/system/system_config/{id}/", + "method": 3 + } + ] + }, + { + "name": "字典管理", + "icon": "iconfont icon-dict", + "sort": 1, + "is_link": false, + "is_catalog": false, + "web_path": "/dictionary", + "component": "system/dictionary/index", + "component_name": "dictionary", + "status": true, + "cache": false, + "visible": true, + "children": [], + "menu_button": [ + { + "name": "查询", + "value": "dictionary:Search", + "api": "/api/system/dictionary/", + "method": 0 + }, + { + "name": "详情", + "value": "dictionary:Retrieve", + "api": "/api/system/dictionary/{id}/", + "method": 0 + }, + { + "name": "新增", + "value": "dictionary:Create", + "api": "/api/system/dictionary/", + "method": 1 + }, + { + "name": "编辑", + "value": "dictionary:Update", + "api": "/api/system/dictionary/{id}/", + "method": 2 + }, + { + "name": "删除", + "value": "dictionary:Delete", + "api": "/api/system/dictionary/{id}/", + "method": 3 + } + ] + }, + { + "name": "地区管理", + "icon": "iconfont icon-Area", "sort": 2, "is_link": false, - "is_catalog": true, - "web_path": "/generalConfig", - "component": "", - "component_name": "", + "is_catalog": false, + "web_path": "/areas", + "component": "system/areas/index", + "component_name": "areas", "status": true, "cache": false, "visible": true, - "children": [ - { - "name": "系统配置", - "icon": "iconfont icon-system", - "sort": 0, - "is_link": false, - "is_catalog": false, - "web_path": "/config", - "component": "system/config/index", - "component_name": "config", - "status": true, - "cache": false, - "visible": true, - "children": [], - "menu_button": [ - { - "name": "查询", - "value": "system_config:Search", - "api": "/api/system/system_config/", - "method": 0 - }, - { - "name": "详情", - "value": "system_config:Retrieve", - "api": "/api/system/system_config/{id}/", - "method": 0 - }, - { - "name": "新增", - "value": "system_config:Create", - "api": "/api/system/system_config/", - "method": 1 - }, - { - "name": "编辑", - "value": "system_config:Update", - "api": "/api/system/system_config/{id}/", - "method": 2 - }, - { - "name": "删除", - "value": "system_config:Delete", - "api": "/api/system/system_config/{id}/", - "method": 3 - } - ] - }, - { - "name": "字典管理", - "icon": "iconfont icon-dict", - "sort": 1, - "is_link": false, - "is_catalog": false, - "web_path": "/dictionary", - "component": "system/dictionary/index", - "component_name": "dictionary", - "status": true, - "cache": false, - "visible": true, - "children": [], - "menu_button": [ - { - "name": "查询", - "value": "dictionary:Search", - "api": "/api/system/dictionary/", - "method": 0 - }, - { - "name": "详情", - "value": "dictionary:Retrieve", - "api": "/api/system/dictionary/{id}/", - "method": 0 - }, - { - "name": "新增", - "value": "dictionary:Create", - "api": "/api/system/dictionary/", - "method": 1 - }, - { - "name": "编辑", - "value": "dictionary:Update", - "api": "/api/system/dictionary/{id}/", - "method": 2 - }, - { - "name": "删除", - "value": "dictionary:Delete", - "api": "/api/system/dictionary/{id}/", - "method": 3 - } - ] - }, - { - "name": "地区管理", - "icon": "iconfont icon-Area", - "sort": 2, - "is_link": false, - "is_catalog": false, - "web_path": "/areas", - "component": "system/areas/index", - "component_name": "areas", - "status": true, - "cache": false, - "visible": true, - "children": [], - "menu_button": [ - { - "name": "查询", - "value": "area:Search", - "api": "/api/system/area/", - "method": 0 - }, - { - "name": "详情", - "value": "area:Retrieve", - "api": "/api/system/area/{id}/", - "method": 0 - }, - { - "name": "新增", - "value": "area:Create", - "api": "/api/system/area/", - "method": 1 - }, - { - "name": "编辑", - "value": "area:Update", - "api": "/api/system/area/{id}/", - "method": 2 - }, - { - "name": "删除", - "value": "area:Delete", - "api": "/api/system/area/{id}/", - "method": 3 - } - ] - }, - { - "name": "附件管理", - "icon": "iconfont icon-file", - "sort": 3, - "is_link": false, - "is_catalog": false, - "web_path": "/file", - "component": "system/fileList/index", - "component_name": "file", - "status": true, - "cache": false, - "visible": true, - "children": [], - "menu_button": [ - { - "name": "详情", - "value": "file:Retrieve", - "api": "/api/system/file/{id}/", - "method": 0 - }, - { - "name": "查询", - "value": "file:Search", - "api": "/api/system/file/", - "method": 0 - }, - { - "name": "编辑", - "value": "file:Update", - "api": "/api/system/file/{id}/", - "method": 1 - }, - { - "name": "删除", - "value": "file:Delete", - "api": "/api/system/file/{id}/", - "method": 3 - } - ] - } - ], - "menu_button": [] - }, - { - "name": "日志管理", - "icon": "iconfont icon-rizhi", + "children": [], + "menu_button": [ + { + "name": "查询", + "value": "area:Search", + "api": "/api/system/area/", + "method": 0 + }, + { + "name": "详情", + "value": "area:Retrieve", + "api": "/api/system/area/{id}/", + "method": 0 + }, + { + "name": "新增", + "value": "area:Create", + "api": "/api/system/area/", + "method": 1 + }, + { + "name": "编辑", + "value": "area:Update", + "api": "/api/system/area/{id}/", + "method": 2 + }, + { + "name": "删除", + "value": "area:Delete", + "api": "/api/system/area/{id}/", + "method": 3 + } + ] + }, + { + "name": "附件管理", + "icon": "iconfont icon-file", "sort": 3, "is_link": false, - "is_catalog": true, - "web_path": "/log", - "component": "", - "component_name": "", + "is_catalog": false, + "web_path": "/file", + "component": "system/fileList/index", + "component_name": "file", + "status": true, + "cache": false, + "visible": true, + "children": [], + "menu_button": [ + { + "name": "详情", + "value": "file:Retrieve", + "api": "/api/system/file/{id}/", + "method": 0 + }, + { + "name": "查询", + "value": "file:Search", + "api": "/api/system/file/", + "method": 0 + }, + { + "name": "编辑", + "value": "file:Update", + "api": "/api/system/file/{id}/", + "method": 1 + }, + { + "name": "删除", + "value": "file:Delete", + "api": "/api/system/file/{id}/", + "method": 3 + } + ] + } + ], + "menu_button": [] + }, + { + "name": "日志管理", + "icon": "iconfont icon-rizhi", + "sort": 3, + "is_link": false, + "is_catalog": true, + "web_path": "/log", + "component": "", + "component_name": "", + "status": true, + "cache": false, + "visible": true, + "children": [ + { + "name": "登录日志", + "icon": "iconfont icon-guanlidenglurizhi", + "sort": 1, + "is_link": false, + "is_catalog": false, + "web_path": "/loginLog", + "component": "system/log/loginLog/index", + "component_name": "loginLog", + "status": true, + "cache": false, + "visible": true, + "children": [], + "menu_button": [ + { + "name": "查询", + "value": "login_log:Search", + "api": "/api/system/login_log/", + "method": 0 + }, + { + "name": "详情", + "value": "login_log:Retrieve", + "api": "/api/system/login_log/{id}/", + "method": 0 + } + ] + }, + { + "name": "操作日志", + "icon": "iconfont icon-caozuorizhi", + "sort": 2, + "is_link": false, + "is_catalog": false, + "web_path": "/operationLog", + "component": "system/log/operationLog/index", + "component_name": "operationLog", "status": true, "cache": false, "visible": true, - "children": [ - { - "name": "登录日志", - "icon": "iconfont icon-guanlidenglurizhi", - "sort": 1, - "is_link": false, - "is_catalog": false, - "web_path": "/loginLog", - "component": "system/log/loginLog/index", - "component_name": "loginLog", - "status": true, - "cache": false, - "visible": true, - "children": [], - "menu_button": [ - { - "name": "查询", - "value": "login_log:Search", - "api": "/api/system/login_log/", - "method": 0 - }, - { - "name": "详情", - "value": "login_log:Retrieve", - "api": "/api/system/login_log/{id}/", - "method": 0 - } - ] - }, - { - "name": "操作日志", - "icon": "iconfont icon-caozuorizhi", - "sort": 2, - "is_link": false, - "is_catalog": false, - "web_path": "/operationLog", - "component": "system/log/operationLog/index", - "component_name": "operationLog", - "status": true, - "cache": false, - "visible": true, - "children": [], - "menu_button": [ - { - "name": "详情", - "value": "operation_log:Retrieve", - "api": "/api/system/operation_log/{id}/", - "method": 0 - }, - { - "name": "查询", - "value": "operation_log:Search", - "api": "/api/system/operation_log/", - "method": 0 - } - ] - } - ], - "menu_button": [] - } + "children": [], + "menu_button": [ + { + "name": "详情", + "value": "operation_log:Retrieve", + "api": "/api/system/operation_log/{id}/", + "method": 0 + }, + { + "name": "查询", + "value": "operation_log:Search", + "api": "/api/system/operation_log/", + "method": 0 + } + ] + } + ], + "menu_button": [] + } ] \ No newline at end of file -- Gitee From 0650c9574526b6d3885c168f92782830d19ee66d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8C=BF=E5=B0=8F=E5=A4=A9?= <1638245306@qq.com> Date: Sun, 26 Nov 2023 11:37:21 +0800 Subject: [PATCH 30/40] =?UTF-8?q?1.=E6=9B=B4=E6=96=B0=E5=88=97=E6=9D=83?= =?UTF-8?q?=E9=99=90=E5=88=9D=E5=A7=8B=E5=8C=96=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dvadmin/system/fixtures/initSerializer.py | 36 +- .../dvadmin/system/fixtures/init_menu.json | 2073 +++++++++++------ 2 files changed, 1419 insertions(+), 690 deletions(-) diff --git a/backend/dvadmin/system/fixtures/initSerializer.py b/backend/dvadmin/system/fixtures/initSerializer.py index a2d74f653..0b139c1af 100644 --- a/backend/dvadmin/system/fixtures/initSerializer.py +++ b/backend/dvadmin/system/fixtures/initSerializer.py @@ -9,7 +9,7 @@ django.setup() from dvadmin.system.models import ( Role, Dept, Users, Menu, MenuButton, ApiWhiteList, Dictionary, SystemConfig, - RoleMenuPermission, RoleMenuButtonPermission + RoleMenuPermission, RoleMenuButtonPermission, MenuField ) from dvadmin.utils.serializers import CustomModelSerializer @@ -53,6 +53,16 @@ class MenuButtonInitSerializer(CustomModelSerializer): read_only_fields = ["id"] +class MenuFieldInitSerializer(CustomModelSerializer): + """ + 初始化列权限-序列化器 + """ + + class Meta: + model = MenuField + fields = ['id', 'menu','field_name','title','model'] + read_only_fields = ["id"] + class MenuInitSerializer(CustomModelSerializer): """ 递归深度获取数信息(用于生成初始化json文件) @@ -60,7 +70,7 @@ class MenuInitSerializer(CustomModelSerializer): name = serializers.CharField(required=False) children = serializers.SerializerMethodField() menu_button = serializers.SerializerMethodField() - + menu_field = serializers.SerializerMethodField() def get_children(self, obj: Menu): data = [] instance = Menu.objects.filter(parent_id=obj.id) @@ -76,10 +86,18 @@ class MenuInitSerializer(CustomModelSerializer): data = list(instance.values('name', 'value', 'api', 'method')) return data + def get_menu_field(self, obj: Menu): + data = [] + instance = obj.menufield_set.order_by('field_name') + if instance: + data = list(instance.values('field_name', 'title','model')) + return data + def save(self, **kwargs): instance = super().save(**kwargs) children = self.initial_data.get('children') menu_button = self.initial_data.get('menu_button') + menu_field = self.initial_data.get('menu_field') # 菜单表 if children: for menu_data in children: @@ -108,12 +126,24 @@ class MenuInitSerializer(CustomModelSerializer): serializer = MenuButtonInitSerializer(instance_obj, data=menu_button_data, request=self.request) serializer.is_valid(raise_exception=True) serializer.save() + # 列权限 + if menu_field: + for field_data in menu_field: + field_data['menu'] = instance.id + filter_data = { + 'menu':field_data['menu'], + 'field_name':field_data['field_name'] + } + instance_obj = MenuField.objects.filter(**filter_data).first() + serializer = MenuFieldInitSerializer(instance_obj, data=field_data, request=self.request) + serializer.is_valid(raise_exception=True) + serializer.save() return instance class Meta: model = Menu fields = ['name', 'icon', 'sort', 'is_link', 'is_catalog', 'web_path', 'component', 'component_name', 'status', - 'cache', 'visible', 'parent', 'children', 'menu_button', 'creator', 'dept_belong_id'] + 'cache', 'visible', 'parent', 'children', 'menu_button','menu_field', 'creator', 'dept_belong_id'] extra_kwargs = { 'creator': {'write_only': True}, 'dept_belong_id': {'write_only': True} diff --git a/backend/dvadmin/system/fixtures/init_menu.json b/backend/dvadmin/system/fixtures/init_menu.json index a054af292..61a50589b 100644 --- a/backend/dvadmin/system/fixtures/init_menu.json +++ b/backend/dvadmin/system/fixtures/init_menu.json @@ -1,704 +1,1403 @@ [ - { - "name": "系统管理", - "icon": "iconfont icon-xitongshezhi", - "sort": 1, - "is_link": false, - "is_catalog": true, - "web_path": "/system", - "component": "", - "component_name": "", - "status": true, - "cache": false, - "visible": true, - "children": [ - { - "name": "菜单管理", - "icon": "iconfont icon-caidan", + { + "name": "ϵͳ", + "icon": "iconfont icon-xitongshezhi", "sort": 1, "is_link": false, - "is_catalog": false, - "web_path": "/menu", - "component": "system/menu/index", - "component_name": "menu", + "is_catalog": true, + "web_path": "/system", + "component": "", + "component_name": "", "status": true, "cache": false, "visible": true, - "children": [], - "menu_button": [ - { - "name": "查询", - "value": "menu:Search", - "api": "/api/system/menu/", - "method": 0 - }, - { - "name": "详情", - "value": "menu:Retrieve", - "api": "/api/system/menu/{id}/", - "method": 0 - }, - { - "name": "新增", - "value": "menu:Create", - "api": "/api/system/menu/", - "method": 1 - }, - { - "name": "编辑", - "value": "menu:Update", - "api": "/api/system/menu/{id}/", - "method": 2 - }, - { - "name": "删除", - "value": "menu:Delete", - "api": "/api/system/menu/{id}/", - "method": 3 - }, - { - "name": "查询所有", - "value": "menu:SearchAll", - "api": "/api/system/menu/get_all_menu/", - "method": 0 - }, - { - "name": "路由", - "value": "menu:router", - "api": "/api/system/menu/web_router/", - "method": 0 - }, - { - "name": "上移", - "value": "menu:MoveUp", - "api": "/api/system/menu/mode_up/", - "method": 1 - }, - { - "name": "下移", - "value": "menu:MoveDown", - "api": "/api/system/menu/mode_down/", - "method": 1 - }, - { - "name": "新增按钮权限", - "value": "btn:Create", - "api": "/api/system/menu_button/", - "method": 1 - }, - { - "name": "修改按钮权限", - "value": "btn:Update", - "api": "/api/system/menu_button/{id}/", - "method": 2 - }, - { - "name": "查询按钮权限", - "value": "btn:Search", - "api": "/api/system/menu_button/", - "method": 0 - }, - { - "name": "删除按钮权限", - "value": "btn:Delete", - "api": "/api/system/menu_button/{id}/", - "method": 3 - }, - { - "name": "查询列权限", - "value": "column:Search", - "api": "/api/system/column/", - "method": 0 - }, - { - "name": "新增列权限", - "value": "column:Create", - "api": "/api/system/column/", - "method": 1 - }, - { - "name": "编辑列权限", - "value": "column:Update", - "api": "/api/system/column/{id}/", - "method": 2 - }, - { - "name": "删除列权限", - "value": "column:Delete", - "api": "/api/system/column/{id}/", - "method": 3 - }, - { - "name": "自动匹配列权限", - "value": "column:Match", - "api": "/api/system/column/auto_match_fields/", - "method": 1 - } - ] - }, - { - "name": "部门管理", - "icon": "ele-OfficeBuilding", - "sort": 3, - "is_link": false, - "is_catalog": false, - "web_path": "/dept", - "component": "system/dept/index", - "component_name": "dept", - "status": true, - "cache": false, - "visible": true, - "children": [], - "menu_button": [ - { - "name": "查询", - "value": "dept:Search", - "api": "/api/system/dept/", - "method": 0 - }, - { - "name": "详情", - "value": "dept:Retrieve", - "api": "/api/system/dept/{id}/", - "method": 0 - }, - { - "name": "新增", - "value": "dept:Create", - "api": "/api/system/dept/", - "method": 1 - }, - { - "name": "编辑", - "value": "dept:Update", - "api": "/api/system/dept/{id}/", - "method": 2 - }, - { - "name": "删除", - "value": "dept:Delete", - "api": "/api/system/dept/{id}/", - "method": 3 - }, - { - "name": "查询所有", - "value": "dept:SearchAll", - "api": "/api/system/dept/all_dept/", - "method": 0 - }, - { - "name": "懒加载查询所有", - "value": "dept:LazySearchAll", - "api": "/api/system/dept/dept_lazy_tree/", - "method": 0 - }, - { - "name": "上移", - "value": "dept:MoveUp", - "api": "/api/system/dept/mode_up/", - "method": 1 - }, - { - "name": "下移", - "value": "dept:MoveDown", - "api": "/api/system/dept/mode_down/", - "method": 1 - }, - { - "name": "头信息", - "value": "dept:HeaderInfo", - "api": "/api/system/dept/dept_info/", - "method": 0 - } - ] - }, - { - "name": "角色管理", - "icon": "ele-ColdDrink", - "sort": 4, - "is_link": false, - "is_catalog": false, - "web_path": "/role", - "component": "system/role/index", - "component_name": "role", - "status": true, - "cache": false, - "visible": true, - "children": [], - "menu_button": [ - { - "name": "查询", - "value": "role:Search", - "api": "/api/system/role/", - "method": 0 - }, - { - "name": "详情", - "value": "role:Retrieve", - "api": "/api/system/role/{id}/", - "method": 0 - }, - { - "name": "新增", - "value": "role:Create", - "api": "/api/system/role/", - "method": 1 - }, - { - "name": "编辑", - "value": "role:Update", - "api": "/api/system/role/{id}/", - "method": 2 - }, - { - "name": "保存", - "value": "role:Save", - "api": "/api/system/role/{id}/", - "method": 2 - }, - { - "name": "删除", - "value": "role:Delete", - "api": "/api/system/role/{id}/", - "method": 3 - }, - { - "name": "权限配置", - "value": "role:Permission", - "api": "/api/system/role/{id}/", - "method": 0 - } - ] - }, - { - "name": "用户管理", - "icon": "iconfont icon-icon-", - "sort": 6, - "is_link": false, - "is_catalog": false, - "web_path": "/user", - "component": "system/user/index", - "component_name": "user", - "status": true, - "cache": false, - "visible": true, - "children": [], - "menu_button": [ - { - "name": "查询", - "value": "user:Search", - "api": "/api/system/user/", - "method": 0 - }, - { - "name": "详情", - "value": "user:Retrieve", - "api": "/api/system/user/{id}/", - "method": 0 - }, - { - "name": "新增", - "value": "user:Create", - "api": "/api/system/user/", - "method": 1 - }, - { - "name": "导出", - "value": "user:Export", - "api": "/api/system/user/export/", - "method": 1 - }, - { - "name": "导入", - "value": "user:Import", - "api": "/api/system/user/import/", - "method": 1 - }, - { - "name": "编辑", - "value": "user:Update", - "api": "/api/system/user/{id}/", - "method": 2 - }, - { - "name": "重设密码", - "value": "user:ResetPassword", - "api": "/api/system/user/{id}/reset_password/", - "method": 2 - }, - { - "name": "重置密码", - "value": "user:DefaultPassword", - "api": "/api/system/user/{id}/reset_to_default_password/", - "method": 2 - }, - { - "name": "删除", - "value": "user:Delete", - "api": "/api/system/user/{id}/", - "method": 3 - } - ] - }, - { - "name": "消息中心", - "icon": "iconfont icon-xiaoxizhongxin", - "sort": 7, - "is_link": false, - "is_catalog": false, - "web_path": "/messageCenter", - "component": "system/messageCenter/index", - "component_name": "messageCenter", - "status": true, - "cache": false, - "visible": true, - "children": [], - "menu_button": [ - { - "name": "查询", - "value": "messageCenter:Search", - "api": "/api/system/message_center/", - "method": 0 - }, - { - "name": "详情", - "value": "messageCenter:Retrieve", - "api": "/api/system/message_center/{id}/", - "method": 0 - }, - { - "name": "新增", - "value": "messageCenter:Create", - "api": "/api/system/message_center/", - "method": 1 - }, - { - "name": "编辑", - "value": "messageCenter:Update", - "api": "/api/system/message_center/{id}/", - "method": 2 - }, - { - "name": "删除", - "value": "messageCenter:Delete", - "api": "/api/system/menu/{id}/", - "method": 3 - } - ] - }, - { - "name": "接口白名单", - "icon": "ele-SetUp", - "sort": 8, - "is_link": false, - "is_catalog": false, - "web_path": "/apiWhiteList", - "component": "system/whiteList/index", - "component_name": "whiteList", - "status": true, - "cache": false, - "visible": true, - "children": [], - "menu_button": [ - { - "name": "查询", - "value": "api_white_list:Search", - "api": "/api/system/api_white_list/", - "method": 0 - }, - { - "name": "详情", - "value": "api_white_list:Retrieve", - "api": "/api/system/api_white_list/{id}/", - "method": 0 - }, - { - "name": "新增", - "value": "api_white_list:Create", - "api": "/api/system/api_white_list/", - "method": 1 - }, - { - "name": "编辑", - "value": "api_white_list:Update", - "api": "/api/system/api_white_list/{id}/", - "method": 2 - }, - { - "name": "删除", - "value": "api_white_list:Delete", - "api": "/api/system/api_white_list/{id}/", - "method": 3 - } - ] - } - ], - "menu_button": [] - }, - { - "name": "常规配置", - "icon": "iconfont icon-configure", - "sort": 2, - "is_link": false, - "is_catalog": true, - "web_path": "/generalConfig", - "component": "", - "component_name": "", - "status": true, - "cache": false, - "visible": true, - "children": [ - { - "name": "系统配置", - "icon": "iconfont icon-system", - "sort": 0, - "is_link": false, - "is_catalog": false, - "web_path": "/config", - "component": "system/config/index", - "component_name": "config", - "status": true, - "cache": false, - "visible": true, - "children": [], - "menu_button": [ - { - "name": "查询", - "value": "system_config:Search", - "api": "/api/system/system_config/", - "method": 0 - }, - { - "name": "详情", - "value": "system_config:Retrieve", - "api": "/api/system/system_config/{id}/", - "method": 0 - }, - { - "name": "新增", - "value": "system_config:Create", - "api": "/api/system/system_config/", - "method": 1 - }, - { - "name": "编辑", - "value": "system_config:Update", - "api": "/api/system/system_config/{id}/", - "method": 2 - }, - { - "name": "删除", - "value": "system_config:Delete", - "api": "/api/system/system_config/{id}/", - "method": 3 - } - ] - }, - { - "name": "字典管理", - "icon": "iconfont icon-dict", - "sort": 1, - "is_link": false, - "is_catalog": false, - "web_path": "/dictionary", - "component": "system/dictionary/index", - "component_name": "dictionary", - "status": true, - "cache": false, - "visible": true, - "children": [], - "menu_button": [ - { - "name": "查询", - "value": "dictionary:Search", - "api": "/api/system/dictionary/", - "method": 0 - }, - { - "name": "详情", - "value": "dictionary:Retrieve", - "api": "/api/system/dictionary/{id}/", - "method": 0 - }, - { - "name": "新增", - "value": "dictionary:Create", - "api": "/api/system/dictionary/", - "method": 1 - }, - { - "name": "编辑", - "value": "dictionary:Update", - "api": "/api/system/dictionary/{id}/", - "method": 2 - }, - { - "name": "删除", - "value": "dictionary:Delete", - "api": "/api/system/dictionary/{id}/", - "method": 3 - } - ] - }, - { - "name": "地区管理", - "icon": "iconfont icon-Area", + "parent": null, + "children": [ + { + "name": "˵", + "icon": "iconfont icon-caidan", + "sort": 1, + "is_link": false, + "is_catalog": false, + "web_path": "/menu", + "component": "system/menu/index", + "component_name": "menu", + "status": true, + "cache": false, + "visible": true, + "parent": 1, + "children": [], + "menu_button": [ + { + "name": "ѯ", + "value": "menu:Search", + "api": "/api/system/menu/", + "method": 0 + }, + { + "name": "", + "value": "menu:Retrieve", + "api": "/api/system/menu/{id}/", + "method": 0 + }, + { + "name": "ѯ", + "value": "menu:SearchAll", + "api": "/api/system/menu/get_all_menu/", + "method": 0 + }, + { + "name": "·", + "value": "menu:router", + "api": "/api/system/menu/web_router/", + "method": 0 + }, + { + "name": "ѯťȨ", + "value": "btn:Search", + "api": "/api/system/menu_button/", + "method": 0 + }, + { + "name": "ѯȨ", + "value": "column:Search", + "api": "/api/system/column/", + "method": 0 + }, + { + "name": "", + "value": "menu:Create", + "api": "/api/system/menu/", + "method": 1 + }, + { + "name": "", + "value": "menu:MoveUp", + "api": "/api/system/menu/mode_up/", + "method": 1 + }, + { + "name": "", + "value": "menu:MoveDown", + "api": "/api/system/menu/mode_down/", + "method": 1 + }, + { + "name": "ťȨ", + "value": "btn:Create", + "api": "/api/system/menu_button/", + "method": 1 + }, + { + "name": "Ȩ", + "value": "column:Create", + "api": "/api/system/column/", + "method": 1 + }, + { + "name": "ԶƥȨ", + "value": "column:Match", + "api": "/api/system/column/auto_match_fields/", + "method": 1 + }, + { + "name": "༭", + "value": "menu:Update", + "api": "/api/system/menu/{id}/", + "method": 2 + }, + { + "name": "İťȨ", + "value": "btn:Update", + "api": "/api/system/menu_button/{id}/", + "method": 2 + }, + { + "name": "༭Ȩ", + "value": "column:Update", + "api": "/api/system/column/{id}/", + "method": 2 + }, + { + "name": "ɾ", + "value": "menu:Delete", + "api": "/api/system/menu/{id}/", + "method": 3 + }, + { + "name": "ɾťȨ", + "value": "btn:Delete", + "api": "/api/system/menu_button/{id}/", + "method": 3 + }, + { + "name": "ɾȨ", + "value": "column:Delete", + "api": "/api/system/column/{id}/", + "method": 3 + } + ], + "menu_field": [] + }, + { + "name": "Ź", + "icon": "ele-OfficeBuilding", + "sort": 3, + "is_link": false, + "is_catalog": false, + "web_path": "/dept", + "component": "system/dept/index", + "component_name": "dept", + "status": true, + "cache": false, + "visible": true, + "parent": 1, + "children": [], + "menu_button": [ + { + "name": "ѯ", + "value": "dept:Search", + "api": "/api/system/dept/", + "method": 0 + }, + { + "name": "", + "value": "dept:Retrieve", + "api": "/api/system/dept/{id}/", + "method": 0 + }, + { + "name": "ѯ", + "value": "dept:SearchAll", + "api": "/api/system/dept/all_dept/", + "method": 0 + }, + { + "name": "زѯ", + "value": "dept:LazySearchAll", + "api": "/api/system/dept/dept_lazy_tree/", + "method": 0 + }, + { + "name": "ͷϢ", + "value": "dept:HeaderInfo", + "api": "/api/system/dept/dept_info/", + "method": 0 + }, + { + "name": "", + "value": "dept:Create", + "api": "/api/system/dept/", + "method": 1 + }, + { + "name": "", + "value": "dept:MoveUp", + "api": "/api/system/dept/mode_up/", + "method": 1 + }, + { + "name": "", + "value": "dept:MoveDown", + "api": "/api/system/dept/mode_down/", + "method": 1 + }, + { + "name": "༭", + "value": "dept:Update", + "api": "/api/system/dept/{id}/", + "method": 2 + }, + { + "name": "ɾ", + "value": "dept:Delete", + "api": "/api/system/dept/{id}/", + "method": 3 + } + ], + "menu_field": [] + }, + { + "name": "ɫ", + "icon": "ele-ColdDrink", + "sort": 4, + "is_link": false, + "is_catalog": false, + "web_path": "/role", + "component": "system/role/index", + "component_name": "role", + "status": true, + "cache": false, + "visible": true, + "parent": 1, + "children": [], + "menu_button": [ + { + "name": "ѯ", + "value": "role:Search", + "api": "/api/system/role/", + "method": 0 + }, + { + "name": "", + "value": "role:Retrieve", + "api": "/api/system/role/{id}/", + "method": 0 + }, + { + "name": "Ȩ", + "value": "role:Permission", + "api": "/api/system/role/{id}/", + "method": 0 + }, + { + "name": "", + "value": "role:Create", + "api": "/api/system/role/", + "method": 1 + }, + { + "name": "༭", + "value": "role:Update", + "api": "/api/system/role/{id}/", + "method": 2 + }, + { + "name": "", + "value": "role:Save", + "api": "/api/system/role/{id}/", + "method": 2 + }, + { + "name": "ɾ", + "value": "role:Delete", + "api": "/api/system/role/{id}/", + "method": 3 + } + ], + "menu_field": [ + { + "field_name": "create_datetime", + "title": "ʱ", + "model": "Role" + }, + { + "field_name": "creator", + "title": "", + "model": "Role" + }, + { + "field_name": "dept_belong_id", + "title": "ݹ", + "model": "Role" + }, + { + "field_name": "description", + "title": "", + "model": "Role" + }, + { + "field_name": "id", + "title": "Id", + "model": "Role" + }, + { + "field_name": "key", + "title": "Ȩַ", + "model": "Role" + }, + { + "field_name": "modifier", + "title": "", + "model": "Role" + }, + { + "field_name": "name", + "title": "ɫ", + "model": "Role" + }, + { + "field_name": "sort", + "title": "ɫ˳", + "model": "Role" + }, + { + "field_name": "status", + "title": "ɫ״̬", + "model": "Role" + }, + { + "field_name": "update_datetime", + "title": "ʱ", + "model": "Role" + } + ] + }, + { + "name": "û", + "icon": "iconfont icon-icon-", + "sort": 6, + "is_link": false, + "is_catalog": false, + "web_path": "/user", + "component": "system/user/index", + "component_name": "user", + "status": true, + "cache": false, + "visible": true, + "parent": 1, + "children": [], + "menu_button": [ + { + "name": "ѯ", + "value": "user:Search", + "api": "/api/system/user/", + "method": 0 + }, + { + "name": "", + "value": "user:Retrieve", + "api": "/api/system/user/{id}/", + "method": 0 + }, + { + "name": "", + "value": "user:Create", + "api": "/api/system/user/", + "method": 1 + }, + { + "name": "", + "value": "user:Export", + "api": "/api/system/user/export/", + "method": 1 + }, + { + "name": "", + "value": "user:Import", + "api": "/api/system/user/import/", + "method": 1 + }, + { + "name": "༭", + "value": "user:Update", + "api": "/api/system/user/{id}/", + "method": 2 + }, + { + "name": "", + "value": "user:ResetPassword", + "api": "/api/system/user/{id}/reset_password/", + "method": 2 + }, + { + "name": "", + "value": "user:DefaultPassword", + "api": "/api/system/user/{id}/reset_to_default_password/", + "method": 2 + }, + { + "name": "ɾ", + "value": "user:Delete", + "api": "/api/system/user/{id}/", + "method": 3 + } + ], + "menu_field": [ + { + "field_name": "avatar", + "title": "ͷ", + "model": "Users" + }, + { + "field_name": "create_datetime", + "title": "ʱ", + "model": "Users" + }, + { + "field_name": "creator", + "title": "", + "model": "Users" + }, + { + "field_name": "dept", + "title": "", + "model": "Users" + }, + { + "field_name": "dept_belong_id", + "title": "ݹ", + "model": "Users" + }, + { + "field_name": "description", + "title": "", + "model": "Users" + }, + { + "field_name": "email", + "title": "", + "model": "Users" + }, + { + "field_name": "gender", + "title": "Ա", + "model": "Users" + }, + { + "field_name": "id", + "title": "Id", + "model": "Users" + }, + { + "field_name": "mobile", + "title": "绰", + "model": "Users" + }, + { + "field_name": "modifier", + "title": "", + "model": "Users" + }, + { + "field_name": "name", + "title": "", + "model": "Users" + }, + { + "field_name": "update_datetime", + "title": "ʱ", + "model": "Users" + }, + { + "field_name": "username", + "title": "û˺", + "model": "Users" + }, + { + "field_name": "user_type", + "title": "û", + "model": "Users" + } + ] + }, + { + "name": "Ϣ", + "icon": "iconfont icon-xiaoxizhongxin", + "sort": 7, + "is_link": false, + "is_catalog": false, + "web_path": "/messageCenter", + "component": "system/messageCenter/index", + "component_name": "messageCenter", + "status": true, + "cache": false, + "visible": true, + "parent": 1, + "children": [], + "menu_button": [ + { + "name": "ѯ", + "value": "messageCenter:Search", + "api": "/api/system/message_center/", + "method": 0 + }, + { + "name": "", + "value": "messageCenter:Retrieve", + "api": "/api/system/message_center/{id}/", + "method": 0 + }, + { + "name": "", + "value": "messageCenter:Create", + "api": "/api/system/message_center/", + "method": 1 + }, + { + "name": "༭", + "value": "messageCenter:Update", + "api": "/api/system/message_center/{id}/", + "method": 2 + }, + { + "name": "ɾ", + "value": "messageCenter:Delete", + "api": "/api/system/menu/{id}/", + "method": 3 + } + ], + "menu_field": [ + { + "field_name": "content", + "title": "", + "model": "MessageCenter" + }, + { + "field_name": "create_datetime", + "title": "ʱ", + "model": "MessageCenter" + }, + { + "field_name": "creator", + "title": "", + "model": "MessageCenter" + }, + { + "field_name": "dept_belong_id", + "title": "ݹ", + "model": "MessageCenter" + }, + { + "field_name": "description", + "title": "", + "model": "MessageCenter" + }, + { + "field_name": "id", + "title": "Id", + "model": "MessageCenter" + }, + { + "field_name": "modifier", + "title": "", + "model": "MessageCenter" + }, + { + "field_name": "target_type", + "title": "Ŀ", + "model": "MessageCenter" + }, + { + "field_name": "title", + "title": "", + "model": "MessageCenter" + }, + { + "field_name": "update_datetime", + "title": "ʱ", + "model": "MessageCenter" + } + ] + }, + { + "name": "ӿڰ", + "icon": "ele-SetUp", + "sort": 8, + "is_link": false, + "is_catalog": false, + "web_path": "/apiWhiteList", + "component": "system/whiteList/index", + "component_name": "whiteList", + "status": true, + "cache": false, + "visible": true, + "parent": 1, + "children": [], + "menu_button": [ + { + "name": "ѯ", + "value": "api_white_list:Search", + "api": "/api/system/api_white_list/", + "method": 0 + }, + { + "name": "", + "value": "api_white_list:Retrieve", + "api": "/api/system/api_white_list/{id}/", + "method": 0 + }, + { + "name": "", + "value": "api_white_list:Create", + "api": "/api/system/api_white_list/", + "method": 1 + }, + { + "name": "༭", + "value": "api_white_list:Update", + "api": "/api/system/api_white_list/{id}/", + "method": 2 + }, + { + "name": "ɾ", + "value": "api_white_list:Delete", + "api": "/api/system/api_white_list/{id}/", + "method": 3 + } + ], + "menu_field": [ + { + "field_name": "create_datetime", + "title": "ʱ", + "model": "ApiWhiteList" + }, + { + "field_name": "creator", + "title": "", + "model": "ApiWhiteList" + }, + { + "field_name": "dept_belong_id", + "title": "ݹ", + "model": "ApiWhiteList" + }, + { + "field_name": "description", + "title": "", + "model": "ApiWhiteList" + }, + { + "field_name": "enable_datasource", + "title": "Ȩ", + "model": "ApiWhiteList" + }, + { + "field_name": "id", + "title": "Id", + "model": "ApiWhiteList" + }, + { + "field_name": "method", + "title": "ӿ", + "model": "ApiWhiteList" + }, + { + "field_name": "modifier", + "title": "", + "model": "ApiWhiteList" + }, + { + "field_name": "update_datetime", + "title": "ʱ", + "model": "ApiWhiteList" + }, + { + "field_name": "url", + "title": "url", + "model": "ApiWhiteList" + } + ] + } + ], + "menu_button": [], + "menu_field": [] + }, + { + "name": "", + "icon": "iconfont icon-configure", "sort": 2, "is_link": false, - "is_catalog": false, - "web_path": "/areas", - "component": "system/areas/index", - "component_name": "areas", + "is_catalog": true, + "web_path": "/generalConfig", + "component": "", + "component_name": "", "status": true, "cache": false, "visible": true, - "children": [], - "menu_button": [ - { - "name": "查询", - "value": "area:Search", - "api": "/api/system/area/", - "method": 0 - }, - { - "name": "详情", - "value": "area:Retrieve", - "api": "/api/system/area/{id}/", - "method": 0 - }, - { - "name": "新增", - "value": "area:Create", - "api": "/api/system/area/", - "method": 1 - }, - { - "name": "编辑", - "value": "area:Update", - "api": "/api/system/area/{id}/", - "method": 2 - }, - { - "name": "删除", - "value": "area:Delete", - "api": "/api/system/area/{id}/", - "method": 3 - } - ] - }, - { - "name": "附件管理", - "icon": "iconfont icon-file", + "parent": null, + "children": [ + { + "name": "ϵͳ", + "icon": "iconfont icon-system", + "sort": 0, + "is_link": false, + "is_catalog": false, + "web_path": "/config", + "component": "system/config/index", + "component_name": "config", + "status": true, + "cache": false, + "visible": true, + "parent": 10, + "children": [], + "menu_button": [ + { + "name": "ѯ", + "value": "system_config:Search", + "api": "/api/system/system_config/", + "method": 0 + }, + { + "name": "", + "value": "system_config:Retrieve", + "api": "/api/system/system_config/{id}/", + "method": 0 + }, + { + "name": "", + "value": "system_config:Create", + "api": "/api/system/system_config/", + "method": 1 + }, + { + "name": "༭", + "value": "system_config:Update", + "api": "/api/system/system_config/{id}/", + "method": 2 + }, + { + "name": "ɾ", + "value": "system_config:Delete", + "api": "/api/system/system_config/{id}/", + "method": 3 + } + ], + "menu_field": [] + }, + { + "name": "ֵ", + "icon": "iconfont icon-dict", + "sort": 1, + "is_link": false, + "is_catalog": false, + "web_path": "/dictionary", + "component": "system/dictionary/index", + "component_name": "dictionary", + "status": true, + "cache": false, + "visible": true, + "parent": 10, + "children": [], + "menu_button": [ + { + "name": "ѯ", + "value": "dictionary:Search", + "api": "/api/system/dictionary/", + "method": 0 + }, + { + "name": "", + "value": "dictionary:Retrieve", + "api": "/api/system/dictionary/{id}/", + "method": 0 + }, + { + "name": "", + "value": "dictionary:Create", + "api": "/api/system/dictionary/", + "method": 1 + }, + { + "name": "༭", + "value": "dictionary:Update", + "api": "/api/system/dictionary/{id}/", + "method": 2 + }, + { + "name": "ɾ", + "value": "dictionary:Delete", + "api": "/api/system/dictionary/{id}/", + "method": 3 + } + ], + "menu_field": [ + { + "field_name": "color", + "title": "ɫ", + "model": "Dictionary" + }, + { + "field_name": "create_datetime", + "title": "ʱ", + "model": "Dictionary" + }, + { + "field_name": "creator", + "title": "", + "model": "Dictionary" + }, + { + "field_name": "dept_belong_id", + "title": "ݹ", + "model": "Dictionary" + }, + { + "field_name": "description", + "title": "", + "model": "Dictionary" + }, + { + "field_name": "id", + "title": "Id", + "model": "Dictionary" + }, + { + "field_name": "is_value", + "title": "ǷΪvalueֵ", + "model": "Dictionary" + }, + { + "field_name": "label", + "title": "ֵ", + "model": "Dictionary" + }, + { + "field_name": "modifier", + "title": "", + "model": "Dictionary" + }, + { + "field_name": "parent", + "title": "", + "model": "Dictionary" + }, + { + "field_name": "remark", + "title": "ע", + "model": "Dictionary" + }, + { + "field_name": "sort", + "title": "ʾ", + "model": "Dictionary" + }, + { + "field_name": "status", + "title": "״̬", + "model": "Dictionary" + }, + { + "field_name": "type", + "title": "ֵ", + "model": "Dictionary" + }, + { + "field_name": "update_datetime", + "title": "ʱ", + "model": "Dictionary" + }, + { + "field_name": "value", + "title": "ֵ", + "model": "Dictionary" + } + ] + }, + { + "name": "", + "icon": "iconfont icon-Area", + "sort": 2, + "is_link": false, + "is_catalog": false, + "web_path": "/areas", + "component": "system/areas/index", + "component_name": "areas", + "status": true, + "cache": false, + "visible": true, + "parent": 10, + "children": [], + "menu_button": [ + { + "name": "ѯ", + "value": "area:Search", + "api": "/api/system/area/", + "method": 0 + }, + { + "name": "", + "value": "area:Retrieve", + "api": "/api/system/area/{id}/", + "method": 0 + }, + { + "name": "", + "value": "area:Create", + "api": "/api/system/area/", + "method": 1 + }, + { + "name": "༭", + "value": "area:Update", + "api": "/api/system/area/{id}/", + "method": 2 + }, + { + "name": "ɾ", + "value": "area:Delete", + "api": "/api/system/area/{id}/", + "method": 3 + } + ], + "menu_field": [ + { + "field_name": "code", + "title": "", + "model": "Area" + }, + { + "field_name": "create_datetime", + "title": "ʱ", + "model": "Area" + }, + { + "field_name": "creator", + "title": "", + "model": "Area" + }, + { + "field_name": "dept_belong_id", + "title": "ݹ", + "model": "Area" + }, + { + "field_name": "description", + "title": "", + "model": "Area" + }, + { + "field_name": "enable", + "title": "Ƿ", + "model": "Area" + }, + { + "field_name": "id", + "title": "Id", + "model": "Area" + }, + { + "field_name": "initials", + "title": "ĸ", + "model": "Area" + }, + { + "field_name": "level", + "title": "㼶(1ʡ 2 3 4缶)", + "model": "Area" + }, + { + "field_name": "modifier", + "title": "", + "model": "Area" + }, + { + "field_name": "name", + "title": "", + "model": "Area" + }, + { + "field_name": "pcode", + "title": "", + "model": "Area" + }, + { + "field_name": "pinyin", + "title": "ƴ", + "model": "Area" + }, + { + "field_name": "update_datetime", + "title": "ʱ", + "model": "Area" + } + ] + }, + { + "name": "", + "icon": "iconfont icon-file", + "sort": 3, + "is_link": false, + "is_catalog": false, + "web_path": "/file", + "component": "system/fileList/index", + "component_name": "file", + "status": true, + "cache": false, + "visible": true, + "parent": 10, + "children": [], + "menu_button": [ + { + "name": "", + "value": "file:Retrieve", + "api": "/api/system/file/{id}/", + "method": 0 + }, + { + "name": "ѯ", + "value": "file:Search", + "api": "/api/system/file/", + "method": 0 + }, + { + "name": "༭", + "value": "file:Update", + "api": "/api/system/file/{id}/", + "method": 1 + }, + { + "name": "ɾ", + "value": "file:Delete", + "api": "/api/system/file/{id}/", + "method": 3 + } + ], + "menu_field": [ + { + "field_name": "create_datetime", + "title": "ʱ", + "model": "FileList" + }, + { + "field_name": "creator", + "title": "", + "model": "FileList" + }, + { + "field_name": "dept_belong_id", + "title": "ݹ", + "model": "FileList" + }, + { + "field_name": "description", + "title": "", + "model": "FileList" + }, + { + "field_name": "engine", + "title": "", + "model": "FileList" + }, + { + "field_name": "file_url", + "title": "ļַ", + "model": "FileList" + }, + { + "field_name": "id", + "title": "Id", + "model": "FileList" + }, + { + "field_name": "md5sum", + "title": "ļmd5", + "model": "FileList" + }, + { + "field_name": "mime_type", + "title": "Mime", + "model": "FileList" + }, + { + "field_name": "modifier", + "title": "", + "model": "FileList" + }, + { + "field_name": "name", + "title": "", + "model": "FileList" + }, + { + "field_name": "size", + "title": "ļС", + "model": "FileList" + }, + { + "field_name": "update_datetime", + "title": "ʱ", + "model": "FileList" + }, + { + "field_name": "url", + "title": "url", + "model": "FileList" + } + ] + } + ], + "menu_button": [], + "menu_field": [] + }, + { + "name": "־", + "icon": "iconfont icon-rizhi", "sort": 3, "is_link": false, - "is_catalog": false, - "web_path": "/file", - "component": "system/fileList/index", - "component_name": "file", - "status": true, - "cache": false, - "visible": true, - "children": [], - "menu_button": [ - { - "name": "详情", - "value": "file:Retrieve", - "api": "/api/system/file/{id}/", - "method": 0 - }, - { - "name": "查询", - "value": "file:Search", - "api": "/api/system/file/", - "method": 0 - }, - { - "name": "编辑", - "value": "file:Update", - "api": "/api/system/file/{id}/", - "method": 1 - }, - { - "name": "删除", - "value": "file:Delete", - "api": "/api/system/file/{id}/", - "method": 3 - } - ] - } - ], - "menu_button": [] - }, - { - "name": "日志管理", - "icon": "iconfont icon-rizhi", - "sort": 3, - "is_link": false, - "is_catalog": true, - "web_path": "/log", - "component": "", - "component_name": "", - "status": true, - "cache": false, - "visible": true, - "children": [ - { - "name": "登录日志", - "icon": "iconfont icon-guanlidenglurizhi", - "sort": 1, - "is_link": false, - "is_catalog": false, - "web_path": "/loginLog", - "component": "system/log/loginLog/index", - "component_name": "loginLog", - "status": true, - "cache": false, - "visible": true, - "children": [], - "menu_button": [ - { - "name": "查询", - "value": "login_log:Search", - "api": "/api/system/login_log/", - "method": 0 - }, - { - "name": "详情", - "value": "login_log:Retrieve", - "api": "/api/system/login_log/{id}/", - "method": 0 - } - ] - }, - { - "name": "操作日志", - "icon": "iconfont icon-caozuorizhi", - "sort": 2, - "is_link": false, - "is_catalog": false, - "web_path": "/operationLog", - "component": "system/log/operationLog/index", - "component_name": "operationLog", + "is_catalog": true, + "web_path": "/log", + "component": "", + "component_name": "", "status": true, "cache": false, "visible": true, - "children": [], - "menu_button": [ - { - "name": "详情", - "value": "operation_log:Retrieve", - "api": "/api/system/operation_log/{id}/", - "method": 0 - }, - { - "name": "查询", - "value": "operation_log:Search", - "api": "/api/system/operation_log/", - "method": 0 - } - ] - } - ], - "menu_button": [] - } + "parent": null, + "children": [ + { + "name": "¼־", + "icon": "iconfont icon-guanlidenglurizhi", + "sort": 1, + "is_link": false, + "is_catalog": false, + "web_path": "/loginLog", + "component": "system/log/loginLog/index", + "component_name": "loginLog", + "status": true, + "cache": false, + "visible": true, + "parent": 15, + "children": [], + "menu_button": [ + { + "name": "ѯ", + "value": "login_log:Search", + "api": "/api/system/login_log/", + "method": 0 + }, + { + "name": "", + "value": "login_log:Retrieve", + "api": "/api/system/login_log/{id}/", + "method": 0 + } + ], + "menu_field": [ + { + "field_name": "agent", + "title": "agentϢ", + "model": "LoginLog" + }, + { + "field_name": "area_code", + "title": "", + "model": "LoginLog" + }, + { + "field_name": "browser", + "title": "", + "model": "LoginLog" + }, + { + "field_name": "city", + "title": "", + "model": "LoginLog" + }, + { + "field_name": "continent", + "title": "", + "model": "LoginLog" + }, + { + "field_name": "country", + "title": "", + "model": "LoginLog" + }, + { + "field_name": "country_code", + "title": "", + "model": "LoginLog" + }, + { + "field_name": "country_english", + "title": "Ӣȫ", + "model": "LoginLog" + }, + { + "field_name": "create_datetime", + "title": "ʱ", + "model": "LoginLog" + }, + { + "field_name": "creator", + "title": "", + "model": "LoginLog" + }, + { + "field_name": "dept_belong_id", + "title": "ݹ", + "model": "LoginLog" + }, + { + "field_name": "description", + "title": "", + "model": "LoginLog" + }, + { + "field_name": "district", + "title": "", + "model": "LoginLog" + }, + { + "field_name": "id", + "title": "Id", + "model": "LoginLog" + }, + { + "field_name": "ip", + "title": "¼ip", + "model": "LoginLog" + }, + { + "field_name": "isp", + "title": "Ӫ", + "model": "LoginLog" + }, + { + "field_name": "latitude", + "title": "γ", + "model": "LoginLog" + }, + { + "field_name": "login_type", + "title": "¼", + "model": "LoginLog" + }, + { + "field_name": "longitude", + "title": "", + "model": "LoginLog" + }, + { + "field_name": "modifier", + "title": "", + "model": "LoginLog" + }, + { + "field_name": "os", + "title": "ϵͳ", + "model": "LoginLog" + }, + { + "field_name": "province", + "title": "ʡ", + "model": "LoginLog" + }, + { + "field_name": "update_datetime", + "title": "ʱ", + "model": "LoginLog" + }, + { + "field_name": "username", + "title": "¼û", + "model": "LoginLog" + } + ] + }, + { + "name": "־", + "icon": "iconfont icon-caozuorizhi", + "sort": 2, + "is_link": false, + "is_catalog": false, + "web_path": "/operationLog", + "component": "system/log/operationLog/index", + "component_name": "operationLog", + "status": true, + "cache": false, + "visible": true, + "parent": 15, + "children": [], + "menu_button": [ + { + "name": "", + "value": "operation_log:Retrieve", + "api": "/api/system/operation_log/{id}/", + "method": 0 + }, + { + "name": "ѯ", + "value": "operation_log:Search", + "api": "/api/system/operation_log/", + "method": 0 + } + ], + "menu_field": [ + { + "field_name": "create_datetime", + "title": "ʱ", + "model": "OperationLog" + }, + { + "field_name": "creator", + "title": "", + "model": "OperationLog" + }, + { + "field_name": "dept_belong_id", + "title": "ݹ", + "model": "OperationLog" + }, + { + "field_name": "description", + "title": "", + "model": "OperationLog" + }, + { + "field_name": "id", + "title": "Id", + "model": "OperationLog" + }, + { + "field_name": "json_result", + "title": "Ϣ", + "model": "OperationLog" + }, + { + "field_name": "modifier", + "title": "", + "model": "OperationLog" + }, + { + "field_name": "request_body", + "title": "", + "model": "OperationLog" + }, + { + "field_name": "request_browser", + "title": "", + "model": "OperationLog" + }, + { + "field_name": "request_ip", + "title": "ipַ", + "model": "OperationLog" + }, + { + "field_name": "request_method", + "title": "ʽ", + "model": "OperationLog" + }, + { + "field_name": "request_modular", + "title": "ģ", + "model": "OperationLog" + }, + { + "field_name": "request_msg", + "title": "˵", + "model": "OperationLog" + }, + { + "field_name": "request_os", + "title": "ϵͳ", + "model": "OperationLog" + }, + { + "field_name": "request_path", + "title": "ַ", + "model": "OperationLog" + }, + { + "field_name": "response_code", + "title": "Ӧ״̬", + "model": "OperationLog" + }, + { + "field_name": "status", + "title": "Ӧ״̬", + "model": "OperationLog" + }, + { + "field_name": "update_datetime", + "title": "ʱ", + "model": "OperationLog" + } + ] + } + ], + "menu_button": [], + "menu_field": [] + } ] \ No newline at end of file -- Gitee From d721405ee4d34ca07e64051fb69c1c8e1c1c6322 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8C=BF=E5=B0=8F=E5=A4=A9?= <1638245306@qq.com> Date: Sun, 26 Nov 2023 11:43:43 +0800 Subject: [PATCH 31/40] =?UTF-8?q?1.=E6=9B=B4=E6=96=B0=E5=88=97=E6=9D=83?= =?UTF-8?q?=E9=99=90=E5=88=9D=E5=A7=8B=E5=8C=96=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/views/system/menu/components/MenuFieldCom/crud.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web/src/views/system/menu/components/MenuFieldCom/crud.tsx b/web/src/views/system/menu/components/MenuFieldCom/crud.tsx index 17d4a8316..e60ba47ce 100644 --- a/web/src/views/system/menu/components/MenuFieldCom/crud.tsx +++ b/web/src/views/system/menu/components/MenuFieldCom/crud.tsx @@ -133,6 +133,7 @@ export const createCrudOptions = function ({ crudExpose, props,modelDialog,selec ], component: { span: 12, + placeholder: '请输入中文名', }, }, }, @@ -152,6 +153,7 @@ export const createCrudOptions = function ({ crudExpose, props,modelDialog,selec ], component: { span: 12, + placeholder: '请输入字段名', }, }, }, -- Gitee From a2d4d6e07e5748800e8d4bba65a4ed14488a1513 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BC=BA?= <1206709430@qq.com> Date: Tue, 28 Nov 2023 10:29:05 +0800 Subject: [PATCH 32/40] =?UTF-8?q?feat:=20=E5=88=9D=E5=A7=8B=E5=8C=96?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dvadmin/system/fixtures/init_menu.json | 426 +++++++++--------- 1 file changed, 213 insertions(+), 213 deletions(-) diff --git a/backend/dvadmin/system/fixtures/init_menu.json b/backend/dvadmin/system/fixtures/init_menu.json index 61a50589b..425887234 100644 --- a/backend/dvadmin/system/fixtures/init_menu.json +++ b/backend/dvadmin/system/fixtures/init_menu.json @@ -1,6 +1,6 @@ [ { - "name": "ϵͳ", + "name": "系统管理", "icon": "iconfont icon-xitongshezhi", "sort": 1, "is_link": false, @@ -14,7 +14,7 @@ "parent": null, "children": [ { - "name": "˵", + "name": "菜单管理", "icon": "iconfont icon-caidan", "sort": 1, "is_link": false, @@ -29,109 +29,109 @@ "children": [], "menu_button": [ { - "name": "ѯ", + "name": "查询", "value": "menu:Search", "api": "/api/system/menu/", "method": 0 }, { - "name": "", + "name": "详情", "value": "menu:Retrieve", "api": "/api/system/menu/{id}/", "method": 0 }, { - "name": "ѯ", + "name": "查询所有", "value": "menu:SearchAll", "api": "/api/system/menu/get_all_menu/", "method": 0 }, { - "name": "·", + "name": "路由", "value": "menu:router", "api": "/api/system/menu/web_router/", "method": 0 }, { - "name": "ѯťȨ", + "name": "查询按钮权限", "value": "btn:Search", "api": "/api/system/menu_button/", "method": 0 }, { - "name": "ѯȨ", + "name": "查询列权限", "value": "column:Search", "api": "/api/system/column/", "method": 0 }, { - "name": "", + "name": "新增", "value": "menu:Create", "api": "/api/system/menu/", "method": 1 }, { - "name": "", + "name": "上移", "value": "menu:MoveUp", "api": "/api/system/menu/mode_up/", "method": 1 }, { - "name": "", + "name": "下移", "value": "menu:MoveDown", "api": "/api/system/menu/mode_down/", "method": 1 }, { - "name": "ťȨ", + "name": "新增按钮权限", "value": "btn:Create", "api": "/api/system/menu_button/", "method": 1 }, { - "name": "Ȩ", + "name": "新增列权限", "value": "column:Create", "api": "/api/system/column/", "method": 1 }, { - "name": "ԶƥȨ", + "name": "自动匹配列权限", "value": "column:Match", "api": "/api/system/column/auto_match_fields/", "method": 1 }, { - "name": "༭", + "name": "编辑", "value": "menu:Update", "api": "/api/system/menu/{id}/", "method": 2 }, { - "name": "İťȨ", + "name": "修改按钮权限", "value": "btn:Update", "api": "/api/system/menu_button/{id}/", "method": 2 }, { - "name": "༭Ȩ", + "name": "编辑列权限", "value": "column:Update", "api": "/api/system/column/{id}/", "method": 2 }, { - "name": "ɾ", + "name": "删除", "value": "menu:Delete", "api": "/api/system/menu/{id}/", "method": 3 }, { - "name": "ɾťȨ", + "name": "删除按钮权限", "value": "btn:Delete", "api": "/api/system/menu_button/{id}/", "method": 3 }, { - "name": "ɾȨ", + "name": "删除列权限", "value": "column:Delete", "api": "/api/system/column/{id}/", "method": 3 @@ -140,7 +140,7 @@ "menu_field": [] }, { - "name": "Ź", + "name": "部门管理", "icon": "ele-OfficeBuilding", "sort": 3, "is_link": false, @@ -155,61 +155,61 @@ "children": [], "menu_button": [ { - "name": "ѯ", + "name": "查询", "value": "dept:Search", "api": "/api/system/dept/", "method": 0 }, { - "name": "", + "name": "详情", "value": "dept:Retrieve", "api": "/api/system/dept/{id}/", "method": 0 }, { - "name": "ѯ", + "name": "查询所有", "value": "dept:SearchAll", "api": "/api/system/dept/all_dept/", "method": 0 }, { - "name": "زѯ", + "name": "懒加载查询所有", "value": "dept:LazySearchAll", "api": "/api/system/dept/dept_lazy_tree/", "method": 0 }, { - "name": "ͷϢ", + "name": "头信息", "value": "dept:HeaderInfo", "api": "/api/system/dept/dept_info/", "method": 0 }, { - "name": "", + "name": "新增", "value": "dept:Create", "api": "/api/system/dept/", "method": 1 }, { - "name": "", + "name": "上移", "value": "dept:MoveUp", "api": "/api/system/dept/mode_up/", "method": 1 }, { - "name": "", + "name": "下移", "value": "dept:MoveDown", "api": "/api/system/dept/mode_down/", "method": 1 }, { - "name": "༭", + "name": "编辑", "value": "dept:Update", "api": "/api/system/dept/{id}/", "method": 2 }, { - "name": "ɾ", + "name": "删除", "value": "dept:Delete", "api": "/api/system/dept/{id}/", "method": 3 @@ -218,7 +218,7 @@ "menu_field": [] }, { - "name": "ɫ", + "name": "角色管理", "icon": "ele-ColdDrink", "sort": 4, "is_link": false, @@ -233,43 +233,43 @@ "children": [], "menu_button": [ { - "name": "ѯ", + "name": "查询", "value": "role:Search", "api": "/api/system/role/", "method": 0 }, { - "name": "", + "name": "详情", "value": "role:Retrieve", "api": "/api/system/role/{id}/", "method": 0 }, { - "name": "Ȩ", + "name": "权限配置", "value": "role:Permission", "api": "/api/system/role/{id}/", "method": 0 }, { - "name": "", + "name": "新增", "value": "role:Create", "api": "/api/system/role/", "method": 1 }, { - "name": "༭", + "name": "编辑", "value": "role:Update", "api": "/api/system/role/{id}/", "method": 2 }, { - "name": "", + "name": "保存", "value": "role:Save", "api": "/api/system/role/{id}/", "method": 2 }, { - "name": "ɾ", + "name": "删除", "value": "role:Delete", "api": "/api/system/role/{id}/", "method": 3 @@ -278,22 +278,22 @@ "menu_field": [ { "field_name": "create_datetime", - "title": "ʱ", + "title": "创建时间", "model": "Role" }, { "field_name": "creator", - "title": "", + "title": "创建人", "model": "Role" }, { "field_name": "dept_belong_id", - "title": "ݹ", + "title": "数据归属部门", "model": "Role" }, { "field_name": "description", - "title": "", + "title": "描述", "model": "Role" }, { @@ -303,38 +303,38 @@ }, { "field_name": "key", - "title": "Ȩַ", + "title": "权限字符", "model": "Role" }, { "field_name": "modifier", - "title": "", + "title": "修改人", "model": "Role" }, { "field_name": "name", - "title": "ɫ", + "title": "角色名称", "model": "Role" }, { "field_name": "sort", - "title": "ɫ˳", + "title": "角色顺序", "model": "Role" }, { "field_name": "status", - "title": "ɫ״̬", + "title": "角色状态", "model": "Role" }, { "field_name": "update_datetime", - "title": "ʱ", + "title": "修改时间", "model": "Role" } ] }, { - "name": "û", + "name": "用户管理", "icon": "iconfont icon-icon-", "sort": 6, "is_link": false, @@ -349,55 +349,55 @@ "children": [], "menu_button": [ { - "name": "ѯ", + "name": "查询", "value": "user:Search", "api": "/api/system/user/", "method": 0 }, { - "name": "", + "name": "详情", "value": "user:Retrieve", "api": "/api/system/user/{id}/", "method": 0 }, { - "name": "", + "name": "新增", "value": "user:Create", "api": "/api/system/user/", "method": 1 }, { - "name": "", + "name": "导出", "value": "user:Export", "api": "/api/system/user/export/", "method": 1 }, { - "name": "", + "name": "导入", "value": "user:Import", "api": "/api/system/user/import/", "method": 1 }, { - "name": "༭", + "name": "编辑", "value": "user:Update", "api": "/api/system/user/{id}/", "method": 2 }, { - "name": "", + "name": "重设密码", "value": "user:ResetPassword", "api": "/api/system/user/{id}/reset_password/", "method": 2 }, { - "name": "", + "name": "重置密码", "value": "user:DefaultPassword", "api": "/api/system/user/{id}/reset_to_default_password/", "method": 2 }, { - "name": "ɾ", + "name": "删除", "value": "user:Delete", "api": "/api/system/user/{id}/", "method": 3 @@ -406,42 +406,42 @@ "menu_field": [ { "field_name": "avatar", - "title": "ͷ", + "title": "头像", "model": "Users" }, { "field_name": "create_datetime", - "title": "ʱ", + "title": "创建时间", "model": "Users" }, { "field_name": "creator", - "title": "", + "title": "创建人", "model": "Users" }, { "field_name": "dept", - "title": "", + "title": "所属部门", "model": "Users" }, { "field_name": "dept_belong_id", - "title": "ݹ", + "title": "数据归属部门", "model": "Users" }, { "field_name": "description", - "title": "", + "title": "描述", "model": "Users" }, { "field_name": "email", - "title": "", + "title": "邮箱", "model": "Users" }, { "field_name": "gender", - "title": "Ա", + "title": "性别", "model": "Users" }, { @@ -451,38 +451,38 @@ }, { "field_name": "mobile", - "title": "绰", + "title": "电话", "model": "Users" }, { "field_name": "modifier", - "title": "", + "title": "修改人", "model": "Users" }, { "field_name": "name", - "title": "", + "title": "姓名", "model": "Users" }, { "field_name": "update_datetime", - "title": "ʱ", + "title": "修改时间", "model": "Users" }, { "field_name": "username", - "title": "û˺", + "title": "用户账号", "model": "Users" }, { "field_name": "user_type", - "title": "û", + "title": "用户类型", "model": "Users" } ] }, { - "name": "Ϣ", + "name": "消息中心", "icon": "iconfont icon-xiaoxizhongxin", "sort": 7, "is_link": false, @@ -497,31 +497,31 @@ "children": [], "menu_button": [ { - "name": "ѯ", + "name": "查询", "value": "messageCenter:Search", "api": "/api/system/message_center/", "method": 0 }, { - "name": "", + "name": "详情", "value": "messageCenter:Retrieve", "api": "/api/system/message_center/{id}/", "method": 0 }, { - "name": "", + "name": "新增", "value": "messageCenter:Create", "api": "/api/system/message_center/", "method": 1 }, { - "name": "༭", + "name": "编辑", "value": "messageCenter:Update", "api": "/api/system/message_center/{id}/", "method": 2 }, { - "name": "ɾ", + "name": "删除", "value": "messageCenter:Delete", "api": "/api/system/menu/{id}/", "method": 3 @@ -530,27 +530,27 @@ "menu_field": [ { "field_name": "content", - "title": "", + "title": "内容", "model": "MessageCenter" }, { "field_name": "create_datetime", - "title": "ʱ", + "title": "创建时间", "model": "MessageCenter" }, { "field_name": "creator", - "title": "", + "title": "创建人", "model": "MessageCenter" }, { "field_name": "dept_belong_id", - "title": "ݹ", + "title": "数据归属部门", "model": "MessageCenter" }, { "field_name": "description", - "title": "", + "title": "描述", "model": "MessageCenter" }, { @@ -560,28 +560,28 @@ }, { "field_name": "modifier", - "title": "", + "title": "修改人", "model": "MessageCenter" }, { "field_name": "target_type", - "title": "Ŀ", + "title": "目标类型", "model": "MessageCenter" }, { "field_name": "title", - "title": "", + "title": "标题", "model": "MessageCenter" }, { "field_name": "update_datetime", - "title": "ʱ", + "title": "修改时间", "model": "MessageCenter" } ] }, { - "name": "ӿڰ", + "name": "接口白名单", "icon": "ele-SetUp", "sort": 8, "is_link": false, @@ -596,31 +596,31 @@ "children": [], "menu_button": [ { - "name": "ѯ", + "name": "查询", "value": "api_white_list:Search", "api": "/api/system/api_white_list/", "method": 0 }, { - "name": "", + "name": "详情", "value": "api_white_list:Retrieve", "api": "/api/system/api_white_list/{id}/", "method": 0 }, { - "name": "", + "name": "新增", "value": "api_white_list:Create", "api": "/api/system/api_white_list/", "method": 1 }, { - "name": "༭", + "name": "编辑", "value": "api_white_list:Update", "api": "/api/system/api_white_list/{id}/", "method": 2 }, { - "name": "ɾ", + "name": "删除", "value": "api_white_list:Delete", "api": "/api/system/api_white_list/{id}/", "method": 3 @@ -629,27 +629,27 @@ "menu_field": [ { "field_name": "create_datetime", - "title": "ʱ", + "title": "创建时间", "model": "ApiWhiteList" }, { "field_name": "creator", - "title": "", + "title": "创建人", "model": "ApiWhiteList" }, { "field_name": "dept_belong_id", - "title": "ݹ", + "title": "数据归属部门", "model": "ApiWhiteList" }, { "field_name": "description", - "title": "", + "title": "描述", "model": "ApiWhiteList" }, { "field_name": "enable_datasource", - "title": "Ȩ", + "title": "激活数据权限", "model": "ApiWhiteList" }, { @@ -659,17 +659,17 @@ }, { "field_name": "method", - "title": "ӿ", + "title": "接口请求方法", "model": "ApiWhiteList" }, { "field_name": "modifier", - "title": "", + "title": "修改人", "model": "ApiWhiteList" }, { "field_name": "update_datetime", - "title": "ʱ", + "title": "修改时间", "model": "ApiWhiteList" }, { @@ -684,7 +684,7 @@ "menu_field": [] }, { - "name": "", + "name": "常规配置", "icon": "iconfont icon-configure", "sort": 2, "is_link": false, @@ -698,7 +698,7 @@ "parent": null, "children": [ { - "name": "ϵͳ", + "name": "系统配置", "icon": "iconfont icon-system", "sort": 0, "is_link": false, @@ -713,31 +713,31 @@ "children": [], "menu_button": [ { - "name": "ѯ", + "name": "查询", "value": "system_config:Search", "api": "/api/system/system_config/", "method": 0 }, { - "name": "", + "name": "详情", "value": "system_config:Retrieve", "api": "/api/system/system_config/{id}/", "method": 0 }, { - "name": "", + "name": "新增", "value": "system_config:Create", "api": "/api/system/system_config/", "method": 1 }, { - "name": "༭", + "name": "编辑", "value": "system_config:Update", "api": "/api/system/system_config/{id}/", "method": 2 }, { - "name": "ɾ", + "name": "删除", "value": "system_config:Delete", "api": "/api/system/system_config/{id}/", "method": 3 @@ -746,7 +746,7 @@ "menu_field": [] }, { - "name": "ֵ", + "name": "字典管理", "icon": "iconfont icon-dict", "sort": 1, "is_link": false, @@ -761,31 +761,31 @@ "children": [], "menu_button": [ { - "name": "ѯ", + "name": "查询", "value": "dictionary:Search", "api": "/api/system/dictionary/", "method": 0 }, { - "name": "", + "name": "详情", "value": "dictionary:Retrieve", "api": "/api/system/dictionary/{id}/", "method": 0 }, { - "name": "", + "name": "新增", "value": "dictionary:Create", "api": "/api/system/dictionary/", "method": 1 }, { - "name": "༭", + "name": "编辑", "value": "dictionary:Update", "api": "/api/system/dictionary/{id}/", "method": 2 }, { - "name": "ɾ", + "name": "删除", "value": "dictionary:Delete", "api": "/api/system/dictionary/{id}/", "method": 3 @@ -794,27 +794,27 @@ "menu_field": [ { "field_name": "color", - "title": "ɫ", + "title": "颜色", "model": "Dictionary" }, { "field_name": "create_datetime", - "title": "ʱ", + "title": "创建时间", "model": "Dictionary" }, { "field_name": "creator", - "title": "", + "title": "创建人", "model": "Dictionary" }, { "field_name": "dept_belong_id", - "title": "ݹ", + "title": "数据归属部门", "model": "Dictionary" }, { "field_name": "description", - "title": "", + "title": "描述", "model": "Dictionary" }, { @@ -824,58 +824,58 @@ }, { "field_name": "is_value", - "title": "ǷΪvalueֵ", + "title": "是否为value值", "model": "Dictionary" }, { "field_name": "label", - "title": "ֵ", + "title": "字典名称", "model": "Dictionary" }, { "field_name": "modifier", - "title": "", + "title": "修改人", "model": "Dictionary" }, { "field_name": "parent", - "title": "", + "title": "父级", "model": "Dictionary" }, { "field_name": "remark", - "title": "ע", + "title": "备注", "model": "Dictionary" }, { "field_name": "sort", - "title": "ʾ", + "title": "显示排序", "model": "Dictionary" }, { "field_name": "status", - "title": "״̬", + "title": "状态", "model": "Dictionary" }, { "field_name": "type", - "title": "ֵ", + "title": "数据值类型", "model": "Dictionary" }, { "field_name": "update_datetime", - "title": "ʱ", + "title": "修改时间", "model": "Dictionary" }, { "field_name": "value", - "title": "ֵ", + "title": "字典编号", "model": "Dictionary" } ] }, { - "name": "", + "name": "地区管理", "icon": "iconfont icon-Area", "sort": 2, "is_link": false, @@ -890,31 +890,31 @@ "children": [], "menu_button": [ { - "name": "ѯ", + "name": "查询", "value": "area:Search", "api": "/api/system/area/", "method": 0 }, { - "name": "", + "name": "详情", "value": "area:Retrieve", "api": "/api/system/area/{id}/", "method": 0 }, { - "name": "", + "name": "新增", "value": "area:Create", "api": "/api/system/area/", "method": 1 }, { - "name": "༭", + "name": "编辑", "value": "area:Update", "api": "/api/system/area/{id}/", "method": 2 }, { - "name": "ɾ", + "name": "删除", "value": "area:Delete", "api": "/api/system/area/{id}/", "method": 3 @@ -923,32 +923,32 @@ "menu_field": [ { "field_name": "code", - "title": "", + "title": "地区编码", "model": "Area" }, { "field_name": "create_datetime", - "title": "ʱ", + "title": "创建时间", "model": "Area" }, { "field_name": "creator", - "title": "", + "title": "创建人", "model": "Area" }, { "field_name": "dept_belong_id", - "title": "ݹ", + "title": "数据归属部门", "model": "Area" }, { "field_name": "description", - "title": "", + "title": "描述", "model": "Area" }, { "field_name": "enable", - "title": "Ƿ", + "title": "是否启用", "model": "Area" }, { @@ -958,43 +958,43 @@ }, { "field_name": "initials", - "title": "ĸ", + "title": "首字母", "model": "Area" }, { "field_name": "level", - "title": "㼶(1ʡ 2 3 4缶)", + "title": "地区层级(1省份 2城市 3区县 4乡级)", "model": "Area" }, { "field_name": "modifier", - "title": "", + "title": "修改人", "model": "Area" }, { "field_name": "name", - "title": "", + "title": "名称", "model": "Area" }, { "field_name": "pcode", - "title": "", + "title": "父地区编码", "model": "Area" }, { "field_name": "pinyin", - "title": "ƴ", + "title": "拼音", "model": "Area" }, { "field_name": "update_datetime", - "title": "ʱ", + "title": "修改时间", "model": "Area" } ] }, { - "name": "", + "name": "附件管理", "icon": "iconfont icon-file", "sort": 3, "is_link": false, @@ -1009,25 +1009,25 @@ "children": [], "menu_button": [ { - "name": "", + "name": "详情", "value": "file:Retrieve", "api": "/api/system/file/{id}/", "method": 0 }, { - "name": "ѯ", + "name": "查询", "value": "file:Search", "api": "/api/system/file/", "method": 0 }, { - "name": "༭", + "name": "编辑", "value": "file:Update", "api": "/api/system/file/{id}/", "method": 1 }, { - "name": "ɾ", + "name": "删除", "value": "file:Delete", "api": "/api/system/file/{id}/", "method": 3 @@ -1036,32 +1036,32 @@ "menu_field": [ { "field_name": "create_datetime", - "title": "ʱ", + "title": "创建时间", "model": "FileList" }, { "field_name": "creator", - "title": "", + "title": "创建人", "model": "FileList" }, { "field_name": "dept_belong_id", - "title": "ݹ", + "title": "数据归属部门", "model": "FileList" }, { "field_name": "description", - "title": "", + "title": "描述", "model": "FileList" }, { "field_name": "engine", - "title": "", + "title": "引擎", "model": "FileList" }, { "field_name": "file_url", - "title": "ļַ", + "title": "文件地址", "model": "FileList" }, { @@ -1071,32 +1071,32 @@ }, { "field_name": "md5sum", - "title": "ļmd5", + "title": "文件md5", "model": "FileList" }, { "field_name": "mime_type", - "title": "Mime", + "title": "Mime类型", "model": "FileList" }, { "field_name": "modifier", - "title": "", + "title": "修改人", "model": "FileList" }, { "field_name": "name", - "title": "", + "title": "名称", "model": "FileList" }, { "field_name": "size", - "title": "ļС", + "title": "文件大小", "model": "FileList" }, { "field_name": "update_datetime", - "title": "ʱ", + "title": "修改时间", "model": "FileList" }, { @@ -1111,7 +1111,7 @@ "menu_field": [] }, { - "name": "־", + "name": "日志管理", "icon": "iconfont icon-rizhi", "sort": 3, "is_link": false, @@ -1125,7 +1125,7 @@ "parent": null, "children": [ { - "name": "¼־", + "name": "登录日志", "icon": "iconfont icon-guanlidenglurizhi", "sort": 1, "is_link": false, @@ -1140,13 +1140,13 @@ "children": [], "menu_button": [ { - "name": "ѯ", + "name": "查询", "value": "login_log:Search", "api": "/api/system/login_log/", "method": 0 }, { - "name": "", + "name": "详情", "value": "login_log:Retrieve", "api": "/api/system/login_log/{id}/", "method": 0 @@ -1155,67 +1155,67 @@ "menu_field": [ { "field_name": "agent", - "title": "agentϢ", + "title": "agent信息", "model": "LoginLog" }, { "field_name": "area_code", - "title": "", + "title": "区域代码", "model": "LoginLog" }, { "field_name": "browser", - "title": "", + "title": "浏览器名", "model": "LoginLog" }, { "field_name": "city", - "title": "", + "title": "城市", "model": "LoginLog" }, { "field_name": "continent", - "title": "", + "title": "州", "model": "LoginLog" }, { "field_name": "country", - "title": "", + "title": "国家", "model": "LoginLog" }, { "field_name": "country_code", - "title": "", + "title": "简称", "model": "LoginLog" }, { "field_name": "country_english", - "title": "Ӣȫ", + "title": "英文全称", "model": "LoginLog" }, { "field_name": "create_datetime", - "title": "ʱ", + "title": "创建时间", "model": "LoginLog" }, { "field_name": "creator", - "title": "", + "title": "创建人", "model": "LoginLog" }, { "field_name": "dept_belong_id", - "title": "ݹ", + "title": "数据归属部门", "model": "LoginLog" }, { "field_name": "description", - "title": "", + "title": "描述", "model": "LoginLog" }, { "field_name": "district", - "title": "", + "title": "县区", "model": "LoginLog" }, { @@ -1225,58 +1225,58 @@ }, { "field_name": "ip", - "title": "¼ip", + "title": "登录ip", "model": "LoginLog" }, { "field_name": "isp", - "title": "Ӫ", + "title": "运营商", "model": "LoginLog" }, { "field_name": "latitude", - "title": "γ", + "title": "纬度", "model": "LoginLog" }, { "field_name": "login_type", - "title": "¼", + "title": "登录类型", "model": "LoginLog" }, { "field_name": "longitude", - "title": "", + "title": "经度", "model": "LoginLog" }, { "field_name": "modifier", - "title": "", + "title": "修改人", "model": "LoginLog" }, { "field_name": "os", - "title": "ϵͳ", + "title": "操作系统", "model": "LoginLog" }, { "field_name": "province", - "title": "ʡ", + "title": "省份", "model": "LoginLog" }, { "field_name": "update_datetime", - "title": "ʱ", + "title": "修改时间", "model": "LoginLog" }, { "field_name": "username", - "title": "¼û", + "title": "登录用户名", "model": "LoginLog" } ] }, { - "name": "־", + "name": "操作日志", "icon": "iconfont icon-caozuorizhi", "sort": 2, "is_link": false, @@ -1291,13 +1291,13 @@ "children": [], "menu_button": [ { - "name": "", + "name": "详情", "value": "operation_log:Retrieve", "api": "/api/system/operation_log/{id}/", "method": 0 }, { - "name": "ѯ", + "name": "查询", "value": "operation_log:Search", "api": "/api/system/operation_log/", "method": 0 @@ -1306,22 +1306,22 @@ "menu_field": [ { "field_name": "create_datetime", - "title": "ʱ", + "title": "创建时间", "model": "OperationLog" }, { "field_name": "creator", - "title": "", + "title": "创建人", "model": "OperationLog" }, { "field_name": "dept_belong_id", - "title": "ݹ", + "title": "数据归属部门", "model": "OperationLog" }, { "field_name": "description", - "title": "", + "title": "描述", "model": "OperationLog" }, { @@ -1331,67 +1331,67 @@ }, { "field_name": "json_result", - "title": "Ϣ", + "title": "返回信息", "model": "OperationLog" }, { "field_name": "modifier", - "title": "", + "title": "修改人", "model": "OperationLog" }, { "field_name": "request_body", - "title": "", + "title": "请求参数", "model": "OperationLog" }, { "field_name": "request_browser", - "title": "", + "title": "请求浏览器", "model": "OperationLog" }, { "field_name": "request_ip", - "title": "ipַ", + "title": "请求ip地址", "model": "OperationLog" }, { "field_name": "request_method", - "title": "ʽ", + "title": "请求方式", "model": "OperationLog" }, { "field_name": "request_modular", - "title": "ģ", + "title": "请求模块", "model": "OperationLog" }, { "field_name": "request_msg", - "title": "˵", + "title": "操作说明", "model": "OperationLog" }, { "field_name": "request_os", - "title": "ϵͳ", + "title": "操作系统", "model": "OperationLog" }, { "field_name": "request_path", - "title": "ַ", + "title": "请求地址", "model": "OperationLog" }, { "field_name": "response_code", - "title": "Ӧ״̬", + "title": "响应状态码", "model": "OperationLog" }, { "field_name": "status", - "title": "Ӧ״̬", + "title": "响应状态", "model": "OperationLog" }, { "field_name": "update_datetime", - "title": "ʱ", + "title": "修改时间", "model": "OperationLog" } ] -- Gitee From 064cbee8a273b4ed3b092c65eb44dac786c974a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8C=BF=E5=B0=8F=E5=A4=A9?= <1638245306@qq.com> Date: Tue, 28 Nov 2023 10:29:29 +0800 Subject: [PATCH 33/40] =?UTF-8?q?1.=E6=9B=B4=E6=96=B0=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=88=9D=E5=A7=8B=E5=8C=96=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/fixtures/init_systemconfig.json | 14 +++++++++++ web/src/views/system/login/index.vue | 24 ++++++++++++------- 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/backend/dvadmin/system/fixtures/init_systemconfig.json b/backend/dvadmin/system/fixtures/init_systemconfig.json index ed4c967b3..c32606e02 100644 --- a/backend/dvadmin/system/fixtures/init_systemconfig.json +++ b/backend/dvadmin/system/fixtures/init_systemconfig.json @@ -65,6 +65,20 @@ "placeholder": null, "setting": null, "children": [ + { + "parent": 1, + "title": "网站标题", + "key": "site_title", + "value": "Dvadmin", + "sort": 1, + "status": true, + "data_options": null, + "form_item_type": 0, + "rule": [], + "placeholder": "请输入网站标题", + "setting": null, + "children": [] + }, { "parent": 1, "title": "网站名称", diff --git a/web/src/views/system/login/index.vue b/web/src/views/system/login/index.vue index 28d3a1757..1b0904dcc 100644 --- a/web/src/views/system/login/index.vue +++ b/web/src/views/system/login/index.vue @@ -4,8 +4,8 @@ - {{ getThemeConfig.globalViceTitle }} - {{ getThemeConfig.globalViceTitleMsg }} + {{ getSystemConfig['login.site_title']||getThemeConfig.globalViceTitle }} + {{ getSystemConfig['login.site_name']||getThemeConfig.globalViceTitleMsg }} @@ -42,15 +42,15 @@ - Copyright © 2021-2022 django-vue-admin.com 版权所有 + Copyright © {{getSystemConfig['login.copyright'] || '2021-2022 django-vue-admin.com'}} 版权所有 - 晋ICP备18005113号-3 + {{getSystemConfig['login.keep_record'] || '晋ICP备18005113号-3'}} | - 帮助 + 帮助 | - 隐私 + 隐私 | - 条款 + 条款 @@ -64,7 +64,7 @@ import { NextLoading } from '/@/utils/loading'; import logoMini from '/@/assets/logo-mini.svg'; import loginMain from '/@/assets/login-main.svg'; import loginBg from '/@/assets/login-bg.svg'; - +import {SystemConfigStore} from '/@/stores/systemConfig' // 引入组件 const Account = defineAsyncComponent(() => import('/@/views/system/login/component/account.vue')); const Mobile = defineAsyncComponent(() => import('/@/views/system/login/component/mobile.vue')); @@ -82,6 +82,14 @@ const state = reactive({ const getThemeConfig = computed(() => { return themeConfig.value; }); + +const systemConfigStore = SystemConfigStore() +const {systemConfig} = storeToRefs(systemConfigStore) +const getSystemConfig = computed(()=>{ + return systemConfig.value +}) + + // 页面加载时 onMounted(() => { NextLoading.done(); -- Gitee From 205cfcca2eff8befc86229860f099c4f3361c140 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8C=BF=E5=B0=8F=E5=A4=A9?= <1638245306@qq.com> Date: Thu, 30 Nov 2023 15:57:42 +0800 Subject: [PATCH 34/40] =?UTF-8?q?refactor:=20=E4=B8=8A=E4=BC=A0=E6=9C=80?= =?UTF-8?q?=E6=96=B0=E7=9A=84README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/README.md | 202 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 189 insertions(+), 13 deletions(-) diff --git a/web/README.md b/web/README.md index 99cc0ce3f..e70cc71da 100644 --- a/web/README.md +++ b/web/README.md @@ -1,8 +1,32 @@ -django-vue3-admin:web +# Django-Vue3-Admin -#### 🌈 介绍 +[](https://gitee.com/liqianglog/django-vue-admin/blob/master/LICENSE) [](https://python.org/) [](https://docs.djangoproject.com/zh-hans/3.2/) [](https://nodejs.org/zh-cn/) [](https://gitee.com/liqianglog/django-vue-admin) -django-vue3-admin,基于 vue3 + CompositionAPI + typescript + vite + element plus, 是一款全栈,快速,开源的后台管理系统! +[预 览](https://demo.dvadmin.com) | [官网文档](https://www.django-vue-admin.com) | [群聊](https://qm.qq.com/cgi-bin/qm/qr?k=fOdnHhC8DJlRHGYSnyhoB8P5rgogA6Vs&jump_from=webapi) | [社区](https://bbs.django-vue-admin.com) | [插件市场](https://bbs.django-vue-admin.com/plugMarket.html) | [Github](https://github.com/liqianglog/django-vue-admin) + + + +💡 **「关于」** + +我们是一群热爱代码的青年,在这个炙热的时代下,我们希望静下心来通过Code带来一点我们的色彩和颜色。 + +因为热爱,所以拥抱未来! + + +## 平台简介 + +💡 [django-vue3-admin](https://gitee.com/huge-dream/django-vue3-admin.git) 是一套全部开源的快速开发平台,毫无保留给个人及企业免费使用。 + django-vue3-admin 基于 vue3 + CompositionAPI + typescript + vite + element plus, 是一款全栈,快速,开源的后台管理系统! + + + + +* 🧑🤝🧑前端采用 Vue3+TS+pinia+fastcrud(感谢[vue-next-admin](https://lyt-top.gitee.io/vue-next-admin-doc-preview/)) +* 👭后端采用 Python 语言 Django 框架以及强大的 [Django REST Framework](https://pypi.org/project/djangorestframework)。 +* 👫权限认证使用[Django REST Framework SimpleJWT](https://pypi.org/project/djangorestframework-simplejwt),支持多终端认证系统。 +* 👬支持加载动态权限菜单,多方式轻松权限控制。 +* 💏特别鸣谢:[vue-next-admin](https://lyt-top.gitee.io/vue-next-admin-doc-preview/)。 +* 💡 特别感谢[jetbrains](https://www.jetbrains.com/) 为本开源项目提供免费的 IntelliJ IDEA 授权。 #### 🏭 环境支持 @@ -12,21 +36,173 @@ django-vue3-admin,基于 vue3 + CompositionAPI + typescript + vite + element p > 由于 Vue3 不再支持 IE11,故而 ElementPlus 也不支持 IE11 及之前版本。 -#### ⚡ 使用说明 -建议使用 yarn,yarn 是一个类似于npm的包管理器 node 版本 > 16 + +## 在线体验 + +👩👧👦演示地址:[https://demo.dvadmin.com](https://demo.dvadmin.com) + +- 账号:superadmin + +- 密码:admin123456 + +👩👦👦文档地址:[coding](https://dvadmin-private.coding.net/share/km/cec69f3d-30fe-47d5-bd97-e9e851f0b776/K-2) + + + +## 交流 + +- 交流社区:[戳我](https://bbs.django-vue-admin.com)👩👦👦 + +- 插件市场:[戳我](https://bbs.django-vue-admin.com/plugMarket.html)👩👦👦 + +- django-vue-admin交流01群(已满):812482043 [点击链接加入群聊](https://qm.qq.com/cgi-bin/qm/qr?k=aJVwjDvH-Es4MPJQuoO32N0SucK22TE5&jump_from=webapi) +- django-vue-admin交流02群(已满):687252418 [点击链接加入群聊](https://qm.qq.com/cgi-bin/qm/qr?k=4jJN4IjWGfxJ8YJXbb_gTsuWjR34WLdc&jump_from=webapi) +- django-vue-admin交流03群:442108213 [点击链接加入群聊](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=wsm5oSz3K8dElBYUDtLTcQSEPhINFkl8&authKey=M6sbER0z59ZakgBr5erFeZyFZU15CI52bErNZa%2FxSvvGIuVAbY0N5866v89hm%2FK4&noverify=0&group_code=442108213) + +- 二维码 + + + +## 源码地址 + +gitee地址(主推):[https://gitee.com/huge-dream/django-vue3-admin](https://gitee.com/huge-dream/django-vue3-admin)👩👦👦 + +github地址:暂无 + + +## 内置功能 + +1. 👨⚕️菜单管理:配置系统菜单,操作权限,按钮权限标识、后端接口权限等。 +2. 🧑⚕️部门管理:配置系统组织机构(公司、部门、角色)。 +3. 👩⚕️角色管理:角色菜单权限分配、数据权限分配、设置角色按部门进行数据范围权限划分。 +4. 🧑🎓按钮权限权限:授权角色的按钮权限和接口权限,可做到每一个接口都能授权数据范围。 +5. 🧑🎓字段权限权限:授权页面的字段显示权限。 +5. 👨🎓用户管理:用户是系统操作者,该功能主要完成系统用户配置。 +6. 👬接口白名单:配置不需要进行权限校验的接口。 +7. 🧑🔧字典管理:对系统中经常使用的一些较为固定的数据进行维护。 +8. 🧑🔧地区管理:对省市县区域进行管理。 +9. 📁附件管理:对平台上所有文件、图片等进行统一管理。 +10. 🗓️操作日志:系统正常操作日志记录和查询;系统异常信息日志记录和查询。 +11. 🔌[插件市场 ](https://bbs.django-vue-admin.com/plugMarket.html):基于Django-Vue-Admin框架开发的应用和插件。 + +## 插件市场 🔌 + +- Celery异步任务:[dvadmin-celery](https://gitee.com/huge-dream/dvadmin-celery) +- 升级中心后端:[dvadmin-upgrade-center](https://gitee.com/huge-dream/dvadmin-upgrade-center) +- 升级中心前端:[dvadmin-upgrade-center-web](https://gitee.com/huge-dream/dvadmin-upgrade-center-web) + +## 准备工作 +~~~ +Python >= 3.8.0 (推荐3.8+版本) +nodejs >= 14.0 (推荐最新) +Mysql >= 5.7.0 (可选,默认数据库sqlite3,推荐8.0版本) +Redis(可选,最新版) +~~~ + +## 前端♝ ```bash +# 克隆项目 +git clone https://gitee.com/huge-dream/django-vue3-admin.git -# 进入项目 -cd django-vue-admin/web +# 进入项目目录 +cd web # 安装依赖 -yarn install +npm install --registry=https://registry.npm.taobao.org + +# 启动服务 +npm run dev +# 浏览器访问 http://localhost:8080 +# .env.development 文件中可配置启动端口等参数 +# 构建生产环境 +# npm run build +``` + + + +## 后端💈 + +~~~bash +1. 进入项目目录 cd backend +2. 在项目根目录中,复制 ./conf/env.example.py 文件为一份新的到 ./conf 文件夹下,并重命名为 env.py +3. 在 env.py 中配置数据库信息 + mysql数据库版本建议:8.0 + mysql数据库字符集:utf8mb4 +4. 安装依赖环境 + pip3 install -r requirements.txt +5. 执行迁移命令: + python3 manage.py makemigrations + python3 manage.py migrate +6. 初始化数据 + python3 manage.py init +7. 初始化省市县数据: + python3 manage.py init_area +8. 启动项目 + python3 manage.py runserver 0.0.0.0:8000 +或使用 daphne : + daphne -b 0.0.0.0 -p 8000 application.asgi:application +~~~ + +### 访问项目 + +- 访问地址:[http://localhost:8080](http://localhost:8080) (默认为此地址,如有修改请按照配置文件) +- 账号:`superadmin` 密码:`admin123456` + + + + + +### docker-compose 运行 + +~~~shell +# 先安装docker-compose (自行百度安装),执行此命令等待安装,如有使用celery插件请打开docker-compose.yml中celery 部分注释 +docker-compose up -d +# 初始化后端数据(第一次执行即可) +docker exec -ti dvadmin-django bash +python manage.py makemigrations +python manage.py migrate +python manage.py init_area +python manage.py init +exit + +前端地址:http://127.0.0.1:8080 +后端地址:http://127.0.0.1:8080/api +# 在服务器上请把127.0.0.1 换成自己公网ip +账号:superadmin 密码:admin123456 + +# docker-compose 停止 +docker-compose down +# docker-compose 重启 +docker-compose restart +# docker-compose 启动时重新进行 build +docker-compose up -d --build +~~~ + + + +## 演示图✅ + + + + + + + + + + + + + + + + + + + + + -# 运行项目 -yarn dev -# 打包发布 -yarn build -``` \ No newline at end of file -- Gitee From 5729aeb521d1f9e4d93b925c77b06c26542ea1bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8C=BF=E5=B0=8F=E5=A4=A9?= <1638245306@qq.com> Date: Thu, 30 Nov 2023 16:13:49 +0800 Subject: [PATCH 35/40] =?UTF-8?q?refactor:=20=E4=B8=8A=E4=BC=A0=E6=9C=80?= =?UTF-8?q?=E6=96=B0=E7=9A=84=E8=8B=B1=E6=96=87README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/README.en.md | 168 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 168 insertions(+) create mode 100644 web/README.en.md diff --git a/web/README.en.md b/web/README.en.md new file mode 100644 index 000000000..d8ca1721c --- /dev/null +++ b/web/README.en.md @@ -0,0 +1,168 @@ +# Django-Vue3-Admin + +[](https://gitee.com/huge-dream/django-vue3-admin/blob/master/LICENSE) [](https://python.org/) [](https://docs.djangoproject.com/zh-hans/3.2/) [](https://nodejs.org/zh-cn/) [](https://gitee.com/huge-dream/django-vue3-admin) + +[preview](https://demo.dvadmin.com) | [Official website document](https://www.django-vue-admin.com) | [qq group](https://qm.qq.com/cgi-bin/qm/qr?k=fOdnHhC8DJlRHGYSnyhoB8P5rgogA6Vs&jump_from=webapi) | [community](https://bbs.django-vue-admin.com) | [plugins market](https://bbs.django-vue-admin.com/plugMarket.html) | [Github](https://github.com/liqianglog/django-vue-admin) + +💡 **「About」** + +We are a group of young people who love Code. In this hot era, we hope to calm down and bring some of our colors and colors through code. + +Because of love, so embrace the future + +## framework introduction + +💡 [django-vue3-admin](https://gitee.com/huge-dream/django-vue3-admin.git) Is a set of all open source rapid development platform, no reservation for individuals and enterprises free use. + +* 🧑🤝🧑Front-end adoption Vue3+TS+pinia+fastcrud。 +* 👭The backend uses the Python language Django framework as well as the powerful[Django REST Framework](https://pypi.org/project/djangorestframework)。 +* 👫Permission authentication use[Django REST Framework SimpleJWT](https://pypi.org/project/djangorestframework-simplejwt),Supports the multi-terminal authentication system. +* 👬Support loading dynamic permission menu, multi - way easy permission control. +* 💏 Special thanks: [vue-next-admin](https://lyt-top.gitee.io/vue-next-admin-doc-preview/). +* 💡 💏 Special thanks:[jetbrains](https://www.jetbrains.com/) To provide a free IntelliJ IDEA license for this open source project. + +## Online experience + +👩👧👦👩👧👦 demo address:[https://demo.dvadmin.com](https://demo.dvadmin.com) + +* demo account:superadmin + +* demo password:admin123456 + +👩👦👦docs:[https://django-vue-admin.com](https://django-vue-admin.com) + +## communication + +* Communication community:[click here](https://bbs.django-vue-admin.com)👩👦👦 + +* plugins market:[click here](https://bbs.django-vue-admin.com/plugMarket.html)👩👦👦 + +## source code url: + +gitee(Main push):[https://gitee.com/huge-dream/django-vue3-admin](https://gitee.com/huge-dream/django-vue3-admin)👩👦👦 + +github:no data + +## core function + +1. 👨⚕️ Menu management: Configure the system menu, operation permissions, button permissions, back-end interface permissions, etc. +2. 🧑⚕️ Department management: Configure the system organization (company, department, role). +3. 👩⚕️ Role management: role menu permission allocation, data permission allocation, set roles according to the department for data range permission division. +4. 🧑🎓 Rights Specifies the rights of the authorization role. +5. 👨🎓 User management: The user is the system operator, this function mainly completes the system user configuration. +6. 👬 Interface whitelist: specifies the interface that does not need permission verification. +7. 🧑🔧 Dictionary management: Maintenance of some fixed data frequently used in the system. +8. 🧑🔧 Regional management: to manage provinces, cities, counties and regions. +9. 📁 Attachment management: Unified management of all files and pictures on the platform. +10. 🗓 ️operation logs: log and query the system normal operation; Log and query system exception information. + 11.🔌 [plugins market] () : based on the Django framework - Vue - Admin application and plug-in development. + +## plugins market 🔌 + +* Celery Asynchronous task:[dvadmin-celery](https://gitee.com/huge-dream/dvadmin-celery) +* Upgrade center backend:[dvadmin-upgrade-center](https://gitee.com/huge-dream/dvadmin-upgrade-center) +* Upgrade center front:[dvadmin-upgrade-center-web](https://gitee.com/huge-dream/dvadmin-upgrade-center-web) + +## before start project you need: + +~~~ +Python >= 3.8.0 +nodejs >= 14.0 +Mysql >= 5.7.0 (Optional. The default database is sqlite3. 8.0 is recommended) +Redis(Optional, the latest edition) +~~~ + +## frontend♝ + +```bash +# clone code +git clone https://gitee.com/huge-dream/django-vue3-admin.git + +# enter code dir +cd web + +# install dependence +npm install --registry=https://registry.npm.taobao.org + +# Start service +npm run dev +# Visit http://localhost:8080 in your browser +# Parameters such as boot port can be configured in the #.env.development file +# Build the production environment +# npm run build +``` + +## backend💈 + +~~~bash +1. enter code dir cd backend +2. copy ./conf/env.example.py to ./conf dir,rename as env.py +3. in env.py configure database information + mysql database recommended version: 8.0 + mysql database character set: utf8mb4 +4. install pip dependence + pip3 install -r requirements.txt +5. Execute the migration command: + python3 manage.py makemigrations + python3 manage.py migrate +6. Initialization data + python3 manage.py init +7. Initialize provincial, municipal and county data: + python3 manage.py init_area +8. start backend + python3 manage.py runserver 0.0.0.0:8000 +or daphne : + daphne -b 0.0.0.0 -p 8000 application.asgi:application +~~~ + +### visit backend swagger + +* visit url:[http://localhost:8080](http://localhost:8080) (The default address is this one. If you want to change it, follow the configuration file) +* account:`superadmin` password:`admin123456` + +### docker-compose + +~~~shell +docker-compose up -d +# Initialize backend data (first execution only) +docker exec -ti dvadmin-django bash +python manage.py makemigrations +python manage.py migrate +python manage.py init_area +python manage.py init +exit + +frontend url:http://127.0.0.1:8080 +backend url:http://127.0.0.1:8080/api +# Change 127.0.0.1 to your own public ip address on the server +account:`superadmin` password:`admin123456` + +# docker-compose stop +docker-compose down +# docker-compose restart +docker-compose restart +# docker-compose on start build +docker-compose up -d --build +~~~ + +## Demo screenshot✅ + + + + + + + + + + + + + + + + + + + + -- Gitee From 120c737de7e11bb8cfab733d499d3e6720bb6034 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BC=BA?= <1206709430@qq.com> Date: Thu, 30 Nov 2023 20:23:52 +0800 Subject: [PATCH 36/40] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E6=89=80=E6=9C=89=E9=A1=B9=E7=9B=AE=E4=B8=8B=E7=9A=84?= =?UTF-8?q?app=E9=87=8C=E7=9A=84models=E9=85=8D=E7=BD=AE=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/application/settings.py | 10 ++++------ backend/conf/env.example.py | 3 ++- backend/dvadmin/utils/models.py | 31 +++++++++++++++++++++++-------- 3 files changed, 29 insertions(+), 15 deletions(-) diff --git a/backend/application/settings.py b/backend/application/settings.py index 699b77ad2..590c14442 100644 --- a/backend/application/settings.py +++ b/backend/application/settings.py @@ -43,10 +43,8 @@ sys.path.insert(0, os.path.join(PLUGINS_PATH)) DEBUG = locals().get("DEBUG", True) ALLOWED_HOSTS = locals().get("ALLOWED_HOSTS", ["*"]) -# Application definition -CUSTOM_APPS = [ - "dvadmin.system", -] +# 列权限需要排除的App应用 +COLUMN_EXCLUDE_APPS = ['channels', 'captcha'] + locals().get("COLUMN_EXCLUDE_APPS", []) INSTALLED_APPS = [ "django.contrib.auth", @@ -60,8 +58,8 @@ INSTALLED_APPS = [ "corsheaders", # 注册跨域app "drf_yasg", "captcha", - 'channels', - *CUSTOM_APPS, + "channels", + "dvadmin.system", ] MIDDLEWARE = [ diff --git a/backend/conf/env.example.py b/backend/conf/env.example.py index ffc6afa09..03e8c1b4c 100644 --- a/backend/conf/env.example.py +++ b/backend/conf/env.example.py @@ -44,4 +44,5 @@ LOGIN_NO_CAPTCHA_AUTH = True # ================================================= # ALLOWED_HOSTS = ["*"] -CUSTOM_APPS = [] +# 列权限中排除App应用 +COLUMN_EXCLUDE_APPS = [] diff --git a/backend/dvadmin/utils/models.py b/backend/dvadmin/utils/models.py index e33152808..fb0c2ba70 100644 --- a/backend/dvadmin/utils/models.py +++ b/backend/dvadmin/utils/models.py @@ -13,6 +13,7 @@ from django.db import models from django.conf import settings from application import settings + table_prefix = settings.TABLE_PREFIX # 数据库表名前缀 @@ -71,10 +72,13 @@ class CoreModel(models.Model): id = models.BigAutoField(primary_key=True, help_text="Id", verbose_name="Id") description = models.CharField(max_length=255, verbose_name="描述", null=True, blank=True, help_text="描述") creator = models.ForeignKey(to=settings.AUTH_USER_MODEL, related_query_name='creator_query', null=True, - verbose_name='创建人', help_text="创建人", on_delete=models.SET_NULL, db_constraint=False) + verbose_name='创建人', help_text="创建人", on_delete=models.SET_NULL, + db_constraint=False) modifier = models.CharField(max_length=255, null=True, blank=True, help_text="修改人", verbose_name="修改人") - dept_belong_id = models.CharField(max_length=255, help_text="数据归属部门", null=True, blank=True, verbose_name="数据归属部门") - update_datetime = models.DateTimeField(auto_now=True, null=True, blank=True, help_text="修改时间", verbose_name="修改时间") + dept_belong_id = models.CharField(max_length=255, help_text="数据归属部门", null=True, blank=True, + verbose_name="数据归属部门") + update_datetime = models.DateTimeField(auto_now=True, null=True, blank=True, help_text="修改时间", + verbose_name="修改时间") create_datetime = models.DateTimeField(auto_now_add=True, null=True, blank=True, help_text="创建时间", verbose_name="创建时间") @@ -136,12 +140,23 @@ def get_model_from_app(app_name): def get_custom_app_models(app_name=None): - """获取所有项目下的app里的models""" + """ + 获取所有项目下的app里的models + """ if app_name: return get_model_from_app(app_name) + all_apps = apps.get_app_configs() res = [] - for app in settings.CUSTOM_APPS: - all_models = get_model_from_app(app) - for model in all_models: - res.append(model) + for app in all_apps: + if app.name.startswith('django'): + continue + if app.name in settings.COLUMN_EXCLUDE_APPS: + continue + try: + all_models = get_model_from_app(app.name) + if all_models: + for model in all_models: + res.append(model) + except Exception as e: + pass return res -- Gitee From 76914810067b93abc987308147222ed4aa9787fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BC=BA?= <1206709430@qq.com> Date: Thu, 30 Nov 2023 21:31:55 +0800 Subject: [PATCH 37/40] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/fixtures/init_systemconfig.json | 2 +- web/index.html | 27 ++++++------ web/src/views/system/login/index.vue | 2 +- .../components/PermissionComNew/index.vue | 42 ++++++++++++------- 4 files changed, 42 insertions(+), 31 deletions(-) diff --git a/backend/dvadmin/system/fixtures/init_systemconfig.json b/backend/dvadmin/system/fixtures/init_systemconfig.json index c32606e02..c2326aae4 100644 --- a/backend/dvadmin/system/fixtures/init_systemconfig.json +++ b/backend/dvadmin/system/fixtures/init_systemconfig.json @@ -130,7 +130,7 @@ "parent": 1, "title": "版权信息", "key": "copyright", - "value": "2021-2022 django-vue-admin.com 版权所有", + "value": "2021-2024 django-vue-admin.com 版权所有", "sort": 4, "status": true, "data_options": null, diff --git a/web/index.html b/web/index.html index 2fcf37bc4..9515e84b7 100644 --- a/web/index.html +++ b/web/index.html @@ -10,23 +10,22 @@ /> - django-vue3-admin + django-vue-admin - - - - + + +
数据授权
菜单授权
{{ node.label }}
Copyright © 2021-2022 django-vue-admin.com 版权所有
Copyright © {{getSystemConfig['login.copyright'] || '2021-2022 django-vue-admin.com'}} 版权所有
- 晋ICP备18005113号-3 + {{getSystemConfig['login.keep_record'] || '晋ICP备18005113号-3'}} | - 帮助 + 帮助 | - 隐私 + 隐私 | - 条款 + 条款