← Back
Editing: index-legacy20.js
!function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function r(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?e(Object(o),!0).forEach((function(e){n(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function n(e,r,n){return(r=function(e){var r=function(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,r||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==t(r)?r:r+""}(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function o(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */o=function(){return r};var e,r={},n=Object.prototype,i=n.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(e){f=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var o=e&&e.prototype instanceof b?e:b,i=Object.create(o.prototype),u=new V(n||[]);return a(i,"_invoke",{value:E(t,r,u)}),i}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}r.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",g={};function b(){}function x(){}function w(){}var _={};f(_,c,(function(){return this}));var k=Object.getPrototypeOf,j=k&&k(k(T([])));j&&j!==n&&i.call(j,c)&&(_=j);var L=w.prototype=b.prototype=Object.create(_);function O(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function S(e,r){function n(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==t(f)&&i.call(f,"__await")?r.resolve(f.__await).then((function(t){n("next",t,u,c)}),(function(t){n("throw",t,u,c)})):r.resolve(f).then((function(t){s.value=t,u(s)}),(function(t){return n("throw",t,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(t,e){function i(){return new r((function(r,o){n(t,e,r,o)}))}return o=o?o.then(i,i):i()}})}function E(t,r,n){var o=h;return function(i,a){if(o===v)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=P(u,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function P(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function V(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function T(r){if(r||""===r){var n=r[c];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function t(){for(;++o<r.length;)if(i.call(r,o))return t.value=r[o],t.done=!1,t;return t.value=e,t.done=!0,t};return a.next=a}}throw new TypeError(t(r)+" is not iterable")}return x.prototype=w,a(L,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:x,configurable:!0}),x.displayName=f(w,s,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===x||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,f(t,s,"GeneratorFunction")),t.prototype=Object.create(L),t},r.awrap=function(t){return{__await:t}},O(S.prototype),f(S.prototype,l,(function(){return this})),r.AsyncIterator=S,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new S(p(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(L),f(L,s,"Generator"),f(L,c,(function(){return this})),f(L,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=T,V.prototype={constructor:V,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),C(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},r}function i(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function a(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function u(t){i(a,n,o,u,c,"next",t)}function c(t){i(a,n,o,u,c,"throw",t)}u(void 0)}))}}System.register(["./utils-lib-legacy.js?v=VERSION_NUMBER","./index-legacy103.js?v=VERSION_NUMBER","./index-legacy112.js?v=VERSION_NUMBER","./base-lib-legacy.js?v=VERSION_NUMBER","./index-legacy130.js?v=VERSION_NUMBER","./useStore-legacy2.js?v=VERSION_NUMBER","./database-legacy.js?v=VERSION_NUMBER","./column-legacy.js?v=VERSION_NUMBER","./useMethod-legacy4.js?v=VERSION_NUMBER","./index-legacy131.js?v=VERSION_NUMBER","./index.vue_vue_type_script_setup_true_lang-legacy3.js?v=VERSION_NUMBER","./validator-legacy.js?v=VERSION_NUMBER","./__commonjsHelpers__-legacy.js?v=VERSION_NUMBER","./index-legacy104.js?v=VERSION_NUMBER","./index.vue_vue_type_style_index_0_scoped_b3c4124c_lang-legacy.js?v=VERSION_NUMBER"],(function(t,e){"use strict";var n,i,u,c,l,s,f,p,d,h,y,v,m,g,b,x,w,_,k,j,L,O,S,E,P,N,C,V,T,D,G,F,R,A,J,q,K,U,M,B,H,I,z,Y,Q,W,X,Z,$,tt,et,rt,nt,ot,it,at,ut,ct,lt,st;return{setters:[function(t){n=t.u,i=t.n,u=t.L,c=t.M,l=t.K,s=t.S,f=t.c,p=t.al,d=t.J,h=t.l,y=t.a0,v=t.p},function(t){m=t._},function(t){g=t._},function(t){b=t.c,x=t.r,w=t.g,_=t.k,k=t.e,j=t.w,L=t.p,O=t.G,S=t.q,E=t.v,P=t.x,N=t.M,C=t.A,V=t.C,T=t.y,D=t.B,G=t.P,F=t.F,R=t.a_,A=t.J,J=t.K,q=t.z,K=t.H,U=t.D,M=t.aj,B=t.ai,H=t.aA},function(t){I=t._},function(t){z=t.g},function(t){Y=t.getRedisKey,Q=t.getRedisKeyValue,W=t.delBatchRedisValue,X=t.delRedisValue,Z=t.getModulesCloudServer},function(t){$=t.a,tt=t.u,et=t.c},function(t){rt=t.o,nt=t.a,ot=t.m},function(t){it=t.B},function(t){at=t._},function(t){ut=t.e,ct=t.h,lt=t.i,st=t.o},null,null,null],execute:function(){var ft={class:"flex items-center"},pt={class:"flex items-center mx-4px inline-flex"},dt={class:"flex items-center"},ht={class:"mr-[1.6rem] text-[1.2rem]"},yt={class:"!float-right mb-8px !w-[24rem]"};t("default",b({__name:"index",setup:function(t){n();var b=z(),vt=b.refs,mt=vt.isRefreshTable,gt=vt.envStatus,bt=vt.isHaveServer,xt=vt.softData,wt=b.resetRefresh,_t=b.refreshTableList,kt=x("0"),jt=x(),Lt=x(!1),Ot=x(0),St=w((function(){return!gt.value.setup&&!bt.value})),Et=_({serverList:[],keyList:[],valueList:[]}),Pt=x(0),Nt=_({search:"",sid:0,limit:10,db_idx:0,p:1}),Ct=x({db_status:!0,msg:"加载中"}),Vt=w((function(){return Ct.value.db_status?"check":"close"})),Tt=function(){var t=a(o().mark((function t(e,r,n,i,u,c){var l,s,f;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return l=i.label,i.value,s=c.enable,f=c.exclude,t.next=4,e({title:"批量".concat(l,"键"),content:"即将批量".concat(l,"键,是否继续操作!"),column:[{label:"键名",prop:"name"},et()],onConfirm:function(){var t=a(o().mark((function t(){var e,r,i,a,c;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=n.value.map((function(t){return{key:t.name}})),r=ct(!1,f,s,{params:{database_list:JSON.stringify(e),sid:Nt.sid,db_idx:Number(kt.value)}}),t.next=4,W(r);case 4:i=t.sent,_t(),a=lt(i.data),c=a.data,st(c,{title:"删除键"}),null==u||u();case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()});case 4:case"end":return t.stop()}}),t)})));return function(e,r,n,o,i,a){return t.apply(this,arguments)}}(),Dt=function(){i({title:"数据库备份",area:78,compData:{sid:Nt.sid,keyList:Et.keyList},component:function(){return u((function(){return e.import("./index-legacy133.js?v=VERSION_NUMBER")}),void 0,e.meta.url)}})},Gt=function(){i({title:"清理数据库",area:42,compData:{sid:Nt.sid,keyList:Et.keyList},showFooter:!0,component:function(){return u((function(){return e.import("./index-legacy134.js?v=VERSION_NUMBER")}),void 0,e.meta.url)}})},Ft=function(){var t=a(o().mark((function t(e){var r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=c.load("正在切换服务器,请稍后..."),Nt.sid=Number(e),t.next=4,Bt();case 4:r.close();case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Rt=function(){var t=a(o().mark((function t(e){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,v({icon:"warning-filled",title:"提示",content:"此操作将删除选中的数据【".concat(e.name,"】, 是否继续?")});case 2:return t.next=4,l({request:X({data:JSON.stringify({sid:Nt.sid,db_idx:Number(kt.value),key:e.name})}),message:!0});case 4:_t();case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),At=function(t,e){Nt.db_idx=Number(t),Kt()},Jt=function(){var t=a(o().mark((function t(){var e;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l({request:Z({data:JSON.stringify({type:"redis"})},"redis"),data:Array});case 2:return e=t.sent,Et.serverList=e,Et.serverList.length&&(bt.value=!0),t.abrupt("return",e);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),qt=function(){var t=a(o().mark((function t(e){var r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l({request:Y({data:JSON.stringify({sid:e})}),data:Array});case 2:return r=t.sent,Et.keyList=r,t.abrupt("return",r);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Kt=function(){var t=a(o().mark((function t(){var e;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l({request:Q({data:JSON.stringify(r({},Nt))}),data:{data:Array,page:s(Pt)}});case 2:e=t.sent,Et.valueList=e.data||[];case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),Ut=[$({type:"page",key:"name"}),{label:"键",prop:"name"},{label:"值",prop:"val",width:320,render:function(t){return k("span",{class:"truncate !w-[30rem]",title:t.val},[t.val])}},{label:"数据类型",prop:"type"},{label:"数据长度",prop:"len"},{label:"有效期",prop:"showtime"},tt([{onClick:function(t){i({title:"编辑redis数据库",area:44,compData:{refresh:function(){return qt(Nt.sid)},row:r(r({},t),{},{db_idx:Number(kt.value)})},showFooter:!0,component:function(){return u((function(){return e.import("./index-legacy135.js?v=VERSION_NUMBER")}),void 0,e.meta.url)}})},title:"编辑"},{onClick:Rt,title:"删除"}])],Mt=[{label:"删除",value:"delete",event:Tt}],Bt=function(){var t=a(o().mark((function t(){var e;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,ot(Nt.sid);case 3:if(e=t.sent,Ct.value=e,Jt(),e.db_status){t.next=11;break}return Et.valueList=[],Et.keyList=[],bt.value=!1,t.abrupt("return",!1);case 11:qt(Nt.sid),Kt(),t.next=18;break;case 15:t.prev=15,t.t0=t.catch(0);case 18:case"end":return t.stop()}}),t,null,[[0,15]])})));return function(){return t.apply(this,arguments)}}();return j((function(){return mt.value}),function(){var t=a(o().mark((function t(e){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=5;break}return t.next=3,qt(Nt.sid);case 3:return t.next=5,Kt();case 5:wt();case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),L(Bt),function(t,e){var r=I,n=U,o=f,i=B,a=M,u=H,c=p,l=d,s=h,v=y,b=g,x=m,w=O("bt-loading");return S(),E("div",null,[P(St)?(S(),N(r,{key:0},{content:C((function(){return[k(at,{type:"Redis"})]})),_:1})):V("",!0),k(x,null,{"header-left":C((function(){return[T("div",ft,[k(n,{type:"primary",onClick:e[0]||(e[0]=function(t){return P(rt)((function(){return qt(P(Nt).sid)}),P(Nt).sid,P(kt))})},{default:C((function(){return e[7]||(e[7]=[D("添加Key")])})),_:1}),k(n,{onClick:P(nt)},{default:C((function(){return e[8]||(e[8]=[D("远程数据库")])})),_:1},8,["onClick"]),k(n,{onClick:Dt},{default:C((function(){return e[9]||(e[9]=[D("备份列表")])})),_:1}),k(n,{onClick:Gt},{default:C((function(){return e[10]||(e[10]=[D("清空数据库")])})),_:1}),k(it,{pluginName:"redis","plugin-info":P(xt),"is-request":!1,class:"ml-8px"},null,8,["plugin-info"]),k(o,{onClick:e[1]||(e[1]=function(t){return P(ut)({name:"数据库",type:12,id:17})}),class:"ml-[12px] <2xl:hidden"},{default:C((function(){return e[11]||(e[11]=[D(" 需求反馈 ")])})),_:1})])]})),"header-right":C((function(){return[T("div",pt,[e[12]||(e[12]=T("span",{class:"text-warning inline-block whitespace-nowrap flex items-center"},[T("i",{class:"svgtofont-el-info-filled mt-2px mr-4px"}),D("当前所有操作都关联至 ")],-1)),k(a,{modelValue:P(Ot),"onUpdate:modelValue":e[2]||(e[2]=function(t){return G(Ot)?Ot.value=t:null}),class:"!w-[16rem] mx-4px",onChange:Ft},{default:C((function(){return[(S(!0),E(F,null,R(P(Et).serverList,(function(t){return S(),N(i,{key:t.ps,label:t.ps,value:t.id},null,8,["label","value"])})),128))]})),_:1},8,["modelValue"])]),T("div",dt,[T("i",{class:A("text-[1.4rem] mt-4px mr-2px svgtofont-el-circle-".concat(P(Vt),"-filled text-").concat("close"===P(Vt)?"danger":"primary"))},null,2),T("div",ht,[e[13]||(e[13]=T("span",null,"状态:",-1)),T("span",{style:J("color:".concat(P(Ct).db_status?"#20a53a":"#ef0808"))},q(P(Ct).msg),5)])])]})),content:C((function(){return[k(c,{modelValue:P(kt),"onUpdate:modelValue":e[3]||(e[3]=function(t){return G(kt)?kt.value=t:null}),type:"card",onChange:At,class:"tab-switch"},{default:C((function(){return[(S(!0),E(F,null,R(P(Et).keyList,(function(t,e){return S(),N(u,{class:"h-0 !p-0",key:e,label:t.name+"【"+t.keynum+"】",name:String(t.id),lazy:!0},null,8,["label","name"])})),128))]})),_:1},8,["modelValue"]),T("div",yt,[k(l,{modelValue:P(Nt).search,"onUpdate:modelValue":e[4]||(e[4]=function(t){return P(Nt).search=t}),onSearch:Kt,placeholder:"请输入键名称"},null,8,["modelValue"])]),K(k(s,{ref_key:"redisTableRef",ref:jt,column:Ut,data:P(Et).valueList,total:P(Pt)},null,8,["data","total"]),[[w,P(Lt)]])]})),"footer-left":C((function(){return[k(v,{"table-ref":P(jt),options:Mt},null,8,["table-ref"])]})),"footer-right":C((function(){return[k(b,{page:P(Nt).p,"onUpdate:page":e[5]||(e[5]=function(t){return P(Nt).p=t}),row:P(Nt).limit,"onUpdate:row":e[6]||(e[6]=function(t){return P(Nt).limit=t}),total:P(Pt),onChange:Kt},null,8,["page","row","total"])]})),_:1})])}}}))}}}))}();
Save File
Cancel