import request from '@/utils/request'

export function getMuseumTree(params) {
  return request({
    url: '/sys/dept/tree',
    method: 'get',
    params
  })
}
export function getMuseumTreeV1(params) {
  return request({
    url: '/sys/dept/v1/tree',
    method: 'get',
    params
  })
}

export function addMuseum(data) {
  return request({
    url: '/sys/dept',
    method: 'post',
    data
  })
}
export function editMuseum(data) {
  return request({
    url: '/sys/dept',
    method: 'put',
    data
  })
}

// 获取博物馆列表
export function getMuseumList(params) {
  return request({
    url: '/sys/depts',
    method: 'get',
    params
  })
}

// 根据博物馆id查询详情
export function getMSDetailById(id) {
  return request({
    url: `/sys/dept/${id}`,
    method: 'get',
  })
}

// 删除博物馆
export function deleteMuseum(id) {
  return request({
    url: `/sys/dept/${id}`,
    method: 'delete',
  })
}

// 查询行政区划树
export function getSysRegionTree(params) {
  return request({
    url: `/sysRegion/tree`,
    method: 'get',
    params
  })
}
