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
11 KiB
2 lines
11 KiB
7 months ago
|
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[816],{3973:function(fe,H,r){r.r(H);var m=r(15009),P=r.n(m),re=r(99289),M=r.n(re),V=r(5574),y=r.n(V),te=r(35312),C=r(8232),R=r(66309),ae=r(14726),le=r(13169),w=r(72051),U=r(17788),L=r(96365),E=r(34041),W=r(71230),F=r(15746),X=r(8925),S=r(67294),K=r(48357),G=r(16250),a=r(85893),oe=function(){var T=(0,S.useState)([]),Q=y()(T,2),J=Q[0],se=Q[1],Y=(0,S.useState)(!1),k=y()(Y,2),e=k[0],s=k[1],c=(0,S.useState)(!1),t=y()(c,2),o=t[0],h=t[1],v=(0,S.useState)(0),O=y()(v,2),x=O[0],j=O[1],p=C.Z.useForm(),N=y()(p,1),b=N[0],I=(0,S.useState)([]),D=y()(I,2),B=D[0],_=D[1],z=(0,te.useModel)("@@initialState"),$=z.initialState,f=$==null?void 0:$.currentUser,A=function(l){return l?parseFloat((l/1e5).toFixed(2)):0},Z=function(l){var n=B.find(function(d){return d.id===l});return n?n.name:""},q=function(l){b.setFieldsValue(l),s(!0),h(!0),j(l.role?l.role:0)},g=[{title:"\u59D3\u540D",dataIndex:"name"},{title:"\u5E94\u7528IDs",dataIndex:"appIds",render:function(l){return(0,a.jsx)("div",{children:l==null?void 0:l.map(function(n){return(0,a.jsx)(R.Z,{color:"blue",children:Z(n)},n)})})}},{title:"\u89D2\u8272",dataIndex:"role",render:function(l){var n="";switch(l){case 1:n="\u8D85\u7EA7\u7BA1\u7406\u5458";break;case 2:n="\u7BA1\u7406\u5458";break;case 3:n="\u6E38\u620F\u4E3B";break;case 4:n="\u8BBE\u5907\u4E3B";break;default:n=""}return n}},{title:"\u64CD\u4F5C",render:function(l){return[(0,a.jsx)("a",{onClick:function(){return q(l)},children:"\u7F16\u8F91"},"edit")]}}],ie=[{title:"\u59D3\u540D",dataIndex:"name",ellipsis:!0},{title:"\u5E94\u7528IDs",dataIndex:"appIds",render:function(l){return(0,a.jsx)("div",{children:l==null?void 0:l.map(function(n){return(0,a.jsx)(R.Z,{color:"blue",children:Z(n)},n)})})}},{title:"\u89D2\u8272",dataIndex:"role",render:function(l){var n="";switch(l){case 1:n="\u8D85\u7EA7\u7BA1\u7406\u5458";break;case 2:n="\u7BA1\u7406\u5458";break;case 3:n="\u6E38\u620F\u4E3B";break;case 4:n="\u8BBE\u5907\u4E3B";break;default:n=""}return n}},{title:"\u672C\u6708\u6536\u5165\uFF08\u5143\uFF09",dataIndex:"incomeThisMonth",render:function(l,n){var d;return A((d=n.overview)===null||d===void 0?void 0:d.thisMonthIncome)}},{title:"\u4E0A\u6708\u6536\u5165\uFF08\u5143\uFF09",dataIndex:"incomeLastMonth",render:function(l,n){var d;return A((d=n.overview)===null||d===void 0?void 0:d.lastMonthIncome)}},{title:"\u7D2F\u8BA1\u6536\u5165\uFF08\u5143\uFF09",dataIndex:"incomeTotal",render:function(l,n){var d;return A((d=n.overview)===null||d===void 0?void 0:d.totalIncome)}},{title:"\u5F53\u524D\u5206\u6210\u6BD4\u4F8B",dataIndex:"incomeRate"},{title:"\u64CD\u4F5C",render:function(l){return[(0,a.jsx)("a",{onClick:function(){return q(l)},children:"\u7F16\u8F91"},"edit")]}}],ce=function(){b.submit()},de=function(){s(!1)},ee=function(){var i=M()(P()().mark(function l(){var n;return P()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,(0,K.N0)();case 2:n=u.sent,n.data&&se(n.data);case 4:case"end":return u.stop()}},l)}));return function(){return i.apply(this,arguments)}}(),ne=function(){var i=M()(P()().mark(function l(){var n;return P()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,(0,K.ln)();case 2:n=u.sent,n.data&&_(n.data);case 4:case"end":return u.stop()}},l)}));return function(){return i.apply(this,arguments)}}();(0,S.useEffect)(function(){ee(),ne()},[]);var ue=function(){b.resetFields(),s(!0),h(!1),j(0)},me=function(){var i=M()(P()().mark(function l(n){return P()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.prev=0,u.next=3,(0,K.P7)(n);case 3:u.next=8;break;case 5:return u.prev=5,u.t0=u.catch(0),u.abrupt("return");case 8:s(!1),ee();case 10:case"end":return u.stop()}},l,null,[[0,5]])}));return function(n){return i.apply(this,arguments)}}();return(0,a.jsxs)("div",{children:[(0,a.jsx)(ae.ZP,{onClick:ue,children:"\u65B0\u5EFA\u8D26\u53F7"}),(0,a.jsxs)(le.Z,{centered:!0,style:{backgroundColor:"white",padding:"20px"},children:[(f==null?void 0:f.role)&&f.role<3&&(0,a.jsx)(G.Z,{tab:"\u6E38\u620F\u4E3B",child
|