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],{76099:function(Ee,z,r){r.r(z);var d=r(97857),se=r.n(d),le=r(13769),V=r.n(le),X=r(15009),h=r.n(X),oe=r(99289),O=r.n(oe),G=r(5574),j=r.n(G),x=r(48357),ie=r(90930),v=r(8232),ue=r(55241),L=r(66309),U=r(2453),Q=r(13169),w=r(14726),ce=r(72051),J=r(17788),k=r(96365),g=r(34041),de=r(47676),q=r(16250),y=r(27484),B=r.n(y),I=r(67294),t=r(85893),ee=["scheduleTime"],me=function(){var i=(0,I.useState)([]),c=j()(i,2),a=c[0],o=c[1],C=(0,I.useState)([]),m=j()(C,2),D=m[0],E=m[1],T=(0,I.useState)([]),p=j()(T,2),Z=p[0],S=p[1],P=(0,I.useState)(!1),A=j()(P,2),R=A[0],_=A[1],K=(0,I.useState)(!1),H=j()(K,2),ne=H[0],F=H[1],N=v.Z.useForm(),_e=j()(N,1),f=_e[0],fe=v.Z.useForm(),he=j()(fe,1),Y=he[0],$=function(){var l=O()(h()().mark(function n(){var u;return h()().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,(0,x.ON)();case 2:u=s.sent,u.data&&E(u.data);case 4:case"end":return s.stop()}},n)}));return function(){return l.apply(this,arguments)}}(),re=function(){var l=O()(h()().mark(function n(u){return h()().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(u){s.next=2;break}return s.abrupt("return");case 2:return s.next=4,(0,x.o9)({deviceId:u});case 4:$();case 5:case"end":return s.stop()}},n)}));return function(u){return l.apply(this,arguments)}}(),ve=[{title:"\u8BBE\u5907id",dataIndex:"deviceId",ellipsis:!0},{title:"\u6E20\u9053",dataIndex:"channel",render:function(n){switch(n){case"fanmiyou":return"\u51E1\u7C73\u6E38";case"qiji":return"\u5947\u8FF9"}return n}},{title:"\u64CD\u4F5C",dataIndex:"operate",render:function(n,u){return(0,t.jsx)(ue.Z,{title:"\u786E\u8BA4\u5220\u9664\u5417",content:(0,t.jsxs)("div",{style:{textAlign:"center"},children:[(0,t.jsxs)("p",{children:["\u5220\u9664\u4E4B\u540Eecpm\u4F1A\u964D\u4F4E",(0,t.jsx)("br",{}),"\u4E5F\u4F1A\u5F71\u54CD\u5237\u6570\u636E\u53EF\u4F7F\u7528\u7684\u8BBE\u5907"]}),(0,t.jsx)("a",{onClick:function(){return re(u.deviceId)},children:"\u786E\u5B9A"})]}),children:(0,t.jsx)("a",{children:"\u5220\u9664"})})}}],pe=function(n){var u=a.find(function(b){return b.id===n});return u?u.name:""},te=function(n){return n?parseFloat((n/1e5).toFixed(2)):0},Ce=[{title:"\u5E94\u7528",dataIndex:"appId",render:function(n){return(0,t.jsx)(L.Z,{color:"blue",children:pe(n)},n)}},{title:"\u6E20\u9053",dataIndex:"channel",render:function(n){switch(n){case"fanmiyou":return"\u51E1\u7C73\u6E38";case"qiji":return"\u5947\u8FF9"}return n}},{title:"\u76EE\u6807\u91D1\u989D",dataIndex:"incomeYuan"},{title:"\u5DF2\u5237\u91D1\u989D",dataIndex:"mockIncome",render:function(n){return te(n)}},{title:"\u5F00\u59CB\u65F6\u95F4",dataIndex:"scheduleTime",render:function(n){return B()(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 B()(n).format("YYYY-MM-DD HH:mm")}},{title:"\u66F4\u65B0\u65F6\u95F4",dataIndex:"updatedAt",render:function(n){return B()(n).format("YYYY-MM-DD HH:mm")}}],W=function(){var l=O()(h()().mark(function n(){var u;return h()().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,(0,x.mW)();case 2:u=s.sent,u.data&&S(u.data);case 4:case"end":return s.stop()}},n)}));return function(){return l.apply(this,arguments)}}(),M=function(){var l=O()(h()().mark(function n(){var u;return h()().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,(0,x.ln)();case 2:u=s.sent,u.data&&o(u.data);case 4:case"end":return s.stop()}},n)}));return function(){return l.apply(this,arguments)}}();(0,I.useEffect)(function(){M(),$(),W()},[]);var be=function(){var l=O()(h()().mark(function n(u){var b,s,ge;return h()().wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:return b=u.scheduleTime,s=V()(u,ee),ge=B()(b).valueOf(),ae.next=4,(0,x.tI)(se()({scheduleTime:ge},s));case 4:U.ZP.success("\u4EFB\u52A1\u63D0\u4EA4\u6210\u529F"),W(),F(!1);case 7:case"end":return ae.stop()}},n)}));return function(u){return l.apply(this,arguments)}}(),Oe=function(){f.resetFields(),_(!0)},je=function(){Y.resetFields(),F(!0)},De=function(){f.submit()},Pe=function(){_(!1)},xe=function(){Y.submit()},Ie=function(){F(!1)},Se=function(){var l=O()(h()().mark(function n(u){return h()().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.prev=0,s.next=3,(0,x.QW)({deviceId:u.deviceId||"",channel:u.channel||""});case 3:s.next=8;break;case 5:return s.prev=5,s.t0=s.catch(0),s.abrupt("return");case 8:_(!1),$();case 10:case"end":return s.stop()}},n,null,[[0,5]])}));return function(u){return l.apply(this,arguments)}}();return(0,t.jsx)(ie._z,{children:(0,t.jsxs)(Q.Z,{defaultActiveKey:"1",onChange:function(n){n==="1"?$():n==="2"&&W()},centered:!0,style:{backgroundColor:"white",padding:"20px"},children:[(0,t.jsx)(q.Z,{tab:"\u8BBE\u5907\u767D\u540D\u5355",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(w.ZP,{onClick:Oe,children:"\u6DFB\u52A0\u767D\u540D\u5355"}),(0,t.jsx)(ce.Z,{columns:ve,dataSource:D}),(0,t.jsx)(J.Z,{title:"\u6DFB\u52A0\u767D\u540D\u5355",visible:R,onOk:De,onCancel:Pe,children:(0,t.jsxs)(v.Z,{form:f,onFinish:Se,children:[(0,t.jsx)(v.Z.Item,{name:"deviceId",label:"\u8BBE\u5907id",children:(0,t.jsx)(k.Z,{})}),(0,t.jsx)(v.Z.Item,{label:"\u6E20\u9053",name:"channel",children:(0,t.jsxs)(g.Z,{children:[(0,t.jsx)(g.Z.Option,{value:"fanmiyou",children:"\u51E1\u7C73\u6E38"}),(0,t.jsx)(g.Z.Option,{value:"qiji",children:"\u5947\u8FF9"})]})})]})})]})},"1"),(0,t.jsx)(q.Z,{tab:"\u5237\u6570\u636E",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(w.ZP,{onClick:je,children:"\u6DFB\u52A0\u4EFB\u52A1"}),(0,t.jsx)(ce.Z,{columns:Ce,dataSource:Z}),(0,t.jsx)(J.Z,{title:"\u6DFB\u52A0\u4EFB\u52A1",visible:ne,onOk:xe,onCancel:Ie,children:(0,t.jsxs)(v.Z,{form:Y,onFinish:be,children:[(0,t.jsx)(v.Z.Item,{label:"\u5E94\u7528",name:"appId",children:(0,t.jsx)(g.Z,{children:a.map(function(l){return(0,t.jsx)(g.Z.Option,{value:l.id,children:l.name},l.id)})})}),(0,t.jsx)(v.Z.Item,{name:"channel",label:"\u6E20\u9053",children:(0,t.jsxs)(g.Z,{children:[(0,t.jsx)(g.Z.Option,{value:"fanmiyou",children:"\u51E1\u7C73\u6E38"},"fanmiyou"),(0,t.jsx)(g.Z.Option,{value:"qiji",children:"\u5947\u8FF9"},"qiji")]})}),(0,t.jsx)(v.Z.Item,{name:"incomeYuan",label:"\u91D1\u989D\uFF08\u5143\uFF09",children:(0,t.jsx)(k.Z,{})}),(0,t.jsx)(v.Z.Item,{name:"sheduleTime",label:"\u5F00\u59CB\u65F6\u95F4",children:(0,t.jsx)(de.default,{format:"YYYY-MM-DD HH:mm",showTime:{format:"HH:mm"}})})]})})]})},"2")]})})};z.default=me},66309:function(Ee,z,r){r.d(z,{Z:function(){return me}});var d=r(67294),se=r(62208),le=r(93967),V=r.n(le),X=r(98787),h=r(69760),oe=r(45353),O=r(53124),G=r(54548),j=r(10274),x=r(14747),ie=r(45503),v=r(91945);const ue=e=>{const{paddingXXS:i,lineWidth:c,tagPaddingHorizontal:a,componentCls:o,calc:C}=e,m=C(a).sub(c).equal(),D=C(i).sub(c).equal();return{[o]:Object.assign(Object.assign({},(0,x.Wf)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:m,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${(0,G.bf)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${o}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${o}-close-icon`]:{marginInlineStart:D,fontSize:e.tagIconSize,color:e.colorTextDescription,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${o}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},["&-checkable"]:{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${o}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},["&-hidden"]:{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:m}}),[`${o}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}},L=e=>{const{lineWidth:i,fontSizeIcon:c,calc:a}=e,o=e.fontSizeSM;return(0,ie.TS)(e,{tagFontSize:o,tagLineHeight:(0,G.bf)(a(e.lineHeightSM).mul(o).equal()),tagIconSize:a(c).sub(a(i).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},U=e=>({defaultBg:new j.C(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText});var Q=(0,v.I$)("Tag",e=>{const i=L(e);return ue(i)},U),w=function(e,i){var c={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&i.indexOf(a)<0&&(c[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)i.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(c[a[o]]=e[a[o]]);return c},J=d.forwardRef((e,i)=>{const{prefixCls:c,style:a,className:o,checked:C,onChange:m,onClick:D}=e,E=w(e,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:T,tag:p}=d.useContext(O.E_),Z=K=>{m==null||m(!C),D==null||D(K)},S=T("tag",c),[P,A,R]=Q(S),_=V()(S,`${S}-checkable`,{[`${S}-checkable-checked`]:C},p==null?void 0:p.className,o,A,R);return P(d.createElement("span",Object.assign({},E,{ref:i,style:Object.assign(Object.assign({},a),p==null?void 0:p.style),className:_,onClick:Z})))}),k=r(98719);const g=e=>(0,k.Z)(e,(i,c)=>{let{textColor:a,lightBorderColor:o,lightColor:C,darkColor:m}=c;return{[`${e.componentCls}${e.componentCls}-${i}`]:{color:a,background:C,borderColor:o,"&-inverse":{color:e.colorTextLightSolid,background:m,borderColor:m},[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}});var de=(0,v.bk)(["Tag","preset"],e=>{const i=L(e);return g(i)},U);function q(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1)}const y=(e,i,c)=>{const a=q(c);return{[`${e.componentCls}${e.componentCls}-${i}`]:{color:e[`color${c}`],background:e[`color${a}Bg`],borderColor:e[`color${a}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}};var B=(0,v.bk)(["Tag","status"],e=>{const i=L(e);return[y(i,"success","Success"),y(i,"processing","Info"),y(i,"error","Error"),y(i,"warning","Warning")]},U),I=function(e,i){var c={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&i.indexOf(a)<0&&(c[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)i.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(c[a[o]]=e[a[o]]);return c};const t=(e,i)=>{const{prefixCls:c,className:a,rootClassName:o,style:C,children:m,icon:D,color:E,onClose:T,closeIcon:p,closable:Z,bordered:S=!0}=e,P=I(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable","bordered"]),{getPrefixCls:A,direction:R,tag:_}=d.useContext(O.E_),[K,H]=d.useState(!0);d.useEffect(()=>{"visible"in P&&H(P.visible)},[P.visible]);const ne=(0,X.o2)(E),F=(0,X.yT)(E),N=ne||F,_e=Object.assign(Object.assign({backgroundColor:E&&!N?E:void 0},_==null?void 0:_.style),C),f=A("tag",c),[fe,he,Y]=Q(f),$=V()(f,_==null?void 0:_.className,{[`${f}-${E}`]:N,[`${f}-has-color`]:E&&!N,[`${f}-hidden`]:!K,[`${f}-rtl`]:R==="rtl",[`${f}-borderless`]:!S},a,o,he,Y),re=M=>{M.stopPropagation(),T==null||T(M),!M.defaultPrevented&&H(!1)},[,ve]=(0,h.Z)({closable:Z,closeIcon:p!=null?p:_==null?void 0:_.closeIcon,customCloseIconRender:M=>M===null?d.createElement(se.Z,{className:`${f}-close-icon`,onClick:re}):d.createElement("span",{className:`${f}-close-icon`,onClick:re},M),defaultCloseIcon:null,defaultClosable:!1}),pe=typeof P.onClick=="function"||m&&m.type==="a",te=D||null,Ce=te?d.createElement(d.Fragment,null,te,m&&d.createElement("span",null,m)):m,W=d.createElement("span",Object.assign({},P,{ref:i,className:$,style:_e}),Ce,ve,ne&&d.createElement(de,{key:"preset",prefixCls:f}),F&&d.createElement(B,{key:"status",prefixCls:f}));return fe(pe?d.createElement(oe.Z,{component:"Tag"},W):W)},ee=d.forwardRef(t);ee.CheckableTag=J;var me=ee}}]);