You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
200 lines
5.8 KiB
200 lines
5.8 KiB
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<link href="../static/bootstrap-4.3.1-dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<script src="../static/jquery-3.3.1.min.js"></script>
|
|
<script src="../static/bootstrap-4.3.1-dist/js/bootstrap.min.js"></script>
|
|
<script src="../static/js/echarts.min.js"></script>
|
|
<title>教师页面</title>
|
|
</head>
|
|
<body>
|
|
<nav class="navbar navbar-expand-sm bg-light navbar-light ">
|
|
<ul class="navbar-nav">
|
|
<li class="nav-item active">
|
|
<a href="/toIndex/"><button class="btn btn-primary">首页</button></a>
|
|
</li>
|
|
<li style="position: fixed;right: 100px; font-size: 20px;color: #000000">{{ teacher.name }}</li>
|
|
<a href="/logout/"><li style="position: fixed;right: 20px; font-size: 20px;top:10px;color:#cc1313"><button data-target="#myModal" data-toggle="modal" class="btn btn-primary">退出</button></li></a>
|
|
</ul>
|
|
</nav>
|
|
|
|
<div class="container">
|
|
|
|
<br>
|
|
<ul class="nav nav-pills" role="tablist">
|
|
<li class="nav-item">
|
|
<a class="nav-link active" data-toggle="pill" href="#home">个人信息</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" data-toggle="pill" href="#menu1">成绩统计</a>
|
|
</li>
|
|
<li class="nav-item active">
|
|
<a class="nav-link" data-toggle="pill" href="#menu2">成绩查询</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="/admin/student/paper/add/">组卷</a>
|
|
</li>
|
|
</ul>
|
|
|
|
<div class="tab-content">
|
|
<div id="home" class="container tab-pane active"><br>
|
|
<h3>个人信息</h3>
|
|
<p></p>
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>属性</th>
|
|
<th>信息</th>
|
|
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>教工号</td>
|
|
<td>{{ teacher.id }}</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<td>姓名</td>
|
|
<td>{{ teacher.name }}</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<td>性别</td>
|
|
<td>{{ teacher.sex }}</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<td>学院</td>
|
|
<td>{{ teacher.dept }}</td>
|
|
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div id="menu1" class="container tab-pane fade"><br>
|
|
<h3>成绩统计</h3>
|
|
<p></p>
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>姓名</th>
|
|
<th>考试科目</th>
|
|
<th>考试时间</th>
|
|
<th>操作</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
{% for paper1 in paper %}
|
|
<tr class="table-info">
|
|
<td>{{ teacher.name }}</td>
|
|
<td>{{ paper1.subject }}</td>
|
|
<td>{{ paper1.examtime }}</td>
|
|
<td><a href="/showGrade/?subject={{ paper1.subject }}">
|
|
<button type="button" class="btn btn-primary"
|
|
data-toggle="collapse" data-target="#demo">查看学生成绩</button></a>
|
|
</td>
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<div id="main" style="width: 800px;height:500px;"></div>
|
|
|
|
<script type="text/javascript">
|
|
var myChart = echarts.init(document.getElementById('main'));
|
|
var option = {
|
|
legend: {},
|
|
tooltip: {},
|
|
dataset: {
|
|
// 提供一份数据。
|
|
source: [
|
|
['product', 'python', 'java'],
|
|
['<60', {{ data_1.data1 }}, {{ data_2.data6 }}],
|
|
['60<=成绩<70', {{ data_1.data2 }}, {{ data_2.data7 }}],
|
|
['70<=成绩<80', {{ data_1.data3 }}, {{ data_2.data8 }}],
|
|
['80<=成绩<90', {{ data_1.data4 }}, {{ data_2.data9 }}],
|
|
['90<=成绩', {{ data_1.data5 }}, {{ data_2.data10 }}]
|
|
|
|
]
|
|
},
|
|
xAxis: {type: 'category'},
|
|
yAxis: {},
|
|
series: [
|
|
{type: 'bar'},
|
|
{type: 'bar'}
|
|
]
|
|
};
|
|
myChart.setOption(option);
|
|
</script>
|
|
</div>
|
|
|
|
<div id="menu2" class="container tab-pane fade"><br>
|
|
<h3>考试成绩</h3>
|
|
<div class="container">
|
|
<form action="/queryStudent/" method="get">
|
|
<input type="hidden" name="tid" value="{{ teacher.id }}">
|
|
<div class="row">
|
|
<div class="col-sm-2">
|
|
<div class="form-group">
|
|
<label>学号</label>
|
|
<input type="text" name="id" class="form-control" placeholder="输入学号">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-sm-2 offset-1">
|
|
<label for="">科目</label>
|
|
<input type="text" name="subject" placeholder="输入科目名称">
|
|
</div>
|
|
|
|
<div class="col-sm-2 offset-2">
|
|
<button class="btn btn-success" type="submit">查询</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="container">
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>学号</th>
|
|
<th>姓名</th>
|
|
<th>专业</th>
|
|
<th>科目</th>
|
|
<th>成绩</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
{% for result1 in result %}
|
|
<tr>
|
|
<td>{{ result1.id }}</td>
|
|
<td>{{ result1.name }}</td>
|
|
<td>{{ result1.major }}</td>
|
|
<td>{{ result1.subject }}</td>
|
|
<td>{{ result1.grade }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="menu3" class="container tab-pane fade"><br>
|
|
<h3>题库</h3>
|
|
<p>题库</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |