Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion frontend/src/api/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,9 @@ export class ChatInfo extends Chat {
ds_type: string,
datasource_name: string,
datasource_exists: boolean,
records: Array<ChatRecord>
records: Array<ChatRecord>,
recommended_question?: string | undefined,
recommended_generate?: boolean | undefined
)
constructor(
param1?: number | Chat,
Expand Down
1 change: 1 addition & 0 deletions frontend/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/i18n/ko-KR.json
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@
"import": "가져오기",
"change_file": "파일 변경",
"data_import_completed": "데이터 가져오기 완료",
"notes_import_completed": "메모 가져오기 완료",
"imported_100_data": "데이터 {msg}개를 성공적으로 가져왔습니다",
"return_to_view": "돌아가서 보기",
"continue_importing": "계속 가져오기",
Expand Down Expand Up @@ -850,4 +851,4 @@
"to_doc": "API 보기",
"trigger_limit": "최대 {0}개의 API 키 생성 지원"
}
}
}
1 change: 1 addition & 0 deletions frontend/src/i18n/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@
"import": "导入",
"change_file": "更换文件",
"data_import_completed": "数据导入完成",
"notes_import_completed": "备注导入完成",
"imported_100_data": "成功导入数据 {msg} 条",
"return_to_view": "返回查看",
"continue_importing": "继续导入",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/chat/RecommendQuestionQuick.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
12 changes: 8 additions & 4 deletions frontend/src/views/ds/DataTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down Expand Up @@ -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) => {
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/views/ds/DatasourceForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,8 @@ const onSuccess = (response: any) => {
uploadLoading.value = false
}

const onError = () => {
const onError = (e: any) => {
ElMessage.error(e.toString())
uploadLoading.value = false
}

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/login/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
}}</span>
</div>
<div v-if="appearanceStore.getShowSlogan" class="welcome">
{{ appearanceStore.slogan || $t('common.intelligent_questioning_platform') }}
{{ appearanceStore.slogan ?? $t('common.intelligent_questioning_platform') }}
</div>
<div v-else class="welcome" style="height: 0"></div>
<div class="login-form">
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/system/appearance/LoginPreview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
</div>
</div>
<div v-if="isBtnShow(showSlogan)" class="login-welcome">
{{ pageSlogan || t('system.available_to_everyone') }}
{{ pageSlogan ?? t('common.intelligent_questioning_platform') }}
</div>
<div v-else class="login-welcome"></div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/views/system/embedded/SetUi.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
31 changes: 29 additions & 2 deletions frontend/src/views/system/excel-upload/UploaderRemark.vue
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const onError = (err: Error) => {
infoMessage.value = msg
hasError.value = true
close()
showResult()
ElMessage.error(err.toString())
}

const dialogShow = ref<boolean>(false)
Expand All @@ -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 = ''
Expand Down Expand Up @@ -253,6 +259,27 @@ const submitUpload = () => {
</span>
</template>
</el-dialog>

<el-dialog
v-model="resultShow"
:title="t('user.notes_import_completed')"
width="600px"
class="user-import-class"
@close="closeResult"
>
<div class="down-template-content">
{{ infoMessage }}
</div>

<template #footer>
<span class="dialog-footer">
<el-button @click="closeResult">{{ t('common.cancel') }}</el-button>
<el-button type="primary" @click="backToUpload">
{{ t('common.continue_to_upload') }}
</el-button>
</span>
</template>
</el-dialog>
</template>

<style lang="less">
Expand Down