|
|
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[41499],{82777: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),a=t(24905),c=t(3113),d=t(38854),u="bottomControlContainer___woAeo",h="buttonWrap___iRw4K",m="moveCategory___oiQqw",x=t(67275),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,N=e.addCatalogue,Z=(0,o.useState)(!1),b=i()(Z,2),k=b[0],S=b[1],w=(0,o.useState)(""),I=i()(w,2),M=I[0],B=I[1];console.log("---",C);var L=(0,f.jsx)("div",{className:m,onMouseLeave:function(e){return S(!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)(l.Z,{onChange:function(e){B(e.target.value)}})}),null==C?void 0:C.map((function(e,n){var t;if(!(""!==M&&e.category_name.indexOf(M)<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)(a.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)()&&(N||C)&&(0,f.jsx)("div",{children:(0,f.jsx)(d.Z,{open:k,placement:"topLeft",autoAdjustOverflow:!1,dropdownRender:function(){return L},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)(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:"取消操作"})})]})}},45555:function(e,n,t){t.d(n,{Z:function(){return S}});var s=t(7557),i=t.n(s),o=t(37205),r=t.n(o),l=t(41498),a=t.n(l),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(67275),_=t(88551),C=t(18290),N=t(26724),Z=t.n(N),b=t(18196),k=t(37712),S=function(e){e.isAdmin,e.dataSource,e.batchStatus;var n=e.SortMenuName,t=e.setSortMenuName,s=e.detailCourseGroupsList,o=e.onSearch,l=e.onBoard,c=e.onSort,N=e.isboard,S=e.dispatch,w=(e.onBatch,e.SortMenus),I=e.isShowMode,M=void 0!==I&&I,B=e.onModeChange,L=(0,u.useState)(!1),P=d()(L,2),A=P[0],R=P[1],T=(0,u.useState)([]),O=d()(T,2),z=O[0],G=O[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,b.useParams)();(0,u.useEffect)((function(){N&&se()}),[N]);var se=function(){var e=a()(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,S({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,k.jsxs)("section",{className:y.dropmenu,children:[(0,k.jsx)("div",{style:{maxHeight:200,overflow:"auto"},children:(0,k.jsx)(Z(),{initialLoad:!1,pageStart:1,threshold:20,loadMore:function(e){se()},hasMore:J,useWindow:!1,children:(0,k.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,k.jsx)(h.Z.Item,{children:(0,k.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,k.jsx)("aside",{style:{background:"#fff"},children:(0,k.jsxs)("div",{children:[(0,k.jsx)(x.ZP,{type:"link",onClick:function(){l(z)},children:"确定"}),(0,k.jsx)(x.ZP,{type:"link",onClick:function(){G([])},children:"重置"})]})})]}),oe="默认排序"===n;return(0,k.jsxs)("div",{className:y.searchSortControllerContainer,children:[!(null==w||!w.length)&&(0,k.jsx)("div",{children:(0,k.jsx)(p.Z,{dropdownRender:function(){return(0,k.jsx)(h.Z,{selectedKeys:[n],children:w.map((function(e){return(0,k.jsx)(h.Z.Item,{onClick:function(){return t((n=e).name),void c(n);var n},children:e.name},e.name)}))})},children:(0,k.jsx)("div",{children:(0,k.jsxs)("span",{className:"".concat(y.btn," ").concat(oe?y.btnSort:""),children:[(0,k.jsx)("i",{className:"iconfont icon-paixu font14 mr5"}),n]})})})}),oe&&(0,k.jsx)(f.Z,{title:"优先按照调整排序结果展示,未设置排序时,按照创建时间降序排列",children:(0,k.jsx)("span",{className:y.tips,children:(0,k.jsx)("i",{className:"iconfont icon-a-wenhaobeifen2"})})}),M&&(0,k.jsx)(j.default,{defaultValue:"",onChange:B,style:{width:160,marginLeft:"auto",marginRight:"20px"},options:[{value:"",label:"全部考试模式"},{value:!0,label:"正式考试"},{value:!1,label:"模拟考试"}]}),(0,k.jsx)(v.Z.Search,{allowClear:!0,placeholder:"请输入名称进行搜索",onSearch:o,style:{width:220,marginLeft:M?"":"auto"}}),(0,g.eB)()&&N&&(0,k.jsx)(p.Z,{dropdownRender:function(){return ie},open:A,onOpenChange:function(e){R(e)},children:(0,k.jsxs)("a",{children:["分班",A?(0,k.jsx)(_.Z,{style:{marginLeft:6}}):(0,k.jsx)(C.Z,{style:{marginLeft:6}})]})})]})}},43787: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),a={tabMenuContainer:"tabMenuContainer___uf5IP",control:"control___GheLs",iconH:"iconH___Wzw_r",selectBtn:"selectBtn___mfEnI",selectBtn1:"selectBtn1___rJF8S"},c=t(18196),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,g=e.defaultSelectedKeys,_=e.onTabMenuClick,C=e.getDropdownMenu,N=e.showControlButton,Z=e.buttonText,b=e.buttonIcon,k=void 0===b?"icon-tianjiadaohang":b,S=e.extraNode,w=e.user,I=e.onButtonClick,M=e.isModelUser,B=(0,c.useParams)();return(0,d.jsx)("div",{className:a.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?{}:_(e)},mode:"horizontal",selectedKeys:g,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:B.categoryId}})},children:"学生成绩"},1),(0,d.jsx)(o.Z.Item,{onClick:function(){c.history.push("/classrooms/".concat(null==B?void 0:B.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:a.control,children:[(0,d.jsx)("div",{className:a.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},M&&{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:a.selectBtn,children:[(0,d.jsx)("span",{children:(0,d.jsx)("i",{className:"iconfont ".concat(k)})}),(0,d.jsx)("span",{children:Z})]})}):(0,d.jsxs)("span",{onClick:I,style:{cursor:"pointer"},className:a.selectBtn,children:[(0,d.jsx)("span",{children:(0,d.jsx)("i",{className:"iconfont ".concat(k)})}),(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)?a.selectBtn1:a.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||"创建试卷"})})]})})]})]})]})})}}}]); |