From 4623f67f025ac70245b70fe0d842e9505ee00c1f Mon Sep 17 00:00:00 2001 From: 梁保满 Date: Thu, 4 Jan 2024 18:01:13 +0800 Subject: [PATCH] 隋唐问以及教师学生设置 --- src/views/basic/ask/index.vue | 4 ++-- src/views/basic/setUp/student.vue | 18 +++++++++++++----- src/views/basic/setUp/teacher.vue | 48 +++++++++++++++++++++++++++--------------------- 3 files changed, 42 insertions(+), 28 deletions(-) diff --git a/src/views/basic/ask/index.vue b/src/views/basic/ask/index.vue index d9d483b..4824c0b 100644 --- a/src/views/basic/ask/index.vue +++ b/src/views/basic/ask/index.vue @@ -94,10 +94,10 @@ export default { this.query.endDay = new Date(); } }, - + methods: { handleCheckAllChange(val) { - this.checkedCities = val ? this.subjectList : []; + this.query.subjectNames = val ? this.subjectList : []; this.allSubject = false; }, handleChecked(value) { diff --git a/src/views/basic/setUp/student.vue b/src/views/basic/setUp/student.vue index 9461cca..304ef86 100644 --- a/src/views/basic/setUp/student.vue +++ b/src/views/basic/setUp/student.vue @@ -8,14 +8,14 @@ - +
- + @@ -188,7 +188,7 @@
- +

通过Excel名单导入学生答题器绑定模板,点击 模板下载 。 @@ -224,6 +224,7 @@ export default { }, clazzDetail: { stationSn: "", pairingCode: "", frequency: "" }, query: { + classType: 0, //0行政 1教学班 grade: "", classId: "", status: 0, @@ -276,7 +277,6 @@ export default { teacherCourseList: [], teacherGradeList: [], }, - classType: 0 //0行政 1教学班 }; }, @@ -444,6 +444,7 @@ export default { }, async removeStu(obj, index, $event) { const { data, status, info } = await this.$request.delStudent({ + type: this.query.classType, studentId: obj.id, }); if (status === 0) { @@ -459,6 +460,11 @@ export default { this.query.classId = ""; this.query.studentName = ""; this.query.studentCode = ""; + + this.formStu.className = ""; + this.clazzDetail.stationSn = ""; + this.clazzDetail.pairingCode = ""; + this.clazzDetail.frequency = ""; if (val != 80 && val != 81) { await this._QueryClass(val); } @@ -512,6 +518,7 @@ export default { this.loading = true; this.studentList = []; const { data, status, info } = await this.$request.studentList({ + type: this.query.classType, ...query, }); this.loading = false; @@ -542,7 +549,7 @@ export default { this.classList = []; const { data, status, info } = await this.$request.schoolClassList({ grade: value || this.query.grade, - type: this.classType + type: this.query.classType }); if (status === 0) { this.classList = (data.list && [...data?.list]) || []; @@ -559,6 +566,7 @@ export default { this.classList = []; const { data, status, info } = await this.$request.schoolClassList({ grade: value, + type: this.query.classType }); if (status === 0) { this.classList = (data.list && [...data?.list]) || []; diff --git a/src/views/basic/setUp/teacher.vue b/src/views/basic/setUp/teacher.vue index 4fd31ba..189c58b 100644 --- a/src/views/basic/setUp/teacher.vue +++ b/src/views/basic/setUp/teacher.vue @@ -316,7 +316,7 @@ export default { this.code = localStorage.getItem("csCode") || ""; this._QueryData(4); await this._QueryDataGrade(); - this._RoleList(); + // this._RoleList(); }, methods: { async changeType() { @@ -342,6 +342,7 @@ export default { this.indeterminate = checkedCount > 0 && checkedCount < this.teacherList.length; }, + //清除教师绑定班级信息 async remove() { if (!this.clearTeacher.length) { this.$message.warning("请选择要格式化的老师") @@ -374,8 +375,8 @@ export default { gradeName(type) { return setGradeName(type); }, + //导入成功 upSuccess(res) { - //导入成功 this.$message.closeAll(); this.$message({ showClose: true, @@ -386,20 +387,20 @@ export default { this.diaUp = false; this._QueryData(5); }, + //添加教师角色 addRoleList() { - //添加教师角色 this.formTeacher.roleList.push({ id: randomWord(true, 16, 20), roleId: "", classId: [], }); }, + //删除教师角色 removeRoleList(index) { - //删除教师角色 this.formTeacher.roleList.splice(index, 1); }, + //添加教师弹窗 addTeacherDia() { - //添加教师弹窗 this.isAdd = true; this.formTeacher = { teacherName: "", @@ -409,8 +410,8 @@ export default { }; this.diaTeacher = true; }, + //教师角色数量 setClass(obj) { - //教师角色数量 return ( obj.managerList?.length + obj.teacherCourseList?.length + @@ -426,8 +427,8 @@ export default { }); return name; }, + //教师详细数据 showTeacher(obj) { - //教师详细数据 this.showTId = obj.id; this.teacherDetail = { ...obj }; }, @@ -444,8 +445,8 @@ export default { } this.toTeacherForm(); }, + //添加教师 addTeacher() { - //添加教师 this.$refs.formTeacher.validate(async (valid) => { if (valid) { let obj = this.setTeacharForm(); @@ -485,8 +486,8 @@ export default { } }); }, + //转换保存教师数据格式 setTeacharForm() { - //转换保存教师数据格式 let ERR_OK = true; this.formTeacher.roleList.map((item) => { if (item.classId.length == 0) { @@ -532,8 +533,8 @@ export default { return false; } }, + //教师角色数据转换为form格式数据 toTeacherForm() { - //教师角色数据转换为form格式数据 this.formTeacher.roleList = []; this.formTeacher.managerList?.map((item) => { this.formTeacher.roleList.push({ @@ -579,6 +580,7 @@ export default { }); }); }, + //删除教师角色 async delTeacherManager(obj, type) { let query; switch (type) { @@ -604,23 +606,24 @@ export default { //角色 const { data, status, info } = await this.$request.delTeacherManager({ teacherId: obj.teacherId, + type: this.query.classType, ...query, }); if (status === 0) { - this._QueryD6; - } else { - this.$message.error(info); - } - }, - async _RoleList() { - //角色 - const { data, status, info } = await this.$request.roleList(); - if (status === 0) { - this.roleList = data.list || []; + this._QueryData(6); } else { this.$message.error(info); } }, + //角色列表 + // async _RoleList() { + // const { data, status, info } = await this.$request.roleList(); + // if (status === 0) { + // this.roleList = data.list || []; + // } else { + // this.$message.error(info); + // } + // }, setQuery(type) { let query = {}; if (type == 1) { @@ -701,7 +704,7 @@ export default { query.teacherName.length ? "" : delete query.teacherName; query.phone.length ? "" : delete query.phone; } - + query.classType = this.query.classType return query; }, async _QueryData(type) { @@ -749,6 +752,9 @@ export default { }); if (status === 0) { this.classList = [] + this.gradeClassList = [] + this.gradeClassSubList = [] + this.gradeSubListClass = [] this.gradeList = data.list?.map((item) => { let subList = item.subjectNames?.map((items) => { -- libgit2 0.21.4