Demo03GradeList-6c6c60b8.js 3.0 KB

1
  1. import{d as q,P as F,r as c,x as T,w as U,a4 as j,o as i,c as A,f as a,A as n,k as p,C as d,D as h,a as e,F as M,Q,J as R,X,Y,Z,_ as B,__tla as E}from"./index-0b2503c4.js";import{_ as H,__tla as K}from"./ContentWrap-b5913fb6.js";import{_ as O,__tla as V}from"./index-40a9fc0c.js";import{d as W,__tla as $}from"./formatTime-9069dda3.js";import{k as aa,l as ta,__tla as ea}from"./index-49da1584.js";import ra,{__tla as la}from"./Demo03GradeForm-267ffc21.js";import{u as sa,__tla as na}from"./useMessage-d05433ee.js";import{__tla as oa}from"./el-card-fa060bc4.js";import{__tla as ia}from"./index-2c2ac611.js";import{__tla as _a}from"./Dialog-3207cd36.js";let x,ca=Promise.all([(()=>{try{return E}catch{}})(),(()=>{try{return K}catch{}})(),(()=>{try{return V}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()=>{x=B(q({__name:"Demo03GradeList",props:{studentId:{type:null,required:!0}},setup(z){const{t:I}=F(),m=sa(),u=z,f=c(!1),w=c([]),k=c(0),r=T({pageNo:1,pageSize:10,studentId:void 0});U(()=>u.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)=>{u.studentId?v.value.open(l,t,u.studentId):m.error("\u8BF7\u9009\u62E9\u4E00\u4E2A\u5B66\u751F")};return(l,t)=>{const b=Q,y=R,o=X,D=Y,N=O,P=H,g=j("hasPermi"),G=Z;return i(),A(M,null,[a(P,null,{default:n(()=>[p((i(),d(y,{type:"primary",plain:"",onClick:t[0]||(t[0]=s=>C("create"))},{default:n(()=>[a(b,{icon:"ep:plus",class:"mr-5px"}),h(" \u65B0\u589E ")]),_:1})),[[g,["infra:demo03-student:create"]]]),p((i(),d(D,{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(W),width:"180px"},null,8,["formatter"]),a(o,{label:"\u64CD\u4F5C",align:"center"},{default:n(s=>[p((i(),d(y,{link:"",type:"primary",onClick:J=>C("update",s.row.id)},{default:n(()=>[h(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[g,["infra:demo03-student:update"]]]),p((i(),d(y,{link:"",type:"danger",onClick:J=>(async L=>{try{await m.delConfirm(),await ta(L),m.success(I("common.delSuccess")),await _()}catch{}})(s.row.id)},{default:n(()=>[h(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[g,["infra:demo03-student:delete"]]])]),_:1})]),_:1},8,["data"])),[[G,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/Demo03GradeList.vue"]])});export{ca as __tla,x as default};