康来智慧冷链系统 - 前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

30 lines
985 B

import {OfficeParams,OfficeItem,OfficeItemListResult} from '/@/api/platform/system/entity/officeModel';
import { defHttp } from '/@/utils/http/axios';
import {isDef} from '/@/utils/is';
const prefix = '/system_proxy/system';
enum Api {
QueryById = '/office/getById',
List = '/office/list',
Add = '/office/add',
Update = '/office/update',
Remove = '/office/remove'
}
export const queryById = (params: { id: String }) =>
defHttp.get<OfficeItem>({url: prefix + Api.QueryById, params});
export const list = (params: OfficeParams) =>
defHttp.get<OfficeItemListResult>({url: prefix + Api.List, params});
export const set = (params: OfficeItem) => {
if (isDef(params.id)){
defHttp.put<OfficeItem>({url: prefix + Api.Update, params});
}else {
defHttp.post<OfficeItem>({url: prefix + Api.Add, params});
}
};
export const remove = (params: {ids: String}) =>
defHttp.delete<boolean>({url: prefix + Api.Remove + `/${params.ids}`});