index.html
2.96 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
91
92
93
94
95
96
97
98
99
100
101
<!DOCTYPE html>
<html>
<head>
<title>调度系统营运数据接口</title>
<meta charset="utf-8">
<meta http-equiv="Expires" content="0">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-control" content="no-cache">
<meta http-equiv="Cache" content="no-cache">
<link rel="stylesheet" href="http://apps.bdimg.com/libs/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="/simple_switch/simple.switch.three.css">
<style>
.table-wrap {
height: 500px;
overflow: auto;
}
#line2SysListTable .Switch_FlatRadius .SwitchLine:before {
content: "老系统";
}
#line2SysListTable .Switch_FlatRadius .SwitchLine:after {
content: "新系统";
}
#line2SysListTable .Switch_FlatRadius {
width: 118px;
}
#line2SysListTable .Switch_FlatRadius .SwitchButton {
width: 52px;
}
#line2SysListTable .Switch_FlatRadius .SwitchButton:before {
left: 18px;
}
#line2SysListTable .Switch_FlatRadius .SwitchButton:after {
left: 30px;
}
#line2SysListTable .Switch_FlatRadius.On .SwitchButton {
left: 60px;
}
</style>
</head>
<body>
<script id="line2sys-table-list-temp" type="text/html">
{{each list as obj i}}
<tr data-id="{{obj.lineCode}}" data-name="{{obj.lineName}}" {{if obj.new}}class="warning" {{/if}} >
<td>{{obj.lineCode}}</td>
<td>{{obj.lineName}}</td>
<td>
<input type="checkbox" {{if obj.new}}checked{{/if}} />
</td>
</tr>
{{/each}}
</script>
<script src="http://apps.bdimg.com/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="http://apps.bdimg.com/libs/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<script src="/assets/js/template.js"></script>
<script src="/simple_switch/simple.switch.min.js"></script>
<script>
//线路清单
!function () {
var f = arguments.callee;
/* $.get('/line2System/all', function (list) {
list.sort(function (a, b) {
return b.new - a.new;
});
var htmlStr = template('line2sys-table-list-temp', {list: list});
$('#line2SysListTable tbody').html(htmlStr);
$('input[type=checkbox]').simpleSwitch({
"theme": "FlatRadius"
});
$('input[type=checkbox]').on('change', function () {
var $tr = $(this).parents('tr');
var data = {
lineCode: $tr.data('id'),
lineName: $tr.data('name'),
new: this.checked
}
$.post('/line2System/update', data, function (rs) {
var $tr = $('#line2SysListTable tr[data-id=' + rs.lineCode + ']');
$tr.attr('class', rs.new ? 'warning' : '');
});
});
});*/
}();
</script>
</body>
</html>