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
3 changes: 2 additions & 1 deletion ui/src/locales/lang/en-US/views/document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ export default {
selectDocument: 'Select Document',
tip1: 'Only documents and tables are supported. Documents will be segmented based on titles, and tables will be converted to Markdown format before segmentation.',
tip2: 'The system does not store the original document. Before importing the document, it is recommended to standardize the document segmentation markers.',
allCheck: 'Select All'
allCheck: 'Select All',
errorMessage1: 'Please select a document'
}
}
3 changes: 2 additions & 1 deletion ui/src/locales/lang/zh-CN/views/document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ export default {
selectDocument: '选择文档',
tip1: '仅支持文档和表格类型,文档会根据标题分段,表格会转为Markdown格式后再分段。',
tip2: '系统不存储原始文档,导入文档前,建议规范文档的分段标识。',
allCheck: '全选'
allCheck: '全选',
errorMessage1: '请选择文档'
}
}
9 changes: 5 additions & 4 deletions ui/src/locales/lang/zh-Hant/views/document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default {
cancelGenerateQuestion: '取消生成問題',
cancelVectorization: '取消向量化',
cancelGenerate: '取消生成',
export: '匯出',
export: '匯出'
},
tip: {
saveMessage: '當前的更改尚未保存,確認退出嗎?',
Expand Down Expand Up @@ -149,7 +149,7 @@ export default {
label: '相似度高于',
placeholder: '直接返回分段内容',
requiredMessage: '请输入相似度'
},
}
},
hitHandlingMethod: {
optimization: '模型優化',
Expand All @@ -163,12 +163,13 @@ export default {
tip3: '標籤中,系統會自動關聯標籤中的問題;',
tip4: '生成效果取決於所選模型和提示詞,用戶可自行調整至最佳效果。',
prompt1: `內容:{data}\n\n請總結上面的內容,並根據內容總結生成 5 個問題。\n回答要求:\n - 請只輸出問題;\n - 請將每個問題放置在`,
prompt2: `標籤中。`,
prompt2: `標籤中。`
},
feishu: {
selectDocument: '選擇文檔',
tip1: '僅支持文檔和表格類型,文檔會根據標題分段,表格會轉為Markdown格式後再分段。',
tip2: '系統不存儲原始文檔,導入文檔前,建議規範文檔的分段標識。',
allCheck: '全選'
allCheck: '全選',
errorMessage1: '請選擇文檔'
}
}
10 changes: 8 additions & 2 deletions ui/src/views/dataset/ImportDocumentDataset.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
@change="handleAllCheckChange"
/>
</div>
<div style="height:calc(100vh - 430px)">
<div style="height: calc(100vh - 430px)">
<el-scrollbar>
<el-tree
:props="props"
Expand Down Expand Up @@ -94,7 +94,7 @@
<script setup lang="ts">
import { ref, reactive, computed, onUnmounted } from 'vue'
import { useRouter, useRoute } from 'vue-router'
import { MsgConfirm, MsgSuccess } from '@/utils/message'
import { MsgConfirm, MsgSuccess, MsgWarning } from '@/utils/message'
import { getImgUrl } from '@/utils/utils'
import { t } from '@/locales'
import type Node from 'element-plus/es/components/tree/src/model/node'
Expand Down Expand Up @@ -186,6 +186,12 @@ function submit() {
type: node.type
}
})
if (newList.length === 0) {
disabled.value = false
MsgWarning(t('views.document.feishu.errorMessage1'))
loading.value = false
return
}
dataset
.importLarkDocument(datasetId, newList, loading)
.then((res) => {
Expand Down