You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
7.8 KiB
1 lines
7.8 KiB
import{d as B,v as I,r as _,l as x,S as j,k as e,h as R,c as k,a as n,t as p,u as t,e as r,w as s,i as P,D as S,G as F,H as T,K as E,E as A}from"./index-f5d841af.js";/* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";/* empty css */import{g as C,e as D,a as J}from"./physical_test-f19fa3fc.js";const N={class:"main-container"},L={class:"detail-head"},M=n("span",{class:"iconfont iconxiangzuojiantou !text-xs"},null,-1),$={class:"ml-[1px]"},O=n("span",{class:"adorn"},"|",-1),z={class:"right"},G={class:"fixed-footer-wrap"},H={class:"fixed-footer"},te=B({__name:"physical_test_edit",setup(K){const g=I(),m=parseInt(g.query.id),c=_(!1),y=g.meta.title,b={id:0,resource_id:0,student_id:0,height:"",weight:"",coach_id:0,created_at:"",updated_at:"",seated_forward_bend:"",sit_ups:"",push_ups:"",flamingo_balance:"",thirty_sec_jump:"",standing_long_jump:"",agility_run:"",balance_beam:"",tennis_throw:"",ten_meter_shuttle_run:""},a=x({...b});m&&(async(i=0)=>{Object.assign(a,b);const l=await(await C(i)).data;Object.keys(a).forEach(o=>{l[o]!=null&&(a[o]=l[o])})})(m);const f=_();_([]);const v=j(()=>({resource_id:[{required:!0,message:e("resourceIdPlaceholder"),trigger:"blur"}],student_id:[{required:!0,message:e("studentIdPlaceholder"),trigger:"blur"}],height:[{required:!0,message:e("heightPlaceholder"),trigger:"blur"}],weight:[{required:!0,message:e("weightPlaceholder"),trigger:"blur"}],coach_id:[{required:!0,message:e("coachIdPlaceholder"),trigger:"blur"}],created_at:[{required:!0,message:e("createdAtPlaceholder"),trigger:"blur"}],updated_at:[{required:!0,message:e("updatedAtPlaceholder"),trigger:"blur"}],seated_forward_bend:[{required:!0,message:e("seatedForwardBendPlaceholder"),trigger:"blur"}],sit_ups:[{required:!0,message:e("sitUpsPlaceholder"),trigger:"blur"}],push_ups:[{required:!0,message:e("pushUpsPlaceholder"),trigger:"blur"}],flamingo_balance:[{required:!0,message:e("flamingoBalancePlaceholder"),trigger:"blur"}],thirty_sec_jump:[{required:!0,message:e("thirtySecJumpPlaceholder"),trigger:"blur"}],standing_long_jump:[{required:!0,message:e("standingLongJumpPlaceholder"),trigger:"blur"}],agility_run:[{required:!0,message:e("agilityRunPlaceholder"),trigger:"blur"}],balance_beam:[{required:!0,message:e("balanceBeamPlaceholder"),trigger:"blur"}],tennis_throw:[{required:!0,message:e("tennisThrowPlaceholder"),trigger:"blur"}],ten_meter_shuttle_run:[{required:!0,message:e("tenMeterShuttleRunPlaceholder"),trigger:"blur"}]})),U=async i=>{c.value||!i||await i.validate(async l=>{l&&(c.value=!0,(m?D:J)(a).then(h=>{c.value=!1,history.back()}).catch(h=>{c.value=!1}))})},V=()=>{history.back()};return(i,l)=>{const o=S,u=F,h=T,q=E,w=A;return R(),k("div",N,[n("div",L,[n("div",{class:"left",onClick:l[0]||(l[0]=d=>V())},[M,n("span",$,p(t(e)("returnToPreviousPage")),1)]),O,n("span",z,p(t(y)),1)]),r(q,{class:"box-card !border-none",shadow:"never"},{default:s(()=>[r(h,{model:a,"label-width":"90px",ref_key:"formRef",ref:f,rules:t(v),class:"page-form"},{default:s(()=>[r(u,{label:t(e)("resourceId"),prop:"resource_id"},{default:s(()=>[r(o,{modelValue:a.resource_id,"onUpdate:modelValue":l[1]||(l[1]=d=>a.resource_id=d),clearable:"",placeholder:t(e)("resourceIdPlaceholder"),class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),r(u,{label:t(e)("studentId"),prop:"student_id"},{default:s(()=>[r(o,{modelValue:a.student_id,"onUpdate:modelValue":l[2]||(l[2]=d=>a.student_id=d),clearable:"",placeholder:t(e)("studentIdPlaceholder"),class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),r(u,{label:t(e)("height"),prop:"height"},{default:s(()=>[r(o,{modelValue:a.height,"onUpdate:modelValue":l[3]||(l[3]=d=>a.height=d),clearable:"",placeholder:t(e)("heightPlaceholder"),class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),r(u,{label:t(e)("weight"),prop:"weight"},{default:s(()=>[r(o,{modelValue:a.weight,"onUpdate:modelValue":l[4]||(l[4]=d=>a.weight=d),clearable:"",placeholder:t(e)("weightPlaceholder"),class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),r(u,{label:t(e)("coachId"),prop:"coach_id"},{default:s(()=>[r(o,{modelValue:a.coach_id,"onUpdate:modelValue":l[5]||(l[5]=d=>a.coach_id=d),clearable:"",placeholder:t(e)("coachIdPlaceholder"),class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),r(u,{label:t(e)("createdAt")},{default:s(()=>[r(o,{modelValue:a.created_at,"onUpdate:modelValue":l[6]||(l[6]=d=>a.created_at=d),clearable:"",placeholder:t(e)("createdAtPlaceholder"),class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),r(u,{label:t(e)("updatedAt")},{default:s(()=>[r(o,{modelValue:a.updated_at,"onUpdate:modelValue":l[7]||(l[7]=d=>a.updated_at=d),clearable:"",placeholder:t(e)("updatedAtPlaceholder"),class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),r(u,{label:t(e)("seatedForwardBend")},{default:s(()=>[r(o,{modelValue:a.seated_forward_bend,"onUpdate:modelValue":l[8]||(l[8]=d=>a.seated_forward_bend=d),clearable:"",placeholder:t(e)("seatedForwardBendPlaceholder"),class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),r(u,{label:t(e)("sitUps")},{default:s(()=>[r(o,{modelValue:a.sit_ups,"onUpdate:modelValue":l[9]||(l[9]=d=>a.sit_ups=d),clearable:"",placeholder:t(e)("sitUpsPlaceholder"),class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),r(u,{label:t(e)("pushUps")},{default:s(()=>[r(o,{modelValue:a.push_ups,"onUpdate:modelValue":l[10]||(l[10]=d=>a.push_ups=d),clearable:"",placeholder:t(e)("pushUpsPlaceholder"),class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),r(u,{label:t(e)("flamingoBalance")},{default:s(()=>[r(o,{modelValue:a.flamingo_balance,"onUpdate:modelValue":l[11]||(l[11]=d=>a.flamingo_balance=d),clearable:"",placeholder:t(e)("flamingoBalancePlaceholder"),class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),r(u,{label:t(e)("thirtySecJump")},{default:s(()=>[r(o,{modelValue:a.thirty_sec_jump,"onUpdate:modelValue":l[12]||(l[12]=d=>a.thirty_sec_jump=d),clearable:"",placeholder:t(e)("thirtySecJumpPlaceholder"),class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),r(u,{label:t(e)("standingLongJump")},{default:s(()=>[r(o,{modelValue:a.standing_long_jump,"onUpdate:modelValue":l[13]||(l[13]=d=>a.standing_long_jump=d),clearable:"",placeholder:t(e)("standingLongJumpPlaceholder"),class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),r(u,{label:t(e)("agilityRun")},{default:s(()=>[r(o,{modelValue:a.agility_run,"onUpdate:modelValue":l[14]||(l[14]=d=>a.agility_run=d),clearable:"",placeholder:t(e)("agilityRunPlaceholder"),class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),r(u,{label:t(e)("balanceBeam")},{default:s(()=>[r(o,{modelValue:a.balance_beam,"onUpdate:modelValue":l[15]||(l[15]=d=>a.balance_beam=d),clearable:"",placeholder:t(e)("balanceBeamPlaceholder"),class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),r(u,{label:t(e)("tennisThrow")},{default:s(()=>[r(o,{modelValue:a.tennis_throw,"onUpdate:modelValue":l[16]||(l[16]=d=>a.tennis_throw=d),clearable:"",placeholder:t(e)("tennisThrowPlaceholder"),class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),r(u,{label:t(e)("tenMeterShuttleRun")},{default:s(()=>[r(o,{modelValue:a.ten_meter_shuttle_run,"onUpdate:modelValue":l[17]||(l[17]=d=>a.ten_meter_shuttle_run=d),clearable:"",placeholder:t(e)("tenMeterShuttleRunPlaceholder"),class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","rules"])]),_:1}),n("div",G,[n("div",H,[r(w,{type:"primary",onClick:l[18]||(l[18]=d=>U(f.value))},{default:s(()=>[P(p(t(e)("save")),1)]),_:1}),r(w,{onClick:l[19]||(l[19]=d=>V())},{default:s(()=>[P(p(t(e)("cancel")),1)]),_:1})])])])}}});export{te as default};
|
|
|