421.7cea7a31.js 9.7 KB

1
  1. "use strict";(self["webpackChunkclassroom"]=self["webpackChunkclassroom"]||[]).push([[421],{8039:function(e,a,s){s.d(a,{FY:function(){return t},Tw:function(){return i},_3:function(){return o},bq:function(){return n},eJ:function(){return r},ew:function(){return u},t7:function(){return c}});var l=s(7053);const o=(e,a)=>l.Z9.axioseRquest({signal:a.signal,method:"post",url:"/api-teacher/lessonCourseware/queryLessonCourseware",data:{query:{subjectId:e,page:1,rows:9999}}}),t=()=>l.Z9.axioseRquest({method:"get",url:"/api-teacher/lessonCourseware/getLessonCoursewareSubjectList"}),n=e=>l.Z9.axioseRquest({method:"get",url:"/api-teacher/lessonCourseware/getLessonCoursewareCourseList/"+e}),i=e=>l.Z9.axioseRquest({method:"get",url:"/api-teacher/lessonCourseware/getLessonCourseDetail/"+e}),u=()=>l.rO.axioseRquest({method:"post",url:"/api-teacher/courseSchedule/myCourseware"}),c=e=>l.rO.axioseRquest({method:"post",url:"/api-teacher/courseSchedule/myCoursewareDetail/"+e}),r=e=>l.rO.axioseRquest({method:"get",url:"/api-teacher/lessonCoursewareDetail/detail/"+e})},6453:function(e,a,s){s.r(a),s.d(a,{default:function(){return ge}});var l=s(3396),o=s(4870),t=s(9242),n=s(7139),i=s(5785),u=s(6515),c=s(4607),r=s(6346),d=s(4505),g=s(817),m=s(1145),p=s(2722),f=(s(7658),s(8039)),h=s(2317),v=s(5402),w=s(7178),k=s(2529);const C=()=>{const e=(0,k.Z)(),a=(0,o.XI)([]);let s=[];const l=(0,o.iH)(!1);let t;function n(){"GYM"===e.roles?r("",""):u()}function i(a,s){"GYM"===e.roles?d(a,s):c(a,s)}function u(){l.value=!0,(0,h.Jj)(f.ew).then((e=>{l.value=!1,200===e.code&&(s=(e.data||[]).map((e=>({name:e.name,type:e.courseTypeCode,img:e.coverImg,id:e.id,courseNum:e.courseNum}))),a.value=y(s,5))}))}function c(e,l){const o=s.filter((a=>(!e||a.type===e)&&(!l||a.name.includes(l))));a.value=y(o,5)}function r(e,s){t&&t.abort(),t=new AbortController,l.value=!0,(0,h.hk)(f._3,e,t).then((o=>{if(o.code!==v.xU)if(l.value=!1,200===o.code){const l=(o.data?.rows||[]).reduce(((a,l)=>(e&&l.subjectId!==e||s&&!l.name.includes(s)||a.push({name:l.name,type:l.subjectId,img:l.cover,id:l.lessonCoursewareId,courseNum:l.courseNum}),a)),[]);a.value=y(l,5)}else(0,w.z8)({showClose:!0,message:o.message,type:"error"})}))}function d(e,a){r(e,a)}return{loading:l,listData:a,handleGetList:n,handleListQuery:i}},F=()=>{const e=(0,k.Z)(),a=(0,o.XI)([]),s=(0,o.iH)(0),t=(0,o.iH)(!1),n=(0,l.Fl)((()=>{const e=a.value[s.value]||[];return[e[0]||[],e[1]||[]]}));function i(a){"GYM"===e.roles?c(a):r(a)}function u(e){"next"===e?s.value++:s.value--}function c(e){t.value=!0,(0,h.Jj)(f.bq,e).then((e=>{if(t.value=!1,200===e.code){const s=(e.data||[]).map((e=>({name:e.coursewareDetailName,id:e.coursewareDetailId})));a.value=y(y(s,7),2)}}))}function r(e){t.value=!0,(0,h.Jj)(f.t7,e).then((e=>{if(t.value=!1,200===e.code){const s=(e.data||[]).map((e=>({name:e.coursewareDetailName,id:e.lessonCoursewareDetailId,useNum:e.useNum,lockFlag:!1})));a.value=y(y(s,7),2)}}))}return{handleGetDetailList:i,loading:t,listDetailData:n,listData:a,pageNum:s,handlePage:u}};function y(e,a){const s=[];for(let l=0;l<e.length;l+=a)s.push(e.slice(l,l+a));return s}var D=s(7623);const A=e=>((0,l.dD)("data-v-1c4bd5a5"),e=e(),(0,l.Cn)(),e),S={class:"chooseDialog"},_={class:"chooseCon"},I=A((()=>(0,l._)("img",{class:"imgMid",src:g},null,-1))),N=["onClick"],b=["src"],E={class:"chooseList"},U={class:"img"},L={key:0,src:m},R={key:1,src:p},T={class:"nameCon"},x={class:"name"},G={key:0,class:"text"},j=["onClick"];var M=(0,l.aZ)({__name:"chooseDialog",props:{modalData:{}},emits:["onClose"],setup(e,{emit:a}){const i=e,{handleGetDetailList:u,loading:c,listDetailData:r,listData:d,pageNum:g,handlePage:m}=F();function p(){a("onClose")}function f(e){const a=D.Z.resolve({name:"coursewarePlay",params:{id:e}}).href;window.open(a,"_blank")}return u(i.modalData.id),(e,a)=>{const i=(0,l.Q2)("loading");return(0,l.wg)(),(0,l.iD)("div",S,[(0,l._)("div",{class:"close",onClick:p}),(0,l.wy)(((0,l.wg)(),(0,l.iD)("div",_,[I,((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)((0,o.SU)(r),((e,a)=>((0,l.wg)(),(0,l.iD)("div",{class:"chooseBox",key:a},[(0,l.wy)((0,l._)("div",{class:"operate",onClick:e=>(0,o.SU)(m)(0===a?"prev":"next")},[(0,l._)("img",{src:s(1616)(`./${0===a?"left":"right"}.png`)},null,8,b)],8,N),[[t.F8,0===a&&0!==(0,o.SU)(g)||1===a&&(0,o.SU)(d).length>(0,o.SU)(g)+1]]),(0,l._)("div",E,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e,(e=>((0,l.wg)(),(0,l.iD)("div",{class:"listItem",key:e.id},[(0,l._)("div",U,[e.lockFlag?((0,l.wg)(),(0,l.iD)("img",L)):((0,l.wg)(),(0,l.iD)("img",R))]),(0,l._)("div",T,[(0,l._)("div",x,(0,n.zw)(e.name),1),e.useNum?((0,l.wg)(),(0,l.iD)("div",G,"已使用"+(0,n.zw)(e.useNum)+"次",1)):(0,l.kq)("",!0)]),(0,l._)("div",{class:(0,n.C_)(["play",{disabled:e.lockFlag}]),onClick:a=>!0===e.lockFlag||f(e.id)},"查看",10,j)])))),128))])])))),128))])),[[i,(0,o.SU)(c)]])])}}}),V=s(89);const q=(0,V.Z)(M,[["__scopeId","data-v-1c4bd5a5"]]);var O=q,Q=s(9327),Z="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAMAAAC7IEhfAAAAk1BMVEUAAAD/gVb/gVT/gFf/hFj/gFf/gFf/gFf/gFf/gFb/gFf/gVf/gFf/gFf/gFf/gFf/gFf/gFf/glb/gEj/gFf/gFf/gFf/gFf/gVf/gFf/gFf/gFf/gFf/gVf/gFj/gFb/gFb/glj/gFj/gFj/gFf/gFj/gFf/gFf/gFf/gFb/glj/gVf/gVf/gFf/f1f/glf/gFdgjBAJAAAAMHRSTlMACQ1CEvz2Y+24+t+7q4zkvl0aBtnCpWpN8s2Wem5JMyUex8OxnnRRPTg3MIWDLFiK4Dr0AAABkElEQVQ4y42T55aCQAyFQ2+KNLEhqGtvm/d/uj0TmIUheOT+S/JNSO4M0JHxnAS25Wb5Yg+fpRcz/JflGZ84x0VV3mBXfYpMqwvnzDUOyNqyfg1nH+O3qe2NMGvQRQ+c1g3ydqo4oJR/Vfeo24mRtNJJ6mE8SgZad0CXuDtAsrERpS85ka8OWFDmF6CkExJMD7S62YLk8xTA8BGPy7aw80Wh3dygRXZiAnsJXW1E5QBSIV0DpVUOHtRCl2FUG5au8Ag9kUdXZcQKjLoh99eRkS2iRJhp9sFQuR1LRDokVQV9PUXpLCMybwdDOikd19JlLtqzVI6FQ5xuKx+L6fIZxSumX5vARa9y03NrZjJui0KPNnGjRJT2uCt9yeMPfKopnOEisyOpc+t3m0rPPpI85fjSoqR1qpr9nAClIp39NbRTHob5wcKO5goZ+8g0TN6zsaRWuErVu0xQ6kchQXciu6kE4QNA8zgppd3i7dkpkyZiPbkYOU/Hki8YSc5gJGnDSHL+hZMu+Tf4qrTIVtEd/gCssmQzfH+BlQAAAABJRU5ErkJggg==",H=s(1407);const J={key:1,class:"imgSs",src:Z};var B=(0,l.aZ)({__name:"myInput",props:{width:{},height:{}},emits:["handleQuery"],setup(e,{emit:a}){const s=e;(0,t.sj)((e=>({73017252:n.value,"594443ca":i.value})));const n=(0,l.Fl)((()=>s.width?(s.width/H.cM).toFixed(5)+"rem":"100%")),i=(0,l.Fl)((()=>((s.height||32)/H.cM).toFixed(5)+"rem")),u=(0,o.iH)(!1);function c(){u.value=!0}function r(){u.value=!1}function d(){a("handleQuery")}return(e,a)=>{const s=(0,l.up)("el-input");return(0,l.wg)(),(0,l.j4)(s,(0,l.dG)({class:"h_myInput"},e.$attrs,{onFocus:c,onBlur:r,class:{isInputFocus:u.value}}),{prepend:(0,l.w5)((()=>[e.$slots.prepend?(0,l.WI)(e.$slots,"prepend",{key:0}):((0,l.wg)(),(0,l.iD)("img",J))])),append:(0,l.w5)((()=>[e.$slots.append?(0,l.WI)(e.$slots,"append",{key:0}):((0,l.wg)(),(0,l.iD)("div",{key:1,class:"btnSelect",onClick:d},"搜索"))])),_:3},16,["class"])}}});const Y=B;var P=Y,K=P;const z=e=>((0,l.dD)("data-v-3ea4368c"),e=e(),(0,l.Cn)(),e),W={class:"cloudTextbooks"},X={class:"headCon"},$={class:"operate"},ee={class:"cloudTextbooksCon"},ae={class:"cloudTextbooksBox"},se={class:"imgCon"},le=z((()=>(0,l._)("img",{class:"imgbg",src:i},null,-1))),oe=z((()=>(0,l._)("img",{class:"imgbg1",src:u},null,-1))),te=z((()=>(0,l._)("img",{class:"imgbg2",src:c},null,-1))),ne=["onClick"],ie={class:"name"};var ue;(function(e){e["PERCUSSION_SINGLE"]="打击乐",e["FLUTE_SINGLE"]="长笛",e["SAX_SINGLE"]="萨克斯",e["CLARINET_SINGLE"]="单簧管",e["TRUMPET_SINGLE"]="小号",e["TROMBONE_SINGLE"]="长号",e["HORN_SINGLE"]="圆号",e["BARITONE_TUBA_SINGLE"]="上低音号-大号",e["MUSIC_THEORY"]="乐理",e["INSTRUMENTAL_ENSEMBLE"]="合奏",e["EUPHONIUM_SINGLE"]="上低音号",e["TUBA_SINGLE"]="大号"})(ue||(ue={}));var ce=(0,l.aZ)({__name:"cloudTextbooks",setup(e){const a=(0,k.Z)(),{handleGetList:i,listData:u,loading:c,handleListQuery:g}=C(),m=[{name:"主页",url:"/"},{name:"GYM"===a.roles?"云教程":"云教材"}],p=(0,o.iH)(""),v=(0,o.XI)([]),w=(0,o.iH)("");function F(){"GYM"===a.roles?(0,h.hk)(f.FY).then((e=>{200===e.code&&(v.value=[{value:"",label:"全部"},...e.data.map((e=>({value:e.id,label:e.name})))])})):v.value=[{value:"",label:"全部"},...Object.keys(ue).map((e=>({value:e,label:ue[e]})))]}function y(){g(p.value,w.value)}F(),i();const D=(0,Q.Ds)(y);function A(e){(0,d.ZP)({template:O,width:1110,height:675,btnShow:[],modalData:{id:e},maskClose:!0,className:"chooseDialog"})}return(e,a)=>{const i=(0,l.up)("dictionary"),d=(0,l.up)("ElImage"),g=(0,l.up)("ElScrollbar"),f=(0,l.up)("el-empty"),h=(0,l.Q2)("loading");return(0,l.wg)(),(0,l.j4)((0,o.SU)(r.Z),{navs:m},{default:(0,l.w5)((()=>[(0,l._)("div",W,[(0,l._)("div",X,[(0,l._)("div",$,[(0,l.Wm)(i,{"popper-class":"classTypePopper",modelValue:p.value,"onUpdate:modelValue":a[0]||(a[0]=e=>p.value=e),width:150,height:40,options:v.value,placeholder:"课程类型",onChange:y},null,8,["modelValue","options"]),(0,l.Wm)((0,o.SU)(K),{class:"queryIpt",modelValue:w.value,"onUpdate:modelValue":a[1]||(a[1]=e=>w.value=e),width:382,height:40,placeholder:"请输入教材名称",onKeyup:(0,t.D2)(y,["enter"]),onInput:(0,o.SU)(D),onHandleQuery:y,clearable:""},null,8,["modelValue","onKeyup","onInput"])])]),(0,l._)("div",ee,[(0,l.wy)(((0,l.wg)(),(0,l.j4)(g,{class:"elScrollbar"},{default:(0,l.w5)((()=>[(0,l._)("div",ae,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)((0,o.SU)(u),((e,a)=>((0,l.wg)(),(0,l.iD)("div",{class:"bookshelf",key:a},[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e,(e=>((0,l.wg)(),(0,l.iD)("div",{class:"book",key:e.id},[(0,l._)("div",se,[(0,l.Wm)(d,{class:"img",src:e.img,onClick:a=>A(e.id)},null,8,["src","onClick"]),le,oe,te,(0,l._)("div",{class:"courseNum",onClick:a=>A(e.id)},"共"+(0,n.zw)(e.courseNum)+"课",9,ne)]),(0,l._)("div",ie,(0,n.zw)(e.name),1)])))),128))])))),128))])])),_:1})),[[h,(0,o.SU)(c)]])]),(0,o.SU)(u).length||(0,o.SU)(c)?(0,l.kq)("",!0):((0,l.wg)(),(0,l.j4)(f,{key:0,class:"empty",image:s(9449),description:"暂无搜索结果"},null,8,["image"]))])])),_:1})}}});const re=(0,V.Z)(ce,[["__scopeId","data-v-3ea4368c"]]);var de=re,ge=de}}]);