Commit a9129aa7 authored by Davve's avatar Davve

增加用户身份可修改

parent 1609ea0b
......@@ -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
......@@ -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()),
......
......@@ -48,3 +48,11 @@ export function GroupUserDetail(id) {
})
}
export function ModifyGroupIdentify(data) {
return request({
url: '/api/group/user/edit_group_identify',
method: 'post',
data
})
}
......@@ -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,
......
......@@ -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: '成功',
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment