| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getList } from "@/api/pc/orgnav/index"; |
| | | import { getList } from '@/api/pc/orgnav/index' |
| | | |
| | | import { mapGetters } from "vuex"; |
| | | import { mapGetters } from 'vuex' |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | list: [], |
| | | }; |
| | | list: [] |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters([ |
| | | // 校区内导航的显示关闭 |
| | | "orgNavBarFlag", |
| | | "arcNavBarFlag", |
| | | ]), |
| | | 'orgNavBarFlag', |
| | | 'arcNavBarFlag' |
| | | ]) |
| | | }, |
| | | mounted() { |
| | | if (this.arcNavBarFlag == true) { |
| | | this.$store.commit("SET_ARCNAVBARTITLE", ""); |
| | | this.$store.commit("SET_ARCNAVBARCODE", ""); |
| | | this.$store.commit("SET_ARCNAVBARFLAG", false); |
| | | 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_ORGNAVBARTITLE', '直属及附属单位') |
| | | this.$store.commit('SET_ORGNAVBARLIST', []) |
| | | |
| | | this.$store.commit("SET_ORGNAVBARFLAG", true); |
| | | this.$store.commit('SET_ORGNAVBARFLAG', true) |
| | | |
| | | getList({ type: 3 }).then((res) => { |
| | | res.data.data.records.forEach((item) => { |
| | | this.list.push({ |
| | | navTitle: item.mechanismname, |
| | | icon: "/img/navicon/tag.png", |
| | | icon: '/img/navicon/tag.png', |
| | | longitude: item.jd, |
| | | latitude: item.wd, |
| | | alt: item.gd, |
| | |
| | | address: item.address, |
| | | telephone: item.telephone, |
| | | introduce: item.introduce, |
| | | videourl: item.videourl, |
| | | }); |
| | | }); |
| | | videourl: item.videourl |
| | | }) |
| | | }) |
| | | |
| | | this.$store.commit("SET_ORGNAVBARLIST", this.list); |
| | | }); |
| | | this.$store.commit('SET_ORGNAVBARLIST', this.list) |
| | | }) |
| | | }, |
| | | methods: {}, |
| | | beforeDestroy() { |
| | | if (this.orgNavBarFlag == true) { |
| | | this.$store.commit("SET_ORGNAVBARTITLE", ""); |
| | | this.$store.commit("SET_ORGNAVBARLIST", []); |
| | | this.$store.commit("SET_ORGNAVBARFLAG", false); |
| | | this.$store.commit('SET_ORGNAVBARTITLE', '') |
| | | this.$store.commit('SET_ORGNAVBARLIST', []) |
| | | this.$store.commit('SET_ORGNAVBARFLAG', false) |
| | | } |
| | | }, |
| | | }; |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style></style> |