import request from '@/utils/request'


// 查询区域列表(不分页) 点击push
export function selectAreaList(areaName, parentCode) {
    return request({
        url: `/system/area/selectAreaList?areaName=${areaName}&parentCode=${parentCode}`,
        method: 'get',
    })
}

//搜索
// 查询区域列表(不分页)
export function selectAreaListquery(areaName) {
    return request({
        url: `/system/area/selectAreaList?areaName=${areaName}`,
        method: 'get',
    })
}

//开局
// 查询区域列表(不分页)
export function selectAreaListinfo(areaName) {
    return request({
        url: `/system/area/selectAreaList?areaLevel=${areaName}`,
        method: 'get',
    })
}

// 查询区域列表
export function listArea(query) {
    return request({
        url: '/system/area/list',
        method: 'get',
        params: query
    })
}

// 查询区域详细
export function getArea(id) {
    return request({
        url: '/system/area/' + id,
        method: 'get'
    })
}

// 新增区域
export function addArea(data) {
    return request({
        url: '/system/area/add',
        method: 'post',
        data: data
    })
}

// 修改区域
export function updateArea(data) {
    return request({
        url: '/system/area/edit',
        method: 'POST',
        data: data
    })
}

// 删除区域
export function delArea(id) {
    return request({
        url: '/system/area/' + id,
        method: 'POST'
    })
}

//边远地区
export function updateRemoteSigns(id, remoteSigns) {
    return request({
        url: `/system/area/updateRemoteSigns?id=${id}&remoteSigns=${remoteSigns}`,
        method: 'POST'
    })
}