2025-04-03 20:25:25 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<div class="app-container">
|
2025-07-01 21:22:43 +08:00
|
|
|
|
<!-- <Sidebar class="noneText" @activeIndex="activeIndexFn" /> -->
|
2025-04-09 21:07:15 +08:00
|
|
|
|
<div class="content ">
|
2025-07-01 21:22:43 +08:00
|
|
|
|
<!-- <div v-show="activeIndexA == 1">
|
2025-06-24 13:35:33 +08:00
|
|
|
|
<workbenches />
|
2025-07-01 21:22:43 +08:00
|
|
|
|
</div> -->
|
|
|
|
|
|
<div>
|
2025-06-24 13:35:33 +08:00
|
|
|
|
<hostsList />
|
2025-04-14 21:52:19 +08:00
|
|
|
|
</div>
|
2025-07-01 21:22:43 +08:00
|
|
|
|
<!-- <div style="position: absolute; bottom: 0; right: 0;">{{ version }}</div> -->
|
2025-04-03 20:25:25 +08:00
|
|
|
|
</div>
|
2025-09-25 19:40:54 +08:00
|
|
|
|
<div class="footer">
|
|
|
|
|
|
到期时间:{{ time }}
|
|
|
|
|
|
</div>
|
2025-04-03 20:25:25 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script setup>
|
2025-09-25 19:40:54 +08:00
|
|
|
|
import { ref, reactive, onMounted } from "vue";
|
2025-07-01 21:22:43 +08:00
|
|
|
|
// import Sidebar from '../components/Sidebar.vue';
|
2025-04-03 20:25:25 +08:00
|
|
|
|
import { RouterLink, RouterView } from 'vue-router'
|
2025-04-14 21:52:19 +08:00
|
|
|
|
import hostsList from '@/views/hosts/hostsList.vue'
|
2025-09-25 19:40:54 +08:00
|
|
|
|
import { ElMessage } from 'element-plus';
|
|
|
|
|
|
import { getUser } from "@/utils/storage";
|
2025-07-01 21:22:43 +08:00
|
|
|
|
// import workbenches from '@/views/hosts/workbenches.vue'
|
2025-09-25 19:40:54 +08:00
|
|
|
|
import { tokenStore,UserStore } from '@/stores/notice'
|
|
|
|
|
|
const userCache = UserStore()
|
|
|
|
|
|
const time = ref(formatTimestamp(userCache.user.brotherExpireTime))
|
|
|
|
|
|
// 时间格式化方法 - 将12位时间戳转为YYYY-MM-DD HH:mm:ss格式
|
|
|
|
|
|
function formatTimestamp(timestamp) {
|
|
|
|
|
|
try {
|
|
|
|
|
|
// 转换为数字
|
|
|
|
|
|
const ts = Number(timestamp);
|
|
|
|
|
|
if (isNaN(ts)) {
|
|
|
|
|
|
return '--';
|
|
|
|
|
|
}
|
|
|
|
|
|
// 处理13位时间戳(毫秒级)
|
|
|
|
|
|
const date = new Date(ts > 999999999999 ? ts : ts * 1000);
|
|
|
|
|
|
const year = date.getFullYear();
|
|
|
|
|
|
const month = String(date.getMonth() + 1).padStart(2, '0');
|
|
|
|
|
|
const day = String(date.getDate()).padStart(2, '0');
|
|
|
|
|
|
const hours = String(date.getHours()).padStart(2, '0');
|
|
|
|
|
|
const minutes = String(date.getMinutes()).padStart(2, '0');
|
|
|
|
|
|
const seconds = String(date.getSeconds()).padStart(2, '0');
|
|
|
|
|
|
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
console.error('时间格式化错误:', e);
|
|
|
|
|
|
return '--';
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-04-14 21:52:19 +08:00
|
|
|
|
|
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%;
|
2025-09-25 19:40:54 +08:00
|
|
|
|
/* 页面无法选中 */
|
|
|
|
|
|
-webkit-user-select: none;
|
|
|
|
|
|
-moz-user-select: none;
|
|
|
|
|
|
-ms-user-select: none;
|
|
|
|
|
|
user-select: none;
|
2025-04-03 20:25:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.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-07-01 21:22:43 +08:00
|
|
|
|
// margin-left: 280px;
|
|
|
|
|
|
margin-left: 25px;
|
|
|
|
|
|
margin-right: 25px;
|
|
|
|
|
|
width: 1540px;
|
2025-09-25 19:40:54 +08:00
|
|
|
|
height: 848px;
|
2025-04-09 21:07:15 +08:00
|
|
|
|
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
|
|
|
|
}
|
2025-09-25 19:40:54 +08:00
|
|
|
|
.footer{
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
bottom: 10px;
|
|
|
|
|
|
left: calc(50% - 150px);
|
|
|
|
|
|
color: aqua;
|
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
|
}
|
2025-04-03 20:25:25 +08:00
|
|
|
|
</style>
|