import{d as D,Q as F,r as c,x as K,w as T,a3 as j,o as i,c as E,f as a,B as n,k as p,A as u,E as h,a as e,F as L,_ as R,K as X,X as Y,Y as Z,Z as q,__tla as G}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{e as $,f as aa,__tla as ta}from"./index-d0152a3f.js";import{_ as ea,__tla as ra}from"./Demo03CourseForm.vue_vue_type_script_setup_true_lang-463951f8.js";import{u as la,__tla as sa}from"./useMessage-d9788660.js";let I,na=Promise.all([(()=>{try{return G}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=D({__name:"Demo03CourseList",props:{studentId:{}},setup(S){const{t:b}=F(),d=la(),m=S,f=c(!1),w=c([]),k=c(0),r=K({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);w.value=l.list,k.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):d.error("\u8BF7\u9009\u62E9\u4E00\u4E2A\u5B66\u751F")};return(l,t)=>{const N=R,y=X,o=Y,z=Z,P=M,Q=H,g=j("hasPermi"),U=q;return i(),E(L,null,[a(Q,null,{default:n(()=>[p((i(),u(y,{type:"primary",plain:"",onClick:t[0]||(t[0]=s=>C("create"))},{default:n(()=>[a(N,{icon:"ep:plus",class:"mr-5px"}),h(" \u65B0\u589E ")]),_:1})),[[g,["infra:demo03-student:create"]]]),p((i(),u(z,{data:e(w),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:"\u5206\u6570",align:"center",prop:"score"}),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(),u(y,{link:"",type:"primary",onClick:A=>C("update",s.row.id)},{default:n(()=>[h(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[g,["infra:demo03-student:update"]]]),p((i(),u(y,{link:"",type:"danger",onClick:A=>(async B=>{try{await d.delConfirm(),await aa(B),d.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"])),[[U,e(f)]]),a(P,{total:e(k),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};
