Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Guten-PigxUI
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄卓然
Guten-PigxUI
Commits
e664230b
Commit
e664230b
authored
Nov 05, 2018
by
冷冷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
添加新特性。 图形化路由控制
parent
3af91219
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
388 additions
and
97 deletions
+388
-97
package.json
package.json
+61
-60
route.js
src/api/route.js
+12
-35
token.js
src/api/token.js
+33
-0
env.js
src/config/env.js
+2
-2
token.js
src/const/crud/token.js
+67
-0
leave.vue
src/views/admin/activiti/leave.vue
+2
-0
index.vue
src/views/admin/route/index.vue
+80
-0
index.vue
src/views/admin/token/index.vue
+124
-0
vue.config.js
vue.config.js
+7
-0
No files found.
package.json
View file @
e664230b
{
"name"
:
"avue-cli"
,
"version"
:
"2.0.0"
,
"private"
:
true
,
"scripts"
:
{
"serve"
:
"vue-cli-service serve"
,
"build"
:
"vue-cli-service build"
,
"lint"
:
"vue-cli-service lint"
,
"test:unit"
:
"vue-cli-service test:unit"
,
"test:e2e"
:
"vue-cli-service test:e2e"
},
"dependencies"
:
{
"
@smallwei/avue
"
:
"
^1.1.21-beta1
"
,
"
avue-plugin-transfer
"
:
"
^0.0.2
"
,
"
avue-plugin-ueditor
"
:
"
^0.0.1
"
,
"
axios
"
:
"
^0.18.0
"
,
"
babel-loader
"
:
"
^8.0.2
"
,
"
babel-plugin-transform-runtime
"
:
"
^6.23.0
"
,
"
babel-polyfill
"
:
"
^6.26.0
"
,
"
classlist-polyfill
"
:
"
^1.2.0
"
,
"
driver.js
"
:
"
^0.6.2
"
,
"
element-ui
"
:
"
^2.4.6
"
,
"
file-saver
"
:
"
^1.3.8
"
,
"
html2canvas
"
:
"
^1.0.0-alpha.12
"
,
"
js-cookie
"
:
"
^2.2.0
"
,
"
mockjs
"
:
"
^1.0.1-beta3
"
,
"
moment
"
:
"
^2.22.2
"
,
"
nprogress
"
:
"
^0.2.0
"
,
"
script-loader
"
:
"
^0.7.2
"
,
"
vue
"
:
"
^2.5.16
"
,
"
vue-axios
"
:
"
^2.1.2
"
,
"
vue-clipboard2
"
:
"
^0.2.1
"
,
"
vue-json-tree-view
"
:
"
^2.1.4
"
,
"
vue-quill-editor
"
:
"
^3.0.6
"
,
"
vue-router
"
:
"
^3.0.1
"
,
"
vuedraggable
"
:
"
^2.16.0
"
,
"
vuex
"
:
"
^3.0.1
"
,
"
xlsx
"
:
"
^0.13.3
"
},
"devDependencies"
:
{
"
@vue/cli-plugin-babel
"
:
"
^3.0.0
"
,
"
@vue/cli-plugin-e2e-cypress
"
:
"
^3.0.0
"
,
"
@vue/cli-plugin-eslint
"
:
"
^3.0.0
"
,
"
@vue/cli-plugin-unit-mocha
"
:
"
^3.0.0
"
,
"
@vue/cli-service
"
:
"
^3.0.0
"
,
"
@vue/test-utils
"
:
"
^1.0.0-beta.20
"
,
"
chai
"
:
"
^4.1.2
"
,
"
node-sass
"
:
"
^4.9.0
"
,
"
sass-loader
"
:
"
^7.0.1
"
,
"
vue-template-compiler
"
:
"
^2.5.17
"
},
"lint-staged"
:
{
"*.js"
:
[
"vue-cli-service lint"
,
"git add"
],
"*.vue"
:
[
"vue-cli-service lint"
,
"git add"
]
}
"name"
:
"avue-cli"
,
"version"
:
"2.0.0"
,
"private"
:
true
,
"scripts"
:
{
"serve"
:
"vue-cli-service serve"
,
"build"
:
"vue-cli-service build"
,
"lint"
:
"vue-cli-service lint"
,
"test:unit"
:
"vue-cli-service test:unit"
,
"test:e2e"
:
"vue-cli-service test:e2e"
},
"dependencies"
:
{
"
@smallwei/avue
"
:
"
^1.1.21-beta1
"
,
"
avue-plugin-transfer
"
:
"
^0.0.2
"
,
"
avue-plugin-ueditor
"
:
"
^0.0.1
"
,
"
axios
"
:
"
^0.18.0
"
,
"
babel-loader
"
:
"
^8.0.2
"
,
"
babel-plugin-transform-runtime
"
:
"
^6.23.0
"
,
"
babel-polyfill
"
:
"
^6.26.0
"
,
"
classlist-polyfill
"
:
"
^1.2.0
"
,
"
driver.js
"
:
"
^0.6.2
"
,
"
element-ui
"
:
"
^2.4.6
"
,
"
file-saver
"
:
"
^1.3.8
"
,
"
html2canvas
"
:
"
^1.0.0-alpha.12
"
,
"
js-cookie
"
:
"
^2.2.0
"
,
"
mockjs
"
:
"
^1.0.1-beta3
"
,
"
moment
"
:
"
^2.22.2
"
,
"
nprogress
"
:
"
^0.2.0
"
,
"
script-loader
"
:
"
^0.7.2
"
,
"
vue
"
:
"
^2.5.16
"
,
"
vue-axios
"
:
"
^2.1.2
"
,
"
vue-clipboard2
"
:
"
^0.2.1
"
,
"
vue-json-editor
"
:
"
^1.2.3
"
,
"
vue-json-tree-view
"
:
"
^2.1.4
"
,
"
vue-quill-editor
"
:
"
^3.0.6
"
,
"
vue-router
"
:
"
^3.0.1
"
,
"
vuedraggable
"
:
"
^2.16.0
"
,
"
vuex
"
:
"
^3.0.1
"
,
"
xlsx
"
:
"
^0.13.3
"
},
"devDependencies"
:
{
"
@vue/cli-plugin-babel
"
:
"
^3.0.0
"
,
"
@vue/cli-plugin-e2e-cypress
"
:
"
^3.0.0
"
,
"
@vue/cli-plugin-eslint
"
:
"
^3.0.0
"
,
"
@vue/cli-plugin-unit-mocha
"
:
"
^3.0.0
"
,
"
@vue/cli-service
"
:
"
^3.0.0
"
,
"
@vue/test-utils
"
:
"
^1.0.0-beta.20
"
,
"
chai
"
:
"
^4.1.2
"
,
"
node-sass
"
:
"
^4.9.0
"
,
"
sass-loader
"
:
"
^7.0.1
"
,
"
vue-template-compiler
"
:
"
^2.5.17
"
},
"lint-staged"
:
{
"*.js"
:
[
"vue-cli-service lint"
,
"git add"
],
"*.vue"
:
[
"vue-cli-service lint"
,
"git add"
]
}
}
src/api/route.js
View file @
e664230b
...
...
@@ -19,45 +19,22 @@ import request from '@/router/axios'
export
function
fetchList
(
query
)
{
return
request
({
url
:
'/
admin/route/pag
e'
,
url
:
'/
rout
e'
,
method
:
'get'
,
params
:
query
})
}
export
function
addObj
(
obj
)
{
return
request
({
url
:
'/admin/route/'
,
method
:
'post'
,
data
:
obj
})
}
export
function
getObj
(
id
)
{
return
request
({
url
:
'/admin/route/'
+
id
,
method
:
'get'
})
}
export
function
delObj
(
id
)
{
return
request
({
url
:
'/admin/route/'
+
id
,
method
:
'delete'
})
}
export
function
putObj
(
obj
)
{
return
request
({
url
:
'/admin
/route'
,
method
:
'put'
,
data
:
obj
})
return
request
({
url
:
'
/route'
,
method
:
'put'
,
data
:
obj
})
}
export
function
applyObj
()
{
return
request
({
url
:
'/admin/route/apply
'
,
method
:
'get'
})
export
function
fallback
(
obj
)
{
return
request
(
{
url
:
'/route/fallback'
,
method
:
'get
'
,
data
:
obj
})
}
src/api/token.js
0 → 100644
View file @
e664230b
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the pig4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
import
request
from
'@/router/axios'
export
function
fetchList
(
query
)
{
return
request
({
url
:
'/admin/token/page'
,
method
:
'get'
,
params
:
query
})
}
export
function
delObj
(
id
)
{
return
request
({
url
:
'/admin/token/'
+
id
,
method
:
'delete'
})
}
src/config/env.js
View file @
e664230b
...
...
@@ -3,7 +3,7 @@
const
env
=
process
.
env
let
baseUrl
=
''
;
// 图表库为avue和pig2套地址
let
iconfontVersion
=
[
'667895_
5lt01cjobo7
'
,
'567566_qo5lxgtishg'
]
let
iconfontVersion
=
[
'667895_
4y8d30c1og
'
,
'567566_qo5lxgtishg'
]
let
iconfontUrl
=
`//at.alicdn.com/t/font_$key.css`
;
let
codeUrl
=
`/code`
let
actUrl
=
`
${
window
.
origin
}
/act/modeler.html?modelId=`
;
...
...
@@ -21,4 +21,4 @@ export {
iconfontVersion
,
codeUrl
,
env
}
\ No newline at end of file
}
src/const/crud/token.js
0 → 100644
View file @
e664230b
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the pig4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
const
DIC
=
{
vaild
:
[{
label
:
'否'
,
value
:
'false'
},
{
label
:
'是'
,
value
:
'true'
}]
}
export
const
tableOption
=
{
'border'
:
true
,
'index'
:
true
,
'indexLabel'
:
'序号'
,
'stripe'
:
true
,
'menuAlign'
:
'center'
,
'align'
:
'center'
,
'addBtn'
:
false
,
'editBtn'
:
false
,
'delBtn'
:
false
,
'dic'
:
[],
'column'
:
[{
label
:
'令牌'
,
prop
:
'token_value'
,
align
:
'center'
},
{
label
:
'用户ID'
,
prop
:
'user_id'
,
align
:
'center'
},
{
label
:
'用户名'
,
prop
:
'user_name'
,
align
:
'center'
},
{
label
:
'类型'
,
prop
:
'token_type'
,
align
:
'center'
},
{
label
:
'过期时间'
,
prop
:
'expires_in'
,
align
:
'center'
},
{
label
:
'客户端'
,
prop
:
'client_id'
,
align
:
'center'
},
{
label
:
'授权类型'
,
prop
:
'grant_type'
,
align
:
'center'
}]
}
src/views/admin/activiti/leave.vue
View file @
e664230b
...
...
@@ -84,6 +84,8 @@
},
methods
:
{
getList
()
{
this
.
listQuery
.
orderByField
=
'create_time'
this
.
listQuery
.
isAsc
=
false
this
.
tableLoading
=
true
fetchList
(
this
.
listQuery
).
then
(
response
=>
{
this
.
tableData
=
response
.
data
.
records
...
...
src/views/admin/route/index.vue
0 → 100644
View file @
e664230b
<!--
- Copyright (c) 2018-2025, lengleng All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- Neither the name of the pig4cloud.com developer nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
- Author: lengleng (wangiegie@gmail.com)
-->
<
template
>
<div
class=
"app-container pull-auto"
>
<basic-container>
<vue-json-editor
v-model=
"json"
:show-btns=
"false"
></vue-json-editor>
<div
align=
"center"
>
<el-button
@
click=
"edit()"
>
更新
</el-button>
<el-button
type=
"warning"
@
click=
"fallback()"
>
回滚
</el-button>
</div>
</basic-container>
</div>
</
template
>
<
script
>
import
vueJsonEditor
from
'vue-json-editor'
import
{
fetchList
,
putObj
,
fallback
}
from
'@/api/route'
export
default
{
data
()
{
return
{
json
:
null
}
},
// 注入vueJsonEditor组件
components
:
{
vueJsonEditor
},
created
()
{
this
.
getList
()
},
methods
:
{
getList
()
{
fetchList
().
then
(
response
=>
{
this
.
json
=
response
.
data
console
.
log
(
this
.
json
)
})
},
fallback
(){
fallback
(
this
.
json
).
then
(
response
=>
{
this
.
$notify
({
title
:
'成功'
,
message
:
'回滚成功'
,
type
:
'success'
,
duration
:
2000
})
})
},
edit
(){
putObj
(
this
.
json
).
then
(
response
=>
{
this
.
$notify
({
title
:
'成功'
,
message
:
'更新成功'
,
type
:
'success'
,
duration
:
2000
})
})
},
}
}
</
script
>
src/views/admin/token/index.vue
0 → 100644
View file @
e664230b
<!--
- Copyright (c) 2018-2025, lengleng All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- Neither the name of the pig4cloud.com developer nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
- Author: lengleng (wangiegie@gmail.com)
-->
<
template
>
<div
class=
"app-container pull-auto"
>
<basic-container>
<avue-crud
ref=
"crud"
:page=
"page"
:data=
"tableData"
:table-loading=
"tableLoading"
:option=
"tableOption"
@
current-change=
"currentChange"
@
refresh-change=
"refreshChange"
@
size-change=
"sizeChange"
@
row-del=
"rowDel"
>
<template
slot-scope=
"scope"
slot=
"menu"
>
<el-button
type=
"danger"
v-if=
"permissions.sys_client_del"
icon=
"el-icon-delete"
size=
"mini"
plain
@
click=
"handleDel(scope.row,scope.index)"
>
删除
</el-button>
</
template
>
</avue-crud>
</basic-container>
</div>
</template>
<
script
>
import
{
fetchList
,
delObj
}
from
'@/api/token'
import
{
tableOption
}
from
'@/const/crud/token'
import
{
mapGetters
}
from
'vuex'
export
default
{
name
:
'token'
,
data
()
{
return
{
tableData
:
[],
page
:
{
total
:
0
,
// 总页数
currentPage
:
1
,
// 当前页数
pageSize
:
20
// 每页显示多少条
},
tableLoading
:
false
,
tableOption
:
tableOption
}
},
created
()
{
this
.
getList
()
},
mounted
:
function
()
{
},
computed
:
{
...
mapGetters
([
'permissions'
])
},
methods
:
{
getList
()
{
this
.
tableLoading
=
true
fetchList
({
page
:
this
.
page
.
currentPage
,
limit
:
this
.
page
.
pageSize
}).
then
(
response
=>
{
this
.
tableData
=
response
.
data
.
records
this
.
page
.
total
=
response
.
data
.
total
this
.
tableLoading
=
false
})
},
currentChange
(
val
)
{
this
.
page
.
currentPage
=
val
this
.
getList
()
},
sizeChange
(
val
)
{
this
.
page
.
pageSize
=
val
this
.
getList
()
},
handleDel
(
row
,
index
)
{
this
.
$refs
.
crud
.
rowDel
(
row
,
index
)
},
rowDel
:
function
(
row
,
index
)
{
var
_this
=
this
this
.
$confirm
(
'是否确认删除ID为'
+
row
.
token_value
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
.
then
(
function
()
{
return
delObj
(
row
.
token_value
)
})
.
then
(
data
=>
{
_this
.
tableData
.
splice
(
index
,
1
)
_this
.
$message
({
showClose
:
true
,
message
:
'删除成功'
,
type
:
'success'
})
})
.
catch
(
function
(
err
)
{
})
},
/**
* 刷新回调
*/
refreshChange
()
{
this
.
getList
()
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
vue.config.js
View file @
e664230b
...
...
@@ -36,6 +36,13 @@ module.exports = {
'^/code'
:
'/code'
}
},
'/route'
:
{
target
:
url
,
ws
:
true
,
pathRewrite
:
{
'^/route'
:
'/route'
}
},
'/gen'
:
{
target
:
url
,
ws
:
true
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment