"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4608],{28931:function(fe,b,e){e.d(b,{Y:function(){return k}});var u=e(99177),x=e(42700),a=e(88351),D=e(67654),N=e(87841),Z=e(29320),U=e(50126),f=e(92750),j=e(72266),I=e.n(j),V=e(71639),z=e(24599),v=e(93236),K=e(19103),A=e(96630),g=e(62086),M=["children","trigger","onVisibleChange","onOpenChange","modalProps","onFinish","submitTimeout","title","width","visible","open"];function k(c){var t,E,X,L,R=c.children,C=c.trigger,r=c.onVisibleChange,m=c.onOpenChange,n=c.modalProps,i=c.onFinish,y=c.submitTimeout,Y=c.title,w=c.width,F=c.visible,q=c.open,h=(0,N.Z)(c,M);(0,z.ET)(!h.footer||!(n!=null&&n.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 _=(0,v.useContext)(U.ZP.ConfigContext),le=(0,v.useState)([]),re=(0,D.Z)(le,2),ae=re[1],ie=(0,v.useState)(!1),ee=(0,D.Z)(ie,2),J=ee[0],ne=ee[1],se=(0,V.Z)(!!F,{value:q||F,onChange:m||r}),S=(0,D.Z)(se,2),B=S[0],T=S[1],Q=(0,v.useRef)(null),ue=(0,v.useCallback)(function(l){Q.current===null&&l&&ae([]),Q.current=l},[]),W=(0,v.useRef)(),me=(0,v.useCallback)(function(){var l,o,d,s=(l=(o=h.form)!==null&&o!==void 0?o:(d=h.formRef)===null||d===void 0?void 0:d.current)!==null&&l!==void 0?l:W.current;s&&n!==null&&n!==void 0&&n.destroyOnClose&&s.resetFields()},[n==null?void 0:n.destroyOnClose,h.form,h.formRef]);(0,v.useImperativeHandle)(h.formRef,function(){return W.current},[W.current]),(0,v.useEffect)(function(){B&&(q||F)&&(m==null||m(!0),r==null||r(!0))},[F,q,B]);var pe=(0,v.useMemo)(function(){return C?v.cloneElement(C,(0,a.Z)((0,a.Z)({key:"trigger"},C.props),{},{onClick:function(){var l=(0,x.Z)((0,u.Z)().mark(function d(s){var O,p;return(0,u.Z)().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:T(!B),(O=C.props)===null||O===void 0||(p=O.onClick)===null||p===void 0||p.call(O,s);case 2:case"end":return P.stop()}},d)}));function o(d){return l.apply(this,arguments)}return o}()})):null},[T,C,B]),he=(0,v.useMemo)(function(){var l,o,d,s,O,p,G,P;return h.submitter===!1?!1:I()({searchConfig:{submitText:(l=(o=n==null?void 0:n.okText)!==null&&o!==void 0?o:(d=_.locale)===null||d===void 0||(s=d.Modal)===null||s===void 0?void 0:s.okText)!==null&&l!==void 0?l:"\u786E\u8BA4",resetText:(O=(p=n==null?void 0:n.cancelText)!==null&&p!==void 0?p:(G=_.locale)===null||G===void 0||(P=G.Modal)===null||P===void 0?void 0:P.cancelText)!==null&&O!==void 0?O:"\u53D6\u6D88"},resetButtonProps:{preventDefault:!0,disabled:y?J:void 0,onClick:function(ve){var te;T(!1),n==null||(te=n.onCancel)===null||te===void 0||te.call(n,ve)}}},h.submitter)},[(t=_.locale)===null||t===void 0||(E=t.Modal)===null||E===void 0?void 0:E.cancelText,(X=_.locale)===null||X===void 0||(L=X.Modal)===null||L===void 0?void 0:L.okText,n,h.submitter,T,J,y]),de=(0,v.useCallback)(function(l,o){return(0,g.jsxs)(g.Fragment,{children:[l,Q.current&&o?(0,g.jsx)(v.Fragment,{children:(0,K.createPortal)(o,Q.current)},"submitter"):o]})},[]),Ce=(0,v.useCallback)(function(){var l=(0,x.Z)((0,u.Z)().mark(function o(d){var s,O,p;return(0,u.Z)().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return s=i==null?void 0:i(d),y&&s instanceof Promise&&(ne(!0),O=setTimeout(function(){return ne(!1)},y),s.finally(function(){clearTimeout(O),ne(!1)})),P.next=4,s;case 4:return p=P.sent,p&&T(!1),P.abrupt("return",p);case 7:case"end":return P.stop()}},o)}));return function(o){return l.apply(this,arguments)}}(),[i,T,y]),ce=(0,Z.X)(B);return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(f.Z,(0,a.Z)((0,a.Z)((0,a.Z)({title:Y,width:w||800},n),ce),{},{onCancel:function(o){var d;y&&J||(T(!1),n==null||(d=n.onCancel)===null||d===void 0||d.call(n,o))},afterClose:function(){var o;me(),T(!1),n==null||(o=n.afterClose)===null||o===void 0||o.call(n)},footer:h.submitter!==!1?(0,g.jsx)("div",{ref:ue,style:{display:"flex",justifyContent:"flex-end"}}):null,children:(0,g.jsx)(A.I,(0,a.Z)((0,a.Z)({formComponentType:"ModalForm",layout:"vertical"},h),{},{onInit:function(o,d){var s;h.formRef&&(h.formRef.current=d),h==null||(s=h.onInit)===null||s===void 0||s.call(h,o,d),W.current=d},formRef:W,submitter:he,onFinish:function(){var l=(0,x.Z)((0,u.Z)().mark(function o(d){var s;return(0,u.Z)().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.next=2,Ce(d);case 2:return s=p.sent,p.abrupt("return",s);case 4:case"end":return p.stop()}},o)}));return function(o){return l.apply(this,arguments)}}(),contentRender:de,children:R}))})),pe]})}},40882:function(fe,b,e){e.d(b,{A:function(){return R}});var u=e(88351),x=e(84974),a=e(93236),D=e(96630),N=e(5424),Z=e(40749),U=e(67654),f=e(67817),j=e(71639),I=e(80128),V=e(50126),z=e(61385),v=e(84875),K=e.n(v),A=e(75986),g=e(16216),M=e(21983),k=function(r){var m;return(0,Z.Z)({},r.componentCls,{"&-title":{marginBlockEnd:r.marginXL,fontWeight:"bold"},"&-container":(0,Z.Z)({flexWrap:"wrap",maxWidth:"100%"},"> div".concat(r.antCls,"-space-item"),{maxWidth:"100%"}),"&-twoLine":(m={display:"block",width:"100%"},(0,Z.Z)(m,"".concat(r.componentCls,"-title"),{width:"100%",margin:"8px 0"}),(0,Z.Z)(m,"".concat(r.componentCls,"-container"),{paddingInlineStart:16}),(0,Z.Z)(m,"".concat(r.antCls,"-space-item,").concat(r.antCls,"-form-item"),{width:"100%"}),(0,Z.Z)(m,"".concat(r.antCls,"-form-item"),{"&-control":{display:"flex",alignItems:"center",justifyContent:"flex-end","&-input":{alignItems:"center",justifyContent:"flex-end","&-content":{flex:"none"}}}}),m)})};function c(C){return(0,M.Xj)("ProFormGroup",function(r){var m=(0,u.Z)((0,u.Z)({},r),{},{componentCls:".".concat(C)});return[k(m)]})}var t=e(62086),E=a.forwardRef(function(C,r){var m=a.useContext(A.Z),n=m.groupProps,i=(0,u.Z)((0,u.Z)({},n),C),y=i.children,Y=i.collapsible,w=i.defaultCollapsed,F=i.style,q=i.labelLayout,h=i.title,_=h===void 0?C.label:h,le=i.tooltip,re=i.align,ae=re===void 0?"start":re,ie=i.direction,ee=i.size,J=ee===void 0?32:ee,ne=i.titleStyle,se=i.titleRender,S=i.spaceProps,B=i.extra,T=i.autoFocus,Q=(0,j.Z)(function(){return w||!1},{value:C.collapsed,onChange:C.onCollapse}),ue=(0,U.Z)(Q,2),W=ue[0],me=ue[1],pe=(0,a.useContext)(V.ZP.ConfigContext),he=pe.getPrefixCls,de=(0,g.zx)(C),Ce=de.ColWrapper,ce=de.RowWrapper,l=he("pro-form-group"),o=c(l),d=o.wrapSSR,s=o.hashId,O=Y&&(0,t.jsx)(f.Z,{style:{marginInlineEnd:8},rotate:W?void 0:90}),p=(0,t.jsx)(I.G,{label:O?(0,t.jsxs)("div",{children:[O,_]}):_,tooltip:le}),G=(0,a.useCallback)(function(H){var oe=H.children;return(0,t.jsx)(z.Z,(0,u.Z)((0,u.Z)({},S),{},{className:K()("".concat(l,"-container ").concat(s),S==null?void 0:S.className),size:J,align:ae,direction:ie,style:(0,u.Z)({rowGap:0},S==null?void 0:S.style),children:oe}))},[ae,l,ie,s,J,S]),P=se?se(p,C):p,ge=(0,a.useMemo)(function(){var H=[],oe=a.Children.toArray(y).map(function($,Pe){var xe;return a.isValidElement($)&&$!==null&&$!==void 0&&(xe=$.props)!==null&&xe!==void 0&&xe.hidden?(H.push($),null):Pe===0&&a.isValidElement($)&&T?a.cloneElement($,(0,u.Z)((0,u.Z)({},$.props),{},{autoFocus:T})):$});return[(0,t.jsx)(ce,{Wrapper:G,children:oe},"children"),H.length>0?(0,t.jsx)("div",{style:{display:"none"},children:H}):null]},[y,ce,G,T]),ve=(0,U.Z)(ge,2),te=ve[0],Ee=ve[1];return d((0,t.jsx)(Ce,{children:(0,t.jsxs)("div",{className:K()(l,s,(0,Z.Z)({},"".concat(l,"-twoLine"),q==="twoLine")),style:F,ref:r,children:[Ee,(_||le||B)&&(0,t.jsx)("div",{className:"".concat(l,"-title ").concat(s).trim(),style:ne,onClick:function(){me(!W)},children:B?(0,t.jsxs)("div",{style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between"},children:[P,(0,t.jsx)("span",{onClick:function(oe){return oe.stopPropagation()},children:B})]}):P}),(0,t.jsx)("div",{style:{display:Y&&W?"none":void 0},children:te})]})}))});E.displayName="ProForm-Group";var X=E,L=e(9664);function R(C){return(0,t.jsx)(D.I,(0,u.Z)({layout:"vertical",submitter:{render:function(m,n){return n.reverse()}},contentRender:function(m,n){return(0,t.jsxs)(t.Fragment,{children:[m,n]})}},C))}R.Group=X,R.useForm=x.Z.useForm,R.Item=L.Z,R.useWatch=x.Z.useWatch,R.ErrorList=x.Z.ErrorList,R.Provider=x.Z.Provider,R.useFormInstance=x.Z.useFormInstance,R.EditOrReadOnlyContext=N.A},80128:function(fe,b,e){e.d(b,{G:function(){return k}});var u=e(88351),x=e(40749),a=e(52319),D=e(93236),N={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"},Z=N,U=e(85651),f=function(t,E){return D.createElement(U.Z,(0,a.Z)({},t,{ref:E,icon:Z}))},j=D.forwardRef(f),I=e(50126),V=e(87087),z=e(84875),v=e.n(z),K=e(21983),A=function(t){return(0,x.Z)({},t.componentCls,{display:"inline-flex",alignItems:"center",maxWidth:"100%","&-icon":{display:"block",marginInlineStart:"4px",cursor:"pointer","&:hover":{color:t.colorPrimary}},"&-title":{display:"inline-flex",flex:"1"},"&-subtitle ":{marginInlineStart:8,color:t.colorTextSecondary,fontWeight:"normal",fontSize:t.fontSize,whiteSpace:"nowrap"},"&-title-ellipsis":{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",wordBreak:"keep-all"}})};function g(c){return(0,K.Xj)("LabelIconTip",function(t){var E=(0,u.Z)((0,u.Z)({},t),{},{componentCls:".".concat(c)});return[A(E)]})}var M=e(62086),k=D.memo(function(c){var t=c.label,E=c.tooltip,X=c.ellipsis,L=c.subTitle,R=(0,D.useContext)(I.ZP.ConfigContext),C=R.getPrefixCls,r=C("pro-core-label-tip"),m=g(r),n=m.wrapSSR,i=m.hashId;if(!E&&!L)return(0,M.jsx)(M.Fragment,{children:t});var y=typeof E=="string"||D.isValidElement(E)?{title:E}:E,Y=(y==null?void 0:y.icon)||(0,M.jsx)(j,{});return n((0,M.jsxs)("div",{className:v()(r,i),onMouseDown:function(F){return F.stopPropagation()},onMouseLeave:function(F){return F.stopPropagation()},onMouseMove:function(F){return F.stopPropagation()},children:[(0,M.jsx)("div",{className:v()("".concat(r,"-title"),i,(0,x.Z)({},"".concat(r,"-title-ellipsis"),X)),children:t}),L&&(0,M.jsx)("div",{className:"".concat(r,"-subtitle ").concat(i).trim(),children:L}),E&&(0,M.jsx)(V.Z,(0,u.Z)((0,u.Z)({},y),{},{children:(0,M.jsx)("span",{className:"".concat(r,"-icon ").concat(i).trim(),children:Y})}))]}))})},41372:function(fe,b,e){e.r(b);var u=e(28931),x=e(61786),a=e(40882),D=e(36428),N=e(13912),Z=e(93236),U=e(81512),f=e(62086);b.default=function(j){var I=j.values,V=j.modalOpenState,z=j.onModalOpenState,v=j.onSubmit,K=j.permissionTreeData,A=(0,Z.useRef)();return(0,Z.useEffect)(function(){var g;(g=A.current)===null||g===void 0||g.setFieldsValue(I)},[I]),(0,f.jsx)(f.Fragment,{children:(0,f.jsxs)(u.Y,{title:"\u6743\u9650\u7BA1\u7406-\u7F16\u8F91",formRef:A,submitter:{searchConfig:{resetText:"\u91CD\u7F6E"},resetButtonProps:{onClick:function(){var M;(M=A.current)===null||M===void 0||M.resetFields()}}},initialValues:I,onFinish:v,open:V,onOpenChange:z,children:[(0,f.jsx)(x.Z,{hidden:!0,width:"md",name:"id"}),(0,f.jsxs)(a.A.Group,{children:[(0,f.jsx)(a.A.Item,{label:"\u9009\u62E9\u4E0A\u7EA7",name:"pid",style:{width:"220px"},children:(0,f.jsx)(N.Z,{defaultValue:I==null?void 0:I.pid,allowClear:!0,fieldNames:{value:"id",label:"name",children:"children"},treeDefaultExpandAll:!0,placeholder:"\u8BF7\u9009\u62E9\u4E0A\u7EA7",treeData:K})}),(0,f.jsx)(D.Z.Group,{name:"type",label:"\u7C7B\u578B",radioType:"button",options:[{label:"\u83DC\u5355\u6743\u9650",value:1},{label:"\u64CD\u4F5C\u6743\u9650",value:2}]})]}),(0,f.jsxs)(a.A.Group,{children:[(0,f.jsx)(x.Z,{rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u540D\u79F0!"}],width:"md",name:"name",label:"\u540D\u79F0",placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0"}),(0,f.jsx)(x.Z,{width:"md",name:"path",label:"\u8DEF\u5F84",placeholder:"\u8BF7\u8F93\u5165\u8DEF\u5F84"})]}),(0,f.jsxs)(a.A.Group,{children:[(0,f.jsx)(x.Z,{tooltip:"\u7531\u5C0F\u5230\u5927",width:"md",name:"sort",label:"\u6392\u5E8F",placeholder:"\u8BF7\u8F93\u5165\u6392\u5E8F"}),(0,f.jsx)(a.A.Item,{width:"md",name:"icon",label:"\u56FE\u6807",children:(0,f.jsx)(U.Z,{defaultValue:I.icon})})]})]})})}}}]);