Demo03CourseList-9bcd1662.js 3.0 KB

1
  1. import{d as q,P as F,r as c,x as J,w as T,a4 as A,o as i,c as M,f as a,A as o,k as p,C as u,D as h,a as e,F as Q,Q as R,J as X,X as Y,Y as Z,Z as B,_ as E,__tla as G}from"./index-f6fb8e95.js";import{_ as H,__tla as K}from"./ContentWrap-96bb70ec.js";import{_ as O,__tla as V}from"./index-58a94653.js";import{d as W,__tla as $}from"./formatTime-ddd96ac8.js";import{e as aa,f as ta,__tla as ea}from"./index-08461d52.js";import ra,{__tla as la}from"./Demo03CourseForm-5b4ecc12.js";import{u as sa,__tla as oa}from"./useMessage-3b767a67.js";import{__tla as na}from"./el-card-8db16709.js";import{__tla as ia}from"./index-07a2f7ed.js";import{__tla as _a}from"./Dialog-ac2b0e4e.js";let x,ca=Promise.all([(()=>{try{return G}catch{}})(),(()=>{try{return K}catch{}})(),(()=>{try{return V}catch{}})(),(()=>{try{return $}catch{}})(),(()=>{try{return ea}catch{}})(),(()=>{try{return la}catch{}})(),(()=>{try{return oa}catch{}})(),(()=>{try{return na}catch{}})(),(()=>{try{return ia}catch{}})(),(()=>{try{return _a}catch{}})()]).then(async()=>{x=E(q({__name:"Demo03CourseList",props:{studentId:{type:null,required:!0}},setup(z){const{t:I}=F(),m=sa(),d=z,f=c(!1),w=c([]),k=c(0),r=J({pageNo:1,pageSize:10,studentId:void 0});T(()=>d.studentId,l=>{r.studentId=l,S()},{immediate:!1});const _=async()=>{f.value=!0;try{const l=await aa(r);w.value=l.list,k.value=l.total}finally{f.value=!1}},S=()=>{r.pageNo=1,_()},v=c(),C=(l,t)=>{d.studentId?v.value.open(l,t,d.studentId):m.error("\u8BF7\u9009\u62E9\u4E00\u4E2A\u5B66\u751F")};return(l,t)=>{const b=R,y=X,n=Y,D=Z,N=O,P=H,g=A("hasPermi"),L=B;return i(),M(Q,null,[a(P,null,{default:o(()=>[p((i(),u(y,{type:"primary",plain:"",onClick:t[0]||(t[0]=s=>C("create"))},{default:o(()=>[a(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(()=>[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(W),width:"180px"},null,8,["formatter"]),a(n,{label:"\u64CD\u4F5C",align:"center"},{default:o(s=>[p((i(),u(y,{link:"",type:"primary",onClick:U=>C("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:U=>(async j=>{try{await m.delConfirm(),await ta(j),m.success(I("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)]]),a(N,{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(ra,{ref_key:"formRef",ref:v,onSuccess:_},null,512)],64)}}}),[["__file","D:/zx/mall-newfeifan-zx-admin/src/views/infra/demo/demo03/erp/components/Demo03CourseList.vue"]])});export{ca as __tla,x as default};