import createAxios from '@/utils/request'

//获取电能质量问题查询维护数据
export function getIssues(data) {
    return createAxios({
        url: '/process-boot/electricityQuality/getIssues',
        method: 'POST',
        data
    })
}

//填报普测超标问题 新增
export function addGeneralSurveyIssues(data) {
    return createAxios({
        url: '/process-boot/electricityQuality/addGeneralSurveyIssues',
        method: 'POST',
        data
    })
}
//填报运维监控异常问题 新增
export function addAbnormalIssues(data) {
    return createAxios({
        url: '/process-boot/electricityQuality/addAbnormalIssues',
        method: 'POST',
        data
    })
}
//填报用户投诉问题 新增
export function addComplaintIssues(data) {
    return createAxios({
        url: '/process-boot/electricityQuality/addComplaintIssues',
        method: 'POST',
        data
    })
}
//填报在线监测超标问题 新增
export function addExcessiveIssues(data) {
    return createAxios({
        url: '/process-boot/electricityQuality/addExcessiveIssues',
        method: 'POST',
        data
    })
}
//填报计划整改措施
export function correctiveAction(data) {
    return createAxios({
        url: '/process-boot/electricityQuality/correctiveAction',
        method: 'POST',
        data
    })
}
//填报实际采取措施
export function takeAction(data) {
    return createAxios({
        url: '/process-boot/electricityQuality/takeAction',
        method: 'POST',
        data
    })
}
//填报实际采取措施
export function effectAnalysis(data) {
    return createAxios({
        url: '/process-boot/electricityQuality/effectAnalysis',
        method: 'POST',
        data
    })
}
//原因分析
export function reasonAnalysis(data) {
    return createAxios({
        url: '/process-boot/electricityQuality/reasonAnalysis',
        method: 'POST',
        data
    })
}
//查询在线监测超标问题详情
export function getExcessiveDetail(data) {
    return createAxios({
        url: '/process-boot/electricityQuality/getExcessiveDetail?powerQualityProblemNo=' + data,
        method: 'POST'
    })
}
//查询普测超标问题详情
export function getGeneralSurveyDetail(data) {
    return createAxios({
        url: '/process-boot/electricityQuality/getGeneralSurveyDetail?powerQualityProblemNo=' + data,
        method: 'POST'
    })
}
//查询用户投诉问题详情
export function getComplaintDetail(data) {
    return createAxios({
        url: '/process-boot/electricityQuality/getComplaintDetail?powerQualityProblemNo=' + data,
        method: 'POST'
    })
}
//查询运维异常问题详情
export function getAbnormalDetail(data) {
    return createAxios({
        url: '/process-boot/electricityQuality/getAbnormalDetail?powerQualityProblemNo=' + data,
        method: 'POST'
    })
}

//删除问题
export function deleteIssues(data) {
    return createAxios({
        url: '/process-boot/electricityQuality/deleteIssues?powerQualityProblemNo=' + data,
        method: 'POST'
    })
}
//问题归档
export function queryCheckTrack(data) {
    return createAxios({
        url: '/process-boot/electricityQuality/queryCheckTrack?powerQualityProblemNo=' + data,
        method: 'POST'
    })
}
//问题归档
export function archive(data) {
    return createAxios({
        url: '/process-boot/electricityQuality/archive?powerQualityProblemNo=' + data,
        method: 'POST'
    })
}

// device-boot
//稳态指标超标在线监测超标问题详情
export function getRMpPartHarmonicDetail(data) {
    return createAxios({
        url: '/harmonic-boot/rmppartharmonicdetail/getRMpPartHarmonicDetail',
        method: 'POST',
        data
    })
}
//告警明细查看(主配网)
export function getAllAlarmDetailList(data) {
    return createAxios({
        url: '/device-boot/rMpPwAlarmDetail/getAllAlarmDetailList',
        method: 'POST',
        data
    })
}
//获取用电用户列表
export function getPowerUtilizationUserList(data) {
    return createAxios({
        url: '/device-boot/pms/powerClient/getPowerUtilizationUserList',
        method: 'POST',
        data
    })
}
//获取用发电户列表
export function getGenerateElectricityUserList(data) {
    return createAxios({
        url: '/device-boot/pms/powerGenerationUser/getGenerateElectricityUserList',
        method: 'POST',
        data
    })
}

// pqs-procees
//普测计划名称查询
export function querySurveyPlanOnQuestion(data) {
    return createAxios({
        url: '/process-boot/rGeneralSurveyPlan/querySurveyPlanOnQuestion',
        method: 'POST',
        data
    })
}
export function querySurveyPlanName(data) {
    return createAxios({
        url: '/process-boot/rGeneralSurveyPlan/querySurveyPlanName',
        method: 'POST',
        data
    })
}
// 电能质量问题审核
export function checkPowerQuality(data) {
    return createAxios({
        url: '/process-boot/electricityQuality/checkPowerQuality',
        method: 'POST',
        data
    })
}
// 上传文件
export function uploadFile(data) {
    return createAxios({
        url: '/process-boot/electricityQuality/uploadFile',
        method: 'POST',
        data
    })
}

//发起预警单，发起告警单
export function handleWarningAlarmFlag(data) {
    return createAxios({
        url: '/supervision-boot/warningLeaflet/addLineOverLimitData',
        method: 'POST',
        data
    })
}
//发起预警单，发起告警单
export function report(data) {
    return createAxios({
        url: '/supervision-boot/onlineMonitor/report',
        method: 'POST',
        data
    })
}

//提交用户投诉新增表单
export function addComplaintsData(data) {
    return createAxios({
        url: '/supervision-boot/SupervisionUserComplaint/add',
        method: 'POST',
        data
    })
}

//针对用户投诉确认发起告警单
export function sureInitiateWarningLeaflet(query) {
    return createAxios({
        url: '/supervision-boot/SupervisionUserComplaint/initiateWarningLeaflet',
        method: 'POST',
        data: query
    })
}

//根据当前用户部门ID获取监测点

export function getLineDetailByDeptId(obj: any) {
    let form = new FormData()
    form.append('id', obj.id)
    return createAxios({
        url: '/device-boot/deptLine/getLineDetailByDeptId',
        method: 'POST',
        data: form
    })
}
//查看越限详情
export function overLimitDetail(data: any) {
    return createAxios({
        url: '/supervision-boot/onlineMonitor/overLimitDetail',
        method: 'POST',
        data
    })
}
