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