Compare commits

...

15 Commits

16 changed files with 1242 additions and 175 deletions

View File

@ -0,0 +1,203 @@
{
"words_result": [
{
"type": "print",
"location": {
"top": 8,
"left": 11,
"width": 485,
"height": 18
},
"words": "(1)风华正茂:"
},
{
"type": "print",
"location": {
"top": 37,
"left": 11,
"width": 485,
"height": 18
},
"words": "(2)书生意气:"
},
{
"type": "print",
"location": {
"top": 67,
"left": 11,
"width": 484,
"height": 18
},
"words": "(3)指点江山:"
},
{
"type": "print",
"location": {
"top": 96,
"left": 11,
"width": 485,
"height": 18
},
"words": "(4)峥嵘岁月:"
},
{
"type": "print",
"location": {
"top": 125,
"left": 10,
"width": 180,
"height": 17
},
"words": "[答案](1)风采才华正盛。"
},
{
"type": "print",
"location": {
"top": 155,
"left": 11,
"width": 179,
"height": 16
},
"words": "(2)词中指同学们意气奔放。"
},
{
"type": "print",
"location": {
"top": 185,
"left": 12,
"width": 118,
"height": 16
},
"words": "(3)评论国家大事。"
},
{
"type": "print",
"location": {
"top": 214,
"left": 12,
"width": 376,
"height": 16
},
"words": "(4)不寻常的日子。峥嵘,这里是不平凡、 不寻常的意思。"
}
],
"formula_result": [],
"img_direction": 0,
"results": [
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 11,
"height": 18,
"width": 485,
"top": 8
},
"word": "(1)风华正茂:",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 11,
"height": 18,
"width": 485,
"top": 37
},
"word": "(2)书生意气:",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 11,
"height": 18,
"width": 484,
"top": 67
},
"word": "(3)指点江山:",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 11,
"height": 18,
"width": 485,
"top": 96
},
"word": "(4)峥嵘岁月:",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 10,
"height": 17,
"width": 180,
"top": 125
},
"word": "[答案](1)风采才华正盛。",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 11,
"height": 16,
"width": 179,
"top": 155
},
"word": "(2)词中指同学们意气奔放。",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 12,
"height": 16,
"width": 118,
"top": 185
},
"word": "(3)评论国家大事。",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 12,
"height": 16,
"width": 376,
"top": 214
},
"word": "(4)不寻常的日子。峥嵘,这里是不平凡、 不寻常的意思。",
"line_probability": {}
}
}
],
"layouts_num": 0,
"results_num": 8,
"log_id": 1868923976840586200
}

View File

@ -0,0 +1,540 @@
{
"img_direction": 0,
"results": [
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 96,
"height": 33,
"width": 943,
"top": 15
},
"word": "11.(2023广东卷,2)党的二十大审议通过了《中国共产党章程(修正案)》,把党的十九大以",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 48,
"height": 33,
"width": 991,
"top": 58
},
"word": "来习近平新时代中国特色社会主义思想新发展写入党章,以更好反映以习近平同志为核心的",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 48,
"height": 32,
"width": 741,
"top": 101
},
"word": "党中央推进党的理论创新、实践创新、制度创新成果。这一修改()",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 95,
"height": 32,
"width": 720,
"top": 144
},
"word": "①全面具体地总结了党的十八大以来党和国家各项事业的伟大成就",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 836,
"height": 32,
"width": 203,
"top": 145
},
"word": "②为更好坚持和发",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 46,
"height": 33,
"width": 994,
"top": 187
},
"word": "展中国特色社会主义提供了制度保障和法律依据③更加彰显习近平新时代中国特色社会主",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 50,
"height": 32,
"width": 325,
"top": 229
},
"word": "义思想的真理力量和实践伟力",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 395,
"height": 33,
"width": 644,
"top": 229
},
"word": "④适应形势和任务的发展变化,有利于更好发挥党章的规范",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 50,
"height": 32,
"width": 128,
"top": 272
},
"word": "和指导作用",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 96,
"height": 32,
"width": 88,
"top": 315
},
"word": "A.①②",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 326,
"height": 32,
"width": 87,
"top": 314
},
"word": "B.①④",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 555,
"height": 31,
"width": 84,
"top": 316
},
"word": "C.②③",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 779,
"height": 32,
"width": 88,
"top": 317
},
"word": "D.③④",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 94,
"height": 33,
"width": 942,
"top": 358
},
"word": "【试题立意】本题以党的二十大对党章修改为背景,考查对习近平新时代中国特色社会主",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 51,
"height": 33,
"width": 871,
"top": 401
},
"word": "义思想的理解,引导学生认同习近平新时代中国特色社会主义思想,坚定理论自信。",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 95,
"height": 33,
"width": 942,
"top": 443
},
"word": "【能力解读】本题主要考查了对党的二十大审议通过了《中国共产党章程(修正案)》的关键",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 52,
"height": 33,
"width": 821,
"top": 487
},
"word": "信息的获取与加工能力,以及对其所体现道理的辨识与判断、推理与论证能力。",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 272,
"height": 27,
"width": 181,
"top": 542
},
"word": "筛选加工关键信息",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 795,
"height": 27,
"width": 113,
"top": 542
},
"word": "辨识与判断",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 63,
"height": 29,
"width": 602,
"top": 586
},
"word": "党的二十大与时俱进,审议通过了《中国共产党章程(修正案)》 ,使",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 681,
"height": 28,
"width": 343,
"top": 586
},
"word": "适应形势和任务的发展变化,有利于",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 62,
"height": 28,
"width": 196,
"top": 625
},
"word": "之随着时代丰富发展",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 680,
"height": 29,
"width": 297,
"top": 624
},
"word": "更好发挥党章的规范和指导作用",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 59,
"height": 28,
"width": 606,
"top": 674
},
"word": "《中国共产党章程(修正案)》把党的十九大以来习近平新时代中国",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 681,
"height": 30,
"width": 344,
"top": 692
},
"word": "更加彰显习近平新时代中国特色社会",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 61,
"height": 29,
"width": 602,
"top": 713
},
"word": "特色社会主义思想新发展写入党章,以更好反映以习近平同志为",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 682,
"height": 29,
"width": 295,
"top": 731
},
"word": "主义思想的真理力量和实践伟力",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 61,
"height": 29,
"width": 541,
"top": 751
},
"word": "核心的党中央推进党的理论创新、实践创新、制度创新成果",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 95,
"height": 31,
"width": 135,
"top": 808
},
"word": "【误项排除】",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 60,
"height": 26,
"width": 49,
"top": 863
},
"word": "选项",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 522,
"height": 27,
"width": 114,
"top": 863
},
"word": "排除的原因",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 122,
"height": 29,
"width": 902,
"top": 906
},
"word": "材料强调的是把党的十九大以来习近平新时代中国特色社会主义思想新发展写入党章,不涉及总",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 68,
"height": 27,
"width": 31,
"top": 927
},
"word": "①",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 124,
"height": 29,
"width": 594,
"top": 945
},
"word": "结党的十八大以来党和国家各项事业的伟大成就,①不符合题意",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 122,
"height": 28,
"width": 902,
"top": 992
},
"word": "《中国共产党章程(修正案)》是管党治党的总章程、总规矩,是中国共产党最根本的党内法规,不能",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 70,
"height": 26,
"width": 29,
"top": 1012
},
"word": "②",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 124,
"height": 28,
"width": 699,
"top": 1030
},
"word": "为更好坚持和发展中国特色社会主义提供制度保障和法律依据,②说法错误",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 97,
"height": 30,
"width": 108,
"top": 1085
},
"word": "【答案】D",
"line_probability": {}
}
}
],
"layouts_num": 0,
"results_num": 38,
"log_id": 1869631874868290300
}

View File

@ -0,0 +1,176 @@
{
"img_direction": 0,
"results": [
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 14,
"height": 58,
"width": 727,
"top": 2
},
"word": "(四川成都锦江区校级自主招生)九年级1班在课外活动时,",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 14,
"height": 54,
"width": 730,
"top": 51
},
"word": "甲、乙、丙三位同学进行乒乓球练习,为确定哪两位同学先打",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 11,
"height": 51,
"width": 731,
"top": 101
},
"word": "球,甲、乙、丙三位同学用“手心、手背”游戏(游戏时,“手心向",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 11,
"height": 47,
"width": 731,
"top": 151
},
"word": "上”简称手心;“手背向上”简称手背)来决定.游戏规则是:每",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 10,
"height": 42,
"width": 731,
"top": 201
},
"word": "人每次同时随机伸出一只手,出手心或手背.若出现“两同一",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 10,
"height": 40,
"width": 729,
"top": 249
},
"word": "异”(即两手心、一手背或两手背、一手心)的情况,则同出手心",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 9,
"height": 38,
"width": 729,
"top": 297
},
"word": "或手背的两个人先打球,另一人做裁判;否则继续进行,直到",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 11,
"height": 32,
"width": 255,
"top": 348
},
"word": "出现“两同一异”为止.",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 10,
"height": 34,
"width": 726,
"top": 393
},
"word": "(1)请你列出甲、乙、丙三位同学运用“手心、手背”游戏,出手",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 7,
"height": 37,
"width": 723,
"top": 439
},
"word": "一次出现的所有等可能情况(用A表示手心,用B表示手背);",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 8,
"height": 36,
"width": 724,
"top": 485
},
"word": "(2)求甲、乙、丙三位同学运用“手心、手背”游戏,出手一次出",
"line_probability": {}
}
},
{
"chars": [],
"words_type": "print",
"words": {
"words_location": {
"left": 6,
"height": 34,
"width": 257,
"top": 529
},
"word": "现“两同一异”的概率.",
"line_probability": {}
}
}
],
"layouts_num": 0,
"results_num": 12,
"log_id": 1869573563121265400
}

View File

@ -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({

View File

@ -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
})
}

View File

@ -7,7 +7,7 @@
<i class="iconfont icon-xiangyou"></i>
</div>
<div class="book-list" v-loading="treeLoading">
<el-tree :data="treeData" accordion :props="defaultProps" node-key="id"
<el-tree :data="treeData" accordion :props="defaultProps" node-key="id" :render-content="renderContent"
:default-expanded-keys="defaultExpandedKeys" :current-node-key="curNode.data.id" highlight-current
@node-click="handleNodeClick">
<template #default="{ node }">
@ -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{

View File

@ -299,21 +299,28 @@ export const processList = (row, aloneOption=false) => {
if(!aloneOption && j%2== 0){
tmp += '</div>';
}
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('、')
// 当[答案显示]为 [<div] 开头时,不再需逗号连接(一般为自主上传, 当前答案每个自带div标签)
let linkChar = '、';
if (workAnswerArr.length != 0 && workAnswerArr[0].indexOf('<div') == 0) {
linkChar = '';
}
row[i].workanswerFormat = workAnswerArr.join(linkChar);
} else if (row[i].worktype == '判断题') {
// 处理[选项显示] - 判断题中无选项, 故置空
row[i].workdescFormat = ''

View File

@ -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, updateClassworkdata, getClassworkdata } from '@/api/classTask'
import { updateClassworkeval, updateClassworkdata, getClassworkdata, updateClassworkevalList } 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: '提交成功!'

View File

@ -55,6 +55,7 @@
<el-col :span="11">
<el-form-item label="知识点" label-width="70">
<el-cascader
disabled
v-model="entpCourseWorkQueryParams.point"
clearable
style="width: 100%"
@ -172,7 +173,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;">
@ -193,7 +194,7 @@
</div>
</div>
</template>
</template>
</template> -->
<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']"/>
@ -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<clueres.rows[i].childArray.length; j++) {
clueres.rows[i].childArray[j].title = clueres.rows[i].childArray[j].title.replace(/(<([^>]+)>)/ig, '');
const tmpJson = '['+clueres.rows[i].childlist+']';
if (isJson(tmpJson)){
clueres.rows[i].childArray = JSON.parse(tmpJson);
for (var j=0; j<clueres.rows[i].childArray.length; j++) {
clueres.rows[i].childArray[j].title = clueres.rows[i].childArray[j].title.replace(/(<([^>]+)>)/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();
})

View File

@ -129,6 +129,7 @@ import examDetailsDrawer from '@/components/exam-question/examDetailsDrawer.vue'
import QuesItem from "@/views/classTask/newClassTaskAssign/questionUpload/quesItem/index.vue";
import { useHandleData } from "@/hooks/useHandleData";
import { processList } from '@/hooks/useProcessList';
import { isJson } from "@/utils/comm";
import { debounce } from '@/utils/comm'
@ -254,6 +255,7 @@ function Apis(key) {
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 = {
//
worktype: entpCourseWorkQueryParams.worktype.label,
@ -266,7 +268,7 @@ const t = function(name, time) {
//
edustage: userStore.edustage, // this.userStore.edustage,
edusubject: userStore.edusubject, // this.userStore.edusubject,
eid: props.bookobj.levelSecondId, // this.activeParams.lession.id,
eid: evalId, // id
status: "1",
editUserId: userStore.userId,
//orderby: 'concat(worktype,timestamp) DESC',
@ -326,9 +328,12 @@ const handleQueryFromEntpCourseWork= async (queryType) => {
}
//console.log("clueres.rows[i].childlist",clueres.rows[i].childlist);
if (clueres.rows[i].childlist != '') {
clueres.rows[i].childArray = JSON.parse('['+clueres.rows[i].childlist+']');
for (var j=0; j<clueres.rows[i].childArray.length; j++) {
clueres.rows[i].childArray[j].title = clueres.rows[i].childArray[j].title.replace(/(<([^>]+)>)/ig, '');
const tmpJson = '['+clueres.rows[i].childlist+']';
if (isJson(tmpJson)){
clueres.rows[i].childArray = JSON.parse(tmpJson);
for (var j=0; j<clueres.rows[i].childArray.length; j++) {
clueres.rows[i].childArray[j].title = clueres.rows[i].childArray[j].title.replace(/(<([^>]+)>)/ig, '');
}
}
} else {
clueres.rows[i].childArray = {};
@ -482,8 +487,16 @@ const debounceQueryData = debounce(() => {
}, 1000);
watch(() => props.bookobj.levelSecondId, (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();
})

View File

@ -43,7 +43,7 @@
</div>
<!-- orc 使用说明 -->
<div class="import-manual-explain">
<p>orc 使用说明</p>
<p>orc 使用说明填空题暂无法整题识别</p>
<p>1本地浏览 </p>
<p>2获取剪贴板图片 </p>
<p>3整题识别可识别整张图片自动填充到对应内容 </p>
@ -127,7 +127,7 @@ const courseObj = reactive({
const activeAptTab = ref("人工录入");
// false - api true - json
const OCR_WORK_TEST = false;
const OCR_WORK_TEST = true;
// []
const cropOption = reactive({
img: '', // url , base64, blob

View File

@ -2,7 +2,8 @@ import { ElMessageBox, ElMessage } from "element-plus";
import qs from "qs";
import axios from 'axios'
import request from '@/utils/request'
import { pyOCRAPI } from "@/api/education/entpcoursework";
import { pyOCRAPI, getOcrContent } from "@/api/education/entpcoursework";
import useClassTaskStore from '@/store/modules/classTask'
const EXAM_JUDGED_DICTIONARY = ["正确", "对", "√", "T", "错误", "错", "×", "F"];
@ -17,13 +18,10 @@ const baidubceConfig = {
'client_secret': 'oWb0M0YWMmZPMQIhIUkJX99ddr7h61qf',
};
export function getOcrContent(data) {
return request({
url: '/ocr/exam',
method: 'post',
data: data
})
}
const {
entpCourseWorkTypeList
} = useClassTaskStore();
/**
@ -45,7 +43,7 @@ export const ocrImg2ItemByManualUpl = async (isLocalTest = false, imgBase64 = ''
if (isLocalTest) {
// 临时本地测试json格式跟百度ocr一致
const response = await fetch('/cropImgTest/single.json');
const response = await fetch('/cropImgTest/single2.json');
const resOcr = await response.json();
ocrJson = resOcr.results;
// 识别内容拼接
@ -115,7 +113,6 @@ export const ocrImg2ItemByManualUpl = async (isLocalTest = false, imgBase64 = ''
examItem.params.push(obj);
});
return examItem;
}
else if (examType.includes('单选题') || examType.includes('多选题')) {
/** 单选题/多选题 - 选项 */
@ -150,10 +147,10 @@ export const ocrImg2ItemByManualUpl = async (isLocalTest = false, imgBase64 = ''
}
else if (curItem === 'workanswer') {
// 该类型下只做[主观题]和[复合题]的处理
if (examType.includes('主观题')) {
ocrTxt = ocrTxt.replace(/<br \/>/g, '');
examItem = ocrTxt;
}
ocrTxt = ocrTxt.replace(/<br \/>/g, '');
examItem = ocrTxt;
} else {
examItem = ocrTxt;
}
// 返回转换格式后的识别内容
@ -174,7 +171,7 @@ export const ocrImg2ExamByManualUpl = async (isLocalTest = false, imgBase64 = ''
if (isLocalTest) {
// 临时本地测试json格式跟百度ocr一致
const response = await fetch('/cropImgTest/single.json');
const response = await fetch('/cropImgTest/single1.json');
const resOcr = await response.json();
ocrJson = resOcr.results;
// 识别内容拼接
@ -234,12 +231,14 @@ const ocrImg2Json = async (urlBase64) => {
ElMessage.error("未检测到截图图片, 请截取图片后再识别");
return null;
}
let base64Code = urlBase64.split(",")[1];
const resOcr = await getOcrContent({ base64Code: base64Code });
if (resOcr.code !== 200) {
ElMessage.error("图片识别错误");
return null;
}
// const resToken = await bdyAPI_getToken();
// if (resToken.status !== 200) {
// ElMessage.error("百度智能云用户标识有误");
@ -394,8 +393,8 @@ const assembleExam = (eachSub) => {
}
// 第一部分[题干-选项] 处理
titleAndWorkDesc = tmpList[0];
// 将4个以上连续的下划线统一替换为5个
titleAndWorkDesc = titleAndWorkDesc.replace(/_{4,}/g, '_____');
// 将3个以上连续的下划线统一替换为5个
titleAndWorkDesc = titleAndWorkDesc.replace(/_{3,}/g, '_____');
// 第二部分[分析-答案] 处理
let answerAndAnswer = {};
@ -456,32 +455,35 @@ const assembleExam = (eachSub) => {
}
}
let tmpExam = null;
if (answer === '') {
/**
* 基础题型 - [单选题] [多选题] [填空题] [判断题] [主观题]
*/
tmpExam = processExamSingle(titleAndWorkDesc, answer);
}
else {
// 匹配是否存在 1. 1 (1)的存在, 题目与答案都存在则说明题型为复合题(嵌套题)
regex = /^(\d+[..。]|\(\d+\)|\d+)/;
let answerFind = regex.test(answer);
regex = /(\d+[..。]|\(\d+\)|\d+)/;
let titleFind = regex.test(titleAndWorkDesc);
if (titleFind && answerFind) {
/**
* [复合题] - 处理逻辑
*/
tmpExam = processExamMulti(titleAndWorkDesc, answer);
}
else {
/**
* 基础题型 - [单选题] [多选题] [填空题] [判断题] [主观题]
*/
tmpExam = processExamSingle(titleAndWorkDesc, answer);
}
}
// 目前暂屏蔽无[复合题], 故所有都算基础题
let tmpExam = processExamSingle(titleAndWorkDesc, answer);
// let tmpExam = null;
// if (answer === '') {
// /**
// * 基础题型 - [单选题] [多选题] [填空题] [判断题] [主观题]
// */
// tmpExam = processExamSingle(titleAndWorkDesc, answer);
// }
// else {
// // 匹配是否存在 1. 1 (1)的存在, 题目与答案都存在则说明题型为复合题(嵌套题)
// regex = /^(\d+[..。]|\(\d+\)|\d+)/;
// let answerFind = regex.test(answer);
// regex = /(\d+[..。]|\(\d+\)|\d+)/;
// let titleFind = regex.test(titleAndWorkDesc);
// if (titleFind && answerFind) {
// /**
// * [复合题] - 处理逻辑
// */
// tmpExam = processExamMulti(titleAndWorkDesc, answer);
// }
// else {
// /**
// * 基础题型 - [单选题] [多选题] [填空题] [判断题] [主观题]
// */
// tmpExam = processExamSingle(titleAndWorkDesc, answer);
// }
// }
if (tmpExam) {
// 错误信息
@ -607,13 +609,21 @@ const processExamSingle = function (titleAndWorkDesc, answer) {
* 主观题
*/
// [题型] - 格式化
examSingle.workType = "主观题";
const flagDict = ['单选题', '多选题', '判断题', '填空题'];
const another = entpCourseWorkTypeList.filter(item => !flagDict.includes(item.label));
if (another.length > 0) {
examSingle.workType = another[another.length-1].label;
// [题干]-格式化
examSingle.title = titleAndWorkDesc;
}
// [题干]-格式化
examSingle.title = titleAndWorkDesc;
// examSingle.workType = "主观题";
// [选项] - 格式化 --- 主观题无选项
//examSingle.arrWorkDesc = [];
// // [题干]-格式化
// examSingle.title = titleAndWorkDesc;
// // [选项] - 格式化 --- 主观题无选项
// //examSingle.arrWorkDesc = [];
// [题目答案] - 处理 --- ['qweasd123']
if (answer !== '') {

View File

@ -8,7 +8,7 @@
<el-form ref="questFormRef" :model="questForm" :rules="MainRules" label-width="80px">
<el-form-item label="题型" prop="worktype">
<el-select v-model="questForm.worktype" placeholder="请选择题型" style="width:20%" :disabled="questForm.id==0?false:true">
<el-option v-for="item in fromOptions.type" :key="item.value" :label="item.label" :value="item.label"></el-option>
<el-option v-for="item in fromOptions.type" :key="item.value" :label="item.label" :value="item.label" :disabled="item.label=='不限'"></el-option>
</el-select>
<el-tag v-if="questForm.worktype=='填空题'" type="danger" style=" margin-left: 10px ">温馨提示填空题题目的填空位置下划线请连续输入3-10个 _
符号eg今天___好日子</el-tag>
@ -103,7 +103,7 @@
</div>
<!-- 多选题 -->
<div v-if="questForm.worktype=='多选题'" class="questForm-item-cover">
<div v-else-if="questForm.worktype=='多选题'" class="questForm-item-cover">
<div v-for="(item,index) in questForm.list" :key='index'>
<el-form-item
:label=Options(1,index)
@ -134,7 +134,7 @@
</div>
<!-- 填空题 -->
<div v-if="questForm.worktype=='填空题'" class="questForm-item-cover">
<div v-else-if="questForm.worktype=='填空题'" class="questForm-item-cover">
<div v-for="(item,index) in questForm.list" :key='index'>
<el-form-item :label=Options(3,index) :prop="`list.${index}.text`"
:rules="{required: true, message: '填空选项不能为空', trigger: 'blur'}">
@ -157,7 +157,7 @@
</div>
<!-- 判断题 -->
<div v-if="questForm.worktype=='判断题'" class="questForm-item-cover">
<div v-else-if="questForm.worktype=='判断题'" class="questForm-item-cover">
<div v-for="(item,index) in questForm.list" :key='index'>
<el-form-item
v-if="index==0"
@ -176,7 +176,7 @@
</div>
<!-- 主观题 -->
<div v-if="questForm.worktype.indexOf('主观题') != -1" class="questForm-item-cover">
<div v-else-if="questForm.worktype.indexOf('主观题') != -1" class="questForm-item-cover">
<el-form-item label="答案">
<Tinymce v-model="questForm.workanswer" :upFileParams="{
lessionId: lessionid,
@ -239,7 +239,7 @@
<!-- 复合题 -->
<div v-if="questForm.worktype=='复合题'" class="questForm-item-cover">
<div v-else-if="questForm.worktype=='复合题'" class="questForm-item-cover">
<el-form-item label="单项题型" :prop="worktype">
<el-select v-model="questForm.mulList.worktype" placeholder="请选择题型" style="width:20%">
<!-- <el-option key="1" label="单选题" value="单选题"></el-option> -->
@ -350,6 +350,19 @@
</div>
</div>
<!-- 非统一标准名称的解答题 -->
<div v-else class="questForm-item-cover">
<el-form-item label="答案">
<Tinymce v-model="questForm.workanswer" :upFileParams="{
lessionId: lessionid,
fileAlias: '单题上传',
}" />
</el-form-item>
<div class="item-cropper-btn">
<el-button v-show="isCropper" circle @click="cropperFormItem('workanswer')"><el-icon><Search /></el-icon></el-button>
</div>
</div>
<!-- 答案分析 -->
<div class="questForm-item-cover">
<el-form-item label="答案分析" prop="method">
@ -623,8 +636,9 @@ onMounted(() => {
//
if (entpCourseWorkTypeList.length>0) {
const flagDict = ['单选题', '多选题', '判断题', '填空题'];
fromOptions.type = entpCourseWorkTypeList.filter(item => flagDict.includes(item.label));
//const flagDict = ['', '', '', ''];
//fromOptions.type = entpCourseWorkTypeList.filter(item => flagDict.includes(item.label));
fromOptions.type = entpCourseWorkTypeList
}
if (entpCourseWorkGroupList.length>0) {
fromOptions.flag = entpCourseWorkGroupList;
@ -748,8 +762,8 @@ const resetForm = () =>{
const updateForm= async(item, submitIndex=0, submitType=1) =>{
console.log(item,'item');
// []1
if (!item.hasOwnProperty('stutus')) {
item.stutus = '1';
if (!item.hasOwnProperty('status')) {
item.status = '1';
}
// [],
if (!item.hasOwnProperty('evalnodeid')) {
@ -764,7 +778,6 @@ const updateForm= async(item, submitIndex=0, submitType=1) =>{
// 线线()
item.title = item.title.replace(/<!--BA--><div class="quizPutTag" contenteditable="true">(?:&nbsp;)?<\/div><!--EA-->/g, '_____');
if(item.worktype == '复合题') {
// []
@ -902,11 +915,14 @@ const updateForm= async(item, submitIndex=0, submitType=1) =>{
}],
},
];
newList = [];
//
newList = [{text:""}];
// []
item.worktype = item.worktype.replace(/\(主观题\)/g, '');
item.worktype = `${item.worktype}(主观题)`;
//item.worktype = item.worktype.replace(/\(\)/g, '');
//item.worktype = `${item.worktype}()`;
//
//
if(isJson(item.workanswer)){
@ -1008,9 +1024,8 @@ const updateForm= async(item, submitIndex=0, submitType=1) =>{
lessionid.value = props.bookobj.levelSecondId? props.bookobj.levelSecondId : props.bookobj.levelFirstId;
console.log('lessionid', lessionid.value);
//
if( props.bookobj.node.edustage == '高中' && (props.bookobj.node.edusubject == '语文' || props.bookobj.node.edusubject == '英语') ){
if( props.bookobj.node.edusubject == '语文' || props.bookobj.node.edusubject == '英语' ){
const res = await listEvaluation({ edusubject: props.bookobj.node.edusubject, edustage: props.bookobj.node.edustage, itemkey: "subject", pageSize: 10 });
const id = res.rows[0]?.id;
if (id) {
@ -1083,6 +1098,7 @@ const updateForm= async(item, submitIndex=0, submitType=1) =>{
// status = 1,
// }
// emit('update-exam-single', updateStatus);
console.log('updateFormone->', questForm)
};
const updateFormone=(item, submitIndex, submitType, formdataitem)=>{
@ -1437,14 +1453,9 @@ const submitForm=(formName) =>{
//param.workdesc = questForm.list.map(item => item.text).join('#&');
param.workdesc = JSON.stringify(questForm.list.map(item => item.text));
// [][]
if (questForm.worktype === '单选题' || questForm.worktype === '多选题') {
//param.workanswer = questForm.checkAnswer.map(item => item).join('#&');
param.workanswer = JSON.stringify(questForm.checkAnswer);
}
// []
//
if(questForm.worktype === '复合题') {
// []
let workdesc = [];
let answer = [];
// 1.: (, 使form.title)
@ -1501,9 +1512,33 @@ const submitForm=(formName) =>{
param.workdesc = JSON.stringify(workdesc);
param.workanswer = JSON.stringify(answer);
}
else if (questForm.worktype === '单选题' || questForm.worktype === '多选题') {
// [][]
//param.workanswer = questForm.checkAnswer.map(item => item).join('#&');
param.workanswer = JSON.stringify(questForm.checkAnswer);
}
// [] "<div></div>#&<div></div>".replace(/<[^>]*>/g, "")
else if(questForm.worktype === '填空题'){
//
//param.workanswer = questForm.list.map(item => item.text).join('#&').replace(/<[^>]*>/g, "");
//
param.workdesc = '';
param.workanswer = JSON.stringify(questForm.list.map(item => item.text));
}
// [] ([] [][()], )
if(questForm.worktype.indexOf('主观题') !== -1) {
// []
else if(questForm.worktype === '判断题'){
//
//param.workanswer = questForm.list.map(item => item.text).join('#&').replace(/<[^>]*>/g, "");
//
param.workdesc = '';
param.workanswer = JSON.stringify(questForm.checkAnswer);
}
else if(questForm.worktype.indexOf('主观题') !== -1) {
// warn: [] ([] [][()], )
//
param.workdesc = ''; //
// workanswer
@ -1533,27 +1568,16 @@ const submitForm=(formName) =>{
// param.workdesc = ''; //
// param.workanswer = JSON.stringify(answer).replace(/<[^>]*>/g, "");
}
// [] "<div></div>#&<div></div>".replace(/<[^>]*>/g, "")
if(questForm.worktype === '填空题'){
//
//param.workanswer = questForm.list.map(item => item.text).join('#&').replace(/<[^>]*>/g, "");
//
param.workdesc = '';
param.workanswer = JSON.stringify(questForm.list.map(item => item.text));
else {
// (), [], ocr
param.workdesc = ''; //
// workanswer
if (questForm.workanswer && questForm.workanswer != '') {
param.workanswer = JSON.stringify([questForm.workanswer]);
}
}
// []
if(questForm.worktype === '判断题'){
//
//param.workanswer = questForm.list.map(item => item.text).join('#&').replace(/<[^>]*>/g, "");
//
param.workdesc = '';
param.workanswer = JSON.stringify(questForm.checkAnswer);
}
// , (3)
if (questForm.submitType === 3) {
@ -1703,37 +1727,40 @@ const myMessageShow=(title, msg, status)=>{
* @return: {*}
* @param {*} list
*/
const updateKnowledgePoint = (list) => {
const formatKnowledgePoint = (list) => {
list.forEach(item => {
if (item.title && item.title != '') {
item.knowTitle = item.title;
}
if (item.children && Array.isArray(item.children)) {
updateKnowledgePoint(item.children);
formatKnowledgePoint(item.children);
}
});
return list;
};
watch(() => props.bookobj.levelSecondId, async (newVal, oldVal) => {
watch([
() => props.bookobj.levelFirstId,
() => props.bookobj.levelSecondId
], async([newLevelSecondId, newLevelFirstId], [oldLevelSecondId, oldLevelFirstId]) => {
console.log(props.bookobj,'课程选择')
// props.bookobj.levelSecondId? props.bookobj.levelSecondId : props.bookobj.levelFirstId
lessionid.value = props.bookobj.levelSecondId? props.bookobj.levelSecondId : props.bookobj.levelFirstId;
lessionid.value = props.bookobj.levelSecondId!='' ? props.bookobj.levelSecondId : props.bookobj.levelFirstId;
/**
* 格式化知识点: 分两种情况
* 1. 语文/英语: 获取学科下的所有知识点(该学科对应无章节与知识点绑定, 故只获取全知识点)
* 2. 其他: 获取当前章节下的所有知识点
*/
let id = props.bookobj.levelSecondId;
if( props.bookobj.node.edustage == '高中' && (props.bookobj.node.edusubject == '语文' || props.bookobj.node.edusubject == '英语') ){
let id = lessionid.value;
if( props.bookobj.node.edusubject == '语文' || props.bookobj.node.edusubject == '英语'){
id = props.bookobj.node.rootid;
const res = await listEvaluation({ edusubject: props.bookobj.node.edusubject, edustage: props.bookobj.node.edustage, itemkey: "subject", pageSize: 10 });
id = res.rows[0]?.id;
if (id) {
listKnowlegepointFormat({evalId: id, pageNum: 1, pageSize: 5000,}).then(res => {
//console.log('listKnowlegepointFormat->', res.rows);
curKnowledgePointList.value = updateKnowledgePoint(res.rows);
curKnowledgePointList.value = formatKnowledgePoint(res.rows);
});
}
}else{

View File

@ -117,6 +117,8 @@ import { listKnowledgePoint } from "@/api/knowledge/knowledgePoint";
import { getBindlist } from '@/api/education/knowledgePoint'
import examDetailsDrawer from '@/components/exam-question/examDetailsDrawer.vue'
import { processList } from '@/hooks/useProcessList'
import { isJson } from "@/utils/comm";
import { useGetHomework } from '@/hooks/useGetHomework'
import { sessionStore } from '@/utils/store'
import {throttle,debounce } from '@/utils/comm'
@ -190,6 +192,8 @@ const workResource = reactive({
onMounted(() => {
console.log('entpCourseWorkTypeList', entpCourseWorkTypeList);
// ()
getEntpCourseWorkPointList();
debounceQueryData(); //
})
@ -235,32 +239,33 @@ function Apis(key) {
const client = new Apis('/paht');
const t = function(name, time) {
return new Promise(resolve => {
const queryForm = {
//
currentPage: paginationParams.pageNum,
pageSize: paginationParams.pageSize,
//
eid: props.bookobj.levelSecondId,
sectionName: props.bookobj.coursetitle,
edusubject: userStore.edusubject,
edustage: userStore.edustage,
//
//
worktype: entpCourseWorkQueryParams.worktype.label,
workTypeId: entpCourseWorkQueryParams.worktype.value,
//
workgroup: entpCourseWorkQueryParams.workgroup,
//
yearStr: entpCourseWorkQueryParams.yearStr !== '-1' ? entpCourseWorkQueryParams.yearStr:'',
//
thirdId: entpCourseWorkQueryParams.point&&entpCourseWorkQueryParams.point.length > 0 ? entpCourseWorkQueryParams.point[0]:'',
//
keyword: entpCourseWorkQueryParams.keyWord && entpCourseWorkQueryParams.keyWord !== '' ? entpCourseWorkQueryParams.keyWord:'',
const evalId = props.bookobj.levelSecondId=='' ? props.bookobj.levelFirstId : props.bookobj.levelSecondId;
const queryForm = {
//
currentPage: paginationParams.pageNum,
pageSize: paginationParams.pageSize,
//
eid: evalId, // id
sectionName: props.bookobj.coursetitle,
edusubject: userStore.edusubject,
edustage: userStore.edustage,
//
//
worktype: entpCourseWorkQueryParams.worktype.label,
workTypeId: entpCourseWorkQueryParams.worktype.value,
//
workgroup: entpCourseWorkQueryParams.workgroup,
//
yearStr: entpCourseWorkQueryParams.yearStr !== '-1' ? entpCourseWorkQueryParams.yearStr:'',
//
thirdId: entpCourseWorkQueryParams.point&&entpCourseWorkQueryParams.point.length > 0 ? entpCourseWorkQueryParams.point[0]:'',
//
keyword: entpCourseWorkQueryParams.keyWord && entpCourseWorkQueryParams.keyWord !== '' ? entpCourseWorkQueryParams.keyWord:'',
}
const entpcourseworkres = listEntpcourseworkNew(queryForm);
}
const entpcourseworkres = listEntpcourseworkNew(queryForm);
resolve(entpcourseworkres);
resolve(entpcourseworkres);
})
}
const handleQueryFromEntpCourseWork= async (queryType) => {
@ -329,9 +334,12 @@ const handleQueryFromEntpCourseWork= async (queryType) => {
}
//console.log("clueres.rows[i].childlist",clueres.rows[i].childlist);
if (clueres.rows[i].childlist != '') {
clueres.rows[i].childArray = JSON.parse('['+clueres.rows[i].childlist+']');
for (var j=0; j<clueres.rows[i].childArray.length; j++) {
clueres.rows[i].childArray[j].title = clueres.rows[i].childArray[j].title.replace(/(<([^>]+)>)/ig, '');
const tmpJson = '['+clueres.rows[i].childlist+']';
if (isJson(tmpJson)){
clueres.rows[i].childArray = JSON.parse(tmpJson);
for (var j=0; j<clueres.rows[i].childArray.length; j++) {
clueres.rows[i].childArray[j].title = clueres.rows[i].childArray[j].title.replace(/(<([^>]+)>)/ig, '');
}
}
} else {
clueres.rows[i].childArray = {};
@ -460,19 +468,29 @@ const captureScreenshot = (id) => {
//
const debounceQueryData = debounce(() => {
console.log("防抖 加载数据中...")
console.log(props.bookobj,'课程选择')
//
initPageParams();
//
handleQueryFromEntpCourseWork(0);
//
getQueryFromEvaluationclue();
//getQueryFromEvaluationclue();
//
getEntpCourseWorkPointList();
//getEntpCourseWorkPointList();
}, 1000);
//watch(() => props.bookobj.levelSecondId, async (newVal, oldVal) => {
watch(() => props.bookobj.levelSecondId, (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();
})

View File

@ -58,10 +58,10 @@ import { useGetSubject } from '@/hooks/useGetSubject'
import { sessionStore } from '@/utils/store'
import { debounce } from 'lodash'
import useUserStore from '@/store/modules/user'
import useClassTaskStore from '@/store/modules/classTask'
const userStore = useUserStore()
const classTaskStore = useClassTaskStore();
// import useUserStore from '@/store/modules/user'
// import useClassTaskStore from '@/store/modules/classTask'
// const userStore = useUserStore()
// const classTaskStore = useClassTaskStore();
const router = useRouter()
const { ipcRenderer } = window.electron || {}
@ -217,7 +217,7 @@ onMounted(async ()=>{
chartInstance = echarts.init(chartDom.value)
//
await classTaskStore.initJYInfo(userStore.user);
//await classTaskStore.initJYInfo(userStore.user);
const option = {

View File

@ -405,8 +405,8 @@ const changeBook = async(data) => {
let cata = parseCataByNode(data.node)
currentNode.value = data.node
uploadData.value.levelFirstId = cata[0]
uploadData.value.levelSecondId = cata[1]
uploadData.value.levelThirdId = cata[2]
uploadData.value.levelSecondId = cata[1] ?? ''
uploadData.value.levelThirdId = cata[2] ?? ''
uploadData.value.textbookId = data.textBook.curBookId
getModelInfo({cataid: currentNode.value.id}).then(res=>{
console.log(res)