61 lines
2.3 KiB
TypeScript
61 lines
2.3 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 MySchedule extends BasicModel<MySchedule> {
|
|
createTime?: string; // 记录时间
|
|
scheduleId?: string; // 日程主键
|
|
title: string; // 日程标题
|
|
content: string; // 日程内容
|
|
scheduleType: string; // 日程类型
|
|
startTime?: string; // 开始时间
|
|
endTime?: string; // 结束时间
|
|
priority: string; // 优先等级
|
|
ustatus: string; // 日程状态
|
|
isAllDay: string; // 是否全天
|
|
remindTime?: number; // 提醒分钟
|
|
location?: string; // 日程地点
|
|
createUser?: number; // 创建账户
|
|
updateTime?: string; // 更新时间
|
|
}
|
|
|
|
export const myScheduleList = (params?: MySchedule | any) =>
|
|
defHttp.get<MySchedule>({ url: adminPath + '/biz/mySchedule/list', params });
|
|
|
|
export const myScheduleListAll = (params?: MySchedule | any) =>
|
|
defHttp.get<MySchedule[]>({ url: adminPath + '/biz/mySchedule/listAll', params });
|
|
|
|
export const myScheduleListData = (params?: MySchedule | any) =>
|
|
defHttp.post<Page<MySchedule>>({ url: adminPath + '/biz/mySchedule/listData', params });
|
|
|
|
export const myScheduleForm = (params?: MySchedule | any) =>
|
|
defHttp.get<MySchedule>({ url: adminPath + '/biz/mySchedule/form', params });
|
|
|
|
export const myScheduleSave = (params?: any, data?: MySchedule | any) =>
|
|
defHttp.postJson<MySchedule>({ url: adminPath + '/biz/mySchedule/save', params, data });
|
|
|
|
export const myScheduleImportData = (
|
|
params: UploadFileParams,
|
|
onUploadProgress: (progressEvent: AxiosProgressEvent) => void,
|
|
) =>
|
|
defHttp.uploadFile<UploadApiResult>(
|
|
{
|
|
url: ctxPath + adminPath + '/biz/mySchedule/importData',
|
|
onUploadProgress,
|
|
},
|
|
params,
|
|
);
|
|
|
|
export const myScheduleDelete = (params?: MySchedule | any) =>
|
|
defHttp.get<MySchedule>({ url: adminPath + '/biz/mySchedule/delete', params });
|