From caf28fba284e1e35030cba23c23f217010c3be51 Mon Sep 17 00:00:00 2001 From: maxmon <541182180@qq.com> Date: Sat, 16 Apr 2022 23:06:46 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=80=91=E5=B8=83=E5=BC=8F=E6=B5=81):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=A1=B5=E7=A0=81=E6=8C=81=E7=BB=AD=E4=B8=8A?= =?UTF-8?q?=E5=8D=87=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=8C=E5=A6=82=E6=9E=9C?= =?UTF-8?q?=E6=9C=80=E6=96=B0=E7=9A=84=E9=A1=B5=E7=A0=81=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=EF=BC=8C=E8=AE=A1=E6=95=B0=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E4=B8=8A=E4=B8=80=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fe/src/components/NER/index.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fe/src/components/NER/index.vue b/fe/src/components/NER/index.vue index c588494..743acc4 100644 --- a/fe/src/components/NER/index.vue +++ b/fe/src/components/NER/index.vue @@ -270,6 +270,9 @@ export default { getFiles () { const that = this get(`/v1/files/query?projectName=${that.projectName}&pageNumber=${that.pageNumber}&pageSize=${that.pageSize}`, function (info) { + if (!info || info.length === 0) { + that.pageNumber -= 1 + } let newFiles = info.map((item) => { if (typeof item === 'string') return item that.isAnnoDic[`${that.projectName}_${item.fileName}`] = item.isAnno @@ -294,10 +297,7 @@ export default { }, nextPage () { const that = this - // if (that.files.length === that.pageSize) { - that.pageNumber = that.pageNumber + 1 that.getFiles() - // } }, goHome: function () { this.$router.push({path: '/'})