对接评论

This commit is contained in:
qq787203167
2022-04-29 16:34:41 +08:00
parent 7163c5af5f
commit 4e905bebb2
3 changed files with 11 additions and 2 deletions
+1
View File
@@ -738,4 +738,5 @@ module.exports = {
publishComment:'publish comment', publishComment:'publish comment',
record:'record', record:'record',
replyToComments:'Reply to comments', replyToComments:'Reply to comments',
noComment:'No comment',
} }
+1
View File
@@ -743,4 +743,5 @@ module.exports = {
publishComment:'发表评论', publishComment:'发表评论',
record:'记录', record:'记录',
replyToComments:'回复评论', replyToComments:'回复评论',
noComment:'暂无评论',
} }
@@ -11,7 +11,7 @@
<div class="button-box"> <div class="button-box">
<a-button @click="handleSubmit" type="primary">{{$t('publishComment')}}</a-button> <a-button @click="handleSubmit" type="primary">{{$t('publishComment')}}</a-button>
</div> </div>
<div class="comment-box"> <div class="comment-box" v-if="dataList && dataList.length > 0">
<div class="comment-box-top-box" v-for="(item,index) in dataList" :key="index"> <div class="comment-box-top-box" v-for="(item,index) in dataList" :key="index">
<div class="title-text">{{$t('record')+(index + 1)}}</div> <div class="title-text">{{$t('record')+(index + 1)}}</div>
<div class="box-content"> <div class="box-content">
@@ -48,6 +48,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="comment-box-text" v-else>{{$t('noComment')}}</div>
</a-drawer> </a-drawer>
<a-modal <a-modal
:title="title" :title="title"
@@ -130,6 +131,7 @@
}, },
getData() { getData() {
this.visible = true this.visible = true
this.getList()
}, },
handleSubmit() { handleSubmit() {
this.title = this.$t('publishComment') this.title = this.$t('publishComment')
@@ -160,12 +162,13 @@
url = this.url.edit url = this.url.edit
query = { query = {
replyContent: this.formInline.replyContent, replyContent: this.formInline.replyContent,
projectCommentId: this.formInline.id projectCommentId: this.formInline.projectCommentId
} }
} }
postAction(url, query).then((res) => { postAction(url, query).then((res) => {
if (res.success) { if (res.success) {
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
this.getList()
} else { } else {
this.$message.success(this.$t('operationFailed')) this.$message.success(this.$t('operationFailed'))
} }
@@ -339,4 +342,8 @@
margin-top: 9px; margin-top: 9px;
} }
.comment-box-text {
text-align: center;
margin-top: 40px;
}
</style> </style>