+
+ {{getFirstChar(repItem.nickName)}}
+
-
{{repItem.nickName}}{{ parseTime(repItem.createTime, '{y}-{m}-{d} {h}:{i}') }}
+
+ {{repItem.nickName}}
+
+ 回复
+ {{ repItem.repTargetNickName }}
+
+ {{ parseTime(repItem.createTime, '{y}-{m}-{d} {h}:{i}') }}
+
{{repItem.content}}
@@ -115,7 +124,7 @@
取消
- 发布
+ 发布
@@ -218,6 +227,7 @@
pageSize: 10,
toolId: ''
},
+ reviewTotal: 0,
previewUrl: '',
viewDialogTitle: "",
viewDialogOpen: false,
@@ -342,18 +352,22 @@
},1000)
},
getDiscussionsList() {
- let self = this
+ let _this = this
+ _this.reviewTotal = 0
listDiscussions({businessId:this.toolDetail.toolId}).then(res => {
- self.discussionsList = res.rows
- self.discussionsList.forEach(item => {
+ _this.discussionsList = res.rows
+ let reviewTotal = 0
+ _this.discussionsList.forEach(item => {
+ reviewTotal += item.repliesList.length
if(item.repliesList && item.repliesList.length > 0){
- self.$set(item, 'showReplyFormSon', new Array(item.repliesList.length).fill(false))
- self.$set(item, 'replyContentSon', new Array(item.repliesList.length).fill(''))
+ _this.$set(item, 'showReplyFormSon', new Array(item.repliesList.length).fill(false))
+ _this.$set(item, 'replyContentSon', new Array(item.repliesList.length).fill(''))
}else{
- self.$set(item, 'showReplyFormSon', false)
- self.$set(item, 'replyContentSon', '')
+ _this.$set(item, 'showReplyFormSon', false)
+ _this.$set(item, 'replyContentSon', '')
}
});
+ _this.reviewTotal = _this.discussionsList.length + reviewTotal
});
},
/** 评论 **/
@@ -459,7 +473,7 @@
this.$set(parentItem.replyContentSon, repIndex, '');
},
/** 第二级回复 **/
- submitReplySon(parentIndex, repIndex, repItem) {
+ submitReplySon(parentIndex, repIndex, repItem, repId) {
let self = this
const parentItem = this.discussionsList[parentIndex];
const content = parentItem.replyContentSon[repIndex];
@@ -473,6 +487,7 @@
}
let data = {
"discussionId": repItem.id,
+ "repId": repId,
"content": content,
}