Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
A
admin-base
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
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
new-sing
admin-base
Commits
1cecdbaf
Commit
1cecdbaf
authored
Dec 17, 2018
by
chenfenglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加下拉菜单,清除缓存项
parent
482f9c69
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
96 additions
and
6 deletions
+96
-6
App.vue
src/App.vue
+1
-2
headIndex.vue
src/components/framework/headIndex.vue
+21
-2
clearCache.vue
src/components/system/clearCache.vue
+52
-0
autoReply.vue
src/components/weChat/autoReply.vue
+6
-2
api.js
src/service/api.js
+5
-0
index.js
src/service/index.js
+1
-0
menuList.js
src/util/menuList.js
+10
-0
No files found.
src/App.vue
View file @
1cecdbaf
...
...
@@ -65,8 +65,7 @@ export default {
menuList
.
push
(
i
)
}
});
this
.
$router
.
addRoutes
([
this
.
$router
.
options
.
routes
[
0
]]);
//调用add
this
.
$router
.
addRoutes
([
this
.
$router
.
options
.
routes
[
0
]]);
//调用add;
this
.
$store
.
dispatch
(
'setMenu'
,
menuList
)
}
...
...
src/components/framework/headIndex.vue
View file @
1cecdbaf
<
template
>
<div
class=
"head-index"
>
<img
class=
"logo"
:src=
"iconUrl"
@
click=
"toHome"
/>
{{
$store
.
state
.
userName
}}
<el-button
round
size=
"mini"
class=
"edit-password"
@
click=
"dialogVisible=true"
>
修改密码
</el-button>
<div
class=
"fl-r"
>
<el-button
round
size=
"mini"
@
click=
"logOut"
>
退出登录
</el-button>
<el-dropdown>
<el-button
round
size=
"mini"
class=
"edit-password"
>
账号管理
<i
class=
"el-icon-arrow-down el-icon--right"
></i></el-button>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
@
click
.
native=
"dialogVisible=true"
>
修改密码
</el-dropdown-item>
<el-dropdown-item
@
click
.
native=
"logOut"
>
退出登录
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<!--
<el-button
round
size=
"mini"
style=
"clear:both"
@
click=
"logOut"
>
退出登录
</el-button>
-->
</div>
<el-dialog
title=
"修改密码"
...
...
@@ -84,6 +91,9 @@
}
},
methods
:{
a
(){
console
.
log
(
"aa"
)
},
logOut
(){
this
.
$confirm
(
'确定退出系统?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
...
...
@@ -152,4 +162,13 @@
.edit-password{
margin-left: 10px;
}
.el-dropdown {
vertical-align: top;
}
.el-dropdown + .el-dropdown {
margin-left: 15px;
}
.el-icon-arrow-down {
font-size: 12px;
}
</
style
>
src/components/system/clearCache.vue
0 → 100644
View file @
1cecdbaf
<
template
>
<div
class=
"clearCache"
>
<el-table
:data=
"cacheList"
style=
"width: 100%;"
>
<el-table-column
prop=
"name"
label=
"缓存列表"
style=
"padding-left:30px"
>
</el-table-column>
<el-table-column
label=
"操作"
>
<template
slot-scope=
"scope"
>
<el-button
size=
"mini"
plain
type=
"primary"
@
click=
"cache(scope.row.key)"
>
清除缓存
</el-button>
</
template
>
</el-table-column>
</el-table>
</div>
</template>
<
script
>
import
{
clearCacheListApi
}
from
"../../service/api"
export
default
{
data
(){
return
{
cacheList
:[{
name
:
"主题列表"
,
key
:
"course_relation_list"
},{
name
:
"课包列表"
,
key
:
"course_category_list "
},{
name
:
"课包内容"
,
key
:
"element_detail"
}]
}
},
methods
:{
cache
(
data
){
this
.
$confirm
(
'此操作将清除该缓存记录?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
clearCacheListApi
(
data
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'清除成功!'
});
});
});
}
}
}
</
script
>
<
style
scoped
lang=
"less"
>
</
style
>
src/components/weChat/autoReply.vue
View file @
1cecdbaf
...
...
@@ -16,7 +16,7 @@
<template
slot-scope=
"props"
>
<el-form
label-position=
"top"
class=
"demo-table-expand"
>
<el-form-item
label=
"回复内容"
>
<div
v-for=
"(item, index) in
JSON.parse(props.row.desc)
"
>
<div
v-for=
"(item, index) in
props.row.desc
"
>
回复
{{
index
+
1
}}
(
{{
item
.
type
|
type
}}
):
<span
v-if=
"item.content && item.type==='text'"
>
<span
v-html=
"item.content.replace(/\/[\u4E00-\u9FA5]
{1,3}/gi, emotion)">
</span>
...
...
@@ -169,7 +169,11 @@
},
getList
(){
getConfigListApi
({
key
:
this
.
activeName
}).
then
(
res
=>
{
console
.
log
(
res
.
list
)
for
(
var
i
=
0
;
i
<
res
.
list
.
length
;
i
++
){
if
(
res
.
list
[
i
].
desc
){
res
.
list
[
i
].
desc
=
JSON
.
parse
(
res
.
list
[
i
].
desc
)
}
}
this
.
list
=
res
.
list
})
},
...
...
src/service/api.js
View file @
1cecdbaf
...
...
@@ -492,6 +492,11 @@ const getAdminLogListUrl = `${_baseUrl}api/admin/user/log`;
export
const
getAdminLogLisApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$fetch
(
`
${
getAdminLogListUrl
}
`
,
json
)
};
// 清除缓存
const
clearCacheListUrl
=
`/api/admin/redis/key`
;
export
const
clearCacheListApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$del
(
`
${
clearCacheListUrl
}
/
${
json
}
`
)
};
// 绑定其他商品
const
bindOtherUrl
=
`
${
_baseUrl
}
api/admin/goods/bind/`
;
...
...
src/service/index.js
View file @
1cecdbaf
...
...
@@ -339,6 +339,7 @@ export function put(url,data = {}){
}
export
function
del
(
url
,
data
=
{}){
console
.
log
(
url
,
data
)
return
new
Promise
((
resolve
,
reject
)
=>
{
axios
.
delete
(
url
,
data
)
.
then
(
response
=>
{
...
...
src/util/menuList.js
View file @
1cecdbaf
...
...
@@ -396,6 +396,16 @@ export default [
component
:
e
=>
require
([
'@/components/system/sysConfig'
],
e
),
}
},{
value
:
'清除缓存'
,
routerName
:
'clearCache'
,
path
:
'/clearCache'
,
cover
:
'8-5'
,
router
:{
path
:
'/clearCache'
,
name
:
'clearCache'
,
component
:
e
=>
require
([
'@/components/system/clearCache'
],
e
),
}
},
{
value
:
'操作日志'
,
...
...
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