This commit is contained in:
2025-06-24 13:35:33 +08:00
parent 17d2251a70
commit 560581f1a4
20 changed files with 434 additions and 515 deletions

View File

@@ -2,11 +2,11 @@
<div class="app-container">
<Sidebar class="noneText" @activeIndex="activeIndexFn" />
<div class="content ">
<div v-show="activeIndex == 1">
<workbenches v-if="openWerk" />
<div v-show="activeIndexA == 1">
<workbenches />
</div>
<div v-show="activeIndex == 2">
<hostsList v-if="openList" />
<div v-show="activeIndexA == 2">
<hostsList />
</div>
<div style="position: absolute; bottom: 0; right: 0;">{{ version }}</div>
@@ -29,25 +29,17 @@ 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)
let activeIndexA = ref(1)
function activeIndexFn(data) {
activeIndex.value = data
openWerk.value = true
openList.value = true
activeIndexA.value = data
console.log(data)
}
</script>
<style>
<style lang="less">
body,
html {
margin: 0;
@@ -59,7 +51,7 @@ html {
display: flex;
width: 1600px;
height: 900px;
background-color: #338F6A;
background-color: @bg-color;
position: relative;
@@ -75,7 +67,7 @@ html {
.sidebar {
width: 200px;
background-color: #338F6A;
background-color: @bg-color;
padding: 20px;
/* box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1); */
}