UPDATE: 1、优化动态加载路由;2、修改模式切换,菜单没刷新等问题
This commit is contained in:
@@ -30,13 +30,15 @@
|
||||
import { useAuthStore } from '@/stores/modules/auth'
|
||||
import { useAppSceneStore, useModeStore } from '@/stores/modules/mode' // 引入模式 store
|
||||
import { getCurrentScene } from '@/api/user/login'
|
||||
import { initDynamicRouter } from '@/routers/modules/dynamicRouter'
|
||||
import { useTabsStore } from '@/stores/modules/tabs'
|
||||
|
||||
const authStore = useAuthStore()
|
||||
const modeStore = useModeStore() // 使用模式 store
|
||||
const AppSceneStore = useAppSceneStore()
|
||||
const activateInfo = authStore.activateInfo
|
||||
const isActivateOpen = import.meta.env.VITE_ACTIVATE_OPEN
|
||||
|
||||
const tabsStore = useTabsStore()
|
||||
const modeList = [
|
||||
{
|
||||
name: '模拟式模块',
|
||||
@@ -69,10 +71,10 @@ const handelOpen = async (item: any) => {
|
||||
const { data: scene } = await getCurrentScene() // 获取当前场景
|
||||
AppSceneStore.setCurrentMode(scene + '') //0:省级平台,1:设备出厂,2:研发自测
|
||||
await authStore.setShowMenu()
|
||||
await authStore.getAuthMenuList()
|
||||
await tabsStore.closeMultipleTab()
|
||||
await initDynamicRouter()
|
||||
return
|
||||
}
|
||||
const handleSelect = (key: string, keyPath: string[]) => {}
|
||||
onMounted(() => {})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Reference in New Issue
Block a user