diff --git a/frontend/src/api/chat.ts b/frontend/src/api/chat.ts index b3d23782c..2899abd19 100644 --- a/frontend/src/api/chat.ts +++ b/frontend/src/api/chat.ts @@ -189,7 +189,9 @@ export class ChatInfo extends Chat { ds_type: string, datasource_name: string, datasource_exists: boolean, - records: Array + records: Array, + recommended_question?: string | undefined, + recommended_generate?: boolean | undefined ) constructor( param1?: number | Chat, diff --git a/frontend/src/i18n/en.json b/frontend/src/i18n/en.json index ef52ad180..e391aaca7 100644 --- a/frontend/src/i18n/en.json +++ b/frontend/src/i18n/en.json @@ -465,6 +465,7 @@ "import": "Import", "change_file": "Change file", "data_import_completed": "Data import completed", + "notes_import_completed": "Import of notes complete", "imported_100_data": "Successfully imported {msg} data", "return_to_view": "Return to view", "continue_importing": "Continue importing", diff --git a/frontend/src/i18n/ko-KR.json b/frontend/src/i18n/ko-KR.json index 73e05fe05..677614600 100644 --- a/frontend/src/i18n/ko-KR.json +++ b/frontend/src/i18n/ko-KR.json @@ -465,6 +465,7 @@ "import": "가져오기", "change_file": "파일 변경", "data_import_completed": "데이터 가져오기 완료", + "notes_import_completed": "메모 가져오기 완료", "imported_100_data": "데이터 {msg}개를 성공적으로 가져왔습니다", "return_to_view": "돌아가서 보기", "continue_importing": "계속 가져오기", @@ -850,4 +851,4 @@ "to_doc": "API 보기", "trigger_limit": "최대 {0}개의 API 키 생성 지원" } -} +} \ No newline at end of file diff --git a/frontend/src/i18n/zh-CN.json b/frontend/src/i18n/zh-CN.json index 79e36cafe..1f652bf1e 100644 --- a/frontend/src/i18n/zh-CN.json +++ b/frontend/src/i18n/zh-CN.json @@ -466,6 +466,7 @@ "import": "导入", "change_file": "更换文件", "data_import_completed": "数据导入完成", + "notes_import_completed": "备注导入完成", "imported_100_data": "成功导入数据 {msg} 条", "return_to_view": "返回查看", "continue_importing": "继续导入", diff --git a/frontend/src/views/chat/RecommendQuestionQuick.vue b/frontend/src/views/chat/RecommendQuestionQuick.vue index bd4436de4..048c82f1f 100644 --- a/frontend/src/views/chat/RecommendQuestionQuick.vue +++ b/frontend/src/views/chat/RecommendQuestionQuick.vue @@ -53,7 +53,7 @@ async function getRecommendQuestions(articles_number: number) { if (res.recommended_config === 2) { questions.value = res.questions } else if (currentChat.value.recommended_generate) { - questions.value = currentChat.value.recommended_question + questions.value = currentChat.value.recommended_question as string } else { getRecommendQuestionsLLM(articles_number) } diff --git a/frontend/src/views/ds/DataTable.vue b/frontend/src/views/ds/DataTable.vue index d0db7d2b7..70c7b29af 100644 --- a/frontend/src/views/ds/DataTable.vue +++ b/frontend/src/views/ds/DataTable.vue @@ -107,9 +107,13 @@ const handleCurrentChange = (val: number) => { const fieldListComputed = computed(() => { const { currentPage, pageSize } = pageInfo - return fieldList.value - .filter((ele: any) => ele.field_name.toLowerCase().includes(fieldName.value.toLowerCase())) - .slice((currentPage - 1) * pageSize, currentPage * pageSize) + return fieldListTotalComputed.value.slice((currentPage - 1) * pageSize, currentPage * pageSize) +}) + +const fieldListTotalComputed = computed(() => { + return fieldList.value.filter((ele: any) => + ele.field_name.toLowerCase().includes(fieldName.value.toLowerCase()) + ) }) const init = (reset = false) => { @@ -319,7 +323,7 @@ const renderHeader = ({ column }: any) => { } const fieldNameSearch = debounce(() => { pageInfo.currentPage = 1 - pageInfo.total = fieldListComputed.value.length + pageInfo.total = fieldListTotalComputed.value.length }, 100) const fieldName = ref('') const btnSelectClick = (val: any) => { diff --git a/frontend/src/views/ds/DatasourceForm.vue b/frontend/src/views/ds/DatasourceForm.vue index 3c23128bc..b8d99933a 100644 --- a/frontend/src/views/ds/DatasourceForm.vue +++ b/frontend/src/views/ds/DatasourceForm.vue @@ -424,7 +424,8 @@ const onSuccess = (response: any) => { uploadLoading.value = false } -const onError = () => { +const onError = (e: any) => { + ElMessage.error(e.toString()) uploadLoading.value = false } diff --git a/frontend/src/views/login/index.vue b/frontend/src/views/login/index.vue index d40c0e45f..85ee42e69 100644 --- a/frontend/src/views/login/index.vue +++ b/frontend/src/views/login/index.vue @@ -24,7 +24,7 @@ }}
- {{ appearanceStore.slogan || $t('common.intelligent_questioning_platform') }} + {{ appearanceStore.slogan ?? $t('common.intelligent_questioning_platform') }}
diff --git a/frontend/src/views/system/embedded/SetUi.vue b/frontend/src/views/system/embedded/SetUi.vue index 3b6005ed5..e0a0cbe6e 100644 --- a/frontend/src/views/system/embedded/SetUi.vue +++ b/frontend/src/views/system/embedded/SetUi.vue @@ -156,12 +156,12 @@ const customColorChange = (val: any) => { } const setPageCustomColor = (val: any) => { - const ele = document.querySelector('.ui-main') as HTMLElement + const ele = document.querySelector('.left-preview') as HTMLElement setCurrentColor(val, ele) } const setPageHeaderFontColor = (val: any) => { - const ele = document.getElementsByClassName('ui-main')[0] as HTMLElement + const ele = document.getElementsByClassName('left-preview')[0] as HTMLElement ele.style.setProperty('--ed-text-color-primary', val) } const resetSqlBotForm = (reset2Default?: boolean) => { diff --git a/frontend/src/views/system/excel-upload/UploaderRemark.vue b/frontend/src/views/system/excel-upload/UploaderRemark.vue index ee01da764..ed827c916 100644 --- a/frontend/src/views/system/excel-upload/UploaderRemark.vue +++ b/frontend/src/views/system/excel-upload/UploaderRemark.vue @@ -134,7 +134,7 @@ const onError = (err: Error) => { infoMessage.value = msg hasError.value = true close() - showResult() + ElMessage.error(err.toString()) } const dialogShow = ref(false) @@ -144,7 +144,13 @@ const resultShow = ref(false) function showResult() { resultShow.value = true } - +function closeResult() { + resultShow.value = false +} +function backToUpload() { + closeResult() + open() +} function open() { dialogShow.value = true errorFileName.value = '' @@ -253,6 +259,27 @@ const submitUpload = () => { + + +
+ {{ infoMessage }} +
+ + +