Commit 1e7ba384 by 王敏

合并分支 'feature/Tippi' 到 'develop'

仪表盘只显示登录用户的数据

查看合并请求 !25
parents 9e5cf430 3ac4156f
...@@ -591,8 +591,9 @@ export default { ...@@ -591,8 +591,9 @@ export default {
? this.defaultData.slice(0, 3) ? this.defaultData.slice(0, 3)
: this.defaultData : this.defaultData
}, },
...mapState(['nowPanelTrackInfo']) ...mapState(['nowPanelTrackInfo', 'user'])
}, },
// ...mapState('user'),
watch: { watch: {
// 切换展示页面后 重新点击一下当前节点 // 切换展示页面后 重新点击一下当前节点
'$store.state.panel.mainActiveName': function(newVal, oldVal) { '$store.state.panel.mainActiveName': function(newVal, oldVal) {
...@@ -895,14 +896,16 @@ export default { ...@@ -895,14 +896,16 @@ export default {
}, },
tree(cache = false) { tree(cache = false) {
const modelInfo = localStorage.getItem('panel-main-tree') const modelInfo = localStorage.getItem('panel-main-tree')
const { username } = this.user.user
const userCache = modelInfo && cache const userCache = modelInfo && cache
if (userCache) { if (userCache) {
this.tData = JSON.parse(modelInfo) this.tData = JSON.parse(modelInfo)
?.filter(item => item.createBy === username) // 只显示创建人的数据
} }
groupTree(this.groupForm, !userCache).then((res) => { groupTree(this.groupForm, !userCache).then((res) => {
localStorage.setItem('panel-main-tree', JSON.stringify(res.data || [])) localStorage.setItem('panel-main-tree', JSON.stringify(res.data || []))
if (!userCache) { if (!userCache) {
this.tData = res.data || [] this.tData = res.data?.filter(item => item.createBy === username) || [] // 只显示创建人的数据
} }
if (this.responseSource === 'appApply') { if (this.responseSource === 'appApply') {
this.fromAppActive() this.fromAppActive()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论