From dc328c8ea24f7b14ec20d8b0451c0785283d8d89 Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Wed, 9 Oct 2024 16:26:08 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E3=80=90=E5=BA=94=E7=94=A8=E3=80=91?= =?UTF-8?q?=E5=85=B3=E8=81=94=E7=9F=A5=E8=AF=86=E5=BA=93=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/AddDatasetDialog.vue | 37 ++++++++++++++----- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/ui/src/views/application/component/AddDatasetDialog.vue b/ui/src/views/application/component/AddDatasetDialog.vue index 0e905922a..41cd2bea8 100644 --- a/ui/src/views/application/component/AddDatasetDialog.vue +++ b/ui/src/views/application/component/AddDatasetDialog.vue @@ -14,7 +14,7 @@

{{ $t('views.application.applicationForm.dialogues.addDataset') }}

-
+
{{ $t('views.application.applicationForm.dialogues.refresh') }} @@ -22,9 +22,18 @@
- - 所选知识库必须使用相同的 Embedding 模型 - +
+ + 所选知识库必须使用相同的 Embedding 模型 + + +
@@ -76,17 +85,28 @@ const emit = defineEmits(['addData', 'refresh']) const dialogVisible = ref(false) const checkList = ref([]) const currentEmbedding = ref('') +const searchValue = ref('') +const searchDate = ref([]) const filterData = computed(() => { return currentEmbedding.value - ? props.data.filter((v) => v.embedding_mode_id === currentEmbedding.value) - : props.data + ? searchDate.value.filter((v) => v.embedding_mode_id === currentEmbedding.value) + : searchDate.value }) watch(dialogVisible, (bool) => { if (!bool) { checkList.value = [] currentEmbedding.value = '' + searchValue.value = '' + } +}) + +watch(searchValue, (val) => { + if (val) { + searchDate.value = props.data.filter((v) => v.name.includes(val)) + } else { + searchDate.value = props.data } }) @@ -105,6 +125,7 @@ function clearCheck() { } const open = (checked: any) => { + searchDate.value = props.data checkList.value = checked if (checkList.value.length > 0) { currentEmbedding.value = props.data.filter( @@ -137,9 +158,7 @@ defineExpose({ open }) .el-dialog__footer { padding: 8px 24px 24px 24px; } - .el-dialog__header.show-close { - padding-right: 34px; - } + .el-dialog__headerbtn { top: 13px; }