const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/RoleDrawer.jWQwoYrr.js","assets/index.D93ign_E.js","assets/vue.D1BjjNmv.js","assets/index.CPIWeYSE.css","assets/splitpanes.DuIxzowM.js","assets/splitpanes.C2zCCjIY.css","assets/RoleDrawerStores.Bmochpay.js","assets/RoleUsersStores.Dr02XviG.js","assets/api.Chpe9Vbl.js","assets/_plugin-vue_export-helper.DlAUqK2U.js","assets/RoleDrawer.ClKFTd_V.css"])))=>i.map(i=>d[i]);
import{k as E,_ as M,s as V,A as q,E as T}from"./index.D93ign_E.js";import{a as m,r as t,aH as U,q as S,aj as c,J as A,o as l,K as p,S as r,H as P,u as i,aA as L,b as O,c as _}from"./vue.D1BjjNmv.js";import{createCrudOptions as $}from"./crud.DG1LiiRE.js";import{R as j}from"./RoleDrawerStores.Bmochpay.js";import{R as F}from"./RoleMenuBtnStores.Ds74f0Jk.js";import{R as H}from"./RoleMenuFieldStores.1tuZt4kb.js";import{R as I}from"./RoleUsersStores.Dr02XviG.js";import N from"./BatchTagsDialog.C8cIYfzw.js";import{_ as J}from"./_plugin-vue_export-helper.DlAUqK2U.js";import"./api.DFVyvDs2.js";import"./authFunction.BLxX_QUS.js";import"./api.Chpe9Vbl.js";const K={class:"qrcode-container"},Q=["src"],z={key:1,class:"loading"},G=m({name:"role"}),W=m({...G,setup(X){const f=L(()=>M(()=>import("./RoleDrawer.jWQwoYrr.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]))),s=t(!1),a=t(""),g=j(),R=F(),v=H(),h=I(),x=U(),d=t(),b=t([]);async function y(e){try{s.value=!0,a.value="";const o=await q.post("https://backend.qicai321.com/api/system/wechat/qrcode",{scene:`${e.id}`,page:"pages/index/index",width:430,auto_color:!1,is_hyaline:!1},{responseType:"blob"}),n=new Blob([o.data],{type:"image/png"});a.value=URL.createObjectURL(n)}catch(o){console.error("生成小程序码失败:",o),T.error("生成小程序二维码失败，请稍后重试"),s.value=!1}}const{crudBinding:w,crudRef:k,crudExpose:u}=E({createCrudOptions:$,context:{RoleDrawer:g,RoleMenuBtn:R,RoleMenuField:v,generateQRCode:y,router:x,$message:{warning:e=>V(e)},selectedRows:b,openBatchTagsDialog:e=>{d.value.open(e)}}});return S(async()=>{u.doRefresh(),h.get_all_users()}),(e,o)=>{const n=c("fs-crud"),B=c("el-dialog"),C=c("fs-page");return l(),A(C,null,{default:p(()=>[r(n,P({ref_key:"crudRef",ref:k},i(w)),null,16),r(i(f)),r(B,{modelValue:s.value,"onUpdate:modelValue":o[0]||(o[0]=D=>s.value=D),title:"小程序二维码",width:"400px","align-center":""},{default:p(()=>[O("div",K,[a.value?(l(),_("img",{key:0,src:a.value,alt:"小程序二维码"},null,8,Q)):(l(),_("div",z,"生成中..."))])]),_:1},8,["modelValue"]),r(N,{ref_key:"batchTagsDialogRef",ref:d,crudExpose:i(u)},null,8,["crudExpose"])]),_:1})}}}),de=J(W,[["__scopeId","data-v-912bc268"]]);export{de as default};
