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.
1 line
9.2 KiB
1 line
9.2 KiB
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[96265],{10953:function(e,t,n){n.r(t);var l=n(7557),s=n.n(l),a=n(41498),o=n.n(a),i=n(82242),r=n.n(i),c=n(79800),u=n.n(c),d=n(39647),m=n.n(d),p=n(59301),v=n(65233),g=n(78241),f=n(71418),y=n(95237),h=n(43604),x=n(6848),w=n(53864),b=n(8591),j=n(25914),C=n(90921),Z=n(9045),O=n(17985),N=n(26795),S=n(99232),E=n.n(S),I=n(53520),P=n(37712),_=["classroomList","globalSetting","virtualSpaces","loading","user","dispatch"];t.default=(0,v.connect)((function(e){var t=e.classroomList,n=e.loading,l=e.globalSetting,s=e.virtualSpaces,a=e.user;return{classroomList:t,globalSetting:l,loading:n.effects,virtualSpaces:s,user:a}}))((function(e){e.classroomList,e.globalSetting;var t,n,l,a,i,c,d=e.virtualSpaces,S=e.loading,L=(e.user,e.dispatch),D=(m()(e,_),d.DiscussionList),k=d.menus,$=g.Z.useForm(),F=u()($,1)[0],M=(0,v.useParams)().virtual_spacesId,R=(0,p.useState)(!1),z=u()(R,2),T=z[0],A=z[1],Y=(0,p.useState)({page:1,limit:15}),G=u()(Y,2),H=G[0],B=G[1],W=(null==k||null===(t=k.find((function(e){return e.id==window.localStorage.getItem("vtrsModuleId")})))||void 0===t?void 0:t.name)||"",V=function(){window.scrollTo(0,0),L({type:"virtualSpaces/getDiscussionList",payload:r()(r()({},H),{},{virtual_spacesId:M,virtual_module_id:window.localStorage.getItem("vtrsModuleId")})})};return(0,p.useEffect)((function(){V()}),[H,window.localStorage.getItem("vtrsModuleId")]),(0,P.jsx)(f.Z,{spinning:S["virtualSpaces/getDiscussionList"],children:(0,P.jsxs)("div",{className:"ml40 mr40",children:[(0,P.jsx)(j.YG,{value:"all",onChange:function(){},tabBarExtraContent:(0,P.jsx)(j.op,{onClick:function(){A(!0),F.resetFields()},children:"新建"}),dataSource:[{id:"all",name:W}]}),0==(null==D||null===(n=D.data)||void 0===n?void 0:n.count)?(0,P.jsx)(C.Z,{}):(0,P.jsx)("div",{className:Z.Z.DiscussionList,children:null==D||null===(l=D.data)||void 0===l||null===(l=l.list)||void 0===l?void 0:l.map((function(e,t){var n;return(0,P.jsxs)(y.Z,{style:{flexDirection:"column"},className:Z.Z.DiscussionListItem,onClick:function(){v.history.push("/".concat(N.AS,"/").concat(M,"/discussion/").concat(e.id,"/detail?leftMenuId=").concat(window.localStorage.getItem("vtrsModuleId")))},children:[(0,P.jsx)(h.Z,{style:{width:283,height:177,overflow:"hidden"},children:(0,P.jsx)("img",{className:Z.Z.DiscussionListItemImg,src:"".concat(O.Z.API_SERVER).concat(null==e||null===(n=e.cover)||void 0===n?void 0:n.url)})}),(0,P.jsxs)(y.Z,{justify:"space-between",style:{padding:"26px 12px",flexDirection:"column",flex:1,width:283},children:[(0,P.jsxs)(h.Z,{children:[(0,P.jsx)(x.Z,{placement:"topLeft",title:e.name,children:(0,P.jsx)("div",{className:"font16 ".concat(Z.Z.Onerow),style:{color:"#333",fontWeight:600},children:e.name})}),(0,P.jsx)("div",{className:"mt10 ".concat(Z.Z.MultiLine),style:{color:"#666"},children:e.desc})]}),(0,P.jsxs)(y.Z,{style:{marginTop:"22px"},align:"middle",justify:"space-between",wrap:!1,children:[(0,P.jsxs)(h.Z,{children:[(0,P.jsx)("i",{className:"iconfont icon-shijian1 font12 mr5"}),E()(null==e?void 0:e.created_at).format("YYYY-MM-DD")]}),(0,P.jsx)(x.Z,{placement:"topLeft",title:e.real_name,children:(0,P.jsxs)(h.Z,{className:Z.Z.Onerow,style:{maxWidth:150,lineHeight:"18px"},children:[(0,P.jsx)("img",{className:"mr5",width:18,height:18,src:"".concat(O.Z.IMG_SERVER,"/images/").concat(null==e?void 0:e.user_image_url)}),null==e?void 0:e.real_name]})})]})]})]},t)}))}),0!=(null==D||null===(a=D.data)||void 0===a?void 0:a.count)&&(0,P.jsxs)(y.Z,{className:"mt20 mb20",wrap:!1,align:"middle",justify:"space-between",children:[(0,P.jsxs)(h.Z,{children:["共 ",(0,P.jsx)("span",{style:{color:"#165DFF"},children:(null==D||null===(i=D.data)||void 0===i?void 0:i.count)||0})," 条数据"]}),(0,P.jsx)(h.Z,{children:(0,P.jsx)(w.Z,{showSizeChanger:!1,showQuickJumper:!0,current:H.page,pageSize:H.limit,onChange:function(e,t){return B(r()(r()({},H),{},{page:e,limit:t}))},total:(null==D||null===(c=D.data)||void 0===c?void 0:c.count)||0})})]}),(0,P.jsx)(I.Z,{form:F,title:"新建交流研讨",width:1200,open:T,destroyOnClose:!0,dispatch:L,onCancel:function(){A(!1),F.resetFields()},confirmLoading:S["virtualSpaces/postDiscussionList"],onOk:function(){return F.submit()},handleFinish:function(){var e=o()(s()().mark((function e(t){var n,l;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.attachment_ids=(null==t||null===(n=t.attachment_ids)||void 0===n?void 0:n.map((function(e){var t;return null==e||null===(t=e.response)||void 0===t?void 0:t.id})))||[],e.next=3,L({type:"virtualSpaces/postDiscussionList",payload:r()(r()({virtual_spacesId:M},t),{},{virtual_module_id:window.localStorage.getItem("vtrsModuleId")})});case 3:l=e.sent,console.log(t),0==(null==l?void 0:l.status)&&(b.ZP.success("新建成功"),F.resetFields(),A(!1),V());case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()})]})})}))},38854:function(e,t,n){n.d(t,{Z:function(){return y}});var l=n(91857),s=n(92310),a=n.n(s),o=n(59301),i=n(75197),r=n(3113),c=n(36355),u=n(81327),d=n(33234),m=n(47211),p=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&t.indexOf(l)<0&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(l=Object.getOwnPropertySymbols(e);s<l.length;s++)t.indexOf(l[s])<0&&Object.prototype.propertyIsEnumerable.call(e,l[s])&&(n[l[s]]=e[l[s]])}return n};const v=e=>{const{getPopupContainer:t,getPrefixCls:n,direction:s}=o.useContext(c.E_),{prefixCls:v,type:g="default",danger:f,disabled:y,loading:h,onClick:x,htmlType:w,children:b,className:j,menu:C,arrow:Z,autoFocus:O,overlay:N,trigger:S,align:E,open:I,onOpenChange:P,placement:_,getPopupContainer:L,href:D,icon:k=o.createElement(i.Z,null),title:$,buttonsRender:F=(e=>e),mouseEnterDelay:M,mouseLeaveDelay:R,overlayClassName:z,overlayStyle:T,destroyPopupOnHide:A,dropdownRender:Y}=e,G=p(e,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","dropdownRender"]),H=n("dropdown",v),B=`${H}-button`,[W,V]=(0,m.Z)(H),J={menu:C,arrow:Z,autoFocus:O,align:E,disabled:y,trigger:y?[]:S,onOpenChange:P,getPopupContainer:L||t,mouseEnterDelay:M,mouseLeaveDelay:R,overlayClassName:z,overlayStyle:T,destroyPopupOnHide:A,dropdownRender:Y},{compactSize:Q,compactItemClassnames:U}=(0,d.ri)(H,s),q=a()(B,U,j,V);"overlay"in e&&(J.overlay=N),"open"in e&&(J.open=I),J.placement="placement"in e?_:"rtl"===s?"bottomLeft":"bottomRight";const K=o.createElement(r.ZP,{type:g,danger:f,disabled:y,loading:h,onClick:x,htmlType:w,href:D,title:$},b),X=o.createElement(r.ZP,{type:g,danger:f,icon:k}),[ee,te]=F([K,X]);return W(o.createElement(u.Z.Compact,Object.assign({className:q,size:Q,block:!0},G),ee,o.createElement(l.Z,Object.assign({},J),te)))};v.__ANT_BUTTON=!0;var g=v;const f=l.Z;f.Button=g;var y=f},81327:function(e,t,n){n.d(t,{Z:function(){return h}});var l=n(59301),s=n(92310),a=n.n(s),o=n(29541),i=n(36355),r=n(33234);const c=l.createContext({latestIndex:0}),u=c.Provider;var d=e=>{let{className:t,index:n,children:s,split:a,style:o}=e;const{latestIndex:i}=l.useContext(c);return null==s?null:l.createElement(l.Fragment,null,l.createElement("div",{className:t,style:o},s),n<i&&a&&l.createElement("span",{className:`${t}-split`},a))},m=n(2856);function p(e){return["small","middle","large"].includes(e)}function v(e){return!!e&&("number"==typeof e&&!Number.isNaN(e))}var g=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&t.indexOf(l)<0&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(l=Object.getOwnPropertySymbols(e);s<l.length;s++)t.indexOf(l[s])<0&&Object.prototype.propertyIsEnumerable.call(e,l[s])&&(n[l[s]]=e[l[s]])}return n};const f=l.forwardRef(((e,t)=>{var n,s;const{getPrefixCls:r,space:c,direction:f}=l.useContext(i.E_),{size:y=(null==c?void 0:c.size)||"small",align:h,className:x,rootClassName:w,children:b,direction:j="horizontal",prefixCls:C,split:Z,style:O,wrap:N=!1,classNames:S,styles:E}=e,I=g(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[P,_]=Array.isArray(y)?y:[y,y],L=p(_),D=p(P),k=v(_),$=v(P),F=(0,o.Z)(b,{keepEmpty:!0}),M=void 0===h&&"horizontal"===j?"center":h,R=r("space",C),[z,T]=(0,m.Z)(R),A=a()(R,null==c?void 0:c.className,T,`${R}-${j}`,{[`${R}-rtl`]:"rtl"===f,[`${R}-align-${M}`]:M,[`${R}-gap-row-${_}`]:L,[`${R}-gap-col-${P}`]:D},x,w),Y=a()(`${R}-item`,null!==(n=null==S?void 0:S.item)&&void 0!==n?n:null===(s=null==c?void 0:c.classNames)||void 0===s?void 0:s.item);let G=0;const H=F.map(((e,t)=>{var n,s;null!=e&&(G=t);const a=e&&e.key||`${Y}-${t}`;return l.createElement(d,{className:Y,key:a,index:t,split:Z,style:null!==(n=null==E?void 0:E.item)&&void 0!==n?n:null===(s=null==c?void 0:c.styles)||void 0===s?void 0:s.item},e)})),B=l.useMemo((()=>({latestIndex:G})),[G]);if(0===F.length)return null;const W={};return N&&(W.flexWrap="wrap"),!D&&$&&(W.columnGap=P),!L&&k&&(W.rowGap=_),z(l.createElement("div",Object.assign({ref:t,className:A,style:Object.assign(Object.assign(Object.assign({},W),null==c?void 0:c.style),O)},I),l.createElement(u,{value:B},H)))}));const y=f;y.Compact=r.ZP;var h=y}}]); |