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
9.0 KiB

"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,A=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",{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 A(i)},children:"\u7F16\u8F91"},"edit")}}]),B=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:B,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:`${(