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.

2 lines
10 KiB

"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[455],{41597:function(we,X,a){a.r(X),a.d(X,{default:function(){return Be}});var te=a(97857),ue=a.n(te),se=a(13769),ie=a.n(se),le=a(15009),l=a.n(le),de=a(99289),F=a.n(de),ce=a(5574),S=a.n(ce),Z=a(48357),oe=a(3089),fe=a(90930),m=a(8232),ve=a(55241),he=a(66309),I=a(2453),me=a(13169),N=a(14726),q=a(72051),_=a(17788),ee=a(55102),Y=a(34041),pe=a(47676),K=a(16250),Fe=a(27484),U=a.n(Fe),j=a(67294),Se=a(19632),ne=a.n(Se),je=a(8322),ge=a.n(je);function ye(W){return V.apply(this,arguments)}function V(){return V=F()(l()().mark(function W(E){return l()().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.abrupt("return",new Promise(function(P,k){var C=new(ge()).ArrayBuffer,g=new FileReader;g.onload=function(D){var y;C.append((y=D.target)===null||y===void 0?void 0:y.result),P(C.end())},g.onerror=function(D){k(D)},g.readAsArrayBuffer(E)}));case 1:case"end":return f.stop()}},W)})),V.apply(this,arguments)}var Ae=a(56448),Ze=a.n(Ae),Ce=a(66476),e=a(85893),De=function(E){var B=E.onUploadSuccess,f=E.onUploadError,P=(0,j.useState)(!1),k=S()(P,2),C=k[0],g=k[1],D=(0,j.useState)([]),y=S()(D,2),L=y[0],b=y[1],z=(0,j.useState)(null),H=S()(z,2),x=H[0],G=H[1],$=Ce.Z.Dragger;(0,j.useEffect)(function(){function A(){return c.apply(this,arguments)}function c(){return c=F()(l()().mark(function p(){var s,o;return l()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.prev=0,d.next=3,(0,Z.po)();case 3:if(s=d.sent,!(!s.data||!s.data.accessKeySecret||!s.data.accessKeyId)){d.next=7;break}return I.ZP.error("\u521D\u59CB\u5316\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5"),d.abrupt("return");case 7:o=new(Ze())({region:"oss-cn-beijing",accessKeyId:s.data.accessKeyId,accessKeySecret:s.data.accessKeySecret,stsToken:s.data.securityToken,bucket:s.data.bucket}),G(o),d.next=15;break;case 11:d.prev=11,d.t0=d.catch(0),I.ZP.error("\u521D\u59CB\u5316 OSS \u5BA2\u6237\u7AEF\u5931\u8D25"),f&&f(d.t0);case 15:case"end":return d.stop()}},p,null,[[0,11]])})),c.apply(this,arguments)}A()},[f]);var Q=function(c){var p=(L||[]).filter(function(s){return s.url!==c.url});b(p)},R=function(){var A=F()(l()().mark(function c(p){var s,o,O,d;return l()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(s=p.file,!(s instanceof File)){i.next=26;break}return g(!0),i.prev=3,i.next=6,ye(s);case 6:return o=i.sent,O="matrix/".concat(o,".").concat(s.name.split(".").pop()),i.next=10,x==null?void 0:x.put(O,s,{headers:{"Content-Type":s.type}});case 10:d="https://apks.bzgames.cn/".concat(O),B&&B(d),g(!1),b(function(M){return[].concat(ne()(M),[{uid:s.uid,name:s.name+"\uFF1A"+d,status:"done",url:d}])}),i.next=21;break;case 16:i.prev=16,i.t0=i.catch(3),I.ZP.error("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25"),f&&f(i.t0),b(function(M){return[].concat(ne()(M),[{uid:s.uid,name:s.name,status:"error"}])});case 21:return i.prev=21,g(!1),i.finish(21);case 24:i.next=27;break;case 26:I.ZP.error("\u4E0A\u4F20\u6587\u4EF6\u7C7B\u578B\u9519\u8BEF");case 27:case"end":return i.stop()}},c,null,[[3,16,21,24]])}));return function(p){return A.apply(this,arguments)}}();return(0,e.jsxs)($,{fileList:L,multiple:!0,customRequest:R,onRemove:Q,disabled:C||!x,onPreview:function(){var A=F()(l()().mark(function c(p){return l()().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,navigator.clipboard.writeText(p.url||"");case 2:I.ZP.success("\u94FE\u63A5\u590D\u5236\u6210\u529F "+p.url);case 3:case"end":return o.stop()}},c)}));return function(c){return A.apply(this,arguments)}}(),children:[(0,e.jsx)("p",{className:"ant-upload-drag-icon",children:(0,e.jsx)("i",{className:"anticon anticon-inbox"})}),(0,e.jsx)("p",{className:"ant-upload-text",children:"\u70B9\u51FB\u6216\u62D6\u62FD\u6587\u4EF6\u5230\u6B64\u533A\u57DF\u4E0A\u4F20"}),(0,e.jsx)("p",{className:"ant-upload-hint",children:"\u652F\u6301\u5355\u4E2A\u6216\u6279\u91CF\u4E0A\u4F20\u3002\u6587\u4EF6\u540D\u5C06\u4F7F\u7528\u6587\u4EF6\u7684 MD5 \u503C\u547D\u540D\u3002"})]})},xe=De,Ie=["scheduleTime"],Ee=function(){var E=(0,j.useState)([]),B=S()(