shuishen
2021-12-30 4593a5c6ef4549a519681fa44d94fa242d15bec4
src/pcviews/orgnav/teaching.vue
@@ -3,25 +3,42 @@
 * @Name: 教学与科研机构
 * @Date: 2021-11-15 10:02:12
 * @Last Modified by: Morpheus
 * @Last Modified time: 2021-12-21 15:12:33
 * @Last Modified time: 2021-12-25 15:11:00
 */
 <template>
    <div>
        <org-nav-bar :navList="list"
                     :title="title"></org-nav-bar>
    </div>
</template>
<script>
import { getList } from '@/api/pc/orgnav/index'
import { mapGetters } from 'vuex'
export default {
    data () {
        return {
            title: '教学与科研机构',
            list: []
        }
    },
    computed: {
        ...mapGetters([
            // 校内导航的显示关闭
            'arcNavBarFlag'
        ])
    },
    created () {
        if (this.arcNavBarFlag == true) {
            this.$store.commit('SET_ARCNAVBARTITLE', '')
            this.$store.commit('SET_ARCNAVBARCODE', '')
            this.$store.commit('SET_ARCNAVBARFLAG', false)
        }
        this.$store.commit('SET_ORGNAVBARTITLE', '教学与科研机构')
        this.$store.commit('SET_ORGNAVBARLIST', [])
        this.$store.commit('SET_ORGNAVBARFLAG', true)
        getList({ type: 4 }).then(res => {
            res.data.data.records.forEach(item => {
                this.list.push({
@@ -40,13 +57,12 @@
                    introduce: item.introduce
                })
            })
            this.$store.commit('SET_ORGNAVBARLIST', this.list)
        })
    },
    methods: {
        closeModel () {
            this.$store.dispatch('delVisitedViews', this.$route)
            this.$router.push('/pcLayout/default')
        }
    }
}
</script>