2 lines
15 KiB
JavaScript
2 lines
15 KiB
JavaScript
(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[60894],{19675:function(x,_,e){"use strict";e.d(_,{Z:function(){return t}});var n=e(28991),s=e(67294),f={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"},P=f,D=e(27029),d=function(g,c){return s.createElement(D.Z,(0,n.Z)((0,n.Z)({},g),{},{ref:c,icon:P}))};d.displayName="CaretDownOutlined";var t=s.forwardRef(d)},28612:function(x,_,e){"use strict";e.d(_,{Z:function(){return t}});var n=e(28991),s=e(67294),f={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}}]},name:"caret-up",theme:"outlined"},P=f,D=e(27029),d=function(g,c){return s.createElement(D.Z,(0,n.Z)((0,n.Z)({},g),{},{ref:c,icon:P}))};d.displayName="CaretUpOutlined";var t=s.forwardRef(d)},8212:function(x,_,e){"use strict";e.d(_,{Z:function(){return t}});var n=e(28991),s=e(67294),f={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"},P=f,D=e(27029),d=function(g,c){return s.createElement(D.Z,(0,n.Z)((0,n.Z)({},g),{},{ref:c,icon:P}))};d.displayName="EditOutlined";var t=s.forwardRef(d)},59879:function(x,_,e){"use strict";e.d(_,{Z:function(){return t}});var n=e(28991),s=e(67294),f={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"},P=f,D=e(27029),d=function(g,c){return s.createElement(D.Z,(0,n.Z)((0,n.Z)({},g),{},{ref:c,icon:P}))};d.displayName="ReloadOutlined";var t=s.forwardRef(d)},52688:function(x,_,e){"use strict";var n=e(28991),s=e(81253),f=e(85893),P=e(67294),D=e(47869),d=["fieldProps","unCheckedChildren","checkedChildren","proFieldProps"],t=P.forwardRef(function(m,g){var c=m.fieldProps,b=m.unCheckedChildren,u=m.checkedChildren,o=m.proFieldProps,O=(0,s.Z)(m,d);return(0,f.jsx)(D.Z,(0,n.Z)({valueType:"switch",fieldProps:(0,n.Z)({unCheckedChildren:b,checkedChildren:u},c),ref:g,valuePropName:"checked",proFieldProps:o,filedConfig:{valuePropName:"checked",ignoreWidth:!0}},O))});_.Z=t},5966:function(x,_,e){"use strict";var n=e(28991),s=e(81253),f=e(85893),P=e(47869),D=["fieldProps","proFieldProps"],d=["fieldProps","proFieldProps"],t="text",m=function(u){var o=u.fieldProps,O=u.proFieldProps,l=(0,s.Z)(u,D);return(0,f.jsx)(P.Z,(0,n.Z)({valueType:t,fieldProps:o,filedConfig:{valueType:t},proFieldProps:O},l))},g=function(u){var o=u.fieldProps,O=u.proFieldProps,l=(0,s.Z)(u,d);return(0,f.jsx)(P.Z,(0,n.Z)({valueType:"password",fieldProps:o,proFieldProps:O,filedConfig:{valueType:t}},l))},c=m;c.Password=g,c.displayName="ProFormComponent",_.Z=c},5614:function(x,_,e){"use strict";var n=e(20136),s=e(55241),f=e(13062),P=e(71230),D=e(89032),d=e(15746),t=e(2824),m=e(67294),g=e(34436),c=e(85893),b=u=>{var o=u.color,O=u.setColor,l=(0,m.useState)(!1),h=(0,t.Z)(l,2),Z=h[0],K=h[1],A=g.O9.findIndex(M=>M===o),R=A==-1?0:A;return(0,c.jsx)(s.Z,{trigger:"click",placement:"bottomRight",open:Z,onOpenChange:K,content:(0,c.jsx)(P.Z,{className:"colorsUl",children:g.O9.map((M,T)=>(0,c.jsx)(d.Z,{className:"colorsLi"+(R===T?" active":""),onClick:()=>{O(M),K(!1)},children:(0,c.jsx)("i",{className:"ico",style:{background:M,border:"1px solid ".concat(g.ZY[T])}})}))}),children:(0,c.jsx)("i",{className:"colorIco",style:{background:o,border:"1px solid ".concat(g.ZY[R])}})})};_.Z=b},42139:function(x,_,e){"use strict";var n=e(11849),s=e(39428),f=e(3182),P=e(57663),D=e(71577),d=e(67294),t=e(30672),m=e(85473),g=e(16894),c=e(37476),b=e(71975),u=e(1977),o=e(85893),O=l=>{var h=(0,t.YB)(),Z=(0,t.v9)(N=>N.common),K=Z.isMobile,A=l.rowKey,R=A===void 0?"":A,M=l.dragSortKey,T=l.isLoading,ce=T===void 0?!1:T,J=l.columns,Q=J===void 0?[]:J,q=l.data,ue=q===void 0?[]:q,a=l.scroll,L=a===void 0?{x:768}:a,me=l.toolbar,w=l.toolbarTitle,v=l.toolbarAuth,S=l.toolBarRender,W=l.pagination,z=l.pageChange,ve=l.rowClassName,U=l.rowSelection,j=l.canDragSort,k=j===void 0?!1:j,ge=l.handleDragSortEnd,ee=l.triggerClick,ae=l.modalType,G=l.modalWidth,fe=G===void 0?550:G,Ee=l.title,te=l.visible,Pe=l.setVisible,De=l.modalChildren,le=l.afterClose,oe=l.finish,ne=l.isSubmitLoading,V=ne===void 0?!1:ne,re={title:Ee,width:K&&ae!="modal"?"100%":fe,scrollToFirstError:!0,visible:te,onVisibleChange:Pe,children:De,trigger:(0,o.jsx)(D.Z,{type:"primary",icon:(0,o.jsx)(u.Z,{}),disabled:v!==void 0?!v:!1,onClick:ee,children:w||h.formatMessage({id:"common.add"})}),submitter:{submitButtonProps:{loading:V}},modalProps:{destroyOnClose:!0,maskClosable:!1,afterClose:le},drawerProps:{destroyOnClose:!0,maskClosable:!1,onClose:le,className:"selfDrawer",push:{distance:0}},onFinish:function(){var N=(0,f.Z)((0,s.Z)().mark(function se(de){return(0,s.Z)().wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return F.abrupt("return",oe(de));case 1:case"end":return F.stop()}},se)}));function H(se){return N.apply(this,arguments)}return H}()},Y={className:"selfTable",loading:ce,rowKey:R,columns:Q,dataSource:ue,scroll:L,rowClassName:ve,rowSelection:U,pagination:W?(0,n.Z)((0,n.Z)({},W),{},{current:W==null?void 0:W.currentPage,showSizeChanger:!0}):!1,onChange:z,headerTitle:me?ae==="modal"?(0,o.jsx)(c.Y,(0,n.Z)({},re)):(0,o.jsx)(b.a,(0,n.Z)({},re)):!1,toolBarRender:S};return k&&!K?(0,o.jsx)(m.Z,(0,n.Z)((0,n.Z)({},Y),{},{size:"small",search:!1,options:!1,tableAlertRender:!1,dragSortKey:M,onDragSortEnd:ge})):(0,o.jsx)(g.ZP,(0,n.Z)((0,n.Z)({},Y),{},{size:"small",search:!1,options:!1,tableAlertRender:!1}))};_.Z=O},81341:function(x,_,e){"use strict";e.r(_);var n=e(13062),s=e(71230),f=e(89032),P=e(15746),D=e(63185),d=e(9676),t=e(17462),m=e(76772),g=e(62350),c=e(24565),b=e(34792),u=e(48086),o=e(57663),O=e(71577),l=e(71153),h=e(60331),Z=e(49111),K=e(19650),A=e(2824),R=e(11849),M=e(67294),T=e(30672),ce=e(5966),J=e(52688),Q=e(34436),q=e(42139),ue=e(5614),a=e(85893),L="file",me=()=>{var w,v=(0,T.YB)(),S=(0,T.I0)(),W=(0,T.tT)("@@initialState"),z=W.initialState,ve=z!=null?z:{},U=ve.currentUser,j=U!=null&&(w=U.user)!==null&&w!==void 0&&w.isSystem?!0:!!(U!=null&&U.role["admin.auth.edit"]),k=(0,T.v9)(i=>(0,R.Z)((0,R.Z)({},i[L]),{},{loading:i.loading.effects["".concat(L,"/getFileList")],submitLoading:i.loading.effects["".concat(L,"/addEditFile")]})),ge=k.fileList,ee=k.loading,ae=ee===void 0?!1:ee,G=k.submitLoading,fe=G===void 0?!1:G,Ee=(0,M.useState)(v.formatMessage({id:"common.add"})),te=(0,A.Z)(Ee,2),Pe=te[0],De=te[1],le=(0,M.useState)(!1),oe=(0,A.Z)(le,2),ne=oe[0],V=oe[1],re=(0,M.useState)("#ffce3d"),Y=(0,A.Z)(re,2),N=Y[0],H=Y[1],se=(0,M.useState)({}),de=(0,A.Z)(se,2),E=de[0],F=de[1],Me=(0,M.useState)([]),he=(0,A.Z)(Me,2),X=he[0],ie=he[1],pe=(0,M.useState)(!1),Oe=(0,A.Z)(pe,2),be=Oe[0],_e=Oe[1],p=i=>v.formatMessage({id:i}),I=[{label:p("explorer.file.listType"),value:1,deganged:[2,3,4,6,7,8,9,10,11,12,13]},{label:p("common.search"),value:2,ganged:[1]},{label:p("common.preview"),value:3,ganged:[1],deganged:[4,6,7,8,9,10,11,12,13]},{label:p("common.download"),value:4,ganged:[1,3]},{label:p("common.upload"),value:5},{label:p("common.zip"),value:6,ganged:[1,3]},{label:p("common.unzip"),value:7,ganged:[1,3]},{label:p("common.edit"),value:8,ganged:[1,3],deganged:[10,11]},{label:p("common.add"),value:9,ganged:[1,3],deganged:[10,11]},{label:p("common.delete"),value:10,ganged:[1,3,8,9]},{label:p("common.share"),value:11,ganged:[1,3,8,9]},{label:p("common.comment"),value:12,ganged:[1,3]},{label:p("common.dynamic"),value:13,ganged:[1,3]},{label:p("admin.auth.root"),value:14,ganged:[1,3]}],ye=[{title:v.formatMessage({id:"common.name"}),dataIndex:"roleName",render:(i,r)=>{var C=Q.O9.findIndex(B=>B===r.label),y=C==-1?0:C;return(0,a.jsxs)(K.Z,{size:8,align:"start",children:[(0,a.jsx)("i",{className:"roleIcon",style:{background:r.label,border:"1px solid ".concat(Q.ZY[y])}}),r.roleName]})}},{title:v.formatMessage({id:"common.attributeInfo"}),dataIndex:"isSystem",render:(i,r)=>(0,a.jsxs)(a.Fragment,{children:[i?(0,a.jsx)(h.Z,{className:"primaryBtn",children:v.formatMessage({id:"admin.setting.system"})}):(0,a.jsx)(a.Fragment,{}),!r.enable&&(0,a.jsx)(h.Z,{color:"#bfbfbf",children:v.formatMessage({id:"common.hide"})})]})},{title:v.formatMessage({id:"common.auth"}),dataIndex:"auth",render:(i,r)=>{var C=I.map(y=>{var B;return((B=r.auth)===null||B===void 0?void 0:B.split(",").map(Number).includes(y.value))&&y.label}).filter(y=>y);return C.join(", ")}},{title:v.formatMessage({id:"explorer.file.action"}),align:"center",dataIndex:"option",width:150,valueType:"option",render:(i,r)=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(O.Z,{type:"link",size:"small",disabled:!j,onClick:()=>{var C,y=r==null||(C=r.auth)===null||C===void 0?void 0:C.split(",").map(Number);De(v.formatMessage({id:"common.edit"})),F(r),H((r==null?void 0:r.label)||"#ffce3d"),ie(y),_e((y==null?void 0:y.length)===I.length),V(!0)},children:v.formatMessage({id:"common.edit"})}),!r.isSystem&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(c.Z,{disabled:!j,title:v.formatMessage({id:"common.ifDel"}),onConfirm:()=>S({type:"".concat(L,"/removeFile"),payload:{roleID:r.roleID},callback:()=>u.ZP.success(v.formatMessage({id:"explorer.removeSuccess"}))}),children:(0,a.jsx)(O.Z,{type:"link",size:"small",disabled:!j,children:v.formatMessage({id:"common.delete"})})},"delete")})]})}],xe=i=>{var r=i.target,C=r.value,y=r.checked,B=r.ganged,Ce=r.deganged,$=[...X],Re=B||[],Ie=Ce||[];if(y)$=Array.from(new Set([...$,C,...Re]));else{var Ze=[...Ie,C];$=$.filter(Ue=>!Ze.some(je=>Ue===je))}ie($),_e($.length===I.length)},Ae=i=>{ie(i.target.checked?I==null?void 0:I.map(r=>r.value):[]),_e(i.target.checked)},Te=()=>{F({}),ie([]),H("#ffce3d"),_e(!1)},Le=i=>{var r=i==null?void 0:i.map(C=>C.roleID);S({type:"".concat(L,"/sortFile"),payload:{ids:r==null?void 0:r.join(",")},callback:()=>{u.ZP.success(v.formatMessage({id:"explorer.success"}))}})};return(0,M.useEffect)(()=>(S({type:"".concat(L,"/getFileList")}),!j&&u.ZP.warning(v.formatMessage({id:"explorer.noEditPermissionAction"})),()=>{S({type:"".concat(L,"/clear")})}),[]),(0,a.jsx)("div",{className:"layoutBox",children:(0,a.jsx)(q.Z,{rowKey:"roleID",dragSortKey:"roleName",canDragSort:!0,isLoading:ae,afterClose:Te,handleDragSortEnd:Le,columns:ye,data:ge,search:!1,toolbar:!0,toolbarAuth:j,pagination:!1,modalType:"modal",title:Pe,visible:ne,setVisible:V,isSubmitLoading:fe,finish:i=>{var r,C=(0,R.Z)((0,R.Z)({},i),{},{roleID:E==null?void 0:E.roleID,auth:X==null?void 0:X.join(","),enable:i.enable?1:0,label:N,roleName:(r=i.roleName)===null||r===void 0?void 0:r.trim()});S({type:"".concat(L,"/addEditFile"),payload:C,callback:()=>{u.ZP.success(v.formatMessage({id:"explorer.success"})),V(!1)}})},modalChildren:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(ce.Z,{name:"roleName",label:v.formatMessage({id:"common.name"}),required:!0,rules:[{required:!0,whitespace:!0,message:v.formatMessage({id:"explorer.notNull"})}],initialValue:E==null?void 0:E.roleName,fieldProps:{addonAfter:(0,a.jsx)(ue.Z,{color:N,setColor:H}),maxLength:30}}),(0,a.jsx)(J.Z,{name:"enable",label:v.formatMessage({id:"common.isDisplay"}),addonAfter:(0,a.jsx)("span",{className:"selfAddonAfter",children:v.formatMessage({id:"admin.auth.displayDesc"})}),initialValue:E!=null&&E.roleID?E.enable:!0}),E!=null&&E.isSystem?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(m.Z,{message:v.formatMessage({id:"admin.auth.defaultAuthDesc"}),type:"warning"}),(0,a.jsx)("br",{})]}):void 0,(0,a.jsx)(d.Z.Group,{name:"auth",disabled:E==null?void 0:E.isSystem,value:X,children:(0,a.jsx)(s.Z,{children:I==null?void 0:I.map(i=>(0,a.jsx)(P.Z,{span:12,children:(0,a.jsx)(d.Z,{value:i.value,ganged:i.ganged,deganged:i.deganged,onChange:xe,children:i.label},i.value)}))})}),(0,a.jsx)("br",{}),(0,a.jsx)("br",{}),(0,a.jsx)(d.Z,{checked:be,children:v.formatMessage({id:"common.allAndNull"}),disabled:E==null?void 0:E.isSystem,onChange:Ae})]})})})};_.default=me},20640:function(x,_,e){"use strict";var n=e(11742),s={"text/plain":"Text","text/html":"Url",default:"Text"},f="Copy to clipboard: #{key}, Enter";function P(d){var t=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return d.replace(/#{\s*key\s*}/g,t)}function D(d,t){var m,g,c,b,u,o,O=!1;t||(t={}),m=t.debug||!1;try{c=n(),b=document.createRange(),u=document.getSelection(),o=document.createElement("span"),o.textContent=d,o.ariaHidden="true",o.style.all="unset",o.style.position="fixed",o.style.top=0,o.style.clip="rect(0, 0, 0, 0)",o.style.whiteSpace="pre",o.style.webkitUserSelect="text",o.style.MozUserSelect="text",o.style.msUserSelect="text",o.style.userSelect="text",o.addEventListener("copy",function(h){if(h.stopPropagation(),t.format)if(h.preventDefault(),typeof h.clipboardData=="undefined"){m&&console.warn("unable to use e.clipboardData"),m&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var Z=s[t.format]||s.default;window.clipboardData.setData(Z,d)}else h.clipboardData.clearData(),h.clipboardData.setData(t.format,d);t.onCopy&&(h.preventDefault(),t.onCopy(h.clipboardData))}),document.body.appendChild(o),b.selectNodeContents(o),u.addRange(b);var l=document.execCommand("copy");if(!l)throw new Error("copy command was unsuccessful");O=!0}catch(h){m&&console.error("unable to copy using execCommand: ",h),m&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",d),t.onCopy&&t.onCopy(window.clipboardData),O=!0}catch(Z){m&&console.error("unable to copy using clipboardData: ",Z),m&&console.error("falling back to prompt"),g=P("message"in t?t.message:f),window.prompt(g,d)}}finally{u&&(typeof u.removeRange=="function"?u.removeRange(b):u.removeAllRanges()),o&&document.body.removeChild(o),c()}return O}x.exports=D},11742:function(x){x.exports=function(){var _=document.getSelection();if(!_.rangeCount)return function(){};for(var e=document.activeElement,n=[],s=0;s<_.rangeCount;s++)n.push(_.getRangeAt(s));switch(e.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":e.blur();break;default:e=null;break}return _.removeAllRanges(),function(){_.type==="Caret"&&_.removeAllRanges(),_.rangeCount||n.forEach(function(f){_.addRange(f)}),e&&e.focus()}}}}]);
|