Demo03GradeList-d5ea6d66.js 3.0 KB

1
  1. import{d as R,i as j,r as c,f as F,M,R as T,o as i,c as U,g as a,w as s,y as p,x as d,n as h,a as e,F as H,q as J,D as A,H as B,I as E,J as K,_ as O,__tla as Q}from"./index-b362e1d5.js";import{_ as V,__tla as W}from"./ContentWrap-a3bb871b.js";import{_ as X,__tla as Y}from"./index-ccc64a6d.js";import{d as Z,__tla as $}from"./formatTime-053b1c05.js";import{k as aa,l as ta,__tla as ea}from"./index-0974267f.js";import ra,{__tla as la}from"./Demo03GradeForm-da8f32bc.js";import{u as na,__tla as sa}from"./useMessage-7c1dd10e.js";import{__tla as oa}from"./el-card-732e29b8.js";import{__tla as ia}from"./index-39b44010.js";import{__tla as _a}from"./Dialog-71bebaff.js";let x,ca=Promise.all([(()=>{try{return Q}catch{}})(),(()=>{try{return W}catch{}})(),(()=>{try{return Y}catch{}})(),(()=>{try{return $}catch{}})(),(()=>{try{return ea}catch{}})(),(()=>{try{return la}catch{}})(),(()=>{try{return sa}catch{}})(),(()=>{try{return oa}catch{}})(),(()=>{try{return ia}catch{}})(),(()=>{try{return _a}catch{}})()]).then(async()=>{x=O(R({__name:"Demo03GradeList",props:{studentId:{type:null,required:!0}},setup(z){const{t:C}=j(),m=na(),u=z,f=c(!1),w=c([]),k=c(0),r=F({pageNo:1,pageSize:10,studentId:void 0});M(()=>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(),I=(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=J,y=A,o=B,D=E,N=X,L=V,g=T("hasPermi"),P=K;return i(),U(H,null,[a(L,null,{default:s(()=>[p((i(),d(y,{type:"primary",plain:"",onClick:t[0]||(t[0]=n=>I("create"))},{default:s(()=>[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:s(()=>[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:s(n=>[p((i(),d(y,{link:"",type:"primary",onClick:q=>I("update",n.row.id)},{default:s(()=>[h(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[g,["infra:demo03-student:update"]]]),p((i(),d(y,{link:"",type:"danger",onClick:q=>(async G=>{try{await m.delConfirm(),await ta(G),m.success(C("common.delSuccess")),await _()}catch{}})(n.row.id)},{default:s(()=>[h(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[g,["infra:demo03-student:delete"]]])]),_:1})]),_:1},8,["data"])),[[P,e(f)]]),a(N,{total:e(k),page:e(r).pageNo,"onUpdate:page":t[1]||(t[1]=n=>e(r).pageNo=n),limit:e(r).pageSize,"onUpdate:limit":t[2]||(t[2]=n=>e(r).pageSize=n),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};