|
|
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[67242],{90466:function(e,t,n){n.d(t,{Z:function(){return c}});var r=n(54476),i=n(59301),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M752 100c-61.8 0-112 50.2-112 112 0 47.7 29.9 88.5 72 104.6v27.6L512 601.4 312 344.2v-27.6c42.1-16.1 72-56.9 72-104.6 0-61.8-50.2-112-112-112s-112 50.2-112 112c0 50.6 33.8 93.5 80 107.3v34.4c0 9.7 3.3 19.3 9.3 27L476 672.3v33.6c-44.2 15-76 56.9-76 106.1 0 61.8 50.2 112 112 112s112-50.2 112-112c0-49.2-31.8-91-76-106.1v-33.6l226.7-291.6c6-7.7 9.3-17.3 9.3-27v-34.4c46.2-13.8 80-56.7 80-107.3 0-61.8-50.2-112-112-112zM224 212a48.01 48.01 0 0196 0 48.01 48.01 0 01-96 0zm336 600a48.01 48.01 0 01-96 0 48.01 48.01 0 0196 0zm192-552a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"fork",theme:"outlined"},a=n(7657),l=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};var c=i.forwardRef(l)},33853:function(e,t,n){n.d(t,{Z:function(){return c}});var r=n(54476),i=n(59301),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},a=n(7657),l=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};var c=i.forwardRef(l)},38819:function(e,t,n){n.d(t,{Z:function(){return c}});var r=n(54476),i=n(59301),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},a=n(7657),l=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};var c=i.forwardRef(l)},88615:function(e,t,n){n.r(t),n.d(t,{default:function(){return N}});var r=n(7557),i=n.n(r),o=n(82242),a=n.n(o),l=n(41498),c=n.n(l),s=n(79800),d=n.n(s),u=n(59301),f=n(48066),p=n(99313),v=n(3113),h=n(43418),g=n(6848),m=n(28103),b=n(58421),x=n(90466),y=n(49389),w=n(94171),j=n(13767),C=n(56656),S=n.n(C),$=n(7338),Z="count___ZMhqS",k="title___cx4uQ",z=n(91689),E=n(37712),O=(f.Z.Paragraph,p.Z.TabPane),N=(0,y.connect)((function(e){return{innovation:e.innovation}}))((function(e){e.dispatch;var t,n=(0,u.useState)({limit:10,page:1,tab:"mine"}),r=d()(n,2),o=r[0],l=r[1],s=(0,u.useState)([]),f=d()(s,2),C=f[0],N=f[1],R=(0,u.useState)(),M=d()(R,2),P=M[0],A=M[1];function B(){return _.apply(this,arguments)}function _(){return(_=c()(i()().mark((function e(){var t;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,w.ZP)("/api/sci/projects.json",{method:"get",params:o});case 2:t=e.sent,"mine"===(null==o?void 0:o.tab)&&A(null==t?void 0:t.my_sci_projects_num),N(t);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return(0,u.useEffect)((function(){B()}),[]),(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{children:(0,E.jsxs)(p.Z,{activeKey:o.tab,onChange:function(e){o.tab=e,o.page=1,l(o),B()},tabBarExtraContent:(0,E.jsx)(v.ZP,{type:"primary",onClick:function(){10!==(null==C?void 0:C.my_sci_projects_num)||(0,$.Ny)()?y.history.push("/innovation/project/create"):h.Z.warning({title:"项目数量达到上限",content:"每位用户最多只能创建10个项目,你的项目数量已经 达到上限。"})},children:"创建项目"}),children:[(0,E.jsx)(O,{tab:(0,$.Ny)()?(0,E.jsx)("span",{className:k,children:"我的项目"}):(0,E.jsx)(g.Z,{title:"项目上限10,已用".concat(P),children:(0,E.jsxs)("span",{className:k,children:["我的项目(",P,"/10)"]})})},"mine"),(0,E.jsx)(O,{tab:"他人共享"},"share")]})}),(null==C?void 0:C.count)<=0&&(0,E.jsx)(j.Z,{}),null==C||null===(t=C.sci_projects)||void 0===t?void 0:t.map((function(e,t){return(0,E.jsxs)("div",{style:{cursor:"pointer"},onClick:function(){y.history.push("/innovation/project/detail/".concat(null==e?void 0:e.id))},children:[(0,E.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,E.jsxs)("div",{children:[(0,E.jsx)("img",{style:{width:30,height:30,borderRadius:"50%",marginRight:10},src:z.Z.IMG_SERVER+"/images/"+e.avatar_url}),(0,E.jsx)("span",{style:{fontSize:"14px",color:"#6B758B",marginRight:10},children:null==e?void 0:e.username}),(0,E.jsx)("span",{style:{color:"#464F66",fontSize:"14px",fontWeight:400},children:null==e?void 0:e.name})]}),(0,E.jsxs)("div",{children:[(0,E.jsxs)("span",{style:{marginRight:20,color:"#464F66"},children:[(0,E.jsx)("i",{className:"iconfont icon-chakan1 current ml5",style:{marginRight:8,color:"#B1BACD"}}),null==e?void 0:e.visits]}),(0,E.jsxs)("span",{style:{marginRight:20,color:"#464F66"},children:[(0,E.jsx)(x.Z,{style:{marginRight:8}}),null==e?void 0:e.forked_count]})]})]}),(0,E.jsx)("div",{className:Z,style:{marginTop:5,color:"#464F66",fontSize:14,marginLeft:40},children:null==e?void 0:e.description}),(0,E.jsxs)("div",{style:{marginTop:15,color:"#B1BACD",fontSize:14,marginLeft:40},children:["创建时间:",S()(null==e?void 0:e.created_at).format("YYYY-MM-DD HH:mm")]}),(0,E.jsx)(m.Z,{})]})})),(0,E.jsx)(b.Z,{style:{textAlign:"center",marginTop:20},current:o.page,pageSize:10,showSizeChanger:!1,total:null==C?void 0:C.count,hideOnSinglePage:!0,onChange:function(e){o.page=e,l(a()({},o)),B()}})]})}))},28103:function(e,t,n){n.d(t,{Z:function(){return p}});var r=n(92310),i=n.n(r),o=n(59301),a=n(36355),l=n(17313),c=n(83116),s=n(37613);const d=e=>{const{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:i,textPaddingInline:o,orientationMargin:a,verticalMarginInline:c}=e;return{[t]:Object.assign(Object.assign({},(0,l.Wf)(e)),{borderBlockStart:`${i}px solid ${r}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:c,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${i}px solid ${r}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${e.dividerHorizontalGutterMargin}px 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${e.dividerHorizontalWithTextGutterMargin}px 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${r}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${i}px solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${t}-with-text-left`]:{"&::before":{width:100*a+"%"},"&::after":{width:100-100*a+"%"}},[`&-horizontal${t}-with-text-right`]:{"&::before":{width:100-100*a+"%"},"&::after":{width:100*a+"%"}},[`${t}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:o},"&-dashed":{background:"none",borderColor:r,borderStyle:"dashed",borderWidth:`${i}px 0 0`},[`&-horizontal${t}-with-text${t}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-left${t}-no-default-orientation-margin-left`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${t}-with-text-right${t}-no-default-orientation-margin-right`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${t}-inner-text`]:{paddingInlineEnd:n}}})}};var u=(0,c.Z)("Divider",(e=>{const t=(0,s.TS)(e,{dividerHorizontalWithTextGutterMargin:e.margin,dividerHorizontalGutterMargin:e.marginLG,sizePaddingEdgeHorizontal:0});return[d(t)]}),(e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}))),f=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};var p=e=>{const{getPrefixCls:t,direction:n,divider:r}=o.useContext(a.E_),{prefixCls:l,type:c="horizontal",orientation:s="center",orientationMargin:d,className:p,rootClassName:v,children:h,dashed:g,plain:m,style:b}=e,x=f(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","plain","style"]),y=t("divider",l),[w,j]=u(y),C=s.length>0?`-${s}`:s,S=!!h,$="left"===s&&null!=d,Z="right"===s&&null!=d,k=i()(y,null==r?void 0:r.className,j,`${y}-${c}`,{[`${y}-with-text`]:S,[`${y}-with-text${C}`]:S,[`${y}-dashed`]:!!g,[`${y}-plain`]:!!m,[`${y}-rtl`]:"rtl"===n,[`${y}-no-default-orientation-margin-left`]:$,[`${y}-no-default-orientation-margin-right`]:Z},p,v),z=o.useMemo((()=>"number"==typeof d?d:/^\d+$/.test(d)?Number(d):d),[d]),E=Object.assign(Object.assign({},$&&{marginLeft:z}),Z&&{marginRight:z});return w(o.createElement("div",Object.assign({className:k,style:Object.assign(Object.assign({},null==r?void 0:r.style),b)},x,{role:"separator"}),h&&"vertical"!==c&&o.createElement("span",{className:`${y}-inner-text`,style:E},h)))}},15969:function(e,t,n){n.d(t,{N:function(){return r}});const r=e=>({color:e.colorLink,textDecoration:"none",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"&:focus, &:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive}})},31561:function(e,t,n){n.d(t,{Z:function(){return j}});var r=n(54476),i=n(20068),o=n(42978),a=n(75931),l=n(35593),c=n(92310),s=n.n(c),d=n(8654),u=n(59301),f=n(10228),p=n(16089),v=f.Z.ESC,h=f.Z.TAB;var g=(0,u.forwardRef)((function(e,t){var n=e.overlay,r=e.arrow,i=e.prefixCls,o=(0,u.useMemo)((function(){return"function"==typeof n?n():n}),[n]),a=(0,d.sQ)(t,null==o?void 0:o.ref);return u.createElement(u.Fragment,null,r&&u.createElement("div",{className:"".concat(i,"-arrow")}),u.cloneElement(o,{ref:(0,d.Yr)(o)?a:void 0}))})),m={adjustX:1,adjustY:1},b=[0,0],x={topLeft:{points:["bl","tl"],overflow:m,offset:[0,-4],targetOffset:b},top:{points:["bc","tc"],overflow:m,offset:[0,-4],targetOffset:b},topRight:{points:["br","tr"],overflow:m,offset:[0,-4],targetOffset:b},bottomLeft:{points:["tl","bl"],overflow:m,offset:[0,4],targetOffset:b},bottom:{points:["tc","bc"],overflow:m,offset:[0,4],targetOffset:b},bottomRight:{points:["tr","br"],overflow:m,offset:[0,4],targetOffset:b}},y=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function w(e,t){var n,c=e.arrow,f=void 0!==c&&c,m=e.prefixCls,b=void 0===m?"rc-dropdown":m,w=e.transitionName,j=e.animation,C=e.align,S=e.placement,$=void 0===S?"bottomLeft":S,Z=e.placements,k=void 0===Z?x:Z,z=e.getPopupContainer,E=e.showAction,O=e.hideAction,N=e.overlayClassName,R=e.overlayStyle,M=e.visible,P=e.trigger,A=void 0===P?["hover"]:P,B=e.autoFocus,_=e.overlay,L=e.children,I=e.onVisibleChange,T=(0,a.Z)(e,y),W=u.useState(),H=(0,o.Z)(W,2),F=H[0],V=H[1],D="visible"in e?M:F,G=u.useRef(null),Y=u.useRef(null),Q=u.useRef(null);u.useImperativeHandle(t,(function(){return G.current}));var X=function(e){V(e),null==I||I(e)};!function(e){var t=e.visible,n=e.triggerRef,r=e.onVisibleChange,i=e.autoFocus,o=e.overlayRef,a=u.useRef(!1),l=function(){var e,i;t&&(null===(e=n.current)||void 0===e||null===(i=e.focus)||void 0===i||i.call(e),null==r||r(!1))},c=function(){var e;return!(null===(e=o.current)||void 0===e||!e.focus||(o.current.focus(),a.current=!0,0))},s=function(e){switch(e.keyCode){case v:l();break;case h:var t=!1;a.current||(t=c()),t?e.preventDefault():l()}};u.useEffect((function(){return t?(window.addEventListener("keydown",s),i&&(0,p.Z)(c,3),function(){window.removeEventListener("keydown",s),a.current=!1}):function(){a.current=!1}}),[t])}({visible:D,triggerRef:Q,onVisibleChange:X,autoFocus:B,overlayRef:Y});var q,K,J,U=function(){return u.createElement(g,{ref:Y,overlay:_,prefixCls:b,arrow:f})},ee=u.cloneElement(L,{className:s()(null===(n=L.props)||void 0===n?void 0:n.className,D&&(q=e.openClassName,void 0!==q?q:"".concat(b,"-open"))),ref:(0,d.Yr)(L)?(0,d.sQ)(Q,L.ref):void 0}),te=O;return te||-1===A.indexOf("contextMenu")||(te=["click"]),u.createElement(l.Z,(0,r.Z)({builtinPlacements:k},T,{prefixCls:b,ref:G,popupClassName:s()(N,(0,i.Z)({},"".concat(b,"-show-arrow"),f)),popupStyle:R,action:A,showAction:E,hideAction:te,popupPlacement:$,popupAlign:C,popupTransitionName:w,popupAnimation:j,popupVisible:D,stretch:(K=e.minOverlayWidthMatchTrigger,J=e.alignPoint,("minOverlayWidthMatchTrigger"in e?K:!J)?"minWidth":""),popup:"function"==typeof _?U:U(),onPopupVisibleChange:X,onPopupClick:function(t){var n=e.onOverlayClick;V(!1),n&&n(t)},getPopupContainer:z}),ee)}var j=u.forwardRef(w)},24514:function(e,t,n){n.d(t,{G:function(){return o}});var r=n(47273),i=function(e){if((0,r.Z)()&&window.document.documentElement){var t=Array.isArray(e)?e:[e],n=window.document.documentElement;return t.some((function(e){return e in n.style}))}return!1};function o(e,t){return Array.isArray(e)||void 0===t?i(e):function(e,t){if(!i(e))return!1;var n=document.createElement("div"),r=n.style[e];return n.style[e]=t,n.style[e]!==r}(e,t)}}}]); |