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
14 KiB

4 months ago
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[816],{40110:function(Ie,H,a){var u=a(1413),x=a(67294),A=a(509),D=a(91146),K=function(p,Z){return x.createElement(D.Z,(0,u.Z)((0,u.Z)({},p),{},{ref:Z,icon:A.Z}))},C=x.forwardRef(K);H.Z=C},95795:function(Ie,H,a){a.r(H),a.d(H,{default:function(){return Fe}});var u=a(15009),x=a.n(u),A=a(99289),D=a.n(A),K=a(5574),C=a.n(K),te=a(35312),p=a(8232),Z=a(55102),G=a(42075),E=a(14726),re=a(66309),ae=a(71230),$=a(15746),he=a(13169),M=a(72051),k=a(17788),F=a(34041),le=a(37804),T=a(67294),oe=a(40110),se=a(16250),L=a(48357),ge=a(72269),n=a(85893),V=function(w){var e=function(){w.onSubmit()},i=[{title:"\u8D26\u53F7",dataIndex:"name",ellipsis:!0},{title:"\u89D2\u8272",dataIndex:"role",render:function(l){var o="";switch(l){case 1:o="\u8D85\u7EA7\u7BA1\u7406\u5458";break;case 2:o="\u7BA1\u7406\u5458";break;case 3:o="\u666E\u901A\u8D26\u53F7";break;case 4:o="\u53E3\u5B50";break;default:o=""}return o}},{title:"\u9690\u85CF",render:function(l){return(0,n.jsx)(ge.Z,{defaultValue:l.hide!==0,onClick:function(h){l.id&&(0,L.tQ)({adminId:l.id,hide:h?1:0})}})}}];return(0,n.jsx)(k.Z,{title:"\u6279\u91CF\u7F16\u8F91",visible:!0,footer:[],onCancel:e,children:(0,n.jsx)(M.Z,{columns:i,dataSource:w.data})})},Ce=V,pe=function(){var w=(0,T.useState)([]),e=C()(w,2),i=e[0],d=e[1],l=(0,T.useState)(!1),o=C()(l,2),h=o[0],v=o[1],O=(0,T.useState)(!1),y=C()(O,2),N=y[0],b=y[1],R=(0,T.useState)(!1),I=C()(R,2),z=I[0],W=I[1],S=(0,T.useState)(0),U=C()(S,2),X=U[0],Q=U[1],ce=p.Z.useForm(),de=C()(ce,1),P=de[0],xe=(0,T.useState)([]),g=C()(xe,2),ue=g[0],ye=g[1],be=(0,te.useModel)("@@initialState"),J=be.initialState,m=J==null?void 0:J.currentUser,Y=function(r){return r?parseFloat((r/1e5).toFixed(2)):0},ve=function(r){var t=ue.find(function(f){return f.id===r});return t?t.name:""},q=function(r){P.setFieldsValue(r),v(!0),W(!0),Q(r.role?r.role:0)},Se=[{title:"\u8D26\u53F7",dataIndex:"name",ellipsis:!0,filterDropdown:function(r){var t=r.setSelectedKeys,f=r.selectedKeys,c=r.confirm,Ze=r.clearFilters;return(0,n.jsxs)("div",{style:{padding:8},children:[(0,n.jsx)(Z.Z,{placeholder:"\u641C\u7D22\u8D26\u53F7",value:f[0],onChange:function(ne){return t(ne.target.value?[ne.target.value]:[])},onPressEnter:function(){return c()},style:{marginBottom:8,display:"block"}}),(0,n.jsxs)(G.Z,{children:[(0,n.jsx)(E.ZP,{onClick:function(){return c()},type:"primary",children:"\u641C\u7D22"}),(0,n.jsx)(E.ZP,{onClick:Ze,type:"link",children:"\u6E05\u9664"})]})]})},onFilter:function(r,t){return(t==null?void 0:t.name)&&t.name.includes(String(r))||!1},filterIcon:function(r){return(0,n.jsx)(oe.Z,{style:{color:r?"#1890ff":void 0},onPointerOverCapture:void 0,onPointerMoveCapture:void 0})}},{title:"\u6E38\u620F",dataIndex:"appIds",render:function(r){return(0,n.jsx)("div",{children:r==null?void 0:r.map(function(t){return(0,n.jsx)(re.Z,{color:"blue",children:ve(t)},t)})})}},{title:"\u89D2\u8272",dataIndex:"role",render:function(r){var t="";switch(r){case 1:t="\u8D85\u7EA7\u7BA1\u7406\u5458";break;case 2:t="\u7BA1\u7406\u5458";break;case 3:t="\u666E\u901A\u8D26\u53F7";break;case 4:t="\u53E3\u5B50";break;default:t=""}return t}},{title:"\u64CD\u4F5C",render:function(r){return[(0,n.jsx)("a",{onClick:function(){return q(r)},children:"\u7F16\u8F91"},"edit")]}}],fe=[{title:"\u8D26\u53F7",dataIndex:"name",ellipsis:!0,filterDropdown:function(r){var t=r.setSelectedKeys,f=r.selectedKeys,c=r.confirm,Ze=r.clearFilters;return(0,n.jsxs)("div",{style:{padding:8},children:[(0,n.jsx)(Z.Z,{placeholder:"\u641C\u7D22\u8D26\u53F7",value:f[0],onChange:function(ne){return t(ne.target.value?[ne.target.value]:[])},onPressEnter:function(){return c()},style:{marginBottom:8,display:"block"}}),(0,n.jsxs)(G.Z,{children:[(0,n.jsx)(E.ZP,{onClick:function(){return c()},type:"primary",children:"\u641C\u7D22"}),(0,n.jsx)(E.ZP,{onClick:Ze,type:"link",children:"\u6E05\u9664"})]})]})},onFilter:function(r,t){return(t==null?void 0:t.name)&&t.name.includes(String(r))||!1},filterIcon:function(r){return(0,n.jsx)(oe.Z,{style:{color:r?"#1890ff":void 0}})}},{title:"\u6E38\