Compare commits

..

6 Commits

Author SHA1 Message Date
zouyf 5fa328fd93 Merge pull request 'zouyf_dev' (#288) from zouyf_dev into main
Reviewed-on: #288
2024-09-27 16:30:52 +08:00
“zouyf” eab46ec7f4 Merge branch 'main' into zouyf_dev 2024-09-27 16:17:08 +08:00
“zouyf” 81dd59f564 [作业批改] - 由原来班级查询变更为用户id查询作业 2024-09-27 16:16:55 +08:00
“zouyf” cb15855fc1 Merge branch 'main' into zouyf_dev 2024-09-27 15:11:57 +08:00
“zouyf” 7b3f00ba67 Merge branch 'main' into zouyf_dev
# Conflicts:
#	src/renderer/src/views/classTask/teachClassTask.vue
2024-09-27 14:52:51 +08:00
“zouyf” 2ca4117561 1 2024-09-27 14:50:18 +08:00
5 changed files with 35 additions and 9 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列表 课程作业列表
export function listEntpcoursework(query) {
return request({

View File

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

View File

@ -349,7 +349,7 @@ const getClassWorkStudentList = (rowId) => {
// .replace(/"(\[.*\])"/g, '$1'); eg: "feedcontent\":\"[{\"name\":\"Bliss.jpg\",\"url\":\"https://wzyzoss.3b8daa474.jpg\"}]\",
// json .replace(/""/g, '"') eg: """"
response.rows[i].classworkevallist = escapeHtmlQuotes(response.rows[i].classworkevallist)
console.log('学生完成情况分析classworkevallist', response.rows[i].classworkevallist)
//console.log('classworkevallist', response.rows[i].classworkevallist)
const evalarray = JSON.parse('[' + response.rows[i].classworkevallist + ']')
var scoingCount = 0
var feedcount = 0
@ -362,7 +362,7 @@ const getClassWorkStudentList = (rowId) => {
}
}
}
console.log(evalarray, 'evalarray------------------------------------')
//console.log(evalarray, 'evalarray------------------------------------')
if (feedcount > 0) {
// : /*100
response.rows[i].scoingRate = ((scoingCount / feedcount) * 100).toFixed(0) + '%'

View File

@ -345,6 +345,7 @@ watchEffect(() => { initData() })
}
.t-left{width: 160px;text-align: left;}
.c-respond{
text-align: left;
.el-tag{margin: 0 5px;}
}
}

View File

@ -341,7 +341,7 @@ const getClassWorkStudentList = (rowId) => {
// .replace(/"(\[.*\])"/g, '$1'); eg: "feedcontent\":\"[{\"name\":\"Bliss.jpg\",\"url\":\"https://wzyzoss.3b8daa474.jpg\"}]\",
// json .replace(/""/g, '"') eg: """"
response.rows[i].classworkevallist = escapeHtmlQuotes(response.rows[i].classworkevallist)
console.log('学生完成情况分析classworkevallist', response.rows[i].classworkevallist)
//console.log('classworkevallist', response.rows[i].classworkevallist)
const evalarray = JSON.parse('[' + response.rows[i].classworkevallist + ']')
var scoingCount = 0
var feedcount = 0
@ -354,7 +354,7 @@ const getClassWorkStudentList = (rowId) => {
}
}
}
console.log(evalarray, 'evalarray------------------------------------')
//console.log(evalarray, 'evalarray------------------------------------')
if (feedcount > 0) {
// : /*100
response.rows[i].scoingRate = ((scoingCount / feedcount) * 100).toFixed(0) + '%'
@ -531,6 +531,7 @@ const workHandle = (type) => {
classWorkAnalysis.view = type
const isClose = type != 'quizStats' && !! classWorkActiveData.timerId
const isOpen = type == 'quizStats' && !classWorkActiveData.timerId
//
if(type == 'quizStats') {
getWorkFeedList();
}