Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
front-backend
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
framework
front-backend
Commits
df51dbaf
Commit
df51dbaf
authored
May 24, 2019
by
zhengjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2.0 抢先版,主要更新了#10
parent
a5c9f588
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
26 additions
and
202 deletions
+26
-202
build/logo.png
+0
-0
src/api/log.js
+8
-0
src/components/HeaderSearch/index.vue
+0
-181
src/views/generator/module/form.vue
+7
-4
src/views/layout/components/Settings/index.vue
+2
-4
src/views/monitor/log/errorLog.vue
+6
-3
src/views/monitor/log/msg.vue
+2
-2
src/views/monitor/redis/index.vue
+0
-7
src/views/system/job/index.vue
+1
-1
No files found.
build/logo.png
deleted
100644 → 0
View file @
a5c9f588
6.69 KB
src/api/log.js
0 → 100644
View file @
df51dbaf
import
request
from
'@/utils/request'
export
function
getErrDetail
(
id
)
{
return
request
({
url
:
'api/logs/error/'
+
id
,
method
:
'get'
})
}
src/components/HeaderSearch/index.vue
deleted
100644 → 0
View file @
a5c9f588
<
template
>
<div
:class=
"
{'show':show}" class="header-search">
<svg-icon
class-name=
"search-icon"
icon-class=
"search"
@
click
.
stop=
"click"
/>
<el-select
ref=
"headerSearchSelect"
v-model=
"search"
:remote-method=
"querySearch"
filterable
default-first-option
remote
placeholder=
"Search"
class=
"header-search-select"
@
change=
"change"
>
<el-option
v-for=
"item in options"
:key=
"item.path"
:value=
"item"
:label=
"item.title.join(' > ')"
/>
</el-select>
</div>
</
template
>
<
script
>
// fuse is a lightweight fuzzy-search module
// make search results more in line with expectations
import
Fuse
from
'fuse.js'
import
path
from
'path'
export
default
{
name
:
'HeaderSearch'
,
data
()
{
return
{
search
:
''
,
options
:
[],
searchPool
:
[],
show
:
false
,
fuse
:
undefined
}
},
computed
:
{
routes
()
{
return
this
.
$store
.
getters
.
permission_routes
}
},
watch
:
{
routes
()
{
this
.
searchPool
=
this
.
generateRoutes
(
this
.
routes
)
},
searchPool
(
list
)
{
this
.
initFuse
(
list
)
},
show
(
value
)
{
if
(
value
)
{
document
.
body
.
addEventListener
(
'click'
,
this
.
close
)
}
else
{
document
.
body
.
removeEventListener
(
'click'
,
this
.
close
)
}
}
},
mounted
()
{
this
.
searchPool
=
this
.
generateRoutes
(
this
.
routes
)
},
methods
:
{
click
()
{
this
.
show
=
!
this
.
show
if
(
this
.
show
)
{
this
.
$refs
.
headerSearchSelect
&&
this
.
$refs
.
headerSearchSelect
.
focus
()
}
},
close
()
{
this
.
$refs
.
headerSearchSelect
&&
this
.
$refs
.
headerSearchSelect
.
blur
()
this
.
options
=
[]
this
.
show
=
false
},
change
(
val
)
{
this
.
$router
.
push
(
val
.
path
)
this
.
search
=
''
this
.
options
=
[]
this
.
$nextTick
(()
=>
{
this
.
show
=
false
})
},
initFuse
(
list
)
{
this
.
fuse
=
new
Fuse
(
list
,
{
shouldSort
:
true
,
threshold
:
0.4
,
location
:
0
,
distance
:
100
,
maxPatternLength
:
32
,
minMatchCharLength
:
1
,
keys
:
[{
name
:
'title'
,
weight
:
0.7
},
{
name
:
'path'
,
weight
:
0.3
}]
})
},
// Filter out the routes that can be displayed in the sidebar
// And generate the internationalized title
generateRoutes
(
routes
,
basePath
=
'/'
,
prefixTitle
=
[])
{
let
res
=
[]
for
(
const
router
of
routes
)
{
// skip hidden router
if
(
router
.
hidden
)
{
continue
}
const
data
=
{
path
:
path
.
resolve
(
basePath
,
router
.
path
),
title
:
[...
prefixTitle
]
}
if
(
router
.
meta
&&
router
.
meta
.
title
)
{
// generate internationalized title
data
.
title
=
[...
data
.
title
,
router
.
meta
.
title
]
if
(
router
.
redirect
!==
'noRedirect'
)
{
// only push the routes with title
// special case: need to exclude parent router without redirect
res
.
push
(
data
)
}
}
// recursive child routes
if
(
router
.
children
)
{
const
tempRoutes
=
this
.
generateRoutes
(
router
.
children
,
data
.
path
,
data
.
title
)
if
(
tempRoutes
.
length
>=
1
)
{
res
=
[...
res
,
...
tempRoutes
]
}
}
}
return
res
},
querySearch
(
query
)
{
if
(
query
!==
''
)
{
this
.
options
=
this
.
fuse
.
search
(
query
)
}
else
{
this
.
options
=
[]
}
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.header-search
{
font-size
:
0
!important
;
.search-icon
{
cursor
:
pointer
;
font-size
:
18px
;
}
.header-search-select
{
font-size
:
18px
;
transition
:
width
0.2s
;
width
:
0
;
overflow
:
hidden
;
background
:
transparent
;
border-radius
:
0
;
display
:
inline-block
;
vertical-align
:
middle
;
/deep/
.el-input__inner
{
border-radius
:
0
;
border
:
0
;
padding-left
:
0
;
padding-right
:
0
;
box-shadow
:
none
!important
;
border-bottom
:
1px
solid
#d9d9d9
;
vertical-align
:
middle
;
}
}
&
.show
{
.header-search-select
{
width
:
210px
;
margin-left
:
10px
;
}
}
}
</
style
>
src/views/generator/module/form.vue
View file @
df51dbaf
...
...
@@ -4,12 +4,15 @@
<el-form-item
label=
"作者名称"
prop=
"author"
>
<el-input
v-model=
"form.author"
style=
"width: 420px;"
/>
</el-form-item>
<el-form-item
label=
"
至于包下"
prop=
"pack
"
>
<el-input
v-model=
"form.p
ack
"
style=
"width: 420px;"
/>
<el-form-item
label=
"
去表前缀"
prop=
"prefix
"
>
<el-input
v-model=
"form.p
refix"
placeholder=
"默认不去除表前缀
"
style=
"width: 420px;"
/>
</el-form-item>
<el-form-item
label=
"模块名称"
prop=
"moduleName"
>
<el-input
v-model=
"form.moduleName"
style=
"width: 420px;"
/>
</el-form-item>
<el-form-item
label=
"至于包下"
prop=
"pack"
>
<el-input
v-model=
"form.pack"
style=
"width: 420px;"
/>
</el-form-item>
<el-form-item
label=
"前端路径"
prop=
"path"
>
<el-input
v-model=
"form.path"
style=
"width: 420px;"
/>
</el-form-item>
...
...
@@ -34,7 +37,7 @@ export default {
data
()
{
return
{
loading
:
false
,
dialog
:
false
,
form
:
{
author
:
''
,
pack
:
''
,
path
:
''
,
moduleName
:
''
,
cover
:
'false'
,
apiPath
:
''
},
form
:
{
author
:
''
,
pack
:
''
,
path
:
''
,
moduleName
:
''
,
cover
:
'false'
,
apiPath
:
''
,
prefix
:
''
},
rules
:
{
author
:
[
{
required
:
true
,
message
:
'作者不能为空'
,
trigger
:
'blur'
}
...
...
@@ -88,7 +91,7 @@ export default {
resetForm
()
{
this
.
dialog
=
false
this
.
$refs
[
'form'
].
resetFields
()
this
.
form
=
{
author
:
''
,
pack
:
''
,
path
:
''
,
moduleName
:
''
,
cover
:
'false'
,
apiPath
:
''
}
this
.
form
=
{
author
:
''
,
pack
:
''
,
path
:
''
,
moduleName
:
''
,
cover
:
'false'
,
apiPath
:
''
,
prefix
:
''
}
}
}
}
...
...
src/views/layout/components/Settings/index.vue
View file @
df51dbaf
...
...
@@ -2,7 +2,6 @@
<div
class=
"drawer-container"
>
<div>
<h3
class=
"drawer-title"
>
系统布局配置
</h3>
<div
class=
"drawer-item"
>
<span>
显示 Logo
</span>
<el-switch
v-model=
"sidebarLogo"
class=
"drawer-switch"
/>
...
...
@@ -16,14 +15,13 @@
<el-switch
v-model=
"tagsView"
class=
"drawer-switch"
/>
</div>
<div
class=
"drawer-item"
>
<span>
显示 SettingB
t
n
</span>
<span>
显示 SettingB
utto
n
</span>
<el-switch
v-model=
"settingBtn"
class=
"drawer-switch"
/>
</div>
<div
class=
"drawer-item"
>
<span>
菜单
u
niqueOpened
</span>
<span>
菜单
U
niqueOpened
</span>
<el-switch
v-model=
"uniqueOpened"
class=
"drawer-switch"
/>
</div>
</div>
</div>
</
template
>
...
...
src/views/monitor/log/errorLog.vue
View file @
df51dbaf
...
...
@@ -15,7 +15,7 @@
</el-table-column>
<el-table-column
prop=
"createTime"
label=
"异常详情"
width=
"100px"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
@
click=
"info(scope.row.
exceptionDetail
)"
>
查看详情
</el-button>
<el-button
size=
"mini"
type=
"text"
@
click=
"info(scope.row.
id
)"
>
查看详情
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -37,6 +37,7 @@
<
script
>
import
initData
from
'@/mixins/initData'
import
{
parseTime
}
from
'@/utils/index'
import
{
getErrDetail
}
from
'@/api/log'
import
eHeader
from
'./module/header'
export
default
{
components
:
{
eHeader
},
...
...
@@ -64,9 +65,11 @@ export default {
if
(
logType
!==
''
&&
logType
!==
null
)
{
this
.
params
[
'logType'
]
=
logType
}
return
true
},
info
(
errorInfo
)
{
this
.
errorInfo
=
errorInfo
info
(
id
)
{
this
.
dialog
=
true
getErrDetail
(
id
).
then
(
res
=>
{
this
.
errorInfo
=
res
.
exception
})
}
}
}
...
...
src/views/monitor/log/msg.vue
View file @
df51dbaf
...
...
@@ -28,8 +28,8 @@ export default {
data
()
{
return
{
ico
:
'unlock'
,
unlock
:
true
,
content
:
'锁定滚动条'
,
height
:
document
.
documentElement
.
clientHeight
-
94.5
+
'px;'
,
width
:
document
.
documentElement
.
clientWidth
-
185
+
'px;'
,
height
:
document
.
documentElement
.
clientHeight
-
140
+
'px;'
,
width
:
document
.
documentElement
.
clientWidth
-
210
+
'px;'
,
data
:
[{
name
:
'elAdmin-'
,
timestamp
:
new
Date
(),
threadName
:
'system-prompt-message'
,
level
:
'INFO'
,
className
:
'me.zhengjie.AppRun'
+
' :'
,
body
:
'Welcome, no log output'
}],
// level
INFO
:
'#0000ff'
,
WARN
:
'#FFFF00'
,
ERROR
:
'#FF0000'
,
DEBUG
:
'#DEA000'
...
...
src/views/monitor/redis/index.vue
View file @
df51dbaf
...
...
@@ -48,7 +48,6 @@
import
checkPermission
from
'@/utils/permission'
// 权限判断函数
import
initData
from
'@/mixins/initData'
import
{
del
}
from
'@/api/redis'
import
{
getPermissionTree
}
from
'@/api/permission'
import
eHeader
from
'./module/header'
import
edit
from
'./module/edit'
export
default
{
...
...
@@ -60,7 +59,6 @@ export default {
}
},
created
()
{
this
.
getPermissions
()
this
.
$nextTick
(()
=>
{
this
.
init
()
})
...
...
@@ -95,11 +93,6 @@ export default {
this
.
$refs
[
index
].
doClose
()
console
.
log
(
err
.
response
.
data
.
message
)
})
},
getPermissions
()
{
getPermissionTree
().
then
(
res
=>
{
this
.
permissions
=
res
})
}
}
}
...
...
src/views/system/job/index.vue
View file @
df51dbaf
...
...
@@ -6,7 +6,7 @@
<el-table-column
prop=
"name"
label=
"名称"
/>
<el-table-column
label=
"所属部门"
>
<template
slot-scope=
"scope"
>
<div>
{{
scope
.
row
.
dept
.
name
}}
</div>
<div>
{{
scope
.
row
.
dept
SuperiorName
?
scope
.
row
.
deptSuperiorName
+
' / '
:
''
}}{{
scope
.
row
.
dept
.
name
}}
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"sort"
label=
"排序"
>
...
...
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