dingxin 6 years ago
parent
commit
c47dfa4b19

+ 22
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/TransactionController.java View File

134
 		ResponseBean  transactionsUpdata= transactionService.deleteReply(paramets);
134
 		ResponseBean  transactionsUpdata= transactionService.deleteReply(paramets);
135
 		return transactionsUpdata;
135
 		return transactionsUpdata;
136
 	}
136
 	}
137
+
138
+	@ApiOperation(value = "添加二手帖子评论",nickname ="添加二手帖子评论")
139
+	@ApiImplicitParams({
140
+			@ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value ="id:帖子id,contentImg:评论所带图片,replyContent:评论内容" )})
141
+	@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
142
+	@RequestMapping(value="/transactionReply/add",method = RequestMethod.POST)
143
+	public ResponseBean transactionReplyAdd(@RequestBody String paramets, HttpSession session){
144
+		UserElement userElement = getUserElement(session);
145
+		ResponseBean  transactionReplyAdd= transactionService.transactionReplyAdd(paramets,userElement);
146
+		return transactionReplyAdd;
147
+	}
148
+
149
+	@ApiOperation(value = "二手帖子举报列表",nickname ="二手帖子举报列表")
150
+	@ApiImplicitParams({
151
+			@ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value =":举报人姓名,reportPhone:举报人电话,transactionId:帖子ID" )})
152
+	@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
153
+	@RequestMapping(value="/transactionReportList",method = RequestMethod.POST)
154
+	public ResponseBean transactionReportList(@RequestBody String paramets, HttpSession session){
155
+		UserElement userElement = getUserElement(session);
156
+		ResponseBean  transactionReplyList= transactionService.transactionReportList(paramets,userElement);
157
+		return transactionReplyList;
158
+	}
137
 }
159
 }

+ 13
- 1
CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TransactionReportMapper.java View File

1
 package com.community.huiju.dao;
1
 package com.community.huiju.dao;
2
 
2
 
3
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
4
+import com.community.huiju.model.TpTicket;
3
 import com.community.huiju.model.TransactionReport;
5
 import com.community.huiju.model.TransactionReport;
4
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
6
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
 import org.apache.ibatis.annotations.Mapper;
7
 import org.apache.ibatis.annotations.Mapper;
8
+import org.apache.ibatis.annotations.Param;
9
+
10
+import java.util.List;
6
 
11
 
7
 /**
12
 /**
8
  * <p>
13
  * <p>
14
  */
19
  */
15
 @Mapper
20
 @Mapper
16
 public interface TransactionReportMapper extends BaseMapper<TransactionReport> {
21
 public interface TransactionReportMapper extends BaseMapper<TransactionReport> {
17
-
22
+    /**
23
+     * 举报列表
24
+     * @param page
25
+     * @param reportUserNmae
26
+     * @param reportPhone
27
+     * @return
28
+     */
29
+    List<TransactionReport> transactionReportList(Page page, @Param("reportUserNmae") String reportUserNmae, @Param("reportPhone") String reportPhone,@Param("transactionId") Integer transactionId);
18
 }
30
 }

+ 3
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TransactionReply.java View File

1
 package com.community.huiju.model;
1
 package com.community.huiju.model;
2
 
2
 
3
+import com.baomidou.mybatisplus.annotation.IdType;
3
 import com.baomidou.mybatisplus.annotation.TableField;
4
 import com.baomidou.mybatisplus.annotation.TableField;
5
+import com.baomidou.mybatisplus.annotation.TableId;
4
 import com.baomidou.mybatisplus.annotation.TableName;
6
 import com.baomidou.mybatisplus.annotation.TableName;
5
 import java.time.LocalDateTime;
7
 import java.time.LocalDateTime;
6
 import java.io.Serializable;
8
 import java.io.Serializable;
26
 
28
 
27
     private static final long serialVersionUID = 1L;
29
     private static final long serialVersionUID = 1L;
28
 
30
 
31
+    @TableId(value = "id", type = IdType.AUTO)
29
     private Integer id;
32
     private Integer id;
30
     /**
33
     /**
31
      * 小区id
34
      * 小区id

+ 31
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TransactionReport.java View File

1
 package com.community.huiju.model;
1
 package com.community.huiju.model;
2
 
2
 
3
+import com.baomidou.mybatisplus.annotation.TableField;
3
 import com.baomidou.mybatisplus.annotation.TableName;
4
 import com.baomidou.mybatisplus.annotation.TableName;
4
 import java.io.Serializable;
5
 import java.io.Serializable;
6
+import java.time.LocalDateTime;
7
+
5
 import lombok.Data;
8
 import lombok.Data;
6
 import lombok.EqualsAndHashCode;
9
 import lombok.EqualsAndHashCode;
7
 import lombok.experimental.Accessors;
10
 import lombok.experimental.Accessors;
42
      */
45
      */
43
     private Integer reporterId;
46
     private Integer reporterId;
44
 
47
 
48
+    /**
49
+     * 举报原因
50
+     */
51
+    @TableField(exist = false)
52
+    private String reason;
53
+
54
+    /**
55
+     * 举报名字
56
+     */
57
+    @TableField(exist = false)
58
+    private String reportUserName;
59
+
60
+    /**
61
+     * 举报身份
62
+     */
63
+    @TableField(exist = false)
64
+    private String description;
65
+
66
+    /**
67
+     * 举报人手机号
68
+     */
69
+    @TableField(exist = false)
70
+    private String reportPhone;
71
+
72
+    /**
73
+     * 创建时间
74
+     */
75
+    private LocalDateTime createDate;
45
 
76
 
46
 }
77
 }

+ 16
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ITransactionService.java View File

73
 	 * @return
73
 	 * @return
74
 	 */
74
 	 */
75
     ResponseBean deleteReply(String paramets);
75
     ResponseBean deleteReply(String paramets);
76
+
77
+	/**
78
+	 * 添加二手帖子评论
79
+	 * @param paramets
80
+	 * @param userElement
81
+	 * @return
82
+	 */
83
+	ResponseBean transactionReplyAdd(String paramets, UserElement userElement);
84
+
85
+	/**
86
+	 * 二手帖子举报列表
87
+	 * @param paramets
88
+	 * @param userElement
89
+	 * @return
90
+	 */
91
+    ResponseBean transactionReportList(String paramets, UserElement userElement);
76
 }
92
 }

+ 80
- 2
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TransactionServiceImpl.java View File

52
 	@Autowired
52
 	@Autowired
53
 	private TransactionReplyMapper transactionReplyMapper;
53
 	private TransactionReplyMapper transactionReplyMapper;
54
 
54
 
55
+	@Autowired
56
+	private TaUserMapper taUserMapper;
57
+
55
 
58
 
56
 	@Override
59
 	@Override
57
 	public ResponseBean getTransactionList(String parameter,Integer communityId) {
60
 	public ResponseBean getTransactionList(String parameter,Integer communityId) {
294
 		ResponseBean responseBean= new ResponseBean();
297
 		ResponseBean responseBean= new ResponseBean();
295
 		 JSONObject object= JSONObject.parseObject(paramets);
298
 		 JSONObject object= JSONObject.parseObject(paramets);
296
 	 	JSONArray array= object.getJSONArray("id");
299
 	 	JSONArray array= object.getJSONArray("id");
297
-	 	Integer[]	Reply= array.toArray(new Integer[]{});
298
-	 	for (Integer id:Reply){
300
+	 	Integer[]	reply= array.toArray(new Integer[]{});
301
+	 	for (Integer id:reply){
299
 			transactionReplyMapper.deleteById(id);
302
 			transactionReplyMapper.deleteById(id);
300
 		}
303
 		}
301
 	 	responseBean.addSuccess("成功");
304
 	 	responseBean.addSuccess("成功");
302
 		return responseBean;
305
 		return responseBean;
303
 	}
306
 	}
307
+
308
+	@Override
309
+	public ResponseBean transactionReplyAdd(String paramets, UserElement userElement) {
310
+		ResponseBean response= new ResponseBean();
311
+		 JSONObject object= JSONObject.parseObject(paramets);
312
+		 Integer id= object.getInteger("id");
313
+		 String replyContent= object.getString("replyContent");
314
+		 JSONArray array= object.getJSONArray("contentImg");
315
+		// 根据此状态判断是回复帖子,还是回复人
316
+		Integer replyType= object.getInteger("replyType");
317
+		 // 查询帖子信息
318
+		TpTransaction tpTransaction= tpTransactionMapper.selectById(id);
319
+		// 查询评论信息
320
+		TransactionReply  Reply= transactionReplyMapper.selectById(id);
321
+		TransactionReply transactionReply= new TransactionReply();
322
+		int Type=replyType.intValue();
323
+		if (Type==1) {
324
+			transactionReply.setCommunityId(userElement.getCommunityId())
325
+					.setTransactionId(id)
326
+					.setTaUserId(userElement.getId())
327
+					.setTaUserName(userElement.getUserName())
328
+					.setReplyContent(replyContent)
329
+					.setReplyTaUserId(tpTransaction.getCreateUser())
330
+					.setReplyTaUserName(taUserMapper.selectById(tpTransaction.getTaUserId()).getUserName())
331
+					.setCreateDate(LocalDateTime.now());
332
+		}
333
+		if (Type!=1) {
334
+			transactionReply.setCommunityId(userElement.getCommunityId())
335
+					.setTransactionId(Reply.getTransactionId())
336
+					.setTaUserId(userElement.getId())
337
+					.setTaUserName(userElement.getUserName())
338
+					.setReplyContent(replyContent)
339
+					.setReplyTaUserId(Reply.getTaUserId())
340
+					.setReplyTaUserName(Reply.getTaUserName())
341
+					.setCreateDate(LocalDateTime.now());
342
+		}
343
+		transactionReplyMapper.insert(transactionReply);
344
+		String[] replyImg = array.toArray(new String[]{});
345
+		for (String img:replyImg){
346
+			 TdImages tdImages= new TdImages();
347
+			tdImages.setImageUrl(img);
348
+			tdImages.setType("reply");
349
+			tdImages.setUuid(transactionReply.getId());
350
+			tdImages.setCreateTime(LocalDateTime.now());
351
+			tdImages.setCreateUser(userElement.getId());
352
+			tdImagesMapper.insert(tdImages);
353
+		}
354
+		response.addSuccess("成功");
355
+		return response;
356
+	}
357
+
358
+	@Override
359
+	public ResponseBean transactionReportList(String paramets, UserElement userElement) {
360
+		ResponseBean response= new ResponseBean();
361
+			JSONObject object= JSONObject.parseObject(paramets);
362
+			String reportUserNmae= object.getString("reportUserNmae");
363
+			String reportPhone= object.getString("reportPhone");
364
+			Integer transactionId= object.getInteger("transactionId");
365
+
366
+			Integer pageNum = object.getInteger("pageNum");
367
+			Integer pageSize = object.getInteger("pageSize");
368
+			Page<TransactionReport> page = new Page<>();
369
+			page.setSize(pageSize == null ? 10 : pageSize);
370
+			page.setCurrent(pageNum == null ? 1 : pageNum);
371
+			// 分页查询
372
+			List<TransactionReport> list = transactionReportMapper.transactionReportList(page,reportUserNmae,reportPhone,transactionId);
373
+
374
+			Map<String, Object> map = Maps.newHashMap();
375
+			map.put("list",list);
376
+			map.put("total",page.getTotal());
377
+			map.put("pageNum", page.getCurrent());
378
+			map.put("pageSize", page.getSize());
379
+			response.addSuccess(map);
380
+			return response;
381
+	}
304
 }
382
 }

+ 1
- 0
CODE/smart-community/property-api/src/main/resources/mapper/TransactionReplyMapper.xml View File

48
     <if test="createDate != null">
48
     <if test="createDate != null">
49
         and  date_format(re.create_date,'%Y%m%d')=date_format(#{createDate},'%Y%m%d')
49
         and  date_format(re.create_date,'%Y%m%d')=date_format(#{createDate},'%Y%m%d')
50
     </if>
50
     </if>
51
+    order by re.create_date desc
51
     </select>
52
     </select>
52
 </mapper>
53
 </mapper>

+ 24
- 0
CODE/smart-community/property-api/src/main/resources/mapper/TransactionReportMapper.xml View File

1
 <?xml version="1.0" encoding="UTF-8"?>
1
 <?xml version="1.0" encoding="UTF-8"?>
2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
 <mapper namespace="com.community.huiju.dao.TransactionReportMapper">
3
 <mapper namespace="com.community.huiju.dao.TransactionReportMapper">
4
+<select id="transactionReportList" resultType="com.community.huiju.model.TransactionReport">
5
+        SELECT
6
+        rr.reason as reason,
7
+        u.user_name as reportUserName,
8
+        sro.description as description,
9
+        u.login_name as reportPhone,
10
+        tr.create_date
11
+        FROM
12
+        tp_transaction_report tr
13
+        LEFT JOIN sys_report_reason rr ON	tr.report_reason_id = rr.id
14
+        LEFT JOIN ta_user u ON tr.reporter_id = u.id
15
+        LEFT JOIN ta_user_verify uv ON u.id = uv.user_id
16
+        LEFT JOIN ta_sys_role sro ON uv.role_id = sro.id
17
+        <where>
18
+            tr.transaction_id=#{transactionId}
19
+        <if test="reportPhone != null and reportPhone != ''">
20
+            AND u.login_name like concat('%',#{reportPhone},'%')
21
+        </if>
4
 
22
 
23
+        <if test="reportUserNmae != null and reportUserNmae != ''">
24
+            AND u.user_name like concat('%',#{reportUserNmae},'%')
25
+        </if>
26
+        </where>
27
+        order by tr.create_date desc
28
+</select>
5
 </mapper>
29
 </mapper>

+ 20
- 3
VUECODE/smart-property-manage/src/api/transaction.js View File

90
     url: '/transactionReplyList',
90
     url: '/transactionReplyList',
91
     method: 'post',
91
     method: 'post',
92
     data: {
92
     data: {
93
-      id: data.id,
93
+      id: data.transactionId,
94
       replyTaUserName: data.replyTaUserName,
94
       replyTaUserName: data.replyTaUserName,
95
       taUserName: data.taUserName,
95
       taUserName: data.taUserName,
96
       status: data.status,
96
       status: data.status,
114
 // 添加评论
114
 // 添加评论
115
 export function transactionReplyAdd(data) {
115
 export function transactionReplyAdd(data) {
116
   return request({
116
   return request({
117
-    url: '/TransactionReply/add',
117
+    url: '/transactionReply/add',
118
     method: 'post',
118
     method: 'post',
119
     data: {
119
     data: {
120
       id: data.id,
120
       id: data.id,
121
       contentImg: data.contentImg,
121
       contentImg: data.contentImg,
122
-      replyContent: data.replyContent
122
+      replyContent: data.replyContent,
123
+      transactionId: data.transactionId,
124
+      replyType: data.replyType
125
+    }
126
+  })
127
+}
128
+// 举报列表
129
+export function transactionReportList(data) {
130
+  return request({
131
+    url: '/transactionReportList',
132
+    method: 'post',
133
+    data: {
134
+      transactionId: data.transactionId,
135
+      reportPhone: data.reportPhone,
136
+      reportUserNmae: data.taUserName,
137
+      pageNum: data.pageNum,
138
+      pageSize: data.pageSize,
139
+      createDate: data.dataValue
123
     }
140
     }
124
   })
141
   })
125
 }
142
 }

+ 7
- 0
VUECODE/smart-property-manage/src/router/index.js View File

145
         hidden: true,
145
         hidden: true,
146
         meta: { title: '二手帖子回复列表', icon: 'table' }
146
         meta: { title: '二手帖子回复列表', icon: 'table' }
147
       },
147
       },
148
+      {
149
+        path: '/transaction/transactionReport',
150
+        component: () => import('@/views/social/transaction/transactionReport/report'),
151
+        name: 'transactionReport-index',
152
+        hidden: true,
153
+        meta: { title: '举报列表', icon: 'table' }
154
+      },
148
       {
155
       {
149
         path: '/activity/add',
156
         path: '/activity/add',
150
         component: () => import('@/views/social/activity/add/index'),
157
         component: () => import('@/views/social/activity/add/index'),

+ 10
- 1
VUECODE/smart-property-manage/src/store/modules/transaction.js View File

1
-import { fetchList, transactionById, updateTransactionById, transactionsList, transactionsAdd, transactionsEdit, transactionsDelete, transactionReplyList, deleteReply, transactionReplyAdd } from '@/api/transaction'
1
+import { fetchList, transactionById, updateTransactionById, transactionsList, transactionsAdd, transactionsEdit, transactionsDelete, transactionReplyList, deleteReply, transactionReplyAdd, transactionReportList } from '@/api/transaction'
2
 
2
 
3
 const transaction = {
3
 const transaction = {
4
   namespaced: true,
4
   namespaced: true,
110
           reject(error)
110
           reject(error)
111
         })
111
         })
112
       })
112
       })
113
+    },
114
+    TransactionReportList({ commit }, data) {
115
+      return new Promise((resolve, reject) => {
116
+        transactionReportList(data).then(response => {
117
+          resolve(response)
118
+        }).catch(error => {
119
+          reject(error)
120
+        })
121
+      })
113
     }
122
     }
114
   }
123
   }
115
 }
124
 }

+ 8
- 2
VUECODE/smart-property-manage/src/views/social/transaction/index.vue View File

55
       <el-table-column prop="replySum" label="回复数" align="center">
55
       <el-table-column prop="replySum" label="回复数" align="center">
56
         <template slot-scope="scope"><a><span style="color: #63B8FF" @click="clickReply(scope.row.id)">{{ scope.row.replySum }}</span></a></template>
56
         <template slot-scope="scope"><a><span style="color: #63B8FF" @click="clickReply(scope.row.id)">{{ scope.row.replySum }}</span></a></template>
57
       </el-table-column>
57
       </el-table-column>
58
-      <el-table-column prop="reportSum" label="举报数量" align="center"/>
58
+      <el-table-column prop="reportSum" label="举报数量" align="center">
59
+        <template slot-scope="scope"><a><span style="color: #63B8FF" @click="report(scope.row.id)">{{ scope.row.reportSum }}</span></a></template>
60
+      </el-table-column>
59
     </el-table>
61
     </el-table>
60
     <div class="block">
62
     <div class="block">
61
       <el-pagination
63
       <el-pagination
242
       console.log('id',id)
244
       console.log('id',id)
243
       this.$router.push({ name: 'transactionreply-index', query: { id: id }})
245
       this.$router.push({ name: 'transactionreply-index', query: { id: id }})
244
     },
246
     },
245
-    
246
     formatDate(val) {
247
     formatDate(val) {
247
       if (val === null) {
248
       if (val === null) {
248
         return ''
249
         return ''
252
       var month = value.getMonth() + 1
253
       var month = value.getMonth() + 1
253
       var day = value.getDate()
254
       var day = value.getDate()
254
       return year + '-' + month + '-' + day
255
       return year + '-' + month + '-' + day
256
+    },
257
+    // 举报数量
258
+    report(id){
259
+      console.log('id',id)
260
+      this.$router.push({ name: 'transactionReport-index', query: { id: id }})
255
     }
261
     }
256
   }
262
   }
257
 }
263
 }

+ 7
- 7
VUECODE/smart-property-manage/src/views/social/transaction/reply/transactionreply.vue View File

72
     </div>
72
     </div>
73
     <el-dialog title="回复发帖人" :visible.sync="listQuery.dialogFormVisible" :show-close="listQuery.close">
73
     <el-dialog title="回复发帖人" :visible.sync="listQuery.dialogFormVisible" :show-close="listQuery.close">
74
       <el-form :model="listQuery">
74
       <el-form :model="listQuery">
75
-        <el-form-item label="活动名称" :label-width="listQuery.formLabelWidth">
76
-          <textarea v-model="listQuery.textContent" placeholder="回复TA或向TA提问" class="textarea-inherit" id="message_textarea" rows="8"></textarea> 
75
+        <el-form-item  :label-width="listQuery.formLabelWidth">
76
+          <textarea v-model="listQuery.replyContent" placeholder="回复TA" class="textarea-inherit" rows="8"></textarea> 
77
         </el-form-item>
77
         </el-form-item>
78
         <el-form-item>
78
         <el-form-item>
79
         <el-upload
79
         <el-upload
134
     }
134
     }
135
   },
135
   },
136
   mounted() {
136
   mounted() {
137
-    this.listQuery.id = this.$route.query.id
137
+    this.listQuery.transactionId = this.$route.query.id
138
     // 获取数据
138
     // 获取数据
139
     this.dataQuery()
139
     this.dataQuery()
140
   },
140
   },
241
     TransactionReplyOff(){
241
     TransactionReplyOff(){
242
        this.listQuery.dialogFormVisible = false
242
        this.listQuery.dialogFormVisible = false
243
        this.contentImgList = []
243
        this.contentImgList = []
244
-       console.log('this.contentImgList',this.contentImgList)
245
        this.listQuery.contentImg = []
244
        this.listQuery.contentImg = []
246
-       console.log(' this.listQuery.contentImg', this.listQuery.contentImg)
247
        this.dataQuery()
245
        this.dataQuery()
248
     },
246
     },
249
     // 添加评论
247
     // 添加评论
250
     TransactionReplyAdd(){
248
     TransactionReplyAdd(){
251
        this.listQuery.dialogFormVisible = false
249
        this.listQuery.dialogFormVisible = false
252
-       console.log(this.listQuery.id,'this.listQuery.id')
253
-       
250
+       console.log(this.listQuery.id,'this.listQuery.id')    
254
         this.$store.dispatch('transaction/TransactionReplyAdd', this.listQuery).then((res) => {
251
         this.$store.dispatch('transaction/TransactionReplyAdd', this.listQuery).then((res) => {
255
         this.listLoading = false
252
         this.listLoading = false
253
+        this.contentImgList = []
254
+        this.listQuery.contentImg = []
255
+        this.listQuery.replyContent = ''
256
         this.dataQuery()
256
         this.dataQuery()
257
       }).catch(() => {
257
       }).catch(() => {
258
         this.listLoading = false
258
         this.listLoading = false

+ 89
- 49
VUECODE/smart-property-manage/src/views/social/transaction/transactionDetails.vue View File

18
         </div>
18
         </div>
19
       </el-form-item>
19
       </el-form-item>
20
       <el-form-item label="话题配图">
20
       <el-form-item label="话题配图">
21
-        <template v-for="site in ruleForm.contentImg">
21
+        <template v-for="site in ruleForm.img">
22
           <img :src="site" width="100" height="100" >
22
           <img :src="site" width="100" height="100" >
23
         </template>
23
         </template>
24
       </el-form-item>
24
       </el-form-item>
28
     </el-form>
28
     </el-form>
29
     <div class="bom-button">
29
     <div class="bom-button">
30
       <el-button v-if="isEdi" type="primary" style="width: 100px;" @click="edi">修改</el-button>
30
       <el-button v-if="isEdi" type="primary" style="width: 100px;" @click="edi">修改</el-button>
31
-      <el-button v-if="isEdi" type="primary" style="width: 100px;" @click="edi">回复帖子</el-button>
32
-      <el-button v-if="isEdi" type="primary" style="width: 150px;" @click="edi">查看全部N条回复</el-button>
31
+      <el-button v-if="isEdi" type="primary" style="width: 100px;" @click="replyAdd">回复帖子</el-button>
32
+      <el-button v-if="isEdi" type="primary" style="width: 150px;" @click="replyList">查看全部N条回复</el-button>
33
     </div>
33
     </div>
34
+    <el-dialog title="回复发帖人" :visible.sync="ruleForm.dialogFormVisible" :show-close="ruleForm.close">
35
+      <el-form :model="ruleForm">
36
+        <el-form-item  :label-width="ruleForm.formLabelWidth">
37
+          <textarea v-model="ruleForm.replyContent" placeholder="回复TA" class="textarea-inherit" rows="8"></textarea> 
38
+        </el-form-item>
39
+        <el-form-item>
40
+        <el-upload
41
+          :limit="8"
42
+          :on-preview="handlePictureCardPreview"
43
+          :on-remove="handleRemove"
44
+          :on-success="handleSuccessContentImg"
45
+          :file-list="contentImgList"
46
+          name="uploadFiles"
47
+          action="http://106.14.20.193:8086/property-api/uploadimage"
48
+          list-type="picture-card">
49
+          <i class="el-icon-plus"/>
50
+        </el-upload>
51
+        <el-dialog :visible.sync="dialogVisible">
52
+          <img :src="dialogImageUrl" width="100%" alt="">
53
+        </el-dialog>
54
+      </el-form-item>
55
+      </el-form>
56
+      <div slot="footer" class="dialog-footer">
57
+        <el-button @click="TransactionReplyOff">取 消</el-button>
58
+        <el-button type="primary" @click="TransactionReplyAdd()">确 定</el-button>
59
+      </div>
60
+    </el-dialog>
34
   </div>
61
   </div>
35
 </template>
62
 </template>
36
 
63
 
54
 				updateUser:'',
81
 				updateUser:'',
55
 				userName:'',
82
 				userName:'',
56
         viewCount:'',
83
         viewCount:'',
57
-        announcementCarouselImg: '', // 轮播图
58
-        announcementContent: '', // 内容详细
59
         contentImg: [], // 内容配图
84
         contentImg: [], // 内容配图
60
-        signUpCount: '', // 报名人数统计
61
-        registrationEndTime: '', // 报名活动结束时间
85
+        img: [], // 详情图
62
         sort: 1, // 权重
86
         sort: 1, // 权重
63
-        status: '' // 状态 0 是已作废 1 是已发布   2 是草稿 3 是已修改
87
+        dialogFormVisible: false,
88
+        close: false,
89
+        replyType: 1 
64
       },
90
       },
91
+      dialogVisible: false,
92
+      dialogImageUrl: '',
93
+      contentImgList: [],
65
       isEdi: true // 默认显示修改按钮
94
       isEdi: true // 默认显示修改按钮
66
     }
95
     }
67
   },
96
   },
81
 
110
 
82
          // 多张图片进行遍历
111
          // 多张图片进行遍历
83
         for (let i = 0; i < res.data.list.length; i++) {
112
         for (let i = 0; i < res.data.list.length; i++) {
84
-          this.ruleForm.contentImg.push(res.data.list[i])
113
+          this.ruleForm.img.push(res.data.list[i])
85
         }
114
         }
86
       
115
       
87
       })
116
       })
88
     },
117
     },
118
+    handlePictureCardPreview(file) { //配图文件列表中已上传的文件时的钩子
119
+      this.dialogImageUrl = file.url
120
+      this.dialogVisible = true
121
+    },
122
+    handleRemove(file, fileList) { //配图移除时
123
+      this.ruleForm.contentImg = []
124
+      for (let i = 0; i < fileList.length; i++) {
125
+        this.ruleForm.contentImg.push(fileList[i].response.data[0])
126
+      }
127
+      console.log(file, fileList)
128
+    },
129
+    handleSuccessContentImg(response, file, fileList) { // 配图上传成功时回调
130
+      const resImg = response.data[0]
131
+      this.ruleForm.contentImg.push(resImg)
132
+    },
89
     formatDate(val) {
133
     formatDate(val) {
90
       var value = new Date(val)
134
       var value = new Date(val)
91
       var year = value.getFullYear()
135
       var year = value.getFullYear()
97
       // return year + '-' + month + '-' + day + ' ' + hour + ':' + minutes + ':' + seconds
141
       // return year + '-' + month + '-' + day + ' ' + hour + ':' + minutes + ':' + seconds
98
       return year + '-' + month + '-' + day
142
       return year + '-' + month + '-' + day
99
     },
143
     },
100
-    edi() { // 修改活动
144
+    edi() { 
101
       this.$router.push({ name: 'transaction-edit', query: { id: this.ruleForm.id }})
145
       this.$router.push({ name: 'transaction-edit', query: { id: this.ruleForm.id }})
102
-    }
146
+    },
147
+    // 查看此帖子的所有回复
148
+    replyList(){
149
+      this.$router.push({ name: 'transactionreply-index', query: { id: this.ruleForm.id }})
150
+    },
151
+    // 弹出层
152
+    replyAdd(){
153
+    this.ruleForm.dialogFormVisible = true
154
+    },
155
+    // 取消层显示
156
+    TransactionReplyOff(){
157
+       this.ruleForm.dialogFormVisible = false
158
+       this.contentImgList = []
159
+       this.ruleForm.contentImg = []
160
+    },
161
+    // 回复帖子
162
+    TransactionReplyAdd(){
163
+       this.ruleForm.dialogFormVisible = false
164
+       console.log(this.ruleForm.id,'this.ruleForm.id')    
165
+        this.$store.dispatch('transaction/TransactionReplyAdd', this.ruleForm).then((res) => {
166
+        this.listLoading = false
167
+        // this.contentImgList = []
168
+        // this.ruleForm.contentImg = []
169
+        // this.ruleForm.replyContent = ''
170
+         this.$router.push({ name: 'transactionreply-index', query: { id:  this.ruleForm.id }})
171
+      }).catch(() => {
172
+        this.listLoading = false
173
+        console.log('error TransactionReplyAdd')
174
+      })
175
+    } 
103
   }
176
   }
104
 }
177
 }
105
 </script>
178
 </script>
124
   font-size: 20px;
197
   font-size: 20px;
125
   justify-items: center;
198
   justify-items: center;
126
 }
199
 }
127
-/* .progress {
128
-  display: flex;
129
-  justify-content: space-between;
130
-  margin-top: 20px;
131
-  margin-bottom: 20px;
132
-} */
133
-/* .text-progress {
134
-  width: 500px;
135
-  float: left;
136
-  align-content: center;
137
-  position: absolute;
138
-  margin-top: 12px;
139
-} */
140
-/* .people-number {
141
-  position: relative;
142
-  margin-left: 180px;
143
-} */
144
-/* .outer-layer {
145
-  background-color: gainsboro;
146
-  height: 3px;
147
-  width: 450px;
148
-  margin-top: -10px;
149
-  position: relative;
150
-} */
151
 .inner-layer {
200
 .inner-layer {
152
   background-color: aquamarine;
201
   background-color: aquamarine;
153
   height: 6px;
202
   height: 6px;
155
   position: relative;
204
   position: relative;
156
   margin-top: -4px;
205
   margin-top: -4px;
157
 }
206
 }
158
-/* .circular {
159
-  border: 1px #001528 solid;
160
-  border-radius: 10px;
161
-  /*background-color: chartreuse;*/
162
- /* width: 20px;
163
-  height: 20px;
164
-  position: relative;
165
-  margin-left: 452px;
166
-  margin-top: 11px;
167
-  float: left;
168
-} */
169
-/* .people-limit {
170
-  margin-top: 13px;
171
-} */
172
 .bom-button{
207
 .bom-button{
173
   display: flex;
208
   display: flex;
174
   justify-content: center;
209
   justify-content: center;
176
   margin-bottom: 100px;
211
   margin-bottom: 100px;
177
   margin-left:-25%
212
   margin-left:-25%
178
 }
213
 }
214
+.textarea-inherit {
215
+        width: 100%;
216
+        overflow: auto;
217
+        word-break: break-all; 
218
+    }
179
 </style>
219
 </style>

+ 165
- 0
VUECODE/smart-property-manage/src/views/social/transaction/transactionReport/report.vue View File

1
+<template>
2
+  <div class="root">
3
+    <el-form :inline="true" :model="listQuery" class="form-listQuery">
4
+      <el-form-item class="filter-item" label="举报人姓名" >
5
+        <el-input v-model.trim="listQuery.taUserName" placeholder="举报人姓名" />
6
+      </el-form-item>
7
+      <el-form-item class="filter-item" label="举报人手机号" >
8
+        <el-input v-model.trim="listQuery.reportPhone" placeholder="举报人手机号" />
9
+      </el-form-item>
10
+      <el-form-item>
11
+        <el-button type="info" class="filter-item" @click="handleFilter">清空</el-button>
12
+        <el-button type="primary" @click="search">查询</el-button>
13
+      </el-form-item>
14
+    </el-form>
15
+    <el-table
16
+      v-loading="listLoading"
17
+      ref="multipleTable"
18
+      :data="transactionsList"
19
+      border
20
+      tooltip-effect="dark"
21
+      style="width: 100%; margin-top: 20px;"
22
+      @selection-change="handleSelectionChange">
23
+      <el-table-column prop="reason" label="举报原因" align="center"/>
24
+      <el-table-column prop="reportUserName" label="举报人姓名" align="center"/>
25
+      <el-table-column prop="description" label="举报人身份" align="center"/>
26
+      <el-table-column prop="reportPhone" label="举报人手机号" align="center"/>
27
+      <el-table-column prop="createDate" label="举报时间" align="center"><template slot-scope="scope">{{ formatDate(scope.row.createDate) }}</template></el-table-column>
28
+    </el-table>
29
+    <div class="block">
30
+      <el-pagination
31
+        :current-page.sync="listQuery.pageNum"
32
+        :page-sizes="[10, 20, 50, 100]"
33
+        :page-size.sync="listQuery.pageSize"
34
+        :total="total"
35
+        layout="total, sizes, prev, pager, next, jumper"
36
+        @size-change="handleSizeChange"
37
+        @current-change="handleCurrentChange"/>
38
+    </div>
39
+  </div>
40
+</template>
41
+
42
+<script>
43
+import { mapActions } from 'vuex'
44
+
45
+export default {
46
+  data() {
47
+    return {
48
+      listQuery: {
49
+        createDate: '',
50
+        description: '',
51
+        reason: '',
52
+        reportPhone: '',
53
+        reportReasonId: '',
54
+        reportUserName: '',
55
+        reporterId: '',
56
+        transactionId: '',
57
+        replyTaUserName:'', 
58
+        pageNum: '1',
59
+        pageSize: 10,
60
+      },
61
+      transactionsList:[],
62
+      total: 0, // 数据总数
63
+      deleteIds: [], // 选择的id集合
64
+      listLoading: true // 加载圈
65
+    }
66
+  },
67
+  mounted() {
68
+    this.listQuery.transactionId = this.$route.query.id
69
+    // 获取数据
70
+    this.dataQuery()
71
+  },
72
+  methods: {
73
+    ...mapActions('listAnnouncement', [
74
+      'BserPassCertification'
75
+    ]),
76
+    handleSizeChange(val) {
77
+      console.log(`每页 ${val} 条`)
78
+      this.listQuery.pageSize = val
79
+      this.dataQuery()
80
+    },
81
+    handleCurrentChange(val) {
82
+      console.log(`当前页: ${val}`)
83
+      this.listQuery.pageNum = val
84
+      this.dataQuery()
85
+    },
86
+    padDate(value) {
87
+      value = value < 10 ? '0' + value : value
88
+      return value
89
+    },
90
+    dataQuery() { // 查询数据
91
+      this.listLoading = true
92
+      this.$store.dispatch('transaction/TransactionReportList', this.listQuery).then((res) => {
93
+        const resData = res.data
94
+        this.transactionsList = resData.list
95
+        this.listQuery.pageNum = resData.pageNum
96
+        this.listQuery.pageSize = resData.pageSize
97
+        this.total = resData.total
98
+        this.listLoading = false
99
+      }).catch(() => {
100
+        this.listLoading = false
101
+        console.log('error TransactionsList')
102
+      })
103
+    },
104
+    handleSelectionChange(data) {
105
+      // 设置为 空
106
+      this.deleteIds = []
107
+      for (let i = 0; i < data.length; i++) {
108
+        this.deleteIds.push(data[i].id)
109
+      }
110
+    },
111
+	  search() {
112
+      this.listQuery.pageNum = 1
113
+      this.dataQuery()
114
+    },
115
+    handleFilter() {
116
+      this.listQuery.pageNum = 1
117
+      this.listQuery.pageSize = 10
118
+      this.listQuery.taUserName = ''
119
+       this.listQuery.reportPhone = ''
120
+      this.dataQuery()
121
+    },
122
+    formatDate(val) {
123
+      if (val === null) {
124
+        return ''
125
+      }
126
+      var value = new Date(val)
127
+      var year = value.getFullYear()
128
+      var month = value.getMonth() + 1
129
+      var day = value.getDate()
130
+      return year + '-' + month + '-' + day
131
+    }
132
+  }
133
+}
134
+</script>
135
+
136
+<style scoped>
137
+.root{
138
+  display: flex;
139
+  flex-flow: column;
140
+}
141
+.form-listQuery{
142
+  margin-top: 20px;
143
+  margin-left: 30px;
144
+}
145
+.operation{
146
+  display: flex;
147
+  justify-content: space-between;
148
+  margin-left: 20px;
149
+  margin-right: 20px;
150
+}
151
+.block{
152
+  display: flex;
153
+  justify-content: flex-end;
154
+  margin-top: 10px;
155
+}
156
+.button {
157
+  margin-left: 20px;
158
+}
159
+.textarea-inherit {
160
+        width: 100%;
161
+        overflow: auto;
162
+        word-break: break-all; 
163
+    }
164
+</style>
165
+