|
|
@ -65,7 +65,7 @@
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<a
|
|
|
|
<a
|
|
|
|
href="javascript:void(0);"
|
|
|
|
href="javascript:void(0);"
|
|
|
|
@click="handlePublishMore"
|
|
|
|
@click="handleEditStatusMore(commentStatus.PUBLISHED.value)"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
通过
|
|
|
|
通过
|
|
|
|
</a>
|
|
|
|
</a>
|
|
|
@ -76,7 +76,7 @@
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<a
|
|
|
|
<a
|
|
|
|
href="javascript:void(0);"
|
|
|
|
href="javascript:void(0);"
|
|
|
|
@click="handleRecycleMore"
|
|
|
|
@click="handleEditStatusMore(commentStatus.RECYCLE.value)"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
移到回收站
|
|
|
|
移到回收站
|
|
|
|
</a>
|
|
|
|
</a>
|
|
|
@ -632,33 +632,16 @@ export default {
|
|
|
|
this.handleClearRowKeys()
|
|
|
|
this.handleClearRowKeys()
|
|
|
|
this.handlePaginationChange(1, this.pagination.size)
|
|
|
|
this.handlePaginationChange(1, this.pagination.size)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handlePublishMore() {
|
|
|
|
handleEditStatusMore(status) {
|
|
|
|
if (this.selectedRowKeys.length <= 0) {
|
|
|
|
if (this.selectedRowKeys.length <= 0) {
|
|
|
|
this.$message.success('请至少选择一项!')
|
|
|
|
this.$message.success('请至少选择一项!')
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for (let index = 0; index < this.selectedRowKeys.length; index++) {
|
|
|
|
commentApi.updateStatusInBatch(this.type, this.selectedRowKeys, status).then(response => {
|
|
|
|
const element = this.selectedRowKeys[index]
|
|
|
|
this.$log.debug(`commentIds: ${this.selectedRowKeys}, status: ${status}`)
|
|
|
|
commentApi.updateStatus(this.type, element, 'PUBLISHED').then(response => {
|
|
|
|
this.selectedRowKeys = []
|
|
|
|
this.$log.debug(`commentId: ${element}, status: PUBLISHED`)
|
|
|
|
this.loadComments()
|
|
|
|
this.selectedRowKeys = []
|
|
|
|
})
|
|
|
|
this.loadComments()
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
handleRecycleMore() {
|
|
|
|
|
|
|
|
if (this.selectedRowKeys.length <= 0) {
|
|
|
|
|
|
|
|
this.$message.success('请至少选择一项!')
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
for (let index = 0; index < this.selectedRowKeys.length; index++) {
|
|
|
|
|
|
|
|
const element = this.selectedRowKeys[index]
|
|
|
|
|
|
|
|
commentApi.updateStatus(this.type, element, 'RECYCLE').then(response => {
|
|
|
|
|
|
|
|
this.$log.debug(`commentId: ${element}, status: RECYCLE`)
|
|
|
|
|
|
|
|
this.selectedRowKeys = []
|
|
|
|
|
|
|
|
this.loadComments()
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handleDeleteMore() {
|
|
|
|
handleDeleteMore() {
|
|
|
|
if (this.selectedRowKeys.length <= 0) {
|
|
|
|
if (this.selectedRowKeys.length <= 0) {
|
|
|
|