index-93e2a56d.js 4.7 KB

1
  1. import{d as K,P as L,r as h,x as M,b as W,a3 as X,o as c,c as N,f as a,A as t,a as r,a4 as Y,D as o,k as m,C as d,E as j,a2 as B,F as G,a8 as H,U as O,_ as Q,J as T,V as Z,W as $,X as aa,Y as ea,__tla as ta}from"./index-f65577b8.js";import{_ as la,__tla as ra}from"./index.vue_vue_type_script_setup_true_lang-53598c8e.js";import{_ as na,__tla as ca}from"./ContentWrap.vue_vue_type_script_setup_true_lang-9fbbd655.js";import{a as oa,d as sa,b as pa,e as ia,__tla as _a}from"./index-75320d23.js";import{_ as ua,__tla as ma}from"./AccountForm.vue_vue_type_script_setup_true_lang-de1c6091.js";import{u as da,__tla as fa}from"./useMessage-4dbf0ae4.js";import{__tla as ya}from"./index-1896261a.js";import{__tla as ha}from"./el-card-ab53e6aa.js";import{__tla as ga}from"./Dialog-bd3317a7.js";import"./_plugin-vue_export-helper-1b428a4d.js";let S,ka=Promise.all([(()=>{try{return ta}catch{}})(),(()=>{try{return ra}catch{}})(),(()=>{try{return ca}catch{}})(),(()=>{try{return _a}catch{}})(),(()=>{try{return ma}catch{}})(),(()=>{try{return fa}catch{}})(),(()=>{try{return ya}catch{}})(),(()=>{try{return ha}catch{}})(),(()=>{try{return ga}catch{}})()]).then(async()=>{let b;b=["src"],S=K({name:"MpAccount",__name:"index",setup(wa){const _=da(),{t:z}=L(),g=h(!0),x=h(0),U=h([]),n=M({pageNo:1,pageSize:10,name:null,account:null,appId:null}),I=h(),u=async()=>{g.value=!0;try{const f=await oa(n);U.value=f.list,x.value=f.total}finally{g.value=!1}},k=()=>{n.pageNo=1,u()},V=()=>{I.value.resetFields(),k()},P=h(),q=(f,l)=>{P.value.open(f,l)};return W(()=>{u()}),(f,l)=>{const F=H,v=O,w=Q,s=T,R=Z,A=na,p=$,D=aa,E=la,y=X("hasPermi"),J=ea;return c(),N(G,null,[a(A,null,{default:t(()=>[a(R,{class:"-mb-15px",model:r(n),ref_key:"queryFormRef",ref:I,inline:!0,"label-width":"68px"},{default:t(()=>[a(v,{label:"\u540D\u79F0",prop:"name"},{default:t(()=>[a(F,{modelValue:r(n).name,"onUpdate:modelValue":l[0]||(l[0]=e=>r(n).name=e),placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0",clearable:"",onKeyup:Y(k,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),a(v,null,{default:t(()=>[a(s,{onClick:k},{default:t(()=>[a(w,{icon:"ep:search",class:"mr-5px"}),o("\u641C\u7D22")]),_:1}),a(s,{onClick:V},{default:t(()=>[a(w,{icon:"ep:refresh",class:"mr-5px"}),o("\u91CD\u7F6E")]),_:1}),m((c(),d(s,{type:"primary",onClick:l[1]||(l[1]=e=>q("create"))},{default:t(()=>[a(w,{icon:"ep:plus",class:"mr-5px"}),o(" \u65B0\u589E ")]),_:1})),[[y,["mp:account:create"]]])]),_:1})]),_:1},8,["model"])]),_:1}),a(A,null,{default:t(()=>[m((c(),d(D,{data:r(U)},{default:t(()=>[a(p,{label:"\u540D\u79F0",align:"center",prop:"name"}),a(p,{label:"\u5FAE\u4FE1\u53F7",align:"center",prop:"account",width:"180"}),a(p,{label:"appId",align:"center",prop:"appId",width:"180"}),a(p,{label:"\u670D\u52A1\u5668\u5730\u5740(URL)",align:"center",prop:"appId",width:"360"},{default:t(e=>[o(j("http://\u670D\u52A1\u7AEF\u5730\u5740/mp/open/"+e.row.appId),1)]),_:1}),a(p,{label:"\u4E8C\u7EF4\u7801",align:"center",prop:"qrCodeUrl"},{default:t(e=>[e.row.qrCodeUrl?(c(),N("img",{key:0,src:e.row.qrCodeUrl,alt:"\u4E8C\u7EF4\u7801",style:{display:"inline-block",height:"100px"}},null,8,b)):B("",!0),m((c(),d(s,{link:"",type:"primary",onClick:C=>(async i=>{try{await _.confirm('\u662F\u5426\u786E\u8BA4\u751F\u6210\u516C\u4F17\u53F7\u8D26\u53F7\u7F16\u53F7\u4E3A"'+i.name+'"\u7684\u4E8C\u7EF4\u7801?'),await pa(i.id),_.success("\u751F\u6210\u4E8C\u7EF4\u7801\u6210\u529F"),await u()}catch{}})(e.row)},{default:t(()=>[o(" \u751F\u6210\u4E8C\u7EF4\u7801 ")]),_:2},1032,["onClick"])),[[y,["mp:account:qr-code"]]])]),_:1}),a(p,{label:"\u5907\u6CE8",align:"center",prop:"remark"}),a(p,{label:"\u64CD\u4F5C",align:"center"},{default:t(e=>[m((c(),d(s,{link:"",type:"primary",onClick:C=>q("update",e.row.id)},{default:t(()=>[o(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[y,["mp:account:update"]]]),m((c(),d(s,{link:"",type:"danger",onClick:C=>(async i=>{try{await _.delConfirm(),await sa(i),_.success(z("common.delSuccess")),await u()}catch{}})(e.row.id)},{default:t(()=>[o(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[y,["mp:account:delete"]]]),m((c(),d(s,{link:"",type:"danger",onClick:C=>(async i=>{try{await _.confirm('\u662F\u5426\u786E\u8BA4\u6E05\u7A7A\u751F\u6210\u516C\u4F17\u53F7\u8D26\u53F7\u7F16\u53F7\u4E3A"'+i.name+'"\u7684 API \u914D\u989D?'),await ia(i.id),_.success("\u6E05\u7A7A API \u914D\u989D\u6210\u529F")}catch{}})(e.row)},{default:t(()=>[o(" \u6E05\u7A7A API \u914D\u989D ")]),_:2},1032,["onClick"])),[[y,["mp:account:clear-quota"]]])]),_:1})]),_:1},8,["data"])),[[J,r(g)]]),a(E,{total:r(x),page:r(n).pageNo,"onUpdate:page":l[2]||(l[2]=e=>r(n).pageNo=e),limit:r(n).pageSize,"onUpdate:limit":l[3]||(l[3]=e=>r(n).pageSize=e),onPagination:u},null,8,["total","page","limit"])]),_:1}),a(ua,{ref_key:"formRef",ref:P,onSuccess:u},null,512)],64)}}})});export{ka as __tla,S as default};