import request from '@/utils/request'

// 获取部门
const getMyDeptList = () => {
    return request({
        url: '/publics/deptList',
        method: 'get'
    })
}
// 查询部门下拉树结构
const getDeptTree = () => {
    return request({
      url: '/publics/deptTree',
      method: 'get'
    })
}
// 查询子公司列表
const getZgsDeptList = () => {
    return request({
      url: '/publics/queryZgsDeptList',
      method: 'get'
    })
}
// 获取项目
const getMyProjectList = () => {
    return request({
        url: '/publics/projectList',
        method: 'get'
    })
}
// 获取人员
const getUserList = (data) => {
    return request({
        url: '/publics/userList',
        method: 'get',
        params: data
    })
}

const queryUnitList = (query) => {
    return request({
      url: '/publics/queryUnitList',
      method: 'get',
      params: query
    })
}

const selectProjectUnitUser = (query) => {
    return request({
      url: '/publics/selectProjectUnitUser',
      method: 'get',
      params: query
    })
}

export default{
    getMyDeptList,
    getDeptTree,
    getZgsDeptList,
    getMyProjectList,
    getUserList,
    queryUnitList,
    selectProjectUnitUser,
}

