import{u as s,r as a,o as e,c as r,w as t,$ as l,a as p,i as _,b as n,d as o,e as u,h as c,j as d,k as f,F as i,f as w,t as m,M as y,l as k}from"./index-nXnlmWJr.js";import{_ as v}from"./_plugin-vue_export-helper.BCo6x5W8.js";const x=v({__name:"choose",setup(v){const x=s(),b=a([]),h=async()=>{const s=await l("GetPersonList");p(s,(()=>{b.value=s.data.list}))},g=a(null),j=s=>{g.value||(g.value=s,h())};return e((()=>{g.value&&h()})),(s,a)=>{const e=_,v=k;return n(),r(e,null,{default:t((()=>[o(x).config?(n(),r(e,{key:0},{default:t((()=>[u(e,{ref:j})])),_:1})):c("",!0),u(e,{class:"person_list_wrapper"},{default:t((()=>[(n(!0),d(i,null,f(b.value,((s,a)=>(n(),r(e,{class:"person_item_wrapper",key:a},{default:t((()=>[u(e,{class:"person_avatar_wrapper"},{default:t((()=>[1===s.sex?(n(),r(v,{key:0,src:"/h5/assets/userm-Bpa6wJbt.png"})):(n(),r(v,{key:1,src:"/h5/assets/userw-Bm7Vsj0c.png"}))])),_:2},1024),u(e,{class:"person_info_wrapper"},{default:t((()=>[u(e,{class:"person_text_wrapper"},{default:t((()=>[u(e,{class:"person_name_wrapper"},{default:t((()=>[w(m(s.name),1)])),_:2},1024),u(e,{class:"person_sex_wrapper"},{default:t((()=>[w(m(1===s.sex?"男":"女")+"性",1)])),_:2},1024)])),_:2},1024),u(e,{class:"person_idnumber_wrapper"},{default:t((()=>[w(m(s.id_number),1)])),_:2},1024)])),_:2},1024),s.relation?(n(),r(e,{key:0,class:"person_type_wrapper"},{default:t((()=>[w(m(s.relation),1)])),_:2},1024)):c("",!0),u(e,{class:"person_type_wrapper"},{default:t((()=>[w("本人")])),_:1}),2===s.is_default?(n(),r(e,{key:1,onClick:a=>(async s=>{const a=await l("SetDefaultPerson",{person_id:s.id});p(a,(()=>{uni.$lu.toast("切换成功"),y({delta:1})}))})(s),class:"person_choose_wrapper"},{default:t((()=>[w("切换")])),_:2},1032,["onClick"])):c("",!0)])),_:2},1024)))),128))])),_:1})])),_:1})}}},[["__scopeId","data-v-b4fbc122"]]);export{x as default};
