/**
 * 组织表
 */

import http from '../http'

export default {
  page: data => http.post('/v1/org/page', data).then(res => res),
  add: data => http.post('/v1/org/', data).then(res => res),
  edit: data => http.put('/v1/org/' + data.id, data.obj).then(res => res),
  getById: id => http.get('/v1/org/vo_' + id).then(res => res),
  // 组织tree
  orgTreeList: data => http.post('/v1/org/org-tree', data).then(res => res),
  getOrg: () => http.get('/v1/org/current').then(res => res),
  contractPage: data =>
    http.post('/food/v1/contract/page', data).then(res => res)
}
