Some checks failed
Node CI / build (14.x, macOS-latest) (push) Has been cancelled
Node CI / build (14.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (14.x, windows-latest) (push) Has been cancelled
Node CI / build (16.x, macOS-latest) (push) Has been cancelled
Node CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (16.x, windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
coverage CI / build (push) Has been cancelled
Node pnpm CI / build (16.x, macOS-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, windows-latest) (push) Has been cancelled
2 lines
9.9 KiB
JavaScript
2 lines
9.9 KiB
JavaScript
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[4095,7476],{64317:function(N,A,e){var p=e(1413),f=e(91),O=e(22270),R=e(67294),j=e(66758),W=e(43495),b=e(85893),S=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","showSearch","options"],T=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","options"],D=function(h,t){var u=h.fieldProps,o=h.children,n=h.params,g=h.proFieldProps,c=h.mode,I=h.valueEnum,E=h.request,r=h.showSearch,d=h.options,F=(0,f.Z)(h,S),Z=(0,R.useContext)(j.Z);return(0,b.jsx)(W.Z,(0,p.Z)((0,p.Z)({valueEnum:(0,O.h)(I),request:E,params:n,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,p.Z)({options:d,mode:c,showSearch:r,getPopupContainer:Z.getPopupContainer},u),ref:t,proFieldProps:g},F),{},{children:o}))},y=R.forwardRef(function(s,h){var t=s.fieldProps,u=s.children,o=s.params,n=s.proFieldProps,g=s.mode,c=s.valueEnum,I=s.request,E=s.options,r=(0,f.Z)(s,T),d=(0,p.Z)({options:E,mode:g||"multiple",labelInValue:!0,showSearch:!0,suffixIcon:null,autoClearSearchValue:!0,optionLabelProp:"label"},t),F=(0,R.useContext)(j.Z);return(0,b.jsx)(W.Z,(0,p.Z)((0,p.Z)({valueEnum:(0,O.h)(c),request:I,params:o,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,p.Z)({getPopupContainer:F.getPopupContainer},d),ref:h,proFieldProps:n},r),{},{children:u}))}),i=R.forwardRef(D),P=y,L=i;L.SearchSelect=P,L.displayName="ProFormComponent",A.Z=L},5966:function(N,A,e){var p=e(97685),f=e(1413),O=e(91),R=e(21770),j=e(77569),W=e(55241),b=e(98423),S=e(67294),T=e(43495),D=e(85893),y=["fieldProps","proFieldProps"],i=["fieldProps","proFieldProps"],P="text",L=function(o){var n=o.fieldProps,g=o.proFieldProps,c=(0,O.Z)(o,y);return(0,D.jsx)(T.Z,(0,f.Z)({valueType:P,fieldProps:n,filedConfig:{valueType:P},proFieldProps:g},c))},s=function(o){var n=(0,R.Z)(o.open||!1,{value:o.open,onChange:o.onOpenChange}),g=(0,p.Z)(n,2),c=g[0],I=g[1];return(0,D.jsx)(j.Z.Item,{shouldUpdate:!0,noStyle:!0,children:function(r){var d,F=r.getFieldValue(o.name||[]);return(0,D.jsx)(W.Z,(0,f.Z)((0,f.Z)({getPopupContainer:function(M){return M&&M.parentNode?M.parentNode:M},onOpenChange:function(M){return I(M)},content:(0,D.jsxs)("div",{style:{padding:"4px 0"},children:[(d=o.statusRender)===null||d===void 0?void 0:d.call(o,F),o.strengthText?(0,D.jsx)("div",{style:{marginTop:10},children:(0,D.jsx)("span",{children:o.strengthText})}):null]}),overlayStyle:{width:240},placement:"rightTop"},o.popoverProps),{},{open:c,children:o.children}))}})},h=function(o){var n=o.fieldProps,g=o.proFieldProps,c=(0,O.Z)(o,i),I=(0,S.useState)(!1),E=(0,p.Z)(I,2),r=E[0],d=E[1];return n!=null&&n.statusRender&&c.name?(0,D.jsx)(s,{name:c.name,statusRender:n==null?void 0:n.statusRender,popoverProps:n==null?void 0:n.popoverProps,strengthText:n==null?void 0:n.strengthText,open:r,onOpenChange:d,children:(0,D.jsx)("div",{children:(0,D.jsx)(T.Z,(0,f.Z)({valueType:"password",fieldProps:(0,f.Z)((0,f.Z)({},(0,b.Z)(n,["statusRender","popoverProps","strengthText"])),{},{onBlur:function(Z){var M;n==null||(M=n.onBlur)===null||M===void 0||M.call(n,Z),d(!1)},onClick:function(Z){var M;n==null||(M=n.onClick)===null||M===void 0||M.call(n,Z),d(!0)}}),proFieldProps:g,filedConfig:{valueType:P}},c))})}):(0,D.jsx)(T.Z,(0,f.Z)({valueType:"password",fieldProps:n,proFieldProps:g,filedConfig:{valueType:P}},c))},t=L;t.Password=h,t.displayName="ProFormComponent",A.Z=t},37476:function(N,A,e){e.d(A,{Y:function(){return t}});var p=e(55850),f=e(15861),O=e(1413),R=e(97685),j=e(91),W=e(73177),b=e(21532),S=e(17788),T=e(21770),D=e(8880),y=e(80334),i=e(67294),P=e(73935),L=e(78733),s=e(85893),h=["children","trigger","onVisibleChange","onOpenChange","modalProps","onFinish","submitTimeout","title","width","visible","open"];function t(u){var o,n,g=u.children,c=u.trigger,I=u.onVisibleChange,E=u.onOpenChange,r=u.modalProps,d=u.onFinish,F=u.submitTimeout,Z=u.title,M=u.width,H=u.visible,G=u.open,C=(0,j.Z)(u,h);(0,y.ET)(!C.footer||!(r!=null&&r.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 w=(0,i.useContext)(b.ZP.ConfigContext),q=(0,i.useState)([]),ee=(0,R.Z)(q,2),ne=ee[1],re=(0,i.useState)(!1),Q=(0,R.Z)(re,2),Y=Q[0],X=Q[1],oe=(0,T.Z)(!!H,{value:G||H,onChange:E||I}),k=(0,R.Z)(oe,2),V=k[0],U=k[1],z=(0,i.useRef)(null),te=(0,i.useCallback)(function(_){z.current===null&&_&&ne([]),z.current=_},[]),K=(0,i.useRef)(),le=(0,i.useCallback)(function(){var _,l,a,v=(_=(l=C.form)!==null&&l!==void 0?l:(a=C.formRef)===null||a===void 0?void 0:a.current)!==null&&_!==void 0?_:K.current;v&&r!==null&&r!==void 0&&r.destroyOnClose&&v.resetFields()},[r==null?void 0:r.destroyOnClose,C.form,C.formRef]);(0,i.useImperativeHandle)(C.formRef,function(){return K.current},[K.current]),(0,i.useEffect)(function(){(G||H)&&(E==null||E(!0),I==null||I(!0))},[H,G]);var ae=(0,i.useMemo)(function(){return c?i.cloneElement(c,(0,O.Z)((0,O.Z)({key:"trigger"},c.props),{},{onClick:function(){var _=(0,f.Z)((0,p.Z)().mark(function a(v){var x,m;return(0,p.Z)().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:U(!V),(x=c.props)===null||x===void 0||(m=x.onClick)===null||m===void 0||m.call(x,v);case 2:case"end":return B.stop()}},a)}));function l(a){return _.apply(this,arguments)}return l}()})):null},[U,c,V]),se=(0,i.useMemo)(function(){var _,l,a,v,x,m,$;return C.submitter===!1?!1:(0,D.T)({searchConfig:{submitText:(_=(l=r==null?void 0:r.okText)!==null&&l!==void 0?l:(a=w.locale)===null||a===void 0||(a=a.Modal)===null||a===void 0?void 0:a.okText)!==null&&_!==void 0?_:"\u786E\u8BA4",resetText:(v=(x=r==null?void 0:r.cancelText)!==null&&x!==void 0?x:(m=w.locale)===null||m===void 0||(m=m.Modal)===null||m===void 0?void 0:m.cancelText)!==null&&v!==void 0?v:"\u53D6\u6D88"},resetButtonProps:{preventDefault:!0,disabled:F?Y:void 0,onClick:function(_e){var J;U(!1),r==null||(J=r.onCancel)===null||J===void 0||J.call(r,_e)}}},($=C.submitter)!==null&&$!==void 0?$:{})},[(o=w.locale)===null||o===void 0||(o=o.Modal)===null||o===void 0?void 0:o.cancelText,(n=w.locale)===null||n===void 0||(n=n.Modal)===null||n===void 0?void 0:n.okText,r,C.submitter,U,Y,F]),ue=(0,i.useCallback)(function(_,l){return(0,s.jsxs)(s.Fragment,{children:[_,z.current&&l?(0,s.jsx)(i.Fragment,{children:(0,P.createPortal)(l,z.current)},"submitter"):l]})},[]),ie=(0,i.useCallback)(function(){var _=(0,f.Z)((0,p.Z)().mark(function l(a){var v,x,m;return(0,p.Z)().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return v=d==null?void 0:d(a),F&&v instanceof Promise&&(X(!0),x=setTimeout(function(){return X(!1)},F),v.finally(function(){clearTimeout(x),X(!1)})),B.next=4,v;case 4:return m=B.sent,m&&U(!1),B.abrupt("return",m);case 7:case"end":return B.stop()}},l)}));return function(l){return _.apply(this,arguments)}}(),[d,U,F]),de=(0,W.X)(V);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(S.Z,(0,O.Z)((0,O.Z)((0,O.Z)({title:Z,width:M||800},r),de),{},{onCancel:function(l){var a;F&&Y||(U(!1),r==null||(a=r.onCancel)===null||a===void 0||a.call(r,l))},afterClose:function(){var l;le(),V&&U(!1),r==null||(l=r.afterClose)===null||l===void 0||l.call(r)},footer:C.submitter!==!1?(0,s.jsx)("div",{ref:te,style:{display:"flex",justifyContent:"flex-end"}}):null,children:(0,s.jsx)(L.I,(0,O.Z)((0,O.Z)({formComponentType:"ModalForm",layout:"vertical"},C),{},{onInit:function(l,a){var v;C.formRef&&(C.formRef.current=a),C==null||(v=C.onInit)===null||v===void 0||v.call(C,l,a),K.current=a},formRef:K,submitter:se,onFinish:function(){var _=(0,f.Z)((0,p.Z)().mark(function l(a){var v;return(0,p.Z)().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,ie(a);case 2:return v=m.sent,m.abrupt("return",v);case 4:case"end":return m.stop()}},l)}));return function(l){return _.apply(this,arguments)}}(),contentRender:ue,children:g}))})),ae]})}},24095:function(N,A,e){e.r(A);var p=e(15009),f=e.n(p),O=e(99289),R=e.n(O),j=e(5574),W=e.n(j),b=e(37476),S=e(97269),T=e(5966),D=e(64317),y=e(77569),i=e(67294),P=e(85893),L=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:100;return new Promise(function(u){setTimeout(function(){u(!0)},t)})},s=function(t){var u=y.Z.useForm(),o=W()(u,1),n=o[0];(0,i.useEffect)(function(){if(t.open&&t.values){var E={entryDate:t.values.entryDate||new Date().toISOString().split("T")[0],contactPerson:t.values.name,idCard:t.values.idCard,contactPersonPhone:t.values.phone,jobId:t.jobId,applyId:t.values.applyId};n.setFieldsValue(E)}else t.open||n.resetFields()},[n,t.values,t.open]);var g=function(){t.onClose(),n.resetFields()},c=function(){var E=R()(f()().mark(function r(d){return f()().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:t.onSubmit(d);case 1:case"end":return Z.stop()}},r)}));return function(d){return E.apply(this,arguments)}}(),I=function(r,d){n.setFieldValue("companyName",d.label)};return(0,P.jsx)(b.Y,{title:"\u4F01\u4E1A\u65B0\u589E\u5C31\u4E1A\u4EBA\u5458",form:n,autoFocusFirstInput:!0,open:t.open,modalProps:{destroyOnClose:!0,onCancel:function(){return g()}},submitTimeout:2e3,onFinish:c,children:(0,P.jsxs)(S.A.Group,{children:[(0,P.jsx)(T.Z,{width:"md",hidden:!0,name:"companyId"}),(0,P.jsx)(T.Z,{width:"md",hidden:!0,name:"jobId"}),(0,P.jsx)(T.Z,{width:"md",hidden:!0,name:"applyId"}),(0,P.jsx)(T.Z,{width:"md",name:"contactPerson",label:"\u59D3\u540D",placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D"}),(0,P.jsx)(T.Z,{width:"md",name:"idCard",label:"\u8EAB\u4EFD\u8BC1\u53F7",placeholder:"\u8BF7\u8F93\u5165\u8EAB\u4EFD\u8BC1\u53F7"}),(0,P.jsx)(T.Z,{width:"md",name:"entryDate",label:"\u5165\u804C\u65E5\u671F",placeholder:"\u8BF7\u8F93\u5165\u5165\u804C\u65E5\u671F"}),(0,P.jsx)(T.Z,{width:"md",name:"contactPersonPhone",label:"\u8054\u7CFB\u7535\u8BDD",placeholder:"\u8BF7\u8F93\u5165\u8054\u7CFB\u7535\u8BDD"}),(0,P.jsx)(D.Z,{width:"md",name:"contractTerm",label:"\u52B3\u52A8\u5408\u540C\u671F\u9650",valueEnum:t.contractTermEnum,placeholder:"\u8BF7\u9009\u62E9\u671F\u9650",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u52B3\u52A8\u5408\u540C\u671F\u9650!"}]})]})})};A.default=s}}]);
|