lyc-dev #209
|
@ -104,11 +104,16 @@ const getSubjectContent = async () => {
|
||||||
pageSize: 10000
|
pageSize: 10000
|
||||||
}
|
}
|
||||||
|
|
||||||
let data;
|
|
||||||
const { rows } = await listEvaluation(params)
|
if(localStorage.getItem('evaluationList')){
|
||||||
localStorage.setItem('evaluationList', JSON.stringify(rows))
|
evaluationList.value = JSON.parse(localStorage.getItem('evaluationList'))
|
||||||
evaluationList.value = rows
|
}
|
||||||
data = rows
|
else{
|
||||||
|
const { rows } = await listEvaluation(params)
|
||||||
|
localStorage.setItem('evaluationList', JSON.stringify(rows))
|
||||||
|
evaluationList.value = rows
|
||||||
|
}
|
||||||
|
|
||||||
treeLoading.value = false
|
treeLoading.value = false
|
||||||
|
|
||||||
//获取教材版本
|
//获取教材版本
|
||||||
|
@ -263,12 +268,16 @@ const transData = (data) => {
|
||||||
|
|
||||||
//获取教材
|
//获取教材
|
||||||
const getSubject = async () => {
|
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', })
|
||||||
|
|
||||||
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
|
||||||
// subjectList.value = rows.filter(item => item.edustage == edustage && item.edusubject == edusubject)
|
localStorage.setItem('subjectList', JSON.stringify(subjectList.value))
|
||||||
subjectList.value = rows
|
}
|
||||||
localStorage.setItem('subjectList', JSON.stringify(subjectList.value))
|
|
||||||
|
|
||||||
// 默认第一个
|
// 默认第一个
|
||||||
if(!subjectList.value.length) return
|
if(!subjectList.value.length) return
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
destory-on-close
|
destory-on-close
|
||||||
:before-close="onBeforeClose"
|
:before-close="onBeforeClose"
|
||||||
>
|
>
|
||||||
<template #title>
|
<template #header>
|
||||||
<div style="font-size: 18px; display: flex; flex-wrap: nowrap">
|
<div style="font-size: 18px; display: flex; flex-wrap: nowrap">
|
||||||
<div style="flex: 1">
|
<div style="flex: 1">
|
||||||
{{ classWorkAnalysis.title }}答题情况
|
{{ classWorkAnalysis.title }}答题情况
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<el-scrollbar height="500px">
|
<el-scrollbar height="500px">
|
||||||
<ul>
|
<ul>
|
||||||
<!--作业-->
|
<!--作业-->
|
||||||
<li class="flex class-item home-list" v-for="item in homeworkList" :key="item.id" @click="onClickItem(item)">
|
<li class="flex class-item home-list" v-for="item in homeworkList" :key="item.id" @click="onClickItem(item)">
|
||||||
<div class="class-left flex">
|
<div class="class-left flex">
|
||||||
<div class="class-name flex">
|
<div class="class-name flex">
|
||||||
<span class="name">{{ item.uniquekey }}</span>
|
<span class="name">{{ item.uniquekey }}</span>
|
||||||
|
@ -24,6 +24,7 @@
|
||||||
<div>已交</div>
|
<div>已交</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
<el-empty v-if="!homeworkList.length" description="暂无数据" />
|
||||||
</ul>
|
</ul>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
|
@ -49,7 +50,7 @@ const itemDialogRef = ref(null)
|
||||||
const getClass = async () => {
|
const getClass = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
const res = await getSelfReserv()
|
const res = await getSelfReserv()
|
||||||
let list = res.data || []
|
let list = res.data || []
|
||||||
list.sort((a, b) => { if (a.status == '上课中') return -1; else return 0 })
|
list.sort((a, b) => { if (a.status == '上课中') return -1; else return 0 })
|
||||||
classList.value = list.filter(item => item.status !== '已结束')
|
classList.value = list.filter(item => item.status !== '已结束')
|
||||||
|
@ -62,9 +63,9 @@ const getHomework = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
const { edustage, edusubject } = user
|
const { edustage, edusubject } = user
|
||||||
try {
|
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) => {
|
homeworkList.value.forEach((item) => {
|
||||||
item.workdatacount = JSON.parse('[' + item.classworkdatastudentids + ']').length
|
item.workdatacount = JSON.parse('[' + item.classworkdatastudentids + ']').length
|
||||||
// 如果是习题训练任务,则检查一共有多少道
|
// 如果是习题训练任务,则检查一共有多少道
|
||||||
|
@ -86,7 +87,7 @@ const onClickItem = (item) => {
|
||||||
itemDialogRef.value.openDialog(item)
|
itemDialogRef.value.openDialog(item)
|
||||||
}
|
}
|
||||||
// 批阅关闭
|
// 批阅关闭
|
||||||
const closeDialog = () => {
|
const closeDialog = () => {
|
||||||
console.log('关闭弹窗,查询一下作业数据,更新界面')
|
console.log('关闭弹窗,查询一下作业数据,更新界面')
|
||||||
getHomework()
|
getHomework()
|
||||||
}
|
}
|
||||||
|
@ -114,7 +115,8 @@ onMounted(() => {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
.title{
|
|
||||||
|
.title {
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -185,8 +187,7 @@ onMounted(() => {
|
||||||
}
|
}
|
||||||
|
|
||||||
.class-grade {
|
.class-grade {
|
||||||
padding-top: 3px
|
padding-top: 3px }
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,6 +135,8 @@ function submit() {
|
||||||
userStore.login({username:props.user.userName,password:props.user.plainpwd}).then(() => {
|
userStore.login({username:props.user.userName,password:props.user.plainpwd}).then(() => {
|
||||||
userStore.getInfo().then(res => {
|
userStore.getInfo().then(res => {
|
||||||
if(res.code === 200){
|
if(res.code === 200){
|
||||||
|
localStorage.removeItem('subjectList')
|
||||||
|
localStorage.removeItem('evaluationList')
|
||||||
ElMessage.success('修改成功')
|
ElMessage.success('修改成功')
|
||||||
}else{
|
}else{
|
||||||
ElMessage.error(response.msg)
|
ElMessage.error(response.msg)
|
||||||
|
|
Loading…
Reference in New Issue