import request from "@/utils/request";

//查询普测计划-新建页面
export function queryPlan(data) {
    return request({
        url: "/process-boot/rGeneralSurveyPlan/queryPlan",
        method: "post",
        data,
    });
}
//导出普测计划信息
export function exportSurveyPlan(data) {
    return request({
        url: "/process-boot/rGeneralSurveyPlan/exportSurveyPlan",
        method: "post",
        data,
        responseType: "blob",
    });
}
//新增
export function getGeneratrixByCondition(data) {
    return request({
        url: "/device-boot/pms/generatrixWire/getGeneratrixByCondition",
        method: "post",
        data,
    });
}
// 获取变电站名称
export function getstatationStatList(data) {
    return request({
        url: "/device-boot/pms/statationStat/getstatationStatList",
        method: "post",
        data,
    });
}
// 新增-修改普测计划
export function addPlan(data) {
    return request({
        url: "/process-boot/rGeneralSurveyPlan/addPlan",
        method: "post",
        data,
    });
}

//删除
export function delPlan(data) {
    return request({
        url: "/process-boot/rGeneralSurveyPlan/deletePlan",
        method: "post",
        data,
    });
}

//查询普测计划-审核页面
export function queryPlanAudit(data) {
    return request({
        url: "/process-boot/rGeneralSurveyPlan/queryPlanAudit",
        method: "post",
        data,
    });
}
//查询普测计划-结果页面
export function queryPlanResult(data) {
    return request({
        url: "/process-boot/rGeneralSurveyPlan/queryPlanResult",
        method: "post",
        data,
    });
}
//下载普测结果报告
export function surveyResultDownload(data) {
    return request({
        url: "/process-boot/rGeneralSurveyPlan/surveyResultDownload?planNo=" +
            data.planNo,
        method: "post",
        //   responseType: 'blob',
    });
}
//下载
export function downLoadData(data) {
    return request({
        url: data,
    });
}
export function MultipartFile(data) {
    return request({
        url: "/process-boot/rGeneralSurveyPlan/surveyResultUpload",
        method: "post",
        headers: { "Content-Type": "multipart/form-data" }, //多文件上传这一句必须加
        data,

    });
}
export function initDetpStataionTree(data) {
    return request({
        url: "/process-boot/rGeneralSurveyPlan/initDetpStataionTree",
        method: "post",
        params: data,
    });
}
// 普测计划-审核
export function checkPlanAudit(data) {
    return request({
        url: "/process-boot/rGeneralSurveyPlan/checkPlanAudit",
        method: "post",
        data,
    });
}

export function queryPlanOne(data) {
    return request({
        url: "/process-boot/rGeneralSurveyPlan/queryPlanOne",
        method: "post",
        params:data,
    });
}

// 普测计划-审核
export function queryPlanConfig(data) {
    return request({
        url: "/process-boot/rGeneralSurveyPlan/queryPlanConfig",
        method: "post",
        data,
    });
}
// 增加普测计划参数
export function addPlanConfig(data) {
    return request({
        url: "/process-boot/rGeneralSurveyPlan/addPlanConfig",
        method: "post",
        data,
    });
}
// 电站勾选接口
export function querySubStatation(data) {
    return request({
        url: "/process-boot/rGeneralSurveyPlan/querySubStatation",
        method: "post",
        params: data,
    });
}
// 设置普测周期
export function addPlanCycle(data) {
    return request({
        url: "/process-boot/rGeneralSurveyPlan/addPlanCycle",
        method: "post",
        params: data,
    });
}
// 批量提交审核
export function planStatus(data) {
    return request({
        url: "/process-boot/rGeneralSurveyPlan/planStatus",
        method: "post",
         data,
    });
}

//提交审核
export function submitAuditUser(data) {
    return request({
        url: "/process-boot/rGeneralSurveyPlan/submitAuditUser",
        method: "post",
        data,
    });
}


//获取审核人
export function getAuditUser(data) {
    return request({
        url: "/user-boot/user/getUserByRoleType",
        method: "get",
        params: data,
    });
}
