53 lines
2.0 KiB
TypeScript
53 lines
2.0 KiB
TypeScript
/**
|
|
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
|
* No deletion without permission, or be held responsible to law.
|
|
* @author gaoxq
|
|
*/
|
|
import { defHttp } from '@jeesite/core/utils/http/axios';
|
|
import { useGlobSetting } from '@jeesite/core/hooks/setting';
|
|
import { BasicModel, Page } from '@jeesite/core/api/model/baseModel';
|
|
import { UploadApiResult } from '@jeesite/core/api/sys/upload';
|
|
import { UploadFileParams } from '@jeesite/types/axios';
|
|
import { AxiosProgressEvent } from 'axios';
|
|
|
|
const { ctxPath, adminPath } = useGlobSetting();
|
|
|
|
export interface BizDataReport extends BasicModel<BizDataReport> {
|
|
createTime?: string; // 记录时间
|
|
routePath?: string; // 路由地址
|
|
name: string; // 看板名称
|
|
image: string; // 看板图标
|
|
sorting: number; // 排序
|
|
remark: string; // 看板描述
|
|
}
|
|
|
|
export const bizDataReportList = (params?: BizDataReport | any) =>
|
|
defHttp.get<BizDataReport>({ url: adminPath + '/biz/dataReport/list', params });
|
|
|
|
export const bizDataReportListAll = (params?: BizDataReport | any) =>
|
|
defHttp.get<BizDataReport[]>({ url: adminPath + '/biz/dataReport/listAll', params });
|
|
|
|
export const bizDataReportListData = (params?: BizDataReport | any) =>
|
|
defHttp.post<Page<BizDataReport>>({ url: adminPath + '/biz/dataReport/listData', params });
|
|
|
|
export const bizDataReportForm = (params?: BizDataReport | any) =>
|
|
defHttp.get<BizDataReport>({ url: adminPath + '/biz/dataReport/form', params });
|
|
|
|
export const bizDataReportSave = (params?: any, data?: BizDataReport | any) =>
|
|
defHttp.postJson<BizDataReport>({ url: adminPath + '/biz/dataReport/save', params, data });
|
|
|
|
export const bizDataReportImportData = (
|
|
params: UploadFileParams,
|
|
onUploadProgress: (progressEvent: AxiosProgressEvent) => void,
|
|
) =>
|
|
defHttp.uploadFile<UploadApiResult>(
|
|
{
|
|
url: ctxPath + adminPath + '/biz/dataReport/importData',
|
|
onUploadProgress,
|
|
},
|
|
params,
|
|
);
|
|
|
|
export const bizDataReportDelete = (params?: BizDataReport | any) =>
|
|
defHttp.get<BizDataReport>({ url: adminPath + '/biz/dataReport/delete', params });
|