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.

136 lines
3.9 KiB

4 years ago
<!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 class="nav-link"><h3>在线习题测试系统</h3></a>-->
<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 active">
<a class="nav-link" data-toggle="pill" href="#menu2">成绩查询</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>
<tr>
<td>邮箱地址</td>
<td>{{ teacher.email }}</td>
</tr>
</tbody>
</table>
</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>
</div>
</body>
</html>