This commit is contained in:
小杨 2024-10-22 16:59:28 +08:00
commit 49b4ba1f02
15 changed files with 214 additions and 122 deletions

View File

@ -32,9 +32,9 @@ export const editListItem = (row, courseObj) => {
worktype: '', // 设计中的作业类型
quizlist: [], // 设计中的试题列表
chooseWorkLists: [],// 设计中的框架梳理list
fileHomeworkList: [],// 设计中的常规作业list
whiteboardObj: '',// 设计中的课堂展示对象
question: '', // 设计中的[课堂展示]的问题
fileHomeworkList: [],// 设计中的主题作业list
whiteboardObj: '',// 设计中的创作展示对象
question: '', // 设计中的[创作展示]的问题
};
console.log('编辑的行', row);
@ -53,8 +53,8 @@ export const editListItem = (row, courseObj) => {
classtaskObj.worktype= row.worktype; // 设计中的作业类型
classtaskObj.quizlist= []; // 设计中的试题列表
classtaskObj.chooseWorkLists = []; //设计中的 框架梳理list
classtaskObj.fileHomeworkList = []; //设计中的 常规作业list
classtaskObj.whiteboardObj = ''; //设计中的 课堂展示对象
classtaskObj.fileHomeworkList = []; //设计中的 主题作业list
classtaskObj.whiteboardObj = ''; //设计中的 创作展示对象
if (row.worktype == '框架梳理') {
@ -96,19 +96,19 @@ export const editListItem = (row, courseObj) => {
}
})
}
else if (row.worktype == '课堂展示') {
console.log('row.课堂展示', row.workcodes);
else if (row.worktype == '创作展示') {
console.log('row.创作展示', row.workcodes);
const workcodes = JSON.parse(row.workcodes);
classtaskObj.whiteboardObj = JSON.stringify(workcodes.json);
classtaskObj.question = row.worktag;
// console.log('课堂展示', classtaskObj);
// console.log('创作展示', classtaskObj);
return resolve(classtaskObj);
}
else if (row.worktype == '常规作业') {
else if (row.worktype == '主题作业') {
if(isJson(row.workcodes)){
classtaskObj.fileHomeworkList = JSON.parse(row.workcodes);
//
// console.log('常规作业', classtaskObj);
// console.log('主题作业', classtaskObj);
return resolve(classtaskObj);
}
}

View File

@ -86,11 +86,11 @@ const getHomeWorkList = async () => {
// res.rows[i].workcodesList = JSON.parse(res.rows[i].workcodes);
// } else
// 课标研读 目标设定 教材研读 框架梳理 学科定位 TODO 后续接入在添加
if (res.rows[i].worktype == '课堂展示') {
if (res.rows[i].worktype == '创作展示') {
res.rows[i].workclass = 'primary';
} else if (res.rows[i].worktype == '框架梳理') {
res.rows[i].workclass = 'warning';
} else if (res.rows[i].worktype == '常规作业') {
} else if (res.rows[i].worktype == '主题作业') {
res.rows[i].workclass = 'info';
} else if (res.rows[i].worktype == '习题训练') {
res.rows[i].workclass = 'danger';

View File

@ -16,8 +16,9 @@ export const isJson = (str) => {
/**
* @description processList 格式化试题
* @param {*} row
* @param {*} aloneOption 选择题中选项是否为每行一个
*/
export const processList = (row) => {
export const processList = (row, aloneOption=false) => {
for (var i = 0; i < row.length; i++) {
if (isJson(row[i].workanalysis)) {
//1、先默认格式化 格式化各项内容(待优化, 后续界面显示的为format的值)
@ -55,19 +56,25 @@ export const processList = (row) => {
const workDescArr = element.split('#&')
let tmp = ''
let j = 0
for (; j < workDescArr.length; j++) {
if (j % 2 == 0) {
tmp += `<div style='width:80%;display:flex;'>`
for(; j<workDescArr.length; j++){
const char = String.fromCharCode(65+j);
if (aloneOption) {
tmp += `<div style='width:100%;display:flex;padding: 2px 0'>${char}.${workDescArr[j]}</div>`;
}
const char = String.fromCharCode(65 + j)
tmp += `<div style='display:flex;margin-left:2%;width:35%;overflow:hidden;text-overflow:ellipsis;font-size:0.9em;'>${char}.${workDescArr[j]}</div>`
if (j % 2 == 1) {
tmp += '</div>'
else {
if(j%2 == 0){
tmp += `<div style='width:100%;display:flex;'>`;
}
tmp += `<div style='padding-left:10px;width:50%;overflow:hidden;text-overflow:ellipsis;font-size:0.9em;'>${char}.${workDescArr[j]}</div>`;
if(j%2 == 1){
tmp += '</div>';
}
}
}
// j此刻已自增1, 故当选项为单数时, 需要补充结束标签
if (j % 2 == 1) {
tmp += '</div>'
if(!aloneOption && j%2 == 1){
tmp += '</div>';
}
// workDescArr为 [''] 表示为 判断题或者填空题,这里不需要选项
@ -136,31 +143,36 @@ export const processList = (row) => {
* ]
*/
let workDescArr = JSON.parse(row[i].workdesc)
let workDescHtml = `<div style='width:80%;display:flex;>`
let workDescHtml = `<div style='width:100%;display:flex;>`
workDescArr.map((item, index) => {
if (item.type == '单选题' || item.type == '多选题') {
workDescHtml += `<div style='width:80%;display:flex;'>${index + 1}. ${item.title}</div>`
workDescHtml += `<div style='width:100%;display:flex;'>${index + 1}. ${item.title}</div>`
let tmp = ''
let j = 0
let optionsArr = item.options
for (; j < optionsArr.length; j++) {
if (j % 2 == 0) {
tmp += `<div style='width:80%;display:flex;'>`
for(; j<optionsArr.length; j++){
const char = String.fromCharCode(65+j);
if (aloneOption) {
tmp += `<div style='width:100%;display:flex;padding: 2px 0'>${char}.${optionsArr[j]}</div>`;
}
const char = String.fromCharCode(65 + j)
tmp += `<div style='display:flex;margin-left: 2%; width: 36%'>${char}.${optionsArr[j]}</div>`
if (j % 2 == 1) {
tmp += '</div>'
else {
if(j%2 == 0){
tmp += `<div style='width:100%;display:flex;'>`;
}
tmp += `<div style='padding-left: 10px; width: 50%'>${char}.${optionsArr[j]}</div>`;
if(j%2 == 1){
tmp += '</div>';
}
}
}
// j此刻已自增1, 故当选项为单数时, 需要补充结束标签
if (j % 2 == 1) {
tmp += '</div>'
if(!aloneOption && j%2 == 1){
tmp += '</div>';
}
workDescHtml += tmp
} else if (item.type == '填空题' || item.type == '判断题' || item.type == '主观题') {
workDescHtml += `<div style='width:80%;display:flex;'>${index + 1}. ${item.title}</div>`
workDescHtml += `<div style='width:100%;display:flex;'>${index + 1}. ${item.title}</div>`
}
})
workDescHtml += '</div>'
@ -265,18 +277,24 @@ export const processList = (row) => {
// 处理[选项显示] - 拼接ABCD首序号
let tmp = ''
let j = 0
for (; j < workDescArr.length; j++) {
if (j % 2 == 0) {
tmp += `<div style='width:80%;display:flex;'>`
for(; j<workDescArr.length; j++){
const char = String.fromCharCode(65+j);
if (aloneOption) {
tmp += `<div style='width:100%;display:flex;padding: 2px 0'>${char}.${workDescArr[j]}</div>`;
}
const char = String.fromCharCode(65 + j)
tmp += `<div style='display:flex;margin-left: 2%; width: 36%'>${char}.${workDescArr[j]}</div>`
if (j % 2 == 1) {
tmp += '</div>'
else {
if(j%2 == 0){
tmp += `<div style='width:100%;display:flex;'>`;
}
tmp += `<div style='padding-left: 10px; width: 50%'>${char}.${workDescArr[j]}</div>`;
if(j%2 == 1){
tmp += '</div>';
}
}
}
if (j % 2 == 0) {
tmp += '</div>'
if(!aloneOption && j%2== 0){
tmp += '</div>';
}
row[i].workdescFormat = tmp

View File

@ -36,8 +36,8 @@ export class MsgEnum {
* | MSG_pushQuizOfClassWorkdata2Public | 老师端把选中的学生习题作业推到大屏 | pushQuizOfClassWorkdata2Public |
* | MSG_pushClassWorkdata2Public | 老师端把选中的学生作业推到大屏 | pushClassWorkdata2Public |
* | MSG_shareStudentPresentdata2All | 把某个学生的展示成果数据推给全班所有学生 | shareStudentPresentdata2All |
* | MSG_pushStudentPresentdata2Public | 老师端课堂展示活动把选中的学生展示数据推到大屏 | pushStudentPresentdata2Public |
* | MSG_pushClassWorkPresentList2Public | 老师端课堂展示活动任务列表推到大屏 | pushClassWorkPresentList2Public |
* | MSG_pushStudentPresentdata2Public | 老师端创作展示活动把选中的学生展示数据推到大屏 | pushStudentPresentdata2Public |
* | MSG_pushClassWorkPresentList2Public | 老师端创作展示活动任务列表推到大屏 | pushClassWorkPresentList2Public |
* | MSG_activePageType | 课标研读-分页切换 | activePageType |
* | MSG_slideFlapping | 幻灯片-切换 | slideFlapping |
* | MSG_anmationclick | 幻灯片-动画切换 | anmationclick |
@ -46,7 +46,7 @@ export class MsgEnum {
* | MSG_classtaskfeedback | 老师端接收到学生反馈消息-课堂测练中的其他任务 | classtaskfeedback |
* | MSG_studentfeedback | 老师端学生反馈的消息具体要看其中的feedbackkey类别较繁杂 | studentfeedback |
* | MSG_studentfeedbackcancel | 老师端学生反馈的消息取消如取消学会了取消困惑 | studentfeedbackcancel |
* | MSG_classshowdata | 学生提交的课堂展示数据-要在老师端显示再由老师选择推送到公屏上 | classshowdata |
* | MSG_classshowdata | 学生提交的创作展示数据-要在老师端显示再由老师选择推送到公屏上 | classshowdata |
* | MSG_classWorkOfPresentDataUpdate | 学生在公屏上展示并完善后保存后老师端要更新 | classWorkOfPresentDataUpdate |
* | MSG_classlecturePagesrc | 课堂讲授活动选择不同的内容 | classlecturePagesrc |
* | --- | 以下为新定义-消息头 | --- |
@ -66,9 +66,9 @@ export class MsgEnum {
MSG_pushClassWorkdata2Public : 'pushClassWorkdata2Public',
/** @desc: 把某个学生的展示成果数据推给全班所有学生 */
MSG_shareStudentPresentdata2All : 'shareStudentPresentdata2All',
/** @desc: 老师端:课堂展示活动,把选中的学生展示数据,推到大屏 */
/** @desc: 老师端:创作展示活动,把选中的学生展示数据,推到大屏 */
MSG_pushStudentPresentdata2Public : 'pushStudentPresentdata2Public',
/** @desc: 老师端:课堂展示活动,任务列表,推到大屏 */
/** @desc: 老师端:创作展示活动,任务列表,推到大屏 */
MSG_pushClassWorkPresentList2Public : 'pushClassWorkPresentList2Public',
/** @desc: 课标研读-分页切换 */
MSG_activePageType : 'activePageType',
@ -86,7 +86,7 @@ export class MsgEnum {
MSG_studentfeedback : 'studentfeedback',
/** @desc: 老师端:学生反馈的消息取消,如取消学会了,取消困惑 */
MSG_studentfeedbackcancel : 'studentfeedbackcancel',
/** @desc: 学生提交的课堂展示数据-要在老师端显示,再由老师选择推送到公屏上 */
/** @desc: 学生提交的创作展示数据-要在老师端显示,再由老师选择推送到公屏上 */
MSG_classshowdata : 'classshowdata',
/** @desc: 学生在公屏上展示并完善后,保存后,老师端要更新 */
MSG_classWorkOfPresentDataUpdate : 'classWorkOfPresentDataUpdate',

View File

@ -340,7 +340,7 @@ const eventHandles = (type, win) => {
// 监听窗口的激活事件
win.on('focus', async () => {
toolState.isTaskWin=true
win&&win.reload(); //刷新该窗口
// win&&win.reload(); //刷新该窗口
});
// 监听窗口关闭事件
win.on('closed', function () {

View File

@ -291,7 +291,7 @@ const getStudentClassWorkData = async() => {
}
for (var e = 0; e < evalarray.length; e++) {
if (res.rows[i].worktype == '常规作业') {
if (res.rows[i].worktype == '主题作业') {
evalarray[e].feedcontent = escapeHtmlQuotes(evalarray[e].feedcontent).replace(
/"(\[.*\])"/g,
'$1'

View File

@ -148,9 +148,9 @@
</template>
</div>
</div>
<!-- TODO 课堂展示 预览待开发-->
<!-- 常规作业包含多个格式图片略缩图展示点击放大其他附件跳转另外弹窗查看 -->
<div v-if="currentTag=='常规作业'" :style="{'padding': '15px', 'overflow': 'auto'}">
<!-- TODO 创作展示 预览待开发-->
<!-- 主题作业包含多个格式图片略缩图展示点击放大其他附件跳转另外弹窗查看 -->
<div v-if="currentTag=='主题作业'" :style="{'padding': '15px', 'overflow': 'auto'}">
<div style="margin: 5px; background-color: white">
<div v-if="workConfObj.teacherFeedContentList.length > 0">
<div class="image_list">
@ -362,9 +362,9 @@ const currentTag = ref('');// 当前作业类型
const workConfObj = reactive({
quizlist: [], // list
chooseWorkLists: [], //
teacherFeedContentList: [],//
teachFileList: [], // list
teachImageList: [],// list
teacherFeedContentList: [],//
teachFileList: [], // list
teachImageList: [],// list
});
//
@ -440,11 +440,11 @@ const queryPushRecords = (row) => {
// res.rows[i].workcodesList = JSON.parse(res.rows[i].workcodes);
// } else
// TODO
if (res.rows[i].worktype == '课堂展示') {
if (res.rows[i].worktype == '创作展示') {
res.rows[i].workclass = 'primary';
} else if (res.rows[i].worktype == '框架梳理') {
res.rows[i].workclass = 'warning';
} else if (res.rows[i].worktype == '常规作业') {
} else if (res.rows[i].worktype == '主题作业') {
res.rows[i].workclass = 'info';
} else if (res.rows[i].worktype == '习题训练') {
res.rows[i].workclass = 'danger';
@ -686,9 +686,9 @@ const handleWorkTitleEdit = (row, index, type) => {
})
}
//TODO
if(row.worktype == '常规作业'){
console.log(row,'常规作业');
//TODO
if(row.worktype == '主题作业'){
console.log(row,'主题作业');
workConfObj.teacherFeedContentList = [];
workConfObj.teachImageList = [];
workConfObj.teachFileList = [];
@ -795,13 +795,13 @@ const prevRead = (item) => {
proxy.$refs.prevReadMsgDialogRef.openDialog(item);
}
/**
* 常规作业其他附件预览
* 主题作业其他附件预览
*/
const openFile = () => {
const obj = {
teacherFeedContentList: workConfObj.teacherFeedContentList,//
teachFileList: workConfObj.teachFileList, // list
teachImageList: workConfObj.teachImageList,// list
teacherFeedContentList: workConfObj.teacherFeedContentList,//
teachFileList: workConfObj.teachFileList, // list
teachImageList: workConfObj.teachImageList,// list
}
proxy.$refs.prevReadImgFileDialogRef.acceptParams(obj);
}

View File

@ -136,11 +136,11 @@
</div>
</div>
<!-- 题目内容常规作业课堂展示 -->
<!-- 题目内容主题作业创作展示 -->
<div
v-if="
dialogProps.studentObj.worktype == '常规作业' ||
dialogProps.studentObj.worktype == '课堂展示' ||
dialogProps.studentObj.worktype == '主题作业' ||
dialogProps.studentObj.worktype == '创作展示' ||
dialogProps.studentObj.worktype == '框架梳理'
"
>
@ -152,11 +152,11 @@
<span>{{ sIndex + 1 }}{{ stuItem.score ? stuItem.score : 0 }}</span>
</div>
</template>
<!-- 常规作业 -->
<!-- 主题作业 -->
<div
v-if="
dialogProps.studentObj.worktype == '常规作业' ||
dialogProps.studentObj.worktype == '课堂展示' ||
dialogProps.studentObj.worktype == '主题作业' ||
dialogProps.studentObj.worktype == '创作展示' ||
dialogProps.studentObj.worktype == '框架梳理'
"
>
@ -210,8 +210,8 @@
<!-- 学生答题展示 -->
<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;text-align: left;">学生答复内容</p>
<div style="padding: 0 20px;text-align: left;">{{stuItem.rightanswer}}</div>
</div>
@ -450,11 +450,11 @@ const dialogProps = ref({
studentQuizAllList: [], //list
quizlist: [] // list
})
//list
//list
const feedContentList = ref([])
const imageList = ref([])
const fileList = ref([])
// list
// list
const teacherFeedContentList = ref([])
const teachImageList = ref([])
const teachFileList = ref([])
@ -674,9 +674,9 @@ const acceptParams = async (params) => {
})
} else {
//
if (params.studentObj.worktype == '常规作业') {
if (params.studentObj.worktype == '主题作业') {
try {
// datacontent TODO
// datacontent TODO
const res = await getClassworkdata(params.studentObj.id);
if(res.data.datacontent != ''){
const teachWorkFileList = JSON.parse(res.data.datacontent);
@ -728,7 +728,7 @@ const acceptParams = async (params) => {
}
})
} else if (
params.studentObj.worktype == '课堂展示' ||
params.studentObj.worktype == '创作展示' ||
params.studentObj.worktype == '框架梳理'
) {
params.studentQuizAllList.forEach((item) => {
@ -740,7 +740,7 @@ const acceptParams = async (params) => {
classWorkFormScore.teacherremark = item.teacherremark //
// rightanswer"https://wzyzoss.eos-chongqing-3.cmecloud.cn/2024/9/5/c5d8e00a93364dd3b975f669afa217f9.png"
//
console.log(item.rightanswer, '----------课堂展示学生答题------------------')
console.log(item.rightanswer, '----------创作展示学生答题------------------')
if (item.rightanswer != '' && item.rightanswer != null) {
if (

View File

@ -59,7 +59,7 @@ const props = defineProps({})
const fileReadopen = ref(false)
// list
// list
const teacherFeedContentList = ref([])
const teachImageList = ref([])
const teachFileList = ref([])

View File

@ -261,6 +261,7 @@ const openDialog = (data) => {
}
classWorkAnalysis.quizlist = idres.rows
classWorkActiveData.quizlist = idres.rows // zdg: 使
processList(classWorkActiveData.quizlist);
//
// + , pageSize: 100
@ -428,7 +429,7 @@ const getStudentClassWorkDataDetail = (row) => {
// ? wevalres.rows[w].feedcontent.replace(/<[^>]+>/g, '')
// : wevalres.rows[w].feedcontent
if (classWorkAnalysis.row.worktype == '常规作业') {
if (classWorkAnalysis.row.worktype == '主题作业') {
wevalres.rows[w].feedcontent = JSON.parse(wevalres.rows[w].feedcontent)
}
if (wevalres.rows[w].feedcontent != '') {

View File

@ -18,7 +18,7 @@
<!-- 作业资源 -->
<el-row class="middle">
<el-col :span="24" style="height: 100%; overflow: hidden;">
<div v-if="classWorkForm.worktype == '课堂展示'" style="height: 100%; display: flex; flex-direction: column;">
<div v-if="classWorkForm.worktype == '创作展示'" style="height: 100%; display: flex; flex-direction: column;">
<div style="flex: 0 0 auto;">
<el-form-item label="问题">
<el-input v-model="classWorkForm.question" type="text" placeholder="请输入问题" />
@ -130,7 +130,7 @@
<!-- 非习题训练常规作业 -->
<div v-if="classWorkForm.worktype!='习题训练'">
<div :style="{ 'overflow': 'auto'}">
<template v-if="classWorkForm.worktype!='常规作业'">
<template v-if="classWorkForm.worktype!='主题作业'">
<template v-for="(item, index) in workResource.teachResourceList" :key="item">
<div v-if="item.worktype==classWorkForm.worktype" style="border-bottom: 1px dotted;display: flex;justify-content: space-between;">
<div style="margin-bottom: 5px; padding-left: 15px;display: flex;flex-direction: row;align-items: center;">
@ -152,7 +152,7 @@
</div>
</template>
</template>
<template v-if="classWorkForm.worktype =='常规作业'">
<template v-if="classWorkForm.worktype =='主题作业'">
<div v-loading="fileLoading" class="upload-homework">
<FileUpload v-model="classWorkForm.fileHomeworkList" :fileSize="800" :fileType="['mp3','mp4','doc','docx','xlsx','xls','pdf','ppt','pptx','jpg','jpeg','gif','png','txt']"/>
</div>
@ -208,7 +208,7 @@
<!-- 作业说明 -->
<el-row class="bottom">
<el-col :span="12">
<el-form-item v-if="classWorkForm.worktype != '课堂展示'" label="作业说明" style="margin: 10px 0;">
<el-form-item v-if="classWorkForm.worktype != '创作展示'" label="作业说明" style="margin: 10px 0;">
<el-col :span="15" style="padding: 0px">
<!-- <el-input v-model="classWorkForm.title" type="textarea" :rows="1" placeholder="请输入作业说明"/> -->
<el-input v-model="classWorkForm.title" style="width: 400px" placeholder="请输入作业说明"/>
@ -352,16 +352,16 @@ let classWorkForm = reactive({
quizlist: props.propsformobj.quizlist?cloneDeep(props.propsformobj.quizlist):[], //
chooseWorkLists: props.propsformobj.chooseWorkLists?cloneDeep(props.propsformobj.chooseWorkLists):[], // list
fileHomeworkList: props.propsformobj.fileHomeworkList?cloneDeep(props.propsformobj.fileHomeworkList):[], //
whiteboardObj: props.propsformobj.whiteboardObj?cloneDeep(props.propsformobj.whiteboardObj):'', // -
question: props.propsformobj.question?cloneDeep(props.propsformobj.question):'', // -
whiteboardObj: props.propsformobj.whiteboardObj?cloneDeep(props.propsformobj.whiteboardObj):'', // -
question: props.propsformobj.question?cloneDeep(props.propsformobj.question):'', // -
}); //
// ---------------------------------------------------
// const listWorkType = ref(['', '', '', '']); //
const listWorkType = ref(['习题训练', '课堂展示', '常规作业']); //
// const listWorkType = ref(['', '', '', '']); //
const listWorkType = ref(['习题训练', '创作展示', '主题作业']); //
// -------
// -------
const boardLoading = ref(false);
//----------
//----------
const fileLoading = ref(false); // loading
/***
@ -638,7 +638,7 @@ const handleClassWorkSave = async () => {
if (classWorkForm.worktype === "课堂展示") {
if (classWorkForm.worktype === "创作展示") {
boardLoading.value = true
let canvasJson = proxy.$refs.boardref.getCanvasJson()
let canvasBase64 = await proxy.$refs.boardref.getCanvasBase64()
@ -651,7 +651,7 @@ const handleClassWorkSave = async () => {
addClassworkReturnId(cform).then(() => {
ElMessage({ type: 'success', message: '作业设计成功!'});
//
classWorkForm.worktype = "课堂展示";
classWorkForm.worktype = "创作展示";
classWorkForm.uniquekey = props.propsformobj.uniquekey, //
classWorkForm.title = "";
classWorkForm.question = "";
@ -667,7 +667,7 @@ const handleClassWorkSave = async () => {
boardLoading.value = false
}
}
else if(classWorkForm.worktype === "常规作业"){
else if(classWorkForm.worktype === "主题作业"){
fileLoading.value = true
cform.workcodes = JSON.stringify(classWorkForm.fileHomeworkList);
cform.entpcourseworklist = JSON.stringify([{'id':-2, 'score': '10'}]);
@ -675,7 +675,7 @@ const handleClassWorkSave = async () => {
addClassworkReturnId(cform).then(() => {
ElMessage({ type: 'success', message: '作业设计成功!'});
//
classWorkForm.worktype = "常规作业";
classWorkForm.worktype = "主题作业";
classWorkForm.uniquekey = props.propsformobj.uniquekey, //
classWorkForm.title = "";
classWorkForm.quizlist = [], //
@ -757,7 +757,7 @@ const editWork = async (cform) =>{
ElMessage.error('请先添加作业资源!');
return;
}
}else if (classWorkForm.worktype == '课堂展示' || classWorkForm.worktype == '常规作业') {
}else if (classWorkForm.worktype == '创作展示' || classWorkForm.worktype == '主题作业') {
//
}else {
@ -842,13 +842,13 @@ const editWork = async (cform) =>{
let res = await updateClassworkeval(uplParams);
}
}
else if (classWorkForm.worktype=='课堂展示') {
else if (classWorkForm.worktype=='创作展示') {
let canvasJson = proxy.$refs.boardref.getCanvasJson()
let canvasBase64 = await proxy.$refs.boardref.getCanvasBase64()
cform.workcodes = JSON.stringify({json: canvasJson, base64: canvasBase64});
cform.worktag = classWorkForm.question;
}
else if (classWorkForm.worktype=='常规作业') {
else if (classWorkForm.worktype=='主题作业') {
// 1. (, )
cform.workcodes = JSON.stringify(classWorkForm.fileHomeworkList);
}

View File

@ -1,9 +1,9 @@
<template>
<el-row class="c-warp" :gutter="10">
<el-col class="left" :span="14">
<el-collapse class="c-item" v-model="activeTopic">
<el-col class="left" :span="10">
<el-collapse class="c-item" v-model="activeTopic" accordion>
<template v-for="(item, index) in dataList">
<el-collapse-item class="collapse-item" :name="index+1" :id="'collapse-'+(index+1)">
<el-collapse-item class="collapse-item" :name="index+1" :id="'collapse-'+(index+1)" @click="clickItem(index)">
<template #title>
<el-popover :width="500" placement="right">
<p>{{item.def?.titletext}}</p>
@ -54,13 +54,13 @@
</template>
</el-collapse>
</el-col>
<el-col class="right" :span="10">
<el-col class="right" :span="14">
<div class="c-item">
<div class="title">提交情况</div>
<!-- <div class="title">提交情况</div>
<div class="respond">
<el-space wrap>
<el-space wrap> -->
<!-- <template v-for="it in 11"> -->
<template v-for="(item, index) in dataList">
<!-- <template v-for="(item, index) in dataList">
<el-card shadow="hover" class="card-warp">
<div class="card-body">
<el-progress type="dashboard" :color="colorArr" :width="80" :percentage="ratio_2(item)" />
@ -70,7 +70,41 @@
</el-card>
</template>
</el-space>
</div>
</div> -->
<div class="title">试题详情</div>
<!-- 习题训练 -->
<el-card style="max-width: 100%; margin-bottom: 10px; text-align: left;">
<el-row>
<el-col :span="24" style="padding: 10px">
<!-- 题源题目标题题目选项 -->
<span>{{ activeExam.worktag }}</span>
<span style="margin-left: 4px" v-html="activeExam.titleFormat"></span>
<div :span="24" style="padding: 6px" v-html="activeExam.workdescFormat"></div>
<!-- 折叠 详情分析解答 -->
<div class="demo-collapse">
<el-collapse v-model="activeExamFlag">
<el-collapse-item title="详情分析解答" name="1">
<el-row style=" padding: 6px 10px; border: 2px dotted;">
<template #default="scope">
<el-col :span="2" style="padding: 6px 0px"><em>答案</em></el-col>
<el-col :span="21" style="padding: 6px 0px" v-html="activeExam.workanswerFormat"></el-col>
<el-col :span="2" style="padding: 6px 0px"><em>分析</em></el-col>
<el-col :span="21" style="padding: 6px 0px" v-html="activeExam.method"></el-col>
<el-col :span="2" style="padding: 6px 0px"><em>解答</em></el-col>
<el-col :span="21" style="padding: 6px 0px" v-html="activeExam.analyse"></el-col>
<el-col :span="2" style="padding: 6px 0px"><em>点评</em></el-col>
<el-col :span="21" style="padding: 6px 0px" v-html="activeExam.discuss"></el-col>
<!-- <el-col :span="21" style="padding: 6px 0px" v-html="dataList[activeTopic-1].def.discuss"></el-col> -->
</template>
</el-row>
</el-collapse-item>
</el-collapse>
</div>
</el-col>
</el-row>
</el-card>
</div>
</el-col>
</el-row>
@ -84,7 +118,9 @@ import { ref, defineExpose, onMounted, reactive, computed, watch, nextTick, watc
// import * as elementPlus from 'element-plus' // ElMessage ElMessageBox
let colorArr = [] // --
// const attrs = useAttrs() // props
const activeTopic = ref(0) //
const activeTopic = ref(1) //
const activeExam = ref({}) //
const activeExamFlag = ref(['1']) //
let dataList = ref([]) //
let studentList = ref([]) //
const props = defineProps({ // defineProps
@ -115,7 +151,10 @@ colorArr = [
// === ===
onMounted(() => {
activeTopic.value = dataList.value.map((_, index) => index + 1);
//activeTopic.value = dataList.value.map((_, index) => index + 1);
if (dataList.value[activeTopic.value-1].def != null && dataList.value[activeTopic.value-1].def != undefined) {
activeExam.value = dataList.value[activeTopic.value-1].def;
}
})
// === (methods) ===
@ -285,6 +324,18 @@ const clickInfo = async ind => {
setTimeout(() => {scrollToElement('collapse-' + ind)}, 300);
// elementPlus.ElMessage.warning('!')
}
//
const clickItem = async (index) => {
if (index > dataList.length-1 ) {
return
}
if (dataList.value[index].def == null || dataList.value[index].def == undefined) {
return;
}
activeExam.value = dataList.value[index].def;
}
// === ===
//
const scrollToElement = id => {
@ -313,8 +364,14 @@ watchEffect(() => { initData() })
background: #F2F3F5;
height: 100%;
margin: 0 !important;
.left{padding-left: 0 !important; height: 100%;}
.right{padding-right: 0 !important;}
.left{
padding-left: 0 !important;
height: 100%;
}
.right{
padding-right: 0 !important;
height: 100%;
}
.c-item{
padding: 10px;
background: #fff;
@ -362,7 +419,7 @@ watchEffect(() => { initData() })
margin-bottom: 10px;
}
.respond{
height: calc(100% - 65px);
/* height: calc(100% - 65px);*/
overflow: auto;
.el-space{padding: 5px;}
.card-warp{

View File

@ -68,8 +68,8 @@ const classWorkForm = reactive({
quizlist: classtaskObj? JSON.parse(classtaskObj).quizlist : [], //
chooseWorkLists: classtaskObj? JSON.parse(classtaskObj).chooseWorkLists : [],// list
fileHomeworkList: classtaskObj? JSON.parse(classtaskObj).fileHomeworkList : [],// list
whiteboardObj: classtaskObj? JSON.parse(classtaskObj).whiteboardObj : '',//
question: classtaskObj? JSON.parse(classtaskObj).question : '',//
whiteboardObj: classtaskObj? JSON.parse(classtaskObj).whiteboardObj : '',//
question: classtaskObj? JSON.parse(classtaskObj).question : '',//
})

View File

@ -158,6 +158,7 @@ import quizStats from '@/views/classTask/container/quizStats.vue'
import ClassOverview from '@/views/classTask/container/classOverview.vue'
import {sessionStore} from '@/utils/store'
const { proxy } = getCurrentInstance()
const emit = defineEmits(['cle-click'])
const props = defineProps({
@ -248,6 +249,7 @@ const openDialog = (data) => {
}
classWorkAnalysis.quizlist = idres.rows
classWorkActiveData.quizlist = idres.rows // zdg: 使
processList(classWorkActiveData.quizlist);
//
// + , pageSize: 100
@ -343,7 +345,7 @@ const getClassWorkStudentList = (rowId) => {
response.rows[i].classworkevallist != 'null'
) {
// , : "{\"id\":172910, \"feedcontent\":\"<bdo class=\"mathjye-underpoint2\"></bdo>\", \"score\":4, \"rightanswer\":\"<bdo class=\"mathjye-underpoint2\"></bdo>\"},{\"id\":172911, \"rating\":0, \"teacherRating\":0, \"entpcourseworkid\":363100, \"feedcontent\":\"<bdo class=\"mathjye-underpoint2\"></bdo>\", \"score\":4, \"rightanswer\":\"<bdo class=\"mathjye-underpoint2\"></bdo>\"}"
// .replace(/"(\[.*\])"/g, '$1'); eg: "feedcontent\":\"[{\"name\":\"Bliss.jpg\",\"url\":\"https://wzyzoss.3b8daa474.jpg\"}]\",
// .replace(/"(\[.*\])"/g, '$1'); eg: "feedcontent\":\"[{\"name\":\"Bliss.jpg\",\"url\":\"https://wzyzoss.3b8daa474.jpg\"}]\",
// json .replace(/""/g, '"') eg: """"
response.rows[i].classworkevallist = escapeHtmlQuotes(response.rows[i].classworkevallist)
//console.log('classworkevallist', response.rows[i].classworkevallist)
@ -420,7 +422,7 @@ const getStudentClassWorkDataDetail = (row) => {
// ? wevalres.rows[w].feedcontent.replace(/<[^>]+>/g, '')
// : wevalres.rows[w].feedcontent
if (classWorkAnalysis.row.worktype == '常规作业') {
if (classWorkAnalysis.row.worktype == '主题作业') {
wevalres.rows[w].feedcontent = JSON.parse(wevalres.rows[w].feedcontent)
}
if (wevalres.rows[w].feedcontent != '') {
@ -636,16 +638,29 @@ const closeDialog = () => {
emit('cle-click')
}
const reloadTimer = ref(0); // id
const cutid = ref(0); // id
onMounted(() => {
const data = JSON.parse(localStorage.getItem('teachClassWorkItem'));
// const data = sessionStore.get('teachClassWorkItem');
// const data = localStorage.getItem('teachClassWorkItem');
console.log(data,'????????????????????' )
if(data){
openDialog(data)
}
//
cutid.value = data.id;
isReloadTimer();
})
const isReloadTimer = () =>{
clearInterval(reloadTimer.value) //
// id
reloadTimer.value = setInterval(() => {
const data = JSON.parse(localStorage.getItem('teachClassWorkItem'));
if(cutid.value != data.id){
cutid.value = data.id;
openDialog(data)
}
}, 1000)
}
watch(classWorkAnalysis, (newVal, oldVal) => {
if(newVal.view != 'quizStats'){
@ -656,6 +671,7 @@ watch(classWorkAnalysis, (newVal, oldVal) => {
onUnmounted(() => {
clearInterval(classWorkActiveData.timerId) //
clearInterval(reloadTimer.value) // id
})
// defineExpose({

View File

@ -11,7 +11,7 @@ export const createHomework = ({ uniquekey, evalid, data, entpcourseid }) =>{
formObj.entpid = usertore.deptId;
formObj.level = 1;
formObj.parentid = 0;
formObj.worktype = '常规作业';
formObj.worktype = '主题作业';
formObj.workkey = '';
formObj.worktag = '';