|
|
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[26366],{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)},44683:function(e,t,n){n.r(t),n.d(t,{default:function(){return z}});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(28103),g=n(58421),m=n(62772),x=n(90466),b=n(49389),y=n(7338),w=n(94171),_=n(13767),j=n(56656),C=n.n(j),S={flex_box_center:"flex_box_center___usqtP",flex_space_between:"flex_space_between___Q1rHf",flex_box_vertical_center:"flex_box_vertical_center___iwfef",flex_box_center_end:"flex_box_center_end___UgC5k",flex_box_column:"flex_box_column___vaSfm",count:"count___EA_49",header:"header___K169U",title:"title___LKM3L"},$=n(91689),k=n(37712),z=(f.Z.Paragraph,p.Z.TabPane,(0,b.connect)((function(e){return{innovation:e.innovation}}))((function(e){var t,n=e.dispatch,r=(0,u.useState)({limit:10,page:1,tab:"public"}),o=d()(r,2),l=o[0],s=o[1],f=(0,u.useState)([]),p=d()(f,2),j=p[0],z=p[1];function Z(){return E.apply(this,arguments)}function E(){return(E=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:l});case 2:t=e.sent,z(t);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,u.useEffect)((function(){Z()}),[]);return(0,k.jsxs)("div",{children:[(0,k.jsxs)("div",{className:S.header,children:[(0,k.jsx)("span",{className:S.title,children:"公开项目"}),(0,k.jsx)(v.ZP,{type:"primary",onClick:function(){(null==j?void 0:j.my_sci_projects_num)>=10&&!(0,y.Ny)()?n({type:"innovation/openSimpleModal",payload:{title:"项目数量达到上限",children:"每位用户最多只能创建10个项目,你的项目数量已经达到上限。",footer:(0,k.jsx)(v.ZP,{onClick:function(){return n({type:"innovation/closeSimpleModal"})},type:"primary",children:"我知道了"})}}):b.history.push("/innovation/project/create")},className:S.createProjectBtn,icon:(0,k.jsx)(m.Z,{}),children:"创建项目"})]}),(0,k.jsx)(h.Z,{}),(null==j?void 0:j.count)<=0&&(0,k.jsx)(_.Z,{}),null==j||null===(t=j.sci_projects)||void 0===t?void 0:t.map((function(e,t){return(0,k.jsxs)("div",{style:{cursor:"pointer"},onClick:function(){b.history.push("/innovation/project/detail/".concat(null==e?void 0:e.id))},children:[(0,k.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,k.jsxs)("div",{children:[(0,k.jsx)("img",{style:{width:30,height:30,borderRadius:"50%",marginRight:10},src:$.Z.IMG_SERVER+"/images/"+e.avatar_url}),(0,k.jsx)("span",{style:{fontSize:"14px",color:"#6B758B",marginRight:10},children:null==e?void 0:e.username}),(0,k.jsx)("span",{style:{color:"#464F66",fontSize:"14px"},children:null==e?void 0:e.name})]}),(0,k.jsxs)("div",{children:[(0,k.jsxs)("span",{style:{marginRight:20,color:"#464F66"},children:[(0,k.jsx)("i",{className:"iconfont icon-chakan1 current ml5",style:{marginRight:8,color:"#B1BACD",fontSize:12}}),null==e?void 0:e.visits]}),(0,k.jsxs)("span",{style:{marginRight:20,color:"#464F66"},children:[(0,k.jsx)(x.Z,{style:{marginRight:8}}),null==e?void 0:e.forked_count]})]})]}),(0,k.jsx)("div",{className:S.count,style:{marginTop:5,color:"#464F66",fontSize:14,marginLeft:40},children:null==e?void 0:e.description}),(0,k.jsxs)("div",{style:{marginTop:15,color:"#B1BACD",fontSize:14,marginLeft:40},children:["创建时间:",C()(null==e?void 0:e.created_at).format("YYYY-MM-DD HH:mm")]}),(0,k.jsx)(h.Z,{})]},t)})),(0,k.jsx)(g.Z,{style:{textAlign:"center",marginTop:20},current:l.page,pageSize:10,showSizeChanger:!1,total:null==j?void 0:j.count,hideOnSinglePage:!0,onChange:function(e){l.page=e,s(a()({},l)),Z()}})]})})))},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:x}=e,b=f(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","plain","style"]),y=t("divider",l),[w,_]=u(y),j=s.length>0?`-${s}`:s,C=!!h,S="left"===s&&null!=d,$="right"===s&&null!=d,k=i()(y,null==r?void 0:r.className,_,`${y}-${c}`,{[`${y}-with-text`]:C,[`${y}-with-text${j}`]:C,[`${y}-dashed`]:!!g,[`${y}-plain`]:!!m,[`${y}-rtl`]:"rtl"===n,[`${y}-no-default-orientation-margin-left`]:S,[`${y}-no-default-orientation-margin-right`]:$},p,v),z=o.useMemo((()=>"number"==typeof d?d:/^\d+$/.test(d)?Number(d):d),[d]),Z=Object.assign(Object.assign({},S&&{marginLeft:z}),$&&{marginRight:z});return w(o.createElement("div",Object.assign({className:k,style:Object.assign(Object.assign({},null==r?void 0:r.style),x)},b,{role:"separator"}),h&&"vertical"!==c&&o.createElement("span",{className:`${y}-inner-text`,style:Z},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 _}});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},x=[0,0],b={topLeft:{points:["bl","tl"],overflow:m,offset:[0,-4],targetOffset:x},top:{points:["bc","tc"],overflow:m,offset:[0,-4],targetOffset:x},topRight:{points:["br","tr"],overflow:m,offset:[0,-4],targetOffset:x},bottomLeft:{points:["tl","bl"],overflow:m,offset:[0,4],targetOffset:x},bottom:{points:["tc","bc"],overflow:m,offset:[0,4],targetOffset:x},bottomRight:{points:["tr","br"],overflow:m,offset:[0,4],targetOffset:x}},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,x=void 0===m?"rc-dropdown":m,w=e.transitionName,_=e.animation,j=e.align,C=e.placement,S=void 0===C?"bottomLeft":C,$=e.placements,k=void 0===$?b:$,z=e.getPopupContainer,Z=e.showAction,E=e.hideAction,O=e.overlayClassName,M=e.overlayStyle,N=e.visible,R=e.trigger,P=void 0===R?["hover"]:R,A=e.autoFocus,B=e.overlay,L=e.children,I=e.onVisibleChange,T=(0,a.Z)(e,y),H=u.useState(),W=(0,o.Z)(H,2),F=W[0],V=W[1],D="visible"in e?N:F,G=u.useRef(null),Y=u.useRef(null),Q=u.useRef(null);u.useImperativeHandle(t,(function(){return G.current}));var K=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:K,autoFocus:A,overlayRef:Y});var U,X,q,J=function(){return u.createElement(g,{ref:Y,overlay:B,prefixCls:x,arrow:f})},ee=u.cloneElement(L,{className:s()(null===(n=L.props)||void 0===n?void 0:n.className,D&&(U=e.openClassName,void 0!==U?U:"".concat(x,"-open"))),ref:(0,d.Yr)(L)?(0,d.sQ)(Q,L.ref):void 0}),te=E;return te||-1===P.indexOf("contextMenu")||(te=["click"]),u.createElement(l.Z,(0,r.Z)({builtinPlacements:k},T,{prefixCls:x,ref:G,popupClassName:s()(O,(0,i.Z)({},"".concat(x,"-show-arrow"),f)),popupStyle:M,action:P,showAction:Z,hideAction:te,popupPlacement:S,popupAlign:j,popupTransitionName:w,popupAnimation:_,popupVisible:D,stretch:(X=e.minOverlayWidthMatchTrigger,q=e.alignPoint,("minOverlayWidthMatchTrigger"in e?X:!q)?"minWidth":""),popup:"function"==typeof B?J:J(),onPopupVisibleChange:K,onPopupClick:function(t){var n=e.onOverlayClick;V(!1),n&&n(t)},getPopupContainer:z}),ee)}var _=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)}}}]); |