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
5a6b9195
Commit
5a6b9195
authored
Dec 04, 2018
by
冷冷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
👌
更新代码,因为代码审核变更
parent
63a4a3e9
Changes
73
Show whitespace changes
Inline
Side-by-side
Showing
73 changed files
with
4872 additions
and
4809 deletions
+4872
-4809
App.vue
src/App.vue
+18
-17
activiti.js
src/api/activiti/activiti.js
+4
-4
leave-bill.js
src/api/activiti/leave-bill.js
+4
-4
process.js
src/api/activiti/process.js
+5
-5
task.js
src/api/activiti/task.js
+13
-13
dept.js
src/api/admin/dept.js
+5
-5
menu.js
src/api/admin/menu.js
+2
-0
route.js
src/api/admin/route.js
+6
-5
user.js
src/api/admin/user.js
+27
-27
gen.js
src/api/gen/gen.js
+12
-6
login.js
src/api/login.js
+40
-39
env.js
src/config/env.js
+6
-6
activiti.js
src/const/crud/activiti/activiti.js
+57
-57
leave-bill.js
src/const/crud/activiti/leave-bill.js
+34
-34
process.js
src/const/crud/activiti/process.js
+43
-43
task.js
src/const/crud/activiti/task.js
+119
-119
client.js
src/const/crud/admin/client.js
+21
-20
log.js
src/const/crud/admin/log.js
+19
-16
role.js
src/const/crud/admin/role.js
+70
-70
sys-social-details.js
src/const/crud/admin/sys-social-details.js
+74
-70
token.js
src/const/crud/admin/token.js
+48
-47
user.js
src/const/crud/admin/user.js
+124
-123
execution-log.js
src/const/crud/daemon/execution-log.js
+77
-77
status-trace-log.js
src/const/crud/daemon/status-trace-log.js
+81
-81
option.js
src/const/crud/option.js
+61
-61
dic.js
src/const/dic.js
+357
-357
errorCode.js
src/const/errorCode.js
+12
-12
index.js
src/const/logs/index.js
+36
-36
index.js
src/const/setting/index.js
+109
-109
website.js
src/const/website.js
+38
-38
error.js
src/error.js
+21
-20
index.js
src/filters/index.js
+100
-98
main.js
src/main.js
+13
-19
index.vue
src/page/lock/index.vue
+78
-72
index.vue
src/page/login/index.vue
+4
-5
userlogin.vue
src/page/login/userlogin.vue
+0
-1
wel.vue
src/page/wel.vue
+67
-63
permission.js
src/permission.js
+53
-53
getters.js
src/store/getters.js
+24
-24
index.js
src/store/index.js
+8
-8
common.js
src/store/modules/common.js
+140
-145
logs.js
src/store/modules/logs.js
+35
-34
tags.js
src/store/modules/tags.js
+53
-53
user.js
src/store/modules/user.js
+205
-204
admin.js
src/util/admin.js
+12
-12
auth.js
src/util/auth.js
+5
-4
date.js
src/util/date.js
+18
-18
store.js
src/util/store.js
+82
-83
util.js
src/util/util.js
+209
-208
validate.js
src/util/validate.js
+170
-162
detail.vue
src/views/activiti/detail.vue
+51
-42
index.vue
src/views/activiti/index.vue
+103
-101
leave.vue
src/views/activiti/leave.vue
+120
-117
process.vue
src/views/activiti/process.vue
+104
-102
task.vue
src/views/activiti/task.vue
+73
-67
index.vue
src/views/admin/client/index.vue
+102
-100
index.vue
src/views/admin/dept/index.vue
+145
-139
index.vue
src/views/admin/dict/index.vue
+99
-97
index.vue
src/views/admin/log/index.vue
+63
-62
index.vue
src/views/admin/menu/index.vue
+187
-182
index.vue
src/views/admin/role/index.vue
+168
-173
index.vue
src/views/admin/route/index.vue
+56
-56
index.vue
src/views/admin/social/index.vue
+109
-106
index.vue
src/views/admin/token/index.vue
+56
-55
index.vue
src/views/admin/user/index.vue
+183
-189
info.vue
src/views/admin/user/info.vue
+94
-107
index.vue
src/views/crud/index.vue
+77
-72
index.vue
src/views/daemon/execution-log/index.vue
+18
-17
index.vue
src/views/daemon/status-trace-log/index.vue
+101
-100
index.vue
src/views/dashboard/index.vue
+16
-15
index.vue
src/views/gen/index.vue
+55
-52
index.vue
src/views/tx/index.vue
+33
-32
model.vue
src/views/tx/model.vue
+40
-39
No files found.
src/App.vue
View file @
5a6b9195
<
template
>
<div
id=
"app"
>
<router-view
/>
<router-view/>
</div>
</
template
>
<
script
>
export
default
{
export
default
{
name
:
'app'
,
data
()
{
data
()
{
return
{}
},
watch
:
{},
created
()
{
},
created
()
{
},
methods
:
{},
computed
:
{}
}
}
</
script
>
<
style
lang=
"scss"
>
#app
{
#app
{
width
:
100%
;
height
:
100%
;
overflow
:
hidden
;
}
}
</
style
>
src/api/activiti/activiti.js
View file @
5a6b9195
src/api/activiti/leave-bill.js
View file @
5a6b9195
src/api/activiti/process.js
View file @
5a6b9195
...
...
@@ -32,7 +32,7 @@ export function delObj(id) {
})
}
export
function
status
(
id
,
type
)
{
export
function
status
(
id
,
type
)
{
return
request
({
url
:
'/act/process/status/'
+
id
+
"/"
+
type
,
method
:
'put'
...
...
src/api/activiti/task.js
View file @
5a6b9195
...
...
@@ -27,14 +27,14 @@ export function fetchList(query) {
export
function
fetchDetail
(
id
)
{
return
request
({
url
:
'/act/task/'
+
id
,
url
:
'/act/task/'
+
id
,
method
:
'get'
})
}
export
function
fetchComment
(
id
)
{
return
request
({
url
:
'/act/task/comment/'
+
id
,
url
:
'/act/task/comment/'
+
id
,
method
:
'get'
})
}
...
...
src/api/admin/dept.js
View file @
5a6b9195
src/api/admin/menu.js
View file @
5a6b9195
...
...
@@ -16,12 +16,14 @@
*/
import
request
from
'@/router/axios'
export
function
GetMenu
()
{
return
request
({
url
:
'/admin/menu'
,
method
:
'get'
})
}
export
function
fetchTree
(
query
)
{
return
request
({
url
:
'/admin/menu/tree'
,
...
...
src/api/admin/route.js
View file @
5a6b9195
...
...
@@ -24,6 +24,7 @@ export function fetchList(query) {
params
:
query
})
}
export
function
putObj
(
obj
)
{
return
request
({
url
:
'/admin/route'
,
...
...
src/api/admin/user.js
View file @
5a6b9195
src/api/gen/gen.js
View file @
5a6b9195
...
...
@@ -26,16 +26,22 @@ export function fetchList(query) {
}
export
function
handleDown
(
table
)
{
request
({
re
turn
re
quest
({
url
:
'/gen/generator/code'
,
method
:
'post'
,
data
:
table
,
responseType
:
'arraybuffer'
}).
then
((
response
)
=>
{
// 处理返回的文件流
let
blob
=
new
Blob
([
response
.
data
],
{
type
:
'application/zip'
}
)
let
link
=
document
.
createElement
(
'a'
)
link
.
href
=
window
.
URL
.
createObjectURL
(
blob
)
link
.
download
=
table
.
tableName
+
'.zip'
link
.
click
()
let
blob
=
new
Blob
([
response
.
data
],
{
type
:
'application/zip'
})
let
filename
=
table
.
tableName
+
'.zip'
let
link
=
document
.
createElement
(
'a'
);
link
.
href
=
URL
.
createObjectURL
(
blob
);
link
.
download
=
filename
;
document
.
body
.
appendChild
(
link
);
link
.
click
();
window
.
setTimeout
(
function
()
{
URL
.
revokeObjectURL
(
blob
);
document
.
body
.
removeChild
(
link
);
},
0
);
})
}
src/api/login.js
View file @
5a6b9195
...
...
@@ -15,6 +15,7 @@
* Author: lengleng (wangiegie@gmail.com)
*/
import
request
from
'@/router/axios'
export
const
loginByUsername
=
(
username
,
password
,
code
,
randomStr
)
=>
{
var
grant_type
=
'password'
var
scope
=
'server'
...
...
@@ -25,7 +26,7 @@ export const loginByUsername = (username, password, code, randomStr) => {
'Authorization'
:
'Basic cGlnOnBpZw=='
},
method
:
'post'
,
params
:
{
username
,
password
,
randomStr
,
code
,
grant_type
,
scope
}
params
:
{
username
,
password
,
randomStr
,
code
,
grant_type
,
scope
}
})
}
...
...
@@ -38,7 +39,7 @@ export const loginByMobile = (mobile, code) => {
'Authorization'
:
'Basic cGlnOnBpZw=='
},
method
:
'post'
,
params
:
{
mobile
:
'SMS@'
+
mobile
,
code
:
code
,
grant_type
}
params
:
{
mobile
:
'SMS@'
+
mobile
,
code
:
code
,
grant_type
}
})
}
...
...
@@ -51,7 +52,7 @@ export const loginBySocial = (state, code) => {
'Authorization'
:
'Basic cGlnOnBpZw=='
},
method
:
'post'
,
params
:
{
mobile
:
state
+
'@'
+
code
,
grant_type
}
params
:
{
mobile
:
state
+
'@'
+
code
,
grant_type
}
})
}
...
...
src/config/env.js
View file @
5a6b9195
src/const/crud/activiti/activiti.js
View file @
5a6b9195
src/const/crud/activiti/leave-bill.js
View file @
5a6b9195
...
...
@@ -25,7 +25,7 @@ export const tableOption = {
'editBtn'
:
false
,
'delBtn'
:
false
,
'addBtn'
:
false
,
menuType
:
'menu'
,
menuType
:
'menu'
,
'dicUrl'
:
'/admin/dict/type/leave_status'
,
'column'
:
[
{
...
...
@@ -49,7 +49,7 @@ export const tableOption = {
label
:
'请假时间'
,
prop
:
'leaveTime'
,
type
:
'datetime'
,
overHidden
:
true
,
overHidden
:
true
,
format
:
'yyyy-MM-dd HH:mm'
,
valueFormat
:
"yyyy-MM-dd hh:mm:ss"
},
...
...
@@ -57,7 +57,7 @@ export const tableOption = {
label
:
'提交时间'
,
prop
:
'createTime'
,
type
:
'datetime'
,
overHidden
:
true
,
overHidden
:
true
,
format
:
'yyyy-MM-dd HH:mm'
,
editDisabled
:
true
,
addVisdiplay
:
false
,
...
...
@@ -74,11 +74,11 @@ export const tableOption = {
{
label
:
'备注'
,
prop
:
'content'
,
type
:
'textarea'
,
overHidden
:
true
,
minRows
:
2
,
row
:
true
,
span
:
24
type
:
'textarea'
,
overHidden
:
true
,
minRows
:
2
,
row
:
true
,
span
:
24
}
]
}
src/const/crud/activiti/process.js
View file @
5a6b9195
...
...
@@ -26,7 +26,7 @@ export const tableOption = {
addBtn
:
false
,
editBtn
:
false
,
delBtn
:
false
,
menuType
:
'menu'
,
menuType
:
'menu'
,
searchShow
:
false
,
column
:
[{
fixed
:
true
,
...
...
src/const/crud/activiti/task.js
View file @
5a6b9195
...
...
@@ -50,8 +50,8 @@ export const tableOption = {
export
const
formOption
=
{
submitBtn
:
false
,
emptytBtn
:
false
,
row
:
true
,
span
:
12
,
row
:
true
,
span
:
12
,
column
:
[
{
label
:
"任务编号"
,
...
...
@@ -90,19 +90,19 @@ export const formOption = {
{
label
:
'事由'
,
prop
:
'content'
,
type
:
'textarea'
,
minRows
:
2
,
row
:
true
,
span
:
24
,
type
:
'textarea'
,
minRows
:
2
,
row
:
true
,
span
:
24
,
disabled
:
true
},
{
label
:
'批注'
,
prop
:
'comment'
,
type
:
'textarea'
,
minRows
:
2
,
row
:
true
,
span
:
24
,
type
:
'textarea'
,
minRows
:
2
,
row
:
true
,
span
:
24
,
rules
:
[{
required
:
true
,
message
:
"请输入备注"
,
...
...
@@ -113,25 +113,25 @@ export const formOption = {
}
export
const
taskOption
=
{
menu
:
false
,
page
:
false
,
addBtn
:
false
,
align
:
'center'
,
menuAlign
:
'center'
,
column
:
[
menu
:
false
,
page
:
false
,
addBtn
:
false
,
align
:
'center'
,
menuAlign
:
'center'
,
column
:
[
{
label
:
'id'
,
prop
:
'id'
,
label
:
'id'
,
prop
:
'id'
,
hide
:
true
},
{
label
:
'用户'
,
prop
:
'userId'
label
:
'用户'
,
prop
:
'userId'
},
{
label
:
'批注'
,
prop
:
'fullMessage'
},
{
label
:
'批注'
,
prop
:
'fullMessage'
},
{
label
:
"操作时间"
,
prop
:
"time"
,
type
:
"datetime"
,
...
...
src/const/crud/admin/client.js
View file @
5a6b9195
...
...
@@ -25,16 +25,17 @@ const DIC = {
}]
}
export
const
tableOption
=
{
'border'
:
true
,
'index'
:
true
,
'indexLabel'
:
'序号'
,
'stripe'
:
true
,
'menuAlign'
:
'center'
,
'align'
:
'center'
,
'editBtn'
:
false
,
'delBtn'
:
false
,
'dic'
:
[],
'column'
:
[{
border
:
true
,
index
:
true
,
indexLabel
:
'序号'
,
stripe
:
true
,
menuAlign
:
'center'
,
align
:
'center'
,
editBtn
:
false
,
delBtn
:
false
,
viewBtn
:
true
,
dic
:
[],
column
:
[{
width
:
150
,
label
:
'编号'
,
prop
:
'clientId'
,
...
...
@@ -46,11 +47,12 @@ export const tableOption = {
trigger
:
'blur'
}]
},
{
width
:
300
,
label
:
'密钥'
,
prop
:
'clientSecret'
,
align
:
'center'
,
sortable
:
true
,
overHidden
:
true
,
width
:
120
,
rules
:
[{
required
:
true
,
message
:
'请输入clientSecret'
,
...
...
@@ -71,7 +73,7 @@ export const tableOption = {
prop
:
'authorizedGrantTypes'
,
align
:
'center'
,
width
:
150
,
hide
:
true
,
overHidden
:
true
,
rules
:
[{
required
:
true
,
message
:
'请输入授权模式'
,
...
...
@@ -90,22 +92,20 @@ export const tableOption = {
width
:
150
,
hide
:
true
},
{
label
:
'
请求令牌
'
,
label
:
'
令牌时效
'
,
prop
:
'accessTokenValidity'
,
align
:
'center'
,
width
:
150
,
hide
:
true
width
:
80
},
{
label
:
'刷新
令牌
'
,
label
:
'刷新
时效
'
,
prop
:
'refreshTokenValidity'
,
align
:
'center'
,
width
:
150
,
hide
:
true
width
:
80
},
{
label
:
'扩展信息'
,
prop
:
'additionalInformation'
,
align
:
'center'
,
width
:
15
0
,
width
:
8
0
,
hide
:
true
},
{
label
:
'自动放行'
,
...
...
@@ -113,7 +113,7 @@ export const tableOption = {
align
:
'center'
,
type
:
'radio'
,
dicData
:
DIC
.
vaild
,
width
:
15
0
,
width
:
8
0
,
rules
:
[{
required
:
true
,
message
:
'请选择是否放行'
,
...
...
@@ -123,6 +123,7 @@ export const tableOption = {
label
:
'资源ID'
,
prop
:
'resourceIds'
,
align
:
'center'
,
hide
:
true
,
width
:
150
}]
}
src/const/crud/admin/log.js
View file @
5a6b9195
...
...
@@ -15,32 +15,33 @@
* Author: lengleng (wangiegie@gmail.com)
*/
export
const
tableOption
=
{
'border'
:
true
,
'index'
:
true
,
'indexLabel'
:
'序号'
,
'stripe'
:
true
,
'menuAlign'
:
'center'
,
'menuWidth'
:
150
,
'align'
:
'center'
,
'refreshBtn'
:
true
,
'showClomnuBtn'
:
false
,
'searchSize'
:
'mini'
,
'addBtn'
:
false
,
'editBtn'
:
false
,
'delBtn'
:
false
,
'dicUrl'
:
'/admin/dict/type/log_type'
,
border
:
true
,
index
:
true
,
indexLabel
:
'序号'
,
stripe
:
true
,
menuAlign
:
'center'
,
menuWidth
:
150
,
align
:
'center'
,
refreshBtn
:
true
,
showClomnuBtn
:
false
,
searchSize
:
'mini'
,
addBtn
:
false
,
editBtn
:
false
,
delBtn
:
false
,
viewBtn
:
true
,
dicUrl
:
'/admin/dict/type/log_type'
,
props
:
{
label
:
'label'
,
value
:
'value'
},
'column'
:
[{
column
:
[{
label
:
'类型'
,
prop
:
'type'
,
type
:
'select'
,
dicData
:
'log_type'
,
search
:
true
},
{
label
:
'
请求接口名称
'
,
label
:
'
标题
'
,
prop
:
'title'
},
{
label
:
'IP地址'
,
...
...
@@ -52,9 +53,11 @@ export const tableOption = {
label
:
'客户端'
,
prop
:
'serviceId'
},
{
width
:
80
,
label
:
'请求时间'
,
prop
:
'time'
},
{
width
:
150
,
label
:
'创建时间'
,
prop
:
'createTime'
,
type
:
'datetime'
,
...
...
src/const/crud/admin/role.js
View file @
5a6b9195
src/const/crud/admin/sys-social-details.js
View file @
5a6b9195
...
...
@@ -16,16 +16,17 @@
*/
export
const
tableOption
=
{
"border"
:
true
,
"index"
:
true
,
"stripe"
:
true
,
"menuAlign"
:
"center"
,
"align"
:
"center"
,
"editBtn"
:
false
,
"delBtn"
:
false
,
"addBtn"
:
false
,
'dicUrl'
:
'/admin/dict/type/social_type'
,
"column"
:
[{
border
:
true
,
index
:
true
,
stripe
:
true
,
menuAlign
:
"center"
,
align
:
"center"
,
editBtn
:
false
,
delBtn
:
false
,
addBtn
:
false
,
viewBtn
:
true
,
dicUrl
:
'/admin/dict/type/social_type'
,
column
:
[{
label
:
'ID'
,
prop
:
'id'
,
hide
:
true
,
...
...
@@ -51,6 +52,7 @@ export const tableOption = {
{
label
:
'appId'
,
prop
:
'appId'
,
overHidden
:
true
,
rules
:
[{
required
:
true
,
message
:
'请输入appId'
,
...
...
@@ -60,6 +62,7 @@ export const tableOption = {
{
label
:
'appSecret'
,
prop
:
'appSecret'
,
overHidden
:
true
,
rules
:
[{
required
:
true
,
message
:
'请输入appSecret'
,
...
...
@@ -69,6 +72,7 @@ export const tableOption = {
{
label
:
'回调地址'
,
prop
:
'redirectUrl'
,
hide
:
true
,
rules
:
[{
required
:
true
,
message
:
'请输入回调地址'
,
...
...
src/const/crud/admin/token.js
View file @
5a6b9195
...
...
@@ -25,17 +25,18 @@ const DIC = {
}]
}
export
const
tableOption
=
{
'border'
:
true
,
'index'
:
true
,
'indexLabel'
:
'序号'
,
'stripe'
:
true
,
'menuAlign'
:
'center'
,
'align'
:
'center'
,
'addBtn'
:
false
,
'editBtn'
:
false
,
'delBtn'
:
false
,
'dic'
:
[],
'column'
:
[{
border
:
true
,
index
:
true
,
indexLabel
:
'序号'
,
stripe
:
true
,
menuAlign
:
'center'
,
align
:
'center'
,
viewBtn
:
true
,
addBtn
:
false
,
editBtn
:
false
,
delBtn
:
false
,
dic
:
[],
column
:
[{
label
:
'用户ID'
,
prop
:
'user_id'
,
align
:
'center'
...
...
src/const/crud/admin/user.js
View file @
5a6b9195
...
...
@@ -14,7 +14,8 @@
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
import
{
getDetails
}
from
"@/api/admin/user"
;
import
{
getDetails
}
from
"@/api/admin/user"
;
var
validateUsername
=
(
rule
,
value
,
callback
)
=>
{
getDetails
(
value
).
then
(
response
=>
{
if
(
window
.
boxType
===
'edit'
)
callback
()
...
...
@@ -62,7 +63,7 @@ export const tableOption = {
message
:
"长度在 3 到 20 个字符"
,
trigger
:
"blur"
},
{
validator
:
validateUsername
,
trigger
:
'blur'
}
{
validator
:
validateUsername
,
trigger
:
'blur'
}
]
},
{
label
:
'密码'
,
...
...
@@ -101,7 +102,7 @@ export const tableOption = {
message
:
"长度在 11 个字符"
,
trigger
:
"blur"
}]
},
{
},
{
label
:
'角色'
,
prop
:
'role'
,
formsolt
:
true
,
...
...
src/const/crud/daemon/execution-log.js
View file @
5a6b9195
...
...
@@ -36,7 +36,7 @@ export const tableOption = {
'editBtn'
:
false
,
'delBtn'
:
false
,
'addBtn'
:
false
,
'viewBtn'
:
true
,
'viewBtn'
:
true
,
'dic'
:
[],
'column'
:
[
{
...
...
src/const/crud/daemon/status-trace-log.js
View file @
5a6b9195
src/const/crud/option.js
View file @
5a6b9195
src/const/dic.js
View file @
5a6b9195
src/const/errorCode.js
View file @
5a6b9195
src/const/logs/index.js
View file @
5a6b9195
src/const/setting/index.js
View file @
5a6b9195
...
...
@@ -43,7 +43,7 @@ export const option = (safe) => {
type
:
'switch'
,
span
:
24
,
dicData
:
dicData
,
click
:
({
column
})
=>
{
click
:
({
column
})
=>
{
_safe
.
set
(
column
.
prop
);
}
},
{
...
...
@@ -52,7 +52,7 @@ export const option = (safe) => {
type
:
'switch'
,
span
:
24
,
dicData
:
dicData
,
click
:
({
column
})
=>
{
click
:
({
column
})
=>
{
_safe
.
set
(
column
.
prop
);
}
},
{
...
...
@@ -61,7 +61,7 @@ export const option = (safe) => {
type
:
'switch'
,
span
:
24
,
dicData
:
dicData
,
click
:
({
column
})
=>
{
click
:
({
column
})
=>
{
_safe
.
set
(
column
.
prop
);
}
},
{
...
...
@@ -70,7 +70,7 @@ export const option = (safe) => {
type
:
'switch'
,
span
:
24
,
dicData
:
dicData
,
click
:
({
column
})
=>
{
click
:
({
column
})
=>
{
_safe
.
set
(
column
.
prop
);
}
},
{
...
...
@@ -79,7 +79,7 @@ export const option = (safe) => {
type
:
'switch'
,
span
:
24
,
dicData
:
dicData
,
click
:
({
column
})
=>
{
click
:
({
column
})
=>
{
_safe
.
set
(
column
.
prop
);
}
},
{
...
...
@@ -88,7 +88,7 @@ export const option = (safe) => {
type
:
'switch'
,
span
:
24
,
dicData
:
dicData
,
click
:
({
column
})
=>
{
click
:
({
column
})
=>
{
_safe
.
set
(
column
.
prop
);
}
},
{
...
...
@@ -97,7 +97,7 @@ export const option = (safe) => {
type
:
'switch'
,
span
:
24
,
dicData
:
dicData
,
click
:
({
column
})
=>
{
click
:
({
column
})
=>
{
_safe
.
set
(
column
.
prop
);
}
},
{
...
...
@@ -106,7 +106,7 @@ export const option = (safe) => {
type
:
'switch'
,
span
:
24
,
dicData
:
dicData
,
click
:
({
column
})
=>
{
click
:
({
column
})
=>
{
_safe
.
set
(
column
.
prop
);
}
},
{
...
...
@@ -115,7 +115,7 @@ export const option = (safe) => {
type
:
'switch'
,
span
:
24
,
dicData
:
dicData
,
click
:
({
column
})
=>
{
click
:
({
column
})
=>
{
_safe
.
set
(
column
.
prop
);
}
}]
...
...
src/const/website.js
View file @
5a6b9195
...
...
@@ -3,7 +3,7 @@ export default {
logo
:
"PigX"
,
indexTitle
:
'PigX Pro 快速开发框架'
,
whiteList
:
[
"/login"
,
"/404"
,
"/401"
,
"/lock"
],
//配置无权限可以访问的页面
whiteTagList
:
[
"/login"
,
"/404"
,
"/401"
,
"/lock"
,
],
//配置不添加tags页面 ('/advanced-router/mutative-detail/*'——*为通配符)
whiteTagList
:
[
"/login"
,
"/404"
,
"/401"
,
"/lock"
,
],
//配置不添加tags页面 ('/advanced-router/mutative-detail/*'——*为通配符)
lockPage
:
'/lock'
,
tokenTime
:
6000
,
info
:
{
...
...
src/error.js
View file @
5a6b9195
import
Vue
from
'vue'
;
import
store
from
'./store'
Vue
.
config
.
errorHandler
=
function
(
err
,
vm
,
info
)
{
Vue
.
config
.
errorHandler
=
function
(
err
,
vm
,
info
)
{
Vue
.
nextTick
(()
=>
{
store
.
commit
(
'ADD_LOGS'
,
{
...
...
src/filters/index.js
View file @
5a6b9195
...
...
@@ -4,6 +4,7 @@ function pluralize(time, label) {
}
return
time
+
label
+
's'
}
/**
* 日期格式化
*/
...
...
@@ -31,6 +32,7 @@ export function dateFormat(date) {
return
''
;
}
export
function
timeAgo
(
time
)
{
const
between
=
Date
.
now
()
/
1000
-
Number
(
time
)
if
(
between
<
3600
)
{
...
...
@@ -104,12 +106,12 @@ export function formatTime(time, option) {
/* 数字 格式化*/
export
function
nFormatter
(
num
,
digits
)
{
const
si
=
[
{
value
:
1
E18
,
symbol
:
'E'
},
{
value
:
1
E15
,
symbol
:
'P'
},
{
value
:
1
E12
,
symbol
:
'T'
},
{
value
:
1
E9
,
symbol
:
'G'
},
{
value
:
1
E6
,
symbol
:
'M'
},
{
value
:
1
E3
,
symbol
:
'k'
}
{
value
:
1
E18
,
symbol
:
'E'
},
{
value
:
1
E15
,
symbol
:
'P'
},
{
value
:
1
E12
,
symbol
:
'T'
},
{
value
:
1
E9
,
symbol
:
'G'
},
{
value
:
1
E6
,
symbol
:
'M'
},
{
value
:
1
E3
,
symbol
:
'k'
}
]
for
(
let
i
=
0
;
i
<
si
.
length
;
i
++
)
{
if
(
num
>=
si
[
i
].
value
)
{
...
...
src/main.js
View file @
5a6b9195
...
...
@@ -10,32 +10,26 @@ import router from './router/router';
import
'avue-plugin-transfer/packages'
//引入avue-plugin-transfer插件
// import 'avue-plugin-ueditor/packages' //引入avue-plugin-ueditor插件(如果要兼容ie自行换掉富文本编辑器,此款插件不兼容ie)
import
store
from
'./store'
;
import
{
loadStyle
}
from
'./util/util'
import
{
loadStyle
}
from
'./util/util'
import
*
as
urls
from
'@/config/env'
;
import
{
iconfontUrl
,
iconfontVersion
}
from
'@/config/env'
;
import
{
iconfontUrl
,
iconfontVersion
}
from
'@/config/env'
;
import
*
as
filters
from
'./filters'
// 全局filter
import
'./styles/common.scss'
;
// // 引入avue的包
import
Avue
from
'@smallwei/avue/lib/index.js'
;
// // 引入avue的样式文件
import
'@smallwei/avue/lib/theme-chalk/index.css'
;
// //源文件包
// import '../packages/index.js';
// import '../packages/theme-chalk/src/index.scss';
import
basicContainer
from
'./components/basic-container/main'
import
VueClipboard
from
'vue-clipboard2'
// 插件 json 展示
import
vueJsonTreeView
from
'vue-json-tree-view'
// //源文件包
// import '../packages/index.js';
// import '../packages/theme-chalk/src/index.scss';
Vue
.
use
(
Avue
,
{
menuType
:
'text'
});
Vue
.
use
(
Avue
,
{
menuType
:
'text'
});
Vue
.
use
(
router
)
...
...
src/page/lock/index.vue
View file @
5a6b9195
...
...
@@ -22,18 +22,21 @@
</div>
</
template
>
<
script
>
import
{
mapGetters
,
mapState
}
from
"vuex"
;
export
default
{
import
{
mapGetters
,
mapState
}
from
"vuex"
;
export
default
{
name
:
"lock"
,
data
()
{
data
()
{
return
{
passwd
:
""
,
passwdError
:
false
,
pass
:
false
};
},
created
()
{
},
mounted
()
{
},
created
()
{
},
mounted
()
{
},
computed
:
{
...
mapState
({
userInfo
:
state
=>
state
.
user
.
userInfo
...
...
@@ -42,18 +45,18 @@ export default {
},
props
:
[],
methods
:
{
handleLogout
()
{
handleLogout
()
{
this
.
$confirm
(
"是否退出系统, 是否继续?"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(()
=>
{
this
.
$store
.
dispatch
(
"LogOut"
).
then
(()
=>
{
this
.
$router
.
push
({
path
:
"/login"
});
this
.
$router
.
push
({
path
:
"/login"
});
});
});
},
handleLogin
()
{
handleLogin
()
{
if
(
this
.
passwd
!=
this
.
lockPasswd
)
{
this
.
passwd
=
""
;
this
.
$message
({
...
...
@@ -69,26 +72,28 @@ export default {
this
.
pass
=
true
;
setTimeout
(()
=>
{
this
.
$store
.
commit
(
"CLEAR_LOCK"
);
this
.
$router
.
push
({
path
:
this
.
$router
.
$avueRouter
.
getPath
({
src
:
this
.
tag
.
value
})
});
this
.
$router
.
push
({
path
:
this
.
$router
.
$avueRouter
.
getPath
({
src
:
this
.
tag
.
value
})
});
},
1000
);
}
},
components
:
{}
};
};
</
script
>
<
style
lang=
"scss"
>
.lock-container
{
.lock-container
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
position
:
relative
;
.title
{
margin-bottom
:
8px
;
color
:
#333
;
}
}
.
lock-container
:
:
before
{
}
.
lock-container
:
:
before
{
z-index
:
-999
;
content
:
''
;
position
:
absolute
;
...
...
@@ -98,8 +103,9 @@ export default {
height
:
100%
;
background-image
:
url('/img/login.png')
;
background-size
:
cover
;
}
.lock-form
{
}
.lock-form
{
width
:
300px
;
}
}
</
style
>
src/page/login/index.vue
View file @
5a6b9195
...
...
@@ -20,11 +20,10 @@
class=
"login-select animated fadeIn"
v-model=
"active"
@
change=
"handleCommand"
placeholder=
"请选择租户,不选为默认"
size=
"mini"
>
<el-option
label=
"租户1"
value=
"1"
></el-option>
<el-option
label=
"租户2"
value=
"2"
></el-option>
placeholder=
"点击请选择租户"
size=
"mini"
>
<el-option
label=
"租户1 用户登录"
value=
"1"
></el-option>
<el-option
label=
"租户2 用户登录"
value=
"2"
></el-option>
</el-select>
</h4>
<userLogin
v-if=
"activeName==='user'"
></userLogin>
...
...
src/page/login/userlogin.vue
View file @
5a6b9195
...
...
@@ -57,7 +57,6 @@
</el-row>
</el-form-item>
<el-checkbox
v-model=
"checked"
>
记住账号
</el-checkbox>
<el-form-item>
<el-button
type=
"primary"
size=
"small"
...
...
src/page/wel.vue
View file @
5a6b9195
...
...
@@ -57,7 +57,8 @@
</
template
>
<
script
>
import
{
mapGetters
}
from
'vuex'
;
import
{
mapGetters
}
from
'vuex'
;
export
default
{
name
:
'wel'
,
data
()
{
...
...
@@ -129,6 +130,7 @@
.wel-contailer
{
position
:
relative
;
}
.banner-text
{
position
:
relative
;
padding
:
0
20px
;
...
...
@@ -136,6 +138,7 @@
text-align
:
center
;
color
:
#333
;
}
.banner-img
{
position
:
absolute
;
top
:
0
;
...
...
@@ -145,6 +148,7 @@
opacity
:
0
.8
;
display
:
none
;
}
.actor
{
height
:
250px
;
overflow
:
hidden
;
...
...
src/permission.js
View file @
5a6b9195
...
...
@@ -4,11 +4,11 @@
*/
import
router
from
'./router/router'
import
store
from
'./store'
import
{
validatenull
}
from
'@/util/validate'
import
{
getToken
}
from
'@/util/auth'
import
{
validatenull
}
from
'@/util/validate'
import
{
getToken
}
from
'@/util/auth'
import
NProgress
from
'nprogress'
// progress bar
import
'nprogress/nprogress.css'
// progress bar style
NProgress
.
configure
({
showSpinner
:
false
});
NProgress
.
configure
({
showSpinner
:
false
});
const
lockPage
=
store
.
getters
.
website
.
lockPage
;
//锁屏页
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
//缓冲设置
...
...
@@ -27,16 +27,16 @@ router.beforeEach((to, from, next) => {
const
meta
=
to
.
meta
||
{};
if
(
getToken
())
{
if
(
store
.
getters
.
isLock
&&
to
.
path
!=
lockPage
)
{
next
({
path
:
lockPage
})
next
({
path
:
lockPage
})
}
else
if
(
to
.
path
===
'/login'
)
{
next
({
path
:
'/'
})
next
({
path
:
'/'
})
}
else
{
if
(
store
.
getters
.
roles
.
length
===
0
)
{
store
.
dispatch
(
'GetUserInfo'
).
then
(()
=>
{
next
({...
to
,
replace
:
true
})
next
({...
to
,
replace
:
true
})
}).
catch
(()
=>
{
store
.
dispatch
(
'FedLogOut'
).
then
(()
=>
{
next
({
path
:
'/login'
})
next
({
path
:
'/login'
})
})
})
}
else
{
...
...
src/store/getters.js
View file @
5a6b9195
src/store/index.js
View file @
5a6b9195
src/store/modules/common.js
View file @
5a6b9195
import
{
setStore
,
getStore
,
removeStore
}
from
'@/util/store'
import
{
getStore
,
removeStore
,
setStore
}
from
'@/util/store'
import
website
from
'@/const/website'
const
common
=
{
state
:
{
...
...
@@ -11,24 +8,22 @@ const common = {
isFullScren
:
false
,
isShade
:
false
,
screen
:
-
1
,
isLock
:
getStore
({
name
:
'isLock'
})
||
false
,
showTag
:
getStore
({
name
:
'showTag'
}),
showDebug
:
getStore
({
name
:
'showDebug'
}),
showCollapse
:
getStore
({
name
:
'showCollapse'
}),
showSearch
:
getStore
({
name
:
'showSearch'
}),
showLock
:
getStore
({
name
:
'showLock'
}),
showFullScren
:
getStore
({
name
:
'showFullScren'
}),
showTheme
:
getStore
({
name
:
'showTheme'
}),
showColor
:
getStore
({
name
:
'showColor'
}),
showMenu
:
getStore
({
name
:
'showMenu'
}),
theme
:
getStore
({
name
:
'theme'
})
||
'#409EFF'
,
themeName
:
getStore
({
name
:
'themeName'
})
||
''
,
lockPasswd
:
getStore
({
name
:
'lockPasswd'
})
||
''
,
isLock
:
getStore
({
name
:
'isLock'
})
||
false
,
showTag
:
getStore
({
name
:
'showTag'
}),
showDebug
:
getStore
({
name
:
'showDebug'
}),
showCollapse
:
getStore
({
name
:
'showCollapse'
}),
showSearch
:
getStore
({
name
:
'showSearch'
}),
showLock
:
getStore
({
name
:
'showLock'
}),
showFullScren
:
getStore
({
name
:
'showFullScren'
}),
showTheme
:
getStore
({
name
:
'showTheme'
}),
showColor
:
getStore
({
name
:
'showColor'
}),
showMenu
:
getStore
({
name
:
'showMenu'
}),
theme
:
getStore
({
name
:
'theme'
})
||
'#409EFF'
,
themeName
:
getStore
({
name
:
'themeName'
})
||
''
,
lockPasswd
:
getStore
({
name
:
'lockPasswd'
})
||
''
,
website
:
website
,
},
actions
:
{
},
actions
:
{},
mutations
:
{
SET_SHADE
:
(
state
,
active
)
=>
{
state
.
isShade
=
active
;
...
...
src/store/modules/logs.js
View file @
5a6b9195
import
{
setStore
,
getStore
}
from
'@/util/store'
import
{
dateFormat
}
from
'@/filters/'
import
{
sendLogs
}
from
'@/api/admin/log'
import
{
getStore
,
setStore
}
from
'@/util/store'
import
{
dateFormat
}
from
'@/filters/'
import
{
sendLogs
}
from
'@/api/admin/log'
const
logs
=
{
state
:
{
logsList
:
getStore
({
name
:
'logsList'
})
||
[],
logsList
:
getStore
({
name
:
'logsList'
})
||
[],
},
actions
:
{
//发送错误日志
SendLogs
({
state
,
commit
})
{
SendLogs
({
state
,
commit
})
{
return
new
Promise
((
resolve
,
reject
)
=>
{
sendLogs
(
state
.
logsList
).
then
(()
=>
{
commit
(
'CLEAR_LOGS'
);
...
...
@@ -19,7 +20,7 @@ const logs = {
},
},
mutations
:
{
ADD_LOGS
:
(
state
,
{
type
,
message
,
stack
,
info
})
=>
{
ADD_LOGS
:
(
state
,
{
type
,
message
,
stack
,
info
})
=>
{
state
.
logsList
.
push
(
Object
.
assign
({
url
:
window
.
location
.
href
,
time
:
dateFormat
(
new
Date
())
...
...
@@ -29,11 +30,11 @@ const logs = {
stack
,
info
:
info
.
toString
()
}))
setStore
({
name
:
'logsList'
,
content
:
state
.
logsList
})
setStore
({
name
:
'logsList'
,
content
:
state
.
logsList
})
},
CLEAR_LOGS
:
(
state
)
=>
{
state
.
logsList
=
[];
setStore
({
name
:
'logsList'
,
content
:
state
.
logsList
})
setStore
({
name
:
'logsList'
,
content
:
state
.
logsList
})
}
}
...
...
src/store/modules/tags.js
View file @
5a6b9195
import
{
setStore
,
getStore
}
from
'@/util/store'
import
{
diff
}
from
'@/util/util'
import
{
getStore
,
setStore
}
from
'@/util/store'
import
{
diff
}
from
'@/util/util'
import
website
from
'@/const/website'
const
isFirstPage
=
website
.
isFirstPage
;
const
tagWel
=
website
.
fistPage
;
const
tagObj
=
{
...
...
@@ -9,8 +10,9 @@ const tagObj = {
params
:
''
,
//标题的路径参数
query
:
''
,
//标题的参数
group
:
[],
//分组
}
//处理首个标签
}
//处理首个标签
function
setFistTag
(
list
)
{
if
(
list
.
length
==
1
)
{
list
[
0
].
close
=
false
;
...
...
@@ -28,37 +30,35 @@ function setFistTag(list) {
const
navs
=
{
state
:
{
tagList
:
getStore
({
name
:
'tagList'
})
||
[],
tag
:
getStore
({
name
:
'tag'
})
||
tagObj
,
tagList
:
getStore
({
name
:
'tagList'
})
||
[],
tag
:
getStore
({
name
:
'tag'
})
||
tagObj
,
tagWel
:
tagWel
},
actions
:
{
},
actions
:
{},
mutations
:
{
ADD_TAG
:
(
state
,
action
)
=>
{
state
.
tag
=
action
;
setStore
({
name
:
'tag'
,
content
:
state
.
tag
,
type
:
'session'
})
setStore
({
name
:
'tag'
,
content
:
state
.
tag
,
type
:
'session'
})
if
(
state
.
tagList
.
some
(
ele
=>
diff
(
ele
,
action
)))
return
state
.
tagList
.
push
(
action
)
setFistTag
(
state
.
tagList
);
setStore
({
name
:
'tagList'
,
content
:
state
.
tagList
,
type
:
'session'
})
setStore
({
name
:
'tagList'
,
content
:
state
.
tagList
,
type
:
'session'
})
},
DEL_TAG
:
(
state
,
action
)
=>
{
state
.
tagList
=
state
.
tagList
.
filter
(
item
=>
{
return
!
diff
(
item
,
action
);
})
setFistTag
(
state
.
tagList
);
setStore
({
name
:
'tagList'
,
content
:
state
.
tagList
,
type
:
'session'
})
setStore
({
name
:
'tagList'
,
content
:
state
.
tagList
,
type
:
'session'
})
},
DEL_ALL_TAG
:
(
state
)
=>
{
state
.
tagList
=
[
state
.
tagWel
];
setStore
({
name
:
'tagList'
,
content
:
state
.
tagList
,
type
:
'session'
})
setStore
({
name
:
'tagList'
,
content
:
state
.
tagList
,
type
:
'session'
})
},
DEL_TAG_OTHER
:
(
state
)
=>
{
state
.
tagList
=
state
.
tagList
.
filter
(
item
=>
item
.
value
===
state
.
tag
.
value
)
setFistTag
(
state
.
tagList
);
setStore
({
name
:
'tagList'
,
content
:
state
.
tagList
,
type
:
'session'
})
setStore
({
name
:
'tagList'
,
content
:
state
.
tagList
,
type
:
'session'
})
},
}
}
...
...
src/store/modules/user.js
View file @
5a6b9195
import
{
setToken
,
removeToken
}
from
'@/util/auth'
import
{
setStore
,
getStore
}
from
'@/util/store'
import
{
isURL
}
from
'@/util/validate'
import
{
logout
,
loginByUsername
,
loginByMobile
,
loginBySocial
,
getUserInfo
}
from
'@/api/login'
import
{
encryption
,
deepClone
}
from
'@/util/util'
import
{
removeToken
,
setToken
}
from
'@/util/auth'
import
{
getStore
,
setStore
}
from
'@/util/store'
import
{
isURL
}
from
'@/util/validate'
import
{
getUserInfo
,
loginByMobile
,
loginBySocial
,
loginByUsername
,
logout
}
from
'@/api/login'
import
{
deepClone
,
encryption
}
from
'@/util/util'
import
webiste
from
'@/const/website'
;
import
{
GetMenu
}
from
'@/api/admin/menu'
import
{
GetMenu
}
from
'@/api/admin/menu'
function
addPath
(
ele
,
first
)
{
const
propsConfig
=
webiste
.
menu
.
props
;
...
...
@@ -21,11 +21,12 @@ function addPath(ele, first) {
}
ele
[
propsDefault
.
children
].
forEach
(
child
=>
{
if
(
!
isURL
(
child
[
propsDefault
.
path
]))
{
child
[
propsDefault
.
path
]
=
`
${
ele
[
propsDefault
.
path
]}
/
${
child
[
propsDefault
.
path
]?
child
[
propsDefault
.
path
]:
'index'
}
`
child
[
propsDefault
.
path
]
=
`
${
ele
[
propsDefault
.
path
]}
/
${
child
[
propsDefault
.
path
]
?
child
[
propsDefault
.
path
]
:
'index'
}
`
}
addPath
(
child
);
})
}
const
user
=
{
state
:
{
userInfo
:
{},
...
...
@@ -44,7 +45,7 @@ const user = {
},
actions
:
{
//根据用户名登录
LoginByUsername
({
commit
},
userInfo
)
{
LoginByUsername
({
commit
},
userInfo
)
{
const
user
=
encryption
({
data
:
userInfo
,
key
:
'pigxpigxpigxpigx'
,
...
...
@@ -64,7 +65,7 @@ const user = {
})
},
//根据手机号登录
LoginByPhone
({
commit
},
userInfo
)
{
LoginByPhone
({
commit
},
userInfo
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
loginByMobile
(
userInfo
.
mobile
,
userInfo
.
code
).
then
(
response
=>
{
const
data
=
response
.
data
...
...
@@ -79,7 +80,7 @@ const user = {
})
},
// 根据OpenId登录
LoginBySocial
({
commit
},
param
)
{
LoginBySocial
({
commit
},
param
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
loginBySocial
(
param
.
state
,
param
.
code
).
then
(
response
=>
{
const
data
=
response
.
data
...
...
@@ -93,7 +94,7 @@ const user = {
})
})
},
GetUserInfo
({
commit
})
{
GetUserInfo
({
commit
})
{
return
new
Promise
((
resolve
,
reject
)
=>
{
getUserInfo
().
then
((
res
)
=>
{
const
data
=
res
.
data
.
data
||
{};
...
...
@@ -107,7 +108,7 @@ const user = {
})
},
//刷新token
RefeshToken
({
commit
})
{
RefeshToken
({
commit
})
{
return
new
Promise
((
resolve
,
reject
)
=>
{
logout
().
then
(()
=>
{
commit
(
'SET_TOKEN'
,
new
Date
().
getTime
());
...
...
@@ -119,7 +120,7 @@ const user = {
})
},
// 登出
LogOut
({
commit
})
{
LogOut
({
commit
})
{
return
new
Promise
((
resolve
,
reject
)
=>
{
logout
().
then
(()
=>
{
commit
(
'SET_MENU'
,
[])
...
...
@@ -138,7 +139,7 @@ const user = {
})
},
//注销session
FedLogOut
({
commit
})
{
FedLogOut
({
commit
})
{
return
new
Promise
(
resolve
=>
{
commit
(
'SET_MENU'
,
[])
commit
(
'SET_PERMISSIONS'
,
[])
...
...
src/util/admin.js
View file @
5a6b9195
export
default
{
getScreen
:
function
()
{
getScreen
:
function
()
{
var
width
=
document
.
body
.
clientWidth
;
if
(
width
>=
1200
)
{
return
3
;
//大屏幕
...
...
src/util/auth.js
View file @
5a6b9195
import
Cookies
from
'js-cookie'
const
TokenKey
=
'x-access-token'
export
function
getToken
()
{
...
...
src/util/date.js
View file @
5a6b9195
src/util/store.js
View file @
5a6b9195
import
{
validatenull
}
from
'@/util/validate'
;
import
{
validatenull
}
from
'@/util/validate'
;
/**
* 存储localStorage
*/
...
...
@@ -11,15 +10,15 @@ export const setStore = (params) => {
type
,
}
=
params
;
let
obj
=
{
dataType
:
typeof
(
content
),
dataType
:
typeof
(
content
),
content
:
content
,
type
:
type
,
datetime
:
new
Date
().
getTime
()
}
if
(
type
)
window
.
sessionStorage
.
setItem
(
name
,
JSON
.
stringify
(
obj
));
else
window
.
localStorage
.
setItem
(
name
,
JSON
.
stringify
(
obj
));
}
/**
}
/**
* 获取localStorage
*/
...
...
@@ -47,8 +46,8 @@ export const getStore = (params) => {
content
=
obj
.
content
;
}
return
content
;
}
/**
}
/**
* 删除localStorage
*/
export
const
removeStore
=
params
=>
{
...
...
src/util/util.js
View file @
5a6b9195
import
{
validatenull
}
from
'./validate'
import
{
validatenull
}
from
'./validate'
//表单序列化
export
const
serialize
=
data
=>
{
let
list
=
[];
...
...
@@ -77,8 +77,8 @@ export const diff = (obj1, obj2) => {
}
}
return
true
;
}
/**
}
/**
* 设置灰度模式
*/
export
const
toggleGrayMode
=
(
status
)
=>
{
...
...
@@ -147,16 +147,17 @@ export const listenfullscreen = (callback) => {
function
listen
()
{
callback
()
}
document
.
addEventListener
(
"fullscreenchange"
,
function
()
{
document
.
addEventListener
(
"fullscreenchange"
,
function
()
{
listen
();
});
document
.
addEventListener
(
"mozfullscreenchange"
,
function
()
{
document
.
addEventListener
(
"mozfullscreenchange"
,
function
()
{
listen
();
});
document
.
addEventListener
(
"webkitfullscreenchange"
,
function
()
{
document
.
addEventListener
(
"webkitfullscreenchange"
,
function
()
{
listen
();
});
document
.
addEventListener
(
"msfullscreenchange"
,
function
()
{
document
.
addEventListener
(
"msfullscreenchange"
,
function
()
{
listen
();
});
};
...
...
@@ -236,19 +237,19 @@ export const loadStyle = url => {
export
const
isObjectValueEqual
=
(
a
,
b
)
=>
{
let
result
=
true
;
Object
.
keys
(
a
).
forEach
(
ele
=>
{
const
type
=
typeof
(
a
[
ele
]);
const
type
=
typeof
(
a
[
ele
]);
if
(
type
===
'string'
&&
a
[
ele
]
!==
b
[
ele
])
result
=
false
;
else
if
(
type
===
'object'
&&
JSON
.
stringify
(
a
[
ele
])
!==
JSON
.
stringify
(
b
[
ele
]))
result
=
false
;
})
return
result
;
}
/**
}
/**
* 根据字典的value显示label
*/
export
const
findByvalue
=
(
dic
,
value
)
=>
{
let
result
=
''
;
if
(
validatenull
(
dic
))
return
value
;
if
(
typeof
(
value
)
==
'string'
||
typeof
(
value
)
==
'number'
||
typeof
(
value
)
==
'boolean'
)
{
if
(
typeof
(
value
)
==
'string'
||
typeof
(
value
)
==
'number'
||
typeof
(
value
)
==
'boolean'
)
{
let
index
=
0
;
index
=
findArray
(
dic
,
value
);
if
(
index
!=
-
1
)
{
...
...
src/util/validate.js
View file @
5a6b9195
...
...
@@ -29,6 +29,7 @@ export function isPhone(s) {
export
function
isURL
(
s
)
{
return
/^http
[
s
]?
:
\/\/
.*/
.
test
(
s
)
}
export
function
isvalidUsername
(
str
)
{
const
valid_map
=
[
'admin'
,
'editor'
]
return
valid_map
.
indexOf
(
str
.
trim
())
>=
0
...
...
@@ -57,8 +58,9 @@ export function validatAlphabets(str) {
const
reg
=
/^
[
A-Za-z
]
+$/
return
reg
.
test
(
str
)
}
/*验证pad还是pc*/
export
const
vaildatePc
=
function
()
{
export
const
vaildatePc
=
function
()
{
const
userAgentInfo
=
navigator
.
userAgent
;
const
Agents
=
[
"Android"
,
"iPhone"
,
"SymbianOS"
,
"Windows Phone"
,
...
...
@@ -72,8 +74,9 @@ export const vaildatePc = function() {
}
}
return
flag
;
}
/**
}
/**
* validate email
* @param email
* @returns {boolean}
...
...
@@ -167,6 +170,7 @@ export function cardid(code) {
list
.
push
(
msg
);
return
list
;
}
/**
* 判断手机号码是否正确
*/
...
...
@@ -193,6 +197,7 @@ export function isvalidatemobile(phone) {
list
.
push
(
msg
);
return
list
;
}
/**
* 判断姓名是否正确
*/
...
...
@@ -201,6 +206,7 @@ export function validatename(name) {
if
(
!
regName
.
test
(
name
))
return
false
;
return
true
;
}
/**
* 判断是否为整数
*/
...
...
@@ -214,6 +220,7 @@ export function validatenum(num, type) {
}
return
true
;
}
/**
* 判断是否为小数
*/
...
...
@@ -227,6 +234,7 @@ export function validatenumord(num, type) {
}
return
true
;
}
/**
* 判断是否为空
*/
...
...
src/views/activiti/detail.vue
View file @
5a6b9195
...
...
@@ -5,7 +5,8 @@
<p
class=
"header__title"
>
{{
name
}}
</p>
<el-button
class=
"header__btn"
type=
"primary"
@
click=
"breaks"
>
关闭返回列表
</el-button>
@
click=
"breaks"
>
关闭返回列表
</el-button>
</div>
</basic-container>
...
...
@@ -17,51 +18,59 @@
</
template
>
<
script
>
export
default
{
data
()
{
export
default
{
data
()
{
return
{
id
:
''
,
name
:
''
}
},
created
()
{
created
()
{
this
.
id
=
this
.
$route
.
params
.
id
this
.
name
=
this
.
$route
.
query
.
name
},
computed
:
{
src
()
{
src
()
{
return
`
${
this
.
actUrl
}${
this
.
id
}
`
;
}
},
methods
:
{
breaks
()
{
breaks
()
{
this
.
$router
.
$avueRouter
.
closeTag
();
this
.
$router
.
push
({
path
:
'/activti/activiti'
})
this
.
$router
.
push
({
path
:
'/activti/activiti'
})
}
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.header
{
.execution
{
height
:
99%
;
.header
{
position
:
relative
;
display
:
flex
;
align-items
:
center
;
&
__title
{
font-size
:
22px
;
}
&
__btn
{
position
:
absolute
;
right
:
10px
;
}
}
.main
{
}
.main
{
margin
:
0
auto
;
width
:
99%
;
height
:
800px
;
height
:
calc
(
100%
-
100px
)
;
background-color
:
#fff
;
padding
:
20px
;
border-radius
:
3px
;
box-sizing
:
border-box
;
}
}
}
</
style
>
src/views/activiti/index.vue
View file @
5a6b9195
...
...
@@ -32,13 +32,16 @@
slot=
"menuBtn"
>
<el-dropdown-item
divided
v-if=
"permissions.act_model_manage"
@
click
.
native=
"handleView(scope.row,scope.index)"
>
模型图
</el-dropdown-item>
@
click
.
native=
"handleView(scope.row,scope.index)"
>
模型图
</el-dropdown-item>
<el-dropdown-item
divided
v-if=
"permissions.act_model_manage"
@
click
.
native=
"handleDeploy(scope.row,scope.index)"
>
部署
</el-dropdown-item>
@
click
.
native=
"handleDeploy(scope.row,scope.index)"
>
部署
</el-dropdown-item>
<el-dropdown-item
divided
v-if=
"permissions.act_model_manage"
@
click
.
native=
"handleDel(scope.row,scope.index)"
>
删除
</el-dropdown-item>
@
click
.
native=
"handleDel(scope.row,scope.index)"
>
删除
</el-dropdown-item>
</
template
>
</avue-crud>
...
...
@@ -47,12 +50,13 @@
</template>
<
script
>
import
{
fetchList
,
delObj
,
addObj
,
deploy
}
from
'@/api/activiti/activiti'
import
{
tableOption
}
from
'@/const/crud/activiti/activiti'
import
{
mapGetters
}
from
'vuex'
export
default
{
import
{
addObj
,
delObj
,
deploy
,
fetchList
}
from
'@/api/activiti/activiti'
import
{
tableOption
}
from
'@/const/crud/activiti/activiti'
import
{
mapGetters
}
from
'vuex'
export
default
{
name
:
'activiti'
,
data
()
{
data
()
{
return
{
tableData
:
[],
page
:
{
...
...
@@ -64,14 +68,15 @@ export default {
tableOption
:
tableOption
}
},
created
()
{
created
()
{
},
mounted
:
function
()
{
},
mounted
:
function
()
{
},
computed
:
{
...
mapGetters
([
'permissions'
])
},
methods
:
{
getList
(
page
,
params
)
{
getList
(
page
,
params
)
{
this
.
tableLoading
=
true
fetchList
(
Object
.
assign
({
descs
:
'create_time'
,
...
...
@@ -83,7 +88,7 @@ export default {
this
.
tableLoading
=
false
})
},
handleView
(
row
,
index
)
{
handleView
(
row
,
index
)
{
const
name
=
`模型id为
${
row
.
id
}
的
${
row
.
name
}
流程图`
,
src
=
`/activti/detail/
${
row
.
id
}
`
;
this
.
$router
.
push
({
...
...
@@ -93,7 +98,7 @@ export default {
}
})
},
handleDel
(
row
,
index
)
{
handleDel
(
row
,
index
)
{
this
.
$refs
.
crud
.
rowDel
(
row
,
index
)
},
handleDeploy
:
function
(
row
,
index
)
{
...
...
@@ -104,16 +109,15 @@ export default {
type
:
'warning'
}).
then
(
function
()
{
return
deploy
(
row
.
id
)
})
.
then
(
data
=>
{
}).
then
(
data
=>
{
this
.
getList
(
this
.
page
)
_this
.
$message
({
showClose
:
true
,
message
:
'部署成功'
,
type
:
'success'
})
}).
catch
(
function
(
err
)
{
})
.
catch
(
function
(
err
)
{
})
},
rowDel
:
function
(
row
,
index
)
{
var
_this
=
this
...
...
@@ -121,19 +125,17 @@ export default {
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
.
then
(
function
()
{
}).
then
(
function
()
{
return
delObj
(
row
.
id
)
})
.
then
(
data
=>
{
}).
then
(
data
=>
{
this
.
getList
(
this
.
page
)
_this
.
$message
({
showClose
:
true
,
message
:
'删除成功'
,
type
:
'success'
})
}).
catch
(
function
(
err
)
{
})
.
catch
(
function
(
err
)
{
})
},
/**
* @title 数据添加
...
...
@@ -156,17 +158,17 @@ export default {
/**
* 搜索回调
*/
searchChange
(
form
)
{
this
.
getList
(
this
.
page
,
form
)
searchChange
(
form
)
{
this
.
getList
(
this
.
page
,
form
)
},
/**
* 刷新回调
*/
refreshChange
()
{
refreshChange
()
{
this
.
getList
(
this
.
page
)
}
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
src/views/activiti/leave.vue
View file @
5a6b9195
...
...
@@ -33,20 +33,24 @@
<el-button
type=
"primary"
@
click=
"handleAdd"
size=
"small"
v-if=
"permissions.act_leavebill_add"
>
新 增
</el-button>
v-if=
"permissions.act_leavebill_add"
>
新 增
</el-button>
</
template
>
<
template
slot-scope=
"scope"
slot=
"menuBtn"
>
<el-dropdown-item
divided
v-if=
"permissions.act_leavebill_edit && scope.row.state == 0"
@
click
.
native=
"handleSubmit(scope.row,scope.index)"
>
提交
</el-dropdown-item>
@
click
.
native=
"handleSubmit(scope.row,scope.index)"
>
提交
</el-dropdown-item>
<el-dropdown-item
divided
v-if=
"permissions.act_leavebill_edit"
@
click
.
native=
"handleEdit(scope.row,scope.index)"
>
编辑
</el-dropdown-item>
@
click
.
native=
"handleEdit(scope.row,scope.index)"
>
编辑
</el-dropdown-item>
<el-dropdown-item
divided
v-if=
"permissions.act_leavebill_del"
@
click
.
native=
"handleDel(scope.row,'suspend')"
>
删除
</el-dropdown-item>
@
click
.
native=
"handleDel(scope.row,'suspend')"
>
删除
</el-dropdown-item>
</
template
>
</avue-crud>
</basic-container>
...
...
@@ -54,9 +58,10 @@
</template>
<
script
>
import
{
fetchList
,
getObj
,
addObj
,
putObj
,
delObj
,
submit
}
from
'@/api/activiti/leave-bill'
import
{
tableOption
}
from
'@/const/crud/activiti/leave-bill'
import
{
mapGetters
}
from
'vuex'
import
{
addObj
,
delObj
,
fetchList
,
getObj
,
putObj
,
submit
}
from
'@/api/activiti/leave-bill'
import
{
tableOption
}
from
'@/const/crud/activiti/leave-bill'
import
{
mapGetters
}
from
'vuex'
export
default
{
name
:
'leave-bill'
,
data
()
{
...
...
@@ -73,12 +78,13 @@
},
created
()
{
},
mounted
:
function
()
{
},
mounted
:
function
()
{
},
computed
:
{
...
mapGetters
([
'permissions'
])
},
methods
:
{
getList
(
page
,
params
)
{
getList
(
page
,
params
)
{
this
.
tableLoading
=
true
fetchList
(
Object
.
assign
({
descs
:
'create_time'
,
...
...
@@ -95,7 +101,7 @@
* @detail 调用crud的handleadd方法即可
*
**/
handleAdd
:
function
()
{
handleAdd
:
function
()
{
this
.
$refs
.
crud
.
rowAdd
()
},
handleEdit
(
row
,
index
)
{
...
...
@@ -104,17 +110,15 @@
handleDel
(
row
,
index
)
{
this
.
$refs
.
crud
.
rowDel
(
row
,
index
)
},
rowDel
:
function
(
row
,
index
)
{
rowDel
:
function
(
row
,
index
)
{
var
_this
=
this
this
.
$confirm
(
'是否确认删除ID为'
+
row
.
leaveId
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
.
then
(
function
()
{
}).
then
(
function
()
{
return
delObj
(
row
.
leaveId
)
})
.
then
(
data
=>
{
}).
then
(
data
=>
{
_this
.
tableData
.
splice
(
index
,
1
)
_this
.
$message
({
showClose
:
true
,
...
...
@@ -122,15 +126,14 @@
type
:
'success'
})
})
.
catch
(
function
(
err
)
{
})
},
handleSubmit
:
function
(
row
,
index
)
{
handleSubmit
:
function
(
row
,
index
)
{
var
_this
=
this
this
.
$confirm
(
'是否确认提交ID为'
+
row
.
leaveId
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(
function
()
{
}).
then
(
function
()
{
return
submit
(
row
.
leaveId
)
}).
then
(
data
=>
{
_this
.
tableData
.
splice
(
index
,
1
)
...
...
@@ -140,7 +143,7 @@
type
:
'success'
})
this
.
getList
(
this
.
page
)
}).
catch
(
function
(
err
)
{
})
})
},
/**
* @title 数据更新
...
...
@@ -149,7 +152,7 @@
* @param done 为表单关闭函数
*
**/
handleUpdate
:
function
(
row
,
index
,
done
)
{
handleUpdate
:
function
(
row
,
index
,
done
)
{
putObj
(
row
).
then
(
data
=>
{
this
.
tableData
.
splice
(
index
,
1
,
Object
.
assign
({},
row
))
this
.
$message
({
...
...
@@ -167,7 +170,7 @@
* @param done 为表单关闭函数
*
**/
handleSave
:
function
(
row
,
done
)
{
handleSave
:
function
(
row
,
done
)
{
addObj
(
row
).
then
(
data
=>
{
this
.
tableData
.
push
(
Object
.
assign
({},
row
))
this
.
$message
({
...
...
@@ -184,7 +187,7 @@
*/
searchChange
(
form
)
{
this
.
page
.
state
=
form
.
state
this
.
getList
(
this
.
page
,
form
)
this
.
getList
(
this
.
page
,
form
)
},
/**
* 刷新回调
...
...
src/views/activiti/process.vue
View file @
5a6b9195
...
...
@@ -34,24 +34,28 @@
divided
v-if=
"permissions.act_process_manage"
@
click
.
native=
"handlePic(scope.row,scope.index)"
>
流程图
</el-dropdown-item>
>
流程图
</el-dropdown-item>
<el-dropdown-item
divided
v-if=
"permissions.act_process_manage && scope.row.suspend"
@
click
.
native=
"handleStatus(scope.row,'active')"
>
激活
</el-dropdown-item>
>
激活
</el-dropdown-item>
<el-dropdown-item
divided
v-if=
"permissions.act_process_manage && !scope.row.suspend"
@
click
.
native=
"handleStatus(scope.row,'suspend')"
>
失效
</el-dropdown-item>
>
失效
</el-dropdown-item>
<el-dropdown-item
divided
v-if=
"permissions.act_process_manage"
@
click
.
native=
"handleDel(scope.row,'suspend')"
>
删除
</el-dropdown-item>
>
删除
</el-dropdown-item>
</
template
>
</avue-crud>
</basic-container>
...
...
@@ -62,10 +66,11 @@
</template>
<
script
>
import
{
fetchList
,
delObj
,
addObj
,
status
}
from
"@/api/activiti/process"
;
import
{
tableOption
}
from
"@/const/crud/activiti/process"
;
import
{
mapGetters
}
from
"vuex"
;
export
default
{
import
{
addObj
,
delObj
,
fetchList
,
status
}
from
"@/api/activiti/process"
;
import
{
tableOption
}
from
"@/const/crud/activiti/process"
;
import
{
mapGetters
}
from
"vuex"
;
export
default
{
name
:
"process"
,
data
()
{
return
{
...
...
@@ -81,8 +86,10 @@ export default {
tableOption
:
tableOption
};
},
created
()
{},
mounted
:
function
()
{},
created
()
{
},
mounted
:
function
()
{
},
computed
:
{
...
mapGetters
([
"permissions"
])
},
...
...
@@ -123,11 +130,9 @@ export default {
cancelButtonText
:
"取消"
,
type
:
"warning"
}
)
.
then
(
function
()
{
).
then
(
function
()
{
return
status
(
row
.
processonDefinitionId
,
type
);
})
.
then
(
data
=>
{
}).
then
(
data
=>
{
this
.
getList
(
this
.
page
);
_this
.
$message
({
showClose
:
true
,
...
...
@@ -135,12 +140,11 @@ export default {
type
:
"success"
});
})
.
catch
(
function
(
err
)
{});
},
handleDel
(
row
,
index
)
{
this
.
$refs
.
crud
.
rowDel
(
row
,
index
);
},
rowDel
:
function
(
row
,
index
)
{
rowDel
:
function
(
row
,
index
)
{
var
_this
=
this
;
this
.
$confirm
(
'是否确认删除ID为"'
+
row
.
deploymentId
+
'"的模型?'
,
...
...
@@ -150,19 +154,17 @@ export default {
cancelButtonText
:
"取消"
,
type
:
"warning"
}
)
.
then
(
function
()
{
).
then
(
function
()
{
return
delObj
(
row
.
deploymentId
);
})
.
then
(
data
=>
{
}).
then
(
data
=>
{
this
.
getList
(
this
.
page
);
_this
.
$message
({
showClose
:
true
,
message
:
"删除成功"
,
type
:
"success"
});
})
.
catch
(
function
(
err
)
{
});
})
.
catch
(
function
(
err
)
{
});
},
/**
* 搜索回调
...
...
@@ -177,7 +179,7 @@ export default {
this
.
getList
(
this
.
page
);
}
}
};
};
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
src/views/activiti/task.vue
View file @
5a6b9195
...
...
@@ -29,13 +29,16 @@
slot=
"menuBtn"
>
<el-dropdown-item
divided
v-if=
"permissions.act_task_manage"
@
click
.
native=
"audit(scope.row,scope.index)"
>
审批
</el-dropdown-item>
@
click
.
native=
"audit(scope.row,scope.index)"
>
审批
</el-dropdown-item>
<el-dropdown-item
divided
v-if=
"permissions.act_task_manage"
@
click
.
native=
"comment(scope.row,scope.index)"
>
批注
</el-dropdown-item>
@
click
.
native=
"comment(scope.row,scope.index)"
>
批注
</el-dropdown-item>
<el-dropdown-item
divided
v-if=
"permissions.act_task_manage"
@
click
.
native=
"viewPic(scope.row,scope.index)"
>
流程图
</el-dropdown-item>
@
click
.
native=
"viewPic(scope.row,scope.index)"
>
流程图
</el-dropdown-item>
</
template
>
</avue-crud>
</basic-container>
...
...
@@ -46,7 +49,8 @@
<el-button
icon=
"el-icon-check"
v-for=
"flag in flagList"
:key=
"flag"
@
click=
"handleTask(scope.row,flag)"
plain
>
{{
flag
}}
</el-button>
plain
>
{{
flag
}}
</el-button>
</
template
>
</avue-form>
</el-dialog>
...
...
@@ -62,16 +66,17 @@
</template>
<
script
>
import
{
fetchList
,
fetchDetail
,
doTask
,
fetchComment
}
from
'@/api/activiti/task'
import
{
tableOption
,
formOption
,
taskOption
}
from
'@/const/crud/activiti/task'
import
{
mapGetters
}
from
'vuex'
import
{
doTask
,
fetchComment
,
fetchDetail
,
fetchList
}
from
'@/api/activiti/task'
import
{
formOption
,
tableOption
,
taskOption
}
from
'@/const/crud/activiti/task'
import
{
mapGetters
}
from
'vuex'
export
default
{
name
:
'task'
,
data
()
{
return
{
actPicUrl
:
''
,
actPicUrl
:
''
,
obj
:
{},
flagList
:{},
flagList
:
{},
showTask
:
false
,
showComment
:
false
,
showPicDialog
:
false
,
...
...
@@ -85,17 +90,18 @@
tableLoading
:
false
,
tableOption
:
tableOption
,
formOption
:
formOption
,
taskOption
:
taskOption
,
taskOption
:
taskOption
,
}
},
created
()
{
},
mounted
:
function
()
{
},
mounted
:
function
()
{
},
computed
:
{
...
mapGetters
([
'permissions'
])
},
methods
:
{
getList
(
page
,
params
)
{
getList
(
page
,
params
)
{
this
.
tableLoading
=
true
fetchList
(
Object
.
assign
({
current
:
page
.
currentPage
,
...
...
@@ -104,9 +110,10 @@
this
.
tableData
=
response
.
data
.
data
.
records
this
.
page
.
total
=
response
.
data
.
data
.
total
this
.
tableLoading
=
false
})},
})
},
audit
:
function
(
row
,
index
)
{
audit
:
function
(
row
,
index
)
{
fetchDetail
(
row
.
taskId
).
then
(
response
=>
{
this
.
obj
=
response
.
data
.
data
// 根据连线判断下次的流程
...
...
@@ -115,34 +122,33 @@
})
this
.
obj
=
row
},
comment
:
function
(
row
,
index
)
{
comment
:
function
(
row
,
index
)
{
fetchComment
(
row
.
taskId
).
then
(
response
=>
{
this
.
taskTableData
=
response
.
data
.
data
})
this
.
showComment
=
true
},
handleSubmit
:
function
(
row
,
index
)
{
handleSubmit
:
function
(
row
,
index
)
{
var
_this
=
this
this
.
$confirm
(
'是否确认提交ID为'
+
row
.
leaveId
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(
function
()
{
}).
then
(
function
()
{
return
submit
(
row
.
leaveId
)
})
.
then
(
data
=>
{
}).
then
(
data
=>
{
_this
.
tableData
.
splice
(
index
,
1
)
_this
.
$message
({
showClose
:
true
,
message
:
'提交成功'
,
type
:
'success'
})
}).
catch
(
function
(
err
)
{
})
.
catch
(
function
(
err
)
{
})
},
handleTask
:
function
(
row
,
result
)
{
handleTask
:
function
(
row
,
result
)
{
this
.
obj
.
taskFlag
=
result
doTask
(
this
.
obj
).
then
(
response
=>
{
doTask
(
this
.
obj
).
then
(
response
=>
{
this
.
$message
({
showClose
:
true
,
message
:
'提交成功'
,
...
...
@@ -152,7 +158,7 @@
this
.
getList
(
this
.
page
)
})
},
viewPic
:
function
(
row
,
index
)
{
viewPic
:
function
(
row
,
index
)
{
this
.
actPicUrl
=
`/act/task/view/`
+
row
.
taskId
this
.
showPicDialog
=
true
},
...
...
src/views/admin/client/index.vue
View file @
5a6b9195
...
...
@@ -35,13 +35,15 @@
icon=
"el-icon-check"
size=
"mini"
plain
@
click=
"handleEdit(scope.row,scope.index)"
>
编辑
</el-button>
@
click=
"handleEdit(scope.row,scope.index)"
>
编辑
</el-button>
<el-button
type=
"text"
v-if=
"permissions.sys_client_del"
icon=
"el-icon-delete"
size=
"mini"
plain
@
click=
"handleDel(scope.row,scope.index)"
>
删除
</el-button>
@
click=
"handleDel(scope.row,scope.index)"
>
删除
</el-button>
</
template
>
</avue-crud>
</basic-container>
...
...
@@ -49,10 +51,11 @@
</template>
<
script
>
import
{
fetchList
,
addObj
,
putObj
,
delObj
}
from
'@/api/admin/client'
import
{
tableOption
}
from
'@/const/crud/admin/client'
import
{
mapGetters
}
from
'vuex'
export
default
{
import
{
addObj
,
delObj
,
fetchList
,
putObj
}
from
'@/api/admin/client'
import
{
tableOption
}
from
'@/const/crud/admin/client'
import
{
mapGetters
}
from
'vuex'
export
default
{
name
:
'client'
,
data
()
{
return
{
...
...
@@ -68,12 +71,13 @@ export default {
},
created
()
{
},
mounted
:
function
()
{
},
mounted
:
function
()
{
},
computed
:
{
...
mapGetters
([
'permissions'
])
},
methods
:
{
getList
(
page
,
params
)
{
getList
(
page
,
params
)
{
this
.
tableLoading
=
true
fetchList
(
Object
.
assign
({
current
:
page
.
currentPage
,
...
...
@@ -89,7 +93,7 @@ export default {
* @detail 调用crud的handleadd方法即可
*
**/
handleAdd
:
function
()
{
handleAdd
:
function
()
{
this
.
$refs
.
crud
.
rowAdd
()
},
handleEdit
(
row
,
index
)
{
...
...
@@ -98,17 +102,15 @@ export default {
handleDel
(
row
,
index
)
{
this
.
$refs
.
crud
.
rowDel
(
row
,
index
)
},
rowDel
:
function
(
row
,
index
)
{
rowDel
:
function
(
row
,
index
)
{
var
_this
=
this
this
.
$confirm
(
'是否确认删除ID为'
+
row
.
clientId
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
.
then
(
function
()
{
}).
then
(
function
()
{
return
delObj
(
row
.
clientId
)
})
.
then
(
data
=>
{
}).
then
(
data
=>
{
_this
.
tableData
.
splice
(
index
,
1
)
_this
.
$message
({
showClose
:
true
,
...
...
@@ -116,8 +118,8 @@ export default {
type
:
'success'
})
this
.
refreshChange
()
}).
catch
(
function
(
err
)
{
})
.
catch
(
function
(
err
)
{
})
},
/**
* @title 数据更新
...
...
@@ -126,7 +128,7 @@ export default {
* @param done 为表单关闭函数
*
**/
handleUpdate
:
function
(
row
,
index
,
done
)
{
handleUpdate
:
function
(
row
,
index
,
done
)
{
putObj
(
row
).
then
(
data
=>
{
this
.
tableData
.
splice
(
index
,
1
,
Object
.
assign
({},
row
))
this
.
$message
({
...
...
@@ -144,7 +146,7 @@ export default {
* @param done 为表单关闭函数
*
**/
handleSave
:
function
(
row
,
done
)
{
handleSave
:
function
(
row
,
done
)
{
addObj
(
row
).
then
(
data
=>
{
this
.
tableData
.
push
(
Object
.
assign
({},
row
))
this
.
$message
({
...
...
@@ -163,7 +165,7 @@ export default {
this
.
getList
(
this
.
page
)
}
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
src/views/admin/dept/index.vue
View file @
5a6b9195
...
...
@@ -23,15 +23,18 @@
<el-button
type=
"primary"
v-if=
"deptManager_btn_add"
icon=
"plus"
@
click=
"handlerAdd"
>
添加
</el-button>
@
click=
"handlerAdd"
>
添加
</el-button>
<el-button
type=
"primary"
v-if=
"deptManager_btn_edit"
icon=
"edit"
@
click=
"handlerEdit"
>
编辑
</el-button>
@
click=
"handlerEdit"
>
编辑
</el-button>
<el-button
type=
"primary"
v-if=
"deptManager_btn_del"
icon=
"delete"
@
click=
"handleDelete"
>
删除
</el-button>
@
click=
"handleDelete"
>
删除
</el-button>
</el-button-group>
</div>
...
...
@@ -84,12 +87,14 @@
</el-form-item>
<el-form-item
v-if=
"formStatus == 'update'"
>
<el-button
type=
"primary"
@
click=
"update"
>
更新
</el-button>
@
click=
"update"
>
更新
</el-button>
<el-button
@
click=
"onCancel"
>
取消
</el-button>
</el-form-item>
<el-form-item
v-if=
"formStatus == 'create'"
>
<el-button
type=
"primary"
@
click=
"create"
>
保存
</el-button>
@
click=
"create"
>
保存
</el-button>
<el-button
@
click=
"onCancel"
>
取消
</el-button>
</el-form-item>
</el-form>
...
...
@@ -101,11 +106,12 @@
</
template
>
<
script
>
import
{
fetchTree
,
getObj
,
addObj
,
delObj
,
putObj
}
from
'@/api/admin/dept'
import
{
mapGetters
}
from
'vuex'
export
default
{
import
{
addObj
,
delObj
,
fetchTree
,
getObj
,
putObj
}
from
'@/api/admin/dept'
import
{
mapGetters
}
from
'vuex'
export
default
{
name
:
'dept'
,
data
()
{
data
()
{
return
{
list
:
null
,
total
:
null
,
...
...
@@ -125,13 +131,13 @@ export default {
},
rules
:
{
parentId
:
[
{
required
:
true
,
message
:
'请输入父级节点'
,
trigger
:
'blur'
}
{
required
:
true
,
message
:
'请输入父级节点'
,
trigger
:
'blur'
}
],
deptId
:
[
{
required
:
true
,
message
:
'请输入节点编号'
,
trigger
:
'blur'
}
{
required
:
true
,
message
:
'请输入节点编号'
,
trigger
:
'blur'
}
],
name
:
[
{
required
:
true
,
message
:
'请输入部门名称'
,
trigger
:
'blur'
}
{
required
:
true
,
message
:
'请输入部门名称'
,
trigger
:
'blur'
}
],
},
labelPosition
:
'right'
,
...
...
@@ -147,7 +153,7 @@ export default {
deptManager_btn_del
:
false
}
},
created
()
{
created
()
{
this
.
getList
()
this
.
deptManager_btn_add
=
this
.
permissions
[
'sys_dept_add'
]
this
.
deptManager_btn_edit
=
this
.
permissions
[
'sys_dept_edit'
]
...
...
@@ -160,16 +166,16 @@ export default {
])
},
methods
:
{
getList
()
{
getList
()
{
fetchTree
(
this
.
listQuery
).
then
(
response
=>
{
this
.
treeData
=
response
.
data
.
data
})
},
filterNode
(
value
,
data
)
{
filterNode
(
value
,
data
)
{
if
(
!
value
)
return
true
return
data
.
label
.
indexOf
(
value
)
!==
-
1
},
getNodeData
(
data
)
{
getNodeData
(
data
)
{
if
(
!
this
.
formEdit
)
{
this
.
formStatus
=
'update'
}
...
...
@@ -179,18 +185,18 @@ export default {
this
.
currentId
=
data
.
id
this
.
showElement
=
true
},
handlerEdit
()
{
handlerEdit
()
{
if
(
this
.
form
.
deptId
)
{
this
.
formEdit
=
false
this
.
formStatus
=
'update'
}
},
handlerAdd
()
{
handlerAdd
()
{
this
.
resetForm
()
this
.
formEdit
=
false
this
.
formStatus
=
'create'
},
handleDelete
()
{
handleDelete
()
{
this
.
$confirm
(
'此操作将永久删除, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
...
...
@@ -209,7 +215,7 @@ export default {
})
})
},
update
()
{
update
()
{
this
.
$refs
.
form
.
validate
((
valid
)
=>
{
if
(
!
valid
)
return
putObj
(
this
.
form
).
then
(()
=>
{
...
...
@@ -224,7 +230,7 @@ export default {
})
},
create
()
{
create
()
{
this
.
$refs
.
form
.
validate
((
valid
)
=>
{
if
(
!
valid
)
return
addObj
(
this
.
form
).
then
(()
=>
{
...
...
@@ -238,16 +244,16 @@ export default {
})
})
},
onCancel
()
{
onCancel
()
{
this
.
formEdit
=
true
this
.
formStatus
=
''
},
resetForm
()
{
resetForm
()
{
this
.
form
=
{
parentId
:
this
.
currentId
,
}
}
}
}
}
</
script
>
src/views/admin/dict/index.vue
View file @
5a6b9195
...
...
@@ -35,13 +35,15 @@
icon=
"el-icon-check"
size=
"mini"
plain
@
click=
"handleEdit(scope.row,scope.index)"
>
编辑
</el-button>
@
click=
"handleEdit(scope.row,scope.index)"
>
编辑
</el-button>
<el-button
type=
"text"
v-if=
"permissions.sys_dict_del"
icon=
"el-icon-delete"
size=
"mini"
plain
@
click=
"handleDel(scope.row,scope.index)"
>
删除
</el-button>
@
click=
"handleDel(scope.row,scope.index)"
>
删除
</el-button>
</
template
>
</avue-crud>
</basic-container>
...
...
@@ -49,12 +51,13 @@
</template>
<
script
>
import
{
fetchList
,
addObj
,
putObj
,
delObj
}
from
'@/api/admin/dict'
import
{
tableOption
}
from
'@/const/crud/admin/dict'
import
{
mapGetters
}
from
'vuex'
export
default
{
import
{
addObj
,
delObj
,
fetchList
,
putObj
}
from
'@/api/admin/dict'
import
{
tableOption
}
from
'@/const/crud/admin/dict'
import
{
mapGetters
}
from
'vuex'
export
default
{
name
:
'dict'
,
data
()
{
data
()
{
return
{
tableData
:
[],
page
:
{
...
...
@@ -66,14 +69,15 @@ export default {
tableOption
:
tableOption
}
},
created
()
{
created
()
{
},
mounted
:
function
()
{
},
mounted
:
function
()
{
},
computed
:
{
...
mapGetters
([
'permissions'
])
},
methods
:
{
getList
(
page
,
params
)
{
getList
(
page
,
params
)
{
this
.
tableLoading
=
true
fetchList
(
Object
.
assign
({
current
:
page
.
currentPage
,
...
...
@@ -92,10 +96,10 @@ export default {
handleAdd
:
function
()
{
this
.
$refs
.
crud
.
rowAdd
()
},
handleEdit
(
row
,
index
)
{
handleEdit
(
row
,
index
)
{
this
.
$refs
.
crud
.
rowEdit
(
row
,
index
)
},
handleDel
(
row
,
index
)
{
handleDel
(
row
,
index
)
{
this
.
$refs
.
crud
.
rowDel
(
row
,
index
)
},
rowDel
:
function
(
row
,
index
)
{
...
...
@@ -104,19 +108,17 @@ export default {
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
.
then
(
function
()
{
}).
then
(
function
()
{
return
delObj
(
row
)
})
.
then
(()
=>
{
}).
then
(()
=>
{
this
.
getList
(
this
.
page
)
_this
.
$message
({
showClose
:
true
,
message
:
'删除成功'
,
type
:
'success'
})
}).
catch
(
function
()
{
})
.
catch
(
function
()
{
})
},
/**
* @title 数据更新
...
...
@@ -155,11 +157,11 @@ export default {
done
()
})
},
searchChange
(
form
)
{
this
.
getList
(
this
.
page
,
form
)
searchChange
(
form
)
{
this
.
getList
(
this
.
page
,
form
)
}
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
src/views/admin/log/index.vue
View file @
5a6b9195
...
...
@@ -33,7 +33,8 @@
v-if=
"permissions.sys_log_del"
icon=
"el-icon-delete"
size=
"mini"
@
click=
"handleDel(scope.row,scope.index)"
>
删除
</el-button>
@
click=
"handleDel(scope.row,scope.index)"
>
删除
</el-button>
</
template
>
</avue-crud>
</basic-container>
...
...
@@ -41,12 +42,13 @@
</template>
<
script
>
import
{
fetchList
,
delObj
}
from
'@/api/admin/log'
import
{
tableOption
}
from
'@/const/crud/admin/log'
import
{
mapGetters
}
from
'vuex'
export
default
{
import
{
delObj
,
fetchList
}
from
'@/api/admin/log'
import
{
tableOption
}
from
'@/const/crud/admin/log'
import
{
mapGetters
}
from
'vuex'
export
default
{
name
:
'log'
,
data
()
{
data
()
{
return
{
tableData
:
[],
page
:
{
...
...
@@ -58,14 +60,15 @@ export default {
tableOption
:
tableOption
}
},
created
()
{
created
()
{
},
mounted
:
function
()
{
},
mounted
:
function
()
{
},
computed
:
{
...
mapGetters
([
'permissions'
])
},
methods
:
{
getList
(
page
,
params
)
{
getList
(
page
,
params
)
{
this
.
tableLoading
=
true
fetchList
(
Object
.
assign
({
descs
:
'create_time'
,
...
...
@@ -77,7 +80,7 @@ export default {
this
.
tableLoading
=
false
})
},
handleDel
(
row
,
index
)
{
handleDel
(
row
,
index
)
{
this
.
$refs
.
crud
.
rowDel
(
row
,
index
)
},
rowDel
:
function
(
row
,
index
)
{
...
...
@@ -86,34 +89,32 @@ export default {
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
.
then
(
function
()
{
}).
then
(
function
()
{
return
delObj
(
row
.
id
)
})
.
then
(
data
=>
{
}).
then
(
data
=>
{
this
.
getList
(
this
.
page
)
_this
.
$message
({
showClose
:
true
,
message
:
'删除成功'
,
type
:
'success'
})
}).
catch
(
function
(
err
)
{
})
.
catch
(
function
(
err
)
{
})
},
/**
* 搜索回调
*/
searchChange
(
form
)
{
searchChange
(
form
)
{
this
.
getList
(
this
.
page
,
form
)
},
/**
* 刷新回调
*/
refreshChange
()
{
refreshChange
()
{
this
.
getList
(
this
.
page
)
}
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
src/views/admin/menu/index.vue
View file @
5a6b9195
...
...
@@ -23,15 +23,18 @@
<el-button
type=
"primary"
v-if=
"menuManager_btn_add"
icon=
"plus"
@
click=
"handlerAdd"
>
添加
</el-button>
@
click=
"handlerAdd"
>
添加
</el-button>
<el-button
type=
"primary"
v-if=
"menuManager_btn_edit"
icon=
"edit"
@
click=
"handlerEdit"
>
编辑
</el-button>
@
click=
"handlerEdit"
>
编辑
</el-button>
<el-button
type=
"primary"
v-if=
"menuManager_btn_del"
icon=
"delete"
@
click=
"handleDelete"
>
删除
</el-button>
@
click=
"handleDelete"
>
删除
</el-button>
</el-button-group>
</div>
...
...
@@ -96,7 +99,7 @@
<el-option
v-for=
"item in typeOptions"
:key=
"item"
:label=
"item | typeFilter"
:value=
"item"
>
</el-option>
:value=
"item"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"排序"
...
...
@@ -130,12 +133,14 @@
</el-form-item>
<el-form-item
v-if=
"formStatus == 'update'"
>
<el-button
type=
"primary"
@
click=
"update"
>
更新
</el-button>
@
click=
"update"
>
更新
</el-button>
<el-button
@
click=
"onCancel"
>
取消
</el-button>
</el-form-item>
<el-form-item
v-if=
"formStatus == 'create'"
>
<el-button
type=
"primary"
@
click=
"create"
>
保存
</el-button>
@
click=
"create"
>
保存
</el-button>
<el-button
@
click=
"onCancel"
>
取消
</el-button>
</el-form-item>
</el-form>
...
...
@@ -147,12 +152,12 @@
</
template
>
<
script
>
import
{
addObj
,
delObj
,
fetchTree
,
getObj
,
putObj
}
from
'@/api/admin/menu'
import
{
mapGetters
}
from
'vuex'
import
{
addObj
,
delObj
,
fetchTree
,
getObj
,
putObj
}
from
'@/api/admin/menu'
import
{
mapGetters
}
from
'vuex'
export
default
{
export
default
{
name
:
'menu'
,
data
()
{
data
()
{
return
{
list
:
null
,
total
:
null
,
...
...
@@ -197,7 +202,7 @@ export default {
}
},
filters
:
{
typeFilter
(
type
)
{
typeFilter
(
type
)
{
const
typeMap
=
{
0
:
'菜单'
,
1
:
'按钮'
...
...
@@ -205,7 +210,7 @@ export default {
return
typeMap
[
type
]
}
},
created
()
{
created
()
{
this
.
getList
()
this
.
menuManager_btn_add
=
this
.
permissions
[
'sys_menu_add'
]
this
.
menuManager_btn_edit
=
this
.
permissions
[
'sys_menu_edit'
]
...
...
@@ -218,17 +223,17 @@ export default {
])
},
methods
:
{
getList
()
{
getList
()
{
fetchTree
(
this
.
listQuery
).
then
(
response
=>
{
this
.
treeData
=
response
.
data
.
data
})
},
filterNode
(
value
,
data
)
{
filterNode
(
value
,
data
)
{
if
(
!
value
)
return
true
return
data
.
label
.
indexOf
(
value
)
!==
-
1
},
nodeExpand
(
data
)
{
nodeExpand
(
data
)
{
let
aChildren
=
data
.
children
if
(
aChildren
.
length
>
0
)
{
this
.
oExpandedKey
[
data
.
id
]
=
true
...
...
@@ -236,7 +241,7 @@ export default {
}
this
.
setExpandedKeys
()
},
nodeCollapse
(
data
)
{
nodeCollapse
(
data
)
{
this
.
oExpandedKey
[
data
.
id
]
=
false
// 如果有子节点
this
.
treeRecursion
(
this
.
oTreeNodeChildren
[
data
.
id
],
(
oNode
)
=>
{
...
...
@@ -244,7 +249,7 @@ export default {
});
this
.
setExpandedKeys
()
},
setExpandedKeys
()
{
setExpandedKeys
()
{
let
oTemp
=
this
.
oExpandedKey
this
.
aExpandedKeys
=
[]
for
(
let
sKey
in
oTemp
)
{
...
...
@@ -253,7 +258,7 @@ export default {
}
}
},
treeRecursion
(
aChildren
,
fnCallback
)
{
treeRecursion
(
aChildren
,
fnCallback
)
{
if
(
aChildren
)
{
for
(
let
i
=
0
;
i
<
aChildren
.
length
;
++
i
)
{
let
oNode
=
aChildren
[
i
]
...
...
@@ -263,7 +268,7 @@ export default {
}
},
getNodeData
(
data
)
{
getNodeData
(
data
)
{
if
(
!
this
.
formEdit
)
{
this
.
formStatus
=
'update'
}
...
...
@@ -273,18 +278,18 @@ export default {
this
.
currentId
=
data
.
id
this
.
showElement
=
true
},
handlerEdit
()
{
handlerEdit
()
{
if
(
this
.
form
.
menuId
)
{
this
.
formEdit
=
false
this
.
formStatus
=
'update'
}
},
handlerAdd
()
{
handlerAdd
()
{
this
.
resetForm
()
this
.
formEdit
=
false
this
.
formStatus
=
'create'
},
handleDelete
()
{
handleDelete
()
{
this
.
$confirm
(
'此操作将永久删除, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
...
...
@@ -303,7 +308,7 @@ export default {
})
})
},
update
()
{
update
()
{
putObj
(
this
.
form
).
then
(()
=>
{
this
.
getList
()
this
.
$notify
({
...
...
@@ -314,7 +319,7 @@ export default {
})
})
},
create
()
{
create
()
{
addObj
(
this
.
form
).
then
(()
=>
{
this
.
getList
()
this
.
$notify
({
...
...
@@ -325,11 +330,11 @@ export default {
})
})
},
onCancel
()
{
onCancel
()
{
this
.
formEdit
=
true
this
.
formStatus
=
''
},
resetForm
()
{
resetForm
()
{
this
.
form
=
{
permission
:
undefined
,
name
:
undefined
,
...
...
@@ -343,6 +348,6 @@ export default {
}
}
}
}
}
</
script
>
src/views/admin/role/index.vue
View file @
5a6b9195
...
...
@@ -37,7 +37,8 @@
@
click=
"handleCreate"
size=
"small"
type=
"primary"
icon=
"el-icon-edit"
>
添加
</el-button>
icon=
"el-icon-edit"
>
添加
</el-button>
</
template
>
<
template
slot=
"menu"
slot-scope=
"scope"
>
...
...
@@ -80,28 +81,22 @@
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"updatePermession(roleId, roleCode)"
>
更 新
</el-button>
@
click=
"updatePermession(roleId, roleCode)"
>
更 新
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
{
fetchList
,
getObj
,
addObj
,
putObj
,
delObj
,
permissionUpd
,
fetchRoleTree
}
from
'@/api/admin/role'
import
{
fetchTree
}
from
'@/api/admin/menu'
import
{
mapGetters
}
from
'vuex'
import
{
tableOption
}
from
'@/const/crud/admin/role'
export
default
{
import
{
addObj
,
delObj
,
fetchList
,
fetchRoleTree
,
getObj
,
permissionUpd
,
putObj
}
from
'@/api/admin/role'
import
{
fetchTree
}
from
'@/api/admin/menu'
import
{
mapGetters
}
from
'vuex'
import
{
tableOption
}
from
'@/const/crud/admin/role'
export
default
{
name
:
'table_role'
,
data
()
{
data
()
{
return
{
tableOption
:
tableOption
,
treeData
:
[],
...
...
@@ -129,7 +124,7 @@ export default {
roleManager_btn_perm
:
false
}
},
created
()
{
created
()
{
this
.
roleManager_btn_add
=
this
.
permissions
[
'sys_role_add'
]
this
.
roleManager_btn_edit
=
this
.
permissions
[
'sys_role_edit'
]
this
.
roleManager_btn_del
=
this
.
permissions
[
'sys_role_del'
]
...
...
@@ -139,7 +134,7 @@ export default {
...
mapGetters
([
'elements'
,
'permissions'
])
},
methods
:
{
getList
(
page
,
params
)
{
getList
(
page
,
params
)
{
this
.
listLoading
=
true
fetchList
(
Object
.
assign
({
current
:
page
.
currentPage
,
...
...
@@ -150,23 +145,23 @@ export default {
this
.
listLoading
=
false
})
},
handleRefreshChange
()
{
handleRefreshChange
()
{
this
.
getList
(
this
.
page
)
},
handleFilter
(
param
)
{
handleFilter
(
param
)
{
this
.
page
.
page
=
1
;
this
.
getList
(
this
.
page
,
param
);
},
handleCreate
()
{
handleCreate
()
{
this
.
$refs
.
crud
.
rowAdd
();
},
handleOpenBefore
(
show
,
type
)
{
handleOpenBefore
(
show
,
type
)
{
show
();
},
handleUpdate
(
row
,
index
)
{
handleUpdate
(
row
,
index
)
{
this
.
$refs
.
crud
.
rowEdit
(
row
,
index
);
},
handlePermission
(
row
)
{
handlePermission
(
row
)
{
fetchRoleTree
(
row
.
roleId
)
.
then
(
response
=>
{
this
.
checkedKeys
=
response
.
data
...
...
@@ -189,7 +184,7 @@ export default {
* @param temp 临时存放节点id的数组
* @return 太监节点id数组
*/
resolveAllEunuchNodeId
(
json
,
idArr
,
temp
)
{
resolveAllEunuchNodeId
(
json
,
idArr
,
temp
)
{
for
(
let
i
=
0
;
i
<
json
.
length
;
i
++
)
{
const
item
=
json
[
i
]
// 存在子节点,递归遍历;不存在子节点,将json的id添加到临时数组中
...
...
@@ -201,14 +196,14 @@ export default {
}
return
temp
},
filterNode
(
value
,
data
)
{
filterNode
(
value
,
data
)
{
if
(
!
value
)
return
true
return
data
.
label
.
indexOf
(
value
)
!==
-
1
},
getNodeData
(
data
,
done
)
{
getNodeData
(
data
,
done
)
{
done
();
},
handleDelete
(
row
,
index
)
{
handleDelete
(
row
,
index
)
{
delObj
(
row
.
roleId
).
then
(
response
=>
{
this
.
list
.
splice
(
index
,
1
);
this
.
$notify
({
...
...
@@ -219,7 +214,7 @@ export default {
})
})
},
create
(
row
,
done
,
loading
)
{
create
(
row
,
done
,
loading
)
{
addObj
(
this
.
form
).
then
(()
=>
{
this
.
getList
(
this
.
page
)
done
();
...
...
@@ -233,7 +228,7 @@ export default {
loading
();
});
},
update
(
row
,
index
,
done
,
loading
)
{
update
(
row
,
index
,
done
,
loading
)
{
putObj
(
this
.
form
).
then
(()
=>
{
this
.
getList
(
this
.
page
)
done
();
...
...
@@ -247,7 +242,7 @@ export default {
loading
();
});
},
updatePermession
(
roleId
,
roleCode
)
{
updatePermession
(
roleId
,
roleCode
)
{
this
.
menuIds
=
''
this
.
menuIds
=
this
.
$refs
.
menuTree
.
getCheckedKeys
().
join
(
','
).
concat
(
','
).
concat
(
this
.
$refs
.
menuTree
.
getHalfCheckedKeys
().
join
(
','
))
permissionUpd
(
roleId
,
this
.
menuIds
).
then
(()
=>
{
...
...
@@ -269,5 +264,5 @@ export default {
})
}
}
}
}
</
script
>
src/views/admin/route/index.vue
View file @
5a6b9195
...
...
@@ -31,7 +31,7 @@
</
template
>
<
script
>
import
vueJsonEditor
from
'vue-json-editor'
import
{
fetchList
,
putObj
,
fallback
}
from
'@/api/admin/route'
import
{
fallback
,
fetchList
,
putObj
}
from
'@/api/admin/route'
export
default
{
data
()
{
...
...
@@ -55,11 +55,11 @@
let
result
=
response
.
data
.
data
;
for
(
var
i
=
0
;
i
<
result
.
length
;
i
++
)
{
let
route
=
result
[
i
]
if
(
route
.
predicates
)
{
if
(
route
.
predicates
)
{
let
predicates
=
route
.
predicates
route
.
predicates
=
JSON
.
parse
(
predicates
)
}
if
(
route
.
filters
)
{
if
(
route
.
filters
)
{
let
filters
=
route
.
filters
route
.
filters
=
JSON
.
parse
(
filters
)
}
...
...
src/views/admin/social/index.vue
View file @
5a6b9195
...
...
@@ -33,8 +33,9 @@
<el-button
type=
"primary"
@
click=
"handleAdd"
size=
"small"
v-if=
"permissions.generator_syssocialdetails_add"
>
新 增
</el-button>
<br
/><br
/>
v-if=
"permissions.generator_syssocialdetails_add"
>
新 增
</el-button>
<br/><br/>
</
template
>
<
template
slot-scope=
"scope"
slot=
"menu"
>
...
...
@@ -43,13 +44,15 @@
icon=
"el-icon-check"
size=
"small"
plain
@
click=
"handleEdit(scope.row,scope.index)"
>
编辑
</el-button>
@
click=
"handleEdit(scope.row,scope.index)"
>
编辑
</el-button>
<el-button
type=
"text"
v-if=
"permissions.generator_syssocialdetails_del"
icon=
"el-icon-delete"
size=
"small"
plain
@
click=
"handleDel(scope.row,scope.index)"
>
删除
</el-button>
@
click=
"handleDel(scope.row,scope.index)"
>
删除
</el-button>
</
template
>
</avue-crud>
</basic-container>
...
...
@@ -57,12 +60,13 @@
</template>
<
script
>
import
{
fetchList
,
getObj
,
addObj
,
putObj
,
delObj
}
from
'@/api/admin/sys-social-details'
import
{
tableOption
}
from
'@/const/crud/admin/sys-social-details'
import
{
mapGetters
}
from
'vuex'
export
default
{
import
{
addObj
,
delObj
,
fetchList
,
getObj
,
putObj
}
from
'@/api/admin/sys-social-details'
import
{
tableOption
}
from
'@/const/crud/admin/sys-social-details'
import
{
mapGetters
}
from
'vuex'
export
default
{
name
:
'sys-social-details'
,
data
()
{
data
()
{
return
{
tableData
:
[],
page
:
{
...
...
@@ -74,14 +78,15 @@ export default {
tableOption
:
tableOption
}
},
created
()
{
created
()
{
},
mounted
:
function
()
{
},
mounted
:
function
()
{
},
computed
:
{
...
mapGetters
([
'permissions'
])
},
methods
:
{
getList
(
page
,
params
)
{
getList
(
page
,
params
)
{
this
.
tableLoading
=
true
fetchList
(
Object
.
assign
({
current
:
page
.
currentPage
,
...
...
@@ -100,10 +105,10 @@ export default {
handleAdd
:
function
()
{
this
.
$refs
.
crud
.
rowAdd
()
},
handleEdit
(
row
,
index
)
{
handleEdit
(
row
,
index
)
{
this
.
$refs
.
crud
.
rowEdit
(
row
,
index
)
},
handleDel
(
row
,
index
)
{
handleDel
(
row
,
index
)
{
this
.
$refs
.
crud
.
rowDel
(
row
,
index
)
},
rowDel
:
function
(
row
,
index
)
{
...
...
@@ -112,11 +117,9 @@ export default {
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
.
then
(
function
()
{
}).
then
(
function
()
{
return
delObj
(
row
.
id
)
})
.
then
(
data
=>
{
}).
then
(
data
=>
{
_this
.
tableData
.
splice
(
index
,
1
)
_this
.
$message
({
showClose
:
true
,
...
...
@@ -124,8 +127,8 @@ export default {
type
:
'success'
})
this
.
refreshChange
()
}).
catch
(
function
(
err
)
{
})
.
catch
(
function
(
err
)
{
})
},
/**
* @title 数据更新
...
...
@@ -167,17 +170,17 @@ export default {
/**
* 刷新回调
*/
refreshChange
()
{
refreshChange
()
{
this
.
getList
(
this
.
page
)
},
/**
* 搜索回调
*/
searchChange
(
form
)
{
this
.
getList
(
this
.
page
,
form
)
searchChange
(
form
)
{
this
.
getList
(
this
.
page
,
form
)
}
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
src/views/admin/token/index.vue
View file @
5a6b9195
...
...
@@ -33,7 +33,8 @@
icon=
"el-icon-delete"
size=
"mini"
plain
@
click=
"handleDel(scope.row,scope.index)"
>
删除
</el-button>
@
click=
"handleDel(scope.row,scope.index)"
>
删除
</el-button>
</
template
>
</avue-crud>
</basic-container>
...
...
@@ -41,10 +42,11 @@
</template>
<
script
>
import
{
fetchList
,
delObj
}
from
'@/api/admin/token'
import
{
tableOption
}
from
'@/const/crud/admin/token'
import
{
mapGetters
}
from
'vuex'
export
default
{
import
{
delObj
,
fetchList
}
from
'@/api/admin/token'
import
{
tableOption
}
from
'@/const/crud/admin/token'
import
{
mapGetters
}
from
'vuex'
export
default
{
name
:
'token'
,
data
()
{
return
{
...
...
@@ -60,12 +62,13 @@ export default {
},
created
()
{
},
mounted
:
function
()
{
},
mounted
:
function
()
{
},
computed
:
{
...
mapGetters
([
'permissions'
])
},
methods
:
{
getList
(
page
,
params
)
{
getList
(
page
,
params
)
{
this
.
tableLoading
=
true
fetchList
(
Object
.
assign
({
current
:
page
.
currentPage
,
...
...
@@ -79,25 +82,23 @@ export default {
handleDel
(
row
,
index
)
{
this
.
$refs
.
crud
.
rowDel
(
row
,
index
)
},
rowDel
:
function
(
row
,
index
)
{
rowDel
:
function
(
row
,
index
)
{
var
_this
=
this
this
.
$confirm
(
'是否确认删除ID为'
+
row
.
token_value
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
.
then
(
function
()
{
}).
then
(
function
()
{
return
delObj
(
row
.
token_value
)
})
.
then
(
data
=>
{
}).
then
(
data
=>
{
_this
.
tableData
.
splice
(
index
,
1
)
_this
.
$message
({
showClose
:
true
,
message
:
'删除成功'
,
type
:
'success'
})
}).
catch
(
function
(
err
)
{
})
.
catch
(
function
(
err
)
{
})
},
/**
* 刷新回调
...
...
@@ -106,7 +107,7 @@ export default {
this
.
getList
(
this
.
page
)
}
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
src/views/admin/user/index.vue
View file @
5a6b9195
...
...
@@ -50,7 +50,8 @@
@
click=
"handleCreate"
size=
"small"
type=
"primary"
icon=
"el-icon-edit"
>
添加
</el-button>
icon=
"el-icon-edit"
>
添加
</el-button>
</
template
>
<
template
slot=
"username"
slot-scope=
"scope"
>
...
...
@@ -112,16 +113,17 @@
</template>
<
script
>
import
{
fetchList
,
getObj
,
addObj
,
putObj
,
delObj
}
from
"@/api/admin/user"
;
import
{
deptRoleList
}
from
"@/api/admin/role"
;
import
{
fetchDeptTree
}
from
"@/api/admin/dept"
;
import
{
tableOption
}
from
'@/const/crud/admin/user'
;
import
{
mapGetters
}
from
"vuex"
;
import
{
constants
}
from
'fs'
;
import
{
connect
}
from
'tls'
;
export
default
{
import
{
addObj
,
delObj
,
fetchList
,
getObj
,
putObj
}
from
"@/api/admin/user"
;
import
{
deptRoleList
}
from
"@/api/admin/role"
;
import
{
fetchDeptTree
}
from
"@/api/admin/dept"
;
import
{
tableOption
}
from
'@/const/crud/admin/user'
;
import
{
mapGetters
}
from
"vuex"
;
import
{
constants
}
from
'fs'
;
import
{
connect
}
from
'tls'
;
export
default
{
name
:
"table_user"
,
data
()
{
data
()
{
return
{
treeOption
:
{
nodeKey
:
'id'
,
...
...
@@ -161,37 +163,27 @@ export default {
...
mapGetters
([
"permissions"
])
},
watch
:
{
role
()
{
role
()
{
this
.
form
.
role
=
this
.
role
}
},
filters
:
{
statusFilter
(
status
)
{
const
statusMap
=
{
0
:
"有效"
,
1
:
"无效"
,
9
:
"锁定"
};
return
statusMap
[
status
];
}
},
created
()
{
created
()
{
this
.
sys_user_add
=
this
.
permissions
[
"sys_user_add"
];
this
.
sys_user_edit
=
this
.
permissions
[
"sys_user_edit"
];
this
.
sys_user_del
=
this
.
permissions
[
"sys_user_del"
];
this
.
init
();
},
methods
:
{
init
()
{
init
()
{
fetchDeptTree
().
then
(
response
=>
{
this
.
treeData
=
response
.
data
.
data
;
});
},
nodeClick
(
data
)
{
nodeClick
(
data
)
{
this
.
page
.
page
=
1
;
this
.
getList
(
this
.
page
,
{
deptId
:
data
.
id
});
this
.
getList
(
this
.
page
,
{
deptId
:
data
.
id
});
},
getList
(
page
,
params
)
{
getList
(
page
,
params
)
{
this
.
listLoading
=
true
;
fetchList
(
Object
.
assign
({
current
:
page
.
currentPage
,
...
...
@@ -202,27 +194,27 @@ export default {
this
.
listLoading
=
false
;
});
},
getNodeData
(
data
)
{
getNodeData
(
data
)
{
deptRoleList
().
then
(
response
=>
{
this
.
rolesOptions
=
response
.
data
.
data
;
});
},
handleDept
()
{
handleDept
()
{
fetchDeptTree
().
then
(
response
=>
{
this
.
treeDeptData
=
response
.
data
.
data
;
});
},
handleFilter
(
param
)
{
handleFilter
(
param
)
{
this
.
page
.
page
=
1
;
this
.
getList
(
this
.
page
,
param
);
},
handleRefreshChange
()
{
handleRefreshChange
()
{
this
.
getList
(
this
.
page
)
},
handleCreate
()
{
handleCreate
()
{
this
.
$refs
.
crud
.
rowAdd
();
},
handleOpenBefore
(
show
,
type
)
{
handleOpenBefore
(
show
,
type
)
{
window
.
boxType
=
type
;
this
.
handleDept
();
if
([
'edit'
,
'views'
].
includes
(
type
))
{
...
...
@@ -238,11 +230,11 @@ export default {
}
show
();
},
handleUpdate
(
row
,
index
)
{
handleUpdate
(
row
,
index
)
{
this
.
$refs
.
crud
.
rowEdit
(
row
,
index
);
this
.
form
.
password
=
undefined
},
create
(
row
,
done
,
loading
)
{
create
(
row
,
done
,
loading
)
{
addObj
(
this
.
form
).
then
(()
=>
{
this
.
getList
(
this
.
page
);
done
();
...
...
@@ -256,7 +248,7 @@ export default {
loading
();
});
},
update
(
row
,
index
,
done
,
loading
)
{
update
(
row
,
index
,
done
,
loading
)
{
putObj
(
this
.
form
).
then
(()
=>
{
this
.
getList
(
this
.
page
);
done
();
...
...
@@ -270,7 +262,7 @@ export default {
loading
();
});
},
deletes
(
row
,
index
)
{
deletes
(
row
,
index
)
{
this
.
$confirm
(
"此操作将永久删除该用户(用户名:"
+
row
.
username
+
"), 是否继续?"
,
"提示"
,
...
...
@@ -301,20 +293,22 @@ export default {
});
}
}
};
};
</
script
>
<
style
lang=
"scss"
>
.user
{
.user
{
height
:
100%
;
&
__tree
{
padding-top
:
3px
;
padding-right
:
20px
;
}
&
__main
{
.el-card__body
{
padding-top
:
0
;
}
}
}
}
</
style
>
src/views/admin/user/info.vue
View file @
5a6b9195
...
...
@@ -58,7 +58,8 @@
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"submitForm('ruleForm2')"
>
提交
</el-button>
@
click=
"submitForm('ruleForm2')"
>
提交
</el-button>
<el-button
@
click=
"resetForm('ruleForm2')"
>
重置
</el-button>
</el-form-item>
</el-form>
...
...
@@ -71,17 +72,16 @@
<
script
>
import
{
openWindow
}
from
'@/util/util'
import
{
mapState
}
from
'vuex'
import
{
getToken
}
from
'@/util/auth'
import
ElFormItem
from
'element-ui/packages/form/src/form-item.vue'
import
request
from
'@/router/axios'
import
{
openWindow
}
from
'@/util/util'
import
{
mapState
}
from
'vuex'
import
{
getToken
}
from
'@/util/auth'
import
request
from
'@/router/axios'
export
default
{
export
default
{
components
:
{
ElFormItem
},
data
()
{
data
()
{
var
validatePass
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
ruleForm2
.
password
!==
''
)
{
if
(
value
===
''
)
{
...
...
@@ -108,13 +108,13 @@ export default {
newpassword2
:
''
},
rules2
:
{
password
:
[{
required
:
true
,
min
:
6
,
message
:
'原密码不能为空且不少于6位'
,
trigger
:
'change'
}],
newpassword1
:
[{
required
:
true
,
min
:
6
,
message
:
'新密码不能为空且不少于6位'
,
trigger
:
'change'
}],
newpassword2
:
[{
required
:
true
,
validator
:
validatePass
,
trigger
:
'blur'
}]
password
:
[{
required
:
true
,
min
:
6
,
message
:
'原密码不能为空且不少于6位'
,
trigger
:
'change'
}],
newpassword1
:
[{
required
:
true
,
min
:
6
,
message
:
'新密码不能为空且不少于6位'
,
trigger
:
'change'
}],
newpassword2
:
[{
required
:
true
,
validator
:
validatePass
,
trigger
:
'blur'
}]
}
}
},
created
()
{
created
()
{
this
.
ruleForm2
.
username
=
this
.
userInfo
.
username
},
computed
:
{
...
...
@@ -123,7 +123,7 @@ export default {
}),
},
methods
:
{
submitForm
(
formName
)
{
submitForm
(
formName
)
{
this
.
$refs
[
formName
].
validate
(
valid
=>
{
if
(
valid
)
{
request
({
...
...
@@ -144,7 +144,7 @@ export default {
location
.
reload
()
// 为了重新实例化vue-router对象 避免bug
})
}
else
{
this
.
$router
.
push
({
path
:
'/'
})
this
.
$router
.
push
({
path
:
'/'
})
}
}
else
{
this
.
$notify
({
...
...
@@ -154,8 +154,7 @@ export default {
duration
:
2000
})
}
})
.
catch
(()
=>
{
}).
catch
(()
=>
{
this
.
$notify
({
title
:
'失败'
,
message
:
'修改失败'
,
...
...
@@ -168,22 +167,10 @@ export default {
}
})
},
resetForm
(
formName
)
{
resetForm
(
formName
)
{
this
.
$refs
[
formName
].
resetFields
()
},
toggleShow
()
{
this
.
show
=
!
this
.
show
},
/**
* upload success
*
* [param] jsonData 服务器返回数据,已进行json转码
* [param] field
*/
cropUploadSuccess
(
jsonData
)
{
this
.
$store
.
commit
(
'SET_AVATAR'
,
jsonData
.
filename
)
},
handleClick
(
thirdpart
)
{
handleClick
(
thirdpart
)
{
let
appid
,
client_id
,
redirect_uri
,
url
redirect_uri
=
encodeURIComponent
(
window
.
location
.
origin
+
'/#/authredirect?type=BIND'
)
if
(
thirdpart
===
'wechat'
)
{
...
...
@@ -196,5 +183,5 @@ export default {
openWindow
(
url
,
thirdpart
,
540
,
540
)
}
}
}
}
</
script
>
src/views/crud/index.vue
View file @
5a6b9195
...
...
@@ -47,7 +47,7 @@
<a
:href=
'props.row.address'
target=
"_blank"
>
<img
:src=
"props.row.stars"
alt=
'star'
/>
alt=
'star'
/>
</a>
</el-form-item>
</el-form>
...
...
@@ -61,7 +61,7 @@
<a
:href=
'scope.row.git'
target=
"_blank"
>
<img
:src=
"scope.row.stars"
alt=
'star'
/>
alt=
'star'
/>
</a>
</
template
>
<
template
slot-scope=
"scope"
...
...
@@ -75,17 +75,19 @@
</template>
<
script
>
import
{
tableOption
}
from
'@/const/crud/option'
import
{
tableData
}
from
'@/const/crud/data'
export
default
{
import
{
tableOption
}
from
'@/const/crud/option'
import
{
tableData
}
from
'@/const/crud/data'
export
default
{
name
:
'crud'
,
data
()
{
data
()
{
return
{
tableData
:
tableData
,
tableOption
:
tableOption
}
},
mounted
:
function
()
{
},
mounted
:
function
()
{
},
methods
:
{
handleDel
:
function
(
row
,
index
)
{
var
_this
=
this
...
...
@@ -102,7 +104,8 @@ export default {
type
:
'success'
})
})
.
catch
(
function
(
err
)
{
})
.
catch
(
function
(
err
)
{
})
},
/**
* @title 数据更新
...
...
@@ -136,21 +139,23 @@ export default {
done
()
}
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.demo-table-expand
{
.demo-table-expand
{
font-size
:
0
;
}
.demo-table-expand
label
{
}
.demo-table-expand
label
{
width
:
90px
;
color
:
#99a9bf
;
}
.demo-table-expand
.el-form-item
{
}
.demo-table-expand
.el-form-item
{
margin-right
:
0
;
margin-bottom
:
0
;
width
:
50%
;
}
}
</
style
>
src/views/daemon/execution-log/index.vue
View file @
5a6b9195
...
...
@@ -35,7 +35,8 @@
icon=
"el-icon-delete"
size=
"small"
plain
@
click=
"handleDel(scope.row,scope.index)"
>
删除
</el-button>
@
click=
"handleDel(scope.row,scope.index)"
>
删除
</el-button>
</
template
>
</avue-crud>
</basic-container>
...
...
@@ -43,9 +44,10 @@
</template>
<
script
>
import
{
fetchList
,
getObj
,
addObj
,
putObj
,
delObj
}
from
'@/api/daemon/execution-log'
import
{
tableOption
}
from
'@/const/crud/daemon/execution-log'
import
{
mapGetters
}
from
'vuex'
import
{
addObj
,
delObj
,
fetchList
,
getObj
,
putObj
}
from
'@/api/daemon/execution-log'
import
{
tableOption
}
from
'@/const/crud/daemon/execution-log'
import
{
mapGetters
}
from
'vuex'
export
default
{
name
:
'execution-log'
,
data
()
{
...
...
@@ -61,14 +63,15 @@
}
},
created
()
{
this
.
page
.
pageSize
=
20
;
this
.
page
.
pageSize
=
20
;
},
mounted
:
function
()
{
},
mounted
:
function
()
{
},
computed
:
{
...
mapGetters
([
'permissions'
])
},
methods
:
{
getList
(
page
,
params
=
{})
{
getList
(
page
,
params
=
{})
{
this
.
tableLoading
=
true
fetchList
(
Object
.
assign
({
current
:
page
.
currentPage
,
...
...
@@ -85,7 +88,7 @@
* @detail 调用crud的handleadd方法即可
*
**/
handleAdd
:
function
()
{
handleAdd
:
function
()
{
this
.
$refs
.
crud
.
rowAdd
()
},
handleEdit
(
row
,
index
)
{
...
...
@@ -94,17 +97,15 @@
handleDel
(
row
,
index
)
{
this
.
$refs
.
crud
.
rowDel
(
row
,
index
)
},
rowDel
:
function
(
row
,
index
)
{
rowDel
:
function
(
row
,
index
)
{
var
_this
=
this
this
.
$confirm
(
'是否确认删除ID为'
+
row
.
id
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
.
then
(
function
()
{
}).
then
(
function
()
{
return
delObj
(
row
.
id
)
})
.
then
(
data
=>
{
}).
then
(
data
=>
{
_this
.
tableData
.
splice
(
index
,
1
)
_this
.
$message
({
showClose
:
true
,
...
...
@@ -112,8 +113,8 @@
type
:
'success'
})
this
.
getList
(
this
.
page
)
}).
catch
(
function
(
err
)
{
})
.
catch
(
function
(
err
)
{
})
},
/**
* @title 数据更新
...
...
@@ -122,7 +123,7 @@
* @param done 为表单关闭函数
*
**/
handleUpdate
:
function
(
row
,
index
,
done
)
{
handleUpdate
:
function
(
row
,
index
,
done
)
{
putObj
(
row
).
then
(
data
=>
{
this
.
tableData
.
splice
(
index
,
1
,
Object
.
assign
({},
row
))
this
.
$message
({
...
...
@@ -140,7 +141,7 @@
* @param done 为表单关闭函数
*
**/
handleSave
:
function
(
row
,
done
)
{
handleSave
:
function
(
row
,
done
)
{
addObj
(
row
).
then
(
data
=>
{
this
.
tableData
.
push
(
Object
.
assign
({},
row
))
this
.
$message
({
...
...
src/views/daemon/status-trace-log/index.vue
View file @
5a6b9195
...
...
@@ -36,7 +36,8 @@
icon=
"el-icon-delete"
size=
"small"
plain
@
click=
"handleDel(scope.row,scope.index)"
>
删除
</el-button>
@
click=
"handleDel(scope.row,scope.index)"
>
删除
</el-button>
</
template
>
</avue-crud>
</basic-container>
...
...
@@ -44,12 +45,13 @@
</template>
<
script
>
import
{
fetchList
,
addObj
,
putObj
,
delObj
}
from
'@/api/daemon/status-trace-log'
import
{
tableOption
}
from
'@/const/crud/daemon/status-trace-log'
import
{
mapGetters
}
from
'vuex'
export
default
{
import
{
addObj
,
delObj
,
fetchList
,
putObj
}
from
'@/api/daemon/status-trace-log'
import
{
tableOption
}
from
'@/const/crud/daemon/status-trace-log'
import
{
mapGetters
}
from
'vuex'
export
default
{
name
:
'status-trace-log'
,
data
()
{
data
()
{
return
{
tableData
:
[],
page
:
{
...
...
@@ -61,14 +63,15 @@ export default {
tableOption
:
tableOption
}
},
created
()
{
created
()
{
},
mounted
:
function
()
{
},
mounted
:
function
()
{
},
computed
:
{
...
mapGetters
([
'permissions'
])
},
methods
:
{
getList
(
page
,
params
)
{
getList
(
page
,
params
)
{
this
.
tableLoading
=
true
fetchList
(
Object
.
assign
({
current
:
page
.
currentPage
,
...
...
@@ -87,10 +90,10 @@ export default {
handleAdd
:
function
()
{
this
.
$refs
.
crud
.
rowAdd
()
},
handleEdit
(
row
,
index
)
{
handleEdit
(
row
,
index
)
{
this
.
$refs
.
crud
.
rowEdit
(
row
,
index
)
},
handleDel
(
row
,
index
)
{
handleDel
(
row
,
index
)
{
this
.
$refs
.
crud
.
rowDel
(
row
,
index
)
},
rowDel
:
function
(
row
,
index
)
{
...
...
@@ -99,19 +102,17 @@ export default {
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
.
then
(
function
()
{
}).
then
(
function
()
{
return
delObj
(
row
.
clientId
)
})
.
then
(()
=>
{
}).
then
(()
=>
{
_this
.
tableData
.
splice
(
index
,
1
)
_this
.
$message
({
showClose
:
true
,
message
:
'删除成功'
,
type
:
'success'
})
}).
catch
(
function
()
{
})
.
catch
(
function
()
{
})
},
/**
* @title 数据更新
...
...
@@ -148,17 +149,17 @@ export default {
done
()
})
},
searchChange
(
form
)
{
this
.
getList
(
this
.
page
,
form
)
searchChange
(
form
)
{
this
.
getList
(
this
.
page
,
form
)
},
/**
* 刷新回调
*/
refreshChange
()
{
refreshChange
()
{
this
.
getList
(
this
.
page
)
}
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
src/views/dashboard/index.vue
View file @
5a6b9195
...
...
@@ -29,24 +29,25 @@
</
template
>
<
script
>
import
{
mapGetters
}
from
"vuex"
;
import
{
mapGetters
}
from
"vuex"
;
export
default
{
export
default
{
name
:
"dashboard"
,
computed
:
{
...
mapGetters
([
"name"
,
"roles"
])
}
};
};
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
.dashboard
{
.dashboard
{
&
-container
{
margin
:
30px
;
}
&
-text
{
font-size
:
30px
;
line-height
:
46px
;
}
}
}
</
style
>
src/views/gen/index.vue
View file @
5a6b9195
...
...
@@ -33,7 +33,8 @@
icon=
"el-icon-check"
size=
"mini"
plain
@
click=
"handleDown(scope.row,scope.index)"
>
生成
</el-button>
@
click=
"handleDown(scope.row,scope.index)"
>
生成
</el-button>
</
template
>
</avue-crud>
...
...
@@ -54,12 +55,13 @@
</template>
<
script
>
import
{
fetchList
,
handleDown
}
from
'@/api/gen/gen'
import
{
tableOption
,
formOption
}
from
'@/const/crud/gen/gen'
import
{
mapGetters
}
from
'vuex'
export
default
{
import
{
fetchList
,
handleDown
}
from
'@/api/gen/gen'
import
{
formOption
,
tableOption
}
from
'@/const/crud/gen/gen'
import
{
mapGetters
}
from
'vuex'
export
default
{
name
:
'client'
,
data
()
{
data
()
{
return
{
tableData
:
[],
formData
:
{},
...
...
@@ -74,14 +76,15 @@ export default {
formOption
:
formOption
}
},
created
()
{
created
()
{
},
mounted
:
function
()
{
},
mounted
:
function
()
{
},
computed
:
{
...
mapGetters
([
'permissions'
])
},
methods
:
{
getList
(
page
,
params
)
{
getList
(
page
,
params
)
{
this
.
tableLoading
=
true
fetchList
(
Object
.
assign
({
current
:
page
.
currentPage
,
...
...
@@ -99,19 +102,19 @@ export default {
/**
* 刷新回调
*/
refreshChange
()
{
refreshChange
()
{
this
.
getList
(
this
.
page
)
},
searchChange
(
form
)
{
this
.
getList
(
this
.
page
,
form
)
searchChange
(
form
)
{
this
.
getList
(
this
.
page
,
form
)
},
gen
(
form
)
{
handleDown
(
this
.
formData
).
then
(
response
=>
{
gen
(
form
)
{
handleDown
(
this
.
formData
).
then
(()
=>
{
this
.
box
=
true
})
}
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
src/views/tx/index.vue
View file @
5a6b9195
...
...
@@ -19,14 +19,15 @@
<div
class=
"execution"
>
<basic-container>
<avue-crud
:data=
"data"
:option=
"option"
/>
:option=
"option"
/>
</basic-container>
</div>
</
template
>
<
script
>
import
request
from
'@/router/axios'
export
default
{
data
()
{
import
request
from
'@/router/axios'
export
default
{
data
()
{
return
{
obj
:
{},
data
:
[],
...
...
@@ -49,7 +50,7 @@ export default {
}
}
},
created
()
{
created
()
{
request
({
url
:
'/tx/admin/avueSetting'
,
method
:
'get'
...
...
@@ -57,5 +58,5 @@ export default {
this
.
data
=
resp
.
data
})
}
}
}
</
script
>
src/views/tx/model.vue
View file @
5a6b9195
...
...
@@ -23,8 +23,9 @@
</div>
</
template
>
<
script
>
import
request
from
'@/router/axios'
export
default
{
import
request
from
'@/router/axios'
export
default
{
data
()
{
return
{
obj
:
{},
...
...
@@ -64,5 +65,5 @@ export default {
this
.
data
=
resp
.
data
})
}
}
}
</
script
>
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