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