|
|
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[58421],{48513:function(e,n,t){t.d(n,{Z:function(){return j}});var s=t(79800),i=t.n(s),o=t(59301),r=t(20834),l=t(92832),c=t(24905),a=t(3113),d=t(38854),u="bottomControlContainer___woAeo",h="buttonWrap___iRw4K",m="moveCategory___oiQqw",x=t(96107),p=t(78386),f=t(37712),j=function(e){var n=e.buttonDataSource,t=e.onButtonClick,s=e.useBatchStatus,j=e.allSelect,v=e.setAllSelect,y=e.selectArrs,_=e.onMenuClick,g=e.setSeleArr,C=e.catalogue,N=e.addCatalogue,Z=(0,o.useState)(!1),k=i()(Z,2),b=k[0],S=k[1],w=(0,o.useState)(""),I=i()(w,2),B=I[0],L=I[1];console.log("---",C);var M=(0,f.jsx)("div",{className:m,onMouseLeave:function(e){return S(!1)},children:(0,f.jsxs)(r.Z,{onClick:_,style:{maxHeight:300,width:240,overflow:"auto"},children:[(0,f.jsx)("li",{className:"ant-menu-item multi-llipsis1e ant-menu-item-only-child",children:(0,f.jsx)(l.Z,{onChange:function(e){L(e.target.value)}})}),null==C?void 0:C.map((function(e,n){var t;if(!(""!==B&&e.category_name.indexOf(B)<0))return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(r.Z.Item,{className:"multi-llipsis1e",title:e.category_name,children:e.category_name},e.category_id),null==e||null===(t=e.third_category)||void 0===t?void 0:t.map((function(e){return(0,f.jsx)(r.Z.Item,{style:{marginLeft:20},className:"multi-llipsis1e",title:e.category_name,children:e.category_name},e.category_id)}))]})})),N&&(0,f.jsx)("li",{className:"ant-menu-item multi-llipsis1e ant-menu-item-only-child",onClick:N,children:"新建子目录..."})]})});return(0,f.jsxs)("div",{className:u,children:[(0,f.jsxs)("div",{children:[(0,f.jsx)("div",{children:(0,f.jsxs)(c.Z,{checked:j,onChange:v,children:["全选本页(",y.length,")"]})}),(0,x.GJ)()&&n.map((function(e){return(0,f.jsx)("div",{children:(0,f.jsx)(a.ZP,{type:"primary",icon:e.icon,className:h,onClick:function(){return t(e)},children:e.name})},e.name)})),(0,x.GJ)()&&(N||C)&&(0,f.jsx)("div",{children:(0,f.jsx)(d.Z,{open:b,placement:"topLeft",autoAdjustOverflow:!1,dropdownRender:function(){return M},getPopupContainer:function(e){return e.parentNode},children:(0,f.jsx)("span",{className:"ant-dropdown-link",onMouseEnter:function(e){return S(!0)},children:(0,f.jsx)(a.ZP,{type:"primary",className:h,icon:(0,f.jsx)("i",{className:"iconfont icon-yidongmulu"}),children:(0,f.jsxs)("span",{children:["移动到目录 ",(0,f.jsx)(p.Z,{})]})})})})})]}),(0,f.jsx)("div",{children:(0,f.jsx)(a.ZP,{type:"primary",ghost:!0,onClick:function(){s(!1),g([])},children:"取消操作"})})]})}},80359:function(e,n,t){t.d(n,{Z:function(){return b}});var s=t(7557),i=t.n(s),o=t(37205),r=t.n(o),l=t(41498),c=t.n(l),a=t(79800),d=t.n(a),u=t(59301),h=t(20834),m=t(24905),x=t(3113),p=t(38854),f=t(6848),j=t(92832),v={searchSortControllerContainer:"searchSortControllerContainer___Xca1m",btn:"btn___sNJPX",btnSort:"btnSort___Fx9OM",tips:"tips___LrmpR"},y=t(96107),_=t(20538),g=t(78386),C=t(26724),N=t.n(C),Z=t(37360),k=t(37712),b=function(e){e.isAdmin,e.dataSource,e.batchStatus;var n=e.SortMenuName,t=e.setSortMenuName,s=e.detailCourseGroupsList,o=e.onSearch,l=e.onBoard,a=e.onSort,C=e.isboard,b=e.dispatch,S=(e.onBatch,e.SortMenus),w=(0,u.useState)(!1),I=d()(w,2),B=I[0],L=I[1],M=(0,u.useState)([]),P=d()(M,2),A=P[0],R=P[1],T=(0,u.useState)(!0),O=d()(T,2),z=O[0],G=O[1],E=(0,u.useState)([]),H=d()(E,2),J=H[0],K=H[1],D=(0,u.useState)(1),F=d()(D,2),W=F[0],X=F[1],q=(0,u.useState)(!1),Q=d()(q,2),U=Q[0],V=Q[1],Y=(0,Z.useParams)();(0,u.useEffect)((function(){C&&$()}),[C]);var $=function(){var e=c()(i()().mark((function e(){var n,t,s;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!z||U){e.next=10;break}return V(!0),X(W+1),e.next=5,b({type:"classroomList/getCourseGroupsList",payload:{page:W,id:Y.coursesId,limit:20,nonenavigate:!0}});case 5:t=e.sent,s=r()((null==t?void 0:t.course_groups)||[]),(null==t||null===(n=t.course_groups)||void 0===n?void 0:n.length)<20&&(G(!1),s.push({id:0,name:"未分班"})),V(!1),K([].concat(r()(J),r()(s)));case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ee=(0,k.jsxs)("section",{className:v.dropmenu,children:[(0,k.jsx)("div",{style:{maxHeight:200,overflow:"auto"},children:(0,k.jsx)(N(),{initialLoad:!1,pageStart:1,threshold:20,loadMore:function(e){$()},hasMore:z,useWindow:!1,children:(0,k.jsx)(h.Z,{style:{width:240,zIndex:10},children:(null==s?void 0:s.group_count)>0&&(null==J?void 0:J.filter((function(e){return e.edit_auth||"未分班"===e.name})).map((function(e,n){return(0,k.jsx)(h.Z.Item,{children:(0,k.jsx)(m.Z,{checked:A.includes(e.id),value:e.id,onChange:function(n){A.indexOf(e.id);A.indexOf(e.id)>-1?R(A.filter((function(n){return n!==e.id}))):R(A.concat(e.id))},children:e.name})},e.id)})))})})}),(0,k.jsx)("aside",{style:{background:"#fff"},children:(0,k.jsxs)("div",{children:[(0,k.jsx)(x.ZP,{type:"link",onClick:function(){l(A)},children:"确定"}),(0,k.jsx)(x.ZP,{type:"link",onClick:function(){R([])},children:"重置"})]})})]}),ne="默认排序"===n;return(0,k.jsxs)("div",{className:v.searchSortControllerContainer,children:[!(null==S||!S.length)&&(0,k.jsx)("div",{children:(0,k.jsx)(p.Z,{dropdownRender:function(){return(0,k.jsx)(h.Z,{selectedKeys:[n],children:S.map((function(e){return(0,k.jsx)(h.Z.Item,{onClick:function(){return t((n=e).name),void a(n);var n},children:e.name},e.name)}))})},children:(0,k.jsx)("div",{children:(0,k.jsxs)("span",{className:"".concat(v.btn," ").concat(ne?v.btnSort:""),children:[(0,k.jsx)("i",{className:"iconfont icon-paixu font14 mr5"}),n]})})})}),ne&&(0,k.jsx)(f.Z,{title:"优先按照调整排序结果展示,未设置排序时,按照创建时间降序排列",children:(0,k.jsx)("span",{className:v.tips,children:(0,k.jsx)("i",{className:"iconfont icon-a-wenhaobeifen2"})})}),(0,k.jsx)(j.Z.Search,{allowClear:!0,placeholder:"请输入名称进行搜索",onSearch:o,style:{width:220,marginLeft:"auto"}}),(0,y.eB)()&&C&&(0,k.jsx)(p.Z,{dropdownRender:function(){return ee},open:B,onOpenChange:function(e){L(e)},children:(0,k.jsxs)("a",{children:["分班",B?(0,k.jsx)(_.Z,{style:{marginLeft:6}}):(0,k.jsx)(g.Z,{style:{marginLeft:6}})]})})]})}},49523:function(e,n,t){t.d(n,{Z:function(){return u}});t(59301);var s=t(95237),i=t(43604),o=t(20834),r=t(38854),l=t(6848),c={tabMenuContainer:"tabMenuContainer___uf5IP",control:"control___GheLs",iconH:"iconH___Wzw_r",selectBtn:"selectBtn___mfEnI",selectBtn1:"selectBtn1___rJF8S"},a=t(37360),d=t(37712),u=function(e){var n,t,u,h,m=e.isLoading,x=e.addText,p=e.tabDataSource,f=e.isAdmin,j=e.dispatch,v=e.type,y=e.isExercise,_=e.defaultSelectedKeys,g=e.onTabMenuClick,C=e.getDropdownMenu,N=e.showControlButton,Z=e.buttonText,k=e.buttonIcon,b=void 0===k?"icon-tianjiadaohang":k,S=e.extraNode,w=e.user,I=e.onButtonClick,B=e.isModelUser,L=(0,a.useParams)();return(0,d.jsx)("div",{className:c.tabMenuContainer,children:(0,d.jsxs)(s.Z,{children:[(0,d.jsx)(i.Z,{flex:"1",children:(0,d.jsx)(o.Z,{onSelect:function(e){return m?{}:g(e)},mode:"horizontal",selectedKeys:_,children:p.map((function(e){return(0,d.jsxs)(o.Z.Item,{children:[(0,d.jsx)("span",{className:"c-grey-666",children:e.name}),void 0!==e.total&&f&&(0,d.jsx)("span",{className:"c-grey-999 ml20",children:e.total||0})]},"number"==typeof e.index?e.index:e.id)}))})}),f&&y&&(0,d.jsx)("i",{className:"iconfont icon-shezhi8",style:{display:"flex",alignItems:"center",cursor:"pointer"},onClick:function(){j({type:"classroomList/setActionTabs",payload:{key:"在线考试设置"}})}}),f&&(0,d.jsxs)(i.Z,{className:"mr20 gutter-row",style:{display:"flex",alignItems:"center",color:"#0152d9",paddingBottom:3},children:[y&&(0,d.jsx)(r.Z,{className:"mr15",placement:"bottom",arrow:!0,dropdownRender:function(){return(0,d.jsxs)(o.Z,{children:[(0,d.jsx)(o.Z.Item,{onClick:function(){j({type:"classroomList/setActionTabs",payload:{key:"导出成绩",type:v,exportType:"exercise",category_id:L.categoryId}})},children:"学生成绩"},1),(0,d.jsx)(o.Z.Item,{onClick:function(){a.history.push("/classrooms/".concat(null==L?void 0:L.coursesId,"/exportlist/exercise_score,export_exercise_users"))},children:"历史导出"},3)]})},children:(0,d.jsx)("div",{className:"c-blue font16 ml20 current",style:{marginTop:2},children:(0,d.jsx)("span",{style:{color:"#666666",cursor:"pointer"},children:(0,d.jsx)("i",{className:"iconfont icon-xiazai6"})})})}),(0,d.jsxs)("div",{className:c.control,children:[(0,d.jsx)("div",{className:c.extra,children:S}),N&&("添加直播"==Z?(0,d.jsx)(r.Z,{menu:{items:null===(n=[{label:(0,d.jsx)("div",{onClick:function(){I("外链")},children:"外链直播"}),key:"1",show:!0},B&&{label:(0,d.jsx)("div",{onClick:function(){I("头歌")},children:"头歌直播"}),key:"2",show:!0}])||void 0===n||null===(n=n.filter((function(e){return null==e?void 0:e.show})))||void 0===n?void 0:n.map((function(e){return{label:null==e?void 0:e.label,key:null==e?void 0:e.key}}))},children:(0,d.jsxs)("span",{className:c.selectBtn,children:[(0,d.jsx)("span",{children:(0,d.jsx)("i",{className:"iconfont ".concat(b)})}),(0,d.jsx)("span",{children:Z})]})}):(0,d.jsxs)("span",{onClick:I,style:{cursor:"pointer"},className:c.selectBtn,children:[(0,d.jsx)("span",{children:(0,d.jsx)("i",{className:"iconfont ".concat(b)})}),(0,d.jsx)("span",{children:Z})]})),!!C&&(0,d.jsx)(r.Z,{disabled:2===(null==w||null===(t=w.userInfo)||void 0===t?void 0:t.user_status),className:"ml10",dropdownRender:C,children:(0,d.jsxs)("span",{className:2===(null==w||null===(u=w.userInfo)||void 0===u?void 0:u.user_status)?c.selectBtn1:c.selectBtn,children:[(0,d.jsx)("span",{children:(0,d.jsx)("i",{className:"iconfont icon-tianjiadaohang"})}),(0,d.jsx)(l.Z,{title:2===(null==w||null===(h=w.userInfo)||void 0===h?void 0:h.user_status)&&"教学课堂试用期已结束,平台已暂停提供在线考试创建功能",children:(0,d.jsx)("span",{children:x||"创建试卷"})})]})})]})]})]})})}}}]); |