//巡逻方块管理
import request from "@/utils/request";
const api = "/mosty-api/mosty-yjzl";

// 分页查询
export function getPatrolBlockList(params) {
    return request({
        url: api + '/tbZdxlFgdw/selectPage',
        method: 'GET',
        params
    })
}
//新增
export function addPatrolBlock(data) {
    return request({
        url: api + '/tbZdxlFgdw/save',
        method: "post",
        data
    })
}
//修改
export function updatePatrolBlock(data) {
    return request({
        url: api + '/tbZdxlFgdw/update',
        method: "post",
        data
    })
}
//详情
export function getPatrolBlockInfo(id) {
    return request({
        url: api + `/tbZdxlFgdw/${id}`,
        method: "get"
    })
}
//删除
export function deletePatrolBlock(id) {
    return request({
        url: api + `/tbZdxlFgdw/${id}`,
        method: "delete"
    })
}
// 根据经纬度获取正方形四个点位
export function getSquarePoints(params) {
    return request({
        url: api + '/tbZdxlFgdw/getSquarePoints',
        method: 'GET',
        params
    })
}
