@@ -59,7 +59,8 @@ const tableListWithSearch = computed(() => {
5959 ele .name .toLowerCase ().includes (keywords .value .toLowerCase ())
6060 )
6161})
62-
62+ const total = ref (1000 )
63+ const showNum = ref (100 )
6364const currentTable = ref <any >({})
6465const ds = ref <any >({})
6566const btnSelect = ref (' q' )
@@ -169,7 +170,7 @@ const changeStatus = (row: any) => {
169170<template >
170171 <div class =" data-table no-padding" >
171172 <div class =" info" >
172- 数据源
173+ {{ $t('ds.title') }}
173174 <el-icon size =" 12" >
174175 <icon _right_outlined ></icon _right_outlined >
175176 </el-icon >
@@ -178,12 +179,20 @@ const changeStatus = (row: any) => {
178179 <div class =" content" >
179180 <div class =" side-list" >
180181 <div class =" select-table_top" >
181- 数据表
182- <el-icon size =" 18" @click =" handleSelectTableList" >
183- <icon _form_outlined ></icon _form_outlined >
184- </el-icon >
182+ {{ $t('ds.tables') }}
183+
184+ <el-tooltip effect =" dark" :content =" $t('ds.form.choose_tables')" placement =" top" >
185+ <el-icon size =" 18" @click =" handleSelectTableList" >
186+ <icon _form_outlined ></icon _form_outlined >
187+ </el-icon >
188+ </el-tooltip >
185189 </div >
186- <el-input v-model =" keywords" clearable style =" width : 232px " placeholder =" 搜索" >
190+ <el-input
191+ v-model =" keywords"
192+ clearable
193+ style =" width : 232px "
194+ :placeholder =" $t('datasource.search')"
195+ >
187196 <template #prefix >
188197 <el-icon >
189198 <icon _searchOutline_outlined class =" svg-icon" />
@@ -206,7 +215,7 @@ const changeStatus = (row: any) => {
206215 </div >
207216 <EmptyBackground
208217 v-if =" !!keywords && !tableListWithSearch.length"
209- :description =" '没有找到相关内容' "
218+ :description =" $t('datasource.relevant_content_found') "
210219 img-type =" tree"
211220 style =" width : 100% ; margin-top : 100px "
212221 />
@@ -217,7 +226,8 @@ const changeStatus = (row: any) => {
217226 <div class =" table-name" >
218227 <div class =" name" >{{ currentTable.table_name }}</div >
219228 <div class =" notes" >
220- {{ currentTable.custom_comment }}
229+ {{ $t('about.remark') }}:
230+ {{ currentTable.custom_comment || '-' }}
221231 <el-icon style =" margin-left : 8px ; cursor : pointer " size =" 16" @click =" editTable" >
222232 <edit ></edit >
223233 </el-icon >
@@ -235,22 +245,27 @@ const changeStatus = (row: any) => {
235245
236246 <div class =" preview-or-schema" >
237247 <el-table v-if =" btnSelect === 'd'" :data =" fieldList" style =" width : 100% " >
238- <el-table-column prop =" field_name" :label =" t('ds.field.name ')" width =" 180" />
239- <el-table-column prop =" field_type" :label =" t('ds.field.type ')" width =" 180" />
240- <el-table-column prop =" field_comment" :label =" t('ds.field.comment ')" />
241- <el-table-column :label =" t('ds.field.custom_comment ')" >
248+ <el-table-column prop =" field_name" :label =" t('datasource.field_name ')" width =" 180" />
249+ <el-table-column prop =" field_type" :label =" t('datasource.field_type ')" width =" 180" />
250+ <el-table-column prop =" field_comment" :label =" t('about.remark ')" />
251+ <el-table-column :label =" t('datasource.custom_notes ')" >
242252 <template #default =" scope " >
243253 <div class =" field-comment" >
244254 <span >{{ scope.row.custom_comment }}</span >
245- <el-tooltip :offset =" 14" effect =" dark" content =" 编辑" placement =" top" >
255+ <el-tooltip
256+ :offset =" 14"
257+ effect =" dark"
258+ :content =" $t('datasource.edit')"
259+ placement =" top"
260+ >
246261 <el-icon class =" action-btn" size =" 16" @click =" editField(scope.row)" >
247262 <edit ></edit >
248263 </el-icon >
249264 </el-tooltip >
250265 </div >
251266 </template >
252267 </el-table-column >
253- <el-table-column :label =" t('ds.field.status ')" width =" 180" >
268+ <el-table-column :label =" t('datasource.enabled_status ')" width =" 180" >
254269 <template #default =" scope " >
255270 <div style =" display : flex ; align-items : center " >
256271 <el-switch
@@ -262,29 +277,38 @@ const changeStatus = (row: any) => {
262277 </template >
263278 </el-table-column >
264279 </el-table >
265-
266- <el-table v-else :data =" previewData.data" style =" width : 100% ; height : 600px " >
267- <el-table-column
268- v-for =" (c, index) in previewData.fields"
269- :key =" index"
270- :prop =" c"
271- :label =" c"
272- />
273- </el-table >
280+ <template v-else >
281+ <div class =" preview-num" >
282+ {{ t('ds.pieces_in_total', { msg: total, ms: showNum }) }}
283+ </div >
284+ <el-table :data =" previewData.data" style =" width : 100% ; height : 600px " >
285+ <el-table-column
286+ v-for =" (c, index) in previewData.fields"
287+ :key =" index"
288+ :prop =" c"
289+ :label =" c"
290+ />
291+ </el-table >
292+ </template >
274293 </div >
275294 </div >
276295 </div >
277296 </div >
278297 </div >
279298 <el-dialog
280299 v-model =" tableDialog"
281- :title =" t('ds.edit.table_comment ')"
300+ :title =" t('datasource.table_notes ')"
282301 width =" 600"
283302 :destroy-on-close =" true"
284303 :close-on-click-modal =" false"
285304 @closed =" closeTable"
286305 >
287- <el-input v-model =" tableComment" :rows =" 3" type =" textarea" />
306+ <el-input
307+ :placeholder =" $t('datasource.please_enter')"
308+ v-model =" tableComment"
309+ :rows =" 3"
310+ type =" textarea"
311+ />
288312 <div style =" display : flex ; justify-content : flex-end ; margin-top : 20px " >
289313 <el-button @click =" closeTable" >{{ t('common.cancel') }}</el-button >
290314 <el-button type =" primary" @click =" saveTable" >{{ t('common.confirm') }}</el-button >
@@ -293,13 +317,18 @@ const changeStatus = (row: any) => {
293317
294318 <el-dialog
295319 v-model =" fieldDialog"
296- :title =" t('ds.edit.field_comment ')"
320+ :title =" t('datasource.field_notes ')"
297321 width =" 600"
298322 :destroy-on-close =" true"
299323 :close-on-click-modal =" false"
300324 @closed =" closeField"
301325 >
302- <el-input v-model =" fieldComment" :rows =" 3" type =" textarea" />
326+ <el-input
327+ :placeholder =" $t('datasource.please_enter')"
328+ v-model =" fieldComment"
329+ :rows =" 3"
330+ type =" textarea"
331+ />
303332 <div style =" display : flex ; justify-content : flex-end ; margin-top : 20px " >
304333 <el-button @click =" closeField" >{{ t('common.cancel') }}</el-button >
305334 <el-button type =" primary" @click =" saveField" >{{ t('common.confirm') }}</el-button >
@@ -467,6 +496,14 @@ const changeStatus = (row: any) => {
467496 }
468497 }
469498 }
499+
500+ .preview-num {
501+ margin : 12px 0 ;
502+ font-weight : 400 ;
503+ font-size : 14px ;
504+ line-height : 22px ;
505+ color : #646a73 ;
506+ }
470507 }
471508 }
472509 }
0 commit comments