!131 Merge remote-tracking branch 'origin/develop' into develop
Merge pull request !131 from dvadmin/develop
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -4,4 +4,6 @@
|
||||
|
||||
.history/
|
||||
.vscode/
|
||||
web/package-lock.json
|
||||
web/package-lock.json
|
||||
|
||||
*.bat
|
||||
@@ -11,326 +11,11 @@
|
||||
"status": true,
|
||||
"cache": false,
|
||||
"visible": true,
|
||||
"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: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,
|
||||
"sort": 1,
|
||||
"is_link": false,
|
||||
"is_catalog": false,
|
||||
"web_path": "/user",
|
||||
@@ -339,7 +24,6 @@
|
||||
"status": true,
|
||||
"cache": false,
|
||||
"visible": true,
|
||||
"parent": 1,
|
||||
"children": [],
|
||||
"menu_button": [
|
||||
{
|
||||
@@ -348,18 +32,24 @@
|
||||
"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:Update",
|
||||
"api": "/api/system/user/{id}/",
|
||||
"method": 2
|
||||
},
|
||||
{
|
||||
"name": "删除",
|
||||
"value": "user:Delete",
|
||||
"api": "/api/system/user/{id}/",
|
||||
"method": 3
|
||||
},
|
||||
{
|
||||
"name": "导出",
|
||||
"value": "user:Export",
|
||||
@@ -373,10 +63,16 @@
|
||||
"method": 1
|
||||
},
|
||||
{
|
||||
"name": "编辑",
|
||||
"value": "user:Update",
|
||||
"api": "/api/system/user/{id}/",
|
||||
"method": 2
|
||||
"name": "获取导入模板",
|
||||
"value": "user:ImportTemplate",
|
||||
"api": "/api/system/user/import/",
|
||||
"method": 0
|
||||
},
|
||||
{
|
||||
"name": "批量更新模板",
|
||||
"value": "user:BatchUpdateTemplate",
|
||||
"api": "/api/system/user/update_template/",
|
||||
"method": 0
|
||||
},
|
||||
{
|
||||
"name": "重设密码",
|
||||
@@ -386,15 +82,9 @@
|
||||
},
|
||||
{
|
||||
"name": "重置密码",
|
||||
"value": "user:DefaultPassword",
|
||||
"value": "user:ResetDefaultPassword",
|
||||
"api": "/api/system/user/{id}/reset_to_default_password/",
|
||||
"method": 2
|
||||
},
|
||||
{
|
||||
"name": "删除",
|
||||
"value": "user:Delete",
|
||||
"api": "/api/system/user/{id}/",
|
||||
"method": 3
|
||||
}
|
||||
],
|
||||
"menu_field": [
|
||||
@@ -475,6 +165,359 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "菜单管理",
|
||||
"icon": "iconfont icon-caidan",
|
||||
"sort": 2,
|
||||
"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:SearchButton",
|
||||
"api": "/api/system/menu_button/",
|
||||
"method": 0
|
||||
},
|
||||
{
|
||||
"name": "新增按钮",
|
||||
"value": "menu:CreateButton",
|
||||
"api": "/api/system/menu_button/",
|
||||
"method": 1
|
||||
},
|
||||
{
|
||||
"name": "编辑按钮",
|
||||
"value": "menu:UpdateButton",
|
||||
"api": "/api/system/menu_button/{id}/",
|
||||
"method": 2
|
||||
},
|
||||
{
|
||||
"name": "删除按钮",
|
||||
"value": "menu:DeleteButton",
|
||||
"api": "/api/system/menu_button/{id}/",
|
||||
"method": 3
|
||||
},
|
||||
{
|
||||
"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": "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
|
||||
}
|
||||
],
|
||||
"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,
|
||||
"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: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,
|
||||
"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:Delete",
|
||||
"api": "/api/system/role/{id}/",
|
||||
"method": 3
|
||||
},
|
||||
{
|
||||
"name": "获取所有可授权数据范围的部门",
|
||||
"value": "role:AllDataRangeDept",
|
||||
"api": "/api/system/role_menu_button_permision/role_to_dept_all/",
|
||||
"method": 0
|
||||
},
|
||||
{
|
||||
"name": "获取所有可授权菜单",
|
||||
"value": "role:AllCanMenu",
|
||||
"api": "/api/system/role_menu_button_permision/get_role_menu/",
|
||||
"method": 0
|
||||
},
|
||||
{
|
||||
"name": "获取所有已授权用户",
|
||||
"value": "role:AllAuthorizedUser",
|
||||
"api": "/api/system/role/get_role_users/",
|
||||
"method": 0
|
||||
},
|
||||
{
|
||||
"name": "获取菜单所有可授权按钮",
|
||||
"value": "role:AllMenuButton",
|
||||
"api": "/api/system/role_menu_button_permision/get_role_menu_btn_field/",
|
||||
"method": 0
|
||||
},
|
||||
{
|
||||
"name": "授权菜单",
|
||||
"value": "role:SetMenu",
|
||||
"api": "/api/system/role_menu_button_permision/set_role_menu/",
|
||||
"method": 2
|
||||
},
|
||||
{
|
||||
"name": "授权菜单按钮",
|
||||
"value": "role:SetMenuButton",
|
||||
"api": "/api/system/role_menu_button_permision/set_role_menu_btn/",
|
||||
"method": 2
|
||||
},
|
||||
{
|
||||
"name": "授权数据范围",
|
||||
"value": "role:SetDataRange",
|
||||
"api": "/api/system/role_menu_button_permision/set_role_menu_btn_data_range/",
|
||||
"method": 2
|
||||
},
|
||||
{
|
||||
"name": "获取所有用户",
|
||||
"value": "role:AllUser",
|
||||
"api": "/api/system/user/",
|
||||
"method": 0
|
||||
},
|
||||
{
|
||||
"name": "授权用户予角色",
|
||||
"value": "role:SetUserRole",
|
||||
"api": "/api/system/role/{id}/set_role_users/",
|
||||
"method": 2
|
||||
}
|
||||
],
|
||||
"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-xiaoxizhongxin",
|
||||
@@ -690,35 +733,11 @@
|
||||
"menu_button": [
|
||||
{
|
||||
"name": "查询",
|
||||
"value": "Search",
|
||||
"api": "/api/system/downloadCenter/",
|
||||
"method": 0
|
||||
},
|
||||
{
|
||||
"name": "详情",
|
||||
"value": "Retrieve",
|
||||
"api": "/api/system/downloadCenter/{id}/",
|
||||
"method": 0
|
||||
},
|
||||
{
|
||||
"name": "新增",
|
||||
"value": "Create",
|
||||
"api": "/api/system/downloadCenter/",
|
||||
"method": 1
|
||||
},
|
||||
{
|
||||
"name": "编辑",
|
||||
"value": "Update",
|
||||
"api": "/api/system/downloadCenter/{id}/",
|
||||
"method": 2
|
||||
},
|
||||
{
|
||||
"name": "删除",
|
||||
"value": "Delete",
|
||||
"api": "/api/system/downloadCenter/{id}/",
|
||||
"method": 3
|
||||
"value": "downloadCenter:Search",
|
||||
"api": "/api/system/download_center/"
|
||||
}
|
||||
]
|
||||
],
|
||||
"menu_field": []
|
||||
}
|
||||
],
|
||||
"menu_button": [],
|
||||
|
||||
@@ -152,3 +152,13 @@ class CustomModelViewSet(ModelViewSet, ImportSerializerMixin, ExportSerializerMi
|
||||
return SuccessResponse(data=[], msg="删除成功")
|
||||
else:
|
||||
return ErrorResponse(msg="未获取到keys字段")
|
||||
|
||||
@action(methods=['post'], detail=False)
|
||||
def get_by_ids(self, request):
|
||||
"""通过IDS列表获取数据"""
|
||||
ids = request.data.get('ids', [])
|
||||
if ids and ids != ['']:
|
||||
queryset = self.get_queryset().filter(id__in=ids)
|
||||
serializer = self.get_serializer(queryset, many=True)
|
||||
return DetailResponse(data=serializer.data)
|
||||
return DetailResponse(data=None)
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
<br>
|
||||
<h2>五、巨梦科技企业客户服务说明</h2>
|
||||
<h3>
|
||||
1、巨梦科技平台提供给多家企业客户使用,企业客户通过巨梦科技平台进行发布用户活动等。如果功夫企火星企业用户违反了隐私政策或发生其它侵犯用户权益的行为,用户可要求巨梦科技提供必要的配合与巨梦科技企业用户进行沟通和维权,维权过程中产生的费用由用户自行承担。</h3>
|
||||
1、巨梦科技平台提供给多家企业客户使用,企业客户通过巨梦科技平台进行发布用户活动等。如果企业用户违反了隐私政策或发生其它侵犯用户权益的行为,用户可要求巨梦科技提供必要的配合与巨梦科技企业用户进行沟通和维权,维权过程中产生的费用由用户自行承担。</h3>
|
||||
<br>
|
||||
<h2>六、其他事宜</h2>
|
||||
<h3>
|
||||
|
||||
78
backend/util/currency.py
Normal file
78
backend/util/currency.py
Normal file
@@ -0,0 +1,78 @@
|
||||
from uuid import uuid4
|
||||
from datetime import datetime
|
||||
|
||||
from django.db import connection
|
||||
from django.db.models import Model
|
||||
from django.core.cache import cache
|
||||
|
||||
|
||||
def create_code(model,prefix):
|
||||
current_date = datetime.now().strftime('%Y%m%d%H%M%S')
|
||||
code = f"{prefix}{current_date}" + str(uuid4().int)[:6]
|
||||
return code
|
||||
|
||||
def lock(key):
|
||||
if callable(key): # @lock
|
||||
def inner(*args, **kwargs):
|
||||
with cache.lock(key='lock'):
|
||||
return key(*args, **kwargs)
|
||||
inner.__name__ = key.__name__
|
||||
else: # @lock(key='aaa')
|
||||
def inner(func):
|
||||
def _inner(*args, **kwargs):
|
||||
with cache.lock(key=key):
|
||||
return func(*args, **kwargs)
|
||||
_inner.__name__ = func.__name__
|
||||
return _inner
|
||||
return inner
|
||||
|
||||
def recursion_down_fast(instance:Model, parent='parent', key='id') -> list[int]:
|
||||
"""向下递归instance的所有子级,且返回一维列表,使用sql优化,速度非常快"""
|
||||
if not instance:
|
||||
return []
|
||||
sql = f"""
|
||||
WITH RECURSIVE children AS (
|
||||
SELECT id, {key} AS param_{key} FROM {instance.__class__._meta.db_table} WHERE {parent}_id = %s UNION ALL
|
||||
SELECT a.id, a.{key} AS param_{key} FROM {instance.__class__._meta.db_table} a
|
||||
INNER JOIN children b ON a.{parent}_id = b.id
|
||||
) SELECT param_{key} FROM children;
|
||||
"""
|
||||
with connection.cursor() as cursor:
|
||||
cursor.execute(sql, [getattr(instance, key)])
|
||||
data = cursor.fetchall()
|
||||
return [getattr(instance, key), *[i[0] for i in data]]
|
||||
|
||||
def recursion_up_fast(instance: Model, parent='parent', key='id') -> list[int]:
|
||||
"""向上递归instance的所有父级,使用sql优化,速度非常快"""
|
||||
if not instance:
|
||||
return []
|
||||
sql = f"""
|
||||
WITH RECURSIVE parents AS (
|
||||
SELECT id, {key} as param_{key}, {parent}_id FROM {instance.__class__._meta.db_table} WHERE id = %s UNION ALL
|
||||
SELECT a.id, a.{key} as param_{key}, a.{parent}_id FROM {instance.__class__._meta.db_table} a
|
||||
INNER JOIN parents b ON a.id = b.{parent}_id
|
||||
) SELECT param_{key} FROM parents;
|
||||
"""
|
||||
with connection.cursor() as cursor:
|
||||
cursor.execute(sql, [getattr(instance, key)])
|
||||
data = cursor.fetchall()
|
||||
return [getattr(instance, key), *[i[0] for i in data]]
|
||||
|
||||
def recursion_up_joint(instance: Model, parent='parent', key='name', joint='/') -> str:
|
||||
"""向上递归instance所有父级并拼接需要的值,返回完整路径,使用sql优化,速度非常快"""
|
||||
if instance is None:
|
||||
return ''
|
||||
sql = f"""
|
||||
WITH RECURSIVE parents AS (
|
||||
SELECT id, {parent}_id, {key}::TEXT AS path FROM {instance.__class__._meta.db_table} WHERE {key} = %s AND id = %s UNION ALL
|
||||
SELECT a.id, a.{parent}_id, (a.{key} || '{joint}' || b.path)::TEXT FROM {instance.__class__._meta.db_table} a
|
||||
INNER JOIN parents b ON a.id = b.{parent}_id
|
||||
) SELECT path FROM parents where {parent}_id IS NULL;
|
||||
"""
|
||||
with connection.cursor() as cursor:
|
||||
cursor.execute(sql, [getattr(instance, key), instance.pk])
|
||||
data = cursor.fetchall()
|
||||
try:
|
||||
return data[0][0]
|
||||
except IndexError:
|
||||
raise Exception('找不到初始数据')
|
||||
@@ -8,7 +8,8 @@
|
||||
"build:dev": "vite build --mode development",
|
||||
"build": "vite build",
|
||||
"build:local": "vite build --mode local_prod",
|
||||
"lint-fix": "eslint --fix --ext .js --ext .jsx --ext .vue src/"
|
||||
"lint-fix": "eslint --fix --ext .js --ext .jsx --ext .vue src/",
|
||||
"build:flowH5": "vite build --config flowH5.config.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@element-plus/icons-vue": "^2.3.1",
|
||||
@@ -18,6 +19,7 @@
|
||||
"@fast-crud/ui-interface": "^1.21.2",
|
||||
"@great-dream/dvadmin3-celery-web": "^3.1.3",
|
||||
"@iconify/vue": "^4.1.2",
|
||||
"@meetjs/vant4-kit": "^1.0.1",
|
||||
"@types/lodash": "^4.17.7",
|
||||
"@vitejs/plugin-vue-jsx": "^4.0.1",
|
||||
"@wangeditor/editor": "^5.1.23",
|
||||
@@ -48,6 +50,8 @@
|
||||
"print-js": "^1.6.0",
|
||||
"qrcodejs2-fixes": "^0.0.2",
|
||||
"qs": "^6.11.0",
|
||||
"rollup-plugin-postcss": "^4.0.2",
|
||||
"rollup-plugin-terser": "^7.0.2",
|
||||
"screenfull": "^6.0.2",
|
||||
"sortablejs": "^1.15.0",
|
||||
"splitpanes": "^3.1.5",
|
||||
@@ -62,6 +66,7 @@
|
||||
"vue-draggable-plus": "^0.6.0",
|
||||
"vue-grid-layout": "^3.0.0-beta1",
|
||||
"vue-i18n": "^9.14.0",
|
||||
"vue-qr": "^4.0.9",
|
||||
"vue-router": "^4.4.3",
|
||||
"vxe-table": "^4.6.18",
|
||||
"xe-utils": "^3.5.30"
|
||||
|
||||
@@ -77,7 +77,7 @@ export const createCrudOptions = function ({crudExpose, context}: CreateCrudOpti
|
||||
actionbar: {
|
||||
buttons: {
|
||||
add: {
|
||||
show: auth('btn:Create')
|
||||
show: auth('menu:CreateButton')
|
||||
},
|
||||
batchAdd: {
|
||||
show: true,
|
||||
@@ -108,10 +108,10 @@ export const createCrudOptions = function ({crudExpose, context}: CreateCrudOpti
|
||||
edit: {
|
||||
icon: '',
|
||||
type: 'primary',
|
||||
show: auth('btn:Update')
|
||||
show: auth('menu:UpdateButton')
|
||||
},
|
||||
remove: {
|
||||
show: auth('btn:Delete')
|
||||
show: auth('menu:DeleteButton')
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -75,7 +75,7 @@ export const createCrudOptions = function ({ crudExpose, context }: CreateCrudOp
|
||||
actionbar: {
|
||||
buttons: {
|
||||
add: {
|
||||
show: auth('role:AuthorizedAdd'),
|
||||
show: auth('role:SetMenu'),
|
||||
click: (ctx: any) => {
|
||||
context!.subUserRef.value.dialog = true;
|
||||
nextTick(() => {
|
||||
@@ -91,7 +91,7 @@ export const createCrudOptions = function ({ crudExpose, context }: CreateCrudOp
|
||||
//固定右侧
|
||||
fixed: 'left',
|
||||
width: 120,
|
||||
show: auth('role:AuthorizedDel'),
|
||||
show: auth('role:SetMenu'),
|
||||
buttons: {
|
||||
view: {
|
||||
show: false,
|
||||
@@ -115,7 +115,7 @@ export const createCrudOptions = function ({ crudExpose, context }: CreateCrudOp
|
||||
title: "选择",
|
||||
form: { show: false},
|
||||
column: {
|
||||
show: auth('role:AuthorizedDel'),
|
||||
show: auth('role:SetMenu'),
|
||||
type: "selection",
|
||||
align: "center",
|
||||
width: "55px",
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
</template>
|
||||
<template #pagination-left>
|
||||
<el-tooltip content="批量删除所选择的用户权限">
|
||||
<el-button v-show="selectedRowsCount > 0 && auth('role:AuthorizedDel')" type="danger" @click="multipleDel" :icon="Delete">批量删除</el-button>
|
||||
<el-button v-show="selectedRowsCount > 0 && auth('role:SetMenu')" type="danger" @click="multipleDel" :icon="Delete">批量删除</el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</fs-crud>
|
||||
|
||||
@@ -19,7 +19,7 @@ import { computed } from "vue";
|
||||
import { Md5 } from 'ts-md5';
|
||||
import { commonCrudConfig } from "/@/utils/commonCrud";
|
||||
import { ElMessageBox } from 'element-plus';
|
||||
import {exportData} from "./api";
|
||||
import { exportData } from "./api";
|
||||
export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
||||
const pageRequest = async (query: UserPageQuery) => {
|
||||
return await api.GetList(query);
|
||||
@@ -106,19 +106,15 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
|
||||
type: 'text',
|
||||
show: auth('user:Delete'),
|
||||
},
|
||||
custom: {
|
||||
text: '重设密码',
|
||||
resetDefaultPwd: {
|
||||
text: '重置密码',
|
||||
type: 'text',
|
||||
show: auth('user:ResetPassword'),
|
||||
tooltip: {
|
||||
placement: 'top',
|
||||
content: '重设密码',
|
||||
},
|
||||
//@ts-ignore
|
||||
click: (ctx: any) => {
|
||||
const { row } = ctx;
|
||||
resetToDefaultPasswordRequest(row)
|
||||
},
|
||||
iconRight: 'Setting',
|
||||
show: auth('user:ResetDefaultPassword'),
|
||||
click: (ctx: any) => ElMessageBox.confirm(
|
||||
'确定重置为系统默认密码吗?', '提示',
|
||||
{ confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }
|
||||
).then(() => resetToDefaultPasswordRequest(ctx.row))
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user