Compare commits
4 Commits
2ca4117561
...
7b3f00ba67
Author | SHA1 | Date |
---|---|---|
“zouyf” | 7b3f00ba67 | |
baigl | 042f8e5907 | |
白了个白 | db20978575 | |
白了个白 | 2887528e9e |
|
@ -171,10 +171,10 @@
|
||||||
<el-collapse-item title="老师布置详情" name="1">
|
<el-collapse-item title="老师布置详情" name="1">
|
||||||
<div class="image_list">
|
<div class="image_list">
|
||||||
<div v-if="teachImageList.length > 0">
|
<div v-if="teachImageList.length > 0">
|
||||||
<div style="margin-bottom: 5px">
|
<div style="margin-bottom: 5px;text-align: left;">
|
||||||
<span style="color: red">温馨提示:点击图片可放大预览 </span>
|
<span style="color: red">温馨提示:点击图片可放大预览 </span>
|
||||||
</div>
|
</div>
|
||||||
<div v-for="(imageItem, index) in teachImageList" :key="index">
|
<div v-for="(imageItem, index) in teachImageList" :key="index" style="text-align: left;">
|
||||||
<el-image
|
<el-image
|
||||||
style="width: 400px; height: 400px"
|
style="width: 400px; height: 400px"
|
||||||
:src="imageItem.url"
|
:src="imageItem.url"
|
||||||
|
@ -198,7 +198,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="teachFileList.length > 0">
|
<div v-if="teachFileList.length > 0">
|
||||||
<div style="margin: 10px 0">
|
<div style="margin: 10px 0;text-align: left;">
|
||||||
<span style="color: red" @click="openFile"
|
<span style="color: red" @click="openFile"
|
||||||
>温馨提示:点击此处 可预览其他类型附件!
|
>温馨提示:点击此处 可预览其他类型附件!
|
||||||
</span>
|
</span>
|
||||||
|
@ -214,16 +214,16 @@
|
||||||
<div v-if="feedContentList.length > 0">
|
<div v-if="feedContentList.length > 0">
|
||||||
<div v-if="dialogProps.studentObj.worktype == '常规作业' && stuItem.rightanswer != ''&& stuItem.rightanswer != null">
|
<div v-if="dialogProps.studentObj.worktype == '常规作业' && stuItem.rightanswer != ''&& stuItem.rightanswer != null">
|
||||||
<!-- 常规作业:学生有的会答复 -->
|
<!-- 常规作业:学生有的会答复 -->
|
||||||
<p style="padding: 10px 0;">学生答复内容</p>
|
<p style="padding: 10px 0;text-align: left;">学生答复内容</p>
|
||||||
<div style="padding: 0 20px">{{stuItem.rightanswer}}</div>
|
<div style="padding: 0 20px;text-align: left;">{{stuItem.rightanswer}}</div>
|
||||||
</div>
|
</div>
|
||||||
<p>学生答题附件内容</p>
|
<p style="text-align: left;">学生答题附件内容</p>
|
||||||
<div class="image_list">
|
<div class="image_list">
|
||||||
<div v-if="imageList.length > 0">
|
<div v-if="imageList.length > 0">
|
||||||
<div style="margin-bottom: 5px">
|
<div style="margin-bottom: 5px;text-align: left;">
|
||||||
<span style="color: red">温馨提示:点击图片可放大预览 </span>
|
<span style="color: red">温馨提示:点击图片可放大预览 </span>
|
||||||
</div>
|
</div>
|
||||||
<div v-for="(imageItem, index) in imageList" :key="index">
|
<div v-for="(imageItem, index) in imageList" :key="index" style="text-align: left;">
|
||||||
<el-image
|
<el-image
|
||||||
style="width: 500px; height: 500px"
|
style="width: 500px; height: 500px"
|
||||||
:src="imageItem.url"
|
:src="imageItem.url"
|
||||||
|
@ -247,7 +247,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="fileList.length > 0">
|
<div v-if="fileList.length > 0">
|
||||||
<div style="margin: 10px 0">
|
<div style="margin: 10px 0;text-align: left;">
|
||||||
<span style="color: red" @click="openFile"
|
<span style="color: red" @click="openFile"
|
||||||
>温馨提示:点击此处 可预览其他类型附件!
|
>温馨提示:点击此处 可预览其他类型附件!
|
||||||
</span>
|
</span>
|
||||||
|
@ -255,7 +255,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 无附件内容 -->
|
<!-- 无附件内容 -->
|
||||||
<div v-if="imageList.length == 0 && fileList.length == 0" style="padding: 0 20px">未提交附件内容</div>
|
<div v-if="imageList.length == 0 && fileList.length == 0" style="padding: 0 20px;text-align: left;">未提交附件内容</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
|
|
|
@ -247,7 +247,9 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, ref, nextTick, watch, reactive, getCurrentInstance } from 'vue'
|
import { onMounted, ref, nextTick, watch, reactive, getCurrentInstance } from 'vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { useToolState } from '@/store/modules/tool'
|
import { cloneDeep } from 'lodash'
|
||||||
|
import { useRouter } from 'vue-router'
|
||||||
|
|
||||||
import {listEntpcoursework, listEntpcourseworkNew, getEntpcoursework} from '@/api/education/entpCourseWork'
|
import {listEntpcoursework, listEntpcourseworkNew, getEntpcoursework} from '@/api/education/entpCourseWork'
|
||||||
import { addClassworkReturnId } from '@/api/teaching/classwork'
|
import { addClassworkReturnId } from '@/api/teaching/classwork'
|
||||||
import { updateClasswork, listEvaluationclue,readFile, listClassworkeval,delClassworkeval,addClassworkeval } from '@/api/classTask'
|
import { updateClasswork, listEvaluationclue,readFile, listClassworkeval,delClassworkeval,addClassworkeval } from '@/api/classTask'
|
||||||
|
@ -263,10 +265,11 @@ import FileUpload from "@/components/FileUpload/index.vue";
|
||||||
import whiteboard from '@/components/whiteboard/whiteboard.vue'
|
import whiteboard from '@/components/whiteboard/whiteboard.vue'
|
||||||
|
|
||||||
|
|
||||||
|
import { useToolState } from '@/store/modules/tool'
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from '@/store/modules/user'
|
||||||
const userStore = useUserStore().user
|
const userStore = useUserStore().user
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
|
const router = useRouter()
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
bookobj: {
|
bookobj: {
|
||||||
|
@ -356,11 +359,11 @@ const workResource = reactive({
|
||||||
entpCourseWorkTotal: 0, // 习题总数
|
entpCourseWorkTotal: 0, // 习题总数
|
||||||
}); // 作业资源
|
}); // 作业资源
|
||||||
let classWorkForm = reactive({
|
let classWorkForm = reactive({
|
||||||
id: props.propsformobj.id,
|
id: cloneDeep(props.propsformobj.id),
|
||||||
uniquekey: props.propsformobj.uniquekey, // 作业唯一标识 作业名称
|
uniquekey: cloneDeep(props.propsformobj.uniquekey), // 作业唯一标识 作业名称
|
||||||
worktype: props.propsformobj.worktype?props.propsformobj.worktype: '习题训练', //作业类型
|
worktype: props.propsformobj.worktype?cloneDeep(props.propsformobj.worktype): '习题训练', //作业类型
|
||||||
title: props.propsformobj.title?props.propsformobj.title:'',// 作业说明
|
title: props.propsformobj.title?cloneDeep(props.propsformobj.title):'',// 作业说明
|
||||||
quizlist: props.propsformobj.quizlist?props.propsformobj.quizlist:[] // 作业习题列表内容
|
quizlist: props.propsformobj.quizlist?cloneDeep(props.propsformobj.quizlist):[] // 作业习题列表内容
|
||||||
}); // 提交的作业内容
|
}); // 提交的作业内容
|
||||||
const chooseWorkLists = ref([]); // 框架梳理、?课堂展示
|
const chooseWorkLists = ref([]); // 框架梳理、?课堂展示
|
||||||
const whiteboardObj = ref(''); // 作业资源 - 课堂展示 白板
|
const whiteboardObj = ref(''); // 作业资源 - 课堂展示 白板
|
||||||
|
@ -854,7 +857,7 @@ const editWork = async (cform) =>{
|
||||||
|
|
||||||
// 1.判断当前添加的作业是否与原来不同(跟父组件传来的值对比)
|
// 1.判断当前添加的作业是否与原来不同(跟父组件传来的值对比)
|
||||||
let needUplEval = false;
|
let needUplEval = false;
|
||||||
if (classWorkForm.quizlist.length !== props.propsformobj.quizlist.length) {
|
if (classWorkForm.quizlist.length != props.propsformobj.quizlist.length) {
|
||||||
needUplEval = true;
|
needUplEval = true;
|
||||||
}else {
|
}else {
|
||||||
// 只要有一个不一致则说明需要更新
|
// 只要有一个不一致则说明需要更新
|
||||||
|
@ -864,72 +867,31 @@ const editWork = async (cform) =>{
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//新方法更新
|
|
||||||
if(needUplEval){
|
|
||||||
// 正常新任务
|
|
||||||
var ll = [];
|
|
||||||
for (var i=0; i< classWorkForm.quizlist.length; i++) {
|
|
||||||
// 更新 题目分值
|
|
||||||
ll.push({'id': classWorkForm.quizlist[i].id, 'score': classWorkForm.quizlist[i].score});
|
|
||||||
}
|
|
||||||
// 习题训练 右侧选择的资源list
|
|
||||||
if (ll.length > 0) {
|
|
||||||
cform.entpcourseworklist = JSON.stringify(ll);
|
|
||||||
} else {
|
|
||||||
cform.entpcourseworklist = '';
|
|
||||||
}
|
|
||||||
console.log(cform,'提交的数据');
|
|
||||||
if(cform.entpcourseworklist == '') return ElMessage({ type: 'warning', message: '请先添加作业资源!'});
|
|
||||||
|
|
||||||
addClassworkReturnId(cform).then(workres => {
|
|
||||||
ElMessage({ type: 'success', message: '修改设计成功!'});
|
|
||||||
// 重置提交表单
|
|
||||||
classWorkForm.worktype = "习题训练";
|
|
||||||
classWorkForm.uniquekey = props.propsformobj.uniquekey, // 作业唯一标识 作业名称
|
|
||||||
classWorkForm.title = "";
|
|
||||||
classWorkForm.quizlist = [], // 作业习题列表内容
|
|
||||||
|
|
||||||
// 情况选择的资源缓存
|
|
||||||
chooseWorkLists.value = [];
|
|
||||||
whiteboardObj.value = ''; // ? // 清空白板
|
|
||||||
// refresh the list
|
|
||||||
//这里分离了,所以不需要更新表单数据了
|
|
||||||
// this.getClassWorkAllList();
|
|
||||||
|
|
||||||
// TODO 后续看是否跳转到 作业布置页面
|
|
||||||
|
|
||||||
//TODO 下面3个后续看是啥
|
|
||||||
// this.newWorkSpace = false;
|
|
||||||
// this.newWorkSpaceEdit = false;
|
|
||||||
// this.workEdit = false;
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 2.需要重新更新eval的数据
|
// 2.需要重新更新eval的数据
|
||||||
// if (needUplEval) {
|
if (needUplEval) {
|
||||||
// 说明: 因试题分值也需修改, 故无法通过按钮的增长删除来处理, 故将原作业全部删除后再重新添加
|
// 说明: 因试题分值也需修改, 故无法通过按钮的增长删除来处理, 故将原作业全部删除后再重新添加
|
||||||
// 2.1.先查询该workid下所有的id
|
// 2.1.先查询该workid下所有的id
|
||||||
// let arrEvalids = [];
|
let arrEvalids = [];
|
||||||
// const wevalres = await listClassworkeval({'workid': classWorkForm.id});
|
const wevalres = await listClassworkeval({'workid': classWorkForm.id});
|
||||||
// wevalres.rows.forEach(element => {
|
wevalres.rows.forEach(element => {
|
||||||
// arrEvalids.push(element.id);
|
arrEvalids.push(element.id);
|
||||||
// });
|
});
|
||||||
// const ids = arrEvalids.join(',');
|
const ids = arrEvalids.join(',');
|
||||||
|
|
||||||
// // 2.2.删除原作业
|
// 2.2.删除原作业
|
||||||
// const delRes = await delClassworkeval(ids);
|
const delRes = await delClassworkeval(ids);
|
||||||
|
|
||||||
// // 2.3.重新添加新作业
|
// 2.3.重新添加新作业
|
||||||
// for(let i=0; i< classWorkForm.quizlist.length; i++){
|
for(let i=0; i< classWorkForm.quizlist.length; i++){
|
||||||
// const addRes = await addClassworkeval({
|
const addRes = await addClassworkeval({
|
||||||
// 'workid': classWorkForm.id,
|
'workid': classWorkForm.id,
|
||||||
// 'entpcourseworkid': classWorkForm.quizlist[i].id,
|
'entpcourseworkid': classWorkForm.quizlist[i].id,
|
||||||
// 'workdataid': 0,
|
'workdataid': 0,
|
||||||
// 'score': classWorkForm.quizlist[i].score}
|
'score': classWorkForm.quizlist[i].score}
|
||||||
// );
|
);
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
// 3.更新作业任务信息
|
// 3.更新作业任务信息
|
||||||
// const evalid = this.homeworkLesson.length==0 ? '' : this.homeworkLesson.length==1 ? this.homeworkLesson[0] : this.homeworkLesson[1];
|
// const evalid = this.homeworkLesson.length==0 ? '' : this.homeworkLesson.length==1 ? this.homeworkLesson[0] : this.homeworkLesson[1];
|
||||||
|
@ -940,6 +902,13 @@ const editWork = async (cform) =>{
|
||||||
// //evalid = evalid, // 更新[作业范围]
|
// //evalid = evalid, // 更新[作业范围]
|
||||||
// }
|
// }
|
||||||
// let res = await updateClasswork(cform);
|
// let res = await updateClasswork(cform);
|
||||||
|
let res = await updateClasswork(cform);
|
||||||
|
if (res.code == 200) {
|
||||||
|
ElMessage.success('更新成功');
|
||||||
|
// 返回上一页
|
||||||
|
router.back()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
// else if (classWorkForm.worktype=='框架梳理') {
|
// else if (classWorkForm.worktype=='框架梳理') {
|
||||||
|
|
|
@ -309,7 +309,7 @@ watchEffect(() => { initData() })
|
||||||
// 弹窗容器
|
// 弹窗容器
|
||||||
.c-warp{
|
.c-warp{
|
||||||
background: #F2F3F5;
|
background: #F2F3F5;
|
||||||
height: 73vh;
|
height: 100%;
|
||||||
margin: 0 !important;
|
margin: 0 !important;
|
||||||
.left{padding-left: 0 !important;}
|
.left{padding-left: 0 !important;}
|
||||||
.right{padding-right: 0 !important;}
|
.right{padding-right: 0 !important;}
|
||||||
|
@ -318,7 +318,7 @@ watchEffect(() => { initData() })
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border: none;
|
border: none;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
height: 73vh;
|
height: 100%;
|
||||||
}
|
}
|
||||||
.collapse-item{
|
.collapse-item{
|
||||||
.item-title-o{
|
.item-title-o{
|
||||||
|
|
|
@ -65,7 +65,7 @@
|
||||||
v-loading="loading_dt_table"
|
v-loading="loading_dt_table"
|
||||||
:data="tableRadio.list"
|
:data="tableRadio.list"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
style="height: 69vh;"
|
style="height: 100%;overflow: hidden;"
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
@row-click="getStudentClassWorkDataDetail"
|
@row-click="getStudentClassWorkDataDetail"
|
||||||
>
|
>
|
||||||
|
@ -682,6 +682,9 @@ onUnmounted(() => {
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
.view_teachrting {
|
.view_teachrting {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|
Loading…
Reference in New Issue