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
11 KiB

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