diff --git a/src/layouts/home.vue b/src/layouts/home.vue
index 82a2d96..083d3b4 100644
--- a/src/layouts/home.vue
+++ b/src/layouts/home.vue
@@ -8,7 +8,7 @@
-
+
@@ -137,6 +137,9 @@ export default {
store.commit('SET_OPERATETIME')
}
const selectPostion = ref('')
+ const SET_SELECTED_POSITION = () => {
+ store.commit('SET_SELECTED_POSITION', selectPostion.value)
+ }
return {
isCollapsed: computed(() => store.state.app.isCollapsed),
basePath: computed(() => store.state.app.basePath),
@@ -149,7 +152,8 @@ export default {
thirdMenuData,
toggleCollapsed,
setTime,
- selectPostion
+ selectPostion,
+ SET_SELECTED_POSITION
}
},
methods: {
diff --git a/src/store/modules/position.js b/src/store/modules/position.js
index 071330b..d4c703c 100644
--- a/src/store/modules/position.js
+++ b/src/store/modules/position.js
@@ -7,9 +7,13 @@ const state = {
positionList: [
{ name: '主阵地', id: 1 },
{ name: '子阵地 1', id: 2 }
- ]
+ ],
+ selectedPostion: ''
}
const mutations = {
+ SET_SELECTED_POSITION(state, value) {
+ state.selectedPostion = value
+ },
SET_IS_MAIN_POSITION(state, value) {
state.isMainPosition = value
},