提交 47fdd782 authored 作者: matian's avatar matian

updates

上级 10217077
<template>
<div>
<div class="banner">
<div v-if="roadList && roadList.length">
<div v-for="(item, index) in list" :key="index" class="roadList">
<el-popover
title="我的项目"
......@@ -30,7 +29,6 @@
</div>
</el-popover>
</div>
</div>
<div class="homeList" v-if="homeList && homeList.length">
<div class="homeList_con" v-for="(itemRoad, index) in homeList" :key="index">
<el-popover trigger="click" popper-class="popover" :placement="itemRoad.position" v-model="itemRoad.isShow">
......@@ -69,17 +67,16 @@ import ProjectCard from '@/components/ProjectCard.vue'
export default {
components: { AppLink, ProjectCard },
computed: {
learning() {
return this.$store.state.user.learning_info.filter(item => item.status === '1')
learningInfo() {
return this.learning.filter(item => item.status === '1')
},
list() {
if (this.learning.length) {
if (this.learningInfo.length) {
this.roadList.forEach(item => {
console.log(item, '000')
if (item.projectList.find(it => it.tenant === this.learning[0].tenant)) {
if (item.projectList.find(it => it.tenant === this.learningInfo[0].tenant)) {
item.isShow = true
item.project_name = '我的项目:'
item.projectList = item.projectList.filter(it => it.tenant === this.learning[0].tenant)
item.projectList = item.projectList.filter(it => it.tenant === this.learningInfo[0].tenant)
}
})
return this.roadList
......@@ -90,6 +87,7 @@ export default {
},
data() {
return {
learning: [],
roadList: roadMapList,
homeList: homeList,
internationalDegreeProjectList: [
......@@ -131,6 +129,9 @@ export default {
}
})
}
},
mounted() {
this.learning = JSON.parse(window.localStorage.getItem('learningList'))
}
}
</script>
......
......@@ -197,7 +197,7 @@ export const homeList = [
]
},
{
position: 'top-start',
position: 'top',
icon: 'https://webapp-pub.ezijing.com/www/pc/lifeLearning/home.png',
isShow: false,
title: '企业培训',
......
......@@ -44,6 +44,9 @@ export const actions = {
const isLogin = await getUser()
.then(response => {
commit('setUser', response.data)
console.log(response.data.learning_info, 'data')
window.localStorage.setItem('learningList', JSON.stringify(response.data.learning_info))
console.log(JSON.parse(window.localStorage.getItem('learningList')))
return true
})
.catch(() => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论