Coder Social home page Coder Social logo

huangwei9527 / ink-wash-docs Goto Github PK

View Code? Open in Web Editor NEW
567.0 15.0 148.0 2.49 MB

水墨文档,一款基于egg+vue开发的在线文档管理平台,支持markdown文档, excel文档,原型托管等功能. http://139.199.172.193:7001/

License: Apache License 2.0

JavaScript 28.05% HTML 16.22% Vue 44.95% CSS 7.33% SCSS 3.44%
vue nodejs eggjs koa

ink-wash-docs's Introduction

前言

团队中会遇到在线文档管理的需求,包括技术文档,接口文档,excel文档,和产品原型的托管等需求,一直没有找到合适的开源项目来满足需求,所以动手实现了个文档管理系统(实现起来并不复杂,该教程只是提供思路,并非最佳实践)

Github: 传送门
演示地址:传送门
掘金文章:传送门

node 版本 14

功能列表

  • 登录注册
  • 工作台|文档列表
  • 文档编辑预览(支持:md, excel,html产品原型托管)
  • 协作编辑
  • 访问权限设置
  • 团队管理
  • 点赞收藏
  • 模板管理
  • 浏览历史
  • 回收站
  • 文件夹形式阅读(接口文档)
  • 编辑历史版本

系统界面预览

工程目录结构

|-- app					--------服务器端项目代码
    |--controller				--------用于解析用户的输入,处理后返回相应的结果
    |--extend					--------框架的扩展
    |--middleware				--------编写中间件
    |--model					--------Schema数据模型
    |--public					--------用于放置静态资源
    |--service					--------用于编写业务逻辑层
    |--router.js				--------用于配置 URL 路由规则
|-- config					--------egg 配置文件
    |--config.default.js			--------默认配置
    |--config.local.js				--------开发环境配置
    |--config.prod.js				--------生产环境配置
    |--plugin.js					--------配置需要加载的插件
|-- web						--------前端项目界面代码
    |--common					--------前端界面对应静态资源
    |--components				--------组件
    |--config					--------配置文件
    |--filter					--------过滤器
    |--pages					--------页面
    |--router					--------路由配置
    |--store					--------vuex状态管理
    |--service					--------axios封装
    |--App.vue					--------App
    |--main.js					--------入口文件
    |--permission.js			--------权限控制
|-- docs					--------预留编写项目文档目录
|-- vue.config.js			--------vue webpack配置文件
|-- package.json
...
...

本地开发

// 启动后端服务
npm run dev
// 启动前端项目
npm run dev-web

本地部署

先build个前端版本,然后再部署egg服务到本地

1、npm run build-web
2、npm run copy-web-html
3、npm run start

License

Apache License 2.0

ink-wash-docs's People

Contributors

huangwei9527 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ink-wash-docs's Issues

【bug】关于最近浏览始终为空的bug和解决方案

我注意到项目有bug,最近浏览始终为空。

分析代码后发现,

由于在获取历史信息接口的用户信息是从token负载解析出来的。

而token又是由getUsersByUsername方法获取并封装的。

从 let selectUserKey = {password: 0, history_visit_doc: 0}; 看来,问题的根源已经很明显了。在这个定义中,password: 0 和 history_visit_doc: 0 表示在执行 MongoDB 查询时,这两个字段将被排除,不会出现在查询结果中。这就是为什么从数据库查询中获取 history_visit_doc 字段的原因。

解决方法:删除history_visit_doc: 0

【fix】细节修复,修复当数据量过多的时候,没有正确显示滚动条的问题

当数据量溢出的时候,列表数据会直接溢出容器,并和底部copyright重叠,变成了全屏滚动。

查看代码发现在web\common\styles\index.scss文件中定义了.scroll-wrapper来自定义滚动条,说明作者本意不是全屏滚动。

修复办法:
web\common\styles\index.scss中,将.scroll-wrapper增加样式,改为如下

.list-wrapper{
  height: 100%;
  overflow: auto;
}

这样一切就回复正常了。

请问还有mongodb完整的数据库吗

正想写一个在线文档管理,想学习一下egg和mongodb的一些操作,
查询个人浏览历史列表那里一直为空,我想应该是缺少表了(个人node不太行)
希望作者能回复一下

【bug】关于上传原型图返回错误的bug修复办法

在上传大文件原型图的时候,你会发现
image

我仔细阅读源码后,发现作者漏了文件大小定义,
修复办法:

  1. 破坏性修改方法
    直接修改
    node_modules\egg-multipart\app\extend\context.js 库文件!
async saveRequestFiles(options) {
    options = options || {};
    const ctx = this;

    const multipartOptions = {
      autoFields: false,
      limits: {
        fileSize: '50mb'  // 加上这句,这里你可以直接使用 '50mb',因为函数中似乎有一个 `bytes` 函数来处理这样的字符串
      }
    };
  1. 修改config\config.default.js配置
    见下

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.