← Back
Editing: index-legacy309.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(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e=function(){return n};var r,n={},o=Object.prototype,a=o.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},l=u.iterator||"@@iterator",c=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(r){f=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var o=e&&e.prototype instanceof w?e:w,a=Object.create(o.prototype),u=new C(n||[]);return i(a,"_invoke",{value:F(t,r,u)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}n.wrap=p;var d="suspendedStart",y="suspendedYield",v="executing",m="completed",g={};function w(){}function b(){}function x(){}var j={};f(j,l,(function(){return this}));var _=Object.getPrototypeOf,L=_&&_(_(I([])));L&&L!==o&&a.call(L,l)&&(j=L);var O=x.prototype=w.prototype=Object.create(j);function P(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function E(e,r){function n(o,i,u,l){var c=h(e[o],e,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==t(f)&&a.call(f,"__await")?r.resolve(f.__await).then((function(t){n("next",t,u,l)}),(function(t){n("throw",t,u,l)})):r.resolve(f).then((function(t){s.value=t,u(s)}),(function(t){return n("throw",t,u,l)}))}l(c.arg)}var o;i(this,"_invoke",{value:function(t,e){function a(){return new r((function(r,o){n(t,e,r,o)}))}return o=o?o.then(a,a):a()}})}function F(t,e,n){var o=d;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:r,done:!0}}for(n.method=a,n.arg=i;;){var u=n.delegate;if(u){var l=k(u,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var c=h(t,e,n);if("normal"===c.type){if(o=n.done?m:y,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=m,n.method="throw",n.arg=c.arg)}}}function k(t,e){var n=e.method,o=t.iterator[n];if(o===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=r,k(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,t.iterator,e.arg);if("throw"===a.type)return e.method="throw",e.arg=a.arg,e.delegate=null,g;var i=a.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,g):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function S(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 T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function I(e){if(e||""===e){var n=e[l];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function t(){for(;++o<e.length;)if(a.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=r,t.done=!0,t};return i.next=i}}throw new TypeError(t(e)+" is not iterable")}return b.prototype=x,i(O,"constructor",{value:x,configurable:!0}),i(x,"constructor",{value:b,configurable:!0}),b.displayName=f(x,s,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},n.awrap=function(t){return{__await:t}},P(E.prototype),f(E.prototype,c,(function(){return this})),n.AsyncIterator=E,n.async=function(t,e,r,o,a){void 0===a&&(a=Promise);var i=new E(p(t,e,r,o),a);return n.isGeneratorFunction(e)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},P(O),f(O,s,"Generator"),f(O,l,(function(){return this})),f(O,"toString",(function(){return"[object Generator]"})),n.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}},n.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&a.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},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 e=this;function n(n,o){return u.type="throw",u.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=a.call(i,"catchLoc"),c=a.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.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&&a.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 i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},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),T(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;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:I(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),g}},n}function r(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 n(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function o(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 a(t,e,r,n,o,a,i){try{var u=t[a](i),l=u.value}catch(t){return void r(t)}u.done?e(l):Promise.resolve(l).then(n,o)}System.register(["./base-lib-legacy.js?v=VERSION_NUMBER","./utils-lib-legacy.js?v=VERSION_NUMBER","./index-legacy101.js?v=VERSION_NUMBER","./useStore-legacy8.js?v=VERSION_NUMBER","./validator-legacy.js?v=VERSION_NUMBER","./__commonjsHelpers__-legacy.js?v=VERSION_NUMBER","./column-legacy.js?v=VERSION_NUMBER","./index-legacy104.js?v=VERSION_NUMBER"],(function(t,r){"use strict";var o,i,u,l,c,s,f,p,h,d,y,v,m,g,w,b,x,j,_,L,O,P,E,F,k,S,T,C,I,N,A,G,D,R,V;return{setters:[function(t){o=t.s,i=t.j,u=t.r,l=t.k,c=t.U,s=t.e,f=t.c,p=t.G,h=t.q,d=t.v,y=t.A,v=t.y,m=t.J,g=t.x,w=t.H,b=t.I,x=t.aW,j=t.a9,_=t.D,L=t.a7},function(t){O=t.x,P=t.A,E=t.p,F=t.K,k=t.M,S=t.$,T=t.l,C=t._,I=t.e},function(t){N=t._},function(t){A=t.u,G=t.L},function(t){D=t.h,R=t.i,V=t.o},null,null,null],execute:function(){var r=i("FTP-BATCH-EDIT-PAW",(function(){return{updateFtpInfoRef:u(),ftpForm:l({type:"0",password:O(12)}),typeOptions:u([{label:"所有密码一致",value:"0"},{label:"所有密码不一致",value:"1"}])}})),q=function(){return o(r())},B=A(),W=B.rowData,H=B.isRefreshFtpList,U=q(),J=U.ftpForm,Y=U.updateFtpInfoRef,K=l({password:[{validator:function(t,e,r){e.length>=6||"0"!==J.value.type?r():r(new Error("FTP密码长度不能少于6位!"))},trigger:["blur"]}]}),M=function(){J.value.password=O(12)},$=function(){P({value:J.value.password})},z=function(){var t;W.value.selectedList.length>0&&P({value:null===(t=W.value.selectedList.map((function(t){return"".concat(t.name,"--").concat(t.password)})))||void 0===t?void 0:t.join("\n")})},Q=function(){W.value.selectedList.forEach((function(t){t.password=O(12)}));var t=document.querySelector(".refreshAllBtn");null==t||t.blur()},X=function(){var t,r=(t=e().mark((function t(r){var o,a,i,u,l,c,s;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Y.value.validate();case 3:return t.next=5,E({title:"提示",width:"35rem",content:"修改FTP密码后,旧密码将无法登录FTP账号,是否继续操作?"});case 5:return o=W.value.config,a=o.enable,i=o.exclude,u=D(!1,i,a,{params:(e=void 0,e=W.value.selectedList.map((function(t){return{id:t.id,ftp_username:t.name,new_password:"0"==J.value.type?J.value.password:t.password}})),{ftp_list:JSON.stringify(e)})}),t.next=10,F({loading:"正在修改FTP密码,请稍候...",request:G(u),data:Array});case 10:l=t.sent,c=R(l),s=(s=c.data).map((function(t){return n(n({},t),{},{name:t.ftp_username})})),V(s,{title:"修改FTP密码"}),W.value.clearSelection(),H.value=!0,r&&r(),t.next=22;break;case 19:t.prev=19,t.t0=t.catch(0);case 22:case"end":return t.stop()}var e}),t,null,[[0,19]])})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function u(t){a(i,n,o,u,l,"next",t)}function l(t){a(i,n,o,u,l,"throw",t)}u(void 0)}))});return function(t){return r.apply(this,arguments)}}(),Z=c([{label:"用户名",prop:"name",fixed:!0,minWidth:100},{label:"密码",fixed:!0,minWidth:200,isCustom:!0,render:function(t){var e={lt:"<",gt:">",nbsp:" ",amp:"&",quot:'"'};return t.password=t.password.replace(/&(lt|gt|nbsp|amp|quot);/gi,(function(t,r){return e[r]})),s("input",{type:"text",value:t.password,class:"bt-table-input !w-[18rem]",placeholder:"点击编辑密码",title:"点击编辑密码",onBlur:function(e){if(e.target.value.length<6&&(k.error("FTP密码长度不能少于6位!"),e.target.value=t.password),t.password===e.target.value)return!1;t.password=e.target.value}},null)}}]),tt={class:"mt-[1.6rem] flex"},et=f({__name:"index",setup:function(t,e){var r=e.expose,n=A().rowData,o=q(),a=o.ftpForm,i=o.typeOptions,u=o.updateFtpInfoRef;return r({onConfirm:X}),function(t,e){var r=x,o=S,l=j,c=T,f=_,O=N,P=C,E=L,F=p("bt-loading");return h(),d("div",{class:m("1"==g(a).type?"pt-2rem pr-2rem":"p-2rem")},[s(r,{class:m(["!w-full","1"==g(a).type?"warn":""]),icon:"svgtofont-el-warning",type:"warning",closable:!1},{title:y((function(){return e[2]||(e[2]=[v("span",null,"批量改密已选FTP用户,默认自动化改密,支持自定义",-1)])})),_:1},8,["class"]),s(E,{ref_key:"updateFtpInfoRef",ref:u,rules:g(K),model:g(a),class:"bt-custom-form"},{default:y((function(){return[s(l,{label:"类型",class:"typeClass"},{default:y((function(){return[s(o,{type:"button",class:"!flex",modelValue:g(a).type,"onUpdate:modelValue":e[0]||(e[0]=function(t){return g(a).type=t}),options:g(i)},null,8,["modelValue","options"])]})),_:1}),w(s(l,{label:" ",class:"typeClass"},{default:y((function(){return[w(s(c,{"max-height":200,ref:"showFtpTableRef",column:g(Z),data:g(n).selectedList,description:"FTP列表为空"},null,8,["column","data"]),[[F,"正在加载FTP列表,请稍后...","title"]]),v("div",tt,[s(f,{type:"default",onClick:g(z),class:"inline-block flex items-center"},{default:y((function(){return e[3]||(e[3]=[v("i",{class:"svgtofont-icon-copy"},null,-1),v("span",{class:"mb-[2px] ml-[4px]"},"复制所有",-1)])})),_:1},8,["onClick"]),s(f,{type:"default",onClick:g(Q),class:"refreshAllBtn"},{default:y((function(){return e[4]||(e[4]=[v("i",{class:"svgtofont-el-refresh"},null,-1),v("span",{class:"mb-[2px] ml-[4px]"},"刷新所有",-1)])})),_:1},8,["onClick"])])]})),_:1},512),[[b,"1"===g(a).type]]),w(s(l,{label:"密码",class:"relative mt-[16px] typeClass",prop:"password"},{default:y((function(){return[s(O,{modelValue:g(a).password,"onUpdate:modelValue":e[1]||(e[1]=function(t){return g(a).password=t}),style:{width:"26rem"},name:"password",icon:"el-refresh",onIconClick:g(M)},null,8,["modelValue","onIconClick"]),s(P,{icon:"icon-copy",class:"w-1.8rem h-1.8rem cursor-pointer absolute top-0 right-16",onClick:g($)},null,8,["onClick"])]})),_:1},512),[[b,"0"==g(a).type]])]})),_:1},8,["rules","model"])],2)}}});t("default",I(et,[["__scopeId","data-v-78d50617"]]))}}}))}();
Save File
Cancel