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
1
Merge Requests
1
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
alpha
sun
Commits
24dae774
Commit
24dae774
authored
Nov 29, 2018
by
Davve
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加pick
parent
bd7378a8
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
438 additions
and
168 deletions
+438
-168
pick.py
api/pick.py
+35
-0
search.py
api/search.py
+1
-1
star.py
api/star.py
+6
-6
urls.py
api/urls.py
+19
-17
user.py
api/user.py
+2
-2
requirements.txt
requirements.txt
+3
-2
pick.js
vu/src/api/pick.js
+16
-0
remoteSearch.js
vu/src/api/remoteSearch.js
+2
-2
star.js
vu/src/api/star.js
+5
-5
GroupDetail.vue
vu/src/views/group/components/GroupDetail.vue
+1
-0
PickDetail.vue
vu/src/views/pick/components/PickDetail.vue
+326
-114
PushDetail.vue
vu/src/views/push/components/PushDetail.vue
+1
-1
list.vue
vu/src/views/push/list.vue
+1
-0
StarDetail.vue
vu/src/views/star/components/StarDetail.vue
+1
-1
list.vue
vu/src/views/star/list.vue
+1
-1
TopicDetail.vue
vu/src/views/topic/components/TopicDetail.vue
+4
-3
list.vue
vu/src/views/topic/list.vue
+1
-0
UserDetail.vue
vu/src/views/user/components/UserDetail.vue
+12
-12
list.vue
vu/src/views/user/list.vue
+1
-1
No files found.
api/pick.py
View file @
24dae774
...
...
@@ -4,6 +4,7 @@
# Date: 2018/11/15
from
utils.base
import
APIView
from
alpha_types.venus
import
PICK_TYPE
class
PickListView
(
APIView
):
...
...
@@ -63,4 +64,37 @@ class UpdateOrCreateView(APIView):
raise
e
return
{
'message'
:
'操作成功'
}
class
PickUserListView
(
APIView
):
def
get
(
self
,
request
):
pick_id
=
request
.
GET
.
get
(
'id'
,
0
)
pick_type
=
int
(
request
.
GET
.
get
(
'pick_type'
,
0
))
offset
=
int
(
request
.
GET
.
get
(
'page'
,
1
))
limit
=
int
(
request
.
GET
.
get
(
'limit'
,
10
))
filters
=
{
'pick_id'
:
pick_id
}
dispatch_rpc_endpoint
=
{
PICK_TYPE
.
CELEBRITY
:
'venus/sun/pick/celebrity/list'
,
PICK_TYPE
.
TOPIC
:
'venus/sun/pick/topic/list'
}
try
:
data
=
self
.
rpc
[
dispatch_rpc_endpoint
[
pick_type
]](
offset
=
(
offset
-
1
)
*
limit
,
limit
=
limit
,
filters
=
filters
)
.
unwrap
()
except
Exception
as
e
:
raise
e
return
data
def
post
(
self
,
request
):
celebrity_id
=
request
.
POST
.
get
(
'celebrity_id'
,
''
)
fake_pick_nums
=
request
.
POST
.
get
(
'fake_pick_nums'
,
0
)
topic_id
=
request
.
POST
.
get
(
'topic_id'
,
''
)
try
:
self
.
rpc
[
'venus/sun/pick/add_fake_pick_nums'
](
celebrity_id
=
celebrity_id
,
topic_id
=
topic_id
,
pick_nums
=
fake_pick_nums
)
.
unwrap
()
except
Exception
as
e
:
raise
e
return
{
'message'
:
'操作失败'
}
\ No newline at end of file
api/search.py
View file @
24dae774
...
...
@@ -17,7 +17,7 @@ class GroupSearchView(APIView):
return
{
'data'
:
data
}
class
Region
SearchView
(
APIView
):
class
Country
SearchView
(
APIView
):
def
get
(
self
,
request
):
name
=
request
.
GET
.
get
(
'name'
)
try
:
...
...
api/star.py
View file @
24dae774
...
...
@@ -7,23 +7,23 @@ import json
from
utils.base
import
APIView
class
Star
ListView
(
APIView
):
class
Celebrity
ListView
(
APIView
):
def
get
(
self
,
request
):
page
=
int
(
request
.
GET
.
get
(
'page'
,
0
))
limit
=
int
(
request
.
GET
.
get
(
'limit'
,
10
))
filter
=
self
.
handle_filter
(
request
.
GET
.
get
(
'filter'
,
""
))
try
:
data
=
self
.
rpc
[
'venus/sun/
star
/list'
](
offset
=
(
page
-
1
)
*
limit
,
limit
=
limit
,
filters
=
filter
)
.
unwrap
()
data
=
self
.
rpc
[
'venus/sun/
celebrity
/list'
](
offset
=
(
page
-
1
)
*
limit
,
limit
=
limit
,
filters
=
filter
)
.
unwrap
()
except
Exception
as
e
:
raise
e
return
data
class
Star
UpdateOrCreate
(
APIView
):
class
Celebrity
UpdateOrCreate
(
APIView
):
def
get
(
self
,
request
):
id
=
request
.
GET
.
get
(
'id'
)
try
:
data
=
self
.
rpc
[
'venus/sun/
star
/get'
](
id
=
id
)
.
unwrap
()
data
=
self
.
rpc
[
'venus/sun/
celebrity
/get'
](
id
=
id
)
.
unwrap
()
except
Exception
as
e
:
raise
e
return
{
'data'
:
data
}
...
...
@@ -41,7 +41,7 @@ class StarUpdateOrCreate(APIView):
}
print
(
json
.
loads
(
request
.
POST
.
get
(
'group_ids'
,
[])))
try
:
self
.
rpc
[
'venus/sun/
star
/edit'
](
id
=
id
,
data
=
data
)
.
unwrap
()
self
.
rpc
[
'venus/sun/
celebrity
/edit'
](
id
=
id
,
data
=
data
)
.
unwrap
()
except
Exception
as
e
:
raise
e
...
...
@@ -50,7 +50,7 @@ class StarUpdateOrCreate(APIView):
}
class
Star
RelatedGroup
(
APIView
):
class
Celebrity
RelatedGroup
(
APIView
):
def
get
(
self
,
request
):
id
=
request
.
GET
.
get
(
'id'
)
offset
=
int
(
request
.
GET
.
get
(
'page'
,
0
))
...
...
api/urls.py
View file @
24dae774
...
...
@@ -51,33 +51,35 @@ urlpatterns = [
url
(
r'^topic/reply/create$'
,
ReplyCreate
.
as_view
()),
# star相关
url
(
r'^
star/list$'
,
Star
ListView
.
as_view
()),
url
(
r'^
star/create$'
,
Star
UpdateOrCreate
.
as_view
()),
url
(
r'^
star/detail$'
,
Star
UpdateOrCreate
.
as_view
()),
url
(
r'^
star/star_related_group_info'
,
Star
RelatedGroup
.
as_view
()),
url
(
r'^
celebrity/list$'
,
Celebrity
ListView
.
as_view
()),
url
(
r'^
celebrity/create$'
,
Celebrity
UpdateOrCreate
.
as_view
()),
url
(
r'^
celebrity/detail$'
,
Celebrity
UpdateOrCreate
.
as_view
()),
url
(
r'^
celebrity/celebrity_related_group_info'
,
Celebrity
RelatedGroup
.
as_view
()),
# push相关
url
(
r'push/list$'
,
PushListView
.
as_view
()),
url
(
r'push/create'
,
PushUpdateOrCreateView
.
as_view
()),
url
(
r'push/detail'
,
PushUpdateOrCreateView
.
as_view
()),
url
(
r'push/effect_push'
,
EffectPushTaskView
.
as_view
()),
url
(
r'
^
push/list$'
,
PushListView
.
as_view
()),
url
(
r'
^
push/create'
,
PushUpdateOrCreateView
.
as_view
()),
url
(
r'
^
push/detail'
,
PushUpdateOrCreateView
.
as_view
()),
url
(
r'
^
push/effect_push'
,
EffectPushTaskView
.
as_view
()),
# pick相关
url
(
r'pick/list$'
,
PickListView
.
as_view
()),
url
(
r'pick/list/update$'
,
PickListView
.
as_view
()),
url
(
r'pick/create$'
,
UpdateOrCreateView
.
as_view
()),
url
(
r'pick/detail/'
,
UpdateOrCreateView
.
as_view
()),
url
(
r'^pick/list$'
,
PickListView
.
as_view
()),
url
(
r'^pick/list/update$'
,
PickListView
.
as_view
()),
url
(
r'^pick/create$'
,
UpdateOrCreateView
.
as_view
()),
url
(
r'^pick/detail/'
,
UpdateOrCreateView
.
as_view
()),
url
(
r'^pick/user/list$'
,
PickUserListView
.
as_view
()),
url
(
r'^pick/add_fake_pick_nums$'
,
PickUserListView
.
as_view
()),
# 标签相关
url
(
r'tag/list$'
,
TagListView
.
as_view
()),
url
(
r'tag/list/update$'
,
TagListView
.
as_view
()),
url
(
r'
tag/create
'
,
TagUpdateOrCreateView
.
as_view
()),
url
(
r'
tag/detail
'
,
TagUpdateOrCreateView
.
as_view
()),
url
(
r'
^
tag/list$'
,
TagListView
.
as_view
()),
url
(
r'
^
tag/list/update$'
,
TagListView
.
as_view
()),
url
(
r'
^tag/create$
'
,
TagUpdateOrCreateView
.
as_view
()),
url
(
r'
^tag/detail$
'
,
TagUpdateOrCreateView
.
as_view
()),
]
search_urlpatterns
=
[
url
(
r'search/group$'
,
GroupSearchView
.
as_view
()),
url
(
r'search/
region'
,
Region
SearchView
.
as_view
()),
url
(
r'search/
country'
,
Country
SearchView
.
as_view
()),
url
(
r'search/user'
,
UserSearchView
.
as_view
()),
url
(
r'search/tag'
,
TagSearchView
.
as_view
()),
url
(
r'search/star'
,
StarSearchView
.
as_view
()),
...
...
api/user.py
View file @
24dae774
...
...
@@ -35,7 +35,7 @@ class UserUpdateOrCreate(APIView):
def
post
(
self
,
request
):
user_id
=
request
.
POST
.
get
(
'id'
,
''
)
show_time
=
analysis_time
(
request
.
POST
.
get
(
'show_time'
,
0
))
#
show_time = analysis_time(request.POST.get('show_time', 0))
tag_ids
=
list
(
set
(
request
.
POST
.
get
(
'tag_ids'
)
.
split
(
','
)))
if
not
user_id
:
user_id
=
time
.
time
()
...
...
@@ -47,7 +47,7 @@ class UserUpdateOrCreate(APIView):
'tag_ids'
:
list
(
filter
(
lambda
x
:
x
,
tag_ids
)),
'is_puppet'
:
request
.
POST
.
get
(
'is_puppet'
),
'city_id'
:
request
.
POST
.
get
(
'city'
),
'show_time'
:
show_time
,
#
'show_time': show_time,
'phone'
:
request
.
POST
.
get
(
'phone'
),
'email'
:
request
.
POST
.
get
(
'email'
),
'gender'
:
request
.
POST
.
get
(
'gender'
),
...
...
requirements.txt
View file @
24dae774
...
...
@@ -10,4 +10,5 @@ git+ssh://git@git.wanmeizhensuo.com/backend/gm-protocol.git@master
git+ssh://git@git.wanmeizhensuo.com/backend/gm-config.git@v0.1.3
git+ssh://git@git.wanmeizhensuo.com/backend/gm-logging.git@v0.7.8
git+ssh://git@git.wanmeizhensuo.com/backend/gm-dataquery.git@v0.2.10
git+ssh://git@git.wanmeizhensuo.com/system/gm-tracer.git@v0.1.2
\ No newline at end of file
git+ssh://git@git.wanmeizhensuo.com/system/gm-tracer.git@v0.1.2
git+ssh://git@git.wanmeizhensuo.com/alpha/alpha-types.git@dev
\ No newline at end of file
vu/src/api/pick.js
View file @
24dae774
...
...
@@ -32,3 +32,19 @@ export function fetchPickDetail(id) {
params
:
{
id
}
})
}
export
function
fetchPickUserList
(
query
)
{
return
request
({
url
:
'/api/pick/user/list'
,
method
:
'get'
,
params
:
query
})
}
export
function
AddFakePickNums
(
data
)
{
return
request
({
url
:
'/api/pick/add_fake_pick_nums'
,
method
:
'post'
,
data
})
}
vu/src/api/remoteSearch.js
View file @
24dae774
...
...
@@ -16,9 +16,9 @@ export function groupSearch(name) {
})
}
export
function
region
Search
(
name
)
{
export
function
country
Search
(
name
)
{
return
request
({
url
:
'/api/search/
region
'
,
url
:
'/api/search/
country
'
,
method
:
'get'
,
params
:
{
name
}
})
...
...
vu/src/api/star.js
View file @
24dae774
...
...
@@ -2,7 +2,7 @@ import request from '@/utils/request'
export
function
fetchList
(
query
)
{
return
request
({
url
:
'/api/
star
/list'
,
url
:
'/api/
celebrity
/list'
,
method
:
'get'
,
params
:
query
})
...
...
@@ -10,7 +10,7 @@ export function fetchList(query) {
export
function
starCreate
(
data
)
{
return
request
({
url
:
'/api/
star
/create'
,
url
:
'/api/
celebrity
/create'
,
method
:
'post'
,
data
})
...
...
@@ -18,7 +18,7 @@ export function starCreate(data) {
export
function
starDetail
(
id
)
{
return
request
({
url
:
'/api/
star
/detail'
,
url
:
'/api/
celebrity
/detail'
,
method
:
'get'
,
params
:
{
id
}
})
...
...
@@ -26,7 +26,7 @@ export function starDetail(id) {
export
function
OffLineOrOnLine
(
data
)
{
return
request
({
url
:
'/api/
star
/update_or_create'
,
url
:
'/api/
celebrity
/update_or_create'
,
method
:
'post'
,
data
})
...
...
@@ -34,7 +34,7 @@ export function OffLineOrOnLine(data) {
export
function
fetchStarRelatedGroup
(
id
)
{
return
request
({
url
:
'/api/
star/star
_related_group_info'
,
url
:
'/api/
celebrity/celebrity
_related_group_info'
,
method
:
'get'
,
params
:
{
id
}
})
...
...
vu/src/views/group/components/GroupDetail.vue
View file @
24dae774
...
...
@@ -88,6 +88,7 @@
<span
v-show=
"contentShortLength"
class=
"word-counter"
>
{{
contentShortLength
}}
字
</span>
</el-form-item>
</el-card>
</el-row>
...
...
vu/src/views/pick/components/PickDetail.vue
View file @
24dae774
...
...
@@ -8,110 +8,254 @@
</sticky>
<div
class=
"createPost-main-container"
>
<el-row>
<el-col
:span=
"24"
>
<el-form-item
style=
"margin-bottom: 40px;"
prop=
"name"
>
<MDinput
v-model=
"postForm.name"
:maxlength=
"100"
name=
"name"
required
>
pick名称
</MDinput>
</el-form-item>
<div
class=
"postInfo-container"
>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label-width=
"45px"
label=
"性别:"
class=
"postInfo-container-item"
>
<el-select
v-model=
"postForm.gender"
:placeholder=
"'性别:'"
clearable
class=
"postInfo-container-item"
style=
"width: 120px"
>
<el-option
v-for=
"item in GenderTypeOptions"
:key=
"item.key"
:label=
"item.display_name"
:value=
"item.key"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label-width=
"60px"
label=
"属性:"
class=
"postInfo-container-item"
>
<el-select
v-model=
"postForm.pick_type"
:placeholder=
"'性别:'"
clearable
class=
"postInfo-container-item"
style=
"width:120px"
>
<el-option
v-for=
"item in PickTypeOptions"
:key=
"item.key"
:label=
"item.display_name"
:value=
"item.key"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
style=
"margin-bottom: 40px;"
label-width=
"45px"
label=
"位置:"
prop=
"position"
>
<el-input
:rows=
"1"
v-model=
"postForm.position"
type=
"number"
class=
"article-textarea"
style=
"width: 120px"
placeholder=
"请输入内容"
/>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-card
class=
"box-card"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
pick相关
</span>
</div>
</el-col>
<el-row>
<el-col
:span=
"24"
>
<el-form-item
style=
"margin-bottom: 40px;"
prop=
"name"
>
<MDinput
v-model=
"postForm.name"
:maxlength=
"100"
name=
"name"
required
>
pick名称
</MDinput>
</el-form-item>
<div
class=
"postInfo-container"
>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label-width=
"45px"
label=
"性别:"
class=
"postInfo-container-item"
>
<el-select
v-model=
"postForm.gender"
:placeholder=
"'性别:'"
clearable
class=
"postInfo-container-item"
style=
"width: 120px"
>
<el-option
v-for=
"item in GenderTypeOptions"
:key=
"item.key"
:label=
"item.display_name"
:value=
"item.key"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label-width=
"60px"
label=
"属性:"
class=
"postInfo-container-item"
>
<el-select
v-model=
"postForm.pick_type"
:placeholder=
"'性别:'"
clearable
class=
"postInfo-container-item"
style=
"width:120px"
>
<el-option
v-for=
"item in PickTypeOptions"
:key=
"item.key"
:label=
"item.display_name"
:value=
"item.key"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
style=
"margin-bottom: 40px;"
label-width=
"45px"
label=
"位置:"
prop=
"position"
>
<el-input
:rows=
"1"
v-model=
"postForm.position"
type=
"number"
class=
"article-textarea"
style=
"width: 120px"
placeholder=
"请输入内容"
/>
</el-form-item>
</el-col>
</el-row>
</div>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"24"
>
<div
class=
"postInfo-container"
>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
style=
"margin-bottom: 40px;"
label-width=
"45px"
label=
"pickid:"
prop=
"id"
v-if=
"isEdit"
>
<el-input
:rows=
"1"
v-model=
"postForm.id"
type=
"number"
class=
"article-textarea"
style=
"width: 120px"
disabled
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
style=
"margin-bottom: 40px;"
label-width=
"75px"
label=
"pick用户:"
prop=
"user_nums"
v-if=
"isEdit"
>
<el-input
:rows=
"1"
v-model=
"postForm.user_nums"
type=
"number"
class=
"article-textarea"
style=
"width: 120px"
disabled
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
style=
"margin-bottom: 40px;"
label-width=
"85px"
label=
"创建时间:"
prop=
"create_time"
v-if=
"isEdit"
>
<el-input
:rows=
"1"
v-model=
"postForm.create_time"
type=
"text"
class=
"article-textarea"
style=
"width: 170px"
disabled
/>
</el-form-item>
</el-col>
</el-row>
</div>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label-width=
"45px"
label=
"地区:"
class=
"postInfo-container-item"
>
<el-select
v-model=
"postForm.region"
:remote-method=
"getRemoteCityList"
filterable
remote
multiple
value-key=
"id"
placeholder=
"搜索地区"
style=
"width: 100%"
>
<el-option
v-for=
"(item,index) in regionListOptions"
:key=
"item+index"
:label=
"item.name"
:value=
"item.id"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label-width=
"45px"
label=
"小组:"
class=
"postInfo-container-item"
>
<el-select
v-model=
"postForm.pick_group"
:remote-method=
"getRemoteGroupList"
multiple
filterable
remote
reserve-keyword
placeholder=
"搜索小组"
style=
"width: 100%"
:loading=
"loading"
value-key=
"id"
>
<el-option
v-for=
"(item, index) in groupListOptions"
:key=
"item+index"
:label=
"item.name"
:value=
"item.id"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-form-item
style=
"margin-bottom: 40px;"
label-width=
"45px"
label=
"简介:"
prop=
"desc"
>
<el-input
:rows=
"1"
v-model=
"postForm.desc"
type=
"textarea"
class=
"article-textarea"
autosize
placeholder=
"请输入内容"
/>
<span
v-show=
"contentShortLength"
class=
"word-counter"
>
{{
contentShortLength
}}
字
</span>
</el-form-item>
<el-form-item
style=
"margin-bottom: 40px;"
label-width=
"45px"
label=
"下线:"
>
<el-radio-group
v-model=
"postForm.is_online"
>
<el-radio
:label=
"1"
>
是
</el-radio>
<el-radio
:label=
"0"
>
否
</el-radio>
</el-radio-group>
</el-form-item>
</el-card>
</el-row>
<el-row>
<el-col
:span=
"24"
>
<div
class=
"postInfo-container"
>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
style=
"margin-bottom: 40px;"
label-width=
"45px"
label=
"pickid:"
prop=
"id"
v-if=
"isEdit"
>
<el-input
:rows=
"1"
v-model=
"postForm.id"
type=
"number"
class=
"article-textarea"
style=
"width: 120px"
disabled
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
style=
"margin-bottom: 40px;"
label-width=
"75px"
label=
"pick用户:"
prop=
"user_nums"
v-if=
"isEdit"
>
<el-input
:rows=
"1"
v-model=
"postForm.user_nums"
type=
"number"
class=
"article-textarea"
style=
"width: 120px"
disabled
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
style=
"margin-bottom: 40px;"
label-width=
"85px"
label=
"创建时间:"
prop=
"create_time"
v-if=
"isEdit"
>
<el-input
:rows=
"1"
v-model=
"postForm.create_time"
type=
"text"
class=
"article-textarea"
style=
"width: 170px"
disabled
/>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
style=
"margin-top:50px;"
v-if=
"isEdit"
>
<el-card
class=
"box-card"
>
<div
slot=
"header"
class=
"clearfix"
>
<span
v-if=
""
>
pick明星相关
</span>
</div>
<div
style=
"margin-bottom:50px;"
>
<div
class=
"filter-container"
>
</div>
<el-table
:data=
"list"
border
fit
highlight-current-row
style=
"width: 100%"
ref=
"multipleTable"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
align=
"center"
></el-table-column>
<el-table-column
align=
"center"
label=
"明星ID"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
celebrity_id
}}
</span>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"明星名称"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
celebrity_name
}}
</span>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"pick值"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
pick_nums
}}
</span>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
min-width=
"100"
label=
"添加pick值"
>
<
template
slot-scope=
"scope"
>
<template
v-if=
"scope.row.edit"
>
<el-input
v-model=
"scope.row.fake_pick_nums"
type=
"number"
class=
"edit-input"
size=
"small"
/>
<el-button
class=
"cancel-btn"
size=
"small"
icon=
"el-icon-refresh"
type=
"warning"
@
click=
"cancelEdit(scope.row)"
>
取消
</el-button>
</
template
>
<span
v-else
>
{{ scope.row.fake_pick_nums }}
</span>
</template>
</el-table-column>
<el-table-column
align=
"center"
label=
"操作"
width=
"120"
>
<
template
slot-scope=
"scope"
>
<el-button
v-if=
"scope.row.edit"
type=
"success"
size=
"small"
icon=
"el-icon-circle-check-outline"
@
click=
"confirmEdit(scope.row)"
>
确认
</el-button>
<el-button
v-else
type=
"primary"
size=
"small"
icon=
"el-icon-edit"
@
click=
"scope.row.edit=!scope.row.edit"
>
添加
</el-button>
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total>0"
:total=
"total"
:page
.
sync=
"listQuery.page"
:limit
.
sync=
"listQuery.limit"
style=
"margin-left: 150px;"
@
pagination=
"getList"
/>
</div>
</el-c
ol
>
</el-c
ard
>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label-width=
"45px"
label=
"地区:"
class=
"postInfo-container-item"
>
<el-select
v-model=
"postForm.region"
:remote-method=
"getRemoteCityList"
filterable
remote
multiple
value-key=
"id"
placeholder=
"搜索地区"
style=
"width: 100%"
>
<el-option
v-for=
"(item,index) in regionListOptions"
:key=
"item+index"
:label=
"item.name"
:value=
"item.id"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label-width=
"45px"
label=
"小组:"
class=
"postInfo-container-item"
>
<el-select
v-model=
"postForm.pick_group"
:remote-method=
"getRemoteGroupList"
multiple
filterable
remote
reserve-keyword
placeholder=
"搜索小组"
style=
"width: 100%"
:loading=
"loading"
value-key=
"id"
>
<el-option
v-for=
"(item, index) in groupListOptions"
:key=
"item+index"
:label=
"item.name"
:value=
"item.id"
/>
</el-select>
</el-form-item>
</el-col>
<el-row
:gutter=
"20"
style=
"margin-top:50px;"
v-if=
"isEdit"
>
<el-card
class=
"box-card"
>
<div
slot=
"header"
class=
"clearfix"
>
<span
v-if=
""
>
pick帖子相关
</span>
</div>
<div
style=
"margin-bottom:50px;"
>
<div
class=
"filter-container"
>
</div>
<el-table
:data=
"list"
border
fit
highlight-current-row
style=
"width: 100%"
ref=
"multipleTable"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
align=
"center"
></el-table-column>
<el-table-column
align=
"center"
label=
"帖子ID"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
topic_id
}}
</span>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"帖子名称"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
topic_name
}}
</span>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"pick值"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
pick_nums
}}
</span>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
min-width=
"100"
label=
"添加pick值"
>
<
template
slot-scope=
"scope"
>
<template
v-if=
"scope.row.edit"
>
<el-input
v-model=
"scope.row.fake_pick_nums"
type=
"number"
class=
"edit-input"
size=
"small"
/>
<el-button
class=
"cancel-btn"
size=
"small"
icon=
"el-icon-refresh"
type=
"warning"
@
click=
"cancelEdit(scope.row)"
>
取消
</el-button>
</
template
>
<span
v-else
>
{{ scope.row.fake_pick_nums }}
</span>
</template>
</el-table-column>
<el-table-column
align=
"center"
label=
"操作"
width=
"120"
>
<
template
slot-scope=
"scope"
>
<el-button
v-if=
"scope.row.edit"
type=
"success"
size=
"small"
icon=
"el-icon-circle-check-outline"
@
click=
"confirmEdit(scope.row)"
>
确认
</el-button>
<el-button
v-else
type=
"primary"
size=
"small"
icon=
"el-icon-edit"
@
click=
"scope.row.edit=!scope.row.edit"
>
添加
</el-button>
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total>0"
:total=
"total"
:page
.
sync=
"listQuery.page"
:limit
.
sync=
"listQuery.limit"
style=
"margin-left: 150px;"
@
pagination=
"getList"
/>
</div>
</el-card>
</el-row>
<el-form-item
style=
"margin-bottom: 40px;"
label-width=
"45px"
label=
"简介:"
prop=
"desc"
>
<el-input
:rows=
"1"
v-model=
"postForm.desc"
type=
"textarea"
class=
"article-textarea"
autosize
placeholder=
"请输入内容"
/>
<span
v-show=
"contentShortLength"
class=
"word-counter"
>
{{
contentShortLength
}}
字
</span>
</el-form-item>
<el-form-item
style=
"margin-bottom: 40px;"
label-width=
"45px"
label=
"下线:"
>
<el-radio-group
v-model=
"postForm.is_online"
>
<el-radio
:label=
"1"
>
是
</el-radio>
<el-radio
:label=
"0"
>
否
</el-radio>
</el-radio-group>
</el-form-item>
</div>
</el-form>
...
...
@@ -121,14 +265,15 @@
<
script
>
import
MDinput
from
'@/components/MDinput'
import
Sticky
from
'@/components/Sticky'
// 粘性header组件
import
{
fetchPickDetail
,
CreatePick
}
from
'@/api/pick'
import
{
groupSearch
,
regionSearch
,
citySearch
}
from
'@/api/remoteSearch'
import
{
isInArray
,
removeByvale
}
from
"@/utils"
;
import
Pagination
from
'@/components/Pagination'
import
{
fetchPickDetail
,
CreatePick
,
fetchPickUserList
,
AddFakePickNums
}
from
'@/api/pick'
import
{
groupSearch
,
citySearch
}
from
'@/api/remoteSearch'
import
{
isInArray
,
removeByvale
}
from
"@/utils"
;
function
Assembledata
(
target
,
source
)
{
var
region_data
=
[]
for
(
var
i
=
0
;
i
<
target
.
length
;
i
++
)
{
if
(
isInArray
(
source
,
target
[
i
][
'name'
])){
for
(
var
i
=
0
;
i
<
target
.
length
;
i
++
)
{
if
(
isInArray
(
source
,
target
[
i
][
'name'
]))
{
region_data
.
push
(
target
[
i
][
'id'
])
removeByvale
(
source
,
target
[
i
][
'name'
]);
}
...
...
@@ -151,7 +296,7 @@
export
default
{
name
:
'PickDetail'
,
components
:
{
MDinput
,
Sticky
},
components
:
{
MDinput
,
Sticky
,
Pagination
},
props
:
{
isEdit
:
{
type
:
Boolean
,
...
...
@@ -173,6 +318,7 @@
return
{
postForm
:
Object
.
assign
({},
defaultForm
),
loading
:
false
,
pick_type
:
''
,
regionListOptions
:
[],
groupListOptions
:
[],
GenderTypeOptions
:
[
...
...
@@ -181,8 +327,8 @@
{
'key'
:
1
,
'display_name'
:
'女'
},
],
PickTypeOptions
:
[
{
'key'
:
1
,
'display_name'
:
'
明星打榜
'
},
{
'key'
:
0
,
'display_name'
:
'
用戶打榜
'
},
{
'key'
:
1
,
'display_name'
:
'
PICK明星
'
},
{
'key'
:
0
,
'display_name'
:
'
PICK帖子
'
},
],
rules
:
{
name
:
[{
validator
:
validateRequire
,
trigger
:
'blur'
}],
...
...
@@ -190,10 +336,21 @@
position
:
[{
validator
:
validateRequire
,
trigger
:
'blur'
}],
},
tempRoute
:
{},
temparray
:{
'region'
:[],
temparray
:
{
'region'
:
[],
'pick_group'
:
[],
}
},
listQuery
:
{
id
:
''
,
pick_type
:
''
,
page
:
0
,
limit
:
10
,
filter
:
{
},
},
list
:
null
,
total
:
1
,
listLoading
:
true
,
}
},
computed
:
{
...
...
@@ -205,6 +362,7 @@
if
(
this
.
isEdit
)
{
const
id
=
this
.
$route
.
params
&&
this
.
$route
.
params
.
id
this
.
fetchData
(
id
)
this
.
getList
()
}
else
{
this
.
postForm
=
Object
.
assign
({},
defaultForm
)
}
...
...
@@ -218,17 +376,18 @@
let
rep
=
response
.
data
.
data
.
data
;
let
pick_temp
=
[]
let
region_temp
=
[]
for
(
let
i
=
0
;
i
<
rep
.
pick_group
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
rep
.
pick_group
.
length
;
i
++
)
{
pick_temp
.
push
(
rep
.
pick_group
[
i
][
'name'
]);
this
.
temparray
[
'pick_group'
].
push
(
rep
.
pick_group
[
i
])
}
for
(
let
i
=
0
;
i
<
rep
.
region
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
rep
.
region
.
length
;
i
++
)
{
region_temp
.
push
(
rep
.
region
[
i
][
'name'
]);
this
.
temparray
[
'region'
].
push
(
rep
.
region
[
i
])
}
rep
.
region
=
region_temp
rep
.
pick_group
=
pick_temp
this
.
postForm
=
rep
this
.
pick_type
=
rep
.
pick_type
;
}).
catch
(
err
=>
{
console
.
log
(
err
)
})
...
...
@@ -237,10 +396,10 @@
this
.
$refs
.
postForm
.
validate
(
valid
=>
{
if
(
valid
)
{
this
.
loading
=
true
;
if
(
this
.
isEdit
){
if
(
this
.
isEdit
)
{
this
.
postForm
.
region
=
Assembledata
(
this
.
temparray
[
'region'
],
this
.
postForm
.
region
);
this
.
postForm
.
pick_group
=
Assembledata
(
this
.
temparray
[
'pick_group'
],
this
.
postForm
.
pick_group
);
}
else
{
}
else
{
this
.
postForm
.
region
=
this
.
postForm
.
region
.
join
(
','
)
this
.
postForm
.
pick_group
=
this
.
postForm
.
pick_group
.
join
(
','
)
}
...
...
@@ -285,6 +444,51 @@
this
.
groupListOptions
=
response
.
data
.
data
.
data
})
},
// 分页相关
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
;
},
reply
()
{
},
getList
()
{
this
.
listLoading
=
true
this
.
listQuery
.
id
=
this
.
$route
.
params
&&
this
.
$route
.
params
.
id
this
.
listQuery
.
pick_type
=
this
.
pick_type
fetchPickUserList
(
this
.
listQuery
).
then
(
response
=>
{
const
items
=
response
.
data
.
data
.
data
this
.
list
=
items
.
map
(
v
=>
{
this
.
$set
(
v
,
'edit'
,
false
)
v
.
original_fake_pick_nums
=
v
.
fake_pick_nums
return
v
})
this
.
total
=
response
.
data
.
data
.
total
this
.
listLoading
=
false
;
})
},
cancelEdit
(
row
)
{
row
.
fake_pick_nums
=
row
.
original_fake_pick_nums
row
.
edit
=
false
this
.
$message
({
message
:
'取消成功'
,
type
:
'warning'
})
},
confirmEdit
(
row
)
{
row
.
edit
=
false
row
.
original_fake_pick_nums
=
row
.
fake_pick_nums
this
.
$message
({
message
:
'添加成功'
,
type
:
'success'
})
AddFakePickNums
(
row
).
then
(
response
=>
{
}).
catch
(
err
=>
{
})
}
}
}
</
script
>
...
...
@@ -323,4 +527,12 @@
top
:
0px
;
}
}
.edit-input
{
padding-right
:
100px
;
}
.cancel-btn
{
position
:
absolute
;
right
:
15px
;
top
:
10px
;
}
</
style
>
vu/src/views/push/components/PushDetail.vue
View file @
24dae774
...
...
@@ -128,7 +128,7 @@ export default {
userListOptions
:
[],
expireTimeOption
:
{
disabledDate
(
date
){
return
date
.
getTime
()
<=
Date
.
now
();
return
date
.
getTime
()
<=
Date
.
now
()
;
}
},
rules
:
{
...
...
vu/src/views/push/list.vue
View file @
24dae774
...
...
@@ -79,6 +79,7 @@ export default {
},
SearchTypeOptions
:[
{
'key'
:
'id'
,
'display_name'
:
'推送ID'
},
{
'key'
:
'title'
,
'display_name'
:
'推送标题'
},
{
'key'
:
'content'
,
'display_name'
:
'推送内容'
},
]
}
...
...
vu/src/views/star/components/StarDetail.vue
View file @
24dae774
...
...
@@ -182,7 +182,7 @@
id
:
''
,
gender
:
''
,
city
:
''
,
is_online
:
undefined
,
is_online
:
0
,
description
:
''
,
avatar
:
''
,
}
...
...
vu/src/views/star/list.vue
View file @
24dae774
...
...
@@ -166,7 +166,7 @@ export default {
this
.
getList
()
},
handleCreate
()
{
this
.
$router
.
push
(
'/
pick
/create'
)
this
.
$router
.
push
(
'/
star
/create'
)
}
}
}
...
...
vu/src/views/topic/components/TopicDetail.vue
View file @
24dae774
...
...
@@ -301,14 +301,14 @@
posting_time
:
''
,
content
:
''
,
topic_ids
:
[],
content_level
:
''
,
content_level
:
0
,
group_name
:
''
,
reported_time
:
''
,
user_name
:
''
,
star_name
:
''
,
is_puppet
:
''
,
tag_ids
:
[],
is_online
:
''
,
is_online
:
0
,
}
export
default
{
...
...
@@ -377,6 +377,7 @@
tempRoute
:
{},
TopicLevelOptions
:
[
{
'key'
:
0
,
'display_name'
:
'未审核'
},
{
'key'
:
1
,
'display_name'
:
'1星'
},
{
'key'
:
2
,
'display_name'
:
'2星'
},
{
'key'
:
3
,
'display_name'
:
'3星'
},
...
...
@@ -728,7 +729,7 @@
this
.
listQuery
.
limit
=
val
this
.
getList
()
},
handleCurrentChange
(
val
)
{
handleCurrentChange
(
val
)
{
this
.
listQuery
.
page
=
val
this
.
getList
()
},
...
...
vu/src/views/topic/list.vue
View file @
24dae774
...
...
@@ -148,6 +148,7 @@ export default {
{
'key'
:
'content'
,
'display_name'
:
'帖子内容'
},
],
ContentLevelTypeOptions
:[
{
'key'
:
0
,
'display_name'
:
'未审核'
},
{
'key'
:
1
,
'display_name'
:
'星级一'
},
{
'key'
:
2
,
'display_name'
:
'星级二'
},
{
'key'
:
3
,
'display_name'
:
'星级三'
},
...
...
vu/src/views/user/components/UserDetail.vue
View file @
24dae774
...
...
@@ -49,12 +49,12 @@
<el-input
v-model=
"postForm.nick_name"
type=
"text"
style=
"width: 230px"
/>
</el-form-item>
</el-col>
<
el-col
:span=
"12"
>
<
el-form-item
label-width=
"75px"
label=
"展示时间:"
class=
"postInfo-container-item"
>
<
el-date-picker
v-model=
"postForm.show_time "
type=
"datetime"
format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"选择日期时间"
:picker-options=
"expireTimeOption"
style=
"width: 230px"
/
>
<
/el-form-item
>
<
/el-col
>
<
!--
<el-col
:span=
"12"
>
--
>
<
!--
<el-form-item
label-width=
"75px"
label=
"展示时间:"
class=
"postInfo-container-item"
>
--
>
<
!--
<el-date-picker
v-model=
"postForm.show_time "
type=
"datetime"
format=
"yyyy-MM-dd HH:mm:ss"
--
>
<!--placeholder="选择日期时间" :picker-options="expireTimeOption" style="width: 230px"/>--
>
<
!--
</el-form-item>
--
>
<
!--
</el-col>
--
>
</el-row>
<el-row>
<el-col
:span=
"12"
>
...
...
@@ -202,7 +202,7 @@
import
{
validateURL
}
from
'@/utils/validate'
import
{
UserDetail
,
fetchGroupUser
,
userCreate
}
from
'@/api/user'
import
{
GroupDetail
}
from
'@/api/group'
import
{
regionSearch
,
tagSearch
,
groupSearch
,
citySearch
}
from
'@/api/remoteSearch'
import
{
tagSearch
,
groupSearch
,
citySearch
}
from
'@/api/remoteSearch'
import
{
isInArray
,
removeByvale
}
from
"@/utils"
;
function
Assembledata
(
target
,
source
)
{
...
...
@@ -280,11 +280,11 @@
content
:
[{
validator
:
validateRequire
}],
source_uri
:
[{
validator
:
validateSourceUri
,
trigger
:
'blur'
}]
},
expireTimeOption
:
{
disabledDate
(
date
){
return
date
.
getTime
()
<=
Date
.
now
();
}
},
//
expireTimeOption: {
//
disabledDate(date){
//
return date.getTime()
<=
Date
.
now
();
//
}
//
},
tempRoute
:
{},
listQuery
:
{
page
:
1
,
...
...
vu/src/views/user/list.vue
View file @
24dae774
...
...
@@ -223,7 +223,7 @@
this
.
getList
()
},
handleCreate
()
{
this
.
$router
.
push
(
'/
pick
/create'
)
this
.
$router
.
push
(
'/
user
/create'
)
}
}
}
...
...
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