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