import{m as q}from"./index-f6f689f9-1782572373740v=1.0.0.js";import{E as R}from"./eleVendor-48a7d3b8-1782572373740v=1.0.0.js";import{y as w,c as C,r as m,m as O,al as a,z as U,I as M,J as l,R as u,a8 as F,a9 as f,u as t,M as D,B as $,O as v}from"./vendor-866bb149-1782572373740v=1.0.0.js";const z={tsId:[{required:!0,message:"\u8BF7\u9009\u62E9\u7528\u6237",trigger:"change"}],gender:[{required:!0,message:"\u8BF7\u9009\u62E9\u6027\u522B",trigger:"blur"}],idNumber:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BC1\u4EF6\u53F7\u7801",trigger:"blur"}],birthDate:[{required:!0,message:"\u8BF7\u9009\u62E9\u51FA\u751F\u65E5\u671F",trigger:"blur"}],studentWorkNumber:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B66\u5DE5\u53F7",trigger:"blur"}],organUnit:[{required:!0,message:"\u8BF7\u8F93\u5165\u6240\u5728\u5355\u4F4D",trigger:"blur"}],sporterTypeDictId:[{required:!0,message:"\u8BF7\u8F93\u5165\u8FD0\u52A8\u5458\u7C7B\u578B",trigger:"blur"}],introduction:[]},J={class:"pt20 mt30"},Z=w({__name:"BaseForm",props:{value:Object,loading:{type:Boolean,default:!1}},emits:["update:value","update:loading","cancel","submit"],setup(E,{emit:y}){let g=E;const p=y,n=C({get(){return A(g.value)},set(r){p("update:value",r)}}),P=C({get(){return g.loading},set(r){p("update:loading",r)}}),B=m(),c=m({xs:24,sm:22,md:20,lg:14,xl:13});m({xs:24,sm:24,md:12,lg:12,xl:12}),m({xs:24,sm:22,md:18,lg:16,xl:8});const b=m([]),I=async(r,e,i)=>{e.loading=!0;try{const o=await q({page:e.page,size:10,keyword:r,tsId:i});if(o.code===0)return b.value=o.data.listData.map(s=>({label:`${s.tsNo}-${s.name}-${s.collegeName}`,value:s.tsId})),[b.value,o.data.total]}catch{R.error("\u83B7\u53D6\u5B66\u5DE5\u53F7\u5931\u8D25")}finally{e.loading=!1}},A=r=>r,h=()=>JSON.parse(JSON.stringify(n.value)),N=r=>{r.validate(async(e,i)=>{if(e){let o=h();p("submit",o)}else{const o=Object.keys(i)[0];r.scrollToField(o)}})},k=()=>{p("cancel")};return O(()=>{}),(r,e)=>{const i=a("PageSelect"),o=a("el-form-item"),s=a("PaCol"),x=a("DictSelect"),V=a("el-input"),L=a("PaRow"),S=a("HZStepItem"),_=a("el-button"),T=a("el-form");return U(),M(T,{model:t(n),ref_key:"formRef",ref:B,rules:t(z)},{default:l(()=>[u(S,{title:"\u57FA\u7840\u4FE1\u606F"},{default:l(()=>[u(L,null,{default:l(()=>[u(s,F(f(t(c))),{default:l(()=>[u(o,{label:"\u7528\u6237",prop:"tsId"},{default:l(()=>[D(' 				:disabled="tsIdDisable" '),u(i,{ref:"pageSelectRef",value:t(n).tsId,"onUpdate:value":e[0]||(e[0]=d=>t(n).tsId=d),"remote-method":I,placeholder:"\u8BF7\u8F93\u5165\u5B66\u5DE5\u53F7/\u624B\u673A\u53F7/\u59D3\u540D\u641C\u7D22",disabled:t(n).sporterId},null,8,["value","disabled"])]),_:1})]),_:1},16),D(` <PaCol v-bind="oneLine">\r
					<el-form-item label="\u6027\u522B" prop="gender">\r
						<el-select v-model="form.gender" placeholder="\u8BF7\u9009\u62E9\u6027\u522B">\r
							<el-option label="\u7537" value="\u7537" />\r
							<el-option label="\u5973" value="\u5973" />\r
						</el-select>\r
					</el-form-item>\r
				</PaCol>\r
				<PaCol v-bind="oneLine">\r
					<el-form-item label="\u8BC1\u4EF6\u53F7\u7801" prop="idNumber">\r
						<el-input v-model="form.idNumber" placeholder="\u8BF7\u8F93\u5165\u8BC1\u4EF6\u53F7\u7801" />\r
					</el-form-item>\r
				</PaCol>\r
				<PaCol v-bind="oneLine">\r
					<el-form-item label="\u51FA\u751F\u65E5\u671F" prop="birthDate">\r
						<el-date-picker v-model="form.birthDate" type="date" placeholder="\u8BF7\u9009\u62E9\u51FA\u751F\u65E5\u671F" style="width: 100%" />\r
					</el-form-item>\r
				</PaCol>\r
				<PaCol v-bind="oneLine">\r
					<el-form-item label="\u624B\u673A\u53F7" prop="phone">\r
						<el-input v-model="form.phone" placeholder="\u8BF7\u8F93\u5165\u624B\u673A\u53F7" />\r
					</el-form-item>\r
				</PaCol>\r
				<PaCol v-bind="oneLine">\r
					<el-form-item label="\u5B66\u5DE5\u53F7" prop="studentWorkNumber">\r
						<el-input v-model="form.studentWorkNumber" placeholder="\u8BF7\u8F93\u5165\u5B66\u5DE5\u53F7" />\r
					</el-form-item>\r
				</PaCol>\r
				<PaCol v-bind="oneLine">\r
					<el-form-item label="\u6240\u5728\u5355\u4F4D" prop="organUnit">\r
						<el-input v-model="form.organUnit" placeholder="\u8BF7\u8F93\u5165\u6240\u5728\u5355\u4F4D" />\r
					</el-form-item>\r
				</PaCol> `),u(s,F(f(t(c))),{default:l(()=>[u(o,{label:"\u8FD0\u52A8\u5458\u7C7B\u578B",prop:"sporterTypeDictId"},{default:l(()=>[u(x,{dictType:"sporter_type",modelValue:t(n).sporterTypeDictId,"onUpdate:modelValue":e[1]||(e[1]=d=>t(n).sporterTypeDictId=d),placeholder:"\u8BF7\u9009\u62E9\u8FD0\u52A8\u5458\u7C7B\u578B",isAll:!1,style:{width:"100%"}},null,8,["modelValue"])]),_:1})]),_:1},16),u(s,F(f(t(c))),{default:l(()=>[u(o,{label:"\u4E2A\u4EBA\u4ECB\u7ECD",prop:"introduction"},{default:l(()=>[u(V,{modelValue:t(n).introduction,"onUpdate:modelValue":e[2]||(e[2]=d=>t(n).introduction=d),type:"textarea",placeholder:"\u8BF7\u8F93\u5165\u4E2A\u4EBA\u4ECB\u7ECD"},null,8,["modelValue"])]),_:1})]),_:1},16)]),_:1})]),_:1}),u(o,null,{default:l(()=>[$("div",J,[u(_,{onClick:k},{default:l(()=>e[4]||(e[4]=[v("\u8FD4\u56DE",-1)])),_:1,__:[4]}),u(_,{type:"primary",loading:t(P),onClick:e[3]||(e[3]=d=>N(t(B)))},{default:l(()=>e[5]||(e[5]=[v("\u4FDD\u5B58",-1)])),_:1,__:[5]},8,["loading"])])]),_:1})]),_:1},8,["model","rules"])}}});export{Z as _};
