import {requestahm,requestahmlogin} from '@/utils/request.js'


//登录接口
export const logins = data => {
    return requestahmlogin({
        url: '/rbac/rbacUser/app/login',
        method: 'GET',
        data: data
    })
}

//返回航站信息ftm/ftmType/getAirport
export const getAirport = data => {
    return requestahm({
        url: '/ftm/ftmType/getAirport',
        method: 'POST',
        data: data
    })
}

//返回用户信息
export const getUserInfo = data => {
    return requestahm({
        url: '/rbac/rbacUser/info',
        method: 'GET',
        data: data
    })
}

//格式化报文Fault
export const getFormattedMessage = data => {
    return requestahm({
        url: '/ftm/ftmEventLeg/getFormattedMessage',
        method: 'GET',
        data: data
    })
}

//analysisJson 格式化报文
export const postAnalysisJson = data => {
    return requestahm({
        url: '/ftm/rep/repReportTemplate/analysisJson',
        method: 'POST',
        data: data
    })
}

//getImgage mel手册
export const getImgage = data => {
    return requestahm({
        url: '/fault/getImgage',
        method: 'GET',
        data: data
    })
}

//getImgageNext mel手册
export const getImgageNext = data => {
    return requestahm({
        url: '/fault/getImgageNext',
        method: 'GET',
        data: data
    })
}

//空调散热添加接口/ftm/raOperate/add
export const raOperateAdd = data => {
    return requestahm({
        url: '/ftm/raOperate/add',
        method: 'POST',
        data: data
    })
}


//事件管控偏好ftm/ftmConfigure/queryConfig
export const queryConfig = data => {
    return requestahm({
        url: '/ftm/ftmConfigure/queryConfig',
        method: 'POST',
        data: data
    })
}

//散点图用1 ftmEvent/getServiceConfData
export const getServiceConfData = data => {
    return requestahm({
        url: '/ftm/ftmEvent/getServiceConfData',
        method: 'POST',
        data: data
    })
}
//散点图用2 serv/ServServiceInfo/getChartData
export const getChartData = data => {
    return requestahm({
        url: '/ftm/serv/ServServiceInfo/getChartData',
        method: 'POST',
        data: data
    })
}


//事件流记录
export const queryHistory = data => {
    return requestahm({
        url: '/ftm/event/deal/queryHistory',
        method: 'GET',
        data: data
    })
}

//事件流新 ftm/eventStream/historyStream
export const historyStream = data => {
    return requestahm({
        url: '/ftm/eventStream/historyStream',
        method: 'GET',
        data: data
    })
}

//ata信息 ftm/ftmAta/getAtaListAll
export const getAtaListAll = data => {
    return requestahm({
        url: '/ftm/ftmAta/getAtaListAll',
        method: 'GET',
        data: data
    })
}

//事件历史详情 getHistoryFlightCountDetail
export const getHistoryFlightCountDetail = data => {
    return requestahm({
        url: '/ftm/ftmEventLeg/getHistoryFlightCountDetail',
        method: 'GET',
        data: data
    })
}


//航段详情实际接口 rep/repReport/getListByLegId
export const getListByLegId = data => {
    return requestahm({
        url: '/ftm/rep/repReport/getListByLegId',
        method: 'POST',
        data: data
    })
}

//获取DD/FC详情
export const engDeDeferInfo = data => {
	console.log('获取DD/FC详情',data)
    return requestahm({
        url: '/ftm/engDeDefer/info/'+data.id,
        method: 'GET',
        data: data
    })
}

//获取DD/FC清单数据
export const engDeDeferList = data => {
    return requestahm({
        url: '/ftm/engDeDefer/list',
        method: 'POST',
        data: data
    })
}

//ahm 飞机3字码接口
export const querypnmcode3 = data => {
    return requestahm({
        url: '/ftm/ftmAirport/listAll',
        method: 'GET',
        data: data
    })
}

//机队ftm/ftmFleet/listAll
export const ftmFleetlistAll = data => {
    return requestahm({
        url: '/ftm/ftmFleet/listAll',
        method: 'GET',
        data: data
    })
}

//机队ftm/ftmFleet/listAll
export const ftmFleetlistAll2 = data => {
    return requestahm({
        url: '/ftm/ftmFleet/listAll',
        method: 'GET',
        data: data
    })
}

 // 机号
export const getTailnumberlist = data => {
    return requestahm({
        url: '/ftm/ftmAirplane/list',
        method: 'GET',
        data: data
    })
} 

//航段详情
export const getFlightLegDetail = data => {
    return requestahm({
        url: '/ftm/ftmFlightLeg/getFlightLegDetail',
        method: 'GET',
        data: data
    })
}


//测试环境能否连 /api/ftm/ftmType/queryStatus
export const qStatus = data => {
    return requestahm({
        url: '/ftm/ftmType/queryStatus',
        method: 'GET',
        data: data
    })
}

//
export const lingio = data => {
    return requestahm({
        url: '/rbac/rbacUser/login',
        method: 'POST',
        data: data
    })
}

//showpdf
export const showpdf = data => {
    return requestahm({
        url: '/fault/showPdf',
        method: 'POST',
        data: data
    })
}

//getPdf
export const getPdf = data => {
    return requestahm({
        url: '/fault/getPdf',
        method: 'GET',
        data: data
    })
}

//ftm/ftmAirline/list  航空公司接口
export const ftmAirlinelist = data => {
    return requestahm({
        url: '/ftm/ftmAirline/list',
        method: 'GET',
        data: data
    })
}

//当前故障 getEventListByReportTypeLegId
export const getEventListByReportTypeLegId = data => {
    return requestahm({
        url: '/ftm/ftmEventLeg/getEventListByReportTypeLegId',
        method: 'GET',
        data: data
    })
}

//获取事件详情信息
export const getEventDetailByTailNumber = data => {
    return requestahm({
        url: '/ftm/ftmEventLeg/getEventDetailByTailNumber',
        method: 'GET',
        data: data
    })
}

//获取历史航段数据
export const getFlightLegHistoryList = data => {
    return requestahm({
        url: '/ftm/ftmFlightLeg/getFlightLegHistoryList',
        method: 'GET',
        data: data
    })
}

//获取机场详细信息
export const getAirportDetail = data => {
    return requestahm({
        url: '/ftm/ftmAirport/getAirportDetail',
        method: 'GET',
        data: data
    })
}

//获取未来72小时航班动态
export const get72HourFlight = data => {
    return requestahm({
        url: '/ftm/ftmFlight/get72HourFlight',
        method: 'GET',
        data: data
    })
}

//卡片视图首页
export const getMonitorInfo = data => {
    return requestahm({
        url: '/ftm/ftmAirplane/monitor/info',
        method: 'POST',
        data: data
    })
}

//Mel  手册
export const getHandbookMEL = data => {
    return requestahm({
        url: '/ftm/ftmType/getHandbookMEL',
        method: 'POST',
        data: data
    })
}

//fim 根据故障码 和机号 确定
export const getHandbookFIM = data => {
    return requestahm({
        url: '/ftm/ftmType/getHandbookFIM',
        method: 'POST',
        data: data
    })
}

//phm 故障监控接口 分页有问题
export const getAppEventList = data => {
    return requestahm({
        url: '/ftm/ftmEventLeg/getEventList',
        method: 'POST',
        data: data
    })
}

// //fim 根据故障码 和机号 确定
// export const getHandbookFIM = data => {
//     return request({
//         url: '/ftm/ftmType/getHandbookFIM',
//         method: 'POST',
//         data: data
//     })
// }

// //phm 飞机3字码接口
// export const querypnmcode3 = data => {
//     return request({
//         url: '/app/appAirplane/listAirportAll',
//         method: 'GET',
//         data: data
//     })
// }


// //phm 故障监控接口 分页有问题
// export const getAppEventList = data => {
//     return request({
//         url: '/app/appEventLeg/getAppEventList',
//         method: 'POST',
//         data: data
//     })
// }

// //phm 故障监控接口
// export const getAppEventList1 = data => {
//     return request({
//         url: '/app/appEventLeg/getAppEventList1',
//         method: 'POST',
//         data: data
//     })
// }


// //phm 机号
// export const getTailnumberlist = data => {
//     return request({
//         url: '/app/appAirplane/list',
//         method: 'GET',
//         data: data
//     })
// }

// /* //phm 机号  有权限的后面换回来
// export const getTailnumberlist = data => {
//     return request({
//         url: '/ftm/ftmAirplane/list',
//         method: 'GET',
//         data: data
//     })
// } */
// //phm 机队
// export const getFleetlist = data => {
//     return request({
//         url: '/ftm/ftmFleet/listAll',
//         method: 'GET',
//         data: data
//     })
// }


// //phm 事件状态
// export const queryStatus = data => {
//     return request({
//         url: '/ftm/ftmType/queryStatus',
//         method: 'GET',
//         data: data
//     })
// }
// //phm 航段信息获取3字码
// export const getAppFlightLegList = data => {
//     return request({
//         url: '/app/appFlightLeg/getAppFlightLegList',
//         method: 'GET',
//         data: data
//     })
// }

