forked from github/dataease
refactor(工作台): 工作台最近使用列表点击可以直接跳转到对应的资源界面
This commit is contained in:
parent
99e00108a4
commit
98bed41673
@ -42,7 +42,7 @@ const forMatterValue = (
|
||||
: getRange(selectValue, timeGranularity)
|
||||
}
|
||||
|
||||
const getRange = (selectValue, timeGranularity) => {
|
||||
export const getRange = (selectValue, timeGranularity) => {
|
||||
switch (timeGranularity) {
|
||||
case 'year':
|
||||
return getYearEnd(selectValue)
|
||||
|
@ -22,7 +22,7 @@ onMounted(() => {
|
||||
<div class="ai-popper-tips-content">
|
||||
<p class="title">DataEase 智能客服</p>
|
||||
<p class="constant">
|
||||
你好,我是DataEase智能客服<br />点击一下,开启高效解答模式~<br />
|
||||
你好,我是 DataEase 智能客服<br />点击一下,开启高效解答模式~<br />
|
||||
</p>
|
||||
<div class="bottom">
|
||||
<el-button size="middle" @click="confirm"> 我知道了 </el-button>
|
||||
|
@ -13,7 +13,7 @@ import CreatDsGroup from './form/CreatDsGroup.vue'
|
||||
import type { Tree } from '../dataset/form/CreatDsGroup.vue'
|
||||
import { previewData, getById } from '@/api/datasource'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import DatasetDetail from '@/views/visualized/data/dataset/DatasetDetail.vue'
|
||||
import { timestampFormatDate } from '@/views/visualized/data/dataset/form/util'
|
||||
import EmptyBackground from '@/components/empty-background/src/EmptyBackground.vue'
|
||||
@ -42,6 +42,7 @@ import { useMoveLine } from '@/hooks/web/useMoveLine'
|
||||
import { cloneDeep } from 'lodash-es'
|
||||
import { interactiveStoreWithOut } from '@/store/modules/interactive'
|
||||
import treeSort from '@/utils/treeSortUtils'
|
||||
const route = useRoute()
|
||||
const interactiveStore = interactiveStoreWithOut()
|
||||
interface Field {
|
||||
fieldShortName: string
|
||||
@ -401,6 +402,9 @@ const listDs = () => {
|
||||
if (!!id) {
|
||||
Object.assign(nodeInfo, cloneDeep(defaultInfo))
|
||||
dfsDatasourceTree(state.datasourceTree, id)
|
||||
nextTick(() => {
|
||||
dsListTree.value.setCurrentKey(id, true)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -418,8 +422,6 @@ const dfsDatasourceTree = (ds, id) => {
|
||||
})
|
||||
}
|
||||
|
||||
listDs()
|
||||
|
||||
const creatDsFolder = ref()
|
||||
const sortList = [
|
||||
{
|
||||
@ -690,6 +692,8 @@ const defaultProps = {
|
||||
label: 'name'
|
||||
}
|
||||
onMounted(() => {
|
||||
nodeInfo.id = (route.params.id as string) || ''
|
||||
listDs()
|
||||
const { opt } = router.currentRoute.value.query
|
||||
if (opt && opt === 'create') {
|
||||
datasourceEditor.value.init(null, null)
|
||||
|
@ -3,7 +3,7 @@ import { useI18n } from '@/hooks/web/useI18n'
|
||||
import { ref, reactive, onMounted, computed } from 'vue'
|
||||
import type { TabsPaneContext } from 'element-plus-secondary'
|
||||
import GridTable from '@/components/grid-table/src/GridTable.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import dayjs from 'dayjs'
|
||||
import { shortcutOption } from './ShortcutOption'
|
||||
/* import { XpackComponent } from '@/components/plugin' */
|
||||
@ -13,11 +13,17 @@ import { useCache } from '@/hooks/web/useCache'
|
||||
import { useUserStoreWithOut } from '@/store/modules/user'
|
||||
import ShareGrid from '@/views/share/share/ShareGrid.vue'
|
||||
import ShareHandler from '@/views/share/share/ShareHandler.vue'
|
||||
import { useAppStoreWithOut } from '@/store/modules/app'
|
||||
import { useEmbedded } from '@/store/modules/embedded'
|
||||
const userStore = useUserStoreWithOut()
|
||||
const { resolve } = useRouter()
|
||||
const { t } = useI18n()
|
||||
const interactiveStore = interactiveStoreWithOut()
|
||||
const { wsCache } = useCache()
|
||||
const appStore = useAppStoreWithOut()
|
||||
const embeddedStore = useEmbedded()
|
||||
const route = useRoute()
|
||||
const { push } = useRouter()
|
||||
defineProps({
|
||||
expand: {
|
||||
type: Boolean,
|
||||
@ -161,9 +167,26 @@ const handleCellClick = row => {
|
||||
window.open('#/panel/index?dvId=' + row.id, '_self')
|
||||
} else if (['dataV', 'screen'].includes(row.type)) {
|
||||
window.open('#/screen/index?dvId=' + row.id, '_self')
|
||||
} else if (['dataset'].includes(row.type)) {
|
||||
const routeName =
|
||||
embeddedStore.getToken && appStore.getIsIframe ? 'dataset-embedded' : 'dataset'
|
||||
push({
|
||||
name: routeName,
|
||||
params: {
|
||||
id: row.id
|
||||
}
|
||||
})
|
||||
} else if (['datasource'].includes(row.type)) {
|
||||
push({
|
||||
name: 'datasource',
|
||||
params: {
|
||||
id: row.id
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const setLoading = (val: boolean) => {
|
||||
loading.value = val
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user