123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>添加管理员</title>
- <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="../../static/css/font.css">
- <link rel="stylesheet" href="../../static/css/weadmin.css">
- <link rel="stylesheet" href="../../static/css/style.css">
- <link rel="stylesheet" href="../../static/css/zTreeStyle.css">
- <!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
- <!--[if lt IE 9]>
- <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
- <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
- <![endif]-->
- <style>
- .layui-input-inline input, .layui-input-inline textarea{
- width: 300px;
- }
- html{
- overflow-y: auto;
- }
- </style>
- </head>
- <body>
- <div class="weadmin-body">
- <ul id="treeDemo" class="ztree"></ul>
- </div>
- <script src="../../lib/layui/layui.js" charset="utf-8"></script>
- <script src="../../static/js/jquery1.7.2.js"></script>
- <script src="../../static/js/ztree/jquery.ztree.core.js"></script>
- <script src="../../static/js/ztree/jquery.ztree.excheck.js"></script>
- <script type="text/javascript">
- layui.extend({
- admin: '{/}../../static/js/admin'
- });
- layui.use(['form','layer','admin','jquery'], function(){
- var form = layui.form,
- admin = layui.admin,
- layer = layui.layer,
- $=layui.jquery;
- form.render();
- var setting = {
- check: {
- enable: true,
- chkStyle: "radio",
- radioType: "level"
- },
- data: {
- simpleData: {
- enable: true
- }
- }
- };
- var zNodes =[
- { id:1, pId:0, name:"can check 1", open:true},
- { id:11, pId:1, name:"can check 1-1", open:true},
- { id:111, pId:11, name:"can check 1-1-1"},
- { id:112, pId:11, name:"can check 1-1-2"},
- { id:12, pId:1, name:"can check 1-2", open:true},
- { id:121, pId:12, name:"can check 1-2-1"},
- { id:122, pId:12, name:"can check 1-2-2"},
- { id:2, pId:0, name:"can check 2", checked:true, open:true},
- { id:21, pId:2, name:"can check 2-1"},
- { id:22, pId:2, name:"can check 2-2", open:true},
- { id:221, pId:22, name:"can check 2-2-1", checked:true},
- { id:222, pId:22, name:"can check 2-2-2"},
- { id:23, pId:2, name:"can check 2-3"}
- ];
- $.fn.zTree.init($("#treeDemo"), setting, zNodes);
- });
- </script>
- </body>
- </html>
|