Merge pull request #9432 from dataease/pr@dev@fix_cas-cache

fix(数据集): 修复cas 重新登录之后看不到数据集数据问题
This commit is contained in:
王嘉豪 2024-04-29 10:56:56 +08:00 committed by GitHub
commit 19c528e1ba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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