import{d as j,n as q,r as c,f as F,aP as J,P as T,o as i,c as A,i as a,w as s,C as u,l as p,j as h,a as e,F as E,v as G,J as H,L as O,M as R,N as B,_ as K,__tla as Q}from"./index-2c56227b.js";import{_ as V,__tla as W}from"./ContentWrap-f1610353.js";import{_ as X,__tla as Y}from"./index-8106be8e.js";import{d as Z,__tla as $}from"./formatTime-7f0ec2bf.js";import{e as aa,f as ta,__tla as ea}from"./index-e52e4373.js";import ra,{__tla as la}from"./Demo03CourseForm-bfd465bc.js";import{u as oa,__tla as sa}from"./useMessage-96878a4a.js";import{__tla as na}from"./el-card-9c148b4f.js";import{__tla as ia}from"./index-d17bd909.js";import{__tla as _a}from"./Dialog-1050d437.js";let I,ca=Promise.all([(()=>{try{return Q}catch{}})(),(()=>{try{return W}catch{}})(),(()=>{try{return Y}catch{}})(),(()=>{try{return $}catch{}})(),(()=>{try{return ea}catch{}})(),(()=>{try{return la}catch{}})(),(()=>{try{return sa}catch{}})(),(()=>{try{return na}catch{}})(),(()=>{try{return ia}catch{}})(),(()=>{try{return _a}catch{}})()]).then(async()=>{I=K(j({__name:"Demo03CourseList",props:{studentId:{type:null,required:!0}},setup(P){const{t:S}=q(),m=oa(),d=P,f=c(!1),v=c([]),w=c(0),r=F({pageNo:1,pageSize:10,studentId:void 0});J(()=>d.studentId,l=>{r.studentId=l,b()},{immediate:!1});const _=async()=>{f.value=!0;try{const l=await aa(r);v.value=l.list,w.value=l.total}finally{f.value=!1}},b=()=>{r.pageNo=1,_()},C=c(),k=(l,t)=>{d.studentId?C.value.open(l,t,d.studentId):m.error("\u8BF7\u9009\u62E9\u4E00\u4E2A\u5B66\u751F")};return(l,t)=>{const N=G,y=H,n=O,x=R,z=X,L=V,g=T("hasPermi"),D=B;return i(),A(E,null,[a(L,null,{default:s(()=>[u((i(),p(y,{type:"primary",plain:"",onClick:t[0]||(t[0]=o=>k("create"))},{default:s(()=>[a(N,{icon:"ep:plus",class:"mr-5px"}),h(" \u65B0\u589E ")]),_:1})),[[g,["infra:demo03-student:create"]]]),u((i(),p(x,{data:e(v),stripe:!0,"show-overflow-tooltip":!0},{default:s(()=>[a(n,{label:"\u7F16\u53F7",align:"center",prop:"id"}),a(n,{label:"\u540D\u5B57",align:"center",prop:"name"}),a(n,{label:"\u5206\u6570",align:"center",prop:"score"}),a(n,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",formatter:e(Z),width:"180px"},null,8,["formatter"]),a(n,{label:"\u64CD\u4F5C",align:"center"},{default:s(o=>[u((i(),p(y,{link:"",type:"primary",onClick:M=>k("update",o.row.id)},{default:s(()=>[h(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[g,["infra:demo03-student:update"]]]),u((i(),p(y,{link:"",type:"danger",onClick:M=>(async U=>{try{await m.delConfirm(),await ta(U),m.success(S("common.delSuccess")),await _()}catch{}})(o.row.id)},{default:s(()=>[h(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[g,["infra:demo03-student:delete"]]])]),_:1})]),_:1},8,["data"])),[[D,e(f)]]),a(z,{total:e(w),page:e(r).pageNo,"onUpdate:page":t[1]||(t[1]=o=>e(r).pageNo=o),limit:e(r).pageSize,"onUpdate:limit":t[2]||(t[2]=o=>e(r).pageSize=o),onPagination:_},null,8,["total","page","limit"])]),_:1}),a(ra,{ref_key:"formRef",ref:C,onSuccess:_},null,512)],64)}}}),[["__file","E:/GAOHP_2023/mall/newfeifan-front/yudao-ui-admin-vue3/src/views/infra/demo/demo03/erp/components/Demo03CourseList.vue"]])});export{ca as __tla,I as default};
