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.
1 line
16 KiB
1 line
16 KiB
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[42826],{13261:function(e,t,n){var l=n(82242),a=n.n(l),i=(n(59301),n(93314)),o=n(3113),s=n(37712);t.Z=function(e){var t=e.img,n=e.buttonProps,l=void 0===n?{}:n,r=e.styles,c=void 0===r?{}:r,u=e.customText,d=e.ButtonText,m=e.ButtonClick,_=e.Buttonclass,p=e.ButtonTwo,v=e.imgStyles,f=e.loading,g=void 0!==f&&f;return(0,s.jsxs)("section",{className:"tc animated fadeIn",style:a()(a()({},{color:"#999",margin:"100px auto",visibility:g?"hidden":"visible"}),c),children:[(0,s.jsx)("img",{src:t||i,style:a()(a()({},v),{},{pointerEvents:"none",userSelect:"none"})}),(0,s.jsx)("p",{className:"mt20 font14",children:u||"暂时还没有相关数据哦!"}),d&&(0,s.jsx)(o.ZP,a()(a()({className:_,onClick:m},l),{},{children:d})),p&&p]})}},98107:function(e,t,n){n.r(t),n.d(t,{default:function(){return L}});var l=n(37205),a=n.n(l),i=n(82242),o=n.n(i),s=n(7557),r=n.n(s),c=n(41498),u=n.n(c),d=n(79800),m=n.n(d),_=n(39647),p=n.n(_),v=n(59301),f=n(51876),g=n(6808),y=n(38854),x=n(20834),h=n(96865),b=n(6848),j=n(43418),N=n(8591),C=n(27092),S=n(27627),w={flex_box_center:"flex_box_center___hfGYU",flex_space_between:"flex_space_between___S6KnR",flex_box_vertical_center:"flex_box_vertical_center___u0R8B",flex_box_center_end:"flex_box_center_end___Evn2D",flex_box_column:"flex_box_column___jhlGL",wrap:"wrap___Ca3yd",addStyle:"addStyle___FWuRG",prompt:"prompt___jMRIH",listWrap:"listWrap___XKYO_",leftContent:"leftContent___jgz5c",header:"header___ITKxQ",title:"title___cBIdP",time:"time___pbQci",introduction:"introduction___DNgDN",from:"from___pGE2M",bottom:"bottom___GxthJ",user_img:"user_img___LVo6K",user_name:"user_name___ZamGO",tags_name:"tags_name___kxD1w",buttonList:"buttonList___XwDn0",buttonItem:"buttonItem___EU1oL",rightContent:"rightContent___A6NvL",publicStyle:"publicStyle___KwfP1",collectStyle:"collectStyle___jZLus",collectActiveStyle:"collectActiveStyle___XlM8A",selectList:"selectList___Rf721",selectHeader:"selectHeader___b3av3",selectContent:"selectContent___jWJdZ",contentTitle:"contentTitle___Tl8qa",contentTags:"contentTags___lrE89",tagName:"tagName____b8A3",tagNameActive:"tagNameActive___eJjPo",activeStyle:"activeStyle___JCFkW",activeLabel:"activeLabel___qVdtz",activeItem:"activeItem___H1r88",activeClose:"activeClose___X8kr8",activeSubmit:"activeSubmit___F_NC5"},k=n(13261),O=n(15309),E=n(21547),Z=n(89133),I=n(38296),P=n(42595),D=n(37712),T=["user","userDetail","globalSetting","dispatch"],R={"引用数排序":"used_count","收藏数排序":"collect_count","创建时间排序":"created_at"},L=(0,f.connect)((function(e){return{user:e.user,userDetail:e.userDetail,globalSetting:e.globalSetting}}))((function(e){var t,n,l,i=e.user,s=(e.userDetail,e.globalSetting,e.dispatch,p()(e,T),(0,v.useState)([])),c=m()(s,2),d=c[0],_=c[1],L=(0,v.useState)(!1),$=m()(L,2),z=($[0],$[1],(0,v.useState)([])),A=m()(z,2),G=A[0],B=A[1],F=(0,v.useState)(3),W=m()(F,2),V=W[0],H=W[1],U=(0,v.useState)(!0),K=m()(U,2),J=K[0],M=K[1],X=(0,v.useState)(!1),q=m()(X,2),Q=q[0],Y=q[1],ee=(0,v.useState)({keyword:"",source:"mine",status:"",tags:[],page:1,limit:20}),te=m()(ee,2),ne=te[0],le=te[1],ae=(0,v.useState)("创建时间排序"),ie=m()(ae,2),oe=ie[0],se=ie[1],re="创建时间排序"===oe;(0,v.useEffect)((function(){ce()}),[ne,oe,d]);var ce=function(){var e=u()(r()().mark((function e(){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return M(!0),e.next=3,(0,E._S)({page:null==ne?void 0:ne.page,limit:null==ne?void 0:ne.limit,category:null==ne?void 0:ne.source,public_params:null==ne?void 0:ne.status,search:null==ne?void 0:ne.keyword,sort_by:R[oe],sort_direction:"desc",tag_ids:null==d?void 0:d.map((function(e){return null==e?void 0:e.id}))}).then((function(e){var t,n;0==(null==e?void 0:e.status)&&(B(null==e||null===(t=e.data)||void 0===t?void 0:t.list),H(null==e||null===(n=e.data)||void 0===n?void 0:n.count))}));case 3:M(!1);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,D.jsxs)("div",{className:w.wrap,children:[(0,D.jsx)(g.YG,{value:ne.source,onChange:function(e){ne.source=e,ne.page=1,le(o()({},ne))},tabBarExtraContent:(0,D.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,D.jsx)(g.t7,{style:{width:300},placeholder:"请输入数据集名称进行搜索",value:ne.keyword,onChange:function(e){ne.keyword=e,ne.page=1,le(o()({},ne))}}),(null==i||null===(t=i.userInfo)||void 0===t?void 0:t.is_shixun_marker)&&(0,D.jsx)("div",{onClick:function(){return Y(!0)},className:w.addStyle,children:"创建数据集"})]}),dataSource:[{id:"mine",name:"我的数据集"},{id:"share",name:"团队共享"},{id:"collect",name:"我收藏的"}]}),(null===(n=["public","share"])||void 0===n?void 0:n.includes(null==ne?void 0:ne.source))&&(0,D.jsxs)("div",{style:{display:"flex",alignItems:"center",marginTop:"20px"},children:[(0,D.jsx)(Z.Z,{width:"895",getDataSet:function(e){_(e)},tags:d}),(0,D.jsx)("div",{style:{marginLeft:"auto",color:"#3061D0"},children:(0,D.jsx)(y.Z,{dropdownRender:function(){return(0,D.jsx)(x.Z,{selectedKeys:[oe],children:[{name:"引用数排序",type:"used_count",direction:"desc"},{name:"收藏数排序",type:"collect_count",direction:"asc"},{name:"创建时间排序",type:"created_at",direction:"desc"}].map((function(e){return(0,D.jsx)(x.Z.Item,{onClick:function(){se(e.name)},children:e.name},e.name)}))})},children:(0,D.jsx)("div",{children:(0,D.jsxs)("span",{className:"".concat(w.btn," ").concat(re?w.btnSort:""),children:[(0,D.jsx)("i",{className:"iconfont icon-paixu font14 mr5"}),oe]})})})})]}),"mine"==ne.source&&(0,D.jsxs)("div",{children:[!(0,I.Ny)()&&(0,D.jsxs)("div",{className:w.prompt,children:[(0,D.jsx)("i",{className:"icon icon-tishi11 font12 mr10"}),"温馨提示:平台为用户提供了",(0,D.jsx)("span",{style:{color:"#3061D0",margin:"0 5px"},children:"10GB"}),"的数据集存储空间,您目前已使用了",(0,D.jsxs)("span",{style:{color:"#FF9D18",margin:"0 5px"},children:[((null==i||null===(l=i.userInfo)||void 0===l?void 0:l.data_sets_filesize)/1073741824).toFixed(2),"GB"]})]}),(0,D.jsx)(g.qp,{title:"公开权限",className:"mt20",value:ne.status,onChange:function(e){ne.status=e,ne.page=1,le(o()({},ne))},dataSource:[{id:"",name:"全部"},{id:"public",name:"公开"},{id:"private",name:"私有"}],titleWidth:60})]}),(0,D.jsxs)(h.Z,{loading:J,children:[!(null!=G&&G.length)&&(0,D.jsx)(k.Z,{loading:J}),!(null==G||!G.length)&&(0,D.jsx)("div",{className:w.listWrap,style:{marginTop:"mine"==ne.source?0:20},children:null==G?void 0:G.map((function(e,t){var n,l,i;return(0,D.jsxs)("aside",{className:w.wrap,children:[(0,D.jsxs)("div",{className:w.leftContent,onClick:function(){return(0,S.xg)("/dataset/".concat(null==e?void 0:e.id,"/detail?tabId=").concat(ne.source))},children:[(0,D.jsxs)("div",{className:w.header,children:[(0,D.jsx)("div",{className:w.title,children:null==e?void 0:e.title}),(0,D.jsx)("div",{className:w.time,children:null==e?void 0:e.created_at})]}),(0,D.jsx)("div",{className:w.introduction,children:null==e?void 0:e.desc}),(0,D.jsxs)("div",{className:w.bottom,children:[(0,D.jsx)("img",{className:w.user_img,alt:"用户头像",src:"".concat(O.Z.IMG_SERVER,"/images/").concat(null==e||null===(n=e.user_info)||void 0===n?void 0:n.image_url)}),(0,D.jsx)("div",{className:w.user_name,children:null==e||null===(l=e.user_info)||void 0===l?void 0:l.name}),null==e||null===(i=e.data_set_tags)||void 0===i?void 0:i.map((function(t,n){return n<3?(0,D.jsx)("div",{className:w.tags_name,children:null==t?void 0:t.tag_name},n):3==n?(0,D.jsx)(b.Z,{title:null==e||null===(l=e.data_set_tags)||void 0===l?void 0:l.map((function(t,n){var l;if(n>2)return(null==t?void 0:t.tag_name)+(n===(null==e||null===(l=e.data_set_tags)||void 0===l?void 0:l.length)-1?"":"、")})).join(""),children:(0,D.jsx)("div",{className:w.tags_name,children:"..."},n)},n):null;var l})),(0,D.jsxs)("div",{className:w.buttonList,children:[(0,D.jsxs)("div",{className:w.buttonItem,children:[(0,D.jsx)("i",{className:"iconfont icon-yinyong font12 mr5"}),null==e?void 0:e.used_count]}),(0,D.jsxs)("div",{className:w.buttonItem,children:[(0,D.jsx)("i",{className:"iconfont icon-chakanrenshu font12 mr5"}),null==e?void 0:e.visited_count]}),(0,D.jsxs)("div",{className:w.buttonItem,children:[(0,D.jsx)("i",{className:"iconfont icon-xiaopinglun font12 mr5"}),null==e?void 0:e.comment_count]})]})]})]}),(0,D.jsx)("div",{className:w.rightContent,children:"mine"==ne.source?(0,D.jsx)("div",{className:w.publicStyle,onClick:function(){var t;j.Z.confirm({centered:!0,okText:"确定",icon:null,cancelText:"取消",title:"提示",content:0==(null==e?void 0:e.public_status)?"申请公开需要待平台管理员审核通过后,自动公开":1==(null==e?void 0:e.public_status)?"取消公开后,其他用户将不可见,同时再次公开需要重新进行申请":"撤销申请公开后,申请记录将删除,如需公开请再次申请",onOk:(t=u()(r()().mark((function t(){var n;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=null==e?void 0:e.public_status,t.next=0===t.t0?3:1===t.t0?5:2===t.t0?7:9;break;case 3:return n=(0,E.To)(null==e?void 0:e.id),t.abrupt("break",10);case 5:return n=(0,E.a6)(null==e?void 0:e.id),t.abrupt("break",10);case 7:return n=(0,E.Dx)(null==e?void 0:e.id),t.abrupt("break",10);case 9:return t.abrupt("return");case 10:n.then((function(e){0===(null==e?void 0:e.status)&&(N.ZP.success("操作成功"),ce())}));case 11:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)})})},children:0==(null==e?void 0:e.public_status)?"申请公开":1==(null==e?void 0:e.public_status)?"取消公开":"撤销申请公开"}):(0,D.jsxs)("div",{className:null!=e&&e.current_user_is_collect?w.collectActiveStyle:w.collectStyle,onClick:function(){(null!=e&&e.current_user_is_collect?(0,E.R9)({container_id:null==e?void 0:e.id,container_type:"DataSet"}):(0,E.nW)({container_id:null==e?void 0:e.id,container_type:"DataSet"})).then((function(n){0===(null==n?void 0:n.status)&&(null!=e&&e.current_user_is_collect?(G[t].current_user_is_collect=!(null!=e&&e.current_user_is_collect),G[t].collect_count=(null==e?void 0:e.collect_count)-1,B(a()(G))):(G[t].current_user_is_collect=!(null!=e&&e.current_user_is_collect),G[t].collect_count=(null==e?void 0:e.collect_count)+1,B(a()(G))))}))},children:[(0,D.jsx)("i",{className:"iconfont icon-shoucang4 font12"})," ",null==e?void 0:e.collect_count]})})]},t)}))})]}),(0,D.jsx)(C.Z,{showQuickJumper:!0,showSizeChanger:!0,pageSizeOptions:["10","20","50","100","200"],total:V,onChange:function(e,t){ne.page=e,ne.limit=t,le(o()({},ne))},pageSize:ne.limit,current:ne.page,hideOnSinglePage:!V,showTotal:S.rU}),(0,D.jsx)(P.Z,{visible:Q,onClose:function(){return Y(!1)},onSuccess:function(e){Y(!1),f.history.push("/dataset/".concat(e,"/detail?tabId=mine"))}})]})}))},38854:function(e,t,n){n.d(t,{Z:function(){return g}});var l=n(91857),a=n(92310),i=n.n(a),o=n(59301),s=n(94172),r=n(3113),c=n(36355),u=n(81327),d=n(33234),m=n(47211),_=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&t.indexOf(l)<0&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(l=Object.getOwnPropertySymbols(e);a<l.length;a++)t.indexOf(l[a])<0&&Object.prototype.propertyIsEnumerable.call(e,l[a])&&(n[l[a]]=e[l[a]])}return n};const p=e=>{const{getPopupContainer:t,getPrefixCls:n,direction:a}=o.useContext(c.E_),{prefixCls:p,type:v="default",danger:f,disabled:g,loading:y,onClick:x,htmlType:h,children:b,className:j,menu:N,arrow:C,autoFocus:S,overlay:w,trigger:k,align:O,open:E,onOpenChange:Z,placement:I,getPopupContainer:P,href:D,icon:T=o.createElement(s.Z,null),title:R,buttonsRender:L=(e=>e),mouseEnterDelay:$,mouseLeaveDelay:z,overlayClassName:A,overlayStyle:G,destroyPopupOnHide:B,dropdownRender:F}=e,W=_(e,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","dropdownRender"]),V=n("dropdown",p),H=`${V}-button`,[U,K]=(0,m.Z)(V),J={menu:N,arrow:C,autoFocus:S,align:O,disabled:g,trigger:g?[]:k,onOpenChange:Z,getPopupContainer:P||t,mouseEnterDelay:$,mouseLeaveDelay:z,overlayClassName:A,overlayStyle:G,destroyPopupOnHide:B,dropdownRender:F},{compactSize:M,compactItemClassnames:X}=(0,d.ri)(V,a),q=i()(H,X,j,K);"overlay"in e&&(J.overlay=w),"open"in e&&(J.open=E),J.placement="placement"in e?I:"rtl"===a?"bottomLeft":"bottomRight";const Q=o.createElement(r.ZP,{type:v,danger:f,disabled:g,loading:y,onClick:x,htmlType:h,href:D,title:R},b),Y=o.createElement(r.ZP,{type:v,danger:f,icon:T}),[ee,te]=L([Q,Y]);return U(o.createElement(u.Z.Compact,Object.assign({className:q,size:M,block:!0},W),ee,o.createElement(l.Z,Object.assign({},J),te)))};p.__ANT_BUTTON=!0;var v=p;const f=l.Z;f.Button=v;var g=f},81327:function(e,t,n){n.d(t,{Z:function(){return y}});var l=n(59301),a=n(92310),i=n.n(a),o=n(75440),s=n(36355),r=n(33234);const c=l.createContext({latestIndex:0}),u=c.Provider;var d=e=>{let{className:t,index:n,children:a,split:i,style:o}=e;const{latestIndex:s}=l.useContext(c);return null==a?null:l.createElement(l.Fragment,null,l.createElement("div",{className:t,style:o},a),n<s&&i&&l.createElement("span",{className:`${t}-split`},i))},m=n(2856);function _(e){return["small","middle","large"].includes(e)}function p(e){return!!e&&("number"==typeof e&&!Number.isNaN(e))}var v=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&t.indexOf(l)<0&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(l=Object.getOwnPropertySymbols(e);a<l.length;a++)t.indexOf(l[a])<0&&Object.prototype.propertyIsEnumerable.call(e,l[a])&&(n[l[a]]=e[l[a]])}return n};const f=l.forwardRef(((e,t)=>{var n,a;const{getPrefixCls:r,space:c,direction:f}=l.useContext(s.E_),{size:g=(null==c?void 0:c.size)||"small",align:y,className:x,rootClassName:h,children:b,direction:j="horizontal",prefixCls:N,split:C,style:S,wrap:w=!1,classNames:k,styles:O}=e,E=v(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[Z,I]=Array.isArray(g)?g:[g,g],P=_(I),D=_(Z),T=p(I),R=p(Z),L=(0,o.Z)(b,{keepEmpty:!0}),$=void 0===y&&"horizontal"===j?"center":y,z=r("space",N),[A,G]=(0,m.Z)(z),B=i()(z,null==c?void 0:c.className,G,`${z}-${j}`,{[`${z}-rtl`]:"rtl"===f,[`${z}-align-${$}`]:$,[`${z}-gap-row-${I}`]:P,[`${z}-gap-col-${Z}`]:D},x,h),F=i()(`${z}-item`,null!==(n=null==k?void 0:k.item)&&void 0!==n?n:null===(a=null==c?void 0:c.classNames)||void 0===a?void 0:a.item);let W=0;const V=L.map(((e,t)=>{var n,a;null!=e&&(W=t);const i=e&&e.key||`${F}-${t}`;return l.createElement(d,{className:F,key:i,index:t,split:C,style:null!==(n=null==O?void 0:O.item)&&void 0!==n?n:null===(a=null==c?void 0:c.styles)||void 0===a?void 0:a.item},e)})),H=l.useMemo((()=>({latestIndex:W})),[W]);if(0===L.length)return null;const U={};return w&&(U.flexWrap="wrap"),!D&&R&&(U.columnGap=Z),!P&&T&&(U.rowGap=I),A(l.createElement("div",Object.assign({ref:t,className:B,style:Object.assign(Object.assign(Object.assign({},U),null==c?void 0:c.style),S)},E),l.createElement(u,{value:H},V)))}));const g=f;g.Compact=r.ZP;var y=g},1012:function(e,t,n){n.d(t,{Z:function(){return d}});var l="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),a=new Uint8Array(16);function i(){if(!l)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return l(a)}var o=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var s=function(e){return"string"==typeof e&&o.test(e)},r=[],c=0;c<256;++c)r.push((c+256).toString(16).substr(1));var u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(r[e[t+0]]+r[e[t+1]]+r[e[t+2]]+r[e[t+3]]+"-"+r[e[t+4]]+r[e[t+5]]+"-"+r[e[t+6]]+r[e[t+7]]+"-"+r[e[t+8]]+r[e[t+9]]+"-"+r[e[t+10]]+r[e[t+11]]+r[e[t+12]]+r[e[t+13]]+r[e[t+14]]+r[e[t+15]]).toLowerCase();if(!s(n))throw TypeError("Stringified UUID is invalid");return n};var d=function(e,t,n){var l=(e=e||{}).random||(e.rng||i)();if(l[6]=15&l[6]|64,l[8]=63&l[8]|128,t){n=n||0;for(var a=0;a<16;++a)t[n+a]=l[a];return t}return u(l)}}}]); |