import{d as F,Q as G,r as c,x as Q,w as T,a3 as U,o as i,c as j,f as a,B as n,k as p,A as d,E as h,a as e,F as E,_ as L,K as R,X,Y,Z,__tla as q}from"./index-92ad187a.js";import{_ as H,__tla as J}from"./ContentWrap.vue_vue_type_script_setup_true_lang-c7ede7df.js";import{_ as M,__tla as O}from"./index.vue_vue_type_script_setup_true_lang-6fbe4cc3.js";import{d as V,__tla as W}from"./formatTime-c7f253d6.js";import{k as $,l as aa,__tla as ta}from"./index-d0152a3f.js";import{_ as ea,__tla as ra}from"./Demo03GradeForm.vue_vue_type_script_setup_true_lang-3e80c1a9.js";import{u as la,__tla as sa}from"./useMessage-d9788660.js";let I,na=Promise.all([(()=>{try{return q}catch{}})(),(()=>{try{return J}catch{}})(),(()=>{try{return O}catch{}})(),(()=>{try{return W}catch{}})(),(()=>{try{return ta}catch{}})(),(()=>{try{return ra}catch{}})(),(()=>{try{return sa}catch{}})()]).then(async()=>{I=F({__name:"Demo03GradeList",props:{studentId:{}},setup(S){const{t:b}=G(),u=la(),m=S,f=c(!1),k=c([]),w=c(0),r=Q({pageNo:1,pageSize:10,studentId:void 0});T(()=>m.studentId,l=>{r.studentId=l,x()},{immediate:!1});const _=async()=>{f.value=!0;try{const l=await $(r);k.value=l.list,w.value=l.total}finally{f.value=!1}},x=()=>{r.pageNo=1,_()},v=c(),C=(l,t)=>{m.studentId?v.value.open(l,t,m.studentId):u.error("\u8BF7\u9009\u62E9\u4E00\u4E2A\u5B66\u751F")};return(l,t)=>{const z=L,y=R,o=X,N=Y,P=M,K=H,g=U("hasPermi"),A=Z;return i(),j(E,null,[a(K,null,{default:n(()=>[p((i(),d(y,{type:"primary",plain:"",onClick:t[0]||(t[0]=s=>C("create"))},{default:n(()=>[a(z,{icon:"ep:plus",class:"mr-5px"}),h(" \u65B0\u589E ")]),_:1})),[[g,["infra:demo03-student:create"]]]),p((i(),d(N,{data:e(k),stripe:!0,"show-overflow-tooltip":!0},{default:n(()=>[a(o,{label:"\u7F16\u53F7",align:"center",prop:"id"}),a(o,{label:"\u540D\u5B57",align:"center",prop:"name"}),a(o,{label:"\u73ED\u4E3B\u4EFB",align:"center",prop:"teacher"}),a(o,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",formatter:e(V),width:"180px"},null,8,["formatter"]),a(o,{label:"\u64CD\u4F5C",align:"center"},{default:n(s=>[p((i(),d(y,{link:"",type:"primary",onClick:B=>C("update",s.row.id)},{default:n(()=>[h(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[g,["infra:demo03-student:update"]]]),p((i(),d(y,{link:"",type:"danger",onClick:B=>(async D=>{try{await u.delConfirm(),await aa(D),u.success(b("common.delSuccess")),await _()}catch{}})(s.row.id)},{default:n(()=>[h(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[g,["infra:demo03-student:delete"]]])]),_:1})]),_:1},8,["data"])),[[A,e(f)]]),a(P,{total:e(w),page:e(r).pageNo,"onUpdate:page":t[1]||(t[1]=s=>e(r).pageNo=s),limit:e(r).pageSize,"onUpdate:limit":t[2]||(t[2]=s=>e(r).pageSize=s),onPagination:_},null,8,["total","page","limit"])]),_:1}),a(ea,{ref_key:"formRef",ref:v,onSuccess:_},null,512)],64)}}})});export{I as _,na as __tla};
