← Back
Editing: store-legacy2.js
!function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function r(e){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?t(Object(o),!0).forEach((function(t){n(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function n(t,r,n){return(r=function(t){var r=function(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,r||"default");if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==e(r)?r:r+""}(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}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 t,r={},n=Object.prototype,a=n.hasOwnProperty,u=Object.defineProperty||function(e,t,r){e[t]=r.value},l="function"==typeof Symbol?Symbol:{},i=l.iterator||"@@iterator",c=l.asyncIterator||"@@asyncIterator",s=l.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(t){f=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),l=new N(n||[]);return u(a,"_invoke",{value:S(e,r,l)}),a}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}r.wrap=d;var m="suspendedStart",h="suspendedYield",y="executing",v="completed",b={};function g(){}function w(){}function _(){}var x={};f(x,i,(function(){return this}));var V=Object.getPrototypeOf,k=V&&V(V(F([])));k&&k!==n&&a.call(k,i)&&(x=k);var j=_.prototype=g.prototype=Object.create(x);function O(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function L(t,r){function n(o,u,l,i){var c=p(t[o],t,u);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==e(f)&&a.call(f,"__await")?r.resolve(f.__await).then((function(e){n("next",e,l,i)}),(function(e){n("throw",e,l,i)})):r.resolve(f).then((function(e){s.value=e,l(s)}),(function(e){return n("throw",e,l,i)}))}i(c.arg)}var o;u(this,"_invoke",{value:function(e,t){function a(){return new r((function(r,o){n(e,t,r,o)}))}return o=o?o.then(a,a):a()}})}function S(e,r,n){var o=m;return function(a,u){if(o===y)throw Error("Generator is already running");if(o===v){if("throw"===a)throw u;return{value:t,done:!0}}for(n.method=a,n.arg=u;;){var l=n.delegate;if(l){var i=E(l,n);if(i){if(i===b)continue;return i}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===m)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var c=p(e,r,n);if("normal"===c.type){if(o=n.done?v:h,c.arg===b)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=v,n.method="throw",n.arg=c.arg)}}}function E(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var a=p(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,b;var u=a.arg;return u?u.done?(r[e.resultName]=u.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):u:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function U(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function F(r){if(r||""===r){var n=r[i];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,u=function e(){for(;++o<r.length;)if(a.call(r,o))return e.value=r[o],e.done=!1,e;return e.value=t,e.done=!0,e};return u.next=u}}throw new TypeError(e(r)+" is not iterable")}return w.prototype=_,u(j,"constructor",{value:_,configurable:!0}),u(_,"constructor",{value:w,configurable:!0}),w.displayName=f(_,s,"GeneratorFunction"),r.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,f(e,s,"GeneratorFunction")),e.prototype=Object.create(j),e},r.awrap=function(e){return{__await:e}},O(L.prototype),f(L.prototype,c,(function(){return this})),r.AsyncIterator=L,r.async=function(e,t,n,o,a){void 0===a&&(a=Promise);var u=new L(d(e,t,n,o),a);return r.isGeneratorFunction(t)?u:u.next().then((function(e){return e.done?e.value:u.next()}))},O(j),f(j,s,"Generator"),f(j,i,(function(){return this})),f(j,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},r.values=F,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(U),!e)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return l.type="throw",l.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var u=this.tryEntries[o],l=u.completion;if("root"===u.tryLoc)return n("end");if(u.tryLoc<=this.prev){var i=a.call(u,"catchLoc"),c=a.call(u,"finallyLoc");if(i&&c){if(this.prev<u.catchLoc)return n(u.catchLoc,!0);if(this.prev<u.finallyLoc)return n(u.finallyLoc)}else if(i){if(this.prev<u.catchLoc)return n(u.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return n(u.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var u=o?o.completion:{};return u.type=e,u.arg=t,o?(this.method="next",this.next=o.finallyLoc,b):this.complete(u)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),b},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),U(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;U(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:F(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},r}function a(e,t,r,n,o,a,u){try{var l=e[a](u),i=l.value}catch(e){return void r(e)}l.done?t(i):Promise.resolve(i).then(n,o)}function u(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var u=e.apply(t,r);function l(e){a(u,n,o,l,i,"next",e)}function i(e){a(u,n,o,l,i,"throw",e)}l(void 0)}))}}System.register(["./utils-lib-legacy.js?v=VERSION_NUMBER","./base-lib-legacy.js?v=VERSION_NUMBER","./index-legacy101.js?v=VERSION_NUMBER","./files-legacy.js?v=VERSION_NUMBER","./__commonjsHelpers__-legacy.js?v=VERSION_NUMBER"],(function(e,t){"use strict";var n,a,l,i,c,s,f,d,p,m,h,y,v,b,g,w,_,x,V,k,j,O,L,S,E,P,U,N,F,C,R,D,q,T,G,I,A;return{setters:[function(e){n=e.bU,a=e.k,l=e.W,i=e.j,c=e.e,s=e.n,f=e.K,d=e.L},function(e){p=e.c,m=e.s,h=e.q,y=e.v,v=e.e,b=e.A,g=e.x,w=e.M,_=e.C,x=e.a9,V=e.a7,k=e.y,j=e.B,O=e.z,L=e.P,S=e.ai,E=e.aj,P=e.b9,U=e.b8,N=e.T,F=e.D,C=e.j,R=e.r,D=e.ay,q=e.k},function(e){T=e._},function(e){G=e.ak,I=e.al,A=e.am},null],execute:function(){var Y={class:"p-20px"},z=p({__name:"receive",setup:function(e){var t=Q(),r=m(t),o=r.formDisabled,u=r.rules,i=r.isSuccess,c=r.receiveForm,s=r.receiveFormRef;return function(e,t){var r=a,f=x,d=T,p=V,m=l;return h(),y("div",Y,[v(p,{ref_key:"receiveFormRef",ref:s,disabled:g(o),rules:g(u),model:g(c)},{default:b((function(){return[v(f,{label:"用户名",prop:"mName"},{default:b((function(){return[v(r,{class:"!w-[24rem]",modelValue:g(c).mName,"onUpdate:modelValue":t[0]||(t[0]=function(e){return g(c).mName=e}),disabled:g(i),placeholder:"请填写用户名,不能有中文或特殊符号"},null,8,["modelValue","disabled"])]})),_:1}),v(f,{label:"密码",prop:"password"},{default:b((function(){return[g(i)?(h(),w(r,{key:1,class:"!w-[24rem]",modelValue:g(c).password,"onUpdate:modelValue":t[3]||(t[3]=function(e){return g(c).password=e}),disabled:""},null,8,["modelValue"])):(h(),w(d,{key:0,class:"!w-[24rem]",icon:"el-refresh",modelValue:g(c).password,"onUpdate:modelValue":t[1]||(t[1]=function(e){return g(c).password=e}),isActive:!0,onIconClick:t[2]||(t[2]=function(){return g(c).password=g(n)(16)})},null,8,["modelValue"]))]})),_:1}),g(i)?_("",!0):(h(),w(f,{key:0,label:"同步到",prop:"path"},{default:b((function(){return[v(r,{class:"!w-[24rem]",modelValue:g(c).path,"onUpdate:modelValue":t[4]||(t[4]=function(e){return g(c).path=e}),disabled:""},null,8,["modelValue"])]})),_:1}))]})),_:1},8,["disabled","rules","model"]),g(i)?(h(),w(m,{key:0,class:"pl-2rem",options:[{content:"使用上面的用户信息,前往发送数据的服务器创建发送端"}]})):_("",!0)])}}}),B={class:"p-20px"},J={class:"flex items-center time-unit"},K={key:1,class:"mt-20px"},W={class:"pt-2rem flex flex-col"},$={class:"text-danger p-2rem text-[1.4rem] leading-10 ml-36px"},H={class:"flex items-center mt-12px ml-4px px-2rem"},M={class:"bg-[#f6f8f8] footer-btn flex items-center justify-end mt-2rem p-12px w-full"},Z=c(p({__name:"send",setup:function(e){var t=Q(),r=m(t),n=r.formDisabled,o=r.sendFormRef,u=r.rulesSend,c=r.sendForm,s=r.alertRsync,f=r.checkOffRsync,d=t.helpList,p=t.handleChangeDelete,C=t.handleConfirm;return function(e,t){var r=a,m=x,R=S,D=E,q=P,T=U,G=V,I=l,A=N,Y=F,z=i;return h(),y("div",B,[v(G,{ref_key:"sendFormRef",ref:o,disabled:g(n),rules:g(u),model:g(c)},{default:b((function(){return[v(m,{label:"服务器IP",prop:"ip"},{default:b((function(){return[v(r,{modelValue:g(c).ip,"onUpdate:modelValue":t[0]||(t[0]=function(e){return g(c).ip=e}),placeholder:"请输入接收服务器IP",width:"34.8rem"},null,8,["modelValue"])]})),_:1}),v(m,{label:"同步目录",prop:"path"},{default:b((function(){return[v(r,{modelValue:g(c).path,"onUpdate:modelValue":t[1]||(t[1]=function(e){return g(c).path=e}),disabled:"",width:"34.8rem"},null,8,["modelValue"])]})),_:1}),v(m,{label:"同步方式",class:"form-row"},{default:b((function(){return[v(q,null,{default:b((function(){return[v(D,{modelValue:g(c).delete,"onUpdate:modelValue":t[2]||(t[2]=function(e){return g(c).delete=e}),class:"!w-[12rem]",onChange:g(p)},{default:b((function(){return[v(R,{label:"增量",value:!1}),v(R,{label:"完全",value:!0})]})),_:1},8,["modelValue","onChange"]),v(m,{label:"同步周期"},{default:b((function(){return[v(D,{modelValue:g(c).realtime,"onUpdate:modelValue":t[3]||(t[3]=function(e){return g(c).realtime=e}),class:"!w-[12rem]"},{default:b((function(){return[v(R,{label:"实时同步",value:!0}),v(R,{label:"定时同步",value:!1})]})),_:1},8,["modelValue"])]})),_:1})]})),_:1})]})),_:1}),g(c).realtime?_("",!0):(h(),w(m,{key:0,label:"定时周期",prop:"cron"},{default:b((function(){return[v(q,null,{default:b((function(){return[v(D,{modelValue:g(c).cron.type,"onUpdate:modelValue":t[4]||(t[4]=function(e){return g(c).cron.type=e}),class:"!w-[10rem] mr-8px"},{default:b((function(){return[v(R,{label:"每天",value:"day"}),v(R,{label:"N分钟",value:"minute-n"})]})),_:1},8,["modelValue"]),k("div",J,["minute-n"!==g(c).cron.type?(h(),w(r,{key:0,modelValue:g(c).cron.hour,"onUpdate:modelValue":t[5]||(t[5]=function(e){return g(c).cron.hour=e}),type:"number",class:"!w-[11.6rem] mr-8px"},{append:b((function(){return t[21]||(t[21]=[j(" 小时 ")])})),_:1},8,["modelValue"])):_("",!0),v(r,{modelValue:g(c).cron.minute,"onUpdate:modelValue":t[6]||(t[6]=function(e){return g(c).cron.minute=e}),type:"number",class:"w-[12rem]"},{append:b((function(){return t[22]||(t[22]=[j(" 分钟 ")])})),_:1},8,["modelValue"])])]})),_:1})]})),_:1})),v(m,{label:"限速",class:"form-row"},{default:b((function(){return[v(q,null,{default:b((function(){return[v(T,{span:8},{default:b((function(){return[v(r,{modelValue:g(c).bwlimit,"onUpdate:modelValue":t[7]||(t[7]=function(e){return g(c).bwlimit=e}),type:"number",class:"!w-[12rem]"},{append:b((function(){return t[23]||(t[23]=[j("KB")])})),_:1},8,["modelValue"])]})),_:1}),v(T,{span:14},{default:b((function(){return[v(m,{label:"延迟"},{default:b((function(){return[v(r,{modelValue:g(c).delay,"onUpdate:modelValue":t[8]||(t[8]=function(e){return g(c).delay=e}),type:"number",class:"!w-[12rem]"},{append:b((function(){return t[24]||(t[24]=[j("秒")])})),_:1},8,["modelValue"])]})),_:1})]})),_:1})]})),_:1})]})),_:1}),v(m,{label:"链接方式",class:"form-row"},{default:b((function(){return[v(q,null,{default:b((function(){return[v(D,{modelValue:g(c).rsync,"onUpdate:modelValue":t[9]||(t[9]=function(e){return g(c).rsync=e}),class:"!w-[12rem]"},{default:b((function(){return[v(R,{label:"密钥",value:"key"}),v(R,{label:"账号",value:"user"})]})),_:1},8,["modelValue"]),v(m,{label:"压缩传输"},{default:b((function(){return[v(D,{modelValue:g(c).compress,"onUpdate:modelValue":t[10]||(t[10]=function(e){return g(c).compress=e}),class:"!w-[12rem]"},{default:b((function(){return[v(R,{label:"开启",value:!0}),v(R,{label:"关闭",value:!1})]})),_:1},8,["modelValue"])]})),_:1})]})),_:1})]})),_:1}),"user"===g(c).rsync?(h(),y("div",K,[v(m,{label:"用户名",prop:"sname"},{default:b((function(){return[v(r,{modelValue:g(c).sname,"onUpdate:modelValue":t[11]||(t[11]=function(e){return g(c).sname=e}),width:"34.8rem",placeholder:"请输入用户名"},null,8,["modelValue"])]})),_:1}),v(m,{label:"密码",prop:"password"},{default:b((function(){return[v(r,{modelValue:g(c).password,"onUpdate:modelValue":t[12]||(t[12]=function(e){return g(c).password=e}),width:"34.8rem",placeholder:"请输入密码"},null,8,["modelValue"])]})),_:1}),v(m,{label:"端口",prop:"port"},{default:b((function(){return[v(r,{modelValue:g(c).port,"onUpdate:modelValue":t[13]||(t[13]=function(e){return g(c).port=e}),width:"34.8rem",type:"number"},null,8,["modelValue"])]})),_:1})])):_("",!0),"key"===g(c).rsync?(h(),w(m,{key:2,label:"密钥",prop:"secret_key"},{default:b((function(){return[v(r,{modelValue:g(c).secret_key,"onUpdate:modelValue":t[14]||(t[14]=function(e){return g(c).secret_key=e}),width:"34.8rem",type:"textarea",placeholder:"请输入密钥"},null,8,["modelValue"])]})),_:1})):_("",!0)]})),_:1},8,["disabled","rules","model"]),v(I,{class:"pl-2rem",options:g(d),"list-style":"disc"},null,8,["options"]),v(z,{title:"数据安全风险警告",area:[40,"auto"],modelValue:g(s),"onUpdate:modelValue":t[18]||(t[18]=function(e){return L(s)?s.value=e:null}),onClose:t[19]||(t[19]=function(e){return g(C)(!1)}),onCancel:t[20]||(t[20]=function(e){return g(C)(!1)})},{default:b((function(){return[k("div",W,[t[28]||(t[28]=k("div",{class:"flex items-center px-2rem"},[k("i",{class:"el-icon-warning text-[#e6a23c] text-[3rem] pr-4"}),k("span",{class:"text-[1.4rem] leading-10 text-danger"},"警告:您选择了完全同步,将会使本机同步与目标机器指定目录的文件保持一致, 请确认目录设置是否有误,一但设置错误,可能导致目标机器的目录文件被删除!")],-1)),k("span",$,"注意: 同步程序将本机目录:【"+O(g(c).path)+"】的所有数据同步到目标服务器,若目标服务器的同步目录存在其它文件将被删除!",1),k("div",H,[v(A,{modelValue:g(f),"onUpdate:modelValue":t[15]||(t[15]=function(e){return L(f)?f.value=e:null}),class:"!mr-4px"},null,8,["modelValue"]),t[25]||(t[25]=j(" 我已了解风险,确认关闭 "))]),k("div",M,[v(Y,{type:"warning",onClick:t[16]||(t[16]=function(e){return g(C)(!1)})},{default:b((function(){return t[26]||(t[26]=[j("取消")])})),_:1}),v(Y,{type:"danger",onClick:t[17]||(t[17]=function(e){return g(C)(!0)}),disabled:!g(f)},{default:b((function(){return t[27]||(t[27]=[j("确认选择")])})),_:1},8,["disabled"])])])]})),_:1},8,["modelValue"])])}}}),[["__scopeId","data-v-dfabae5a"]]),Q=e("default",C("FILES-RSYNC-STORE",(function(){var e=R(),n=function(t,r,n){i.path=e.value.row.path,y.path=e.value.row.path,r&&(l.value=!1,p.value=!1,Object.assign(i,{mName:"",password:"",path:e.value.row.path,comment:""}),b.value=!1,g.value=!1,Object.assign(y,{ip:"",rsync:"user",sname:"",password:"",path:e.value.row.path,port:873,secret_key:"",delete:!1,realtime:!0,bwlimit:1024,delay:3,compress:!0,cron:{type:"day",where1:"",hour:0,minute:1,id:"",port:""}})),s("receive"===t?{title:"创建接收端",area:42,btn:["确认","取消"],showFooter:!p.value,component:z,onConfirm:h}:{title:"创建发送端",area:58,btn:["确认","取消"],component:Z,onConfirm:x}),n&&n()},a=function(){var r=u(o().mark((function r(){var n,a,u,l;return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if("site"!==(null===(n=e.value.row)||void 0===n?void 0:n.type)){r.next=4;break}e.value.row.refreshEvent(),r.next=10;break;case 4:return r.next=6,d((function(){return t.import("./store-legacy.js?v=VERSION_NUMBER").then((function(e){return e.aW}))}),void 0,t.meta.url);case 6:a=r.sent,u=a.default,l=u(),(0,l.refreshFilesList)();case 10:case"end":return r.stop()}}),r)})));return function(){return r.apply(this,arguments)}}();D("popupSetFooter",(function(e){}));var l=R(!1),i=q({mName:"",password:"",path:"",comment:""}),c=R(),p=R(!1),m=q({mName:[{required:!0,message:"请输入用户名",trigger:"blur"},{min:3,max:20,message:"长度在 3 到 20 个字符",trigger:"blur"},{validator:function(e,t,r){/^[a-zA-Z0-9_]{3,20}$/.test(t)?r():r(new Error("用户名不能有中文或特殊符号"))},trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"},{min:6,max:20,message:"长度在 6 到 20 个字符",trigger:"blur"}]}),h=function(){var t=u(o().mark((function t(s){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.value.validate();case 2:return t.next=4,f({loading:l,request:G(r(r({},i),{},{comment:i.mName})),message:!0,success:function(){var t=u(o().mark((function t(r){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(p.value=r.status,!r.status){t.next=7;break}return t.next=4,I({path:e.value.row.path,s_type:"recv"});case 4:s.unmount(),a(),n("receive");case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()});case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),y=q({ip:"",rsync:"user",sname:"",password:"",path:"",port:873,secret_key:"",delete:!1,realtime:!0,bwlimit:1024,delay:3,compress:!0,cron:{type:"day",where1:"",hour:0,minute:1,id:"",port:""}}),v=R(),b=R(!1),g=R(!1),w=q({ip:[{required:!0,message:"请输入ip",trigger:"blur"},{validator:function(e,t,r){/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.test(t)?r():r(new Error("请输入正确的ip"))}}],sname:[{required:!0,message:"请输入用户名",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}],secret_key:[{required:!0,message:"请输入密钥",trigger:"blur"}]}),_=function(){var e=u(o().mark((function e(t){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t?(b.value=!0,y.delete=!t):b.value=!1;case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),x=function(){var t=u(o().mark((function t(n){var i,c;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=r(r({},y),{},{cron:JSON.stringify(r(r({},y.cron),{},{port:String(y.port),hour:String(y.cron.hour),minute:String(y.cron.minute)}))}),"minute-n"===y.cron.type&&(i.cron=JSON.stringify(r(r({},y.cron),{},{hour:String(y.cron.hour),where1:String(y.cron.minute),minute:"",port:String(y.port)}))),"key"===y.rsync?(i.sname="",i.password=""):i.secret_key="",delete i.rsync,t.next=6,v.value.validate();case 6:return t.next=8,f({loading:l,request:A(i),message:!0,success:function(){var t=u(o().mark((function t(r){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!r.status){t.next=4;break}return t.next=3,f({request:I({path:e.value.row.path,s_type:"send"})});case 3:a();case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()});case 8:return c=t.sent,t.abrupt("return",c.status);case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return{compData:e,handleClick:n,formDisabled:l,rules:m,isSuccess:p,receiveForm:i,receiveFormRef:c,sendFormRef:v,rulesSend:w,sendForm:y,alertRsync:b,checkOffRsync:g,helpList:[{content:"【同步目录】:若不以/结尾,则表示将数据同步到二级目录,一般情况下目录路径请以/结尾"},{content:"【同步方式】增量: 数据更改/增加时同步,且只追加和替换文件"},{content:"【同步方式】完全: 保持两端的数据与目录结构的一致性,会同步删除、追加和替换文件和目录"},{content:"【限速】:限制数据同步任务的速度,防止因同步数据导致带宽跑高"},{content:"【延迟】:在延迟时间周期内仅记录不同步,到达周期后一次性同步数据,以节省开销"},{content:"【压缩传输】:开启后可减少带宽开销,但会增加CPU开销,如带宽充足,建议关闭此选项"}],handleChangeDelete:_,handleConfirm:function(e){y.delete=e,b.value=!1,g.value=!1}}})))}}}))}();
Save File
Cancel