新功能: 添加后端代码

This commit is contained in:
李强
2023-01-21 10:56:53 +08:00
parent bb1f6dd128
commit f75c444699
122 changed files with 14109 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
[
{
"url": "/api/system/dept_lazy_tree/",
"method": 0,
"enable_datasource": true
}
]

View File

@@ -0,0 +1,36 @@
[
{
"name": "DVAdmin团队",
"key": "dvadmin",
"sort": 1,
"owner": "",
"phone": "",
"email": "",
"status": true,
"parent": null,
"children": [
{
"name": "运营部",
"key": "",
"sort": 2,
"owner": "",
"phone": "",
"email": "",
"status": true,
"parent": 1,
"children": []
},
{
"name": "技术部",
"key": "technology",
"sort": 1,
"owner": "",
"phone": "",
"email": "",
"status": true,
"parent": 3,
"children": []
}
]
}
]

View File

@@ -0,0 +1,550 @@
[
{
"label": "启用/禁用-布尔值",
"value": "button_status_bool",
"parent": null,
"type": 0,
"color": null,
"is_value": false,
"status": true,
"sort": 1,
"remark": null,
"children": [
{
"label": "启用",
"value": "true",
"parent": 1,
"type": 6,
"color": null,
"is_value": true,
"status": true,
"sort": 1,
"remark": null,
"children": []
},
{
"label": "禁用",
"value": "false",
"parent": 1,
"type": 6,
"color": null,
"is_value": true,
"status": true,
"sort": 2,
"remark": null,
"children": []
}
]
},
{
"label": "系统按钮",
"value": "system_button",
"parent": null,
"type": 0,
"color": null,
"is_value": false,
"status": true,
"sort": 2,
"remark": null,
"children": [
{
"label": "新增",
"value": "Create",
"parent": 66,
"type": 0,
"color": "success",
"is_value": true,
"status": true,
"sort": 1,
"remark": null,
"children": []
},
{
"label": "编辑",
"value": "Update",
"parent": 66,
"type": 0,
"color": "primary",
"is_value": true,
"status": true,
"sort": 2,
"remark": null,
"children": []
},
{
"label": "删除",
"value": "Delete",
"parent": 66,
"type": 0,
"color": "danger",
"is_value": true,
"status": true,
"sort": 3,
"remark": null,
"children": []
},
{
"label": "详情",
"value": "Retrieve",
"parent": 66,
"type": 0,
"color": "info",
"is_value": true,
"status": true,
"sort": 4,
"remark": null,
"children": []
},
{
"label": "查询",
"value": "Search",
"parent": 66,
"type": 0,
"color": "warning",
"is_value": true,
"status": true,
"sort": 5,
"remark": null,
"children": []
},
{
"label": "保存",
"value": "Save",
"parent": 66,
"type": 0,
"color": "success",
"is_value": true,
"status": true,
"sort": 6,
"remark": null,
"children": []
},
{
"label": "导入",
"value": "Import",
"parent": 66,
"type": 0,
"color": "primary",
"is_value": true,
"status": true,
"sort": 7,
"remark": null,
"children": []
},
{
"label": "导出",
"value": "Export",
"parent": 66,
"type": 0,
"color": "warning",
"is_value": true,
"status": true,
"sort": 8,
"remark": null,
"children": []
}
]
},
{
"label": "启用/禁用-数字值",
"value": "button_status_number",
"parent": null,
"type": 0,
"color": null,
"is_value": false,
"status": true,
"sort": 3,
"remark": null,
"children": [
{
"label": "启用",
"value": "1",
"parent": 7,
"type": 1,
"color": null,
"is_value": true,
"status": true,
"sort": 1,
"remark": null,
"children": []
},
{
"label": "禁用",
"value": "0",
"parent": 7,
"type": 1,
"color": null,
"is_value": true,
"status": true,
"sort": 2,
"remark": null,
"children": []
}
]
},
{
"label": "是/否-布尔值",
"value": "button_whether_bool",
"parent": null,
"type": 0,
"color": null,
"is_value": false,
"status": true,
"sort": 4,
"remark": null,
"children": [
{
"label": "是",
"value": "true",
"parent": 5,
"type": 6,
"color": null,
"is_value": true,
"status": true,
"sort": 1,
"remark": null,
"children": []
},
{
"label": "否",
"value": "false",
"parent": 5,
"type": 6,
"color": null,
"is_value": true,
"status": true,
"sort": 2,
"remark": null,
"children": []
}
]
},
{
"label": "是/否-数字值",
"value": "button_whether_number",
"parent": null,
"type": 0,
"color": null,
"is_value": false,
"status": true,
"sort": 5,
"remark": null,
"children": [
{
"label": "是",
"value": "1",
"parent": 10,
"type": 1,
"color": null,
"is_value": true,
"status": true,
"sort": 1,
"remark": null,
"children": []
},
{
"label": "否",
"value": "2",
"parent": 10,
"type": 1,
"color": null,
"is_value": true,
"status": true,
"sort": 2,
"remark": null,
"children": []
}
]
},
{
"label": "用户类型",
"value": "user_type",
"parent": null,
"type": 0,
"color": null,
"is_value": false,
"status": true,
"sort": 6,
"remark": null,
"children": [
{
"label": "后台用户",
"value": "0",
"parent": 15,
"type": 1,
"color": null,
"is_value": true,
"status": true,
"sort": 1,
"remark": null,
"children": []
},
{
"label": "前台用户",
"value": "1",
"parent": 15,
"type": 1,
"color": null,
"is_value": true,
"status": true,
"sort": 2,
"remark": null,
"children": []
}
]
},
{
"label": "表单类型",
"value": "config_form_type",
"parent": null,
"type": 0,
"color": null,
"is_value": false,
"status": true,
"sort": 7,
"remark": null,
"children": [
{
"label": "text",
"value": "0",
"parent": 49,
"type": 1,
"color": null,
"is_value": true,
"status": true,
"sort": 0,
"remark": null,
"children": []
},
{
"label": "textarea",
"value": "3",
"parent": 49,
"type": 1,
"color": "",
"is_value": true,
"status": true,
"sort": 0,
"remark": null,
"children": []
},
{
"label": "number",
"value": "10",
"parent": 49,
"type": 1,
"color": "",
"is_value": true,
"status": true,
"sort": 0,
"remark": null,
"children": []
},
{
"label": "datetime",
"value": "1",
"parent": 49,
"type": 1,
"color": null,
"is_value": true,
"status": true,
"sort": 1,
"remark": null,
"children": []
},
{
"label": "date",
"value": "2",
"parent": 49,
"type": 1,
"color": null,
"is_value": true,
"status": true,
"sort": 2,
"remark": null,
"children": []
},
{
"label": "time",
"value": "15",
"parent": 49,
"type": 1,
"color": "",
"is_value": true,
"status": true,
"sort": 3,
"remark": null,
"children": []
},
{
"label": "select",
"value": "4",
"parent": 49,
"type": 1,
"color": null,
"is_value": true,
"status": true,
"sort": 4,
"remark": null,
"children": []
},
{
"label": "checkbox",
"value": "5",
"parent": 49,
"type": 1,
"color": null,
"is_value": true,
"status": true,
"sort": 5,
"remark": null,
"children": []
},
{
"label": "radio",
"value": "6",
"parent": 49,
"type": 1,
"color": null,
"is_value": true,
"status": true,
"sort": 6,
"remark": null,
"children": []
},
{
"label": "switch",
"value": "9",
"parent": 49,
"type": 1,
"color": "",
"is_value": true,
"status": true,
"sort": 6,
"remark": null,
"children": []
},
{
"label": "文件附件",
"value": "8",
"parent": 49,
"type": 1,
"color": "",
"is_value": true,
"status": true,
"sort": 7,
"remark": null,
"children": []
},
{
"label": "图片(单张)",
"value": "7",
"parent": 49,
"type": 1,
"color": "",
"is_value": true,
"status": true,
"sort": 8,
"remark": null,
"children": []
},
{
"label": "图片(多张)",
"value": "12",
"parent": 49,
"type": 1,
"color": "",
"is_value": true,
"status": true,
"sort": 9,
"remark": null,
"children": []
},
{
"label": "数组",
"value": "11",
"parent": 49,
"type": 1,
"color": "",
"is_value": true,
"status": true,
"sort": 11,
"remark": null,
"children": []
},
{
"label": "关联表",
"value": "13",
"parent": 49,
"type": 1,
"color": "",
"is_value": true,
"status": true,
"sort": 13,
"remark": null,
"children": []
},
{
"label": "关联表(多选)",
"value": "14",
"parent": 49,
"type": 1,
"color": "",
"is_value": true,
"status": true,
"sort": 14,
"remark": null,
"children": []
}
]
},
{
"label": "性别",
"value": "gender",
"parent": null,
"type": 0,
"color": null,
"is_value": false,
"status": true,
"sort": 8,
"remark": null,
"children": [
{
"label": "未知",
"value": "0",
"parent": 18,
"type": 1,
"color": null,
"is_value": true,
"status": true,
"sort": 0,
"remark": null,
"children": []
},
{
"label": "男",
"value": "1",
"parent": 18,
"type": 1,
"color": null,
"is_value": true,
"status": true,
"sort": 1,
"remark": null,
"children": []
},
{
"label": "女",
"value": "2",
"parent": 18,
"type": 1,
"color": null,
"is_value": true,
"status": true,
"sort": 2,
"remark": null,
"children": []
}
]
}
]

View File

@@ -0,0 +1,678 @@
[
{
"name": "系统管理",
"icon": "cog",
"sort": 1,
"is_link": false,
"is_catalog": true,
"web_path": "",
"component": "",
"component_name": "",
"status": true,
"cache": false,
"visible": true,
"parent": null,
"children": [
{
"name": "菜单管理",
"icon": "navicon",
"sort": 1,
"is_link": false,
"is_catalog": false,
"web_path": "/menu",
"component": "system/menu",
"component_name": "menu",
"status": true,
"cache": false,
"visible": true,
"parent": 277,
"children": [],
"menu_button": [
{
"name": "查询",
"value": "Search",
"api": "/api/system/menu/",
"method": 0
},
{
"name": "详情",
"value": "Retrieve",
"api": "/api/system/menu/{id}/",
"method": 0
},
{
"name": "新增",
"value": "Create",
"api": "/api/system/menu/",
"method": 1
},
{
"name": "编辑",
"value": "Update",
"api": "/api/system/menu/{id}/",
"method": 2
},
{
"name": "删除",
"value": "Delete",
"api": "/api/system/menu/{id}/",
"method": 3
}
]
},
{
"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,
"parent": 277,
"children": [],
"menu_button": [
{
"name": "查询",
"value": "Search",
"api": "/api/system/menu_button/",
"method": 0
},
{
"name": "新增",
"value": "Create",
"api": "/api/system/menu_button/",
"method": 1
},
{
"name": "编辑",
"value": "Update",
"api": "/api/system/menu_button/{id}/",
"method": 2
},
{
"name": "删除",
"value": "Delete",
"api": "/api/system/menu_button/{id}/",
"method": 3
}
]
},
{
"name": "部门管理",
"icon": "bank",
"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": 277,
"children": [],
"menu_button": [
{
"name": "查询",
"value": "Search",
"api": "/api/system/dept/",
"method": 0
},
{
"name": "详情",
"value": "Retrieve",
"api": "/api/system/dept/{id}/",
"method": 0
},
{
"name": "新增",
"value": "Create",
"api": "/api/system/dept/",
"method": 1
},
{
"name": "编辑",
"value": "Update",
"api": "/api/system/dept/{id}/",
"method": 2
},
{
"name": "删除",
"value": "Delete",
"api": "/api/system/dept/{id}/",
"method": 3
}
]
},
{
"name": "角色管理",
"icon": "address-book",
"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": 277,
"children": [],
"menu_button": [
{
"name": "查询",
"value": "Search",
"api": "/api/system/role/",
"method": 0
},
{
"name": "详情",
"value": "Retrieve",
"api": "/api/system/role/{id}/",
"method": 0
},
{
"name": "新增",
"value": "Create",
"api": "/api/system/role/",
"method": 1
},
{
"name": "编辑",
"value": "Update",
"api": "/api/system/role/{id}/",
"method": 2
},
{
"name": "保存",
"value": "Save",
"api": "/api/system/role/{id}/",
"method": 2
},
{
"name": "删除",
"value": "Delete",
"api": "/api/system/role/{id}/",
"method": 3
}
]
},
{
"name": "用户管理",
"icon": "users",
"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": 277,
"children": [],
"menu_button": [
{
"name": "查询",
"value": "Search",
"api": "/api/system/user/",
"method": 0
},
{
"name": "详情",
"value": "Retrieve",
"api": "/api/system/user/{id}/",
"method": 0
},
{
"name": "新增",
"value": "Create",
"api": "/api/system/user/",
"method": 1
},
{
"name": "导出",
"value": "Export",
"api": "/api/system/user/export/",
"method": 1
},
{
"name": "导入",
"value": "Import",
"api": "/api/system/user/import/",
"method": 1
},
{
"name": "编辑",
"value": "Update",
"api": "/api/system/user/{id}/",
"method": 2
},
{
"name": "重设密码",
"value": "ResetPassword",
"api": "/api/system/user/{id}/reset_password/",
"method": 2
},
{
"name": "重置密码",
"value": "DefaultPassword",
"api": "/api/system/user/{id}/reset_to_default_password/",
"method": 2
},
{
"name": "删除",
"value": "Delete",
"api": "/api/system/user/{id}/",
"method": 3
}
]
},
{
"name": "消息中心",
"icon": "bullhorn",
"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": 277,
"children": [],
"menu_button": [
{
"name": "查询",
"value": "Search",
"api": "/api/system/message_center/",
"method": 0
},
{
"name": "详情",
"value": "Retrieve",
"api": "/api/system/message_center/{id}/",
"method": 0
},
{
"name": "新增",
"value": "Create",
"api": "/api/system/message_center/",
"method": 1
},
{
"name": "编辑",
"value": "Update",
"api": "/api/system/message_center/{id}/",
"method": 2
},
{
"name": "删除",
"value": "Delete",
"api": "/api/system/menu/{id}/",
"method": 3
}
]
},
{
"name": "接口白名单",
"icon": "compass",
"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": 277,
"children": [],
"menu_button": [
{
"name": "查询",
"value": "Search",
"api": "/api/system/api_white_list/",
"method": 0
},
{
"name": "详情",
"value": "Retrieve",
"api": "/api/system/api_white_list/{id}/",
"method": 0
},
{
"name": "新增",
"value": "Create",
"api": "/api/system/api_white_list/",
"method": 1
},
{
"name": "编辑",
"value": "Update",
"api": "/api/system/api_white_list/{id}/",
"method": 2
},
{
"name": "删除",
"value": "Delete",
"api": "/api/system/api_white_list/{id}/",
"method": 3
}
]
}
],
"menu_button": []
},
{
"name": "常规配置",
"icon": "cogs",
"sort": 2,
"is_link": false,
"is_catalog": true,
"web_path": "",
"component": "",
"component_name": "",
"status": true,
"cache": false,
"visible": true,
"parent": null,
"children": [
{
"name": "系统配置",
"icon": "desktop",
"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": 285,
"children": [],
"menu_button": [
{
"name": "查询",
"value": "Search",
"api": "/api/system/system_config/",
"method": 0
},
{
"name": "详情",
"value": "Retrieve",
"api": "/api/system/system_config/{id}/",
"method": 0
},
{
"name": "新增",
"value": "Create",
"api": "/api/system/system_config/",
"method": 1
},
{
"name": "编辑",
"value": "Update",
"api": "/api/system/system_config/{id}/",
"method": 2
},
{
"name": "删除",
"value": "Delete",
"api": "/api/system/system_config/{id}/",
"method": 3
}
]
},
{
"name": "字典管理",
"icon": "book",
"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": 285,
"children": [],
"menu_button": [
{
"name": "查询",
"value": "Search",
"api": "/api/system/dictionary/",
"method": 0
},
{
"name": "详情",
"value": "Retrieve",
"api": "/api/system/dictionary/{id}/",
"method": 0
},
{
"name": "新增",
"value": "Create",
"api": "/api/system/dictionary/",
"method": 1
},
{
"name": "编辑",
"value": "Update",
"api": "/api/system/dictionary/{id}/",
"method": 2
},
{
"name": "删除",
"value": "Delete",
"api": "/api/system/dictionary/{id}/",
"method": 3
}
]
},
{
"name": "地区管理",
"icon": "map",
"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": 285,
"children": [],
"menu_button": [
{
"name": "查询",
"value": "Search",
"api": "/api/system/area/",
"method": 0
},
{
"name": "详情",
"value": "Retrieve",
"api": "/api/system/area/{id}/",
"method": 0
},
{
"name": "新增",
"value": "Create",
"api": "/api/system/area/",
"method": 1
},
{
"name": "编辑",
"value": "Update",
"api": "/api/system/area/{id}/",
"method": 2
},
{
"name": "删除",
"value": "Delete",
"api": "/api/system/area/{id}/",
"method": 3
}
]
},
{
"name": "附件管理",
"icon": "file-text-o",
"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": 285,
"children": [],
"menu_button": [
{
"name": "详情",
"value": "Retrieve",
"api": "/api/system/file/{id}/",
"method": 0
},
{
"name": "查询",
"value": "Search",
"api": "/api/system/file/",
"method": 0
},
{
"name": "编辑",
"value": "Update",
"api": "/api/system/file/{id}/",
"method": 1
},
{
"name": "删除",
"value": "Delete",
"api": "/api/system/file/{id}/",
"method": 3
}
]
}
],
"menu_button": []
},
{
"name": "日志管理",
"icon": "book",
"sort": 3,
"is_link": false,
"is_catalog": true,
"web_path": "",
"component": "",
"component_name": "",
"status": true,
"cache": false,
"visible": true,
"parent": null,
"children": [
{
"name": "登录日志",
"icon": "file-text",
"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": 290,
"children": [],
"menu_button": [
{
"name": "查询",
"value": "Search",
"api": "/api/system/login_log/",
"method": 0
},
{
"name": "详情",
"value": "Retrieve",
"api": "/api/system/login_log/{id}/",
"method": 0
}
]
},
{
"name": "操作日志",
"icon": "file-code-o",
"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": 290,
"children": [],
"menu_button": [
{
"name": "详情",
"value": "Retrieve",
"api": "/api/system/operation_log/{id}/",
"method": 0
},
{
"name": "查询",
"value": "Search",
"api": "/api/system/operation_log/",
"method": 0
}
]
},
{
"name": "前端错误日志",
"icon": "bug",
"sort": 4,
"is_link": false,
"is_catalog": false,
"web_path": "/frontendLog",
"component": "system/log/frontendLog/index",
"component_name": "frontendLog",
"status": true,
"cache": false,
"visible": true,
"parent": 290,
"children": [],
"menu_button": []
}
],
"menu_button": []
},
{
"name": "DVAdmin官网",
"icon": "external-link",
"sort": 4,
"is_link": true,
"is_catalog": false,
"web_path": "https://django-vue-admin.com",
"component": "",
"component_name": "",
"status": true,
"cache": false,
"visible": true,
"parent": null,
"children": [],
"menu_button": []
}
]

View File

@@ -0,0 +1,20 @@
[
{
"name": "管理员",
"key": "admin",
"sort": 1,
"status": true,
"admin": true,
"data_range": 3,
"remark": null
},
{
"name": "用户",
"key": "public",
"sort": 2,
"status": true,
"admin": true,
"data_range": 3,
"remark": null
}
]

View File

@@ -0,0 +1,197 @@
[
{
"parent": null,
"title": "基础配置",
"key": "base",
"value": null,
"sort": 0,
"status": true,
"data_options": null,
"form_item_type": 0,
"rule": null,
"placeholder": null,
"setting": null,
"children": [
{
"parent": 10,
"title": "开启验证码",
"key": "captcha_state",
"value": true,
"sort": 1,
"status": true,
"data_options": null,
"form_item_type": 9,
"rule": [
{
"message": "必填项不能为空",
"required": true
}
],
"placeholder": "请选择",
"setting": null,
"children": []
},
{
"parent": 10,
"title": "创建用户默认密码",
"key": "default_password",
"value": "admin123456",
"sort": 2,
"status": true,
"data_options": null,
"form_item_type": 0,
"rule": [
{
"message": "必填项不能为空",
"required": true
}
],
"placeholder": "请输入默认密码",
"setting": null,
"children": []
}
]
},
{
"parent": null,
"title": "登录页配置",
"key": "login",
"value": null,
"sort": 1,
"status": true,
"data_options": null,
"form_item_type": 0,
"rule": null,
"placeholder": null,
"setting": null,
"children": [
{
"parent": 1,
"title": "网站名称",
"key": "site_name",
"value": "企业级后台管理系统",
"sort": 1,
"status": true,
"data_options": null,
"form_item_type": 0,
"rule": [
{
"message": "必填项不能为空",
"required": true
}
],
"placeholder": "请输入网站名称",
"setting": null,
"children": []
},
{
"parent": 1,
"title": "登录网站logo",
"key": "site_logo",
"value": null,
"sort": 2,
"status": true,
"data_options": null,
"form_item_type": 7,
"rule": [],
"placeholder": "请上传网站logo",
"setting": null,
"children": []
},
{
"parent": 1,
"title": "登录页背景图",
"key": "login_background",
"value": null,
"sort": 3,
"status": true,
"data_options": null,
"form_item_type": 7,
"rule": [],
"placeholder": "请上传登录背景页",
"setting": null,
"children": []
},
{
"parent": 1,
"title": "版权信息",
"key": "copyright",
"value": "2021-2022 django-vue-admin.com 版权所有",
"sort": 4,
"status": true,
"data_options": null,
"form_item_type": 0,
"rule": [
{
"message": "必填项不能为空",
"required": true
}
],
"placeholder": "请输入版权信息",
"setting": null,
"children": []
},
{
"parent": 1,
"title": "备案信息",
"key": "keep_record",
"value": "晋ICP备18005113号-3",
"sort": 5,
"status": true,
"data_options": null,
"form_item_type": 0,
"rule": [
{
"message": "必填项不能为空",
"required": true
}
],
"placeholder": "请输入备案信息",
"setting": null,
"children": []
},
{
"parent": 1,
"title": "帮助链接",
"key": "help_url",
"value": "https://django-vue-admin.com",
"sort": 6,
"status": true,
"data_options": null,
"form_item_type": 0,
"rule": "",
"placeholder": "请输入帮助信息",
"setting": null,
"children": []
},
{
"parent": 1,
"title": "隐私链接",
"key": "privacy_url",
"value": "#",
"sort": 7,
"status": true,
"data_options": null,
"form_item_type": 0,
"rule": [],
"placeholder": "请填写隐私链接",
"setting": null,
"children": []
},
{
"parent": 1,
"title": "条款链接",
"key": "clause_url",
"value": "#",
"sort": 8,
"status": true,
"data_options": null,
"form_item_type": 0,
"rule": [],
"placeholder": "请输入条款链接",
"setting": null,
"children": []
}
]
}
]

View File

@@ -0,0 +1,59 @@
[
{
"username": "superadmin",
"email": "dvadmin@django-vue-admin.com",
"mobile": "13333333333",
"avatar": null,
"name": "超级管理员",
"gender": 1,
"user_type": 0,
"role": [],
"role_key": [
"admin"
],
"dept_key": "dvadmin",
"first_name": "",
"last_name": "",
"is_staff": true,
"is_active": true,
"password": "pbkdf2_sha256$260000$g17x5wlSiW1FZAh1Eudchw$ZeSAqj3Xak0io8v/pmPW0BX9EX5R2zFXDwbbD68oBFk=",
"last_login": null,
"is_superuser": true
},
{
"username": "admin",
"email": "dvadmin@django-vue-admin.com",
"mobile": "18888888888",
"avatar": "",
"name": "管理员",
"gender": 1,
"user_type": 0,
"role": [],
"first_name": "",
"last_name": "",
"is_staff": true,
"is_active": true,
"password": "pbkdf2_sha256$260000$g17x5wlSiW1FZAh1Eudchw$ZeSAqj3Xak0io8v/pmPW0BX9EX5R2zFXDwbbD68oBFk=",
"last_login": null,
"is_superuser": false
},
{
"username": "test",
"email": "dvadmin@django-vue-admin.com",
"mobile": "18888888888",
"avatar": "",
"name": "测试人员",
"gender": 1,
"user_type": 0,
"role": [],
"role_key": ["public"],
"dept_key": "technology",
"first_name": "",
"last_name": "",
"is_staff": true,
"is_active": true,
"password": "pbkdf2_sha256$260000$g17x5wlSiW1FZAh1Eudchw$ZeSAqj3Xak0io8v/pmPW0BX9EX5R2zFXDwbbD68oBFk=",
"last_login": null,
"is_superuser": false
}
]

View File

@@ -0,0 +1,74 @@
# 初始化
import os
import django
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "application.settings")
django.setup()
from dvadmin.system.views.user import UsersInitSerializer
from dvadmin.system.views.menu import MenuInitSerializer
from dvadmin.utils.core_initialize import CoreInitialize
from dvadmin.system.views.role import RoleInitSerializer
from dvadmin.system.views.api_white_list import ApiWhiteListInitSerializer
from dvadmin.system.views.dept import DeptInitSerializer
from dvadmin.system.views.dictionary import DictionaryInitSerializer
from dvadmin.system.views.system_config import SystemConfigInitSerializer
class Initialize(CoreInitialize):
def init_dept(self):
"""
初始化部门信息
"""
self.init_base(DeptInitSerializer, unique_fields=['name', 'parent','key'])
def init_role(self):
"""
初始化角色信息
"""
self.init_base(RoleInitSerializer, unique_fields=['key'])
def init_users(self):
"""
初始化用户信息
"""
self.init_base(UsersInitSerializer, unique_fields=['username'])
def init_menu(self):
"""
初始化菜单信息
"""
self.init_base(MenuInitSerializer, unique_fields=['name', 'web_path', 'component', 'component_name'])
def init_api_white_list(self):
"""
初始API白名单
"""
self.init_base(ApiWhiteListInitSerializer, unique_fields=['url', 'method', ])
def init_dictionary(self):
"""
初始化字典表
"""
self.init_base(DictionaryInitSerializer, unique_fields=['value', 'parent', ])
def init_system_config(self):
"""
初始化系统配置表
"""
self.init_base(SystemConfigInitSerializer, unique_fields=['key', 'parent', ])
def run(self):
self.init_dept()
self.init_role()
self.init_users()
self.init_menu()
self.init_api_white_list()
self.init_dictionary()
self.init_system_config()
if __name__ == "__main__":
Initialize(app='dvadmin.system').run()