提交 01b9109b 编写于 作者: changdi.hao's avatar changdi.hao

增加讨论新的配置

上级 52c0e775
...@@ -31,12 +31,24 @@ ...@@ -31,12 +31,24 @@
<el-radio v-model="form.ht" label="1" >允许</el-radio> <el-radio v-model="form.ht" label="1" >允许</el-radio>
<el-radio v-model="form.ht" label="0" >不允许</el-radio> <el-radio v-model="form.ht" label="0" >不允许</el-radio>
</div> </div>
<div> <!-- <div>
<span class="label-name">评论</span> <span class="label-name">评论</span>
<el-radio v-model="form.pl" label="1" disabled>允许</el-radio> <el-radio v-model="form.pl" label="1" >允许</el-radio>
<el-radio v-model="form.pl" label="0" disabled>不允许</el-radio> <el-radio v-model="form.pl" label="0" >不允许</el-radio>
</div> -->
<div>
<span class="label-name">回复</span>
<el-radio v-model="form.displayReplyBtn" :label="1" >允许</el-radio>
<el-radio v-model="form.displayReplyBtn" :label="2" >不允许</el-radio>
<span class="label-name">前端展示数量:</span>
<el-input-number v-model="form.replyShowNum" controls-position="right" :min="0"></el-input-number>
<el-checkbox v-model="form.replyOfficial" style="margin-left: 20px">置顶官方回复</el-checkbox>
</div>
<div>
<span class="label-name">点赞</span>
<el-radio v-model="form.displayLikeBtn" :label="1" >允许</el-radio>
<el-radio v-model="form.displayLikeBtn" :label="2" >不允许</el-radio>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="审核规则" required> <el-form-item label="审核规则" required>
<div> <div>
...@@ -56,15 +68,44 @@ ...@@ -56,15 +68,44 @@
<el-checkbox label="认证用户" v-model="form.isRZ"></el-checkbox> <el-checkbox label="认证用户" v-model="form.isRZ"></el-checkbox>
</el-form-item> </el-form-item>
<el-form-item label="发布按钮文案" required> <el-form-item label="发布按钮文案" required>
<el-row>
<el-col :span="6">
<div> <div>
<span class="label-name label-f">首页按钮</span> <span class="label-name label-f">话题发布</span>
<el-input v-model="form.topicBtnText" size="mini" style="width: 100px;" :maxLength="maxBtn"></el-input> <el-input v-model="form.topicBtnText" size="mini" style="width: 100px;" :maxLength="maxBtn"></el-input>
</div> </div>
</el-col>
<el-col :span="10">
<div> <div>
<span class="label-name label-f">二级页按钮</span> <span class="label-name label-w">输入界面title文案</span>
<el-input v-model="form.inputTitle" size="mini" style="width: 100px;" :maxLength="maxBtn"></el-input>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<div>
<span class="label-name label-f">评论发布</span>
<el-input v-model="form.commentBtnText" size="mini" style="width: 100px;" :maxLength="maxBtn"></el-input> <el-input v-model="form.commentBtnText" size="mini" style="width: 100px;" :maxLength="maxBtn"></el-input>
</div> </div>
</el-col>
<el-col :span="12">
<div>
<span class="label-name label-w">输入界面提示文案</span>
<el-input v-model="form.inputReminder" size="mini" style="width: 100px;" :maxLength="maxBtn"></el-input>
</div>
</el-col>
</el-row>
</el-form-item>
<el-form-item label="底Bar显示控制">
<el-radio v-model="form.displayBar" :label="1">评论+点赞</el-radio>
<el-radio v-model="form.displayBar" :label="2">仅评论</el-radio>
<el-radio v-model="form.displayBar" :label="3"></el-radio>
</el-form-item>
<el-form-item label="列表排序控制">
<el-radio v-model="form.displayListSort" :label="1">综合排序</el-radio>
<el-radio v-model="form.displayListSort" :label="2">按最新发布时间</el-radio>
<el-radio v-model="form.displayListSort" :label="3">按最高点赞数</el-radio>
</el-form-item> </el-form-item>
<el-form-item label="话题列表页标题文案" label-width="140px"> <el-form-item label="话题列表页标题文案" label-width="140px">
<div> <div>
...@@ -76,11 +117,14 @@ ...@@ -76,11 +117,14 @@
<el-input v-model="form.commentDetails" size="mini" style="width: 100px;" :maxLength="maxBtn"></el-input> <el-input v-model="form.commentDetails" size="mini" style="width: 100px;" :maxLength="maxBtn"></el-input>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="是否仅显示评论区" label-width="110px">
<el-radio v-model="form.displayOnlyComment" :label="1"></el-radio>
<el-radio v-model="form.displayOnlyComment" :label="2"></el-radio>
</el-form-item>
<el-form-item label="备注"> <el-form-item label="备注">
<el-col :span="8"> <el-col :span="8">
<el-input v-model="form.remark" size="mini" type="textarea" :maxLength="maxTopic"></el-input> <el-input v-model="form.remark" size="mini" type="textarea" :maxLength="maxTopic"></el-input>
</el-col> </el-col>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="btn-box pdrt20"> <div class="btn-box pdrt20">
...@@ -110,16 +154,27 @@ export default { ...@@ -110,16 +154,27 @@ export default {
curmbFirst:'讨论组件', curmbFirst:'讨论组件',
curmbSecond:'新建', curmbSecond:'新建',
derivers:[ derivers:[
{
value:'直播',
label:'直播'
},
{
value:'发现',
label:'发现'
},
{
value:'课程',
label:'课程'
},
{ {
value:'积木', value:'积木',
label:'积木' label:'积木'
} },
], ],
maxBtn:4, maxBtn:4,
form:{ form:{
subject:'', subject:'',
ht:'1', ht:'1',
pl:'1',
wz:'4', wz:'4',
tp:'16', tp:'16',
user:'1', user:'1',
...@@ -132,9 +187,18 @@ export default { ...@@ -132,9 +187,18 @@ export default {
commentDetails:'全部评论', commentDetails:'全部评论',
commentListDetails: '热门话题', commentListDetails: '热门话题',
displayTopicBtn:true,//是否显示发布话题按钮 displayTopicBtn:true,//是否显示发布话题按钮
dispalyCommentBtn:true,//是否显示评论按钮 // displayCommentBtn:true,//是否显示评论按钮
displayReplyBtn: 1,//是否显示回复按钮
displayLikeBtn: 1,//是否显示点赞按钮
remark:'', remark:'',
deriverName:'积木' deriverName:'积木',
replyShowNum: 5,
replyOfficial: false,
inputTitle: '话题发布',
inputReminder: '',
displayBar: 1,
displayListSort: 1,
displayOnlyComment: 2
}, },
maxTopic:60, maxTopic:60,
id:0, id:0,
...@@ -198,11 +262,15 @@ export default { ...@@ -198,11 +262,15 @@ export default {
} }
if(this.form.topicBtnText == ''){ if(this.form.topicBtnText == ''){
this.showError('请输入首页按钮文字'); this.showError('请输入话题发布按钮文字');
return; return;
} }
if(this.form.commentBtnText == ''){ if(this.form.commentBtnText == ''){
this.showError('请输入二级页按钮文字'); this.showError('请输入评论发布按钮文字');
return;
}
if(this.form.inputTitle == ''){
this.showError('请输入输入界面title文案');
return; return;
} }
...@@ -217,8 +285,17 @@ export default { ...@@ -217,8 +285,17 @@ export default {
//"deleteflag": 0, //"deleteflag": 0,
//"derivedid": 0, //"derivedid": 0,
"category": this.form.deriverName, "category": this.form.deriverName,
"dispalycommentbtn": this.form.pl == 1 ? true : false, // "displaycommentbtn": this.form.pl == 1 ? true : false,
"displaytopicbtn": this.form.ht == 1 ? true : false, "displaytopicbtn": this.form.ht == 1 ? true : false,
"displayReplyBtn": this.form.displayReplyBtn,
"displayLikeBtn": this.form.displayLikeBtn,
"replyShowNum": this.form.replyShowNum,
"replyOfficial": this.form.replyOfficial ? 1 : 2,
"inputTitle": this.form.inputTitle,
"inputReminder": this.form.inputReminder,
"displayBar": this.form.displayBar,
"displayListSort": this.form.displayListSort,
"displayOnlyComment": this.form.displayOnlyComment,
//"id": 0, //"id": 0,
"subject":this.form.subject, "subject":this.form.subject,
"topicbtntext": _this.form.topicBtnText, "topicbtntext": _this.form.topicBtnText,
...@@ -267,10 +344,15 @@ export default { ...@@ -267,10 +344,15 @@ export default {
this.id = res.data.id this.id = res.data.id
this.form.subject = res.data.subject this.form.subject = res.data.subject
// 发布按钮文案
this.form.topicBtnText = res.data.topicbtntext == null ? '' : res.data.topicbtntext this.form.topicBtnText = res.data.topicbtntext == null ? '' : res.data.topicbtntext
this.form.commentBtnText = res.data.commentbtntext this.form.commentBtnText = res.data.commentbtntext
this.form.inputTitle = res.data.inputTitle || '话题发布'
this.form.inputReminder = res.data.inputReminder
// title文案
this.form.commentDetails = res.data.commentDetails this.form.commentDetails = res.data.commentDetails
this.form.commentListDetails = res.data.commentListDetails this.form.commentListDetails = res.data.commentListDetails
// 备注
this.form.remark = res.data.remark this.form.remark = res.data.remark
//开放客群 //开放客群
...@@ -302,9 +384,16 @@ export default { ...@@ -302,9 +384,16 @@ export default {
//内容发布控制 //内容发布控制
this.form.ht = res.data.displaytopicbtn ? "1" : "0" this.form.ht = res.data.displaytopicbtn ? "1" : "0"
this.form.pl = res.data.dispalycommentbtn ? "1" : "0" // this.form.pl = res.data.displaycommentbtn ? "1" : "0"
this.form.displayReplyBtn = res.data.displayReplyBtn
this.form.displayLikeBtn = res.data.displayLikeBtn
this.form.replyShowNum = res.data.replyShowNum
this.form.replyOfficial = res.data.replyOfficial == 1 ? true : false
// 底部bar 列表排序 显示评论区
this.form.displayBar = res.data.displayBar
this.form.displayListSort = res.data.displayListSort
this.form.displayOnlyComment = res.data.displayOnlyComment
} }
}) })
} }
...@@ -328,6 +417,9 @@ export default { ...@@ -328,6 +417,9 @@ export default {
.label-f{ .label-f{
width: 80px; width: 80px;
} }
.label-w {
width: 110px
}
.pdrt20{ .pdrt20{
padding:20px 0; padding:20px 0;
} }
......
...@@ -240,10 +240,13 @@ export default { ...@@ -240,10 +240,13 @@ export default {
this.showError('请输入主题!'); this.showError('请输入主题!');
return; return;
} }
// 加入话题内容识别宫格
let placeContent = this.objInfo.topic.content.replace(/ /gi,'&nbsp;');
let parm = { let parm = {
topic:{ topic:{
subject:this.objInfo.topic.subject, subject:this.objInfo.topic.subject,
content:this.objInfo.topic.content, // content:this.objInfo.topic.content,
content:placeContent,
discussid:this.objInfo.topic.discussid || this.discussId, discussid:this.objInfo.topic.discussid || this.discussId,
id:this.objInfo.topic.id || null, id:this.objInfo.topic.id || null,
official:true official:true
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册