前段页面调整

This commit is contained in:
2026-10-20 09:11:52 +08:00
parent 85cc02ac76
commit 4f9e448432
18 changed files with 1084 additions and 221 deletions
+5 -1
View File
@@ -3,5 +3,9 @@
</script>
<template>
<router-view />
<router-view v-slot="{ Component }">
<transition name="page" mode="out-in">
<component :is="Component" />
</transition>
</router-view>
</template>
Binary file not shown.

After

Width:  |  Height:  |  Size: 416 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 775 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 713 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 699 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 699 B

+164 -49
View File
@@ -2,7 +2,7 @@
import { computed } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { clearAuth, getUser } from '@/utils/auth'
import logoUrl from '@/assets/logo.png'
import logoUrl from '@/assets/logo-green.png'
import noticeUrl from '@/assets/icon-notice.png'
import settingUrl from '@/assets/icon-setting.png'
import avatarUrl from '@/assets/avatar.png'
@@ -13,9 +13,10 @@ const user = computed(() => getUser())
const menus = [
{ path: '/dashboard', title: '首页' },
{ path: '/search', title: '版本资源检索' },
{ path: '/special', title: '特藏版本推荐' },
{ path: '/deposit', title: '版本资源呈缴' },
{ path: '/search', title: '资源检索' },
{ path: '/hotwords', title: '热词检索' },
{ path: '/special', title: '特藏推荐' },
{ path: '/deposit', title: '资源呈缴' },
{ path: '/analysis', title: '数据统计' },
{ path: '/resource', title: '资源管理' },
{ path: '/collect', title: '数据采集' },
@@ -30,10 +31,13 @@ function logout() {
<template>
<div class="site">
<header class="site-header">
<header class="site-header" :class="{ 'on-hero': route.path === '/dashboard' }">
<div class="logo" @click="router.push('/')">
<img class="logo-img" :src="logoUrl" alt="logo" />
<span class="logo-text">版本资源联合服务平台</span>
<div class="logo-texts">
<span class="logo-text">版本资源联合服务平台</span>
<span class="logo-sub">VERSION RESOURCE UNION SERVICE</span>
</div>
</div>
<nav class="nav">
<a
@@ -67,77 +71,125 @@ function logout() {
}
.site-header {
height: 64px;
height: 72px;
display: flex;
align-items: center;
gap: 32px;
padding: 0 24px;
background: var(--header-bg);
gap: 36px;
padding: 0 36px;
background: rgba(36, 72, 55, 0.95);
backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px);
color: #fff;
position: relative;
transition: background 0.45s ease;
&::before {
/* 首页:导航浮在实景背景上 */
&.on-hero {
background: rgba(18, 40, 30, 0.34);
}
/* 底部金线:呼应版本馆的描金装饰 */
&::after {
content: '';
position: absolute;
inset: 0;
background: var(--nav-bg-img) center / cover no-repeat;
filter: var(--hero-filter);
z-index: 0;
left: 0;
right: 0;
bottom: 0;
height: 2px;
background: linear-gradient(90deg, transparent, var(--brand-gold), transparent);
opacity: 0.6;
}
> * {
position: relative;
z-index: 1;
}
}
.logo-img {
width: 30px;
height: 30px;
border-radius: 6px;
}
.hicon {
width: 20px;
height: 20px;
cursor: pointer;
filter: brightness(0) invert(1);
opacity: 0.9;
}
.avatar {
width: 30px;
height: 30px;
border-radius: 50%;
}
.logo {
display: flex;
align-items: center;
gap: 8px;
gap: 12px;
flex: none;
padding-right: 34px;
cursor: pointer;
position: relative;
&::after {
content: '';
position: absolute;
right: 0;
top: 50%;
width: 1px;
height: 30px;
transform: translateY(-50%);
background: rgba(210, 229, 214, 0.35);
}
}
.logo-img {
width: 36px;
height: 36px;
}
.logo-texts {
display: flex;
flex-direction: column;
gap: 4px;
}
.logo-text {
font-size: 16px;
font-weight: 600;
font-family: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'STSong',
'SimSun', serif;
font-size: 19px;
font-weight: 700;
letter-spacing: 2px;
line-height: 1;
color: #eef6f0;
}
.logo-sub {
font-size: 9px;
line-height: 1;
letter-spacing: 1px;
color: rgba(210, 229, 214, 0.72);
}
.nav {
display: flex;
gap: 28px;
flex: 1;
justify-content: center;
gap: 2px;
height: 100%;
a {
color: rgba(255, 255, 255, 0.82);
cursor: pointer;
position: relative;
display: flex;
align-items: center;
height: 100%;
padding: 0 11px;
color: rgba(255, 255, 255, 0.78);
font-size: 14px;
letter-spacing: 0.5px;
white-space: nowrap;
flex: none;
cursor: pointer;
transition: color 0.2s;
&::after {
content: '';
position: absolute;
left: 11px;
right: 11px;
bottom: 0;
height: 2px;
background: var(--brand-gold);
transform: scaleX(0);
transition: transform 0.22s;
}
&.active,
&:hover {
color: #fff;
font-weight: 600;
&::after {
transform: scaleX(1);
}
}
}
}
@@ -145,16 +197,79 @@ function logout() {
.right {
display: flex;
align-items: center;
gap: 16px;
gap: 14px;
flex: none;
padding-left: 26px;
font-size: 13px;
color: rgba(255, 255, 255, 0.85);
position: relative;
&::before {
content: '';
position: absolute;
left: 0;
top: 50%;
width: 1px;
height: 30px;
transform: translateY(-50%);
background: rgba(210, 229, 214, 0.3);
}
}
.hicon {
width: 19px;
height: 19px;
cursor: pointer;
opacity: 0.8;
filter: brightness(0) invert(1);
transition: opacity 0.2s;
&:hover {
opacity: 1;
}
}
.avatar {
width: 30px;
height: 30px;
border-radius: 50%;
border: 1px solid rgba(210, 229, 214, 0.5);
}
.user {
color: #eef6f0;
}
.quit {
color: rgba(255, 255, 255, 0.85);
color: rgba(255, 255, 255, 0.7);
cursor: pointer;
&:hover {
color: var(--brand-gold-light);
}
}
.site-main {
padding: 20px 24px 40px;
}
/* 窄屏收敛:隐藏英文副标题与用户名,保证导航不折行 */
@media (max-width: 1320px) {
.site-header {
gap: 20px;
padding: 0 24px;
}
.logo {
padding-right: 22px;
}
.logo-sub {
display: none;
}
.user {
display: none;
}
}
</style>
+6
View File
@@ -24,6 +24,12 @@ const routes: RouteRecordRaw[] = [
component: () => import('@/views/search/SearchView.vue'),
meta: { title: '检索发现', icon: 'Search' }
},
{
path: 'hotwords',
name: 'HotWords',
component: () => import('@/views/search/HotWords.vue'),
meta: { title: '热词检索', icon: 'Cloudy' }
},
{
path: 'advanced',
name: 'Advanced',
+107 -9
View File
@@ -12,23 +12,121 @@ body,
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
'Hiragino Sans GB', 'Microsoft YaHei', Arial, sans-serif;
font-size: 14px;
color: #303133;
color: var(--text-main);
background-color: var(--page-bg);
}
.page-card {
background-color: #fff;
border-radius: 6px;
padding: 16px;
/* 标题使用衬线字体,呼应版本馆的文化气质 */
h1,
h2,
h3,
.serif {
font-family: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'STSong',
'SimSun', serif;
}
/* ---------- 通用卡片:白底 + 细边 + 直角,无浮夸阴影 ---------- */
.page-card {
background-color: var(--card-bg);
border: 1px solid var(--card-border);
border-radius: var(--radius-sm);
padding: 20px 22px;
}
/* ---------- 通用区块标题:左侧金线 + 细分隔线 ---------- */
.page-title {
font-size: 16px;
font-weight: 600;
margin: 0 0 16px;
position: relative;
margin: 0 0 18px;
padding-left: 13px;
font-size: 18px;
font-weight: 700;
letter-spacing: 1px;
color: var(--text-main);
&::before {
content: '';
position: absolute;
left: 0;
top: 50%;
width: 3px;
height: 17px;
transform: translateY(-50%);
background: linear-gradient(180deg, var(--brand-gold), var(--brand-primary));
}
}
.mb-16 {
margin-bottom: 16px;
}
/* 细雅的分隔线 */
.hair-line {
height: 1px;
background: var(--hair-line);
border: 0;
margin: 16px 0;
}
/* Element Plus 细节校准 */
.el-button {
font-weight: 500;
}
.el-card {
border-color: var(--card-border);
border-radius: var(--radius-sm);
}
.el-table th.el-table__cell {
background: #faf6ef;
color: var(--text-main);
font-weight: 600;
}
/* 滚动条 */
::-webkit-scrollbar {
width: 10px;
height: 10px;
}
::-webkit-scrollbar-thumb {
background: #d8cbb9;
border-radius: 5px;
&:hover {
background: #c3b29b;
}
}
::-webkit-scrollbar-track {
background: transparent;
}
/* ---------- 页面切换过渡 ---------- */
.page-enter-active,
.page-leave-active {
transition: opacity 0.26s ease, transform 0.26s ease;
}
.page-enter-from {
opacity: 0;
transform: translateY(8px);
}
.page-leave-to {
opacity: 0;
}
/* ---------- 通用交互过渡 ---------- */
.el-button {
transition: all 0.2s ease;
}
.el-input__wrapper,
.el-select__wrapper {
transition: box-shadow 0.2s ease;
}
.el-card {
transition: box-shadow 0.24s ease, transform 0.24s ease, border-color 0.24s ease;
}
+71 -30
View File
@@ -1,36 +1,77 @@
/* 主站点:科技蓝 */
:root.theme-blue {
--brand-primary: #2b6cf6;
--brand-light: #e8f0ff;
--header-bg: #16306b;
--side-bg: #16223c;
--page-bg: #f2f5fb;
--hero-bg: radial-gradient(1200px 500px at 50% 118%, #3ea8ff 0%, #1b4fd0 38%, #0d2a6b 68%, #071a45 100%);
}
/* ============================================================
版本资源联合服务系统 · 视觉主题
参考「吉林大学图书馆」:全屏实景背景 + 半透明层叠面板
配色:浅绿(不用蓝色/棕色作为主基调)
============================================================ */
/* 分站点:书卷棕 */
:root.theme-brown {
--brand-primary: #8b5a2b;
--brand-light: #faf3e6;
--header-bg: #3f2a15;
--side-bg: #3a2a1c;
--page-bg: #f7f1e6;
--hero-bg: radial-gradient(1200px 500px at 50% 118%, #d8a455 0%, #a9703c 38%, #6b3f1d 68%, #2e1a0a 100%);
}
/* ---------- 主站点:浅绿 ---------- */
:root,
:root.theme-main {
/* 品牌色 */
--brand-primary: #5b9a78;
--brand-primary-deep: #2f5d47;
--brand-gold: #a9c9ad;
--brand-gold-light: #d2e5d6;
--brand-light: #eaf4ed;
/* 切图资源(主站点蓝) */
:root {
--el-color-primary: var(--brand-primary);
--nav-bg-img: url('@/assets/nav-bg.png');
--hero-light-img: url('@/assets/hero-light.png');
--hero-blur-img: url('@/assets/hero-blur.png');
--page-bg-img: url('@/assets/page-bg.png');
--btn-primary-img: url('@/assets/btn-search.png');
--btn-ghost-img: url('@/assets/btn-adv.png');
/* 框架 */
--header-bg: #2f5d47;
--header-bg-deep: #244837;
--side-bg: #24483a;
--page-bg: #f4f8f5;
/* 文字 */
--text-main: #23362c;
--text-sub: #5c6f63;
--text-muted: #8fa396;
/* 卡片与线条 */
--card-bg: #ffffff;
--card-border: #dfeae2;
--hair-line: #e4ede7;
/* 圆角 */
--radius-sm: 2px;
--radius-md: 3px;
/* Element Plus 主色对齐 */
--el-color-primary: #5b9a78;
--el-color-primary-light-3: #7cb094;
--el-color-primary-light-5: #9dc4ac;
--el-color-primary-light-7: #c3dccb;
--el-color-primary-light-8: #d5e7db;
--el-color-primary-light-9: #ecf4ef;
--el-color-primary-dark-2: #4a7c5f;
--el-border-radius-base: 2px;
--el-border-radius-small: 2px;
--el-text-color-primary: #23362c;
--el-text-color-regular: #4a5c51;
--el-border-color: #d8e5dc;
--el-border-color-light: #dfeae2;
--el-fill-color-blank: #ffffff;
--nav-bg-img: none;
--hero-filter: none;
}
/* 分站点:同一套切图做暖色调处理 */
/* ---------- 分站点:深一档的墨绿 ---------- */
:root.theme-brown {
--hero-filter: sepia(0.85) saturate(1.6) hue-rotate(-12deg);
}
--brand-primary: #4a7c5f;
--brand-primary-deep: #1f3f2f;
--brand-gold: #97b89c;
--brand-gold-light: #c6dccb;
--brand-light: #e6f1ea;
--header-bg: #1f3f2f;
--header-bg-deep: #162e22;
--side-bg: #162e22;
--page-bg: #f2f7f3;
--el-color-primary: #4a7c5f;
--el-color-primary-light-3: #6e9b84;
--el-color-primary-light-5: #92b6a2;
--el-color-primary-light-7: #bdd4c6;
--el-color-primary-light-8: #d1e2d7;
--el-color-primary-light-9: #eaf2ec;
--el-color-primary-dark-2: #3b634c;
}
+2 -2
View File
@@ -1,4 +1,4 @@
export function applyTheme() {
const site = import.meta.env.VITE_SITE_TYPE || 'main'
document.documentElement.className = site === 'branch' ? 'theme-brown' : 'theme-blue'
}
document.documentElement.className = site === 'branch' ? 'theme-brown' : 'theme-main'
}
+461 -110
View File
@@ -1,6 +1,9 @@
<script setup lang="ts">
import { ref } from 'vue'
import { onBeforeUnmount, onMounted, ref } from 'vue'
import { useRouter } from 'vue-router'
import b1 from '@/assets/banner/b1.jpg'
import b2 from '@/assets/banner/b2.jpg'
import b3 from '@/assets/banner/b3.jpg'
const router = useRouter()
const keyword = ref('')
@@ -8,186 +11,534 @@ const field = ref('题名')
const fields = ['题名', '关键词', '作者', '出版机构']
const types = ref<string[]>([])
const typeOpts = ['纸质图书', '电子图书', '中文文献', '外文文献']
const hot = ['古籍版本', '学位论文', '地方志', '民国文献']
const slides = [
{ img: b1, kicker: '馆藏资源', title: '典藏中华版本,赓续中华文脉' },
{ img: b2, kicker: '统一检索', title: '纸电一体,一站式发现' },
{ img: b3, kicker: '联合服务', title: '多馆协同,资源互联互通' }
]
const sources = [
{ name: '馆藏资源检索', on: true },
{ name: '版本资源库', on: false },
{ name: '古籍善本', on: false },
{ name: '电子文献', on: false },
{ name: '特色专题库', on: false }
]
const entries = [
{ title: '资源检索', path: '/search', icon: 'Search' },
{ title: '热词检索', path: '/hotwords', icon: 'Cloudy' },
{ title: '特藏推荐', path: '/special', icon: 'Star' },
{ title: '资源呈缴', path: '/deposit', icon: 'Upload' },
{ title: '数据统计', path: '/analysis', icon: 'DataAnalysis' },
{ title: '资源管理', path: '/resource', icon: 'Collection' },
{ title: '数据采集', path: '/collect', icon: 'Download' },
{ title: '数据治理', path: '/governance', icon: 'MagicStick' }
]
const active = ref(0)
const tick = ref(0)
let timer: number | undefined
const DURATION = 6000
function reset() {
if (timer) window.clearTimeout(timer)
tick.value++
timer = window.setTimeout(() => go(active.value + 1), DURATION)
}
function go(i: number) {
active.value = (i + slides.length) % slides.length
reset()
}
function next() {
go(active.value + 1)
}
function prev() {
go(active.value - 1)
}
function pause() {
if (timer) window.clearTimeout(timer)
timer = undefined
}
function resume() {
reset()
}
function doSearch() {
router.push({ path: '/search', query: { keyword: keyword.value } })
}
onMounted(reset)
onBeforeUnmount(pause)
</script>
<template>
<div class="hero">
<div class="hero-inner">
<h1>一站式版本资源统一检索</h1>
<p class="sub">支持纸电一体检索、表达式检索、主题联想、分面聚类检索</p>
<div class="home" @mouseenter="pause" @mouseleave="resume">
<!-- 全屏背景轮播 -->
<div class="bg">
<div
v-for="(s, i) in slides"
:key="i"
class="bg-slide"
:class="{ on: i === active }"
:style="{ backgroundImage: `url(${s.img})` }"
/>
<div class="mask" />
</div>
<div class="searchbox">
<div class="row1">
<el-select v-model="field" class="sel">
<el-option v-for="f in fields" :key="f" :label="f" :value="f" />
</el-select>
<input v-model="keyword" class="ipt" placeholder="请输入检索词,支持表达式检索" @keyup.enter="doSearch" />
<button class="btn primary" @click="doSearch">检索</button>
<button class="btn ghost" @click="router.push('/advanced')">高级检索</button>
</div>
<div class="types">
<span class="lbl">前置筛选:</span>
<label v-for="t in typeOpts" :key="t">
<input type="checkbox" :value="t" v-model="types" />{{ t }}
</label>
</div>
<!-- 内容层 -->
<div class="stage">
<div class="hero-text">
<span class="kicker">{{ slides[active].kicker }}</span>
<h1>{{ slides[active].title }}</h1>
</div>
<div class="hot">
<span>热门检索:</span>
<a v-for="h in hot" :key="h" @click="keyword = h; doSearch()">{{ h }}</a>
<div class="panel">
<aside class="panel-side">
<div class="side-head">
<el-icon :size="15"><Search /></el-icon>
<span>搜索馆藏资源</span>
</div>
<a v-for="s in sources" :key="s.name" class="side-item">
{{ s.name }}
</a>
</aside>
<section class="panel-main">
<div class="row1">
<el-select v-model="field" class="sel">
<el-option v-for="f in fields" :key="f" :label="f" :value="f" />
</el-select>
<input
v-model="keyword"
class="ipt"
placeholder="请输入检索词,支持表达式检索"
@keyup.enter="doSearch"
/>
<button class="btn primary" @click="doSearch">检 索</button>
<button class="btn ghost" @click="router.push('/advanced')">高级检索</button>
</div>
<div class="types">
<span class="lbl">前置筛选:</span>
<label v-for="t in typeOpts" :key="t">
<input type="checkbox" :value="t" v-model="types" />{{ t }}
</label>
</div>
<p class="hint">
覆盖本馆订购与自建的多类型版本资源,支持纸电一体检索与全文获取。
</p>
</section>
</div>
<!-- 快捷入口 -->
<div class="quick">
<div
v-for="e in entries"
:key="e.path"
class="quick-item"
@click="router.push(e.path)"
>
<el-icon :size="26"><component :is="e.icon" /></el-icon>
<span>{{ e.title }}</span>
</div>
</div>
</div>
<!-- 轮播控制 -->
<div class="ctrl">
<button class="arrow" @click="prev">‹</button>
<div class="dots">
<span
v-for="(s, i) in slides"
:key="i"
:class="{ on: i === active }"
@click="go(i)"
/>
</div>
<button class="arrow" @click="next">›</button>
</div>
<div :key="tick" class="progress"><span /></div>
</div>
</template>
<style scoped lang="scss">
.hero {
min-height: calc(100vh - 64px);
margin: -20px -24px;
background: var(--hero-light-img) center / cover no-repeat, #0d2a6b;
display: flex;
align-items: flex-start;
justify-content: center;
padding-top: 9vh;
overflow: hidden;
.home {
position: relative;
min-height: calc(100vh - 72px);
margin: -20px -24px;
overflow: hidden;
background: #16301f;
}
.hero-inner {
width: 100%;
max-width: 900px;
text-align: center;
/* ---------- 背景轮播 ---------- */
.bg {
position: absolute;
inset: 0;
}
.bg-slide {
position: absolute;
inset: 0;
background-position: center;
background-size: cover;
opacity: 0;
transform: scale(1.07);
transition:
opacity 1.1s cubic-bezier(0.4, 0, 0.2, 1),
transform 8s cubic-bezier(0.22, 0.61, 0.36, 1);
will-change: opacity, transform;
&.on {
opacity: 1;
transform: scale(1);
}
}
.mask {
position: absolute;
inset: 0;
background: linear-gradient(
180deg,
rgba(10, 28, 20, 0.62) 0%,
rgba(10, 28, 20, 0.28) 38%,
rgba(8, 24, 17, 0.68) 100%
);
}
/* ---------- 内容层 ---------- */
.stage {
position: relative;
z-index: 1;
padding: 0 20px 40px;
z-index: 2;
max-width: 1240px;
margin: 0 auto;
padding: 6vh 24px 108px;
display: flex;
flex-direction: column;
justify-content: center;
min-height: calc(100vh - 72px);
}
.hero-text {
margin-bottom: 34px;
color: #fff;
.kicker {
display: inline-block;
padding: 4px 12px;
margin-bottom: 14px;
font-size: 12px;
letter-spacing: 3px;
color: #dcece1;
border: 1px solid rgba(220, 236, 225, 0.45);
}
h1 {
color: #fff;
margin: 0;
font-size: 46px;
font-weight: 700;
letter-spacing: 3px;
margin: 0 0 18px;
}
.sub {
color: rgba(255, 255, 255, 0.82);
font-size: 14px;
margin: 0 0 40px;
letter-spacing: 6px;
text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
animation: rise 0.9s both;
}
}
.searchbox {
position: relative;
padding: 8px;
border-radius: 10px;
/* 毛玻璃:半透明白 + 背景模糊 + 提亮(乳白玻璃质感) */
background: rgba(255, 255, 255, 0.76);
backdrop-filter: blur(24px) saturate(160%) brightness(1.12);
-webkit-backdrop-filter: blur(24px) saturate(160%) brightness(1.12);
border: 1px solid rgba(255, 255, 255, 0.55);
box-shadow:
0 12px 34px rgba(0, 0, 0, 0.2),
inset 0 1px 0 rgba(255, 255, 255, 0.6);
@keyframes rise {
from {
opacity: 0;
transform: translateY(14px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* ---------- 半透明检索面板 ---------- */
.panel {
display: flex;
background: rgba(16, 38, 28, 0.58);
backdrop-filter: blur(22px) saturate(140%);
-webkit-backdrop-filter: blur(22px) saturate(140%);
border: 1px solid rgba(255, 255, 255, 0.16);
border-radius: var(--radius-sm);
overflow: hidden;
box-shadow: 0 18px 46px rgba(0, 0, 0, 0.3);
}
.panel-side {
width: 214px;
flex: none;
padding: 16px 0;
background: rgba(0, 0, 0, 0.16);
border-right: 1px solid rgba(255, 255, 255, 0.1);
}
.side-head {
display: flex;
align-items: center;
gap: 7px;
padding: 0 18px 14px;
margin-bottom: 6px;
font-size: 14px;
letter-spacing: 1px;
color: #fff;
border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
/* 纯展示,不可点击,因此不做高亮与悬停态 */
.side-item {
display: block;
padding: 14px 20px;
font-size: 14px;
letter-spacing: 0.5px;
color: rgba(255, 255, 255, 0.68);
cursor: default;
pointer-events: none;
}
.panel-main {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
justify-content: center;
padding: 28px 30px;
}
.row1 {
display: flex;
gap: 8px;
align-items: center;
gap: 6px;
padding: 8px;
background: #fff;
border-radius: var(--radius-sm);
}
.sel { width: 120px; flex: none; }
.sel :deep(.el-input__wrapper) {
background: transparent;
box-shadow: none;
.sel {
width: 120px;
flex: none;
:deep(.el-input__wrapper) {
background: transparent;
box-shadow: none;
}
}
.ipt {
flex: 1;
min-width: 0;
height: 54px;
padding: 0 10px;
border: none;
outline: none;
font-size: 15px;
padding: 0 12px;
height: 54px;
color: #303133;
color: var(--text-main);
&::placeholder {
color: #b7bec9;
color: #a9b6ac;
}
}
.btn {
height: 54px;
padding: 0 30px;
border: none;
font-size: 16px;
cursor: pointer;
background-size: 100% 100%;
background-repeat: no-repeat;
flex: none;
height: 54px;
padding: 0 32px;
border: none;
border-radius: var(--radius-sm);
font-size: 15px;
letter-spacing: 2px;
cursor: pointer;
transition: all 0.22s;
}
.btn.primary {
color: #fff;
background-image: var(--btn-primary-img);
background: linear-gradient(180deg, #6aa889, #4f8a6b);
&:hover {
background: linear-gradient(180deg, #78b697, #57956f);
}
}
.btn.ghost {
color: var(--brand-primary);
background-image: var(--btn-ghost-img);
color: var(--brand-primary-deep);
background: #fff;
border: 1px solid #cfe0d5;
letter-spacing: 1px;
&:hover {
background: var(--brand-light);
border-color: var(--brand-primary);
}
}
.types {
margin-top: 8px;
padding: 8px 6px 2px;
display: flex;
gap: 18px;
align-items: center;
color: #43506b;
gap: 18px;
margin-top: 16px;
font-size: 13px;
border-top: 1px solid rgba(255, 255, 255, 0.7);
color: rgba(255, 255, 255, 0.72);
.lbl { color: #5d688a; }
.lbl {
color: rgba(255, 255, 255, 0.5);
}
label {
display: flex;
align-items: center;
gap: 5px;
cursor: pointer;
}
}
.hot {
margin-top: 32px;
color: rgba(255, 255, 255, 0.8);
font-size: 13px;
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
a {
color: #fff;
cursor: pointer;
padding: 6px 18px;
border-radius: 16px;
background: rgba(255, 255, 255, 0.18);
border: 1px solid rgba(255, 255, 255, 0.4);
backdrop-filter: blur(12px) saturate(150%);
-webkit-backdrop-filter: blur(12px) saturate(150%);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
&:hover {
background: rgba(255, 255, 255, 0.3);
input {
accent-color: var(--brand-gold-light);
}
}
}
.hint {
margin: 12px 0 0;
font-size: 12px;
line-height: 1.7;
color: rgba(255, 255, 255, 0.45);
}
/* ---------- 快捷入口 ---------- */
.quick {
display: grid;
grid-template-columns: repeat(8, 1fr);
gap: 10px;
margin-top: 28px;
}
.quick-item {
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
padding: 24px 8px;
color: #fff;
font-size: 13px;
letter-spacing: 0.5px;
background: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(255, 255, 255, 0.16);
border-radius: var(--radius-sm);
backdrop-filter: blur(14px);
-webkit-backdrop-filter: blur(14px);
cursor: pointer;
transition: all 0.24s;
&:hover {
background: rgba(255, 255, 255, 0.22);
border-color: rgba(255, 255, 255, 0.36);
transform: translateY(-3px);
}
}
/* ---------- 轮播控制 ---------- */
.ctrl {
position: absolute;
left: 50%;
bottom: 26px;
z-index: 3;
display: flex;
align-items: center;
gap: 14px;
transform: translateX(-50%);
}
.arrow {
width: 30px;
height: 30px;
display: flex;
align-items: center;
justify-content: center;
font-size: 18px;
line-height: 1;
color: rgba(255, 255, 255, 0.8);
background: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(255, 255, 255, 0.22);
border-radius: 50%;
cursor: pointer;
transition: all 0.24s;
&:hover {
color: #fff;
background: rgba(255, 255, 255, 0.22);
}
}
.dots {
display: flex;
gap: 8px;
span {
width: 22px;
height: 2px;
background: rgba(255, 255, 255, 0.35);
cursor: pointer;
transition: all 0.3s;
&.on {
width: 40px;
background: var(--brand-gold-light);
}
}
}
.progress {
position: absolute;
left: 0;
right: 0;
bottom: 0;
z-index: 3;
height: 2px;
background: rgba(255, 255, 255, 0.1);
span {
display: block;
height: 100%;
background: linear-gradient(90deg, var(--brand-primary), var(--brand-gold-light));
animation: grow 6s linear forwards;
}
}
@keyframes grow {
from {
width: 0;
}
to {
width: 100%;
}
}
/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
.quick {
grid-template-columns: repeat(4, 1fr);
}
}
@media (max-width: 760px) {
.hero-text h1 {
font-size: 24px;
letter-spacing: 2px;
}
.panel {
flex-direction: column;
}
.panel-side {
display: none;
}
.quick {
grid-template-columns: repeat(3, 1fr);
}
}
</style>
+22 -13
View File
@@ -47,7 +47,7 @@ async function handleLogin() {
<div class="login-page">
<div class="login-box">
<div class="login-title">
<el-icon :size="30" color="#409eff"><Collection /></el-icon>
<el-icon :size="30" color="#9ec7ae"><Collection /></el-icon>
<h2>版本资源联合服务系统</h2>
<p>数据集成库 · 检索发现 · 大数据分析</p>
</div>
@@ -84,38 +84,47 @@ async function handleLogin() {
display: flex;
align-items: center;
justify-content: center;
background: var(--header-bg);
background:
radial-gradient(760px 420px at 50% -12%, rgba(190, 225, 200, 0.3), transparent 62%),
radial-gradient(520px 320px at 88% 108%, rgba(169, 201, 173, 0.16), transparent 70%),
linear-gradient(180deg, #3a6b52 0%, #1f3f2f 100%);
}
.login-box {
width: 380px;
padding: 36px 32px 24px;
width: 386px;
padding: 40px 34px 26px;
background: #fff;
border-radius: 10px;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
border: 1px solid rgba(180, 214, 190, 0.5);
border-radius: 3px;
box-shadow: 0 20px 56px rgba(0, 0, 0, 0.32);
.login-title {
text-align: center;
margin-bottom: 24px;
margin-bottom: 26px;
h2 {
margin: 12px 0 6px;
font-size: 19px;
color: #303133;
margin: 14px 0 8px;
font-family: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'STSong',
'SimSun', serif;
font-size: 20px;
font-weight: 700;
letter-spacing: 2px;
color: #23362c;
}
p {
margin: 0;
font-size: 12px;
color: #909399;
letter-spacing: 1px;
color: #a1937f;
}
}
.login-tip {
text-align: center;
font-size: 12px;
color: #c0c4cc;
margin-top: 8px;
color: #c3b5a1;
margin-top: 10px;
}
}
</style>
+4 -2
View File
@@ -36,6 +36,7 @@ async function loadAll() {
const ratio = await getResourceRatio()
initChart(ratioRef.value)?.setOption({
color: ['#5b9a78', '#9dc4ac', '#2f5d47', '#cfe3d3', '#7cb094', '#b4cdbd'],
tooltip: { trigger: 'item' },
legend: { bottom: 0 },
series: [
@@ -51,6 +52,7 @@ async function loadAll() {
const year = await getYearDistribution()
initChart(yearRef.value)?.setOption({
tooltip: { trigger: 'axis' },
color: ['#5b9a78'],
grid: { left: 45, right: 20, top: 30, bottom: 30 },
xAxis: { type: 'category', data: year.map((y) => y.year) },
yAxis: { type: 'value' },
@@ -80,7 +82,7 @@ async function loadAll() {
name: '资源量',
type: 'bar',
barMaxWidth: 36,
itemStyle: { color: '#409eff' },
itemStyle: { color: '#5b9a78' },
data: contrib.map((c) => c.value)
}
]
@@ -99,7 +101,7 @@ async function loadAll() {
{
name: '检索次数',
type: 'bar',
itemStyle: { color: '#67c23a' },
itemStyle: { color: '#9dc4ac' },
data: hotKeywords.value.slice(0, 10).map((k) => k.value)
}
]
+3 -2
View File
@@ -42,10 +42,11 @@ function search() {
max-width: 820px;
margin: 20px auto;
background: #fff;
border-radius: 8px;
border: 1px solid var(--card-border);
border-radius: var(--radius-sm);
padding: 24px;
h2 { margin: 0 0 20px; font-size: 18px; }
h2 { margin: 0 0 20px; font-size: 19px; letter-spacing: 1px; }
}
.row {
+234
View File
@@ -0,0 +1,234 @@
<script setup lang="ts">
import { computed, onMounted, ref } from 'vue'
import { useRouter } from 'vue-router'
import { getHotKeywords } from '@/api/analysis'
import type { FacetItem } from '@/api/search'
const router = useRouter()
const loading = ref(false)
const list = ref<FacetItem[]>([])
/** 排名越靠前,字号(云朵)越大 */
function sizeOf(index: number) {
return Math.max(13, 28 - index * 0.85)
}
function styleOf(index: number) {
return { fontSize: `${sizeOf(index).toFixed(1)}px` }
}
function tierOf(index: number) {
if (index < 3) return 'top'
if (index < 10) return 'mid'
return 'rest'
}
const totalCount = computed(() =>
list.value.reduce((sum, item) => sum + (Number(item.value) || 0), 0)
)
function go(keyword: string) {
router.push({ path: '/search', query: { keyword } })
}
onMounted(async () => {
loading.value = true
try {
list.value = (await getHotKeywords(30)) || []
} catch {
list.value = []
} finally {
loading.value = false
}
})
</script>
<template>
<div class="hot-page">
<div class="head">
<div>
<h2 class="page-title">检索热词</h2>
<p class="desc">按检索热度排序,排名越靠前,云朵越大</p>
</div>
<div v-if="list.length" class="stat">
<span class="num">{{ list.length }}</span>
<span class="unit">个热词</span>
<em>累计检索 {{ totalCount }} 次</em>
</div>
</div>
<div v-loading="loading" class="field">
<div
v-for="(k, i) in list"
:key="k.name"
class="cloud"
:class="tierOf(i)"
:style="styleOf(i)"
:title="`第 ${i + 1} 位 · 检索 ${k.value} 次`"
@click="go(k.name)"
>
<span class="rank">{{ String(i + 1).padStart(2, '0') }}</span>
<span class="word">{{ k.name }}</span>
</div>
</div>
<el-empty v-if="!loading && !list.length" description="暂无热词数据" />
</div>
</template>
<style scoped lang="scss">
.hot-page {
max-width: 1180px;
margin: 0 auto;
}
.head {
display: flex;
align-items: flex-end;
justify-content: space-between;
gap: 20px;
padding-bottom: 16px;
margin-bottom: 22px;
border-bottom: 1px solid var(--hair-line);
.page-title {
margin-bottom: 8px;
}
.desc {
margin: 0;
font-size: 13px;
letter-spacing: 1px;
color: var(--text-muted);
}
}
.stat {
display: flex;
align-items: baseline;
gap: 6px;
font-size: 12px;
color: var(--text-muted);
.num {
font-family: 'Noto Serif SC', 'Songti SC', serif;
font-size: 26px;
font-weight: 700;
color: var(--brand-primary);
line-height: 1;
}
em {
font-style: normal;
margin-left: 10px;
color: #b3a48f;
}
}
/* ---------- 云朵区 ---------- */
.field {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
gap: 22px 16px;
min-height: 420px;
padding: 58px 34px 46px;
background:
radial-gradient(620px 280px at 50% 0%, rgba(91, 154, 120, 0.1), transparent 68%),
radial-gradient(520px 240px at 82% 100%, rgba(47, 93, 71, 0.07), transparent 70%),
#fff;
border: 1px solid var(--card-border);
border-radius: var(--radius-sm);
}
/* 云朵:胶囊主体 + 两处鼓包,合并为柔和云形 */
.cloud {
position: relative;
display: inline-flex;
align-items: center;
gap: 0.5em;
padding: 0.52em 1.35em;
background: #fff;
border-radius: 999px;
color: #3d4f44;
cursor: pointer;
filter: drop-shadow(0 6px 14px rgba(31, 63, 47, 0.12));
transition: transform 0.22s, filter 0.22s;
/* 顶部两团鼓包 */
&::before,
&::after {
content: '';
position: absolute;
border-radius: 50%;
background: inherit;
}
&::before {
left: 14%;
top: -0.7em;
width: 1.45em;
height: 1.45em;
}
&::after {
right: 16%;
top: -0.52em;
width: 1.1em;
height: 1.1em;
}
.rank,
.word {
position: relative;
z-index: 1;
}
.rank {
font-size: 0.5em;
font-weight: 700;
letter-spacing: 0.5px;
color: #a9c4b2;
}
.word {
font-family: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'STSong',
'SimSun', serif;
font-weight: 700;
letter-spacing: 1px;
white-space: nowrap;
}
&:hover {
transform: translateY(-3px);
filter: drop-shadow(0 10px 20px rgba(31, 63, 47, 0.2));
}
}
/* 前三名:描金云朵 */
.cloud.top {
background: linear-gradient(180deg, #eef7f0, #d6eadc);
color: #23503a;
.rank {
color: #6fa287;
}
}
/* 4-10 名:米白云朵 */
.cloud.mid {
background: linear-gradient(180deg, #ffffff, #f3f9f4);
}
/* 其余:纯白云朵 */
.cloud.rest {
background: #fff;
color: #5c6f63;
font-weight: 400;
.word {
font-weight: 400;
}
}
</style>
+4 -2
View File
@@ -175,7 +175,8 @@ onMounted(() => {
width: 210px;
flex: none;
background: #fff;
border-radius: 8px;
border: 1px solid var(--card-border);
border-radius: var(--radius-sm);
padding: 12px;
height: fit-content;
@@ -213,7 +214,8 @@ onMounted(() => {
display: flex;
gap: 12px;
background: #fff;
border-radius: 8px;
border: 1px solid var(--card-border);
border-radius: var(--radius-sm);
padding: 14px;
cursor: pointer;
transition: box-shadow 0.2s;
+1 -1
View File
@@ -7,7 +7,7 @@ const list = ref<SpecialResource[]>([])
const dialogVisible = ref(false)
const current = ref<SpecialResource | null>(null)
const palette = ['#8e6b3f', '#4a6fa5', '#5a8f5a', '#a54a4a', '#7a5ca8', '#3f8e8a']
const palette = ['#5b9a78', '#7cb094', '#2f5d47', '#9dc4ac', '#4a7c5f', '#b4cdbd']
async function fetchList() {
loading.value = true