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 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()(E,2),f=B[0],P=B[1],k=(0,j.useState)([]),C=S()(k,2),g=C[0],D=C[1],y=(0,j.useState)([]),L=S()(y,2),b=L[0],z=L[1],H=(0,j.useState)(!1),x=S()(H,2),G=x[0],$=x[1],Q=(0,j.useState)(!1),R=S()(Q,2),A=R[0],c=R[1],p=m.Z.useForm(),s=S()(p,1),o=s[0],O=m.Z.useForm(),d=S()(O,1),w=d[0],i=function(){var t=F()(l()().mark(function n(){var u;return l()().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,Z.ON)();case 2:u=r.sent,u.data&&D(u.data);case 4:case"end":return r.stop()}},n)}));return function(){return t.apply(this,arguments)}}(),M=function(){var t=F()(l()().mark(function n(u){return l()().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(u){r.next=2;break}return r.abrupt("return");case 2:return r.next=4,(0,Z.o9)({deviceId:u});case 4:i();case 5:case"end":return r.stop()}},n)}));return function(u){return t.apply(this,arguments)}}(),ke=[{title:"\u8BBE\u5907id",dataIndex:"deviceId",ellipsis:!0},{title:"\u6E20\u9053",dataIndex:"channel",render:function(n){switch(n){case"fanmiyou":return"\u51E1\u7C73\u6E38";case"qiji":return"\u5947\u8FF9"}return n}},{title:"\u64CD\u4F5C",dataIndex:"operate",render:function(n,u){return(0,e.jsx)(ve.Z,{title:"\u786E\u8BA4\u5220\u9664\u5417",content:(0,e.jsxs)("div",{style:{textAlign:"center"},children:[(0,e.jsxs)("p",{children:["\u5220\u9664\u4E4B\u540Eecpm\u4F1A\u964D\u4F4E",(0,e.jsx)("br",{}),"\u4E5F\u4F1A\u5F71\u54CD\u5237\u6570\u636E\u53EF\u4F7F\u7528\u7684\u8BBE\u5907"]}),(0,e.jsx)("a",{onClick:function(){return M(u.deviceId)},children:"\u786E\u5B9A"})]}),children:(0,e.jsx)("a",{children:"\u5220\u9664"})})}}],Oe=function(n){var u=f.find(function(h){return h.id===n});return u?u.name:""},Te=function(n){return n?parseFloat((n/1e5).toFixed(2)):0},Ye=[{title:"\u5E94\u7528",dataIndex:"appId",render:function(n){return(0,e.jsx)(he.Z,{color:"blue",children:Oe(n)},n)}},{title:"\u6E20\u9053",dataIndex:"channel",render:function(n){switch(n){case"fanmiyou":return"\u51E1\u7C73\u6E38";case"qiji":return"\u5947\u8FF9"}return n}},{title:"\u76EE\u6807\u91D1\u989D",dataIndex:"incomeYuan"},{title:"\u5DF2\u5237\u91D1\u989D",dataIndex:"mockIncome",render:function(n){return Te(n)}},{title:"\u5F00\u59CB\u65F6\u95F4",dataIndex:"scheduleTime",render:function(n){return U()(n).format("YYYY-MM-DD HH:mm")}},{title:"\u72B6\u6001",dataIndex:"status",render:function(n){switch(n){case 0:return"\u672A\u5F00\u59CB";case 1:return"\u8FDB\u884C\u4E2D";case 2:return"\u5DF2\u5B8C\u6210"}return n}},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"createdAt",render:function(n){return U()(n).format("YYYY-MM-DD HH:mm")}},{title:"\u66F4\u65B0\u65F6\u95F4",dataIndex:"updatedAt",render:function(n){return U()(n).format("YYYY-MM-DD HH:mm")}}],J=function(){var t=F()(l()().mark(function n(){var u;return l()().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,Z.mW)();case 2:u=r.sent,u.data&&z(u.data);case 4:case"end":return r.stop()}},n)}));return function(){return t.apply(this,arguments)}}(),Pe=function(){var t=F()(l()().mark(function n(){var u;return l()().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,Z.ln)();case 2:u=r.sent,u.data&&P(u.data);case 4:case"end":return r.stop()}},n)}));return function(){return t.apply(this,arguments)}}();(0,j.useEffect)(function(){Pe(),i(),J()},[]);var Le=function(){var t=F()(l()().mark(function n(u){var h,r,T;return l()().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return h=u.scheduleTime,r=ie()(u,Ie),T=h.map(function(ae){return U()(ae.time).valueOf()}),v.prev=2,v.next=5,(0,Z.tI)(ue()({scheduleTime:T},r));case 5:v.next=10;break;case 7:return v.prev=7,v.t0=v.catch(2),v.abrupt("return");case 10:I.ZP.success("\u4EFB\u52A1\u63D0\u4EA4\u6210\u529F"),J(),c(!1);case 13:case"end":return v.stop()}},n,null,[[2,7]])}));return function(u){return t.apply(this,arguments)}}(),be=function(){o.resetFields(),$(!0)},$e=function(){w.resetFields(),c(!0)},Me=function(){o.submit()},Ue=function(){$(!1)},We=function(){w.submit()},He=function(){c(!1)},Re=function(){var t=F()(l()().mark(function n(u){return l()().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,(0,Z.QW)({deviceId:u.deviceId||"",channel:u.channel||""});case 3:r.next=8;break;case 5:return r.prev=5,r.t0=r.catch(0),r.abrupt("return");case 8:$(!1),i();case 10:case"end":return r.stop()}},n,null,[[0,5]])}));return function(u){return t.apply(this,arguments)}}();return(0,e.jsx)(fe._z,{children:(0,e.jsxs)(me.Z,{defaultActiveKey:"1",onChange:function(n){n==="1"?i():n==="2"&&J()},centered:!0,style:{backgroundColor:"white",padding:"20px"},children:[(0,e.jsx)(K.Z,{tab:"\u8BBE\u5907\u767D\u540D\u5355",children:(0,e.jsxs)("div",{children:[(0,e.jsx)(N.ZP,{onClick:be,children:"\u6DFB\u52A0\u767D\u540D\u5355"}),(0,e.jsx)(q.Z,{columns:ke,dataSource:g}),(0,e.jsx)(_.Z,{title:"\u6DFB\u52A0\u767D\u540D\u5355",visible:G,onOk:Me,onCancel:Ue,children:(0,e.jsxs)(m.Z,{form:o,onFinish:Re,children:[(0,e.jsx)(m.Z.Item,{name:"deviceId",label:"\u8BBE\u5907id",children:(0,e.jsx)(ee.Z,{})}),(0,e.jsx)(m.Z.Item,{label:"\u6E20\u9053",name:"channel",children:(0,e.jsxs)(Y.Z,{children:[(0,e.jsx)(Y.Z.Option,{value:"fanmiyou",children:"\u51E1\u7C73\u6E38"}),(0,e.jsx)(Y.Z.Option,{value:"qiji",children:"\u5947\u8FF9"})]})})]})})]})},"1"),(0,e.jsx)(K.Z,{tab:"\u5237\u6570\u636E",children:(0,e.jsxs)("div",{children:[(0,e.jsx)(N.ZP,{onClick:$e,children:"\u6DFB\u52A0\u4EFB\u52A1"}),(0,e.jsx)(q.Z,{columns:Ye,dataSource:b}),(0,e.jsx)(_.Z,{title:"\u6DFB\u52A0\u4EFB\u52A1",visible:A,onOk:We,onCancel:He,children:(0,e.jsxs)(m.Z,{form:w,onFinish:Le,children:[(0,e.jsx)(m.Z.Item,{label:"\u5E94\u7528",name:"appId",children:(0,e.jsx)(Y.Z,{children:f.map(function(t){return(0,e.jsx)(Y.Z.Option,{value:t.id,children:t.name},t.id)})})}),(0,e.jsx)(m.Z.Item,{name:"incomeYuan",label:"\u91D1\u989D\uFF08\u5143\uFF09",children:(0,e.jsx)(ee.Z,{})}),(0,e.jsx)(m.Z.List,{name:"scheduleTime",children:function(n,u){var h=u.add,r=u.remove;return(0,e.jsxs)(e.Fragment,{children:[n.map(function(T){var re=T.key,v=T.name;return(0,e.jsxs)("div",{children:[(0,e.jsx)(m.Z.Item,{name:[v,"time"],label:"\u5F00\u59CB\u65F6\u95F4",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u5F00\u59CB\u65F6\u95F4"}],children:(0,e.jsx)(pe.default,{format:"YYYY-MM-DD HH:mm",showTime:{format:"HH:mm"}})}),(0,e.jsx)(oe.Z,{onClick:function(){return r(v)},onPointerEnterCapture:void 0,onPointerLeaveCapture:void 0})]},re)}),(0,e.jsx)(m.Z.Item,{children:(0,e.jsx)(N.ZP,{type:"dashed",onClick:function(){return h()},block:!0,children:"\u6DFB\u52A0\u5F00\u59CB\u65F6\u95F4"})})]})}})]})})]})},"2"),(0,e.jsx)(K.Z,{tab:"\u4E0A\u4F20\u8D44\u6E90",children:(0,e.jsx)(xe,{})},"3")]})})},Be=Ee}}]);