diff --git a/src/renderer/src/AixPPTist/src/api/watcher.ts b/src/renderer/src/AixPPTist/src/api/watcher.ts
index 29ea2e7..5a9e731 100644
--- a/src/renderer/src/AixPPTist/src/api/watcher.ts
+++ b/src/renderer/src/AixPPTist/src/api/watcher.ts
@@ -99,7 +99,7 @@ export default () => {
}
break
case MsgEnum.HEADS.MSG_slideFlapping: // 幻灯片翻页
- emitter.emit('closegridPic')
+ emitter.emit('closegridPic') //如果有推图片窗口 就关闭
const slideIndex = content?.current || 0
const type = content?.animation // 上下动作
const steps = content?.animationSteps // 动画步骤
@@ -132,7 +132,7 @@ export default () => {
break
case MsgEnum.HEADS.MSG_pushSreen_ImgList: // 推图片上屏
const imgArray = content.ImgList.map((obj) => obj.url);
- emitter.emit('opengridPic',{arr:imgArray})
+ emitter.emit('opengridPic',{arr:imgArray}) // 打开推图片上屏窗口
break
case MsgEnum.HEADS.MSG_0010: // 备用
break
diff --git a/src/renderer/src/api/classTask/index.js b/src/renderer/src/api/classTask/index.js
index 845469b..b521d07 100644
--- a/src/renderer/src/api/classTask/index.js
+++ b/src/renderer/src/api/classTask/index.js
@@ -71,6 +71,14 @@ export function updateClassworkeval(data) {
})
}
+export function updateClassworkevalList(data) {
+ return request({
+ url: '/education/classworkeval/updateList',
+ method: 'put',
+ data: data
+ })
+}
+
// 修改classworkdata
export function updateClassworkdata(data) {
return request({
diff --git a/src/renderer/src/api/education/entpCourseWork.js b/src/renderer/src/api/education/entpCourseWork.js
index 25f61e2..f243df1 100644
--- a/src/renderer/src/api/education/entpCourseWork.js
+++ b/src/renderer/src/api/education/entpCourseWork.js
@@ -135,4 +135,18 @@ export function getJYPath(url,config) {
method: config.method||"get",
params: config.params
})
+}
+
+
+/**
+ * @desc: 百度识图转发
+ * @return: {*}
+ * @param {*} data
+ */
+export function getOcrContent(data) {
+ return request({
+ url: '/ocr/exam',
+ method: 'post',
+ data: data
+ })
}
\ No newline at end of file
diff --git a/src/renderer/src/components/choose-textbook/index.vue b/src/renderer/src/components/choose-textbook/index.vue
index 7e766f8..c57f831 100644
--- a/src/renderer/src/components/choose-textbook/index.vue
+++ b/src/renderer/src/components/choose-textbook/index.vue
@@ -7,7 +7,7 @@
-
@@ -178,6 +178,18 @@ const handleNodeClick = (data) => {
sessionStore.set('subject.curNode', nodeData)
emit('nodeClick', curData)
}
+
+const renderContent = (h, { node, data, store }) => {
+ return h(
+ 'span',
+ {
+ style: {
+ color: data.bookId==''||data.bookId=='0' ? '#A5B3CA' : 'black',
+ },
+ },
+ node.label
+ );
+}
onMounted( async () => {
treeLoading.value = true
try{
diff --git a/src/renderer/src/hooks/useClassTask.js b/src/renderer/src/hooks/useClassTask.js
index 934caf6..50d8cf4 100644
--- a/src/renderer/src/hooks/useClassTask.js
+++ b/src/renderer/src/hooks/useClassTask.js
@@ -1,5 +1,7 @@
import { listEntpcoursework,getEvaluationclue } from '@/api/classTask';
import { processList } from '@/hooks/useProcessList';
+import useClassTaskStore from '@/store/modules/classTask'
+const useClassTaskStores = useClassTaskStore();
const isJson = (str) => {
if (typeof str == 'string') {
@@ -114,6 +116,14 @@ export const editListItem = (row, courseObj) => {
}
else if (row.worktype == '科学实验') {
if(isJson(row.workcodes)){
+ // 同步更新实验内部的科目信息
+ if (row.worktag && row.worktag.indexOf('-') > -1){
+ const eduInfo = row.worktag.split('-');
+ useClassTaskStores.experimentObj.edustage = eduInfo[0];
+ useClassTaskStores.experimentObj.edusubject = eduInfo[1];
+ useClassTaskStores.experimentObj.updateEduInfo = row.worktag;
+ }
+ // 更新科学实验内容
classtaskObj.fileHomeworkList = JSON.parse(row.workcodes);
//
// console.log('科学实验', classtaskObj);
diff --git a/src/renderer/src/hooks/useProcessList.js b/src/renderer/src/hooks/useProcessList.js
index bb2b0c3..c9f1e07 100644
--- a/src/renderer/src/hooks/useProcessList.js
+++ b/src/renderer/src/hooks/useProcessList.js
@@ -299,21 +299,28 @@ export const processList = (row, aloneOption=false) => {
if(!aloneOption && j%2== 0){
tmp += '
';
}
- row[i].workdescFormat = tmp
+ row[i].workdescFormat = tmp;
// 处理[答案显示] - 转换ABCD
let arr2Char = workAnswerArr
.map((item) => {
return String.fromCharCode(65 + Number(item))
})
- .join('')
- row[i].workanswerFormat = arr2Char
+ .join('');
+ row[i].workanswerFormat = arr2Char;
} else if (row[i].worktype == '填空题') {
// 处理[选项显示] - 填空题中无选项, 故置空
- row[i].workdescFormat = ''
+ row[i].workdescFormat = '';
// 处理[答案显示] - 逗号连接
- row[i].workanswerFormat = workAnswerArr.join('、')
+
+ // 当[答案显示]为 [ ({
experimentObj:{
edustage: '小学', // 教育阶段
- edusubject: '', // 学科
+ edusubject: '数学', // 学科
experimentList: [], // 实验科目列表
+ updateEduInfo: '小学-数学', //实际需上传的学段+学科信息(用于上传及回显实验内的学段学科)
},
isOpenQuestUploadView: false, // 是否打开习题上传的页面
classListIds: [],
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 6a19908..d20fd14 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
@@ -435,7 +435,7 @@ import useUserStore from '@/store/modules/user'
import { ref, reactive } from 'vue'
// import { Plus } from '@element-plus/icons-vue'
import { ElMessageBox, ElMessage } from 'element-plus'
-import { updateClassworkeval, getClassworkdata, updateClassWorkDataAutoFinish } from '@/api/classTask'
+import { getClassworkdata, updateClassworkevalList, updateClassWorkDataAutoFinish } from '@/api/classTask'
import { getTimeDate } from '@/utils/date'
import ReFilePreview from '@/components/refile-preview/index.vue'
import { quizStrToList } from '@/utils/comm';
@@ -894,22 +894,41 @@ const onSubmit = () => {
})
// 更新题目批改
- classWorkFormScore.teacherRating &&
- classWorkFormScore.teacherRating.map((item, index) => {
- const queryParams = {
- id: item.id,
- teacherRating: item.score, // 教师评分
- rating: classWorkFormScore.rating, // 评价
- teacherremark: classWorkFormScore.teacherremark, //评分说明
- timestamp: getTimeDate() // 时间
- }
- console.log(queryParams)
- updateClassworkeval(queryParams).then((res) => {
- // if(res.code == 200){
- // 循环提交能干个啥
- // }
- })
- })
+ const queryList = [];
+ classWorkFormScore.teacherRating && classWorkFormScore.teacherRating.map((item, index) => {
+ const queryParams = {
+ id: item.id,
+ teacherRating: item.score, // 教师评分
+ rating: classWorkFormScore.rating, // 评价
+ teacherremark: classWorkFormScore.teacherremark, //评分说明
+ timestamp: getTimeDate() // 时间
+ }
+ queryList.push(queryParams)
+ })
+ //console.log('queryList->', queryList)
+ updateClassworkevalList(queryList).then((res) => {
+ // if(res.code == 200){
+ // 循环提交能干个啥
+ // }
+ })
+
+ // 更新题目批改
+ // classWorkFormScore.teacherRating &&
+ // classWorkFormScore.teacherRating.map((item, index) => {
+ // const queryParams = {
+ // id: item.id,
+ // teacherRating: item.score, // 教师评分
+ // rating: classWorkFormScore.rating, // 评价
+ // teacherremark: classWorkFormScore.teacherremark, //评分说明
+ // timestamp: getTimeDate() // 时间
+ // }
+ // console.log(queryParams)
+ // updateClassworkeval(queryParams).then((res) => {
+ // // if(res.code == 200){
+ // // 循环提交能干个啥
+ // // }
+ // })
+ // })
ElMessage({
type: 'success',
message: '提交成功!'
diff --git a/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue b/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue
index 0c32397..26db4b8 100644
--- a/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue
+++ b/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue
@@ -55,6 +55,7 @@
-
+
@@ -285,6 +286,7 @@ import { updateClasswork, listEvaluationclue, listClassworkeval,delClassworkeval
import { listEvaluation } from '@/api/subject'
import { listEntpcoursefile } from '@/api/education/entpcoursefile'
import { listKnowledgePoint } from "@/api/knowledge/knowledgePoint";
+import { isJson } from "@/utils/comm";
import { useGetHomework } from '@/hooks/useGetHomework'
@@ -459,12 +461,13 @@ const client = new Apis('/paht');
*/
const t = function(name, time) {
return new Promise(resolve => {
+ const evalId = props.bookobj.levelSecondId=='' ? props.bookobj.levelFirstId : props.bookobj.levelSecondId;
const queryForm = {
// 分页参数
currentPage: paginationParams.pageNum,
pageSize: paginationParams.pageSize,
// 课程相关参数
- eid: props.bookobj.levelSecondId,
+ eid: evalId, // 当前单元或章节id
sectionName: props.bookobj.coursetitle,
edusubject: userStore.edusubject,
edustage: userStore.edustage,
@@ -557,9 +560,12 @@ const getQueryFromEvaluationclue = () => {
}
if (clueres.rows[i].childlist != '') {
- clueres.rows[i].childArray = JSON.parse('['+clueres.rows[i].childlist+']');
- for (var j=0; j]+)>)/ig, '');
+ const tmpJson = '['+clueres.rows[i].childlist+']';
+ if (isJson(tmpJson)){
+ clueres.rows[i].childArray = JSON.parse(tmpJson);
+ for (var j=0; j]+)>)/ig, '');
+ }
}
} else {
clueres.rows[i].childArray = {};
@@ -990,6 +996,8 @@ const initPageParams = () => {
onMounted(async() => {
+ // 知识点
+ getEntpCourseWorkPointList();
})
// const refreshData = () => {
@@ -1016,9 +1024,9 @@ const debounceQueryData = debounce(() => {
// 习题资源
handleQueryFromEntpCourseWork(0);
// 框架梳理
- getQueryFromEvaluationclue();
+ //getQueryFromEvaluationclue();
// 知识点
- getEntpCourseWorkPointList();
+ //getEntpCourseWorkPointList();
}, 1000);
watch(() => props.propsformobj.uniquekey, (newVal) => {
@@ -1027,8 +1035,20 @@ watch(() => props.propsformobj.uniquekey, (newVal) => {
classWorkForm.uniquekey = props.propsformobj.uniquekey?cloneDeep(props.propsformobj.uniquekey):''; // 作业唯一标识 作业名称
}
})
-watch(() => props.bookobj.levelSecondId, (newVal, oldVal) => {
+
+
+//watch(() => props.bookobj.levelSecondId, async (newVal, oldVal) => {
+
+watch([
+ () => props.bookobj.levelFirstId,
+ () => props.bookobj.levelSecondId
+], ([newLevelSecondId, newLevelFirstId], [oldLevelSecondId, oldLevelFirstId]) => {
console.log(props.bookobj,'课程选择')
+ // 默认选择一级单元时, 不自动获取试题, 需手动按钮获取试题
+ if (props.bookobj.levelSecondId == '') {
+ workResource.entpCourseWorkList = [];
+ return;
+ }
debounceQueryData();
})
diff --git a/src/renderer/src/views/classTask/newClassTaskAssign/experimentQuestion/components/experimentList.vue b/src/renderer/src/views/classTask/newClassTaskAssign/experimentQuestion/components/experimentList.vue
index 9755859..a7ff24a 100644
--- a/src/renderer/src/views/classTask/newClassTaskAssign/experimentQuestion/components/experimentList.vue
+++ b/src/renderer/src/views/classTask/newClassTaskAssign/experimentQuestion/components/experimentList.vue
@@ -36,16 +36,24 @@ const props = defineProps({
})
const value = ref('')
+const updateLabel = (val) => {
+ value.value = val;
+}
-
+const onSelectOption = (option) => {
+ classTaskStore.updateEduInfo = `${classTaskStore.edustage}-${classTaskStore.edusubject}`;
+ console.log('updateEduInfo->', classTaskStore.updateEduInfo);
+ console.log(option,'选择的实验课-------')
+ emit('selectItem', classTaskStore.experimentList.filter(item => item.label === option)[0])
+}
onMounted(() => {
})
-const onSelectOption = (option) => {
- console.log(option,'选择的实验课-------')
- emit('selectItem', classTaskStore.experimentList.filter(item => item.label === option)[0])
-}
+defineExpose({
+ updateLabel
+})
+