"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[46796],{54201:function(n,e,s){s.r(e),s.d(e,{default:function(){return V}});var c=s(7557),t=s.n(c),a=s(82242),r=s.n(a),i=s(41498),o=s.n(i),l=s(79800),_=s.n(l),u=s(70236),d=s.n(u),m=s(59301),x=s(43418),p=s(8591),h=s(94171),f="wrap___LIi1Y",v="title___IiWcv",j="tags___yQzMA",b="tag___u9yxK",N="btns___ioKIs",w=s(71212),k=s(940),C=s(77277),Z=s(56656),y=s.n(Z),I=s(83287),M=s(49389),P=s(37712),V=function(n){d()(n);var e=(0,m.useState)({}),s=_()(e,2),c=s[0],a=s[1],i=(0,M.useParams)(),l=i.id,u=i.virtual_spacesId;(0,m.useEffect)((function(){l&&Z()}),[l]);var Z=function(){var n=o()(t()().mark((function n(){var e;return t()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,h.ZP)("/api/virtual_classrooms/".concat(i.virtual_spacesId,"/informs/").concat(l,".json"),{method:"get"});case 2:-1!==(null==(e=n.sent)?void 0:e.status)&&a(r()({},e));case 4:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}();return(0,P.jsxs)("div",{className:f,children:[(0,P.jsx)(k.qE,{title:"通知公告详情",onClick:function(){return M.history.push("/".concat(I.AS,"/").concat(u,"/announcement"))},children:(0,P.jsxs)("div",{className:N,children:[(null==c?void 0:c.can_edit)&&(0,P.jsx)("div",{onClick:function(){return M.history.push("/".concat(I.AS,"/").concat(u,"/announcement/").concat(l,"/edit"))},children:(0,P.jsxs)("span",{className:"primary-hover",children:[(0,P.jsx)("i",{className:"iconfont icon-bianji7 font14 mr5"}),"编辑"]})}),(null==c?void 0:c.can_remove)&&(0,P.jsx)("div",{onClick:function(){var n;x.Z.confirm({title:"提示",okText:"确定删除",icon:!1,okButtonProps:{danger:!0},className:C.Z.CustomTipsModalCss,cancelText:"取消",content:(0,P.jsxs)("div",{children:[(0,P.jsxs)("div",{children:["确认删除《",c.name,"》吗？"]}),(0,P.jsx)("div",{className:"mt10",children:"删除后，将无法恢复，请谨慎操作"})]}),onOk:(n=o()(t()().mark((function n(){var e;return t()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,h.ZP)("/api/virtual_classrooms/".concat(i.virtual_spacesId,"/informs/").concat(l,".json"),{method:"delete"});case 2:0===(null==(e=n.sent)?void 0:e.status)&&(p.ZP.success("删除成功"),M.history.push("/".concat(I.AS,"/").concat(u,"/announcement")));case 4:case"end":return n.stop()}}),n)}))),function(){return n.apply(this,arguments)})})},children:(0,P.jsxs)("span",{className:"delete-hover",children:[" ",(0,P.jsx)("i",{className:"iconfont icon-piliangshanchubeifen font14 mr5"}),"删除"]})})]})}),(0,P.jsx)("div",{className:v,children:null==c?void 0:c.name}),(0,P.jsxs)("div",{className:j,children:[(0,P.jsxs)("span",{className:b,children:[(0,P.jsx)("span",{children:"发布人"}),(0,P.jsx)("b",{children:c.author_name})]}),(0,P.jsxs)("span",{className:b,children:[(0,P.jsx)("span",{children:"所属单位"}),(0,P.jsx)("b",{children:c.author_department})]}),(0,P.jsxs)("span",{className:b,children:[(0,P.jsx)("span",{children:"日期"}),(0,P.jsx)("b",{children:y()(c.publish_time).format("YYYY-MM-DD HH:mm")})]})]}),(0,P.jsx)(w.Z,{value:c.description||""})]})}},77277:function(n,e){e.Z={flex_box_center:"flex_box_center___vG4eV",flex_space_between:"flex_space_between___qVVxe",flex_box_vertical_center:"flex_box_vertical_center___P8Z8s",flex_box_center_end:"flex_box_center_end___VMme3",flex_box_column:"flex_box_column___VMHwm",dropdownmenus:"dropdownmenus___oVzoj",popupClassNames:"popupClassNames___OcZq7",selectdown:"selectdown___mmcA8"}}}]);