From e3ce51032226cd679293c4d472d7f88a1c8bfa92 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=99=BD=E4=BA=86=E4=B8=AA=E7=99=BD?= <543593352@qq.com>
Date: Tue, 22 Oct 2024 14:39:48 +0800
Subject: [PATCH 1/5] =?UTF-8?q?=E5=B8=B8=E8=A7=84=E4=BD=9C=E4=B8=9A?=
=?UTF-8?q?=E6=94=B9=E4=B8=BA=E4=B8=BB=E9=A2=98=E4=BD=9C=E4=B8=9A=EF=BC=8C?=
=?UTF-8?q?=E8=AF=BE=E5=A0=82=E5=B1=95=E7=A4=BA=E6=94=B9=E4=B8=BA=E5=88=9B?=
=?UTF-8?q?=E4=BD=9C=E5=B1=95=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/renderer/src/hooks/useClassTask.js | 20 +++++------
src/renderer/src/hooks/useGetHomework.js | 4 +--
src/renderer/src/plugins/imChat/msgEnum.js | 12 +++----
.../src/views/classTask/classTask.vue | 2 +-
.../src/views/classTask/classTaskAssign.vue | 30 ++++++++--------
.../container/classTask/item-dialog-score.vue | 28 +++++++--------
.../classTask/prevReadImgFileDialog.vue | 2 +-
.../views/classTask/container/item-dialog.vue | 2 +-
.../container/newTask/taskTypeView.vue | 34 +++++++++----------
.../src/views/classTask/newClassTask.vue | 4 +--
.../src/views/classTask/teachClassTask.vue | 4 +--
src/renderer/src/views/tool/createHomework.js | 2 +-
12 files changed, 72 insertions(+), 72 deletions(-)
diff --git a/src/renderer/src/hooks/useClassTask.js b/src/renderer/src/hooks/useClassTask.js
index cf960da..d091a1b 100644
--- a/src/renderer/src/hooks/useClassTask.js
+++ b/src/renderer/src/hooks/useClassTask.js
@@ -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);
}
}
diff --git a/src/renderer/src/hooks/useGetHomework.js b/src/renderer/src/hooks/useGetHomework.js
index e07a2de..506067f 100644
--- a/src/renderer/src/hooks/useGetHomework.js
+++ b/src/renderer/src/hooks/useGetHomework.js
@@ -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';
diff --git a/src/renderer/src/plugins/imChat/msgEnum.js b/src/renderer/src/plugins/imChat/msgEnum.js
index da8e486..a69afb4 100644
--- a/src/renderer/src/plugins/imChat/msgEnum.js
+++ b/src/renderer/src/plugins/imChat/msgEnum.js
@@ -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',
diff --git a/src/renderer/src/views/classTask/classTask.vue b/src/renderer/src/views/classTask/classTask.vue
index 055fa37..3c0969a 100644
--- a/src/renderer/src/views/classTask/classTask.vue
+++ b/src/renderer/src/views/classTask/classTask.vue
@@ -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'
diff --git a/src/renderer/src/views/classTask/classTaskAssign.vue b/src/renderer/src/views/classTask/classTaskAssign.vue
index 8b58f5b..716bb83 100644
--- a/src/renderer/src/views/classTask/classTaskAssign.vue
+++ b/src/renderer/src/views/classTask/classTaskAssign.vue
@@ -148,9 +148,9 @@
-
-
-
+
+
+
@@ -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);
}
diff --git a/src/renderer/src/views/classTask/container/classTask/item-dialog-score.vue b/src/renderer/src/views/classTask/container/classTask/item-dialog-score.vue
index 0c5bdbe..7f95809 100644
--- a/src/renderer/src/views/classTask/container/classTask/item-dialog-score.vue
+++ b/src/renderer/src/views/classTask/container/classTask/item-dialog-score.vue
@@ -136,11 +136,11 @@
-
+
@@ -152,11 +152,11 @@
{{ sIndex + 1 }}、{{ stuItem.score ? stuItem.score : 0 }}分
-
+
@@ -210,8 +210,8 @@
-
-
+
+
学生答复内容
{{stuItem.rightanswer}}
@@ -484,11 +484,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([])
@@ -708,9 +708,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);
@@ -762,7 +762,7 @@ const acceptParams = async (params) => {
}
})
} else if (
- params.studentObj.worktype == '课堂展示' ||
+ params.studentObj.worktype == '创作展示' ||
params.studentObj.worktype == '框架梳理'
) {
params.studentQuizAllList.forEach((item) => {
@@ -774,7 +774,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 (
diff --git a/src/renderer/src/views/classTask/container/classTask/prevReadImgFileDialog.vue b/src/renderer/src/views/classTask/container/classTask/prevReadImgFileDialog.vue
index 2205b17..f7f58e9 100644
--- a/src/renderer/src/views/classTask/container/classTask/prevReadImgFileDialog.vue
+++ b/src/renderer/src/views/classTask/container/classTask/prevReadImgFileDialog.vue
@@ -59,7 +59,7 @@ const props = defineProps({})
const fileReadopen = ref(false)
-// 老师常规作业、课堂展示布置题目附件list
+// 老师主题作业、创作展示布置题目附件list
const teacherFeedContentList = ref([])
const teachImageList = ref([])
const teachFileList = ref([])
diff --git a/src/renderer/src/views/classTask/container/item-dialog.vue b/src/renderer/src/views/classTask/container/item-dialog.vue
index 819082e..0961aec 100644
--- a/src/renderer/src/views/classTask/container/item-dialog.vue
+++ b/src/renderer/src/views/classTask/container/item-dialog.vue
@@ -428,7 +428,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 != '') {
diff --git a/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue b/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue
index 3252c0f..622589c 100644
--- a/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue
+++ b/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue
@@ -18,7 +18,7 @@
-
+
@@ -130,7 +130,7 @@
-
+
@@ -152,7 +152,7 @@
-
+
@@ -208,7 +208,7 @@
-
+
@@ -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);
}
diff --git a/src/renderer/src/views/classTask/newClassTask.vue b/src/renderer/src/views/classTask/newClassTask.vue
index bf73688..8a07b56 100644
--- a/src/renderer/src/views/classTask/newClassTask.vue
+++ b/src/renderer/src/views/classTask/newClassTask.vue
@@ -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 : '',// 设计中的 创作展示 输入的问题
})
diff --git a/src/renderer/src/views/classTask/teachClassTask.vue b/src/renderer/src/views/classTask/teachClassTask.vue
index 76d80c9..7095339 100644
--- a/src/renderer/src/views/classTask/teachClassTask.vue
+++ b/src/renderer/src/views/classTask/teachClassTask.vue
@@ -343,7 +343,7 @@ const getClassWorkStudentList = (rowId) => {
response.rows[i].classworkevallist != 'null'
) {
// 将标签中双引号改为转义, 测试数据: "{\"id\":172910, \"feedcontent\":\"毛泽东,浮想联翩。\", \"score\":4, \"rightanswer\":\"毛泽东重,浮想联翩。\"},{\"id\":172911, \"rating\":0, \"teacherRating\":0, \"entpcourseworkid\":363100, \"feedcontent\":\"毛泽东重游橘子洲,面对如画的秋色和大好的革命形势,回忆过去战斗的岁月,不禁心潮起伏,浮想联翩。\", \"score\":4, \"rightanswer\":\"毛泽东重游橘子洲,面对如画的秋色和大好的革命形势,回忆过去战斗的岁月,不禁心潮起伏,浮想联翩。\"}"
- // 常规作业(去除【】前后引号).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 +420,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 != '') {
diff --git a/src/renderer/src/views/tool/createHomework.js b/src/renderer/src/views/tool/createHomework.js
index be3006f..1bb954f 100644
--- a/src/renderer/src/views/tool/createHomework.js
+++ b/src/renderer/src/views/tool/createHomework.js
@@ -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 = '';
From ef75fb75705689af73c3342124cd70093cfc8517 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=9Czouyf=E2=80=9D?= <80906036@qq.com>
Date: Tue, 22 Oct 2024 14:47:49 +0800
Subject: [PATCH 2/5] =?UTF-8?q?=E8=AF=95=E9=A2=98=E6=A0=BC=E5=BC=8F?=
=?UTF-8?q?=E5=8C=96=E6=A0=B7=E5=BC=8F=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/renderer/src/hooks/useProcessList.js | 84 ++++++++++++++----------
1 file changed, 51 insertions(+), 33 deletions(-)
diff --git a/src/renderer/src/hooks/useProcessList.js b/src/renderer/src/hooks/useProcessList.js
index 1a1ca4f..e7329eb 100644
--- a/src/renderer/src/hooks/useProcessList.js
+++ b/src/renderer/src/hooks/useProcessList.js
@@ -15,9 +15,10 @@ export const isJson = (str) => {
/**
* @description processList 格式化试题
- * @param {*} row
+ * @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 += ``
+ for(; j${char}.${workDescArr[j]}
`;
}
- const char = String.fromCharCode(65 + j)
- tmp += `${char}.${workDescArr[j]}
`
- if (j % 2 == 1) {
- tmp += ' '
+ else {
+ if(j%2 == 0){
+ tmp += ``;
+ }
+
+ tmp += `
${char}.${workDescArr[j]}
`;
+ if(j%2 == 1){
+ tmp += '
';
+ }
}
}
// j此刻已自增1, 故当选项为单数时, 需要补充结束标签
- if (j % 2 == 1) {
- tmp += ''
+ if(!aloneOption && j%2 == 1){
+ tmp += '
';
}
// workDescArr为 [''] 表示为 判断题或者填空题,这里不需要选项
@@ -136,31 +143,36 @@ export const processList = (row) => {
* ]
*/
let workDescArr = JSON.parse(row[i].workdesc)
- let workDescHtml = ``
workDescArr.map((item, index) => {
if (item.type == '单选题' || item.type == '多选题') {
- workDescHtml += `
${index + 1}. ${item.title}
`
+ workDescHtml += `
${index + 1}. ${item.title}
`
let tmp = ''
let j = 0
let optionsArr = item.options
- for (; j < optionsArr.length; j++) {
- if (j % 2 == 0) {
- tmp += `
`
+ for(; j${char}.${optionsArr[j]}
`;
}
- const char = String.fromCharCode(65 + j)
- tmp += `
${char}.${optionsArr[j]}
`
- if (j % 2 == 1) {
- tmp += '
'
+ else {
+ if(j%2 == 0){
+ tmp += ``;
+ }
+
+ tmp += `
${char}.${optionsArr[j]}
`;
+ if(j%2 == 1){
+ tmp += '
';
+ }
}
}
// j此刻已自增1, 故当选项为单数时, 需要补充结束标签
- if (j % 2 == 1) {
- tmp += ' '
+ if(!aloneOption && j%2 == 1){
+ tmp += '
';
}
-
workDescHtml += tmp
} else if (item.type == '填空题' || item.type == '判断题' || item.type == '主观题') {
- workDescHtml += `
${index + 1}. ${item.title}
`
+ workDescHtml += `
${index + 1}. ${item.title}
`
}
})
workDescHtml += '
'
@@ -265,18 +277,24 @@ export const processList = (row) => {
// 处理[选项显示] - 拼接ABCD首序号
let tmp = ''
let j = 0
- for (; j < workDescArr.length; j++) {
- if (j % 2 == 0) {
- tmp += ``
+ for(; j${char}.${workDescArr[j]}
`;
}
- const char = String.fromCharCode(65 + j)
- tmp += `${char}.${workDescArr[j]}
`
- if (j % 2 == 1) {
- tmp += ''
+ else {
+ if(j%2 == 0){
+ tmp += `
`;
+ }
+
+ tmp += `
${char}.${workDescArr[j]}
`;
+ if(j%2 == 1){
+ tmp += '
';
+ }
}
}
- if (j % 2 == 0) {
- tmp += '
'
+ if(!aloneOption && j%2== 0){
+ tmp += '
';
}
row[i].workdescFormat = tmp
From 35a00e2acae0c9a0f87ca7e3766a8a8180a4c510 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=99=BD=E4=BA=86=E4=B8=AA=E7=99=BD?= <543593352@qq.com>
Date: Tue, 22 Oct 2024 16:04:03 +0800
Subject: [PATCH 3/5] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E6=89=B9=E9=98=85?=
=?UTF-8?q?=EF=BC=9A=E6=9C=80=E5=B0=8F=E5=8C=96=E5=86=8D=E6=AC=A1=E6=89=93?=
=?UTF-8?q?=E5=BC=80=E4=BC=9A=E5=88=B7=E6=96=B0=E7=9A=84=E9=80=BB=E8=BE=91?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/renderer/src/utils/tool.js | 2 +-
.../src/views/classTask/teachClassTask.vue | 21 ++++++++++++++++---
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/src/renderer/src/utils/tool.js b/src/renderer/src/utils/tool.js
index 445cf22..1c800cd 100644
--- a/src/renderer/src/utils/tool.js
+++ b/src/renderer/src/utils/tool.js
@@ -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 () {
diff --git a/src/renderer/src/views/classTask/teachClassTask.vue b/src/renderer/src/views/classTask/teachClassTask.vue
index 7095339..9ba94ff 100644
--- a/src/renderer/src/views/classTask/teachClassTask.vue
+++ b/src/renderer/src/views/classTask/teachClassTask.vue
@@ -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({
@@ -636,16 +637,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 +670,7 @@ watch(classWorkAnalysis, (newVal, oldVal) => {
onUnmounted(() => {
clearInterval(classWorkActiveData.timerId) // 关闭定时器 逐题讲评的
+ clearInterval(reloadTimer.value) // 关闭定时器 查询作业id是否刷新了
})
// defineExpose({
From cca640e945168a27d77ae2e92975aa9684eb26d3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=9Czouyf=E2=80=9D?= <80906036@qq.com>
Date: Tue, 22 Oct 2024 16:45:55 +0800
Subject: [PATCH 4/5] =?UTF-8?q?[=E9=80=90=E9=A2=98=E8=AE=B2=E8=AF=84]=20-?=
=?UTF-8?q?=20=E5=A2=9E=E5=8A=A0=E5=8F=B3=E4=BE=A7=E8=AF=95=E9=A2=98?=
=?UTF-8?q?=E6=98=BE=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../views/classTask/container/item-dialog.vue | 1 +
.../views/classTask/container/quizStats.vue | 83 ++++++++++++++++---
.../src/views/classTask/teachClassTask.vue | 1 +
3 files changed, 72 insertions(+), 13 deletions(-)
diff --git a/src/renderer/src/views/classTask/container/item-dialog.vue b/src/renderer/src/views/classTask/container/item-dialog.vue
index 819082e..7f7423d 100644
--- a/src/renderer/src/views/classTask/container/item-dialog.vue
+++ b/src/renderer/src/views/classTask/container/item-dialog.vue
@@ -261,6 +261,7 @@ const openDialog = (data) => {
}
classWorkAnalysis.quizlist = idres.rows
classWorkActiveData.quizlist = idres.rows // zdg: 作业概览组件使用
+ processList(classWorkActiveData.quizlist);
// 统计每个题目的正误率
// 这个学习任务所有题目+所有学生的答题数据 , pageSize: 100
diff --git a/src/renderer/src/views/classTask/container/quizStats.vue b/src/renderer/src/views/classTask/container/quizStats.vue
index de5b73b..70a5c8c 100644
--- a/src/renderer/src/views/classTask/container/quizStats.vue
+++ b/src/renderer/src/views/classTask/container/quizStats.vue
@@ -1,9 +1,9 @@
-
-
+
+
-
+
{{item.def?.titletext}}
@@ -54,13 +54,13 @@
-
+
-
提交情况
+
-
+
+
+ 试题详情
+
+
+
+
+
+ {{ activeExam.worktag }}
+
+
+
+
+
+
+
+
+ 【答案】
+
+ 【分析】
+
+ 【解答】
+
+ 【点评】
+
+
+
+
+
+
+
+
+
+
+
@@ -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{
diff --git a/src/renderer/src/views/classTask/teachClassTask.vue b/src/renderer/src/views/classTask/teachClassTask.vue
index 76d80c9..86f5bbb 100644
--- a/src/renderer/src/views/classTask/teachClassTask.vue
+++ b/src/renderer/src/views/classTask/teachClassTask.vue
@@ -248,6 +248,7 @@ const openDialog = (data) => {
}
classWorkAnalysis.quizlist = idres.rows
classWorkActiveData.quizlist = idres.rows // zdg: 作业概览组件使用
+ processList(classWorkActiveData.quizlist);
// 统计每个题目的正误率
// 这个学习任务所有题目+所有学生的答题数据 , pageSize: 100
From 6112cc8a926d3f3af6e52a09afb02dbf6b5314b8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=9Czouyf=E2=80=9D?= <80906036@qq.com>
Date: Tue, 22 Oct 2024 16:50:42 +0800
Subject: [PATCH 5/5] 1
---
src/renderer/src/views/classTask/container/quizStats.vue | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/renderer/src/views/classTask/container/quizStats.vue b/src/renderer/src/views/classTask/container/quizStats.vue
index 70a5c8c..30631b3 100644
--- a/src/renderer/src/views/classTask/container/quizStats.vue
+++ b/src/renderer/src/views/classTask/container/quizStats.vue
@@ -74,7 +74,7 @@
试题详情
-
+
@@ -85,7 +85,7 @@
-
+
【答案】