import request from '@/utils/httpRequest'

export default class OfficeService {
  save (inputForm) {
    return request({
      url: `/sys/office/save`,
      method: 'post',
      data: inputForm
    })
  }

  delete (ids) {
    return request({
      url: '/sys/office/delete',
      method: 'delete',
      params: {ids: ids}
    })
  }

  queryById (id) {
    return request({
      url: `/sys/office/queryById`,
      method: 'get',
      params: {id: id}
    })
  }

  treeData (params) {
    return request({
      url: '/sys/office/treeData',
      method: 'get',
      params: params
    })
  }

  treeData2 (params) {
    return request({
      url: '/sys/office/treeData2',
      method: 'get',
      params: params
    })
  }
  listTree (params) {
    return request({
      url: '/sys/office/list_tree',
      method: 'get',
      params: params
    })
  }
  getSecondLevelData () {
    return request({
      url: '/sys/office/getSecondLevelData',
      method: 'get'
    })
  }
  getAllCompany () {
    return request({
      url: '/sys/office/get_all_company',
      method: 'get'
    })
  }
  checkLoginIsPgOrKj () {
    return request({
      url: '/sys/office/checkLoginIsPgOrKj',
      method: 'get'
    })
  }
}
