2 lines
12 KiB
JavaScript
2 lines
12 KiB
JavaScript
(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[54530],{63434:function(B,g,e){"use strict";var a=e(63185),u=e(9676),t=e(28991),n=e(81253),v=e(85893),i=e(22270),l=e(67294),_=e(64893),m=e(47869),C=["options","fieldProps","proFieldProps","valueEnum"],M=l.forwardRef(function(o,h){var d=o.options,r=o.fieldProps,T=o.proFieldProps,R=o.valueEnum,Z=(0,n.Z)(o,C);return(0,v.jsx)(m.Z,(0,t.Z)({ref:h,valueType:"checkbox",valueEnum:(0,i.h)(R,void 0),fieldProps:(0,t.Z)({options:d},r),lightProps:(0,t.Z)({labelFormatter:function(){return(0,v.jsx)(m.Z,(0,t.Z)({ref:h,valueType:"checkbox",mode:"read",valueEnum:(0,i.h)(R,void 0),filedConfig:{customLightMode:!0},fieldProps:(0,t.Z)({options:d},r),proFieldProps:T},Z))}},Z.lightProps),proFieldProps:T},Z))}),c=l.forwardRef(function(o,h){var d=o.fieldProps,r=o.children;return(0,v.jsx)(u.Z,(0,t.Z)((0,t.Z)({ref:h},d),{},{children:r}))}),D=(0,_.G)(c,{valuePropName:"checked"}),P=D;P.Group=M,g.Z=P},31199:function(B,g,e){"use strict";var a=e(28991),u=e(81253),t=e(85893),n=e(67294),v=e(47869),i=["fieldProps","min","proFieldProps","max"],l=function(m,C){var M=m.fieldProps,c=m.min,D=m.proFieldProps,P=m.max,o=(0,u.Z)(m,i);return(0,t.jsx)(v.Z,(0,a.Z)({valueType:"digit",fieldProps:(0,a.Z)({min:c,max:P},M),ref:C,filedConfig:{defaultProps:{width:"100%"}},proFieldProps:D},o))};g.Z=n.forwardRef(l)},64317:function(B,g,e){"use strict";var a=e(28991),u=e(81253),t=e(85893),n=e(22270),v=e(67294),i=e(66758),l=e(47869),_=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","showSearch","options"],m=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","options"],C=v.forwardRef(function(o,h){var d=o.fieldProps,r=o.children,T=o.params,R=o.proFieldProps,Z=o.mode,W=o.valueEnum,s=o.request,f=o.showSearch,O=o.options,y=(0,u.Z)(o,_),x=(0,v.useContext)(i.Z);return(0,t.jsx)(l.Z,(0,a.Z)((0,a.Z)({valueEnum:(0,n.h)(W),request:s,params:T,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,a.Z)({options:O,mode:Z,showSearch:f,getPopupContainer:x.getPopupContainer},d),ref:h,proFieldProps:R},y),{},{children:r}))}),M=v.forwardRef(function(o,h){var d=o.fieldProps,r=o.children,T=o.params,R=o.proFieldProps,Z=o.mode,W=o.valueEnum,s=o.request,f=o.options,O=(0,u.Z)(o,m),y=(0,a.Z)({options:f,mode:Z||"multiple",labelInValue:!0,showSearch:!0,showArrow:!1,autoClearSearchValue:!0,optionLabelProp:"label"},d),x=(0,v.useContext)(i.Z);return(0,t.jsx)(l.Z,(0,a.Z)((0,a.Z)({valueEnum:(0,n.h)(W),request:s,params:T,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,a.Z)({getPopupContainer:x.getPopupContainer},y),ref:h,proFieldProps:R},O),{},{children:r}))}),c=C,D=M,P=c;P.SearchSelect=D,P.displayName="ProFormComponent",g.Z=P},52688:function(B,g,e){"use strict";var a=e(28991),u=e(81253),t=e(85893),n=e(67294),v=e(47869),i=["fieldProps","unCheckedChildren","checkedChildren","proFieldProps"],l=n.forwardRef(function(_,m){var C=_.fieldProps,M=_.unCheckedChildren,c=_.checkedChildren,D=_.proFieldProps,P=(0,u.Z)(_,i);return(0,t.jsx)(v.Z,(0,a.Z)({valueType:"switch",fieldProps:(0,a.Z)({unCheckedChildren:M,checkedChildren:c},C),ref:m,valuePropName:"checked",proFieldProps:D,filedConfig:{valuePropName:"checked",ignoreWidth:!0}},P))});g.Z=l},5966:function(B,g,e){"use strict";var a=e(28991),u=e(81253),t=e(85893),n=e(47869),v=["fieldProps","proFieldProps"],i=["fieldProps","proFieldProps"],l="text",_=function(c){var D=c.fieldProps,P=c.proFieldProps,o=(0,u.Z)(c,v);return(0,t.jsx)(n.Z,(0,a.Z)({valueType:l,fieldProps:D,filedConfig:{valueType:l},proFieldProps:P},o))},m=function(c){var D=c.fieldProps,P=c.proFieldProps,o=(0,u.Z)(c,i);return(0,t.jsx)(n.Z,(0,a.Z)({valueType:"password",fieldProps:D,proFieldProps:P,filedConfig:{valueType:l}},o))},C=_;C.Password=m,C.displayName="ProFormComponent",g.Z=C},5894:function(B,g,e){"use strict";e.d(g,{A:function(){return f}});var a=e(9715),u=e(55843),t=e(28991),n=e(85893),v=e(42489),i=e(96156),l=e(49111),_=e(19650),m=e(84305),C=e(39559),M=e(28481),c=e(8812),D=e(56725),P=e(53621),o=e(94184),h=e.n(o),d=e(67294),r=e(66758),T=e(2514),R=e(96138),Z=d.forwardRef(function(O,y){var x=d.useContext(r.Z),S=x.groupProps,E=(0,t.Z)((0,t.Z)({},S),O),q=E.children,H=E.collapsible,Y=E.defaultCollapsed,ee=E.style,oe=E.labelLayout,J=E.title,I=J===void 0?O.label:J,Q=E.tooltip,p=E.align,U=p===void 0?"start":p,A=E.direction,L=E.size,F=L===void 0?32:L,V=E.titleStyle,z=E.titleRender,j=E.spaceProps,N=E.extra,G=E.autoFocus,K=(0,D.Z)(function(){return Y||!1},{value:O.collapsed,onChange:O.onCollapse}),se=(0,M.Z)(K,2),$=se[0],ue=se[1],_e=(0,d.useContext)(C.ZP.ConfigContext),me=_e.getPrefixCls,te=(0,T.zx)(O),ce=te.ColWrapper,ne=te.RowWrapper,X=me("pro-form-group"),ae=H&&(0,n.jsx)(c.Z,{style:{marginRight:8},rotate:$?void 0:90}),ie=(0,n.jsx)(P.Z,{label:ae?(0,n.jsxs)("div",{children:[ae,I]}):I,tooltip:Q}),le=(0,d.useCallback)(function(w){var k=w.children;return(0,n.jsx)(_.Z,(0,t.Z)((0,t.Z)({},j),{},{className:h()("".concat(X,"-container"),j==null?void 0:j.className),size:F,align:U,direction:A,style:(0,t.Z)({rowGap:0},j==null?void 0:j.style),children:k}))},[U,X,A,F,j]),de=z?z(ie,O):ie,ve=(0,d.useMemo)(function(){var w=[],k=d.Children.toArray(q).map(function(b,Ee){var re;return d.isValidElement(b)&&(b==null||(re=b.props)===null||re===void 0?void 0:re.hidden)?(w.push(b),null):Ee===0&&d.isValidElement(b)&&G?d.cloneElement(b,(0,t.Z)((0,t.Z)({},b.props),{},{autoFocus:G})):b});return[(0,n.jsx)(ne,{Wrapper:le,children:k},"children"),w.length>0?(0,n.jsx)("div",{style:{display:"none"},children:w}):null]},[q,ne,le,G]),pe=(0,M.Z)(ve,2),Pe=pe[0],fe=pe[1];return(0,n.jsx)(ce,{children:(0,n.jsxs)("div",{className:h()(X,(0,i.Z)({},"".concat(X,"-twoLine"),oe==="twoLine")),style:ee,ref:y,children:[fe,(I||Q||N)&&(0,n.jsx)("div",{className:"".concat(X,"-title"),style:V,onClick:function(){ue(!$)},children:N?(0,n.jsxs)("div",{style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between"},children:[de,(0,n.jsx)("span",{onClick:function(k){return k.stopPropagation()},children:N})]}):de}),H&&$?null:Pe]})})});Z.displayName="ProForm-Group";var W=Z,s=e(7525);function f(O){return(0,n.jsx)(v.I,(0,t.Z)({layout:"vertical",submitter:{render:function(x,S){return S.reverse()}},contentRender:function(x,S){return(0,n.jsxs)(n.Fragment,{children:[x,S]})}},O))}f.Group=W,f.useForm=u.Z.useForm,f.Item=s.Z,f.useWatch=u.Z.useWatch,f.ErrorList=u.Z.ErrorList,f.Provider=u.Z.Provider,f.useFormInstance=u.Z.useFormInstance},53621:function(B,g,e){"use strict";var a=e(28991),u=e(22385),t=e(45777),n=e(96156),v=e(84305),i=e(39559),l=e(85893),_=e(68628),m=e(94184),C=e.n(m),M=e(67294),c=e(47369),D=e.n(c),P=function(h){var d=h.label,r=h.tooltip,T=h.ellipsis,R=h.subTitle,Z=(0,M.useContext)(i.ZP.ConfigContext),W=Z.getPrefixCls;if(!r&&!R)return(0,l.jsx)(l.Fragment,{children:d});var s=W("pro-core-label-tip"),f=typeof r=="string"||M.isValidElement(r)?{title:r}:r,O=(f==null?void 0:f.icon)||(0,l.jsx)(_.Z,{});return(0,l.jsxs)("div",{className:s,onMouseDown:function(x){return x.stopPropagation()},onMouseLeave:function(x){return x.stopPropagation()},onMouseMove:function(x){return x.stopPropagation()},children:[(0,l.jsx)("div",{className:C()("".concat(s,"-title"),(0,n.Z)({},"".concat(s,"-title-ellipsis"),T)),children:d}),R&&(0,l.jsx)("div",{className:"".concat(s,"-subtitle"),children:R}),r&&(0,l.jsx)(t.Z,(0,a.Z)((0,a.Z)({},f),{},{children:(0,l.jsx)("span",{className:"".concat(s,"-icon"),children:O})}))]})};g.Z=M.memo(P)},19273:function(B,g,e){"use strict";e.d(g,{Z:function(){return a}});function a(u){if(u==null)throw new TypeError("Cannot destructure undefined")}},18915:function(B){B.exports={WarningBox:"WarningBox___1vjjp"}},96138:function(){},47369:function(){},7446:function(B,g,e){"use strict";e.r(g);var a=e(39428),u=e(34792),t=e(48086),n=e(3182),v=e(2824),i=e(11849),l=e(19273),_=e(67294),m=e(30672),C=e(5894),M=e(52688),c=e(63434),D=e(31199),P=e(64317),o=e(5966),h=e(18915),d=e.n(h),r=e(85893),T="personal",R=Z=>{(0,l.Z)(Z);var W=(0,_.useRef)(),s=(0,m.YB)(),f=(0,m.I0)(),O=(0,m.v9)(p=>(0,i.Z)((0,i.Z)({},p[T]),{},{loading:p.loading.effects["".concat(T,"/setMsgWarning")]})),y=O.loading,x=y===void 0?!1:y,S=O.msgWarning,E=S===void 0?{}:S,q=(0,_.useState)(!1),H=(0,v.Z)(q,2),Y=H[0],ee=H[1],oe=(0,_.useState)([]),J=(0,v.Z)(oe,2),I=J[0],Q=J[1];return(0,_.useEffect)(()=>{f({type:"".concat(T,"/getMsgWarning"),callback:p=>{var U,A,L,F;p.enable=="1"&&ee(!0),Q(p.sendType==""?[]:(U=p.sendType)===null||U===void 0?void 0:U.split(",")),W==null||(A=W.current)===null||A===void 0||A.setFieldsValue((0,i.Z)((0,i.Z)({},p),{},{enable:(p==null?void 0:p.enable)=="1",warnType:p.warnType==""?[]:(L=p.warnType)===null||L===void 0?void 0:L.split(","),sendType:p.sendType==""?[]:(F=p.sendType)===null||F===void 0?void 0:F.split(",")}))}})},[]),(0,r.jsx)("div",{className:"layoutBox",children:(0,r.jsxs)("div",{className:d().WarningBox,children:[(0,r.jsx)("h4",{className:"selfTitle borderBtm",children:s.formatMessage({id:"app.settings.notification.setting"})}),(0,r.jsxs)(C.A,{formRef:W,className:d().warringForm,submitter:{submitButtonProps:{loading:x,style:{marginLeft:-8}},resetButtonProps:{style:{display:"none"}}},onFinish:function(){var p=(0,n.Z)((0,a.Z)().mark(function U(A){var L,F,V,z,j,N,G,K;return(0,a.Z)().wrap(function($){for(;;)switch($.prev=$.next){case 0:L=A!=null?A:{},F=L.sendType,V=F===void 0?[]:F,z=L.warnType,j=z===void 0?[]:z,N=L.dingUrl,G=L.wechatUrl,K={enable:Y?1:0},Y?K=(0,i.Z)((0,i.Z)((0,i.Z)({},A),K),{},{id:E==null?void 0:E.id,sendType:V==null?void 0:V.join(","),warnType:j==null?void 0:j.join(","),dingUrl:N==null?void 0:N.trim(),wechatUrl:G==null?void 0:G.trim()}):K=(0,i.Z)((0,i.Z)({},E),K),console.log("---values",K),f({type:"".concat(T,"/setMsgWarning"),payload:K,callback:()=>{t.ZP.success(s.formatMessage({id:"explorer.saveSuccess"}))}});case 5:case"end":return $.stop()}},U)}));return function(U){return p.apply(this,arguments)}}(),children:[(0,r.jsx)(M.Z,{name:"enable",label:s.formatMessage({id:"app.settings.notification.warning"}),addonAfter:(0,r.jsx)("span",{className:"selfAddonAfter",children:s.formatMessage({id:"app.settings.notification.warningDesc"})}),fieldProps:{onChange:p=>ee(p)}}),Y&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.Z.Group,{name:"warnType",label:s.formatMessage({id:"app.settings.notification.warningType"}),rules:[{required:!0,message:s.formatMessage({id:"explorer.notNull"})}],options:[{label:s.formatMessage({id:"app.settings.notification.warningTypeCpu"}),value:"cpu"},{label:s.formatMessage({id:"app.settings.notification.warningTypeMemory"}),value:"mem"},{label:s.formatMessage({id:"app.settings.notification.warningTypeFile"}),value:"du"}]}),(0,r.jsx)(D.Z,{name:"useRatio",label:s.formatMessage({id:"admin.index.fileRatio"}),rules:[{required:!0,message:s.formatMessage({id:"explorer.notNull"})}],min:10,max:100,addonAfter:(0,r.jsx)("span",{className:"selfAddonAfter",style:{marginLeft:34},children:s.formatMessage({id:"app.settings.notification.usageRatio"})}),fieldProps:{addonAfter:"%",precision:0}}),(0,r.jsx)(D.Z,{name:"useTime",label:s.formatMessage({id:"app.settings.notification.duration"}),rules:[{required:!0,message:s.formatMessage({id:"explorer.notNull"})}],min:1,addonAfter:(0,r.jsx)("span",{className:"selfAddonAfter",children:s.formatMessage({id:"app.settings.notification.durationExceeds"})}),fieldProps:{precision:0}}),(0,r.jsx)(P.Z,{style:{width:240},name:"sendType",label:s.formatMessage({id:"app.settings.notification.sendMode"}),rules:[{required:!0,message:s.formatMessage({id:"explorer.notNull"})}],mode:"multiple",options:[{label:s.formatMessage({id:"app.settings.notification.dingTalkRobot"}),value:"ding"},{label:s.formatMessage({id:"app.settings.notification.weComRobot"}),value:"wechat"}],fieldProps:{showArrow:!0,onChange:p=>Q(p)}}),(0,r.jsx)("span",{className:"requiredicon",children:"*"}),s.formatMessage({id:"app.settings.notification.sendTarget"})," ",(0,r.jsx)(o.Z,{name:"dingUrl",disabled:I.indexOf("ding")==-1,rules:[{required:I.indexOf("ding")!==-1,whitespace:(I.indexOf("ding")!==-1,!0),message:s.formatMessage({id:"explorer.notNull"})}],placeholder:s.formatMessage({id:"app.settings.notification.dingTalkRobotInput"}),addonBefore:s.formatMessage({id:"app.settings.notification.dingTalkRobot"}),fieldProps:{className:"formMd"}}),(0,r.jsx)(o.Z,{name:"wechatUrl",disabled:I.indexOf("wechat")==-1,rules:[{required:I.indexOf("wechat")!==-1,whitespace:I.indexOf("wechat")!==-1,message:s.formatMessage({id:"explorer.notNull"})}],placeholder:s.formatMessage({id:"app.settings.notification.weComRobotInput"}),addonBefore:s.formatMessage({id:"app.settings.notification.weComRobot"}),fieldProps:{className:"formMd"}})]})]})]})})};g.default=R}}]);
|