Merge pull request 'baigl' (#208) from baigl into main
Reviewed-on: #208
This commit is contained in:
commit
610aac6985
|
@ -140,7 +140,7 @@ const getClassWorkList = () => {
|
|||
edustage: userStore.edustage,// 学段
|
||||
edusubject: userStore.edusubject,//学科
|
||||
deaddate: tabActive.value === '进行中'? getTomorrow() : EndDate.value,// 进行中:明天,已结束:选择的日期
|
||||
orderby: 'uniquekey DESC',
|
||||
orderby: 'concat(deaddate,uniquekey) DESC',
|
||||
pageSize: 100
|
||||
}).then((response) => {
|
||||
for (var i = 0; i < response.rows.length; i++) {
|
||||
|
@ -213,7 +213,8 @@ const getStudentClassWorkData = () => {
|
|||
edustage: userStore.edustage,// 学段
|
||||
edusubject: userStore.edusubject,//学科
|
||||
deaddate: tabActive.value === '进行中'? getTomorrow() : EndDate.value,// 进行中:明天,已结束:选择的日期
|
||||
orderby: "uniquekey DESC",
|
||||
status: '1', // 作业状态:1-已发布
|
||||
orderby: "uniquekey DESC",// TODO: 这里是否加 deaddate 的排序,后续看
|
||||
pageSize: 1000
|
||||
}).then((res) => {
|
||||
for (var t = 0; t < classWorkList.value.length; t++) {
|
||||
|
@ -369,7 +370,8 @@ const getStudentVisible = async () => {
|
|||
edustage: userStore.edustage,// 学段
|
||||
edusubject: userStore.edusubject,//学科
|
||||
deaddate: tabActive.value === '进行中'? getTomorrow() : EndDate.value,// 进行中:明天,已结束:选择的日期
|
||||
orderby: 'uniquekey DESC',
|
||||
status: '1', // 作业状态:1-已发布
|
||||
orderby: 'concat(deaddate,uniquekey) DESC',
|
||||
pageSize: 100
|
||||
})
|
||||
const curWorkList = response.rows
|
||||
|
|
|
@ -150,6 +150,7 @@
|
|||
:min-scale="0.2"
|
||||
:preview-src-list="stuItem.imagefile"
|
||||
:initial-index="4"
|
||||
fit="contain"
|
||||
/>
|
||||
</div>
|
||||
</el-col>
|
||||
|
@ -233,6 +234,7 @@
|
|||
.map((item) => item.url)
|
||||
"
|
||||
:initial-index="4"
|
||||
fit="contain"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -276,6 +278,7 @@
|
|||
.map((item) => item.url)
|
||||
"
|
||||
:initial-index="4"
|
||||
fit="contain"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -314,7 +317,6 @@
|
|||
</el-card>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 批改评价与评语 -->
|
||||
<div class="tacher_conten_foot">
|
||||
|
@ -401,7 +403,7 @@
|
|||
<el-input
|
||||
v-model="classWorkFormScore.teacherremark"
|
||||
type="textarea"
|
||||
rows="3"
|
||||
rows="1"
|
||||
placeholder="请输入评语说明"
|
||||
/>
|
||||
</el-col>
|
||||
|
@ -413,6 +415,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- :style="{ height: dialogProps.maxheight + 'px' }" -->
|
||||
<el-dialog
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<el-scrollbar height="500px">
|
||||
<ul>
|
||||
<!--作业-->
|
||||
<li class="flex class-item home-list" v-for="item in homeworkList" :key="item.id">
|
||||
<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-name flex">
|
||||
<span class="name">{{ item.uniquekey }}</span>
|
||||
|
@ -27,6 +27,7 @@
|
|||
</ul>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
<item-dialog ref="itemDialogRef" @cle-click="closeDialog"></item-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
|
@ -34,13 +35,15 @@ import { ref, onMounted } from 'vue'
|
|||
import useUserStore from '@/store/modules/user'
|
||||
import { getSelfReserv } from '@/api/classManage'
|
||||
import { homeworklist } from '@/api/teaching/classwork'
|
||||
import { getCurrentTime } from '@/utils/date'
|
||||
import { getCurrentTime, getTomorrow } from '@/utils/date'
|
||||
import ItemDialog from '@/views/classTask/container/item-dialog.vue'
|
||||
|
||||
const type = ref(-1)
|
||||
const user = useUserStore().user
|
||||
const loading = ref(false)
|
||||
const classList = ref([])
|
||||
const homeworkList = ref([])
|
||||
const itemDialogRef = ref(null)
|
||||
|
||||
// 获取上课
|
||||
const getClass = async () => {
|
||||
|
@ -59,15 +62,34 @@ const getHomework = async () => {
|
|||
loading.value = true
|
||||
const { edustage, edusubject } = user
|
||||
try {
|
||||
const { rows } = await homeworklist({ edituserid: user.userId, edustage, edusubject, status: '1' ,orderby: 'uniquekey DESC', pageSize: 500 })
|
||||
homeworkList.value = rows.filter(item => item.deaddate && item.uniquekey)
|
||||
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.forEach((item) => {
|
||||
item.workdatacount = JSON.parse('[' + item.classworkdatastudentids + ']').length
|
||||
// 如果是习题训练任务,则检查一共有多少道
|
||||
if (item.entpcourseworklist != '') {
|
||||
item.entpcourseworklistarray = JSON.parse(
|
||||
'[' + item.entpcourseworklist + ']'
|
||||
)
|
||||
} else {
|
||||
item.entpcourseworklistarray = []
|
||||
}
|
||||
})
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
// 批改作业
|
||||
const onClickItem = (item) => {
|
||||
console.log('开启弹窗')
|
||||
itemDialogRef.value.openDialog(item)
|
||||
}
|
||||
// 批阅关闭
|
||||
const closeDialog = () => {
|
||||
console.log('关闭弹窗,查询一下作业数据,更新界面')
|
||||
getHomework()
|
||||
}
|
||||
|
||||
const tagType = (time) => {
|
||||
return getCurrentTime('YYYY-MM-DD HH:mm') > time ? 'info' : 'warning'
|
||||
|
|
|
@ -104,12 +104,14 @@ const menuList = [{
|
|||
{
|
||||
name: '作业设计',
|
||||
icon: 'icon-jiaoxuefansi',
|
||||
disabled: true
|
||||
isOuter: true,
|
||||
path: '/teaching/classtaskassign?titleName=作业布置&&openDialog=newClassTask'
|
||||
},
|
||||
{
|
||||
name: '作业布置',
|
||||
icon: 'icon-xiezuo1',
|
||||
disabled: true
|
||||
isOuter: true,
|
||||
path: '/teaching/classtaskassign?titleName=作业布置'
|
||||
},
|
||||
{
|
||||
name: '作业批改',
|
||||
|
|
Loading…
Reference in New Issue