Browse Source

评论bug修改

master
王金鹏 6 years ago
parent
commit
ed57538f45
  1. 19
      src/views/modules/events/issue-detail.vue
  2. 2
      src/views/modules/events/issue-review-detail.vue
  3. 18
      src/views/modules/events/item-detail.vue

19
src/views/modules/events/issue-detail.vue

@ -32,15 +32,17 @@
</el-timeline>
</el-form-item>
<el-form-item label="评论:">
<el-collapse v-for="(commentsDTO, index) in commentsDTOs" :key="index" :name="index">
<el-collapse-item>
<template slot="title" style="height: 100px">
<span>{{commentsDTO.user.userName + ':'}}{{commentsDTO.content}}</span>
<el-table :data="commentsDTOs" border style="width: 100%;">
<el-table-column prop="user.userName" label="评论人" header-align="center" align="center"></el-table-column>
<el-table-column prop="content" label="评论内容" header-align="center" align="center"></el-table-column>
<el-table-column prop="replyComment.userName" label="回复人" header-align="center" align="center"></el-table-column>
<el-table-column prop="replyComment.content" label="回复内容" header-align="center" align="center"></el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<el-button type="text" size="small" @click="deleteComment(scope.row.commentId)">屏蔽</el-button>
</template>
<div>{{commentsDTO.replyComment ? commentsDTO.replyComment.userName + ':' : ''}}{{commentsDTO.replyComment ? commentsDTO.replyComment.content : ''}}</div>
</el-collapse-item>
<el-button @click="deleteComment(commentsDTO.commentId)">屏蔽评论</el-button>
</el-collapse>
</el-table-column>
</el-table>
<el-pagination
:current-page="pageIndex"
:page-sizes="[10, 20, 50, 100]"
@ -91,6 +93,7 @@ export default {
})
},
deleteComment (val) {
console.log(val)
this.$http['post'](
'/events/issue/deleteComment', { commentIds: [val] }).then(({ data: res }) => {
if (res.code !== 0) {

2
src/views/modules/events/issue-review-detail.vue

@ -1,6 +1,6 @@
<template>
<el-dialog :visible.sync="visible" :title="$t('verifyLabel')" :close-on-click-modal="false" :close-on-press-escape="false">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '140px' : '100px'">
<el-form-item label="议题内容:" prop="eventContent">
<div>{{dataForm.eventContent}}</div>
<span v-for="(imgUrl, index) in urls" :key="index" style="margin: 5px">

18
src/views/modules/events/item-detail.vue

@ -32,15 +32,17 @@
</el-timeline>
</el-form-item>
<el-form-item label="评论:">
<el-collapse v-for="(commentsDTO, index) in commentsDTOs" :key="index" :name="index">
<el-collapse-item>
<template slot="title">
{{commentsDTO.user.userName + ':'}}{{commentsDTO.content}}
<el-table :data="commentsDTOs" border style="width: 100%;">
<el-table-column prop="user.userName" label="评论人" header-align="center" align="center"></el-table-column>
<el-table-column prop="content" label="评论内容" header-align="center" align="center"></el-table-column>
<el-table-column prop="replyComment.userName" label="回复人" header-align="center" align="center"></el-table-column>
<el-table-column prop="replyComment.content" label="回复内容" header-align="center" align="center"></el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<el-button type="text" size="small" @click="deleteComment(scope.row.commentId)">屏蔽</el-button>
</template>
<div>{{commentsDTO.replyComment.userName + ':'}}{{commentsDTO.replyComment ? commentsDTO.replyComment.content : ''}}</div>
</el-collapse-item>
<el-button @click="deleteComment(commentsDTO.commentId)">屏蔽评论</el-button>
</el-collapse>
</el-table-column>
</el-table>
<el-pagination
:current-page="pageIndex"
:page-sizes="[10, 20, 50, 100]"

Loading…
Cancel
Save