对接评论

This commit is contained in:
qq787203167
2022-04-29 16:46:46 +08:00
parent 772273db08
commit be23f7a176
@@ -49,6 +49,7 @@
</div>
</div>
<div class="comment-box-text" v-else>{{$t('noComment')}}</div>
<JLoading :loading="loading">{{$t('dataLoading')}}</JLoading>
</a-drawer>
<a-modal
:title="title"
@@ -64,6 +65,7 @@
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="title">{{title}}</span>
</div>
<a-form-model-item v-if="title == $t('replyToComments')" class="itemModel" :prop="'replyContent'">
@@ -97,6 +99,7 @@
visible: false,
dataList: [],
formInline: {},
loading: false,
title: this.$t('comment'),
confirmLoading: false,
visibleComment: false,
@@ -137,12 +140,18 @@
this.title = this.$t('publishComment')
this.formInline = {}
this.visibleComment = true
this.$nextTick(() => {
this.$refs.ruleForm.clearValidate()
})
},
getList() {
getAction(this.url.list, {}).then((res) => {
this.loading = true
getAction(this.url.list, { projectLibraryId: this.$route.query.id }).then((res) => {
if (res.success) {
this.loading = false
this.dataList = res.result || []
} else {
this.loading = false
this.dataList = []
}
})
@@ -165,17 +174,20 @@
projectCommentId: this.formInline.projectCommentId
}
}
this.confirmLoading = true
postAction(url, query).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.visibleComment = false
this.confirmLoading = false
this.getList()
} else {
this.confirmLoading = false
this.$message.success(this.$t('operationFailed'))
}
})
}
})
this.visibleComment = false
},
handleCancelComment() {
this.visibleComment = false
@@ -185,6 +197,9 @@
this.formInline.projectCommentId = row.id
this.title = this.$t('replyToComments')
this.visibleComment = true
this.$nextTick(() => {
this.$refs.ruleForm.clearValidate()
})
}
}
}
@@ -308,7 +323,7 @@
}
.title-text {
width: 64px;
width: 74px;
text-align: right;
display: inline-block;
font-weight: 500;