(this.webpackJsonp=this.webpackJsonp||[]).push([[145],{"85SH":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,r=(n=a("cDcd"))&&n.__esModule?n:{default:n},l=a("sYIF");t.default=function(e){var t=e.item;return e.history,r.default.createElement("div",{onClick:function(){window.open("/"+t.name,"_blank")},style:{cursor:"pointer"}},r.default.createElement("div",{className:"imgBox"},r.default.createElement("img",{alt:"",src:(0,l.getImageUrl)("/"+t.avatar_url)})),r.default.createElement("div",{style:{flex:"1"}},r.default.createElement("span",{className:"mb5 font-18 color-grey-3 task-hide",style:{display:"block",maxWidth:"588px"}},t.nickname),r.default.createElement("div",{className:"task-hide-2 teamdesc"},t.description),r.default.createElement("p",{className:"item-news"},r.default.createElement("span",null,"项目：",t.num_projects),r.default.createElement("span",null,r.default.createElement("i",{className:"iconfont icon-shijian color-green mr3 font-12"}),"创建时间：",t.created_at))))}},Hsgt:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=l(a("5rEg"));a("5NDa");var r=l(a("cDcd"));function l(e){return e&&e.__esModule?e:{default:e}}var u=n.default.Search;t.default=function(e){var t=e.placeholder,a=e.onSearch,n=e.onChange;return r.default.createElement(u,{allowClear:!0,placeholder:t,enterButton:"搜索",onSearch:a,width:"300px",onChange:n})}},vTxG:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=h(a("NUBc")),r=h(a("jsC+")),l=h(a("BvKs")),u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},c=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var a=[],n=!0,r=!1,l=void 0;try{for(var u,c=e[Symbol.iterator]();!(n=(u=c.next()).done)&&(a.push(u.value),!t||a.length!==t);n=!0);}catch(e){r=!0,l=e}finally{try{!n&&c.return&&c.return()}finally{if(r)throw l}}return a}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};a("DjyN"),a("qVdP"),a("lUTK");var o=a("cDcd"),i=h(o),s=h(a("Hsgt")),d=h(a("85SH")),f=h(a("2CTR")),m=h(a("vDqi")),v=h(a("aqs5"));function h(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){var t=(0,o.useState)(void 0),a=c(t,2),h=a[0],p=a[1],E=(0,o.useState)(1),g=c(E,2),y=g[0],_=g[1],b=(0,o.useState)(0),j=c(b,2),S=j[0],k=j[1],w=(0,o.useState)("desc"),N=c(w,2),x=N[0],C=(N[1],(0,o.useState)("created_at")),D=c(C,2),I=D[0],O=D[1],M=(0,o.useState)(void 0),B=c(M,2),P=B[0],z=B[1],H=(e.checkIfLogin,e.showLoginDialog,e.current_user),T=e.match.params.username,q=e.user;function A(e){var t="/users/"+T+"/organizations.json";m.default.get(t,{params:{search:e,sort_by:I,sort_direction:x,page:y,limit:15}}).then((function(e){e&&e.data&&(p(e.data.organizations),k(e.data.total_count))})).catch((function(e){}))}(0,o.useEffect)((function(){if(q){var e=q.username,t=q.login;document.title="参与组织-"+e+"/"+t}}),[q]),(0,o.useEffect)((function(){T&&A(P)}),[T,I,y,x]);var U=i.default.createElement(l.default,{onClick:function(e){return O(e.key)}},i.default.createElement(l.default.Item,{value:"created_at",key:"created_at"},"创建时间排序"),i.default.createElement(l.default.Item,{value:"num_projects",key:"num_projects"},"项目数排序"),i.default.createElement(l.default.Item,{value:"num_users",key:"num_users"},"组织成员数排序"));return i.default.createElement("div",null,i.default.createElement("div",{className:"headerbox"},i.default.createElement("div",null,i.default.createElement(s.default,{value:P,onChange:function(e){return z(e.target.value)},placeholder:"请输入组织名称关键字进行搜索",onSearch:function(){A(P)}})),i.default.createElement("p",null,H&&H.login===T&&i.default.createElement(v.default,u({},e,{sureFunc:function(){e.history.push("/organize/new")}}),i.default.createElement("i",{className:"iconfont icon-xinjian1 mr3 font-14"}),"新建组织"),i.default.createElement(r.default,{overlay:U},i.default.createElement("a",null,"排序",i.default.createElement("i",{className:"iconfont icon-sanjiaoxing-down ml3 font-14"}))))),h&&h.length>0?i.default.createElement("div",{className:"contentBox"},h.map((function(t,a){return i.default.createElement(d.default,{item:t,history:e.history})}))):i.default.createElement(f.default,{_html:"暂无数据"}),S>15&&i.default.createElement("div",{className:"mt20 pb20",style:{textAlign:"center"}},i.default.createElement(n.default,{simple:!0,current:y,pageSize:15,onChange:function(e){return _(e)},total:S})))}}}]);