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