Files
Electron_Test/front/assets/index.5e3f11c1.js
2024-04-07 09:46:14 +08:00

2 lines
7.4 KiB
JavaScript

import{n as l}from"./vueComponentNormalizer.9ef17bb1.js";import{g as f,a as p}from"./my-course.a3711b76.js";import{d as h}from"./data-report.1a365133.js";import{Q as v}from"./QueryInput.7afa399e.js";import"./index.51e15757.js";import"./index.70d38b82.js";/* empty css */var _=function(){var s,a,o,n,i,e=this,r=e.$createElement,t=e._self._c||r;return t("div",{directives:[{name:"loading",rawName:"v-loading",value:e.infoLoading,expression:"infoLoading"}],class:"my-course-info",on:{mouseenter:function(d){e.isMoveCourse=!0},mouseleave:function(d){e.isMoveCourse=!1}}},[t("div",{staticClass:"my-course-cover"},[t("img",{attrs:{src:e.courseInfo.courseInfo.cover.fileLinkTransfer(),alt:""}})]),t("div",{staticClass:"my-course-content"},[t("div",{staticClass:"course-title"},[t("h2",{staticStyle:{display:"inline-block"}},[e._v(" "+e._s(e.courseInfo.courseInfo.name)+" ")]),e.courseInfo.studyProgress==1?t("span",{staticClass:"course-status course-status-nodo"},[e._v("\u672A\u5F00\u59CB")]):e._e(),e.courseInfo.studyProgress==2?t("span",{staticClass:"course-status course-status-todo"},[e._v("\u5DF2\u8FDB\u884C")]):e._e(),e.courseInfo.studyProgress==3?t("span",{staticClass:"course-status course-status-overdo"},[e._v("\u5DF2\u5B8C\u6210")]):e._e(),e.courseInfo.studyProgress==3&&!e.courseInfo.isAnswer&&(s=e.courseInfo.exercise)!==null&&s!==void 0&&s.length?t("span",{staticClass:"course-status course-status-overdo-noAnswer"},[e._v("\u8BD5\u9898\u672A\u7B54")]):e._e(),e.checkExerciseIsOver(e.courseInfo)?t("span",{staticClass:"course-status course-status-overdo"}):e._e()]),t("div",{staticClass:"course-update"},[t("span",{staticClass:"create-time"},[t("i",{staticClass:"el-icon-time"}),e._v(" \u521B\u5EFA\u65F6\u95F4 "+e._s(new Date(e.courseInfo.courseInfo.createTime).format("yyyy-MM-dd"))+" ")]),t("span",{staticClass:"create-time"},[t("i",{staticClass:"el-icon-user"}),e._v(" \u8BB2\u5E08\uFF1A"+e._s((a=e.courseInfo.lecturer)===null||a===void 0?void 0:a.name)+" ")])]),t("div",{staticClass:"course-detailed"},[t("span",{staticClass:"course-detailed-item"},[e._v("\u8BFE\u7A0B\u5206\u7C7B\uFF1A"+e._s((o=e.courseInfo.classify)===null||o===void 0?void 0:o.name))]),t("span",{staticClass:"course-detailed-item"},[e._v("\u8BFE\u7A0B\u7AE0\u8282\uFF1A"+e._s((n=e.courseInfo.courseInfo)===null||n===void 0?void 0:n.sectionCount))]),t("span",{staticClass:"course-detailed-item"},[e._v("\u8BFE\u7A0B\u96BE\u5EA6\uFF1A"+e._s(e.difficulty[(i=e.courseInfo.courseInfo)===null||i===void 0?void 0:i.difficulty].name))]),t("span",{staticClass:"course-detailed-item"},[e._v("\u8BFE\u7A0B\u5B66\u65F6\uFF1A"+e._s(e.timeFormat(e.courseInfo.courseInfo.courseHours)))]),t("span",{staticClass:"course-detailed-item"},[e._v("\u5DF2\u89C2\u770B\u4EBA\u6570\uFF1A"+e._s(e.courseInfo.courseInfo.viewNumber))])])]),t("div",{staticClass:"my-course-manage"},[t("div",{on:{click:e.startStudy}},[e.courseInfo.studyProgress==1?t("span",{staticClass:"study-open study-start"},[t("i",{staticClass:"el-icon-notebook-1"}),e._v(" \u5F00\u59CB\u5B66\u4E60")]):e._e(),e.courseInfo.studyProgress==2?t("span",{staticClass:"study-open study-continue"},[t("i",{staticClass:"el-icon-timer"}),e._v(" \u7EE7\u7EED\u5B66\u4E60")]):e._e(),e.courseInfo.studyProgress==3?t("span",{staticClass:"study-open study-view"},[t("i",{staticClass:"el-icon-collection"}),e._v(" \u518D\u6B21\u67E5\u770B")]):e._e()])])])},m=[];const y={props:{courseInfo:{type:Object,required:!0}},components:{},data(){return{difficulty:{1:{name:"\u521D\u7EA7",id:1},2:{name:"\u4E2D\u7EA7",id:1},3:{name:"\u9AD8\u7EA7",id:1}},classifyList_map:[],infoLoading:!1,detailCourseInfo:void 0,isShowStudyBox:!1,isMoveCourse:!1}},computed:{},watch:{},methods:{async startStudy(){this.$emit("startStudy",this.courseInfo)},async getCourseInfo(){},timeFormat(s){const a=Math.floor(s/60),o=Math.floor(s%60),n=(s-Math.floor(s))*60;return`${a}\u5C0F\u65F6${o}\u5206\u949F${n}\u79D2`},checkExerciseIsOver(s){}},created(){this.listLoading=!0},mounted(){},beforeCreate(){},beforeMount(){},beforeUpdate(){},updated(){},beforeUnmount(){},unmounted(){},activated(){}},c={};var g=l(y,_,m,!1,C,"47185cfa",null,null);function C(s){for(let a in c)this[a]=c[a]}const I=function(){return g.exports}();var w=function(){var s=this,a=s.$createElement,o=s._self._c||a;return o("div",{staticClass:"my-course"},[o("div",{staticClass:"search-course"},[o("SearchInput",{on:{query:s.searchCourse},model:{value:s.searchValue,callback:function(n){s.searchValue=n},expression:"searchValue"}})],1),o("el-tabs",{directives:[{name:"loading",rawName:"v-loading",value:s.listLoading,expression:"listLoading"}],attrs:{type:"card"},on:{"tab-click":s.handleClick},model:{value:s.nowCheckType,callback:function(n){s.nowCheckType=n},expression:"nowCheckType"}},[o("el-empty",{directives:[{name:"show",rawName:"v-show",value:!s.showCourseList.length,expression:"!showCourseList.length"}],attrs:{description:"\u6682\u65E0\u8BFE\u7A0B"}}),s._l(s.tabData,function(n){return o("el-tab-pane",{directives:[{name:"show",rawName:"v-show",value:s.tabData.length>0,expression:"tabData.length > 0"}],key:n.name,staticStyle:{overflow:"auto"},attrs:{label:n.label+s.listCounts,name:n.name,lazy:!0}},[o("div",{attrs:{slot:"label"},slot:"label"},[s._v(" "+s._s(n.label)+s._s(s.searchValue?"":`(${n.count})`))]),o("div",{directives:[{name:"infinite-scroll",rawName:"v-infinite-scroll",value:s.loadNewData,expression:"loadNewData"}]},s._l(s.showCourseList,function(i){return o("MyCourseList",{key:i.id,attrs:{courseInfo:i},on:{startStudy:s.startStudy}})}),1)])})],2)],1)},L=[];const b={data(){return{nowCheckType:0,tabData:[{name:0,label:"\u6240\u6709\u8BFE\u7A0B",count:0},{name:1,label:"\u672A\u5F00\u59CB",count:0},{name:2,label:"\u5DF2\u5B66\u4E60",count:0},{name:3,label:"\u5DF2\u5B8C\u6210",count:0}],pageInfo:{page:1,pageSize:10,total:0},showCourseList:[],listCounts:[],listLoading:!1,searchValue:""}},components:{MyCourseList:I,SearchInput:v},activated(){this.getMyCourseList()},methods:{handleClick(s,a){this.pageInfo.page=1,this.pageInfo.total=0,this.showCourseList=[],this.getMyCourseList()},async getMyCourseList(s){this.listLoading=!0;let a;if(+this.nowCheckType){const{data:o}=await p({page:this.pageInfo.page,pageSize:this.pageInfo.pageSize,type:this.nowCheckType});a=o}else{const{data:o}=await f({page:this.pageInfo.page,pageSize:this.pageInfo.pageSize,search:s}),n=["all","no","start","over"];this.searchValue||n.forEach((i,e)=>{this.tabData[e].count=o.count[i]}),o.data.forEach((i,e)=>{const r=i.record,t=i;o.data[e]=r,o.data[e].courseInfo=t}),a=o}this.pageInfo.total=a.total,this.showCourseList.push(...a.data),this.listLoading=!1},startStudy(s){this.$router.push("/online-course/my-course/course-study/"+s.id)},loadNewData(s){this.pageInfo.page*this.pageInfo.pageSize>this.pageInfo.total||this.showCourseList.length<=0||(this.pageInfo.page++,this.getMyCourseList())},searchCourse(){this.searchValue.trim()?(this.pageInfo.page=1,this.pageInfo.total=0,this.showCourseList=[],this.getMyCourseList(this.searchValue),this.tabData=[{name:0,label:"\u6240\u6709\u8BFE\u7A0B",count:0}]):(this.tabData=[{name:0,label:"\u6240\u6709\u8BFE\u7A0B",count:0},{name:1,label:"\u672A\u5F00\u59CB",count:0},{name:2,label:"\u5DF2\u5B66\u4E60",count:0},{name:3,label:"\u5DF2\u5B8C\u6210",count:0}],this.pageInfo.page=1,this.pageInfo.total=0,this.showCourseList=[],this.getMyCourseList())}},watch:{},mixins:[h("ONLINE_COURSE")]},u={};var $=l(b,w,L,!1,M,"3482dd39",null,null);function M(s){for(let a in u)this[a]=u[a]}const z=function(){return $.exports}();export{z as default};