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.

2 lines
13 KiB

"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[816],{95795:function(je,ee,t){t.r(ee),t.d(ee,{default:function(){return ge}});var m=t(15009),O=t.n(m),U=t(99289),X=t.n(U),ne=t(5574),C=t.n(ne),H=t(48357),ve=t(35312),h=t(8232),G=t(66309),Q=t(71230),B=t(15746),re=t(14726),J=t(13169),K=t(72051),D=t(17788),A=t(55102),Z=t(34041),te=t(37804),ae=t(16250),I=t(67294),fe=t(72269),n=t(85893),me=function(V){var N=h.Z.useForm(),E=C()(N,1),e=E[0],c=function(){V.onSubmit()};return console.log(V.data),(0,n.jsxs)(D.Z,{title:"\u6279\u91CF\u7F16\u8F91",visible:!0,footer:[],onCancel:c,children:[(0,n.jsxs)(Q.Z,{gutter:20,children:[(0,n.jsx)(B.Z,{span:10,children:(0,n.jsx)("p",{style:{textAlign:"right"},children:"\u8D26\u53F7"})}),(0,n.jsx)(B.Z,{children:"\u9690\u85CF"})]}),(0,n.jsx)(h.Z,{labelWrap:!0,labelCol:{span:10},form:e,children:V.data.map(function(i){return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(h.Z.Item,{label:i.name,name:i.name,children:(0,n.jsx)(fe.Z,{defaultValue:i.hide!==0,onChange:function(s){i.id&&(0,H.tQ)({adminId:i.id,hide:s?1:0})}},i.id)},i.id)})})})]})},he=me,w=function(){var V=(0,I.useState)([]),N=C()(V,2),E=N[0],e=N[1],c=(0,I.useState)(!1),i=C()(c,2),l=i[0],s=i[1],p=(0,I.useState)(!1),u=C()(p,2),$=u[0],b=u[1],P=(0,I.useState)(!1),x=C()(P,2),F=x[0],j=x[1],Y=(0,I.useState)(0),R=C()(Y,2),S=R[0],M=R[1],L=h.Z.useForm(),pe=C()(L,1),z=pe[0],le=(0,I.useState)([]),W=C()(le,2),oe=W[0],g=W[1],be=(0,ve.useModel)("@@initialState"),k=be.initialState,v=k==null?void 0:k.currentUser,q=function(o){return o?parseFloat((o/1e5).toFixed(2)):0},_=function(o){var r=oe.find(function(f){return f.id===o});return r?r.name:""},se=function(o){z.setFieldsValue(o),s(!0),j(!0),M(o.role?o.role:0)},ie=[{title:"\u59D3\u540D",dataIndex:"name"},{title:"\u5E94\u7528IDs",dataIndex:"appIds",render:function(o){return(0,n.jsx)("div",{children:o==null?void 0:o.map(function(r){return(0,n.jsx)(G.Z,{color:"blue",children:_(r)},r)})})}},{title:"\u89D2\u8272",dataIndex:"role",render:function(o){var r="";switch(o){case 1:r="\u8D85\u7EA7\u7BA1\u7406\u5458";break;case 2:r="\u7BA1\u7406\u5458";break;case 3:r="\u6E38\u620F\u4E3B";break;case 4:r="\u8BBE\u5907\u4E3B";break;default:r=""}return r}},{title:"\u64CD\u4F5C",render:function(o){return[(0,n.jsx)("a",{onClick:function(){return se(o)},children:"\u7F16\u8F91"},"edit")]}}],ce=[{title:"\u59D3\u540D",dataIndex:"name",ellipsis:!0},{title:"\u5E94\u7528IDs",dataIndex:"appIds",render:function(o){return(0,n.jsx)("div",{children:o==null?void 0:o.map(function(r){return(0,n.jsx)(G.Z,{color:"blue",children:_(r)},r)})})}},{title:"\u89D2\u8272",dataIndex:"role",render:function(o){var r="";switch(o){case 1:r="\u8D85\u7EA7\u7BA1\u7406\u5458";break;case 2:r="\u7BA1\u7406\u5458";break;case 3:r="\u6E38\u620F\u4E3B";break;case 4:r="\u8BBE\u5907\u4E3B";break;default:r=""}return r}},{title:"\u672C\u6708\u6536\u5165\uFF08\u5143\uFF09",dataIndex:"incomeThisMonth",render:function(o,r){var f;return q((f=r.overview)===null||f===void 0?void 0:f.thisMonthIncome)}},{title:"\u4E0A\u6708\u6536\u5165\uFF08\u5143\uFF09",dataIndex:"incomeLastMonth",render:function(o,r){var f;return q((f=r.overview)===null||f===void 0?void 0:f.lastMonthIncome)}},{title:"\u7D2F\u8BA1\u6536\u5165\uFF08\u5143\uFF09",dataIndex:"incomeTotal",render:function(o,r){var f;return q((f=r.overview)===null||f===void 0?void 0:f.totalIncome)}},{title:"\u5F53\u524D\u5206\u6210\u6BD4\u4F8B",dataIndex:"incomeRate"},{title:"\u64CD\u4F5C",render:function(o){return[(0,n.jsx)("a",{onClick:function(){return se(o)},children:"\u7F16\u8F91"},"edit")]}}],xe=function(){z.submit()},de=function(){s(!1)},y=function(){var a=X()(O()().mark(function o(){var r;return O()().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&&e(r.data);case 4:case"end":return d.stop()}},o)}));return function(){return a.apply(this,arguments)}}(),Se=function(){var a=X()(O()().mark(function o(){var r;return O()().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&&g(r.data);case 4:case"