"use strict";const e=require("../../common/vendor.js"),o=require("../../common/libraries/apiLoading.js"),s=require("./model.js"),t=require("../../gen/Apis.js");require("../../common/libraries/request.js");const l=require("../../common/store/useWeAppAuthStore.js");require("../../common/store/useWorkStore.js");const u=l.useWeAppAuthStore(),i=()=>{var e,l;o.getApiLoading(t.Apis.Archive.HouseRegisters.OwnerAuditList,null==(l=null==(e=s.useModel)?void 0:e.formData)?void 0:l.value).then((e=>{s.useModel.dataList.value=[...s.useModel.dataList.value,...null==e?void 0:e.data],s.useModel.meta.value=null==e?void 0:e.meta,console.log(e)}))},a=()=>{s.useModel.dataList.value=[],s.useModel.formData.value.page=1,i()},d={getOwnerAuditList:i,handleSrarch:a,handleLoadMore(e){s.useModel.formData.value.page=e,i()},getHouseKeeper(){var e,l,i,a;(null==(l=null==(e=null==u?void 0:u.data)?void 0:e.selected_house)?void 0:l.id)&&o.getApiLoading(t.Apis.Grid.Grids.GetHousekeeper,{asset_houses_id:null==(a=null==(i=null==u?void 0:u.data)?void 0:i.selected_house)?void 0:a.id}).then((e=>{s.useModel.houseKeeperData.value=null==e?void 0:e.data,console.log(e)}))},getCountHouse(){o.getApiLoading(t.Apis.Customer.Customers.GetCountHouse,{}).then((e=>{s.useModel.countHouseData.value=null==e?void 0:e.data,console.log(e)}))},handleAudit(s){e.index.showModal({title:"提示",content:"请仔细确认好注册用户信息！",confirmText:"通过",confirmColor:"#2A7EFB",success:function(e){e.confirm?(o.getApiLoading(t.Apis.Archive.HouseRegisters.Audit,{status:"Approved",id:null==s?void 0:s.id}).then((e=>{a(),console.log(e)})),console.log("用户点击确定")):e.cancel&&console.log("用户点击取消")}})}};exports.method=d;
