"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[455],{52128:function(ie,y,e){e.r(y),e.d(y,{default:function(){return Ze}});var x=e(97857),P=e.n(x),w=e(13769),z=e.n(w),Q=e(15009),l=e.n(Q),J=e(99289),v=e.n(J),R=e(5574),p=e.n(R),D=e(48357),g=e(52043),X=e(3089),q=e(90930),f=e(8232),b=e(55241),B=e(66309),F=e(2453),he=e(13169),_=e(14726),le=e(72051),de=e(17788),ce=e(55102),oe=e(34041),pe=e(47676),ee=e(16250),je=e(27484),W=e.n(je),S=e(67294),Fe=e(19632),fe=e.n(Fe),Se=e(32400),De=e(56448),ge=e.n(De),Ee=e(66476),r=e(85893),Ae=function(k){var O=k.onUploadSuccess,E=k.onUploadError,ne=(0,S.useState)(!1),$=p()(ne,2),K=$[0],M=$[1],re=(0,S.useState)([]),H=p()(re,2),T=H[0],L=H[1],ae=(0,S.useState)(null),N=p()(ae,2),C=N[0],te=N[1],U=Ee.Z.Dragger;(0,S.useEffect)(function(){function A(){return o.apply(this,arguments)}function o(){return o=v()(l()().mark(function j(){var s,m;return l()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.prev=0,d.next=3,(0,D.po)();case 3:if(s=d.sent,!(!s.data||!s.data.accessKeySecret||!s.data.accessKeyId)){d.next=7;break}return F.ZP.error("\u521D\u59CB\u5316\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5"),d.abrupt("return");case 7:m=new(ge())({region:"oss-cn-beijing",accessKeyId:s.data.accessKeyId,accessKeySecret:s.data.accessKeySecret,stsToken:s.data.securityToken,bucket:s.data.bucket}),te(m),d.next=15;break;case 11:d.prev=11,d.t0=d.catch(0),F.ZP.error("\u521D\u59CB\u5316 OSS \u5BA2\u6237\u7AEF\u5931\u8D25"),E&&E(d.t0);case 15:case"end":return d.stop()}},j,null,[[0,11]])})),o.apply(this,arguments)}A()},[E]);var ue=function(o){var j=(T||[]).filter(function(s){return s.url!==o.url});L(j)},V=function(){var A=v()(l()().mark(function o(j){var s,m,I,d;return l()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(s=j.file,!(s instanceof File)){i.next=26;break}return M(!0),i.prev=3,i.next=6,(0,Se.p)(s);case 6:return m=i.sent,I="matrix/".concat(m,".").concat(s.name.split(".").pop()),i.next=10,C==null?void 0:C.put(I,s,{headers:{"Content-Type":s.type}});case 10:d="https://apks.bzgames.cn/".concat(I),O&&O(d),M(!1),L(function(Y){return[].concat(fe()(Y),[{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),F.ZP.error("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25"),E&&E(i.t0),L(function(Y){return[].concat(fe()(Y),[{uid:s.uid,name:s.name,status:"error"}])});case 21:return i.prev=21,M(!1),i.finish(21);case 24:i.next=27;break;case 26:F.ZP.error("\u4E0A\u4F20\u6587\u4EF6\u7C7B\u578B\u9519\u8BEF");case 27:case"end":return i.stop()}},o,null,[[3,16,21,24]])}));return function(j){return A.apply(this,arguments)}}();return(0,r.jsxs)(U,{fileList:T,multiple:!0,customRequest:V,onRemove:ue,disabled:K||!C,onPreview:function(){var A=v()(l()().mark(function o(j){return l()().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,navigator.clipboard.writeText(j.url||"");case 2:F.ZP.success("\u94FE\u63A5\u590D\u5236\u6210\u529F "+j.url);case 3:case"end":return m.stop()}},o)}));return function(o){return A.apply(this,arguments)}}(),capture:void 0,children:[(0,r.jsx)("p",{className:"ant-upload-drag-icon",children:(0,r.jsx)("i",{className:"anticon anticon-inbox"})}),(0,r.jsx)("p",{className:"ant-upload-text",children:"\u70B9\u51FB\u6216\u62D6\u62FD\u6587\u4EF6\u5230\u6B64\u533A\u57DF\u4E0A\u4F20"}),(0,r.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"})]})},Ce=Ae,ye=["scheduleTime"],Ie=function(){var k=(0,S.useState)([]),O=p()(k,2),E=O[0],ne=O[1],$=(0,S.useState)([]),K=p()($,2),M=K[0],re=K[1],H=(0,S.useState)([]),T=p()(H,2),L=T[0],ae=T[1],N=(0,S.useState)(!1),C=p()(N,2),te=C[0],U=C[1],ue=(0,S.useState)(!1),V=p()(ue,2),A=V[0],o=V[1],j=f.Z.useForm(),s=p()(j,1),m=s[0],I=f.Z.useForm(),d=p()(I,1),G=d[0],i=function(){var u=v()(l()().mark(function n(){var t;return l()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,D.ON)();case 2:t=a.sent,t.data&&re(t.data);case 4:case"end":return a.stop()}},n)}));return function(){return u.apply(this,arguments)}}(),Y=function(){var u=v()(l()().mark(function n(t){return l()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(t){a.next=2;break}return a.abrupt("return");case 2:return a.next=4,(0,D.o9)({deviceId:t});case 4:i();case 5:case"end":return a.stop()}},n)}));return function(t){return u.apply(this,arguments)}}(),Pe=[{title:"\u8BBE\u5907id",dataIndex:"deviceId",ellipsis:!0},{title:"\u6E20\u9053",dataIndex:"channel",render:function(n){var t=(0,g.F)(),c=t.find(function(a){return a.value===n});return c?c.label:n}},{title:"\u64CD\u4F5C",dataIndex:"operate",render:function(n,t){return(0,r.jsx)(b.Z,{title:"\u786E\u8BA4\u5220\u9664\u5417",content:(0,r.jsxs)("div",{style:{textAlign:"center"},children:[(0,r.jsxs)("p",{children:["\u5220\u9664\u4E4B\u540Eecpm\u4F1A\u964D\u4F4E",(0,r.jsx)("br",{}),"\u4E5F\u4F1A\u5F71\u54CD\u5237\u6570\u636E\u53EF\u4F7F\u7528\u7684\u8BBE\u5907"]}),(0,r.jsx)("a",{onClick:function(){return Y(t.deviceId)},children:"\u786E\u5B9A"})]}),children:(0,r.jsx)("a",{children:"\u5220\u9664"})})}}],be=function(n){var t=E.find(function(c){return c.id===n});return t?t.name:""},Be=function(n){return n?parseFloat((n/1e5).toFixed(2)):0},Oe=[{title:"\u5E94\u7528",dataIndex:"appId",render:function(n){return(0,r.jsx)(B.Z,{color:"blue",children:be(n)},n)}},{title:"\u6E20\u9053",dataIndex:"channel",render:function(n){var t=(0,g.F)(),c=t.find(function(a){return a.value===n});return c?c.label:n}},{title:"\u76EE\u6807\u91D1\u989D",dataIndex:"incomeYuan"},{title:"\u5DF2\u5237\u91D1\u989D",dataIndex:"mockIncome",render:function(n){return Be(n)}},{title:"\u5F00\u59CB\u65F6\u95F4",dataIndex:"scheduleTime",render:function(n){return W()(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 W()(n).format("YYYY-MM-DD HH:mm")}},{title:"\u66F4\u65B0\u65F6\u95F4",dataIndex:"updatedAt",render:function(n){return W()(n).format("YYYY-MM-DD HH:mm")}}],se=function(){var u=v()(l()().mark(function n(){var t;return l()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,D.mW)();case 2:t=a.sent,t.data&&ae(t.data);case 4:case"end":return a.stop()}},n)}));return function(){return u.apply(this,arguments)}}(),Me=function(){var u=v()(l()().mark(function n(){var t;return l()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,D.ln)();case 2:t=a.sent,t.data&&ne(t.data);case 4:case"end":return a.stop()}},n)}));return function(){return u.apply(this,arguments)}}();(0,S.useEffect)(function(){Me(),i(),se()},[]);var Te=function(){var u=v()(l()().mark(function n(t){var c,a,Z;return l()().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return c=t.scheduleTime,a=z()(t,ye),Z=c.map(function(ve){return W()(ve.time).valueOf()}),h.prev=2,h.next=5,(0,D.tI)(P()({scheduleTime:Z},a));case 5:h.next=10;break;case 7:return h.prev=7,h.t0=h.catch(2),h.abrupt("return");case 10:F.ZP.success("\u4EFB\u52A1\u63D0\u4EA4\u6210\u529F"),se(),o(!1);case 13:case"end":return h.stop()}},n,null,[[2,7]])}));return function(t){return u.apply(this,arguments)}}(),Le=function(){m.resetFields(),U(!0)},Ue=function(){G.resetFields(),o(!0)},Ye=function(){m.submit()},Re=function(){U(!1)},We=function(){G.submit()},ke=function(){o(!1)},$e=function(){var u=v()(l()().mark(function n(t){return l()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,(0,D.QW)({deviceId:t.deviceId||"",channel:t.channel||""});case 3:a.next=8;break;case 5:return a.prev=5,a.t0=a.catch(0),a.abrupt("return");case 8:U(!1),i();case 10:case"end":return a.stop()}},n,null,[[0,5]])}));return function(t){return u.apply(this,arguments)}}();return(0,r.jsx)(q._z,{children:(0,r.jsxs)(he.Z,{defaultActiveKey:"1",onChange:function(n){n==="1"?i():n==="2"&&se()},centered:!0,style:{backgroundColor:"white",padding:"20px"},children:[(0,r.jsx)(ee.Z,{tab:"\u8BBE\u5907\u767D\u540D\u5355",children:(0,r.jsxs)("div",{children:[(0,r.jsx)(_.ZP,{onClick:Le,children:"\u6DFB\u52A0\u767D\u540D\u5355"}),(0,r.jsx)(le.Z,{columns:Pe,dataSource:M}),(0,r.jsx)(de.Z,{title:"\u6DFB\u52A0\u767D\u540D\u5355",visible:te,onOk:Ye,onCancel:Re,children:(0,r.jsxs)(f.Z,{form:m,onFinish:$e,children:[(0,r.jsx)(f.Z.Item,{name:"deviceId",label:"\u8BBE\u5907id",children:(0,r.jsx)(ce.Z,{})}),(0,r.jsx)(f.Z.Item,{label:"\u6E20\u9053",name:"channel",children:(0,r.jsx)(oe.Z,{options:(0,g.F)()})})]})})]})},"1"),(0,r.jsx)(ee.Z,{tab:"\u5237\u6570\u636E",children:(0,r.jsxs)("div",{children:[(0,r.jsx)(_.ZP,{onClick:Ue,children:"\u6DFB\u52A0\u4EFB\u52A1"}),(0,r.jsx)(le.Z,{columns:Oe,dataSource:L}),(0,r.jsx)(de.Z,{title:"\u6DFB\u52A0\u4EFB\u52A1",visible:A,onOk:We,onCancel:ke,children:(0,r.jsxs)(f.Z,{form:G,onFinish:Te,children:[(0,r.jsx)(f.Z.Item,{label:"\u5E94\u7528",name:"appId",children:(0,r.jsx)(oe.Z,{options:E.map(function(u){return{label:u.name,value:u.id}})})}),(0,r.jsx)(f.Z.Item,{name:"incomeYuan",label:"\u91D1\u989D\uFF08\u5143\uFF09",children:(0,r.jsx)(ce.Z,{})}),(0,r.jsx)(f.Z.List,{name:"scheduleTime",children:function(n,t){var c=t.add,a=t.remove;return(0,r.jsxs)(r.Fragment,{children:[n.map(function(Z){var me=Z.key,h=Z.name;return(0,r.jsxs)("div",{children:[(0,r.jsx)(f.Z.Item,{name:[h,"time"],label:"\u5F00\u59CB\u65F6\u95F4",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u5F00\u59CB\u65F6\u95F4"}],children:(0,r.jsx)(pe.default,{format:"YYYY-MM-DD HH:mm",showTime:{format:"HH:mm"}})}),(0,r.jsx)(X.Z,{onClick:function(){return a(h)},onPointerOverCapture:void 0,onPointerMoveCapture:void 0})]},me)}),(0,r.jsx)(f.Z.Item,{children:(0,r.jsx)(_.ZP,{type:"dashed",onClick:function(){return c()},block:!0,children:"\u6DFB\u52A0\u5F00\u59CB\u65F6\u95F4"})})]})}})]})})]})},"2"),(0,r.jsx)(ee.Z,{tab:"\u4E0A\u4F20\u8D44\u6E90",children:(0,r.jsx)(Ce,{})},"3")]})})},Ze=Ie},52043:function(ie,y,e){e.d(y,{F:function(){return x}});var x=function(){return[{label:"\u51E1\u7C73\u6E38",value:"fanmiyou"},{label:"\u5947\u8FF9",value:"qiji"}]}},32400:function(ie,y,e){e.d(y,{p:function(){return J}});var x=e(15009),P=e.n(x),w=e(99289),z=e.n(w),Q=e(8322),l=e.n(Q);function J(R){return v.apply(this,arguments)}function v(){return v=z()(P()().mark(function R(p){return P()().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.abrupt("return",new Promise(function(X,q){var f=new(l()).ArrayBuffer,b=new FileReader;b.onload=function(B){var F;f.append((F=B.target)===null||F===void 0?void 0:F.result),X(f.end())},b.onerror=function(B){q(B)},b.readAsArrayBuffer(p)}));case 1:case"end":return g.stop()}},R)})),v.apply(this,arguments)}}}]);