<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>查看</title>
    <link rel="stylesheet" th:href="@{/lib/layui/css/layui.css}" media="all">
    <link rel="stylesheet" th:href="@{/css/public.css}" media="all">
    <link rel="stylesheet" th:href="@{/lib/font-awesome-4.7.0/css/font-awesome.min.css}" media="all">
    <style>
        body {
            background-color: #ffffff;
        }
    </style>
</head>
<body>
<div class="layui-form layuimini-form" style="margin-left: -15px; margin-right: 20px">

    <div class="layui-form-item" id="parent_div">
        <label class="layui-form-label">上级部门</label>
        <div class="layui-input-block">
            <input type="text" id="parentName" name="parentName" class="layui-input" th:value="${deptInfo.parentName}"
                   readonly>
            <input type="hidden" id="deptId" name="deptId" th:value="${deptInfo.deptId}">
            <input type="hidden" id="parentId" name="parentId" th:value="${deptInfo.parentId}">
            <input type="hidden" id="ancestors" name="ancestors" th:value="${deptInfo.ancestors}">
        </div>
    </div>

    <div class="layui-form-item" id="deptName_div">
        <label class="layui-form-label">部门名称</label>
        <div class="layui-input-block">
            <input type="text" name="deptName" id="deptName" class="layui-input" th:value="${deptInfo.deptName}"
                   readonly>
        </div>
    </div>

    <div class="layui-form-item" id="leader_div">
        <label class="layui-form-label">负责人</label>
        <div class="layui-input-block">
            <input type="text" name="leader" id="leader" class="layui-input" th:value="${deptInfo.leader}" readonly>
        </div>
    </div>

    <div class="layui-form-item" id="phone_div">
        <label class="layui-form-label">联系电话</label>
        <div class="layui-input-block">
            <input type="text" name="phone" id="phone" class="layui-input" th:value="${deptInfo.phone}" readonly>
        </div>
    </div>

    <div class="layui-form-item" id="email_div">
        <label class="layui-form-label">邮箱</label>
        <div class="layui-input-block">
            <input type="text" name="email" id="email" class="layui-input" th:value="${deptInfo.email}" readonly>
        </div>
    </div>

    <div class="layui-form-item" id="orderNum_div">
        <label class="layui-form-label">排序</label>
        <div class="layui-input-block">
            <input type="number" min="0" name="orderNum" id="orderNum" class="layui-input"
                   th:value="${deptInfo.orderNum}" readonly>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">岗位状态</label>
        <div class="layui-input-block">
            <input type="radio" name="status" th:each="item, itemStat: ${dictList}" th:value="${item.code}"
                   th:title="${item.name}" th:checked="${deptInfo.status eq item.code}" disabled>
        </div>
    </div>

    <!-- 右侧悬浮按钮 -->
    <div class="right-bottom-btn">
        <button class="layui-btn" lay-filter="cancleBtn">
            <i class="layui-icon layui-icon-close"></i>关闭
        </button>
    </div>
</div>

<script th:src="@{/lib/jquery-3.4.1/jquery-3.4.1.min.js}" charset="utf-8"></script>
<script th:src="@{/lib/layui/layui.js}" charset="utf-8"></script>
<script th:src="@{/lib/coco-message/coco-message.js}" charset="utf-8"></script>
<script th:src="@{/lib/xm-select-v1.2.2/xm-select.js}" charset="utf-8"></script>
<script th:src="@{/js/lay-config.js}" charset="utf-8"></script>

<script type="text/javascript" th:inline="javascript">
    AjaxUtil.ctx = /*[[@{/}]]*/'';
    layui.use(['form', 'layCascader'], function () {
        // 监听取消按钮
        $("button[lay-filter='cancleBtn']").click(function () {
            var iframeIndex = parent.layer.getFrameIndex(window.name);
            parent.layer.close(iframeIndex);
        });
    });
</script>
</body>
</html>