[作业批改] - 由原来班级查询变更为用户id查询作业

This commit is contained in:
“zouyf” 2024-09-27 16:16:55 +08:00
parent cb15855fc1
commit 81dd59f564
2 changed files with 29 additions and 5 deletions

View File

@ -27,6 +27,15 @@ export function listClassworkdata(query) {
}) })
} }
// 新接口---查询classworkdata列表 班级作业列表
export function listClassworkdataNew(query) {
return request({
url: '/education/classworkdata/new/list',
method: 'get',
params: query
})
}
// 查询entpcoursework列表 课程作业列表 // 查询entpcoursework列表 课程作业列表
export function listEntpcoursework(query) { export function listEntpcoursework(query) {
return request({ return request({

View File

@ -63,7 +63,7 @@
<script setup> <script setup>
import { ref, onMounted, onUnmounted, computed, watch } from 'vue' import { ref, onMounted, onUnmounted, computed, watch } from 'vue'
import { listByDeadDate, listClassworkdata } from '@/api/classTask' import { listByDeadDate, listClassworkdata, listClassworkdataNew } from '@/api/classTask'
import TaskItem from '@/views/classTask/container/task-item.vue' import TaskItem from '@/views/classTask/container/task-item.vue'
// import ItemDialog from '@/views/classTask/container/item-dialog.vue' // import ItemDialog from '@/views/classTask/container/item-dialog.vue'
@ -119,7 +119,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
@ -140,10 +140,11 @@ const getClassList = () => {
* 2获取班级作业 * 2获取班级作业
*/ */
const getClassWorkList = async () => { const getClassWorkList = async () => {
if(classTaskStore.classListIds.length>0){ //if(classTaskStore.classListIds.length>0){
{
// homeworklist // homeworklist
const response = await listByDeadDate({ const response = await listByDeadDate({
classidarray: classTaskStore.classListIds.join(','), //classidarray: classTaskStore.classListIds.join(','),
edituserid: userStore.userId, // id edituserid: userStore.userId, // id
edustage: userStore.edustage, // edustage: userStore.edustage, //
edusubject: userStore.edusubject,// edusubject: userStore.edusubject,//
@ -218,7 +219,7 @@ const getClassWorkList = async () => {
const getStudentClassWorkData = async() => { const getStudentClassWorkData = async() => {
// const { chapterId } = await useGetHomework(props.bookobj.node) // const { chapterId } = await useGetHomework(props.bookobj.node)
// this.entpcourseid = chapterId // this.entpcourseid = chapterId
if(classTaskStore.classListIds.length>0){ //if(classTaskStore.classListIds.length>0){
// listClassworkdataByDeadDate({ // listClassworkdataByDeadDate({
// edituserid: userStore.userId, // id // edituserid: userStore.userId, // id
// classids: classTaskStore.classListIds.join(','), // classids: classTaskStore.classListIds.join(','),
@ -228,7 +229,21 @@ const getStudentClassWorkData = async() => {
// orderby: "deaddate DESC",// TODO deaddate // orderby: "deaddate DESC",// TODO deaddate
// pageSize: 1000, // pageSize: 1000,
// }) // })
// listClassworkdataNew({
// classworkids: ids, // id
// edituserid: userStore.userId, // id
// edusubject: userStore.edusubject,//
// evalStatus: 1,
// pageSize: 1000,
// })
{
const ids = classWorkList.value.map((item) => item.id).join(','); const ids = classWorkList.value.map((item) => item.id).join(',');
if (ids == '') {
return;
}
listClassworkdata({ listClassworkdata({
classworkids: ids, classworkids: ids,
pageSize: 1000, pageSize: 1000,