CreateClassApe.js 2.1 KB
//*
// 创建课堂模块
// */

import Loger from "../Loger";
import Ape from "./Ape";
import xdysdk from "libs/xdysdk";
import DrawTool from "./DrawTool";
import LaserPen from "./LaserPen";
import $ from "jquery";
import ClassDataProxy from "proxy/ClassDataProxy";
import dateUI from 'libs/laydate';

let loger = Loger.getLoger('PC-CreateClassApe');

class CreateClassApe extends Ape {
    constructor() {
        super();
        this.classDateList = {};//课堂的所有数据
        this.addEvent();
        this.init();
    }

    init() {
        //判断列表在右侧时取消边距
        this._judgeListPlace();
        $('#collectYes').hide();

        $('#createClassBtn').on('click',this._createClassBtnHandler.bind(this));
        $('.recordLi').on('click',this._recordLiHandler.bind(this));//课堂分类
        $('.liveInfoLeftLi').on('click',this._liveInfoLeftLiHandler.bind(this));//直播信息

        $('#createClassA').on('click',this._closeClassHandler.bind(this));
        $('.main_closeBtn').on('click',this._closeClassHandler.bind(this));

        //执行一个laydate实例
        dateUI.render({
            elem: '#liveInfoCenterLiveStart' //指定元素
        });
        //执行一个laydate实例
        dateUI.render({
            elem: '#liveInfoCenterLiveEnd' //指定元素
        });
    }

    addEvent() {

    }
    _judgeListPlace(){
        let i=(i%4);
        $('#classifyListContent').find('.classifyList').eq(i==3).addClass('classifyListR');
    }
    _recordLiHandler(evt){
        $(evt.currentTarget).addClass('recordLiTextCheck').siblings().removeClass('recordLiTextCheck');
    }
    _liveInfoLeftLiHandler(evt){
        $(evt.currentTarget).addClass('liveInfoLeftLiCheck').siblings().removeClass('liveInfoLeftLiCheck');
    }
    _createClassBtnHandler(evt){
        $('#createClassBox').show();
        $('#scheduleForm1').show();
        $('#scheduleForm2').hide();
        $('#teacherDetailBox').hide();
        $('#lanclassBox').hide();
    }
    _closeClassHandler(){
        $('#createClassBox').hide();
    }
}
export default CreateClassApe;