@@ -5,6 +5,7 @@ import icon_searchOutline_outlined from '@/assets/svg/icon_search-outline_outlin
55import arrow_down from ' @/assets/svg/arrow-down.svg'
66import icon_add_outlined from ' @/assets/svg/icon_add_outlined.svg'
77import EmptyBackground from ' @/views/dashboard/common/EmptyBackground.vue'
8+ import { useRouter } from ' vue-router'
89import DataTable from ' ./DataTable.vue'
910import icon_done_outlined from ' @/assets/svg/icon_done_outlined.svg'
1011import icon_close_outlined from ' @/assets/svg/operate/ope-close.svg'
@@ -18,12 +19,14 @@ import { useI18n } from 'vue-i18n'
1819
1920interface Datasource {
2021 name: string
22+ type_name: string
2123 type: string
2224 img: string
23- rate ? : string
25+ description : string
2426 id? : string
2527}
2628
29+ const router = useRouter ()
2730const { t } = useI18n ()
2831const keywords = ref (' ' )
2932const defaultDatasourceKeywords = ref (' ' )
@@ -75,6 +78,15 @@ const handleEditDatasource = (res: any) => {
7578 })
7679}
7780
81+ const handleQuestion = (id : string ) => {
82+ router .push ({
83+ path: ' /chat/index' ,
84+ query: {
85+ id ,
86+ },
87+ })
88+ }
89+
7890const handleAddDatasource = () => {
7991 editDatasource .value = false
8092 datasourceConfigvVisible .value = true
@@ -208,7 +220,7 @@ const dataTableDetail = (ele: any) => {
208220 </el-icon >
209221 </div >
210222 <div v-if =" !defaultDatasourceListWithSearch.length" class =" popover-item empty" >
211- 没有找到相关结果
223+ {{ t('model.relevant_results_found') }}
212224 </div >
213225 </div >
214226 </div >
@@ -235,7 +247,9 @@ const dataTableDetail = (ele: any) => {
235247 :key =" ele.id"
236248 :name =" ele.name"
237249 :type =" ele.type"
238- :rate =" ele.rate"
250+ :type_name =" ele.type_name"
251+ :description =" ele.description"
252+ @question =" handleQuestion"
239253 @edit =" handleEditDatasource(ele)"
240254 @del =" deleteHandler(ele)"
241255 @data-table-detail =" dataTableDetail(ele)"
0 commit comments