-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
189 lines (175 loc) · 6.99 KB
/
index.html
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="dist/bootstrap/css/bootstrap.css" />
<title>报名系统</title>
</head>
<body>
<div class="container" id="app">
<!--导航-->
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a href="index.html" class="navbar-brand">报名系统</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="#">用户:<span>{{name}}</span></a></li>
<li><a href="#">角色:<span>{{role}}</span></a></li>
</ul>
</div>
</div>
</nav>
<!--导航结束-->
<!--主体-->
<div class="row" v-if="role=='管理员'">
<!--左侧菜单-->
<div class="col-sm-3" id="left">
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="thManager">
<h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#accordion" href="#teacher" aria-expanded="true" aria-controls="collapseOne">
教师管理
</a>
</h4>
</div>
<div id="teacher" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="thManager">
<div class="panel-body">
<ul class="nav">
<li><a href="javascript:void(0)" class="btn" :class="{'btn-info':tree.add}" @click="setTree('add')">教师添加</a></li>
<li><a href="javascript:void(0)" class="btn" :class="{'btn-info':tree.list}" @click="setTree('list')">教师查询</a></li>
</ul>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="courseManage">
<h4 class="panel-title">
<a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#course" aria-expanded="false" aria-controls="collapseTwo">
课程管理
</a>
</h4>
</div>
<div id="course" class="panel-collapse collapse" role="tabpanel" aria-labelledby="courseManage">
<div class="panel-body">
<ul class="nav">
<li><a href="#">学段管理</a></li>
<li><a href="#">学科管理</a></li>
</ul>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="resultManage">
<h4 class="panel-title">
<a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#result" aria-expanded="false" aria-controls="collapseThree">
报名管理
</a>
</h4>
</div>
<div id="result" class="panel-collapse collapse" role="tabpanel" aria-labelledby="resultManage">
<div class="panel-body">
<ul class="nav">
<li><a href="#">报名查询</a></li>
</ul>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="settingManage">
<h4 class="panel-title">
<a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#setting" aria-expanded="false" aria-controls="collapseThree">
系统设置
</a>
</h4>
</div>
<div id="setting" class="panel-collapse collapse" role="tabpanel" aria-labelledby="settingManage">
<div class="panel-body">
<ul class="nav">
<li><a href="#">个人信息</a></li>
<li><a href="#">退出系统</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<!--左侧菜单结束-->
<!--右侧内容-->
<div class="col-sm-9">
<admin-teacher-add v-show="tree.add" :teacher-columns='columns' :item='item' :mode="mode"></admin-teacher-add>
<admin-teacher-list v-show="tree.list" :t-list-columns="columns" :teachers="teacherData"></admin-teacher-list>
</div>
<!--右侧内容结束-->
</div>
<!--主体结束-->
</div>
<!--教师添加-->
<template class="col-sm-12" id="teacherAdd">
<div class="col-sm-8">
<div class="panel panel-primary">
<div class="panel-heading"><h3>教师添加</h3></div>
<div class="panel-body">
<form class="form-horizontal" id="addForm">
<div class="form-group" v-for="col in teacherColumns" v-if="col.name != 'id'">
<div class="col-sm-3 text-right">
<label class="control-label">{{col.colName}}</label>
</div>
<div class="col-sm-9">
<select v-if="col.dataSource" :name="col.name" class="form-control" v-model="item[col.name]" :disabled="mode==2 && col.isKey">
<option v-for="opt in col.dataSource" :value="opt">{{opt}}</option>
</select>
<input v-else type="text" class="form-control" :name="col.name" v-model="item[col.name]" :disabled="mode==2 && col.isKey"/>
</div>
</div>
</form>
</div>
<div class="panel-footer">
<button type="button" class="btn btn-default" @click="saveTeacher">保存</button>
<button type="button" class="btn btn-default" @click='clearForm'>重置</button>
</div>
</div>
</div>
</template>
<!--教师添加结束-->
<!--教师查询-->
<template id="teacherList">
<div class="table-responsive">
<h3>教师查询</h3>
<div class="form-group">
<label for="search">Search</label>
<input type="text" v-model="searchKey"/><br />
<button type="button" class="btn btn-sm btn-info" @click="openTeacherAdd(1)">添加</button>
</div>
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th v-for="col in tListColumns">{{col.colName}}</th>
<th>删除</th>
</tr>
</thead>
<tbody>
<tr v-for="(index,teacher) in teachers | filterBy searchKey">
<td v-for="col in tListColumns">
<span v-if="col.isKey"><a href="javascript:void(0)" @click="openTeacherAdd(2,index)">{{teacher[col.name]}}</a></span>
<span v-else>{{teacher[col.name]}}</span>
</td>
<td class="text-center">
<button type="button" class="btn btn-sm btn-danger" @click="deleteTeacher(index)">删除</button>
</td>
</tr>
</tbody>
</table>
</div>
</template>
<!--教师查询结束-->
</body>
<script src="dist/jquery.js"></script>
<script src="dist/bootstrap/js/bootstrap.js"></script>
<script src="dist/vue/vue.js"></script>
<script src="dist/vue/vue-resource.js"></script>
<script src="lib/js/common.js"></script>
<script src="lib/js/content.js"></script>
</html>