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
a9129aa7
Commit
a9129aa7
authored
6 years ago
by
Davve
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加用户身份可修改
parent
1609ea0b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
33 additions
and
6 deletions
+33
-6
group.py
api/group.py
+13
-0
urls.py
api/urls.py
+1
-0
group.js
vu/src/api/group.js
+8
-0
GroupDetail.vue
vu/src/views/group/components/GroupDetail.vue
+0
-0
Navbar.vue
vu/src/views/layout/components/Navbar.vue
+3
-3
PickDetail.vue
vu/src/views/pick/components/PickDetail.vue
+0
-1
TopicDetail.vue
vu/src/views/topic/components/TopicDetail.vue
+8
-2
No files found.
api/group.py
View file @
a9129aa7
...
...
@@ -96,3 +96,15 @@ class GroupRelatedUserGET(APIView):
except
Exception
as
e
:
raise
e
return
[
data
,
]
def
post
(
self
,
request
):
group_id
=
request
.
POST
.
get
(
'group_id'
)
user_id
=
request
.
POST
.
get
(
'user_id'
)
data
=
{
'role_id'
:
request
.
POST
.
get
(
'original_group_identify'
),
}
try
:
self
.
rpc
[
'venus/sun/group/user/edit'
](
id
=
group_id
,
user_id
=
user_id
,
data
=
data
)
.
unwrap
()
except
Exception
as
e
:
raise
e
return
\ No newline at end of file
This diff is collapsed.
Click to expand it.
api/urls.py
View file @
a9129aa7
...
...
@@ -42,6 +42,7 @@ urlpatterns = [
url
(
r'^group/create$'
,
GroupUpdateOrCreate
.
as_view
()),
url
(
r'^group/user/list$'
,
GroupRelatedUser
.
as_view
()),
url
(
r'^group/user/get$'
,
GroupRelatedUserGET
.
as_view
()),
url
(
r'^group/user/edit_group_identify'
,
GroupRelatedUserGET
.
as_view
()),
# topic相关
url
(
r'^topic/list$'
,
TopicListView
.
as_view
()),
...
...
This diff is collapsed.
Click to expand it.
vu/src/api/group.js
View file @
a9129aa7
...
...
@@ -48,3 +48,11 @@ export function GroupUserDetail(id) {
})
}
export
function
ModifyGroupIdentify
(
data
)
{
return
request
({
url
:
'/api/group/user/edit_group_identify'
,
method
:
'post'
,
data
})
}
This diff is collapsed.
Click to expand it.
vu/src/views/group/components/GroupDetail.vue
View file @
a9129aa7
This diff is collapsed.
Click to expand it.
vu/src/views/layout/components/Navbar.vue
View file @
a9129aa7
...
...
@@ -6,7 +6,7 @@
<div
class=
"right-menu"
>
<template
v-if=
"device!=='mobile'"
>
<
error-log
class=
"errLog-container right-menu-item"
/
>
<
!--
<error-log
class=
"errLog-container right-menu-item"
/>
--
>
<el-tooltip
:content=
"$t('navbar.screenfull')"
effect=
"dark"
placement=
"bottom"
>
<screenfull
class=
"screenfull right-menu-item"
/>
...
...
@@ -51,7 +51,7 @@
import
{
mapGetters
}
from
'vuex'
import
Breadcrumb
from
'@/components/Breadcrumb'
import
Hamburger
from
'@/components/Hamburger'
import
ErrorLog
from
'@/components/ErrorLog'
//
import ErrorLog from '@/components/ErrorLog'
import
Screenfull
from
'@/components/Screenfull'
import
SizeSelect
from
'@/components/SizeSelect'
import
ThemePicker
from
'@/components/ThemePicker'
...
...
@@ -60,7 +60,7 @@ export default {
components
:
{
Breadcrumb
,
Hamburger
,
ErrorLog
,
//
ErrorLog,
Screenfull
,
SizeSelect
,
ThemePicker
,
...
...
This diff is collapsed.
Click to expand it.
vu/src/views/pick/components/PickDetail.vue
View file @
a9129aa7
...
...
@@ -457,7 +457,6 @@
this
.
postForm
.
city
=
JSON
.
stringify
(
this
.
city
);
this
.
postForm
.
pick_group
=
JSON
.
stringify
(
this
.
pick_group
);
CreatePick
(
this
.
postForm
).
then
(
response
=>
{
this
.
$notify
({
title
:
'成功'
,
...
...
This diff is collapsed.
Click to expand it.
vu/src/views/topic/components/TopicDetail.vue
View file @
a9129aa7
...
...
@@ -108,7 +108,7 @@
<el-radio
:label=
"0"
>
否
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
style=
"margin-bottom: 40px;"
label-width=
"75px"
label=
"帖子内容:"
>
<el-form-item
style=
"margin-bottom: 40px;"
label-width=
"75px"
label=
"帖子内容:"
prop=
"content"
>
<el-input
:rows=
"1"
v-model=
"postForm.content"
type=
"textarea"
class=
"article-textarea"
autosize
placeholder=
"请输入内容"
/>
<span
v-show=
"contentShortLength"
class=
"word-counter"
>
{{
contentShortLength
}}
字
</span>
...
...
@@ -337,7 +337,8 @@
// 表单验证相关
rules
:
{
posting_time
:
[{
validator
:
validateRequire
,
trigger
:
'blur'
}]
posting_time
:
[{
validator
:
validateRequire
,
trigger
:
'blur'
}],
content
:
[{
validator
:
validateRequire
,
trigger
:
'blur'
}]
},
ReplyTypeOptions
:
[
...
...
@@ -465,6 +466,11 @@
if
(
valid
)
{
this
.
loading
=
true
if
(
!
this
.
tags
.
length
){
this
.
$message
.
error
(
'标签必填'
)
this
.
loading
=
false
return
false
}
this
.
postForm
.
tags
=
JSON
.
stringify
(
this
.
tags
)
this
.
postForm
.
user
=
this
.
user
;
...
...
This diff is collapsed.
Click to expand it.
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