<template>
  <component :is="component" />
</template>
<script lang="ts" setup>
import { ref } from 'vue'

import Adminhome from './components/adminhome.vue'
import Operatorhome from './components/operatorhome.vue'
import Zdhome from './components/zdhome.vue'
import Gshome from './components/gshome.vue'
let component = ref<any>('')
const Infor = JSON.parse(localStorage.Infor)

let rcode = ref<any>('')
if(Infor.roles && Infor.roles.length > 0){
  rcode.value = Infor.roles[0].rcode
}
if(rcode.value == 'SYSADMIN'){
  component.value = Adminhome
}else if(rcode.value == 'PROXY'){
  component.value = Operatorhome
}else if(rcode.value == 'station_employee'){
  component.value = Zdhome
}else if(rcode.value == 'COMPANY'){
  component.value = Gshome
}


</script>


