import request from '@/utils/request'
import qs from 'qs'
const baseUrl = '/api/upcloud-base-wh-dev-mysql-eistest'
// const baseUrl = '/wrb2'
// 添加策略 POST
//
// /strategyConfig/save-strategyConfig
export function addAreaDirection(params) {
  return request({
    // url: 'mapi/eis/containerMonitoring',
    url: baseUrl + '/eisStoreAreaDirectionService/area/add',
    method: 'post',
    data: params,
    // params: params
  })
}

export function updateAreaDirection(params) {
  return request({
    // url: 'mapi/eis/containerMonitoring',
    url: baseUrl + '/eisStoreAreaDirectionService/area/update',
    method: 'post',
    data: params,
    // params: params
  })
}

export function delAreaDirection(params) {
  return request({
    method: 'post',
    url: baseUrl + '/eisStoreAreaDirectionService/area/delete',
    //data: {'ids': qs.stringify({1})},
    data: qs.stringify(params),
    // url: 'mapi/eis/containerMonitoring',
    // url: baseUrl+'/eisStoreAreaDirectionService/area/delete1',

    // params: params
  })
}
//  查询区域方向表分页查询

export function selAreaDirection(params) {
  return request({
    // url: 'mapi/eis/containerMonitoring',
    url: baseUrl + '/eisStoreAreaDirectionService/area/page',
    method: 'post',
    data: params,
    // params: params
  })
}

export function getAllStoreArea() {
  return request({
    method: 'get',
    url: baseUrl + '/eisWhArea/getAll-storeArea?pageNum=1&pageSize=1000',
  })
}
// 区域方向批量配置功能 POST
// /eisStoreAreaDirectionService/area/toConfigure
export function toConfigure(data) {
  return request({
    method: 'post',
    url: baseUrl + '/eisStoreAreaDirectionService/area/toConfigure',
    data,
  })
}
