"use strict";const e=require("../../../common/vendor.js"),o=require("./model.js"),l=require("../../../common/libraries/apiLoading.js"),d=require("../../../gen/Apis.js"),n={getShow(e){l.getApiLoading(d.Apis.WorkOrder.HouseWorkOrders.Show,{id:e}).then(e=>{var n;o.useModel.dataShow.value=null==e?void 0:e.data,(e=>{l.getApiLoading(d.Apis.WorkOrder.HouseWorkOrders.GetAssignPermission,{id:e}).then(e=>{o.useModel.assignPermissionData.value=null==e?void 0:e.data})})(null==(n=null==e?void 0:e.data)?void 0:n.id)})},getHouseWorkLogs(e){l.getApiLoading(d.Apis.WorkOrder.HouseWorkLogs.List,{house_work_orders_id:e}).then(e=>{o.useModel.logsData.value=null==e?void 0:e.data})},toPageUpdate(l){var d,n,i;e.index.navigateTo({url:`/INDEX/task/update/index?id=${null==(i=null==(n=null==(d=o.useModel)?void 0:d.dataShow)?void 0:n.value)?void 0:i.id}&type=${l}`})},handlePreviewImage(l){var d,n,i,a;let u=(null==(a=null==(i=null==(n=null==(d=o.useModel)?void 0:d.dataShow)?void 0:n.value)?void 0:i.attachments)?void 0:a.map(e=>null==e?void 0:e.url))||[];e.index.previewImage({urls:u,current:l})},handlePendingPaymentQrCode(e){},handleCopyPhone(){var l,d,n,i,a,u,r,t,s,v,h,p;(null==(n=null==(d=null==(l=o.useModel)?void 0:l.dataShow)?void 0:d.value)?void 0:n.contact_phone)?e.index.makePhoneCall({phoneNumber:null==(u=null==(a=null==(i=o.useModel)?void 0:i.dataShow)?void 0:a.value)?void 0:u.contact_phone}):(null==(s=null==(t=null==(r=o.useModel)?void 0:r.dataShow)?void 0:t.value)?void 0:s.reporter_phone)?e.index.makePhoneCall({phoneNumber:null==(p=null==(h=null==(v=o.useModel)?void 0:v.dataShow)?void 0:h.value)?void 0:p.reporter_phone}):e.index.showToast({title:"暂无电话号码",icon:"none"})}};exports.method=n;
