diff --git a/openhis-ui-vue3/public/help-center/404.html b/openhis-ui-vue3/public/help-center/404.html index 5be8a93c..df3f559c 100644 --- a/openhis-ui-vue3/public/help-center/404.html +++ b/openhis-ui-vue3/public/help-center/404.html @@ -10,11 +10,11 @@ - +
404
看来我们的链接坏掉了~
返回首页
- + diff --git a/openhis-ui-vue3/public/help-center/blog/index.html b/openhis-ui-vue3/public/help-center/blog/index.html index e118cbe1..7061c244 100644 --- a/openhis-ui-vue3/public/help-center/blog/index.html +++ b/openhis-ui-vue3/public/help-center/blog/index.html @@ -10,11 +10,11 @@ - + -
- + diff --git a/openhis-ui-vue3/public/help-center/pages/3f474f/index.html b/openhis-ui-vue3/public/help-center/pages/3f474f/index.html index f7a9cb96..69b412c9 100644 --- a/openhis-ui-vue3/public/help-center/pages/3f474f/index.html +++ b/openhis-ui-vue3/public/help-center/pages/3f474f/index.html @@ -10,11 +10,11 @@ - + -
- + diff --git a/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/LICENSE b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/LICENSE new file mode 100644 index 00000000..16d67321 --- /dev/null +++ b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019-present gaoyi(Evan) Xu + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/README.MD b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/README.MD new file mode 100644 index 00000000..50608516 --- /dev/null +++ b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/README.MD @@ -0,0 +1,277 @@ +

logo

+ + +

经创帮助中心编辑参考文档

+ +
+

+ 🚨 【帮助中心文档编辑核心规则】 +

+
+

+ 📁 文件夹路径规则:在 help-center 文件夹下的 vuepress-theme-vdoing-doc/docs/ 文件夹下新建文件夹; +

+

+ ✏️ 页面改造规则第一个测试页面不可删除,这是帮助中心的入口页面,请勿删除(可以改造)! +

+

+ 💡 编写建议:因为编写完成后页面不会实时刷新,需要重新启动服务才能看到效果。建议将编写好的MD格式文件复制到目录下后重新打包构建后刷新页面查看效果。 +

+

+ 📋 命名规则
+   ▪ 文件夹命名规则: 页面名称(无后缀)
+   ▪ 文件命名规则: 功能名称.md; +

+

+ 📦 打包部署规则:确认无误后进入 vuepress-theme-vdoing-doc 路径执行 npm run build:win(仅Windows系统需要加win) 打包命令 +

+

+ ⚠️ 警告:如果帮助中心不放在当前路径下,请将配置文件中的打包路径改成自定义路径,否则会丢失JS和CSS样式。
+   配置文件路径:docs/.vuepress/config.js +

+
+
+ +📚 MarkDown基本语法大全 + +以下整理了MarkDown常用基础语法,涵盖标题、文本样式、列表等核心功能,附写法示例与显示效果,适合新手快速上手。 + +一、标题语法 + +说明:通过「#」符号表示标题,# 数量对应标题层级(1-6级),# 与标题文本间需留一个空格,层级越高字体越小。 + +📝 写法示例: + +\# 一级标题 + +\#\# 二级标题 + +\#\#\# 三级标题 + +\#\#\#\# 四级标题 + +\#\#\#\#\# 五级标题 + +\#\#\#\#\#\# 六级标题 + + +✨ 显示效果: + +# 一级标题 +## 二级标题 +### 三级标题 +#### 四级标题 +##### 五级标题 +###### 六级标题 + +二、文本样式 + +📝 写法示例: + +\*\*加粗文本\*\* + +\*斜体文本\* + +\*\*\*加粗斜体文本\*\*\* + +\~\~删除线文本\~\~ + +下划线文本 + +\=\=高亮文本\=\=(部分编辑器支持,如Typora) + +\> 引用文本(块引用) + +\>\> 嵌套引用文本(二级引用) + +\`行内代码片段\` + + +✨ 显示效果: + +**加粗文本** +*斜体文本* +***加粗斜体文本*** +~~删除线文本~~ +下划线文本 +==高亮文本== +> 引用文本(块引用) +>> 嵌套引用文本(二级引用) +行内代码示例:`print("Hello MarkDown")` + +三、列表 + +1. 无序列表(符号可选:-、*、+,符号后需留空格) + +📝 写法示例: + +\-\- 无序列表项 1 + +\- 无序列表项 2 + \- 子列表项 2.1(前面缩进4个空格) + \- 子列表项 2.2 + +\* 无序列表项 A +\* 无序列表项 B + +\+ 无序列表项 X +\+ 无序列表项 Y + +✨ 显示效果: + +- 无序列表项 1 +- 无序列表项 2 + - 子列表项 2.1(前面缩进4个空格或1个Tab) + - 子列表项 2.2 + +* 无序列表项 A +* 无序列表项 B + ++ 无序列表项 X ++ 无序列表项 Y + +- + +2. 有序列表(数字+英文句点+空格,自动排序) + +📝 写法示例: + +1. 有序列表项 1 +2. 有序列表项 2 + 1. 子列表项 2.1(前面缩进4个空格) + 2. 子列表项 2.2 +3. 有序列表项 3 +1. + +3. 任务列表(结合无序列表与复选框,部分编辑器支持) +4. 有序列表不会认定前面数字改变,从1开始排序,数字会自动序号并不会根据你输入的数字排序 + +✨ 显示效果: + +1. 有序列表项 1 +2. 有序列表项 2 + 1. 子列表项 2.1(缩进后自动续号) + 2. 子列表项 2.2 +3. 有序列表项 3 + +4. + +5. 任务列表(结合无序列表与复选框,部分编辑器支持) + +有序列表和无序列表的区别是quote(引用)标签不能嵌套,但无序列表可以嵌套。 + +📝 写法示例: + +\-[x] 已完成任务 1 +\-[x] 已完成任务 2 +\-[ ] 未完成任务 3 +\-[ ] 未完成任务 4 + +✨ 显示效果: + +- [x] 已完成任务 1 +- [x] 已完成任务 2 +- [ ] 未完成任务 3 +- [ ] 未完成任务 4 + +四、链接与图片 + +1. 链接(两种写法:行内链接、参考链接) + +📝 写法示例: + +# 行内链接(直接显示链接文本与地址) +\[百度一下\](https://www.baidu.com "百度首页 - 悬停提示文本") + +# 参考链接(适合多次引用同一链接) +\[MarkDown官方文档\]\[1\] +\[GitHub\]\[2\] + +\[1\]: https://daringfireball.net/projects/markdown/ "MarkDown官方指南" +\[2\]: https://github.com/ "GitHub官网" + +✨ 显示效果: + +行内链接:[百度一下](https://www.baidu.com "百度首页 - 悬停提示文本") +参考链接:[MarkDown官方文档][1]、[GitHub][2] + +[1]: https://daringfireball.net/projects/markdown/ "MarkDown官方指南" +[2]: https://github.com/ "GitHub官网" + +2. 图片(语法与链接类似,前缀加!) + +📝 写法示例: + +# 行内图片 +\![风景图]\(https://picx.zhimg.com/v2-d6f44389971daab7e688e5b37046e4e4_720w.jpg?source=172ae18b) + +# 参考图片 +\![Logo]\[img1] + +\[img1]: https://www.logosc.cn/uploads/articles/2022/10/20/16662553442591813.png "品牌Logo" + +✨ 显示效果: + +行内图片:![风景图](https://picx.zhimg.com/v2-d6f44389971daab7e688e5b37046e4e4_720w.jpg?source=172ae18b) + +参考图片:![Logo][img1] + +[img1]: https://www.logosc.cn/uploads/articles/2022/10/20/16662553442591813.png "品牌Logo" + +五、分割线 + +说明:三种写法均可,需单独成行,前后建议空一行,避免与其他内容混淆。 + +📝 写法示例: + +\--- + +\*** + +\___ + +✨ 显示效果: + +--- +*** +___ + +六、表格(支持对齐设置) + +📝 写法示例: + +# 基础表格(| 分隔列,- 分隔表头与内容) +\| 姓名 | 年龄 | 职业 | + +\| ---- | ---- | ---- | + +\| 张三 | 25 | 程序员 | + +\| 李四 | 30 | 设计师 | + +# 带对齐的表格(: 表示对齐方向) +\| 左对齐 | 居中对齐 | 右对齐 | + +\| :----- | :------: | -----: | + +\| 内容1 | 内容2 | 内容3 | + +\| 文本A | 文本B | 文本C | + +✨ 显示效果: + +| 姓名 | 年龄 | 职业 | +| ---- | ---- | ---- | +| 张三 | 25 | 程序员 | +| 李四 | 30 | 设计师 | + +| 左对齐 | 居中对齐 | 右对齐 | +| :----- | :------: | -----: | +| 内容1 | 内容2 | 内容3 | +| 文本A | 文本B | 文本C | + + + + +* 更多md语法请参考以下链接 +* [Markdown 语法参考](https://markdown.com.cn/basic-syntax/) \ No newline at end of file diff --git a/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/.vuepress/config.js b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/.vuepress/config.js new file mode 100644 index 00000000..8fca32f6 --- /dev/null +++ b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/.vuepress/config.js @@ -0,0 +1,218 @@ +const baiduCode = require('./config/baiduCode.js'); // 百度统计hm码 +const htmlModules = require('./config/htmlModules.js'); + + +module.exports = { + theme: 'vdoing', // 使用依赖包主题 + // theme: require.resolve('../../vdoing'), // 使用本地主题 (先将vdoing主题文件下载到本地:https://github.com/xugaoyi/vuepress-theme-vdoing) + + title: "vuepress-theme-vdoing", + description: '一个基于VuePress的 知识管理&博客 主题', + // base: '/', // 默认'/'。如果你想将你的网站部署到如 https://foo.github.io/bar/,那么 base 应该被设置成 "/bar/",(否则页面将失去样式等文件) + base: '/help-center/vuepress-theme-vdoing-doc/docs/.vuepress/dist/', + theme: 'vdoing', + title: "经创HIS系统操作手册", + head: [ // 注入到页面 中的标签,格式[tagName, { attrName: attrValue }, innerHTML?] + ['link', { rel: 'icon', href: '/img/favicon.ico' }], //favicons,资源放在public文件夹 + ['meta', { name: 'keywords', content: 'vuepress,theme,blog,vdoing' }], + ['meta', { name: 'theme-color', content: '#11a8cd' }], // 移动浏览器主题颜色 + + // ['meta', { name: 'wwads-cn-verify', content: '6c4b761a28b734fe93831e3fb400ce87' }], // 广告相关,你可以去掉 + // ['script', { src: 'https://cdn.wwads.cn/js/makemoney.js', type: 'text/javascript' }], // 广告相关,你可以去掉 + ], + + // 排除特定目录不被打包 + patterns: [ + '**/*.md', + ], + // 注意:patterns 配置只影响 Markdown 文件,不影响 public 目录中的静态资源 + + // 主题配置 + themeConfig: { + nav: [ + // { text: '首页', link: '/' }, + // { + // text: '指南', link: '/pages/a2f161/', items: [ + // { text: '主题初衷与诞生', link: '/pages/52d5c3/' }, + // { text: '介绍', link: '/pages/a2f161/' }, + // { text: '快速上手', link: '/pages/793dcb/' }, + // { text: '目录结构', link: '/pages/2f674a/' }, + // { text: '核心配置和约定', link: '/pages/33d574/' }, + // { text: '自动生成front matter', link: '/pages/088c16/' }, + // { text: 'Markdown 容器', link: '/pages/d0d7eb/' }, + // { text: 'Markdown 中使用组件', link: '/pages/197691/' }, + // { + // text: '相关文章', items: [ + // { text: '使目录栏支持h2~h6标题', link: '/pages/8dfab5/' }, + // { text: '如何让你的笔记更有表现力', link: '/pages/dd027d/' }, + // { text: '批量操作front matter工具', link: '/pages/2b8e22/' }, + // { text: '部署', link: '/pages/0fc1d2/' }, + // { text: '关于写文章和H1标题', link: '/pages/9ae0bd/' }, + // { text: '关于博客搭建与管理', link: '/pages/26997d/' }, + // { text: '在线编辑和新增文章的方法', link: '/pages/c5a54d/' }, + // ] + // } + // ] + // }, + // { + // text: '配置', link: '/pages/a20ce8/', items: [ + // { text: '主题配置', link: '/pages/a20ce8/' }, + // { text: '首页配置', link: '/pages/f14bdb/' }, + // { text: 'front matter配置', link: '/pages/3216b0/' }, + // { text: '目录页配置', link: '/pages/54651a/' }, + // { text: '添加摘要', link: '/pages/1cc523/' }, + // { text: '修改主题颜色和样式', link: '/pages/f51918/' }, + // { text: '评论栏', link: '/pages/ce175c/' }, + // ] + // }, + // { text: '资源', link: '/pages/db78e2/' }, + // { text: '案例', link: '/pages/5d571c/' }, + // { text: '问答', link: '/pages/9cc27d/' }, + // { text: '赞助', link: '/pages/1b12ed/' }, + { text: 'HIS', link: '/pages/520e67/' }, + ], + sidebarDepth: 2, // 侧边栏显示深度,默认1,最大2(显示到h3标题) + logo: '/img/logo.png', // 导航栏logo + // repo: 'xugaoyi/vuepress-theme-vdoing', // 导航栏右侧生成Github链接 + searchMaxSuggestions: 10, // 搜索结果显示最大数 + // lastUpdated: '上次更新', // 更新的时间,及前缀文字 string | boolean (取值为git提交时间) + + // docsDir: 'docs', // 编辑的文件夹 + // editLinks: true, // 编辑链接 + // editLinkText: '编辑', + + // 以下配置是Vdoing主题改动的和新增的配置 + sidebar: { mode: 'structuring', collapsable: false }, // 侧边栏 'structuring' | { mode: 'structuring', collapsable: Boolean} | 'auto' | 自定义 温馨提示:目录页数据依赖于结构化的侧边栏数据,如果你不设置为'structuring',将无法使用目录页 + + // sidebarOpen: false, // 初始状态是否打开侧边栏,默认true + updateBar: { // 最近更新栏 + showToArticle: false, // 显示到文章页底部,默认true + // moreArticle: '/archives' // “更多文章”跳转的页面,默认'/archives' + }, + // titleBadge: false, // 文章标题前的图标是否显示,默认true + // titleBadgeIcons: [ // 文章标题前图标的地址,默认主题内置图标 + // '图标地址1', + // '图标地址2' + // ], + + pageStyle: 'line', // 页面风格,可选值:'card'卡片 | 'line' 线(未设置bodyBgImg时才生效), 默认'card'。 说明:card时背景显示灰色衬托出卡片样式,line时背景显示纯色,并且部分模块带线条边框 + + // contentBgStyle: 1, + + category: false, // 是否打开分类功能,默认true。 如打开,会做的事情有:1. 自动生成的frontmatter包含分类字段 2.页面中显示与分类相关的信息和模块 3.自动生成分类页面(在@pages文件夹)。如关闭,则反之。 + tag: false, // 是否打开标签功能,默认true。 如打开,会做的事情有:1. 自动生成的frontmatter包含标签字段 2.页面中显示与标签相关的信息和模块 3.自动生成标签页面(在@pages文件夹)。如关闭,则反之。 + // archive: false, // 是否打开归档功能,默认true。 如打开,会做的事情有:1.自动生成归档页面(在@pages文件夹)。如关闭,则反之。 + + author: { // 文章默认的作者信息,可在md文件中单独配置此信息 String | {name: String, href: String} + name: 'JinYang Chen', // 必需 + // href: 'https://github.com/xugaoyi' // 可选的 + }, + social: { // 社交图标,显示于博主信息栏和页脚栏 + // iconfontCssFile: '//at.alicdn.com/t/font_1678482_u4nrnp8xp6g.css', // 可选,阿里图标库在线css文件地址,对于主题没有的图标可自由添加 + // icons: [ + // { + // iconClass: 'icon-youjian', + // title: '发邮件', + // link: 'mailto:894072666@qq.com' + // }, + // { + // iconClass: 'icon-github', + // title: 'GitHub', + // link: 'https://github.com/xugaoyi' + // }, + // { + // iconClass: 'icon-erji', + // title: '听音乐', + // link: 'https://music.163.com/#/playlist?id=755597173' + // } + // ] + // }, + footer: { // 页脚信息 + createYear: 2019, // 博客创建年份 + copyrightInfo: 'Evan Xu | MIT License', // 博客版权信息,支持a标签 + }, + htmlModules, + }, + + // 插件 + plugins: [ + // [require('./plugins/love-me'), { // 鼠标点击爱心特效 + // color: '#11a8cd', // 爱心颜色,默认随机色 + // excludeClassName: 'theme-vdoing-content' // 要排除元素的class, 默认空'' + // }], + + ['fulltext-search'], // 全文搜索 + + // ['thirdparty-search', { // 可以添加第三方搜索链接的搜索框(原官方搜索框的参数仍可用) + // thirdparty: [ // 可选,默认 [] + // { + // title: '在GitHub中搜索', + // frontUrl: 'https://github.com/search?q=', // 搜索链接的前面部分 + // behindUrl: '' // 搜索链接的后面部分,可选,默认 '' + // }, + // { + // title: '在npm中搜索', + // frontUrl: 'https://www.npmjs.com/search?q=', + // }, + // { + // title: '在Bing中搜索', + // frontUrl: 'https://cn.bing.com/search?q=' + // } + // ] + // }], + + [ + 'vuepress-plugin-baidu-tongji', // 百度统计 + { + hm: baiduCode || '01293bffa6c3962016c08ba685c79d78' + } + ], + + ['one-click-copy', { // 代码块复制按钮 + copySelector: ['div[class*="language-"] pre', 'div[class*="aside-code"] aside'], // String or Array + copyMessage: '复制成功', // default is 'Copy successfully and then paste it for use.' + duration: 1000, // prompt message display time. + showInMobile: false // whether to display on the mobile side, default: false. + }], + ['demo-block', { // demo演示模块 https://github.com/xiguaxigua/vuepress-plugin-demo-block + settings: { + // jsLib: ['http://xxx'], // 在线示例(jsfiddle, codepen)中的js依赖 + // cssLib: ['http://xxx'], // 在线示例中的css依赖 + // vue: 'https://jsd.cdn.zzko.cn/npm/vue/dist/vue.min.js', // 在线示例中的vue依赖 + jsfiddle: false, // 是否显示 jsfiddle 链接 + codepen: true, // 是否显示 codepen 链接 + horizontal: false // 是否展示为横向样式 + } + }], + [ + 'vuepress-plugin-zooming', // 放大图片 + { + selector: '.theme-vdoing-content img:not(.no-zoom)', + options: { + bgColor: 'rgba(0,0,0,0.6)' + }, + }, + ], + [ + '@vuepress/last-updated', // "上次更新"时间格式 + { + transformer: (timestamp, lang) => { + const dayjs = require('dayjs') // https://day.js.org/ + return dayjs(timestamp).format('YYYY/MM/DD, HH:mm:ss') + }, + } + ] + ], + + markdown: { + // lineNumbers: true, + extractHeaders: ['h2', 'h3', 'h4', 'h5', 'h6'], // 提取标题到侧边栏的级别,默认['h2', 'h3'] + }, + + // 监听文件变化并重新构建 + extraWatchFiles: [ + '.vuepress/config.js', + '.vuepress/config/htmlModules.js', + ] +} +} diff --git a/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/.vuepress/config/baiduCode.js b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/.vuepress/config/baiduCode.js new file mode 100644 index 00000000..9dc5fc1e --- /dev/null +++ b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/.vuepress/config/baiduCode.js @@ -0,0 +1 @@ +module.exports = ''; diff --git a/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/.vuepress/config/htmlModules.js b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/.vuepress/config/htmlModules.js new file mode 100644 index 00000000..08017744 --- /dev/null +++ b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/.vuepress/config/htmlModules.js @@ -0,0 +1,79 @@ +/** 插入自定义html模块 (可用于插入广告模块等) + * { + * homeSidebarB: htmlString, 首页侧边栏底部 + * + * sidebarT: htmlString, 全局左侧边栏顶部 + * sidebarB: htmlString, 全局左侧边栏底部 + * + * pageT: htmlString, 全局页面顶部 + * pageB: htmlString, 全局页面底部 + * pageTshowMode: string, 页面顶部-显示方式:未配置默认全局;'article' => 仅文章页①; 'custom' => 仅自定义页① + * pageBshowMode: string, 页面底部-显示方式:未配置默认全局;'article' => 仅文章页①; 'custom' => 仅自定义页① + * + * windowLB: htmlString, 全局左下角② + * windowRB: htmlString, 全局右下角② + * } + * + * ①注:在.md文件front matter配置`article: false`的页面是自定义页,未配置的默认是文章页(首页除外)。 + * ②注:windowLB 和 windowRB:1.展示区块最大宽高200px*400px。2.请给自定义元素定一个不超过200px*400px的宽高。3.在屏幕宽度小于960px时无论如何都不会显示。 + */ + + +module.exports = { + // 万维广告 + pageT: ` +
+ + `, + // 赞助商广告 + sidebarT: ` + + npm +

(进入注册为作者充电)

+
`, + + + // windowRB: ` + //
+ // + // ` +} + + +// module.exports = { +// homeSidebarB: `
自定义模块测试
`, +// sidebarT: `
自定义模块测试
`, +// sidebarB: `
自定义模块测试
`, +// pageT: `
自定义模块测试
`, +// pageB: `
自定义模块测试
`, +// windowLB: `
自定义模块测试
`, +// windowRB: `
自定义模块测试
`, +// } diff --git a/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/.vuepress/enhanceApp.js b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/.vuepress/enhanceApp.js new file mode 100644 index 00000000..eb620625 --- /dev/null +++ b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/.vuepress/enhanceApp.js @@ -0,0 +1,59 @@ +/** + * to主题使用者:你可以去掉本文件的所有代码 + */ +export default ({ + Vue, // VuePress 正在使用的 Vue 构造函数 + options, // 附加到根实例的一些选项 + router, // 当前应用的路由实例 + siteData, // 站点元数据 + isServer // 当前应用配置是处于 服务端渲染 还是 客户端 +}) => { + + // 用于监控在路由变化时检查广告拦截器 (to主题使用者:你可以去掉本文件的所有代码) + if (!isServer) { + router.afterEach(() => { + //check if wwads' fire function was blocked after document is ready with 3s timeout (waiting the ad loading) + docReady(function () { + setTimeout(function () { + if (window._AdBlockInit === undefined) { + ABDetected(); + } + }, 3000); + }); + + // 删除事件改为隐藏事件 + setTimeout(() => { + const pageAD = document.querySelector('.page-wwads'); + if (!pageAD) return; + const btnEl = pageAD.querySelector('.wwads-hide'); + if (btnEl) { + btnEl.onclick = () => { + pageAD.style.display = 'none'; + } + } + // 显示广告模块 + if (pageAD.style.display === 'none') { + pageAD.style.display = 'flex'; + } + }, 900); + }) + } +} + + +function ABDetected() { + const h = ""; + const wwadsEl = document.getElementsByClassName("wwads-cn"); + const wwadsContentEl = document.querySelector('.wwads-content'); + if (wwadsEl[0] && !wwadsContentEl) { + wwadsEl[0].innerHTML = h; + } +}; + +//check document ready +function docReady(t) { + "complete" === document.readyState || + "interactive" === document.readyState + ? setTimeout(t, 1) + : document.addEventListener("DOMContentLoaded", t); +} diff --git a/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/.vuepress/plugins/love-me/index.js b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/.vuepress/plugins/love-me/index.js new file mode 100644 index 00000000..674294c2 --- /dev/null +++ b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/.vuepress/plugins/love-me/index.js @@ -0,0 +1,12 @@ +const path= require('path'); +const LoveMyPlugin = (options={}) => ({ + define () { + const COLOR = options.color || "rgb(" + ~~ (255 * Math.random()) + "," + ~~ (255 * Math.random()) + "," + ~~ (255 * Math.random()) + ")" + const EXCLUDECLASS = options.excludeClassName || '' + return {COLOR, EXCLUDECLASS} + }, + enhanceAppFiles: [ + path.resolve(__dirname, 'love-me.js') + ] +}); +module.exports = LoveMyPlugin; diff --git a/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/.vuepress/plugins/love-me/love-me.js b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/.vuepress/plugins/love-me/love-me.js new file mode 100644 index 00000000..f93855e6 --- /dev/null +++ b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/.vuepress/plugins/love-me/love-me.js @@ -0,0 +1,62 @@ +export default () => { + if (typeof window !== "undefined") { + (function(e, t, a) { + function r() { + for (var e = 0; e < s.length; e++) s[e].alpha <= 0 ? (t.body.removeChild(s[e].el), s.splice(e, 1)) : (s[e].y--, s[e].scale += .004, s[e].alpha -= .013, s[e].el.style.cssText = "left:" + s[e].x + "px;top:" + s[e].y + "px;opacity:" + s[e].alpha + ";transform:scale(" + s[e].scale + "," + s[e].scale + ") rotate(45deg);background:" + s[e].color + ";z-index:99999"); + requestAnimationFrame(r) + } + function n() { + var t = "function" == typeof e.onclick && e.onclick; + + e.onclick = function(e) { + // 过滤指定元素 + let mark = true; + EXCLUDECLASS && e.path && e.path.forEach((item) =>{ + if(item.nodeType === 1) { + typeof item.className === 'string' && item.className.indexOf(EXCLUDECLASS) > -1 ? mark = false : '' + } + }) + + if(mark) { + t && t(), + o(e) + } + } + } + function o(e) { + var a = t.createElement("div"); + a.className = "heart", + s.push({ + el: a, + x: e.clientX - 5, + y: e.clientY - 5, + scale: 1, + alpha: 1, + color: COLOR + }), + t.body.appendChild(a) + } + function i(e) { + var a = t.createElement("style"); + a.type = "text/css"; + try { + a.appendChild(t.createTextNode(e)) + } catch(t) { + a.styleSheet.cssText = e + } + t.getElementsByTagName("head")[0].appendChild(a) + } + // function c() { + // return "rgb(" + ~~ (255 * Math.random()) + "," + ~~ (255 * Math.random()) + "," + ~~ (255 * Math.random()) + ")" + // } + var s = []; + e.requestAnimationFrame = e.requestAnimationFrame || e.webkitRequestAnimationFrame || e.mozRequestAnimationFrame || e.oRequestAnimationFrame || e.msRequestAnimationFrame || + function(e) { + setTimeout(e, 1e3 / 60) + }, + i(".heart{width: 10px;height: 10px;position: fixed;background: #f00;transform: rotate(45deg);-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);}.heart:after,.heart:before{content: '';width: inherit;height: inherit;background: inherit;border-radius: 50%;-webkit-border-radius: 50%;-moz-border-radius: 50%;position: fixed;}.heart:after{top: -5px;}.heart:before{left: -5px;}"), + n(), + r() + })(window, document) + } +} \ No newline at end of file diff --git a/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/.vuepress/public/img/favicon.ico b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/.vuepress/public/img/favicon.ico new file mode 100644 index 00000000..2819f6c4 Binary files /dev/null and b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/.vuepress/public/img/favicon.ico differ diff --git a/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/.vuepress/public/img/logo.png b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/.vuepress/public/img/logo.png new file mode 100644 index 00000000..2f697e56 Binary files /dev/null and b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/.vuepress/public/img/logo.png differ diff --git a/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/.vuepress/public/markmap/01.html b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/.vuepress/public/markmap/01.html new file mode 100644 index 00000000..28665f64 --- /dev/null +++ b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/.vuepress/public/markmap/01.html @@ -0,0 +1,126 @@ + + + + + + + + Markmap + + + + + + + + + + + + diff --git a/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/.vuepress/styles/index.styl b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/.vuepress/styles/index.styl new file mode 100644 index 00000000..9c157a30 --- /dev/null +++ b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/.vuepress/styles/index.styl @@ -0,0 +1,93 @@ +// .home-wrapper .banner .banner-conent .hero h1{ +// font-size 2.8rem!important +// } +// // 文档中适配 +// table +// width auto +// .page >*:not(.footer),.card-box +// box-shadow: none!important + +// .page +// @media (min-width $contentWidth + 80) +// padding-top $navbarHeight!important +// .home-wrapper .banner .banner-conent +// padding 0 2.9rem +// box-sizing border-box +// .home-wrapper .banner .slide-banner .slide-banner-wrapper .slide-item a +// h2 +// margin-top 2rem +// font-size 1.2rem!important +// p +// padding 0 1rem + +// 评论区颜色重置 +.gt-container + .gt-ico-tip + &::after + content: '。( Win + . ) or ( ⌃ + ⌘ + ␣ ) open Emoji' + color: #999 + .gt-meta + border-color var(--borderColor)!important + .gt-comments-null + color var(--textColor) + opacity .5 + .gt-header-textarea + color var(--textColor) + background rgba(180,180,180,0.1)!important + .gt-btn + border-color $accentColor!important + background-color $accentColor!important + .gt-btn-preview + background-color rgba(255,255,255,0)!important + color $accentColor!important + a + color $accentColor!important + .gt-svg svg + fill $accentColor!important + .gt-comment-content,.gt-comment-admin .gt-comment-content + background-color rgba(150,150,150,0.1)!important + &:hover + box-shadow 0 0 25px rgba(150,150,150,.5)!important + .gt-comment-body + color var(--textColor)!important + + +// qq徽章 +.qq + position: relative; +.qq::after + content: "可撩"; + background: $accentColor; + color:#fff; + padding: 0 5px; + border-radius: 10px; + font-size:12px; + position: absolute; + top: -4px; + right: -35px; + transform:scale(0.85); + +// demo模块图标颜色 +body .vuepress-plugin-demo-block__wrapper + &,.vuepress-plugin-demo-block__display + border-color rgba(160,160,160,.3) + .vuepress-plugin-demo-block__footer:hover + .vuepress-plugin-demo-block__expand::before + border-top-color: $accentColor !important; + border-bottom-color: $accentColor !important; + svg + fill: $accentColor !important; + + +// 全文搜索框 +.suggestions + overflow: auto + max-height: calc(100vh - 6rem) + @media (max-width: 719px) { + width: 90vw; + min-width: 90vw!important; + margin-right: -20px; + } + .highlight + color: $accentColor + font-weight: bold diff --git a/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/.vuepress/styles/palette.styl b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/.vuepress/styles/palette.styl new file mode 100644 index 00000000..b65c5e0e --- /dev/null +++ b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/.vuepress/styles/palette.styl @@ -0,0 +1,62 @@ + +// 原主题变量已弃用,以下是vdoing使用的变量,你可以在这个文件内修改它们。 + +//***vdoing主题-变量***// + +// // 颜色 + +// $bannerTextColor = #fff // 首页banner区(博客标题)文本颜色 +// $accentColor = #11A8CD +// $arrowBgColor = #ccc +// $badgeTipColor = #42b983 +// $badgeWarningColor = darken(#ffe564, 35%) +// $badgeErrorColor = #DA5961 + +// // 布局 +// $navbarHeight = 3.6rem +// $sidebarWidth = 18rem +// $contentWidth = 860px +// $homePageWidth = 1100px +// $rightMenuWidth = 230px // 右侧菜单 + +// // 代码块 +// $lineNumbersWrapperWidth = 2.5rem + +// 浅色模式 +// .theme-mode-light +// --bodyBg: rgba(255,255,255,1) +// --mainBg: rgba(255,255,255,1) +// --sidebarBg: rgba(255,255,255,.8) +// --blurBg: rgba(255,255,255,.9) +// // --textColor: #004050 +// --textLightenColor: #0085AD +// --borderColor: rgba(0,0,0,.15) +// --codeBg: #f6f6f6 +// --codeColor: #525252 +// codeThemeLight() + +// // 深色模式 +// .theme-mode-dark +// --bodyBg: rgba(30,30,34,1) +// --mainBg: rgba(30,30,34,1) +// --sidebarBg: rgba(30,30,34,.8) +// --blurBg: rgba(30,30,34,.8) +// --textColor: rgb(140,140,150) +// --textLightenColor: #0085AD +// --borderColor: #2C2C3A +// --codeBg: #252526 +// --codeColor: #fff +// codeThemeDark() + +// // 阅读模式 +// .theme-mode-read +// --bodyBg: rgba(245,245,213,1) +// --mainBg: rgba(245,245,213,1) +// --sidebarBg: rgba(245,245,213,.8) +// --blurBg: rgba(245,245,213,.9) +// --textColor: #004050 +// --textLightenColor: #0085AD +// --borderColor: rgba(0,0,0,.15) +// --codeBg: #282c34 +// --codeColor: #fff +// codeThemeDark() diff --git a/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/01.HIS操作手册/01.测试页面1/01.模块职责.md b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/01.HIS操作手册/01.测试页面1/01.模块职责.md new file mode 100644 index 00000000..e78f4692 --- /dev/null +++ b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/01.HIS操作手册/01.测试页面1/01.模块职责.md @@ -0,0 +1,5 @@ +--- +title: 模块职责 +date: 2026-01-16 13:47:45 +permalink: /pages/520e67/ +--- diff --git a/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/01.HIS操作手册/04.测试页面4/01.模块介绍.md b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/01.HIS操作手册/04.测试页面4/01.模块介绍.md new file mode 100644 index 00000000..dad09cf5 --- /dev/null +++ b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/01.HIS操作手册/04.测试页面4/01.模块介绍.md @@ -0,0 +1,5 @@ +--- +title: 模块介绍 +date: 2026-01-16 14:15:43 +permalink: /pages/8a740c/ +--- diff --git a/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/01.HIS操作手册/05.测试页面5/01.模块介绍.md b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/01.HIS操作手册/05.测试页面5/01.模块介绍.md new file mode 100644 index 00000000..ebcf65e6 --- /dev/null +++ b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/01.HIS操作手册/05.测试页面5/01.模块介绍.md @@ -0,0 +1,5 @@ +--- +title: 模块介绍 +date: 2026-01-26 10:54:41 +permalink: /pages/71f9ee/ +--- diff --git a/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/@pages/archivesPage.md b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/@pages/archivesPage.md new file mode 100644 index 00000000..a10c651b --- /dev/null +++ b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/@pages/archivesPage.md @@ -0,0 +1,6 @@ +--- +archivesPage: true +title: 博客文章 +permalink: /blog/ +article: false +--- diff --git a/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/index.md b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/index.md new file mode 100644 index 00000000..722e7f12 --- /dev/null +++ b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/docs/index.md @@ -0,0 +1,165 @@ +--- +home: true +heroImage: /img/logo.png +heroText: 欢迎使用经创HIS系统 +tagline: 经创HIS系统操作手册 +actionText: 开始使用 → +actionLink: /pages/520e67/ +bannerBg: none # auto => 网格纹背景(有bodyBgImg时无背景),默认 | none => 无 | '大图地址' | background: 自定义背景样式 提示:如发现文本颜色不适应你的背景时可以到palette.styl修改$bannerTextColor变量 + +features: # 可选的 + # - title: 知识管理 + # details: 包含三种典型的知识管理形态:结构化、碎片化、体系化。轻松打造属于你自己的知识管理平台 + # - title: 简洁高效 + # details: 以 Markdown 为中心的项目结构,内置自动化工具,以更少的配置完成更多的事。配合多维索引快速定位每个知识点 + # - title: 沉浸式阅读 + # details: 专为阅读设计的UI,配合多种颜色模式、可关闭的侧边栏和导航栏,带给你一种沉浸式阅读体验 + +# 文章列表显示方式: detailed 默认,显示详细版文章列表(包括作者、分类、标签、摘要、分页等)| simple => 显示简约版文章列表(仅标题和日期)| none 不显示文章列表 +postList: none +--- + + +
+

+ +

+ +
+ + + + +
+ + + +
+ + + +
+ + + + + + + + + diff --git a/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/package.json b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/package.json new file mode 100644 index 00000000..6ed468f8 --- /dev/null +++ b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/package.json @@ -0,0 +1,30 @@ +{ + "name": "theme-vdoing-doc", + "version": "1.0.0", + "scripts": { + "dev": "export NODE_OPTIONS=--openssl-legacy-provider && node --max_old_space_size=4096 ./node_modules/vuepress/cli.js dev docs", + "build": "export NODE_OPTIONS=--openssl-legacy-provider && node --max_old_space_size=4096 ./node_modules/vuepress/cli.js build docs", + "dev:win": "set NODE_OPTIONS=--openssl-legacy-provider && node --max_old_space_size=4096 ./node_modules/vuepress/cli.js dev docs", + "build:win": "set NODE_OPTIONS=--openssl-legacy-provider && node --max_old_space_size=4096 ./node_modules/vuepress/cli.js build docs", + "predev": "node utils/check.js dev && vdoing", + "prebuild": "node utils/check.js build && vdoing", + "updateTheme": "yarn remove vuepress-theme-vdoing && rm -rf node_modules && yarn && yarn add vuepress-theme-vdoing -D", + "editFm": "node utils/editFrontmatter.js" + }, + "license": "MIT", + "devDependencies": { + "dayjs": "^1.9.7", + "inquirer": "^7.1.0", + "json2yaml": "^1.1.0", + "vuepress": "1.9.9", + "vuepress-plugin-baidu-tongji": "^1.0.1", + "vuepress-plugin-demo-block": "^0.7.2", + "vuepress-plugin-fulltext-search": "^2.2.1", + "vuepress-plugin-one-click-copy": "^1.0.2", + "vuepress-plugin-thirdparty-search": "^1.0.2", + "vuepress-plugin-zooming": "^1.1.7", + "vuepress-theme-vdoing": "^1.12.9", + "yamljs": "^0.3.0" + }, + "dependencies": {} +} diff --git a/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/utils/check.js b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/utils/check.js new file mode 100644 index 00000000..5c6be1af --- /dev/null +++ b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/utils/check.js @@ -0,0 +1,26 @@ +const isWin = process.platform === 'win32'; + +// 如果是 windows 平台 +if (isWin) { + const {dev: devScriptStr, build: buildScriptStr} = require('../package.json').scripts + const args = process.argv.slice(2) + const scriptType = args[0] + const fRed = "\x1b[31m" + + const warnFn = (type) => { + console.log(fRed, + `\n[vdoing] 提示:由于您使用的是 windows 系统,请使用 ${type}:win 运行,否则运行失败。 \n` + ) + process.exit(1) + } + + // 当前运行的是dev脚本 且 脚本前端是'export' + if (scriptType === 'dev' && devScriptStr.startsWith('export')) { + warnFn('dev') + } + + // 当前运行的是build脚本 且 脚本前端是'export' + if (scriptType === 'build' && buildScriptStr.startsWith('export')) { + warnFn('build') + } +} \ No newline at end of file diff --git a/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/utils/config.yml b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/utils/config.yml new file mode 100644 index 00000000..6fac6a22 --- /dev/null +++ b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/utils/config.yml @@ -0,0 +1,14 @@ +#批量添加和修改、删除front matter配置文件 + +# 需要批量处理的路径,docs文件夹内的文件夹 (数组。映射路径:docs/arr[0]/arr[1] ... ) +path: + - docs # 第一个成员必须是docs + +# 要删除的字段 (数组) +delete: + # - test + # - tags + + # 要添加、修改front matter的数据 (front matter中没有的数据则添加,已有的数据则覆盖) +data: + article: false \ No newline at end of file diff --git a/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/utils/editFrontmatter.js b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/utils/editFrontmatter.js new file mode 100644 index 00000000..8c223f4e --- /dev/null +++ b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/utils/editFrontmatter.js @@ -0,0 +1,92 @@ +/** + * 批量添加和修改front matter ,需要配置 ./config.yml 文件。 + */ +const fs = require('fs'); // 文件模块 +const path = require('path'); // 路径模块 +const matter = require('gray-matter'); // front matter解析器 https://github.com/jonschlinkert/gray-matter +const jsonToYaml = require('json2yaml') +const yamlToJs = require('yamljs') +const inquirer = require('inquirer') // 命令行操作 +const chalk = require('chalk') // 命令行打印美化 +const readFileList = require('./modules/readFileList'); +const { type, repairDate} = require('./modules/fn'); +const log = console.log + +const configPath = path.join(__dirname, 'config.yml') // 配置文件的路径 + +main(); + +/** + * 主体函数 + */ +async function main() { + + const promptList = [{ + type: "confirm", + message: chalk.yellow('批量操作frontmatter有修改数据的风险,确定要继续吗?'), + name: "edit", + }]; + let edit = true; + + await inquirer.prompt(promptList).then(answers => { + edit = answers.edit + }) + + if(!edit) { // 退出操作 + return + } + + const config = yamlToJs.load(configPath) // 解析配置文件的数据转为js对象 + + if (type(config.path) !== 'array') { + log(chalk.red('路径配置有误,path字段应该是一个数组')) + return + } + + if (config.path[0] !== 'docs') { + log(chalk.red("路径配置有误,path数组的第一个成员必须是'docs'")) + return + } + + const filePath = path.join(__dirname, '..', ...config.path); // 要批量修改的文件路径 + const files = readFileList(filePath); // 读取所有md文件数据 + + files.forEach(file => { + let dataStr = fs.readFileSync(file.filePath, 'utf8');// 读取每个md文件的内容 + const fileMatterObj = matter(dataStr) // 解析md文件的front Matter。 fileMatterObj => {content:'剔除frontmatter后的文件内容字符串', data:{}, ...} + let matterData = fileMatterObj.data; // 得到md文件的front Matter + + let mark = false + // 删除操作 + if (config.delete) { + if( type(config.delete) !== 'array' ) { + log(chalk.yellow('未能完成删除操作,delete字段的值应该是一个数组!')) + } else { + config.delete.forEach(item => { + if (matterData[item]) { + delete matterData[item] + mark = true + } + }) + + } + } + + // 添加、修改操作 + if (type(config.data) === 'object') { + Object.assign(matterData, config.data) // 将配置数据合并到front Matter对象 + mark = true + } + + // 有操作时才继续 + if (mark) { + if(matterData.date && type(matterData.date) === 'date') { + matterData.date = repairDate(matterData.date) // 修复时间格式 + } + const newData = jsonToYaml.stringify(matterData).replace(/\n\s{2}/g,"\n").replace(/"/g,"") + '---\r\n' + fileMatterObj.content; + fs.writeFileSync(file.filePath, newData); // 写入 + log(chalk.green(`update frontmatter:${file.filePath} `)) + } + + }) +} diff --git a/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/utils/modules/fn.js b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/utils/modules/fn.js new file mode 100644 index 00000000..48cbbd17 --- /dev/null +++ b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/utils/modules/fn.js @@ -0,0 +1,21 @@ +// 类型判断 +exports.type = function (o){ + var s = Object.prototype.toString.call(o) + return s.match(/\[object (.*?)\]/)[1].toLowerCase() +} + + // 修复date时区格式的问题 + exports.repairDate = function (date) { + date = new Date(date); + return `${date.getUTCFullYear()}-${zero(date.getUTCMonth()+1)}-${zero(date.getUTCDate())} ${zero(date.getUTCHours())}:${zero(date.getUTCMinutes())}:${zero(date.getUTCSeconds())}`; +} + +// 日期的格式 +exports.dateFormat = function (date) { + return `${date.getFullYear()}-${zero(date.getMonth()+1)}-${zero(date.getDate())} ${zero(date.getHours())}:${zero(date.getMinutes())}:${zero(date.getSeconds())}` +} + +// 小于10补0 +function zero(d){ + return d.toString().padStart(2,'0') +} \ No newline at end of file diff --git a/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/utils/modules/readFileList.js b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/utils/modules/readFileList.js new file mode 100644 index 00000000..8eb97c62 --- /dev/null +++ b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/utils/modules/readFileList.js @@ -0,0 +1,43 @@ +/** + * 读取所有md文件数据 + */ +const fs = require('fs'); // 文件模块 +const path = require('path'); // 路径模块 +const docsRoot = path.join(__dirname, '..', '..', 'docs'); // docs文件路径 + +function readFileList(dir = docsRoot, filesList = []) { + const files = fs.readdirSync(dir); + files.forEach( (item, index) => { + let filePath = path.join(dir, item); + const stat = fs.statSync(filePath); + if (stat.isDirectory() && item !== '.vuepress') { + readFileList(path.join(dir, item), filesList); //递归读取文件 + } else { + if(path.basename(dir) !== 'docs'){ // 过滤docs目录级下的文件 + + const fileNameArr = path.basename(filePath).split('.') + let name = null, type = null; + if (fileNameArr.length === 2) { // 没有序号的文件 + name = fileNameArr[0] + type = fileNameArr[1] + } else if (fileNameArr.length === 3) { // 有序号的文件 + name = fileNameArr[1] + type = fileNameArr[2] + } else { // 超过两个‘.’的 + log(chalk.yellow(`warning: 该文件 "${filePath}" 没有按照约定命名,将忽略生成相应数据。`)) + return + } + if(type === 'md'){ // 过滤非md文件 + filesList.push({ + name, + filePath + }); + } + + } + } + }); + return filesList; +} + +module.exports = readFileList; \ No newline at end of file diff --git a/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/vercel.json b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/vercel.json new file mode 100644 index 00000000..82528b47 --- /dev/null +++ b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/vercel.json @@ -0,0 +1,22 @@ +{ + "headers": [ + { + "source": "/assets/js/(.*)", + "headers": [ + { + "key": "Cache-Control", + "value": "max-age=31536000, immutable" + } + ] + }, + { + "source": "/assets/css/(.*)", + "headers": [ + { + "key": "Cache-Control", + "value": "max-age=31536000, immutable" + } + ] + } + ] +} diff --git a/openhis-ui-vue3/src/router/index.js b/openhis-ui-vue3/src/router/index.js index 26010cfa..2dd34163 100644 --- a/openhis-ui-vue3/src/router/index.js +++ b/openhis-ui-vue3/src/router/index.js @@ -233,7 +233,7 @@ export const dynamicRoutes = [ path: '', component: () => import('@/views/helpcenter/index.vue'), name: 'HelpCenter', - meta: { title: '帮助中心'}, + meta: {title: '帮助中心', link: '/help-center/vuepress-theme-vdoing-doc/docs/.vuepress/dist/pages/520e67/index.html'}, }, ], }, diff --git a/openhis-ui-vue3/src/views/helpcenter/index.vue b/openhis-ui-vue3/src/views/helpcenter/index.vue index f7fc42cf..29116ac0 100644 --- a/openhis-ui-vue3/src/views/helpcenter/index.vue +++ b/openhis-ui-vue3/src/views/helpcenter/index.vue @@ -1,36 +1,19 @@ - - - + + + \ No newline at end of file