import $api from '@/http/index.js'
export default {

    //账号密码登录
    loginByPwd: (params) => $api.post("/login", params),

    //用户信息
    getUserInfo: (params) => $api.get("/user/userInfo", params),

    //修改密码
    updatePwd: (params) => $api.put("/user/password", params),

    //数据字典
    getDictList: (params) => $api.get("/all",params),

    //首页信息
    homeData: (params) => $api.get("/home/homedata", params),

    // 获取空间树
    getBuildInfo: (params) => $api.get("/control/getOrgStructureTree",params),

    //上传图片
    uploadFile: (params) => $api.post("/uploadFile", params, { header: { "Content-Type": "multipart/form-data" } }),

    //空调设备控制分页
    airconditioner: (params) => $api.get("/airconditioner/page", params),

    //电表控制分页
    getElec: (params) => $api.get("/relay/control/page", params),

    //一键开闸关闸
    elecControl: (params) => $api.post("/relay/control/command", params),

    //空调下发指令
    setControl: (params) => $api.post("/airconditioner/command", params),

    //继电器下发指令
    setControlElec: (params) => $api.post("/relay/control/command", params),

    //工单维修--列表
    repairList: (params) => $api.get("/repairorder/page", params),

    //工单维修--详情
    repairDetail: (id) => $api.get(`/repairorder/${id}`),

    //工单维修--保存
    repairSave: (params) => $api.post("/repairorder", params),

    //工单维修--指派
    repairDispatch: (params) => $api.put('/repairorder', params),

    //工单维修--完成
    repairFinish: (id) => $api.post(`/repairorder/finish/${id}`),

    //工单维修--联系人列表
    repairUserList: (params) => $api.get('/user/list',params),

    // 设备异常--列表
    deviceAlarmList: (params) => $api.get("/home/actualAlertList",params),

    // 欠费待收--列表
    lackFeeList: (params) => $api.get("/expeditrecordpage",params),

    // 欠费待收--详情
    lackFeeDetail: (params) => $api.get("/expeditrecord/recordpage",params),

    // 欠费待收--催费
    lackFeePay: (params) => $api.post("/expeditrecord/charge", params),

    //扣缴记录
    reduceRecordList: (params) => $api.get("/payrecord/page",params),

    //租户账单
    rentBillList: (params) => $api.get("/billinfo/paypage",params),

    //租户账单明细--列表
    rentBillDetail: (params) => $api.post("/billinfo/billDetail", params),

    //获取缴费账户
    getTenantAccount: (params) => $api.get(`/accountinfo/detail/${params}`),

    //预存缴费
    tenantPay: (params) => $api.post('/accountinfo/pay', params),

    //立即支付
    billPay: (params) => $api.post('/billinfo/billPay', params),

    //巡检记录
    reviewList: (params) => $api.get("/circuitrecord/page",params),

    //巡检记录--打卡
    reviewClock: (params) => $api.post("/circuitrecord", params),
}