-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.html
More file actions
90 lines (84 loc) · 1.81 KB
/
Copy pathindex.html
File metadata and controls
90 lines (84 loc) · 1.81 KB
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
82
83
84
85
86
87
88
89
90
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>orgTree</title>
</head>
<link rel="stylesheet" href="common/reset.css">
<style type="text/css">
.form-control__dept {
margin: 100px;
}
.form-control__label {
float: left;
line-height: 38px;
}
.form-control__input {
margin-left: 100px;
}
.titile {
margin: 50px 100px;
}
.titile h4{
position: absolute;
margin-top: 15px;
}
.titile h4:after {
content: '';
position: absolute;
bottom: -15px;
left: 0;
right: -10px;
height: 2px;
background-color: #ccc;
}
#checkBtn {
margin: 50px 100px 0;
padding: 5px 15px;
background-color: #E4E6E9;
color: #666;
width: 200px;
height: 30px;
line-height: 30px;
text-align: center;
cursor: pointer;
}
#checkBtn:hover {
color: #fff;
background-color: #000;
}
</style>
<body>
<div class="titile">
<h1>orgTree</h1>
<h4>一款基于树结构的选择器</h4>
</div>
<div class="form-control form-control__dept">
<div class="form-control__label"><label class="form-label">授权部门</label></div>
<div class="form-control__input">
<div class="js_party_select_result">
<div class="js_party_select_result_list"></div>
<a class="js_show_party_selector" href="javascript:;"></a>
<input id="field-dept" class="form-input" type="hidden" name="dept" value="1;111224;" style="display: none;">
</div>
</div>
</div>
<div id="checkBtn">点击查看已选择内容的id</div>
<script src="js/jquery.min.js"></script>
<script src='libs/orgTree.js'></script>
<script>
$(function(){
// 调用
$('.form-control').orgTree({
all: true, //人物组织都开启
area: ['620px','542px'], //弹窗框宽高
search: true //开启搜索
});
//其他
$('#checkBtn').on('click', function(){
alert($('#field-dept').val());
});
});
</script>
</body>
</html>