Initial commit
This commit is contained in:
219
docs/.vitepress/config.mjs
Normal file
219
docs/.vitepress/config.mjs
Normal file
@@ -0,0 +1,219 @@
|
||||
import { defineConfig } from 'vitepress'
|
||||
import { withMermaid } from 'vitepress-plugin-mermaid'
|
||||
import mathjax3 from 'markdown-it-mathjax3'
|
||||
|
||||
export default withMermaid(
|
||||
defineConfig({
|
||||
title: 'HF-MES v5.0 使用手册',
|
||||
description: 'HF-MES v5.0 制造执行系统完整使用指南',
|
||||
lang: 'zh-CN',
|
||||
themeConfig: {
|
||||
logo: '/logo.svg',
|
||||
siteTitle: 'HF-MES v5.0 使用手册',
|
||||
|
||||
nav: [
|
||||
{ text: '首页', link: '/' },
|
||||
{
|
||||
text: '文档说明',
|
||||
items: [
|
||||
{ text: '文档说明', link: '/guide/document-guide' },
|
||||
{ text: '系统概述', link: '/guide/system-overview' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: '快速入门',
|
||||
items: [
|
||||
{ text: '快速入门', link: '/getting-started/quick-start' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: '基础配置',
|
||||
items: [
|
||||
{ text: '基础数据管理', link: '/basic/data-management' },
|
||||
{ text: '设备管理', link: '/basic/equipment' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: '业务模块',
|
||||
items: [
|
||||
{ text: '生产管理', link: '/business/production' },
|
||||
{ text: '质量管理', link: '/business/quality' },
|
||||
{ text: '仓储物流', link: '/business/warehouse' },
|
||||
{ text: '设备仓储', link: '/business/equipment-warehouse' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: '数据集成',
|
||||
items: [
|
||||
{ text: '数据与集成', link: '/integration/data-integration' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: '报表分析',
|
||||
items: [
|
||||
{ text: '报表与分析', link: '/analysis/reports' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: '系统运维',
|
||||
items: [
|
||||
{ text: '系统运维', link: '/operation/system-operation' },
|
||||
{ text: '技术支持', link: '/operation/technical-support' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: '附录',
|
||||
items: [
|
||||
{ text: '术语表', link: '/appendix/glossary' }
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
sidebar: {
|
||||
'/guide/': [
|
||||
{
|
||||
text: '文档管理篇',
|
||||
items: [
|
||||
{ text: '文档说明', link: '/guide/document-guide' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: '系统认知篇',
|
||||
items: [
|
||||
{ text: '系统概述', link: '/guide/system-overview' }
|
||||
]
|
||||
}
|
||||
],
|
||||
'/getting-started/': [
|
||||
{
|
||||
text: '快速入门篇',
|
||||
items: [
|
||||
{ text: '快速入门', link: '/getting-started/quick-start' }
|
||||
]
|
||||
}
|
||||
],
|
||||
'/basic/': [
|
||||
{
|
||||
text: '基础配置篇',
|
||||
items: [
|
||||
{ text: '基础数据管理', link: '/basic/data-management' },
|
||||
{ text: '设备基础信息', link: '/basic/equipment' }
|
||||
]
|
||||
}
|
||||
],
|
||||
'/business/': [
|
||||
{
|
||||
text: '生产管理篇',
|
||||
items: [
|
||||
{ text: '生产管理', link: '/business/production' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: '质量管理篇',
|
||||
items: [
|
||||
{ text: '质量与追溯', link: '/business/quality' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: '仓储物流篇',
|
||||
items: [
|
||||
{ text: '设备与仓储', link: '/business/equipment-warehouse' }
|
||||
]
|
||||
}
|
||||
],
|
||||
'/integration/': [
|
||||
{
|
||||
text: '数据集成篇',
|
||||
items: [
|
||||
{ text: '数据与集成', link: '/integration/data-integration' }
|
||||
]
|
||||
}
|
||||
],
|
||||
'/analysis/': [
|
||||
{
|
||||
text: '报表分析篇',
|
||||
items: [
|
||||
{ text: '报表与分析', link: '/analysis/reports' }
|
||||
]
|
||||
}
|
||||
],
|
||||
'/operation/': [
|
||||
{
|
||||
text: '系统运维篇',
|
||||
items: [
|
||||
{ text: '系统运维', link: '/operation/system-operation' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: '技术支持篇',
|
||||
items: [
|
||||
{ text: '异常处理与技术支持', link: '/operation/technical-support' }
|
||||
]
|
||||
}
|
||||
],
|
||||
'/appendix/': [
|
||||
{
|
||||
text: '附录篇',
|
||||
items: [
|
||||
{ text: '术语表', link: '/appendix/glossary' }
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
socialLinks: [
|
||||
{ icon: 'github', link: 'https://github.com/vuejs/vitepress' }
|
||||
],
|
||||
|
||||
footer: {
|
||||
message: 'HF-MES v5.0 使用手册',
|
||||
copyright: 'Copyright © 2026 All Rights Reserved'
|
||||
},
|
||||
|
||||
search: {
|
||||
provider: 'local'
|
||||
},
|
||||
|
||||
editLink: {
|
||||
pattern: 'https://github.com/vuejs/vitepress/edit/main/docs/:path',
|
||||
text: '在 GitHub 上编辑此页'
|
||||
},
|
||||
|
||||
lastUpdated: {
|
||||
text: '最后更新于',
|
||||
formatOptions: {
|
||||
dateStyle: 'short',
|
||||
timeStyle: 'short'
|
||||
}
|
||||
},
|
||||
|
||||
outline: {
|
||||
level: [2, 3],
|
||||
label: '目录'
|
||||
},
|
||||
|
||||
docFooter: {
|
||||
prev: '← 上一页',
|
||||
next: '下一页 →'
|
||||
}
|
||||
},
|
||||
|
||||
markdown: {
|
||||
theme: {
|
||||
light: 'github-light',
|
||||
dark: 'github-dark'
|
||||
},
|
||||
lineNumbers: false,
|
||||
config(md) {
|
||||
md.use(mathjax3)
|
||||
}
|
||||
},
|
||||
|
||||
head: [
|
||||
['link', { rel: 'icon', href: '/favicon.ico' }],
|
||||
['meta', { name: 'author', content: 'HF-MES' }],
|
||||
['meta', { name: 'viewport', content: 'width=device-width, initial-scale=1.0' }]
|
||||
]
|
||||
})
|
||||
|
||||
)
|
||||
11
docs/.vitepress/public/logo.svg
Normal file
11
docs/.vitepress/public/logo.svg
Normal file
@@ -0,0 +1,11 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="100" height="100">
|
||||
<defs>
|
||||
<linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%">
|
||||
<stop offset="0%" style="stop-color:#3b82f6;stop-opacity:1" />
|
||||
<stop offset="100%" style="stop-color:#1e40af;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<circle cx="50" cy="50" r="45" fill="url(#grad1)"/>
|
||||
<text x="50" y="58" font-family="Arial, sans-serif" font-size="36" font-weight="bold" fill="white" text-anchor="middle">MES</text>
|
||||
<text x="50" y="75" font-family="Arial, sans-serif" font-size="12" fill="white" text-anchor="middle">v5.0</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 646 B |
13
docs/.vitepress/theme/index.ts
Normal file
13
docs/.vitepress/theme/index.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import DefaultTheme from 'vitepress/theme'
|
||||
import mediumZoom from 'medium-zoom'
|
||||
import { onMounted } from 'vue'
|
||||
import './style/print.css'
|
||||
|
||||
export default {
|
||||
...DefaultTheme,
|
||||
setup() {
|
||||
onMounted(() => {
|
||||
mediumZoom('.main img')
|
||||
})
|
||||
}
|
||||
}
|
||||
101
docs/.vitepress/theme/style/print.css
Normal file
101
docs/.vitepress/theme/style/print.css
Normal file
@@ -0,0 +1,101 @@
|
||||
@media print {
|
||||
.VPNav,
|
||||
.VPNavBar,
|
||||
.VPLocalNav,
|
||||
.VPDocFooter,
|
||||
.VPDocAside,
|
||||
.VPLink,
|
||||
.cur,
|
||||
.next-link,
|
||||
.prev-link,
|
||||
.edit-link-button,
|
||||
.pager,
|
||||
.vp-doc-footer,
|
||||
.table-of-contents {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
body {
|
||||
font-size: 12pt;
|
||||
line-height: 1.6;
|
||||
color: #333;
|
||||
font-family: "Microsoft YaHei", "微软雅黑", "Microsoft YaHei UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Source Han Sans CN", "WenQuanYi Micro Hei", "Heiti SC", sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 24pt;
|
||||
page-break-after: avoid;
|
||||
margin-bottom: 20pt;
|
||||
font-family: "Microsoft YaHei", "微软雅黑", "Microsoft YaHei UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Source Han Sans CN", "WenQuanYi Micro Hei", "Heiti SC", sans-serif;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 18pt;
|
||||
page-break-after: avoid;
|
||||
margin-top: 20pt;
|
||||
margin-bottom: 10pt;
|
||||
font-family: "Microsoft YaHei", "微软雅黑", "Microsoft YaHei UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Source Han Sans CN", "WenQuanYi Micro Hei", "Heiti SC", sans-serif;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 14pt;
|
||||
page-break-after: avoid;
|
||||
margin-top: 15pt;
|
||||
margin-bottom: 8pt;
|
||||
font-family: "Microsoft YaHei", "微软雅黑", "Microsoft YaHei UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Source Han Sans CN", "WenQuanYi Micro Hei", "Heiti SC", sans-serif;
|
||||
}
|
||||
|
||||
p, li, td, th {
|
||||
font-family: "Microsoft YaHei", "微软雅黑", "Microsoft YaHei UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Source Han Sans CN", "WenQuanYi Micro Hei", "Heiti SC", sans-serif;
|
||||
}
|
||||
|
||||
table {
|
||||
font-size: 10pt;
|
||||
page-break-inside: avoid;
|
||||
font-family: "Microsoft YaHei", "微软雅黑", "Microsoft YaHei UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Source Han Sans CN", "WenQuanYi Micro Hei", "Heiti SC", sans-serif;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
pre {
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
.vp-doc div[class*="language-"] {
|
||||
background: #f6f8fa;
|
||||
border: 1px solid #e1e4e8;
|
||||
border-radius: 6px;
|
||||
padding: 16px;
|
||||
overflow-x: auto;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
.vp-doc div[class*="language-"] code {
|
||||
font-family: Consolas, Monaco, 'Andale Mono', monospace;
|
||||
font-size: 9pt;
|
||||
line-height: 1.45;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #0366d6;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.vp-doc h1,
|
||||
.vp-doc h2,
|
||||
.vp-doc h3 {
|
||||
border-bottom: 1px solid #eaecef;
|
||||
padding-bottom: 0.3em;
|
||||
}
|
||||
|
||||
* {
|
||||
-webkit-print-color-adjust: exact !important;
|
||||
print-color-adjust: exact !important;
|
||||
color-adjust: exact !important;
|
||||
}
|
||||
}
|
||||
94
docs/.vitepress/vitepress-pdf.config.ts
Normal file
94
docs/.vitepress/vitepress-pdf.config.ts
Normal file
@@ -0,0 +1,94 @@
|
||||
import { defineUserConfig } from 'vitepress-export-pdf'
|
||||
import userConfig from './config.mjs'
|
||||
|
||||
function extractLinksFromConfig(config: DefaultTheme.Config) {
|
||||
const links: string[] = []
|
||||
|
||||
function extractLinks(sidebar: DefaultTheme.SidebarItem[]) {
|
||||
for (const item of sidebar) {
|
||||
if (item.items)
|
||||
extractLinks(item.items)
|
||||
|
||||
else if (item.link)
|
||||
links.push(`${item.link}.html`)
|
||||
}
|
||||
}
|
||||
|
||||
for (const key in config.sidebar)
|
||||
extractLinks(config.sidebar[key])
|
||||
|
||||
return links
|
||||
}
|
||||
|
||||
const links = extractLinksFromConfig(userConfig.themeConfig!)
|
||||
|
||||
|
||||
export default defineUserConfig({
|
||||
sorter: (pageA, pageB) => {
|
||||
const routeOrder = [
|
||||
'/index.html',
|
||||
...links,
|
||||
]
|
||||
|
||||
const aIndex = routeOrder.findIndex(route => route === pageA.path)
|
||||
const bIndex = routeOrder.findIndex(route => route === pageB.path)
|
||||
|
||||
if (aIndex === -1 && bIndex === -1) {
|
||||
return pageA.path.localeCompare(pageB.path)
|
||||
}
|
||||
if (aIndex === -1) return 1
|
||||
if (bIndex === -1) return -1
|
||||
|
||||
return aIndex - bIndex
|
||||
},
|
||||
outFile: 'HF-MES-v5.0-使用手册.pdf',
|
||||
outDir: 'docs',
|
||||
routePatterns: ['/**'],
|
||||
pdfOptions: {
|
||||
format: 'A4',
|
||||
margin: {
|
||||
top: '20mm',
|
||||
right: '15mm',
|
||||
bottom: '20mm',
|
||||
left: '15mm'
|
||||
},
|
||||
printBackground: true,
|
||||
preferCSSPageSize: true,
|
||||
displayHeaderFooter: true,
|
||||
headerTemplate: `
|
||||
<div style="font-size: 10px; width: 100%; text-align: center; color: #666; font-family: 'Microsoft YaHei', '微软雅黑', 'Microsoft YaHei UI', 'PingFang SC', sans-serif;">
|
||||
<span class="title"></span>
|
||||
</div>
|
||||
`,
|
||||
footerTemplate: `
|
||||
<div style="font-size: 10px; width: 100%; display: flex; justify-content: space-between; padding: 0 15mm; font-family: 'Microsoft YaHei', '微软雅黑', 'Microsoft YaHei UI', 'PingFang SC', sans-serif;">
|
||||
<span>HF-MES v5.0 使用手册</span>
|
||||
<span><span class="pageNumber"></span> / <span class="totalPages"></span></span>
|
||||
</div>
|
||||
`
|
||||
},
|
||||
pdfOutlines: true,
|
||||
puppeteerLaunchOptions: {
|
||||
headless: true,
|
||||
timeout: 60000,
|
||||
args: [
|
||||
'--no-sandbox',
|
||||
'--disable-setuid-sandbox',
|
||||
'--disable-dev-shm-usage',
|
||||
'--disable-gpu',
|
||||
'--disable-software-rasterizer',
|
||||
'--no-first-run',
|
||||
'--no-zygote',
|
||||
'--single-process',
|
||||
'--font-render-hinting=none',
|
||||
'--disable-font-subpixel-positioning',
|
||||
'--force-color-profile=srgb',
|
||||
],
|
||||
env: {
|
||||
FC_LANG: 'zh-CN',
|
||||
LANG: 'zh_CN.UTF-8',
|
||||
LC_ALL: 'zh_CN.UTF-8',
|
||||
},
|
||||
dumpio: false,
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user