Demo03GradeList-f1e28de2.js 3.1 KB

1
  1. import{d as G,n as R,r as c,f as j,aS as J,P as M,o as i,c as q,i as a,w as n,C as p,l as u,j as h,a as e,F as H,v as T,J as X,L as A,M as B,N as E,_ 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{k as aa,l as ta,__tla as ea}from"./index-b48ce667.js";import ra,{__tla as la}from"./Demo03GradeForm-d55e8fa4.js";import{u as sa,__tla as na}from"./useMessage-170c1b43.js";import{__tla as oa}from"./el-card-178b9654.js";import{__tla as ia}from"./index-54b8f773.js";import{__tla as _a}from"./Dialog-987c90a1.js";let I,ca=Promise.all([(()=>{try{return O}catch{}})(),(()=>{try{return V}catch{}})(),(()=>{try{return Y}catch{}})(),(()=>{try{return $}catch{}})(),(()=>{try{return ea}catch{}})(),(()=>{try{return la}catch{}})(),(()=>{try{return na}catch{}})(),(()=>{try{return oa}catch{}})(),(()=>{try{return ia}catch{}})(),(()=>{try{return _a}catch{}})()]).then(async()=>{I=K(G({__name:"Demo03GradeList",props:{studentId:{type:null,required:!0}},setup(N){const{t:S}=R(),d=sa(),m=N,f=c(!1),w=c([]),k=c(0),r=j({pageNo:1,pageSize:10,studentId:void 0});J(()=>m.studentId,l=>{r.studentId=l,b()},{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}},b=()=>{r.pageNo=1,_()},v=c(),C=(l,t)=>{m.studentId?v.value.open(l,t,m.studentId):d.error("\u8BF7\u9009\u62E9\u4E00\u4E2A\u5B66\u751F")};return(l,t)=>{const x=T,y=X,o=A,z=B,D=W,P=Q,g=M("hasPermi"),L=E;return i(),q(H,null,[a(P,null,{default:n(()=>[p((i(),u(y,{type:"primary",plain:"",onClick:t[0]||(t[0]=s=>C("create"))},{default:n(()=>[a(x,{icon:"ep:plus",class:"mr-5px"}),h(" \u65B0\u589E ")]),_:1})),[[g,["infra:demo03-student:create"]]]),p((i(),u(z,{data:e(w),stripe:!0,"show-overflow-tooltip":!0},{default:n(()=>[a(o,{label:"\u7F16\u53F7",align:"center",prop:"id"}),a(o,{label:"\u540D\u5B57",align:"center",prop:"name"}),a(o,{label:"\u73ED\u4E3B\u4EFB",align:"center",prop:"teacher"}),a(o,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",formatter:e(Z),width:"180px"},null,8,["formatter"]),a(o,{label:"\u64CD\u4F5C",align:"center"},{default:n(s=>[p((i(),u(y,{link:"",type:"primary",onClick:U=>C("update",s.row.id)},{default:n(()=>[h(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[g,["infra:demo03-student:update"]]]),p((i(),u(y,{link:"",type:"danger",onClick:U=>(async F=>{try{await d.delConfirm(),await ta(F),d.success(S("common.delSuccess")),await _()}catch{}})(s.row.id)},{default:n(()=>[h(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[g,["infra:demo03-student:delete"]]])]),_:1})]),_:1},8,["data"])),[[L,e(f)]]),a(D,{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","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/infra/demo/demo03/erp/components/Demo03GradeList.vue"]])});export{ca as __tla,I as default};