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