|  | @@ -1,103 +1,27 @@
 | 
	
		
			
				|  |  |  <template>
 | 
	
		
			
				|  |  |    <div class="app-back">
 | 
	
		
			
				|  |  | -    <div class="banner">
 | 
	
		
			
				|  |  | -      <el-image :src="`${$imgBase}index/banner/personal_database.png`" fit="cover"></el-image>
 | 
	
		
			
				|  |  | -    </div>
 | 
	
		
			
				|  |  | +    <div class="index-banner" :style="bannerStyle" />
 | 
	
		
			
				|  |  |      <div class="fx-column fx-cen-cen pb20">
 | 
	
		
			
				|  |  | -      <index-card title="班级任务" class="mt20 index-block" v-if="formatList.length">
 | 
	
		
			
				|  |  | -        <el-row :gutter="20">
 | 
	
		
			
				|  |  | -          <el-col class="relative fx-cen-cen fx-column"   :span="4" v-for="item in formatList" >
 | 
	
		
			
				|  |  | -            <div class="plan_item pointer" @click="$router.push(item.path)">
 | 
	
		
			
				|  |  | -              <div class="img-wrap">
 | 
	
		
			
				|  |  | -                <img  :src="item.img"/>
 | 
	
		
			
				|  |  | -              </div>
 | 
	
		
			
				|  |  | -            </div>
 | 
	
		
			
				|  |  | -            <p class="bold text-center" >{{ item.title }}</p>
 | 
	
		
			
				|  |  | -          </el-col>
 | 
	
		
			
				|  |  | -        </el-row>
 | 
	
		
			
				|  |  | -      </index-card>
 | 
	
		
			
				|  |  | -      <index-card-res-library class="mt20 index-block"></index-card-res-library>
 | 
	
		
			
				|  |  | +      <index-card-task class="mt20 index-block" />
 | 
	
		
			
				|  |  | +      <index-card-res-library class="mt20 index-block" />
 | 
	
		
			
				|  |  |      </div>
 | 
	
		
			
				|  |  |    </div>
 | 
	
		
			
				|  |  |  </template>
 | 
	
		
			
				|  |  |  <script>
 | 
	
		
			
				|  |  | -import IndexCard from '@/views/index/components/index-card.vue'
 | 
	
		
			
				|  |  |  import IndexCardResLibrary from '@/views/index/components/index-card-res-library.vue'
 | 
	
		
			
				|  |  | -import { mapGetters } from 'vuex'
 | 
	
		
			
				|  |  | -import store from '@/store'
 | 
	
		
			
				|  |  | +import IndexCardTask from "@/views/index/components/index-card-task.vue"
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  | -  components: { IndexCard, IndexCardResLibrary },
 | 
	
		
			
				|  |  | +  components: {IndexCardTask, IndexCardResLibrary },
 | 
	
		
			
				|  |  |    data() {
 | 
	
		
			
				|  |  |      return {
 | 
	
		
			
				|  |  | -      plan: [
 | 
	
		
			
				|  |  | -        {
 | 
	
		
			
				|  |  | -          title: '微课视频',
 | 
	
		
			
				|  |  | -          img:`${this.$imgBase}index/database/micro_video.png`,
 | 
	
		
			
				|  |  | -          path: '/personalDatabase/class-task/micro-video'
 | 
	
		
			
				|  |  | -        },
 | 
	
		
			
				|  |  | -        {
 | 
	
		
			
				|  |  | -          title: '作业视频',
 | 
	
		
			
				|  |  | -          img:`${this.$imgBase}index/database/homework_video.png`,
 | 
	
		
			
				|  |  | -          path: '/personalDatabase/class-task/homework-video'
 | 
	
		
			
				|  |  | -        },
 | 
	
		
			
				|  |  | -        {
 | 
	
		
			
				|  |  | -          title: '作业任务',
 | 
	
		
			
				|  |  | -          img:`${this.$imgBase}index/database/paper_work.png`,
 | 
	
		
			
				|  |  | -          path: '/personalDatabase/class-task/paper-work'
 | 
	
		
			
				|  |  | -        },
 | 
	
		
			
				|  |  | -        {
 | 
	
		
			
				|  |  | -          title: '学校通知',
 | 
	
		
			
				|  |  | -          img:`${this.$imgBase}index/database/school_notice.png`,
 | 
	
		
			
				|  |  | -          path: '/personalDatabase/class-task/school-notice'
 | 
	
		
			
				|  |  | -        },
 | 
	
		
			
				|  |  | -        {
 | 
	
		
			
				|  |  | -          title: '班级通知',
 | 
	
		
			
				|  |  | -          img:`${this.$imgBase}index/database/class_notice.png`,
 | 
	
		
			
				|  |  | -          path: '/personalDatabase/class-task/class-notice'
 | 
	
		
			
				|  |  | -        },
 | 
	
		
			
				|  |  | -        {
 | 
	
		
			
				|  |  | -          title: '系统通知',
 | 
	
		
			
				|  |  | -          img:`${this.$imgBase}index/database/system_notice.png`,
 | 
	
		
			
				|  |  | -          path: '/personalDatabase/class-task/system-notice'
 | 
	
		
			
				|  |  | -        },
 | 
	
		
			
				|  |  | -      ],
 | 
	
		
			
				|  |  | +      bannerStyle: {
 | 
	
		
			
				|  |  | +        backgroundImage: `url(${require('@/assets/images/index/banner/library-banner.png')})`,
 | 
	
		
			
				|  |  | +        height: '300px'
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  | -  },
 | 
	
		
			
				|  |  | -  computed:{
 | 
	
		
			
				|  |  | -    ...mapGetters(['middlebarRouters']),
 | 
	
		
			
				|  |  | -    formatList() {
 | 
	
		
			
				|  |  | -      if(!this.middlebarRouters.length) return []
 | 
	
		
			
				|  |  | -      if(!this.middlebarRouters.find(item => item.meta.title == '班级任务'))  return  []
 | 
	
		
			
				|  |  | -      let formatList = []
 | 
	
		
			
				|  |  | -      return this.middlebarRouters.find(item => item.meta.title == '班级任务').children.slice(0,6).map((item,idx) =>{
 | 
	
		
			
				|  |  | -        return {
 | 
	
		
			
				|  |  | -          title: item.meta.title,
 | 
	
		
			
				|  |  | -          img:this.plan[idx].img,
 | 
	
		
			
				|  |  | -          path:item.path,
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -      })
 | 
	
		
			
				|  |  | -    },
 | 
	
		
			
				|  |  | -  },
 | 
	
		
			
				|  |  | -  methods: {
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  </script>
 | 
	
		
			
				|  |  | -<style scoped lang="scss">
 | 
	
		
			
				|  |  | -.plan_item{
 | 
	
		
			
				|  |  | -  padding: 20px;
 | 
	
		
			
				|  |  | -  border: 1px solid #C5C5C5;
 | 
	
		
			
				|  |  | -  margin-bottom: 20px;
 | 
	
		
			
				|  |  | -  border-radius: 4px;
 | 
	
		
			
				|  |  | -  width: 134px;
 | 
	
		
			
				|  |  | -  height: 134px;
 | 
	
		
			
				|  |  | -  .img-wrap{
 | 
	
		
			
				|  |  | -    width: 100%;
 | 
	
		
			
				|  |  | -    height: 100%;
 | 
	
		
			
				|  |  | -    text-align: center;
 | 
	
		
			
				|  |  | -  }
 | 
	
		
			
				|  |  | -  &:hover{
 | 
	
		
			
				|  |  | -    background: #00CCB4;
 | 
	
		
			
				|  |  | -    border: 1px solid #00CCB4;
 | 
	
		
			
				|  |  | -  }
 | 
	
		
			
				|  |  | -}
 | 
	
		
			
				|  |  | +<style scoped>
 | 
	
		
			
				|  |  |  </style>
 |