import request from "@/utils/request";
import request2 from "@/utils/request2";
import request3 from "@/utils/request3";
import request4 from "@/utils/request4";

export const httpImg = 'http://jingkongyun.com:8090/';
export const baseURL = 'http://39.98.150.124:8888/'


// 登录
export function login(data) {
    return request({
        url: "auth/user/login",
        method: "post",
        data: data
    });
}

// 企业类型  
export function dictDetail(data) {
    return request2({
        // url: "api/dictDetail",
        url: "api/dictDetail/findAll",
        method: "get",
        params: data
    });
}

// 发送短信 
export function sendAlarmSms(data) {
    return request2({
        url: "api/alarmSms/sendAlarmSms",
        method: "get",
        params: data
    });
}


// 企业管理 
export function dept(data) {
    return request2({
        // url: "api/dept/allDepts",
        url: "api/dept/findAll",
        method: "get",
        params: data
    });
}

/* 人员定位 */
export function getRYDWData(data) {
    return request2({
        url: "api/unityData/getRYDWData",
        method: "get",
        params: data
    });
}

/*  */
export function baseDataBigScreenWxy(data) {
    return request2({
        url: "api/baseDataBigScreen/wxy",
        method: "get",
        params: data
    });
}


/* 应急处置 */


// 应急专家
export function expert(data) {
    return request2({
        url: "api/baseDataBigScreen/expert",
        method: "get",
        params: data
    });
}

// 应急车辆
export function rescueCar(data) {
    return request2({
        url: "api/baseDataBigScreen/rescueCar",
        method: "get",
        params: data
    });
}

// 应急避难所
export function refuge(data) {
    return request2({
        url: "api/baseDataBigScreen/refuge",
        method: "get",
        params: data
    });
}

// 应急救援队伍
export function rescueTeam(data) {
    return request2({
        url: "api/baseDataBigScreen/rescueTeam",
        method: "get",
        params: data
    });
}

// 应急物资站点
export function suppliesReserveStation(data) {
    return request2({
        url: "api/baseDataBigScreen/suppliesReserveStation",
        method: "get",
        params: data
    });
}

// 应急物资装备
export function suppliesReserve(data) {
    return request2({
        url: "api/baseDataBigScreen/suppliesReserve",
        method: "get",
        params: data
    });
}


// 应急预警
export function emergencyWarning(data) {
    return request2({
        url: "api/baseDataBigScreen/emergencyWarning",
        method: "get",
        params: data
    });
}

// 应急事件专项预案
export function emergencyPlan(data) {
    return request2({
        url: "api/baseDataBigScreen/emergencyPlan",
        method: "get",
        params: data
    });
}

// 值班人员
export function roster(data) {
    return request2({
        url: "api/baseDataBigScreen/roster",
        method: "get",
        params: data
    });
}

// 环境监测 
export function environment(data) {
    return request2({
        url: "api/baseDataBigScreen/env",
        method: "get",
        params: data
    });
}

// 尾矿库报警 
export function wkkAlarmMsg(data) {
    return request2({
        url: "api/baseDataBigScreen/wkkAlarmMsg",
        method: "get",
        params: data
    });
}



// 尾矿库六项指标数据查询
export function wkk(data) {
    return request({
        url: "wkk",
        method: "post",
        data: data
    });
}



/* 视频 */
export function grouptree(data) {
    return request3({
        url: "api/v1/device/grouptree",
        method: "get",
        params: data
    });
}

// api/v1/stream/start
export function start(data) {
    return request3({
        url: "api/v1/stream/start",
        method: "get",
        params: data
    });
}


// 隐患
export function findHiddenTimeout(data) {
    return request2({
        url: "api/hiddenTroubleCheck/findAllwarningHiddenTrouble",
        method: "get",
        params: data
    });
}

// 重大隐患
export function undergroundSeriousHiddenTrouble(data) {
    return request2({
        url: "/api/undergroundSeriousHiddenTrouble/warn",
        method: "get",
        params: data
    });
}

// 气象
export function weather(data) {
    return request4({
        url: "/api/meteorology",
        method: "get",
        params: data
    });
}

// 新气象接口
export function getWeather(data) {
	return request4({
		url: '/weather',
		method: 'get',
		params: data,
		data: data
	})
}

// 突发事件报警
export function getEmergency(param) {
	return request2({
		url: 'api/emergency',
		method: 'get',
		data: {},
		params: param
	})
}