import {
	service
} from '../utils/request'
const api1 = "/mosty-base"
const api2 = "/mosty-qwzx"
const api3 = "/mosty-jcgl"

/*
 * 大屏-查询界面巡组列表,附近警组
 *  return promise 实例对象
 */
export function selectDeckList(data) {
	return service({
		url: api2 + "/tbQwXfbb/selectDeckList",
		method: "POST",
		data
	});
};

/*
 * 巡防报备接口分页查询
 *  return promise 实例对象
 */
export function tbQwXfbb(data) {
	return service({
		url: api2 + "/tbQwXfbb",
		method: "GET",
		params: data
	});
};

//查询快返点列表
export function getKfdList(data) {
    return service({
        url: api3 + `/tpJcglKfd/selectKfdList`,
        method: "GET",
        params: data
    });
};

/*
 * 新增报备
 *  return promise 实例对象
 */
export function addXFBB(data) {
	return service({
		url: api2 + "/tbQwXfbb",
		method: "POST",
		data:data
	});
};

/*
 * 新增报备
 *  return promise 实例对象
 */
export function editXFBB(data) {
	return service({
		url: api2 + "/tbQwXfbb",
		method: "put",
		data:data
	});
};

/*
 * 大屏-巡组气泡-查询周边巡组
 *  return promise 实例对象
 */
export function aroundXZ(data) {
	return service({
		url: api2 + "/tbQwXfbb/selectNearbyDeck",
		method: "POST",
		params: data
	});
};

// 查询勤务警组列表
export function queryJzList(data) {
	return service({
		url: api3 + "/tbJcglJz/queryList",
		method: "GET",
		params: data
	});
};

// 查询民警辅警 /tbJcglXfll
export function tbJcglXfll(data) {
	return service({
		url: api3 + "/tbJcglXfll",
		method: "GET",
		params: data
	});
};

// 查询勤务等级
export function getQwdj(data) {
	return service({
		url: api2 + "/tbQwQwdj",
		method: "GET",
		params: data
	});
};

// 查询勤务班次
export function getQwbc(data) {
	return service({
		url: api2 + "/tbQwQwbc",
		method: "GET",
		params: data
	});
};

// 查询巡防区域
export function getXfq(data) {
	return service({
		url: api3 + "/tbJcglXfqy/queryList",
		method: "GET",
		params: data
	});
};

// 世乒赛报备信息
export function getDwbbxx(data={}) {
	return service({
		url: api2 + "/pbbb/dwbbxx",
		method: "GET",
		params: data
	});
};

// 世乒排班信息
export function getDwpbxx(data={}) {
	return service({
		url: api2 + "/pbbb/dwpbxx",
		method: "GET",
		params: data
	});
};

//通过id查询排班信息
export function getPbinfo(params) {
	return service({
		url: api2 +`/tbQwXfpb/getPbZq`,
		method: "GET",
		params
	});
};

//场馆数据
export function getCgxx(data={}) {
	return service({
		url: api2 + "/zdgz/cgzd/cglctj",
		method: "GET",
		params: data
	});
};

//获取快返点详细信息
export function getKfdInfo(data={}) {
	return service({
		url: api3 + "/tpJcglKfd/selectByid",
		method: "GET",
		params: data
	});
};

//通过报备id查询报备详情
export function getBbinfo(id) {
	return service({
		url: api2 +`/tbQwXfbb/${id}`,
		method: "GET",
	});
};


//根据周期ID查询周期详细信息
export function getZbpbZqInfo(id) {
	return service({
		url: api2 +`/tbQwZbpb/getZbpbZqInfo/${id}`,
		method: "GET",
	});
};

//通过ID查询单条数据
export function gettbQwZbbb(id) {
	return service({
		url: api2 +`/tbQwZbbb/${id}`,
		method: "GET",
	});
};

