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