2025-04-03 20:25:25 +08:00
|
|
|
<template>
|
|
|
|
|
<div class="app-container">
|
2025-04-14 21:52:19 +08:00
|
|
|
<Sidebar class="noneText" @activeIndex="activeIndexFn" />
|
2025-04-09 21:07:15 +08:00
|
|
|
<div class="content ">
|
2025-06-24 13:35:33 +08:00
|
|
|
<div v-show="activeIndexA == 1">
|
|
|
|
|
<workbenches />
|
2025-04-14 21:52:19 +08:00
|
|
|
</div>
|
2025-06-24 13:35:33 +08:00
|
|
|
<div v-show="activeIndexA == 2">
|
|
|
|
|
<hostsList />
|
2025-04-14 21:52:19 +08:00
|
|
|
</div>
|
2025-05-06 15:38:23 +08:00
|
|
|
<div style="position: absolute; bottom: 0; right: 0;">{{ version }}</div>
|
2025-04-14 21:52:19 +08:00
|
|
|
|
|
|
|
|
|
2025-04-03 20:25:25 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
|
import Sidebar from '../components/Sidebar.vue';
|
|
|
|
|
import { RouterLink, RouterView } from 'vue-router'
|
2025-04-14 21:52:19 +08:00
|
|
|
import hostsList from '@/views/hosts/hostsList.vue'
|
|
|
|
|
import workbenches from '@/views/hosts/workbenches.vue'
|
|
|
|
|
import { ref } from 'vue'
|
|
|
|
|
import { getUser } from '@/utils/storage'
|
2025-05-06 15:38:23 +08:00
|
|
|
// import { usePythonBridge } from '@/utils/pythonBridge'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-14 21:52:19 +08:00
|
|
|
|
2025-06-24 13:35:33 +08:00
|
|
|
let activeIndexA = ref(1)
|
2025-04-14 21:52:19 +08:00
|
|
|
|
|
|
|
|
function activeIndexFn(data) {
|
2025-06-24 13:35:33 +08:00
|
|
|
activeIndexA.value = data
|
2025-04-14 21:52:19 +08:00
|
|
|
console.log(data)
|
|
|
|
|
}
|
|
|
|
|
|
2025-04-03 20:25:25 +08:00
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
2025-06-24 13:35:33 +08:00
|
|
|
<style lang="less">
|
2025-04-03 20:25:25 +08:00
|
|
|
body,
|
|
|
|
|
html {
|
|
|
|
|
margin: 0;
|
|
|
|
|
padding: 0;
|
|
|
|
|
height: 100%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.app-container {
|
|
|
|
|
display: flex;
|
2025-04-09 21:07:15 +08:00
|
|
|
width: 1600px;
|
|
|
|
|
height: 900px;
|
2025-06-24 13:35:33 +08:00
|
|
|
background-color: @bg-color;
|
2025-05-06 15:38:23 +08:00
|
|
|
position: relative;
|
2025-04-09 21:07:15 +08:00
|
|
|
|
2025-04-14 21:52:19 +08:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.noneText {
|
|
|
|
|
/* 页面无法选中 */
|
|
|
|
|
-webkit-user-select: none;
|
|
|
|
|
-moz-user-select: none;
|
|
|
|
|
-ms-user-select: none;
|
|
|
|
|
user-select: none;
|
2025-04-03 20:25:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.sidebar {
|
|
|
|
|
width: 200px;
|
2025-06-24 13:35:33 +08:00
|
|
|
background-color: @bg-color;
|
2025-04-03 20:25:25 +08:00
|
|
|
padding: 20px;
|
2025-04-09 21:07:15 +08:00
|
|
|
/* box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1); */
|
2025-04-03 20:25:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.content {
|
2025-04-09 21:07:15 +08:00
|
|
|
margin-left: 280px;
|
|
|
|
|
width: 1304px;
|
|
|
|
|
height: 868px;
|
|
|
|
|
background: #FFFFFF;
|
|
|
|
|
border-radius: 36px;
|
|
|
|
|
margin-top: 16px;
|
|
|
|
|
}
|
2025-04-03 20:25:25 +08:00
|
|
|
|
2025-04-09 21:07:15 +08:00
|
|
|
.center-justify {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-around;
|
|
|
|
|
align-items: center;
|
2025-04-03 20:25:25 +08:00
|
|
|
}
|
|
|
|
|
</style>
|