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

"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[455],{52128:function(le,x,e){e.r(x),e.d(x,{default:function(){return be}});var P=e(97857),Z=e.n(P),M=e(13769),O=e.n(M),T=e(15009),s=e.n(T),D=e(99289),i=e.n(D),S=e(5574),f=e.n(S),v=e(48357),j=e(52043),U=e(3089),q=e(90930),h=e(8232),L=e(55241),Y=e(66309),y=e(2453),pe=e(13169),_=e(14726),ie=e(72051),de=e(17788),ce=e(55102),oe=e(34041),ge=e(71230),fe=e(15746),Se=e(47676),ee=e(16250),je=e(27484),N=e.n(je),E=e(67294),Fe=e(19632),me=e.n(Fe),De=e(32400),ye=e(56448),Ee=e.n(ye),Ce=e(66476),r=e(85893),Ae=function(V){var R=V.onUploadSuccess,C=V.onUploadError,re=(0,E.useState)(!1),G=f()(re,2),w=G[0],W=G[1],ne=(0,E.useState)([]),z=f()(ne,2),$=z[0],k=z[1],ae=(0,E.useState)(null),X=f()(ae,2),I=X[0],te=X[1],K=Ce.Z.Dragger;(0,E.useEffect)(function(){function A(){return m.apply(this,arguments)}function m(){return m=i()(s()().mark(function F(){var l,p;return s()().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.prev=0,c.next=3,(0,v.po)();case 3:if(l=c.sent,!(!l.data||!l.data.accessKeySecret||!l.data.accessKeyId)){c.next=7;break}return y.ZP.error("\u521D\u59CB\u5316\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5"),c.abrupt("return");case 7:p=new(Ee())({region:"oss-cn-beijing",accessKeyId:l.data.accessKeyId,accessKeySecret:l.data.accessKeySecret,stsToken:l.data.securityToken,bucket:l.data.bucket}),te(p),c.next=15;break;case 11:c.prev=11,c.t0=c.catch(0),y.ZP.error("\u521D\u59CB\u5316 OSS \u5BA2\u6237\u7AEF\u5931\u8D25"),C&&C(c.t0);case 15:case"end":return c.stop()}},F,null,[[0,11]])})),m.apply(this,arguments)}A()},[C]);var ue=function(m){var F=($||[]).filter(function(l){return l.url!==m.url});k(F)},Q=function(){var A=i()(s()().mark(function m(F){var l,p,b,c;return s()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(l=F.file,!(l instanceof File)){d.next=26;break}return W(!0),d.prev=3,d.next=6,(0,De.p)(l);case 6:return p=d.sent,b="matrix/".concat(p,".").concat(l.name.split(".").pop()),d.next=10,I==null?void 0:I.put(b,l,{headers:{"Content-Type":l.type}});case 10:c="https://apks.bzgames.cn/".concat(b),R&&R(c),W(!1),k(function(H){return[].concat(me()(H),[{uid:l.uid,name:l.name+"\uFF1A"+c,status:"done",url:c}])}),d.next=21;break;case 16:d.prev=16,d.t0=d.catch(3),y.ZP.error("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25"),C&&C(d.t0),k(function(H){return[].concat(me()(H),[{uid:l.uid,name:l.name,status:"error"}])});case 21:return d.prev=21,W(!1),d.finish(21);case 24:d.next=27;break;case 26:y.ZP.error("\u4E0A\u4F20\u6587\u4EF6\u7C7B\u578B\u9519\u8BEF");case 27:case"end":return d.stop()}},m,null,[[3,16,21,24]])}));return function(F){return A.apply(this,arguments)}}();return(0,r.jsxs)(K,{fileList:$,multiple:!0,customRequest:Q,onRemove:ue,disabled:w||!I,onPreview:function(){var A=i()(s()().mark(function m(F){return s()().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.next=2,navigator.clipboard.writeText(F.url||"");case 2:y.ZP.success("\u94FE\u63A5\u590D\u5236\u6210\u529F "+F.url);case 3:case"end":return p.stop()}},m)}));return function(m){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"})]})},Ie=Ae,xe=["scheduleTime"],Ze=function(){var V=(0,E.useState)([]),R=f()(V,2),C=R[0],re=R[1],G=(0,E.useState)([]),w=f()(G,2),W=w[0],ne=w[1],z=(0,E.useState)([]),$=f()(z,2),k=$[0],ae=$[1],X=(0,E.useState)(!1),I=f()(X,2),te=I[0],K=I[1],ue=(0,E.useState)(!1),Q=f()(ue,2),A=Q[0],m=Q[1],F=h.Z.useForm(),l=f()(F,1),p=l[0],b=h.Z.useForm(),c=f()(b,1),J=c[0],d=function(){var u=i()(s()().mark(function n(){var t;return s()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,v.hy)();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)}}(),H=function(){var u=i()(s()().mark(function n(t){return s()().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,v.o9)({deviceId:t});case 4:d();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,j.FG)(),o=t.find(function(a){return a.value===n});return o?o.label:n}},{title:"\u64CD\u4F5C",dataIndex:"operate",render:function(n,t){return(0,r.jsx)(L.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 H(t.deviceId)},children:"\u786E\u5B9A"})]}),children:(0,r.jsx)("a",{children:"\u5220\u9664"})})}}],Me=function(n){var t=C.find(function(o){return o.id===n});return t?t.name:""},Oe=function(n){return n?parseFloat((n/1e5).toFixed(2)):0},Te=[{title:"\u5E94\u7528",dataIndex:"appId",render:function(n){return(0,r.jsx)(Y.Z,{color:"blue",children:Me(n)},n)}},{title:"\u6E20\u9053",dataIndex:"channel",render:function(n){var t=(0,j.FG)(),o=t.find(function(a){return a.value===n});return o?o.label:n}},{title:"\u76EE\u6807\u91D1\u989D",dataIndex:"incomeYuan"},{title:"\u5DF2\u5237\u91D1\u989D",dataIndex:"mockIncome",render:function(n){return Oe(n)}},{title:"\u5F00\u59CB\u65F6\u95F4",dataIndex:"scheduleTime",render:function(n){return N()(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 N()(n).format("YYYY-MM-DD HH:mm")}},{title:"\u66F4\u65B0\u65F6\u95F4",dataIndex:"updatedAt",render:function(n){return N()(n).format("YYYY-MM-DD HH:mm")}}],se=function(){var u=i()(s()().mark(function n(){var t;return s()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,v.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)}}(),Ue=function(){var u=i()(s()().mark(function n(){var t;return s()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,v.ln)();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)}}();(0,E.useEffect)(function(){Ue(),d(),se()},[]);var Le=function(){var u=i()(s()().mark(function n(t){var o,a,B;return s()().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return o=t.scheduleTime,a=O()(t,xe),B=o.map(function(he){return N()(he.time).valueOf()}),g.prev=2,g.next=5,(0,v.tI)(Z()({scheduleTime:B},a));case 5:g.next=10;break;case 7:return g.prev=7,g.t0=g.catch(2),g.abrupt("return");case 10:y.ZP.success("\u4EFB\u52A1\u63D0\u4EA4\u6210\u529F"),se(),m(!1);case 13:case"end":return g.stop()}},n,null,[[2,7]])}));return function(t){return u.apply(this,arguments)}}(),Ye=function(){p.resetFields(),K(!0)},Re=function(){J.resetFields(),m(!0)},We=function(){p.submit()},$e=function(){K(!1)},ke=function(){J.submit()},Ke=function(){m(!1)},He=function(){var u=i()(s()().mark(function n(t){return s()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,(0,v.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:K(!1),d();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)(pe.Z,{defaultActiveKey:"1",onChange:function(n){n==="1"?d():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:Ye,children:"\u6DFB\u52A0\u767D\u540D\u5355"}),(0,r.jsx)(ie.Z,{columns:Pe,dataSource:W}),(0,r.jsx)(de.Z,{title:"\u6DFB\u52A0\u767D\u540D\u5355",visible:te,onOk:We,onCancel:$e,children:(0,r.jsxs)(h.Z,{form:p,onFinish:He,children:[(0,r.jsx)(h.Z.Item,{name:"deviceId",label:"\u8BBE\u5907id",children:(0,r.jsx)(ce.Z,{})}),(0,r.jsx)(h.Z.Item,{label:"\u6E20\u9053",name:"channel",children:(0,r.jsx)(oe.Z,{options:(0,j.FG)()})})]})})]})},"1"),(0,r.jsx)(ee.Z,{tab:"\u5237\u6570\u636E",children:(0,r.jsxs)("div",{children:[(0,r.jsx)(_.ZP,{onClick:Re,children:"\u6DFB\u52A0\u4EFB\u52A1"}),(0,r.jsx)(ie.Z,{columns:Te,dataSource:k}),(0,r.jsx)(de.Z,{title:"\u6DFB\u52A0\u4EFB\u52A1",visible:A,onOk:ke,onCancel:Ke,children:(0,r.jsxs)(h.Z,{labelCol:{span:6},wrapperCol:{span:18},form:J,onFinish:Le,children:[(0,r.jsx)(h.Z.Item,{label:"\u5E94\u7528",name:"appId",children:(0,r.jsx)(oe.Z,{mode:"multiple",options:C.map(function(u){return{label:u.name,value:u.id}})})}),(0,r.jsx)(h.Z.Item,{name:"incomeYuan",label:"\u91D1\u989D\uFF08\u5143\uFF09",children:(0,r.jsx)(ce.Z,{})}),(0,r.jsx)(h.Z.List,{name:"scheduleTime",children:function(n,t){var o=t.add,a=t.remove;return(0,r.jsxs)(r.Fragment,{children:[n.map(function(B){var ve=B.key,g=B.name;return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)(ge.Z,{align:"stretch",gutter:16,children:[(0,r.jsx)(fe.Z,{span:18,children:(0,r.jsx)(h.Z.Item,{labelCol:{xs:{span:24},sm:{span:8}},name:[g,"time"],label:"\u5F00\u59CB\u65F6\u95F4",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u5F00\u59CB\u65F6\u95F4"}],children:(0,r.jsx)(Se.default,{format:"YYYY-MM-DD HH:mm",showTime:{format:"HH:mm"}})})}),(0,r.jsx)(fe.Z,{children:(0,r.jsx)(U.Z,{onClick:function(){return a(g)}})})]},ve)})}),(0,r.jsx)(h.Z.Item,{children:(0,r.jsx)(_.ZP,{type:"dashed",onClick:function(){return o()},block:!0,children:"\u6DFB\u52A0\u5F00\u59CB\u65F6\u95F4"})})]})}})]})})]})},"2"),(0,r.jsx)(ee.Z,{tab:"\u4E0A\u4F20\u8D44\u6E90",children:(0,r.jsx)(Ie,{})},"3")]})})},be=Ze},52043:function(le,x,e){e.d(x,{E7:function(){return Z},FG:function(){return P},RQ:function(){return T},XY:function(){return M},m0:function(){return O}});var P=function(){return[{label:"\u51E1\u7C73\u6E38",value:"fanmiyou"},{label:"\u5947\u8FF9",value:"qiji"}]},Z=function(D){var i=[];if(!D)return i;for(var S=D,f=["\u7528\u6237\u6253\u5F00\u4E86USB\u8C03\u8BD5\u6A21\u5F0F","\u7528\u6237\u6253\u5F00\u4E86\u5F00\u53D1\u8005\u6A21\u5F0F","\u7528\u6237\u6253\u5F00\u4E86\u65E0\u969C\u788D\u6A21\u5F0F","\u7528\u6237\u624B\u673A\u5DF2\u7ECFRoot","\u7528\u6237\u5B89\u88C5\u4E86Xpose","\u7528\u6237\u5F00\u542F\u4E86VPN","\u7528\u6237\u5F00\u542F\u4EE3\u7406","\u652F\u4ED8\u5B9D\u672A\u5B89\u88C5","\u5FAE\u4FE1\u672A\u5B89\u88C5"],v=0,j=f;v<j.length;v++){var U=j[v];S%2===1&&i.push(U),S=Math.floor(S/2)}return i},M=function(){return[{label:"\u5F85\u5BA1\u6279",value:"0",color:"orange"},{label:"\u5BA1\u6279\u901A\u8FC7",value:"1",color:"green"},{label:"\u8F6C\u8D26\u4E2D",value:"2",color:"orange"},{label:"\u8F6C\u8D26\u6210\u529F",value:"3",color:"green"},{label:"\u8F6C\u8D26\u5931\u8D25",value:"-1",color:"red"},{label:"\u5BA1\u6279\u62D2\u7EDD",value:"-2",color:"red"}]},O=function(D){var i=new Date(D),S=i.getFullYear().toString().padStart(4,"0"),f=(i.getMonth()+1).toString().padStart(2,"0"),v=i.getDate().toString().padStart(2,"0");return S+f+v},T=function(D,i){var S=D.toString();return S.padStart(i,"0")}},32400:function(le,x,e){e.d(x,{p:function(){return D}});var P=e(15009),Z=e.n(P),M=e(99289),O=e.n(M),T=e(8322),s=e.n(T);function D(S){return i.apply(this,arguments)}function i(){return i=O()(Z()().mark(function S(f){return Z()().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return j.abrupt("return",new Promise(function(U,q){var h=new(s()).ArrayBuffer,L=new FileReader;L.onload=function(Y){var y;h.append((y=Y.target)===null||y===void 0?void 0:y.result),U(h.end())},L.onerror=function(Y){q(Y)},L.readAsArrayBuffer(f)}));case 1:case"end":return j.stop()}},S)})),i.apply(this,arguments)}}}]);