import {requestInstance} from "./index";
import {UserInfo} from "@/unit/UserInfo";

// export function getReportDetail(uuid) {
//     return requestInstance({
//         url:'/ptjkInterface/selectTemplateMainUnit?appkey=' + new UserInfo().GetUserKeyCode() ,
//         data:{
//             "UUID": uuid
//         }
//     })
// }

//获取报告模板数据
export function getReportDetail(uuid = '3fdd9c38-8e6a-40fd-a170-9c635bf7f8bb') {
    return requestInstance({
        url:'/ptjkInterface/getPtglTempLate?appkey=' + new UserInfo().GetUserKeyCode() ,
        data:{
            "UUID": uuid
        }
    })
}
//获取报告统计结果数据
export function getReportResultDetail(uuid = '3fdd9c38-8e6a-40fd-a170-9c635bf7f8bb') {
    return requestInstance({
        url:'/ptjkInterface/selectTemplateMainUnit?appkey=' + new UserInfo().GetUserKeyCode() ,
        data:{
            "UUID": uuid
        }
    })
}



export function getQualityReportTableList(params) {
    const user = new UserInfo()
    return requestInstance({
        url:'/zljc/selectInspectionReportPageList?appkey='+ new UserInfo().GetUserKeyCode(),
        data:{
            ...params
        }
    })
}

export function getQualityReportDetail(UUID) {
    const user = new UserInfo()
    return requestInstance({
        url:'/zljc/getInspectonReportByuuid?appkey='+ new UserInfo().GetUserKeyCode(),
        data:{
            UUID
        }
    })
}


export function getQualityReportEdit(params) {
    const user = new UserInfo()
    return requestInstance({
        url:'/zljc/editInspectionReport?appkey='+ new UserInfo().GetUserKeyCode(),
        data:{
            ...params
        }
    })
}


export function getReportAllPath(UUID) {
    const user = new UserInfo()
    return requestInstance({
        url:'/ptjkInterface/sc_templateWords?appkey='+ new UserInfo().GetUserKeyCode(),
        data:{
            UUID
        }
    })
}


