作业布置:推送多个班级的学生bug修复 #313

Merged
baigl merged 1 commits from baigl into main 2024-10-14 10:59:56 +08:00
2 changed files with 5 additions and 7 deletions

View File

@ -1,8 +1,3 @@
<!--
* @Author: 苦逼程序猿
* @Date: 2024-09-06 16:58:59
* @Warning: 千行代码Bug露锋芒
-->
<template> <template>
<el-container class="class-reserv-wrap"> <el-container class="class-reserv-wrap">
<div style="display: flex; justify-content: space-between;"> <div style="display: flex; justify-content: space-between;">
@ -121,7 +116,7 @@ const getData = async () => {
classWorkList.value = [] classWorkList.value = []
loading.value = true loading.value = true
// 1 // 1
//getClassList() // getClassList()
// 2 // 2
await getClassWorkList() await getClassWorkList()
// 3 // 3

View File

@ -889,6 +889,8 @@ const handleWorkConfigUpdate = (key,row) => {
classWorkConfigForm.classWorkConfigList = []; classWorkConfigForm.classWorkConfigList = [];
// //
for (var i=0; i<clist.length; i++) { for (var i=0; i<clist.length; i++) {
// clist classWorkConfigForm.studentlist studentlistid
const clsStuList = classWorkConfigForm.studentlist&&classWorkConfigForm.studentlist.filter(item=>item.classid == clist[i].id);
classWorkConfigForm.classWorkConfigList.push({ classWorkConfigForm.classWorkConfigList.push({
id: 0, id: 0,
classid: clist[i].id, classid: clist[i].id,
@ -904,7 +906,7 @@ const handleWorkConfigUpdate = (key,row) => {
workdate: '', workdate: '',
title: '', title: '',
workcodes: '', workcodes: '',
studentlist: classWorkConfigForm.studentlist, studentlist: clsStuList,
timelength: classWorkConfigForm.timelength, timelength: classWorkConfigForm.timelength,
weights: classWorkConfigForm.weights, weights: classWorkConfigForm.weights,
feedtype: classWorkConfigForm.feedtype, feedtype: classWorkConfigForm.feedtype,
@ -1018,6 +1020,7 @@ const handleTaskAssignToAllClassType = async() => {
var wForm = {}; var wForm = {};
wForm.classworkarray = JSON.stringify(ttt); wForm.classworkarray = JSON.stringify(ttt);
console.log(wForm,'推送的配置信息------------')
saveByClassWorkArray(wForm).then(response => { saveByClassWorkArray(wForm).then(response => {
console.log(response,'===============response'); console.log(response,'===============response');
// this.classWorkToStudent_Loading = false; // this.classWorkToStudent_Loading = false;