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