import request from "@/utils/request";

//分页查询监督计划
export function pagePlan(data) {
    return request({
        url: "/process-boot/supv/plan/pagePlan",
        method: "post",
        data,
    });
}
//新增技术监督计划
export function addPlan(data) {
    return request({
        url: "/process-boot/supv/plan/addPlan",
        method: "post",
        data,
    });
}
//修改技术监督计划
export function updatePlan(data) {
    return request({
        url: "/process-boot/supv/plan/updatePlan",
        method: "post",
        data,
    });
}
//删除监督计划
export function delPlan(data) {
    return request({
        url: "/process-boot/supv/plan/delPlan",
        method: "post",
        data,
    });
}



//新增技术监督计划
export function saveOrUpdatePlanRel(data) {
    return request({
        url: "/process-boot/supv/plan/saveOrUpdatePlanRel",
        method: "post",
        data,
    });
}
//修改技术监督计划
export function delPlanRel(data) {
    return request({
        url: "/process-boot/supv/plan/delPlanRel",
        method: "post",
        data,
    });
}
//删除监督计划
export function planRelList(data) {
    return request({
        url: "/process-boot/supv/plan/planRelList",
        method: "post",
        data,
    });
}




//分页查询监督问题
export function pageProblem(data) {
    return request({
        url: "/process-boot/supv/problem/pageProblem",
        method: "post",
        data,
    });
}
//新增技术监督问题
export function addProblem(data) {
    return request({
        url: "/process-boot/supv/problem/addProblem",
        method: "post",
        data,
    });
}
//修改技术监督问题
export function updateProblem(data) {
    return request({
        url: "/process-boot/supv/problem/updateProblem",
        method: "post",
        data,
    });
}
//删除监督问题
export function delProblem(data) {
    return request({
        url: "/process-boot/supv/problem/delProblem",
        method: "post",
        data,
    });
}
//监督计划问题附件上传
export function planUpload(data) {
    return request({
        url: '/process-boot/supv/file/planUpload',
        method: 'post',
        headers: { 'Content-Type': 'multipart/form-data' },
        data
    })
}
//监督计划问题附件下载
export function detail(data) {
    return request({
        url: '/process-boot/supv/file/detail',
        method: 'post',
        params:data,
        responseType: 'blob'

    })
}

//删除附件
export function delFile(data) {
    return request({
        url: '/process-boot/supv/file/delFile',
        method: 'post',
        data,

    })
}

//查询监督月报
export function statisticReportPage(data) {
    return request({
        url: '/process-boot/supv/report/statisticReportPage',
        method: 'post',
        params:data,

    })
}
//推送技术监督工作计划
export function pushPlan(data) {
    return request({
        url: '/process-boot/supv/push/pushPlan',
        method: 'post',
        data,

    })
}
//推送技术监督实施问题
export function pushQuestion(data) {
    return request({
        url: '/process-boot/supv/push/pushQuestion',
        method: 'post',
        data,

    })
}
//推送技术监督实施问题
export function pushQuestionUpdate(data) {
    return request({
        url: '/process-boot/supv/push/pushQuestionUpdate',
        method: 'post',
        data,

    })
}
//取消电能质量技术监督工作计划接口
export function delPushPlan(data) {
    return request({
        url: '/process-boot/supv/push/delPushPlan',
        method: 'post',
        data,

    })
}
//推送技术监督月报统计数据接口
export function pushMonthReportStatistic(data) {
    return request({
        url: '/process-boot/supv/push/pushMonthReportStatistic',
        method: 'post',
        data,

    })
}
//推送附件接口
export function pushFile(data) {
    return request({
        url: '/process-boot/supv/push/pushFile',
        method: 'post',
        data,

    })
}
//实施人员下拉框
export function getUserListByDeptId(data) {
    return request({
        url: '/user-boot/user/getUserListByDeptId',
        method: 'get',
        params:data,

    })
}

export function getAlarmList(data) {
    return request({
        url: '/process-boot/supvAlarm/selectAlarmList',
        method: 'get',
    })
}

//获取单位信息
export function getDeptByCode(data) {
    return request({
        url: '/user-boot/dept/getDeptByCode',
        method: 'get',
        params:data,

    })
}

//新增技术监督计划历史记录
export function addPlanHis(data) {
    return request({
        url: '/process-boot/supvPlanHis/addPlanHis',
        method: 'post',
        data,

    })
}
//查询附件信息集合
export function list(data) {
    return request({
        url: '/process-boot/supv/file/list',
        method: 'post',
        data,

    })
}
//所有监督问题
export function problemList(data) {
    return request({
        url: '/process-boot/supv/problem/problemList',
        method: 'post',
        data,
        responseType: 'blob'

    })
}
//监督月报统计
export function statisticReport(data) {
    return request({
        url: '/process-boot/supv/report/statisticReport',
        method: 'post',
        params:data,

    })
}
