import request from '@/apis/utils/request'

export function companyKwhList(data) {
	var url='/mobile/employee/companyKwhList';
	return request({
		method: 'post',
		data: data,
		url: url
	})
}

export function deviceStatusMonitoring(data) {
	var url='mobile/employee/deviceStatusMonitoring';
	return request({
		method: 'post',
		data: data,
		url: url
	})
}

// 异常报警记录-详细
export function alarmRecordDetails(id) {
	var url='/mobile/employee/alarmRecordDetails';
	return request({
		method: 'post',
		data: {id: id},
		url: url
	})
}

// 异常报警记录-异常查询条件
export function alarmConfiguration() {
	var url='/mobile/employee/alarmConfiguration';
	return request({
		method: 'post',
		url: url
	})
}

// 主页-异常告警记录
export function alarmRecord(data) {
	var url='/mobile/employee/alarmRecord';
	return request({
		method: 'post',
		data: data,
		url: url
	})
}

// 主页-设备状态
export function homePageDeviceStatus(data) {
	var url='/mobile/employee/homePageDeviceStatus';
	return request({
		method: 'post',
		data: data,
		url: url
	})
}

export function homePage(data) {
	var url='/mobile/tenant/homePage';
	return request({
		method: 'post',
		data: data,
		url: url
	})
}

export function findByOpenId(data) {
	var url='/mobile/employeeUser/findByOpenId';
	if(data){
		data.code="reading"
	}
	return request({
		method: 'get',
		data: data,
		url: url
	})
}

// 主页-用电量(设备远程抄表)
export function homePageKwh(data) {
	var url='/mobile/employee/homePageKwh';
	return request({
		method: 'post',
		data: data,
		url: url
	})
}

// 主页-设备数据检测(设备巡检)
export function homePageDeviceData(data) {
	var url='/mobile/employee/homePageDeviceData';
	return request({
		method: 'post',
		data: data,
		url: url
	})
}

// 主页-拥有的设备的单位
export function deviceCompanyList() {
	var url='/mobile/energyManage/deviceCompanyList';
	return request({
		method: 'post',
		url: url
	})
}

// 主页-累计报警
export function deviceStatus(data) {
	var url='/mobile/energyManage/deviceStatus';
	return request({
		method: 'post',
		data: data,
		url: url
	})
}

// 电量统计
export function electricityStatistics(data) {
	var url='/mobile/ElectricityMeter/electricityStatistics';
	return request({
		method: 'post',
		data: data,
		url: url
	})
}

// 时间段统计
export function timeSlotStatistics(data) {
	var url='/mobile/ElectricityMeter/timeSlotStatistics';
	return request({
		method: 'post',
		data: data,
		url: url
	})
}
 
 
 export function changeCompanyList(data) {
 	var url='/mobile/employeeUser/changeCompanyList';
 	return request({
 		method: 'post',
 		data: data,
 		url: url
 	})
 }
 export function changeCompany(data) {
 	var url='/mobile/employeeUser/changeCompany';
 	return request({
 		method: 'post',
 		data: data,
 		url: url
 	})
 }
 
 export function alarmRecordTPUDetails(data) {
 	var url='/mobile/employee/alarmRecordTPUDetails';
 	return request({
 		method: 'post',
 		data: data,
 		url: url
 	})
 }
 