2 lines
15 KiB
JavaScript
2 lines
15 KiB
JavaScript
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3998,9254],{78033:function(Y,F,e){e.d(F,{Z:function(){return j}});var n=e(52319),v=e(93236),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z"}}]},name:"menu",theme:"outlined"},u=a,g=e(85651),E=function(B,i){return v.createElement(g.Z,(0,n.Z)({},B,{ref:i,icon:u}))},j=v.forwardRef(E)},17675:function(Y,F,e){e.d(F,{Z:function(){return j}});var n=e(52319),v=e(93236),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"},u=a,g=e(85651),E=function(B,i){return v.createElement(g.Z,(0,n.Z)({},B,{ref:i,icon:u}))},j=v.forwardRef(E)},36428:function(Y,F,e){var n=e(88351),v=e(87841),a=e(993),u=e(96268),g=e(93236),E=e(90040),j=e(8263),D=e(62086),B=["fieldProps","options","radioType","layout","proFieldProps","valueEnum"],i=g.forwardRef(function(P,W){var h=P.fieldProps,M=P.options,z=P.radioType,s=P.layout,r=P.proFieldProps,C=P.valueEnum,L=(0,v.Z)(P,B);return(0,D.jsx)(j.Z,(0,n.Z)((0,n.Z)({valueType:z==="button"?"radioButton":"radio",ref:W,valueEnum:(0,a.h)(C,void 0)},L),{},{fieldProps:(0,n.Z)({options:M,layout:s},h),proFieldProps:r,filedConfig:{customLightMode:!0}}))}),y=g.forwardRef(function(P,W){var h=P.fieldProps,M=P.children;return(0,D.jsx)(u.ZP,(0,n.Z)((0,n.Z)({},h),{},{ref:W,children:M}))}),T=(0,E.G)(y,{valuePropName:"checked",ignoreWidth:!0}),t=T;t.Group=i,t.Button=u.ZP.Button,t.displayName="ProFormComponent",F.Z=t},61786:function(Y,F,e){var n=e(88351),v=e(87841),a=e(93236),u=e(8263),g=e(62086),E=["fieldProps","proFieldProps"],j=["fieldProps","proFieldProps"],D="text",B=function(t){var P=t.fieldProps,W=t.proFieldProps,h=(0,v.Z)(t,E);return(0,g.jsx)(u.Z,(0,n.Z)({valueType:D,fieldProps:P,filedConfig:{valueType:D},proFieldProps:W},h))},i=function(t){var P=t.fieldProps,W=t.proFieldProps,h=(0,v.Z)(t,j);return(0,g.jsx)(u.Z,(0,n.Z)({valueType:"password",fieldProps:P,proFieldProps:W,filedConfig:{valueType:D}},h))},y=B;y.Password=i,y.displayName="ProFormComponent",F.Z=y},28931:function(Y,F,e){e.d(F,{Y:function(){return z}});var n=e(99177),v=e(42700),a=e(88351),u=e(67654),g=e(87841),E=e(29320),j=e(50126),D=e(92750),B=e(72266),i=e.n(B),y=e(71639),T=e(24599),t=e(93236),P=e(19103),W=e(96630),h=e(62086),M=["children","trigger","onVisibleChange","onOpenChange","modalProps","onFinish","submitTimeout","title","width","visible","open"];function z(s){var r,C,L,R,U=s.children,Z=s.trigger,c=s.onVisibleChange,x=s.onOpenChange,o=s.modalProps,m=s.onFinish,S=s.submitTimeout,Q=s.title,w=s.width,K=s.visible,ee=s.open,O=(0,g.Z)(s,M);(0,T.ET)(!O.footer||!(o!=null&&o.footer),"ModalForm \u662F\u4E00\u4E2A ProForm \u7684\u7279\u6B8A\u5E03\u5C40\uFF0C\u5982\u679C\u60F3\u81EA\u5B9A\u4E49\u6309\u94AE\uFF0C\u8BF7\u4F7F\u7528 submit.render \u81EA\u5B9A\u4E49\u3002");var H=(0,t.useContext)(j.ZP.ConfigContext),le=(0,t.useState)([]),ae=(0,u.Z)(le,2),ie=ae[1],se=(0,t.useState)(!1),ne=(0,u.Z)(se,2),k=ne[0],oe=ne[1],de=(0,y.Z)(!!K,{value:ee||K,onChange:x||c}),b=(0,u.Z)(de,2),G=b[0],$=b[1],q=(0,t.useRef)(null),ue=(0,t.useCallback)(function(d){q.current===null&&d&&ie([]),q.current=d},[]),V=(0,t.useRef)(),pe=(0,t.useCallback)(function(){var d,l,f,p=(d=(l=O.form)!==null&&l!==void 0?l:(f=O.formRef)===null||f===void 0?void 0:f.current)!==null&&d!==void 0?d:V.current;p&&o!==null&&o!==void 0&&o.destroyOnClose&&p.resetFields()},[o==null?void 0:o.destroyOnClose,O.form,O.formRef]);(0,t.useImperativeHandle)(O.formRef,function(){return V.current},[V.current]),(0,t.useEffect)(function(){G&&(ee||K)&&(x==null||x(!0),c==null||c(!0))},[K,ee,G]);var fe=(0,t.useMemo)(function(){return Z?t.cloneElement(Z,(0,a.Z)((0,a.Z)({key:"trigger"},Z.props),{},{onClick:function(){var d=(0,v.Z)((0,n.Z)().mark(function f(p){var A,_;return(0,n.Z)().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:$(!G),(A=Z.props)===null||A===void 0||(_=A.onClick)===null||_===void 0||_.call(A,p);case 2:case"end":return I.stop()}},f)}));function l(f){return d.apply(this,arguments)}return l}()})):null},[$,Z,G]),Pe=(0,t.useMemo)(function(){var d,l,f,p,A,_,X,I;return O.submitter===!1?!1:i()({searchConfig:{submitText:(d=(l=o==null?void 0:o.okText)!==null&&l!==void 0?l:(f=H.locale)===null||f===void 0||(p=f.Modal)===null||p===void 0?void 0:p.okText)!==null&&d!==void 0?d:"\u786E\u8BA4",resetText:(A=(_=o==null?void 0:o.cancelText)!==null&&_!==void 0?_:(X=H.locale)===null||X===void 0||(I=X.Modal)===null||I===void 0?void 0:I.cancelText)!==null&&A!==void 0?A:"\u53D6\u6D88"},resetButtonProps:{preventDefault:!0,disabled:S?k:void 0,onClick:function(me){var te;$(!1),o==null||(te=o.onCancel)===null||te===void 0||te.call(o,me)}}},O.submitter)},[(r=H.locale)===null||r===void 0||(C=r.Modal)===null||C===void 0?void 0:C.cancelText,(L=H.locale)===null||L===void 0||(R=L.Modal)===null||R===void 0?void 0:R.okText,o,O.submitter,$,k,S]),ce=(0,t.useCallback)(function(d,l){return(0,h.jsxs)(h.Fragment,{children:[d,q.current&&l?(0,h.jsx)(t.Fragment,{children:(0,P.createPortal)(l,q.current)},"submitter"):l]})},[]),he=(0,t.useCallback)(function(){var d=(0,v.Z)((0,n.Z)().mark(function l(f){var p,A,_;return(0,n.Z)().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return p=m==null?void 0:m(f),S&&p instanceof Promise&&(oe(!0),A=setTimeout(function(){return oe(!1)},S),p.finally(function(){clearTimeout(A),oe(!1)})),I.next=4,p;case 4:return _=I.sent,_&&$(!1),I.abrupt("return",_);case 7:case"end":return I.stop()}},l)}));return function(l){return d.apply(this,arguments)}}(),[m,$,S]),ve=(0,E.X)(G);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(D.Z,(0,a.Z)((0,a.Z)((0,a.Z)({title:Q,width:w||800},o),ve),{},{onCancel:function(l){var f;S&&k||($(!1),o==null||(f=o.onCancel)===null||f===void 0||f.call(o,l))},afterClose:function(){var l;pe(),$(!1),o==null||(l=o.afterClose)===null||l===void 0||l.call(o)},footer:O.submitter!==!1?(0,h.jsx)("div",{ref:ue,style:{display:"flex",justifyContent:"flex-end"}}):null,children:(0,h.jsx)(W.I,(0,a.Z)((0,a.Z)({formComponentType:"ModalForm",layout:"vertical"},O),{},{onInit:function(l,f){var p;O.formRef&&(O.formRef.current=f),O==null||(p=O.onInit)===null||p===void 0||p.call(O,l,f),V.current=f},formRef:V,submitter:Pe,onFinish:function(){var d=(0,v.Z)((0,n.Z)().mark(function l(f){var p;return(0,n.Z)().wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return _.next=2,he(f);case 2:return p=_.sent,_.abrupt("return",p);case 4:case"end":return _.stop()}},l)}));return function(l){return d.apply(this,arguments)}}(),contentRender:ce,children:U}))})),fe]})}},40882:function(Y,F,e){e.d(F,{A:function(){return U}});var n=e(88351),v=e(84974),a=e(93236),u=e(96630),g=e(5424),E=e(40749),j=e(67654),D=e(67817),B=e(71639),i=e(80128),y=e(50126),T=e(61385),t=e(84875),P=e.n(t),W=e(75986),h=e(16216),M=e(21983),z=function(c){var x;return(0,E.Z)({},c.componentCls,{"&-title":{marginBlockEnd:c.marginXL,fontWeight:"bold"},"&-container":(0,E.Z)({flexWrap:"wrap",maxWidth:"100%"},"> div".concat(c.antCls,"-space-item"),{maxWidth:"100%"}),"&-twoLine":(x={display:"block",width:"100%"},(0,E.Z)(x,"".concat(c.componentCls,"-title"),{width:"100%",margin:"8px 0"}),(0,E.Z)(x,"".concat(c.componentCls,"-container"),{paddingInlineStart:16}),(0,E.Z)(x,"".concat(c.antCls,"-space-item,").concat(c.antCls,"-form-item"),{width:"100%"}),(0,E.Z)(x,"".concat(c.antCls,"-form-item"),{"&-control":{display:"flex",alignItems:"center",justifyContent:"flex-end","&-input":{alignItems:"center",justifyContent:"flex-end","&-content":{flex:"none"}}}}),x)})};function s(Z){return(0,M.Xj)("ProFormGroup",function(c){var x=(0,n.Z)((0,n.Z)({},c),{},{componentCls:".".concat(Z)});return[z(x)]})}var r=e(62086),C=a.forwardRef(function(Z,c){var x=a.useContext(W.Z),o=x.groupProps,m=(0,n.Z)((0,n.Z)({},o),Z),S=m.children,Q=m.collapsible,w=m.defaultCollapsed,K=m.style,ee=m.labelLayout,O=m.title,H=O===void 0?Z.label:O,le=m.tooltip,ae=m.align,ie=ae===void 0?"start":ae,se=m.direction,ne=m.size,k=ne===void 0?32:ne,oe=m.titleStyle,de=m.titleRender,b=m.spaceProps,G=m.extra,$=m.autoFocus,q=(0,B.Z)(function(){return w||!1},{value:Z.collapsed,onChange:Z.onCollapse}),ue=(0,j.Z)(q,2),V=ue[0],pe=ue[1],fe=(0,a.useContext)(y.ZP.ConfigContext),Pe=fe.getPrefixCls,ce=(0,h.zx)(Z),he=ce.ColWrapper,ve=ce.RowWrapper,d=Pe("pro-form-group"),l=s(d),f=l.wrapSSR,p=l.hashId,A=Q&&(0,r.jsx)(D.Z,{style:{marginInlineEnd:8},rotate:V?void 0:90}),_=(0,r.jsx)(i.G,{label:A?(0,r.jsxs)("div",{children:[A,H]}):H,tooltip:le}),X=(0,a.useCallback)(function(J){var re=J.children;return(0,r.jsx)(T.Z,(0,n.Z)((0,n.Z)({},b),{},{className:P()("".concat(d,"-container ").concat(p),b==null?void 0:b.className),size:k,align:ie,direction:se,style:(0,n.Z)({rowGap:0},b==null?void 0:b.style),children:re}))},[ie,d,se,p,k,b]),I=de?de(_,Z):_,Ee=(0,a.useMemo)(function(){var J=[],re=a.Children.toArray(S).map(function(N,xe){var Ce;return a.isValidElement(N)&&N!==null&&N!==void 0&&(Ce=N.props)!==null&&Ce!==void 0&&Ce.hidden?(J.push(N),null):xe===0&&a.isValidElement(N)&&$?a.cloneElement(N,(0,n.Z)((0,n.Z)({},N.props),{},{autoFocus:$})):N});return[(0,r.jsx)(ve,{Wrapper:X,children:re},"children"),J.length>0?(0,r.jsx)("div",{style:{display:"none"},children:J}):null]},[S,ve,X,$]),me=(0,j.Z)(Ee,2),te=me[0],Me=me[1];return f((0,r.jsx)(he,{children:(0,r.jsxs)("div",{className:P()(d,p,(0,E.Z)({},"".concat(d,"-twoLine"),ee==="twoLine")),style:K,ref:c,children:[Me,(H||le||G)&&(0,r.jsx)("div",{className:"".concat(d,"-title ").concat(p).trim(),style:oe,onClick:function(){pe(!V)},children:G?(0,r.jsxs)("div",{style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between"},children:[I,(0,r.jsx)("span",{onClick:function(re){return re.stopPropagation()},children:G})]}):I}),(0,r.jsx)("div",{style:{display:Q&&V?"none":void 0},children:te})]})}))});C.displayName="ProForm-Group";var L=C,R=e(9664);function U(Z){return(0,r.jsx)(u.I,(0,n.Z)({layout:"vertical",submitter:{render:function(x,o){return o.reverse()}},contentRender:function(x,o){return(0,r.jsxs)(r.Fragment,{children:[x,o]})}},Z))}U.Group=L,U.useForm=v.Z.useForm,U.Item=R.Z,U.useWatch=v.Z.useWatch,U.ErrorList=v.Z.ErrorList,U.Provider=v.Z.Provider,U.useFormInstance=v.Z.useFormInstance,U.EditOrReadOnlyContext=g.A},80128:function(Y,F,e){e.d(F,{G:function(){return z}});var n=e(88351),v=e(40749),a=e(52319),u=e(93236),g={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"},E=g,j=e(85651),D=function(r,C){return u.createElement(j.Z,(0,a.Z)({},r,{ref:C,icon:E}))},B=u.forwardRef(D),i=e(50126),y=e(87087),T=e(84875),t=e.n(T),P=e(21983),W=function(r){return(0,v.Z)({},r.componentCls,{display:"inline-flex",alignItems:"center",maxWidth:"100%","&-icon":{display:"block",marginInlineStart:"4px",cursor:"pointer","&:hover":{color:r.colorPrimary}},"&-title":{display:"inline-flex",flex:"1"},"&-subtitle ":{marginInlineStart:8,color:r.colorTextSecondary,fontWeight:"normal",fontSize:r.fontSize,whiteSpace:"nowrap"},"&-title-ellipsis":{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",wordBreak:"keep-all"}})};function h(s){return(0,P.Xj)("LabelIconTip",function(r){var C=(0,n.Z)((0,n.Z)({},r),{},{componentCls:".".concat(s)});return[W(C)]})}var M=e(62086),z=u.memo(function(s){var r=s.label,C=s.tooltip,L=s.ellipsis,R=s.subTitle,U=(0,u.useContext)(i.ZP.ConfigContext),Z=U.getPrefixCls,c=Z("pro-core-label-tip"),x=h(c),o=x.wrapSSR,m=x.hashId;if(!C&&!R)return(0,M.jsx)(M.Fragment,{children:r});var S=typeof C=="string"||u.isValidElement(C)?{title:C}:C,Q=(S==null?void 0:S.icon)||(0,M.jsx)(B,{});return o((0,M.jsxs)("div",{className:t()(c,m),onMouseDown:function(K){return K.stopPropagation()},onMouseLeave:function(K){return K.stopPropagation()},onMouseMove:function(K){return K.stopPropagation()},children:[(0,M.jsx)("div",{className:t()("".concat(c,"-title"),m,(0,v.Z)({},"".concat(c,"-title-ellipsis"),L)),children:r}),R&&(0,M.jsx)("div",{className:"".concat(c,"-subtitle ").concat(m).trim(),children:R}),C&&(0,M.jsx)(y.Z,(0,n.Z)((0,n.Z)({},S),{},{children:(0,M.jsx)("span",{className:"".concat(c,"-icon ").concat(m).trim(),children:Q})}))]}))})},64729:function(Y,F,e){e.r(F);var n=e(54306),v=e.n(n),a=e(28931),u=e(61786),g=e(40882),E=e(36428),j=e(33045),D=e(93236),B=e(48970),i=e(62086);F.default=function(y){var T=y.values,t=y.modalOpenState,P=y.onModalOpenState,W=y.onSubmit,h=y.permissionTreeData,M=(0,D.useRef)(),z=(0,D.useState)(),s=v()(z,2),r=s[0],C=s[1];return(0,D.useEffect)(function(){var L;C(T.auth),(L=M.current)===null||L===void 0||L.setFieldsValue(T)},[T]),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(a.Y,{title:"\u7BA1\u7406\u5458-\u7F16\u8F91",formRef:M,submitter:{searchConfig:{resetText:"\u91CD\u7F6E"},resetButtonProps:{onClick:function(){var R;(R=M.current)===null||R===void 0||R.resetFields()}}},initialValues:T,onFinish:W,open:t,onOpenChange:P,children:[(0,i.jsx)(u.Z,{hidden:!0,width:"md",name:"id"}),(0,i.jsxs)(g.A.Group,{children:[(0,i.jsx)(u.Z,{rules:[{required:!0,message:"\u8BF7\u8F93\u5165"}],width:"md",name:"mobile",label:"\u624B\u673A\u53F7",placeholder:"\u8BF7\u8F93\u5165"}),(0,i.jsx)(u.Z.Password,{width:"md",name:"password",label:"\u5BC6\u7801",placeholder:"\u8BF7\u8F93\u5165"})]}),(0,i.jsxs)(g.A.Group,{children:[(0,i.jsx)(u.Z,{rules:[{required:!0,message:"\u8BF7\u8F93\u5165"}],width:"md",name:"nickname",label:"\u6635\u79F0",placeholder:"\u8BF7\u8F93\u5165"}),(0,i.jsx)(g.A.Item,{label:"\u5934\u50CF",name:"avatar",children:(0,i.jsx)(B.Z,{fileType:"image",defaultValue:T==null?void 0:T.avatar,count:3,mode:""})})]}),(0,i.jsx)(E.Z.Group,{name:"status",radioType:"button",label:"\u72B6\u6001",options:[{label:"\u6B63\u5E38",value:0},{label:"\u51BB\u7ED3",value:1},{label:"\u7981\u7528",value:2}]}),(0,i.jsx)(g.A.Item,{label:"\u8BBE\u7F6E\u6743\u9650",name:"permission_ids",children:(0,i.jsx)(j.Z,{checkable:!0,multiple:!0,showLine:!0,showIcon:!1,checkedKeys:r,defaultExpandAll:!0,onCheck:function(R){console.log(R),C(R),M.current.setFieldsValue({permission_ids:R})},fieldNames:{title:"name",key:"id"},treeData:h})})]})})}}}]);
|