import{Q as r}from"./QueryInput.7afa399e.js";import{T as o}from"./TableLayout.05a39499.js";import{g as l,s as c}from"./live-student.e6ad7a61.js";import{d as u}from"./data-report.0c7c73f2.js";import{n as h}from"./vueComponentNormalizer.9ef17bb1.js";/* empty css *//* empty css */import"./index.f5168bf8.js";import"./index.2adbb9ac.js";var v=function(){var e=this,s=e.$createElement,a=e._self._c||s;return a("div",{staticClass:"v-page live-lectures"},[a("h2",{staticClass:"v-title"},[e._v("\u76F4\u64AD\u5217\u8868")]),a("div",{staticClass:"live-lectures-header"},[a("searchInput",{on:{query:e.getSearchList},model:{value:e.searchValue,callback:function(t){e.searchValue=t},expression:"searchValue"}}),a("div",{staticClass:"header-manage"})],1),a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],staticClass:"live-lectures-content"},[a("TableLayout",{attrs:{data:e.liveList,column:e.column,pageInfo:e.pageInfo,selection:""},on:{"current-change":e.pageChange,"size-change":e.pageSizeChange,"selection-change":e.selectionChange},scopedSlots:e._u([{key:"lecturer",fn:function(t){var i;return[e._v(" "+e._s((i=t.row.lecturerInfo)===null||i===void 0?void 0:i.name)+" ")]}},{key:"status",fn:function(t){return[t.row.status==0?a("el-tag",{attrs:{type:"info"}},[e._v("\u672A\u5F00\u59CB")]):e._e(),t.row.status==1?a("el-tag",[e._v("\u76F4\u64AD\u4E2D")]):e._e(),t.row.status==2?a("el-tag",{attrs:{type:"success"}},[e._v("\u5DF2\u5B8C\u6210")]):e._e()]}},{key:"startTime",fn:function(t){return[e._v(" "+e._s(new Date(t.row.startTime).format("yyyy-MM-dd"))+" ")]}},{key:"createTime",fn:function(t){return[e._v(" "+e._s(new Date(t.row.createTime).format("yyyy-MM-dd"))+" ")]}},{key:"action",fn:function(t){return[t.row.status==1?a("el-button",{staticStyle:{color:"#e6a23c"},attrs:{type:"text"},on:{click:function(i){return e.toLiveWatch(t.row)}}},[a("i",{staticClass:"el-icon-video-play"}),e._v(" \u7EE7\u7EED\u89C2\u770B")]):e._e(),t.row.status==0?a("el-button",{staticStyle:{color:"#02c761"},attrs:{type:"text"},on:{click:function(i){return e.toLiveWatch(t.row)}}},[a("i",{staticClass:"el-icon-video-camera"}),e._v(" \u8FDB\u5165\u76F4\u64AD")]):e._e()]}}])})],1)])},p=[];const d={components:{searchInput:r,TableLayout:o},data(){return{column:[{prop:"title",label:"\u76F4\u64AD\u540D\u79F0",align:"center","show-overflow-tooltip":!0,"min-width":"150px"},{prop:"status",label:"\u72B6\u6001",align:"center",width:100},{prop:"startTime",label:"\u5F00\u59CB\u65F6\u95F4",align:"center"},{prop:"duration",label:"\u9884\u8BA1\u65F6\u957F",align:"center"},{prop:"userName",label:"\u8BB2\u5E08",align:"center",width:150},{prop:"createTime",label:"\u521B\u5EFA\u65F6\u95F4",align:"center"},{prop:"action",label:"\u64CD\u4F5C",align:"center"}],listLoading:!1,liveList:[],nowSeletedLive:[],searchValue:"",pageInfo:{page:1,pageSize:10,total:0}}},methods:{async getLiveList(){this.listLoading=!0;const{data:e}=await l(this.pageInfo);this.pageInfo.total=e.total,this.liveList=e.data,this.listLoading=!1},checkIsLecturer(e){return e===this.$store.user.id},async getSearchList(){this.listLoading=!0,this.searchValue.trim().length<=0&&this.getLiveList(),this.page=1;const{data:e}=await c({...this.pageInfo,value:this.searchValue});this.liveList=e.data,this.pageInfo.total=e.total,this.listLoading=!1},pageChange(e){this.pageInfo.page=e,this.getLiveList()},pageSizeChange(e){this.pageInfo.pageSize=e,this.getLiveList()},selectionChange(e){this.nowSeletedLive=e},addLive(){this.$router.push({path:"/online-course/live-lectures/live-editor",query:{id:0}})},editorLive(e){this.$router.push({path:"/online-course/live-lectures/live-editor",query:{id:e.id}})},toLiveWatch(e){this.$router.push({path:"/online-course/live-in-class/live-watch",query:{id:e.id}})}},async created(){this.getLiveList()},mixins:[u("LIVE_TEACHING")]},n={};var g=h(d,v,p,!1,_,"9654b6a4",null,null);function _(e){for(let s in n)this[s]=n[s]}const S=function(){return g.exports}();export{S as default};