Demo03CourseList-c938c7c5.js 3.2 KB

1
  1. import{d as R,h as j,r as c,e as F,L as T,Q as q,o as _,c as G,f as t,w as o,x as u,v as p,n as g,a as e,F as Q,j as W,C as X,G as A,H as B,I as E,_ as J,__tla as K}from"./index-11e4820e.js";import{_ as M,__tla as O}from"./ContentWrap-694014d4.js";import{_ as V,__tla as Y}from"./index-c8f58bd0.js";import{d as Z,__tla as $}from"./formatTime-f6a2c881.js";import{e as tt,f as at,__tla as et}from"./index-57def28e.js";import rt,{__tla as lt}from"./Demo03CourseForm-29a8ecea.js";import{u as st,__tla as ot}from"./useMessage-06ddf735.js";import{__tla as nt}from"./ContentWrap.vue_vue_type_script_setup_true_lang-11f85821.js";import{__tla as _t}from"./el-card-919c14be.js";import{__tla as it}from"./index-dd73c59d.js";import{__tla as ct}from"./Dialog-bbfaf85c.js";let I,ut=Promise.all([(()=>{try{return K}catch{}})(),(()=>{try{return O}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 _t}catch{}})(),(()=>{try{return it}catch{}})(),(()=>{try{return ct}catch{}})()]).then(async()=>{I=J(R({__name:"Demo03CourseList",props:{studentId:{type:null,required:!0}},setup(S){const{t:b}=j(),m=st(),d=S,f=c(!1),w=c([]),v=c(0),r=F({pageNo:1,pageSize:10,studentId:void 0});T(()=>d.studentId,l=>{r.studentId=l,x()},{immediate:!1});const i=async()=>{f.value=!0;try{const l=await tt(r);w.value=l.list,v.value=l.total}finally{f.value=!1}},x=()=>{r.pageNo=1,i()},k=c(),C=(l,a)=>{d.studentId?k.value.open(l,a,d.studentId):m.error("\u8BF7\u9009\u62E9\u4E00\u4E2A\u5B66\u751F")};return(l,a)=>{const z=W,y=X,n=A,N=B,P=V,D=M,h=q("hasPermi"),L=E;return _(),G(Q,null,[t(D,null,{default:o(()=>[u((_(),p(y,{type:"primary",plain:"",onClick:a[0]||(a[0]=s=>C("create"))},{default:o(()=>[t(z,{icon:"ep:plus",class:"mr-5px"}),g(" \u65B0\u589E ")]),_:1})),[[h,["infra:demo03-student:create"]]]),u((_(),p(N,{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((_(),p(y,{link:"",type:"primary",onClick:U=>C("update",s.row.id)},{default:o(()=>[g(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[h,["infra:demo03-student:update"]]]),u((_(),p(y,{link:"",type:"danger",onClick:U=>(async H=>{try{await m.delConfirm(),await at(H),m.success(b("common.delSuccess")),await i()}catch{}})(s.row.id)},{default:o(()=>[g(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[h,["infra:demo03-student:delete"]]])]),_:1})]),_:1},8,["data"])),[[L,e(f)]]),t(P,{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:i},null,8,["total","page","limit"])]),_:1}),t(rt,{ref_key:"formRef",ref:k,onSuccess:i},null,512)],64)}}}),[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/infra/demo/demo03/erp/components/Demo03CourseList.vue"]])});export{ut as __tla,I as default};