Files
zhxg_pc/src/views/index.vue

70 lines
1.4 KiB
Vue
Raw Normal View History

2025-07-28 15:52:07 +08:00
<template>
2025-10-18 17:13:04 +08:00
<div id="main">
<indexNew />
<!-- <Index1 v-if="showRole == 1" />
2025-07-28 15:52:07 +08:00
<Index2 v-else-if="showRole == 2" />
<Index3 v-else-if="showRole == 3" />
<Index4 v-else-if="showRole == 4" />
<Index1 v-else/> -->
2025-10-18 17:13:04 +08:00
</div>
2025-07-28 15:52:07 +08:00
</template>
<script>
2025-10-18 17:13:04 +08:00
import Index1 from '@/views/Home/index-1.vue'
import Index2 from '@/views/Home/index-2.vue'
import Index3 from '@/views/Home/index-3.vue'
import Index4 from '@/views/Home/index-4.vue'
2025-07-28 15:52:07 +08:00
2025-10-18 17:13:04 +08:00
import indexNew from './Home/index-new-blue.vue'
2025-07-28 15:52:07 +08:00
export default {
2025-10-18 17:13:04 +08:00
name: 'Index',
2025-07-28 15:52:07 +08:00
components: {
Index1,
Index2,
Index3,
Index4,
indexNew
},
data() {
return {
showRole: 0,
}
2025-10-18 17:13:04 +08:00
},
watch: {
2025-07-28 15:52:07 +08:00
},
created() {
2025-10-18 17:13:04 +08:00
let temp = this.$store.getters.roles
let role = 0
2025-07-28 15:52:07 +08:00
temp.map(x => {
2025-10-18 17:13:04 +08:00
if (x == 'admin') {
this.showRole = 1
2025-07-28 15:52:07 +08:00
}
2025-10-18 17:13:04 +08:00
if (x == 'test') { //学工
this.showRole = 1
2025-07-28 15:52:07 +08:00
}
2025-10-18 17:13:04 +08:00
if (x == 'stumanger') { //学务
this.showRole = 2
2025-07-28 15:52:07 +08:00
}
2025-10-18 17:13:04 +08:00
if (x == 'testteacher') { //辅导员
this.showRole = 3
2025-07-28 15:52:07 +08:00
}
2025-10-18 17:13:04 +08:00
if (x == 'teststu') { //学生
this.showRole = 4
2025-07-28 15:52:07 +08:00
}
2025-10-18 17:13:04 +08:00
})
2025-07-28 15:52:07 +08:00
},
methods: {
}
}
</script>
<style lang="scss" scoped></style>