From 89aa5a0645be511ee8c503bb54e5c5b5edeb9747 Mon Sep 17 00:00:00 2001 From: "jialong.yu" Date: Thu, 30 Dec 2021 22:38:16 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=93=E5=AD=98=E5=90=8E=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E5=99=A8=E8=81=9A=E7=84=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/images/system/5/right.png | Bin 3685 -> 20103 bytes src/components/TestPanel.vue | 5 ++--- src/components/codemirror.vue | 4 +++- src/views/Home.vue | 8 +++++--- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/assets/images/system/5/right.png b/src/assets/images/system/5/right.png index 09683050a1b3b99850d5acc8bd29a016bea80b62..9c74e252a5b1d129b7cbb415954501f25fdbf52e 100644 GIT binary patch literal 20103 zcmeI42{_c<+s9`}BFpoqR7j$fn8nOsW-L8I)}bU@Dr06awqa&s$gW6fQ&AF8mO>3B zOQo?Tdy%C=M2lpLED7&#s;4~j^vwHz-~a!;-s^p@nd=(AxzBy>?>Xml&biNT=DL1j zc32pR3QG%vKp;^QV*@MTstvsRmn{YUR-QJ30~aA5V|yA1v|N(?27?llR)auVhsoA< zbUU0mmO$}>;)xVz5|rWP1JnitwlaM11P>Bj-kIb|_SR7tx%)sto=ntHuvN#waX$Ja zH?nacm9#6+!kQ51LBJ3dw(1INGq8Yw7m1FSXLxyf)36L3g|E6;;4`}zrXc^d3f)6T zL66;_yd7?bygr3Wl2?bSLkMs+l)NSes-~`nLaV9DBj9RC7#s;xLqgOLSU3i&rY`^e zrJySeeA1>8U9eUL+rKvlSUL)Bbh-}~2J`p#hx#L-6sjvs4THhJ;0PE30Rd`2XaU}I zJOkoQQ~W0KhmHY>Mxc^?=wynwJX;sFG&joMH2K5*w+#bxg2Vl2 z``dG`gW5fZ#jQUq;fb1AIs@D-w-zfJz`4`T;{x{MG2`WS5_l^Cu;?=WqK? zVvzqP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ruH!a8iCE78VhGuvF1ryk(9p;>S=}(eFMku5Z$fj(ea{g@z&Sn@ZzTbw8h@WiggB gdE~^L4Dg@U*86YNo)0-wf6O#6h_POsj&tn)05Vauc>n+a diff --git a/src/components/TestPanel.vue b/src/components/TestPanel.vue index 420f651..587eba0 100644 --- a/src/components/TestPanel.vue +++ b/src/components/TestPanel.vue @@ -283,7 +283,7 @@ export default { const cid = this.courseId const assessmentId = this.assessmentId let points = [] - if (pId) { + if (pId && cache.judgmentIdList) { cache.judgmentIdList.map(e => { points.push({ judgmentId: e @@ -310,7 +310,7 @@ export default { // 如果有缓存代码 if (code) { hasCache = 1 - if (!newJudgmentId) newJudgmentId = i + if (newJudgmentId === '') newJudgmentId = i e.code = code } resolve() @@ -329,7 +329,6 @@ export default { }).then(() => { localStorage.removeItem('codeCache') // 恢复代码后清除本地缓存 this.projectId = projectId - // this.judgmentId = newJudgmentId // 如果是本地缓存里有项目id,则要再次获取项目详情,取判分列表再次赋值;本地没有缓存则取只恢复第一个判分点的代码 if (pId) { this.getProDetail().then(() => { diff --git a/src/components/codemirror.vue b/src/components/codemirror.vue index d9a35ae..9311b0e 100644 --- a/src/components/codemirror.vue +++ b/src/components/codemirror.vue @@ -308,16 +308,18 @@ export default { this.$emit('update:codeId', res.codeId) // 更新coddeId this.$emit('update:answer', result) // 更新运行结果 let imgList = '' + let firtImg = '' try { imgList = eval(result) } catch (error) {} + if (imgList.length) firtImg = imgList[0] // 如果是下载图片的代码,则要显示图片和运行结果,不用显示对错,换成显示下载图片 if (photo) { this.isError = '' // 对错隐藏 const text = result.replace(photo, '') // 结果里包含了图片路径,所以要把图片路径给去掉 this.runResult = text this.picSrc = photo - } else if (imgList instanceof Array && imgList.length && (imgList[0].includes('.jpg') || imgList[0].includes('.png') || imgList[0].includes('img'))) { + } else if (imgList instanceof Array && imgList.length && typeof firtImg === 'string' && (firtImg.includes('.jpg') || firtImg.includes('.png') || firtImg.includes('img'))) { /** * 这段是为要下载图片的项目案例写的,后端会返回图片名称的数组,前端负责循环这个数组,然后下载下来 * 只有该系统有这段代码,因为其他7个系统没有下载图片的项目,后续如果加了,直接把这段代码复制过去即可 diff --git a/src/views/Home.vue b/src/views/Home.vue index 0b0302a..2ef2005 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -122,9 +122,11 @@ export default { }, // 判分规则切换 judChange() { - const code = this.$refs['code' + this.curTab][0].$refs.codemirror.codemirror - code.focus() - code.setCursor(code.lineCount(), 0) + this.$nextTick(_ => { + const code = this.$refs['code' + this.curTab][0].$refs.codemirror.codemirror // 获取codemirror实例 + code.focus() // 编辑器聚焦 + code.setCursor(code.lineCount(), 0) // 焦点移动至最后面 + }) }, // 重置编辑器 recoveryCode(curTab = '0'){