From c85261dce79f9b4673140be0f62ba419e049a35d Mon Sep 17 00:00:00 2001 From: maxmon <541182180@qq.com> Date: Fri, 22 Apr 2022 20:03:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=AE=BF=E9=97=AE?= =?UTF-8?q?=E8=BF=87=E9=A2=91=E7=B9=81=E5=AF=BC=E8=87=B4=E6=A0=87=E6=B3=A8?= =?UTF-8?q?=E8=B7=91=E5=88=B0=E5=85=B6=E4=BB=96=E6=96=87=E4=BB=B6=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fe/src/components/NER/index.vue | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/fe/src/components/NER/index.vue b/fe/src/components/NER/index.vue index 743acc4..3748991 100644 --- a/fe/src/components/NER/index.vue +++ b/fe/src/components/NER/index.vue @@ -340,13 +340,19 @@ export default { delete window.isLoadingNowText // 如果本地没有缓存,就用线上的标注记录 if (!hasCache && info.annoDetails) { - that.$set(that, 'ners', info.annoDetails) - that.$set(that.nersCache, that.nowFile, [...that.ners]) - that.flushWordsType() + console.log(newFile, that.nowFile) + if (newFile === that.nowFile) { + that.$set(that, 'ners', info.annoDetails) + that.flushWordsType() + } + // 更新文件的标注缓存 + that.$set(that.nersCache, newFile, info.annoDetails) } - // 更新文件的文本信息 + // 更新文件的文本缓存 that.$set(that.textDic, newFile, info.fileContent) - that.nowText = that.textDic[newFile] + if (newFile === that.nowFile) { + that.nowText = that.textDic[newFile] + } }) } if (that.files.indexOf(newFile) >= (that.files.length - 1) - 2) {