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