|
@@ -20,7 +20,7 @@
|
20
|
20
|
<div class="reply">
|
21
|
21
|
| <span @click="replyComments(item.id)">回复</span>
|
22
|
22
|
| <span @click="spread(item.id)" id="copy">展开</span> |
|
23
|
|
- 删除
|
|
23
|
+ <span @click="deleteComments(item.id,index)">删除</span>
|
24
|
24
|
</div>
|
25
|
25
|
<div class="content">
|
26
|
26
|
{{item.content}}
|
|
@@ -33,18 +33,21 @@
|
33
|
33
|
<el-button type="primary" @click="send(item)">发送</el-button>
|
34
|
34
|
</div>
|
35
|
35
|
</div>
|
36
|
|
- <div class="reviewed" v-show="showReply==item.id">
|
37
|
|
- <div v-for="(child) in item.childs" :key="child.id">
|
|
36
|
+ <div class="reviewed" v-show="showReply==item.id" v-for="(child) in item.childs" :key="child.id">
|
|
37
|
+ <div>
|
38
|
38
|
你 回复了 {{item.comment_user_name}}:{{child.content}}
|
39
|
39
|
<div id="tub" class="el-icon-error" @click="clear(item.id,index)"></div>
|
40
|
40
|
</div>
|
41
|
41
|
</div>
|
42
|
|
- <div class="reviewed2" v-show="shows==item.id">
|
43
|
|
- <div v-for="(items,index) in commentsReplyInfo" :key="items.id">
|
|
42
|
+ <div>
|
|
43
|
+ <div class="reviewed2" v-show="shows==item.id" v-for="(items,index) in commentsReplyInfo" :key="items.id">
|
|
44
|
+ <div>
|
44
|
45
|
你 回复了 {{items.comment_user_name}}:{{items.content}}
|
45
|
46
|
<div id="tub" class="el-icon-error" @click="clear(items.id,index)"></div>
|
46
|
47
|
</div>
|
47
|
|
- </div>
|
|
48
|
+ </div>
|
|
49
|
+ </div>
|
|
50
|
+
|
48
|
51
|
<div class="border"></div>
|
49
|
52
|
</div>
|
50
|
53
|
<el-pagination
|
|
@@ -63,7 +66,7 @@
|
63
|
66
|
|
64
|
67
|
<script>
|
65
|
68
|
import BreadCrumb from '../components/bread-crumb'
|
66
|
|
- import { getArticleCommentDetail,send,spread} from '@/api/act/submitinfo'
|
|
69
|
+ import { getArticleCommentDetail,send,spread,clear,deleteComments} from '@/api/act/submitinfo'
|
67
|
70
|
import {getFileExtension,uParseTime} from '@/utils/tools'
|
68
|
71
|
import { constants } from 'crypto';
|
69
|
72
|
import { truncateSync } from 'fs';
|
|
@@ -88,7 +91,6 @@
|
88
|
91
|
total:0,
|
89
|
92
|
comments:[],
|
90
|
93
|
show:true,
|
91
|
|
- shows:false,
|
92
|
94
|
showindex:-1,
|
93
|
95
|
form:{
|
94
|
96
|
replycontent:'',
|
|
@@ -182,8 +184,38 @@
|
182
|
184
|
})
|
183
|
185
|
}
|
184
|
186
|
},
|
185
|
|
- clear(id){
|
|
187
|
+ clear(id,index){
|
186
|
188
|
console.log("id是什么?",id);
|
|
189
|
+ this.$confirm("确定删除此评论?",'删除提示',{
|
|
190
|
+ dangerouslyUseHTMLString:true,
|
|
191
|
+ confirmButtonText: '确定',
|
|
192
|
+ cancelButtonText: '取消',
|
|
193
|
+ type: 'warning'
|
|
194
|
+ }).then(()=>{
|
|
195
|
+ clear(id,index).then(response=>{
|
|
196
|
+ if(response.data.state ==1){
|
|
197
|
+ this.commentsReplyInfo.splice(index,1);
|
|
198
|
+ this.$message.success("删除成功")
|
|
199
|
+ }
|
|
200
|
+ }).catch(e=>{});
|
|
201
|
+ }).catch(() => {
|
|
202
|
+ return false
|
|
203
|
+ });
|
|
204
|
+ },
|
|
205
|
+ deleteComments(id,index){
|
|
206
|
+ this.$confirm("确定删除此评论?",'删除提示',{
|
|
207
|
+ dangerouslyUseHTMLString:true,
|
|
208
|
+ confirmButtonText: '确定',
|
|
209
|
+ cancelButtonText: '取消',
|
|
210
|
+ type: 'warning'
|
|
211
|
+ }).then(()=>{
|
|
212
|
+ deleteComments(id,index).then(response=>{
|
|
213
|
+ if(response.data.state==1){
|
|
214
|
+ this.comments.splice(index,1);
|
|
215
|
+ this.$message.success("删除成功");
|
|
216
|
+ }
|
|
217
|
+ })
|
|
218
|
+ })
|
187
|
219
|
}
|
188
|
220
|
},
|
189
|
221
|
created(){
|
|
@@ -258,6 +290,7 @@
|
258
|
290
|
width: 1585px;
|
259
|
291
|
height:50px;
|
260
|
292
|
margin-left: 92px;
|
|
293
|
+ padding-top: 14px;
|
261
|
294
|
}
|
262
|
295
|
#tub{
|
263
|
296
|
float: right;
|