text: import axiosApi from './AxiosApi.js'
  
  const apiList = {
    allTree: {
      method: 'GET',
      url: `/authority/org/tree`
    },
    save: {
      method: 'POST',
      url: `/authority/org`
    },
    update: {
      method: 'PUT',
      url: `/authority/org`
    },
    delete: {
      method: 'DELETE',
      url: `/authority/org`
    },
    preview: {
      method: 'POST',
      url: `/authority/org/preview`
    },
    export: {
      method: 'POST',
      url: `/authority/org/export`
    },
    import: {
      method: 'POST',
      url: `/authority/org/import`
    },
    getUserByOrg:{//分页
      method: 'POST',
      url: `/authority/user/getPage`
    },
    getUserList:{//不分页
      method: 'GET',
      url: `/authority/user/getUserList`
    },
    // transferOrgUser:{
    //   method: 'POST',
    //   url: `/authority/user/transferOrgUser`
    // }
  }
  
  export default {
    allTree (data) {
      return axiosApi({
        ...apiList.allTree,
        data
      })
    },
    save (data) {
      return axiosApi({
        ...apiList.save,
        data
      })
    },
    update (data) {
      return axiosApi({
        ...apiList.update,
        data
      })
    },
    delete (data) {
      return axiosApi({
        ...apiList.delete,
        data
      })
    },
    preview (data) {
      return axiosApi({
        ...apiList.preview,
        data
      })
    },
    export (data) {
      return axiosApi({
        ...apiList.export,
        responseType: "blob",
        data
      })
    },
    import (data) {
      return axiosApi({
        ...apiList.import,
        data
      })
    },
    getUserByOrg (data){
      return axiosApi({
        ...apiList.getUserByOrg,
        data
      })
    },
    getUserList(data){
      return axiosApi({
        ...apiList.getUserList,
        data
      })
    },
    transferOrgUser(data){
      return axiosApi({
        method: 'POST',
        url: `/authority/user/transferOrgUser?orgId=${data.orgId}&userIdList=${data.userIdList}&type=${data.type}`,
        data
      })
    }
  }
  