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