|
|
@ -1,10 +1,13 @@ |
|
|
<template> |
|
|
<template> |
|
|
<div class="admin-layout"> |
|
|
<div class="admin-layout" :class="{ |
|
|
<aside class="sidebar" :class="{ 'is-collapsed': isCollapsed }"> |
|
|
'is-collapsed': isCollapsed, |
|
|
|
|
|
'is-expanded': !isCollapsed |
|
|
|
|
|
}"> |
|
|
|
|
|
<aside class="sidebar"> |
|
|
<div class="sidebar-header"> |
|
|
<div class="sidebar-header"> |
|
|
<div class="header-content"> |
|
|
<div class="header-content"> |
|
|
<div class="header-icon-wrap"> |
|
|
<div class="header-icon-wrap"> |
|
|
<img src="@/assets/logo.png" class="logo-img"/> |
|
|
<img src="../assets/logo1.png" class="logo-img"/> |
|
|
</div> |
|
|
</div> |
|
|
<div v-if="!isCollapsed" class="header-text-wrap"> |
|
|
<div v-if="!isCollapsed" class="header-text-wrap"> |
|
|
<div class="title-line">面向疾病预测的知识图谱</div> |
|
|
<div class="title-line">面向疾病预测的知识图谱</div> |
|
|
@ -37,11 +40,14 @@ |
|
|
</div> |
|
|
</div> |
|
|
</nav> |
|
|
</nav> |
|
|
|
|
|
|
|
|
<div class="sidebar-footer"> |
|
|
<div class="sidebar-footer" |
|
|
|
|
|
:style="{ |
|
|
|
|
|
'border-top': isCollapsed ? 'none' : '2px solid rgba(255, 255, 255, 0.1)' |
|
|
|
|
|
}"> |
|
|
<div v-if="!isCollapsed" class="user-block"> |
|
|
<div v-if="!isCollapsed" class="user-block"> |
|
|
<div class="avatar">用户</div> |
|
|
<div class="avatar" @click="handleProfile">用户</div> |
|
|
<div class="info"> |
|
|
<div class="info"> |
|
|
<div class="name">用户名字</div> |
|
|
<div class="name" @click="handleProfile">用户名字</div> |
|
|
<div class="id">8866990099</div> |
|
|
<div class="id">8866990099</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="exit-wrap"> |
|
|
<div class="exit-wrap"> |
|
|
@ -92,30 +98,39 @@ const menuItems = [ |
|
|
{name: '知识图谱构建', path: '/kg-builder', icon: i2}, |
|
|
{name: '知识图谱构建', path: '/kg-builder', icon: i2}, |
|
|
{name: '知识图谱问答', path: '/kg-qa', icon: i3}, |
|
|
{name: '知识图谱问答', path: '/kg-qa', icon: i3}, |
|
|
{name: '知识图谱数据', path: '/kg-data', icon: i4}, |
|
|
{name: '知识图谱数据', path: '/kg-data', icon: i4}, |
|
|
{name: '知识图谱数据', path: '/kg-data', icon: i4} |
|
|
{name: '图谱样式工具', path: '/kg-style', icon: i4} |
|
|
]; |
|
|
]; |
|
|
|
|
|
|
|
|
const handleMenuClick = (i) => { |
|
|
const handleMenuClick = (i) => { |
|
|
activeIndex.value = i; |
|
|
activeIndex.value = i; |
|
|
router.push(menuItems[i].path); |
|
|
router.push(menuItems[i].path); |
|
|
}; |
|
|
}; |
|
|
const handleLogout = () => console.log('logout'); |
|
|
const handleProfile = () => { |
|
|
|
|
|
// 使用Vue Router跳转到登录页面 |
|
|
|
|
|
router.push('/profile'); |
|
|
|
|
|
}; |
|
|
|
|
|
const handleLogout = () => { |
|
|
|
|
|
// 使用Vue Router跳转到登录页面 |
|
|
|
|
|
router.push('/login'); |
|
|
|
|
|
}; |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style scoped> |
|
|
<style scoped> |
|
|
.admin-layout { |
|
|
.admin-layout { |
|
|
display: flex; |
|
|
display: flex; |
|
|
width: 200px; |
|
|
|
|
|
height: 100vh; |
|
|
height: 100vh; |
|
|
background: #fff; |
|
|
background: #fff; |
|
|
overflow: hidden; |
|
|
overflow: hidden; |
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; |
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; |
|
|
-webkit-font-smoothing: antialiased; |
|
|
-webkit-font-smoothing: antialiased; |
|
|
|
|
|
z-index: 100; |
|
|
|
|
|
box-shadow: 2px -1px 10px 8px rgb(97 99 100 / 22%); |
|
|
|
|
|
width: 12%; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/* --- 侧边栏 --- */ |
|
|
/* --- 侧边栏 --- */ |
|
|
.sidebar { |
|
|
.sidebar { |
|
|
width: 200px; |
|
|
width: 100%; |
|
|
height: 100%; |
|
|
height: 100%; |
|
|
background: #0a2463; |
|
|
background: #0a2463; |
|
|
flex-shrink: 0; |
|
|
flex-shrink: 0; |
|
|
@ -126,13 +141,15 @@ const handleLogout = () => console.log('logout'); |
|
|
z-index: 100; |
|
|
z-index: 100; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.sidebar.is-collapsed { |
|
|
.admin-layout.is-collapsed { |
|
|
width: 64px; |
|
|
width: 4%; |
|
|
|
|
|
} |
|
|
|
|
|
.admin-layout.is-expanded { |
|
|
|
|
|
width: 12%; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.sidebar-header { |
|
|
.sidebar-header { |
|
|
padding: 30px 0 20px 0; |
|
|
padding: 25px 0px 18px 0; |
|
|
border-bottom: 1px solid rgba(255, 255, 255, 0.08); |
|
|
border-bottom: 2px solid rgba(255, 255, 255, 0.1); |
|
|
display: flex; |
|
|
display: flex; |
|
|
justify-content: center; |
|
|
justify-content: center; |
|
|
} |
|
|
} |
|
|
@ -140,14 +157,13 @@ const handleLogout = () => console.log('logout'); |
|
|
.header-content { |
|
|
.header-content { |
|
|
display: flex; |
|
|
display: flex; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
gap: 10px; |
|
|
gap: 7px; |
|
|
width: fit-content; |
|
|
width: fit-content; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.header-icon-wrap { |
|
|
.header-icon-wrap { |
|
|
width: 32px; |
|
|
width: 32px; |
|
|
height: 32px; |
|
|
height: 32px; |
|
|
background: #165dff; |
|
|
|
|
|
border-radius: 8px; |
|
|
border-radius: 8px; |
|
|
display: flex; |
|
|
display: flex; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
@ -157,8 +173,8 @@ const handleLogout = () => console.log('logout'); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.logo-img { |
|
|
.logo-img { |
|
|
width: 22px; |
|
|
width: 29px; |
|
|
height: 22px; |
|
|
height: 30px; |
|
|
object-fit: contain; |
|
|
object-fit: contain; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -170,10 +186,11 @@ const handleLogout = () => console.log('logout'); |
|
|
|
|
|
|
|
|
.title-line { |
|
|
.title-line { |
|
|
color: #fff; |
|
|
color: #fff; |
|
|
font-size: 12px; |
|
|
font-size: 11px; |
|
|
font-weight: 600; |
|
|
|
|
|
line-height: 1.25; |
|
|
line-height: 1.25; |
|
|
white-space: nowrap; |
|
|
white-space: nowrap; |
|
|
|
|
|
font-weight: 600; |
|
|
|
|
|
font-family: 'Noto Serif SC', "SimSun", "宋体", serif; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/* --- 菜单导航 --- */ |
|
|
/* --- 菜单导航 --- */ |
|
|
@ -209,7 +226,7 @@ const handleLogout = () => console.log('logout'); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.menu-item:hover .highlight-box { |
|
|
.menu-item:hover .highlight-box { |
|
|
background: rgba(255, 255, 255, 0.08); |
|
|
background: #133189; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.menu-content-fixed { |
|
|
.menu-content-fixed { |
|
|
@ -247,9 +264,10 @@ const handleLogout = () => console.log('logout'); |
|
|
|
|
|
|
|
|
.menu-text { |
|
|
.menu-text { |
|
|
color: rgba(255, 255, 255, 0.9); |
|
|
color: rgba(255, 255, 255, 0.9); |
|
|
font-size: 14px; |
|
|
|
|
|
margin-left: 10px; |
|
|
margin-left: 10px; |
|
|
font-weight: 400; |
|
|
font-weight: 500; |
|
|
|
|
|
font-size: 12px; |
|
|
|
|
|
font-family: 'Noto Serif SC', "SimSun", "宋体", serif; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.active-tag { |
|
|
.active-tag { |
|
|
@ -273,7 +291,7 @@ const handleLogout = () => console.log('logout'); |
|
|
/* --- 用户区域 (重点修改) --- */ |
|
|
/* --- 用户区域 (重点修改) --- */ |
|
|
.sidebar-footer { |
|
|
.sidebar-footer { |
|
|
padding: 12px 0 20px 0; |
|
|
padding: 12px 0 20px 0; |
|
|
border-top: 1px solid rgba(255, 255, 255, 0.1); |
|
|
border-top: 2px solid rgba(255, 255, 255, 0.1); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.user-block { |
|
|
.user-block { |
|
|
@ -283,8 +301,8 @@ const handleLogout = () => console.log('logout'); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.avatar { |
|
|
.avatar { |
|
|
width: 42px; |
|
|
width: 36px; |
|
|
height: 42px; |
|
|
height: 36px; |
|
|
background: rgba(255, 255, 255, 0.15); |
|
|
background: rgba(255, 255, 255, 0.15); |
|
|
border-radius: 50%; |
|
|
border-radius: 50%; |
|
|
font-size: 12px; |
|
|
font-size: 12px; |
|
|
@ -293,26 +311,30 @@ const handleLogout = () => console.log('logout'); |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
justify-content: center; |
|
|
justify-content: center; |
|
|
flex-shrink: 0; |
|
|
flex-shrink: 0; |
|
|
|
|
|
cursor: pointer; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.info { |
|
|
.info { |
|
|
margin-left: 12px; |
|
|
margin-left: 10px; |
|
|
display: flex; |
|
|
display: flex; |
|
|
flex-direction: column; |
|
|
flex-direction: column; |
|
|
justify-content: center; |
|
|
justify-content: center; |
|
|
|
|
|
align-items: flex-start; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.info .name { |
|
|
.info .name { |
|
|
font-size: 12px; |
|
|
font-size: 11px; |
|
|
color: #fff; |
|
|
color: #fff; |
|
|
line-height: 1; |
|
|
line-height: 1; |
|
|
|
|
|
font-family: 'Noto Serif SC', "SimSun", "宋体", serif; |
|
|
|
|
|
cursor: pointer; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.info .id { |
|
|
.info .id { |
|
|
font-size: 9px; |
|
|
font-size: 9px; |
|
|
color: rgba(255, 255, 255, 0.35); |
|
|
color: rgba(255, 255, 255, 0.5); |
|
|
line-height: 1; |
|
|
line-height: 1; |
|
|
margin-top: 8px; /* 通过增加上边距让id向下移动 */ |
|
|
margin-top: 6px; /* 通过增加上边距让id向下移动 */ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.exit-wrap { |
|
|
.exit-wrap { |
|
|
@ -322,7 +344,7 @@ const handleLogout = () => console.log('logout'); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.exit-icon { |
|
|
.exit-icon { |
|
|
width: 16px; |
|
|
width: 11px; |
|
|
cursor: pointer; |
|
|
cursor: pointer; |
|
|
opacity: 0.8; |
|
|
opacity: 0.8; |
|
|
} |
|
|
} |
|
|
@ -330,7 +352,6 @@ const handleLogout = () => console.log('logout'); |
|
|
.expand-handle-circle { |
|
|
.expand-handle-circle { |
|
|
display: flex; |
|
|
display: flex; |
|
|
justify-content: center; |
|
|
justify-content: center; |
|
|
padding-bottom: 20px; |
|
|
|
|
|
cursor: pointer; |
|
|
cursor: pointer; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|