index.29d48e07.js 3.6 KB

1
  1. import{_ as m,a as c,b as l,c as g,d as p,e as d,f,g as b,h,i as C,j as y,k as I,m as T,n as j,o as v,p as N}from"./title_timers.bb73d550.js";import{_ as F,a as A,b as B}from"./icon_name_active.3e9031ca.js";import{_ as D}from"./icon_tips.75e86958.js";import{d as k,x as n,p as _,i as s,A as t,B as O}from"./index.7994470a.js";import{C as r}from"./index.777f4790.js";import{C as H}from"./index.9cdb5783.js";import{R,C as a}from"./index.80389b79.js";import{i as x}from"./icon_timer2.5fb1750d.js";import{c as Y}from"./index.e6c57a63.js";const E="_course_rysfo_1",G="_courseItem_rysfo_6",M="_courseTimer_rysfo_10",S="_courseNum_rysfo_21",w="_munis_rysfo_32",z="_courseInfo_rysfo_36",J="_courseImg_rysfo_45",V="_courseName_rysfo_57",P="_name_rysfo_60",$="_subject_rysfo_70",q="_courseOperation_rysfo_79";var o={course:E,courseItem:G,courseTimer:M,courseNum:S,munis:w,courseInfo:z,courseImg:J,courseName:V,name:P,subject:$,courseOperation:q};const u=e=>{const i=`../../images/${e}`;return{"../../images/icon_arrow.png":m,"../../images/icon_class_plan.png":c,"../../images/icon_education.png":F,"../../images/icon_education_active.png":A,"../../images/icon_freeze_timer.png":l,"../../images/icon_invite_student.png":g,"../../images/icon_last_timer.png":p,"../../images/icon_message.png":d,"../../images/icon_music_account.png":f,"../../images/icon_name_active.png":B,"../../images/icon_num.png":b,"../../images/icon_timers.png":h,"../../images/icon_tips.png":D,"../../images/logo.png":C,"../../images/paino_bg.png":y,"../../images/room_bg.png":I,"../../images/select_timers.png":T,"../../images/select_timers_bg.png":j,"../../images/share_bg.png":v,"../../images/title_timers.png":N}[i].default};var ts=k({name:"course",props:{item:{type:Object},operation:{type:Boolean,default:!0},onStudentAdjust:{type:Function,default:e=>{}},onTimeAdjust:{type:Function,default:e=>{}},onCourseDelete:{type:Function,default:e=>{}}},computed:{timer(){const e=this.item;return n(e.startTime).format("YYYY/MM/DD HH:mm")+" ~ "+n(e.endTime).format("HH:mm")}},methods:{onJoinChat(e){e.stopPropagation();const i=this.item;_({api:"joinChatGroup",content:{type:"multi",id:i.imGroupId}})},onDetail(){var e;_({api:"openCourseDetail",content:{type:"pianoRoom",courseId:(e=this.item)==null?void 0:e.courseId}})}},render(){const e=this.item;return s(H,{class:o.course,border:!1},{default:()=>[s(r,{center:!0,class:o.courseItem,onClick:this.onDetail},{title:()=>s("div",{class:o.courseTimer},[s("img",{src:x},null),s("span",null,[this.timer])]),value:()=>s("div",{class:o.courseNum},[s("span",null,[e.studentCount,t("\u4EBA")]),s("img",{src:u("icon_num.png"),style:{marginRight:"14px"}},null),this.operation?s("img",{onClick:this.onJoinChat,src:u("icon_message.png")},null):s("span",{class:o.munis},[t("-"),e.consumTime,t("\u5206\u949F")])])}),s(r,null,{default:()=>[s("div",{class:o.courseInfo,onClick:this.onDetail},[s("div",{class:o.courseImg},[t("\u5C0F\u8BFE")]),s("div",{class:o.courseName},[s("p",{class:o.name},[e.groupName]),s("p",null,[s("span",{class:o.subject},[e.subjectName])])]),s(O,{type:e.status!=="NOT_START"?"default":"primary",round:!0,disabled:!0,size:"small"},{default:()=>[Y[e.status]]})]),this.operation&&s(R,{class:o.courseOperation},{default:()=>[s(a,{span:8,class:"van-hairline--right"},{default:()=>[s("span",{onClick:()=>{this.onStudentAdjust(this.item)}},[t("\u5B66\u5458\u8C03\u6574")])]}),s(a,{span:8,class:"van-hairline--right"},{default:()=>[s("span",{onClick:()=>{this.onTimeAdjust(this.item)}},[t("\u65F6\u95F4\u8C03\u6574")])]}),s(a,{span:8},{default:()=>[s("span",{onClick:()=>{this.onCourseDelete(this.item)}},[t("\u5220\u9664\u8BFE\u7A0B")])]})]})]})]})}});export{ts as C};