<!doctype html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <base th:href="${#request.getContextPath() + '/'}">
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
    <link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
    <link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
</head>
<body>
    <form class="layui-form layui-form-pane" lay-filter="dateForm">
        <div class="layui-form-item" style="text-align: center;width:100% !important;font-size: 17px">
            <b>附加配置</b>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">日期类型<span style="color: red">*</span></label>
            <div class="layui-input-block">
                <select id="dateType" name="dateType">
                    <option value="">请选择日期类型</option>
                    <option value="year">年选择器</option>
                    <option value="month">年月选择器</option>
                    <option value="date">日期选择器</option>
                    <option value="time">时间选择器</option>
                    <option value="datetime">日期时间选择器</option>
                </select>
            </div>
        </div>


        <div class="layui-form-item" pane>
            <label class="layui-form-label">范围选择<span style="color: red">*</span></label>
            <div class="layui-input-block">
                <input type="checkbox" id="range" name="range" lay-filter="range" lay-skin="switch" lay-text="开启|关闭">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">日期格式<span style="color: red">*</span></label>
            <div class="layui-input-block">
                <input type="text" id="format" name="format" class="layui-input" value="yyyy-MM-dd HH:mm:ss" placeholder="请输入日期格式"  maxlength="500">
            </div>
        </div>

    </form>
<script src="assets/js/vendor/wangEditor/wangEditor.min.js"></script>
<script src="assets/js/vendor/ckplayer/ckplayer/ckplayer.js"></script>
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script>
    layui.config({
        base: 'assets/layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'form', 'laydate', 'laytpl', 'table'], function(){
        var $ = layui.$;
        var form = layui.form;
        var $win = $(window);
        var laytpl = layui.laytpl;
        var table = layui.table;
        var laydate = layui.laydate;
        var id = top.restAjax.params(window.location.href).id;


        form.on('switch(range)', function(obj){
            var value = obj.elem.checked
            console.log(value)
        });




        //alert(window.parent.aa)



        $('.attr').change(function () {
            window.parent.setData("2",$(this).attr('name'),this.value);
        })


        // 初始化内容
        function initData() {




        }
        initData();


        // 校验
        form.verify({





        });
    });
</script>
</body>
</html>