|
- (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[444],{64335:function(D,_,e){"use strict";var l=e(67294),g=(0,l.createContext)({});_.Z=g},21349:function(D,_,e){"use strict";var l=e(84305),g=e(39559),p=e(85893),w=e(94184),F=e.n(w),L=e(67294),v=e(64335),R=e(53645),O=e.n(R),S=function(P){var C=(0,L.useContext)(v.Z),U=P.children,a=P.contentWidth,W=P.className,K=P.style,Q=(0,L.useContext)(g.ZP.ConfigContext),q=Q.getPrefixCls,A=P.prefixCls||q("pro"),G=a||C.contentWidth,V="".concat(A,"-grid-content");return(0,p.jsx)("div",{className:F()(V,W,{wide:G==="Fixed"}),style:K,children:(0,p.jsx)("div",{className:"".concat(A,"-grid-content-children"),children:U})})};_.Z=S},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,_,e){"use strict";e.r(_),e.d(_,{default:function(){return pe}});var l=e(39428),g=e(3182),p=e(11849),w=e(2824),F=e(30887),L=e(28682),v=e(67294),R=e(21349),O=e(47673),S=e(34792),M=e(43185),P=e(57663),C=e(20602),U=e.n(C),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 h="https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png";return h}return""},T=function(){var d=_asyncToGenerator(_regeneratorRuntime().mark(function h(){return _regeneratorRuntime().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:_message.success("\u66F4\u65B0\u57FA\u672C\u4FE1\u606F\u6210\u529F");case 1:case"end":return x.stop()}},h)}));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:T,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(x){var B=x.data;return B.map(function(c){return{label:c.name,value:c.id}})}));case 1:case"end":return o.stop()}},d)}))}),_jsx(ProFormDependency,{name:["province"],children:function(h){var o=h.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 x(){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(y){var I=y.data;return I.map(function(j){return{label:j.name,value:j.id}})}));case 3:case"end":return c.stop()}},x)}))})}})]}),_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()})})]})})},q=null,A=e(93009),G=e(71577),V=e(84391),z=e(48971);function te(u,n){return $.apply(this,arguments)}function $(){return $=(0,g.Z)((0,l.Z)().mark(function u(n,s){return(0,l.Z)().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",(0,z.WY)("/kitchen/api/company/GetCompanyInfo",{method:"GET",params:(0,p.Z)({},n)}));case 1:case"end":return i.stop()}},u)})),$.apply(this,arguments)}function ae(u){return k.apply(this,arguments)}function k(){return k=(0,g.Z)((0,l.Z)().mark(function u(n){return(0,l.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,z.WY)("/kitchen/api/systemconfig/GetCosRequestSignURL",{method:"POST",data:n}));case 1:case"end":return t.stop()}},u)})),k.apply(this,arguments)}function re(u){return Y.apply(this,arguments)}function Y(){return Y=(0,g.Z)((0,l.Z)().mark(function u(n){return(0,l.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,z.WY)("/kitchen/api/company/update",{method:"PUT",data:n}));case 1:case"end":return t.stop()}},u)})),Y.apply(this,arguments)}var se=e(9669),oe=e.n(se),ie=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)(A.Z,(0,p.Z)((0,p.Z)({},i),{},{children:(0,a.jsx)("div",{className:U().button_view,children:(0,a.jsxs)(G.Z,{children:[(0,a.jsx)(V.Z,{}),"\u66F4\u6362\u4F01\u4E1Alogo"]})})}))]})},le=function(n){var s=(0,v.useState)(),t=(0,w.Z)(s,2),i=t[0],T=t[1],d=(0,v.useState)({domain:"",fileUrl:"",param:"",allUrl:"",seeUrl:""}),h=(0,w.Z)(d,2),o=h[0],x=h[1],B={name:"file",showUploadList:!1,multiple:!1,accept:".png, .jpg, .jpeg, .gif",headers:{"Content-Type":"application/octet-stream"},customRequest:function(y){var I=y.action,j=y.file,b=y.headers,E=y.onError,r=y.onProgress,f=y.onSuccess,J=y.withCredentials,m=j.name.lastIndexOf("."),ve=j.name.substr(m+1),ee=null;return ae({directory:"logo",fileExtension:ve,method:"PUT"}).then(function(H){I=H.allUrl;var ne=new FileReader;ne.readAsArrayBuffer(j),ne.onload=function(he){ee=he.target.result,oe().put(I,ee,{withCredentials:J,headers:b,onUploadProgress:function(Z){var fe=Z.total,ge=Z.loaded;r({percent:Math.round(ge/fe*100).toFixed(2)},j)}}).then(function(X){if(X.status==200||X.statusText=="OK"){var Z=JSON.parse(JSON.stringify(n.fetchCompanyInfo));Z.logo=H.seeUrl,n.onUpdateCompanyInfo(Z)}}).catch(E)}}),{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)(ie,{url:n.fetchCompanyInfo.logo?n.fetchCompanyInfo.logo:"https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",uploadProp:B})})})},ue=le,de=e(84231),N=e.n(de),ce=L.Z.Item,me=function(){var n={EnterpriseLog:"LOG\u8BBE\u7F6E"},s=(0,v.useState)({mode:"inline",selectKey:"EnterpriseLog"}),t=(0,w.Z)(s,2),i=t[0],T=t[1],d=(0,v.useRef)(),h=(0,v.useState)({logo:"https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png"}),o=(0,w.Z)(h,2),x=o[0],B=o[1],c=function(){requestAnimationFrame(function(){if(!!d.current){var r="inline",f=d.current.offsetWidth;d.current.offsetWidth<641&&f>400&&(r="horizontal"),window.innerWidth<768&&f>400&&(r="horizontal"),T((0,p.Z)((0,p.Z)({},i),{},{mode:r}))}})};(0,v.useLayoutEffect)(function(){return d.current&&(window.addEventListener("resize",c),c()),function(){window.removeEventListener("resize",c)}},[d.current]);var y=function(){return Object.keys(n).map(function(r){return(0,a.jsx)(ce,{children:n[r]},r)})},I=function(){var r=i.selectKey;switch(r){case"EnterpriseLog":return(0,a.jsx)(ue,{fetchCompanyInfo:x,onUpdateCompanyInfo:j});default:return null}},j=function(){var E=(0,g.Z)((0,l.Z)().mark(function r(f){return(0,l.Z)().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,re(f);case 2:return m.next=4,b();case 4:case"end":return m.stop()}},r)}));return function(f){return E.apply(this,arguments)}}(),b=function(){var E=(0,g.Z)((0,l.Z)().mark(function r(){var f;return(0,l.Z)().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,te();case 2:f=m.sent,f.statusCode===200&&B(f.data);case 4:case"end":return m.stop()}},r)}));return function(){return E.apply(this,arguments)}}();return(0,v.useEffect)(function(){b()},[]),(0,a.jsx)(R.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)(L.Z,{mode:i.mode,selectedKeys:[i.selectKey],onClick:function(r){var f=r.key;T((0,p.Z)((0,p.Z)({},i),{},{selectKey:f}))},children:y()})}),(0,a.jsxs)("div",{className:N().right,children:[(0,a.jsx)("div",{className:N().title,children:n[i.selectKey]}),I()]})]})})},pe=me},64217:function(D,_,e){"use strict";e.d(_,{Z:function(){return R}});var l=e(28991),g=`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`,p=`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`,w="".concat(g," ").concat(p).split(/[\s\n]+/),F="aria-",L="data-";function v(O,S){return O.indexOf(S)===0}function R(O){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,M;S===!1?M={aria:!0,data:!0,attr:!0}:S===!0?M={aria:!0}:M=(0,l.Z)({},S);var P={};return Object.keys(O).forEach(function(C){(M.aria&&(C==="role"||v(C,F))||M.data&&v(C,L)||M.attr&&w.includes(C))&&(P[C]=O[C])}),P}}}]);
|