File tree 12 files changed +88
-48
lines changed
12 files changed +88
-48
lines changed Original file line number Diff line number Diff line change 4
4
5
5
English | [ 简体中文] ( ./README.zh-CN.md )
6
6
7
- # 介绍
7
+ # Introduction
8
8
9
- quick-vue-admi是一个开箱即用的后台集成解决方案,它基于[ Vue] ( https://cn.vuejs.org/ ) 、[ Element] ( http://element-cn.eleme.io ) 和[ MongoDB] ( https://www.mongodb.com/ ) ,开创性地t推出基于配置的开发解决方案,帮你最快速地搭建企业级后台产品.
9
+ quick-vue-admin is a front-end management background integration solution,base on [ Vue] ( https://cn.vuejs.org/ ) 、[ Element] ( http://element-cn.eleme.io ) 和[ MongoDB] ( https://www.mongodb.com/ ) 。
10
+ Least programming,Auto dbref,out of the box。
10
11
11
- - [ 文档 ] ( https://linzhixian.github.io/quick-vue-admin-document )
12
+ - [ Document ] ( https://linzhixian.github.io/quick-vue-admin-document )
12
13
13
- - [ 讨论组 ] ( https://gitter.im/quick-vue-admin/discuss )
14
+ - [ Discuss ] ( https://gitter.im/quick-vue-admin/discuss )
14
15
15
- ## 依赖
16
+ ## Dependencies
16
17
- nodejs   ;  ;  ;  ;  ;  ;  ;  ;  ;  ; (need stand alone install)
17
18
- koa 2.0.0   ;  ;  ;  ;  ;  ;  ;  ; (include)
18
19
- Element UI 2.x   ;  ;  ;  ;  ; (include)
19
20
- MongoDB 3.x   ;  ;  ;  ;  ; (need stand alone install)
20
21
21
- ## 特性
22
+ ## Features
22
23
```
23
24
- Login / Logout
24
25
@@ -63,6 +64,12 @@ npm run dev
63
64
# Run for production environment
64
65
npm run pm2
65
66
```
67
+ ## contact
68
+
69
+ - Wechat: flygobaby
70
+
71
+ ![ ] ( https://linzhixian.github.io/quick-vue-admin-document/wechat.jpg )
72
+
66
73
## Changelog
67
74
Detailed changes for each release are documented in the [ release notes] ( https://github.com/linzhixian/quick-vue-admin/releases ) .
68
75
Original file line number Diff line number Diff line change 15
15
- [ 讨论组] ( https://gitter.im/quick-vue-admin/discuss )
16
16
17
17
## 依赖
18
- - nodejs & nbsp ;& nbsp ;& nbsp ;& nbsp ;& nbsp ;& nbsp ;& nbsp ;& nbsp ;& nbsp ;& nbsp ; (需要单独安装)
19
- - koa 2.0.0 & nbsp ;& nbsp ;& nbsp ;& nbsp ;& nbsp ;& nbsp ;& nbsp ;& nbsp ; ( 项目依赖模块)
20
- - Element UI 2.x & nbsp ;& nbsp ;& nbsp ;& nbsp ;& nbsp ; (项目依赖模块)
21
- - MongoDB 3.x & nbsp ;& nbsp ;& nbsp ;& nbsp ;& nbsp ; (需要单独安装)
18
+ - nodejs(需要单独安装)
19
+ - koa 2.0.0 项目依赖模块)
20
+ - Element UI 2.x (项目依赖模块)
21
+ - MongoDB 3.x(需要单独安装)
22
22
23
23
## 功能
24
24
```
25
25
- 登录 / 注销
26
-
27
-
28
26
- CRUD(增、删、改、查)
29
27
- 通过编写一个元配置文件即可自动生成完整的:增、删、改、查、翻页 功能
30
28
- 自动更新、保存数据到MongoDB
31
29
- 自动创建索引到MongoDB
32
-
33
30
- 数据关联
34
-
35
31
- 权限验证
36
32
- 菜单权限控制
37
33
- 基于用户+角色的权限管理
38
34
-
39
35
- 支持自定义组件
40
-
41
36
- 错误页面
42
37
- 404
43
38
```
Original file line number Diff line number Diff line change @@ -46,6 +46,8 @@ var initLogPath = function() {
46
46
47
47
initLogPath ( ) ;
48
48
49
+ /**初始化meta/index.js*/
50
+
49
51
/**
50
52
* Get port from environment and store in Express.
51
53
*/
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env node
2
+ let generateMetaFiles = require ( "../src/shared/meta/GenerateMetaFiles" )
3
+ generateMetaFiles ( ) . then ( function ( ) {
4
+ var current_path = process . cwd ( ) ;
5
+ require ( current_path + '/bin/Main' )
6
+ } )
7
+
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 5
5
"author" : " your name" ,
6
6
"private" : true ,
7
7
"scripts" : {
8
- "dev" : " cross-env NODE_ENV=development nodemon bin/Main " ,
9
- "pm2" : " cross-env NODE_ENV=product pm2 start bin/Main.js --name quickVueAdmin -e logs/error.log -o logs/access.log" ,
8
+ "dev" : " cross-env NODE_ENV=development nodemon bin/Run --ignore src/shared/meta/metaFiles.js " ,
9
+ "pm2" : " cross-env NODE_ENV=product pm2 start bin/Run --name quickVueAdmin -e logs/error.log -o logs/access.log" ,
10
10
"stop" : " pm2 stop tcAdAdmin" ,
11
- "test" : " cross-env NODE_ENV=test pm2 start bin/Main.js --name quickVueAdmin -i 1 -e logs/error.log -o logs/access.log" ,
11
+ "test" : " cross-env NODE_ENV=test pm2 start bin/Run --name quickVueAdmin -i 1 -e logs/error.log -o logs/access.log" ,
12
12
"restart" : " pm2 restart quickVueAdmin" ,
13
13
"build" : " cross-env NODE_ENV=production webpack --config build/webpack.config.js --progress " ,
14
14
"list" : " pm2 list"
Original file line number Diff line number Diff line change
1
+
2
+ const fs = require ( "fs" )
3
+ const dir = require ( 'node-dir' ) ;
4
+
5
+ async function subdir ( ) {
6
+ return new Promise ( function ( resolve , reject ) {
7
+ dir . subdirs ( __dirname , function ( err , subdirs ) {
8
+ if ( err ) throw err ;
9
+ resolve ( subdirs )
10
+ } )
11
+ } )
12
+ }
13
+ module . exports = async function ( ) {
14
+ let subdirs = await subdir ( )
15
+ let paths = [ ]
16
+ for ( let oneDir of subdirs ) {
17
+ let files = dir . files ( oneDir , { sync :true } )
18
+ for ( let f of files ) {
19
+ let p = f . replace ( __dirname , "" ) . replace ( / \\ / g, "/" )
20
+ paths . push ( p . substring ( 0 , p . length - 3 ) )
21
+ }
22
+ }
23
+ console . log ( paths )
24
+ let content = "module.exports={"
25
+ for ( let one of paths ) {
26
+ content = content + "\n'" + one + "':" + "require('." + one + "'),"
27
+ }
28
+ content = content + "\n}"
29
+ fs . writeFileSync ( __dirname + "/metaFiles.js" , content )
30
+ return
31
+ }
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ let metaFiles = require ( "./metaFiles" )
1
2
let map = { } ;
2
3
3
- load ( "company" , require ( "./company" ) ) ;
4
- load ( "sys" , require ( "./sys" ) ) ;
5
- load ( "example" , require ( "./example" ) ) ;
4
+ /*--start--*/
5
+ for ( let one of Object . keys ( metaFiles ) ) {
6
+ load ( one , metaFiles [ one ] )
7
+ }
8
+
9
+ /*load("./company/Employee")
10
+ load("./example/Input")
11
+ load("./example/SetThemeColor")
12
+ load("./example/Tree")
13
+ load("./sys/Role")
14
+ load("./sys/User")*/
15
+ /*--end--*/
6
16
7
17
8
- function load ( path , modules ) {
9
- for ( let key of Object . keys ( modules ) ) {
10
- let modu = modules [ key ]
11
- modu . columnsMap = { } ;
18
+ function load ( path , modu ) {
19
+ modu . columnsMap = { } ;
12
20
modu . subPermissions = [ ]
13
21
if ( modu . columnsDef ) {
14
22
for ( let one of modu . columnsDef ) {
@@ -25,8 +33,9 @@ function load(path, modules) {
25
33
} )
26
34
}
27
35
28
- map [ "/" + path + "/" + key ] = modu ;
29
- console . log ( "loaded:" + "/" + path + "/" + key ) ;
30
- }
36
+ map [ path ] = modu ;
37
+ console . log ( "loaded:" + path ) ;
38
+
31
39
}
40
+
32
41
module . exports = map ;
Original file line number Diff line number Diff line change
1
+ module . exports = {
2
+ '/company/Department' :require ( './company/Department' ) ,
3
+ '/company/Employee' :require ( './company/Employee' ) ,
4
+ '/example/Input' :require ( './example/Input' ) ,
5
+ '/example/SetThemeColor' :require ( './example/SetThemeColor' ) ,
6
+ '/example/Tree' :require ( './example/Tree' ) ,
7
+ '/sys/Role' :require ( './sys/Role' ) ,
8
+ '/sys/User' :require ( './sys/User' ) ,
9
+ }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments