import http from "@/api";
import { Alarm, Resultjob, Station, other } from "../interface";
import qs from "qs";
// export const changeUserStatus = (params: { id: string; status: number }) => {
//   return http.post(`/upload`,qs.stringify(params));
// };
// 用户信息
export const getuser = () => {
  return http.get(`/platform/user/profile/resetPwd`);
};
// 多站预览站点数据--------
export const gethomesite = () => {
  return http.post(`/muitiStation/overview`);
};
// 单站概览站点数据--------
export const getmuitiStation = (id: any) => {
  return http.post(`/muitiStation/${id}/overw`);
};
// 收益统计------------日份
export const multiStationday = (params: {}) => {
  return http.post<Station.between[]>(`/stats/multStation/profit/between/day`, qs.stringify(params));
};
// 收益统计------------月份
export const multiStationMonthMonth = (params: {}) => {
  return http.post<Station.between[]>(`/stats/multStation/profit/between/Month`, qs.stringify(params));
};
// 收益统计------------年份
export const multiStationdayMonth = (params: {}) => {
  return http.post<Station.between[]>(`/stats/multStation/profit/between/yearMonth`, qs.stringify(params));
};
// 充放电统计-----------日份
export const multiStatiopower = (params: {}) => {
  return http.post<Station.power[]>(`/stats/multStation/power/between/day`, qs.stringify(params));
};
// 充放电统计-----------月份
export const multiStatiopowerMonth = (params: {}) => {
  return http.post<Station.power[]>(`/stats/multStation/power/between/Month`, qs.stringify(params));
};
// 充放电统计-----------年份
export const multiStatyearMonth = (params: {}) => {
  return http.post<Station.power[]>(`/stats/multStation/power/between/yearMonth`, qs.stringify(params));
};
// 收益排名--------------日份
export const multiStationtopday = (params: {}) => {
  return http.post<Station.profitday[]>(`/stats/multStation/profit/top/between/day`, qs.stringify(params));
};
// 收益排名--------------月份
export const multiStationtopdayMonth = (params: {}) => {
  return http.post<Station.profitday[]>(`/stats/multStation/profit/top/between/Month`, qs.stringify(params));
};
// 收益排名--------------年份
export const multiStationtopyearMonth = (params: {}) => {
  return http.post<Station.profitday[]>(`/stats/multStation/profit/top/between/yearMonth`, qs.stringify(params));
};
// 故障告警-------------
export const alarmMultiStation = (params: {}) => {
  return http.post<Station.multiStation[]>(`/alarm/multiStation`, qs.stringify(params));
};
// 电站列表----------
export const multiStationpagebaseInfo = (params: {}) => {
  return http.post(`/muitiStation/page/baseInfo`, qs.stringify(params));
};
// 电站卡片查询
export const multiStationpageinfo = (params: {}) => {
  return http.post(`/muitiStation/page/info`, qs.stringify(params));
};
// 国家
export const getlistcountry = (params: {}) => {
  return http.post(`/list/country`, qs.stringify(params));
};
// 省市县
export const getliststate = (params: {}) => {
  return http.post(`/list/state`, qs.stringify(params));
};
// 市
export const getlistcity = (params: {}) => {
  return http.post(`/list/city`, qs.stringify(params));
};
// 县
export const getlistcounty = (params: {}) => {
  return http.post(`/list/county`, qs.stringify(params));
};
//
export const Stationinfo = (params: {}, id: any) => {
  return http.post(`/station/${id}/info`, qs.stringify(params));
};
// 单站橄榄筛选
export const stationstationName = (params: {}) => {
  return http.post<Station.todo[]>(`/station/list/stationName`, qs.stringify(params));
};
// 单站橄榄筛选列表----------
export const emsSystempage = (params: {}, id: any) => {
  return http.post(`/emsSystem/singleStation/${id}/page`, qs.stringify(params));
};
// 单站橄榄收益统计------------日份
export const singlestationday = (params: {}, id: any) => {
  return http.post<Station.profitbetween>(`/stats/singleStation/${id}/profit/between/day`, qs.stringify(params));
};
// 单站橄榄收益统计------------月份
export const singlestationdayMonth = (params: {}, id: any) => {
  return http.post<Station.profitbetween>(`/stats/singleStation/${id}/profit/between/Month`, qs.stringify(params));
};
// 单站橄榄收益统计------------年份
export const singlestationyearMonth = (params: {}, id: any) => {
  return http.post<Station.profitbetween>(`/stats/singleStation/${id}/profit/between/yearMonth`, qs.stringify(params));
};
// 单站橄榄放电统计---------日
export const postsexportKwh = (params: {}, id: any) => {
  return http.post<Station.power[]>(`/stats/singleStation/${id}/singleStation/between/day`, qs.stringify(params));
};
// 单站橄榄放电统计---------月
export const postsexportKwhMonth = (params: {}, id: any) => {
  return http.post<Station.power[]>(`/stats/singleStation/${id}/singleStation/between/Month`, qs.stringify(params));
};
// 单站橄榄放电统计----------年份
export const singlestationchargingMonth = (params: {}, id: any) => {
  return http.post<Station.power[]>(`/stats/singleStation/${id}/between/yuerMonth`, qs.stringify(params));
};
// 单站橄榄放电达成率---------日
export const postexportKwh = (params: {}, id: any) => {
  return http.post<Station.exportKwh>(`/stats/singleStation/${id}/exportKwh/between/day`, qs.stringify(params));
};
// 单站橄榄综合效率------------日份
export const overallEfficiencyday = (params: {}, id: any) => {
  return http.post<Station.efficiency>(`/stats/singleStation/${id}/overallEfficiency/between/day`, qs.stringify(params));
};
// 单站橄榄综合效率------------月份
export const overallEfficiencyyearMonth = (params: {}, id: any) => {
  return http.post<Station.efficiency>(`/stats/singleStation/${id}/overallEfficiency/between/yearMonth`, qs.stringify(params));
};
// 站点系统 查询单个电站二级接口------
export const postemsSystemsingleStation = (params: {}, id: any) => {
  return http.post<Station.emsSystem[]>(`/emsSystem/singleStation/${id}`, qs.stringify(params));
};
// 站点系统 单站实时数据-----
export const poststationrealtime = (params: {}, id: string, ids: string) => {
  return http.post<Station.realtimeinfo>(`/station/${id}/system/${ids}/realtime/info`, qs.stringify(params), { loading: false });
};
// 站点系统 功率趋势图-----
export const poststationsystem = (params: {}, id: string, ids: string) => {
  return http.post<Station.powertrend>(`/station/${id}/system/${ids}/power/trend`, qs.stringify(params), {
    loading: false
  });
};
// 站点系统 实时运行尖峰平谷背景-----
export const stationcolor = (params: {}, id: string, ids: string) => {
  return http.post<Station.operation[]>(`/station/${id}/system/${ids}/realtime/record/period`, qs.stringify(params), {
    loading: false
  });
};
// 站点系统 实时运行-----
export const stationrecord = (params: {}, id: string, ids: string) => {
  return http.post<Station.powertrend>(`station/${id}/system/${ids}/realtime/device/export`, qs.stringify(params), {
    loading: false
  });
};
// 站点系统 告警状态-----
export const poststationdevice = (params: {}, id: string, ids: string) => {
  return http.post<Station.systemdevice[]>(`/station/${id}/system/${ids}/device/status`, qs.stringify(params), {
    loading: false
  });
};
// 站点系统 实时电量收益------
export const postelectricityrevenue = (params: {}, id: string, ids: string) => {
  return http.post<Station.realtimepower>(`/station/${id}/system/${ids}/realtime/powerProfit/report`, qs.stringify(params), {
    loading: false
  });
};
// 站点系统 实时运行数据模型------
export const poststationlist = (params: {}, id: string, ids: string) => {
  return http.post<Station.datatype>(`/station/${id}/system/${ids}/realtime/device/list`, qs.stringify(params), {
    loading: false
  });
};
// 设备监控 tap标签
export const poststationdeviceList = (params: {}, id: any) => {
  return http.post<Station.deviceList[]>(`/device/station/${id}/deviceList`, qs.stringify(params), { loading: false });
};
// 设备监控 pcs标签数据
export const postpcsInfo = (params: {}, id: string, ids: string) => {
  return http.post(`/device/station/${id}/${ids}/pcsInfo`, qs.stringify(params), { loading: false });
};
// 设备监控 电表标签数据
export const electricMeterInfo = (params: {}, id: string, ids: string) => {
  return http.post(`/device/station/${id}/${ids}/electricMeterInfo`, qs.stringify(params), { loading: false });
};
// 设备监控 BMS标签数据
export const BMSfieldCode = (params: {}, id: string) => {
  return http.post(`device/station/${id}/fieldCode`, qs.stringify(params), { loading: false });
};
// 设备监控 BMS标签数据
export const BMSbatteryStackInfo = (params: {}, id: string, ids: string) => {
  return http.post(`device/station/${id}/${ids}/batteryStackInfo`, qs.stringify(params), { loading: false });
};
// 设备监控 空调标签数据
export const getairConditionerInfo = (params: {}, id: string, ids: string) => {
  return http.post(`device/station/${id}/${ids}/airConditionerInfo`, qs.stringify(params), { loading: false });
};
// 电价管理
export const electricitylist = (params: {}, time: any, id: string) => {
  return http.post<Station.electricity[]>(`/electricity/${id}/tariff/${time}/list`, qs.stringify(params));
};
// 电价新增
export const insertschedule = (params: {}, name: string) => {
  return http.post(`/electricity/insertschedule?name=${name}`, params);
};
// 模板管理
export const electricitytmplpage = (params: {}) => {
  return http.post<Station.Tmpl>(`/electricity/tmpl/page`, qs.stringify(params));
};
// 模板管理-模版详情
export const electricitytmplpagedetails = (params: {}, ids: string) => {
  return http.post<Station.Tmpl>(`/electricity/tmpl/${ids}/detail`, qs.stringify(params));
};
// 电价配置-模版查看
export const electricitytmptariff = (params: {}, ids: string) => {
  return http.post<Station.Tmpl>(`/electricity/tariff/${ids}/detail`, qs.stringify(params));
};
// 电量报表按日
export const reportpowerday = (params: {}) => {
  return http.post<Station.summary>(`/report/power/summary/between/day`, qs.stringify(params));
};
// 电量报表按月份
export const reportpoweryearMonth = (params: {}) => {
  return http.post<Station.summary>(`/report/power/summary/between/yearMonth`, qs.stringify(params));
};
// 电量报表按年
export const reportpoweryear = (params: {}) => {
  return http.post<Station.summary>(`/report/power/summary/between/year`, qs.stringify(params));
};
// 电量报表-单站报表折线图
export const reportsingleStationline = (params: {}, id: any) => {
  return http.post(`/report/power/singleStation/${id}/period/line`, qs.stringify(params));
};
// 电量报表-单站报表原始数据
export const reportsingleStationoriginal = (params: {}, id: any, ids: any) => {
  return http.post(`report/power/singleStation/${id}/period/systemId/${ids}/original`, qs.stringify(params));
};
// 电量报表-单站报表——表格
export const singleStationtable = (params: {}, id: any) => {
  return http.post<Station.realtimepower>(`/report/power/singleStation/${id}/period/table`, qs.stringify(params));
};
// 电量报表-单站_日报表
export const electricitylevelday = (params: {}, id: any) => {
  return http.post<Station.singleStation>(`/report/power/singleStation/${id}/between/day`, qs.stringify(params));
};
// 电量报表-单站_月报表
export const electricitylevelyearMonth = (params: {}, id: any) => {
  return http.post<Station.singleStation>(`/report/power/singleStation/${id}/between/yearMonth`, qs.stringify(params));
};
// 电量报表-单站_年报表
export const electricitylevelyear = (params: {}, id: any) => {
  return http.post<Station.singleStation>(`/report/power/singleStation/${id}/between/year`, qs.stringify(params));
};
// 电量管理
export const stationmanage = (params: {}) => {
  return http.post(`/station/manage/list`, qs.stringify(params));
};
// 故障告警-今日告警
export const todayAlarm = (params: {}) => {
  return http.post<Alarm.today[]>(`/alarm/todayAlarm`, qs.stringify(params));
};
// 故障告警-告警等级
export const postalarmLevel = (params: {}) => {
  return http.post<Alarm.today[]>(`/alarm/alarmLevel`, qs.stringify(params));
};
// 故障告警-设备类型
export const postdeviceClass = (params: {}) => {
  return http.post<Alarm.today[]>(`alarm/deviceClass`, qs.stringify(params));
};
// 故障告警-处理建议
export const posthandlingSugg = (params: {}) => {
  return http.post<Alarm.today[]>(`alarm/handlingSugg`, qs.stringify(params));
};
// 故障告警-数据列表
//
export const postpageInfo = (params: {}) => {
  return http.post<Alarm.today[]>(`alarm/pageInfo`, qs.stringify(params));
};
// 收益报表-汇总_日表
export const incomeday = (params: {}) => {
  return http.post<Station.summary>(`/profit/report/summary/between/day`, qs.stringify(params));
};
// 收益报表-汇总_月表
export const incomeyearMonth = (params: {}) => {
  return http.post<Station.summary>(`/profit/report/summary/between/yearMonth`, qs.stringify(params));
};
// 收益报表-汇总_年表
export const incomeyear = (params: {}) => {
  return http.post<Station.summary>(`/profit/report/summary/between/year`, qs.stringify(params));
};
// 收益报表-汇总_日表
export const singleincomeday = (params: {}, id: any) => {
  return http.post<Station.summary>(`/profit/report/singleStation/${id}/between/day`, qs.stringify(params));
};
// 收益报表-汇总_月表
export const singleincomeyearMonth = (params: {}, id: any) => {
  return http.post<Station.summary>(`/profit/report/singleStation/${id}/between/yearMonth`, qs.stringify(params));
};
// 收益报表-汇总_年表
export const singleincomeyear = (params: {}, id: any) => {
  return http.post<Station.summary>(`/profit/report/singleStation/${id}/between/year`, qs.stringify(params));
};
// 导出电量报表汇总-按日
export const Summaryexportday = (params: {}) => {
  return http.post<other.Data>(`/report/power/exportday`, qs.stringify(params));
};
// 导出电量报表报表汇总-按月
export const Summaryexportmonth = (params: {}) => {
  return http.post<other.Data>(`/report/power/summaryearmonthEXcel`, qs.stringify(params));
};
// 导出电量报表报表汇总-按年
export const Summaryexportyear = (params: {}) => {
  return http.post<other.Data>(`/report/power/summaryearEXcel`, qs.stringify(params));
};
// 导出电量报表单站-按日
export const betweenbiaoExcel = (params: {}, id: any) => {
  return http.post<other.Data>(`/report/power/singleStation/${id}/betweenbiaoExcel`, qs.stringify(params));
};
// 导出电量报表单站-按月
export const betweenyearMonthExcel = (params: {}, id: any) => {
  return http.post<other.Data>(`/report/power/singleStation/${id}/betweenyearMonthExcel`, qs.stringify(params));
};
// 导出电量报表单站-按年
export const betweenyearExcel = (params: {}, id: any) => {
  return http.post<other.Data>(`/report/power/singleStation/${id}/betweenyearExcel`, qs.stringify(params));
};
// 导出收益报表汇总-按日
export const reportsummarymonthEXcel = (params: {}) => {
  return http.post<other.Data>(`/profit/report/reportsummarydayEXcel`, qs.stringify(params));
};
// 导出收益报表报表汇总-按月
export const summaryearmonthEXcel = (params: {}) => {
  return http.post<other.Data>(`/profit/report/reportsummarymonthEXcel`, qs.stringify(params));
};
// 导出收益报表报表汇总-按年
export const reportsummaryyearEXcel = (params: {}) => {
  return http.post<other.Data>(`/profit/report/reportsummaryyearEXcel`, qs.stringify(params));
};
// 导出收益报表单站-按日
export const reportsingleExcel = (params: {}, id: any) => {
  return http.post<other.Data>(`/profit/report/${id}/reportsingleExcel`, qs.stringify(params));
};
// 导出收益报表单站-按月
export const singlemonthExcel = (params: {}, id: any) => {
  return http.post<other.Data>(`/profit/report/${id}/singlemonthExcel`, qs.stringify(params));
};
// 导出收益报表单站-按年
export const singleyeaeExcel = (params: {}, id: any) => {
  return http.post<other.Data>(`/profit/report/${id}/singleyeaeExcel`, qs.stringify(params));
};
// 查询用户列表
export const platformuserlist = (params: {}) => {
  return http.post(`/platform/user/list`, qs.stringify(params));
};
// 加载部门列表树
export const gettreeData = () => {
  return http.get<other.tableData1[]>(`/platform/dept/treeData`);
};
//  查询岗位列表
export const platformlist = (params: {}) => {
  return http.post(`/platform/shu/getUserInfoWithRolesAndPosts`, qs.stringify(params));
};
// 用户管理新增保存接口
export const platformadd = (params: {}) => {
  return http.post(`/platform/user/add`, qs.stringify(params));
};
// 用户管理编辑保存接口
export const platformedit = (params: {}) => {
  return http.post(`/platform/user/edit`, qs.stringify(params));
};
// 用户管理修改回显接口
export const yonghuedit = (id: any) => {
  return http.get(`/platform/shu/yonghuedit/${id}`);
};
// 用户管理修改回显密码接口
export const getresetPwd = (id: any) => {
  return http.post(`/platform/shu/resetPwda/${id}`);
};
// 用户管理重置密码保存
export const resetPwd = (params: {}) => {
  return http.post(`/platform/user/resetPwd`, qs.stringify(params));
};
// 删除用户信息
export const userremove = (params: {}) => {
  return http.post(`/platform/user/remove`, qs.stringify(params));
};
// 角色查询列表
export const platformrolelist = (params: {}) => {
  return http.post(`/platform/role/list`, qs.stringify(params));
};
// 角色管理新增保存接口
export const platformroleadd = (params: {}) => {
  return http.post(`/platform/role/add`, qs.stringify(params));
};
// 角色管理编辑保存接口
export const platformroleedit = (params: {}) => {
  return http.post(`/platform/role/edit`, qs.stringify(params));
};
// 删除用户信息
export const platformroleremove = (params: {}) => {
  return http.post(`/platform/role/remove`, qs.stringify(params));
};
// 角色管理修改回显密码接口
export const platformshuRoleedit = (id: any) => {
  return http.get(`/platform/shu/Roleedit/${id}`);
};
// 菜单查询列表
export const platformmenulist = (params: {}) => {
  return http.post<other.tableData1[]>(`/platform/menu/list`, qs.stringify(params));
};
// 部门管理列表
export const platformdeptlist = (params: {}) => {
  return http.post<other.tableData1[]>(`/platform/dept/list`, qs.stringify(params));
};

// 部门管理新增保存接口
export const platformdeptadd = (params: {}) => {
  return http.post(`/platform/dept/add`, qs.stringify(params));
};
// 用户管理修改回显接口
export const platformdeptendit = (id: any) => {
  return http.get(`/platform/shu/Deptedit/${id}`);
};
// 部门管理编辑保存接口
export const platformdeptedit = (params: {}) => {
  return http.post(`/platform/dept/edit`, qs.stringify(params));
}; // 删除部门信息
export const platformdeptremove = (params: { ids: any }) => {
  return http.get(`/platform/dept/remove/${params.ids}`);
};
// 部门管理列表
export const platformpostlist = (params: {}) => {
  return http.post(`/platform/post/list`, qs.stringify(params));
};
// 删除部门信息
export const platformpostremove = (params: {}) => {
  return http.post(`/platform/post/remove`, qs.stringify(params));
};
// 岗位管理新增保存接口
export const platformpostadd = (params: {}) => {
  return http.post(`/platform/post/add`, qs.stringify(params));
};
// 岗位管理编辑保存接口
export const platformpostedit = (params: {}) => {
  return http.post(`/platform/post/edit`, qs.stringify(params));
};
// 修改岗位-信息回显
export const platformshupostedit = (id: any) => {
  return http.get(`/platform/shu/postedit/${id}`);
};
// 权限
// 加载角色菜单列表树编辑
export const roleMenuTreeDataadd = () => {
  return http.get<other.tableData1[]>(`/platform/menu/roleMenuTreeData`);
};
// 加载角色菜单列表树
export const roleMenuTreeData = (id: any) => {
  return http.get<other.tableData1[]>(`/platform/menu/roleMenuTreeData?id=${id}`);
};
// 授权电站给用户
export const savetenantpower = (id: any, params: {}) => {
  return http.post(`/system/tenantpower/savetenantpower/${id}`, qs.stringify(params));
};
// 电站分配回显
export const selectPowerstation = (id: any) => {
  return http.post(`/system/tenantpower/selectPowerstation/${id}`);
};
// 查询用户被分配到的电站
export const selectTenantPower = (params: {}) => {
  return http.post(`/system/tenantpower/selectTenantPowerId`, qs.stringify(params));
};
// 取消用户下所有电站关联
export const deletetenatId = (params: {}) => {
  return http.post(`/system/tenantpower/deletetenatId`, qs.stringify(params));
};
// 密码回显
export const selectaccountNumber = (params: {}) => {
  return http.post(`/platform/user/selectaccountNumber`, qs.stringify(params));
};

// 通信配置查询出所有的配置数据
export const selectAllURL = (params: {}) => {
  return http.post(`/platform/shu/selectAll`, qs.stringify(params));
};
// 修改TDengine与Mysql的连接
export const updateMysqlTDengineURL = (params: {}) => {
  return http.post(`/platform/shu/updateMysqlTDengine`, qs.stringify(params));
};
// 查询全部ems
export const selectemssytemALLURL = (params: {}) => {
  return http.post(`/station/manage/selectemssytemALL`, qs.stringify(params));
};
// 新增-电站信息-设备信息
export const insertpowerURL = (params: {}) => {
  return http.post(`/station/manage/insertpower`, qs.stringify(params));
};
// 编辑-电站信息-设备信息
export const updatesingleeditURL = (params: {}) => {
  return http.post(`/station/manage/updatesingle`, qs.stringify(params));
};
// 系统设置-设备管理-列表
export const selectemssytemNameURL = (params: {}) => {
  return http.post(`/emsSystem/singleStation/selectemssytemName`, qs.stringify(params));
};
// 系统设置-设备管理-编辑保存
export const updateemssytemNameURL = (params: {}) => {
  return http.post(`/emsSystem/singleStation/updateemssytemName`, qs.stringify(params));
};
// 系统设置-电价-添加电站和模版的中间表
export const selectelectURL = (params: {}) => {
  return http.post(`/electricity/selectelect`, qs.stringify(params));
};

// 系统设置-电价-查询全部的模版名称
export const insertscheduletariffURL = (params: {}) => {
  return http.post(`/electricity/insertscheduletariff`, qs.stringify(params));
};
// 系统设置-电价-查询全部的模版名称
export const selectpoweroverviewURL = (params: {}) => {
  return http.post<other.Select>(`/electricity/selectpoweroverview`, qs.stringify(params));
};
// 系统设置-上传图片
export const uploadURL = (params: {}) => {
  return http.post(`/station/manage/upload/webPost`, params);
};
// 修改用户信息
export const updateURL = (params: {}) => {
  return http.post(`/platform/user/profile/update`, qs.stringify(params));
};
// 查询全部的定时任务
export const joblistURL = (params: {}) => {
  return http.post<Resultjob>(`/platform/monitor/job/list`, qs.stringify(params));
};
// 查询全部的定时任务
export const checkCronExpressionIsValid = (params: {}) => {
  return http.post<Resultjob>(`/platform/monitor/job/checkCronExpressionIsValid`, qs.stringify(params));
};
// 新增保存调度
export const monitorjobadd = (params: {}) => {
  return http.post<Resultjob>(`/platform/monitor/job/add`, qs.stringify(params));
};
// 修改保存调度
export const monitorjobedit = (params: {}) => {
  return http.post<Resultjob>(`/platform/monitor/job/edit`, qs.stringify(params));
};
// 修改任务调度修改回显
export const jobeditupdate = (id: any) => {
  return http.get(`/platform/monitor/job/editupdate/${id}`);
};
// 定时任务删除
export const jobremove = (params: {}) => {
  return http.post(`/platform/monitor/job/remove`, qs.stringify(params));
};
// 定时任务状态修改
export const jobchangeStatus = (params: {}) => {
  return http.post(`/platform/monitor/job/changeStatus`, qs.stringify(params));
};
// 编辑电站信息

export const editpowerURL = (id: any, params: {}) => {
  return http.post(`/station/manage/editpower/${id}`, qs.stringify(params));
};
// 设备管理-编辑回显
export const selectemsNameURL = (id: any, params: {}) => {
  return http.post(`/emsSystem/singleStation/selectemsName/${id}`, qs.stringify(params));
};
// 获取用户身份标识
export const screenfanhuiURL = () => {
  return http.post(`/screen/fanhui`);
};
// 修改模版信息回显
export const selectscheduletariffidURL = (id: any) => {
  return http.get(`/electricity/selectscheduletariffid/${id}`);
};
// 修改电价模版信息
export const electricityupdateURL = (name: string, id: any, params: {}) => {
  return http.post(`/electricity/update?name=${name}&id=${id}`, params);
};
// 故障告警导出
export const pageInfoexcelURL = (params: {}) => {
  return http.post(`/alarm/pageInfoexcel`, qs.stringify(params));
};
// 原始数据列表
export const tdengineyuanshilURL = (params: {}) => {
  return http.post(`/tdengineyuanshi/list`, qs.stringify(params));
};
// 原始数据导出
export const listexcellURL = (params: {}) => {
  return http.post(`/tdengineyuanshi/listexcel`, qs.stringify(params));
};

// 点位名称查询
export const selectpeekURL = (params: {}) => {
  return http.post(`/tdengineyuanshi/selectpeek`, qs.stringify(params));
};
// 点位名称修改
export const updatepeekURL = (params: {}) => {
  return http.post(`/tdengineyuanshi/updatepeek`, qs.stringify(params));
};
// 一键同步所有列
export const insertpeekURL = (params: {}) => {
  return http.post(`/tdengineyuanshi/insertpeek`, qs.stringify(params));
};
// 原始数据
export const powerlistURL = (params: {}) => {
  return http.post(`/tdengineyuanshi/powerlist`, qs.stringify(params));
};
// 原始数据导出状态并下载
export const listexcelURL = () => {
  return http.get(`/tdengineyuanshi/progress`, {}, { loading: false });
};
// 本地原始数据列表
export const directorylURL = () => {
  return http.get(`/tdengineyuanshi/directory`, {}, { loading: false });
};
// 本地原始数据列表
export const directorylURL1 = () => {
  return http.get(`/Thisitem_20241029.tar.gz`, {}, { loading: false });
};
// 接口监控日志
export const LogListpageURL = (params: {}) => {
  return http.post(`/Generate/LogListpage`, qs.stringify(params));
};
// 设备控制启停
export const mqttsendURL = (params: {}) => {
  return http.post(`/mqtt/send`, qs.stringify(params));
};
// 设备控制时间段控制
export const periodoftimeURL = (id: any, params: {}) => {
  return http.post(`/mqtt/periodoftime?deviceId=${id}`, params);
};
// 本地文件上传查询接口
export const selectfileURL = (params: {}) => {
  return http.post(`/tdengineyuanshi/selectfile`, params);
};
// 上传文件
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export const tdengineyuanshiURL = (params: {}, body: FormData) => {
  return http.post(`/tdengineyuanshi/upload`, body, {
    params, // 将额外参数作为查询参数传递
    headers: {
      "Content-Type": "multipart/form-data" // 设置请求头为 multipart/form-data
    }
  });
};
// 大储本地文件下载
export const downloadfileURL = (params: {}) => {
  return http.download(`/tdengineyuanshi/downloadfile`, qs.stringify(params));
};
// 本地查询数字典
export const selectfileidURL = (params: {}) => {
  return http.post(`/tdengineyuanshi/selectfileid`, params);
};
// 并网点列表
export const selectconsolidationURL = (params: {}) => {
  return http.post(`/connectionapp/selectconsolidation`, qs.stringify(params));
};
// web端-修改并网点的信息
export const updateconsolidationURL = (params: {}) => {
  return http.post(`/connectionapp/updateconsolidation`, qs.stringify(params));
};
// web端-根据id查询名称
export const selectconsolidationidURL = (params: {}) => {
  return http.post(`/connectionapp/selectconsolidationid`, qs.stringify(params));
};
// 存储图片网络地址
export const insertnewimagesURL = (params: {}) => {
  return http.post(`/platform/shu/insertnewimages`, qs.stringify(params));
};

// 查询图片网络地址
export const selectnewimagesURL = (params: {}) => {
  return http.post(`/platform/shu/selectnewimages`, qs.stringify(params));
};
// 查询excel电价文件列表
export const selectproiceexcelURL = (params: {}) => {
  return http.post(`/tdengineyuanshi/selectproiceexcel`, qs.stringify(params));
};
// 查询省
export const selectprovinceURL = (params: {}) => {
  return http.post(`/tdengineyuanshi/selectprovince`, qs.stringify(params));
};
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export const priceanalysisURL = (params: {}, body: FormData) => {
  return http.post(`/tdengineyuanshi/electricitypriceanalysis`, body, {
    params, // 将额外参数作为查询参数传递
    headers: {
      "Content-Type": "multipart/form-data" // 设置请求头为 multipart/form-data
    }
  });
};
