"use strict";const e=require("../../../common/vendor.js"),a=require("../../../common/libraries/apiLoading.js"),l=require("../../../gen/Apis.js"),u=require("./model.js"),d=()=>{var e,d;a.getApiLoading(l.Apis.Meter.HouseMeters.List,null==(d=null==(e=u.useModel)?void 0:e.formData)?void 0:d.value).then((e=>{u.useModel.listData.value=[...u.useModel.listData.value,...null==e?void 0:e.data],u.useModel.metaData.value=null==e?void 0:e.meta}))},o=()=>{u.useModel.formData.value.page=1,u.useModel.listData.value=[],d()},t={getList:d,handleSearch(){o()},handleChangeFilter(e){u.useModel.formData.value={...u.useModel.formData.value,...e,pahe:1},u.useModel.listData.value=[],d()},handleChangeFilterReadingStatus(e){u.useModel.formData.value={...u.useModel.formData.value,reading_status:(null==e?void 0:e.value)||void 0},u.useModel.listData.value=[],d()},handleChangeTabs(e,a){u.useModel.currentTabs.value=e,u.useModel.formData.value.meter_type=null==a?void 0:a.value,o()},handleLoad(e){u.useModel.formData.value.page=e,d()},handleToAdd(a){e.index.navigateTo({url:`/ME/instrument/add/index?id=${null==a?void 0:a.id}`})},handleToLog(){e.index.navigateTo({url:"/ME/instrument/log/index?id="})}};exports.method=t;
