Files
houyi-admin/dist/src__pages__manage__admin__components__CreateFormModal.aa8bb42c.async.js
PC-202306242200\Administrator 23dc139a31 first commit
2026-03-28 23:25:01 +08:00

2 lines
14 KiB
JavaScript

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1129,9254],{78033:function(X,I,e){e.d(I,{Z:function(){return F}});var n=e(52319),s=e(93236),l={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"},P=l,R=e(85651),E=function(O,y){return s.createElement(R.Z,(0,n.Z)({},O,{ref:y,icon:P}))},F=s.forwardRef(E)},17675:function(X,I,e){e.d(I,{Z:function(){return F}});var n=e(52319),s=e(93236),l={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"},P=l,R=e(85651),E=function(O,y){return s.createElement(R.Z,(0,n.Z)({},O,{ref:y,icon:P}))},F=s.forwardRef(E)},36428:function(X,I,e){var n=e(88351),s=e(87841),l=e(993),P=e(96268),R=e(93236),E=e(90040),F=e(8263),i=e(62086),O=["fieldProps","options","radioType","layout","proFieldProps","valueEnum"],y=R.forwardRef(function(h,T){var u=h.fieldProps,C=h.options,Y=h.radioType,v=h.layout,r=h.proFieldProps,Z=h.valueEnum,$=(0,s.Z)(h,O);return(0,i.jsx)(F.Z,(0,n.Z)((0,n.Z)({valueType:Y==="button"?"radioButton":"radio",ref:T,valueEnum:(0,l.h)(Z,void 0)},$),{},{fieldProps:(0,n.Z)({options:C,layout:v},u),proFieldProps:r,filedConfig:{customLightMode:!0}}))}),W=R.forwardRef(function(h,T){var u=h.fieldProps,C=h.children;return(0,i.jsx)(P.ZP,(0,n.Z)((0,n.Z)({},u),{},{ref:T,children:C}))}),U=(0,E.G)(W,{valuePropName:"checked",ignoreWidth:!0}),t=U;t.Group=y,t.Button=P.ZP.Button,t.displayName="ProFormComponent",I.Z=t},61786:function(X,I,e){var n=e(88351),s=e(87841),l=e(93236),P=e(8263),R=e(62086),E=["fieldProps","proFieldProps"],F=["fieldProps","proFieldProps"],i="text",O=function(t){var h=t.fieldProps,T=t.proFieldProps,u=(0,s.Z)(t,E);return(0,R.jsx)(P.Z,(0,n.Z)({valueType:i,fieldProps:h,filedConfig:{valueType:i},proFieldProps:T},u))},y=function(t){var h=t.fieldProps,T=t.proFieldProps,u=(0,s.Z)(t,F);return(0,R.jsx)(P.Z,(0,n.Z)({valueType:"password",fieldProps:h,proFieldProps:T,filedConfig:{valueType:i}},u))},W=O;W.Password=y,W.displayName="ProFormComponent",I.Z=W},28931:function(X,I,e){e.d(I,{Y:function(){return Y}});var n=e(99177),s=e(42700),l=e(88351),P=e(67654),R=e(87841),E=e(29320),F=e(50126),i=e(92750),O=e(72266),y=e.n(O),W=e(71639),U=e(24599),t=e(93236),h=e(19103),T=e(96630),u=e(62086),C=["children","trigger","onVisibleChange","onOpenChange","modalProps","onFinish","submitTimeout","title","width","visible","open"];function Y(v){var r,Z,$,b,L=v.children,D=v.trigger,c=v.onVisibleChange,M=v.onOpenChange,o=v.modalProps,m=v.onFinish,B=v.submitTimeout,Q=v.title,w=v.width,A=v.visible,ee=v.open,g=(0,R.Z)(v,C);(0,U.ET)(!g.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 N=(0,t.useContext)(F.ZP.ConfigContext),le=(0,t.useState)([]),ae=(0,P.Z)(le,2),ie=ae[1],se=(0,t.useState)(!1),ne=(0,P.Z)(se,2),k=ne[0],oe=ne[1],de=(0,W.Z)(!!A,{value:ee||A,onChange:M||c}),K=(0,P.Z)(de,2),z=K[0],S=K[1],q=(0,t.useRef)(null),ue=(0,t.useCallback)(function(d){q.current===null&&d&&ie([]),q.current=d},[]),G=(0,t.useRef)(),pe=(0,t.useCallback)(function(){var d,a,f,p=(d=(a=g.form)!==null&&a!==void 0?a:(f=g.formRef)===null||f===void 0?void 0:f.current)!==null&&d!==void 0?d:G.current;p&&o!==null&&o!==void 0&&o.destroyOnClose&&p.resetFields()},[o==null?void 0:o.destroyOnClose,g.form,g.formRef]);(0,t.useImperativeHandle)(g.formRef,function(){return G.current},[G.current]),(0,t.useEffect)(function(){z&&(ee||A)&&(M==null||M(!0),c==null||c(!0))},[A,ee,z]);var fe=(0,t.useMemo)(function(){return D?t.cloneElement(D,(0,l.Z)((0,l.Z)({key:"trigger"},D.props),{},{onClick:function(){var d=(0,s.Z)((0,n.Z)().mark(function f(p){var j,x;return(0,n.Z)().wrap(function(_){for(;;)switch(_.prev=_.next){case 0:S(!z),(j=D.props)===null||j===void 0||(x=j.onClick)===null||x===void 0||x.call(j,p);case 2:case"end":return _.stop()}},f)}));function a(f){return d.apply(this,arguments)}return a}()})):null},[S,D,z]),Pe=(0,t.useMemo)(function(){var d,a,f,p,j,x,H,_;return g.submitter===!1?!1:y()({searchConfig:{submitText:(d=(a=o==null?void 0:o.okText)!==null&&a!==void 0?a:(f=N.locale)===null||f===void 0||(p=f.Modal)===null||p===void 0?void 0:p.okText)!==null&&d!==void 0?d:"\u786E\u8BA4",resetText:(j=(x=o==null?void 0:o.cancelText)!==null&&x!==void 0?x:(H=N.locale)===null||H===void 0||(_=H.Modal)===null||_===void 0?void 0:_.cancelText)!==null&&j!==void 0?j:"\u53D6\u6D88"},resetButtonProps:{preventDefault:!0,disabled:B?k:void 0,onClick:function(me){var te;S(!1),o==null||(te=o.onCancel)===null||te===void 0||te.call(o,me)}}},g.submitter)},[(r=N.locale)===null||r===void 0||(Z=r.Modal)===null||Z===void 0?void 0:Z.cancelText,($=N.locale)===null||$===void 0||(b=$.Modal)===null||b===void 0?void 0:b.okText,o,g.submitter,S,k,B]),ce=(0,t.useCallback)(function(d,a){return(0,u.jsxs)(u.Fragment,{children:[d,q.current&&a?(0,u.jsx)(t.Fragment,{children:(0,h.createPortal)(a,q.current)},"submitter"):a]})},[]),he=(0,t.useCallback)(function(){var d=(0,s.Z)((0,n.Z)().mark(function a(f){var p,j,x;return(0,n.Z)().wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return p=m==null?void 0:m(f),B&&p instanceof Promise&&(oe(!0),j=setTimeout(function(){return oe(!1)},B),p.finally(function(){clearTimeout(j),oe(!1)})),_.next=4,p;case 4:return x=_.sent,x&&S(!1),_.abrupt("return",x);case 7:case"end":return _.stop()}},a)}));return function(a){return d.apply(this,arguments)}}(),[m,S,B]),ve=(0,E.X)(z);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(i.Z,(0,l.Z)((0,l.Z)((0,l.Z)({title:Q,width:w||800},o),ve),{},{onCancel:function(a){var f;B&&k||(S(!1),o==null||(f=o.onCancel)===null||f===void 0||f.call(o,a))},afterClose:function(){var a;pe(),S(!1),o==null||(a=o.afterClose)===null||a===void 0||a.call(o)},footer:g.submitter!==!1?(0,u.jsx)("div",{ref:ue,style:{display:"flex",justifyContent:"flex-end"}}):null,children:(0,u.jsx)(T.I,(0,l.Z)((0,l.Z)({formComponentType:"ModalForm",layout:"vertical"},g),{},{onInit:function(a,f){var p;g.formRef&&(g.formRef.current=f),g==null||(p=g.onInit)===null||p===void 0||p.call(g,a,f),G.current=f},formRef:G,submitter:Pe,onFinish:function(){var d=(0,s.Z)((0,n.Z)().mark(function a(f){var p;return(0,n.Z)().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return x.next=2,he(f);case 2:return p=x.sent,x.abrupt("return",p);case 4:case"end":return x.stop()}},a)}));return function(a){return d.apply(this,arguments)}}(),contentRender:ce,children:L}))})),fe]})}},40882:function(X,I,e){e.d(I,{A:function(){return L}});var n=e(88351),s=e(84974),l=e(93236),P=e(96630),R=e(5424),E=e(40749),F=e(67654),i=e(67817),O=e(71639),y=e(80128),W=e(50126),U=e(61385),t=e(84875),h=e.n(t),T=e(75986),u=e(16216),C=e(21983),Y=function(c){var M;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":(M={display:"block",width:"100%"},(0,E.Z)(M,"".concat(c.componentCls,"-title"),{width:"100%",margin:"8px 0"}),(0,E.Z)(M,"".concat(c.componentCls,"-container"),{paddingInlineStart:16}),(0,E.Z)(M,"".concat(c.antCls,"-space-item,").concat(c.antCls,"-form-item"),{width:"100%"}),(0,E.Z)(M,"".concat(c.antCls,"-form-item"),{"&-control":{display:"flex",alignItems:"center",justifyContent:"flex-end","&-input":{alignItems:"center",justifyContent:"flex-end","&-content":{flex:"none"}}}}),M)})};function v(D){return(0,C.Xj)("ProFormGroup",function(c){var M=(0,n.Z)((0,n.Z)({},c),{},{componentCls:".".concat(D)});return[Y(M)]})}var r=e(62086),Z=l.forwardRef(function(D,c){var M=l.useContext(T.Z),o=M.groupProps,m=(0,n.Z)((0,n.Z)({},o),D),B=m.children,Q=m.collapsible,w=m.defaultCollapsed,A=m.style,ee=m.labelLayout,g=m.title,N=g===void 0?D.label:g,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,K=m.spaceProps,z=m.extra,S=m.autoFocus,q=(0,O.Z)(function(){return w||!1},{value:D.collapsed,onChange:D.onCollapse}),ue=(0,F.Z)(q,2),G=ue[0],pe=ue[1],fe=(0,l.useContext)(W.ZP.ConfigContext),Pe=fe.getPrefixCls,ce=(0,u.zx)(D),he=ce.ColWrapper,ve=ce.RowWrapper,d=Pe("pro-form-group"),a=v(d),f=a.wrapSSR,p=a.hashId,j=Q&&(0,r.jsx)(i.Z,{style:{marginInlineEnd:8},rotate:G?void 0:90}),x=(0,r.jsx)(y.G,{label:j?(0,r.jsxs)("div",{children:[j,N]}):N,tooltip:le}),H=(0,l.useCallback)(function(J){var re=J.children;return(0,r.jsx)(U.Z,(0,n.Z)((0,n.Z)({},K),{},{className:h()("".concat(d,"-container ").concat(p),K==null?void 0:K.className),size:k,align:ie,direction:se,style:(0,n.Z)({rowGap:0},K==null?void 0:K.style),children:re}))},[ie,d,se,p,k,K]),_=de?de(x,D):x,Ee=(0,l.useMemo)(function(){var J=[],re=l.Children.toArray(B).map(function(V,xe){var Ce;return l.isValidElement(V)&&V!==null&&V!==void 0&&(Ce=V.props)!==null&&Ce!==void 0&&Ce.hidden?(J.push(V),null):xe===0&&l.isValidElement(V)&&S?l.cloneElement(V,(0,n.Z)((0,n.Z)({},V.props),{},{autoFocus:S})):V});return[(0,r.jsx)(ve,{Wrapper:H,children:re},"children"),J.length>0?(0,r.jsx)("div",{style:{display:"none"},children:J}):null]},[B,ve,H,S]),me=(0,F.Z)(Ee,2),te=me[0],Me=me[1];return f((0,r.jsx)(he,{children:(0,r.jsxs)("div",{className:h()(d,p,(0,E.Z)({},"".concat(d,"-twoLine"),ee==="twoLine")),style:A,ref:c,children:[Me,(N||le||z)&&(0,r.jsx)("div",{className:"".concat(d,"-title ").concat(p).trim(),style:oe,onClick:function(){pe(!G)},children:z?(0,r.jsxs)("div",{style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between"},children:[_,(0,r.jsx)("span",{onClick:function(re){return re.stopPropagation()},children:z})]}):_}),(0,r.jsx)("div",{style:{display:Q&&G?"none":void 0},children:te})]})}))});Z.displayName="ProForm-Group";var $=Z,b=e(9664);function L(D){return(0,r.jsx)(P.I,(0,n.Z)({layout:"vertical",submitter:{render:function(M,o){return o.reverse()}},contentRender:function(M,o){return(0,r.jsxs)(r.Fragment,{children:[M,o]})}},D))}L.Group=$,L.useForm=s.Z.useForm,L.Item=b.Z,L.useWatch=s.Z.useWatch,L.ErrorList=s.Z.ErrorList,L.Provider=s.Z.Provider,L.useFormInstance=s.Z.useFormInstance,L.EditOrReadOnlyContext=R.A},80128:function(X,I,e){e.d(I,{G:function(){return Y}});var n=e(88351),s=e(40749),l=e(52319),P=e(93236),R={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=R,F=e(85651),i=function(r,Z){return P.createElement(F.Z,(0,l.Z)({},r,{ref:Z,icon:E}))},O=P.forwardRef(i),y=e(50126),W=e(87087),U=e(84875),t=e.n(U),h=e(21983),T=function(r){return(0,s.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 u(v){return(0,h.Xj)("LabelIconTip",function(r){var Z=(0,n.Z)((0,n.Z)({},r),{},{componentCls:".".concat(v)});return[T(Z)]})}var C=e(62086),Y=P.memo(function(v){var r=v.label,Z=v.tooltip,$=v.ellipsis,b=v.subTitle,L=(0,P.useContext)(y.ZP.ConfigContext),D=L.getPrefixCls,c=D("pro-core-label-tip"),M=u(c),o=M.wrapSSR,m=M.hashId;if(!Z&&!b)return(0,C.jsx)(C.Fragment,{children:r});var B=typeof Z=="string"||P.isValidElement(Z)?{title:Z}:Z,Q=(B==null?void 0:B.icon)||(0,C.jsx)(O,{});return o((0,C.jsxs)("div",{className:t()(c,m),onMouseDown:function(A){return A.stopPropagation()},onMouseLeave:function(A){return A.stopPropagation()},onMouseMove:function(A){return A.stopPropagation()},children:[(0,C.jsx)("div",{className:t()("".concat(c,"-title"),m,(0,s.Z)({},"".concat(c,"-title-ellipsis"),$)),children:r}),b&&(0,C.jsx)("div",{className:"".concat(c,"-subtitle ").concat(m).trim(),children:b}),Z&&(0,C.jsx)(W.Z,(0,n.Z)((0,n.Z)({},B),{},{children:(0,C.jsx)("span",{className:"".concat(c,"-icon ").concat(m).trim(),children:Q})}))]}))})},44593:function(X,I,e){e.r(I);var n=e(28931),s=e(61786),l=e(40882),P=e(36428),R=e(33045),E=e(93236),F=e(48970),i=e(62086);I.default=function(O){var y=O.values,W=O.modalOpenState,U=O.onModalOpenState,t=O.onSubmit,h=O.permissionTreeData,T=(0,E.useRef)();return(0,E.useEffect)(function(){var u;(u=T.current)===null||u===void 0||u.setFieldsValue(y)},[y]),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(n.Y,{title:"\u7BA1\u7406\u5458-\u6DFB\u52A0",formRef:T,submitter:{searchConfig:{resetText:"\u91CD\u7F6E"},resetButtonProps:{onClick:function(){var C;(C=T.current)===null||C===void 0||C.resetFields()}}},initialValues:y,onFinish:t,open:W,onOpenChange:U,children:[(0,i.jsx)(s.Z,{hidden:!0,width:"md",name:"id"}),(0,i.jsxs)(l.A.Group,{children:[(0,i.jsx)(s.Z,{rules:[{required:!0,message:"\u8BF7\u8F93\u5165"}],width:"md",name:"mobile",label:"\u624B\u673A\u53F7",placeholder:"\u8BF7\u8F93\u5165"}),(0,i.jsx)(s.Z.Password,{rules:[{required:!0,message:"\u8BF7\u8F93\u5165"}],width:"md",name:"password",label:"\u5BC6\u7801",placeholder:"\u8BF7\u8F93\u5165"})]}),(0,i.jsxs)(l.A.Group,{children:[(0,i.jsx)(s.Z,{rules:[{required:!0,message:"\u8BF7\u8F93\u5165"}],width:"md",name:"nickname",label:"\u6635\u79F0",placeholder:"\u8BF7\u8F93\u5165"}),(0,i.jsx)(l.A.Item,{label:"\u5934\u50CF",name:"avatar",children:(0,i.jsx)(F.Z,{fileType:"image",defaultValue:"",count:1,mode:""})})]}),(0,i.jsx)(P.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)(l.A.Item,{label:"\u8BBE\u7F6E\u6743\u9650",name:"permission_ids",children:(0,i.jsx)(R.Z,{checkable:!0,multiple:!0,showLine:!0,showIcon:!1,defaultExpandAll:!0,onCheck:function(C){console.log(C),T.current.setFieldsValue({permission_ids:C})},fieldNames:{title:"name",key:"id"},treeData:h})})]})})}}}]);