test: 测试
parent
3bc6977775
commit
1b733e1982
|
@ -8,7 +8,7 @@
|
||||||
<ThirdMenu :menuData="thirdMenuData" v-if="thirdMenuData.children"></ThirdMenu>
|
<ThirdMenu :menuData="thirdMenuData" v-if="thirdMenuData.children"></ThirdMenu>
|
||||||
<el-main class="main-body">
|
<el-main class="main-body">
|
||||||
<div style="background-color: red">
|
<div style="background-color: red">
|
||||||
<el-select v-model="selectPostion">
|
<el-select v-model="selectPostion" @change="SET_SELECTED_POSITION">
|
||||||
<el-option v-for="item in positionList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
<el-option v-for="item in positionList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
|
@ -137,6 +137,9 @@ export default {
|
||||||
store.commit('SET_OPERATETIME')
|
store.commit('SET_OPERATETIME')
|
||||||
}
|
}
|
||||||
const selectPostion = ref('')
|
const selectPostion = ref('')
|
||||||
|
const SET_SELECTED_POSITION = () => {
|
||||||
|
store.commit('SET_SELECTED_POSITION', selectPostion.value)
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
isCollapsed: computed(() => store.state.app.isCollapsed),
|
isCollapsed: computed(() => store.state.app.isCollapsed),
|
||||||
basePath: computed(() => store.state.app.basePath),
|
basePath: computed(() => store.state.app.basePath),
|
||||||
|
@ -149,7 +152,8 @@ export default {
|
||||||
thirdMenuData,
|
thirdMenuData,
|
||||||
toggleCollapsed,
|
toggleCollapsed,
|
||||||
setTime,
|
setTime,
|
||||||
selectPostion
|
selectPostion,
|
||||||
|
SET_SELECTED_POSITION
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -7,9 +7,13 @@ const state = {
|
||||||
positionList: [
|
positionList: [
|
||||||
{ name: '主阵地', id: 1 },
|
{ name: '主阵地', id: 1 },
|
||||||
{ name: '子阵地 1', id: 2 }
|
{ name: '子阵地 1', id: 2 }
|
||||||
]
|
],
|
||||||
|
selectedPostion: ''
|
||||||
}
|
}
|
||||||
const mutations = {
|
const mutations = {
|
||||||
|
SET_SELECTED_POSITION(state, value) {
|
||||||
|
state.selectedPostion = value
|
||||||
|
},
|
||||||
SET_IS_MAIN_POSITION(state, value) {
|
SET_IS_MAIN_POSITION(state, value) {
|
||||||
state.isMainPosition = value
|
state.isMainPosition = value
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue