Compare commits
No commits in common. "5fa328fd9365d1daa593b4d975e35a83f9b401a1" and "7c3625550832617035235a78f03a21e21ddc1cb0" have entirely different histories.
5fa328fd93
...
7c36255508
|
@ -27,15 +27,6 @@ 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({
|
||||||
|
|
|
@ -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, listClassworkdataNew } from '@/api/classTask'
|
import { listByDeadDate, listClassworkdata } 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,11 +140,10 @@ 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,//学科
|
||||||
|
@ -219,7 +218,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(','),
|
||||||
|
@ -229,21 +228,7 @@ 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,
|
||||||
|
|
|
@ -349,7 +349,7 @@ const getClassWorkStudentList = (rowId) => {
|
||||||
// 常规作业(去除【】前后引号).replace(/"(\[.*\])"/g, '$1'); :eg: "feedcontent\":\"[{\"name\":\"Bliss.jpg\",\"url\":\"https://wzyzoss.3b8daa474.jpg\"}]\",
|
// 常规作业(去除【】前后引号).replace(/"(\[.*\])"/g, '$1'); :eg: "feedcontent\":\"[{\"name\":\"Bliss.jpg\",\"url\":\"https://wzyzoss.3b8daa474.jpg\"}]\",
|
||||||
// json转换会报错; .replace(/""/g, '"') eg: ""宇宙环境安全""
|
// json转换会报错; .replace(/""/g, '"') eg: ""宇宙环境安全""
|
||||||
response.rows[i].classworkevallist = escapeHtmlQuotes(response.rows[i].classworkevallist)
|
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 + ']')
|
const evalarray = JSON.parse('[' + response.rows[i].classworkevallist + ']')
|
||||||
var scoingCount = 0
|
var scoingCount = 0
|
||||||
var feedcount = 0
|
var feedcount = 0
|
||||||
|
@ -362,7 +362,7 @@ const getClassWorkStudentList = (rowId) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//console.log(evalarray, 'evalarray------------------------------------')
|
console.log(evalarray, 'evalarray------------------------------------')
|
||||||
if (feedcount > 0) {
|
if (feedcount > 0) {
|
||||||
// 多个题目的总得分率: 正确题数/(题目数*100)
|
// 多个题目的总得分率: 正确题数/(题目数*100)
|
||||||
response.rows[i].scoingRate = ((scoingCount / feedcount) * 100).toFixed(0) + '%'
|
response.rows[i].scoingRate = ((scoingCount / feedcount) * 100).toFixed(0) + '%'
|
||||||
|
|
|
@ -345,7 +345,6 @@ watchEffect(() => { initData() })
|
||||||
}
|
}
|
||||||
.t-left{width: 160px;text-align: left;}
|
.t-left{width: 160px;text-align: left;}
|
||||||
.c-respond{
|
.c-respond{
|
||||||
text-align: left;
|
|
||||||
.el-tag{margin: 0 5px;}
|
.el-tag{margin: 0 5px;}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -341,7 +341,7 @@ const getClassWorkStudentList = (rowId) => {
|
||||||
// 常规作业(去除【】前后引号).replace(/"(\[.*\])"/g, '$1'); :eg: "feedcontent\":\"[{\"name\":\"Bliss.jpg\",\"url\":\"https://wzyzoss.3b8daa474.jpg\"}]\",
|
// 常规作业(去除【】前后引号).replace(/"(\[.*\])"/g, '$1'); :eg: "feedcontent\":\"[{\"name\":\"Bliss.jpg\",\"url\":\"https://wzyzoss.3b8daa474.jpg\"}]\",
|
||||||
// json转换会报错; .replace(/""/g, '"') eg: ""宇宙环境安全""
|
// json转换会报错; .replace(/""/g, '"') eg: ""宇宙环境安全""
|
||||||
response.rows[i].classworkevallist = escapeHtmlQuotes(response.rows[i].classworkevallist)
|
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 + ']')
|
const evalarray = JSON.parse('[' + response.rows[i].classworkevallist + ']')
|
||||||
var scoingCount = 0
|
var scoingCount = 0
|
||||||
var feedcount = 0
|
var feedcount = 0
|
||||||
|
@ -354,7 +354,7 @@ const getClassWorkStudentList = (rowId) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//console.log(evalarray, 'evalarray------------------------------------')
|
console.log(evalarray, 'evalarray------------------------------------')
|
||||||
if (feedcount > 0) {
|
if (feedcount > 0) {
|
||||||
// 多个题目的总得分率: 正确题数/(题目数*100)
|
// 多个题目的总得分率: 正确题数/(题目数*100)
|
||||||
response.rows[i].scoingRate = ((scoingCount / feedcount) * 100).toFixed(0) + '%'
|
response.rows[i].scoingRate = ((scoingCount / feedcount) * 100).toFixed(0) + '%'
|
||||||
|
@ -531,7 +531,6 @@ const workHandle = (type) => {
|
||||||
classWorkAnalysis.view = type
|
classWorkAnalysis.view = type
|
||||||
const isClose = type != 'quizStats' && !! classWorkActiveData.timerId
|
const isClose = type != 'quizStats' && !! classWorkActiveData.timerId
|
||||||
const isOpen = type == 'quizStats' && !classWorkActiveData.timerId
|
const isOpen = type == 'quizStats' && !classWorkActiveData.timerId
|
||||||
// 每次进来都重新调用一次
|
|
||||||
if(type == 'quizStats') {
|
if(type == 'quizStats') {
|
||||||
getWorkFeedList();
|
getWorkFeedList();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue