58 lines
2.1 KiB
TypeScript
58 lines
2.1 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 MyPerson extends BasicModel<MyPerson> {
|
|
createTime?: string; // 记录时间
|
|
personId?: string; // 唯一主键
|
|
personName: string; // 姓名
|
|
gender: string; // 性别
|
|
idCard: string; // 身份证号
|
|
phone?: string; // 手机号码
|
|
email?: string; // 邮箱
|
|
birthDate: string; // 出生日期
|
|
address?: string; // 居住地址
|
|
department?: string; // 所属部门
|
|
positionName?: string; // 职位
|
|
ustatus?: string; // 状态
|
|
companyId?: string; // 公司编号
|
|
updateTime?: string; // 更新时间
|
|
}
|
|
|
|
export const myPersonList = (params?: MyPerson | any) =>
|
|
defHttp.get<MyPerson>({ url: adminPath + '/biz/myPerson/list', params });
|
|
|
|
export const myPersonListData = (params?: MyPerson | any) =>
|
|
defHttp.post<Page<MyPerson>>({ url: adminPath + '/biz/myPerson/listData', params });
|
|
|
|
export const myPersonForm = (params?: MyPerson | any) =>
|
|
defHttp.get<MyPerson>({ url: adminPath + '/biz/myPerson/form', params });
|
|
|
|
export const myPersonSave = (params?: any, data?: MyPerson | any) =>
|
|
defHttp.postJson<MyPerson>({ url: adminPath + '/biz/myPerson/save', params, data });
|
|
|
|
export const myPersonImportData = (
|
|
params: UploadFileParams,
|
|
onUploadProgress: (progressEvent: AxiosProgressEvent) => void,
|
|
) =>
|
|
defHttp.uploadFile<UploadApiResult>(
|
|
{
|
|
url: ctxPath + adminPath + '/biz/myPerson/importData',
|
|
onUploadProgress,
|
|
},
|
|
params,
|
|
);
|
|
|
|
export const myPersonDelete = (params?: MyPerson | any) =>
|
|
defHttp.get<MyPerson>({ url: adminPath + '/biz/myPerson/delete', params });
|