Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
sun
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
sun
Commits
f461dd33
Commit
f461dd33
authored
Nov 20, 2018
by
Davve
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加用户搜索和修改标签命名
parent
c4958cda
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
161 additions
and
131 deletions
+161
-131
group.py
api/group.py
+1
-0
search.py
api/search.py
+17
-1
urls.py
api/urls.py
+1
-0
remoteSearch.js
vu/src/api/remoteSearch.js
+8
-0
GroupDetail.vue
vu/src/views/group/components/GroupDetail.vue
+27
-20
list.vue
vu/src/views/group/list.vue
+82
-13
TagDetail.vue
vu/src/views/tag/components/TagDetail.vue
+22
-58
list.vue
vu/src/views/tag/list.vue
+3
-39
No files found.
api/group.py
View file @
f461dd33
...
...
@@ -13,6 +13,7 @@ class GroupListView(APIView):
filters
=
self
.
handle_filter
(
request
.
GET
.
get
(
'filter'
,
""
))
try
:
data
=
self
.
rpc
[
'venus/community/group/list'
](
filters
=
filters
,
offset
=
offset
,
count
=
count
)
.
unwrap
()
print
(
data
,
'----------------'
)
except
Exception
as
e
:
raise
e
return
data
...
...
api/search.py
View file @
f461dd33
...
...
@@ -29,7 +29,12 @@ class RegionSearchView(APIView):
class
UserSearchView
(
APIView
):
def
get
(
self
,
request
):
pass
name
=
request
.
GET
.
get
(
'name'
)
try
:
data
=
self
.
rpc
[
'venus/community/user/search'
](
name
=
name
)
.
unwrap
()
except
Exception
as
e
:
raise
e
return
{
'data'
:
data
}
class
TagSearchView
(
APIView
):
...
...
@@ -39,4 +44,14 @@ class TagSearchView(APIView):
data
=
self
.
rpc
[
'venus/community/tag/search'
](
name
=
name
)
.
unwrap
()
except
Exception
as
e
:
raise
e
return
{
'data'
:
data
}
class
StarSearchView
(
APIView
):
def
get
(
self
,
request
):
name
=
request
.
GET
.
get
(
'name'
)
try
:
data
=
self
.
rpc
[
'venus/community/star/search'
](
name
=
name
)
.
unwrap
()
except
Exception
as
e
:
raise
e
return
{
'data'
:
data
}
\ No newline at end of file
api/urls.py
View file @
f461dd33
...
...
@@ -63,6 +63,7 @@ search_urlpatterns = [
url
(
r'search/region'
,
RegionSearchView
.
as_view
()),
url
(
r'search/user'
,
UserSearchView
.
as_view
()),
url
(
r'search/tag'
,
TagSearchView
.
as_view
()),
url
(
r'search/star'
,
StarSearchView
.
as_view
()),
]
common_urlpatterns
=
[
...
...
vu/src/api/remoteSearch.js
View file @
f461dd33
...
...
@@ -31,3 +31,11 @@ export function tagSearch(name) {
params
:
{
name
}
})
}
export
function
starSearch
(
name
)
{
return
request
({
url
:
'/api/search/star'
,
method
:
'get'
,
params
:
{
name
}
})
}
vu/src/views/group/components/GroupDetail.vue
View file @
f461dd33
...
...
@@ -14,7 +14,7 @@
<span>
小组相关
</span>
</div>
<div
style=
"margin-bottom:50px;"
>
<div
>
<el-col
:span=
"24"
>
<el-form-item
style=
"margin-bottom: 20px;"
prop=
"title"
>
<MDinput
v-model=
"postForm.name"
:maxlength=
"100"
name=
"name"
required
>
...
...
@@ -26,27 +26,23 @@
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label-width=
"75px"
label=
"明星称号:"
class=
"postInfo-container-item"
>
<el-select
v-model=
"postForm.star_name"
:placeholder=
"'明星称号'"
clearable
class=
"postInfo-container-item"
style=
"width: 220px"
>
<el-option
v-for=
"item in []"
:key=
"item.key"
:label=
"item.display_name"
:value=
"item.key"
/>
<el-select
v-model=
"postForm.star_name"
:remote-method=
"getRemoteStarList"
filterable
remote
multiple
value-key=
"id"
placeholder=
"搜索明星"
style=
"width: 100%"
>
<el-option
v-for=
"(item,index) in starListOptions"
:key=
"item+index"
:label=
"item.name"
:value=
"item.id"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label-width=
"75px"
label=
"小组组长:"
class=
"postInfo-container-item"
>
<el-select
v-model=
"postForm.pick_type"
:placeholder=
"'性别:'"
clearable
class=
"postInfo-container-item"
style=
"width:220px"
>
<el-option
v-for=
"item in []"
:key=
"item.key"
:label=
"item.display_name"
:value=
"item.key"
/>
<el-select
v-model=
"postForm.group_leader"
:remote-method=
"getRemoteUserList"
filterable
remote
multiple
value-key=
"id"
placeholder=
"搜索明星"
style=
"width: 100%"
>
<el-option
v-for=
"(item,index) in starListOptions"
:key=
"item+index"
:label=
"item.name"
:value=
"item.id"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
style=
"margin-bottom: 20px;"
label-width=
"75px"
label=
"组员数量:"
prop=
"desc"
>
<el-input
v-model=
"postForm.user_nums"
type=
"number"
placeholder=
"请输入内容"
style=
"width: 230px;"
readonly
/>
<el-input
v-model=
"postForm.user_nums"
type=
"number"
placeholder=
"请输入内容"
style=
"width: 230px;"
readonly
/>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -149,20 +145,17 @@
import
{
validateURL
}
from
'@/utils/validate'
import
{
fetchList
}
from
'@/api/user'
import
{
userSearch
}
from
'@/api/remoteSearch'
import
{
starSearch
,
userSearch
}
from
'@/api/remoteSearch'
const
defaultForm
=
{
status
:
'draft'
,
title
:
''
,
// 文章题目
name
:
''
,
// 文章内容
description
:
''
,
// 文章摘要
source_uri
:
''
,
// 文章外链
image_uri
:
''
,
// 文章图片
display_time
:
undefined
,
// 前台展示时间
id
:
undefined
,
platforms
:
[
'a-platform'
],
comment_disabled
:
false
,
importance
:
0
user_nums
:
0
,
group_leader
:
''
,
}
export
default
{
...
...
@@ -211,6 +204,8 @@
content
:
[{
validator
:
validateRequire
}],
},
tempRoute
:
{},
starListOptions
:
[],
userListOptions
:
[],
// 小组相关
list
:
null
,
...
...
@@ -230,7 +225,7 @@
},
computed
:
{
contentShortLength
()
{
return
this
.
postForm
.
content_short
.
length
return
this
.
postForm
.
description
.
length
},
},
created
()
{
...
...
@@ -304,7 +299,19 @@
this
.
total
=
100
this
.
listLoading
=
false
})
}
},
getRemoteStarList
(
query
){
starSearch
(
query
).
then
(
response
=>
{
if
(
!
response
.
data
.
data
.
data
)
return
this
.
starListOptions
=
response
.
data
.
data
.
data
})
},
getRemoteUserList
(
query
){
userSearch
(
query
).
then
(
response
=>
{
if
(
!
response
.
data
.
data
.
data
)
return
this
.
starListOptions
=
response
.
data
.
data
.
data
})
},
}
}
</
script
>
...
...
vu/src/views/group/list.vue
View file @
f461dd33
...
...
@@ -7,39 +7,69 @@
</el-select>
<el-button
v-waves
class=
"filter-item"
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleFilter"
>
搜索
</el-button>
<el-button
class=
"filter-item"
style=
"margin-left: 10px;"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"handleCreate"
>
创建
</el-button>
<el-button
class=
"filter-item"
style=
"margin-left: 10px;"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"handleOfflineOrOnline('offline')"
>
下线
</el-button>
<el-button
class=
"filter-item"
style=
"margin-left: 10px;"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"handleOfflineOrOnline('online')"
>
上线
</el-button>
</div>
<el-table
v-loading=
"listLoading"
:data=
"list"
border
fit
highlight-current-row
style=
"width: 100%"
ref=
"multipleTable"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
></el-table-column>
<el-table-column
align=
"center"
label=
"
推送
ID "
width=
"80"
>
<el-table-column
align=
"center"
label=
"
小组
ID "
width=
"80"
>
<template
slot-scope=
"scope"
>
<router-link
:to=
"'/
push
/edit/'+scope.row.id"
class=
"link-type"
>
<router-link
:to=
"'/
group
/edit/'+scope.row.id"
class=
"link-type"
>
<span>
{{
scope
.
row
.
id
}}
</span>
</router-link>
</
template
>
</el-table-column>
<el-table-column
width=
"190px"
align=
"center"
label=
"
推送内容
"
>
<el-table-column
width=
"190px"
align=
"center"
label=
"
小组名称
"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
content
}}
</span>
<span>
{{
scope
.
row
.
name
}}
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"300px"
align=
"center"
label=
"
推送时间
"
>
<el-table-column
width=
"300px"
align=
"center"
label=
"
小组简介
"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
push_time
}}
</span>
<span>
{{
scope
.
row
.
desc
}}
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"120px"
align=
"center"
label=
"
创建时间
"
>
<el-table-column
width=
"120px"
align=
"center"
label=
"
明星数
"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
create_time
}}
</span>
<span>
{{
scope
.
row
.
star_nums
}}
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"80px"
align=
"center"
label=
"
创建用户
"
>
<el-table-column
width=
"80px"
align=
"center"
label=
"
用户数
"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
creator
}}
</span>
<router-link
:to=
"'/user/edit/'+scope.row.id"
class=
"link-type"
>
<span>
{{
scope
.
row
.
user_nums
}}
</span>
</router-link>
</
template
>
</el-table-column>
<el-table-column
width=
"80px"
align=
"center"
label=
"帖子数"
>
<
template
slot-scope=
"scope"
>
<router-link
:to=
"'/topic/list/'+scope.row.id"
class=
"link-type"
>
<span>
{{
scope
.
row
.
topic_nums
}}
</span>
</router-link>
</
template
>
</el-table-column>
<el-table-column
width=
"80px"
align=
"center"
label=
"组长"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
creator
.
name
}}
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"120px"
align=
"center"
label=
"下线"
>
<
template
slot-scope=
"scope"
>
<el-tag
:type=
"scope.row.is_online | isOnlineFilter"
>
{{
scope
.
row
.
is_online
==
1
?
'是'
:
'否'
}}
</el-tag>
</
template
>
</el-table-column>
<el-table-column
width=
"120px"
align=
"center"
label=
"下线"
>
<
template
slot-scope=
"scope"
>
<el-tag
:type=
"scope.row.is_recommend | isOnlineFilter"
>
{{
scope
.
row
.
is_recommend
==
1
?
'是'
:
'否'
}}
</el-tag>
</
template
>
</el-table-column>
...
...
@@ -60,11 +90,29 @@ export default {
name
:
'GroupList'
,
components
:
{
Pagination
},
directives
:
{
waves
},
filters
:
{
isOnlineFilter
(
status
)
{
const
statusMap
=
{
1
:
'success'
,
0
:
'info'
,
}
return
statusMap
[
status
]
},
genderFilter
(
status
)
{
const
statusMap
=
{
'男'
:
'success'
,
'女'
:
'info'
,
'全部'
:
'danger'
}
return
statusMap
[
status
]
},
},
data
()
{
return
{
list
:
null
,
total
:
0
,
listLoading
:
true
,
multipleSelection
:
[],
del_list
:
[],
listQuery
:
{
page
:
0
,
...
...
@@ -75,8 +123,8 @@ export default {
},
},
SearchTypeOptions
:[
{
'key'
:
'id'
,
'display_name'
:
'
推送
ID'
},
{
'key'
:
'content'
,
'display_name'
:
'
推送内容
'
},
{
'key'
:
'id'
,
'display_name'
:
'
小组
ID'
},
{
'key'
:
'content'
,
'display_name'
:
'
小组名称
'
},
]
}
},
...
...
@@ -92,6 +140,9 @@ export default {
this
.
listLoading
=
false
})
},
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
;
},
handleSizeChange
(
val
)
{
this
.
listQuery
.
limit
=
val
this
.
getList
()
...
...
@@ -106,7 +157,25 @@ export default {
},
handleCreate
()
{
this
.
$router
.
push
(
'/push/create'
)
}
},
handleOfflineOrOnline
(
val
){
const
length
=
this
.
multipleSelection
.
length
;
let
str
=
''
;
this
.
del_list
=
this
.
del_list
.
concat
(
this
.
multipleSelection
);
for
(
let
i
=
0
;
i
<
length
;
i
++
)
{
if
(
val
===
'offline'
){
this
.
multipleSelection
[
i
].
is_online
=
0
}
else
{
this
.
multipleSelection
[
i
].
is_online
=
1
}
str
+=
this
.
multipleSelection
[
i
].
id
+
' '
;
}
OffLineOrOnLine
({
type
:
val
,
ids
:
str
}).
then
(
response
=>
{
this
.
multipleSelection
=
[];
response
.
data
.
data
.
message
this
.
$message
.
success
(
response
.
data
.
data
.
message
);
})
},
}
}
</
script
>
...
...
vu/src/views/tag/components/TagDetail.vue
View file @
f461dd33
...
...
@@ -15,28 +15,6 @@
标签名称
</MDinput>
</el-form-item>
<div
class=
"postInfo-container"
>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label-width=
"75px"
label=
"标签类型:"
class=
"postInfo-container-item"
prop=
"type"
>
<el-select
v-model=
"postForm.type"
:placeholder=
"'标签类型'"
clearable
class=
"postInfo-container-item"
style=
"width: 300px"
>
<el-option
v-for=
"item in TagTypeOptions"
:key=
"item.key"
:label=
"item.display_name"
:value=
"item.key"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label-width=
"75px"
label=
"标签等级:"
class=
"postInfo-container-item"
prop=
"level"
>
<el-select
v-model=
"postForm.level"
:placeholder=
"'标签等级'"
clearable
class=
"postInfo-container-item"
style=
"width:300px"
>
<el-option
v-for=
"item in LevelTypeOptions"
:key=
"item.key"
:label=
"item.display_name"
:value=
"item.key"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
</div>
</el-col>
</el-row>
<el-row>
...
...
@@ -60,9 +38,9 @@
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label-width=
"75px"
label=
"上级标签:"
class=
"postInfo-container-item"
>
<el-select
v-model=
"postForm.up_tag"
:remote-method=
"getRemoteTagList"
filterable
remote
multiple
value-key=
"id"
<el-select
v-model=
"postForm.up_tag
s
"
:remote-method=
"getRemoteTagList"
filterable
remote
multiple
value-key=
"id"
placeholder=
"搜索标签"
style=
"width: 70%"
>
<el-option
v-for=
"(item,index) in
region
ListOptions"
:key=
"item+index"
:label=
"item.name"
:value=
"item.id"
/>
<el-option
v-for=
"(item,index) in
upTag
ListOptions"
:key=
"item+index"
:label=
"item.name"
:value=
"item.id"
/>
</el-select>
</el-form-item>
</el-col>
...
...
@@ -70,7 +48,7 @@
<el-form-item
label-width=
"75px"
label=
"下级标签:"
class=
"postInfo-container-item"
>
<el-select
v-model=
"postForm.down_tag"
v-model=
"postForm.down_tag
s
"
:remote-method=
"getRemoteTagList"
multiple
filterable
...
...
@@ -119,11 +97,9 @@
const
defaultForm
=
{
status
:
'draft'
,
name
:
''
,
level
:
''
,
type
:
''
,
description
:
''
,
up_tag
:
[],
down_tag
:
[],
up_tag
s
:
[],
down_tag
s
:
[],
}
export
default
{
...
...
@@ -150,28 +126,15 @@
return
{
postForm
:
Object
.
assign
({},
defaultForm
),
loading
:
false
,
region
ListOptions
:
[],
upTag
ListOptions
:
[],
groupListOptions
:
[],
TagTypeOptions
:
[
{
'key'
:
0
,
'display_name'
:
'用户标签'
},
{
'key'
:
1
,
'display_name'
:
'帖子标签'
},
],
LevelTypeOptions
:
[
{
'key'
:
1
,
'display_name'
:
'一级'
},
{
'key'
:
2
,
'display_name'
:
'二级'
},
{
'key'
:
4
,
'display_name'
:
'四级'
},
{
'key'
:
5
,
'display_name'
:
'五级'
},
{
'key'
:
6
,
'display_name'
:
'六级'
},
],
rules
:
{
name
:
[{
validator
:
validateRequire
,
trigger
:
'blur'
}],
type
:
[{
validator
:
validateRequire
,
trigger
:
'blur'
}],
level
:
[{
validator
:
validateRequire
,
trigger
:
'blur'
}],
},
tempRoute
:
{},
temparray
:{
'up_tag'
:[],
'down_tag'
:
[],
'up_tag
s
'
:[],
'down_tag
s
'
:
[],
}
}
},
...
...
@@ -197,17 +160,18 @@
let
rep
=
response
.
data
.
data
.
data
;
let
up_temp
=
[]
let
down_temp
=
[]
for
(
let
i
=
0
;
i
<
rep
.
up_tag
.
length
;
i
++
){
up_temp
.
push
(
rep
.
up_tag
[
i
][
'name'
]);
this
.
temparray
[
'up_tag
'
].
push
(
rep
.
up_tag
[
i
])
for
(
let
i
=
0
;
i
<
rep
.
up_tag
s
.
length
;
i
++
){
up_temp
.
push
(
rep
.
up_tag
s
[
i
][
'name'
]);
this
.
temparray
[
'up_tag
s'
].
push
(
rep
.
up_tags
[
i
])
}
for
(
let
i
=
0
;
i
<
rep
.
down_tag
.
length
;
i
++
){
down_temp
.
push
(
rep
.
down_tag
[
i
][
'name'
]);
this
.
temparray
[
'down_tag
'
].
push
(
rep
.
down_tag
[
i
])
for
(
let
i
=
0
;
i
<
rep
.
down_tag
s
.
length
;
i
++
){
down_temp
.
push
(
rep
.
down_tag
s
[
i
][
'name'
]);
this
.
temparray
[
'down_tag
s'
].
push
(
rep
.
down_tags
[
i
])
}
rep
.
down_tag
=
down_temp
rep
.
up_tag
=
up_temp
rep
.
down_tag
s
=
down_temp
rep
.
up_tag
s
=
up_temp
this
.
postForm
=
rep
}).
catch
(
err
=>
{
console
.
log
(
err
)
})
...
...
@@ -217,12 +181,12 @@
if
(
valid
)
{
this
.
loading
=
true
;
if
(
this
.
isEdit
){
this
.
postForm
.
up_tag
=
Assembledata
(
this
.
temparray
[
'up_tag'
],
this
.
postForm
.
up_tag
);
this
.
postForm
.
down_tag
=
Assembledata
(
this
.
temparray
[
'down_tag'
],
this
.
postForm
.
down_tag
);
this
.
postForm
.
up_tag
s
=
Assembledata
(
this
.
temparray
[
'up_tags'
],
this
.
postForm
.
up_tags
);
this
.
postForm
.
down_tag
s
=
Assembledata
(
this
.
temparray
[
'down_tags'
],
this
.
postForm
.
down_tags
);
}
else
{
this
.
postForm
.
up_tag
=
this
.
postForm
.
up_tag
.
join
(
','
)
this
.
postForm
.
down_tag
=
this
.
postForm
.
down_tag
.
join
(
','
)
this
.
postForm
.
up_tag
s
=
this
.
postForm
.
up_tags
.
join
(
','
)
this
.
postForm
.
down_tag
s
=
this
.
postForm
.
down_tags
.
join
(
','
)
}
CreateTag
(
this
.
postForm
).
then
(
response
=>
{
...
...
@@ -257,7 +221,7 @@
getRemoteTagList
(
query
)
{
tagSearch
(
query
).
then
(
response
=>
{
if
(
!
response
.
data
.
data
.
data
)
return
this
.
region
ListOptions
=
response
.
data
.
data
.
data
this
.
upTag
ListOptions
=
response
.
data
.
data
.
data
})
},
}
...
...
vu/src/views/tag/list.vue
View file @
f461dd33
...
...
@@ -5,12 +5,6 @@
<el-select
v-model=
"listQuery.filter.key"
:placeholder=
"'搜索字段'"
clearable
class=
"filter-item"
style=
"width: 110px"
>
<el-option
v-for=
"item in SearchTypeOptions"
:key=
"item.key"
:label=
"item.display_name"
:value=
"item.key"
/>
</el-select>
<el-select
v-model=
"listQuery.filter.level"
:placeholder=
"'标签等级'"
clearable
class=
"filter-item"
style=
"width: 110px"
>
<el-option
v-for=
"item in TagLevelTypeOptions"
:key=
"item.key"
:label=
"item.display_name"
:value=
"item.key"
/>
</el-select>
<el-select
v-model=
"listQuery.filter.type"
:placeholder=
"'标签类型'"
clearable
class=
"filter-item"
style=
"width: 110px"
>
<el-option
v-for=
"item in TagtypeTypeOptions"
:key=
"item.key"
:label=
"item.display_name"
:value=
"item.key"
/>
</el-select>
<el-select
v-model=
"listQuery.filter.is_online"
:placeholder=
"'上线'"
clearable
class=
"filter-item"
style=
"width: 100px"
>
<el-option
v-for=
"item in BooleanTypeOptions"
:key=
"item.key"
:label=
"item.display_name"
:value=
"item.key"
/>
</el-select>
...
...
@@ -21,7 +15,7 @@
</div>
<el-table
v-loading=
"listLoading"
:data=
"list"
border
fit
highlight-current-row
style=
"width: 100%"
ref=
"multipleTable"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
></el-table-column>
<el-table-column
align=
"center"
label=
"标签ID"
width=
"148"
>
<el-table-column
align=
"center"
label=
"标签ID"
>
<template
slot-scope=
"scope"
>
<router-link
:to=
"'/tag/edit/'+scope.row.id"
class=
"link-type"
>
<span>
{{
scope
.
row
.
id
}}
</span>
...
...
@@ -29,25 +23,14 @@
</
template
>
</el-table-column>
<el-table-column
width=
"280px"
align=
"center"
label=
"标签名称"
>
<el-table-column
align=
"center"
label=
"标签名称"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
name
}}
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"280px"
align=
"center"
label=
"标签类型"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
type
}}
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"220px"
align=
"center"
label=
"标签等级"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
level
}}
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"220px"
align=
"center"
label=
"下线"
>
<el-table-column
align=
"center"
label=
"下线"
>
<
template
slot-scope=
"scope"
>
<el-tag
:type=
"scope.row.is_online | isOnlineFilter"
>
{{
scope
.
row
.
is_online
==
1
?
'是'
:
'否'
}}
</el-tag>
</
template
>
...
...
@@ -76,14 +59,6 @@ export default {
}
return
statusMap
[
status
]
},
genderFilter
(
status
)
{
const
statusMap
=
{
'男'
:
'success'
,
'女'
:
'info'
,
'全部'
:
'danger'
}
return
statusMap
[
status
]
},
},
directives
:
{
waves
},
data
()
{
...
...
@@ -108,17 +83,6 @@ export default {
{
'key'
:
1
,
'display_name'
:
'是'
},
{
'key'
:
0
,
'display_name'
:
'否'
}
],
TagLevelTypeOptions
:
[
{
'key'
:
1
,
'display_name'
:
'一级'
},
{
'key'
:
2
,
'display_name'
:
'二级'
},
{
'key'
:
3
,
'display_name'
:
'三级'
},
{
'key'
:
4
,
'display_name'
:
'四级'
},
{
'key'
:
5
,
'display_name'
:
'五级'
},
],
TagtypeTypeOptions
:
[
{
'key'
:
0
,
'display_name'
:
'用户标签'
},
{
'key'
:
1
,
'display_name'
:
'帖子标签'
}
],
SearchTypeOptions
:[
{
'key'
:
'id'
,
'display_name'
:
'ID'
},
{
'key'
:
'name'
,
'display_name'
:
'标签名称'
},
...
...
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