Commit 50c1482f3d21251754457747cb19150ca833d5cf

Authored by 梁保满
1 parent 7222c2eb

授课端日志下载。学生教师管理添加全部类型

src/api/apis/apis.js
... ... @@ -881,4 +881,8 @@ export default {
881 881 submitScore(data) {
882 882 return defaltService(setUpUrls.submitScore, data)
883 883 },
  884 + // 提交即时测报表分数
  885 + deviceZipLogList(data) {
  886 + return defaltService(setUpUrls.deviceZipLogList, data)
  887 + },
884 888 };
... ...
src/api/urls/apis.js
... ... @@ -442,6 +442,8 @@ export default {
442 442 deletePaperReport: "/api_html/teaching/deletePaperReport",
443 443 //获取即时测报表学生名单和题目列表
444 444 listStudentsAndQuestions: "/api_html/teaching/listStudentsAndQuestions",
  445 + //分页查询授课端日志列表
  446 + deviceZipLogList: "/api_html/school/manager/deviceZipLogList",
445 447  
446 448  
447 449 }
... ...
src/views/basic/ask/list.vue
... ... @@ -123,20 +123,21 @@
123 123 @click="linkToDetail(scoped.row, 1)"
124 124 ></el-button>
125 125 </el-tooltip>
126   - <el-tooltip
  126 + <el-popconfirm
127 127 v-if="role != 'ROLE_BANZHUREN'"
128   - effect="dark"
129   - content="删除"
130   - placement="top"
  128 + title="确定删除吗?"
  129 + @confirm="remove(scoped.row)"
131 130 >
132 131 <el-button
133   - type="primary"
  132 + class="remove-test"
  133 + slot="reference"
  134 + type="danger"
134 135 circle
135 136 size="mini"
136 137 icon="el-icon-delete"
137   - @click="remove(scoped.row)"
  138 + :loading="scoped.row.loading"
138 139 ></el-button>
139   - </el-tooltip>
  140 + </el-popconfirm>
140 141 </template>
141 142 </el-table-column>
142 143 </el-table>
... ... @@ -430,7 +431,9 @@ div::-webkit-scrollbar-thumb {
430 431 .main {
431 432 height: 100%;
432 433 }
433   -
  434 +.remove-test {
  435 + margin-left: 10px;
  436 +}
434 437 .table-box {
435 438 padding: 16px;
436 439 border-radius: 5px;
... ...
src/views/basic/device/index.vue
... ... @@ -7,16 +7,37 @@
7 7 <template slot="btns">
8 8 <template v-if="tableData.length">
9 9 <el-tooltip effect="dark" content="设备导出" placement="bottom">
10   - <el-button type="primary" icon="fa fa-cloud-download" size="mini" plain circle @click="downExl"></el-button>
  10 + <el-button
  11 + type="primary"
  12 + icon="fa fa-cloud-download"
  13 + size="mini"
  14 + plain
  15 + circle
  16 + @click="downExl"
  17 + ></el-button>
11 18 </el-tooltip>
12 19 </template>
13 20 <template v-if="role == 'ROLE_XUEXIAO' && type == 1">
14 21 <el-tooltip effect="dark" content="设备导入" placement="bottom">
15   - <el-button type="primary" icon="el-icon-upload2" size="mini" plain circle @click="diaUp = true"></el-button>
  22 + <el-button
  23 + type="primary"
  24 + icon="el-icon-upload2"
  25 + size="mini"
  26 + plain
  27 + circle
  28 + @click="diaUp = true"
  29 + ></el-button>
16 30 </el-tooltip>
17 31 <el-tooltip effect="dark" content="添加基站" placement="bottom">
18   - <el-button type="primary" icon="el-icon-receiving" size="mini" plain circle @click="addDev"></el-button>
19   - </el-tooltip></template>
  32 + <el-button
  33 + type="primary"
  34 + icon="el-icon-receiving"
  35 + size="mini"
  36 + plain
  37 + circle
  38 + @click="addDev"
  39 + ></el-button> </el-tooltip
  40 + ></template>
20 41 </template>
21 42 </back-box>
22 43 <div>
... ... @@ -27,10 +48,16 @@
27 48 <el-radio-button :label="3">授课端管理</el-radio-button>
28 49 </el-radio-group>
29 50 </div>
30   - <p v-show="(type == 1 && stationCount) || (type == 2 && clickerCount)" class="error-tips">
  51 + <p
  52 + v-show="(type == 1 && stationCount) || (type == 2 && clickerCount)"
  53 + class="error-tips"
  54 + >
31 55 有{{
32 56 type == 1 ? stationCount : clickerCount
33   - }}条设备异常信息,<router-link :to="{ path: '/deviceError', query: { type: type } }">点击查看&gt;&gt;</router-link>
  57 + }}条设备异常信息,<router-link
  58 + :to="{ path: '/deviceError', query: { type: type } }"
  59 + >点击查看&gt;&gt;</router-link
  60 + >
34 61 </p>
35 62 <div class="content">
36 63 <div v-show="type == 1">
... ... @@ -40,39 +67,97 @@
40 67 <p class="p2">基站数量</p>
41 68 </div>
42 69 <div class="chart">
43   - <pie-chart id="pieChart" :params="chartData" @clickPieChart="clickPieChart"></pie-chart>
  70 + <pie-chart
  71 + id="pieChart"
  72 + :params="chartData"
  73 + @clickPieChart="clickPieChart"
  74 + ></pie-chart>
44 75 </div>
45 76 </div>
46 77 <div class="table-box">
47 78 <div class="answer-header">
48 79 <div class="sel-box">
49   - <el-cascader size="small" class="sel sel2" clearable placeholder="选择班级" v-model="query.classId"
50   - :options="gradeList" :props="props" collapse-tags :show-all-levels="false"></el-cascader>
51   - <el-select class="sel" v-model="query.onlineStatus" placeholder="选择状态" @change="_QueryData(true)">
52   - <el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value">
  80 + <el-cascader
  81 + size="small"
  82 + class="sel sel2"
  83 + clearable
  84 + placeholder="选择班级"
  85 + v-model="query.classId"
  86 + :options="gradeList"
  87 + :props="props"
  88 + collapse-tags
  89 + :show-all-levels="false"
  90 + ></el-cascader>
  91 + <el-select
  92 + class="sel"
  93 + v-model="query.onlineStatus"
  94 + placeholder="选择状态"
  95 + @change="_QueryData(true)"
  96 + >
  97 + <el-option
  98 + v-for="item in statusList"
  99 + :key="item.value"
  100 + :label="item.label"
  101 + :value="item.value"
  102 + >
53 103 </el-option>
54 104 </el-select>
55   - <el-input placeholder="请输入设备编码" v-model="query.sn" class="input-with-select" clearable
56   - @keyup.enter.native="_QueryData(true)">
57   - <el-button slot="append" icon="el-icon-search" @click="_QueryData(true)"></el-button>
  105 + <el-input
  106 + placeholder="请输入设备编码"
  107 + v-model="query.sn"
  108 + class="input-with-select"
  109 + clearable
  110 + @keyup.enter.native="_QueryData(true)"
  111 + >
  112 + <el-button
  113 + slot="append"
  114 + icon="el-icon-search"
  115 + @click="_QueryData(true)"
  116 + ></el-button>
58 117 </el-input>
59   - <el-button class="serach-box" round @click="_QueryData(true)">筛选</el-button>
  118 + <el-button class="serach-box" round @click="_QueryData(true)"
  119 + >筛选</el-button
  120 + >
60 121 </div>
61 122 </div>
62 123 <p class="loading" v-if="!tableData.length && loading">
63 124 加载中<i class="el-icon-loading"></i>
64 125 </p>
65 126 <el-table v-else :data="tableData" border style="width: 100%">
66   - <el-table-column prop="sn" label="设备编码" align="center"></el-table-column>
67   - <el-table-column prop="frequency" label="频点" align="center" width="60"></el-table-column>
68   - <el-table-column prop="pairingCode" label="配对码" align="center"></el-table-column>
69   - <el-table-column v-if="role == 'ROLE_JITUAN'" prop="schoolName" label="学校" align="center"></el-table-column>
70   - <el-table-column prop="gradeName" label="年级" align="center"><template slot-scope="scoped">
  127 + <el-table-column
  128 + prop="sn"
  129 + label="设备编码"
  130 + align="center"
  131 + ></el-table-column>
  132 + <el-table-column
  133 + prop="frequency"
  134 + label="频点"
  135 + align="center"
  136 + width="60"
  137 + ></el-table-column>
  138 + <el-table-column
  139 + prop="pairingCode"
  140 + label="配对码"
  141 + align="center"
  142 + ></el-table-column>
  143 + <el-table-column
  144 + v-if="role == 'ROLE_JITUAN'"
  145 + prop="schoolName"
  146 + label="学校"
  147 + align="center"
  148 + ></el-table-column>
  149 + <el-table-column prop="gradeName" label="年级" align="center"
  150 + ><template slot-scope="scoped">
71 151 <p v-for="(item, index) in scoped.row.classList" :key="index">
72 152 {{ item.gradeName }}
73 153 </p>
74   - </template></el-table-column>
75   - <el-table-column prop="roomName" label="所在教室" align="center"></el-table-column>
  154 + </template></el-table-column
  155 + >
  156 + <el-table-column
  157 + prop="roomName"
  158 + label="所在教室"
  159 + align="center"
  160 + ></el-table-column>
76 161 <el-table-column label="关联班级" align="center">
77 162 <template slot-scope="scoped">
78 163 <p v-for="(item, index) in scoped.row.classList" :key="index">
... ... @@ -80,31 +165,73 @@
80 165 </p>
81 166 </template>
82 167 </el-table-column>
83   - <el-table-column prop="otaVersionName" label="固件版本号" align="center"></el-table-column>
84   - <el-table-column prop="onlineTime" label="最近上报" align="center" width="160"></el-table-column>
85   - <el-table-column prop="createdTime" label="创建时间" align="center" width="160"></el-table-column>
86   - <el-table-column label="状态" align="center" width="60"><template slot-scope="scope">
  168 + <el-table-column
  169 + prop="otaVersionName"
  170 + label="固件版本号"
  171 + align="center"
  172 + ></el-table-column>
  173 + <el-table-column
  174 + prop="onlineTime"
  175 + label="最近上报"
  176 + align="center"
  177 + width="160"
  178 + ></el-table-column>
  179 + <el-table-column
  180 + prop="createdTime"
  181 + label="创建时间"
  182 + align="center"
  183 + width="160"
  184 + ></el-table-column>
  185 + <el-table-column label="状态" align="center" width="60"
  186 + ><template slot-scope="scope">
87 187 {{
88 188 scope.row.onlineStatus == 1
89   - ? "在线"
90   - : scope.row.onlineStatus == 2
  189 + ? "在线"
  190 + : scope.row.onlineStatus == 2
91 191 ? "异常"
92 192 : "离线"
93 193 }}
94   - </template></el-table-column>
95   - <el-table-column label="操作" align="center" width="130"><template slot-scope="scoped">
96   - <el-tooltip effect="dark" v-if="role != 'ROLE_JITUAN'" content="修改基站" placement="top">
97   - <el-button type="primary" circle size="mini" icon="fa fa-edit" @click="edit(scoped.row)"></el-button>
  194 + </template></el-table-column
  195 + >
  196 + <el-table-column label="操作" align="center" width="130"
  197 + ><template slot-scope="scoped">
  198 + <el-tooltip
  199 + effect="dark"
  200 + v-if="role != 'ROLE_JITUAN'"
  201 + content="修改基站"
  202 + placement="top"
  203 + >
  204 + <el-button
  205 + type="primary"
  206 + circle
  207 + size="mini"
  208 + icon="fa fa-edit"
  209 + @click="edit(scoped.row)"
  210 + ></el-button>
98 211 </el-tooltip>
99 212 <el-tooltip effect="dark" content="日志" placement="top">
100   - <el-button type="warning" circle size="mini" icon="fa fa-eye"
101   - @click="linkTo(scoped.row, 1)"></el-button>
  213 + <el-button
  214 + type="warning"
  215 + circle
  216 + size="mini"
  217 + icon="fa fa-eye"
  218 + @click="linkTo(scoped.row, 1)"
  219 + ></el-button>
102 220 </el-tooltip>
103   - <el-popconfirm title="确定删除吗?" @confirm="_delStation($event, scoped.row)">
104   - <el-button class="del" slot="reference" type="danger" circle size="mini"
105   - icon="fa fa-trash-o"></el-button>
106   - </el-popconfirm>
107   - </template></el-table-column>
  221 + <el-popconfirm
  222 + title="确定删除吗?"
  223 + @confirm="_delStation($event, scoped.row)"
  224 + >
  225 + <el-button
  226 + class="del"
  227 + slot="reference"
  228 + type="danger"
  229 + circle
  230 + size="mini"
  231 + icon="fa fa-trash-o"
  232 + ></el-button>
  233 + </el-popconfirm> </template
  234 + ></el-table-column>
108 235 </el-table>
109 236 </div>
110 237 </div>
... ... @@ -115,61 +242,151 @@
115 242 <p class="p2">答题器数量</p>
116 243 </div>
117 244 <div class="chart">
118   - <scatter-chart id="scatterChart" :params="chartData2"
119   - @clickScatterChart="clickScatterChart"></scatter-chart>
  245 + <scatter-chart
  246 + id="scatterChart"
  247 + :params="chartData2"
  248 + @clickScatterChart="clickScatterChart"
  249 + ></scatter-chart>
120 250 </div>
121 251 </div>
122 252 <div class="table-box">
123 253 <div class="answer-header">
124 254 <div class="sel-box">
125   - <el-cascader size="small" class="sel sel2" clearable placeholder="选择班级" v-model="query.classId"
126   - :options="gradeList" :props="props" collapse-tags :show-all-levels="false"></el-cascader>
127   - <el-select class="sel" v-model="query.type" placeholder="选择状态" @change="_QueryData(true)">
128   - <el-option v-for="item in typeList" :key="item.value" :label="item.label" :value="item.value">
  255 + <el-cascader
  256 + size="small"
  257 + class="sel sel2"
  258 + clearable
  259 + placeholder="选择班级"
  260 + v-model="query.classId"
  261 + :options="gradeList"
  262 + :props="props"
  263 + collapse-tags
  264 + :show-all-levels="false"
  265 + ></el-cascader>
  266 + <el-select
  267 + class="sel"
  268 + v-model="query.type"
  269 + placeholder="选择状态"
  270 + @change="_QueryData(true)"
  271 + >
  272 + <el-option
  273 + v-for="item in typeList"
  274 + :key="item.value"
  275 + :label="item.label"
  276 + :value="item.value"
  277 + >
129 278 </el-option>
130 279 </el-select>
131   - <el-input placeholder="请输入设备编码" v-model="query.sn" class="input-with-select" clearable
132   - @input.native="query.studentName = ''" @keyup.enter.native="_QueryData(true)">
133   - <el-button slot="append" icon="el-icon-search" @click="_QueryData(true)"></el-button>
  280 + <el-input
  281 + placeholder="请输入设备编码"
  282 + v-model="query.sn"
  283 + class="input-with-select"
  284 + clearable
  285 + @input.native="query.studentName = ''"
  286 + @keyup.enter.native="_QueryData(true)"
  287 + >
  288 + <el-button
  289 + slot="append"
  290 + icon="el-icon-search"
  291 + @click="_QueryData(true)"
  292 + ></el-button>
134 293 </el-input>
135   - <el-input placeholder="学生姓名" v-model="query.studentName" class="input-with-select" clearable
136   - @input.native="query.sn = ''" @keyup.enter.native="_QueryData(true)">
137   - <el-button slot="append" icon="el-icon-search" @click="_QueryData(true)"></el-button>
  294 + <el-input
  295 + placeholder="学生姓名"
  296 + v-model="query.studentName"
  297 + class="input-with-select"
  298 + clearable
  299 + @input.native="query.sn = ''"
  300 + @keyup.enter.native="_QueryData(true)"
  301 + >
  302 + <el-button
  303 + slot="append"
  304 + icon="el-icon-search"
  305 + @click="_QueryData(true)"
  306 + ></el-button>
138 307 </el-input>
139   - <el-button class="serach-box" round @click="_QueryData(true)">筛选</el-button>
  308 + <el-button class="serach-box" round @click="_QueryData(true)"
  309 + >筛选</el-button
  310 + >
140 311 </div>
141 312 </div>
142 313 <p class="loading" v-if="!tableData.length && loading">
143 314 加载中<i class="el-icon-loading"></i>
144 315 </p>
145 316 <el-table v-else :data="tableData" border style="width: 100%">
146   - <el-table-column prop="sn" label="设备编码" align="center"></el-table-column>
147   - <el-table-column label="学生信息" align="center"><template slot-scope="scoped">
148   - <p v-for="(item, index) in scoped.row.studentList" :key="index">
  317 + <el-table-column
  318 + prop="sn"
  319 + label="设备编码"
  320 + align="center"
  321 + ></el-table-column>
  322 + <el-table-column label="学生信息" align="center"
  323 + ><template slot-scope="scoped">
  324 + <p
  325 + v-for="(item, index) in scoped.row.studentList"
  326 + :key="index"
  327 + >
149 328 {{ item.studentName }}
150 329 </p>
151   - </template></el-table-column>
152   - <el-table-column v-if="role == 'ROLE_JITUAN'" prop="schoolName" label="学校" align="center"></el-table-column>
153   - <el-table-column v-if="role == 'ROLE_JITUAN'" prop="gradeName" label="年级" align="center"
154   - width="120"><template slot-scope="scoped">
  330 + </template></el-table-column
  331 + >
  332 + <el-table-column
  333 + v-if="role == 'ROLE_JITUAN'"
  334 + prop="schoolName"
  335 + label="学校"
  336 + align="center"
  337 + ></el-table-column>
  338 + <el-table-column
  339 + v-if="role == 'ROLE_JITUAN'"
  340 + prop="gradeName"
  341 + label="年级"
  342 + align="center"
  343 + width="120"
  344 + ><template slot-scope="scoped">
155 345 <p v-for="(item, index) in scoped.row.classList" :key="index">
156 346 {{ item.gradeName }}
157 347 </p>
158   - </template></el-table-column>
159   - <el-table-column prop="class" label="关联班级" align="center" width="160">
  348 + </template></el-table-column
  349 + >
  350 + <el-table-column
  351 + prop="class"
  352 + label="关联班级"
  353 + align="center"
  354 + width="160"
  355 + >
160 356 <template slot-scope="scoped">
161 357 <p v-for="(item, index) in scoped.row.classList" :key="index">
162 358 {{ item.className }}
163 359 </p>
164   - </template></el-table-column>
165   - <el-table-column prop="pairingCode" label="配对码" align="center"></el-table-column>
166   - <el-table-column prop="answerTimes" label="答题次数" align="center"></el-table-column>
167   - <el-table-column prop="latestReportTime" label="最后答题时间" align="center" width="160"></el-table-column>
168   - <el-table-column label="操作" align="center" width="80"><template slot-scope="scoped">
  360 + </template></el-table-column
  361 + >
  362 + <el-table-column
  363 + prop="pairingCode"
  364 + label="配对码"
  365 + align="center"
  366 + ></el-table-column>
  367 + <el-table-column
  368 + prop="answerTimes"
  369 + label="答题次数"
  370 + align="center"
  371 + ></el-table-column>
  372 + <el-table-column
  373 + prop="latestReportTime"
  374 + label="最后答题时间"
  375 + align="center"
  376 + width="160"
  377 + ></el-table-column>
  378 + <el-table-column label="操作" align="center" width="80"
  379 + ><template slot-scope="scoped">
169 380 <el-tooltip effect="dark" content="日志" placement="top">
170   - <el-button type="warning" circle size="mini" icon="fa fa-eye"
171   - @click="linkTo(scoped.row, 2)"></el-button>
172   - </el-tooltip> </template></el-table-column>
  381 + <el-button
  382 + type="warning"
  383 + circle
  384 + size="mini"
  385 + icon="fa fa-eye"
  386 + @click="linkTo(scoped.row, 2)"
  387 + ></el-button>
  388 + </el-tooltip> </template
  389 + ></el-table-column>
173 390 </el-table>
174 391 </div>
175 392 </div>
... ... @@ -177,12 +394,27 @@
177 394 <div class="table-box">
178 395 <div class="answer-header">
179 396 <div class="sel-box">
180   - <el-cascader size="small" class="sel sel2" clearable placeholder="选择班级" v-model="query.classId"
181   - :options="gradeList" :props="props" collapse-tags :show-all-levels="false"
182   - @change="_QueryData(false)"></el-cascader>
183   - <span class="sel">共选择{{ selectionTabIds.length }}个授课端</span>
184   - <el-button plan round @click="autoUpDate(false)">开启自动更新</el-button>
185   - <el-button plan round @click="stopUpdate(false)">停止自动更新</el-button>
  397 + <el-cascader
  398 + size="small"
  399 + class="sel sel2"
  400 + clearable
  401 + placeholder="选择班级"
  402 + v-model="query.classId"
  403 + :options="gradeList"
  404 + :props="props"
  405 + collapse-tags
  406 + :show-all-levels="false"
  407 + @change="_QueryData(false)"
  408 + ></el-cascader>
  409 + <span class="sel"
  410 + >共选择{{ selectionTabIds.length }}个授课端</span
  411 + >
  412 + <el-button plan round @click="autoUpDate(false)"
  413 + >开启自动更新</el-button
  414 + >
  415 + <el-button plan round @click="stopUpdate(false)"
  416 + >停止自动更新</el-button
  417 + >
186 418 </div>
187 419 <p class="upgrade-all" v-if="this.role == 'ROLE_XUEXIAO'">
188 420 <span>全校更新:</span>
... ... @@ -193,55 +425,118 @@
193 425 <p class="loading" v-if="!tableData.length && loading">
194 426 加载中<i class="el-icon-loading"></i>
195 427 </p>
196   - <el-table v-else ref="multipleTable" :data="tableData" border style="width: 100%"
197   - @selection-change="handleSelectionChange">
  428 + <el-table
  429 + v-else
  430 + ref="multipleTable"
  431 + :data="tableData"
  432 + border
  433 + style="width: 100%"
  434 + @selection-change="handleSelectionChange"
  435 + >
198 436 <el-table-column type="selection" width="55"></el-table-column>
199 437 <!-- <el-table-column prop="sn" label="设备编码" align="center"></el-table-column> -->
200   - <el-table-column prop="class" label="关联班级" align="center" width="100"><template slot-scope="scoped">
  438 + <el-table-column
  439 + prop="class"
  440 + label="关联班级"
  441 + align="center"
  442 + width="100"
  443 + ><template slot-scope="scoped">
201 444 <p v-for="(item, index) in scoped.row.classList" :key="index">
202 445 {{ item.className }}
203 446 </p>
204   - </template></el-table-column>
205   - <el-table-column v-if="role == 'ROLE_JITUAN'" prop="schoolName" label="学校" align="center"></el-table-column>
206   - <el-table-column v-if="role == 'ROLE_JITUAN'" prop="gradeName" label="年级" align="center"
207   - width="80"><template slot-scope="scoped">
  447 + </template></el-table-column
  448 + >
  449 + <el-table-column
  450 + v-if="role == 'ROLE_JITUAN'"
  451 + prop="schoolName"
  452 + label="学校"
  453 + align="center"
  454 + ></el-table-column>
  455 + <el-table-column
  456 + v-if="role == 'ROLE_JITUAN'"
  457 + prop="gradeName"
  458 + label="年级"
  459 + align="center"
  460 + width="80"
  461 + ><template slot-scope="scoped">
208 462 <p v-for="(item, index) in scoped.row.classList" :key="index">
209 463 {{ item.gradeName }}
210 464 </p>
211   - </template></el-table-column>
212   - <el-table-column prop="lastUpdateTime" label="最近更新" align="center"></el-table-column>
213   - <el-table-column prop="osInfo" label="软件系统" align="center"></el-table-column>
214   - <el-table-column prop="hardwareInfo" label="硬件环境" align="center"></el-table-column>
215   - <el-table-column prop="otaVersionName" label="版本号" align="center" width="80"></el-table-column>
216   - <el-table-column label="状态" align="center" width="80"><template slot-scope="scope">
  465 + </template></el-table-column
  466 + >
  467 + <el-table-column
  468 + prop="lastUpdateTime"
  469 + label="最近更新"
  470 + align="center"
  471 + ></el-table-column>
  472 + <el-table-column
  473 + prop="osInfo"
  474 + label="软件系统"
  475 + align="center"
  476 + ></el-table-column>
  477 + <el-table-column
  478 + prop="hardwareInfo"
  479 + label="硬件环境"
  480 + align="center"
  481 + ></el-table-column>
  482 + <el-table-column
  483 + prop="otaVersionName"
  484 + label="版本号"
  485 + align="center"
  486 + width="80"
  487 + ></el-table-column>
  488 + <el-table-column label="状态" align="center" width="80"
  489 + ><template slot-scope="scope">
217 490 {{
218 491 scope.row.onlineStatus == 1
219   - ? "在线"
220   - : scope.row.onlineStatus == 2
  492 + ? "在线"
  493 + : scope.row.onlineStatus == 2
221 494 ? "异常"
222 495 : "离线"
223 496 }}
224   - </template></el-table-column>
  497 + </template></el-table-column
  498 + >
225 499 <el-table-column label="日志记录" align="center" width="80">
226 500 <template slot-scope="scope">
227   - <el-link v-if="scope.row.content" type="primary" :href="scope.row.content" download>下载</el-link>
228   - <span v-else>暂无记录</span>
  501 + <el-link
  502 + type="primary"
  503 + @click="openLogia(scope.row.id)"
  504 + download
  505 + >查看</el-link
  506 + >
229 507 </template>
230 508 </el-table-column>
231   - <el-table-column label="自动更新" align="center" width="100"><template slot-scope="scoped">
232   - <el-switch v-model="scoped.row.upgradeFlag" @change="changeUpdate($event, scoped.row, this)">
233   - </el-switch> </template></el-table-column>
  509 + <el-table-column label="自动更新" align="center" width="100"
  510 + ><template slot-scope="scoped">
  511 + <el-switch
  512 + v-model="scoped.row.upgradeFlag"
  513 + @change="changeUpdate($event, scoped.row, this)"
  514 + >
  515 + </el-switch> </template
  516 + ></el-table-column>
234 517 </el-table>
235 518 </div>
236 519 </div>
237 520 <div class="pagination-box">
238   - <el-pagination small="" layout="total,prev, pager, next" :hide-on-single-page="true" :total="total"
239   - @current-change="changePage" :current-page="page" :page-size="size">
  521 + <el-pagination
  522 + small=""
  523 + layout="total,prev, pager, next"
  524 + :hide-on-single-page="true"
  525 + :total="total"
  526 + @current-change="changePage"
  527 + :current-page="page"
  528 + :page-size="size"
  529 + >
240 530 </el-pagination>
241 531 </div>
242 532 </div>
243 533 </div>
244   - <el-dialog :close-on-click-modal="false" title="设备导入" :visible.sync="diaUp" width="400">
  534 + <el-dialog
  535 + :close-on-click-modal="false"
  536 + title="设备导入"
  537 + :visible.sync="diaUp"
  538 + width="400"
  539 + >
245 540 <upload :url="url" @upSuccess="upSuccess" fileName="设备信息">
246 541 <p class="down-txt" slot="down">
247 542 通过Excel名单导入设备,需要提供设备编码,点击
... ... @@ -252,33 +547,76 @@
252 547 <el-button @click="diaUp = false">取 消</el-button>
253 548 </div>
254 549 </el-dialog>
255   - <el-dialog :close-on-click-modal="false" :title="isAdd ? '添加基站' : '修改基站'" :visible.sync="diaAnswerEqu" width="400">
  550 + <el-dialog
  551 + :close-on-click-modal="false"
  552 + :title="isAdd ? '添加基站' : '修改基站'"
  553 + :visible.sync="diaAnswerEqu"
  554 + width="400"
  555 + >
256 556 <el-form ref="forms" :model="form" :rules="formRules" label-width="140px">
257 557 <el-form-item label="设备编码:" prop="sn">
258   - <el-col :span="16"><el-input type="text" placeholder="输入设备编码" v-model.trim="form.sn" maxlength="30" size="45"
259   - show-word-limit :disabled="!isAdd">
260   - </el-input></el-col>
  558 + <el-col :span="16"
  559 + ><el-input
  560 + type="text"
  561 + placeholder="输入设备编码"
  562 + v-model.trim="form.sn"
  563 + maxlength="30"
  564 + size="45"
  565 + show-word-limit
  566 + :disabled="!isAdd"
  567 + >
  568 + </el-input
  569 + ></el-col>
261 570 </el-form-item>
262 571 <el-form-item label="频点:" prop="frequency">
263   - <el-col :span="16"><el-input type="text" placeholder="输入频点" v-model.trim="form.frequency" maxlength="30"
264   - size="45" show-word-limit>
265   - </el-input></el-col>
  572 + <el-col :span="16"
  573 + ><el-input
  574 + type="text"
  575 + placeholder="输入频点"
  576 + v-model.trim="form.frequency"
  577 + maxlength="30"
  578 + size="45"
  579 + show-word-limit
  580 + >
  581 + </el-input
  582 + ></el-col>
266 583 </el-form-item>
267 584 <el-form-item label="配对码:" prop="pairingCode">
268   - <el-col :span="16"><el-input type="text" placeholder="输入配对码" v-model.trim="form.pairingCode" maxlength="30"
269   - size="45" show-word-limit>
270   - </el-input></el-col>
  585 + <el-col :span="16"
  586 + ><el-input
  587 + type="text"
  588 + placeholder="输入配对码"
  589 + v-model.trim="form.pairingCode"
  590 + maxlength="30"
  591 + size="45"
  592 + show-word-limit
  593 + >
  594 + </el-input
  595 + ></el-col>
271 596 </el-form-item>
272 597 <el-form-item label="选择班级:" prop="classIds">
273 598 <el-col :span="16">
274   - <el-cascader class="sel" clearable v-model="form.classIds" :options="gradeList"
275   - :show-all-levels="false"></el-cascader>
  599 + <el-cascader
  600 + class="sel"
  601 + clearable
  602 + v-model="form.classIds"
  603 + :options="gradeList"
  604 + :show-all-levels="false"
  605 + ></el-cascader>
276 606 </el-col>
277 607 </el-form-item>
278 608 <el-form-item label="所在教室:">
279   - <el-col :span="16"><el-input type="text" placeholder="输入所在教室" v-model.trim="form.roomName" maxlength="30"
280   - size="45" show-word-limit>
281   - </el-input></el-col>
  609 + <el-col :span="16"
  610 + ><el-input
  611 + type="text"
  612 + placeholder="输入所在教室"
  613 + v-model.trim="form.roomName"
  614 + maxlength="30"
  615 + size="45"
  616 + show-word-limit
  617 + >
  618 + </el-input
  619 + ></el-col>
282 620 </el-form-item>
283 621 </el-form>
284 622 <div class="dialog-footer" slot="footer">
... ... @@ -286,6 +624,39 @@
286 624 <el-button @click="diaAnswerEqu = false">取 消</el-button>
287 625 </div>
288 626 </el-dialog>
  627 + <el-dialog
  628 + :close-on-click-modal="false"
  629 + title="设备日志"
  630 + :visible.sync="diaLog"
  631 + width="400"
  632 + >
  633 + <div v-loading="logLoading">
  634 + <p class="down-p" v-for="item in logList">
  635 + {{ item.modifiedTime }} -
  636 + <el-link type="primary" :href="item.content" download>下载</el-link>
  637 + </p>
  638 + <el-empty
  639 + :image-size="100"
  640 + v-if="!logList.length && !logLoading"
  641 + description="暂无数据"
  642 + ></el-empty>
  643 + <div class="pagination-box">
  644 + <el-pagination
  645 + small=""
  646 + layout="total,prev, pager, next"
  647 + :hide-on-single-page="true"
  648 + :total="logTotal"
  649 + @current-change="logChangePage"
  650 + :current-page="logPage"
  651 + :page-size="logSize"
  652 + >
  653 + </el-pagination>
  654 + </div>
  655 + </div>
  656 + <div class="dialog-footer" slot="footer">
  657 + <el-button @click="diaUp = false">取 消</el-button>
  658 + </div>
  659 + </el-dialog>
289 660 </div>
290 661 </template>
291 662  
... ... @@ -384,6 +755,13 @@ export default {
384 755 upgradeFlag: false,
385 756 stationCount: 0, //异常基站数量
386 757 clickerCount: 0, //异常答题器数量
  758 + // 设备日志相关
  759 + diaLog: false,
  760 + logLoading: false,
  761 + logList: [],
  762 + logTotal: 0,
  763 + logPage: 1,
  764 + logSize: 20,
387 765 };
388 766 },
389 767 created() {
... ... @@ -485,7 +863,7 @@ export default {
485 863 },
486 864 _delStation: _.debounce(async function (event, obj) {
487 865 const { status, info } = await this.$request.deleteStation({
488   - id: obj.id
  866 + id: obj.id,
489 867 });
490 868 if (status === 0) {
491 869 this._QueryData(false);
... ... @@ -507,14 +885,14 @@ export default {
507 885 obj.name == "1日内"
508 886 ? 1
509 887 : obj.name == "3日内"
510   - ? 2
511   - : obj.name == "7日内"
512   - ? 3
513   - : obj.name == "1月内"
514   - ? 4
515   - : obj.name == "3月内"
516   - ? 5
517   - : 6;
  888 + ? 2
  889 + : obj.name == "7日内"
  890 + ? 3
  891 + : obj.name == "1月内"
  892 + ? 4
  893 + : obj.name == "3月内"
  894 + ? 5
  895 + : 6;
518 896 this.query.sn = "";
519 897 this.query.classId = [];
520 898 this.page = 1;
... ... @@ -559,7 +937,9 @@ export default {
559 937 if (data && !data.code) {
560 938 this._QueryData(false);
561 939 this.selectionTabIds = [];
562   - this.$message.success(this.upgradeFlag ? "开启自动更新成功" : "关闭/停止自动更新成功");
  940 + this.$message.success(
  941 + this.upgradeFlag ? "开启自动更新成功" : "关闭/停止自动更新成功"
  942 + );
563 943 } else {
564 944 this.$message.error(data.info);
565 945 }
... ... @@ -661,13 +1041,63 @@ export default {
661 1041 this.type == 1
662 1042 ? "基站管理报表.xlsx"
663 1043 : this.type == 2
664   - ? "答题器报表.xlsx"
665   - : "授课端报表.xlsx";
  1044 + ? "答题器报表.xlsx"
  1045 + : "授课端报表.xlsx";
666 1046 downloadFile(txt, blob);
667 1047 } else {
668 1048 this.$message.error(data.info);
669 1049 }
670 1050 },
  1051 + //授课端日志列表
  1052 + async openLogia(id) {
  1053 + this.diaLog = true;
  1054 + this.page = 1;
  1055 + this.logLoading = true;
  1056 + const { data, info, status } = await this.$request.deviceZipLogList({
  1057 + id: id,
  1058 + page: this.logPage,
  1059 + size: this.logSize,
  1060 + });
  1061 + this.logLoading = false;
  1062 + if (status == 0) {
  1063 + this.logList = data?.list || [];
  1064 + } else {
  1065 + this.$message.error(info);
  1066 + }
  1067 + },
  1068 + async downloadLog() {
  1069 + if (this.exportLoading == true) return;
  1070 + let query = this.setQuery();
  1071 + const exportDevice =
  1072 + this.role != "ROLE_JITUAN"
  1073 + ? this.$request.exportDevice
  1074 + : this.$request.tenantExportDevice;
  1075 +
  1076 + this.exportLoading = true;
  1077 + const data = await exportDevice({
  1078 + ...query,
  1079 + deviceType: this.type,
  1080 + });
  1081 + this.exportLoading = false;
  1082 + if (data && !data.code) {
  1083 + let blob = new Blob([data], {
  1084 + type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
  1085 + });
  1086 + let txt =
  1087 + this.type == 1
  1088 + ? "基站管理报表.xlsx"
  1089 + : this.type == 2
  1090 + ? "答题器报表.xlsx"
  1091 + : "授课端报表.xlsx";
  1092 + downloadFile(txt, blob);
  1093 + } else {
  1094 + this.$message.error(data.info);
  1095 + }
  1096 + },
  1097 + logChangePage(page) {
  1098 + this.logPage = page;
  1099 + this.downloadLog();
  1100 + },
671 1101  
672 1102 // 修改基站
673 1103 setAnswerEqu() {
... ... @@ -773,8 +1203,8 @@ export default {
773 1203 item.onlineStatus == "1"
774 1204 ? "在线"
775 1205 : item.onlineStatus == 0
776   - ? "离线"
777   - : "异常",
  1206 + ? "离线"
  1207 + : "异常",
778 1208 value: item.total,
779 1209 rate: item.rate,
780 1210 };
... ... @@ -799,14 +1229,14 @@ export default {
799 1229 item.type == 1
800 1230 ? "1日内"
801 1231 : item.type == 2
802   - ? "3日内"
803   - : item.type == 3
804   - ? "7日内"
805   - : item.type == 4
806   - ? "1月内"
807   - : item.type == 5
808   - ? "3月内"
809   - : "3月以上",
  1232 + ? "3日内"
  1233 + : item.type == 3
  1234 + ? "7日内"
  1235 + : item.type == 4
  1236 + ? "1月内"
  1237 + : item.type == 5
  1238 + ? "3月内"
  1239 + : "3月以上",
810 1240 count: item.total,
811 1241 value: item.rate * 100,
812 1242 };
... ... @@ -978,7 +1408,10 @@ export default {
978 1408 .down {
979 1409 padding: 0 0 16px 20px;
980 1410 }
981   -
  1411 +.down-p{
  1412 + line-height:24px;
  1413 + display: flex;
  1414 +}
982 1415 .error-tips {
983 1416 margin-bottom: 12px;
984 1417 }
... ...
src/views/basic/setUp/clazz.vue
... ... @@ -25,7 +25,12 @@
25 25 @click="exportTeacherExl"
26 26 ></el-button>
27 27 </el-tooltip>
28   - <el-tooltip effect="dark" content="分班" placement="bottom">
  28 + <el-tooltip
  29 + effect="dark"
  30 + content="分班"
  31 + placement="bottom"
  32 + v-show="type == 0"
  33 + >
29 34 <img
30 35 @click="toArchived"
31 36 src="../../../assets/images/fenban.png"
... ...
src/views/basic/setUp/student.vue
... ... @@ -45,6 +45,7 @@
45 45 @change="changeGrade(query.grade)"
46 46 placeholder="选择类型"
47 47 >
  48 + <el-option label="全部" value=""></el-option>
48 49 <el-option label="行政班" :value="0"></el-option>
49 50 <el-option label="教学班" :value="1"></el-option>
50 51 </el-select>
... ... @@ -634,12 +635,14 @@ export default {
634 635 serQuery(type) {
635 636 let query = {};
636 637 if (type == 1) {
  638 + this.query.classType = "";
637 639 this.query.classId = "";
638 640 this.query.studentCode = "";
639 641 this.query.grade = "";
640 642 query.studentName = this.query.studentName;
641 643 query.status = 9;
642 644 } else if (type == 2) {
  645 + this.query.classType = "";
643 646 this.query.classId = "";
644 647 this.query.studentName = "";
645 648 this.query.grade = "";
... ...
src/views/basic/setUp/teacher.vue
... ... @@ -46,6 +46,7 @@
46 46 @change="changeType"
47 47 placeholder="选择类型"
48 48 >
  49 + <el-option disabled label="全部" value=""></el-option>
49 50 <el-option label="行政班" :value="0"></el-option>
50 51 <el-option label="教学班" :value="1"></el-option>
51 52 </el-select>
... ... @@ -899,12 +900,14 @@ export default {
899 900 this.query.phone = "";
900 901 this.query.type = 0;
901 902 } else if (type == 2) {
  903 + this.query.classType = "";
902 904 this.query.type = 9;
903 905 this.query.phone = "";
904 906 this.query.gradeClassSub = [];
905 907 query.teacherName = this.query.teacherName;
906 908 query.type = this.query.type;
907 909 } else if (type == 3) {
  910 + this.query.classType = "";
908 911 this.query.type = 9;
909 912 this.query.teacherName = "";
910 913 this.query.gradeClassSub = [];
... ...