var p=(a,s,_)=>new Promise((g,m)=>{var n=r=>{try{l(_.next(r))}catch(d){m(d)}},o=r=>{try{l(_.throw(r))}catch(d){m(d)}},l=r=>r.done?g(r.value):Promise.resolve(r.value).then(n,o);l((_=_.apply(a,s)).next())});import{_ as L,c as i,w as e,P as v,$ as w,a0 as f,f as k,C as M,D as E,E as D,o as c,k as t,j as S,L as T,i as C,p as h,M as B,N as A,a6 as N}from"./index-CZJgrp0v.js";import{_ as b}from"./bottomButton.DlIqw7or.js";import{r as z,d as P,g as F}from"./match.FIL4qcL9.js";import{c as V}from"./ceilLine.CCHTeu5K.js";import{t as $}from"./themeMixins.C76yI6bA.js";import"./uv-button.DwAMxj01.js";/* empty css                                                                     */const j={mixins:[$],components:{bottomButton:b,roundButton:z,ceilLine:V},data(){return{value:"",customStyle:{borderRadius:"16rpx",background:"#FAFBFD"},commonUserList:[],isManageStatus:!1}},computed:{showEmpty(){return this.commonUserList.length===0}},onLoad(a){this.setNavigationBarColor()},onShow(){this.getMemberList()},methods:{getMemberList(){return p(this,null,function*(){let s=yield F({page:1,size:500});s.code!==200&&this.$showToastNone(s.message),this.commonUserList=s.data.list})},handleClickManage(){this.isManageStatus=!this.isManageStatus},handleEdit(a){let s=`/pages/matchPart/commonUserEdit/commonUserEdit?member_apply_personnel_id=${a.member_apply_personnel_id}`;f({url:s})},handleAddUser(){f({url:"/pages/matchPart/commonUserAdd/commonUserAdd"})},handleToUserDetail(a){let s=`/pages/matchPart/commonUserDetail/commonUserDetail?member_apply_personnel_id=${a.member_apply_personnel_id}`;f({url:s})},handleDelete(a){w({title:"提示",confirmText:"确定",content:"是否删除当前常用报名人？",success:s=>p(this,null,function*(){s.confirm?this.deleteUser(a.member_apply_personnel_id):s.cancel&&console.log("用户点击取消")})})},deleteUser(a){return p(this,null,function*(){let s=yield P({member_apply_personnel_id:a});if(s.code!==200){this.$showToastNone(s.message);return}v({icon:"success",title:"删除成功"}),this.getMemberList()})}}};function I(a,s,_,g,m,n){const o=S,l=M(D("uv-icon"),E),r=k("ceilLine"),d=N,U=b,x=k("layout-default-uni");return c(),i(x,null,{default:e(()=>[t(o,{class:"page-container"},{default:e(()=>[t(o,{class:"common-title"},{default:e(()=>[t(o,{class:"common-title_left"},{default:e(()=>[h("常用报名人")]),_:1}),n.showEmpty?C("",!0):(c(),i(o,{key:0,class:"common-title_right",onClick:n.handleClickManage},{default:e(()=>[t(l,{name:"setting",color:"#646566",size:"32rpx"}),t(o,{class:"pl-16"},{default:e(()=>[h("管理")]),_:1})]),_:1},8,["onClick"]))]),_:1}),(c(!0),T(B,null,A(m.commonUserList,u=>(c(),i(o,{key:u.member_apply_personnel_id,class:"mb-32"},{default:e(()=>[t(r,{title:u.name,isLink:!1,customStyle:m.customStyle},{right:e(()=>[m.isManageStatus?(c(),i(o,{key:0,class:"icon-box"},{default:e(()=>[t(o,{class:"mr-16"},{default:e(()=>[t(l,{name:"edit-pen",size:"40rpx",color:"#909399",onClick:y=>n.handleEdit(u)},null,8,["onClick"])]),_:2},1024),t(o,null,{default:e(()=>[t(l,{name:"trash",size:"40rpx",color:"#909399",class:"pl-12",onClick:y=>n.handleDelete(u)},null,8,["onClick"])]),_:2},1024)]),_:2},1024)):(c(),i(o,{key:1,class:"icon-box",onClick:y=>n.handleToUserDetail(u)},{default:e(()=>[t(l,{name:"arrow-right",size:"32rpx",color:"#909399"})]),_:2},1032,["onClick"]))]),_:2},1032,["title","customStyle"])]),_:2},1024))),128)),n.showEmpty?(c(),i(o,{key:0,class:"mb-32"},{default:e(()=>[t(d,{marginTop:45})]),_:1})):C("",!0),t(o,{class:"mt-100"},{default:e(()=>[t(U,{onCustomClick:n.handleAddUser},{default:e(()=>[t(o,{class:"mr-8"},{default:e(()=>[t(l,{name:"plus",color:"#fff",size:"16"})]),_:1}),t(o,null,{default:e(()=>[h("添加常用人")]),_:1})]),_:1},8,["onCustomClick"])]),_:1})]),_:1})]),_:1})}const W=L(j,[["render",I],["__scopeId","data-v-50d39d46"]]);export{W as default};
