import request from '@/config/axios'

export interface MapVO {
  id?: number
  name: string
  imageUrl: string
  width?: number
  height?: number
  x?: number
  y?: number
  createTime?: Date
}

export interface PageParam {
  current: number
  size: number
  name?: string
}

// 查询地图参数列表
export const getIsMapPage = async (params: PageParam) => {
  return await request.get({ url: '/iscs/map/getMapPage', params })
}
export const getNotUsedMap = async (mapId:number) => {
  return await request.get({ url: '/iscs/map/getNotUsedMap',params: { mapId } })
}
// 查询地图参数详细
export const selectIsMapById = async (id: number) => {
  return await request.get({ url: '/iscs/map/selectMapById', params: { id } })
}

// 新增地图参数配置
export const insertIsMap = async (data: MapVO) => {
  return await request.post({ url: '/iscs/map/insertMap', data })
}

// 修改地图参数配置
export const updateIsMap = async (data: MapVO) => {
  return await request.put({ url: '/iscs/map/updateMap', data })
}

// 删除地图参数配置
export const deleteIsMapByIds = async (ids) => {
  return await request.delete({
    url: '/iscs/map/deleteMapList?ids=' + ids,
  })
}
