diff --git a/src/api/apis/apis.js b/src/api/apis/apis.js index ea5e790..c34603f 100644 --- a/src/api/apis/apis.js +++ b/src/api/apis/apis.js @@ -881,4 +881,8 @@ export default { submitScore(data) { return defaltService(setUpUrls.submitScore, data) }, + // 提交即时测报表分数 + deviceZipLogList(data) { + return defaltService(setUpUrls.deviceZipLogList, data) + }, }; diff --git a/src/api/urls/apis.js b/src/api/urls/apis.js index 4d21036..a3d9bc4 100644 --- a/src/api/urls/apis.js +++ b/src/api/urls/apis.js @@ -442,6 +442,8 @@ export default { deletePaperReport: "/api_html/teaching/deletePaperReport", //获取即时测报表学生名单和题目列表 listStudentsAndQuestions: "/api_html/teaching/listStudentsAndQuestions", + //分页查询授课端日志列表 + deviceZipLogList: "/api_html/school/manager/deviceZipLogList", } diff --git a/src/views/basic/ask/list.vue b/src/views/basic/ask/list.vue index 23f30e3..3bb13cd 100644 --- a/src/views/basic/ask/list.vue +++ b/src/views/basic/ask/list.vue @@ -123,20 +123,21 @@ @click="linkToDetail(scoped.row, 1)" > - - + @@ -430,7 +431,9 @@ div::-webkit-scrollbar-thumb { .main { height: 100%; } - +.remove-test { + margin-left: 10px; +} .table-box { padding: 16px; border-radius: 5px; diff --git a/src/views/basic/device/index.vue b/src/views/basic/device/index.vue index ea34f7c..3749777 100644 --- a/src/views/basic/device/index.vue +++ b/src/views/basic/device/index.vue @@ -7,16 +7,37 @@
@@ -27,10 +48,16 @@ 授课端管理
-

+

有{{ type == 1 ? stationCount : clickerCount - }}条设备异常信息,点击查看>> + }}条设备异常信息,点击查看>>

@@ -40,39 +67,97 @@

基站数量

- +
- - - + + + - - + + - 筛选 + 筛选

加载中

- - - - - + - - - -
@@ -115,61 +242,151 @@

答题器数量

- +
- - - + + + - - + + - - + + - 筛选 + 筛选

加载中

- - + - - - - + + + + + +
@@ -177,12 +394,27 @@
- - 共选择{{ selectionTabIds.length }}个授课端 - 开启自动更新 - 停止自动更新 + + 共选择{{ selectionTabIds.length }}个授课端 + 开启自动更新 + 停止自动更新

全校更新: @@ -193,55 +425,118 @@

加载中

- + - - +
- +
- +

通过Excel名单导入设备,需要提供设备编码,点击 @@ -252,33 +547,76 @@ 取 消 - + - - + + - - + + - - + + - + - - + +

+ +
+

+ {{ item.modifiedTime }} - + 下载 +

+ +
+ + +
+
+ +
@@ -384,6 +755,13 @@ export default { upgradeFlag: false, stationCount: 0, //异常基站数量 clickerCount: 0, //异常答题器数量 + // 设备日志相关 + diaLog: false, + logLoading: false, + logList: [], + logTotal: 0, + logPage: 1, + logSize: 20, }; }, created() { @@ -485,7 +863,7 @@ export default { }, _delStation: _.debounce(async function (event, obj) { const { status, info } = await this.$request.deleteStation({ - id: obj.id + id: obj.id, }); if (status === 0) { this._QueryData(false); @@ -507,14 +885,14 @@ export default { obj.name == "1日内" ? 1 : obj.name == "3日内" - ? 2 - : obj.name == "7日内" - ? 3 - : obj.name == "1月内" - ? 4 - : obj.name == "3月内" - ? 5 - : 6; + ? 2 + : obj.name == "7日内" + ? 3 + : obj.name == "1月内" + ? 4 + : obj.name == "3月内" + ? 5 + : 6; this.query.sn = ""; this.query.classId = []; this.page = 1; @@ -559,7 +937,9 @@ export default { if (data && !data.code) { this._QueryData(false); this.selectionTabIds = []; - this.$message.success(this.upgradeFlag ? "开启自动更新成功" : "关闭/停止自动更新成功"); + this.$message.success( + this.upgradeFlag ? "开启自动更新成功" : "关闭/停止自动更新成功" + ); } else { this.$message.error(data.info); } @@ -661,13 +1041,63 @@ export default { this.type == 1 ? "基站管理报表.xlsx" : this.type == 2 - ? "答题器报表.xlsx" - : "授课端报表.xlsx"; + ? "答题器报表.xlsx" + : "授课端报表.xlsx"; downloadFile(txt, blob); } else { this.$message.error(data.info); } }, + //授课端日志列表 + async openLogia(id) { + this.diaLog = true; + this.page = 1; + this.logLoading = true; + const { data, info, status } = await this.$request.deviceZipLogList({ + id: id, + page: this.logPage, + size: this.logSize, + }); + this.logLoading = false; + if (status == 0) { + this.logList = data?.list || []; + } else { + this.$message.error(info); + } + }, + async downloadLog() { + if (this.exportLoading == true) return; + let query = this.setQuery(); + const exportDevice = + this.role != "ROLE_JITUAN" + ? this.$request.exportDevice + : this.$request.tenantExportDevice; + + this.exportLoading = true; + const data = await exportDevice({ + ...query, + deviceType: this.type, + }); + this.exportLoading = false; + if (data && !data.code) { + let blob = new Blob([data], { + type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", + }); + let txt = + this.type == 1 + ? "基站管理报表.xlsx" + : this.type == 2 + ? "答题器报表.xlsx" + : "授课端报表.xlsx"; + downloadFile(txt, blob); + } else { + this.$message.error(data.info); + } + }, + logChangePage(page) { + this.logPage = page; + this.downloadLog(); + }, // 修改基站 setAnswerEqu() { @@ -773,8 +1203,8 @@ export default { item.onlineStatus == "1" ? "在线" : item.onlineStatus == 0 - ? "离线" - : "异常", + ? "离线" + : "异常", value: item.total, rate: item.rate, }; @@ -799,14 +1229,14 @@ export default { item.type == 1 ? "1日内" : item.type == 2 - ? "3日内" - : item.type == 3 - ? "7日内" - : item.type == 4 - ? "1月内" - : item.type == 5 - ? "3月内" - : "3月以上", + ? "3日内" + : item.type == 3 + ? "7日内" + : item.type == 4 + ? "1月内" + : item.type == 5 + ? "3月内" + : "3月以上", count: item.total, value: item.rate * 100, }; @@ -978,7 +1408,10 @@ export default { .down { padding: 0 0 16px 20px; } - +.down-p{ + line-height:24px; + display: flex; +} .error-tips { margin-bottom: 12px; } diff --git a/src/views/basic/setUp/clazz.vue b/src/views/basic/setUp/clazz.vue index a4ee4d3..46a29a5 100644 --- a/src/views/basic/setUp/clazz.vue +++ b/src/views/basic/setUp/clazz.vue @@ -25,7 +25,12 @@ @click="exportTeacherExl" > - + + @@ -634,12 +635,14 @@ export default { serQuery(type) { let query = {}; if (type == 1) { + this.query.classType = ""; this.query.classId = ""; this.query.studentCode = ""; this.query.grade = ""; query.studentName = this.query.studentName; query.status = 9; } else if (type == 2) { + this.query.classType = ""; this.query.classId = ""; this.query.studentName = ""; this.query.grade = ""; diff --git a/src/views/basic/setUp/teacher.vue b/src/views/basic/setUp/teacher.vue index 1c5d369..fbe582a 100644 --- a/src/views/basic/setUp/teacher.vue +++ b/src/views/basic/setUp/teacher.vue @@ -46,6 +46,7 @@ @change="changeType" placeholder="选择类型" > + @@ -899,12 +900,14 @@ export default { this.query.phone = ""; this.query.type = 0; } else if (type == 2) { + this.query.classType = ""; this.query.type = 9; this.query.phone = ""; this.query.gradeClassSub = []; query.teacherName = this.query.teacherName; query.type = this.query.type; } else if (type == 3) { + this.query.classType = ""; this.query.type = 9; this.query.teacherName = ""; this.query.gradeClassSub = [];