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
664f717f
Commit
664f717f
authored
Nov 26, 2018
by
Davve
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善标签
parent
8654a4c3
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
69 additions
and
76 deletions
+69
-76
.gitignore
.gitignore
+1
-1
group.py
api/group.py
+0
-1
tag.py
api/tag.py
+7
-3
user.py
api/user.py
+1
-1
index.js
vu/src/router/index.js
+4
-4
index.vue
vu/src/views/dashboard/editor/index.vue
+2
-9
index.vue
vu/src/views/dashboard/index.vue
+1
-1
Navbar.vue
vu/src/views/layout/components/Navbar.vue
+0
-3
UserDetail.vue
vu/src/views/user/components/UserDetail.vue
+53
-53
No files found.
.gitignore
View file @
664f717f
...
...
@@ -16,7 +16,7 @@ __pycache__/
env/
build/
develop-eggs/
dist/
#
dist/
downloads/
.vscode
eggs/
...
...
api/group.py
View file @
664f717f
...
...
@@ -81,7 +81,6 @@ class GroupRelatedUser(APIView):
filters
=
{
'group_id'
:
id
}
try
:
data
=
self
.
rpc
[
'venus/sun/group/user/list'
](
filters
=
filters
,
offset
=
offset
,
limit
=
count
)
.
unwrap
()
print
(
data
,
'--------------'
)
except
Exception
as
e
:
raise
e
return
data
...
...
api/tag.py
View file @
664f717f
...
...
@@ -12,7 +12,7 @@ class TagListView(APIView):
limit
=
int
(
request
.
GET
.
get
(
'limit'
,
10
))
filter
=
self
.
handle_filter
(
request
.
GET
.
get
(
'filter'
,
""
))
try
:
data
=
self
.
rpc
[
'venus/sun/tag/list'
](
offset
=
offse
t
,
limit
=
limit
,
filters
=
filter
)
.
unwrap
()
data
=
self
.
rpc
[
'venus/sun/tag/list'
](
offset
=
(
offset
-
1
)
*
limi
t
,
limit
=
limit
,
filters
=
filter
)
.
unwrap
()
except
Exception
as
e
:
raise
e
return
data
...
...
@@ -49,11 +49,15 @@ class TagUpdateOrCreateView(APIView):
def
post
(
self
,
request
):
id
=
request
.
POST
.
get
(
'id'
)
print
(
type
(
request
.
POST
.
get
(
'down_tags'
)))
down_tags
=
list
(
set
(
request
.
POST
.
get
(
'down_tags'
)
.
split
(
','
)))
up_tags
=
list
(
set
(
request
.
POST
.
get
(
'up_tags'
)
.
split
(
','
)))
data
=
{
'name'
:
request
.
POST
.
get
(
'name'
),
'description'
:
request
.
POST
.
get
(
'description'
),
'down_tag
'
:
list
(
set
(
request
.
POST
.
get
(
'down_tags'
,
''
)
.
split
(
','
)
)),
'up_tag
'
:
list
(
set
(
request
.
POST
.
get
(
'down_tags'
,
''
)
.
split
(
','
)
)),
'down_tag
s'
:
list
(
filter
(
lambda
x
:
x
,
down_tags
)),
'up_tag
s'
:
list
(
filter
(
lambda
x
:
x
,
up_tags
)),
}
try
:
self
.
rpc
[
'venus/sun/tag/edit'
](
id
=
id
,
data
=
data
)
.
unwrap
()
...
...
api/user.py
View file @
664f717f
...
...
@@ -47,7 +47,7 @@ class UserUpdateOrCreate(APIView):
'phone'
:
request
.
POST
.
get
(
'phone'
),
'email'
:
request
.
POST
.
get
(
'email'
),
'gender'
:
request
.
POST
.
get
(
'gender'
),
'group_ids'
:
json
.
loads
(
request
.
POST
.
get
(
'group_ids'
)),
#
'group_ids': json.loads(request.POST.get('group_ids')),
}
try
:
...
...
vu/src/router/index.js
View file @
664f717f
...
...
@@ -70,13 +70,13 @@ export const constantRouterMap = [
{
path
:
''
,
component
:
Layout
,
redirect
:
'
dashboard
'
,
redirect
:
'
home
'
,
children
:
[
{
path
:
'
dashboard
'
,
path
:
'
home
'
,
component
:
()
=>
import
(
'@/views/dashboard/index'
),
name
:
'
Dashboard
'
,
meta
:
{
title
:
'
dashboard
'
,
icon
:
'dashboard'
,
noCache
:
true
}
name
:
'
Home
'
,
meta
:
{
title
:
'
首页
'
,
icon
:
'dashboard'
,
noCache
:
true
}
}
]
},
...
...
vu/src/views/dashboard/editor/index.vue
View file @
664f717f
<
template
>
<div
class=
"dashboard-editor-container"
>
<div
class=
" clearfix"
>
<pan-thumb
:image=
"avatar"
style=
"float: left"
>
Your roles:
<span
v-for=
"item in roles"
:key=
"item"
class=
"pan-info-roles"
>
{{
item
}}
</span>
</pan-thumb>
<github-corner
style=
"position: absolute; top: 0px; border: 0; right: 0;"
/>
<div
class=
"info-container"
>
<span
class=
"display_name"
>
{{
name
}}
</span>
<span
style=
"font-size:20px;padding-top:20px;display:inline-block;"
>
Editor's Dashboard
</span>
</div>
</div>
<div>
<img
:src=
"emptyGif"
class=
"emptyGif"
>
</div>
</div>
</
template
>
...
...
@@ -19,11 +13,10 @@
<
script
>
import
{
mapGetters
}
from
'vuex'
import
PanThumb
from
'@/components/PanThumb'
import
GithubCorner
from
'@/components/GithubCorner'
export
default
{
name
:
'DashboardEditor'
,
components
:
{
PanThumb
,
GithubCorner
},
components
:
{
PanThumb
},
data
()
{
return
{
emptyGif
:
'https://wpimg.wallstcn.com/0e03b7da-db9e-4819-ba10-9016ddfdaed3'
...
...
vu/src/views/dashboard/index.vue
View file @
664f717f
...
...
@@ -10,7 +10,7 @@ import adminDashboard from './admin'
import
editorDashboard
from
'./editor'
export
default
{
name
:
'
Dashboard
'
,
name
:
'
Home
'
,
components
:
{
adminDashboard
,
editorDashboard
},
data
()
{
return
{
...
...
vu/src/views/layout/components/Navbar.vue
View file @
664f717f
...
...
@@ -16,7 +16,6 @@
<size-select
class=
"international right-menu-item"
/>
</el-tooltip>
<lang-select
class=
"international right-menu-item"
/>
<el-tooltip
:content=
"$t('navbar.theme')"
effect=
"dark"
placement=
"bottom"
>
<theme-picker
class=
"theme-switch right-menu-item"
/>
</el-tooltip>
...
...
@@ -56,7 +55,6 @@ import ErrorLog from '@/components/ErrorLog'
import
Screenfull
from
'@/components/Screenfull'
import
SizeSelect
from
'@/components/SizeSelect'
import
ThemePicker
from
'@/components/ThemePicker'
import
LangSelect
from
'@/components/LangSelect'
export
default
{
components
:
{
...
...
@@ -66,7 +64,6 @@ export default {
Screenfull
,
SizeSelect
,
ThemePicker
,
LangSelect
},
computed
:
{
...
mapGetters
([
...
...
vu/src/views/user/components/UserDetail.vue
View file @
664f717f
...
...
@@ -132,60 +132,60 @@
</div>
</el-card>
</el-row>
<
el-row
:gutter=
"20"
style=
"margin-top:50px;"
>
<
el-card
class=
"box-card"
>
<
div
slot=
"header"
class=
"clearfix"
>
<
span>
小组相关
</span
>
<
/div
>
<
div
style=
"margin-bottom:50px;"
>
<
div
class=
"filter-container"
>
<
el-select
v-model=
"temp_group_ids"
:remote-method=
"getRemoteGroupList"
filterable
remote
value-key=
"id"
placeholder=
"小组"
style=
"width: 220px"
>
<
el-option
v-for=
"(item,index) in groupListOptions"
:key=
"item+index"
:label=
"item.id + ':' + item.name"
:value=
"item.id"
/
>
<
/el-select
>
<
el-button
v-waves
class=
"filter-item"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"appendGroup"
>
添加
<
/el-button
>
<
/div
>
<
el-table
:data=
"list"
border
fit
highlight-current-row
style=
"width: 100%"
ref=
"multipleTable"
>
<
el-table-column
align=
"center"
label=
"小组ID"
>
<
template
slot-scope=
"scope"
>
<
span>
{{
scope
.
row
.
id
}}
</span
>
<
/
template
>
<
/el-table-column
>
<
el-table-column
align=
"center"
label=
"小组名称"
>
<
template
slot-scope=
"scope"
>
<
span>
{{
scope
.
row
.
group_name
}}
</span
>
<
/
template
>
<
/el-table-column
>
<
el-table-column
align=
"center"
label=
"小组简介"
>
<
template
slot-scope=
"scope"
>
<
span>
{{
scope
.
row
.
group_desc
}}
</span
>
<
/
template
>
<
/el-table-column
>
<
el-table-column
align=
"center"
label=
"组长"
>
<
template
slot-scope=
"scope"
>
<
span>
{{
scope
.
row
.
nick_name
}}
</span
>
<
/
template
>
<
/el-table-column
>
<
el-table-column
align=
"center"
label=
"帖子数"
>
<
template
slot-scope=
"scope"
>
<
span>
{{
scope
.
row
.
topic_nums
}}
</span
>
<
/
template
>
<
/el-table-column
>
<
el-table-column
align=
"center"
label=
"组内身份"
>
<
template
slot-scope=
"scope"
>
<
span>
{{
scope
.
row
.
group_identify
}}
</span
>
<
/
template
>
<
/el-table-column
>
<
!--
<el-row
:gutter=
"20"
style=
"margin-top:50px;"
>
--
>
<
!--
<el-card
class=
"box-card"
>
--
>
<
!--
<div
slot=
"header"
class=
"clearfix"
>
--
>
<
!--
<span>
小组相关
</span>
--
>
<
!--
</div>
--
>
<
!--
<div
style=
"margin-bottom:50px;"
>
--
>
<
!--
<div
class=
"filter-container"
>
--
>
<
!--
<el-select
v-model=
"temp_group_ids"
:remote-method=
"getRemoteGroupList"
filterable
remote--
>
<!--value-key="id"-->
<!--placeholder="小组" style="width: 220px">--
>
<
!--
<el-option
v-for=
"(item,index) in groupListOptions"
:key=
"item+index"
:label=
"item.id + ':' + item.name"
:value=
"item.id"
/>
--
>
<
!--
</el-select>
--
>
<
!--
<el-button
v-waves
class=
"filter-item"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"appendGroup"
>
添加-->
<
!--
</el-button>
--
>
<
!--
</div>
--
>
<
!--
<el-table
:data=
"list"
border
fit
highlight-current-row
style=
"width: 100%"
--
>
<!--ref="multipleTable">--
>
<
!--
<el-table-column
align=
"center"
label=
"小组ID"
>
--
>
<
!--
<template
slot-scope=
"scope"
>
--
>
<
!--
<span>
{{
scope
.
row
.
id
}}
</span>
--
>
<
!--
</
template
>
--
>
<
!--</el-table-column>--
>
<
!--<el-table-column align="center" label="小组名称">--
>
<
!--<template slot-scope="scope">--
>
<
!--<span>{{ scope.row.group_name }}</span>--
>
<
!--</template>--
>
<
!--</el-table-column>--
>
<
!--<el-table-column align="center" label="小组简介">--
>
<
!--<template slot-scope="scope">--
>
<
!--<span>{{ scope.row.group_desc }}</span>--
>
<
!--</template>--
>
<
!--</el-table-column>--
>
<
!--<el-table-column align="center" label="组长">--
>
<
!--<template slot-scope="scope">--
>
<
!--<span>{{ scope.row.nick_name }}</span>--
>
<
!--</template>--
>
<
!--</el-table-column>--
>
<
!--<el-table-column align="center" label="帖子数">--
>
<
!--<template slot-scope="scope">--
>
<
!--<span>{{ scope.row.topic_nums }}</span>--
>
<
!--</template>--
>
<
!--</el-table-column>--
>
<
!--<el-table-column align="center" label="组内身份">--
>
<
!--<template slot-scope="scope">--
>
<
!--<span>{{ scope.row.group_identify }}</span>--
>
<
!--</template>--
>
<
!--</el-table-column>--
>
<
/el-table
>
<
pagination
v-show=
"total>0"
:total=
"total"
:page
.
sync=
"listQuery.page"
:limit
.
sync=
"listQuery.limit"
style=
"margin-left: 250px;"
@
pagination=
"getList"
/
>
<
/div
>
<
/el-card
>
<
/el-row
>
<
!--</el-table>--
>
<
!--<pagination v-show="total>0" :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit"-->
<!--style="margin-left: 250px;" @pagination="getList"/>--
>
<
!--</div>--
>
<
!--</el-card>--
>
<
!--</el-row>--
>
</div>
</el-form>
...
...
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