Demo03CourseList-aea3610d.js 3.1 KB

1
  1. import{d as R,n as j,r as c,f as F,aS as M,P as T,o as i,c as q,i as t,w as o,C as u,l as p,j as h,a as e,F as H,v as X,J as A,L as B,M as E,N as G,_ as K,__tla as O}from"./index-af173888.js";import{_ as Q,__tla as V}from"./ContentWrap-b959c1be.js";import{_ as W,__tla as Y}from"./index-a33d7937.js";import{d as Z,__tla as $}from"./formatTime-8a6f6c49.js";import{e as tt,f as at,__tla as et}from"./index-b48ce667.js";import rt,{__tla as lt}from"./Demo03CourseForm-a836c30d.js";import{u as st,__tla as ot}from"./useMessage-170c1b43.js";import{__tla as nt}from"./el-card-178b9654.js";import{__tla as it}from"./index-54b8f773.js";import{__tla as _t}from"./Dialog-987c90a1.js";let I,ct=Promise.all([(()=>{try{return O}catch{}})(),(()=>{try{return V}catch{}})(),(()=>{try{return Y}catch{}})(),(()=>{try{return $}catch{}})(),(()=>{try{return et}catch{}})(),(()=>{try{return lt}catch{}})(),(()=>{try{return ot}catch{}})(),(()=>{try{return nt}catch{}})(),(()=>{try{return it}catch{}})(),(()=>{try{return _t}catch{}})()]).then(async()=>{I=K(R({__name:"Demo03CourseList",props:{studentId:{type:null,required:!0}},setup(N){const{t:S}=j(),m=st(),d=N,f=c(!1),w=c([]),v=c(0),r=F({pageNo:1,pageSize:10,studentId:void 0});M(()=>d.studentId,l=>{r.studentId=l,b()},{immediate:!1});const _=async()=>{f.value=!0;try{const l=await tt(r);w.value=l.list,v.value=l.total}finally{f.value=!1}},b=()=>{r.pageNo=1,_()},C=c(),k=(l,a)=>{d.studentId?C.value.open(l,a,d.studentId):m.error("\u8BF7\u9009\u62E9\u4E00\u4E2A\u5B66\u751F")};return(l,a)=>{const x=X,y=A,n=B,z=E,D=W,P=Q,g=T("hasPermi"),L=G;return i(),q(H,null,[t(P,null,{default:o(()=>[u((i(),p(y,{type:"primary",plain:"",onClick:a[0]||(a[0]=s=>k("create"))},{default:o(()=>[t(x,{icon:"ep:plus",class:"mr-5px"}),h(" \u65B0\u589E ")]),_:1})),[[g,["infra:demo03-student:create"]]]),u((i(),p(z,{data:e(w),stripe:!0,"show-overflow-tooltip":!0},{default:o(()=>[t(n,{label:"\u7F16\u53F7",align:"center",prop:"id"}),t(n,{label:"\u540D\u5B57",align:"center",prop:"name"}),t(n,{label:"\u5206\u6570",align:"center",prop:"score"}),t(n,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",formatter:e(Z),width:"180px"},null,8,["formatter"]),t(n,{label:"\u64CD\u4F5C",align:"center"},{default:o(s=>[u((i(),p(y,{link:"",type:"primary",onClick:U=>k("update",s.row.id)},{default:o(()=>[h(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[g,["infra:demo03-student:update"]]]),u((i(),p(y,{link:"",type:"danger",onClick:U=>(async J=>{try{await m.delConfirm(),await at(J),m.success(S("common.delSuccess")),await _()}catch{}})(s.row.id)},{default:o(()=>[h(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[g,["infra:demo03-student:delete"]]])]),_:1})]),_:1},8,["data"])),[[L,e(f)]]),t(D,{total:e(v),page:e(r).pageNo,"onUpdate:page":a[1]||(a[1]=s=>e(r).pageNo=s),limit:e(r).pageSize,"onUpdate:limit":a[2]||(a[2]=s=>e(r).pageSize=s),onPagination:_},null,8,["total","page","limit"])]),_:1}),t(rt,{ref_key:"formRef",ref:C,onSuccess:_},null,512)],64)}}}),[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/infra/demo/demo03/erp/components/Demo03CourseList.vue"]])});export{ct as __tla,I as default};