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
4 months ago
|
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[816],{85099:function(Pe,Y,t){t.r(Y),t.d(Y,{default:function(){return Ie}});var oe=t(15009),v=t.n(oe),ce=t(99289),B=t.n(ce),fe=t(5574),j=t.n(fe),E=t(48357),ve=t(35312),f=t(8232),q=t(66309),I=t(71230),A=t(15746),w=t(14726),he=t(13169),T=t(72051),R=t(17788),V=t(55102),y=t(34041),Q=t(37804),P=t(16250),x=t(67294),me=t(72269),e=t(85893),je=function(d){var D=function(){d.onSubmit()},C=[{title:"\u59D3\u540D",dataIndex:"name",ellipsis:!0},{title:"\u89D2\u8272",dataIndex:"role",render:function(p){var h="";switch(p){case 1:h="\u8D85\u7EA7\u7BA1\u7406\u5458";break;case 2:h="\u7BA1\u7406\u5458";break;case 3:h="\u6E38\u620F\u4E3B";break;case 4:h="\u8BBE\u5907\u4E3B";break;default:h=""}return h}},{title:"\u9690\u85CF",render:function(p){return(0,e.jsx)(me.Z,{defaultValue:p.hide!==0,onClick:function(k){p.id&&(0,E.tQ)({adminId:p.id,hide:k?1:0})}},p.id)}}];return(0,e.jsx)(R.Z,{title:"\u6279\u91CF\u7F16\u8F91",visible:!0,footer:[],onCancel:D,children:(0,e.jsx)(T.Z,{columns:C,dataSource:d.data})})},xe=je,Ze=t(19632),z=t.n(Ze),Ce=t(81072),pe=t(3089),Fe=t(55241),_=t(86250),M=t(2453),ee=t(42767),ge=function(d){var D=(0,x.useState)([]),C=j()(D,2),S=C[0],p=C[1],h=(0,x.useState)([]),k=j()(h,2),Z=k[0],U=k[1],L=f.Z.useForm(),G=j()(L,1),O=G[0],J=function(){var s=B()(v()().mark(function m(F){var u;return v()().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.next=2,(0,E.yC)({adminId:F});case 2:u=g.sent,p(u.data||[]);case 4:case"end":return g.stop()}},m)}));return function(F){return s.apply(this,arguments)}}();return(0,x.useEffect)(function(){d.data.id&&J(d.data.id)},[d.data.id]),(0,e.jsxs)(R.Z,{title:"\u7ED1\u5B9A\u8D26\u53F7",visible:!0,centered:!0,onCancel:function(){d.onCancel()},footer:[(0,e.jsx)(w.ZP,{onClick:function(){d.onCancel()},children:"\u53D6\u6D88"},"back"),(0,e.jsx)(Fe.Z,{title:"\u786E\u5B9A\u4FDD\u5B58\u5417",content:(0,e.jsxs)("div",{style:{textAlign:"center"},children:[(0,e.jsx)("p",{children:"\u8D26\u53F7\u4E00\u65E6\u7ED1\u5B9A\u540E\uFF0C\u65E0\u6CD5\u88AB\u5220\u9664"}),(0,e.jsx)("a",{onClick:B()(v()().mark(function s(){var m;return v()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(m=[].concat(z()(S),z()(Z)).map(function(b){return b.id}).filter(Boolean),!(d.data.id&&m)){u.next=7;break}return u.next=4,(0,E.cH)({adminId:d.data.id},m);case 4:d.onSubmit(),u.next=8;break;case 7:d.onCancel();case 8:case"end":return u.stop()}},s)})),children:"\u786E\u5B9A"})]}),children:(0,e.jsx)(w.ZP,{type:"primary",children:"\u4FDD\u5B58"})},"confirm")],children:[S.length>0&&(0,e.jsxs)(I.Z,{gutter:6,style:{marginTop:20},children:[(0,e.jsx)(A.Z,{span:4,children:"\u5DF2\u7ED1\u5B9A:"}),(0,e.jsx)(_.Z,{vertical:!0,gap:"small",children:S.map(function(s){return(0,e.jsx)(I.Z,{children:(0,e.jsx)(ee.Z,{data:s})},s.id)})})]}),Z.length>0&&(0,e.jsxs)(I.Z,{gutter:6,style:{marginTop:20},children:[(0,e.jsx)(A.Z,{span:4,children:"\u672C\u6B21\u65B0\u589E:"}),(0,e.jsx)(_.Z,{vertical:!0,gap:"small",children:Z.map(function(s){return(0,e.jsxs)(I.Z,{children:[(0,e.jsx)(ee.Z,{data:s}),(0,e.jsx)(pe.Z,{style:{marginLeft:20},onClick:function(){U(Z.filter(function(F){return F.id!==s.id}))}})]},s.id)})})]}),(0,e.jsx)(f.Z,{style:{marginTop:20},labelCol:{span:4},wrapperCol:{span:18},form:O,onFinish:function(){var s=B()(v()().mark(function m(F){var u,b;return v()().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(u=F.uid,u){c.next=4;break}return M.ZP.error("uid\u4E0D\u80FD\u4E3A\u7A7A"),c.abrupt("return");case 4:if(!(d.data.id&&u)){c.next=15;break}if(!(Z.filter(function($){return $.id===u}).length>0)){c.next=8;break}return M.ZP.error("\u8BE5\u8D26\u53F7\u5DF2\u6DFB\u52A0"),c.abrupt("return");case 8:if(!(S.filter(function($){return $.id===u}).length>0)){c.next=11;break}return M.ZP.error("\u8BE5\u8D26\u53F7\u5DF2\u6DFB\u52A0"),c.abrupt("return");case 11:return c.next=13,(0,Ce.fn)({adminId:d.data.id,userId:u});case 13:b=c.sent,b.data?U([].concat(z()(Z),[b.data])):M.ZP.error("uid\u975E\u6CD5");case 15:case"end":return c.stop()}},m)}));return function(m){return s.
|