Demo03CourseList-5c7ec9c8.js 3.0 KB

1
  1. import{d as j,h as q,r as c,e as F,L as G,Q as E,o as i,c as H,f as t,w as o,x as p,v as u,n as h,a as e,F as Q,j as R,C as A,G as B,H as J,I as K,_ as M,__tla as O}from"./index-e3afde76.js";import{_ as V,__tla as W}from"./ContentWrap-5f2f4872.js";import{_ as X,__tla as Y}from"./index-51c17e69.js";import{d as Z,__tla as $}from"./formatTime-cee700cd.js";import{e as tt,f as at,__tla as et}from"./index-9a8475d2.js";import rt,{__tla as lt}from"./Demo03CourseForm-4bc5fc50.js";import{u as st,__tla as ot}from"./useMessage-0b1b25bd.js";import{__tla as nt}from"./el-card-6198c22a.js";import{__tla as it}from"./index-2d20a7ff.js";import{__tla as _t}from"./Dialog-c20523c4.js";let I,ct=Promise.all([(()=>{try{return O}catch{}})(),(()=>{try{return W}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=M(j({__name:"Demo03CourseList",props:{studentId:{type:null,required:!0}},setup(x){const{t:z}=q(),m=st(),d=x,f=c(!1),w=c([]),v=c(0),r=F({pageNo:1,pageSize:10,studentId:void 0});G(()=>d.studentId,l=>{r.studentId=l,S()},{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}},S=()=>{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 b=R,y=A,n=B,D=J,N=X,L=V,g=E("hasPermi"),P=K;return i(),H(Q,null,[t(L,null,{default:o(()=>[p((i(),u(y,{type:"primary",plain:"",onClick:a[0]||(a[0]=s=>k("create"))},{default:o(()=>[t(b,{icon:"ep:plus",class:"mr-5px"}),h(" \u65B0\u589E ")]),_:1})),[[g,["infra:demo03-student:create"]]]),p((i(),u(D,{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=>[p((i(),u(y,{link:"",type:"primary",onClick:T=>k("update",s.row.id)},{default:o(()=>[h(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[g,["infra:demo03-student:update"]]]),p((i(),u(y,{link:"",type:"danger",onClick:T=>(async U=>{try{await m.delConfirm(),await at(U),m.success(z("common.delSuccess")),await _()}catch{}})(s.row.id)},{default:o(()=>[h(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[g,["infra:demo03-student:delete"]]])]),_:1})]),_:1},8,["data"])),[[P,e(f)]]),t(N,{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","D:/zx/mall-newfeifan-zx-admin/src/views/infra/demo/demo03/erp/components/Demo03CourseList.vue"]])});export{ct as __tla,I as default};