feat: 合并Gin_Vue

This commit is contained in:
TsMask
2023-10-16 17:12:24 +08:00
parent 771320a839
commit 743568861d
77 changed files with 734 additions and 1870 deletions

View File

@@ -5,9 +5,7 @@ import { request } from '@/plugins/http-fetch';
* @param query 查询参数
* @returns bolb
*/
export function exportConfig(
query: Record<string, any>
) {
export function exportConfig(query: Record<string, any>) {
return request({
url: '/system/config/export',
method: 'post',
@@ -23,7 +21,7 @@ export function exportConfig(
*/
export function listConfig(query: Record<string, any>) {
return request({
url: '/configManage/v1/configs',
url: '/system/config/list',
method: 'get',
params: query,
});
@@ -36,7 +34,7 @@ export function listConfig(query: Record<string, any>) {
*/
export function getConfig(configId: string | number) {
return request({
url: `/configManage/v1/config/${configId}`,
url: `/system/config/${configId}`,
method: 'get',
});
}
@@ -48,7 +46,7 @@ export function getConfig(configId: string | number) {
*/
export function getConfigKey(configKey: string) {
return request({
url: `/configManage/v1/config/${configKey}`,
url: `/system/config/configKey/${configKey}`,
method: 'get',
});
}
@@ -60,7 +58,7 @@ export function getConfigKey(configKey: string) {
*/
export function addConfig(data: Record<string, any>) {
return request({
url: '/configManage/v1/config',
url: '/system/config',
method: 'post',
data: data,
});
@@ -73,7 +71,7 @@ export function addConfig(data: Record<string, any>) {
*/
export function updateConfig(data: Record<string, any>) {
return request({
url: '/configManage/v1/config',
url: '/system/config',
method: 'put',
data: data,
});
@@ -86,7 +84,7 @@ export function updateConfig(data: Record<string, any>) {
*/
export function delConfig(configId: string | number) {
return request({
url: `/configManage/v1/config/${configId}`,
url: `/system/config/${configId}`,
method: 'delete',
});
}
@@ -97,7 +95,7 @@ export function delConfig(configId: string | number) {
*/
export function refreshCache() {
return request({
url: '/configManage/v1/config/refreshCache',
url: '/system/config/refreshCache',
method: 'put',
});
}

View File

@@ -21,7 +21,7 @@ export function exportData(query: Record<string, any>) {
*/
export function listData(query: Record<string, any>) {
return request({
url: '/dictDataManage/v1/dictDatas',
url: '/system/dict/data/list',
method: 'get',
params: query,
});
@@ -34,7 +34,7 @@ export function listData(query: Record<string, any>) {
*/
export function getData(dictCode: string | number) {
return request({
url: `/dictDataManage/v1/dictData/${dictCode}`,
url: `/system/dict/data/${dictCode}`,
method: 'get',
});
}
@@ -45,9 +45,8 @@ export function getData(dictCode: string | number) {
* @returns object
*/
export function addData(data: Record<string, any>) {
data.dictSort = parseInt(data.dictSort);
return request({
url: '/dictDataManage/v1/dictData',
url: '/system/dict/data',
method: 'post',
data: data,
});
@@ -59,9 +58,8 @@ export function addData(data: Record<string, any>) {
* @returns object
*/
export function updateData(data: Record<string, any>) {
data.dictSort = parseInt(data.dictSort);
return request({
url: '/dictDataManage/v1/dictData',
url: '/system/dict/data',
method: 'put',
data: data,
});
@@ -74,7 +72,7 @@ export function updateData(data: Record<string, any>) {
*/
export function delData(dictCode: string | number) {
return request({
url: `/dictDataManage/v1/dictData/${dictCode}`,
url: `/system/dict/data/${dictCode}`,
method: 'delete',
});
}
@@ -86,7 +84,7 @@ export function delData(dictCode: string | number) {
*/
export function getDictDataType(dictType: string) {
return request({
url: `/dictDataManage/v1/dictData/type/${dictType}`,
url: `/system/dict/data/type/${dictType}`,
method: 'get',
});
}

View File

@@ -21,7 +21,7 @@ export function exportType(query: Record<string, any>) {
*/
export function listType(query: Record<string, any>) {
return request({
url: '/dictTypegManage/v1/dictTypes',
url: '/system/dict/type/list',
method: 'get',
params: query,
});
@@ -34,7 +34,7 @@ export function listType(query: Record<string, any>) {
*/
export function getType(dictId: string | number) {
return request({
url: `/dictTypegManage/v1/dictType/${dictId}`,
url: `/system/dict/type/${dictId}`,
method: 'get',
});
}
@@ -46,7 +46,7 @@ export function getType(dictId: string | number) {
*/
export function addType(data: Record<string, any>) {
return request({
url: '/dictTypegManage/v1/dictType',
url: '/system/dict/type',
method: 'post',
data: data,
});
@@ -59,7 +59,7 @@ export function addType(data: Record<string, any>) {
*/
export function updateType(data: Record<string, any>) {
return request({
url: '/dictTypegManage/v1/dictType',
url: '/system/dict/type',
method: 'put',
data: data,
});
@@ -72,7 +72,7 @@ export function updateType(data: Record<string, any>) {
*/
export function delType(dictId: string | number) {
return request({
url: `/dictTypegManage/v1/dictType/${dictId}`,
url: `/system/dict/type/${dictId}`,
method: 'delete',
});
}
@@ -84,7 +84,7 @@ export function delType(dictId: string | number) {
*/
export function refreshCache() {
return request({
url: '/dictTypegManage/v1/dictType/refreshCache',
url: '/system/dict/type/refreshCache',
method: 'put',
});
}
@@ -96,7 +96,7 @@ export function refreshCache() {
*/
export function getDictOptionselect() {
return request({
url: '/dictTypegManage/v1/dictTypes/optionselect',
url: '/system/dict/type/getDictOptionselect',
method: 'get',
});
}

View File

@@ -0,0 +1,67 @@
import { request } from '@/plugins/http-fetch';
/**
* 登录日志列表导出
* @param query 查询参数
* @returns bolb
*/
export function exportSysLogLogin(
query: Record<string, any>
) {
return request({
url: '/system/log/login/export',
method: 'post',
data: query,
responseType: 'blob',
});
}
/**
* 查询登录日志列表
* @param query 查询参数
* @returns object
*/
export function listSysLogLogin(
query: Record<string, any>
) {
return request({
url: '/system/log/login/list',
method: 'get',
params: query,
});
}
/**
* 删除登录日志
* @param loginIds 登录Id
* @returns object
*/
export function delSysLogLogin(loginIds: string) {
return request({
url: `/system/log/login/${loginIds}`,
method: 'delete',
});
}
/**
* 清空登录日志
* @returns object
*/
export function cleanSysLogLogin() {
return request({
url: '/system/log/login/clean',
method: 'delete',
});
}
/**
* 解锁用户登录状态
* @param userName 登录账号
* @returns object
*/
export function unlock(userName: string) {
return request({
url: `/system/log/login/unlock/${userName}`,
method: 'put',
});
}

View File

@@ -0,0 +1,55 @@
import { request } from '@/plugins/http-fetch';
/**
* 操作日志列表导出
* @param query 查询参数
* @returns bolb
*/
export function exportSysLogOperate(
query: Record<string, any>
) {
return request({
url: '/system/log/operate/export',
method: 'post',
data: query,
responseType: 'blob',
});
}
/**
* 查询操作日志列表
* @param query 查询参数
* @returns object
*/
export function listSysLogOperate(
query: Record<string, any>
) {
return request({
url: '/system/log/operate/list',
method: 'get',
params: query,
});
}
/**
* 删除操作日志
* @param operId 操作日志ID
* @returns object
*/
export function delSysLogOperate(operId: string) {
return request({
url: `/system/log/operate/${operId}`,
method: 'delete',
});
}
/**
* 清空操作日志
* @returns object
*/
export function cleanSysLogOperate() {
return request({
url: '/system/log/operate/clean',
method: 'delete',
});
}

View File

@@ -7,7 +7,7 @@ import { request } from '@/plugins/http-fetch';
*/
export function listMenu(query?: Record<string, any>) {
return request({
url: '/menuManage/v1/menus',
url: '/system/menu/list',
method: 'get',
params: query,
});
@@ -20,7 +20,7 @@ export function listMenu(query?: Record<string, any>) {
*/
export function getMenu(menuId: string | number) {
return request({
url: `/menuManage/v1/menu/${menuId}`,
url: `/system/menu/${menuId}`,
method: 'get',
});
}
@@ -31,7 +31,7 @@ export function getMenu(menuId: string | number) {
*/
export function menuTreeSelect() {
return request({
url: '/menuManage/v1/menus/treeSelect',
url: '/system/menu/treeSelect',
method: 'get',
});
}
@@ -43,7 +43,7 @@ export function menuTreeSelect() {
*/
export function roleMenuTreeSelect(roleId: string | number) {
return request({
url: `/menuManage/v1/menu/roleMenuTreeSelect/${roleId}`,
url: `/system/menu/roleMenuTreeSelect/${roleId}`,
method: 'get',
});
}
@@ -55,7 +55,7 @@ export function roleMenuTreeSelect(roleId: string | number) {
*/
export function addMenu(data: Record<string, any>) {
return request({
url: '/menuManage/v1/menu',
url: '/system/menu',
method: 'post',
data: data,
});
@@ -68,7 +68,7 @@ export function addMenu(data: Record<string, any>) {
*/
export function updateMenu(data: Record<string, any>) {
return request({
url: '/menuManage/v1/menu',
url: '/system/menu',
method: 'put',
data: data,
});
@@ -81,7 +81,7 @@ export function updateMenu(data: Record<string, any>) {
*/
export function delMenu(menuId: string | number) {
return request({
url: `/menuManage/v1/menu/${menuId}`,
url: `/system/menu/${menuId}`,
method: 'delete',
});
}

View File

@@ -1,64 +0,0 @@
import { request } from '@/plugins/http-fetch';
/**
* 查询公告列表
* @param query 查询参数
* @returns object
*/
export function listNotice(query: Record<string, any>) {
return request({
url: '/system/notice/list',
method: 'get',
params: query,
});
}
/**
* 查询公告详细
* @param menuId 公告ID
* @returns object
*/
export function getNotice(noticeId: string | number) {
return request({
url: `/system/notice/${noticeId}`,
method: 'get',
});
}
/**
* 新增公告
* @param data 公告对象
* @returns object
*/
export function addNotice(data: Record<string, any>) {
return request({
url: '/system/notice',
method: 'post',
data: data,
});
}
/**
* 修改公告
* @param data 公告对象
* @returns object
*/
export function updateNotice(data: Record<string, any>) {
return request({
url: '/system/notice',
method: 'put',
data: data,
});
}
/**
* 删除公告
* @param noticeId 公告ID
* @returns object
*/
export function delNotice(noticeId: string | number) {
return request({
url: `/system/notice/${noticeId}`,
method: 'delete',
});
}

View File

@@ -21,7 +21,7 @@ export function exportRole(query: Record<string, any>) {
*/
export function listRole(query: Record<string, any>) {
return request({
url: '/roleManage/v1/roles',
url: '/system/role/list',
method: 'get',
params: query,
});
@@ -34,7 +34,7 @@ export function listRole(query: Record<string, any>) {
*/
export function getRole(roleId: string | number) {
return request({
url: `/roleManage/v1/role/${roleId}`,
url: `/system/role/${roleId}`,
method: 'get',
});
}
@@ -46,7 +46,7 @@ export function getRole(roleId: string | number) {
*/
export function addRole(data: Record<string, any>) {
return request({
url: '/roleManage/v1/role',
url: '/system/role',
method: 'post',
data: data,
});
@@ -59,7 +59,7 @@ export function addRole(data: Record<string, any>) {
*/
export function updateRole(data: Record<string, any>) {
return request({
url: '/roleManage/v1/role',
url: '/system/role',
method: 'put',
data: data,
});
@@ -72,7 +72,7 @@ export function updateRole(data: Record<string, any>) {
*/
export function delRole(roleId: string | number) {
return request({
url: `/roleManage/v1/role/${roleId}`,
url: `/system/role/${roleId}`,
method: 'delete',
});
}
@@ -85,7 +85,7 @@ export function delRole(roleId: string | number) {
*/
export function changeRoleStatus(roleId: string, status: string | number) {
return request({
url: '/roleManage/v1/role/changeStatus',
url: '/system/role/changeStatus',
method: 'put',
data: {
roleId,
@@ -101,7 +101,7 @@ export function changeRoleStatus(roleId: string, status: string | number) {
*/
export function dataScope(data: Record<string, any>) {
return request({
url: '/roleManage/v1/role/dataScope',
url: '/system/role/dataScope',
method: 'put',
data: data,
});
@@ -114,7 +114,7 @@ export function dataScope(data: Record<string, any>) {
*/
export function authUserAllocatedList(query: Record<string, any>) {
return request({
url: '/roleManage/v1/role/authUser/allocatedList',
url: '/system/role/authUser/allocatedList',
method: 'get',
params: query,
});
@@ -127,7 +127,7 @@ export function authUserAllocatedList(query: Record<string, any>) {
*/
export function authUserChecked(data: Record<string, any>) {
return request({
url: '/roleManage/v1/role/authUser/checked',
url: '/system/role/authUser/checked',
method: 'put',
data: data,
});

View File

@@ -47,7 +47,7 @@ export function exportUser(query: Record<string, any>) {
*/
export function listUser(query: Record<string, any>) {
return request({
url: '/userManage/v1/users',
url: '/system/user/list',
method: 'get',
params: query,
});
@@ -60,7 +60,7 @@ export function listUser(query: Record<string, any>) {
*/
export function getUser(userId: string | number = '0') {
return request({
url: `/userManage/v1/user/${userId}`,
url: `/system/user/${userId}`,
method: 'get',
});
}
@@ -72,7 +72,7 @@ export function getUser(userId: string | number = '0') {
*/
export function addUser(data: Record<string, any>) {
return request({
url: '/userManage/v1/user',
url: '/system/user',
method: 'post',
data: data,
});
@@ -85,7 +85,7 @@ export function addUser(data: Record<string, any>) {
*/
export function updateUser(data: Record<string, any>) {
return request({
url: '/userManage/v1/user',
url: '/system/user',
method: 'put',
data: data,
});
@@ -98,7 +98,7 @@ export function updateUser(data: Record<string, any>) {
*/
export function delUser(userId: string | number) {
return request({
url: `/userManage/v1/user/${userId}`,
url: `/system/user/${userId}`,
method: 'delete',
});
}
@@ -111,7 +111,7 @@ export function delUser(userId: string | number) {
*/
export function resetUserPwd(userId: string | number, password: string) {
return request({
url: '/userManage/v1/user/resetPwd',
url: '/system/user/resetPwd',
method: 'put',
data: {
userId,
@@ -131,7 +131,7 @@ export function changeUserStatus(
status: string | number
) {
return request({
url: '/userManage/v1/user/changeStatus',
url: '/system/user/changeStatus',
method: 'put',
data: {
userId,