Merge pull request 'baigl' (#330) from baigl into main
Reviewed-on: #330
This commit is contained in:
commit
83c377fd9e
|
@ -58,17 +58,17 @@
|
|||
|
||||
<script setup>
|
||||
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/classTask/task-item.vue'
|
||||
// import ItemDialog from '@/views/classTask/container/item-dialog.vue'
|
||||
import { useToolState } from '@/store/modules/tool'
|
||||
import { getCurrentTime, getTomorrow } from '@/utils/date'
|
||||
import { getCurrentTime } from '@/utils/date'
|
||||
import useUserStore from '@/store/modules/user'
|
||||
import useClassTaskStore from "@/store/modules/classTask";
|
||||
import {createWindow} from '@/utils/tool'
|
||||
import {sessionStore} from '@/utils/store'
|
||||
import {throttle,debounce } from '@/utils/comm'
|
||||
import {debounce } from '@/utils/comm'
|
||||
|
||||
|
||||
const toolState = useToolState();
|
||||
|
@ -141,14 +141,12 @@ const getClassWorkList = async () => {
|
|||
{
|
||||
// 班级作业数据,包含多个班级 homeworklist
|
||||
const response = await listByDeadDate({
|
||||
//classidarray: classTaskStore.classListIds.join(','),
|
||||
edituserid: userStore.userId, // 老师的id
|
||||
edustage: userStore.edustage, // 学段
|
||||
edusubject: userStore.edusubject,//学科
|
||||
// deaddate: tabActive.value === '进行中'? getTomorrow() : EndDate.value,// 进行中:明天,已结束:选择的日期 弃用
|
||||
deaddate: EndDate.value,// 进行中:明天,已结束:选择的日期
|
||||
status: '1', // 作业状态:1-已发布
|
||||
// orderby: 'concat(deaddate,uniquekey) DESC',
|
||||
orderby: 'deaddate DESC',
|
||||
pageSize: 100,
|
||||
})
|
||||
|
@ -182,7 +180,7 @@ const getClassWorkList = async () => {
|
|||
// 处理任务类型的UI
|
||||
if (list[i].worktype == '学习目标定位') {
|
||||
list[i].workclass = 'success'
|
||||
list[i].workcodesList = JSON.parse(response.rows[i].workcodes)
|
||||
list[i].workcodesList = JSON.parse(list[i].workcodes)
|
||||
} else if (list[i].worktype == '教材研读') {
|
||||
list[i].workclass = 'primary'
|
||||
} else if (list[i].worktype == '框架梳理') {
|
||||
|
|
|
@ -121,12 +121,12 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="分值" align="center" width="180">
|
||||
<template #default="scope">
|
||||
<el-input-number v-model="scope.row.score" :min="1" :max="100" :disabled="checkTaskAssigned(currentWorkEdit.currentTask)"></el-input-number >
|
||||
<el-input-number v-model="scope.row.score" :min="1" :max="100" :disabled="currentWorkEdit.currentType == 'query'?true:false"></el-input-number >
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="100">
|
||||
<template #default="scope">
|
||||
<el-button :disabled="checkTaskAssigned(currentWorkEdit.currentTask)" @click="handleWorkConfigQuizMinus(scope.$index)">删除</el-button>
|
||||
<el-button :disabled="currentWorkEdit.currentType == 'query'?true:false" @click="handleWorkConfigQuizMinus(scope.$index)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -203,8 +203,7 @@
|
|||
|
||||
<div slot="footer" class="dialog-footer" style="text-align: right; margin-top: 20px;">
|
||||
<div style="display: flex">
|
||||
<el-button type="primary" style="margin-left: auto" :disabled="checkTaskAssigned(currentWorkEdit.currentTask)"
|
||||
@click="submitStudy('submit')">确 定</el-button>
|
||||
<el-button type="primary" style="margin-left: auto" @click="workEdit = false">确 定</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
@ -779,7 +778,12 @@ const handleTaskAssignToAllClass = () => {
|
|||
*/
|
||||
const handleNewClassWorkDialog = () => {
|
||||
// 打开作业设计页面
|
||||
router.push({ path: '/newClassTask' });
|
||||
router.push({
|
||||
path: '/newClassTask',
|
||||
query: {
|
||||
isBack: true,
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -930,3 +934,4 @@ watch(() => courseObj.node, (newVal,oldVal) => {
|
|||
}
|
||||
}
|
||||
</style>
|
||||
<style src="@/assets/styles/JYStyle.css"></style>
|
|
@ -266,6 +266,10 @@ const props = defineProps({
|
|||
isedit: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
isback:{
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -737,14 +741,16 @@ const handleClassWorkSave = async () => {
|
|||
//这里分离了,所以不需要更新表单数据了
|
||||
// this.getClassWorkAllList();
|
||||
|
||||
// TODO 后续看是否跳转到 作业布置页面
|
||||
|
||||
//TODO 下面3个后续看是啥
|
||||
// this.newWorkSpace = false;
|
||||
// this.newWorkSpaceEdit = false;
|
||||
// this.workEdit = false;
|
||||
})
|
||||
}
|
||||
|
||||
if(props.isback){
|
||||
// 其他页面进入的 返回上一页
|
||||
router.back();
|
||||
}else{
|
||||
// 首页进入的,跳转到作业布置页面
|
||||
router.push({ path: '/classTaskAssign' });
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
@ -976,3 +982,4 @@ watch(() => props.bookobj.levelSecondId, (newVal) => {
|
|||
|
||||
}
|
||||
</style>
|
||||
<style src="@/assets/styles/JYStyle.css"></style>
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
<el-row style="align-items: center; margin-bottom: 0px; flex: 0 0 auto">
|
||||
<el-col :span="12" style="padding-left: 20px; text-align: left;">
|
||||
<div v-if="!isOpenLeftBook" class="unit-top-left cursor-pointer" @click="onOpenLeftBook">
|
||||
<i v-if="isback" class="iconfont icon-xiangzuo cursor-pointer" style="color: blue;" @click="goBack">返回上页</i>
|
||||
<i v-if="!isCollapse" class="iconfont icon-xiangzuo" style="color: blue;"></i>
|
||||
<span>课程目录</span>
|
||||
<i v-if="isCollapse" class="iconfont icon-xiangyou" style="color: blue;"></i>
|
||||
|
@ -35,7 +36,7 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
<!-- 作业类型:内容 -->
|
||||
<task-type-view :bookobj="courseObj" :propsformobj="classWorkForm" :isedit="isOpenLeftBook" style="flex: 1; overflow: hidden;"/>
|
||||
<task-type-view :bookobj="courseObj" :isback="isback" :propsformobj="classWorkForm" :isedit="isOpenLeftBook" style="flex: 1; overflow: hidden;"/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -53,6 +54,7 @@ const route = useRoute();
|
|||
const router = useRouter()
|
||||
const { proxy } = getCurrentInstance()
|
||||
|
||||
const isback = ref(route.query.isBack?true:false);
|
||||
const classtaskObj = route.query.classtaskObj;//作业布置的内容对象
|
||||
const bookTitle = ref(classtaskObj? JSON.parse(classtaskObj).bookName: '');// 课程名称
|
||||
const isOpenLeftBook = ref(classtaskObj? JSON.parse(classtaskObj).id ? true : false: false ); // 是否打开左侧目录
|
||||
|
@ -183,3 +185,4 @@ onMounted(() => {
|
|||
}
|
||||
}
|
||||
</style>
|
||||
<style src="@/assets/styles/JYStyle.css"></style>
|
||||
|
|
|
@ -51,7 +51,7 @@ 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: 'deaddate 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 && getTomorrow() <= item.deaddate) //大于今天的才算进行中 弃用
|
||||
|
|
|
@ -689,7 +689,12 @@ export default {
|
|||
// 前往作业设计页面
|
||||
goNewClassTask(){
|
||||
// router.push({ path: '/newClassTask' });
|
||||
this.$router.push({ path: '/newClassTask' });
|
||||
this.$router.push({
|
||||
path: '/newClassTask',
|
||||
query: {
|
||||
isBack: true,
|
||||
}
|
||||
});
|
||||
},
|
||||
getWeekday1(date) {
|
||||
const weekdays = ['周日', '周一', '周二', '周三', '周四', '周五', '周六']
|
||||
|
|
Loading…
Reference in New Issue