const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/index128.js?v=1753954525509","js/index.vue_vue_type_script_setup_true_lang.js?v=1753954525509","js/naive.js?v=1753954525509","js/vue.js?v=1753954525509","js/__commonjsHelpers__.js?v=1753954525509","js/common.js?v=1753954525509","js/page_layout.js?v=1753954525509","js/public.js?v=1753954525509","css/public.css?v=1753954525509","css/page_layout.css?v=1753954525509","js/index.vue_vue_type_script_setup_true_lang2.js?v=1753954525509","js/index96.js?v=1753954525509","css/index13.css?v=1753954525509","js/index126.js?v=1753954525509","js/index127.js?v=1753954525509","css/index21.css?v=1753954525509","js/soft.js?v=1753954525509"])))=>i.map(i=>d[i]);
import{i as e,b1 as a,b4 as t,b5 as s,b8 as i,c as n,w as o,x as l,b7 as d,a as p,p as r}from"./page_layout.js?v=1753954525509";import{_}from"./index.js?v=1753954525509";import{_ as c}from"./index.vue_vue_type_script_setup_true_lang4.js?v=1753954525509";import{_ as u}from"./index.vue_vue_type_script_setup_true_lang5.js?v=1753954525509";import{_ as m}from"./index.vue_vue_type_script_setup_true_lang11.js?v=1753954525509";import{t as h,e as y,b,w as f,h as k,d as x,c as g,f as w}from"./public.js?v=1753954525509";import{_ as v}from"./index.vue_vue_type_script_setup_true_lang6.js?v=1753954525509";import{g as D}from"./hooks.js?v=1753954525509";import{Q as j,k as R,P as C,e as U,w as W,U as $,a1 as B,a2 as L,X as P,N as z,W as E,j as I,a3 as K,ah as S,_ as q}from"./vue.js?v=1753954525509";import{c as A,u as H,d as N,_ as O,e as Q,g as T}from"./index126.js?v=1753954525509";import{ay as V,cD as X}from"./naive.js?v=1753954525509";import"./common.js?v=1753954525509";import"./__commonjsHelpers__.js?v=1753954525509";import"./index.vue_vue_type_script_setup_true_lang7.js?v=1753954525509";import"./index127.js?v=1753954525509";import"./soft.js?v=1753954525509";const{t:F}=e.global;const G={class:"p-16px"},J=R({__name:"index",setup(e){const{t:R}=C(),J=q((()=>p((()=>import("./index128.js?v=1753954525509")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16])))),M=a(),Y=y(),Z=()=>{Y.show=!0},ee=()=>{T()},ae=async()=>{await t(M.type,{ids:[]}),pe()},{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:F("Database.index_14"),minWidth:150,render:e=>j(h,{value:e.password},null)},{key:"sid",title:F("Database.index_19"),width:"12%",minWidth:120,render:e=>D(e)},f({onBlur:async(e,a)=>{await d({id:a.id,ps:e})}}),k({width:140,options:e=>[{label:"Password",onClick:()=>{H(e)}},{label:R("Public.Btn.Del"),onClick:()=>{A([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(M.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(M.type,{id:e.id},!1),done:()=>{pe()},columns:[{key:"name",title:R("Database.index_12")}]}},{key:"delete",label:R("Database.index_30"),onBatch:e=>{A(e)}}],{loading:oe,setLoading:le}=g(),de=U({p:1,limit:10,sid:-1,search:""}),pe=async()=>{try{le(!0);const{message:e}=await i(M.type,(()=>{const e={...z(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((()=>M.isRefresh),(e=>{e&&(M.setRefresh(!1),M.delRemoteId===de.sid&&(de.sid=-1),pe())}));return(async()=>{await M.getRemote(),M.install&&pe()})(),(e,a)=>{const t=V,s=r,i=v,n=w,o=m,l=u,d=c,p=_,h=X;return $(),B(P(Q),null,{default:L((()=>[j(h,null,{default:L((()=>[E("div",G,[j(d,{feedback:!0},{toolsLeft:L((()=>[j(t,{type:"primary",onClick:Z},{default:L((()=>[I(K(e.$t("Database.index_1")),1)])),_:1}),j(t,{onClick:ee},{default:L((()=>[I(K(e.$t("Database.index_4")),1)])),_:1}),j(s,{class:"mx-0!",vertical:""}),j(t,{onClick:ae},{default:L((()=>[I(K(e.$t("Database.index_5")),1)])),_:1}),j(t,{onClick:P(N)},{default:L((()=>[I(K(e.$t("Database.index_6")),1)])),_:1},8,["onClick"])])),toolsRight:L((()=>[j(P(O),{value:P(de).sid,"onUpdate:value":a[0]||(a[0]=e=>P(de).sid=e),"store-key":"database-sqlserver-page",onChange:pe},null,8,["value"]),j(i,{value:P(de).search,"onUpdate:value":a[1]||(a[1]=e=>P(de).search=e),placeholder:"Database search",onSearch:pe},null,8,["value"])])),table:L((()=>[j(n,{"checked-row-keys":P(te),"onUpdate:checkedRowKeys":a[2]||(a[2]=e=>S(te)?te.value=e:null),loading:P(oe),data:P(se).data,columns:P(ie)},null,8,["checked-row-keys","loading","data","columns"])])),pageLeft:L((()=>[j(o,{"checked-row-keys":P(te),"onUpdate:checkedRowKeys":a[3]||(a[3]=e=>S(te)?te.value=e:null),data:P(se).data,options:ne},null,8,["checked-row-keys","data"])])),pageRight:L((()=>[j(l,{page:P(de).p,"onUpdate:page":a[4]||(a[4]=e=>P(de).p=e),"page-size":P(de).limit,"onUpdate:pageSize":a[5]||(a[5]=e=>P(de).limit=e),"item-count":P(se).total,onRefresh:pe},null,8,["page","page-size","item-count"])])),_:1}),j(p,{show:P(Y).show,"onUpdate:show":a[6]||(a[6]=e=>P(Y).show=e),title:e.$t("Database.mongo.index_4"),width:540,"min-height":280,footer:!0,component:P(J)},null,8,["show","title","component"])])])),_:1})])),_:1})}}});export{J as default};
