56 lines
2.0 KiB
TypeScript
56 lines
2.0 KiB
TypeScript
/**
|
|
* Copyright (c) 2013-Now https://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 MyNotes extends BasicModel<MyNotes> {
|
|
createTime?: string; // 记录时间
|
|
noteId?: string; // 唯一标识
|
|
title: string; // 标题
|
|
content: string; // 内容
|
|
priority: string; // 级别
|
|
ustatus: string; // 状态
|
|
startTime?: string; // 开始时间
|
|
endTime?: string; // 结束时间
|
|
type: string; // 类型
|
|
deadline: string; // 截至时间
|
|
updateTime?: string; // 更新时间
|
|
createUser?: string; // 创建用户
|
|
}
|
|
|
|
export const myNotesList = (params?: MyNotes | any) =>
|
|
defHttp.get<MyNotes>({ url: adminPath + '/biz/myNotes/list', params });
|
|
|
|
export const myNotesListData = (params?: MyNotes | any) =>
|
|
defHttp.post<Page<MyNotes>>({ url: adminPath + '/biz/myNotes/listData', params });
|
|
|
|
export const myNotesForm = (params?: MyNotes | any) =>
|
|
defHttp.get<MyNotes>({ url: adminPath + '/biz/myNotes/form', params });
|
|
|
|
export const myNotesSave = (params?: any, data?: MyNotes | any) =>
|
|
defHttp.postJson<MyNotes>({ url: adminPath + '/biz/myNotes/save', params, data });
|
|
|
|
export const myNotesImportData = (
|
|
params: UploadFileParams,
|
|
onUploadProgress: (progressEvent: AxiosProgressEvent) => void,
|
|
) =>
|
|
defHttp.uploadFile<UploadApiResult>(
|
|
{
|
|
url: ctxPath + adminPath + '/biz/myNotes/importData',
|
|
onUploadProgress,
|
|
},
|
|
params,
|
|
);
|
|
|
|
export const myNotesDelete = (params?: MyNotes | any) =>
|
|
defHttp.get<MyNotes>({ url: adminPath + '/biz/myNotes/delete', params });
|