Merge pull request #8618 from dataease/pr@dev-v2@feat_workbranck_jump

feat(工作台): 点击工作台列表列表中的大屏或仪表板可以直接跳转到资源预览界面
This commit is contained in:
王嘉豪 2024-03-21 10:44:21 +08:00 committed by GitHub
commit 6cc0ed58a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -148,6 +148,16 @@ const sortChange = param => {
orderDesc.value = type === 'desc'
loadTableData()
}
const handleCellClick = row => {
if (row) {
if (['dashboard', 'panel'].includes(row.type)) {
window.open('#/panel/index?dvId=' + row.id, '_self')
} else if (['dataV', 'screen'].includes(row.type)) {
window.open('#/screen/index?dvId=' + row.id, '_self')
}
}
}
const setLoading = (val: boolean) => {
loading.value = val
}
@ -259,6 +269,7 @@ const getEmptyDesc = (): string => {
:show-pagination="false"
:table-data="state.tableData"
@sort-change="sortChange"
@cell-click="handleCellClick"
:empty-desc="emptyDesc"
:empty-img="imgType"
class="workbranch-grid"