← Back
Editing: index-legacy171.js
!function(){function t(t){return function(t){if(Array.isArray(t))return n(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,r){if(t){if("string"==typeof t)return n(t,r);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?n(t,r):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=Array(n);r<n;r++)e[r]=t[r];return e}function r(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var t,n,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",u=o.toStringTag||"@@toStringTag";function a(r,o,i,u){var a=o&&o.prototype instanceof l?o:l,f=Object.create(a.prototype);return e(f,"_invoke",function(r,e,o){var i,u,a,l=0,f=o||[],s=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(n,r){return i=n,u=0,a=t,p.n=r,c}};function y(r,e){for(u=r,a=e,n=0;!s&&l&&!o&&n<f.length;n++){var o,i=f[n],y=p.p,d=i[2];r>3?(o=d===e)&&(a=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=t):i[0]<=y&&((o=r<2&&y<i[1])?(u=0,p.v=e,p.n=i[1]):y<d&&(o=r<3||i[0]>e||e>d)&&(i[4]=r,i[5]=e,p.n=d,u=0))}if(o||r>1)return c;throw s=!0,e}return function(o,f,d){if(l>1)throw TypeError("Generator is already running");for(s&&1===f&&y(f,d),u=f,a=d;(n=u<2?t:a)||!s;){i||(u?u<3?(u>1&&(p.n=-1),y(u,a)):p.n=a:p.v=a);try{if(l=2,i){if(u||(o="next"),n=i[o]){if(!(n=n.call(i,a)))throw TypeError("iterator result is not an object");if(!n.done)return n;a=n.value,u<2&&(u=0)}else 1===u&&(n=i.return)&&n.call(i),u<2&&(a=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=t}else if((n=(s=p.n<0)?a:r.call(e,p))!==c)break}catch(n){i=t,u=1,a=n}finally{l=1}}return{value:n,done:s}}}(r,i,u),!0),f}var c={};function l(){}function f(){}function s(){}n=Object.getPrototypeOf;var p=[][i]?n(n([][i]())):(e(n={},i,function(){return this}),n),y=s.prototype=l.prototype=Object.create(p);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,e(t,u,"GeneratorFunction")),t.prototype=Object.create(y),t}return f.prototype=s,e(y,"constructor",s),e(s,"constructor",f),f.displayName="GeneratorFunction",e(s,u,"GeneratorFunction"),e(y),e(y,u,"Generator"),e(y,i,function(){return this}),e(y,"toString",function(){return"[object Generator]"}),(r=function(){return{w:a,m:d}})()}function e(t,n,r,o){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}e=function(t,n,r,o){function u(n,r){e(t,n,function(t){return this._invoke(n,r,t)})}n?i?i(t,n,{value:r,enumerable:!o,configurable:!o,writable:!o}):t[n]=r:(u("next",0),u("throw",1),u("return",2))},e(t,n,r,o)}function o(t,n,r,e,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void r(t)}a.done?n(c):Promise.resolve(c).then(e,o)}function i(t){return function(){var n=this,r=arguments;return new Promise(function(e,i){var u=t.apply(n,r);function a(t){o(u,e,i,a,c,"next",t)}function c(t){o(u,e,i,a,c,"throw",t)}a(void 0)})}}System.register(["./utils-lib-legacy.js?v=1765440387","./index-legacy93.js?v=1765440387","./base-lib-legacy.js?v=1765440387","./database-legacy.js?v=1765440387","./column-legacy.js?v=1765440387","./useMethod-legacy4.js?v=1765440387","./__commonjsHelpers__-legacy.js?v=1765440387","./index-legacy94.js?v=1765440387","./validator-legacy.js?v=1765440387"],function(n,e){"use strict";var o,u,a,c,l,f,s,p,y,d,v,b,m,h,g,j,_,w,S,x,O,k,A,T,G,q,P,C;return{setters:[function(t){o=t.l,u=t.L,a=t.K,c=t.k,l=t.o},function(t){f=t._},function(t){s=t.c,p=t.r,y=t.p,d=t.q,v=t.v,b=t.e,m=t.A,h=t.B,g=t.x,j=t.y,_=t.z,w=t.C,S=t.F,x=t.a$,O=t.D},function(t){k=t.g,A=t.c,T=t.i,G=t.G,q=t.H},function(t){P=t.u},function(t){C=t.q},null,null,null],execute:function(){var E={class:"p-[20px]"},F={class:"ml-20px mt-12px leading-8 text-[1.2rem] list-disc"},H={key:0},I={key:1};n("default",s({__name:"index",setup:function(n){var s=k(),N=s.refs,D=N.tabActive,J=N.isHaveServer,L=s.refreshTableList,M=p([]),$=[{content:"支持阿里云、腾讯云等云厂商的云数据库"},{content:"注意1:请确保本服务器有访问数据库的权限"},{content:"注意2:请确保填写的管理员帐号具备足够的权限"}],z=function(t){o({title:"".concat(t?"编辑":"添加","远程数据库"),area:[42],compData:{row:t,refreshEvent:function(){return K()}},showFooter:!0,component:function(){return u(function(){return e.import("./add-cloud-server-legacy.js?v=1765440387")},void 0,e.meta.url)}})},B=function(){var t=i(r().m(function t(n){return r().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,l({title:"删除【".concat(n.db_host,"】远程数据库"),content:"该操作仅删除管理关系以及面板中的数据库记录,不会删除远程数据库中的数据,是否继续?",icon:"warning-filled"});case 1:return t.n=2,a({loading:"正在删除中,请稍后...",request:"mysql"===D.value?G({id:n.id}):q({data:JSON.stringify({id:n.id})},D.value),message:!0});case 2:K(),L();case 3:return t.a(2)}},t)}));return function(n){return t.apply(this,arguments)}}(),K=function(){var t=i(r().m(function t(){var n;return r().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,a({loading:"正在获取数据中,请稍后...",request:"mysql"===D.value?A():T({data:JSON.stringify({type:D.value})},D.value),data:[Array,function(t){return t.filter(function(t){return 0!==t.id})}]});case 1:return n=t.v,M.value=n||[],J.value=n.length,t.a(2,n)}},t)}));return function(){return t.apply(this,arguments)}}(),U=[{prop:"db_host",label:"服务器地址",width:120},{prop:"db_port",label:"数据库端口"},{prop:"db_type",label:"数据库类型"},{prop:"db_user",label:"管理员名称"},{prop:"db_password",label:"管理员密码",width:150},{label:"备注",prop:"ps"},P([{onClick:function(t){return z(t)},title:"编辑"},{onClick:function(t){return B(t)},title:"删除"}])];return y(function(){K()}),function(n,r){var e,o,i=O,u=c,a=f;return d(),v("div",E,[b(a,null,{"header-left":m(function(){return[b(i,{type:"primary",onClick:r[0]||(r[0]=function(t){return z()})},{default:m(function(){return t(r[1]||(r[1]=[h("添加远程数据库",-1)]))}),_:1})]}),content:m(function(){return[b(u,{column:g(U),data:g(M),"max-height":300},null,8,["column","data"])]}),_:1}),j("ul",F,[null!==(e=g(C))&&void 0!==e&&e.length&&g(C)[0]?(d(),v("li",H,_(g(C)[0]),1)):w("",!0),(d(),v(S,null,x($,function(t,n){return j("li",{key:n},_(t.content),1)}),64)),null!==(o=g(C))&&void 0!==o&&o.length&&g(C)[1]?(d(),v("li",I,_(g(C)[1]),1)):w("",!0)])])}}}))}}})}();
Save File
Cancel