|
@@ -34,7 +34,7 @@
|
34
|
34
|
</el-form-item>
|
35
|
35
|
</el-form>
|
36
|
36
|
<div class="button">
|
37
|
|
- <el-button type="danger" >作废</el-button>
|
|
37
|
+ <el-button type="danger" @click="deleteReply">作废</el-button>
|
38
|
38
|
</div>
|
39
|
39
|
<el-table
|
40
|
40
|
v-loading="listLoading"
|
|
@@ -57,7 +57,7 @@
|
57
|
57
|
<el-table-column prop="replyTaUserName" label="被回复人" align="center"/>
|
58
|
58
|
<el-table-column prop="createDate" label="时间" align="center"><template slot-scope="scope">{{ formatDate(scope.row.createDate) }}</template></el-table-column>
|
59
|
59
|
<el-table-column prop="viewCount" label="操作" align="center">
|
60
|
|
- <template slot-scope="scope"><a><span style="color: #63B8FF" @click="TransactionReplyAdd(scope.row.id)">{{ '回复此回复' }}</span></a></template>
|
|
60
|
+ <template slot-scope="scope"><a><span style="color: #63B8FF" @click="TransactionReplyOpen(scope.row.id)">{{ '回复此回复' }}</span></a></template>
|
61
|
61
|
</el-table-column>
|
62
|
62
|
</el-table>
|
63
|
63
|
<div class="block">
|
|
@@ -70,6 +70,33 @@
|
70
|
70
|
@size-change="handleSizeChange"
|
71
|
71
|
@current-change="handleCurrentChange"/>
|
72
|
72
|
</div>
|
|
73
|
+ <el-dialog title="回复发帖人" :visible.sync="listQuery.dialogFormVisible" :show-close="listQuery.close">
|
|
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>
|
|
77
|
+ </el-form-item>
|
|
78
|
+ <el-form-item>
|
|
79
|
+ <el-upload
|
|
80
|
+ :limit="8"
|
|
81
|
+ :on-preview="handlePictureCardPreview"
|
|
82
|
+ :on-remove="handleRemove"
|
|
83
|
+ :on-success="handleSuccessContentImg"
|
|
84
|
+ :file-list="contentImgList"
|
|
85
|
+ name="uploadFiles"
|
|
86
|
+ action="http://106.14.20.193:8086/property-api/uploadimage"
|
|
87
|
+ list-type="picture-card">
|
|
88
|
+ <i class="el-icon-plus"/>
|
|
89
|
+ </el-upload>
|
|
90
|
+ <el-dialog :visible.sync="dialogVisible">
|
|
91
|
+ <img :src="dialogImageUrl" width="100%" alt="">
|
|
92
|
+ </el-dialog>
|
|
93
|
+ </el-form-item>
|
|
94
|
+ </el-form>
|
|
95
|
+ <div slot="footer" class="dialog-footer">
|
|
96
|
+ <el-button @click="TransactionReplyOff">取 消</el-button>
|
|
97
|
+ <el-button type="primary" @click="TransactionReplyAdd()">确 定</el-button>
|
|
98
|
+ </div>
|
|
99
|
+ </el-dialog>
|
73
|
100
|
</div>
|
74
|
101
|
</template>
|
75
|
102
|
|
|
@@ -90,8 +117,16 @@ export default {
|
90
|
117
|
taUserName: '',
|
91
|
118
|
transactionId: '',
|
92
|
119
|
pageNum: '1',
|
93
|
|
- pageSize: 10
|
|
120
|
+ pageSize: 10,
|
|
121
|
+ dataValue: '',
|
|
122
|
+ dialogFormVisible: false,
|
|
123
|
+ formLabelWidth: '120px',
|
|
124
|
+ contentImg: [],
|
|
125
|
+ close: false
|
94
|
126
|
},
|
|
127
|
+ contentImgList: [],
|
|
128
|
+ dialogVisible: false,
|
|
129
|
+ dialogImageUrl: '',
|
95
|
130
|
total: 0, // 数据总数
|
96
|
131
|
transactionsList: [],
|
97
|
132
|
deleteIds: [], // 选择的id集合
|
|
@@ -121,28 +156,20 @@ export default {
|
121
|
156
|
value = value < 10 ? '0' + value : value
|
122
|
157
|
return value
|
123
|
158
|
},
|
124
|
|
- getStatus(row) { // 获取状态
|
125
|
|
- // let statusName = ''
|
126
|
|
-
|
127
|
|
- // // 判断状态
|
128
|
|
- // // switch (row.status) {
|
129
|
|
- // // case '0':
|
130
|
|
- // // statusName = '已作废'
|
131
|
|
- // // break
|
132
|
|
- // // case '1':
|
133
|
|
- // // statusName = '已发布'
|
134
|
|
- // // break
|
135
|
|
- // // case '2':
|
136
|
|
- // // statusName = '草稿'
|
137
|
|
- // // break
|
138
|
|
- // // }
|
139
|
|
-
|
140
|
|
- // // 如果修改时间和创建时间不一致, 就显示已修改
|
141
|
|
- // if (row.status === '1' && (row.updateDate > row.createDate)) {
|
142
|
|
- // statusName = '已修改'
|
143
|
|
- // }
|
144
|
|
-
|
145
|
|
- // return statusName
|
|
159
|
+ handlePictureCardPreview(file) { //配图文件列表中已上传的文件时的钩子
|
|
160
|
+ this.dialogImageUrl = file.url
|
|
161
|
+ this.dialogVisible = true
|
|
162
|
+ },
|
|
163
|
+ handleRemove(file, fileList) { //配图移除时
|
|
164
|
+ this.listQuery.contentImg = []
|
|
165
|
+ for (let i = 0; i < fileList.length; i++) {
|
|
166
|
+ this.listQuery.contentImg.push(fileList[i].response.data[0])
|
|
167
|
+ }
|
|
168
|
+ console.log(file, fileList)
|
|
169
|
+ },
|
|
170
|
+ handleSuccessContentImg(response, file, fileList) { // 配图上传成功时回调
|
|
171
|
+ const resImg = response.data[0]
|
|
172
|
+ this.listQuery.contentImg.push(resImg)
|
146
|
173
|
},
|
147
|
174
|
dataQuery() { // 查询数据
|
148
|
175
|
this.listLoading = true
|
|
@@ -173,16 +200,20 @@ export default {
|
173
|
200
|
this.listQuery.pageNum = 1
|
174
|
201
|
this.listQuery.pageSize = 10
|
175
|
202
|
this.listQuery.ownerName =''
|
176
|
|
- this.listQuery.id=''
|
177
|
203
|
this.listQuery.status=''
|
178
|
|
- this.listQuery.userName=''
|
|
204
|
+ this.listQuery.taUserName=''
|
|
205
|
+ this.listQuery.dataValue=''
|
|
206
|
+ this.listQuery.dataValue=''
|
|
207
|
+ this.listQuery.replyTaUserName=''
|
179
|
208
|
this.dataQuery()
|
180
|
209
|
},
|
181
|
|
- deleteId(){
|
|
210
|
+ deleteReply(){
|
182
|
211
|
const ids = this.deleteIds
|
183
|
212
|
this.listLoading = true
|
184
|
|
- console.log(ids)
|
185
|
|
- this.$store.dispatch('transaction/TransactionsDelete', ids).then((res) => {
|
|
213
|
+ if(ids<1){
|
|
214
|
+ this.$message.error('请选择一条数据')
|
|
215
|
+ }
|
|
216
|
+ this.$store.dispatch('transaction/DeleteReply', ids).then((res) => {
|
186
|
217
|
this.listLoading = false
|
187
|
218
|
this.dataQuery()
|
188
|
219
|
}).catch(() => {
|
|
@@ -191,8 +222,6 @@ export default {
|
191
|
222
|
})
|
192
|
223
|
},
|
193
|
224
|
|
194
|
|
-
|
195
|
|
-
|
196
|
225
|
formatDate(val) {
|
197
|
226
|
if (val === null) {
|
198
|
227
|
return ''
|
|
@@ -202,7 +231,34 @@ export default {
|
202
|
231
|
var month = value.getMonth() + 1
|
203
|
232
|
var day = value.getDate()
|
204
|
233
|
return year + '-' + month + '-' + day
|
205
|
|
- }
|
|
234
|
+ },
|
|
235
|
+ // 弹出层
|
|
236
|
+ TransactionReplyOpen(id){
|
|
237
|
+ this.listQuery.dialogFormVisible = true
|
|
238
|
+ this.listQuery.id = id
|
|
239
|
+ },
|
|
240
|
+ // 取消
|
|
241
|
+ TransactionReplyOff(){
|
|
242
|
+ this.listQuery.dialogFormVisible = false
|
|
243
|
+ this.contentImgList = []
|
|
244
|
+ console.log('this.contentImgList',this.contentImgList)
|
|
245
|
+ this.listQuery.contentImg = []
|
|
246
|
+ console.log(' this.listQuery.contentImg', this.listQuery.contentImg)
|
|
247
|
+ this.dataQuery()
|
|
248
|
+ },
|
|
249
|
+ // 添加评论
|
|
250
|
+ TransactionReplyAdd(){
|
|
251
|
+ this.listQuery.dialogFormVisible = false
|
|
252
|
+ console.log(this.listQuery.id,'this.listQuery.id')
|
|
253
|
+
|
|
254
|
+ this.$store.dispatch('transaction/TransactionReplyAdd', this.listQuery).then((res) => {
|
|
255
|
+ this.listLoading = false
|
|
256
|
+ this.dataQuery()
|
|
257
|
+ }).catch(() => {
|
|
258
|
+ this.listLoading = false
|
|
259
|
+ console.log('error TransactionReplyAdd')
|
|
260
|
+ })
|
|
261
|
+ }
|
206
|
262
|
}
|
207
|
263
|
}
|
208
|
264
|
</script>
|
|
@@ -230,5 +286,10 @@ export default {
|
230
|
286
|
.button {
|
231
|
287
|
margin-left: 20px;
|
232
|
288
|
}
|
|
289
|
+.textarea-inherit {
|
|
290
|
+ width: 100%;
|
|
291
|
+ overflow: auto;
|
|
292
|
+ word-break: break-all;
|
|
293
|
+ }
|
233
|
294
|
</style>
|
234
|
295
|
|