fix(数据集): 修复cas 重新登录之后看不到数据集数据问题

This commit is contained in:
wangjiahao 2024-04-29 10:55:31 +08:00
parent b930bc7afb
commit 747124a0e5

View File

@ -694,9 +694,17 @@ export default {
init(cache = true) {
const { id } = this.$route.params
const modelInfo = localStorage.getItem('dataset-tree')
const userCache = modelInfo && cache
let preParse
if (modelInfo) {
try {
preParse = JSON.parse(modelInfo)
} catch (e) {
console.warn('dataset-tree cache error')
}
}
const userCache = preParse && cache
if (userCache) {
this.tData = JSON.parse(modelInfo)
this.tData = preParse
this.queryAfter(id)
} else {
this.treeLoading = true