blob: 82efe9ba0c9754185b24e0686775221b9878ca93 [file] [log] [blame]
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[2063],{52063:function(pe,I,n){n.r(I);var g=n(15009),j=n.n(g),U=n(99289),K=n.n(U),V=n(5574),C=n.n(V),E=n(67294),k=n(60960),J=n(25278),O=n(2453),re=n(66309),X=n(78957),S=n(83622),N=n(4393),se=n(96154),R=n(17788),z=n(99611),H=n(63606),Q=n(97937),oe=n(7662),ae=n(27185),t=n(85893),he=k.Z.Title,le=k.Z.Paragraph,ie=J.Z.TextArea,$=function(){var ce=(0,E.useState)([]),ue=C()(ce,2),G=ue[0],de=ue[1],e=(0,E.useState)(!1),o=C()(e,2),i=o[0],r=o[1],s=(0,E.useState)(!1),v=C()(s,2),m=v[0],f=v[1],b=(0,E.useState)(!1),A=C()(b,2),T=A[0],x=A[1],P=(0,E.useState)(null),F=C()(P,2),u=F[0],h=F[1],w=(0,E.useState)(null),B=C()(w,2),D=B[0],W=B[1],Y=(0,E.useState)(""),Z=C()(Y,2),q=Z[0],p=Z[1];(0,E.useEffect)(function(){ee()},[]);var ee=function(){var d=K()(j()().mark(function l(){var c;return j()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return r(!0),a.prev=1,a.next=4,(0,oe.NR)({pageNum:1,pageSize:100});case 4:c=a.sent,c.code===200?de(c.rows||[]):O.ZP.error(c.msg||"\u83B7\u53D6\u4E3E\u62A5\u5217\u8868\u5931\u8D25"),a.next=11;break;case 8:a.prev=8,a.t0=a.catch(1),O.ZP.error("\u83B7\u53D6\u4E3E\u62A5\u5217\u8868\u5931\u8D25");case 11:return a.prev=11,r(!1),a.finish(11);case 14:case"end":return a.stop()}},l,null,[[1,8,11,14]])}));return function(){return d.apply(this,arguments)}}(),L=function(){var d=K()(j()().mark(function l(c,_){return j()().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:h(c),W(_),p(""),x(!0);case 4:case"end":return y.stop()}},l)}));return function(c,_){return d.apply(this,arguments)}}(),ge=function(){var d=K()(j()().mark(function l(){var c;return j()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(!(!u||!D)){a.next=2;break}return a.abrupt("return");case 2:return a.prev=2,a.next=5,(0,oe.Dd)(u.reportId,D,u.postId,q);case 5:c=a.sent,c.code===200?(O.ZP.success(D==="approve"?"\u4E3E\u62A5\u5904\u7406\u6210\u529F\uFF0C\u5E16\u5B50\u5DF2\u4E0B\u67B6":"\u4E3E\u62A5\u5DF2\u9A73\u56DE"),ee()):O.ZP.error(c.msg||"\u5904\u7406\u5931\u8D25"),a.next=12;break;case 9:a.prev=9,a.t0=a.catch(2),O.ZP.error("\u5904\u7406\u5931\u8D25");case 12:x(!1),h(null),W(null),p("");case 16:case"end":return a.stop()}},l,null,[[2,9]])}));return function(){return d.apply(this,arguments)}}(),te=function(l){h(l),f(!0)},ne=[{title:"\u4E3E\u62A5\u5E16\u5B50",dataIndex:"postTitle",key:"postTitle",width:180,render:function(l,c){return(0,t.jsx)("a",{onClick:function(){return te(c)},style:{color:"#1890ff"},children:l})}},{title:"\u4E3E\u62A5\u4EBA",dataIndex:"reportUserName",key:"reportUserName",width:100},{title:"\u4E3E\u62A5\u65F6\u95F4",dataIndex:"createTime",key:"createTime",width:140},{title:"\u4E3E\u62A5\u7406\u7531",dataIndex:"reportReason",key:"reportReason",width:150,ellipsis:!0,render:function(l){return(0,t.jsx)("span",{title:l,children:l})}},{title:"\u72B6\u6001",dataIndex:"status",key:"status",width:80,render:function(l){var c={0:{color:"orange",text:"\u5F85\u5904\u7406"},1:{color:"green",text:"\u5DF2\u5904\u7406"},2:{color:"red",text:"\u5DF2\u9A73\u56DE"}},_=c[l]||{color:"gray",text:"\u672A\u77E5"};return(0,t.jsx)(re.Z,{color:_.color,children:_.text})}},{title:"\u64CD\u4F5C",key:"action",width:300,fixed:"right",render:function(l,c){return(0,t.jsxs)(X.Z,{size:"small",children:[(0,t.jsx)(S.ZP,{type:"link",icon:(0,t.jsx)(z.Z,{}),onClick:function(){return te(c)},size:"small",children:"\u67E5\u770B"}),c.status==="0"&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(S.ZP,{type:"link",icon:(0,t.jsx)(H.Z,{}),style:{color:"green"},onClick:function(){return L(c,"approve")},size:"small",children:"\u786E\u8BA4\u4E0B\u67B6"}),(0,t.jsx)(S.ZP,{type:"link",danger:!0,icon:(0,t.jsx)(Q.Z,{}),onClick:function(){return L(c,"reject")},size:"small",children:"\u9A73\u56DE\u4E3E\u62A5"})]})]})}}];return(0,t.jsxs)("div",{className:ae.Z.postReviewContainer,children:[(0,t.jsx)(N.Z,{title:"\u5E16\u5B50\u4E3E\u62A5\u7BA1\u7406",children:(0,t.jsx)(se.Z,{columns:ne,dataSource:G,loading:i,rowKey:"reportId",scroll:{x:880},pagination:{pageSize:10,showTotal:function(l){return"\u5171 ".concat(l," \u6761\u8BB0\u5F55")},showSizeChanger:!0,showQuickJumper:!0}})}),(0,t.jsx)(R.Z,{title:"\u4E3E\u62A5\u8BE6\u60C5",open:m,onCancel:function(){f(!1),h(null)},footer:null,width:600,children:u&&(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{marginBottom:16},children:[(0,t.jsx)("strong",{children:"\u4E3E\u62A5\u5E16\u5B50\uFF1A"}),u.postTitle]}),(0,t.jsxs)("div",{style:{marginBottom:16},children:[(0,t.jsx)("strong",{children:"\u4E3E\u62A5\u4EBA\uFF1A"}),u.reportUserName]}),(0,t.jsxs)("div",{style:{marginBottom:16},children:[(0,t.jsx)("strong",{children:"\u4E3E\u62A5\u65F6\u95F4\uFF1A"}),u.createTime]}),(0,t.jsxs)("div",{style:{marginBottom:16},children:[(0,t.jsx)("strong",{children:"\u4E3E\u62A5\u7406\u7531\uFF1A"}),(0,t.jsx)(le,{children:u.reportReason})]}),u.status!=="0"&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{style:{marginBottom:16},children:[(0,t.jsx)("strong",{children:"\u5904\u7406\u7ED3\u679C\uFF1A"}),u.handleResult]}),(0,t.jsxs)("div",{style:{marginBottom:16},children:[(0,t.jsx)("strong",{children:"\u5904\u7406\u65F6\u95F4\uFF1A"}),u.handleTime]}),(0,t.jsxs)("div",{style:{marginBottom:16},children:[(0,t.jsx)("strong",{children:"\u5904\u7406\u4EBA\uFF1A"}),u.handleBy]})]}),u.status==="0"&&(0,t.jsx)("div",{style:{marginTop:16},children:(0,t.jsxs)(X.Z,{children:[(0,t.jsx)(S.ZP,{type:"primary",icon:(0,t.jsx)(H.Z,{}),onClick:function(){L(u,"approve"),f(!1)},children:"\u786E\u8BA4\u4E0B\u67B6"}),(0,t.jsx)(S.ZP,{danger:!0,icon:(0,t.jsx)(Q.Z,{}),onClick:function(){L(u,"reject"),f(!1)},children:"\u9A73\u56DE\u4E3E\u62A5"})]})})]})}),(0,t.jsxs)(R.Z,{title:D==="approve"?"\u786E\u8BA4\u4E0B\u67B6\u5E16\u5B50":"\u9A73\u56DE\u4E3E\u62A5",open:T,onOk:ge,onCancel:function(){x(!1),h(null),W(null),p("")},okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",children:[(0,t.jsxs)("div",{style:{marginBottom:16},children:[(0,t.jsx)("strong",{children:"\u5E16\u5B50\uFF1A"}),u==null?void 0:u.postTitle]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("strong",{children:[D==="approve"?"\u4E0B\u67B6\u7406\u7531":"\u9A73\u56DE\u7406\u7531","\uFF08\u53EF\u9009\uFF09\uFF1A"]}),(0,t.jsx)(ie,{value:q,onChange:function(l){return p(l.target.value)},placeholder:D==="approve"?"\u8BF7\u8F93\u5165\u4E0B\u67B6\u7406\u7531...":"\u8BF7\u8F93\u5165\u9A73\u56DE\u7406\u7531...",rows:4,style:{marginTop:8}})]})]})]})};I.default=$},27185:function(pe,I){I.Z={postReviewContainer:"postReviewContainer___JgDqe",postDetail:"postDetail___xpLPg",postMeta:"postMeta___QMb7h",postCover:"postCover___DJIkO",postTags:"postTags___r4aKc",postSummary:"postSummary___rwSxL",postContent:"postContent___T9Mr_",postActions:"postActions___cW2kJ"}},66309:function(pe,I,n){n.d(I,{Z:function(){return de}});var g=n(67294),j=n(93967),U=n.n(j),K=n(98423),V=n(98787),C=n(69760),E=n(96159),k=n(45353),J=n(53124),O=n(11568),re=n(15063),X=n(14747),S=n(83262),N=n(83559);const se=e=>{const{paddingXXS:o,lineWidth:i,tagPaddingHorizontal:r,componentCls:s,calc:v}=e,m=v(r).sub(i).equal(),f=v(o).sub(i).equal();return{[s]:Object.assign(Object.assign({},(0,X.Wf)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:m,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${(0,O.bf)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${s}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${s}-close-icon`]:{marginInlineStart:f,fontSize:e.tagIconSize,color:e.colorTextDescription,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${s}-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(${s}-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:m}}),[`${s}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}},R=e=>{const{lineWidth:o,fontSizeIcon:i,calc:r}=e,s=e.fontSizeSM;return(0,S.IX)(e,{tagFontSize:s,tagLineHeight:(0,O.bf)(r(e.lineHeightSM).mul(s).equal()),tagIconSize:r(i).sub(r(o).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},z=e=>({defaultBg:new re.t(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText});var H=(0,N.I$)("Tag",e=>{const o=R(e);return se(o)},z),Q=function(e,o){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&o.indexOf(r)<0&&(i[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)o.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(i[r[s]]=e[r[s]]);return i},ae=g.forwardRef((e,o)=>{const{prefixCls:i,style:r,className:s,checked:v,onChange:m,onClick:f}=e,b=Q(e,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:A,tag:T}=g.useContext(J.E_),x=B=>{m==null||m(!v),f==null||f(B)},P=A("tag",i),[F,u,h]=H(P),w=U()(P,`${P}-checkable`,{[`${P}-checkable-checked`]:v},T==null?void 0:T.className,s,u,h);return F(g.createElement("span",Object.assign({},b,{ref:o,style:Object.assign(Object.assign({},r),T==null?void 0:T.style),className:w,onClick:x})))}),t=n(98719);const he=e=>(0,t.Z)(e,(o,i)=>{let{textColor:r,lightBorderColor:s,lightColor:v,darkColor:m}=i;return{[`${e.componentCls}${e.componentCls}-${o}`]:{color:r,background:v,borderColor:s,"&-inverse":{color:e.colorTextLightSolid,background:m,borderColor:m},[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}});var le=(0,N.bk)(["Tag","preset"],e=>{const o=R(e);return he(o)},z);function ie(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1)}const $=(e,o,i)=>{const r=ie(i);return{[`${e.componentCls}${e.componentCls}-${o}`]:{color:e[`color${i}`],background:e[`color${r}Bg`],borderColor:e[`color${r}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}};var ve=(0,N.bk)(["Tag","status"],e=>{const o=R(e);return[$(o,"success","Success"),$(o,"processing","Info"),$(o,"error","Error"),$(o,"warning","Warning")]},z),ce=function(e,o){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&o.indexOf(r)<0&&(i[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)o.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(i[r[s]]=e[r[s]]);return i};const G=g.forwardRef((e,o)=>{const{prefixCls:i,className:r,rootClassName:s,style:v,children:m,icon:f,color:b,onClose:A,bordered:T=!0,visible:x}=e,P=ce(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:F,direction:u,tag:h}=g.useContext(J.E_),[w,B]=g.useState(!0),D=(0,K.Z)(P,["closeIcon","closable"]);g.useEffect(()=>{x!==void 0&&B(x)},[x]);const W=(0,V.o2)(b),Y=(0,V.yT)(b),Z=W||Y,q=Object.assign(Object.assign({backgroundColor:b&&!Z?b:void 0},h==null?void 0:h.style),v),p=F("tag",i),[ee,L,ge]=H(p),te=U()(p,h==null?void 0:h.className,{[`${p}-${b}`]:Z,[`${p}-has-color`]:b&&!Z,[`${p}-hidden`]:!w,[`${p}-rtl`]:u==="rtl",[`${p}-borderless`]:!T},r,s,L,ge),ne=y=>{y.stopPropagation(),A==null||A(y),!y.defaultPrevented&&B(!1)},[,d]=(0,C.Z)((0,C.w)(e),(0,C.w)(h),{closable:!1,closeIconRender:y=>{const fe=g.createElement("span",{className:`${p}-close-icon`,onClick:ne},y);return(0,E.wm)(y,fe,M=>({onClick:_e=>{var me;(me=M==null?void 0:M.onClick)===null||me===void 0||me.call(M,_e),ne(_e)},className:U()(M==null?void 0:M.className,`${p}-close-icon`)}))}}),l=typeof P.onClick=="function"||m&&m.type==="a",c=f||null,_=c?g.createElement(g.Fragment,null,c,m&&g.createElement("span",null,m)):m,a=g.createElement("span",Object.assign({},D,{ref:o,className:te,style:q}),_,d,W&&g.createElement(le,{key:"preset",prefixCls:p}),Y&&g.createElement(ve,{key:"status",prefixCls:p}));return ee(l?g.createElement(k.Z,{component:"Tag"},a):a)});G.CheckableTag=ae;var de=G}}]);