const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/index133.js?v=1763625242172","js/index.vue_vue_type_script_setup_true_lang.js?v=1763625242172","js/vue.js?v=1763625242172","js/__commonjsHelpers__.js?v=1763625242172","js/naive.js?v=1763625242172","js/common.js?v=1763625242172","js/page_layout.js?v=1763625242172","js/public.js?v=1763625242172","css/public.css?v=1763625242172","css/page_layout.css?v=1763625242172","js/index.vue_vue_type_script_setup_true_lang2.js?v=1763625242172","js/index98.js?v=1763625242172","css/index13.css?v=1763625242172","js/index131.js?v=1763625242172","js/index132.js?v=1763625242172","css/index23.css?v=1763625242172","js/soft.js?v=1763625242172","js/site.js?v=1763625242172"])))=>i.map(i=>d[i]);
import{i as e,bn as a,bq as t,br as s,bu as i,c as n,x as o,y as l,bt as d,a as r,q as p}from"./page_layout.js?v=1763625242172";import{_}from"./index.js?v=1763625242172";import{_ as c}from"./index.vue_vue_type_script_setup_true_lang5.js?v=1763625242172";import{_ as u}from"./index.vue_vue_type_script_setup_true_lang7.js?v=1763625242172";import{_ as m}from"./index.vue_vue_type_script_setup_true_lang12.js?v=1763625242172";import{s as h,e as y,c as b,v as f,f as k,a as x,d as g,h as w}from"./public.js?v=1763625242172";import{_ as v}from"./index.vue_vue_type_script_setup_true_lang8.js?v=1763625242172";import{g as j}from"./hooks.js?v=1763625242172";import{X as D,k as R,P as C,e as U,w as $,R as B,a2 as L,a3 as P,V as W,N as q,U as z,j as S,a4 as E,aj as I,_ as K}from"./vue.js?v=1763625242172";import{c as V,u as A,d as H,_ as N,e as O,g as T}from"./index131.js?v=1763625242172";import{aC as X,dS as F}from"./naive.js?v=1763625242172";import"./common.js?v=1763625242172";import"./__commonjsHelpers__.js?v=1763625242172";import"./index.vue_vue_type_script_setup_true_lang6.js?v=1763625242172";import"./index132.js?v=1763625242172";import"./soft.js?v=1763625242172";import"./site.js?v=1763625242172";const{t:G}=e.global;const J={class:"p-16px"},M=R({__name:"index",setup(e){const{t:R}=C(),M=K((()=>r((()=>import("./index133.js?v=1763625242172")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17])))),Q=a(),Y=y(),Z=()=>{Y.show=!0},ee=()=>{T()},ae=async()=>{await t(Q.type,{ids:[]}),re()},{keys:te,table:se,columns:ie}=b([{type:"selection",width:40},{key:"name",title:R("Database.index_12"),width:"12%",minWidth:120},{key:"username",title:R("Database.index_13"),width:"12%",minWidth:120},{key:"password",title:G("Database.index_14"),minWidth:150,render:e=>D(h,{value:e.password},null)},{key:"sid",title:G("Database.index_19"),width:"12%",minWidth:120,render:e=>j(e)},f({onBlur:async(e,a)=>{await d({id:a.id,ps:e})}}),k({width:140,options:e=>[{label:"Password",onClick:()=>{A(e)}},{label:R("Public.Btn.Del"),onClick:()=>{V([e])}}]})]),ne=[{key:"sync",label:R("Database.index_24"),onBatch:e=>{x({title:R("Database.index_25"),content:R("Database.index_26"),onConfirm:async({hide:a})=>{await t(Q.type,{ids:e.map((e=>e.id))}),a()}})}},{key:"backup",type:"confirm",label:R("Database.index_27"),confirm:{title:R("Database.index_28"),desc:R("Database.index_29"),api:e=>s(Q.type,{id:e.id},!1),done:()=>{re()},columns:[{key:"name",title:R("Database.index_12")}]}},{key:"delete",label:R("Database.index_30"),onBatch:e=>{V(e)}}],{loading:oe,setLoading:le}=g(),de=U({p:1,limit:10,sid:-1,search:""}),re=async()=>{try{le(!0);const{message:e}=await i(Q.type,(()=>{const e={...q(de)};return-1===e.sid&&delete e.sid,e})());n(e)?(se.data=o(e.data)?e.data:[],se.total=l(e.page)):(se.data=[],se.total=0)}finally{te.value=[],le(!1)}};$((()=>Q.isRefresh),(e=>{e&&(Q.setRefresh(!1),Q.delRemoteId===de.sid&&(de.sid=-1),re())}));return(async()=>{await Q.getRemote(),Q.install&&re()})(),(e,a)=>{const t=X,s=p,i=v,n=w,o=m,l=u,d=c,r=_,h=F;return B(),L(W(O),null,{default:P((()=>[D(h,null,{default:P((()=>[z("div",J,[D(d,{feedback:!0},{toolsLeft:P((()=>[D(t,{type:"primary",onClick:Z},{default:P((()=>[S(E(e.$t("Database.index_1")),1)])),_:1}),D(t,{onClick:ee},{default:P((()=>[S(E(e.$t("Database.index_4")),1)])),_:1}),D(s,{class:"mx-0!",vertical:""}),D(t,{onClick:ae},{default:P((()=>[S(E(e.$t("Database.index_5")),1)])),_:1}),D(t,{onClick:W(H)},{default:P((()=>[S(E(e.$t("Database.index_6")),1)])),_:1},8,["onClick"])])),toolsRight:P((()=>[D(W(N),{value:W(de).sid,"onUpdate:value":a[0]||(a[0]=e=>W(de).sid=e),"store-key":"database-sqlserver-page",onChange:re},null,8,["value"]),D(i,{value:W(de).search,"onUpdate:value":a[1]||(a[1]=e=>W(de).search=e),placeholder:"Database search",onSearch:re},null,8,["value"])])),table:P((()=>[D(n,{"checked-row-keys":W(te),"onUpdate:checkedRowKeys":a[2]||(a[2]=e=>I(te)?te.value=e:null),loading:W(oe),data:W(se).data,columns:W(ie)},null,8,["checked-row-keys","loading","data","columns"])])),pageLeft:P((()=>[D(o,{"checked-row-keys":W(te),"onUpdate:checkedRowKeys":a[3]||(a[3]=e=>I(te)?te.value=e:null),data:W(se).data,options:ne},null,8,["checked-row-keys","data"])])),pageRight:P((()=>[D(l,{page:W(de).p,"onUpdate:page":a[4]||(a[4]=e=>W(de).p=e),"page-size":W(de).limit,"onUpdate:pageSize":a[5]||(a[5]=e=>W(de).limit=e),"item-count":W(se).total,onRefresh:re},null,8,["page","page-size","item-count"])])),_:1}),D(r,{show:W(Y).show,"onUpdate:show":a[6]||(a[6]=e=>W(Y).show=e),title:e.$t("Database.mongo.index_4"),width:540,"min-height":280,footer:!0,component:W(M)},null,8,["show","title","component"])])])),_:1})])),_:1})}}});export{M as default};
