You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Innovation__PublicMirror...

1 line
6.9 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[11070],{8946:function(e,t,n){n.r(t);var i=n(10574),r=n.n(i),o=n(26801),a=n.n(o),l=n(39343),d=n.n(l),s=n(11006),c=n.n(s),p=n(59301),_=n(53877),h=n(99313),u=n(3113),f=n(28103),m=n(72315),g=n(41867),x=n(22211),b=n(15830),y=n(9498),v=n.n(y),w=n(58696),$=n(15033),k=n(37712);_.Z.Paragraph,h.Z.TabPane;t.default=(0,x.connect)((function(e){return{innovation:e.innovation}}))((function(e){var t=e.dispatch,n=(0,p.useState)({limit:10,page:1,tab:"public"}),i=c()(n,2),o=i[0],l=i[1],s=(0,p.useState)([]),_=c()(s,2),h=_[0],y=_[1];function S(){return j.apply(this,arguments)}function j(){return(j=d()(r()().mark((function e(){var t;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,b.ZP)("/api/sci/projects/sci_mirror_repositories.json",{method:"get",params:o});case 2:t=e.sent,y(t);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,p.useEffect)((function(){S()}),[]);return(0,k.jsxs)("div",{children:[(0,k.jsx)("div",{className:$.Z.header,children:(0,k.jsx)("span",{className:$.Z.title,children:"公开镜像列表"})}),(0,k.jsx)(f.Z,{}),(0,k.jsx)(m.Z,{dataSource:null==h?void 0:h.sci_mirrors,columns:[{title:"序号",dataIndex:"filename",key:"filename",render:function(e,t,n){return o.limit*(o.page-1)+n+1}},{title:"镜像名称",dataIndex:"name",width:"20%",ellipsis:!0,key:"name"},{title:"镜像类型",dataIndex:"mirror_type_cn",key:"mirror_type_cn",width:"10%",ellipsis:!0},{title:"镜像描述",dataIndex:"description",key:"description",width:"20%",ellipsis:!0},{title:"创建时间",dataIndex:"created_at",key:"created_at",width:"10%",ellipsis:!0,render:function(e){return v()(e).format("YYYY-MM-DD HH:mm")}},{title:"创建者",dataIndex:"user_name",key:"user_name",width:"10%",ellipsis:!0},{title:"操作",dataIndex:"id",key:"id",width:"20%",ellipsis:!0,render:function(e,n){var i=n.mirror_type,r=n.mirror_repository_id;return(0,k.jsx)("div",{className:$.Z.link,onClick:function(){return function(e,n){(null==h?void 0:h.my_sci_projects_num)>=10&&!(0,w.Ny)()?t({type:"innovation/openSimpleModal",payload:{title:"项目数量达到上限",children:"每位用户最多只能创建10个项目你的项目数量已经达到上限。",footer:(0,k.jsx)(u.ZP,{onClick:function(){return t({type:"innovation/closeSimpleModal"})},type:"primary",children:"我知道了"})}}):x.history.push("/innovation/project/create?mirror_type=".concat(e,"&mirror_repository_id=").concat(n,"&tab=public"))}(i,r)},children:"创建项目"})}}],pagination:!1}),(0,k.jsx)(g.Z,{style:{textAlign:"center",marginTop:20},current:o.page,total:null==h?void 0:h.count,showSizeChanger:!1,pageSize:10,hideOnSinglePage:!0,onChange:function(e){o.page=e,l(a()({},o)),S()}})]})}))},15033:function(e,t){t.Z={flex_box_center:"flex_box_center___enTkV",flex_space_between:"flex_space_between___j8LoK",flex_box_vertical_center:"flex_box_vertical_center___BJ6hp",flex_box_center_end:"flex_box_center_end___KZOQH",flex_box_column:"flex_box_column___Tzu7t",wrapper:"wrapper___DnUnJ",content_wrapper:"content_wrapper___F_rCn",base_modal_style:"base_modal_style___vKqRE",menu:"menu___BpwS6",submenu:"submenu___xDr82",link:"link___b9dc8",header:"header___yrRip",title:"title___oWojk",home:"home___D896G",info:"info___n4w60"}},28103:function(e,t,n){n.d(t,{Z:function(){return h}});var i=n(73287),r=n.n(i),o=n(59301),a=n(36355),l=n(17313),d=n(83116),s=n(37613);const c=e=>{const{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:i,lineWidth:r,textPaddingInline:o,orientationMargin:a,verticalMarginInline:d}=e;return{[t]:Object.assign(Object.assign({},(0,l.Wf)(e)),{borderBlockStart:`${r}px solid ${i}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:d,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${r}px solid ${i}`},"&-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 ${i}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${r}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:i,borderStyle:"dashed",borderWidth:`${r}px 0 0`},[`&-horizontal${t}-with-text${t}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:r,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 p=(0,d.Z)("Divider",(e=>{const t=(0,s.TS)(e,{dividerHorizontalWithTextGutterMargin:e.margin,dividerHorizontalGutterMargin:e.marginLG,sizePaddingEdgeHorizontal:0});return[c(t)]}),(e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}))),_=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};var h=e=>{const{getPrefixCls:t,direction:n,divider:i}=o.useContext(a.E_),{prefixCls:l,type:d="horizontal",orientation:s="center",orientationMargin:c,className:h,rootClassName:u,children:f,dashed:m,plain:g,style:x}=e,b=_(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","plain","style"]),y=t("divider",l),[v,w]=p(y),$=s.length>0?`-${s}`:s,k=!!f,S="left"===s&&null!=c,j="right"===s&&null!=c,z=r()(y,null==i?void 0:i.className,w,`${y}-${d}`,{[`${y}-with-text`]:k,[`${y}-with-text${$}`]:k,[`${y}-dashed`]:!!m,[`${y}-plain`]:!!g,[`${y}-rtl`]:"rtl"===n,[`${y}-no-default-orientation-margin-left`]:S,[`${y}-no-default-orientation-margin-right`]:j},h,u),I=o.useMemo((()=>"number"==typeof c?c:/^\d+$/.test(c)?Number(c):c),[c]),O=Object.assign(Object.assign({},S&&{marginLeft:I}),j&&{marginRight:I});return v(o.createElement("div",Object.assign({className:z,style:Object.assign(Object.assign({},null==i?void 0:i.style),x)},b,{role:"separator"}),f&&"vertical"!==d&&o.createElement("span",{className:`${y}-inner-text`,style:O},f)))}}}]);