diff --git a/src/views/basic/ask/list.vue b/src/views/basic/ask/list.vue index c8b9c68..e7aa68a 100644 --- a/src/views/basic/ask/list.vue +++ b/src/views/basic/ask/list.vue @@ -261,7 +261,7 @@ export default { } let subjectArr = []; this.tableData.map((item) => { - if(this.multipleSelection.includes(item.id)){ + if (this.multipleSelection.includes(item.id)) { subjectArr.push(item.subjectName); } }); @@ -283,8 +283,8 @@ export default { }); }, //删除 - remove(obj) { - const { data, status, info } = this.$request.deletePaperReport({ + async remove(obj) { + const { data, status, info } = await this.$request.deletePaperReport({ id: obj.id, }); if (status === 0) { diff --git a/src/views/basic/setUp/teacher.vue b/src/views/basic/setUp/teacher.vue index 94a848f..90cebc2 100644 --- a/src/views/basic/setUp/teacher.vue +++ b/src/views/basic/setUp/teacher.vue @@ -548,11 +548,11 @@ export default { // this.query.type = 0; this.query.teacherName = ""; this.query.phone = ""; - if (this.query.classType === 0) { - this.teacherRoleList = [...this.RoleList]; - } else { - this.teacherRoleList = this.RoleList.slice(1, 3); - } + // if (this.query.classType === 0) { + // this.teacherRoleList = [...this.RoleList]; + // } else { + // this.teacherRoleList = this.RoleList.slice(1, 3); + // } this._QueryData(6); await this._QueryDataGrade(1); @@ -752,15 +752,16 @@ export default { subjectName: clazz[1], }); }); - } else { - gradeGroupList.push({ - grade: item.classId[0], - gradeName: - this.gradeList.find((items) => items.id == item.classId[0]) - ?.label || "", - subjectName: item.classId[1], - }); } + // else { + // gradeGroupList.push({ + // grade: item.classId[0], + // gradeName: + // this.gradeList.find((items) => items.id == item.classId[0]) + // ?.label || "", + // subjectName: item.classId[1], + // }); + // } }); return { managerList, @@ -807,16 +808,16 @@ export default { classId: [...teacherClassId], }); } - this.formTeacher.gradeGroupList?.map((item) => { - this.formTeacher.roleList.push({ - id: randomWord(true, 16, 20), - roleId: 8, - classId: [ - this.gradeList.find((items) => items.id == item.classId[0]).id, - item.subjectName, - ], - }); - }); + // this.formTeacher.gradeGroupList?.map((item) => { + // this.formTeacher.roleList.push({ + // id: randomWord(true, 16, 20), + // roleId: 8, + // classId: [ + // this.gradeList.find((items) => items.id == item.classId[0]).id, + // item.subjectName, + // ], + // }); + // }); }, //删除教师角色 async delTeacherManager(obj, type) { @@ -987,12 +988,20 @@ export default { let query = {}; if (type == 1) { query.type = this.query.classType; + } else if (type == 3) { + query.type = 0; } //年级数据 const { data, status, info } = await this.$request.gradeList({ ...query, }); if (status === 0) { + if (type == 1) { + this.gradeClassSubList = []; + if (this.query.classType == 0) { + this.gradeClassList = []; + } + } this.gradeList = data.list?.map((item) => { let subList = item.subjectNames?.map((items) => { @@ -1002,19 +1011,6 @@ export default { }; }); if (type == 2) { - // 学校-年级 - this.gradeClassList.push({ - value: item.grade, - label: item.gradeName, - id: item.grade, - children: item.classList.map((clazz) => { - return { - value: clazz.id, - label: clazz.className, - id: clazz.id, - }; - }), - }); //学校-科目-班级 this.gradeSubListClass.push({ value: item.grade, @@ -1044,9 +1040,21 @@ export default { }; }), }); - } else { - this.gradeClassSubList = []; + } else if (type == 1) { if (this.query.classType == 0) { + // 学校-年级 + this.gradeClassList.push({ + value: item.grade, + label: item.gradeName, + id: item.grade, + children: item.classList.map((clazz) => { + return { + value: clazz.id, + label: clazz.className, + id: clazz.id, + }; + }), + }); //学校-年级-科目 this.gradeClassSubList.push({ value: item.grade, diff --git a/src/views/basic/test/list.vue b/src/views/basic/test/list.vue index f991f1b..f78194e 100644 --- a/src/views/basic/test/list.vue +++ b/src/views/basic/test/list.vue @@ -415,7 +415,7 @@ export default { }); if (status === 0) { this.$message.success("删除成功!"); - this.tableData.splice(index, 1); + this._QueryData(); } else { this.$message.error(info); }