<!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">
    <style>
        html, body {height: 100%;}
        .layui-form-select dl {max-height: 150px !important; z-index: 10010 !important;}
    </style>
</head>
<body>
<div class="layui-fluid layui-anim layui-anim-fadein" style="padding: 0;overflow: hidden; height: 100%;">
    <div class="layui-card">
        <div class="layui-card-body" style="padding: 15px;">
            <form class="layui-form layui-form-pane" lay-filter="dataForm">
                <div class="layui-row">
                    <div class="layui-col-md6 layui-col-sm6 layui-col-xs12">
                        <div class="layui-form-item">
                            <button id="newDepartmentBtn" type="button" class="layui-btn layui-btn-fluid">新建组织</button>
                        </div>
                    </div>
                    <div class="layui-col-md6 layui-col-sm6 layui-col-xs12">
                        <div class="layui-form-item">
                            <button id="selectDepartmentBtn" type="button" class="layui-btn layui-btn-normal layui-btn-fluid">选择组织</button>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script>
    layui.config({
        base: 'assets/layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'form', 'laydate'], function(){
        var $ = layui.$;
        function closeBox() {
            parent.layer.close(parent.layer.getFrameIndex(window.name));
        }
        top.dialog.dialogData.mergeType = null;

        $(document).on('click', '#newDepartmentBtn', function() {
            top.dialog.dialogData.mergeType = 'newDepartment';
            closeBox();
        });
        $(document).on('click', '#selectDepartmentBtn', function() {
            top.dialog.dialogData.mergeType = 'selectDepartment';
            closeBox();
        })
    });
</script>
</body>
</html>