test: 测试
							parent
							
								
									52e5f5534c
								
							
						
					
					
						commit
						3bc6977775
					
				| 
						 | 
					@ -28,8 +28,10 @@ declare module '@vue/runtime-core' {
 | 
				
			||||||
    ElMain: typeof import('element-plus/es')['ElMain']
 | 
					    ElMain: typeof import('element-plus/es')['ElMain']
 | 
				
			||||||
    ElMenu: typeof import('element-plus/es')['ElMenu']
 | 
					    ElMenu: typeof import('element-plus/es')['ElMenu']
 | 
				
			||||||
    ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
 | 
					    ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
 | 
				
			||||||
 | 
					    ElOption: typeof import('element-plus/es')['ElOption']
 | 
				
			||||||
    ElRow: typeof import('element-plus/es')['ElRow']
 | 
					    ElRow: typeof import('element-plus/es')['ElRow']
 | 
				
			||||||
    ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
 | 
					    ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
 | 
				
			||||||
 | 
					    ElSelect: typeof import('element-plus/es')['ElSelect']
 | 
				
			||||||
    ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
 | 
					    ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
 | 
				
			||||||
    ElSwitch: typeof import('element-plus/es')['ElSwitch']
 | 
					    ElSwitch: typeof import('element-plus/es')['ElSwitch']
 | 
				
			||||||
    ElTabPane: typeof import('element-plus/es')['ElTabPane']
 | 
					    ElTabPane: typeof import('element-plus/es')['ElTabPane']
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -7,6 +7,11 @@
 | 
				
			||||||
      <el-container class="main-container">
 | 
					      <el-container class="main-container">
 | 
				
			||||||
        <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">
 | 
				
			||||||
 | 
					            <el-select v-model="selectPostion">
 | 
				
			||||||
 | 
					              <el-option v-for="item in positionList" :key="item.id" :label="item.name" :value="item.id"></el-option>
 | 
				
			||||||
 | 
					            </el-select>
 | 
				
			||||||
 | 
					          </div>
 | 
				
			||||||
          <el-scrollbar class="custom-scrollbar" style="flex: 1">
 | 
					          <el-scrollbar class="custom-scrollbar" style="flex: 1">
 | 
				
			||||||
            <transition enter-active-class="fadeInUp" mode="out-in">
 | 
					            <transition enter-active-class="fadeInUp" mode="out-in">
 | 
				
			||||||
              <!-- <router-view v-if="$route.path === '/404'"></router-view> -->
 | 
					              <!-- <router-view v-if="$route.path === '/404'"></router-view> -->
 | 
				
			||||||
| 
						 | 
					@ -47,6 +52,7 @@ export default {
 | 
				
			||||||
  setup() {
 | 
					  setup() {
 | 
				
			||||||
    const route = useRoute()
 | 
					    const route = useRoute()
 | 
				
			||||||
    const store = useStore()
 | 
					    const store = useStore()
 | 
				
			||||||
 | 
					    console.log(store)
 | 
				
			||||||
    // 初始化
 | 
					    // 初始化
 | 
				
			||||||
    function init() {
 | 
					    function init() {
 | 
				
			||||||
      store.commit('permission/SET_BUTTONS')
 | 
					      store.commit('permission/SET_BUTTONS')
 | 
				
			||||||
| 
						 | 
					@ -130,17 +136,20 @@ export default {
 | 
				
			||||||
    function setTime() {
 | 
					    function setTime() {
 | 
				
			||||||
      store.commit('SET_OPERATETIME')
 | 
					      store.commit('SET_OPERATETIME')
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					    const selectPostion = ref('')
 | 
				
			||||||
    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),
 | 
				
			||||||
      expire: computed(() => store.state.app.expire),
 | 
					      expire: computed(() => store.state.app.expire),
 | 
				
			||||||
      isFontBig: computed(() => store.state.app.pageConfig.contentFontSize === 'big'),
 | 
					      isFontBig: computed(() => store.state.app.pageConfig.contentFontSize === 'big'),
 | 
				
			||||||
 | 
					      positionList: computed(() => store.state.position.positionList),
 | 
				
			||||||
      addRoutes,
 | 
					      addRoutes,
 | 
				
			||||||
      menuData,
 | 
					      menuData,
 | 
				
			||||||
      showSidebar,
 | 
					      showSidebar,
 | 
				
			||||||
      thirdMenuData,
 | 
					      thirdMenuData,
 | 
				
			||||||
      toggleCollapsed,
 | 
					      toggleCollapsed,
 | 
				
			||||||
      setTime
 | 
					      setTime,
 | 
				
			||||||
 | 
					      selectPostion
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,32 @@
 | 
				
			||||||
 | 
					import { getSystemConfigs } from 'services'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const state = {
 | 
				
			||||||
 | 
					  // 是否主阵地
 | 
				
			||||||
 | 
					  isMainPosition: true,
 | 
				
			||||||
 | 
					  // 阵地列表
 | 
				
			||||||
 | 
					  positionList: [
 | 
				
			||||||
 | 
					    { name: '主阵地', id: 1 },
 | 
				
			||||||
 | 
					    { name: '子阵地 1', id: 2 }
 | 
				
			||||||
 | 
					  ]
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					const mutations = {
 | 
				
			||||||
 | 
					  SET_IS_MAIN_POSITION(state, value) {
 | 
				
			||||||
 | 
					    state.isMainPosition = value
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  SET_POSITION_LIST(state, value) {
 | 
				
			||||||
 | 
					    state.positionList = value
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					const actions = {
 | 
				
			||||||
 | 
					  async GetPostionList({ commit }) {
 | 
				
			||||||
 | 
					    const data = await getSystemConfigs({ codes: 'pwdStrength,lockScreenTime' })
 | 
				
			||||||
 | 
					    if (data.success) {
 | 
				
			||||||
 | 
					      commit('SET_POSITION_LIST', data.data)
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  state,
 | 
				
			||||||
 | 
					  mutations,
 | 
				
			||||||
 | 
					  actions
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Loading…
	
		Reference in New Issue