bate版本提交

This commit is contained in:
2025-04-14 21:52:19 +08:00
parent 0bbe30bc7e
commit 6a6dabeca1
15 changed files with 466 additions and 111 deletions

View File

@@ -1,8 +1,15 @@
<template>
<div class="app-container">
<Sidebar />
<Sidebar class="noneText" @activeIndex="activeIndexFn" />
<div class="content ">
<RouterView />
<div v-show="activeIndex == 1">
<workbenches v-if="openWerk" />
</div>
<div v-show="activeIndex == 2">
<hostsList v-if="openList" />
</div>
</div>
</div>
</template>
@@ -10,6 +17,26 @@
<script setup>
import Sidebar from '../components/Sidebar.vue';
import { RouterLink, RouterView } from 'vue-router'
import hostsList from '@/views/hosts/hostsList.vue'
import workbenches from '@/views/hosts/workbenches.vue'
import { ref } from 'vue'
import { getUser } from '@/utils/storage'
let userType = ref(getUser().userType)
let activeIndex = ref(userType.value == 3 ? 1 : 2)
let openWerk = ref(userType.value == 3 ? true : false)
let openList = ref(userType.value == 3 ? false : true)
console.log("用户等级", getUser().userType)
function activeIndexFn(data) {
activeIndex.value = data
openWerk.value = true
openList.value = true
console.log(data)
}
</script>
@@ -27,6 +54,15 @@ html {
height: 900px;
background-color: #338F6A;
}
.noneText {
/* 页面无法选中 */
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.sidebar {