import req from '@/request.js' const portal = window.context.portal export default { //下拉数据 getTree(data, cb) { req.post(portal + `/device/product/type/getTree`, data).then(res => { cb(res.data) }) }, // deviceStatistics(data, cb) { // req.post(portal + `/homepage/v1/deviceStatistics`, data).then(res => { // cb(res.data) // }) // }, currentStatusAnalyze(data, cb) { req.post(portal + `/homepage/v1/currentStatusAnalyze`, data).then(res => { cb(res.data) }) }, // monthlyAnalyze(data, cb) { // req.post(portal + `/homepage/v1/monthlyAnalyze?code=`+data).then(res => { // cb(res.data) // }) // }, //实时数据 realTimeData(data, cb) { req.post(portal + `/homepage/v1/realTimeData?code=`+data).then(res => { cb(res.data) }) }, query(data, cb) { req.post(portal + `/device/warnInfo/query`, data).then(res => { cb(res.data) }) }, //非智能设备状态分析 generalStatusAnalyze( cb) { req.post(portal + `/homepage/v1/generalStatusAnalyze`).then(res => { cb(res.data) }) }, //智能设备状态分析 intellectStatusAnalyze( cb) { req.post(portal + `/homepage/v1/intellectStatusAnalyze`).then(res => { cb(res.data) }) }, //区域智能设备状态分析 areaStatusAnalyze(data, cb) { req.post(portal + `/homepage/v1/areaStatusAnalyze?typeCode=`+data).then(res => { cb(res.data) }) }, // //区域智能设备状态分析 // deviceProductStatistics(data, cb) { // req.post(portal + `/homepage/v1/deviceProductStatistics?fullId=`+data).then(res => { // cb(res.data) // }) // }, //获取产品列表(不分页) productFindAll(data, cb) { req.post(portal + `/device/product/info/findAll`,data).then(res => { cb(res.data) }) }, //设备使用年限分析 lifeAnalyze( cb) { req.post(portal + `/homepage/v1/lifeAnalyze`).then(res => { cb(res.data) }) }, //近一月状态分析 monthlyAnalyze(data, cb) { req.post(portal + `/homepage/v1/monthlyAnalyze?code=`+data).then(res => { cb(res.data) }) }, //设备历史报警、故障分析 warnFailureHisAnalyze(data,data1,data2, cb) { req.post(portal + `/homepage/v1/warnFailureHisAnalyze?typeCode=${data}&endTime=${data1}&startTime=${data2}`).then(res => { cb(res.data) }) }, AllproductType(data, cb) { req.post(portal + `/device/product/type/getAllTree`,data).then(res => { cb(res.data) }) }, }