forgeplus/public/react/build/static/js/108.1b18010f.chunk.js

1 line
4.4 KiB
JavaScript

(this.webpackJsonp=this.webpackJsonp||[]).push([[108],{"85SH":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,r=a("q1tI"),l=(n=r)&&n.__esModule?n:{default:n},u=a("sYIF");t.default=function(e){var t=e.item,a=e.history;return l.default.createElement("div",{onClick:function(){a.push("/"+t.name)},style:{cursor:"pointer"}},l.default.createElement("div",{className:"imgBox"},l.default.createElement("img",{alt:"",src:(0,u.getImageUrl)("/"+t.avatar_url)})),l.default.createElement("div",{style:{flex:"1"}},l.default.createElement("span",{className:"mb5 font-18 color-grey-3 task-hide",style:{display:"block",maxWidth:"588px"}},t.nickname),l.default.createElement("div",{className:"task-hide-2 teamdesc"},t.description),l.default.createElement("p",{className:"item-news"},l.default.createElement("span",null,"项目:",t.num_projects),l.default.createElement("span",null,l.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("1vPl");var r=l(a("q1tI"));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("YQTV"),a("aIZi"),a("2WkQ");var o=a("q1tI"),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),S=c(b,2),j=S[0],k=S[1],w=(0,o.useState)("asc"),x=c(w,2),I=x[0],N=(x[1],(0,o.useState)("created_at")),C=c(N,2),O=C[0],M=C[1],q=(0,o.useState)(void 0),B=c(q,2),P=B[0],z=B[1],H=(e.checkIfLogin,e.showLoginDialog,e.current_user),T=e.match.params.username;function A(e){var t="/users/"+T+"/organizations.json";m.default.get(t,{params:{search:e,sort_by:O,sort_direction:I,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(){T&&A(P)}),[T,O,y,I]);var D=i.default.createElement(l.default,{onClick:function(e){return M(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:D},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:"暂无数据"}),j>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:j})))}}}]);