Merge remote-tracking branch 'origin/master'
# Conflicts: # frontend/src/views/search/SearchView.vue
This commit is contained in:
@@ -5,6 +5,13 @@ export interface CollectTask {
|
||||
libraryCode: string
|
||||
libraryName?: string
|
||||
sourceType?: string
|
||||
dbHost?: string
|
||||
dbPort?: number
|
||||
dbName?: string
|
||||
dbUsername?: string
|
||||
/** 只在提交时发送,列表接口不会返回 */
|
||||
dbPassword?: string
|
||||
sourceTable?: string
|
||||
targetCount?: number
|
||||
collectedCount?: number
|
||||
status?: string
|
||||
@@ -14,6 +21,18 @@ export interface CollectTask {
|
||||
createTime?: string
|
||||
}
|
||||
|
||||
export interface CollectColumn {
|
||||
columnName: string
|
||||
targetField?: string
|
||||
targetLabel?: string
|
||||
}
|
||||
|
||||
export interface CollectTable {
|
||||
tableName: string
|
||||
rowCount: number
|
||||
columns: CollectColumn[]
|
||||
}
|
||||
|
||||
/** 创建采集任务 */
|
||||
export function createCollectTask(data: CollectTask) {
|
||||
return request.post<never, number>('/collect/task', data)
|
||||
@@ -21,7 +40,7 @@ export function createCollectTask(data: CollectTask) {
|
||||
|
||||
/** 执行采集任务 */
|
||||
export function startCollectTask(id: number) {
|
||||
return request.post<never, void>(`/collect/task/${id}/start`)
|
||||
return request.post<never, CollectTask>(`/collect/task/${id}/start`)
|
||||
}
|
||||
|
||||
/** 任务列表 */
|
||||
@@ -29,7 +48,7 @@ export function listCollectTasks() {
|
||||
return request.get<never, CollectTask[]>('/collect/tasks')
|
||||
}
|
||||
|
||||
/** 某单位最新进度 */
|
||||
export function getCollectProgress(libraryCode: string) {
|
||||
return request.get<never, CollectTask>(`/collect/progress/${libraryCode}`)
|
||||
/** 按填写的连接信息测试来源库,并返回字段对应关系 */
|
||||
export function previewCollectSource(data: CollectTask) {
|
||||
return request.post<never, CollectTable>('/collect/preview', data)
|
||||
}
|
||||
|
||||
@@ -11,6 +11,56 @@ export interface GovernanceJob {
|
||||
createTime?: string
|
||||
}
|
||||
|
||||
export interface DuplicateItem {
|
||||
id?: number
|
||||
processNo?: string
|
||||
title?: string
|
||||
author?: string
|
||||
publisher?: string
|
||||
publishYear?: string
|
||||
isbn?: string
|
||||
mediaType?: string
|
||||
sourceLibrary?: string
|
||||
governStatus?: string
|
||||
}
|
||||
|
||||
export interface DuplicateGroup {
|
||||
reason: string
|
||||
matchKey?: string
|
||||
records: DuplicateItem[]
|
||||
}
|
||||
|
||||
export interface DefectItem {
|
||||
id?: number
|
||||
processNo?: string
|
||||
title?: string
|
||||
author?: string
|
||||
sourceLibrary?: string
|
||||
mediaType?: string
|
||||
issues: string[]
|
||||
}
|
||||
|
||||
export interface GovernanceHint {
|
||||
job?: GovernanceJob
|
||||
duplicateGroupCount: number
|
||||
defectCount: number
|
||||
duplicateGroups: DuplicateGroup[]
|
||||
defects: DefectItem[]
|
||||
}
|
||||
|
||||
export interface DatasetItem {
|
||||
id?: number
|
||||
processNo?: string
|
||||
title?: string
|
||||
author?: string
|
||||
mediaType?: string
|
||||
contentForm?: string
|
||||
sourceLibrary?: string
|
||||
publishYear?: string
|
||||
isbn?: string
|
||||
governStatus?: string
|
||||
}
|
||||
|
||||
/** 聚同 */
|
||||
export function runMerge() {
|
||||
return request.post<never, GovernanceJob>('/governance/merge')
|
||||
@@ -21,9 +71,14 @@ export function runOptimize() {
|
||||
return request.post<never, GovernanceJob>('/governance/optimize')
|
||||
}
|
||||
|
||||
/** 提示 */
|
||||
/** 提示:生成两份清单并标记错漏 */
|
||||
export function runHint() {
|
||||
return request.post<never, GovernanceJob>('/governance/hint')
|
||||
return request.post<never, GovernanceHint>('/governance/hint')
|
||||
}
|
||||
|
||||
/** 预览当前两份提示清单 */
|
||||
export function previewHints() {
|
||||
return request.get<never, GovernanceHint>('/governance/hints')
|
||||
}
|
||||
|
||||
/** 提纯 */
|
||||
@@ -31,6 +86,11 @@ export function runPurify() {
|
||||
return request.post<never, GovernanceJob>('/governance/purify')
|
||||
}
|
||||
|
||||
/** 版本资源数据集 */
|
||||
export function listDataset() {
|
||||
return request.get<never, DatasetItem[]>('/governance/dataset')
|
||||
}
|
||||
|
||||
/** 治理任务历史 */
|
||||
export function listGovernanceJobs() {
|
||||
return request.get<never, GovernanceJob[]>('/governance/jobs')
|
||||
|
||||
@@ -105,7 +105,7 @@ function openAdmin() {
|
||||
gap: 36px;
|
||||
padding: 0 36px;
|
||||
/* 与首页检索面板完全一致的半透明绿 + 同款毛玻璃 */
|
||||
background: rgba(16, 38, 28, 0.58);
|
||||
background: var(--header-glass);
|
||||
backdrop-filter: blur(22px) saturate(140%);
|
||||
-webkit-backdrop-filter: blur(22px) saturate(140%);
|
||||
color: #fff;
|
||||
@@ -122,7 +122,7 @@ function openAdmin() {
|
||||
bottom: 0;
|
||||
height: 2px;
|
||||
background: linear-gradient(90deg, transparent, var(--brand-gold), transparent);
|
||||
opacity: 0.6;
|
||||
opacity: 0.9;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ function openAdmin() {
|
||||
width: 1px;
|
||||
height: 30px;
|
||||
transform: translateY(-50%);
|
||||
background: rgba(210, 229, 214, 0.35);
|
||||
background: var(--header-line);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,14 +165,14 @@ function openAdmin() {
|
||||
font-weight: 700;
|
||||
letter-spacing: 2px;
|
||||
line-height: 1;
|
||||
color: #eef6f0;
|
||||
color: var(--text-on-dark);
|
||||
}
|
||||
|
||||
.logo-sub {
|
||||
font-size: 9px;
|
||||
line-height: 1;
|
||||
letter-spacing: 1px;
|
||||
color: rgba(210, 229, 214, 0.72);
|
||||
color: var(--brand-gold-light);
|
||||
}
|
||||
|
||||
.nav {
|
||||
@@ -237,7 +237,7 @@ function openAdmin() {
|
||||
width: 1px;
|
||||
height: 30px;
|
||||
transform: translateY(-50%);
|
||||
background: rgba(210, 229, 214, 0.3);
|
||||
background: var(--header-line);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -258,11 +258,11 @@ function openAdmin() {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 50%;
|
||||
border: 1px solid rgba(210, 229, 214, 0.5);
|
||||
border: 1px solid var(--brand-gold-light);
|
||||
}
|
||||
|
||||
.user {
|
||||
color: #eef6f0;
|
||||
color: var(--text-on-dark);
|
||||
}
|
||||
|
||||
.quit {
|
||||
|
||||
+209
-32
@@ -1,4 +1,5 @@
|
||||
/* 全局样式 */
|
||||
/* 全局样式:组件视觉统一走主题变量 */
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
@@ -9,35 +10,44 @@ body,
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
height: 100%;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
|
||||
'Hiragino Sans GB', 'Microsoft YaHei', Arial, sans-serif;
|
||||
font-family: var(--font-sans);
|
||||
font-size: 14px;
|
||||
color: var(--text-main);
|
||||
background-color: var(--page-bg);
|
||||
}
|
||||
|
||||
/* 标题使用衬线字体,呼应版本馆的文化气质 */
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
.serif {
|
||||
font-family: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'STSong',
|
||||
'SimSun', serif;
|
||||
h4,
|
||||
.serif,
|
||||
.page-title {
|
||||
font-family: var(--font-serif);
|
||||
}
|
||||
|
||||
/* ---------- 通用卡片:白底 + 细边 + 直角,无浮夸阴影 ---------- */
|
||||
a {
|
||||
color: var(--brand-primary-deep);
|
||||
}
|
||||
|
||||
:focus-visible {
|
||||
outline: 2px solid var(--brand-gold);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
/* ---------- 通用卡片:白底 + 细金边 + 极浅投影 ---------- */
|
||||
.page-card {
|
||||
background-color: var(--card-bg);
|
||||
border: 1px solid var(--card-border);
|
||||
border: 1px solid var(--card-gold-border);
|
||||
border-radius: var(--radius-sm);
|
||||
padding: 20px 22px;
|
||||
box-shadow: var(--shadow-card);
|
||||
}
|
||||
|
||||
/* ---------- 通用区块标题:左侧金线 + 细分隔线 ---------- */
|
||||
/* ---------- 区块标题:左侧烫金竖条 + 衬线 ---------- */
|
||||
.page-title {
|
||||
position: relative;
|
||||
margin: 0 0 18px;
|
||||
padding-left: 13px;
|
||||
padding-left: 14px;
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 1px;
|
||||
@@ -49,17 +59,26 @@ h3,
|
||||
left: 0;
|
||||
top: 50%;
|
||||
width: 3px;
|
||||
height: 17px;
|
||||
height: 16px;
|
||||
transform: translateY(-50%);
|
||||
background: linear-gradient(180deg, var(--brand-gold), var(--brand-primary));
|
||||
background: linear-gradient(180deg, var(--brand-gold-light), var(--brand-gold-deep));
|
||||
}
|
||||
}
|
||||
|
||||
.section-kicker {
|
||||
margin: 4px 0 12px;
|
||||
padding-left: 10px;
|
||||
font-family: var(--font-serif);
|
||||
font-size: 14px;
|
||||
letter-spacing: 1px;
|
||||
color: var(--brand-primary-deep);
|
||||
border-left: 2px solid var(--brand-gold);
|
||||
}
|
||||
|
||||
.mb-16 {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
/* 细雅的分隔线 */
|
||||
.hair-line {
|
||||
height: 1px;
|
||||
background: var(--hair-line);
|
||||
@@ -67,20 +86,178 @@ h3,
|
||||
margin: 16px 0;
|
||||
}
|
||||
|
||||
/* Element Plus 细节校准 */
|
||||
/* ---------- 按钮 ---------- */
|
||||
.el-button {
|
||||
font-weight: 500;
|
||||
letter-spacing: 0.4px;
|
||||
transition: background 0.22s ease, border-color 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
|
||||
}
|
||||
|
||||
.el-card {
|
||||
border-color: var(--card-border);
|
||||
.el-button--primary:not(.is-link):not(.is-text):not(.is-plain) {
|
||||
--el-button-bg-color: transparent;
|
||||
--el-button-border-color: var(--brand-primary-deep);
|
||||
--el-button-hover-bg-color: transparent;
|
||||
--el-button-hover-border-color: var(--brand-primary-ink);
|
||||
color: #fff;
|
||||
background: var(--btn-primary-bg);
|
||||
border-color: var(--brand-primary-deep);
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: #fff;
|
||||
background: var(--btn-primary-hover);
|
||||
border-color: var(--brand-primary-ink);
|
||||
}
|
||||
}
|
||||
|
||||
.el-button--primary.is-plain:not(.is-link):not(.is-text) {
|
||||
--el-button-bg-color: var(--card-bg);
|
||||
color: var(--brand-primary-deep);
|
||||
background: var(--card-bg);
|
||||
border-color: var(--brand-gold);
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: var(--brand-primary-ink);
|
||||
background: var(--brand-light);
|
||||
border-color: var(--brand-gold-deep);
|
||||
}
|
||||
}
|
||||
|
||||
.el-button--default:not(.is-link):not(.is-text) {
|
||||
color: var(--brand-primary-deep);
|
||||
background: var(--card-bg);
|
||||
border-color: var(--card-gold-border);
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: var(--brand-primary-ink);
|
||||
border-color: var(--brand-gold);
|
||||
background: var(--paper-warm);
|
||||
}
|
||||
}
|
||||
|
||||
.el-button.is-link {
|
||||
letter-spacing: 0;
|
||||
}
|
||||
|
||||
/* ---------- 输入与焦点 ---------- */
|
||||
.el-input__wrapper,
|
||||
.el-select__wrapper,
|
||||
.el-textarea__inner {
|
||||
border-radius: var(--radius-sm);
|
||||
transition: box-shadow 0.2s ease;
|
||||
}
|
||||
|
||||
.el-input__wrapper.is-focus,
|
||||
.el-select__wrapper.is-focused,
|
||||
.el-textarea__inner:focus {
|
||||
box-shadow: 0 0 0 1px var(--brand-gold) inset !important;
|
||||
}
|
||||
|
||||
/* ---------- 表格 ---------- */
|
||||
.el-table {
|
||||
--el-table-header-bg-color: var(--table-header-bg);
|
||||
--el-table-header-text-color: var(--text-main);
|
||||
--el-table-border-color: var(--hair-line);
|
||||
--el-table-row-hover-bg-color: var(--row-hover);
|
||||
border-radius: var(--radius-sm);
|
||||
color: var(--text-main);
|
||||
}
|
||||
|
||||
.el-table th.el-table__cell {
|
||||
background: #faf6ef;
|
||||
background: var(--table-header-bg) !important;
|
||||
color: var(--text-main);
|
||||
font-family: var(--font-serif);
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.4px;
|
||||
}
|
||||
|
||||
.el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell {
|
||||
background: var(--row-stripe);
|
||||
}
|
||||
|
||||
.el-table__body tr:hover > td.el-table__cell {
|
||||
background: var(--row-hover) !important;
|
||||
}
|
||||
|
||||
/* ---------- 卡片 / 弹窗 / 抽屉 / 页签 ---------- */
|
||||
.el-card {
|
||||
border-color: var(--card-gold-border);
|
||||
border-radius: var(--radius-sm);
|
||||
box-shadow: var(--shadow-card);
|
||||
}
|
||||
|
||||
.el-dialog {
|
||||
border: 1px solid var(--card-gold-border);
|
||||
border-radius: var(--radius-sm);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.el-dialog__header,
|
||||
.el-drawer__header {
|
||||
margin-right: 0;
|
||||
padding-bottom: 14px;
|
||||
border-bottom: 1px solid var(--brand-gold);
|
||||
font-family: var(--font-serif);
|
||||
letter-spacing: 1px;
|
||||
color: var(--text-main);
|
||||
}
|
||||
|
||||
.el-drawer__title,
|
||||
.el-dialog__title {
|
||||
font-family: var(--font-serif);
|
||||
color: var(--text-main);
|
||||
}
|
||||
|
||||
.el-tabs__item {
|
||||
font-family: var(--font-serif);
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
.el-tabs__item.is-active {
|
||||
color: var(--brand-primary-deep);
|
||||
}
|
||||
|
||||
.el-tabs__active-bar {
|
||||
height: 2px;
|
||||
background-color: var(--brand-gold);
|
||||
}
|
||||
|
||||
.el-descriptions__label {
|
||||
font-family: var(--font-serif);
|
||||
color: var(--text-sub) !important;
|
||||
background: var(--table-header-bg) !important;
|
||||
}
|
||||
|
||||
.el-divider__text {
|
||||
font-family: var(--font-serif);
|
||||
color: var(--brand-primary-deep);
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.el-pagination.is-background .el-pager li.is-active {
|
||||
background-color: var(--brand-primary-deep);
|
||||
}
|
||||
|
||||
.el-alert--info {
|
||||
background: var(--brand-light);
|
||||
border: 1px solid var(--card-gold-border);
|
||||
|
||||
.el-alert__title,
|
||||
.el-alert__description {
|
||||
color: var(--text-main);
|
||||
}
|
||||
}
|
||||
|
||||
.el-empty__description p {
|
||||
font-family: var(--font-serif);
|
||||
letter-spacing: 1px;
|
||||
color: var(--text-sub);
|
||||
}
|
||||
|
||||
.el-tag {
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
/* 滚动条 */
|
||||
@@ -90,11 +267,11 @@ h3,
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: #d8cbb9;
|
||||
background: var(--brand-gold-light);
|
||||
border-radius: 5px;
|
||||
|
||||
&:hover {
|
||||
background: #c3b29b;
|
||||
background: var(--brand-gold);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,7 +279,7 @@ h3,
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
/* ---------- 页面切换过渡 ---------- */
|
||||
/* ---------- 页面切换 ---------- */
|
||||
.page-enter-active,
|
||||
.page-leave-active {
|
||||
transition: opacity 0.26s ease, transform 0.26s ease;
|
||||
@@ -117,16 +294,16 @@ h3,
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
/* ---------- 通用交互过渡 ---------- */
|
||||
.el-button {
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.page-enter-active,
|
||||
.page-leave-active,
|
||||
.el-button,
|
||||
.el-card {
|
||||
transition: none;
|
||||
}
|
||||
|
||||
.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;
|
||||
.page-enter-from,
|
||||
.page-leave-to {
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,71 +1,127 @@
|
||||
/* ============================================================
|
||||
版本资源联合服务系统 · 视觉主题
|
||||
参考「吉林大学图书馆」:全屏实景背景 + 半透明层叠面板
|
||||
配色:浅绿(不用蓝色/棕色作为主基调)
|
||||
新中式 + 现代政务:浅绿底、墨绿主色、温润烫金点缀
|
||||
颜色只在这里定义,页面通过 CSS 变量取用
|
||||
============================================================ */
|
||||
|
||||
/* ---------- 主站点:浅绿 ---------- */
|
||||
:root,
|
||||
:root.theme-main {
|
||||
/* 品牌色 */
|
||||
--brand-primary: #5b9a78;
|
||||
--brand-primary-soft: #6fa88a;
|
||||
--brand-primary-deep: #2f5d47;
|
||||
--brand-gold: #a9c9ad;
|
||||
--brand-gold-light: #d2e5d6;
|
||||
--brand-primary-ink: #1e3d2e;
|
||||
--brand-light: #eaf4ed;
|
||||
|
||||
/* 烫金:只用于竖线、选中、描边、图标,不做大面积铺底 */
|
||||
--brand-gold: #b8862d;
|
||||
--brand-gold-light: #e8d7a8;
|
||||
--brand-gold-deep: #8a6420;
|
||||
|
||||
/* 框架 */
|
||||
--header-bg: #2f5d47;
|
||||
--header-bg-deep: #244837;
|
||||
--header-glass: rgba(16, 38, 28, 0.62);
|
||||
--header-line: rgba(232, 215, 168, 0.45);
|
||||
--side-bg: #24483a;
|
||||
--page-bg: #f4f8f5;
|
||||
--hero-scrim: rgba(10, 28, 20, 0.55);
|
||||
|
||||
/* 文字 */
|
||||
--text-main: #23362c;
|
||||
--text-sub: #5c6f63;
|
||||
--text-muted: #8fa396;
|
||||
--text-sub: #4e6358;
|
||||
--text-muted: #7d9186;
|
||||
--text-on-dark: #f7fbf8;
|
||||
|
||||
/* 卡片与线条 */
|
||||
--card-bg: #ffffff;
|
||||
--card-border: #dfeae2;
|
||||
--hair-line: #e4ede7;
|
||||
--paper-warm: #fffdf8;
|
||||
--card-border: #e3ebe6;
|
||||
--card-gold-border: #e4d7b4;
|
||||
--hair-line: #e6eee8;
|
||||
--shadow-card: 0 8px 22px rgba(47, 93, 71, 0.06);
|
||||
--shadow-lift: 0 10px 24px rgba(47, 93, 71, 0.12);
|
||||
|
||||
/* 圆角 */
|
||||
--radius-sm: 2px;
|
||||
--radius-md: 3px;
|
||||
/* 表格 */
|
||||
--table-header-bg: #f8f4ea;
|
||||
--row-hover: #f3f8f5;
|
||||
--row-stripe: #fbfcfb;
|
||||
|
||||
/* Element Plus 主色对齐 */
|
||||
/* 命中高亮 */
|
||||
--hl-bg: #f6e7c1;
|
||||
--hl-text: #6b4e16;
|
||||
|
||||
/* 按钮 */
|
||||
--btn-primary-bg: linear-gradient(180deg, #4f8a6b 0%, #2f5d47 100%);
|
||||
--btn-primary-hover: linear-gradient(180deg, #3f7358 0%, #244837 100%);
|
||||
|
||||
/* 字体 */
|
||||
--font-serif: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
|
||||
--font-sans: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Segoe UI', sans-serif;
|
||||
--font-kai: 'Kaiti SC', 'STKaiti', 'KaiTi', '楷体', serif;
|
||||
|
||||
/* 圆角:方正、书卷气 */
|
||||
--radius-sm: 4px;
|
||||
--radius-md: 4px;
|
||||
|
||||
/* 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-color-primary-dark-2: #2f5d47;
|
||||
--el-color-success: #3e7a5c;
|
||||
--el-color-warning: #c47d2a;
|
||||
--el-color-danger: #c2453a;
|
||||
--el-color-error: #c2453a;
|
||||
--el-border-radius-base: 4px;
|
||||
--el-border-radius-small: 4px;
|
||||
--el-border-radius-round: 4px;
|
||||
--el-font-family: var(--font-sans);
|
||||
--el-text-color-primary: #23362c;
|
||||
--el-text-color-regular: #4a5c51;
|
||||
--el-border-color: #d8e5dc;
|
||||
--el-border-color-light: #dfeae2;
|
||||
--el-text-color-regular: #4e6358;
|
||||
--el-text-color-secondary: #7d9186;
|
||||
--el-text-color-placeholder: #8fa396;
|
||||
--el-border-color: #d7e3db;
|
||||
--el-border-color-light: #e3ebe6;
|
||||
--el-border-color-lighter: #eaf1ec;
|
||||
--el-fill-color-blank: #ffffff;
|
||||
--el-fill-color-light: #f8f4ea;
|
||||
--el-bg-color: #ffffff;
|
||||
--el-bg-color-page: #f4f8f5;
|
||||
--el-mask-color: rgba(22, 40, 32, 0.45);
|
||||
|
||||
--nav-bg-img: none;
|
||||
--hero-filter: none;
|
||||
}
|
||||
|
||||
/* ---------- 分站点:深一档的墨绿 ---------- */
|
||||
/* 分站点:更深的墨绿,烫金略亮一档,保证在深底上仍能看见 */
|
||||
:root.theme-brown {
|
||||
--brand-primary: #4a7c5f;
|
||||
--brand-primary-soft: #6d9a82;
|
||||
--brand-primary-deep: #1f3f2f;
|
||||
--brand-gold: #97b89c;
|
||||
--brand-gold-light: #c6dccb;
|
||||
--brand-primary-ink: #14281e;
|
||||
--brand-gold: #c9a227;
|
||||
--brand-gold-light: #ead9a2;
|
||||
--brand-gold-deep: #8d6b1f;
|
||||
--brand-light: #e6f1ea;
|
||||
|
||||
--header-bg: #1f3f2f;
|
||||
--header-bg-deep: #162e22;
|
||||
--header-glass: rgba(12, 28, 20, 0.72);
|
||||
--header-line: rgba(234, 217, 162, 0.5);
|
||||
--side-bg: #162e22;
|
||||
--page-bg: #f2f7f3;
|
||||
--hero-scrim: rgba(8, 22, 16, 0.62);
|
||||
|
||||
--text-main: #1c2e25;
|
||||
--card-gold-border: #e2d4ae;
|
||||
--table-header-bg: #f6f1e4;
|
||||
--row-hover: #eef5f0;
|
||||
--btn-primary-bg: linear-gradient(180deg, #3f6b52 0%, #1f3f2f 100%);
|
||||
--btn-primary-hover: linear-gradient(180deg, #345843 0%, #162e22 100%);
|
||||
|
||||
--el-color-primary: #4a7c5f;
|
||||
--el-color-primary-light-3: #6e9b84;
|
||||
@@ -73,5 +129,7 @@
|
||||
--el-color-primary-light-7: #bdd4c6;
|
||||
--el-color-primary-light-8: #d1e2d7;
|
||||
--el-color-primary-light-9: #eaf2ec;
|
||||
--el-color-primary-dark-2: #3b634c;
|
||||
--el-color-primary-dark-2: #1f3f2f;
|
||||
--el-bg-color-page: #f2f7f3;
|
||||
--el-text-color-primary: #1c2e25;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ const sources = [
|
||||
]
|
||||
|
||||
/* ---------- 3D 书架:一本书对应一条特藏,点击进入特藏详情 ---------- */
|
||||
const bookColors = ['#2c4d40', '#7a2e2e', '#2b3a67', '#b3862d', '#5a2e42']
|
||||
const bookColors = ['#2c4d40', '#7a2e2e', '#2b3a67', '#8a6420', '#5a2e42']
|
||||
|
||||
const specials = ref<SpecialRecommendItem[]>([])
|
||||
const bookMeta = ref<
|
||||
@@ -326,10 +326,10 @@ onBeforeUnmount(pause)
|
||||
/* ---------- 半透明检索面板 ---------- */
|
||||
.panel {
|
||||
display: flex;
|
||||
background: rgba(16, 38, 28, 0.58);
|
||||
background: var(--header-glass);
|
||||
backdrop-filter: blur(22px) saturate(140%);
|
||||
-webkit-backdrop-filter: blur(22px) saturate(140%);
|
||||
border: 1px solid rgba(255, 255, 255, 0.16);
|
||||
border: 1px solid rgba(232, 215, 168, 0.35);
|
||||
border-radius: var(--radius-sm);
|
||||
overflow: hidden;
|
||||
box-shadow: 0 18px 46px rgba(0, 0, 0, 0.3);
|
||||
@@ -423,22 +423,22 @@ onBeforeUnmount(pause)
|
||||
|
||||
.btn.primary {
|
||||
color: #fff;
|
||||
background: linear-gradient(180deg, #6aa889, #4f8a6b);
|
||||
background: var(--btn-primary-bg);
|
||||
|
||||
&:hover {
|
||||
background: linear-gradient(180deg, #78b697, #57956f);
|
||||
background: var(--btn-primary-hover);
|
||||
}
|
||||
}
|
||||
|
||||
.btn.ghost {
|
||||
color: var(--brand-primary-deep);
|
||||
background: #fff;
|
||||
border: 1px solid #cfe0d5;
|
||||
border: 1px solid var(--brand-gold);
|
||||
letter-spacing: 1px;
|
||||
|
||||
&:hover {
|
||||
background: var(--brand-light);
|
||||
border-color: var(--brand-primary);
|
||||
background: var(--paper-warm);
|
||||
border-color: var(--brand-gold-deep);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -566,7 +566,7 @@ onBeforeUnmount(pause)
|
||||
font-family: 'Kaiti SC', 'STKaiti', 'KaiTi', '楷体', serif;
|
||||
font-size: 15px;
|
||||
letter-spacing: 5px;
|
||||
color: #b8862d;
|
||||
color: var(--brand-gold);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
padding: 10px 0;
|
||||
@@ -702,6 +702,17 @@ onBeforeUnmount(pause)
|
||||
}
|
||||
|
||||
/* ---------- 响应式 ---------- */
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.book-inner,
|
||||
.book-shadow::before,
|
||||
.hero-text h1,
|
||||
.progress span,
|
||||
.bg-slide {
|
||||
animation: none;
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1080px) {
|
||||
.shelf {
|
||||
flex-wrap: wrap;
|
||||
|
||||
@@ -45,9 +45,14 @@ async function handleLogin() {
|
||||
|
||||
<template>
|
||||
<div class="login-page">
|
||||
<aside class="login-visual" aria-hidden="true">
|
||||
<p class="visual-kicker">纸电一体 · 版本馆藏</p>
|
||||
<h1>典藏中华版本<br />赓续中华文脉</h1>
|
||||
</aside>
|
||||
<div class="login-panel">
|
||||
<div class="login-box">
|
||||
<div class="login-title">
|
||||
<el-icon :size="30" color="#9ec7ae"><Collection /></el-icon>
|
||||
<el-icon class="login-mark" :size="28"><Collection /></el-icon>
|
||||
<h2>版本资源联合服务系统</h2>
|
||||
<p>数据集成库 · 检索发现 · 大数据分析</p>
|
||||
</div>
|
||||
@@ -75,28 +80,76 @@ async function handleLogin() {
|
||||
|
||||
<div class="login-tip">默认账号:admin / admin123</div>
|
||||
</div>
|
||||
<p class="copyright">版本馆 · 纸电版本资源联合服务</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.login-page {
|
||||
height: 100vh;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
background: var(--page-bg);
|
||||
}
|
||||
|
||||
.login-visual {
|
||||
position: relative;
|
||||
flex: 1.15;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-end;
|
||||
padding: 64px 56px;
|
||||
color: var(--text-on-dark);
|
||||
background:
|
||||
linear-gradient(180deg, rgba(16, 38, 28, 0.2) 0%, rgba(16, 38, 28, 0.72) 100%),
|
||||
url('../assets/banner/b2.jpg') center 30% / cover no-repeat;
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 28px;
|
||||
right: 28px;
|
||||
bottom: 28px;
|
||||
left: 28px;
|
||||
border: 1px solid rgba(232, 215, 168, 0.45);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
h1 {
|
||||
position: relative;
|
||||
margin: 12px 0 0;
|
||||
font-size: 40px;
|
||||
line-height: 1.35;
|
||||
letter-spacing: 4px;
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
|
||||
.visual-kicker {
|
||||
position: relative;
|
||||
margin: 0;
|
||||
letter-spacing: 4px;
|
||||
color: var(--brand-gold-light);
|
||||
}
|
||||
|
||||
.login-panel {
|
||||
flex: 0.85;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
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%);
|
||||
padding: 40px 24px;
|
||||
}
|
||||
|
||||
.login-box {
|
||||
width: 386px;
|
||||
width: 400px;
|
||||
max-width: 100%;
|
||||
padding: 40px 34px 26px;
|
||||
background: #fff;
|
||||
border: 1px solid rgba(180, 214, 190, 0.5);
|
||||
border-radius: 3px;
|
||||
box-shadow: 0 20px 56px rgba(0, 0, 0, 0.32);
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--card-gold-border);
|
||||
border-radius: var(--radius-sm);
|
||||
box-shadow: var(--shadow-card);
|
||||
|
||||
.login-title {
|
||||
text-align: center;
|
||||
@@ -104,27 +157,53 @@ async function handleLogin() {
|
||||
|
||||
h2 {
|
||||
margin: 14px 0 8px;
|
||||
font-family: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'STSong',
|
||||
'SimSun', serif;
|
||||
font-size: 20px;
|
||||
font-size: 22px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 2px;
|
||||
color: #23362c;
|
||||
color: var(--text-main);
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
font-size: 12px;
|
||||
letter-spacing: 1px;
|
||||
color: #a1937f;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
}
|
||||
|
||||
.login-tip {
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
color: #c3b5a1;
|
||||
color: var(--text-muted);
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.login-mark {
|
||||
color: var(--brand-gold);
|
||||
}
|
||||
|
||||
.copyright {
|
||||
margin: 18px 0 0;
|
||||
font-size: 12px;
|
||||
letter-spacing: 1px;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
@media (max-width: 860px) {
|
||||
.login-page {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.login-visual {
|
||||
min-height: 220px;
|
||||
flex: none;
|
||||
padding: 36px 28px;
|
||||
|
||||
h1 {
|
||||
font-size: 26px;
|
||||
letter-spacing: 2px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -5,19 +5,59 @@ const router = useRouter()
|
||||
|
||||
<template>
|
||||
<div class="not-found">
|
||||
<el-result icon="warning" title="404" sub-title="页面不存在">
|
||||
<template #extra>
|
||||
<el-button type="primary" @click="router.push('/')">返回首页</el-button>
|
||||
</template>
|
||||
</el-result>
|
||||
<div class="seal" aria-hidden="true">未录</div>
|
||||
<p class="code">404</p>
|
||||
<h1>页面不在馆藏目录中</h1>
|
||||
<p class="sub">您访问的地址没有对应页面,可返回首页继续检索。</p>
|
||||
<el-button type="primary" @click="router.push('/')">返回首页</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
<style scoped lang="scss">
|
||||
.not-found {
|
||||
height: 100vh;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 32px;
|
||||
background:
|
||||
radial-gradient(420px 180px at 50% 0%, rgba(184, 134, 45, 0.08), transparent 70%),
|
||||
var(--page-bg);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.seal {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 12px;
|
||||
border: 2px solid var(--brand-gold);
|
||||
color: var(--brand-gold-deep);
|
||||
font-family: var(--font-kai);
|
||||
letter-spacing: 2px;
|
||||
transform: rotate(-8deg);
|
||||
}
|
||||
|
||||
.code {
|
||||
margin: 0;
|
||||
font-family: var(--font-serif);
|
||||
font-size: 72px;
|
||||
line-height: 1;
|
||||
letter-spacing: 6px;
|
||||
color: var(--brand-primary-deep);
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 8px 0 8px;
|
||||
font-size: 22px;
|
||||
letter-spacing: 2px;
|
||||
}
|
||||
|
||||
.sub {
|
||||
margin: 0 0 22px;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -684,17 +684,16 @@ onMounted(() => {
|
||||
|
||||
.page-title {
|
||||
margin: 0 0 12px;
|
||||
font-family: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
|
||||
font-size: 22px;
|
||||
letter-spacing: 2px;
|
||||
color: #1d3a2a;
|
||||
}
|
||||
|
||||
.admin-tabs {
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--card-gold-border);
|
||||
border-radius: var(--radius-sm);
|
||||
padding: 8px 20px 20px;
|
||||
box-shadow: 0 2px 10px rgba(20, 45, 30, 0.06);
|
||||
box-shadow: var(--shadow-card);
|
||||
}
|
||||
|
||||
.toolbar {
|
||||
@@ -742,8 +741,11 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
.panel-title {
|
||||
font-family: var(--font-serif);
|
||||
font-weight: 600;
|
||||
color: #1d3a2a;
|
||||
color: var(--text-main);
|
||||
padding-left: 10px;
|
||||
border-left: 2px solid var(--brand-gold);
|
||||
}
|
||||
|
||||
.link {
|
||||
@@ -758,6 +760,6 @@ onMounted(() => {
|
||||
.form-tip {
|
||||
margin-left: 10px;
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -22,6 +22,11 @@ const contribRef = ref<HTMLElement>()
|
||||
const hotRef = ref<HTMLElement>()
|
||||
const charts: echarts.ECharts[] = []
|
||||
|
||||
function cssVar(name: string, fallback: string) {
|
||||
const value = getComputedStyle(document.documentElement).getPropertyValue(name).trim()
|
||||
return value || fallback
|
||||
}
|
||||
|
||||
function initChart(el?: HTMLElement) {
|
||||
if (!el) return null
|
||||
const c = echarts.init(el)
|
||||
@@ -34,11 +39,20 @@ async function loadAll() {
|
||||
hotKeywords.value = await getHotKeywords(20)
|
||||
recent.value = await getRecentActivity()
|
||||
|
||||
const ink = cssVar('--brand-primary-deep', '#2f5d47')
|
||||
const leaf = cssVar('--brand-primary', '#5b9a78')
|
||||
const mist = cssVar('--brand-primary-soft', '#6fa88a')
|
||||
const gold = cssVar('--brand-gold', '#b8862d')
|
||||
const goldDeep = cssVar('--brand-gold-deep', '#8a6420')
|
||||
const paper = cssVar('--text-main', '#23362c')
|
||||
const axis = { axisLabel: { color: paper, fontFamily: 'PingFang SC, Microsoft YaHei, sans-serif' } }
|
||||
const tip = { textStyle: { fontFamily: 'PingFang SC, Microsoft YaHei, sans-serif', color: paper } }
|
||||
|
||||
const ratio = await getResourceRatio()
|
||||
initChart(ratioRef.value)?.setOption({
|
||||
color: ['#5b9a78', '#9dc4ac', '#2f5d47', '#cfe3d3', '#7cb094', '#b4cdbd'],
|
||||
tooltip: { trigger: 'item' },
|
||||
legend: { bottom: 0 },
|
||||
color: [ink, gold, leaf, goldDeep, mist, cssVar('--brand-light', '#eaf4ed')],
|
||||
tooltip: { trigger: 'item', ...tip },
|
||||
legend: { bottom: 0, textStyle: { color: paper } },
|
||||
series: [
|
||||
{
|
||||
name: '资源比例',
|
||||
@@ -51,17 +65,25 @@ async function loadAll() {
|
||||
|
||||
const year = await getYearDistribution()
|
||||
initChart(yearRef.value)?.setOption({
|
||||
tooltip: { trigger: 'axis' },
|
||||
color: ['#5b9a78'],
|
||||
tooltip: { trigger: 'axis', ...tip },
|
||||
color: [goldDeep],
|
||||
grid: { left: 45, right: 20, top: 30, bottom: 30 },
|
||||
xAxis: { type: 'category', data: year.map((y) => y.year) },
|
||||
yAxis: { type: 'value' },
|
||||
xAxis: { type: 'category', data: year.map((y) => y.year), ...axis },
|
||||
yAxis: { type: 'value', ...axis },
|
||||
series: [
|
||||
{
|
||||
name: '资源量',
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
areaStyle: { opacity: 0.15 },
|
||||
symbol: 'circle',
|
||||
lineStyle: { color: goldDeep, width: 2 },
|
||||
itemStyle: { color: gold },
|
||||
areaStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: gold },
|
||||
{ offset: 1, color: 'rgba(47, 93, 71, 0.02)' }
|
||||
])
|
||||
},
|
||||
data: year.map((y) => y.count)
|
||||
}
|
||||
]
|
||||
@@ -69,39 +91,50 @@ async function loadAll() {
|
||||
|
||||
const contrib = await getLibraryContribution()
|
||||
initChart(contribRef.value)?.setOption({
|
||||
tooltip: { trigger: 'axis' },
|
||||
tooltip: { trigger: 'axis', ...tip },
|
||||
grid: { left: 45, right: 20, top: 30, bottom: 60 },
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: contrib.map((c) => c.name),
|
||||
axisLabel: { rotate: 25, fontSize: 10 }
|
||||
axisLabel: { rotate: 25, fontSize: 10, color: paper }
|
||||
},
|
||||
yAxis: { type: 'value' },
|
||||
yAxis: { type: 'value', ...axis },
|
||||
series: [
|
||||
{
|
||||
name: '资源量',
|
||||
type: 'bar',
|
||||
barMaxWidth: 36,
|
||||
itemStyle: { color: '#5b9a78' },
|
||||
itemStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: gold },
|
||||
{ offset: 1, color: ink }
|
||||
])
|
||||
},
|
||||
data: contrib.map((c) => c.value)
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
initChart(hotRef.value)?.setOption({
|
||||
tooltip: { trigger: 'axis' },
|
||||
tooltip: { trigger: 'axis', ...tip },
|
||||
grid: { left: 90, right: 20, top: 20, bottom: 30 },
|
||||
xAxis: { type: 'value' },
|
||||
xAxis: { type: 'value', ...axis },
|
||||
yAxis: {
|
||||
type: 'category',
|
||||
inverse: true,
|
||||
data: hotKeywords.value.slice(0, 10).map((k) => k.name)
|
||||
data: hotKeywords.value.slice(0, 10).map((k) => k.name),
|
||||
axisLabel: { color: paper }
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '检索次数',
|
||||
type: 'bar',
|
||||
itemStyle: { color: '#9dc4ac' },
|
||||
itemStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
|
||||
{ offset: 0, color: ink },
|
||||
{ offset: 1, color: gold }
|
||||
])
|
||||
},
|
||||
data: hotKeywords.value.slice(0, 10).map((k) => k.value)
|
||||
}
|
||||
]
|
||||
@@ -186,16 +219,31 @@ onBeforeUnmount(() => {
|
||||
|
||||
<style scoped lang="scss">
|
||||
.mini {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 3px;
|
||||
background: linear-gradient(180deg, var(--brand-gold-light), var(--brand-gold-deep));
|
||||
}
|
||||
|
||||
.v {
|
||||
font-size: 22px;
|
||||
font-family: var(--font-serif);
|
||||
font-size: 28px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 1px;
|
||||
color: var(--brand-primary-deep);
|
||||
}
|
||||
|
||||
.l {
|
||||
font-size: 13px;
|
||||
color: #909399;
|
||||
color: var(--text-muted);
|
||||
margin-top: 6px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,25 +1,52 @@
|
||||
<script setup lang="ts">
|
||||
import { onMounted, reactive, ref } from 'vue'
|
||||
import { computed, onMounted, reactive, ref } from 'vue'
|
||||
import { ElMessage, type FormInstance, type FormRules } from 'element-plus'
|
||||
import { createCollectTask, listCollectTasks, startCollectTask, type CollectTask } from '@/api/collect'
|
||||
import {
|
||||
createCollectTask,
|
||||
listCollectTasks,
|
||||
previewCollectSource,
|
||||
startCollectTask,
|
||||
type CollectTable,
|
||||
type CollectTask
|
||||
} from '@/api/collect'
|
||||
|
||||
const loading = ref(false)
|
||||
const startingId = ref<number | null>(null)
|
||||
const previewing = ref(false)
|
||||
const list = ref<CollectTask[]>([])
|
||||
const preview = ref<CollectTable | null>(null)
|
||||
|
||||
const dialogVisible = ref(false)
|
||||
const formRef = ref<FormInstance>()
|
||||
const form = reactive<CollectTask>({
|
||||
libraryCode: '',
|
||||
libraryName: '',
|
||||
sourceType: 'MARC',
|
||||
sourceType: 'DB',
|
||||
dbHost: '',
|
||||
dbPort: 5432,
|
||||
dbName: '',
|
||||
dbUsername: '',
|
||||
dbPassword: '',
|
||||
sourceTable: '',
|
||||
targetCount: 200000
|
||||
})
|
||||
|
||||
const rules: FormRules = {
|
||||
libraryCode: [{ required: true, message: '请输入单位编码', trigger: 'blur' }],
|
||||
libraryName: [{ required: true, message: '请输入单位名称', trigger: 'blur' }]
|
||||
libraryName: [{ required: true, message: '请输入单位名称', trigger: 'blur' }],
|
||||
dbHost: [{ required: true, message: '请输入数据库地址', trigger: 'blur' }],
|
||||
dbPort: [{ required: true, message: '请输入端口', trigger: 'blur' }],
|
||||
dbName: [{ required: true, message: '请输入数据库名', trigger: 'blur' }],
|
||||
dbUsername: [{ required: true, message: '请输入用户名', trigger: 'blur' }],
|
||||
dbPassword: [{ required: true, message: '请输入密码', trigger: 'blur' }],
|
||||
sourceTable: [{ required: true, message: '请输入表名', trigger: 'blur' }]
|
||||
}
|
||||
|
||||
const mappedColumns = computed(() => (preview.value?.columns || []).filter((item) => item.targetField))
|
||||
const unmappedColumns = computed(() =>
|
||||
(preview.value?.columns || []).filter((item) => !item.targetField).map((item) => item.columnName)
|
||||
)
|
||||
|
||||
async function fetchList() {
|
||||
loading.value = true
|
||||
try {
|
||||
@@ -30,22 +57,61 @@ async function fetchList() {
|
||||
}
|
||||
|
||||
function openCreate() {
|
||||
form.libraryCode = ''
|
||||
form.libraryName = ''
|
||||
form.sourceType = 'DB'
|
||||
form.dbHost = ''
|
||||
form.dbPort = 5432
|
||||
form.dbName = ''
|
||||
form.dbUsername = ''
|
||||
form.dbPassword = ''
|
||||
form.sourceTable = ''
|
||||
form.targetCount = 200000
|
||||
preview.value = null
|
||||
dialogVisible.value = true
|
||||
}
|
||||
|
||||
async function handlePreview() {
|
||||
await formRef.value?.validateField(['dbHost', 'dbPort', 'dbName', 'dbUsername', 'dbPassword', 'sourceTable'])
|
||||
previewing.value = true
|
||||
preview.value = null
|
||||
try {
|
||||
preview.value = await previewCollectSource(form)
|
||||
ElMessage.success(`连接成功,表中共 ${preview.value.rowCount} 条`)
|
||||
} finally {
|
||||
previewing.value = false
|
||||
}
|
||||
}
|
||||
|
||||
async function handleCreate() {
|
||||
await formRef.value?.validate()
|
||||
form.sourceType = 'DB'
|
||||
await createCollectTask(form)
|
||||
ElMessage.success('采集任务已创建')
|
||||
ElMessage.success('采集任务已创建,可在列表中执行')
|
||||
dialogVisible.value = false
|
||||
formRef.value?.resetFields()
|
||||
fetchList()
|
||||
}
|
||||
|
||||
async function handleStart(row: CollectTask) {
|
||||
await startCollectTask(row.id as number)
|
||||
ElMessage.success('采集任务已执行')
|
||||
fetchList()
|
||||
startingId.value = row.id as number
|
||||
try {
|
||||
const task = await startCollectTask(row.id as number)
|
||||
if (task.status === 'FAILED') {
|
||||
ElMessage.error(task.message || '采集失败')
|
||||
} else {
|
||||
ElMessage.success(task.message || '采集完成')
|
||||
}
|
||||
await fetchList()
|
||||
} finally {
|
||||
startingId.value = null
|
||||
}
|
||||
}
|
||||
|
||||
function wrotePercent(row: CollectTask) {
|
||||
const target = Number(row.targetCount) || 0
|
||||
const got = Number(row.collectedCount) || 0
|
||||
if (target <= 0) return '0%'
|
||||
return `${Math.min(100, Math.round((got / target) * 100))}%`
|
||||
}
|
||||
|
||||
function statusTag(status?: string) {
|
||||
@@ -55,6 +121,11 @@ function statusTag(status?: string) {
|
||||
return 'info'
|
||||
}
|
||||
|
||||
function sourceText(row: CollectTask) {
|
||||
if (!row.dbHost) return row.sourceTable || '-'
|
||||
return `${row.dbHost}:${row.dbPort || ''}/${row.dbName || ''} / ${row.sourceTable || ''}`
|
||||
}
|
||||
|
||||
onMounted(fetchList)
|
||||
</script>
|
||||
|
||||
@@ -66,7 +137,7 @@ onMounted(fetchList)
|
||||
</div>
|
||||
|
||||
<el-alert
|
||||
title="采集 4 家单位图书馆纸电版本资源元数据,各馆不低于 20 万条,优先采集纸书元数据"
|
||||
title="填写来源数据库的地址、用户名、密码和表名。测试连接后可看到每列写入版本资源表的哪个字段;执行后按这些字段入库。"
|
||||
type="info"
|
||||
:closable="false"
|
||||
class="mb-16"
|
||||
@@ -74,16 +145,25 @@ onMounted(fetchList)
|
||||
|
||||
<el-table v-loading="loading" :data="list" border stripe>
|
||||
<el-table-column prop="libraryCode" label="单位编码" width="110" />
|
||||
<el-table-column prop="libraryName" label="单位名称" min-width="160" />
|
||||
<el-table-column prop="sourceType" label="数据源" width="100" />
|
||||
<el-table-column prop="targetCount" label="目标量" width="100" />
|
||||
<el-table-column prop="collectedCount" label="已采集" width="100" />
|
||||
<el-table-column prop="libraryName" label="单位名称" min-width="140" />
|
||||
<el-table-column label="来源库 / 表" min-width="240" show-overflow-tooltip>
|
||||
<template #default="{ row }">{{ sourceText(row) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="dbUsername" label="用户名" width="110" />
|
||||
<el-table-column label="本次写入" width="120">
|
||||
<template #default="{ row }">
|
||||
<div class="wrote">
|
||||
<span>{{ row.collectedCount ?? 0 }}</span>
|
||||
<i class="wrote-bar"><b :style="{ width: wrotePercent(row) }" /></i>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" width="110">
|
||||
<template #default="{ row }">
|
||||
<el-tag :type="statusTag(row.status)" size="small">{{ row.status }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="message" label="信息" min-width="140" show-overflow-tooltip />
|
||||
<el-table-column prop="message" label="结果" min-width="240" show-overflow-tooltip />
|
||||
<el-table-column prop="createTime" label="创建时间" width="170" />
|
||||
<el-table-column label="操作" width="110" fixed="right">
|
||||
<template #default="{ row }">
|
||||
@@ -91,7 +171,8 @@ onMounted(fetchList)
|
||||
link
|
||||
type="primary"
|
||||
size="small"
|
||||
:disabled="row.status === 'RUNNING'"
|
||||
:loading="startingId === row.id"
|
||||
:disabled="row.status === 'RUNNING' || !row.dbHost"
|
||||
@click="handleStart(row)"
|
||||
>
|
||||
执行
|
||||
@@ -100,24 +181,59 @@ onMounted(fetchList)
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-dialog v-model="dialogVisible" title="新建采集任务" width="480px">
|
||||
<el-form ref="formRef" :model="form" :rules="rules" label-width="100px">
|
||||
<el-dialog v-model="dialogVisible" title="新建采集任务" width="720px">
|
||||
<el-form ref="formRef" :model="form" :rules="rules" label-width="110px">
|
||||
<el-row :gutter="12">
|
||||
<el-col :span="16">
|
||||
<el-form-item label="数据库地址" prop="dbHost">
|
||||
<el-input v-model="form.dbHost" placeholder="如 10.1.1.14 或 db.example.com" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="端口" prop="dbPort" label-width="60px">
|
||||
<el-input-number v-model="form.dbPort" :min="1" :max="65535" controls-position="right" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="数据库名" prop="dbName">
|
||||
<el-input v-model="form.dbName" placeholder="如 banben" />
|
||||
</el-form-item>
|
||||
<el-row :gutter="12">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="用户名" prop="dbUsername">
|
||||
<el-input v-model="form.dbUsername" placeholder="数据库账号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="密码" prop="dbPassword" label-width="60px">
|
||||
<el-input v-model="form.dbPassword" type="password" show-password placeholder="数据库密码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="表名" prop="sourceTable">
|
||||
<el-input v-model="form.sourceTable" placeholder="如 src_library_catalog,或 public.src_library_catalog" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button :loading="previewing" @click="handlePreview">测试连接并查看字段</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="preview" label="字段对应">
|
||||
<div class="map-box">
|
||||
<p class="unmap">{{ preview.tableName }} 共 {{ preview.rowCount }} 条。同名或常见别名会写入版本资源表。</p>
|
||||
<el-tag v-for="col in mappedColumns" :key="col.columnName" size="small" class="map-tag">
|
||||
{{ col.columnName }} → {{ col.targetLabel }}
|
||||
</el-tag>
|
||||
<p v-if="unmappedColumns.length" class="unmap">不写入:{{ unmappedColumns.join('、') }}</p>
|
||||
<p v-if="!mappedColumns.length" class="unmap">这张表没有能对应到版本资源字段的列。</p>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="单位编码" prop="libraryCode">
|
||||
<el-input v-model="form.libraryCode" placeholder="如 NC-01" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单位名称" prop="libraryName">
|
||||
<el-input v-model="form.libraryName" placeholder="如 江西南昌某馆" />
|
||||
</el-form-item>
|
||||
<el-form-item label="数据源类型">
|
||||
<el-select v-model="form.sourceType" style="width: 100%">
|
||||
<el-option label="MARC" value="MARC" />
|
||||
<el-option label="Excel" value="EXCEL" />
|
||||
<el-option label="数据库" value="DB" />
|
||||
<el-option label="接口" value="API" />
|
||||
</el-select>
|
||||
<el-input v-model="form.libraryName" placeholder="如 陆军步兵学院图书馆" />
|
||||
</el-form-item>
|
||||
<el-form-item label="目标采集量">
|
||||
<el-input-number v-model="form.targetCount" :min="0" :step="10000" style="width: 100%" />
|
||||
<el-input-number v-model="form.targetCount" :min="1" :step="1000" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
@@ -134,4 +250,40 @@ onMounted(fetchList)
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.map-box {
|
||||
width: 100%;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
.map-tag {
|
||||
margin: 0 8px 8px 0;
|
||||
}
|
||||
|
||||
.unmap {
|
||||
margin: 0 0 8px;
|
||||
color: var(--text-muted);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.wrote {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.wrote-bar {
|
||||
display: block;
|
||||
height: 3px;
|
||||
background: var(--brand-light);
|
||||
border-radius: 2px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.wrote-bar b {
|
||||
display: block;
|
||||
height: 100%;
|
||||
background: linear-gradient(90deg, var(--brand-primary-deep), var(--brand-gold));
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -104,8 +104,9 @@ onMounted(() => {
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="110px"
|
||||
style="max-width: 660px"
|
||||
style="max-width: 720px"
|
||||
>
|
||||
<p class="section-kicker">呈缴单位</p>
|
||||
<el-form-item label="单位名称" prop="orgName">
|
||||
<el-input v-model="form.orgName" placeholder="请输入呈缴单位名称" />
|
||||
</el-form-item>
|
||||
@@ -118,6 +119,7 @@ onMounted(() => {
|
||||
<el-form-item label="邮箱">
|
||||
<el-input v-model="form.email" placeholder="请输入邮箱" />
|
||||
</el-form-item>
|
||||
<p class="section-kicker">资源信息</p>
|
||||
<el-form-item label="资源名称" prop="resourceTitle">
|
||||
<el-input v-model="form.resourceTitle" placeholder="请输入版本资源名称" />
|
||||
</el-form-item>
|
||||
|
||||
@@ -1,26 +1,50 @@
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { computed, onMounted, ref } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import {
|
||||
listDataset,
|
||||
listGovernanceJobs,
|
||||
previewHints,
|
||||
runHint,
|
||||
runMerge,
|
||||
runOptimize,
|
||||
runPurify,
|
||||
type DatasetItem,
|
||||
type DefectItem,
|
||||
type DuplicateItem,
|
||||
type GovernanceHint,
|
||||
type GovernanceJob
|
||||
} from '@/api/governance'
|
||||
import { governStatusLabel, governStatusTagType } from '@/constants/dict'
|
||||
|
||||
const loading = ref(false)
|
||||
const running = ref('')
|
||||
const jobs = ref<GovernanceJob[]>([])
|
||||
const hintReport = ref<GovernanceHint>({
|
||||
duplicateGroupCount: 0,
|
||||
defectCount: 0,
|
||||
duplicateGroups: [],
|
||||
defects: []
|
||||
})
|
||||
const dataset = ref<DatasetItem[]>([])
|
||||
|
||||
const actions = [
|
||||
{ type: 'MERGE', title: '聚同', desc: '将不同来源、不同媒体类型的同一文献元数据聚合为一条,并标注来源。', fn: runMerge },
|
||||
{ type: 'OPTIMIZE', title: '优化', desc: '整合聚同文献的不同描述元数据,生成质量更高、要素更完整的元数据。', fn: runOptimize },
|
||||
{ type: 'HINT', title: '提示', desc: '生成疑似同一文献提示清单、疑似元数据错漏提示清单。', fn: runHint },
|
||||
{ type: 'PURIFY', title: '提纯', desc: '将相关纸电图书数据从全部图书数据中提取出来,形成版本资源数据集。', fn: runPurify }
|
||||
{ type: 'MERGE', title: '聚同', desc: '将不同来源、不同媒体类型的同一文献元数据聚合为一条,并标注来源。' },
|
||||
{ type: 'OPTIMIZE', title: '优化', desc: '整合聚同文献的不同描述元数据,生成质量更高、要素更完整的元数据。' },
|
||||
{ type: 'HINT', title: '提示', desc: '生成疑似同一文献提示清单、疑似元数据错漏提示清单。' },
|
||||
{ type: 'PURIFY', title: '提纯', desc: '将相关纸电图书数据从全部图书数据中提取出来,形成版本资源数据集。' }
|
||||
]
|
||||
|
||||
const duplicateRows = computed(() => {
|
||||
const rows: Array<DuplicateItem & { reason: string }> = []
|
||||
for (const group of hintReport.value.duplicateGroups || []) {
|
||||
for (const record of group.records || []) {
|
||||
rows.push({ ...record, reason: group.reason })
|
||||
}
|
||||
}
|
||||
return rows
|
||||
})
|
||||
|
||||
async function fetchJobs() {
|
||||
loading.value = true
|
||||
try {
|
||||
@@ -30,11 +54,33 @@ async function fetchJobs() {
|
||||
}
|
||||
}
|
||||
|
||||
async function loadHints() {
|
||||
hintReport.value = await previewHints()
|
||||
}
|
||||
|
||||
async function loadDataset() {
|
||||
dataset.value = await listDataset()
|
||||
}
|
||||
|
||||
async function handleRun(action: (typeof actions)[number]) {
|
||||
running.value = action.type
|
||||
try {
|
||||
const job = await action.fn()
|
||||
ElMessage.success(`${action.title}完成:${job.resultSummary || ''}`)
|
||||
if (action.type === 'HINT') {
|
||||
hintReport.value = await runHint()
|
||||
ElMessage.success(hintReport.value.job?.resultSummary || '提示完成')
|
||||
} else if (action.type === 'MERGE') {
|
||||
const job = await runMerge()
|
||||
ElMessage.success(`${action.title}完成:${job.resultSummary || ''}`)
|
||||
await loadHints()
|
||||
} else if (action.type === 'OPTIMIZE') {
|
||||
const job = await runOptimize()
|
||||
ElMessage.success(`${action.title}完成:${job.resultSummary || ''}`)
|
||||
await loadHints()
|
||||
} else {
|
||||
const job = await runPurify()
|
||||
ElMessage.success(`${action.title}完成:${job.resultSummary || ''}`)
|
||||
await loadDataset()
|
||||
}
|
||||
fetchJobs()
|
||||
} finally {
|
||||
running.value = ''
|
||||
@@ -48,14 +94,30 @@ function statusTag(status?: string) {
|
||||
return 'info'
|
||||
}
|
||||
|
||||
onMounted(fetchJobs)
|
||||
function issueText(row: DefectItem) {
|
||||
return (row.issues || []).join(';')
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
await fetchJobs()
|
||||
try {
|
||||
await loadHints()
|
||||
} catch {
|
||||
// 错误已由响应拦截器提示
|
||||
}
|
||||
try {
|
||||
await loadDataset()
|
||||
} catch {
|
||||
// 错误已由响应拦截器提示
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="page-card">
|
||||
<h3 class="page-title">数据治理</h3>
|
||||
<el-alert
|
||||
title="治理四动作:聚同 / 优化 / 提示 / 提纯"
|
||||
title="建议顺序:先看提示清单,再对完全一致的重复文献执行聚同、优化,最后提纯。疑似同一文献只出清单,不自动合并。"
|
||||
type="info"
|
||||
:closable="false"
|
||||
class="mb-16"
|
||||
@@ -63,7 +125,7 @@ onMounted(fetchJobs)
|
||||
|
||||
<el-row :gutter="16">
|
||||
<el-col v-for="a in actions" :key="a.type" :xs="24" :sm="12">
|
||||
<el-card shadow="hover" class="gov-card">
|
||||
<el-card shadow="hover" class="gov-card" :class="'tone-' + a.type">
|
||||
<h4>{{ a.title }}</h4>
|
||||
<p>{{ a.desc }}</p>
|
||||
<el-button type="primary" :loading="running === a.type" @click="handleRun(a)">
|
||||
@@ -73,6 +135,58 @@ onMounted(fetchJobs)
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<h3 class="page-title" style="margin-top: 8px">
|
||||
疑似同一文献提示清单({{ hintReport.duplicateGroupCount }} 组)
|
||||
</h3>
|
||||
<el-table :data="duplicateRows" border stripe empty-text="暂无疑似同一文献">
|
||||
<el-table-column prop="reason" label="提示原因" min-width="280" show-overflow-tooltip />
|
||||
<el-table-column prop="processNo" label="加工编号" width="140" />
|
||||
<el-table-column prop="title" label="正题名" min-width="180" show-overflow-tooltip />
|
||||
<el-table-column prop="author" label="责任者" width="100" />
|
||||
<el-table-column prop="isbn" label="ISBN" width="170" show-overflow-tooltip />
|
||||
<el-table-column prop="mediaType" label="媒体" width="80" />
|
||||
<el-table-column prop="sourceLibrary" label="来源馆" min-width="160" show-overflow-tooltip />
|
||||
<el-table-column label="治理状态" width="100">
|
||||
<template #default="{ row }">
|
||||
<el-tag :type="governStatusTagType(row.governStatus)" size="small">
|
||||
{{ governStatusLabel(row.governStatus) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<h3 class="page-title" style="margin-top: 20px">
|
||||
疑似元数据错漏提示清单({{ hintReport.defectCount }} 条)
|
||||
</h3>
|
||||
<el-table :data="hintReport.defects" border stripe empty-text="暂无疑似错漏">
|
||||
<el-table-column prop="processNo" label="加工编号" width="140" />
|
||||
<el-table-column prop="title" label="正题名" min-width="180" show-overflow-tooltip />
|
||||
<el-table-column prop="author" label="责任者" width="100" />
|
||||
<el-table-column prop="sourceLibrary" label="来源馆" min-width="160" show-overflow-tooltip />
|
||||
<el-table-column prop="mediaType" label="媒体" width="80" />
|
||||
<el-table-column label="错漏说明" min-width="280" show-overflow-tooltip>
|
||||
<template #default="{ row }">{{ issueText(row) }}</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<h3 class="page-title" style="margin-top: 20px">版本资源数据集({{ dataset.length }} 条)</h3>
|
||||
<el-table :data="dataset" border stripe empty-text="尚未提纯">
|
||||
<el-table-column prop="processNo" label="加工编号" width="140" />
|
||||
<el-table-column prop="title" label="正题名" min-width="200" show-overflow-tooltip />
|
||||
<el-table-column prop="author" label="责任者" width="100" />
|
||||
<el-table-column prop="mediaType" label="媒体" width="80" />
|
||||
<el-table-column prop="contentForm" label="内容形式" width="100" />
|
||||
<el-table-column prop="sourceLibrary" label="来源馆" min-width="160" show-overflow-tooltip />
|
||||
<el-table-column prop="publishYear" label="出版年份" width="100" />
|
||||
<el-table-column label="治理状态" width="100">
|
||||
<template #default="{ row }">
|
||||
<el-tag :type="governStatusTagType(row.governStatus)" size="small">
|
||||
{{ governStatusLabel(row.governStatus) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<h3 class="page-title" style="margin-top: 20px">治理任务历史</h3>
|
||||
<el-table v-loading="loading" :data="jobs" border stripe>
|
||||
<el-table-column type="index" label="#" width="50" />
|
||||
@@ -92,16 +206,24 @@ onMounted(fetchJobs)
|
||||
<style scoped lang="scss">
|
||||
.gov-card {
|
||||
margin-bottom: 16px;
|
||||
border-top: 3px solid var(--brand-primary);
|
||||
|
||||
h4 {
|
||||
margin: 0 0 8px;
|
||||
font-family: var(--font-serif);
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 13px;
|
||||
color: #909399;
|
||||
color: var(--text-muted);
|
||||
min-height: 38px;
|
||||
margin: 0 0 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.tone-MERGE { border-top-color: var(--brand-primary-deep); }
|
||||
.tone-OPTIMIZE { border-top-color: var(--brand-gold); }
|
||||
.tone-HINT { border-top-color: var(--brand-primary); }
|
||||
.tone-PURIFY { border-top-color: var(--brand-gold-deep); }
|
||||
</style>
|
||||
|
||||
@@ -329,8 +329,9 @@ onMounted(fetchData)
|
||||
|
||||
.special-tag {
|
||||
margin-right: 6px;
|
||||
background: #8a6d3b;
|
||||
border-color: #8a6d3b;
|
||||
background: var(--brand-gold-deep);
|
||||
border-color: var(--brand-gold-deep);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.form-grid {
|
||||
|
||||
@@ -19,7 +19,8 @@ function search() {
|
||||
|
||||
<template>
|
||||
<div class="adv">
|
||||
<h2>高级检索</h2>
|
||||
<h2 class="page-title">高级检索</h2>
|
||||
<p class="section-kicker">检索条件</p>
|
||||
<div v-for="(r, i) in rows" :key="i" class="row">
|
||||
<el-select v-model="r.field" style="width: 140px">
|
||||
<el-option v-for="f in fields" :key="f" :label="f" :value="f" />
|
||||
@@ -41,12 +42,11 @@ function search() {
|
||||
.adv {
|
||||
max-width: 820px;
|
||||
margin: 20px auto;
|
||||
background: #fff;
|
||||
border: 1px solid var(--card-border);
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--card-gold-border);
|
||||
border-radius: var(--radius-sm);
|
||||
padding: 24px;
|
||||
|
||||
h2 { margin: 0 0 20px; font-size: 19px; letter-spacing: 1px; }
|
||||
box-shadow: var(--shadow-card);
|
||||
}
|
||||
|
||||
.row {
|
||||
|
||||
@@ -57,7 +57,6 @@ const totalCount = computed(() =>
|
||||
const cloudRef = ref<HTMLDivElement | null>(null)
|
||||
const stageRef = ref<HTMLDivElement | null>(null)
|
||||
|
||||
const colors = ['#5c7c9e', '#c96b6b', '#4a7a8c', '#b39b8b', '#8c9aaf', '#d19b9b']
|
||||
const FONT_FAMILY = '"Microsoft YaHei", "PingFang SC", sans-serif'
|
||||
const MAX_WEIGHT = 120
|
||||
|
||||
@@ -77,7 +76,7 @@ function render() {
|
||||
weightFactor: (size: number) => 17 + 44 * (size / MAX_WEIGHT),
|
||||
fontFamily: FONT_FAMILY,
|
||||
fontWeight: 'bold',
|
||||
color: (word: string) => colors[Math.abs(hash(word)) % colors.length],
|
||||
color: (word: string) => cloudColor(word),
|
||||
// 给每个词加上类名,便于用 CSS 实现悬停放大
|
||||
classes: 'cloud-word',
|
||||
rotateRatio: 0,
|
||||
@@ -86,6 +85,15 @@ function render() {
|
||||
})
|
||||
}
|
||||
|
||||
/** 词云配色取自主题变量,保证两套主题一致且在白底上可读 */
|
||||
function cloudColor(word: string) {
|
||||
const names = ['--brand-primary-deep', '--brand-primary', '--brand-gold-deep', '--brand-primary-ink']
|
||||
const value = getComputedStyle(document.documentElement)
|
||||
.getPropertyValue(names[Math.abs(hash(word)) % names.length])
|
||||
.trim()
|
||||
return value || '#2f5d47'
|
||||
}
|
||||
|
||||
/** 字符串散列,让每个词的配色固定 */
|
||||
function hash(str: string) {
|
||||
let h = 0
|
||||
@@ -201,16 +209,17 @@ function go(keyword: string) {
|
||||
em {
|
||||
font-style: normal;
|
||||
margin-left: 10px;
|
||||
color: #b3a48f;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------- 词云 ---------- */
|
||||
.field {
|
||||
padding: 24px;
|
||||
background: #fff;
|
||||
border: 1px solid var(--card-border);
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--card-gold-border);
|
||||
border-radius: var(--radius-sm);
|
||||
box-shadow: var(--shadow-card);
|
||||
}
|
||||
|
||||
.stage {
|
||||
|
||||
@@ -188,7 +188,7 @@ onMounted(async () => {
|
||||
.sub-desc {
|
||||
margin: -6px 0 18px;
|
||||
font-size: 13px;
|
||||
color: #a09480;
|
||||
color: var(--text-muted);
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
@@ -214,19 +214,20 @@ onMounted(async () => {
|
||||
align-items: center;
|
||||
gap: 22px;
|
||||
padding: 14px 20px;
|
||||
background: #faf7ee;
|
||||
border: 1px solid #f0e9d8;
|
||||
border-radius: 6px;
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--card-gold-border);
|
||||
border-radius: var(--radius-sm);
|
||||
cursor: pointer;
|
||||
transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
|
||||
|
||||
&:hover {
|
||||
background: #f5efdf;
|
||||
box-shadow: 0 6px 18px rgba(90, 70, 20, 0.12);
|
||||
background: var(--paper-warm);
|
||||
border-color: var(--brand-gold);
|
||||
box-shadow: var(--shadow-lift);
|
||||
transform: translateY(-2px);
|
||||
|
||||
.goto {
|
||||
color: #8a6d3b;
|
||||
color: var(--brand-gold-deep);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -237,7 +238,7 @@ onMounted(async () => {
|
||||
width: 150px;
|
||||
height: 100px;
|
||||
border-radius: 4px;
|
||||
background: linear-gradient(135deg, #2c4d40 0%, #1f3a30 100%);
|
||||
background: linear-gradient(135deg, var(--brand-primary-deep) 0%, var(--brand-primary-ink) 100%);
|
||||
box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.15), 0 4px 10px rgba(0, 0, 0, 0.25);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -253,7 +254,7 @@ onMounted(async () => {
|
||||
.cover-frame {
|
||||
width: 56px;
|
||||
height: 84px;
|
||||
border: 1px solid rgba(184, 134, 45, 0.85);
|
||||
border: 1px solid var(--brand-gold);
|
||||
border-radius: 2px;
|
||||
box-shadow: inset 0 0 0 2px rgba(184, 134, 45, 0.25);
|
||||
display: flex;
|
||||
@@ -263,10 +264,10 @@ onMounted(async () => {
|
||||
|
||||
.cover-title {
|
||||
writing-mode: vertical-rl;
|
||||
font-family: 'Kaiti SC', 'STKaiti', 'KaiTi', '楷体', serif;
|
||||
font-family: var(--font-kai);
|
||||
font-size: 15px;
|
||||
letter-spacing: 4px;
|
||||
color: #d8b25e;
|
||||
color: var(--brand-gold-light);
|
||||
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
}
|
||||
@@ -277,9 +278,10 @@ onMounted(async () => {
|
||||
}
|
||||
|
||||
.name {
|
||||
font-family: var(--font-serif);
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
color: #8a6d3b;
|
||||
color: var(--text-main);
|
||||
margin-bottom: 10px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
@@ -291,11 +293,11 @@ onMounted(async () => {
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
padding: 10px 14px;
|
||||
border: 1px solid #e7dfc8;
|
||||
border-radius: 4px;
|
||||
border: 1px solid var(--card-gold-border);
|
||||
border-radius: var(--radius-sm);
|
||||
font-size: 14px;
|
||||
line-height: 1.7;
|
||||
color: #666;
|
||||
color: var(--text-sub);
|
||||
|
||||
.desc-text {
|
||||
min-width: 0;
|
||||
@@ -312,21 +314,22 @@ onMounted(async () => {
|
||||
align-items: center;
|
||||
gap: 3px;
|
||||
font-size: 14px;
|
||||
color: #a9832f;
|
||||
color: var(--brand-gold-deep);
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
|
||||
&:hover {
|
||||
color: #8a6d3b;
|
||||
color: var(--brand-gold-deep);
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* 删除:红色示警 */
|
||||
&.del {
|
||||
color: #c0392b;
|
||||
color: var(--el-color-danger);
|
||||
|
||||
&:hover {
|
||||
color: #96281b;
|
||||
color: var(--el-color-danger);
|
||||
opacity: 0.82;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user