Demo03GradeList-985d8b1e.js 3.2 KB

1
  1. import{d as U,h as R,r as c,e as j,L as F,Q as T,o as _,c as q,f as t,w as n,x as p,v as u,n as g,a as e,F as Q,j as X,C as A,G as B,H as E,I as J,_ as K,__tla as M}from"./index-11e4820e.js";import{_ as O,__tla as V}from"./ContentWrap-694014d4.js";import{_ as W,__tla as Y}from"./index-c8f58bd0.js";import{d as Z,__tla as $}from"./formatTime-f6a2c881.js";import{k as tt,l as at,__tla as et}from"./index-57def28e.js";import rt,{__tla as lt}from"./Demo03GradeForm-0693bd03.js";import{u as st,__tla as nt}from"./useMessage-06ddf735.js";import{__tla as ot}from"./ContentWrap.vue_vue_type_script_setup_true_lang-11f85821.js";import{__tla as _t}from"./el-card-919c14be.js";import{__tla as it}from"./index-dd73c59d.js";import{__tla as ct}from"./Dialog-bbfaf85c.js";let C,pt=Promise.all([(()=>{try{return M}catch{}})(),(()=>{try{return V}catch{}})(),(()=>{try{return Y}catch{}})(),(()=>{try{return $}catch{}})(),(()=>{try{return et}catch{}})(),(()=>{try{return lt}catch{}})(),(()=>{try{return nt}catch{}})(),(()=>{try{return ot}catch{}})(),(()=>{try{return _t}catch{}})(),(()=>{try{return it}catch{}})(),(()=>{try{return ct}catch{}})()]).then(async()=>{C=K(U({__name:"Demo03GradeList",props:{studentId:{type:null,required:!0}},setup(S){const{t:b}=R(),m=st(),d=S,f=c(!1),w=c([]),k=c(0),r=j({pageNo:1,pageSize:10,studentId:void 0});F(()=>d.studentId,l=>{r.studentId=l,x()},{immediate:!1});const i=async()=>{f.value=!0;try{const l=await tt(r);w.value=l.list,k.value=l.total}finally{f.value=!1}},x=()=>{r.pageNo=1,i()},v=c(),I=(l,a)=>{d.studentId?v.value.open(l,a,d.studentId):m.error("\u8BF7\u9009\u62E9\u4E00\u4E2A\u5B66\u751F")};return(l,a)=>{const z=X,y=A,o=B,D=E,N=W,G=O,h=T("hasPermi"),H=J;return _(),q(Q,null,[t(G,null,{default:n(()=>[p((_(),u(y,{type:"primary",plain:"",onClick:a[0]||(a[0]=s=>I("create"))},{default:n(()=>[t(z,{icon:"ep:plus",class:"mr-5px"}),g(" \u65B0\u589E ")]),_:1})),[[h,["infra:demo03-student:create"]]]),p((_(),u(D,{data:e(w),stripe:!0,"show-overflow-tooltip":!0},{default:n(()=>[t(o,{label:"\u7F16\u53F7",align:"center",prop:"id"}),t(o,{label:"\u540D\u5B57",align:"center",prop:"name"}),t(o,{label:"\u73ED\u4E3B\u4EFB",align:"center",prop:"teacher"}),t(o,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",formatter:e(Z),width:"180px"},null,8,["formatter"]),t(o,{label:"\u64CD\u4F5C",align:"center"},{default:n(s=>[p((_(),u(y,{link:"",type:"primary",onClick:L=>I("update",s.row.id)},{default:n(()=>[g(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[h,["infra:demo03-student:update"]]]),p((_(),u(y,{link:"",type:"danger",onClick:L=>(async P=>{try{await m.delConfirm(),await at(P),m.success(b("common.delSuccess")),await i()}catch{}})(s.row.id)},{default:n(()=>[g(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[h,["infra:demo03-student:delete"]]])]),_:1})]),_:1},8,["data"])),[[H,e(f)]]),t(N,{total:e(k),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:i},null,8,["total","page","limit"])]),_:1}),t(rt,{ref_key:"formRef",ref:v,onSuccess:i},null,512)],64)}}}),[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/infra/demo/demo03/erp/components/Demo03GradeList.vue"]])});export{pt as __tla,C as default};