"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[39],{84702:function(fe,K,r){r.r(K);var d=r(15009),P=r.n(d),A=r(99289),N=r.n(A),z=r(5574),b=r.n(z),w=r(90930),Y=r(25335),H=r(35312),f=r(8232),k=r(55241),q=r(10397),V=r(66309),$=r(14726),j=r(55102),B=r(17788),g=r(34041),S=r(67294),X=r(48357),t=r(85893),ee=function(){var ne=(0,S.useState)(!1),G=b()(ne,2),re=G[0],x=G[1],te=(0,S.useState)(!1),J=b()(te,2),ce=J[0],Z=J[1],ae=f.Z.useForm(),e=b()(ae,1),a=e[0],i=(0,S.useState)([]),n=b()(i,2),l=n[0],v=n[1],u=(0,S.useState)([]),C=b()(u,2),_=C[0],O=C[1],E=(0,H.useModel)("@@initialState"),y=E.initialState,m=y==null?void 0:y.currentUser,R=m&&m.role&&m.role<2,U=function(s){a.setFieldsValue(s),x(!0),Z(!0)},p=[{title:"\u5E94\u7528\u540D",dataIndex:"name",copyable:!0,hideInSearch:!0},{title:"\u5E94\u7528\u56FE\u7247",dataIndex:"img",hideInSearch:!0,renderText:function(s){return(0,t.jsx)("img",{style:{width:"40px"},src:s})}},{title:"code",dataIndex:"code",copyable:!0,hideInSearch:!0},{title:"\u4E0B\u8F7D\u5730\u5740",dataIndex:"url",width:200,hideInSearch:!0,renderText:function(s){return(0,t.jsx)(k.Z,{overlayInnerStyle:{padding:0},content:(0,t.jsx)(q.Z,{value:s||"",bordered:!1}),children:(0,t.jsx)("a",{style:{wordBreak:"break-word"},children:s})})}}],F=[].concat(p,[{title:"secret",dataIndex:"secret",ellipsis:!0,copyable:!0,hideInSearch:!0},{title:"\u83DC\u5355\u680F\u4E2D",dataIndex:"hide",hideInSearch:!0,renderText:function(s){return s===0?(0,t.jsx)(V.Z,{color:"blue",children:"\u5C55\u793A"}):(0,t.jsx)(V.Z,{color:"purple",children:"\u9690\u85CF"})}},{title:"\u6E20\u9053",dataIndex:"channel",hideInSearch:!0,renderText:function(s){switch(s){case"fanmiyou":return"\u51E1\u7C73\u6E38";case"qiji":return"\u5947\u8FF9"}return s}},{title:"\u64CD\u4F5C",width:80,hideInSearch:!0,renderText:function(s){return(0,t.jsx)("a",{onClick:function(){return U(s)},children:"\u7F16\u8F91"},"edit")}}]),M=function(){a.submit()},le=function(){x(!1)},W=function(){var o=N()(P()().mark(function s(){var h;return P()().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,(0,X.ln)();case 2:h=c.sent,h.data&&(v(h.data),O(h.data));case 4:case"end":return c.stop()}},s)}));return function(){return o.apply(this,arguments)}}();(0,S.useEffect)(function(){W()},[]);var Q=function(){a.resetFields(),x(!0),Z(!1)},L=function(){var o=N()(P()().mark(function s(h){return P()().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.prev=0,c.next=3,(0,X.XJ)(h);case 3:c.next=8;break;case 5:return c.prev=5,c.t0=c.catch(0),c.abrupt("return");case 8:x(!1),W();case 10:case"end":return c.stop()}},s,null,[[0,5]])}));return function(h){return o.apply(this,arguments)}}(),oe=function(s){var h=l.filter(function(I){var c;return I==null||(c=I.name)===null||c===void 0?void 0:c.includes(s)});O(h)};return(0,t.jsxs)(w._z,{children:[m&&m.role&&m.role<2&&(0,t.jsx)($.ZP,{style:{marginBottom:"20px"},onClick:Q,children:"\u65B0\u5EFA\u5E94\u7528"}),(0,t.jsx)(Y.Z,{search:{defaultCollapsed:!1,optionRender:function(){return[(0,t.jsx)(j.Z,{placeholder:"\u8BF7\u8F93\u5165\u5E94\u7528\u540D",onChange:function(h){return oe(h.target.value)}},"name")]}},onReset:function(){O(l)},columns:R?F:p,dataSource:_}),(0,t.jsx)(B.Z,{title:"\u7F16\u8F91",visible:re,onOk:M,onCancel:le,children:(0,t.jsxs)(f.Z,{form:a,onFinish:L,children:[(0,t.jsx)(f.Z.Item,{name:"id",style:{display:"none"},children:(0,t.jsx)(j.Z,{type:"hidden"})}),(0,t.jsx)(f.Z.Item,{name:"code",style:{display:"none"},children:(0,t.jsx)(j.Z,{type:"hidden"})}),(0,t.jsx)(f.Z.Item,{label:"\u5E94\u7528\u540D",name:"name",children:(0,t.jsx)(j.Z,{})}),(0,t.jsx)(f.Z.Item,{label:"\u5E94\u7528\u56FE\u7247",name:"img",children:(0,t.jsx)(j.Z,{})}),(0,t.jsx)(f.Z.Item,{label:"\u4E0B\u8F7D\u5730\u5740",name:"url",children:(0,t.jsx)(j.Z,{})}),(0,t.jsx)(f.Z.Item,{label:"\u83DC\u5355\u680F\u4E2D",name:"hide",children:(0,t.jsxs)(g.Z,{children:[(0,t.jsx)(g.Z.Option,{value:0,children:"\u5C55\u793A"},"0"),(0,t.jsx)(g.Z.Option,{value:1,children:"\u9690\u85CF"},"1")]})}),(0,t.jsx)(f.Z.Item,{label:"\u6E20\u9053",name:"channel",children:(0,t.jsxs)(g.Z,{disabled:ce,children:[(0,t.jsx)(g.Z.Option,{value:"fanmiyou",children:"\u51E1\u7C73\u6E38"},"fanmiyou"),(0,t.jsx)(g.Z.Option,{value:"qiji",children:"\u5947\u8FF9"},"qiji")]})})]})})]})};K.default=ee},66309:function(fe,K,r){r.d(K,{Z:function(){return ae}});var d=r(67294),P=r(93967),A=r.n(P),N=r(98423),z=r(98787),b=r(69760),w=r(96159),Y=r(45353),H=r(53124),f=r(54548),k=r(10274),q=r(14747),V=r(45503),$=r(91945);const j=e=>{const{paddingXXS:a,lineWidth:i,tagPaddingHorizontal:n,componentCls:l,calc:v}=e,u=v(n).sub(i).equal(),C=v(a).sub(i).equal();return{[l]:Object.assign(Object.assign({},(0,q.Wf)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:u,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${(0,f.bf)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${l}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${l}-close-icon`]:{marginInlineStart:C,fontSize:e.tagIconSize,color:e.colorTextDescription,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${l}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},["&-checkable"]:{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${l}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},["&-hidden"]:{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:u}}),[`${l}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}},B=e=>{const{lineWidth:a,fontSizeIcon:i,calc:n}=e,l=e.fontSizeSM;return(0,V.TS)(e,{tagFontSize:l,tagLineHeight:(0,f.bf)(n(e.lineHeightSM).mul(l).equal()),tagIconSize:n(i).sub(n(a).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},g=e=>({defaultBg:new k.C(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText});var S=(0,$.I$)("Tag",e=>{const a=B(e);return j(a)},g),X=function(e,a){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&a.indexOf(n)<0&&(i[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(e);l{const{prefixCls:i,style:n,className:l,checked:v,onChange:u,onClick:C}=e,_=X(e,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:O,tag:E}=d.useContext(H.E_),y=M=>{u==null||u(!v),C==null||C(M)},m=O("tag",i),[R,U,p]=S(m),F=A()(m,`${m}-checkable`,{[`${m}-checkable-checked`]:v},E==null?void 0:E.className,l,U,p);return R(d.createElement("span",Object.assign({},_,{ref:a,style:Object.assign(Object.assign({},n),E==null?void 0:E.style),className:F,onClick:y})))}),ie=r(98719);const ne=e=>(0,ie.Z)(e,(a,i)=>{let{textColor:n,lightBorderColor:l,lightColor:v,darkColor:u}=i;return{[`${e.componentCls}${e.componentCls}-${a}`]:{color:n,background:v,borderColor:l,"&-inverse":{color:e.colorTextLightSolid,background:u,borderColor:u},[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}});var G=(0,$.bk)(["Tag","preset"],e=>{const a=B(e);return ne(a)},g);function re(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1)}const x=(e,a,i)=>{const n=re(i);return{[`${e.componentCls}${e.componentCls}-${a}`]:{color:e[`color${i}`],background:e[`color${n}Bg`],borderColor:e[`color${n}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}};var te=(0,$.bk)(["Tag","status"],e=>{const a=B(e);return[x(a,"success","Success"),x(a,"processing","Info"),x(a,"error","Error"),x(a,"warning","Warning")]},g),J=function(e,a){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&a.indexOf(n)<0&&(i[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(e);l{const{prefixCls:i,className:n,rootClassName:l,style:v,children:u,icon:C,color:_,onClose:O,bordered:E=!0,visible:y}=e,m=J(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:R,direction:U,tag:p}=d.useContext(H.E_),[F,M]=d.useState(!0),le=(0,N.Z)(m,["closeIcon","closable"]);d.useEffect(()=>{y!==void 0&&M(y)},[y]);const W=(0,z.o2)(_),Q=(0,z.yT)(_),L=W||Q,oe=Object.assign(Object.assign({backgroundColor:_&&!L?_:void 0},p==null?void 0:p.style),v),o=R("tag",i),[s,h,I]=S(o),c=A()(o,p==null?void 0:p.className,{[`${o}-${_}`]:L,[`${o}-has-color`]:_&&!L,[`${o}-hidden`]:!F,[`${o}-rtl`]:U==="rtl",[`${o}-borderless`]:!E},n,l,h,I),de=D=>{D.stopPropagation(),O==null||O(D),!D.defaultPrevented&&M(!1)},[,ve]=(0,b.Z)((0,b.w)(e),(0,b.w)(p),{closable:!1,closeIconRender:D=>{const Ce=d.createElement("span",{className:`${o}-close-icon`,onClick:de},D);return(0,w.wm)(D,Ce,T=>({onClick:he=>{var se;(se=T==null?void 0:T.onClick)===null||se===void 0||se.call(T,he),de(he)},className:A()(T==null?void 0:T.className,`${o}-close-icon`)}))}}),pe=typeof m.onClick=="function"||u&&u.type==="a",ue=C||null,ge=ue?d.createElement(d.Fragment,null,ue,u&&d.createElement("span",null,u)):u,me=d.createElement("span",Object.assign({},le,{ref:a,className:c,style:oe}),ge,ve,W&&d.createElement(G,{key:"preset",prefixCls:o}),Q&&d.createElement(te,{key:"status",prefixCls:o}));return s(pe?d.createElement(Y.Z,{component:"Tag"},me):me)});Z.CheckableTag=ee;var ae=Z}}]);