From fdd96e39bdec3d795764efaf66d2fb7294e3f354 Mon Sep 17 00:00:00 2001 From: shaohuzhang1 Date: Tue, 21 Nov 2023 13:52:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=AB=98=E7=BA=A7=E5=88=86=E6=AE=B5?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=B1=BB=E5=9E=8B=E9=99=90=E5=88=B6,patterns?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E4=BC=A0=E5=8F=82=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/views/dataset/step/StepSecond.vue | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/ui/src/views/dataset/step/StepSecond.vue b/ui/src/views/dataset/step/StepSecond.vue index 814a52783..a4b111e07 100644 --- a/ui/src/views/dataset/step/StepSecond.vue +++ b/ui/src/views/dataset/step/StepSecond.vue @@ -80,10 +80,16 @@ const loading = ref(false) const paragraphList = ref([]) const patternLoading = ref(false) -const form = reactive({ - patterns: [] as any, +const form = reactive<{ + patterns: Array, + limit: number, + with_filter: boolean, + [propName: string]: any +}>({ + patterns: [], limit: 0, - with_filter: false + with_filter: false, + }) function splitDocument() { @@ -96,7 +102,11 @@ function splitDocument() { }) if (radio.value === '2') { Object.keys(form).forEach((key) => { - fd.append(key, form[key]) + if (key == 'patterns') { + form.patterns.forEach(item => fd.append('patterns', item)) + } else { + fd.append(key, form[key]) + } }) } DatasetApi.postSplitDocument(fd)