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