diff --git a/backend/dvadmin/system/fixtures/initSerializer.py b/backend/dvadmin/system/fixtures/initSerializer.py index a2d74f6..0b139c1 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 a054af2..61a5058 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", + "is_catalog": true, + "web_path": "/log", + "component": "", + "component_name": "", "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": [], - "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