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
24fed907
Commit
24fed907
authored
Nov 19, 2018
by
Davve
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决图片上传
parent
1f233f9b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
166 additions
and
173 deletions
+166
-173
push.py
api/push.py
+63
-11
star.py
api/star.py
+2
-9
upload.py
api/upload.py
+24
-0
urls.py
api/urls.py
+10
-2
proxy.js
vu/mock/proxy.js
+2
-2
push.js
vu/src/api/push.js
+24
-0
singleImage3.vue
vu/src/components/Upload/singleImage3.vue
+15
-11
index.js
vu/src/router/index.js
+0
-32
account.js
vu/src/router/modules/account.js
+1
-1
group.js
vu/src/router/modules/group.js
+1
-1
pick.js
vu/src/router/modules/pick.js
+1
-1
push.js
vu/src/router/modules/push.js
+1
-1
star.js
vu/src/router/modules/star.js
+1
-1
tag.js
vu/src/router/modules/tag.js
+1
-1
topic.js
vu/src/router/modules/topic.js
+1
-1
user.js
vu/src/router/modules/user.js
+1
-1
GroupDetail.vue
vu/src/views/group/components/GroupDetail.vue
+0
-0
list.vue
vu/src/views/group/list.vue
+13
-95
Navbar.vue
vu/src/views/layout/components/Navbar.vue
+4
-2
PushDetail.vue
vu/src/views/push/components/PushDetail.vue
+0
-0
list.vue
vu/src/views/star/list.vue
+1
-1
No files found.
api/push.py
View file @
24fed907
...
@@ -15,14 +15,67 @@ class PushListView(APIView):
...
@@ -15,14 +15,67 @@ class PushListView(APIView):
data
=
self
.
rpc
[
'venus/community/push/get'
](
offset
=
page
,
limit
=
limit
,
filters
=
filter
)
.
unwrap
()
data
=
self
.
rpc
[
'venus/community/push/get'
](
offset
=
page
,
limit
=
limit
,
filters
=
filter
)
.
unwrap
()
except
Exception
as
e
:
except
Exception
as
e
:
data
=
{
data
=
{
'total'
:
200
,
'total'
:
200
,
'data'
:
[
'data'
:
[
{
'id'
:
1
,
'title'
:
'测试1'
,
'content'
:
'测试2'
,
'push_time'
:
'2018-08-09'
,
'create_time'
:
'2019-08-07'
,
'creator_id'
:
22
,
},
{
{
'id'
:
2
,
'title'
:
'测试1'
,
'content'
:
'测试2'
,
'push_time'
:
'2018-08-09'
,
'create_time'
:
'2019-08-07'
,
'id'
:
1
,
'creator_id'
:
22
,
},
'title'
:
'测试1'
,
{
'id'
:
3
,
'title'
:
'测试1'
,
'content'
:
'测试2'
,
'push_time'
:
'2018-08-09'
,
'create_time'
:
'2019-08-07'
,
'content'
:
'测试2'
,
'creator_id'
:
22
,
},
'push_time'
:
'2018-08-09 23:89:09'
,
]
'create_time'
:
'2019-08-07 23:89:09'
,
}
'creator_id'
:
22
,
},
{
'id'
:
2
,
'title'
:
'测试1'
,
'content'
:
'测试2'
,
'push_time'
:
'2018-08-09 23:89:09'
,
'create_time'
:
'2019-08-07 23:89:09'
,
'creator_id'
:
22
,
},
{
'id'
:
3
,
'title'
:
'测试1'
,
'content'
:
'测试2'
,
'push_time'
:
'2018-08-09 23:89:09'
,
'create_time'
:
'2019-08-07 23:89:09'
,
'creator_id'
:
22
,
},
]
}
return
data
return
data
class
PushUpdateOrCreateView
(
APIView
):
\ No newline at end of file
def
get
(
self
,
request
):
id
=
request
.
GET
.
get
(
'id'
)
try
:
data
=
self
.
rpc
[
'venus/community/push/detail'
](
id
=
id
)
.
unwrap
()
except
Exception
as
e
:
# raise e
data
=
{
'id'
:
1
,
'create_time'
:
'2018-09-08 23:34:34'
,
'push_time'
:
24121273912739
,
# 返回时间戳
'content'
:
'这是推送内容'
,
'url'
:
'http:www.baidu.com'
,
'icon'
:
'https://ss2.baidu.com/6ONYsjip0QIZ8tyhnq/it/u=846134627,633122759&fm=173&app=49&f=JPEG?w=600&h=400&s=84C5D14ADEA4A2575042FFAA0300F005'
,
'title'
:
'这是一个推送标题'
,
}
return
{
'data'
:
data
}
def
post
(
self
,
request
):
# TODO 图片icon上传到七牛
data
=
{
'url'
:
request
.
POST
.
get
(
'url'
,
''
),
'push_time'
:
request
.
POST
.
get
(
'push_time'
,
''
),
'icon'
:
request
.
POST
.
get
(
'icon'
,
''
),
'content'
:
request
.
POST
.
get
(
'content'
,
''
),
'title'
:
request
.
POST
.
get
(
'title'
,
''
),
}
print
(
data
,
'--------------------'
)
# try:
# self.rpc['venus/community/push/create'](data=data).unwrap()
# except Exception as e:
# raise e
api/star.py
View file @
24fed907
...
@@ -14,13 +14,5 @@ class StarListView(APIView):
...
@@ -14,13 +14,5 @@ class StarListView(APIView):
try
:
try
:
data
=
self
.
rpc
[
'venus/community/star/get'
](
offset
=
page
,
limit
=
limit
,
filters
=
filter
)
.
unwrap
()
data
=
self
.
rpc
[
'venus/community/star/get'
](
offset
=
page
,
limit
=
limit
,
filters
=
filter
)
.
unwrap
()
except
Exception
as
e
:
except
Exception
as
e
:
data
=
{
raise
e
'total'
:
200
,
'data'
:
[
{
'id'
:
1
,
'name'
:
'测试1'
,
'region'
:
'测试2'
,
'group_nums'
:
22
,
'gender'
:
1
},
{
'id'
:
2
,
'name'
:
'测试1'
,
'region'
:
'测试2'
,
'group_nums'
:
13
,
'gender'
:
1
},
{
'id'
:
3
,
'name'
:
'测试1'
,
'region'
:
'测试2'
,
'group_nums'
:
18
,
'gender'
:
0
},
]
}
return
data
return
data
\ No newline at end of file
api/upload.py
0 → 100644
View file @
24fed907
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# __author__ = "chenwei"
# Date: 2018/11/19
from
utils.base
import
APIView
from
gm_upload
import
upload
class
FileUpload
(
APIView
):
args_POST
=
{
'img_type'
:
{
'access'
:
int
,
},
}
def
post
(
self
,
request
):
image
=
request
.
FILES
.
get
(
'file'
)
data
=
image
.
read
()
full_image_url
=
upload
(
data
,
img_type
=
self
.
args_post
.
get
(
'type'
))
+
'-w'
return
{
'file_url'
:
full_image_url
}
api/urls.py
View file @
24fed907
...
@@ -15,6 +15,7 @@ from .star import *
...
@@ -15,6 +15,7 @@ from .star import *
from
.account
import
*
from
.account
import
*
from
.search
import
*
from
.search
import
*
from
.tag
import
*
from
.tag
import
*
from
.upload
import
*
urlpatterns
=
[
urlpatterns
=
[
# 登陆,注销相关
# 登陆,注销相关
...
@@ -41,6 +42,8 @@ urlpatterns = [
...
@@ -41,6 +42,8 @@ urlpatterns = [
# push相关
# push相关
url
(
r'push/list$'
,
PushListView
.
as_view
()),
url
(
r'push/list$'
,
PushListView
.
as_view
()),
url
(
r'push/create'
,
PushUpdateOrCreateView
.
as_view
()),
url
(
r'push/detail'
,
PushUpdateOrCreateView
.
as_view
()),
# pick相关
# pick相关
url
(
r'pick/list$'
,
PickListView
.
as_view
()),
url
(
r'pick/list$'
,
PickListView
.
as_view
()),
...
@@ -55,11 +58,16 @@ urlpatterns = [
...
@@ -55,11 +58,16 @@ urlpatterns = [
url
(
r'tag/detail'
,
TagUpdateOrCreateView
.
as_view
()),
url
(
r'tag/detail'
,
TagUpdateOrCreateView
.
as_view
()),
]
]
searchurlpatterns
=
[
search
_
urlpatterns
=
[
url
(
r'search/group$'
,
GroupSearchView
.
as_view
()),
url
(
r'search/group$'
,
GroupSearchView
.
as_view
()),
url
(
r'search/region'
,
RegionSearchView
.
as_view
()),
url
(
r'search/region'
,
RegionSearchView
.
as_view
()),
url
(
r'search/user'
,
UserSearchView
.
as_view
()),
url
(
r'search/user'
,
UserSearchView
.
as_view
()),
url
(
r'search/tag'
,
TagSearchView
.
as_view
()),
url
(
r'search/tag'
,
TagSearchView
.
as_view
()),
]
]
urlpatterns
+=
searchurlpatterns
common_urlpatterns
=
[
url
(
r"^file/upload$"
,
FileUpload
.
as_view
()),
]
urlpatterns
+=
search_urlpatterns
urlpatterns
+=
common_urlpatterns
vu/mock/proxy.js
View file @
24fed907
var
api
=
require
(
'./api'
)
var
api
=
require
(
'./api'
)
//
//
// const target = 'http://doctor.test.env'
// const target = 'http://doctor.test.env'
//
const target = 'http://172.30.8.231:8000'
const
target
=
'http://172.30.8.231:8000'
const
target
=
'http://192.168.1.6:8000'
//
const target = 'http://192.168.1.6:8000'
// 可以修改请求内容
// 可以修改请求内容
const
onProxyReq
=
proxyReq
=>
{}
const
onProxyReq
=
proxyReq
=>
{}
...
...
vu/src/api/push.js
View file @
24fed907
...
@@ -8,3 +8,27 @@ export function fetchList(query) {
...
@@ -8,3 +8,27 @@ export function fetchList(query) {
})
})
}
}
export
function
OffLineOrOnLine
(
data
)
{
console
.
log
(
data
)
return
request
({
url
:
'/api/push/list/update'
,
method
:
'post'
,
data
})
}
export
function
CreatePush
(
data
)
{
return
request
({
url
:
'/api/push/create'
,
method
:
'post'
,
data
})
}
export
function
fetchPushDetail
(
id
)
{
return
request
({
url
:
'/api/push/detail'
,
method
:
'get'
,
params
:
{
id
}
})
}
vu/src/components/Upload/singleImage3.vue
View file @
24fed907
...
@@ -7,18 +7,18 @@
...
@@ -7,18 +7,18 @@
:on-success=
"handleImageSuccess"
:on-success=
"handleImageSuccess"
class=
"image-uploader"
class=
"image-uploader"
drag
drag
action=
"
https://httpbin.org/post
"
>
action=
"
/api/file/upload
"
>
<i
class=
"el-icon-upload"
/>
<i
class=
"el-icon-upload"
/>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em></div>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em></div>
</el-upload>
</el-upload>
<
div
class=
"image-preview image-app-preview"
>
<
!--
<div
class=
"image-preview image-app-preview"
>
--
>
<
div
v-show=
"imageUrl.length>1"
class=
"image-preview-wrapper"
>
<
!--
<div
v-show=
"imageUrl.length>1"
class=
"image-preview-wrapper"
>
--
>
<
img
:src=
"imageUrl"
>
<
!--
<img
:src=
"imageUrl"
>
--
>
<
div
class=
"image-preview-action"
>
<
!--
<div
class=
"image-preview-action"
>
--
>
<
i
class=
"el-icon-delete"
@
click=
"rmImage"
/
>
<
!--
<i
class=
"el-icon-delete"
@
click=
"rmImage"
/>
--
>
<
/div
>
<
!--
</div>
--
>
<
/div
>
<
!--
</div>
--
>
<
/div
>
<
!--
</div>
--
>
<div
class=
"image-preview"
>
<div
class=
"image-preview"
>
<div
v-show=
"imageUrl.length>1"
class=
"image-preview-wrapper"
>
<div
v-show=
"imageUrl.length>1"
class=
"image-preview-wrapper"
>
<img
:src=
"imageUrl"
>
<img
:src=
"imageUrl"
>
...
@@ -39,12 +39,16 @@ export default {
...
@@ -39,12 +39,16 @@ export default {
value
:
{
value
:
{
type
:
String
,
type
:
String
,
default
:
''
default
:
''
},
type
:
{
type
:
String
,
default
:
''
}
}
},
},
data
()
{
data
()
{
return
{
return
{
tempUrl
:
''
,
tempUrl
:
''
,
dataObj
:
{
t
oken
:
''
,
key
:
''
}
dataObj
:
{
t
ype
:
this
.
type
}
}
}
},
},
computed
:
{
computed
:
{
...
@@ -60,7 +64,7 @@ export default {
...
@@ -60,7 +64,7 @@ export default {
this
.
$emit
(
'input'
,
val
)
this
.
$emit
(
'input'
,
val
)
},
},
handleImageSuccess
(
file
)
{
handleImageSuccess
(
file
)
{
this
.
emitInput
(
file
.
files
.
file
)
this
.
emitInput
(
file
.
data
.
file_url
)
},
},
beforeUpload
()
{
beforeUpload
()
{
const
_self
=
this
const
_self
=
this
...
...
vu/src/router/index.js
View file @
24fed907
...
@@ -100,37 +100,5 @@ export const asyncRouterMap = [
...
@@ -100,37 +100,5 @@ export const asyncRouterMap = [
PushRouter
,
PushRouter
,
PickRouter
,
PickRouter
,
TagRouter
,
TagRouter
,
{
path
:
'/example'
,
component
:
Layout
,
redirect
:
'/example/list'
,
name
:
'Example'
,
meta
:
{
title
:
'example'
,
icon
:
'example'
},
children
:
[
{
path
:
'create'
,
component
:
()
=>
import
(
'@/views/example/create'
),
name
:
'CreateArticle'
,
meta
:
{
title
:
'createArticle'
,
icon
:
'edit'
}
},
{
path
:
'edit/:id(
\\
d+)'
,
component
:
()
=>
import
(
'@/views/example/edit'
),
name
:
'EditArticle'
,
meta
:
{
title
:
'editArticle'
,
noCache
:
true
},
hidden
:
true
},
{
path
:
'list'
,
component
:
()
=>
import
(
'@/views/example/list'
),
name
:
'ArticleList'
,
meta
:
{
title
:
'articleList'
,
icon
:
'list'
}
}
]
},
{
path
:
'*'
,
redirect
:
'/404'
,
hidden
:
true
}
{
path
:
'*'
,
redirect
:
'/404'
,
hidden
:
true
}
]
]
vu/src/router/modules/account.js
View file @
24fed907
...
@@ -9,7 +9,7 @@ const AccountRouter = {
...
@@ -9,7 +9,7 @@ const AccountRouter = {
name
:
'Account'
,
name
:
'Account'
,
meta
:
{
meta
:
{
title
:
'账号管理'
,
title
:
'账号管理'
,
icon
:
'
example
'
icon
:
'
component
'
},
},
children
:
[
children
:
[
{
{
...
...
vu/src/router/modules/group.js
View file @
24fed907
...
@@ -9,7 +9,7 @@ const GroupRouter = {
...
@@ -9,7 +9,7 @@ const GroupRouter = {
name
:
'Group'
,
name
:
'Group'
,
meta
:
{
meta
:
{
title
:
'小组管理'
,
title
:
'小组管理'
,
icon
:
'
example
'
icon
:
'
component
'
},
},
children
:
[
children
:
[
{
{
...
...
vu/src/router/modules/pick.js
View file @
24fed907
...
@@ -9,7 +9,7 @@ const PickRouter = {
...
@@ -9,7 +9,7 @@ const PickRouter = {
name
:
'Pick'
,
name
:
'Pick'
,
meta
:
{
meta
:
{
title
:
'Pick管理'
,
title
:
'Pick管理'
,
icon
:
'
example
'
icon
:
'
component
'
},
},
children
:
[
children
:
[
{
{
...
...
vu/src/router/modules/push.js
View file @
24fed907
...
@@ -9,7 +9,7 @@ const PushRouter = {
...
@@ -9,7 +9,7 @@ const PushRouter = {
name
:
'Push'
,
name
:
'Push'
,
meta
:
{
meta
:
{
title
:
'Push管理'
,
title
:
'Push管理'
,
icon
:
'
example
'
icon
:
'
component
'
},
},
children
:
[
children
:
[
{
{
...
...
vu/src/router/modules/star.js
View file @
24fed907
...
@@ -9,7 +9,7 @@ const StarRouter = {
...
@@ -9,7 +9,7 @@ const StarRouter = {
name
:
'Star'
,
name
:
'Star'
,
meta
:
{
meta
:
{
title
:
'明星管理'
,
title
:
'明星管理'
,
icon
:
'
example
'
icon
:
'
component
'
},
},
children
:
[
children
:
[
{
{
...
...
vu/src/router/modules/tag.js
View file @
24fed907
...
@@ -7,7 +7,7 @@ const TagRouter = {
...
@@ -7,7 +7,7 @@ const TagRouter = {
name
:
'Tag'
,
name
:
'Tag'
,
meta
:
{
meta
:
{
title
:
'标签管理'
,
title
:
'标签管理'
,
icon
:
'
example
'
icon
:
'
component
'
},
},
children
:
[
children
:
[
{
{
...
...
vu/src/router/modules/topic.js
View file @
24fed907
...
@@ -9,7 +9,7 @@ const TopicRouter = {
...
@@ -9,7 +9,7 @@ const TopicRouter = {
name
:
'Topic'
,
name
:
'Topic'
,
meta
:
{
meta
:
{
title
:
'帖子管理'
,
title
:
'帖子管理'
,
icon
:
'
example
'
icon
:
'
component
'
},
},
children
:
[
children
:
[
{
{
...
...
vu/src/router/modules/user.js
View file @
24fed907
...
@@ -9,7 +9,7 @@ const GroupRouter = {
...
@@ -9,7 +9,7 @@ const GroupRouter = {
name
:
'User'
,
name
:
'User'
,
meta
:
{
meta
:
{
title
:
'用户管理'
,
title
:
'用户管理'
,
icon
:
'
example
'
icon
:
'
component
'
},
},
children
:
[
children
:
[
{
{
...
...
vu/src/views/group/components/GroupDetail.vue
View file @
24fed907
This diff is collapsed.
Click to expand it.
vu/src/views/group/list.vue
View file @
24fed907
...
@@ -5,75 +5,44 @@
...
@@ -5,75 +5,44 @@
<el-select
v-model=
"listQuery.filter.key"
:placeholder=
"'搜索字段'"
clearable
class=
"filter-item"
style=
"width: 110px"
>
<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-option
v-for=
"item in SearchTypeOptions"
:key=
"item.key"
:label=
"item.display_name"
:value=
"item.key"
/>
</el-select>
</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>
<el-select
v-model=
"listQuery.filter.is_recommend"
:placeholder=
"'推荐'"
clearable
class=
"filter-item"
style=
"width: 100px"
>
<el-option
v-for=
"item in ReBooleanTypeOptions"
:key=
"item.key"
:label=
"item.display_name"
:value=
"item.key"
/>
</el-select>
<el-button
v-waves
class=
"filter-item"
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleFilter"
>
搜索
</el-button>
<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=
"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>
<el-button
class=
"filter-item"
style=
"margin-left: 10px;"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"handleOfflineOrOnline('recommend')"
>
推荐
</el-button>
</div>
</div>
<el-table
v-loading=
"listLoading"
:data=
"list"
border
fit
highlight-current-row
style=
"width: 100%"
ref=
"multipleTable"
@
selection-change=
"handleSelectionChange"
>
<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
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"
>
<template
slot-scope=
"scope"
>
<router-link
:to=
"'/p
ick
/edit/'+scope.row.id"
class=
"link-type"
>
<router-link
:to=
"'/p
ush
/edit/'+scope.row.id"
class=
"link-type"
>
<span>
{{
scope
.
row
.
id
}}
</span>
<span>
{{
scope
.
row
.
id
}}
</span>
</router-link>
</router-link>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
width=
"190px"
align=
"center"
label=
"
小组名称
"
>
<el-table-column
width=
"190px"
align=
"center"
label=
"
推送内容
"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
name
}}
</span>
<span>
{{
scope
.
row
.
content
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
width=
"300px"
align=
"center"
label=
"
小组简介
"
>
<el-table-column
width=
"300px"
align=
"center"
label=
"
推送时间
"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
desc
}}
</span>
<span>
{{
scope
.
row
.
push_time
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
width=
"120px"
align=
"center"
label=
"
明星名称
"
>
<el-table-column
width=
"120px"
align=
"center"
label=
"
创建时间
"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
star
.
na
me
}}
</span>
<span>
{{
scope
.
row
.
create_ti
me
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
width=
"80px"
align=
"center"
label=
"
用户数
"
>
<el-table-column
width=
"80px"
align=
"center"
label=
"
创建用户
"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
user_nums
}}
</span>
<span>
{{
scope
.
row
.
creator
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
width=
"80px"
align=
"center"
label=
"帖子数"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
topic_nums
}}
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"140px"
align=
"center"
label=
"组长"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
creator
.
name
}}
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"80px"
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=
"80px"
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>
is_recommend
</el-table>
</el-table>
...
@@ -90,30 +59,12 @@ import waves from '@/directive/waves'
...
@@ -90,30 +59,12 @@ import waves from '@/directive/waves'
export
default
{
export
default
{
name
:
'GroupList'
,
name
:
'GroupList'
,
components
:
{
Pagination
},
components
:
{
Pagination
},
filters
:
{
isOnlineFilter
(
status
)
{
const
statusMap
=
{
1
:
'success'
,
0
:
'info'
,
}
return
statusMap
[
status
]
},
genderFilter
(
status
)
{
const
statusMap
=
{
'男'
:
'success'
,
'女'
:
'info'
,
'全部'
:
'danger'
}
return
statusMap
[
status
]
},
},
directives
:
{
waves
},
directives
:
{
waves
},
data
()
{
data
()
{
return
{
return
{
list
:
null
,
list
:
null
,
total
:
0
,
total
:
0
,
listLoading
:
true
,
listLoading
:
true
,
multipleSelection
:
[],
del_list
:
[],
del_list
:
[],
listQuery
:
{
listQuery
:
{
page
:
0
,
page
:
0
,
...
@@ -121,22 +72,11 @@ export default {
...
@@ -121,22 +72,11 @@ export default {
filter
:
{
filter
:
{
value
:
''
,
value
:
''
,
key
:
''
,
key
:
''
,
is_online
:
''
,
is_recommend
:
''
,
},
},
},
},
BooleanTypeOptions
:
[
{
'key'
:
1
,
'display_name'
:
'是'
},
{
'key'
:
0
,
'display_name'
:
'否'
}
],
ReBooleanTypeOptions
:
[
{
'key'
:
1
,
'display_name'
:
'是'
},
{
'key'
:
0
,
'display_name'
:
'否'
}
],
SearchTypeOptions
:[
SearchTypeOptions
:[
{
'key'
:
'id'
,
'display_name'
:
'小组ID'
},
{
'key'
:
'id'
,
'display_name'
:
'推送ID'
},
{
'key'
:
'name'
,
'display_name'
:
'小组名称'
},
{
'key'
:
'content'
,
'display_name'
:
'推送内容'
},
{
'key'
:
'star_name'
,
'display_name'
:
'明星名称'
},
]
]
}
}
},
},
...
@@ -152,9 +92,6 @@ export default {
...
@@ -152,9 +92,6 @@ export default {
this
.
listLoading
=
false
this
.
listLoading
=
false
})
})
},
},
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
;
},
handleSizeChange
(
val
)
{
handleSizeChange
(
val
)
{
this
.
listQuery
.
limit
=
val
this
.
listQuery
.
limit
=
val
this
.
getList
()
this
.
getList
()
...
@@ -163,31 +100,12 @@ export default {
...
@@ -163,31 +100,12 @@ export default {
this
.
listQuery
.
page
=
val
this
.
listQuery
.
page
=
val
this
.
getList
()
this
.
getList
()
},
},
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
if
(
val
===
'recommend'
){
this
.
multipleSelection
[
i
].
is_recommend
=
1
}
else
{
this
.
multipleSelection
[
i
].
is_online
=
1
}
str
+=
this
.
multipleSelection
[
i
].
id
+
' '
;
}
OffLineOrOnLine
({
type
:
val
,
ids
:
str
}).
then
(
response
=>
{
this
.
multipleSelection
=
[];
this
.
$message
.
success
(
response
.
data
.
data
.
message
);
})
},
handleFilter
()
{
handleFilter
()
{
this
.
listQuery
.
page
=
0
this
.
listQuery
.
page
=
0
this
.
getList
()
this
.
getList
()
},
},
handleCreate
()
{
handleCreate
()
{
this
.
$router
.
push
(
'/p
ick
/create'
)
this
.
$router
.
push
(
'/p
ush
/create'
)
}
}
}
}
}
}
...
...
vu/src/views/layout/components/Navbar.vue
View file @
24fed907
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
<size-select
class=
"international right-menu-item"
/>
<size-select
class=
"international right-menu-item"
/>
</el-tooltip>
</el-tooltip>
<lang-select
class=
"international right-menu-item"
/>
<el-tooltip
:content=
"$t('navbar.theme')"
effect=
"dark"
placement=
"bottom"
>
<el-tooltip
:content=
"$t('navbar.theme')"
effect=
"dark"
placement=
"bottom"
>
<theme-picker
class=
"theme-switch right-menu-item"
/>
<theme-picker
class=
"theme-switch right-menu-item"
/>
</el-tooltip>
</el-tooltip>
...
@@ -56,6 +56,7 @@ import ErrorLog from '@/components/ErrorLog'
...
@@ -56,6 +56,7 @@ import ErrorLog from '@/components/ErrorLog'
import
Screenfull
from
'@/components/Screenfull'
import
Screenfull
from
'@/components/Screenfull'
import
SizeSelect
from
'@/components/SizeSelect'
import
SizeSelect
from
'@/components/SizeSelect'
import
ThemePicker
from
'@/components/ThemePicker'
import
ThemePicker
from
'@/components/ThemePicker'
import
LangSelect
from
'@/components/LangSelect'
export
default
{
export
default
{
components
:
{
components
:
{
...
@@ -64,7 +65,8 @@ export default {
...
@@ -64,7 +65,8 @@ export default {
ErrorLog
,
ErrorLog
,
Screenfull
,
Screenfull
,
SizeSelect
,
SizeSelect
,
ThemePicker
ThemePicker
,
LangSelect
},
},
computed
:
{
computed
:
{
...
mapGetters
([
...
mapGetters
([
...
...
vu/src/views/push/components/PushDetail.vue
View file @
24fed907
This diff is collapsed.
Click to expand it.
vu/src/views/star/list.vue
View file @
24fed907
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
<el-table-column
width=
"150px"
align=
"center"
label=
"小组数量"
>
<el-table-column
width=
"150px"
align=
"center"
label=
"小组数量"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<router-link
:to=
"'/pick/edit/'+scope.row.id"
class=
"link-type"
>
<router-link
:to=
"'/pick/edit/'+scope.row.id"
class=
"link-type"
>
<span>
{{
scope
.
row
.
group_
num
s
}}
</span>
<span>
{{
scope
.
row
.
group_
count
s
}}
</span>
</router-link>
</router-link>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
...
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