From ec6394d12629bc985c2e7342cd30efcea8219a27 Mon Sep 17 00:00:00 2001 From: 梁保满 Date: Tue, 9 May 2023 14:52:20 +0800 Subject: [PATCH] v1.3.1。细节调整 --- src/api/apis/apis.js | 16 ++++++++++++++++ src/api/urls/apis.js | 4 ++++ src/utils/index.js | 4 ++-- src/views/examinationPaper/add.vue | 21 +++++++++++---------- src/views/layout/layout.vue | 3 --- src/views/standard/device/index.vue | 25 +++++++++++++++++++++++++ src/views/standard/setUp/school.vue | 55 +++++++++++++++++++++++++++++++++++++++++++++---------- src/views/standard/setUp/student.vue | 108 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------- src/views/standard/setUp/teacher.vue | 28 ++++++++++++++++++++++++---- 9 files changed, 192 insertions(+), 72 deletions(-) diff --git a/src/api/apis/apis.js b/src/api/apis/apis.js index 2bfd73e..415a2d6 100644 --- a/src/api/apis/apis.js +++ b/src/api/apis/apis.js @@ -410,6 +410,14 @@ export default { data, }); }, + // 删除科目 + delSubject(data) { + return service({ + url: setUpUrls.delSubject, + method: "POST", + data, + }); + }, // 修改年级信息 updateGrade(data) { return service({ @@ -600,6 +608,14 @@ export default { data, }); }, + // 设备自动升级状态(全部) + modifyUpgradeFlagBySchool(data) { + return service({ + url: setUpUrls.modifyUpgradeFlagBySchool, + method: "POST", + data, + }); + }, // 修改基站信息 updateDevice(data) { return service({ diff --git a/src/api/urls/apis.js b/src/api/urls/apis.js index de130aa..2fc9d29 100644 --- a/src/api/urls/apis.js +++ b/src/api/urls/apis.js @@ -99,6 +99,8 @@ export default { gradeList: "/api_html/school/manager/gradeList", // 查询学校所有科目 subjectList: "/api_html/school/manager/subjectList", + // 删除科目 + delSubject: "/api_html/school/manager/delSubject", // 修改年级信息 updateGrade: "/api_html/school/manager/updateGrade", // 查询学校班级列表 @@ -148,6 +150,8 @@ export default { deviceLogList: "/api_html/school/manager/deviceLogList", // 修改设备自动升级状态 modifyUpgradeFlag: "/api_html/school/manager/modifyUpgradeFlag", + // 设备自动升级状态(全部) + modifyUpgradeFlagBySchool: "/api_html/school/manager/modifyUpgradeFlagBySchool", // 修改基站信息 updateDevice: "/api_html/school/manager/updateDevice", // 新增基站 diff --git a/src/utils/index.js b/src/utils/index.js index 2d6e653..6890601 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -412,7 +412,7 @@ export function getURLParams(variable) { * @param {*} questionCount 题目数目 */ function filtterChar(s, b, optionCount) { - const ms = "ABCDEFG"; + const ms = "ABCDEFGHIJ"; let rs = ""; for (let i = 0; i < s.length; i++) { let c = s[i]; @@ -430,7 +430,7 @@ function filtterChar(s, b, optionCount) { } function removeDup(s) { - const ms = "ABCDEFG"; + const ms = "ABCDEFGHIJ"; let rs = ""; for (let i = 0; i < ms.length; i++) { if (s.indexOf(ms[i]) >= 0) { diff --git a/src/views/examinationPaper/add.vue b/src/views/examinationPaper/add.vue index f427129..42bd558 100644 --- a/src/views/examinationPaper/add.vue +++ b/src/views/examinationPaper/add.vue @@ -334,7 +334,7 @@ subQuestions.questionType == 3 || subQuestions.questionType == 2 " - class="answer-box" + class="answer-box answer-box2" > 6) return; + if (length > 9) return; subQuestions.selectNum = length + 1; subQuestions.answerOptions = this.rightOptions .slice(0, subQuestions.selectNum) @@ -1940,11 +1940,15 @@ export default { .answer-s { cursor: pointer; user-select: none; + margin-bottom: 10px; &:first-of-type { margin-left: 0; } } } + .answer-box2 { + margin-bottom: 10px; + } .delButton { text-indent: -9999999px; border-color: #ff6868; @@ -2169,10 +2173,7 @@ export default { flex: 1; } .qs-set { - width: 190px; - .delete { - margin-left: 9px; - } + width: 60px; } .qs-options2 { text-align: left; diff --git a/src/views/layout/layout.vue b/src/views/layout/layout.vue index c2cb379..126047b 100644 --- a/src/views/layout/layout.vue +++ b/src/views/layout/layout.vue @@ -13,9 +13,6 @@ - diff --git a/src/views/standard/device/index.vue b/src/views/standard/device/index.vue index 937a0cf..1092e93 100644 --- a/src/views/standard/device/index.vue +++ b/src/views/standard/device/index.vue @@ -396,6 +396,11 @@ >停止自动更新 +

+ 全校更新: + + +

加载中 @@ -682,6 +687,7 @@ export default { page: 1, size: 20, isBack: false, //是否是日志页面回来 + upgradeFlag: false, }; }, created() { @@ -816,6 +822,9 @@ export default { return item.id; }); }, + changeUpdateBySchool: _.debounce(function (event) { + this._ModifyUpgradeFlagBySchool(); + }, 800), changeUpdate: _.debounce(function (event, obj) { console.log(this); if (event) { @@ -839,6 +848,18 @@ export default { this.isAdd = true; this.diaAnswerEqu = true; }, + _ModifyUpgradeFlagBySchool() { + let data = this.$request.modifyUpgradeFlagBySchool({ + upgradeFlag: this.upgradeFlag ? 1 : 0, + }); + if (data && !data.code) { + this._QueryData(false); + this.selectionTabIds = []; + this.$message.success("开启自动更新成功"); + } else { + this.$message.error(data.info); + } + }, async showSchool() { const { data, status, info } = await this.$request.schoolList(); if (status === 0) { @@ -1287,6 +1308,10 @@ export default { .answer-header { padding: 0; margin-bottom: 12px; + .upgrade-all{ + display: flex; + align-items: center; + } } } } diff --git a/src/views/standard/setUp/school.vue b/src/views/standard/setUp/school.vue index 50cffd9..27debf5 100644 --- a/src/views/standard/setUp/school.vue +++ b/src/views/standard/setUp/school.vue @@ -121,7 +121,7 @@ label-width="160px" > -

+
{{ showAll ? "收起" : "更多..." }} - {{ item }} +

+ {{ item }} + +

@@ -301,6 +299,7 @@ export default { }, subjectName: "", sectionsList: [], + subjectLoading:false, subjectList: [], diaUpgradeGrade: false, //班级升级 defaultSections: [], @@ -399,6 +398,20 @@ export default { } }); }, + async _DelSubject(subject, index) { + if(this.subjectLoading)return + this.subjectLoading = true + const { status, info } = await this.$request.delSubject({ + subjectName: subject, + }); + this.subjectLoading = false + if (status === 0) { + this.$message.success(info); + this.subjectList.splice(index, 1); + } else { + this.$message.error(info); + } + }, async _UpgradeGrade() { this.loading = true; const { data, status, info } = await this.$request.upgradeGrade(); @@ -640,9 +653,6 @@ export default { color: #667ffd; } } - .el-checkbox:last-of-type { - margin-right: 30px; - } } } .el-icon-plus { @@ -651,4 +661,29 @@ export default { color: #667ffd; } } +:deep(.el-checkbox-group) { + display: flex; + flex-wrap: wrap; + .p1 { + padding-right: 30px; + position: relative; + &:hover { + .el-icon-delete { + display: block; + } + .is-checked + .el-icon-delete { + display: none; + } + } + } + .el-icon-delete { + font-size: 14px; + color: #999; + position: absolute; + right: 10px; + top: 13px; + cursor: pointer; + display: none; + } +} \ No newline at end of file diff --git a/src/views/standard/setUp/student.vue b/src/views/standard/setUp/student.vue index 5d08757..0b15eda 100644 --- a/src/views/standard/setUp/student.vue +++ b/src/views/standard/setUp/student.vue @@ -32,7 +32,34 @@ - +
+
+ + + + + + +
+