lyc-dev #209

Merged
lyc merged 2 commits from lyc-dev into main 2024-09-14 15:13:06 +08:00
4 changed files with 31 additions and 19 deletions

View File

@ -104,11 +104,16 @@ const getSubjectContent = async () => {
pageSize: 10000
}
let data;
if(localStorage.getItem('evaluationList')){
evaluationList.value = JSON.parse(localStorage.getItem('evaluationList'))
}
else{
const { rows } = await listEvaluation(params)
localStorage.setItem('evaluationList', JSON.stringify(rows))
evaluationList.value = rows
data = rows
}
treeLoading.value = false
//
@ -263,12 +268,16 @@ const transData = (data) => {
//
const getSubject = async () => {
if(localStorage.getItem('subjectList')){
subjectList.value = JSON.parse(localStorage.getItem('subjectList'))
}
else{
const { rows } = await listEvaluation({ itemkey: "version", edusubject, edustage, pageSize: 10000,orderby: 'orderidx asc', })
// subjectList.value = rows.filter(item => item.edustage == edustage && item.edusubject == edusubject)
subjectList.value = rows
localStorage.setItem('subjectList', JSON.stringify(subjectList.value))
}
//
if(!subjectList.value.length) return

View File

@ -10,7 +10,7 @@
destory-on-close
:before-close="onBeforeClose"
>
<template #title>
<template #header>
<div style="font-size: 18px; display: flex; flex-wrap: nowrap">
<div style="flex: 1">
{{ classWorkAnalysis.title }}答题情况

View File

@ -24,6 +24,7 @@
<div>已交</div>
</div>
</li>
<el-empty v-if="!homeworkList.length" description="暂无数据" />
</ul>
</el-scrollbar>
</div>
@ -62,9 +63,9 @@ const getHomework = async () => {
loading.value = true
const { edustage, edusubject } = user
try {
const { rows } = await homeworklist({ edituserid: user.userId, edustage, edusubject, deaddate: getTomorrow(), status: '1' ,orderby: 'uniquekey DESC', pageSize: 500 })
const { rows } = await homeworklist({ edituserid: user.userId, edustage, edusubject, deaddate: getTomorrow(), status: '1', orderby: 'uniquekey DESC', pageSize: 500 })
//
homeworkList.value = rows.filter(item => item.deaddate && item.uniquekey&& getCurrentTime('YYYY-MM-DD HH:mm') < item.deaddate )
homeworkList.value = rows.filter(item => item.deaddate && item.uniquekey && getCurrentTime('YYYY-MM-DD HH:mm') < item.deaddate)
homeworkList.value.forEach((item) => {
item.workdatacount = JSON.parse('[' + item.classworkdatastudentids + ']').length
//
@ -114,7 +115,8 @@ onMounted(() => {
font-weight: bold;
margin-bottom: 10px;
align-items: center;
.title{
.title {
margin-right: 5px;
}
}
@ -185,8 +187,7 @@ onMounted(() => {
}
.class-grade {
padding-top: 3px
}
padding-top: 3px }
}
}

View File

@ -135,6 +135,8 @@ function submit() {
userStore.login({username:props.user.userName,password:props.user.plainpwd}).then(() => {
userStore.getInfo().then(res => {
if(res.code === 200){
localStorage.removeItem('subjectList')
localStorage.removeItem('evaluationList')
ElMessage.success('修改成功')
}else{
ElMessage.error(response.msg)