• layer的使用笔记


    $('#calendar').fullCalendar({
    lang:"zh-cn",
    buttonText:{
    today: '今天'
    },
    eventLimit: true,
    events:"/device/calibrationPlan/task/load",
    //fullcalendar在dayclick事件中获取当前点击日期中的events数组
        dayClick: function(date, jsEvent, view) {
    var events = $('#calendar').fullCalendar('clientEvents', function(event) {
                var eventStart = event.start.format('YYYY-MM-DD');
                var eventEnd = event.end ? event.end.format('YYYY-MM-DD') : null;
                var theDate = date.format('YYYY-MM-DD');
                // Make sure the event starts on or before date and ends afterward
                // Events that have no end date specified (null) end that day, so check if start = date
                return (eventStart <= theDate && (eventEnd >= theDate) && !(eventStart < theDate && (eventEnd == theDate))) || (eventStart == theDate && (eventEnd === null));
            });
    if(events.length>0){
    layer.open({
    type: 2,
    title: '',
    shadeClose: true,
    shade: 0.8,
    area: ['900px', '600px'],
    content: "/device/views/calibrationPlan/calibrationList.html",
    success:function(layero, index){

    console.log(events)
    var body = layer.getChildFrame('body', 1);
    var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
    body.find("#openTbody").empty();
    for(var i=0;i<events.length;i++){
    body.find("#openTbody").append("<tr>"
    +"<td>"+events[i].data.calibrationName+"</td>"
    +"<td>"+events[i].data.classification+"</td>"
    +"<td>"+events[i].data.useDepartment+"</td>"
    +"<td>"+1+"</td>"
    +"<td>"+events[i].data.calibrationMonth+"</td>"
    +"<td>"+events[i].data.remarks+"</td>"
    +"</tr>");
    }

    }
    });
    }
    },
    });

  • 相关阅读:
    css中的属性
    css初识和css选择器
    前端html的简单认识
    数据库进阶了解
    数据库索引
    pymysql模块
    数据库的多表查询
    数据库中的行操作
    数据库和表操作以及完整性约束
    数据库概述
  • 原文地址:https://www.cnblogs.com/sunjinggege/p/7055399.html
Copyright © 2020-2023  润新知