feat: 完成系统管理模块功能迭代
新增用户、菜单、日志、问题帮助等业务模块,优化角色权限分配功能,新增依赖包与全局组件
This commit is contained in:
15
src/api/system-administration/api-logs.js
Normal file
15
src/api/system-administration/api-logs.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import { request } from '@/api/_service'
|
||||
|
||||
const BASE = 'system_settings/system_assistant/interface_log/'
|
||||
|
||||
export function getInterfaceLogList (data) {
|
||||
return request({
|
||||
url: BASE + 'list',
|
||||
method: 'get',
|
||||
params: {
|
||||
method: 'system_settings_system_assistant_interface_log_list',
|
||||
platform: 'background',
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
67
src/api/system-administration/menu-configuration.js
Normal file
67
src/api/system-administration/menu-configuration.js
Normal file
@@ -0,0 +1,67 @@
|
||||
import { request } from '@/api/_service'
|
||||
|
||||
const BASE = 'system_settings/menu_configuration/menu/'
|
||||
|
||||
function apiParams (method, data = {}) {
|
||||
return {
|
||||
method: `system_settings_menu_configuration_menu_${method}`,
|
||||
platform: 'background',
|
||||
...data
|
||||
}
|
||||
}
|
||||
|
||||
export function getMenuAll (data) {
|
||||
return request({
|
||||
url: BASE + 'all',
|
||||
method: 'get',
|
||||
params: apiParams('all', data)
|
||||
})
|
||||
}
|
||||
|
||||
export function getMenuList (data) {
|
||||
return request({
|
||||
url: BASE + 'list',
|
||||
method: 'get',
|
||||
params: apiParams('list', data)
|
||||
})
|
||||
}
|
||||
|
||||
export function createMenu (data) {
|
||||
return request({
|
||||
url: BASE + 'create',
|
||||
method: 'post',
|
||||
data: apiParams('create', data)
|
||||
})
|
||||
}
|
||||
|
||||
export function editMenu (data) {
|
||||
return request({
|
||||
url: BASE + 'edit',
|
||||
method: 'put',
|
||||
data: apiParams('edit', data)
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteMenu (data) {
|
||||
return request({
|
||||
url: BASE + 'delete',
|
||||
method: 'delete',
|
||||
data: apiParams('delete', data)
|
||||
})
|
||||
}
|
||||
|
||||
export function updateMenuStatus (data) {
|
||||
return request({
|
||||
url: BASE + 'update_status',
|
||||
method: 'put',
|
||||
data: apiParams('update_status', data)
|
||||
})
|
||||
}
|
||||
|
||||
export function sortMenu (data) {
|
||||
return request({
|
||||
url: BASE + 'sort',
|
||||
method: 'put',
|
||||
data: apiParams('sort', data)
|
||||
})
|
||||
}
|
||||
15
src/api/system-administration/operation-logs.js
Normal file
15
src/api/system-administration/operation-logs.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import { request } from '@/api/_service'
|
||||
|
||||
const BASE = 'system_settings/system_assistant/operate_log/'
|
||||
|
||||
export function getOperateLogList (data) {
|
||||
return request({
|
||||
url: BASE + 'list',
|
||||
method: 'get',
|
||||
params: {
|
||||
method: 'system_settings_system_assistant_operate_log_list',
|
||||
platform: 'background',
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
149
src/api/system-administration/problem-help.js
Normal file
149
src/api/system-administration/problem-help.js
Normal file
@@ -0,0 +1,149 @@
|
||||
import { request } from '@/api/_service'
|
||||
|
||||
const CATEGORY_BASE = 'system_settings/system_assistant/problem_help/category/'
|
||||
const MARKDOWN_BASE = 'system_settings/system_assistant/problem_help/markdown/'
|
||||
|
||||
export function getCategoryTree (data) {
|
||||
return request({
|
||||
url: CATEGORY_BASE + 'tree',
|
||||
method: 'get',
|
||||
params: {
|
||||
method: 'system_settings_system_assistant_problem_category_tree',
|
||||
platform: 'background',
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function setCategoryAdd (data) {
|
||||
return request({
|
||||
url: CATEGORY_BASE + 'add',
|
||||
method: 'post',
|
||||
data: {
|
||||
method: 'system_settings_system_assistant_problem_category_add',
|
||||
platform: 'background',
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function setCategoryUpdate (data) {
|
||||
return request({
|
||||
url: CATEGORY_BASE + 'edit',
|
||||
method: 'put',
|
||||
data: {
|
||||
method: 'system_settings_system_assistant_problem_category_edit',
|
||||
platform: 'background',
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function delCategory (data) {
|
||||
return request({
|
||||
url: CATEGORY_BASE + 'delete',
|
||||
method: 'post',
|
||||
data: {
|
||||
method: 'system_settings_system_assistant_problem_category_delete',
|
||||
platform: 'background',
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function getProblemTree (data) {
|
||||
return request({
|
||||
url: MARKDOWN_BASE + 'tree',
|
||||
method: 'get',
|
||||
params: {
|
||||
method: 'system_settings_system_assistant_problem_markdown_tree',
|
||||
platform: 'background',
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function getMarkdownDetails (data) {
|
||||
return request({
|
||||
url: MARKDOWN_BASE + 'details',
|
||||
method: 'get',
|
||||
params: {
|
||||
method: 'system_settings_system_assistant_problem_markdown_details',
|
||||
platform: 'background',
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function setMarkdownAdd (data) {
|
||||
return request({
|
||||
url: MARKDOWN_BASE + 'add',
|
||||
method: 'post',
|
||||
data: {
|
||||
method: 'system_settings_system_assistant_problem_markdown_add',
|
||||
platform: 'background',
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function setMarkdownEdit (data) {
|
||||
return request({
|
||||
url: MARKDOWN_BASE + 'edit',
|
||||
method: 'put',
|
||||
data: {
|
||||
method: 'system_settings_system_assistant_problem_markdown_edit',
|
||||
platform: 'background',
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function delMarkdownDetails (data) {
|
||||
return request({
|
||||
url: MARKDOWN_BASE + 'del',
|
||||
method: 'delete',
|
||||
data: {
|
||||
method: 'system_settings_system_assistant_problem_markdown_del',
|
||||
platform: 'background',
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteProblem (data) {
|
||||
return request({
|
||||
url: MARKDOWN_BASE + 'delete',
|
||||
method: 'post',
|
||||
data: {
|
||||
method: 'del.problem.item',
|
||||
platform: 'admin',
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function searchMarkdown (data) {
|
||||
return request({
|
||||
url: MARKDOWN_BASE + 'search',
|
||||
method: 'get',
|
||||
params: {
|
||||
method: 'system_settings_system_assistant_problem_markdown_search',
|
||||
platform: 'background',
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function getRoleAll (data) {
|
||||
return request({
|
||||
url: 'system_settings/user_management/role/list',
|
||||
method: 'get',
|
||||
params: {
|
||||
method: 'system_settings_user_management_role_list',
|
||||
platform: 'background',
|
||||
page_size: 9999,
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -10,6 +10,14 @@ function apiParams (method, data = {}) {
|
||||
}
|
||||
}
|
||||
|
||||
export function getRoleAll (data) {
|
||||
return request({
|
||||
url: BASE + 'all',
|
||||
method: 'get',
|
||||
params: apiParams('all', data)
|
||||
})
|
||||
}
|
||||
|
||||
export function getRoleList (data) {
|
||||
return request({
|
||||
url: BASE + 'list',
|
||||
|
||||
99
src/api/system-administration/user.js
Normal file
99
src/api/system-administration/user.js
Normal file
@@ -0,0 +1,99 @@
|
||||
import { request } from '@/api/_service'
|
||||
|
||||
const BASE = 'system_settings/user_management/user/'
|
||||
|
||||
export function getUserList (data) {
|
||||
return request({
|
||||
url: BASE + 'list',
|
||||
method: 'get',
|
||||
params: {
|
||||
method: 'system_settings_user_management_user_list',
|
||||
platform: 'background',
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function createUser (data) {
|
||||
return request({
|
||||
url: BASE + 'create',
|
||||
method: 'post',
|
||||
data: {
|
||||
method: 'system_settings_user_management_user_create',
|
||||
platform: 'background',
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function editUser (data) {
|
||||
return request({
|
||||
url: BASE + 'edit',
|
||||
method: 'put',
|
||||
data: {
|
||||
method: 'system_settings_user_management_user_edit',
|
||||
platform: 'background',
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteUser (data) {
|
||||
return request({
|
||||
url: BASE + 'delete',
|
||||
method: 'delete',
|
||||
data: {
|
||||
method: 'system_settings_user_management_user_delete',
|
||||
platform: 'background',
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function batchDeleteUser (data) {
|
||||
return request({
|
||||
url: BASE + 'batch_delete',
|
||||
method: 'delete',
|
||||
data: {
|
||||
method: 'system_settings_user_management_user_batch_delete',
|
||||
platform: 'background',
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function enableUser (data) {
|
||||
return request({
|
||||
url: BASE + 'enable',
|
||||
method: 'put',
|
||||
data: {
|
||||
method: 'system_settings_user_management_enable_user',
|
||||
platform: 'background',
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function disableUser (data) {
|
||||
return request({
|
||||
url: BASE + 'disable',
|
||||
method: 'put',
|
||||
data: {
|
||||
method: 'system_settings_user_management_disable_user',
|
||||
platform: 'background',
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function resetUserPwd (data) {
|
||||
return request({
|
||||
url: BASE + 'reset_pwd',
|
||||
method: 'put',
|
||||
data: {
|
||||
method: 'system_settings_user_management_user_reset_pwd',
|
||||
platform: 'background',
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user