subjectUserDetailList.html
2.31 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
<style type="text/css">
.table-bordered {
border: 1px solid; }
.table-bordered > thead > tr > th,
.table-bordered > thead > tr > td,
.table-bordered > tbody > tr > th,
.table-bordered > tbody > tr > td,
.table-bordered > tfoot > tr > th,
.table-bordered > tfoot > tr > td {
border: 1px solid; }
.table-bordered > thead > tr > th,
.table-bordered > thead > tr > td {
border-bottom-width: 2px; }
.table > tbody + tbody {
border-top: 1px solid; }
</style>
<div class="row" id="subjectUserDetailList">
<div class="col-md-12">
<div class="portlet light porttlet-fit bordered">
<div class="portlet-body">
<div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 600px">
<table class="table table-bordered table-hover table-checkable" id="forms_2">
<thead>
<tr>
<td style="min-width: 40px">题号</td>
<td style="min-width: 100px">日期</td>
<td style="min-width: 150px">题目</td>
<td style="min-width: 150px">操作</td>
<td style="min-width: 150px">结果</td>
<td style="min-width: 50px">成绩</td>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<script>
$(function(){
// 关闭左侧栏
if (!$('body').hasClass('page-sidebar-closed'))
$('.menu-toggler.sidebar-toggler').click();
var userId="";
var rq="";
$("#subjectUserDetailList").on('init', function (e, id) {
console.log(id);
userId=id.split(",")[0];
rq = id.split(",")[1];
$("#remark").html(id.split(",")[2] + "<br/>" + id.split(",")[3]);
var i = layer.load(2);
$get('/subjectUser/subjectUserDetail',{userId:userId,rq:rq,status:"detail",type:'query'},function(result){
layer.close(i);
var subjectUserDetailList_2 = template('subjectUserDetailList_2',{list:result});
$('#forms_2 tbody').html(subjectUserDetailList_2);
});
})
});
</script>
<script type="text/html" id="subjectUserDetailList_2">
{{each list as obj i}}
<tr >
<td>{{obj.subjectId}}</td>
<td>{{obj.rq}}</td>
<td>{{obj.subjectText}}</td>
<td>{{obj.operateTest}}</td>
<td>{{obj.operateTest}}</td>
<td>{{obj.result}}</td>
</tr>
{{/each}}
{{if list.length == 0}}
<tr>
<td colspan="10"><h6 class="muted">没有找到相关数据</h6></td>
</tr>
{{/if}}
</script>