flat: 暂存
This commit is contained in:
15
src/services/Management/list.ts
Normal file
15
src/services/Management/list.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { request } from '@umijs/max';
|
||||
|
||||
export async function getCmsJobList(params?: API.Management.ListParams) {
|
||||
return request<API.Management.ManagePageResult>(`/api/cms/job/list`, {
|
||||
method: 'GET',
|
||||
});
|
||||
}
|
||||
|
||||
export async function getCmsJobIds(ids: string) {
|
||||
return request<API.Management.ManagePageResult>(`/api/cms/job/${ids}`, {
|
||||
method: 'GET',
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
11
src/services/area/business.ts
Normal file
11
src/services/area/business.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
import { request } from '@umijs/max';
|
||||
|
||||
export async function getCmsAreaList(params?: API.AreaBusiness.CircleParams) {
|
||||
return request<API.AreaBusiness.CirclePageResult>(`/api/cms/area/list`, {
|
||||
method: 'GET',
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
11
src/services/area/subway.ts
Normal file
11
src/services/area/subway.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
import { request } from '@umijs/max';
|
||||
|
||||
export async function getCmsLineList(params?: API.AreaSubWay.LineParams) {
|
||||
return request<API.AreaSubWay.LinePageResult>(`/api/cms/line/list`, {
|
||||
method: 'GET',
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@ import { request } from '@umijs/max';
|
||||
import { downLoadXlsx } from '@/utils/downloadfile';
|
||||
|
||||
// 查询系统访问记录列表
|
||||
export async function getLogininforList(params?: API.Monitor.LogininforListParams) {
|
||||
return request<API.Monitor.LogininforPageResult>('/api/monitor/logininfor/list', {
|
||||
export async function getLogininforList(params?: API.Logs.LogininforListParams) {
|
||||
return request<API.Logs.LogininforPageResult>('/api/monitor/logininfor/list', {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
@@ -14,13 +14,13 @@ export async function getLogininforList(params?: API.Monitor.LogininforListParam
|
||||
|
||||
// 查询系统访问记录详细
|
||||
export function getLogininfor(infoId: number) {
|
||||
return request<API.Monitor.LogininforInfoResult>(`/api/monitor/logininfor/${infoId}`, {
|
||||
return request<API.Logs.LogininforInfoResult>(`/api/monitor/logininfor/${infoId}`, {
|
||||
method: 'GET'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增系统访问记录
|
||||
export async function addLogininfor(params: API.Monitor.Logininfor) {
|
||||
export async function addLogininfor(params: API.Logs.Logininfor) {
|
||||
return request<API.Result>('/api/monitor/logininfor', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
@@ -31,7 +31,7 @@ export async function addLogininfor(params: API.Monitor.Logininfor) {
|
||||
}
|
||||
|
||||
// 修改系统访问记录
|
||||
export async function updateLogininfor(params: API.Monitor.Logininfor) {
|
||||
export async function updateLogininfor(params: API.Logs.Logininfor) {
|
||||
return request<API.Result>('/api/monitor/logininfor', {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
@@ -49,7 +49,7 @@ export async function removeLogininfor(ids: string) {
|
||||
}
|
||||
|
||||
// 导出系统访问记录
|
||||
export function exportLogininfor(params?: API.Monitor.LogininforListParams) {
|
||||
export function exportLogininfor(params?: API.Logs.LogininforListParams) {
|
||||
return downLoadXlsx(`/api/monitor/logininfor/export`, { params }, `logininfor_${new Date().getTime()}.xlsx`);
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@ import { request } from '@umijs/max';
|
||||
import { downLoadXlsx } from '@/utils/downloadfile';
|
||||
|
||||
// 查询操作日志记录列表
|
||||
export async function getMobileLogList(params?: API.Monitor.MobilelogListParams) {
|
||||
return request<API.Monitor.OperlogPageResult>('/api/cms/operlog/list', {
|
||||
export async function getMobileLogList(params?: API.Logs.MobilelogListParams) {
|
||||
return request<API.Logs.OperlogPageResult>('/api/cms/operlog/list', {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
@@ -13,7 +13,7 @@ export async function getMobileLogList(params?: API.Monitor.MobilelogListParams)
|
||||
}
|
||||
|
||||
// 修改操作日志记录
|
||||
export async function updateMobilelog(params: API.Monitor.Mobilelog) {
|
||||
export async function updateMobilelog(params: API.Logs.Mobilelog) {
|
||||
return request<API.Result>('/api/cms/operlog', {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
@@ -23,7 +23,7 @@ export async function updateMobilelog(params: API.Monitor.Mobilelog) {
|
||||
});
|
||||
}
|
||||
// 新增操作日志记录
|
||||
export async function addMobilelog(params: API.Monitor.Mobilelog) {
|
||||
export async function addMobilelog(params: API.Logs.Mobilelog) {
|
||||
return request<API.Result>('/api/cms/operlog', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
@@ -40,6 +40,6 @@ export async function removeMobilelog(ids: string) {
|
||||
});
|
||||
}
|
||||
|
||||
export function exportMobilelog(params?: API.Monitor.OperlogListParams) {
|
||||
export function exportMobilelog(params?: API.Logs.OperlogListParams) {
|
||||
return downLoadXlsx(`/api/cms/operlog/export`, { params }, `operlog_${new Date().getTime()}.xlsx`);
|
||||
}
|
||||
68
src/services/logs/mobilelogininfor.ts
Normal file
68
src/services/logs/mobilelogininfor.ts
Normal file
@@ -0,0 +1,68 @@
|
||||
import { request } from '@umijs/max';
|
||||
import { downLoadXlsx } from '@/utils/downloadfile';
|
||||
|
||||
// 查询系统访问记录列表
|
||||
export async function getLogininforList(params?: API.Logs.MobileLogininforListParams) {
|
||||
return request<API.Logs.LogininforPageResult>('/api/cms/logininfor/list', {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
// 查询系统访问记录详细
|
||||
export function getLogininfor(infoId: number) {
|
||||
return request<API.Logs.LogininforInfoResult>(`/api/cms/logininfor/${infoId}`, {
|
||||
method: 'GET'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增系统访问记录
|
||||
export async function addLogininfor(params: API.Logs.MobileLogininfor) {
|
||||
return request<API.Result>('/api/cms/logininfor', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
data: params
|
||||
});
|
||||
}
|
||||
|
||||
// 修改系统访问记录
|
||||
export async function updateLogininfor(params: API.Logs.MobileLogininfor) {
|
||||
return request<API.Result>('/api/cms/logininfor', {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
data: params
|
||||
});
|
||||
}
|
||||
|
||||
// 删除系统访问记录
|
||||
export async function removeLogininfor(ids: string) {
|
||||
return request<API.Result>(`/api/cms/logininfor/${ids}`, {
|
||||
method: 'DELETE'
|
||||
});
|
||||
}
|
||||
|
||||
// 导出系统访问记录
|
||||
export function exportLogininfor(params?: API.Logs.MobileLogininforListParams) {
|
||||
return downLoadXlsx(`/api/cms/logininfor/export`, { params }, `logininfor_${new Date().getTime()}.xlsx`);
|
||||
}
|
||||
|
||||
// 解锁用户登录状态
|
||||
export function unlockLogininfor(userName: string) {
|
||||
return request<API.Result>('/api/cms/logininfor/unlock/' + userName, {
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 清空登录日志
|
||||
export function cleanLogininfor() {
|
||||
return request<API.Result>('/api/cms/logininfor/clean', {
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@@ -2,8 +2,8 @@ import { request } from '@umijs/max';
|
||||
import { downLoadXlsx } from '@/utils/downloadfile';
|
||||
|
||||
// 查询操作日志记录列表
|
||||
export async function getOperlogList(params?: API.Monitor.OperlogListParams) {
|
||||
return request<API.Monitor.OperlogPageResult>('/api/monitor/operlog/list', {
|
||||
export async function getOperlogList(params?: API.Logs.OperlogListParams) {
|
||||
return request<API.Logs.OperlogPageResult>('/api/monitor/operlog/list', {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
@@ -14,13 +14,13 @@ export async function getOperlogList(params?: API.Monitor.OperlogListParams) {
|
||||
|
||||
// 查询操作日志记录详细
|
||||
export function getOperlog(operId: number) {
|
||||
return request<API.Monitor.OperlogInfoResult>(`/api/monitor/operlog/${operId}`, {
|
||||
return request<API.Logs.OperlogInfoResult>(`/api/monitor/operlog/${operId}`, {
|
||||
method: 'GET'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增操作日志记录
|
||||
export async function addOperlog(params: API.Monitor.Operlog) {
|
||||
export async function addOperlog(params: API.Logs.Operlog) {
|
||||
return request<API.Result>('/api/monitor/operlog', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
@@ -31,7 +31,7 @@ export async function addOperlog(params: API.Monitor.Operlog) {
|
||||
}
|
||||
|
||||
// 修改操作日志记录
|
||||
export async function updateOperlog(params: API.Monitor.Operlog) {
|
||||
export async function updateOperlog(params: API.Logs.Operlog) {
|
||||
return request<API.Result>('/api/monitor/operlog', {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
@@ -55,6 +55,6 @@ export async function cleanAllOperlog() {
|
||||
}
|
||||
|
||||
// 导出操作日志记录
|
||||
export function exportOperlog(params?: API.Monitor.OperlogListParams) {
|
||||
export function exportOperlog(params?: API.Logs.OperlogListParams) {
|
||||
return downLoadXlsx(`/api/monitor/operlog/export`, { params }, `operlog_${new Date().getTime()}.xlsx`);
|
||||
}
|
||||
65
src/services/system/admindicdata.ts
Normal file
65
src/services/system/admindicdata.ts
Normal file
@@ -0,0 +1,65 @@
|
||||
import { request } from '@umijs/max';
|
||||
import { downLoadXlsx } from '@/utils/downloadfile';
|
||||
|
||||
// 查询字典数据列表
|
||||
export async function getDictDataList(
|
||||
params?: API.System.DictDataListParams,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.System.DictDataPageResult>('/api/system/dict/data/list', {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
params,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
// 查询字典数据详细
|
||||
export function getDictData(dictCode: number, options?: { [key: string]: any }) {
|
||||
return request<API.System.DictDataInfoResult>(`/api/system/dict/data/${dictCode}`, {
|
||||
method: 'GET',
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
// 新增字典数据
|
||||
export async function addDictData(params: API.System.DictData, options?: { [key: string]: any }) {
|
||||
return request<API.Result>('/api/system/dict/data', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
data: params,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
// 修改字典数据
|
||||
export async function updateDictData(params: API.System.DictData, options?: { [key: string]: any }) {
|
||||
return request<API.Result>('/api/system/dict/data', {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
data: params,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
// 删除字典数据
|
||||
export async function removeDictData(ids: string, options?: { [key: string]: any }) {
|
||||
return request<API.Result>(`/api/system/dict/data/${ids}`, {
|
||||
method: 'DELETE',
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
// 导出字典数据
|
||||
export function exportDictData(
|
||||
params?: API.System.DictDataListParams,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return downLoadXlsx(`/api/system/dict/data/export`, { params }, `dict_data_${new Date().getTime()}.xlsx`);
|
||||
}
|
||||
120
src/services/system/admindict.ts
Normal file
120
src/services/system/admindict.ts
Normal file
@@ -0,0 +1,120 @@
|
||||
import { request } from '@umijs/max';
|
||||
import { DictValueEnumObj } from '@/components/DictTag';
|
||||
import { HttpResult } from '@/enums/httpEnum';
|
||||
import { downLoadXlsx } from '@/utils/downloadfile';
|
||||
|
||||
/* *
|
||||
*
|
||||
* @author whiteshader@163.com
|
||||
* @datetime 2021/09/16
|
||||
*
|
||||
* */
|
||||
|
||||
// 查询字典类型列表
|
||||
export async function getDictTypeList(params?: API.DictTypeListParams) {
|
||||
return request(`/api/system/dict/type/list`, {
|
||||
params: {
|
||||
...params,
|
||||
},
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
// 查询字典类型详细
|
||||
export function getDictType(dictId: string) {
|
||||
return request(`/api/system/dict/type/${dictId}`, {
|
||||
method: 'GET',
|
||||
});
|
||||
}
|
||||
|
||||
// 查询字典数据详细
|
||||
export async function getDictValueEnum(dictType: string, isDigital?: boolean): Promise<DictValueEnumObj> {
|
||||
const resp = await request<API.System.DictTypeResult>(`/api/system/dict/data/type/${dictType}`, {
|
||||
method: 'GET',
|
||||
});
|
||||
if(resp.code === HttpResult.SUCCESS) {
|
||||
const opts: DictValueEnumObj = {};
|
||||
resp.data.forEach((item: any) => {
|
||||
opts[item.dictValue] = {
|
||||
text: item.dictLabel,
|
||||
label: item.dictLabel,
|
||||
value: isDigital ? Number(item.dictValue) : item.dictValue,
|
||||
key: item.dictCode,
|
||||
listClass: item.listClass,
|
||||
status: item.listClass };
|
||||
});
|
||||
return opts;
|
||||
} else {
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
export async function getDictSelectOption(dictType: string, isDigital?: boolean) {
|
||||
const resp = await request<API.System.DictTypeResult>(`/api/system/dict/data/type/${dictType}`, {
|
||||
method: 'GET',
|
||||
});
|
||||
if (resp.code === 200) {
|
||||
const options: DictValueEnumObj[] = resp.data.map((item) => {
|
||||
return {
|
||||
text: item.dictLabel,
|
||||
label: item.dictLabel,
|
||||
value: isDigital ? Number(item.dictValue) : item.dictValue,
|
||||
key: item.dictCode,
|
||||
listClass: item.listClass,
|
||||
status: item.listClass
|
||||
};
|
||||
});
|
||||
return options;
|
||||
}
|
||||
return [];
|
||||
};
|
||||
|
||||
// 新增字典类型
|
||||
export async function addDictType(params: API.System.DictType) {
|
||||
return request<API.Result>('/api/system/dict/type', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
data: params
|
||||
});
|
||||
}
|
||||
|
||||
// 修改字典类型
|
||||
export async function updateDictType(params: API.System.DictType) {
|
||||
return request<API.Result>('/api/system/dict/type', {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
data: params
|
||||
});
|
||||
}
|
||||
|
||||
// 删除字典类型
|
||||
export async function removeDictType(ids: string) {
|
||||
return request<API.Result>(`/api/system/dict/type/${ids}`, {
|
||||
method: 'DELETE'
|
||||
});
|
||||
}
|
||||
|
||||
// 导出字典类型
|
||||
export function exportDictType(params?: API.System.DictTypeListParams) {
|
||||
return downLoadXlsx(`/api/system/dict/type/export`, { params }, `dict_type_${new Date().getTime()}.xlsx`);
|
||||
}
|
||||
|
||||
// 获取字典选择框列表
|
||||
export async function getDictTypeOptionSelect(params?: API.DictTypeListParams) {
|
||||
return request('/api/system/dict/type/optionselect', {
|
||||
params: {
|
||||
...params,
|
||||
},
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user