diff --git a/src/api/apis/apis.js b/src/api/apis/apis.js index 5b7d605..d356320 100644 --- a/src/api/apis/apis.js +++ b/src/api/apis/apis.js @@ -1516,4 +1516,42 @@ export default { data, }); }, + // 未分班学生名单导出 + exportNoClassStudent() { + return service({ + url: setUpUrls.exportNoClassStudent, + method: "POST", + responseType: 'arraybuffer', + }); + }, + // 未分配教师名单导出 + exportNoClassTeacher() { + return service({ + url: setUpUrls.exportNoClassTeacher, + method: "POST", + responseType: 'arraybuffer', + }); + }, + // 学校查询异常设备总数 + abnormalDeviceCount() { + return service({ + url: setUpUrls.abnormalDeviceCount, + method: "POST", + }); + }, + // 集团查询异常设备总数 + tenantAbnormalDeviceCount() { + return service({ + url: setUpUrls.tenantAbnormalDeviceCount, + method: "POST", + }); + }, + // 设备异常备注 + abnormalRemark(data) { + return service({ + url: setUpUrls.abnormalRemark, + method: "POST", + data + }); + }, }; diff --git a/src/api/urls/apis.js b/src/api/urls/apis.js index 029435d..8b44bea 100644 --- a/src/api/urls/apis.js +++ b/src/api/urls/apis.js @@ -392,4 +392,14 @@ export default { tenantSectionAndGradeList: "/api_html/tenant/sectionAndGradeList", //集团查询科目列表 tenantSubjectList: "/api_html/tenant/subjectList", + //未分班学生名单导出 + exportNoClassStudent: "/api_html/school/manager/exportNoClassStudent", + //未分班教师名单导出 + exportNoClassTeacher: "/api_html/school/manager/exportNoClassTeacher", + //学校查询异常设备总数 + abnormalDeviceCount: "/api_html/school/manager/abnormalDeviceCount", + //集团查询异常设备总数 + tenantAbnormalDeviceCount: "/api_html/tenant/abnormalDeviceCount", + //设备异常备注 + abnormalRemark: "/api_html/school/manager/abnormalRemark", } diff --git a/src/views/layout/aside/aside.vue b/src/views/layout/aside/aside.vue index 926ae4e..4081fa6 100644 --- a/src/views/layout/aside/aside.vue +++ b/src/views/layout/aside/aside.vue @@ -100,10 +100,10 @@ export default { let name = ""; let navTitle = function (path, routerARR) { for (let i = 0; i < routerARR.length; i++) { - if (routerARR[i].children.length > 0 || routerARR[i].path === path) { + if (routerARR[i].children?.length > 0 || routerARR[i].path === path) { if ( routerARR[i].path === path && - routerARR[i].children.length < 1 + routerARR[i].children?.length < 1 ) { name = routerARR[i].name; break; diff --git a/src/views/standard/device/error.vue b/src/views/standard/device/error.vue index 6a149cb..93e1093 100644 --- a/src/views/standard/device/error.vue +++ b/src/views/standard/device/error.vue @@ -13,35 +13,71 @@ align="center" width="160" > + + + + + + - - - 处理 @@ -58,6 +94,24 @@ + + + + + + + + + + @@ -65,6 +119,12 @@ export default { data() { return { + role: "", + loading: false, + diaNotes: false, + ntoes: "", + deviceId: "", + type: 1, tableData: [], total: 0, page: 1, @@ -72,20 +132,49 @@ export default { }; }, created() { - this._QueryData() + this.type = this.$route.query.type; + this.role = + this.$store.getters.info.showRole || + this.$store.getters.info.permissions[0].role; + this._QueryData(); }, methods: { changePage(page) { this.page = page; this._QueryData(); }, + openDia(obj) { + this.diaNotes = true; + this.deviceId = obj.id; + this.ntoes = ""; + }, + async _SaveNotes() { + if (!this.ntoes.trim()) { + this.$message.warning("请填写备注内容!"); + return; + } + const { status, info } = await this.$request.abnormalRemark({ + deviceId: this.deviceId, + abnormalRemark: this.ntoes, + }); + if (status === 0) { + this.ntoes = ""; + this.diaNotes = false; + this._QueryData(); + } else { + this.$message.error(info); + } + }, async _QueryData() { this.loading = true; - const { - data = {}, - status, - info, - } = await this.$request.pDeviceLogList({ + const deviceList = + this.role != "ROLE_JITUAN" + ? this.$request.deviceList + : this.$request.tenantDeviceList; + this.tableData = []; + const { data, status, info } = await deviceList({ + status: 1, + deviceType: this.type, page: this.page, size: this.size, }); diff --git a/src/views/standard/device/index.vue b/src/views/standard/device/index.vue index 2ec6747..08a0f5e 100644 --- a/src/views/standard/device/index.vue +++ b/src/views/standard/device/index.vue @@ -48,8 +48,14 @@ 授课端管理 -

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

@@ -693,6 +699,8 @@ export default { size: 20, isBack: false, //是否是日志页面回来 upgradeFlag: false, + stationCount: 0, //异常基站数量 + clickerCount: 0, //异常答题器数量 }; }, created() { @@ -700,12 +708,12 @@ export default { this.role = this.$store.getters.info.showRole || this.$store.getters.info.permissions[0].role; + this._QueryErrorTotal(); if (this.role == "ROLE_JITUAN") { (this.props.lazy = true), (this.props.lazyLoad = function (node, resolve) { const { level } = node; if (level == 2) { - console.log(node); api .tenantClassList({ schoolId: node.data.value, @@ -716,8 +724,6 @@ export default { return a.grade - b.grade; } ); - console.log(); - const nodes = [...children]; // 通过调用resolve将子节点数据返回,通知组件数据加载完成 resolve(nodes); @@ -738,7 +744,6 @@ export default { activated() { const that = this; this.isBack = this.$route.query.back ? this.$route.query.back : false; - console.log(this.$route.query.back); if (!this.isBack) { that.type = 1; that.page = 1; @@ -1246,6 +1251,21 @@ export default { this.$message.error(info); } }, + // 异常设备数量 + async _QueryErrorTotal() { + const abnormalDeviceCount = + this.role != "ROLE_JITUAN" + ? this.$request.abnormalDeviceCount + : this.$request.tenantAbnormalDeviceCount; + this.tableData = []; + const { data, status, info } = await abnormalDeviceCount(); + if (status == 0) { + this.stationCount = data?.stationCount; + this.clickerCount = data?.clickerCount; + } else { + this.$message.error(info); + } + }, }, }; @@ -1262,8 +1282,8 @@ export default { .down { padding: 0 0 16px 20px; } -.error-tips{ - margin-bottom:12px; +.error-tips { + margin-bottom: 12px; } .content { background: #f8f8f8; diff --git a/src/views/standard/setUp/archived.vue b/src/views/standard/setUp/archived.vue index 1634a33..82297fb 100644 --- a/src/views/standard/setUp/archived.vue +++ b/src/views/standard/setUp/archived.vue @@ -94,9 +94,8 @@

通过Excel名单导入任课老师名单模板,点击 导出分班后任课老师 - 。 + >导出未分配教师。

@@ -148,12 +147,14 @@