import{d as W,Q as X,J as Y,r as d,A as Z,b as $,a1 as j,o as n,c as z,k as e,B as t,a,a2 as O,F as T,i as E,a3 as G,N as H,g as c,O as u,P as f,a7 as I,S as L,$ as ee,R as ae,U as le,V as te,W as oe,X as se,Y as ne,Z as re}from"./index-BP6bNRoi.js";import{_ as ie}from"./index.vue_vue_type_script_setup_true_lang-sJUY8qtC.js";import{_ as pe}from"./ContentWrap.vue_vue_type_script_setup_true_lang-CR_2gECF.js";import{d as de}from"./formatTime-DwR9f7DP.js";import{d as ce}from"./download-e0EdwhTv.js";import{_ as ue,g as me,d as fe,e as _e}from"./DemoForm.vue_vue_type_script_setup_true_lang-oJXnRt53.js";import"./index-BZESAUPP.js";import"./el-card-bU92WWV4.js";import"./Dialog.vue_vue_type_style_index_0_lang-DFckl8Er.js";import"./constants-CuOBQ73z.js";const ge=W({name:"Demo",__name:"index",setup(ye){const w=X(),{t:A}=Y(),x=d(!0),v=d(0),h=d([]),o=Z({pageNo:1,pageSize:10,code:void 0,name:void 0,status:void 0,createTime:[]}),C=d(),k=d(!1),m=async()=>{x.value=!0;try{const r=await me(o);h.value=r.list,v.value=r.total}finally{x.value=!1}},_=()=>{o.pageNo=1,m()},F=()=>{C.value.resetFields(),_()},V=d(),S=(r,s)=>{V.value.open(r,s)},K=async()=>{try{await w.exportConfirm(),k.value=!0;const r=await _e(o);ce.excel(r,"\u79DF\u6237\u5217\u8868.xls")}catch{}finally{k.value=!1}};return $(async()=>{await m()}),(r,s)=>{const U=I,g=L,P=ee,R=ae,y=le,i=te,M=oe,N=pe,p=se,q=ne,B=ie,b=j("hasPermi"),D=re;return n(),z(T,null,[e(N,null,{default:t(()=>[e(M,{class:"-mb-15px",model:a(o),ref_key:"queryFormRef",ref:C,inline:!0,"label-width":"68px"},{default:t(()=>[e(g,{label:"\u7F16\u53F7",prop:"code"},{default:t(()=>[e(U,{modelValue:a(o).code,"onUpdate:modelValue":s[0]||(s[0]=l=>a(o).code=l),placeholder:"\u8BF7\u8F93\u5165\u7F16\u53F7",clearable:"",onKeyup:O(_,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(g,{label:"\u540D\u79F0",prop:"name"},{default:t(()=>[e(U,{modelValue:a(o).name,"onUpdate:modelValue":s[1]||(s[1]=l=>a(o).name=l),placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0",clearable:"",onKeyup:O(_,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(g,{label:"\u72B6\u6001",prop:"status"},{default:t(()=>[e(R,{modelValue:a(o).status,"onUpdate:modelValue":s[2]||(s[2]=l=>a(o).status=l),placeholder:"\u8BF7\u9009\u62E9\u72B6\u6001",clearable:"",class:"!w-240px"},{default:t(()=>[(n(!0),z(T,null,E(a(G)(a(H).COMMON_STATUS),l=>(n(),c(P,{key:l.value,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(g,null,{default:t(()=>[e(i,{onClick:_},{default:t(()=>[e(y,{icon:"ep:search",class:"mr-5px"}),u(" \u641C\u7D22 ")]),_:1}),e(i,{onClick:F},{default:t(()=>[e(y,{icon:"ep:refresh",class:"mr-5px"}),u(" \u91CD\u7F6E ")]),_:1}),f((n(),c(i,{type:"primary",plain:"",onClick:s[3]||(s[3]=l=>S("create"))},{default:t(()=>[e(y,{icon:"ep:plus",class:"mr-5px"}),u(" \u65B0\u589E ")]),_:1})),[[b,["demo:create"]]]),f((n(),c(i,{type:"success",plain:"",onClick:K,loading:a(k)},{default:t(()=>[e(y,{icon:"ep:download",class:"mr-5px"}),u(" \u5BFC\u51FA ")]),_:1},8,["loading"])),[[b,["demo:export"]]])]),_:1})]),_:1},8,["model"])]),_:1}),e(N,null,{default:t(()=>[f((n(),c(q,{data:a(h)},{default:t(()=>[e(p,{label:"\u5E94\u7528\u7F16\u53F7",align:"center",prop:"code"}),e(p,{label:"\u5E94\u7528\u540D\u79F0",align:"center",prop:"name"}),e(p,{label:"\u5E94\u7528\u56FE\u6807",align:"center",prop:"icon"}),e(p,{label:"\u5907\u6CE8",align:"center",prop:"remark",width:"200"}),e(p,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",width:"180",formatter:a(de)},null,8,["formatter"]),e(p,{label:"\u64CD\u4F5C",align:"center","min-width":"110",fixed:"right"},{default:t(l=>[f((n(),c(i,{link:"",type:"primary",onClick:J=>S("update",l.row.id)},{default:t(()=>[u(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[b,["demo:update"]]]),f((n(),c(i,{link:"",type:"danger",onClick:J=>(async Q=>{try{await w.delConfirm(),await fe(Q),w.success(A("common.delSuccess")),await m()}catch{}})(l.row.id)},{default:t(()=>[u(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[b,["demo:delete"]]])]),_:1})]),_:1},8,["data"])),[[D,a(x)]]),e(B,{total:a(v),page:a(o).pageNo,"onUpdate:page":s[4]||(s[4]=l=>a(o).pageNo=l),limit:a(o).pageSize,"onUpdate:limit":s[5]||(s[5]=l=>a(o).pageSize=l),onPagination:m},null,8,["total","page","limit"])]),_:1}),e(ue,{ref_key:"formRef",ref:V,onSuccess:m},null,512)],64)}}});export{ge as default};
|