diff --git a/src/pages/modules/login/login.vue b/src/pages/modules/login/login.vue index da17727..8898968 100644 --- a/src/pages/modules/login/login.vue +++ b/src/pages/modules/login/login.vue @@ -68,7 +68,6 @@ export default { } }, mounted () { - window.localStorage.removeItem('defaultActive') // 点对点项目分辨率 1024 * 768 // alert(document.body.clientWidth, 'a') // alert(document.body.clientHeight, 'b') diff --git a/src/pages/shells/index/index.vue b/src/pages/shells/index/index.vue index d0b11d9..6076d25 100644 --- a/src/pages/shells/index/index.vue +++ b/src/pages/shells/index/index.vue @@ -5,8 +5,8 @@ 诺力
- - {{menu.label}} + + {{menu.label}}
@@ -95,7 +95,6 @@ export default { data () { return { username: this.$store.getters.userInfo !== '' ? JSON.parse(this.$store.getters.userInfo).user.username : '', - activeIndex: this.$store.getters.defaultActive, menus: [{ label: '首页', index: '1', @@ -128,16 +127,6 @@ export default { unclick: false } }, - beforeRouteEnter (to, from, next) { - next(vm => { - vm.menus.map(el => { - if (el.router === vm.$route.path) { - vm.activeIndex = el.index - vm.$store.dispatch('getDefaultActive', el.index) - } - }) - }) - }, watch: { oldpassword (val) { if (val === '' || this.newpassword1 === '' || this.newpassword2 === '') { @@ -163,11 +152,9 @@ export default { }, methods: { handleSelect (key) { - this.activeIndex = key - this.$store.dispatch('getDefaultActive', key) this.dropdown = false this.$router.push({ - path: this.menus[Number(key) - 1].router + path: key }) }, showDropdown () { diff --git a/src/vuex/modules/data.js b/src/vuex/modules/data.js index a4aa03d..afe9e2f 100644 --- a/src/vuex/modules/data.js +++ b/src/vuex/modules/data.js @@ -1,11 +1,9 @@ import * as types from '../types' -import { getStore, setStore } from '@config/utils.js' +// import { getStore, setStore } from '@config/utils.js' const state = { materObj: {}, // 物料查询-盘点修改 - hcxCheckObj: {}, // 缓存线盘点 - 盘点修改, - defaultActive: getStore('defaultActive') || '1', - sideActive: getStore('sideActive') || '1' + hcxCheckObj: {} // 缓存线盘点 - 盘点修改 } const getters = { @@ -20,10 +18,6 @@ const actions = { }, hcxCheckObj ({commit}, res) { commit(types.HCX_CHECK_OBJ, res) - }, - getDefaultActive ({commit}, res) { - setStore('defaultActive', res) - commit(types.GET_DEFAULT_ACTIVE, res) } } @@ -33,9 +27,6 @@ const mutations = { }, [types.HCX_CHECK_OBJ] (state, res) { state.hcxCheckObj = res - }, - [types.GET_DEFAULT_ACTIVE] (state, res) { - state.defaultActive = res } } diff --git a/src/vuex/types.js b/src/vuex/types.js index 3b72249..c259f6c 100644 --- a/src/vuex/types.js +++ b/src/vuex/types.js @@ -18,5 +18,3 @@ export const SET_DEVICE = 'SET_DEVICE' // hcx数据 export const MATER_OBJ = 'MATER_OBJ' // 物料查询-盘点修改 export const HCX_CHECK_OBJ = 'HCX_CHECK_OBJ' // 缓存线盘点 - 盘点修改 - -export const GET_DEFAULT_ACTIVE = 'GET_DEFAULT_ACTIVE' // 菜单activeIndex