"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[816],{40110:function(ge,R,a){var v=a(1413),E=a(67294),K=a(509),j=a(91146),B=function(W,_){return E.createElement(j.Z,(0,v.Z)((0,v.Z)({},W),{},{ref:_,icon:K.Z}))};B.displayName="SearchOutlined",R.Z=E.forwardRef(B)},3973:function(ge,R,a){a.r(R);var v=a(15009),E=a.n(v),K=a(99289),j=a.n(K),B=a(5574),y=a.n(B),W=a(35312),_=a(8232),I=a(96365),G=a(42075),Z=a(14726),Q=a(66309),N=a(13169),J=a(72051),z=a(17788),b=a(34041),Y=a(71230),q=a(15746),ce=a(8925),D=a(67294),H=a(48357),ee=a(40110),ne=a(16250),t=a(85893),F=function(){var de=(0,D.useState)([]),re=y()(de,2),w=re[0],ue=re[1],e=(0,D.useState)(!1),i=y()(e,2),u=i[0],l=i[1],s=(0,D.useState)(!1),g=y()(s,2),f=g[0],O=g[1],P=(0,D.useState)(0),S=y()(P,2),p=S[0],A=S[1],M=_.Z.useForm(),x=y()(M,1),T=x[0],V=(0,D.useState)([]),h=y()(V,2),L=h[0],te=h[1],ae=(0,W.useModel)("@@initialState"),U=ae.initialState,m=U==null?void 0:U.currentUser,k=function(n){return n?parseFloat((n/1e5).toFixed(2)):0},C=function(n){var r=L.find(function(c){return c.id===n});return r?r.name:""},le=function(n){T.setFieldsValue(n),l(!0),O(!0),A(n.role?n.role:0)},ve=[{title:"\u8D26\u53F7",dataIndex:"name",ellipsis:!0,filterDropdown:function(n){var r=n.setSelectedKeys,c=n.selectedKeys,d=n.confirm,Ce=n.clearFilters;return(0,t.jsxs)("div",{style:{padding:8},children:[(0,t.jsx)(I.Z,{placeholder:"\u641C\u7D22\u8D26\u53F7",value:c[0],onChange:function(X){return r(X.target.value?[X.target.value]:[])},onPressEnter:function(){return d()},style:{marginBottom:8,display:"block"}}),(0,t.jsxs)(G.Z,{children:[(0,t.jsx)(Z.ZP,{onClick:function(){return d()},type:"primary",children:"\u641C\u7D22"}),(0,t.jsx)(Z.ZP,{onClick:function(){return Ce()},type:"link",children:"\u6E05\u9664"})]})]})},onFilter:function(n,r){var c;return r==null||(c=r.name)===null||c===void 0?void 0:c.includes(n)},filterIcon:function(n){return(0,t.jsx)(ee.Z,{style:{color:n?"#1890ff":void 0},onPointerEnterCapture:void 0,onPointerLeaveCapture:void 0})}},{title:"\u6E38\u620F",dataIndex:"appIds",render:function(n){return(0,t.jsx)("div",{children:n==null?void 0:n.map(function(r){return(0,t.jsx)(Q.Z,{color:"blue",children:C(r)},r)})})}},{title:"\u89D2\u8272",dataIndex:"role",render:function(n){var r="";switch(n){case 1:r="\u8D85\u7EA7\u7BA1\u7406\u5458";break;case 2:r="\u7BA1\u7406\u5458";break;case 3:r="\u666E\u901A\u8D26\u53F7";break;case 4:r="\u53E3\u5B50";break;default:r=""}return r}},{title:"\u64CD\u4F5C",render:function(n){return[(0,t.jsx)("a",{onClick:function(){return le(n)},children:"\u7F16\u8F91"},"edit")]}}],fe=[{title:"\u8D26\u53F7",dataIndex:"name",ellipsis:!0,filterDropdown:function(n){var r=n.setSelectedKeys,c=n.selectedKeys,d=n.confirm,Ce=n.clearFilters;return(0,t.jsxs)("div",{style:{padding:8},children:[(0,t.jsx)(I.Z,{placeholder:"\u641C\u7D22\u8D26\u53F7",value:c[0],onChange:function(X){return r(X.target.value?[X.target.value]:[])},onPressEnter:function(){return d()},style:{marginBottom:8,display:"block"}}),(0,t.jsxs)(G.Z,{children:[(0,t.jsx)(Z.ZP,{onClick:function(){return d()},type:"primary",children:"\u641C\u7D22"}),(0,t.jsx)(Z.ZP,{onClick:function(){return Ce()},type:"link",children:"\u6E05\u9664"})]})]})},onFilter:function(n,r){var c;return r==null||(c=r.name)===null||c===void 0?void 0:c.includes(n)},filterIcon:function(n){return(0,t.jsx)(ee.Z,{style:{color:n?"#1890ff":void 0},onPointerEnterCapture:void 0,onPointerLeaveCapture:void 0})}},{title:"\u6E38\u620F",dataIndex:"appIds",render:function(n){return(0,t.jsx)("div",{children:n==null?void 0:n.map(function(r){return(0,t.jsx)(Q.Z,{color:"blue",children:C(r)},r)})})}},{title:"\u89D2\u8272",dataIndex:"role",render:function(n){var r="";switch(n){case 1:r="\u8D85\u7EA7\u7BA1\u7406\u5458";break;case 2:r="\u7BA1\u7406\u5458";break;case 3:r="\u666E\u901A\u8D26\u53F7";break;case 4:r="\u53E3\u5B50";break;default:r=""}return r}},{title:"\u672C\u6708\u6536\u5165\uFF08\u5143\uFF09",dataIndex:"incomeThisMonth",render:function(n,r){var c;return k((c=r.overview)===null||c===void 0?void 0:c.thisMonthIncome)}},{title:"\u4E0A\u6708\u6536\u5165\uFF08\u5143\uFF09",dataIndex:"incomeLastMonth",render:function(n,r){var c;return k((c=r.overview)===null||c===void 0?void 0:c.lastMonthIncome)}},{title:"\u7D2F\u8BA1\u6536\u5165\uFF08\u5143\uFF09",dataIndex:"incomeTotal",render:function(n,r){var c;return k((c=r.overview)===null||c===void 0?void 0:c.totalIncome)}},{title:"\u5F53\u524D\u5206\u6210\u6BD4\u4F8B",dataIndex:"incomeRate"},{title:"\u64CD\u4F5C",render:function(n){return[(0,t.jsx)("a",{onClick:function(){return le(n)},children:"\u7F16\u8F91"},"edit")]}}],me=function(){T.submit()},oe=function(){l(!1)},se=function(){var o=j()(E()().mark(function n(){var r;return E()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,(0,H.N0)();case 2:r=d.sent,r.data&&ue(r.data);case 4:case"end":return d.stop()}},n)}));return function(){return o.apply(this,arguments)}}(),_e=function(){var o=j()(E()().mark(function n(){var r;return E()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,(0,H.ln)();case 2:r=d.sent,r.data&&te(r.data);case 4:case"end":return d.stop()}},n)}));return function(){return o.apply(this,arguments)}}();(0,D.useEffect)(function(){se(),_e()},[]);var ie=function(){T.resetFields(),l(!0),O(!1),A(0)},he=function(){var o=j()(E()().mark(function n(r){return E()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.prev=0,d.next=3,(0,H.P7)(r);case 3:d.next=8;break;case 5:return d.prev=5,d.t0=d.catch(0),d.abrupt("return");case 8:l(!1),se();case 10:case"end":return d.stop()}},n,null,[[0,5]])}));return function(r){return o.apply(this,arguments)}}();return(0,t.jsxs)("div",{children:[(0,t.jsx)(Z.ZP,{onClick:ie,children:"\u65B0\u5EFA\u8D26\u53F7"}),(0,t.jsxs)(N.Z,{centered:!0,style:{backgroundColor:"white",padding:"20px"},children:[(m==null?void 0:m.role)&&m.role<3&&(0,t.jsx)(ne.Z,{tab:"\u666E\u901A\u8D26\u53F7",children:(0,t.jsx)(J.Z,{columns:ve,dataSource:w.filter(function(o){return o.role===3})})},"1"),(0,t.jsx)(ne.Z,{tab:"\u53E3\u5B50",children:(0,t.jsx)(J.Z,{columns:fe,dataSource:w.filter(function(o){return o.role===4})})},"2")]}),(0,t.jsx)(z.Z,{title:"\u7F16\u8F91",visible:u,onOk:me,onCancel:oe,children:(0,t.jsxs)(_.Z,{form:T,onFinish:he,children:[(0,t.jsx)(_.Z.Item,{name:"id",style:{display:"none"},children:(0,t.jsx)(I.Z,{type:"hidden"})}),(0,t.jsx)(_.Z.Item,{label:"\u8D26\u53F7",name:"name",children:(0,t.jsx)(I.Z,{disabled:f,maxLength:32})}),(0,t.jsx)(_.Z.Item,{label:"\u5BC6\u7801",name:"password",children:(0,t.jsx)(I.Z.Password,{disabled:f})}),(0,t.jsx)(_.Z.Item,{label:"\u6E38\u620F",name:"appIds",children:(0,t.jsx)(b.Z,{mode:"multiple",children:L.map(function(o){return(0,t.jsx)(b.Z.Option,{value:o.id,children:o.name},o.id)})})}),(0,t.jsx)(_.Z.Item,{label:"\u89D2\u8272",name:"role",children:(0,t.jsxs)(b.Z,{disabled:f,onSelect:A,children:[(0,t.jsx)(b.Z.Option,{disabled:(m==null?void 0:m.role)&&m.role>1,value:2,children:"\u7BA1\u7406\u5458"}),(0,t.jsx)(b.Z.Option,{disabled:(m==null?void 0:m.role)&&m.role>2,value:3,children:"\u666E\u901A\u8D26\u53F7"}),(0,t.jsx)(b.Z.Option,{value:4,children:"\u53E3\u5B50"})]})}),p>3&&(0,t.jsxs)(Y.Z,{children:[(0,t.jsx)(q.Z,{span:12,children:(0,t.jsx)(_.Z.Item,{label:"\u6536\u5165\u6BD4\u4F8B",name:"incomeRate",children:(0,t.jsx)(ce.Z,{placeholder:"1-100\u6574\u6570",style:{width:"80%"}})})}),(0,t.jsx)(q.Z,{span:12,children:(0,t.jsx)(_.Z.Item,{label:"\u8BBE\u5907\u6570",name:"deviceCnt",children:(0,t.jsx)(ce.Z,{style:{width:"80%"}})})})]})]})})]})};R.default=F},66309:function(ge,R,a){a.d(R,{Z:function(){return ue}});var v=a(67294),E=a(62208),K=a(93967),j=a.n(K),B=a(98787),y=a(69760),W=a(45353),_=a(53124),I=a(54548),G=a(10274),Z=a(14747),Q=a(45503),N=a(91945);const J=e=>{const{paddingXXS:i,lineWidth:u,tagPaddingHorizontal:l,componentCls:s,calc:g}=e,f=g(l).sub(u).equal(),O=g(i).sub(u).equal();return{[s]:Object.assign(Object.assign({},(0,Z.Wf)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:f,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${(0,I.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:O,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:f}}),[`${s}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}},z=e=>{const{lineWidth:i,fontSizeIcon:u,calc:l}=e,s=e.fontSizeSM;return(0,Q.TS)(e,{tagFontSize:s,tagLineHeight:(0,I.bf)(l(e.lineHeightSM).mul(s).equal()),tagIconSize:l(u).sub(l(i).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},b=e=>({defaultBg:new G.C(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText});var Y=(0,N.I$)("Tag",e=>{const i=z(e);return J(i)},b),q=function(e,i){var u={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&i.indexOf(l)<0&&(u[l]=e[l]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,l=Object.getOwnPropertySymbols(e);s{const{prefixCls:u,style:l,className:s,checked:g,onChange:f,onClick:O}=e,P=q(e,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:S,tag:p}=v.useContext(_.E_),A=L=>{f==null||f(!g),O==null||O(L)},M=S("tag",u),[x,T,V]=Y(M),h=j()(M,`${M}-checkable`,{[`${M}-checkable-checked`]:g},p==null?void 0:p.className,s,T,V);return x(v.createElement("span",Object.assign({},P,{ref:i,style:Object.assign(Object.assign({},l),p==null?void 0:p.style),className:h,onClick:A})))}),H=a(98719);const ee=e=>(0,H.Z)(e,(i,u)=>{let{textColor:l,lightBorderColor:s,lightColor:g,darkColor:f}=u;return{[`${e.componentCls}${e.componentCls}-${i}`]:{color:l,background:g,borderColor:s,"&-inverse":{color:e.colorTextLightSolid,background:f,borderColor:f},[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}});var ne=(0,N.bk)(["Tag","preset"],e=>{const i=z(e);return ee(i)},b);function t(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1)}const F=(e,i,u)=>{const l=t(u);return{[`${e.componentCls}${e.componentCls}-${i}`]:{color:e[`color${u}`],background:e[`color${l}Bg`],borderColor:e[`color${l}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}};var pe=(0,N.bk)(["Tag","status"],e=>{const i=z(e);return[F(i,"success","Success"),F(i,"processing","Info"),F(i,"error","Error"),F(i,"warning","Warning")]},b),de=function(e,i){var u={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&i.indexOf(l)<0&&(u[l]=e[l]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,l=Object.getOwnPropertySymbols(e);s{const{prefixCls:u,className:l,rootClassName:s,style:g,children:f,icon:O,color:P,onClose:S,closeIcon:p,closable:A,bordered:M=!0}=e,x=de(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable","bordered"]),{getPrefixCls:T,direction:V,tag:h}=v.useContext(_.E_),[L,te]=v.useState(!0);v.useEffect(()=>{"visible"in x&&te(x.visible)},[x.visible]);const ae=(0,B.o2)(P),U=(0,B.yT)(P),m=ae||U,k=Object.assign(Object.assign({backgroundColor:P&&!m?P:void 0},h==null?void 0:h.style),g),C=T("tag",u),[le,ve,fe]=Y(C),me=j()(C,h==null?void 0:h.className,{[`${C}-${P}`]:m,[`${C}-has-color`]:P&&!m,[`${C}-hidden`]:!L,[`${C}-rtl`]:V==="rtl",[`${C}-borderless`]:!M},l,s,ve,fe),oe=n=>{n.stopPropagation(),S==null||S(n),!n.defaultPrevented&&te(!1)},[,se]=(0,y.Z)({closable:A,closeIcon:p!=null?p:h==null?void 0:h.closeIcon,customCloseIconRender:n=>n===null?v.createElement(E.Z,{className:`${C}-close-icon`,onClick:oe}):v.createElement("span",{className:`${C}-close-icon`,onClick:oe},n),defaultCloseIcon:null,defaultClosable:!1}),_e=typeof x.onClick=="function"||f&&f.type==="a",ie=O||null,he=ie?v.createElement(v.Fragment,null,ie,f&&v.createElement("span",null,f)):f,o=v.createElement("span",Object.assign({},x,{ref:i,className:me,style:k}),he,se,ae&&v.createElement(ne,{key:"preset",prefixCls:C}),U&&v.createElement(pe,{key:"status",prefixCls:C}));return le(_e?v.createElement(W.Z,{component:"Tag"},o):o)},w=v.forwardRef(re);w.CheckableTag=D;var ue=w}}]);