/** * Created by HaijunZhang on 2019/7/23. */ import { request } from '@cmp/cmp-element' import { wrapperParams } from 'utils/index' import { IDepart } from '@/models/depart' const baseUrl = '/sms/v1/departments' export function getDepart(params: any) { return request.get(baseUrl, { params }) } export function getDepartDetail(id: number) { return request.get(`${baseUrl}/${id}`) } export function createDepart(params: IDepart) { return request.post(baseUrl, wrapperParams(params)) } export function modifyDepart(params: IDepart) { return request.put(`${baseUrl}/${params.id}`, wrapperParams(params)) } export function removeDepart(id: number) { return request.delete(`${baseUrl}/${id}`) }