import{u as U}from"./useFormEdit-fb8b8504-1782729249161v=1.0.0.js";import{c as $}from"./volunteerRecruitApi-68ceee39-1782729249161v=1.0.0.js";import{b as z,a as J,D as k,_ as K}from"./index-b309bf9f-1782729249161v=1.0.0.js";import{a as Q}from"./date-38ac77fa-1782729249161v=1.0.0.js";import{E as W}from"./eleVendor-5008d1ec-1782729249161v=1.0.0.js";import{y as h,r as s,c as X,m as Y,al as r,z as o,I as b,J as t,R as a,u as l,M as y,A as p,Q as f,a4 as B,F as g,B as c,P as F,O as ee}from"./vendor-1e24e3ad-1782729249161v=1.0.0.js";import"./keepAlive-20a782c5-1782729249161v=1.0.0.js";const ue={class:"timeBox"},te={class:"time-label"},ae={class:"right-box"},le={class:"line-box"},oe={class:"line-box"},se=h({name:"volunteerRecruitDetail"}),ne=h({...se,props:{type:{type:String,default:"volunteer"}},setup(L){const V=s({xs:24,sm:22,md:20,lg:14,xl:23}),C=s({xs:24,sm:24,md:12,lg:12,xl:12}),N=s({xs:24,sm:22,md:18,lg:16,xl:8});U();const R=z(),m=s({}),_=J(),O=s(""),w=L,P=X(()=>w.type==="volunteer"?"\u5FD7\u613F\u8005":"\u88C1\u5224\u5458"),S={am:"\u4E0A\u5348\u65F6\u6BB5",pm:"\u4E0B\u5348\u65F6\u6BB5",evening:"\u665A\u4E0A\u65F6\u6BB5"},D=s([{key:"recruitName",col:1,label:"\u62DB\u52DF\u6D3B\u52A8\u540D\u79F0"},{key:"eventName",col:1,label:"\u8D5B\u4E8B\u6D3B\u52A8 "},{key:"serviceAddress",col:1,label:"\u670D\u52A1\u5730\u70B9"},{key:"applyTime",col:1,label:"\u62A5\u540D\u65F6\u95F4"},{key:"contactName",col:2,label:"\u8054\u7CFB\u4EBA"},{key:"contactPhone",col:2,label:"\u8054\u7CFB\u4EBA\u7535\u8BDD"},{key:"description",col:1,label:"\u6D3B\u52A8\u4ECB\u7ECD"},{key:"reviewType",col:1,label:"\u62A5\u540D\u5BA1\u6838",enum:R.getEnumObjByKey("reviewType")},{key:"isPerson",col:1,label:`\u662F\u5426\u6CE8\u518C${P.value}`,enum:{0:"\u5426",1:"\u662F"}}]),j=s([{key:"serviceTime",col:1,label:"\u670D\u52A1\u65F6\u95F4 "},{key:"recruitNum",col:1,label:"\u62DB\u52DF\u4EBA\u6570"},{key:"isTimeSlotOpen",col:1,label:"\u670D\u52A1\u65F6\u6BB5\u5F00\u542F",enum:{0:"\u5426",1:"\u662F"}}]),T=s({1:V,2:C,3:N}),H=async E=>{let e=await $(E);if(e.code!==0){W.error(e.msg);return}e.data,e.data.applyTime=[e.data.applyStartTime,e.data.applyEndTime].join("\u81F3"),e.data.serviceTime=[e.data.serviceStartTime,e.data.serviceEndTime].join("\u81F3"),e.data.serviceTimeGroupRespVOList&&e.data.serviceTimeGroupRespVOList.length>0&&(e.data.serviceTimeGroupRespVOList.forEach(d=>{d.serviceTimeRespVOList.forEach(n=>{n.times=[n.startTime,n.endTime].join("\u81F3")})}),e.data.serviceTimeList=e.data.serviceTimeGroupRespVOList),e.data.isExclusion&&(e.data.exclusionNames=e.data.exclusionVOList.map(d=>d.recruitName).join(","),D.value.push({key:"exclusionNames",col:1,label:"\u4E92\u65A5\u62DB\u52DF\u6D3B\u52A8"})),m.value={...e.data}};return Y(()=>{_.query.id&&(O.value=_.query.id,m.value.id=_.query.id,H(_.query.id))}),(E,e)=>{const d=r("PaCol"),n=r("PaRow"),x=r("HZStepItem"),M=r("el-checkbox"),A=r("el-form-item"),q=r("el-form"),G=r("HZPageLayout");return o(),b(G,{isBack:!0,title:l(_).meta.title},{default:t(()=>[a(q,{model:l(m),ref:"ruleFormRef","label-width":"170px"},{default:t(()=>[y(' <div class="divider mt16 mb28">\u57FA\u672C\u4FE1\u606F</div> '),a(x,{title:"\u57FA\u7840\u4FE1\u606F"},{default:t(()=>[a(n,null,{default:t(()=>[(o(!0),p(f,null,B(l(D),(u,v)=>(o(),b(d,g({key:v},{ref_for:!0},l(T)[u.col]),{default:t(()=>[a(k,{label:u.label,value:l(m)[u.key],type:u.type,enum:u.enum},null,8,["label","value","type","enum"])]),_:2},1040))),128))]),_:1})]),_:1}),a(x,{title:"\u670D\u52A1\u65F6\u95F4"},{default:t(()=>[a(n,null,{default:t(()=>[(o(!0),p(f,null,B(l(j),(u,v)=>(o(),b(d,g({key:v},{ref_for:!0},l(T)[u.col]),{default:t(()=>[a(k,{label:u.label,value:l(m)[u.key],type:u.type,enum:u.enum},null,8,["label","value","type","enum"])]),_:2},1040))),128))]),_:1}),a(n,null,{default:t(()=>[y(" \u6E32\u67D3\u670D\u52A1\u65F6\u95F4\u6BB5 "),a(A,{label:"\u670D\u52A1\u65F6\u6BB5",prop:"servicePeriods"},{default:t(()=>[c("div",ue,[(o(!0),p(f,null,B(l(m).serviceTimeList,(u,v)=>(o(),p("div",{class:"service-period-box",style:{width:"100%"},key:"serviceTime"+u.serviceTime+v},[c("div",te,F(u.serviceTime)+"\uFF1A",1),c("div",ae,[(o(!0),p(f,null,B(u.serviceTimeRespVOList,(i,Z)=>(o(),p("div",{class:"",key:Z},[c("div",le,[a(M,{modelValue:i.isOpen,"onUpdate:modelValue":I=>i.isOpen=I,label:`${S[i.serviceTimeType]}`,disabled:"","true-value":1,"false-value":0},null,8,["modelValue","onUpdate:modelValue","label"]),a(A,{label:"\u6700\u5927\u4EBA\u6570",prop:"maxNum","label-width":"auto"},{default:t(()=>[ee(F(i.maxNum),1)]),_:2},1024)]),c("div",oe,[c("span",null,F(i.times),1),c("span",null,"("+F(l(Q)(i.startTime,i.endTime))+")",1)])]))),128)),y(" \u4E0A\u5348\u65F6\u6BB5 "),y(" \u4E0B\u5348\u65F6\u6BB5 ")])]))),128))])]),_:1})]),_:1})]),_:1}),y(` <el-form-item>\r
				<div class="pt20 mt30">\r
					<el-button @click="onCancel">\u8FD4\u56DE</el-button>\r
				</div>\r
			</el-form-item> `)]),_:1},8,["model"])]),_:1},8,["title"])}}});const ve=K(ne,[["__scopeId","data-v-7d7b51d1"]]);export{ve as default};
