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
5.1 KiB
1 lines
5.1 KiB
import{d as U,v as j,l as W,r as p,h as u,c as w,e as a,w as n,a as f,t as d,u as e,i as g,k as l,F as P,O as T,m as y,J as O,S as G,E as H,_ as J,$ as K,G as M,H as q,K as A,a1 as Q,a2 as X,a3 as Y,L as Z}from"./index-4c331f20.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";/* empty css */import{g as ee,f as te,a as ae,b as le,c as oe}from"./physical_test-ee073749.js";import{_ as se}from"./physical-test-edit.vue_vue_type_style_index_0_lang-9f19e288.js";import{_ as ne}from"./_plugin-vue_export-helper-c27b6911.js";/* empty css *//* empty css */const ie={class:"main-container"},re={class:"flex justify-between items-center"},de={class:"text-lg"},ce={class:"mt-[10px]"},pe={class:"mt-[16px] flex justify-end"},ue=U({__name:"physical_test",setup(me){const E=j().meta.title;let t=W({page:1,limit:10,total:0,loading:!0,data:[],searchParam:{resource_id:"",student_id:""}});const b=p();p([]);const r=(i=1)=>{t.loading=!0,t.page=i,ee({page:t.page,limit:t.limit,...t.searchParam}).then(s=>{t.loading=!1,t.data=s.data.data,t.total=s.data.total}).catch(()=>{t.loading=!1})};r();const m=p(null),D=()=>{m.value.setFormData(),m.value.showDialog=!0},F=i=>{m.value.setFormData(i),m.value.showDialog=!0},V=i=>{G.confirm(l("physicalTestDeleteTips"),l("warning"),{confirmButtonText:l("confirm"),cancelButtonText:l("cancel"),type:"warning"}).then(()=>{te(i).then(()=>{r()}).catch(()=>{})})},x=p([]);(async()=>{x.value=await(await ae({})).data})();const C=p([]);(async()=>{C.value=await(await le({})).data})();const B=p([]);(async()=>{B.value=await(await oe({})).data})();const S=i=>{i&&(i.resetFields(),r())};return(i,s)=>{const _=H,I=J,k=K,v=M,$=q,L=A,c=Q,z=X,R=Y,N=Z;return u(),w("div",ie,[a(L,{class:"box-card !border-none",shadow:"never"},{default:n(()=>[f("div",re,[f("span",de,d(e(E)),1),a(_,{type:"primary",onClick:D},{default:n(()=>[g(d(e(l)("addPhysicalTest")),1)]),_:1})]),a(L,{class:"box-card !border-none my-[10px] table-search-wrap",shadow:"never"},{default:n(()=>[a($,{inline:!0,model:e(t).searchParam,ref_key:"searchFormRef",ref:b},{default:n(()=>[a(v,{label:e(l)("resourceId"),prop:"resource_id"},{default:n(()=>[a(k,{class:"w-[280px]",modelValue:e(t).searchParam.resource_id,"onUpdate:modelValue":s[0]||(s[0]=o=>e(t).searchParam.resource_id=o),clearable:"",placeholder:e(l)("resourceIdPlaceholder")},{default:n(()=>[(u(!0),w(P,null,T(x.value,(o,h)=>(u(),y(I,{key:h,label:o.name,value:o.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),a(v,{label:e(l)("studentId"),prop:"student_id"},{default:n(()=>[a(k,{class:"w-[280px]",modelValue:e(t).searchParam.student_id,"onUpdate:modelValue":s[1]||(s[1]=o=>e(t).searchParam.student_id=o),clearable:"",placeholder:e(l)("studentIdPlaceholder")},{default:n(()=>[(u(!0),w(P,null,T(C.value,(o,h)=>(u(),y(I,{key:h,label:o.name,value:o.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),a(v,null,{default:n(()=>[a(_,{type:"primary",onClick:s[2]||(s[2]=o=>r())},{default:n(()=>[g(d(e(l)("search")),1)]),_:1}),a(_,{onClick:s[3]||(s[3]=o=>S(b.value))},{default:n(()=>[g(d(e(l)("reset")),1)]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),f("div",ce,[O((u(),y(z,{data:e(t).data,size:"large"},{empty:n(()=>[f("span",null,d(e(t).loading?"":e(l)("emptyData")),1)]),default:n(()=>[a(c,{prop:"resource_id_name",label:e(l)("resourceId"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(c,{prop:"student_id_name",label:e(l)("studentId"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(c,{prop:"height",label:e(l)("height"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(c,{prop:"weight",label:e(l)("weight"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(c,{prop:"coach_id_name",label:e(l)("coachId"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(c,{label:e(l)("operation"),fixed:"right","min-width":"120"},{default:n(({row:o})=>[a(_,{type:"primary",link:"",onClick:h=>F(o)},{default:n(()=>[g(d(e(l)("edit")),1)]),_:2},1032,["onClick"]),a(_,{type:"primary",link:"",onClick:h=>V(o.id)},{default:n(()=>[g(d(e(l)("delete")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data"])),[[N,e(t).loading]]),f("div",pe,[a(R,{"current-page":e(t).page,"onUpdate:current-page":s[4]||(s[4]=o=>e(t).page=o),"page-size":e(t).limit,"onUpdate:page-size":s[5]||(s[5]=o=>e(t).limit=o),layout:"total, sizes, prev, pager, next, jumper",total:e(t).total,onSizeChange:s[6]||(s[6]=o=>r()),onCurrentChange:r},null,8,["current-page","page-size","total"])])]),a(se,{ref_key:"editPhysicalTestDialog",ref:m,onComplete:r},null,512)]),_:1})])}}});const je=ne(ue,[["__scopeId","data-v-a103914a"]]);export{je as default};
|
|
|