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__/
...
@@ -16,7 +16,7 @@ __pycache__/
env/
env/
build/
build/
develop-eggs/
develop-eggs/
dist/
#
dist/
downloads/
downloads/
.vscode
.vscode
eggs/
eggs/
...
...
api/group.py
View file @
664f717f
...
@@ -81,7 +81,6 @@ class GroupRelatedUser(APIView):
...
@@ -81,7 +81,6 @@ class GroupRelatedUser(APIView):
filters
=
{
'group_id'
:
id
}
filters
=
{
'group_id'
:
id
}
try
:
try
:
data
=
self
.
rpc
[
'venus/sun/group/user/list'
](
filters
=
filters
,
offset
=
offset
,
limit
=
count
)
.
unwrap
()
data
=
self
.
rpc
[
'venus/sun/group/user/list'
](
filters
=
filters
,
offset
=
offset
,
limit
=
count
)
.
unwrap
()
print
(
data
,
'--------------'
)
except
Exception
as
e
:
except
Exception
as
e
:
raise
e
raise
e
return
data
return
data
...
...
api/tag.py
View file @
664f717f
...
@@ -12,7 +12,7 @@ class TagListView(APIView):
...
@@ -12,7 +12,7 @@ class TagListView(APIView):
limit
=
int
(
request
.
GET
.
get
(
'limit'
,
10
))
limit
=
int
(
request
.
GET
.
get
(
'limit'
,
10
))
filter
=
self
.
handle_filter
(
request
.
GET
.
get
(
'filter'
,
""
))
filter
=
self
.
handle_filter
(
request
.
GET
.
get
(
'filter'
,
""
))
try
:
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
:
except
Exception
as
e
:
raise
e
raise
e
return
data
return
data
...
@@ -49,11 +49,15 @@ class TagUpdateOrCreateView(APIView):
...
@@ -49,11 +49,15 @@ class TagUpdateOrCreateView(APIView):
def
post
(
self
,
request
):
def
post
(
self
,
request
):
id
=
request
.
POST
.
get
(
'id'
)
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
=
{
data
=
{
'name'
:
request
.
POST
.
get
(
'name'
),
'name'
:
request
.
POST
.
get
(
'name'
),
'description'
:
request
.
POST
.
get
(
'description'
),
'description'
:
request
.
POST
.
get
(
'description'
),
'down_tag
'
:
list
(
set
(
request
.
POST
.
get
(
'down_tags'
,
''
)
.
split
(
','
)
)),
'down_tag
s'
:
list
(
filter
(
lambda
x
:
x
,
down_tags
)),
'up_tag
'
:
list
(
set
(
request
.
POST
.
get
(
'down_tags'
,
''
)
.
split
(
','
)
)),
'up_tag
s'
:
list
(
filter
(
lambda
x
:
x
,
up_tags
)),
}
}
try
:
try
:
self
.
rpc
[
'venus/sun/tag/edit'
](
id
=
id
,
data
=
data
)
.
unwrap
()
self
.
rpc
[
'venus/sun/tag/edit'
](
id
=
id
,
data
=
data
)
.
unwrap
()
...
...
api/user.py
View file @
664f717f
...
@@ -47,7 +47,7 @@ class UserUpdateOrCreate(APIView):
...
@@ -47,7 +47,7 @@ class UserUpdateOrCreate(APIView):
'phone'
:
request
.
POST
.
get
(
'phone'
),
'phone'
:
request
.
POST
.
get
(
'phone'
),
'email'
:
request
.
POST
.
get
(
'email'
),
'email'
:
request
.
POST
.
get
(
'email'
),
'gender'
:
request
.
POST
.
get
(
'gender'
),
'gender'
:
request
.
POST
.
get
(
'gender'
),
'group_ids'
:
json
.
loads
(
request
.
POST
.
get
(
'group_ids'
)),
#
'group_ids': json.loads(request.POST.get('group_ids')),
}
}
try
:
try
:
...
...
vu/src/router/index.js
View file @
664f717f
...
@@ -70,13 +70,13 @@ export const constantRouterMap = [
...
@@ -70,13 +70,13 @@ export const constantRouterMap = [
{
{
path
:
''
,
path
:
''
,
component
:
Layout
,
component
:
Layout
,
redirect
:
'
dashboard
'
,
redirect
:
'
home
'
,
children
:
[
children
:
[
{
{
path
:
'
dashboard
'
,
path
:
'
home
'
,
component
:
()
=>
import
(
'@/views/dashboard/index'
),
component
:
()
=>
import
(
'@/views/dashboard/index'
),
name
:
'
Dashboard
'
,
name
:
'
Home
'
,
meta
:
{
title
:
'
dashboard
'
,
icon
:
'dashboard'
,
noCache
:
true
}
meta
:
{
title
:
'
首页
'
,
icon
:
'dashboard'
,
noCache
:
true
}
}
}
]
]
},
},
...
...
vu/src/views/dashboard/editor/index.vue
View file @
664f717f
<
template
>
<
template
>
<div
class=
"dashboard-editor-container"
>
<div
class=
"dashboard-editor-container"
>
<div
class=
" clearfix"
>
<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"
>
<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>
</div>
<div>
<div>
<img
:src=
"emptyGif"
class=
"emptyGif"
>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -19,11 +13,10 @@
...
@@ -19,11 +13,10 @@
<
script
>
<
script
>
import
{
mapGetters
}
from
'vuex'
import
{
mapGetters
}
from
'vuex'
import
PanThumb
from
'@/components/PanThumb'
import
PanThumb
from
'@/components/PanThumb'
import
GithubCorner
from
'@/components/GithubCorner'
export
default
{
export
default
{
name
:
'DashboardEditor'
,
name
:
'DashboardEditor'
,
components
:
{
PanThumb
,
GithubCorner
},
components
:
{
PanThumb
},
data
()
{
data
()
{
return
{
return
{
emptyGif
:
'https://wpimg.wallstcn.com/0e03b7da-db9e-4819-ba10-9016ddfdaed3'
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'
...
@@ -10,7 +10,7 @@ import adminDashboard from './admin'
import
editorDashboard
from
'./editor'
import
editorDashboard
from
'./editor'
export
default
{
export
default
{
name
:
'
Dashboard
'
,
name
:
'
Home
'
,
components
:
{
adminDashboard
,
editorDashboard
},
components
:
{
adminDashboard
,
editorDashboard
},
data
()
{
data
()
{
return
{
return
{
...
...
vu/src/views/layout/components/Navbar.vue
View file @
664f717f
...
@@ -16,7 +16,6 @@
...
@@ -16,7 +16,6 @@
<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,7 +55,6 @@ import ErrorLog from '@/components/ErrorLog'
...
@@ -56,7 +55,6 @@ 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
:
{
...
@@ -66,7 +64,6 @@ export default {
...
@@ -66,7 +64,6 @@ export default {
Screenfull
,
Screenfull
,
SizeSelect
,
SizeSelect
,
ThemePicker
,
ThemePicker
,
LangSelect
},
},
computed
:
{
computed
:
{
...
mapGetters
([
...
mapGetters
([
...
...
vu/src/views/user/components/UserDetail.vue
View file @
664f717f
...
@@ -132,60 +132,60 @@
...
@@ -132,60 +132,60 @@
</div>
</div>
</el-card>
</el-card>
</el-row>
</el-row>
<
el-row
:gutter=
"20"
style=
"margin-top:50px;"
>
<
!--
<el-row
:gutter=
"20"
style=
"margin-top:50px;"
>
--
>
<
el-card
class=
"box-card"
>
<
!--
<el-card
class=
"box-card"
>
--
>
<
div
slot=
"header"
class=
"clearfix"
>
<
!--
<div
slot=
"header"
class=
"clearfix"
>
--
>
<
span>
小组相关
</span
>
<
!--
<span>
小组相关
</span>
--
>
<
/div
>
<
!--
</div>
--
>
<
div
style=
"margin-bottom:50px;"
>
<
!--
<div
style=
"margin-bottom:50px;"
>
--
>
<
div
class=
"filter-container"
>
<
!--
<div
class=
"filter-container"
>
--
>
<
el-select
v-model=
"temp_group_ids"
:remote-method=
"getRemoteGroupList"
filterable
remote
<
!--
<el-select
v-model=
"temp_group_ids"
:remote-method=
"getRemoteGroupList"
filterable
remote--
>
value-key=
"id"
<!--value-key="id"-->
placeholder=
"小组"
style=
"width: 220px"
>
<!--placeholder="小组" style="width: 220px">--
>
<
el-option
v-for=
"(item,index) in groupListOptions"
:key=
"item+index"
:label=
"item.id + ':' + item.name"
:value=
"item.id"
/
>
<
!--
<el-option
v-for=
"(item,index) in groupListOptions"
:key=
"item+index"
:label=
"item.id + ':' + item.name"
:value=
"item.id"
/>
--
>
<
/el-select
>
<
!--
</el-select>
--
>
<
el-button
v-waves
class=
"filter-item"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"appendGroup"
>
添加
<
!--
<el-button
v-waves
class=
"filter-item"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"appendGroup"
>
添加-->
<
/el-button
>
<
!--
</el-button>
--
>
<
/div
>
<
!--
</div>
--
>
<
el-table
:data=
"list"
border
fit
highlight-current-row
style=
"width: 100%"
<
!--
<el-table
:data=
"list"
border
fit
highlight-current-row
style=
"width: 100%"
--
>
ref=
"multipleTable"
>
<!--ref="multipleTable">--
>
<
el-table-column
align=
"center"
label=
"小组ID"
>
<
!--
<el-table-column
align=
"center"
label=
"小组ID"
>
--
>
<
template
slot-scope=
"scope"
>
<
!--
<template
slot-scope=
"scope"
>
--
>
<
span>
{{
scope
.
row
.
id
}}
</span
>
<
!--
<span>
{{
scope
.
row
.
id
}}
</span>
--
>
<
/
template
>
<
!--
</
template
>
--
>
<
/el-table-column
>
<
!--</el-table-column>--
>
<
el-table-column
align=
"center"
label=
"小组名称"
>
<
!--<el-table-column align="center" label="小组名称">--
>
<
template
slot-scope=
"scope"
>
<
!--<template slot-scope="scope">--
>
<
span>
{{
scope
.
row
.
group_name
}}
</span
>
<
!--<span>{{ scope.row.group_name }}</span>--
>
<
/
template
>
<
!--</template>--
>
<
/el-table-column
>
<
!--</el-table-column>--
>
<
el-table-column
align=
"center"
label=
"小组简介"
>
<
!--<el-table-column align="center" label="小组简介">--
>
<
template
slot-scope=
"scope"
>
<
!--<template slot-scope="scope">--
>
<
span>
{{
scope
.
row
.
group_desc
}}
</span
>
<
!--<span>{{ scope.row.group_desc }}</span>--
>
<
/
template
>
<
!--</template>--
>
<
/el-table-column
>
<
!--</el-table-column>--
>
<
el-table-column
align=
"center"
label=
"组长"
>
<
!--<el-table-column align="center" label="组长">--
>
<
template
slot-scope=
"scope"
>
<
!--<template slot-scope="scope">--
>
<
span>
{{
scope
.
row
.
nick_name
}}
</span
>
<
!--<span>{{ scope.row.nick_name }}</span>--
>
<
/
template
>
<
!--</template>--
>
<
/el-table-column
>
<
!--</el-table-column>--
>
<
el-table-column
align=
"center"
label=
"帖子数"
>
<
!--<el-table-column align="center" label="帖子数">--
>
<
template
slot-scope=
"scope"
>
<
!--<template slot-scope="scope">--
>
<
span>
{{
scope
.
row
.
topic_nums
}}
</span
>
<
!--<span>{{ scope.row.topic_nums }}</span>--
>
<
/
template
>
<
!--</template>--
>
<
/el-table-column
>
<
!--</el-table-column>--
>
<
el-table-column
align=
"center"
label=
"组内身份"
>
<
!--<el-table-column align="center" label="组内身份">--
>
<
template
slot-scope=
"scope"
>
<
!--<template slot-scope="scope">--
>
<
span>
{{
scope
.
row
.
group_identify
}}
</span
>
<
!--<span>{{ scope.row.group_identify }}</span>--
>
<
/
template
>
<
!--</template>--
>
<
/el-table-column
>
<
!--</el-table-column>--
>
<
/el-table
>
<
!--</el-table>--
>
<
pagination
v-show=
"total>0"
:total=
"total"
:page
.
sync=
"listQuery.page"
:limit
.
sync=
"listQuery.limit"
<
!--<pagination v-show="total>0" :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit"-->
style=
"margin-left: 250px;"
@
pagination=
"getList"
/
>
<!--style="margin-left: 250px;" @pagination="getList"/>--
>
<
/div
>
<
!--</div>--
>
<
/el-card
>
<
!--</el-card>--
>
<
/el-row
>
<
!--</el-row>--
>
</div>
</div>
</el-form>
</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