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/7400.3514db74.async.js

2 lines
26 KiB

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7400],{65003:function(De,ce,o){o.d(ce,{cT:function(){return P},pe:function(){return J}});var r=o(59301),ie=o(5157),B=o(8591),b=o(40117),de=o(28209),F=o.n(de),N=o(48655),m=o(71471),ve=o(47257),ee=o.n(ve),te=Object.defineProperty,w=Object.defineProperties,Y=Object.getOwnPropertyDescriptors,Z=Object.getOwnPropertySymbols,O=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable,ne=(n,i,c)=>i in n?te(n,i,{enumerable:!0,configurable:!0,writable:!0,value:c}):n[i]=c,ue=(n,i)=>{for(var c in i||(i={}))O.call(i,c)&&ne(n,c,i[c]);if(Z)for(var c of Z(i))W.call(i,c)&&ne(n,c,i[c]);return n},K=(n,i)=>w(n,Y(i)),$=(n,i)=>{var c={};for(var d in n)O.call(n,d)&&i.indexOf(d)<0&&(c[d]=n[d]);if(n!=null&&Z)for(var d of Z(n))i.indexOf(d)<0&&W.call(n,d)&&(c[d]=n[d]);return c},u=(n,i,c)=>new Promise((d,a)=>{var e=C=>{try{g(c.next(C))}catch(s){a(s)}},v=C=>{try{g(c.throw(C))}catch(s){a(s)}},g=C=>C.done?d(C.value):Promise.resolve(C.value).then(e,v);g((c=c.apply(n,i)).next())});const{Dragger:G}=ie.default,J=n=>{const i="bf3c199c2470cb477d907b1e0917c17b",c="5183666c72eec9e4";var d=F().enc.Utf8.parse(i);let a=F().enc.Utf8.parse(c);var e=F().AES.decrypt(n,d,{iv:a,mode:F().mode.CBC});return e.toString(F().enc.Utf8)};let l;const D=n=>u(void 0,[n],function*({identifier:i,oldFilename:c,newFilename:d}){var a,e,v,g,C,s;const f=yield Fetch("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});f.data=JSON.parse(J(f.data));const _=new OSS({endpoint:(a=f==null?void 0:f.data)==null?void 0:a.end_point,region:(e=f==null?void 0:f.data)==null?void 0:e.region,accessKeyId:(v=f==null?void 0:f.data)==null?void 0:v.access_key_id,accessKeySecret:(g=f==null?void 0:f.data)==null?void 0:g.access_key_secret,bucket:(C=f==null?void 0:f.data)==null?void 0:C.bucket,stsToken:(s=f==null?void 0:f.data)==null?void 0:s.security_token});return new Promise((E,z)=>{console.log(11111,`${i}/${c}`,`${i}/${d}`,f.data),_.copy(`/${i}/${c}`,`/${i}/${d}`).then(H=>{console.log("\u62F7\u8D1D\u6210\u529F",H)}).catch(H=>{console.log(H)})})}),P=(n,i,c)=>u(void 0,null,function*(){var d,a,e,v,g,C;i.file_name=n.name;const s=yield(0,b.ZP)("/api/buckets/get_upload_token.json",{method:"get"});console.log("decrypt(res.data):",J(s.data)),s.data=JSON.parse(J(s.data));const f=n.name.split(".");f.pop();const _=i.realFileName?f.join(""):(0,N.Z)(),E=new(ee())({endpoint:(d=s==null?void 0:s.data)==null?void 0:d.end_point,region:(a=s==null?void 0:s.data)==null?void 0:a.region,accessKeyId:(e=s==null?void 0:s.data)==null?void 0:e.access_key_id,accessKeySecret:(v=s==null?void 0:s.data)==null?void 0:v.access_key_secret,bucket:(g=s==null?void 0:s.data)==null?void 0:g.bucket,stsToken:(C=s==null?void 0:s.data)==null?void 0:C.security_token});return new Promise((z,H)=>{var k;E.multipartUpload(`${_}`,new Blob([n],{type:n.type}),K(ue({timeout:200*1e3,partSize:102400},c),{callback:{url:(k=s==null?void 0:s.data)==null?void 0:k.callback_url,host:s==null?void 0:s.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,b.rz)(i)}})).then(function(S){var se;n.response=(se=S.data)==null?void 0:se.data,z(S==null?void 0:S.data)}).catch(function(S){H(S),console.log("err:",S)})})}),_e=n=>{var i=n,{user:c,cancelUpload:d}=i,a=$(i,["user","cancelUpload"]);const[e,v]=(0,r.useState)([]);let[g,C]=(0,r.useState)();const s={onRemove:_=>{v([...e.filter(E=>E.name!==_.name)]),a.onChange(e.filter(E=>E.name!==_.name))},disabled:a.disabled,multiple:!0,fileList:e==null?void 0:e.map(_=>_.file),customRequest:()=>{},beforeUpload:_=>u(void 0,null,function*(){let E=a.maxSize||1073741824;if(e.filter(z=>z.name===_.name).length){B.ZP.info(`${_.name}\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9`);return}return(_==null?void 0:_.size)>E?(B.ZP.info(`\u6587\u4EF6\u8D85\u8FC7${E/1024/1024/1024}GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42`),!1):(e.push({name:_.name,file:_}),v([...e]),a.onChange(e),!1)})},f=(_,E)=>u(void 0,null,function*(){var z,H,k,S,se,j;E.file_name=_.name;const M=_.name,h=yield(0,b.ZP)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});if(h.data=JSON.parse(J(h.data)),(h==null?void 0:h.status)!==0){e[e.findIndex(fe=>fe.name===M)].status="error",e[e.findIndex(fe=>fe.name===M)].file.status="error",a.onChange(e),B.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5");return}g=new(ee())({endpoint:(z=h==null?void 0:h.data)==null?void 0:z.end_point,region:(H=h==null?void 0:h.data)==null?void 0:H.region,accessKeyId:(k=h==null?void 0:h.data)==null?void 0:k.access_key_id,accessKeySecret:(S=h==null?void 0:h.data)==null?void 0:S.access_key_secret,bucket:(se=h==null?void 0:h.data)==null?void 0:se.bucket,stsToken:(j=h==null?void 0:h.data)==null?void 0:j.security_token}),console.log(_,"file"),C(g);const ge=_.name.split(".");ge.pop();const Pe=M.indexOf(".")>-1?E.realFileName?ge.join("."):(0,N.Z)():M;return new Promise((fe,Ce)=>{var Fe;try{g.multipartUpload(`${a.identifier}/${Pe}${M.indexOf(".")>-1?"."+M.split(".").pop():""}`,new Blob([_.file],{type:_.file.type}),{timeout:3600*1e3,partSize:1002400,progress:(I,q,pe)=>{try{console.log("\u8FDB\u5EA6",I,q,pe);const re=e.findIndex(t=>t.name===M);e[re].file.percent=I*100,e[re].tempCheckpoint=q,v([...e])}catch(re){}},checkpoint:e[e.findIndex(I=>I.name===M)].tempCheckpoint,callback:{customValue:{id:M+""},url:(Fe=h==null?void 0:h.data)==null?void 0:Fe.callback_url,host:h==null?void 0:h.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,b.rz)(E)}}).then(function(I){var q,pe,re;const t=e.findIndex(y=>y.name===M);let p="done";if(((q=I.data)==null?void 0:q.status)===0){_.response=(pe=I.data)==null?void 0:pe.data;const y=e.findIndex(T=>T.name===M);e[y].status="done",e[y].file.status="done"}else B.ZP.warning((re=I.data)==null?void 0:re.message),p="error";e[t].status=p,e[t].file.status=p,a.onChange(e),fe(I==null?void 0:I.data)}).catch(function(I){e[e.findIndex(q=>q.name===M)].status="error",e[e.findIndex(q=>q.name===M)].file.status="error",B.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),v([...e]),a.onChange(e),Ce(I),console.log("err:",I)})}catch(I){}})});return(0,r.useEffect)(()=>{e.every(_=>_==="done"||_==="error")&&a.onComplete(e)},[e]),(0,r.useEffect)(()=>{d&&(g==null||g.cancel())},[d]),(0,r.useEffect)(()=>{a.uploading&&e.map(_=>u(void 0,null,function*(){var E;if((!_.status||_.status==="error")&&!d){_.status="uploading",_.file.status="uploading";const z=yield f(_,{login:(E=c==null?void 0:c.userInfo)==null?void 0:E.login,container_type:a.container_type,container_id:a.container_id,description:a.description,realFileName:a.realFileName})}}))},[a.uploading]),r.createElement(G,K(ue({},s),{height:a.height,className:a.className}),r.createElement("p",{className:"ant-upload-hint"},a.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};ce.ZP=(0,m.connect)(({loading:n,globalSetting:i,user:c})=>({globalSetting:i,loading:n.models.competitions,user:c}))(_e)},27400:function(De,ce,o){o.d(ce,{Z:function(){return d}});var r=o(59301),ie=o(92832),B=o(78700),b=o(8591),de=o(43418),F=o(71418),N=o(5157),m=o(95435),ve=o(74987),ee=o(98554),te={flex_box_center:"flex_box_center___SntrE",flex_space_between:"flex_space_between___g4tse",flex_box_vertical_center:"flex_box_vertical_center___ooGcI",flex_box_center_end:"flex_box_center_end___UM2Cs",flex_box_column:"flex_box_column___vRGBc",prompt:"prompt___a_aRk",box:"box___X84XK",row:"row___wofpN",icon:"icon___ixIOQ"},w=o(40117),Y=o(16427),Z=o(65003),O=o(48655),W=o(47257),ne=o.n(W),ue=o(61121),K=o(48110),$=o(2992),u=o(59301),G=Object.defineProperty,J=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,D=Object.prototype.propertyIsEnumerable,P=(a,e,v)=>e in a?G(a,e,{enumerable:!0,configurable:!0,writable:!0,value:v}):a[e]=v,_e=(a,e)=>{for(var v in e||(e={}))l.call(e,v)&&P(a,v,e[v]);if(J)for(var v of J(e))D.call(e,v)&&P(a,v,e[v]);return a},n=(a,e,v)=>new Promise((g,C)=>{var s=E=>{try{_(v.next(E))}catch(z){C(z)}},f=E=>{try{_(v.throw(E))}catch(z){C(z)}},_=E=>E.done?g(E.value):Promise.resolve(E.value).then(s,f);_((v=v.apply(a,e)).next())});const i=ie.default.TextArea;var d=({dataSetInfo:a,attachmentInfo:e,visible:v,onClose:g=()=>{},onSuccess:C=()=>{}})=>{const[s,f]=(0,r.useState)([]),[_,E]=(0,r.useState)(!1),[z,H]=(0,r.useState)(!1),[k]=B.default.useForm(),[S,se]=(0,r.useState)([]),[j,M]=(0,r.useState)({}),h=(0,r.useRef)([]);(0,r.useEffect)(()=>{if(v){if(a){const{title:t,is_public:p,desc:y,attachments:T,data_set_tags:A}=a||{},R=T.map(U=>({id:String(Math.random()).slice(-6),name:U.title,response:{attachment_id:U.id},size:U.size,description:U.description||"",percent:100,status:"done"}));f(R),se(A);const X={title:t,is_public:p,desc:y};k.setFieldsValue(X)}if(e){const t=e.map(p=>({id:String(Math.random()).slice(-6),name:p.title,response:{attachment_id:p.id},size:p.size,description:p.description||"",percent:100,status:"done"}));f(t)}ge()}},[v]),(0,r.useEffect)(()=>{h.current=s},[s]),(0,r.useEffect)(()=>{s!=null&&s.length?k.setFields([{name:"attachments",errors:[]}]):k.setFields([{name:"attachments",errors:["\u6570\u636E\u96C6\u4E0D\u80FD\u4E3A\u7A7A"]}])},[s.length]),(0,r.useEffect)(()=>{S!=null&&S.length?k.setFields([{name:"tag_ids",errors:[]}]):k.setFields([{name:"tag_ids",errors:["\u6570\u636E\u96C6\u6807\u7B7E\u4E0D\u80FD\u4E3A\u7A7A"]}])},[S.length]);const ge=()=>n(void 0,null,function*(){H(!0);const t=yield(0,w.ZP)("/api/data_sets/extra_info.jsoin",{method:"get"});t.status===0&&(M(t==null?void 0:t.data),H(!1))}),Pe={multiple:!0,withCredentials:!0,showUploadList:!1,beforeUpload:t=>n(void 0,null,function*(){var p,y,T,A;if(((A=(T=(y=(p=t.name)==null?void 0:p.split("."))==null?void 0:y.slice(0,-1))==null?void 0:T.join("."))==null?void 0:A.length)>60)return b.ZP.warning(`\u300A${t.name}\u300B\u6587\u4EF6\u540D\u79F0\u8FC7\u957F\uFF0C\u65E0\u6CD5\u4E0A\u4F20`),Promise.reject();if([...j.data_set_filenames,...h.current.map(Q=>Q.name)].includes(t.name))return b.ZP.warning(`\u300A${t.name}\u300B\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9`),Promise.reject();const X=t.size/1024/1024/1024;let U=j==null?void 0:j.data_sets_filesize;if(h.current.forEach(Q=>{U+=Q==null?void 0:Q.size}),U=U/1024/1024/1024,(0,$.Ny)()){if(X>50)return b.ZP.warning(`\u300A${t.name}\u300B\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u5355\u4E2A\u6587\u4EF6\u4E0A\u4F20\u5927\u5C0F\u9650\u5236(50GB)`),Promise.reject()}else if(X>2)return b.ZP.warning(`\u300A${t.name}\u300B\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u5355\u4E2A\u6587\u4EF6\u4E0A\u4F20\u5927\u5C0F\u9650\u5236(2GB)`),Promise.reject();if(U+X>10&&!(j!=null&&j.current_user_no_limit))return b.ZP.warning(`\u300A${t.name}\u300B\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u50A8\u5B58\u7A7A\u95F4\u5927\u5C0F\u9650\u5236(10GB)`),Promise.reject();const le={id:String(Math.random()).slice(-6),name:t.name,size:t.size,file:t,description:"",percent:0,status:"uploading"};return Fe(le,{login:j==null?void 0:j.login,container_type:"DataSet",container_id:null,description:"",realFileName:!1}),f(Q=>[...Q,le]),Promise.reject()})},fe=t=>n(void 0,null,function*(){var p,y,T;const A=h.current.find(R=>R.name===t.name);(p=A==null?void 0:A.response)!=null&&p.attachment_id&&(yield(0,w.ZP)("/api/data_sets/single_destroy_files.json",{method:"delete",body:{attachment_id:(y=A==null?void 0:A.response)==null?void 0:y.attachment_id}})),A!=null&&A.client&&((T=A==null?void 0:A.client)==null||T.cancel()),f(R=>R.filter(X=>X.name!==t.name))}),Ce=()=>{var t;(t=h.current)==null||t.forEach(p=>{var y;p!=null&&p.client&&((y=p==null?void 0:p.client)==null||y.cancel())})};console.log(s,"fileList1");const Fe=(t,p)=>n(void 0,null,function*(){var y,T,A,R,X,U,ae,le,Q;p.file_name=t.name;const me=t.name,x=yield(0,w.ZP)("/api/buckets/get_data_set_token.json",{method:"get"});if((x==null?void 0:x.status)!==0){f(L=>(L[L.findIndex(V=>V.name===me)].status="error",[...L])),b.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5");return}x.data=JSON.parse((0,Z.pe)(x.data));const Ae=new(ne())({endpoint:(y=x==null?void 0:x.data)==null?void 0:y.end_point,region:(T=x==null?void 0:x.data)==null?void 0:T.region,accessKeyId:(A=x==null?void 0:x.data)==null?void 0:A.access_key_id,accessKeySecret:(R=x==null?void 0:x.data)==null?void 0:R.access_key_secret,bucket:(X=x==null?void 0:x.data)==null?void 0:X.bucket,stsToken:(U=x==null?void 0:x.data)==null?void 0:U.security_token}),xe=t.name.split(".");xe.pop();const be=p.realFileName?xe.join("."):(0,O.Z)();Ae.multipartUpload(`datasets/${p==null?void 0:p.login}/${be}${me.indexOf(".")>-1?"."+me.split(".").pop():""}`,new Blob([t.file],{type:t.file.type}),{timeout:3600*1e3,partSize:1002400,progress:(L,V,Ee)=>{console.log("\u8FDB\u5EA6",L,V,Ee),f(oe=>{const he=oe.findIndex(ye=>ye.name===me);return oe[he].client=Ae,oe[he].percent=L*100,oe[he].checkpoint=V,[...oe]})},checkpoint:(le=h.current[(ae=h.current)==null?void 0:ae.findIndex(L=>L.name===me)])==null?void 0:le.checkpoint,callback:{customValue:{id:me+""},url:(Q=x==null?void 0:x.data)==null?void 0:Q.callback_url,host:x==null?void 0:x.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,w.rz)(p)}}).then(function(L){f(V=>{var Ee,oe,he;const ye=V.findIndex(Oe=>Oe.name===me);let Be="done";return((Ee=L.data)==null?void 0:Ee.status)===0?V[ye].response=(oe=L.data)==null?void 0:oe.data:(b.ZP.warning((he=L.data)==null?void 0:he.message),Be="error"),V[ye].status=Be,[...V]})}).catch(function(L){console.log("\u63A5\u53E3\u9519\u8BEF\uFF1A",L),(L==null?void 0:L.name)!=="cancel"&&f(V=>{const Ee=V.findIndex(oe=>oe.name===me);return V[Ee].status="error",[...V]})})}),I=t=>(t=t||"",t=String(t),t=t.replace(/\s+/g,""),t),q=()=>n(void 0,null,function*(){var t;const p=k.getFieldsValue(),{title:y,is_public:T,desc:A}=p,R=[];if(I(y)||R.push({name:"title",errors:["\u6570\u636E\u96C6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A"]}),s!=null&&s.length||R.push({name:"attachments",errors:["\u6570\u636E\u96C6\u4E0D\u80FD\u4E3A\u7A7A"]}),S!=null&&S.length||R.push({name:"tag_ids",errors:["\u6570\u636E\u96C6\u6807\u7B7E\u4E0D\u80FD\u4E3A\u7A7A"]}),R.length){k.setFields(R);return}const X=s.map(le=>{var Q;return{attachment_id:(Q=le.response)==null?void 0:Q.attachment_id,description:le.description}});E(!0);const U={title:p.title,attachments:X,tag_ids:S.map(le=>le.id),is_public:T,desc:A};let ae;a?ae=yield(0,w.ZP)(`/api/data_sets/${a==null?void 0:a.id}.json`,{method:"put",body:U}):ae=yield(0,w.ZP)("/api/data_sets.json",{method:"post",body:U}),ae.status===0&&(b.ZP.success("\u64CD\u4F5C\u6210\u529F"),C((t=ae==null?void 0:ae.data)==null?void 0:t.data_set_id)),E(!1)}),pe=t=>{se(t)},re=s.some(t=>t.status==="uploading");return console.log("fileList",s),u.createElement(de.default,{destroyOnClose:!0,confirmLoading:_,bodyStyle:{paddingLeft:16,paddingTop:20},okButtonProps:{disabled:re},title:a?"\u7F16\u8F91\u6570\u636E\u96C6":"\u521B\u5EFA\u6570\u636E\u96C6",width:660,onCancel:()=>{if(re){de.default.confirm({title:"\u5173\u95ED\u5F39\u6846\u63D0\u793A",content:"\u6709\u6587\u4EF6\u672A\u4E0A\u4F20\uFF0C\u662F\u5426\u786E\u5B9A\u79BB\u5F00\uFF1F",okText:"\u79BB\u5F00",cancelText:"\u53D6\u6D88",onOk:()=>{g()}});return}g()},okText:"\u786E\u5B9A",onOk:q,open:v,afterClose:()=>{f([]),se([]),E(!1),H(!1),Ce(),k.resetFields()}},u.createElement(F.Z,{spinning:z},!(j!=null&&j.current_user_no_limit)&&!z&&u.createElement("div",{className:te.prompt},u.createElement("i",{className:"icon icon-tishi11 font12 mr10"}),"\u6E29\u99A8\u63D0\u793A:\u5E73\u53F0\u4E3A\u7528\u6237\u63D0\u4F9B\u4E86",u.createElement("span",{style:{color:"#3061D0",margin:"0 5px"}},"10GB"),"\u7684\u6570\u636E\u96C6\u5B58\u50A8\u7A7A\u95F4\uFF0C\u60A8\u76EE\u524D\u5DF2\u4F7F\u7528\u4E86",u.createElement("span",{style:{color:"#FF9D18",margin:"0 5px"}},((j==null?void 0:j.data_sets_filesize)/(1024*1024*1024)).toFixed(2),"GB")),u.createElement(B.default,{form:k,colon:!1,labelCol:{span:4},wrapperCol:{span:20},size:"large"},u.createElement(B.default.Item,{label:"\u6570\u636E\u96C6\u540D\u79F0",name:"title",rules:[{required:!0,message:"\u6570\u636E\u96C6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A"}]},u.createElement(ie.default,{placeholder:"\u8BF7\u8F93\u5165\u6570\u636E\u96C6\u540D\u79F0",showCount:!0,maxLength:60})),u.createElement(B.default.Item,{style:{marginBottom:0},name:"attachments",label:"\u4E0A\u4F20\u6570\u636E\u96C6",rules:[{required:!0,message:"\u6570\u636E\u96C6\u4E0D\u80FD\u4E3A\u7A7A"}]},u.createElement("div",{style:{position:"relative"}},u.createElement(N.default,_e({},Pe),u.createElement(K.op,{style:{borderRadius:2}},u.createElement("i",{className:"icon-shangchuan3 mr5 font14"}),"\u4E0A\u4F20\u6587\u4EF6")),u.createElement("div",{style:{color:"#9096A3",fontSize:"12px",marginLeft:"10px",position:"absolute",left:"115px",top:"-2px"}},u.createElement("div",null,"1.\u5355\u4E2A\u6587\u4EF6\u4E0D\u80FD\u8D85\u8FC7",(0,$.Ny)()?50:2,"G"),u.createElement("div",null,"2.",j!=null&&j.current_user_no_limit?"":"\u4E2A\u4EBA\u4E0A\u4F20\u603B\u4F53\u79EF\u4E0D\u8D85\u8FC710GB\uFF0C","\u6587\u4EF6\u540D\u4E0D\u8D85\u8FC760\u5B57")))),u.createElement("div",{className:te.box},s.map(t=>u.createElement("div",{key:t.id,className:te.row},u.createElement("div",{className:te.icon},t.status==="done"&&u.createElement("i",{className:"iconfont icon-wancheng",style:{color:"#19CB70"}}),t.status==="error"&&u.createElement("i",{className:"iconfont icon-cuowu",style:{color:"#E30000",marginLeft:1,fontSize:13}})),u.createElement("div",{style:{width:176}},u.createElement(m.Z,{title:t==null?void 0:t.name},u.createElement("div",{style:{color:t.status==="error"?"#E30000":"#3061D0",textDecoration:"underline"}},(0,Y.tP)(t==null?void 0:t.name,9))),t.status==="uploading"&&u.createElement(ve.Z,{strokeColor:"#3061D0",trailColor:"rgba(144, 150, 163, 0.1)",percent:t.percent,showInfo:!1,size:[168,4]})),u.createElement("i",{onClick:()=>fe(t),className:"iconfont icon-shanchu14 font14 ml20 mr20",style:{cursor:"pointer",color:"#F65160"}}),u.createElement(ie.default,{value:t.description,onChange:p=>{f(y=>{const T=y.findIndex(A=>A.name===t.name);return y[T].description=p.target.value,[...y]})},placeholder:"\u5907\u6CE8\u8BF4\u660E",showCount:!0,maxLength:255,style:{width:"286px"}})))),u.createElement(B.default.Item,{label:"\u6807\u7B7E",name:"tag_ids",rules:[{required:!0,message:"\u6570\u636E\u96C6\u6807\u7B7E\u4E0D\u80FD\u4E3A\u7A7A"}]},u.createElement(ue.Z,{isTagsValue:!0,width:"514",selectWidth:"514",placeholder:"\u6DFB\u52A0\u6807\u7B7E",getDataSet:pe,tags:S})),u.createElement(B.default.Item,{initialValue:0,label:"\u662F\u5426\u516C\u5F00",name:"is_public",rules:[{required:!0}]},u.createElement(ee.ZP.Group,null,u.createElement(ee.ZP,{value:1},"\u662F"),u.createElement(ee.ZP,{value:0},"\u5426"))),u.createElement("div",{style:{position:"relative",left:"100px",top:"-20px",width:"400px",color:"#9096A3",fontSize:"12px"}},"\u516C\u5F00\u9700\u8981\u7BA1\u7406\u5458\u5BA1\u6838\u901A\u8FC7\u540E\u53EF\u88AB\u5176\u4ED6\u7528\u6237\u8BBF\u95EE"),u.createElement(B.default.Item,{label:"\u7B80\u4ECB\u6458\u8981",name:"desc",style:{marginBottom:0}},u.createElement(i,{placeholder:"\u6B64\u6570\u636E\u96C6\u4E3B\u8981\u5305\u542B\u4EC0\u4E48\u5185\u5BB9\uFF0C\u53EF\u4EE5\u7528\u6765\u505A\u4EC0\u4E48\uFF1F"})))))}},61121:function(De,ce,o){o.d(ce,{Z:function(){return te}});var r=o(59301),ie=o(71471),B=o(57809),b=o(71418),de=o(8591),F={flex_box_center:"flex_box_center___OmLFa",flex_space_between:"flex_space_between___Pwqhp",flex_box_vertical_center:"flex_box_vertical_center___UJzms",flex_box_center_end:"flex_box_center_end___qMu25",flex_box_column:"flex_box_column___AimtA",selectList:"selectList___hGJUN",selectHeader:"selectHeader___HxdBZ",selectContent:"selectContent___oWjby",contentTitle:"contentTitle___xlVyW",contentTags:"contentTags___BGCLU",tagName:"tagName___MIGDL",tagNameActive:"tagNameActive___JCRev",activeStyle:"activeStyle___FvXnt",activeLabel:"activeLabel___RzW9T",activeValue:"activeValue___qxoch",activeItem:"activeItem___NfFjA",activeClose:"activeClose___Su7dS",activeSubmit:"activeSubmit___gjhQA"},N=o(35421),m=o(59301),ve=(w,Y,Z)=>new Promise((O,W)=>{var ne=$=>{try{K(Z.next($))}catch(u){W(u)}},ue=$=>{try{K(Z.throw($))}catch(u){W(u)}},K=$=>$.done?O($.value):Promise.resolve($.value).then(ne,ue);K((Z=Z.apply(w,Y)).next())});const ee=({user:w,width:Y,selectWidth:Z,tags:O,getDataSet:W,placeholder:ne="\u5168\u90E8\u6807\u7B7E",isTagsValue:ue=!1})=>{const[K,$]=(0,r.useState)([]),[u,G]=(0,r.useState)([]),[J,l]=(0,r.useState)(!1),D=(0,r.useRef)(null);(0,r.useEffect)(()=>{P()},[]);const P=()=>ve(void 0,null,function*(){l(!0),yield(0,N.bj)({}).then(n=>{(n==null?void 0:n.status)==0&&$(n==null?void 0:n.data)}),l(!1)}),_e=O==null?void 0:O.map(n=>n.tag_name).join("\u3001");return m.createElement(B.default,{onFocus:()=>{G(O)},ref:D,style:{width:Z?Z+"px":300},placeholder:(O==null?void 0:O.length)>0?ue?m.createElement("span",{className:"c-grey-333"},_e):`\u5DF2\u9009\u4E2D${O==null?void 0:O.length}\u4E2A\u6807\u7B7E`:ne,size:"large",dropdownStyle:{width:Y+"px",zIndex:1e3},className:F.selectStyle,dropdownRender:()=>m.createElement("div",{className:F.selectList,style:{width:Y+"px"}},m.createElement("div",{className:F.selectHeader},"\u8BF7\u9009\u62E91\uFF5E5\u4E2A\u6807\u7B7E"),m.createElement(b.Z,{spinning:J},m.createElement("div",{className:F.selectContent},K==null?void 0:K.map((n,i)=>{var c;return m.createElement("aside",{key:i},m.createElement("div",{className:F.contentTitle,style:{marginTop:i>0?"20px":"0"}},n==null?void 0:n.tag_type_cn),m.createElement("div",{className:F.contentTags},(c=n==null?void 0:n.child)==null?void 0:c.map((d,a)=>{var e;return m.createElement("div",{key:a,className:(e=u==null?void 0:u.map(v=>v==null?void 0:v.id))!=null&&e.includes(d==null?void 0:d.id)?F.tagNameActive:F.tagName,onClick:()=>{var v;(v=u==null?void 0:u.map(g=>g==null?void 0:g.id))!=null&&v.includes(d==null?void 0:d.id)?G(u.filter(g=>(g==null?void 0:g.id)!=(d==null?void 0:d.id))):(u==null?void 0:u.length)<5?G([...u,d]):de.ZP.warning("\u6700\u591A\u53EF\u9009\u62E95\u4E2A\u6807\u7B7E")}},d==null?void 0:d.tag_name)})))}))),m.createElement("div",{className:F.activeStyle},m.createElement("div",{className:F.activeLabel},"\u5DF2\u9009\u6807\u7B7E:"),m.createElement("div",{className:F.activeValue,style:{width:Y-120+"px"}},u==null?void 0:u.map((n,i)=>m.createElement("div",{key:i,className:F.activeItem},n==null?void 0:n.tag_name,m.createElement("i",{className:"iconfont icon-guanbi11 ml5 mr5",style:{fontSize:"10px",cursor:"pointer"},onClick:()=>{G(u.filter(c=>(c==null?void 0:c.id)!==(n==null?void 0:n.id)))}}))))),m.createElement("div",{style:{display:"flex",marginBottom:"20px"}},m.createElement("div",{className:F.activeClose,onClick:n=>{n.stopPropagation(),W([...O]),G([]),setTimeout(()=>{D.current&&D.current.blur()},10)}},"\u53D6\u6D88"),m.createElement("div",{className:F.activeSubmit,onClick:n=>{n.stopPropagation(),W([...u]),G([]),setTimeout(()=>{D.current&&D.current.blur()},10)}},"\u786E\u8BA4")))})};var te=(0,ie.connect)(({user:w})=>({user:w}))(ee)},35421:function(De,ce,o){o.d(ce,{A0:function(){return J},Ce:function(){return ue},Dx:function(){return w},Il:function(){return G},R2:function(){return ne},R9:function(){return O},Ru:function(){return W},To:function(){return te},_S:function(){return ee},a6:function(){return Y},bj:function(){return ve},l5:function(){return u},nW:function(){return Z},pP:function(){return $},pi:function(){return K}});var r=o(40117),ie=Object.defineProperty,B=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,F=(l,D,P)=>D in l?ie(l,D,{enumerable:!0,configurable:!0,writable:!0,value:P}):l[D]=P,N=(l,D)=>{for(var P in D||(D={}))b.call(D,P)&&F(l,P,D[P]);if(B)for(var P of B(D))de.call(D,P)&&F(l,P,D[P]);return l},m=(l,D,P)=>new Promise((_e,n)=>{var i=a=>{try{d(P.next(a))}catch(e){n(e)}},c=a=>{try{d(P.throw(a))}catch(e){n(e)}},d=a=>a.done?_e(a.value):Promise.resolve(a.value).then(i,c);d((P=P.apply(l,D)).next())});function ve(l){return m(this,null,function*(){return(0,r.ZP)("/api/data_sets/tags.json",{method:"get",params:N({},l)})})}function ee(l){return m(this,null,function*(){return(0,r.ZP)("/api/data_sets.json",{method:"get",params:N({},l)})})}function te(l){return m(this,null,function*(){return(0,r.ZP)(`/api/data_sets/${l}/apply_public.json`,{method:"post"})})}function w(l){return m(this,null,function*(){return(0,r.ZP)(`/api/data_sets/${l}/revoke_apply_public.json`,{method:"post"})})}function Y(l){return m(this,null,function*(){return(0,r.ZP)(`/api/data_sets/${l}/cancel_public.json`,{method:"post"})})}function Z(l){return m(this,null,function*(){return(0,r.ZP)("/api/collections.json",{method:"post",body:N({},l)})})}function O(l){return m(this,null,function*(){return(0,r.ZP)("/api/collections/cancel.json",{method:"delete",body:N({},l)})})}function W(l){return m(this,null,function*(){return(0,r.ZP)(`/api/data_sets/${l}.json`,{method:"get"})})}function ne(l){return m(this,null,function*(){return(0,r.ZP)(`/api/data_sets/${l==null?void 0:l.id}/edit_introduce.json`,{method:"put",body:N({},l)})})}function ue(l){return m(this,null,function*(){return(0,r.ZP)(`/api/data_sets/${l==null?void 0:l.id}/used_shixuns.json`,{method:"get",params:N({},l)})})}function K(l){return m(this,null,function*(){return(0,r.ZP)(`/api/shixuns/${l}/data_sets_list.json`,{method:"get"})})}function $(l){return m(this,null,function*(){return(0,r.ZP)(`/api/data_sets/${l}/delete.json`,{method:"delete"})})}function u(l){return m(this,null,function*(){return(0,r.ZP)("/api/teach_group_shares.json",{method:"post",body:N({},l)})})}function G(l){return m(this,null,function*(){return(0,r.ZP)("/api/data_sets/single_destroy_files.json",{method:"delete",body:N({},l)})})}function J(l){return m(this,null,function*(){return(0,r.ZP)(`/api/data_sets/${l==null?void 0:l.id}/edit_file_info.json`,{method:"put",body:N({},l)})})}}}]);