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

"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[455],{87450:function(ge,re,s){s.r(re),s.d(re,{default:function(){return Ve}});var ce=s(97857),_=s.n(ce),de=s(13769),te=s.n(de),oe=s(15009),f=s.n(oe),fe=s(99289),S=s.n(fe),ae=s(5574),g=s.n(ae),L=s(48357),G=s(52043),H=s(40110),me=s(3089),ue=s(90930),x=s(8232),B=s(55102),R=s(42075),D=s(14726),Se=s(55241),se=s(66309),z=s(2453),Ie=s(13169),ve=s(72051),Q=s(17788),pe=s(34041),Ze=s(71230),je=s(15746),xe=s(47676),X=s(16250),De=s(27484),J=s.n(De),I=s(67294),ke=s(19632),ye=s.n(ke),Ee=s(32400),Ae=s(56448),be=s.n(Ae),Pe=s(66476),e=s(85893),Te=function(K){var P=K.onUploadSuccess,w=K.onUploadError,A=(0,I.useState)(!1),Y=g()(A,2),O=Y[0],T=Y[1],$=(0,I.useState)([]),U=g()($,2),F=U[0],o=U[1],j=(0,I.useState)(null),C=g()(j,2),v=C[0],Z=C[1],y=Pe.Z.Dragger;(0,I.useEffect)(function(){function n(){return r.apply(this,arguments)}function r(){return r=S()(f()().mark(function i(){var u,m;return f()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.prev=0,d.next=3,(0,L.po)();case 3:if(u=d.sent,!(!u.data||!u.data.accessKeySecret||!u.data.accessKeyId)){d.next=7;break}return z.ZP.error("\u521D\u59CB\u5316\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5"),d.abrupt("return");case 7:m=new(be())({region:"oss-cn-beijing",accessKeyId:u.data.accessKeyId,accessKeySecret:u.data.accessKeySecret,stsToken:u.data.securityToken,bucket:u.data.bucket}),Z(m),d.next=15;break;case 11:d.prev=11,d.t0=d.catch(0),z.ZP.error("\u521D\u59CB\u5316 OSS \u5BA2\u6237\u7AEF\u5931\u8D25"),w&&w(d.t0);case 15:case"end":return d.stop()}},i,null,[[0,11]])})),r.apply(this,arguments)}n()},[w]);var h=function(r){var i=(F||[]).filter(function(u){return u.url!==r.url});o(i)},t=function(){var n=S()(f()().mark(function r(i){var u,m,k,d;return f()().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:if(u=i.file,!(u instanceof File)){E.next=26;break}return T(!0),E.prev=3,E.next=6,(0,Ee.p)(u);case 6:return m=E.sent,k="matrix/".concat(m,".").concat(u.name.split(".").pop()),E.next=10,v==null?void 0:v.put(k,u,{headers:{"Content-Type":u.type}});case 10:d="https://apks.bzgames.cn/".concat(k),P&&P(d),T(!1),o(function(ne){return[].concat(ye()(ne),[{uid:u.uid,name:u.name+"\uFF1A"+d,status:"done",url:d}])}),E.next=21;break;case 16:E.prev=16,E.t0=E.catch(3),z.ZP.error("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25"),w&&w(E.t0),o(function(ne){return[].concat(ye()(ne),[{uid:u.uid,name:u.name,status:"error"}])});case 21:return E.prev=21,T(!1),E.finish(21);case 24:E.next=27;break;case 26:z.ZP.error("\u4E0A\u4F20\u6587\u4EF6\u7C7B\u578B\u9519\u8BEF");case 27:case"end":return E.stop()}},r,null,[[3,16,21,24]])}));return function(i){return n.apply(this,arguments)}}();return(0,e.jsxs)(y,{fileList:F,multiple:!0,customRequest:t,onRemove:h,disabled:O||!v,onPreview:function(){var n=S()(f()().mark(function r(i){return f()().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,navigator.clipboard.writeText(i.url||"");case 2:z.ZP.success("\u94FE\u63A5\u590D\u5236\u6210\u529F "+i.url);case 3:case"end":return m.stop()}},r)}));return function(r){return n.apply(this,arguments)}}(),capture:void 0,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"})]})},we=Te,ie=s(67539),N=s(4575),Me=function(){var K=(0,I.useState)(!1),P=g()(K,2),w=P[0],A=P[1],Y=(0,I.useState)([]),O=g()(Y,2),T=O[0],$=O[1],U=(0,I.useState)([]),F=g()(U,2),o=F[0],j=F[1],C=x.Z.useForm(),v=g()(C,1),Z=v[0],y=[{title:"\u5E94\u7528\u540D",dataIndex:"name",copyable:!0,hideInSearch:!0,filterDropdown:function(n){var r=n.setSelectedKeys,i=n.selectedKeys,u=n.confirm,m=n.clearFilters;return(0,e.jsxs)("div",{style:{padding:8},children:[(0,e.jsx)(B.Z,{placeholder:"\u641C\u7D22\u5E94\u7528",value:i[0],onChange:function(d){return r(d.target.value?[d.target.value]:[])},onPressEnter:function(){return u()},style:{marginBottom:8,display:"block"}}),(0,e.jsxs)(R.Z,{children:[(0,e.jsx)(D.ZP,{onClick:function(){return u()},type:"primary",children:"\u641C\u7D22"}),(0,e.jsx)(D.ZP,{onClick:function(){return m&&m()},type:"link",children:"\u6E05\u9664"})]})]})},onFilter:function(n,r){return typeof n=="string"&&typeof(r==null?void 0:r.name)=="string"?r.name.includes(n):!1},filterIcon:function(n){return(0,e.jsx)(H.Z,{style:{color:n?"#1890ff":void 0},onPointerOverCapture:void 0,onPointerMoveCapture:void 0})}},{title:"\u5E94\u7528\u5305\u540D",dataIndex:"packageName",hideInSearch:!0,filterDropdown:function(n){var r=n.setSelectedKeys,i=n.selectedKeys,u=n.confirm,m=n.clearFilters;return(0,e.jsxs)("div",{style:{padding:8},children:[(0,e.jsx)(B.Z,{placeholder:"\u641C\u7D22\u5305\u540D",value:i[0],onChange:function(d){return r(d.target.value?[d.target.value]:[])},onPressEnter:function(){return u()},style:{marginBottom:8,display:"block"}}),(0,e.jsxs)(R.Z,{children:[(0,e.jsx)(D.ZP,{onClick:function(){return u()},type:"primary",children:"\u641C\u7D22"}),(0,e.jsx)(D.ZP,{onClick:function(){return m&&m()},type:"link",children:"\u6E05\u9664"})]})]})},onFilter:function(n,r){return typeof n=="string"&&typeof(r==null?void 0:r.packageName)=="string"?r.packageName.includes(n):!1},filterIcon:function(n){return(0,e.jsx)(H.Z,{style:{color:n?"#1890ff":void 0},onPointerOverCapture:void 0,onPointerMoveCapture:void 0})}},{title:"\u64CD\u4F5C",width:80,hideInSearch:!0,renderText:function(n){return(0,e.jsx)("a",{onClick:function(){A(!0),Z.setFieldsValue(n)},children:"\u7F16\u8F91"},"edit")}}],h=function(){var t=S()(f()().mark(function n(){var r;return f()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,(0,N.ai)();case 2:r=u.sent,r.data&&($(r.data),j(r.data));case 4:case"end":return u.stop()}},n)}));return function(){return t.apply(this,arguments)}}();return(0,I.useEffect)(function(){h()},[]),(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(D.ZP,{style:{marginBottom:"20px"},onClick:function(){A(!0),Z.resetFields()},children:"\u65B0\u5EFA\u5E94\u7528"}),(0,e.jsx)(ie.Z,{search:!1,onReset:function(){j(T)},columns:y,dataSource:o}),(0,e.jsx)(Q.Z,{title:"\u7F16\u8F91",visible:w,onOk:function(){Z.submit(),A(!1)},onCancel:function(){A(!1)},children:(0,e.jsxs)(x.Z,{labelCol:{span:4},wrapperCol:{span:18},form:Z,onFinish:function(){var t=S()(f()().mark(function n(r){return f()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,(0,N.XM)(r);case 2:h();case 3:case"end":return u.stop()}},n)}));return function(n){return t.apply(this,arguments)}}(),children:[(0,e.jsx)(x.Z.Item,{name:"id",style:{display:"none"},children:(0,e.jsx)(B.Z,{type:"hidden"})}),(0,e.jsx)(x.Z.Item,{label:"\u5E94\u7528\u540D",name:"name",children:(0,e.jsx)(B.Z,{})}),(0,e.jsx)(x.Z.Item,{label:"\u5305\u540D",name:"packageName",children:(0,e.jsx)(B.Z,{})})]})})]})},Be=Me,le=s(37804),Fe=s(42767),Oe=function(){var K=(0,I.useState)(!1),P=g()(K,2),w=P[0],A=P[1],Y=x.Z.useForm(),O=g()(Y,1),T=O[0],$=(0,I.useRef)(),U=[{title:"\u5E94\u7528\u540D",dataIndex:"appName",copyable:!0,hideInSearch:!0,filterDropdown:function(o){var j=o.setSelectedKeys,C=o.selectedKeys,v=o.confirm,Z=o.clearFilters;return(0,e.jsxs)("div",{style:{padding:8},children:[(0,e.jsx)(B.Z,{placeholder:"\u641C\u7D22\u5E94\u7528",value:C[0],onChange:function(h){return j(h.target.value?[h.target.value]:[])},onPressEnter:function(){return v()},style:{marginBottom:8,display:"block"}}),(0,e.jsxs)(R.Z,{children:[(0,e.jsx)(D.ZP,{onClick:function(){return v()},type:"primary",children:"\u641C\u7D22"}),(0,e.jsx)(D.ZP,{onClick:function(){return Z&&Z()},type:"link",children:"\u6E05\u9664"})]})]})},onFilter:function(o,j){return typeof o=="string"&&typeof(j==null?void 0:j.appName)=="string"?j.appName.includes(o):!1},filterIcon:function(o){return(0,e.jsx)(H.Z,{style:{color:o?"#1890ff":void 0},onPointerOverCapture:void 0,onPointerMoveCapture:void 0})}},{title:"\u7528\u6237",dataIndex:"user",hideInSearch:!0,render:function(o,j){return(0,e.jsx)(Fe.Z,{data:j.user||{}})},filterDropdown:function(o){var j=o.setSelectedKeys,C=o.selectedKeys,v=o.confirm,Z=o.clearFilters,y=C[0]?String(C[0]):"";return(0,e.jsxs)("div",{style:{padding:8},children:[(0,e.jsx)(le.Z,{placeholder:"\u641C\u7D22 userId",value:y,onChange:function(t){return j(t?[t]:[])},onPressEnter:function(){return v()},style:{marginBottom:8,display:"block",width:200}}),(0,e.jsxs)(R.Z,{children:[(0,e.jsx)(D.ZP,{onClick:function(){return v()},type:"primary",children:"\u641C\u7D22"}),(0,e.jsx)(D.ZP,{onClick:function(){return Z&&Z()},type:"link",children:"\u6E05\u9664"})]})]})},onFilter:function(o,j){var C;return((C=j.user)===null||C===void 0?void 0:C.id)===o},filterIcon:function(o){return(0,e.jsx)(H.Z,{style:{color:o?"#1890ff":void 0},onPointerOverCapture:void 0,onPointerMoveCapture:void 0})}},{title:"\u72B6\u6001",hideInSearch:!0,dataIndex:"status",valueEnum:{0:{text:"\u542F\u7528",status:"Success"},"-1":{text:"\u7981\u7528",status:"Error"}}},{title:"\u521B\u5EFA\u65F6\u95F4",hideInSearch:!0,dataIndex:"createdAt",valueType:"dateTime"},{title:"\u4FEE\u6539\u65F6\u95F4",hideInSearch:!0,dataIndex:"updatedAt",valueType:"dateTime"},{title:"\u64CD\u4F5C",width:80,hideInSearch:!0,renderText:function(o){return(0,e.jsx)("a",{onClick:S()(f()().mark(function j(){var C,v;return f()().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return y.next=2,(0,N.Nk)({userId:((C=o.user)===null||C===void 0?void 0:C.id)||0,status:o.status===0?-1:0});case 2:(v=$.current)===null||v===void 0||v.reload();case 3:case"end":return y.stop()}},j)})),children:o.status===0?"\u7981\u7528":"\u542F\u7528"},"edit")}}];return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(D.ZP,{style:{marginBottom:"20px"},onClick:function(){A(!0),T.resetFields()},children:"\u6DFB\u52A0\u5185\u90E8\u7528\u6237"}),(0,e.jsx)(ie.Z,{search:!1,actionRef:$,request:S()(f()().mark(function F(){var o,j;return f()().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,(0,N.k_)();case 2:return j=v.sent,v.abrupt("return",{data:j.data,total:(o=j.data)===null||o===void 0?void 0:o.length,success:!0});case 4:case"end":return v.stop()}},F)})),columns:U}),(0,e.jsx)(Q.Z,{title:"\u7F16\u8F91",visible:w,onOk:function(){T.submit(),A(!1)},onCancel:function(){A(!1)},children:(0,e.jsx)(x.Z,{labelCol:{span:4},wrapperCol:{span:18},form:T,onFinish:function(){var F=S()(f()().mark(function o(j){var C,v;return f()().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:if(C=j.userId,!C){y.next=5;break}return y.next=4,(0,N.SN)({userId:C});case 4:(v=$.current)===null||v===void 0||v.reload();case 5:case"end":return y.stop()}},o)}));return function(o){return F.apply(this,arguments)}}(),children:(0,e.jsx)(x.Z.Item,{label:"userId",name:"userId",children:(0,e.jsx)(le.Z,{style:{width:200}})})})})]})},$e=Oe,Ke=s(58125),Ye=["scheduleTime"],Ue=function(){var K=(0,I.useState)(!1),P=g()(K,2),w=P[0],A=P[1],Y=(0,I.useState)([]),O=g()(Y,2),T=O[0],$=O[1],U=x.Z.useForm(),F=g()(U,1),o=F[0],j=(0,I.useRef)(),C=function(){var h=S()(f()().mark(function t(){var n;return f()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,(0,L.ln)();case 2:n=i.sent,n.data&&$(n.data);case 4:case"end":return i.stop()}},t)}));return function(){return h.apply(this,arguments)}}(),v=function(t){var n=T.find(function(r){return r.id===t});return n?n.name:""},Z=[{title:"\u5E94\u7528",dataIndex:"appId",renderText:function(t,n){return(0,e.jsx)(se.Z,{color:"blue",children:v(n.appId||0)},n.appId)}},{title:"\u76EE\u6807\u91D1\u989D",dataIndex:"incomeYuan"},{title:"\u5DF2\u5237\u91D1\u989D",dataIndex:"mockIncome",renderText:function(t){return(0,Ke.P)(t)}},{title:"\u5F00\u59CB\u65F6\u95F4",dataIndex:"scheduleTime",renderText:function(t){return J()(t).format("YYYY-MM-DD HH:mm")}},{title:"\u72B6\u6001",dataIndex:"status",renderText:function(t){switch(t){case 0:return"\u672A\u5F00\u59CB";case 1:return"\u8FDB\u884C\u4E2D";case 2:return"\u5DF2\u5B8C\u6210"}return t}},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"createdAt",renderText:function(t){return J()(t).format("YYYY-MM-DD HH:mm")}},{title:"\u66F4\u65B0\u65F6\u95F4",dataIndex:"updatedAt",renderText:function(t){return J()(t).format("YYYY-MM-DD HH:mm")}}];(0,I.useEffect)(function(){C()},[]);var y=function(){o.resetFields(),A(!0)};return(0,e.jsx)(e.Fragment,{children:(0,e.jsxs)("div",{children:[(0,e.jsx)(D.ZP,{onClick:y,children:"\u6DFB\u52A0\u4EFB\u52A1"}),(0,e.jsx)(ie.Z,{search:!1,actionRef:j,request:S()(f()().mark(function h(){var t,n;return f()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,(0,N.nN)();case 2:return n=i.sent,i.abrupt("return",{data:n.data,total:(t=n.data)===null||t===void 0?void 0:t.length,success:!0});case 4:case"end":return i.stop()}},h)})),columns:Z}),(0,e.jsx)(Q.Z,{title:"\u6DFB\u52A0\u4EFB\u52A1",visible:w,onOk:function(){o.submit()},onCancel:function(){A(!1)},children:(0,e.jsxs)(x.Z,{labelCol:{span:6},wrapperCol:{span:18},form:o,onFinish:function(){var h=S()(f()().mark(function t(n){var r,i,u,m;return f()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(i=n.scheduleTime,u=te()(n,Ye),i){d.next=4;break}return z.ZP.error("\u8BF7\u9009\u62E9\u5F00\u59CB\u65F6\u95F4"),d.abrupt("return");case 4:return m=i.map(function(W){return W.valueOf()}),d.prev=5,d.next=8,(0,N.Rn)(_()({scheduleTime:m},u));case 8:d.next=13;break;case 10:return d.prev=10,d.t0=d.catch(5),d.abrupt("return");case 13:z.ZP.success("\u4EFB\u52A1\u63D0\u4EA4\u6210\u529F"),(r=j.current)===null||r===void 0||r.reload(),A(!1);case 16:case"end":return d.stop()}},t,null,[[5,10]])}));return function(t){return h.apply(this,arguments)}}(),children:[T.length>0&&(0,e.jsx)(x.Z.Item,{label:"\u5E94\u7528",name:"appId",children:(0,e.jsx)(pe.Z,{mode:"multiple",showSearch:!0,filterOption:function(t,n){return n!=null&&n.label?n.label.includes(t):!1},options:T.map(function(h){return{label:h.name,value:h.id}})})}),(0,e.jsx)(x.Z.Item,{name:"incomeYuan",label:"\u91D1\u989D\uFF08\u5143\uFF09",children:(0,e.jsx)(B.Z,{})}),(0,e.jsx)(x.Z.Item,{name:"scheduleTime",label:"\u5F00\u59CB\u65F6\u95F4",children:(0,e.jsx)(xe.default,{multiple:!0,format:"YYYY-MM-DD HH:mm",showTime:{format:"HH:mm"}})})]})})]})})},Re=Ue,Ne=function(){var K=(0,I.useState)(!1),P=g()(K,2),w=P[0],A=P[1],Y=(0,I.useState)([]),O=g()(Y,2),T=O[0],$=O[1],U=(0,I.useState)([]),F=g()(U,2),o=F[0],j=F[1],C=x.Z.useForm(),v=g()(C,1),Z=v[0],y=function(){var t=S()(f()().mark(function n(){var r;return f()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,(0,N.nr)();case 2:r=u.sent,r.data&&($(r.data),j(r.data));case 4:case"end":return u.stop()}},n)}));return function(){return t.apply(this,arguments)}}(),h=[{title:"\u5E94\u7528\u540D",dataIndex:"appName",copyable:!0,hideInSearch:!0,filterDropdown:function(n){var r=n.setSelectedKeys,i=n.selectedKeys,u=n.confirm,m=n.clearFilters;return(0,e.jsxs)("div",{style:{padding:8},children:[(0,e.jsx)(B.Z,{placeholder:"\u641C\u7D22\u5E94\u7528",value:i[0],onChange:function(d){return r(d.target.value?[d.target.value]:[])},onPressEnter:function(){return u()},style:{marginBottom:8,display:"block"}}),(0,e.jsxs)(R.Z,{children:[(0,e.jsx)(D.ZP,{onClick:function(){return u()},type:"primary",children:"\u641C\u7D22"}),(0,e.jsx)(D.ZP,{onClick:function(){return m&&m()},type:"link",children:"\u6E05\u9664"})]})]})},onFilter:function(n,r){return typeof n=="string"&&typeof(r==null?void 0:r.appName)=="string"?r.appName.includes(n):!1},filterIcon:function(n){return(0,e.jsx)(H.Z,{style:{color:n?"#1890ff":void 0},onPointerOverCapture:void 0,onPointerMoveCapture:void 0})}},{title:"\u7528\u6237",dataIndex:"user",hideInSearch:!0,render:function(n,r){return(0,e.jsx)(Fe.Z,{data:r.user||{}})},filterDropdown:function(n){var r=n.setSelectedKeys,i=n.selectedKeys,u=n.confirm,m=n.clearFilters,k=i[0]?String(i[0]):"";return(0,e.jsxs)("div",{style:{padding:8},children:[(0,e.jsx)(le.Z,{placeholder:"\u641C\u7D22 userId",value:k,onChange:function(W){return r(W?[W]:[])},onPressEnter:function(){return u()},style:{marginBottom:8,display:"block",width:200}}),(0,e.jsxs)(R.Z,{children:[(0,e.jsx)(D.ZP,{onClick:function(){return u()},type:"primary",children:"\u641C\u7D22"}),(0,e.jsx)(D.ZP,{onClick:function(){return m&&m()},type:"link",children:"\u6E05\u9664"})]})]})},onFilter:function(n,r){var i;return((i=r.user)===null||i===void 0?void 0:i.id)===n},filterIcon:function(n){return(0,e.jsx)(H.Z,{style:{color:n?"#1890ff":void 0},onPointerOverCapture:void 0,onPointerMoveCapture:void 0})}},{title:"\u72B6\u6001",hideInSearch:!0,renderText:function(n){return n.status===0?(0,e.jsx)(se.Z,{color:"green",children:"\u5DF2\u542F\u7528"}):(0,e.jsx)(se.Z,{color:"red",children:"\u672A\u542F\u7528"})}},{title:"\u521B\u5EFA\u65F6\u95F4",hideInSearch:!0,dataIndex:"createdAt",valueType:"dateTime"},{title:"\u4FEE\u6539\u65F6\u95F4",hideInSearch:!0,dataIndex:"updatedAt",valueType:"dateTime"},{title:"\u64CD\u4F5C",width:80,hideInSearch:!0,renderText:function(n){return(0,e.jsx)("a",{onClick:S()(f()().mark(function r(){var i;return f()().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,(0,N.vE)({userId:((i=n.user)===null||i===void 0?void 0:i.id)||0,status:n.status===0?-1:0});case 2:y();case 3:case"end":return m.stop()}},r)})),children:n.status===0?"\u7981\u7528":"\u542F\u7528"},"edit")}}];return(0,I.useEffect)(function(){y()},[]),(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(D.ZP,{style:{marginBottom:"20px"},onClick:function(){A(!0),Z.resetFields()},children:"\u6DFB\u52A0\u767D\u540D\u5355"}),(0,e.jsx)(ie.Z,{search:!1,onReset:function(){j(T)},columns:h,dataSource:o}),(0,e.jsx)(Q.Z,{title:"\u7F16\u8F91",visible:w,onOk:function(){Z.submit(),A(!1)},onCancel:function(){A(!1)},children:(0,e.jsx)(x.Z,{labelCol:{span:4},wrapperCol:{span:18},form:Z,onFinish:function(){var t=S()(f()().mark(function n(r){var i;return f()().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:if(i=r.userId,!i){m.next=5;break}return m.next=4,(0,N.vE)({userId:i});case 4:y();case 5:case"end":return m.stop()}},n)}));return function(n){return t.apply(this,arguments)}}(),children:(0,e.jsx)(x.Z.Item,{label:"userId",name:"userId",children:(0,e.jsx)(le.Z,{style:{width:200}})})})})]})},Le=Ne,He=["scheduleTime"],We=function(){var K=(0,I.useState)([]),P=g()(K,2),w=P[0],A=P[1],Y=(0,I.useState)([]),O=g()(Y,2),T=O[0],$=O[1],U=(0,I.useState)([]),F=g()(U,2),o=F[0],j=F[1],C=(0,I.useState)(!1),v=g()(C,2),Z=v[0],y=v[1],h=(0,I.useState)(!1),t=g()(h,2),n=t[0],r=t[1],i=x.Z.useForm(),u=g()(i,1),m=u[0],k=x.Z.useForm(),d=g()(k,1),W=d[0],E=function(){var p=S()(f()().mark(function a(){var l;return f()().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,(0,L.hy)();case 2:l=c.sent,l.data&&$(l.data);case 4:case"end":return c.stop()}},a)}));return function(){return p.apply(this,arguments)}}(),ne=function(){var p=S()(f()().mark(function a(l){return f()().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(l){c.next=2;break}return c.abrupt("return");case 2:return c.next=4,(0,L.o9)({deviceId:l});case 4:E();case 5:case"end":return c.stop()}},a)}));return function(l){return p.apply(this,arguments)}}(),Ge=[{title:"\u8BBE\u5907id",dataIndex:"deviceId",ellipsis:!0,filterDropdown:function(a){var l=a.setSelectedKeys,b=a.selectedKeys,c=a.confirm,V=a.clearFilters;return(0,e.jsxs)("div",{style:{padding:8},children:[(0,e.jsx)(B.Z,{placeholder:"\u641C\u7D22\u8BBE\u5907",value:b[0],onChange:function(M){return l(M.target.value?[M.target.value]:[])},onPressEnter:function(){return c()},style:{marginBottom:8,display:"block"}}),(0,e.jsxs)(R.Z,{children:[(0,e.jsx)(D.ZP,{onClick:function(){return c()},type:"primary",children:"\u641C\u7D22"}),(0,e.jsx)(D.ZP,{onClick:function(){return V&&V()},type:"link",children:"\u6E05\u9664"})]})]})},onFilter:function(a,l){return typeof a=="string"&&typeof(l==null?void 0:l.deviceId)=="string"?l.deviceId.includes(a):!1},filterIcon:function(a){return(0,e.jsx)(H.Z,{style:{color:a?"#1890ff":void 0},onPointerOverCapture:void 0,onPointerMoveCapture:void 0})}},{title:"\u6E20\u9053",dataIndex:"channel",render:function(a){var l=(0,G.FG)(),b=l.find(function(c){return c.value===a});return b?b.label:a}},{title:"\u64CD\u4F5C",dataIndex:"operate",render:function(a,l){return(0,e.jsx)(Se.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 ne(l.deviceId)},children:"\u786E\u5B9A"})]}),children:(0,e.jsx)("a",{children:"\u5220\u9664"})})}}],ze=function(a){var l=w.find(function(b){return b.id===a});return l?l.name:""},Xe=function(a){return a?parseFloat((a/1e5).toFixed(2)):0},Je=[{title:"\u5E94\u7528",dataIndex:"appId",render:function(a){return(0,e.jsx)(se.Z,{color:"blue",children:ze(a)},a)}},{title:"\u6E20\u9053",dataIndex:"channel",render:function(a){var l=(0,G.FG)(),b=l.find(function(c){return c.value===a});return b?b.label:a}},{title:"\u76EE\u6807\u91D1\u989D",dataIndex:"incomeYuan"},{title:"\u5DF2\u5237\u91D1\u989D",dataIndex:"mockIncome",render:function(a){return Xe(a)}},{title:"\u5F00\u59CB\u65F6\u95F4",dataIndex:"scheduleTime",render:function(a){return J()(a).format("YYYY-MM-DD HH:mm")}},{title:"\u72B6\u6001",dataIndex:"status",render:function(a){switch(a){case 0:return"\u672A\u5F00\u59CB";case 1:return"\u8FDB\u884C\u4E2D";case 2:return"\u5DF2\u5B8C\u6210"}return a}},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"createdAt",render:function(a){return J()(a).format("YYYY-MM-DD HH:mm")}},{title:"\u66F4\u65B0\u65F6\u95F4",dataIndex:"updatedAt",render:function(a){return J()(a).format("YYYY-MM-DD HH:mm")}}],he=function(){var p=S()(f()().mark(function a(){var l;return f()().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,(0,L.mW)();case 2:l=c.sent,l.data&&j(l.data);case 4:case"end":return c.stop()}},a)}));return function(){return p.apply(this,arguments)}}(),Qe=function(){var p=S()(f()().mark(function a(){var l;return f()().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,(0,L.ln)();case 2:l=c.sent,l.data&&A(l.data);case 4:case"end":return c.stop()}},a)}));return function(){return p.apply(this,arguments)}}();(0,I.useEffect)(function(){Qe(),E(),he()},[]);var qe=function(){var p=S()(f()().mark(function a(l){var b,c,V;return f()().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return b=l.scheduleTime,c=te()(l,He),V=b.map(function(Ce){return J()(Ce.time).valueOf()}),M.prev=2,M.next=5,(0,L.tI)(_()({scheduleTime:V},c));case 5:M.next=10;break;case 7:return M.prev=7,M.t0=M.catch(2),M.abrupt("return");case 10:z.ZP.success("\u4EFB\u52A1\u63D0\u4EA4\u6210\u529F"),he(),r(!1);case 13:case"end":return M.stop()}},a,null,[[2,7]])}));return function(l){return p.apply(this,arguments)}}(),_e=function(){m.resetFields(),y(!0)},en=function(){W.resetFields(),r(!0)},nn=function(){m.submit()},rn=function(){y(!1)},tn=function(){W.submit()},an=function(){r(!1)},un=function(){var p=S()(f()().mark(function a(l){return f()().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.prev=0,c.next=3,(0,L.gz)({deviceId:l.deviceId||"",channel:l.channel||""});case 3:c.next=8;break;case 5:return c.prev=5,c.t0=c.catch(0),c.abrupt("return");case 8:y(!1),E();case 10:case"end":return c.stop()}},a,null,[[0,5]])}));return function(l){return p.apply(this,arguments)}}();return(0,e.jsx)(ue._z,{children:(0,e.jsxs)(Ie.Z,{defaultActiveKey:"1",onChange:function(a){a==="1"?E():a==="2"&&he()},centered:!0,style:{backgroundColor:"white",padding:"20px"},children:[(0,e.jsx)(X.Z,{tab:"\u8BBE\u5907\u767D\u540D\u5355",children:(0,e.jsxs)("div",{children:[(0,e.jsx)(D.ZP,{onClick:_e,children:"\u6DFB\u52A0\u767D\u540D\u5355"}),(0,e.jsx)(ve.Z,{columns:Ge,dataSource:T}),(0,e.jsx)(Q.Z,{title:"\u6DFB\u52A0\u767D\u540D\u5355",visible:Z,onOk:nn,onCancel:rn,children:(0,e.jsxs)(x.Z,{form:m,onFinish:un,children:[(0,e.jsx)(x.Z.Item,{name:"deviceId",label:"\u8BBE\u5907id",children:(0,e.jsx)(B.Z,{})}),(0,e.jsx)(x.Z.Item,{label:"\u6E20\u9053",name:"channel",children:(0,e.jsx)(pe.Z,{options:(0,G.FG)()})})]})})]})},"1"),(0,e.jsx)(X.Z,{tab:"\u5237\u6570\u636E",children:(0,e.jsxs)("div",{children:[(0,e.jsx)(D.ZP,{onClick:en,children:"\u6DFB\u52A0\u4EFB\u52A1"}),(0,e.jsx)(ve.Z,{columns:Je,dataSource:o}),(0,e.jsx)(Q.Z,{title:"\u6DFB\u52A0\u4EFB\u52A1",visible:n,onOk:tn,onCancel:an,children:(0,e.jsxs)(x.Z,{labelCol:{span:6},wrapperCol:{span:18},form:W,onFinish:qe,children:[(0,e.jsx)(x.Z.Item,{label:"\u5E94\u7528",name:"appId",children:(0,e.jsx)(pe.Z,{mode:"multiple",showSearch:!0,filterOption:function(a,l){return l!=null&&l.label?l.label.includes(a):!1},options:w.map(function(p){return{label:p.name,value:p.id}})})}),(0,e.jsx)(x.Z.Item,{name:"incomeYuan",label:"\u91D1\u989D\uFF08\u5143\uFF09",children:(0,e.jsx)(B.Z,{})}),(0,e.jsx)(x.Z.List,{name:"scheduleTime",children:function(a,l){var b=l.add,c=l.remove;return(0,e.jsxs)(e.Fragment,{children:[a.map(function(V){var q=V.key,M=V.name;return(0,e.jsx)(e.Fragment,{children:(0,e.jsxs)(Ze.Z,{align:"stretch",gutter:16,children:[(0,e.jsx)(je.Z,{span:18,children:(0,e.jsx)(x.Z.Item,{labelCol:{xs:{span:24},sm:{span:8}},name:[M,"time"],label:"\u5F00\u59CB\u65F6\u95F4",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u5F00\u59CB\u65F6\u95F4"}],children:(0,e.jsx)(xe.default,{format:"YYYY-MM-DD HH:mm",showTime:{format:"HH:mm"}})})}),(0,e.jsx)(je.Z,{children:(0,e.jsx)(me.Z,{onClick:function(){return c(M)}})})]},q)})}),(0,e.jsx)(x.Z.Item,{children:(0,e.jsx)(D.ZP,{type:"dashed",onClick:function(){return b()},block:!0,children:"\u6DFB\u52A0\u5F00\u59CB\u65F6\u95F4"})})]})}})]})})]})},"2"),(0,e.jsx)(X.Z,{tab:"\u4E0A\u4F20\u8D44\u6E90",children:(0,e.jsx)(we,{})},"3"),(0,e.jsx)(X.Z,{tab:"\u975E\u6CD5\u5E94\u7528",children:(0,e.jsx)(Be,{})},"4"),(0,e.jsx)(X.Z,{tab:"\u7528\u6237\u767D\u540D\u5355",children:(0,e.jsx)(Le,{})},"5"),(0,e.jsx)(X.Z,{tab:"\u5237\u6570\u636Ev2",children:(0,e.jsx)(Re,{})},"6"),(0,e.jsx)(X.Z,{tab:"\u5185\u90E8\u7528\u6237",children:(0,e.jsx)($e,{})},"7")]})})},Ve=We},32400:function(ge,re,s){s.d(re,{p:function(){return fe}});var ce=s(15009),_=s.n(ce),de=s(99289),te=s.n(de),oe=s(8322),f=s.n(oe);function fe(ae){return S.apply(this,arguments)}function S(){return S=te()(_()().mark(function ae(g){return _()().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:return G.abrupt("return",new Promise(function(H,me){var ue=new(f()).ArrayBuffer,x=new FileReader;x.onload=function(B){var R;ue.append((R=B.target)===null||R===void 0?void 0:R.result),H(ue.end())},x.onerror=function(B){me(B)},x.readAsArrayBuffer(g)}));case 1:case"end":return G.stop()}},ae)})),S.apply(this,arguments)}}}]);