|
- (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[444],{64335:function(D,S,e){"use strict";var y=e(67294),m=(0,y.createContext)({});S.Z=m},21349:function(D,S,e){"use strict";var y=e(84305),m=e(75901),E=e(85893),A=e(94184),O=e.n(A),B=e(67294),l=e(64335),f=e(53645),L=e.n(f),w=function(P){var j=(0,B.useContext)(l.Z),Z=P.children,U=P.contentWidth,a=P.className,W=P.style,K=(0,B.useContext)(m.ZP.ConfigContext),q=K.getPrefixCls,G=P.prefixCls||q("pro"),V=U||j.contentWidth,z="".concat(G,"-grid-content");return(0,E.jsx)("div",{className:O()(z,a,{wide:V==="Fixed"}),style:W,children:(0,E.jsx)("div",{className:"".concat(G,"-grid-content-children"),children:Z})})};S.Z=w},20602:function(D){D.exports={baseView:"baseView___3443q",left:"left___3BCaz",right:"right___1oqm5",avatar_title:"avatar_title___3YPip",avatar:"avatar___28EP8",button_view:"button_view___1Pq24",area_code:"area_code___1p-mi",phone_number:"phone_number___A0d9K"}},84231:function(D){D.exports={main:"main___3drkz",leftMenu:"leftMenu___3Xk0h",right:"right___1DcGn",title:"title___1Cpsc"}},53645:function(){},9673:function(D,S,e){"use strict";e.r(S),e.d(S,{default:function(){return ve}});var y=e(3182),m=e(11849),E=e(2824),A=e(30887),O=e(28682),B=e(94043),l=e.n(B),f=e(67294),L=e(21349),w=e(47673),M=e(34792),P=e(43185),j=e(57663),Z=e(20602),U=e.n(Z),a=e(85893),W=function(n,s,t){s[0]||t("Please input your area code!"),s[1]||t("Please input your phone number!"),t()},K=function(n){var s=n.avatar;return _jsxs(_Fragment,{children:[_jsx("div",{className:styles.avatar_title,children:"\u5934\u50CF"}),_jsx("div",{className:styles.avatar,children:_jsx("img",{src:s,alt:"avatar"})}),_jsx(_Upload,{showUploadList:!1,children:_jsx("div",{className:styles.button_view,children:_jsxs(_Button,{children:[_jsx(UploadOutlined,{}),"\u66F4\u6362\u5934\u50CF"]})})})]})},q=function(){var n=useRequest(function(){return queryCurrent()}),s=n.data,t=n.loading,i=function(){if(s){if(s.avatar)return s.avatar;var v="https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png";return v}return""},F=function(){var d=_asyncToGenerator(_regeneratorRuntime.mark(function v(){return _regeneratorRuntime.wrap(function(C){for(;;)switch(C.prev=C.next){case 0:_message.success("\u66F4\u65B0\u57FA\u672C\u4FE1\u606F\u6210\u529F");case 1:case"end":return C.stop()}},v)}));return function(){return d.apply(this,arguments)}}();return _jsx("div",{className:styles.baseView,children:t?null:_jsxs(_Fragment,{children:[_jsx("div",{className:styles.left,children:_jsxs(ProForm,{layout:"vertical",onFinish:F,submitter:{resetButtonProps:{style:{display:"none"}},submitButtonProps:{children:"\u66F4\u65B0\u57FA\u672C\u4FE1\u606F"}},initialValues:_objectSpread(_objectSpread({},s),{},{phone:s==null?void 0:s.phone.split("-")}),hideRequiredMark:!0,children:[_jsx(ProFormText,{width:"md",name:"email",label:"\u90AE\u7BB1",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u60A8\u7684\u90AE\u7BB1!"}]}),_jsx(ProFormText,{width:"md",name:"name",label:"\u6635\u79F0",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u60A8\u7684\u6635\u79F0!"}]}),_jsx(ProFormTextArea,{name:"profile",label:"\u4E2A\u4EBA\u7B80\u4ECB",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4E2A\u4EBA\u7B80\u4ECB!"}],placeholder:"\u4E2A\u4EBA\u7B80\u4ECB"}),_jsx(ProFormSelect,{width:"sm",name:"country",label:"\u56FD\u5BB6/\u5730\u533A",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u60A8\u7684\u56FD\u5BB6\u6216\u5730\u533A!"}],options:[{label:"\u4E2D\u56FD",value:"China"}]}),_jsxs(ProForm.Group,{title:"\u6240\u5728\u7701\u5E02",size:8,children:[_jsx(ProFormSelect,{rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u60A8\u7684\u6240\u5728\u7701!"}],width:"sm",fieldProps:{labelInValue:!0},name:"province",className:styles.item,request:_asyncToGenerator(_regeneratorRuntime.mark(function d(){return _regeneratorRuntime.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",queryProvince().then(function(C){var I=C.data;return I.map(function(c){return{label:c.name,value:c.id}})}));case 1:case"end":return o.stop()}},d)}))}),_jsx(ProFormDependency,{name:["province"],children:function(v){var o=v.province;return _jsx(ProFormSelect,{params:{key:o==null?void 0:o.value},name:"city",width:"sm",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u60A8\u7684\u6240\u5728\u57CE\u5E02!"}],disabled:!o,className:styles.item,request:_asyncToGenerator(_regeneratorRuntime.mark(function C(){return _regeneratorRuntime.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(o!=null&&o.key){c.next=2;break}return c.abrupt("return",[]);case 2:return c.abrupt("return",queryCity(o.key||"").then(function(g){var T=g.data;return T.map(function(_){return{label:_.name,value:_.id}})}));case 3:case"end":return c.stop()}},C)}))})}})]}),_jsx(ProFormText,{width:"md",name:"address",label:"\u8857\u9053\u5730\u5740",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u60A8\u7684\u8857\u9053\u5730\u5740!"}]}),_jsxs(ProFormFieldSet,{name:"phone",label:"\u8054\u7CFB\u7535\u8BDD",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u60A8\u7684\u8054\u7CFB\u7535\u8BDD!"},{validator:W}],children:[_jsx(_Input,{className:styles.area_code}),_jsx(_Input,{className:styles.phone_number})]})]})}),_jsx("div",{className:styles.right,children:_jsx(K,{avatar:i()})})]})})},G=null,V=e(93009),z=e(71577),te=e(84391),$=e(48971);function ae(u,n){return Y.apply(this,arguments)}function Y(){return Y=(0,y.Z)(l().mark(function u(n,s){return l().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",(0,$.WY)("/kitchen/api/company/GetCompanyInfo",{method:"GET",params:(0,m.Z)({},n)}));case 1:case"end":return i.stop()}},u)})),Y.apply(this,arguments)}function re(u){return k.apply(this,arguments)}function k(){return k=(0,y.Z)(l().mark(function u(n){return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,$.WY)("/kitchen/api/systemconfig/GetCosRequestSignURL",{method:"POST",data:n}));case 1:case"end":return t.stop()}},u)})),k.apply(this,arguments)}function se(u){return J.apply(this,arguments)}function J(){return J=(0,y.Z)(l().mark(function u(n){return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,$.WY)("/kitchen/api/company/update",{method:"PUT",data:n}));case 1:case"end":return t.stop()}},u)})),J.apply(this,arguments)}var oe=e(9669),ie=e.n(oe),le=function(n){var s=n.avatar,t=n.url,i=n.uploadProp;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:U().avatar_title,children:"logo"}),(0,a.jsx)("div",{className:U().avatar,children:(0,a.jsx)("img",{src:t,alt:"avatar"})}),(0,a.jsx)(V.Z,(0,m.Z)((0,m.Z)({},i),{},{children:(0,a.jsx)("div",{className:U().button_view,children:(0,a.jsxs)(z.Z,{children:[(0,a.jsx)(te.Z,{}),"\u66F4\u6362\u4F01\u4E1Alogo"]})})}))]})},ue=function(n){var s=(0,f.useState)(),t=(0,E.Z)(s,2),i=t[0],F=t[1],d=(0,f.useState)({domain:"",fileUrl:"",param:"",allUrl:"",seeUrl:""}),v=(0,E.Z)(d,2),o=v[0],C=v[1],I={name:"file",showUploadList:!1,multiple:!1,accept:".png, .jpg, .jpeg, .gif",headers:{"Content-Type":"application/octet-stream"},customRequest:function(g){var T=g.action,_=g.file,b=g.headers,x=g.onError,r=g.onProgress,h=g.onSuccess,H=g.withCredentials,p=_.name.lastIndexOf("."),he=_.name.substr(p+1),ee=null;return re({directory:"logo",fileExtension:he,method:"PUT"}).then(function(X){T=X.allUrl;var ne=new FileReader;ne.readAsArrayBuffer(_),ne.onload=function(fe){ee=fe.target.result,ie().put(T,ee,{withCredentials:H,headers:b,onUploadProgress:function(R){var ge=R.total,ye=R.loaded;r({percent:Math.round(ye/ge*100).toFixed(2)},_)}}).then(function(Q){if(Q.status==200||Q.statusText=="OK"){var R=JSON.parse(JSON.stringify(n.fetchCompanyInfo));R.logo=X.seeUrl,n.onUpdateCompanyInfo(R)}}).catch(x)}}),{abort:function(){console.log("upload progress is aborted.")}}}};return(0,a.jsx)("div",{className:U().baseView,children:(0,a.jsx)("div",{className:U().right,children:(0,a.jsx)(le,{url:n.fetchCompanyInfo.logo?n.fetchCompanyInfo.logo:"https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",uploadProp:I})})})},de=ue,ce=e(84231),N=e.n(ce),me=O.Z.Item,pe=function(){var n={EnterpriseLog:"LOG\u8BBE\u7F6E"},s=(0,f.useState)({mode:"inline",selectKey:"EnterpriseLog"}),t=(0,E.Z)(s,2),i=t[0],F=t[1],d=(0,f.useRef)(),v=(0,f.useState)({logo:"https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png"}),o=(0,E.Z)(v,2),C=o[0],I=o[1],c=function(){requestAnimationFrame(function(){if(!!d.current){var r="inline",h=d.current.offsetWidth;d.current.offsetWidth<641&&h>400&&(r="horizontal"),window.innerWidth<768&&h>400&&(r="horizontal"),F((0,m.Z)((0,m.Z)({},i),{},{mode:r}))}})};(0,f.useLayoutEffect)(function(){return d.current&&(window.addEventListener("resize",c),c()),function(){window.removeEventListener("resize",c)}},[d.current]);var g=function(){return Object.keys(n).map(function(r){return(0,a.jsx)(me,{children:n[r]},r)})},T=function(){var r=i.selectKey;switch(r){case"EnterpriseLog":return(0,a.jsx)(de,{fetchCompanyInfo:C,onUpdateCompanyInfo:_});default:return null}},_=function(){var x=(0,y.Z)(l().mark(function r(h){return l().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.next=2,se(h);case 2:return p.next=4,b();case 4:case"end":return p.stop()}},r)}));return function(h){return x.apply(this,arguments)}}(),b=function(){var x=(0,y.Z)(l().mark(function r(){var h;return l().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.next=2,ae();case 2:h=p.sent,h.statusCode===200&&I(h.data);case 4:case"end":return p.stop()}},r)}));return function(){return x.apply(this,arguments)}}();return(0,f.useEffect)(function(){b()},[]),(0,a.jsx)(L.Z,{children:(0,a.jsxs)("div",{className:N().main,ref:function(r){r&&(d.current=r)},children:[(0,a.jsx)("div",{className:N().leftMenu,children:(0,a.jsx)(O.Z,{mode:i.mode,selectedKeys:[i.selectKey],onClick:function(r){var h=r.key;F((0,m.Z)((0,m.Z)({},i),{},{selectKey:h}))},children:g()})}),(0,a.jsxs)("div",{className:N().right,children:[(0,a.jsx)("div",{className:N().title,children:n[i.selectKey]}),T()]})]})})},ve=pe},64217:function(D,S,e){"use strict";e.d(S,{Z:function(){return f}});var y=e(28991),m=`accept acceptCharset accessKey action allowFullScreen allowTransparency
- alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
- charSet checked classID className colSpan cols content contentEditable contextMenu
- controls coords crossOrigin data dateTime default defer dir disabled download draggable
- encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
- headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
- is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
- mediaGroup method min minLength multiple muted name noValidate nonce open
- optimum pattern placeholder poster preload radioGroup readOnly rel required
- reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
- shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
- summary tabIndex target title type useMap value width wmode wrap`,E=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
- onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
- onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
- onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
- onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
- onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
- onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,A="".concat(m," ").concat(E).split(/[\s\n]+/),O="aria-",B="data-";function l(L,w){return L.indexOf(w)===0}function f(L){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,M;w===!1?M={aria:!0,data:!0,attr:!0}:w===!0?M={aria:!0}:M=(0,y.Z)({},w);var P={};return Object.keys(L).forEach(function(j){(M.aria&&(j==="role"||l(j,O))||M.data&&l(j,B)||M.attr&&A.includes(j))&&(P[j]=L[j])}),P}}}]);
|