8 lines
14 KiB
JavaScript
8 lines
14 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2187724d"],{"00d8":function(e,r){(function(){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t={rotl:function(e,r){return e<<r|e>>>32-r},rotr:function(e,r){return e<<32-r|e>>>r},endian:function(e){if(e.constructor==Number)return 16711935&t.rotl(e,8)|4278255360&t.rotl(e,24);for(var r=0;r<e.length;r++)e[r]=t.endian(e[r]);return e},randomBytes:function(e){for(var r=[];e>0;e--)r.push(Math.floor(256*Math.random()));return r},bytesToWords:function(e){for(var r=[],t=0,n=0;t<e.length;t++,n+=8)r[n>>>5]|=e[t]<<24-n%32;return r},wordsToBytes:function(e){for(var r=[],t=0;t<32*e.length;t+=8)r.push(e[t>>>5]>>>24-t%32&255);return r},bytesToHex:function(e){for(var r=[],t=0;t<e.length;t++)r.push((e[t]>>>4).toString(16)),r.push((15&e[t]).toString(16));return r.join("")},hexToBytes:function(e){for(var r=[],t=0;t<e.length;t+=2)r.push(parseInt(e.substr(t,2),16));return r},bytesToBase64:function(e){for(var t=[],n=0;n<e.length;n+=3)for(var o=e[n]<<16|e[n+1]<<8|e[n+2],a=0;a<4;a++)8*n+6*a<=8*e.length?t.push(r.charAt(o>>>6*(3-a)&63)):t.push("=");return t.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],n=0,o=0;n<e.length;o=++n%4)0!=o&&t.push((r.indexOf(e.charAt(n-1))&Math.pow(2,-2*o+8)-1)<<2*o|r.indexOf(e.charAt(n))>>>6-2*o);return t}};e.exports=t})()},"044b":function(e,r){function t(e){return!!e.constructor&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function n(e){return"function"===typeof e.readFloatLE&&"function"===typeof e.slice&&t(e.slice(0,0))}
|
|
/*!
|
|
* Determine if an object is a Buffer
|
|
*
|
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
* @license MIT
|
|
*/
|
|
e.exports=function(e){return null!=e&&(t(e)||n(e)||!!e._isBuffer)}},"0fea":function(e,r,t){"use strict";t.d(r,"d",(function(){return a})),t.d(r,"b",(function(){return u})),t.d(r,"k",(function(){return s})),t.d(r,"h",(function(){return i})),t.d(r,"n",(function(){return c})),t.d(r,"m",(function(){return l})),t.d(r,"j",(function(){return f})),t.d(r,"i",(function(){return d})),t.d(r,"g",(function(){return p})),t.d(r,"f",(function(){return m})),t.d(r,"r",(function(){return g})),t.d(r,"a",(function(){return h})),t.d(r,"q",(function(){return b})),t.d(r,"p",(function(){return y})),t.d(r,"e",(function(){return v})),t.d(r,"c",(function(){return j})),t.d(r,"s",(function(){return w})),t.d(r,"t",(function(){return T})),t.d(r,"l",(function(){return O})),t.d(r,"o",(function(){return L}));var n=t("b775"),o={user:"/user",role:"/role",service:"/service",permission:"/permission",permissionNoPager:"/permission/no-pager",orgTree:"/org/tree",groupConfigForPage:"/group/list",saveGroup:"/group",groupConfigByGroupName:"/group",allGroupNameList:"/group/all/group-name/list",retryTaskPage:"/retry-task/list",retryTaskById:"/retry-task/",retryTaskLogPage:"/retry-task-log/list",retryTaskLogById:"/retry-task-log/",retryDeadLetterPage:"/retry-dead-letter/list",retryDeadLetterById:"/retry-dead-letter/",retryDeadLetterRollback:"/retry-dead-letter/rollback/",deleteRetryDeadLetter:"/retry-dead-letter/",scenePageList:"/scene-config/page/list",sceneList:"/scene-config/list",notifyConfigList:"/notify-config/list",userPageList:"/user/page/list",saveUser:"/user",systemUserByUserName:"/user/username/user-info"};function a(e){return Object(n["b"])({url:o.groupConfigForPage,method:"get",params:e})}function u(e){return Object(n["b"])({url:o.allGroupNameList,method:"get",params:e})}function s(e){return Object(n["b"])({url:o.retryTaskPage,method:"get",params:e})}function i(e,r){return Object(n["b"])({url:o.retryTaskById+e,method:"get",params:r})}function c(e){return Object(n["b"])({url:o.scenePageList,method:"get",params:e})}function l(e){return Object(n["b"])({url:o.sceneList,method:"get",params:e})}function f(e){return Object(n["b"])({url:o.retryTaskLogPage,method:"get",params:e})}function d(e){return Object(n["b"])({url:o.retryTaskLogById+e,method:"get"})}function p(e){return Object(n["b"])({url:o.retryDeadLetterPage,method:"get",params:e})}function m(e,r){return Object(n["b"])({url:o.retryDeadLetterById+e,method:"get",params:r})}function g(e,r){return Object(n["b"])({url:o.retryDeadLetterRollback+e,method:"get",params:r})}function h(e,r){return Object(n["b"])({url:o.deleteRetryDeadLetter+e,method:"delete",params:r})}function b(e){return Object(n["b"])({url:o.userPageList,method:"get",params:e})}function y(e){return Object(n["b"])({url:o.systemUserByUserName,method:"get",params:e})}function v(e){return Object(n["b"])({url:o.notifyConfigList,method:"get",params:e})}function j(e){return Object(n["b"])({url:o.groupConfigByGroupName+"/".concat(e),method:"get"})}function w(e){return Object(n["b"])({url:o.saveGroup,method:0===e.id?"post":"put",data:e})}function T(e){return Object(n["b"])({url:o.saveUser,method:void 0===e.id?"post":"put",data:e})}function O(e){return Object(n["b"])({url:o.role,method:"get",params:e})}function L(e){return Object(n["b"])({url:o.service,method:"get",params:e})}},6821:function(e,r,t){(function(){var r=t("00d8"),n=t("9a634").utf8,o=t("044b"),a=t("9a634").bin,u=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?a.stringToBytes(e):n.stringToBytes(e):o(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var s=r.bytesToWords(e),i=8*e.length,c=1732584193,l=-271733879,f=-1732584194,d=271733878,p=0;p<s.length;p++)s[p]=16711935&(s[p]<<8|s[p]>>>24)|4278255360&(s[p]<<24|s[p]>>>8);s[i>>>5]|=128<<i%32,s[14+(i+64>>>9<<4)]=i;var m=u._ff,g=u._gg,h=u._hh,b=u._ii;for(p=0;p<s.length;p+=16){var y=c,v=l,j=f,w=d;c=m(c,l,f,d,s[p+0],7,-680876936),d=m(d,c,l,f,s[p+1],12,-389564586),f=m(f,d,c,l,s[p+2],17,606105819),l=m(l,f,d,c,s[p+3],22,-1044525330),c=m(c,l,f,d,s[p+4],7,-176418897),d=m(d,c,l,f,s[p+5],12,1200080426),f=m(f,d,c,l,s[p+6],17,-1473231341),l=m(l,f,d,c,s[p+7],22,-45705983),c=m(c,l,f,d,s[p+8],7,1770035416),d=m(d,c,l,f,s[p+9],12,-1958414417),f=m(f,d,c,l,s[p+10],17,-42063),l=m(l,f,d,c,s[p+11],22,-1990404162),c=m(c,l,f,d,s[p+12],7,1804603682),d=m(d,c,l,f,s[p+13],12,-40341101),f=m(f,d,c,l,s[p+14],17,-1502002290),l=m(l,f,d,c,s[p+15],22,1236535329),c=g(c,l,f,d,s[p+1],5,-165796510),d=g(d,c,l,f,s[p+6],9,-1069501632),f=g(f,d,c,l,s[p+11],14,643717713),l=g(l,f,d,c,s[p+0],20,-373897302),c=g(c,l,f,d,s[p+5],5,-701558691),d=g(d,c,l,f,s[p+10],9,38016083),f=g(f,d,c,l,s[p+15],14,-660478335),l=g(l,f,d,c,s[p+4],20,-405537848),c=g(c,l,f,d,s[p+9],5,568446438),d=g(d,c,l,f,s[p+14],9,-1019803690),f=g(f,d,c,l,s[p+3],14,-187363961),l=g(l,f,d,c,s[p+8],20,1163531501),c=g(c,l,f,d,s[p+13],5,-1444681467),d=g(d,c,l,f,s[p+2],9,-51403784),f=g(f,d,c,l,s[p+7],14,1735328473),l=g(l,f,d,c,s[p+12],20,-1926607734),c=h(c,l,f,d,s[p+5],4,-378558),d=h(d,c,l,f,s[p+8],11,-2022574463),f=h(f,d,c,l,s[p+11],16,1839030562),l=h(l,f,d,c,s[p+14],23,-35309556),c=h(c,l,f,d,s[p+1],4,-1530992060),d=h(d,c,l,f,s[p+4],11,1272893353),f=h(f,d,c,l,s[p+7],16,-155497632),l=h(l,f,d,c,s[p+10],23,-1094730640),c=h(c,l,f,d,s[p+13],4,681279174),d=h(d,c,l,f,s[p+0],11,-358537222),f=h(f,d,c,l,s[p+3],16,-722521979),l=h(l,f,d,c,s[p+6],23,76029189),c=h(c,l,f,d,s[p+9],4,-640364487),d=h(d,c,l,f,s[p+12],11,-421815835),f=h(f,d,c,l,s[p+15],16,530742520),l=h(l,f,d,c,s[p+2],23,-995338651),c=b(c,l,f,d,s[p+0],6,-198630844),d=b(d,c,l,f,s[p+7],10,1126891415),f=b(f,d,c,l,s[p+14],15,-1416354905),l=b(l,f,d,c,s[p+5],21,-57434055),c=b(c,l,f,d,s[p+12],6,1700485571),d=b(d,c,l,f,s[p+3],10,-1894986606),f=b(f,d,c,l,s[p+10],15,-1051523),l=b(l,f,d,c,s[p+1],21,-2054922799),c=b(c,l,f,d,s[p+8],6,1873313359),d=b(d,c,l,f,s[p+15],10,-30611744),f=b(f,d,c,l,s[p+6],15,-1560198380),l=b(l,f,d,c,s[p+13],21,1309151649),c=b(c,l,f,d,s[p+4],6,-145523070),d=b(d,c,l,f,s[p+11],10,-1120210379),f=b(f,d,c,l,s[p+2],15,718787259),l=b(l,f,d,c,s[p+9],21,-343485551),c=c+y>>>0,l=l+v>>>0,f=f+j>>>0,d=d+w>>>0}return r.endian([c,l,f,d])};u._ff=function(e,r,t,n,o,a,u){var s=e+(r&t|~r&n)+(o>>>0)+u;return(s<<a|s>>>32-a)+r},u._gg=function(e,r,t,n,o,a,u){var s=e+(r&n|t&~n)+(o>>>0)+u;return(s<<a|s>>>32-a)+r},u._hh=function(e,r,t,n,o,a,u){var s=e+(r^t^n)+(o>>>0)+u;return(s<<a|s>>>32-a)+r},u._ii=function(e,r,t,n,o,a,u){var s=e+(t^(r|~n))+(o>>>0)+u;return(s<<a|s>>>32-a)+r},u._blocksize=16,u._digestsize=16,e.exports=function(e,t){if(void 0===e||null===e)throw new Error("Illegal argument "+e);var n=r.wordsToBytes(u(e,t));return t&&t.asBytes?n:t&&t.asString?a.bytesToString(n):r.bytesToHex(n)}})()},"88bc":function(e,r,t){(function(r){var t=1/0,n=9007199254740991,o="[object Arguments]",a="[object Function]",u="[object GeneratorFunction]",s="[object Symbol]",i="object"==typeof r&&r&&r.Object===Object&&r,c="object"==typeof self&&self&&self.Object===Object&&self,l=i||c||Function("return this")();function f(e,r,t){switch(t.length){case 0:return e.call(r);case 1:return e.call(r,t[0]);case 2:return e.call(r,t[0],t[1]);case 3:return e.call(r,t[0],t[1],t[2])}return e.apply(r,t)}function d(e,r){var t=-1,n=e?e.length:0,o=Array(n);while(++t<n)o[t]=r(e[t],t,e);return o}function p(e,r){var t=-1,n=r.length,o=e.length;while(++t<n)e[o+t]=r[t];return e}var m=Object.prototype,g=m.hasOwnProperty,h=m.toString,b=l.Symbol,y=m.propertyIsEnumerable,v=b?b.isConcatSpreadable:void 0,j=Math.max;function w(e,r,t,n,o){var a=-1,u=e.length;t||(t=B),o||(o=[]);while(++a<u){var s=e[a];r>0&&t(s)?r>1?w(s,r-1,t,n,o):p(o,s):n||(o[o.length]=s)}return o}function T(e,r){return e=Object(e),O(e,r,(function(r,t){return t in e}))}function O(e,r,t){var n=-1,o=r.length,a={};while(++n<o){var u=r[n],s=e[u];t(s,u)&&(a[u]=s)}return a}function L(e,r){return r=j(void 0===r?e.length-1:r,0),function(){var t=arguments,n=-1,o=j(t.length-r,0),a=Array(o);while(++n<o)a[n]=t[r+n];n=-1;var u=Array(r+1);while(++n<r)u[n]=t[n];return u[r]=a,f(e,this,u)}}function B(e){return _(e)||x(e)||!!(v&&e&&e[v])}function k(e){if("string"==typeof e||q(e))return e;var r=e+"";return"0"==r&&1/e==-t?"-0":r}function x(e){return S(e)&&g.call(e,"callee")&&(!y.call(e,"callee")||h.call(e)==o)}var _=Array.isArray;function N(e){return null!=e&&I(e.length)&&!C(e)}function S(e){return P(e)&&N(e)}function C(e){var r=A(e)?h.call(e):"";return r==a||r==u}function I(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}function A(e){var r=typeof e;return!!e&&("object"==r||"function"==r)}function P(e){return!!e&&"object"==typeof e}function q(e){return"symbol"==typeof e||P(e)&&h.call(e)==s}var F=L((function(e,r){return null==e?{}:T(e,d(w(r,1),k))}));e.exports=F}).call(this,t("c8ba"))},"9a634":function(e,r){var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var r=[],t=0;t<e.length;t++)r.push(255&e.charCodeAt(t));return r},bytesToString:function(e){for(var r=[],t=0;t<e.length;t++)r.push(String.fromCharCode(e[t]));return r.join("")}}};e.exports=t},bf80:function(e,r,t){"use strict";t.r(r);var n=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("a-card",{staticClass:"card",attrs:{title:"组配置",bordered:!1}},[t("a-form",e._b({attrs:{form:e.form,"body-style":{padding:"24px 32px"}},on:{submit:e.handleSubmit}},"a-form",e.formItemLayout,!1),[t("a-form-item",[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["id"],expression:"['id']"}],attrs:{hidden:""}})],1),t("a-form-item",{attrs:{label:"用户名"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["username",{rules:[{required:!0,message:"请输入用户名",whitespace:!0}]}],expression:"[\n 'username',\n {rules: [{ required: true, message: '请输入用户名', whitespace: true}]}\n ]"}],attrs:{placeholder:"请输入用户名"}})],1),t("a-form-item",{attrs:{label:"密码"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["password",{rules:[{required:"create"===e.formType,message:"请输入密码",whitespace:!0}]}],expression:"[\n 'password',\n {rules: [{ required: formType === 'create', message: '请输入密码', whitespace: true}]}\n ]"}],attrs:{placeholder:"请输入密码"}})],1),t("a-form-item",{attrs:{label:"角色"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["role",{rules:[{required:!0,message:"请选择角色"}]}],expression:"[\n 'role',\n {rules: [{ required: true, message: '请选择角色'}]}\n ]"}],attrs:{placeholder:"请选择角色"},on:{change:function(r){return e.handleChange(r)}}},[t("a-select-option",{attrs:{value:"1"}},[e._v("普通用户")]),t("a-select-option",{attrs:{value:"2"}},[e._v("管理员")])],1)],1),"2"!==e.role?t("a-form-item",{attrs:{label:"权限"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["groupNameList",{rules:[{required:!0,message:"请分配组"}]}],expression:"[\n 'groupNameList',\n {rules: [{ required: true, message: '请分配组'}]}\n ]"}],staticStyle:{width:"100%"},attrs:{mode:"tags","token-separators":[","]}},e._l(e.groupNameList,(function(r,n){return t("a-select-option",{key:n,attrs:{value:r}},[e._v(" "+e._s(r)+" ")])})),1)],1):e._e(),t("a-form-item",{attrs:{"wrapper-col":{xs:{span:24,offset:0},sm:{span:16,offset:8},lg:{span:7}}}},[t("a-button",{attrs:{htmlType:"submit",type:"primary"}},[e._v("提交")])],1)],1)],1)},o=[],a=(t("ac1f"),t("d3b7"),t("25f0"),t("6821")),u=t.n(a),s=t("0fea"),i=t("88bc"),c=t.n(i),l={name:"UserForm",props:{},data:function(){return{form:this.$form.createForm(this),role:0,formType:"create",formItemLayout:{labelCol:{lg:{span:7},sm:{span:7}},wrapperCol:{lg:{span:10},sm:{span:17}}},groupNameList:[]}},mounted:function(){var e=this;Object(s["b"])().then((function(r){e.groupNameList=r.data})),this.$nextTick((function(){e.$route.query.username&&Object(s["p"])({username:e.$route.query.username}).then((function(r){e.loadEditInfo(r.data)}))}))},methods:{handleChange:function(e){this.role=e},handleSubmit:function(e){var r=this;e.preventDefault(),this.form.validateFields((function(e,t){e||(t.password&&(t.password=u()(t.password)),t.role=parseInt(t.role),Object(s["t"])(t).then((function(e){r.$message.success("操作成功"),r.$router.push("/user-list")})))}))},validate:function(e,r,t){var n=/^user-(.*)$/;n.test(r)||t(new Error("需要以 user- 开头")),t()},loadEditInfo:function(e){this.formType="edit";var r=this.form;new Promise((function(e){setTimeout(e,1500)})).then((function(){var t=c()(e,["id","username","role","groupNameList"]);t.role=t.role.toString(),r.setFieldsValue(t)}))}}},f=l,d=t("2877"),p=Object(d["a"])(f,n,o,!1,null,"56a81628",null);r["default"]=p.exports}}]); |