david-PC\david
2018-06-12 f240ac3ccd37c541cab2c21cfc433d3510999a3c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<!DOCTYPE >
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>fileio配置</title>
 
<link rel="stylesheet" href="../../css/tree.css" />
<link rel="stylesheet" href="../../css/card.css" />
 
<script type="text/javascript" src="../../js/jquery-1.7.2.min.js" ></script>
<script type="text/javascript" src="../../js/extend.js" ></script>
<script type="text/javascript" src="../../js/core.js" ></script>
<script type="text/javascript" src="../../js/tree.js" ></script>
<script type="text/javascript" src="../../js/card.js" ></script>
 
<script type="text/javascript">
    var tree, grid;    
    var treeData = [
        {id:3, parentid:3, position:"categrorycode", name:"category3"},
        {id:2, parentid:2, position:"categrorycode", name:"category2"},
        {id:1, parentid:1, position:"categrorycode", name:"category1"},
        {id:31, parentid:3, position:"code", name:"code3"},
        {id:11, parentid:1, position:"code", name:"code1"},
        {id:12, parentid:1, position:"code", name:"code12"},
        {id:21, parentid:2, position:"code", name:"code2"},
        {id:111, parentid:11, position:"id", name:"A1"},
        {id:112, parentid:11, position:"id", name:"A2"},
    ];
    
    $(document).ready(function() {
        tree = new Tree({
            element: "tree",
            data: treeData,
            autoExpended: true,
            renderNodeText: function(element, record) {
                element.html(record.position + "--" + record.name);
            },
            onNodeSelect: function(node) {
                
            }
        });
        
        card = new Card({
            element: "card",
            columns: [
                {field: "name", caption: "姓名", type: "text", datatype: "*"},
                {field: "email", caption: "邮箱", type: "e"},
                {field: "phone", caption: "移动电话", type: "text"},
                {field: "password", caption: "密码", type: "text", datatype: "*"},
                {field: "department",caption: "部门:",datas: departmentdatas,type: "select"},
                {field: "position",caption: "角色:",getdata: "getposition",type: "select"},
                {field: "reporterdept",caption: "直报部门:",type: "select", datas: positiondatas},
                {field: "reporterid",caption: "直报:",type: "select",getdata:"getreporter"},
                {field: "active", caption: "冻结/激活",datas: activedatas,type: "select"}
            ]
        }); 
    });
</script>
 
</head>
 
<body>
    <div style="position:absolute; top: 10px; left: 2%; bottom: 10px; border: 0px solid #ddd; width: 25%;">
        <div  id="tree" style="border: 1px solid #ddd; width: 100%; height: 80%"></div>
    </div>
    
    <div style="position:absolute; top: 10px; left: 29%; right:4%; bottom: 10px;">
        <div style="position:absolute; border: 1px solid #ddd; width: 100%; height: 10%">
            <div id="current_data" style="float: left; height: 45%; font-size: 20px; margin-top: 15px">
                code
            </div>
        </div>
        
        <div style="position:absolute; width: 100%; height: 90%; top: 10%; border: 1px solid #ddd;">
            <div id="card" style="text-align: left;"></div>
        </div>
    </div>
    <div style="position: absolute; left: 40%; bottom: 30%; height: 30px; line-height: 30px; margin-top: 15px;" align="center" >
    </div>    
</body>
</html>