Skip to content

Commit 0b1990f

Browse files
committed
refactor: lark
1 parent bf91579 commit 0b1990f

File tree

4 files changed

+48
-5
lines changed

4 files changed

+48
-5
lines changed

ui/src/locales/lang/en-US/views/document.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ export default {
171171
},
172172
feishu: {
173173
selectDocument: 'Select Document',
174-
tip1: 'Only documents and tables are supported. Documents will be segmented based on titles, and tables will be converted to Markdown format before segmentation.',
174+
tip1: 'Supports document and table types such as Feishu documents, TXT, Markdown, PDF, DOCX, HTML, XLS, XLSX, CSV, ZIP Feishu files. Documents will be segmented according to titles, and tables will be converted to Markdown format before segmentation.',
175175
tip2: 'The system does not store the original document. Before importing the document, it is recommended to standardize the document segmentation markers.',
176176
allCheck: 'Select All',
177177
errorMessage1: 'Please select a document'

ui/src/locales/lang/zh-CN/views/document.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ export default {
168168
},
169169
feishu: {
170170
selectDocument: '选择文档',
171-
tip1: '仅支持文档和表格类型,文档会根据标题分段,表格会转为Markdown格式后再分段。',
171+
tip1: '支持文档和表格类型飞书文档、支持TXT、Markdown、PDF、DOCX、HTML、XLS、XLSX、CSV、ZIP飞书文件,文档会根据标题分段,表格会转为Markdown格式后再分段。',
172172
tip2: '系统不存储原始文档,导入文档前,建议规范文档的分段标识。',
173173
allCheck: '全选',
174174
errorMessage1: '请选择文档'

ui/src/locales/lang/zh-Hant/views/document.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ export default {
167167
},
168168
feishu: {
169169
selectDocument: '選擇文檔',
170-
tip1: '僅支持文檔和表格類型,文檔會根據標題分段,表格會轉為Markdown格式後再分段。',
170+
tip1: '支持檔案和表格類型飛書檔案、支持TXT、Markdown、PDF、DOCX、HTML、XLS、XLSX、CSV、ZIP飛書檔案,檔案會根據標題分段,表格會轉為Markdown格式後再分段。',
171171
tip2: '系統不存儲原始文檔,導入文檔前,建議規範文檔的分段標識。',
172172
allCheck: '全選',
173173
errorMessage1: '請選擇文檔'

ui/src/views/dataset/ImportDocumentDataset.vue

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,55 @@
6363
src="@/assets/fileType/docx-icon.svg"
6464
alt=""
6565
height="22"
66-
v-else-if="data.type === 'docx'"
66+
v-else-if="data.type === 'docx' || data.name.endsWith('.docx')"
6767
/>
6868
<img
6969
src="@/assets/fileType/xlsx-icon.svg"
7070
alt=""
7171
height="22"
72-
v-else-if="data.type === 'sheet'"
72+
v-else-if="data.type === 'sheet' || data.name.endsWith('.xlsx')"
73+
/>
74+
<img
75+
src="@/assets/fileType/xls-icon.svg"
76+
alt=""
77+
height="22"
78+
v-else-if="data.name.endsWith('xls')"
79+
/>
80+
<img
81+
src="@/assets/fileType/csv-icon.svg"
82+
alt=""
83+
height="22"
84+
v-else-if="data.name.endsWith('csv')"
85+
/>
86+
<img
87+
src="@/assets/fileType/pdf-icon.svg"
88+
alt=""
89+
height="22"
90+
v-else-if="data.name.endsWith('.pdf')"
91+
/>
92+
<img
93+
src="@/assets/fileType/html-icon.svg"
94+
alt=""
95+
height="22"
96+
v-else-if="data.name.endsWith('.html')"
97+
/>
98+
<img
99+
src="@/assets/fileType/txt-icon.svg"
100+
alt=""
101+
height="22"
102+
v-else-if="data.name.endsWith('.txt')"
103+
/>
104+
<img
105+
src="@/assets/fileType/zip-icon.svg"
106+
alt=""
107+
height="22"
108+
v-else-if="data.name.endsWith('.zip')"
109+
/>
110+
<img
111+
src="@/assets/fileType/md-icon.svg"
112+
alt=""
113+
height="22"
114+
v-else-if="data.name.endsWith('.md')"
73115
/>
74116

75117
<span class="ml-4">{{ node.label }}</span>
@@ -236,6 +278,7 @@ function back() {
236278
margin-bottom: 20px;
237279
}
238280
}
281+
239282
.xlsx-icon {
240283
svg {
241284
width: 24px;

0 commit comments

Comments
 (0)