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