|
@@ -73,6 +73,7 @@ export default {
|
|
|
return arrToObj(this.$dictData.question_tag)[v]
|
|
|
})
|
|
|
item.qtName = qtName.join(',')
|
|
|
+ if (Number(item.hide_status) !== 2) item.isHide = true
|
|
|
})
|
|
|
return arr
|
|
|
}
|
|
@@ -82,13 +83,15 @@ export default {
|
|
|
this.listConfig = {
|
|
|
rows: [
|
|
|
{ label: '问题内容', prop: 'question_cont', fullShow: true, minWidth: 200, align: 'left' },
|
|
|
- { label: '标签', prop: 'qtName' },
|
|
|
+ // { label: '标签', prop: 'qtName' },
|
|
|
+ { label: '状态', prop: 'hide_status', type: 'tag', tags: arrToObj(this.$dictData.hide_status), tagTypeObj: {'1': 'success', '2': 'danger'} },
|
|
|
{ label: '浏览量', prop: 'views' },
|
|
|
{ label: '昵称', prop: 'nickname' },
|
|
|
{ label: '头像', prop: 'avatar', type: 'img' },
|
|
|
{ label: '提问时间', prop: 'create_at' },
|
|
|
- { label: '操作', width: 240, type: 'handle2', operations:
|
|
|
+ { label: '操作', width: 300, type: 'handle2', operations:
|
|
|
[
|
|
|
+ { label: '显示', func: this.showHandle, btnType: 'success', hide: 'isHide' },
|
|
|
{ label: '我来回答', func: this.openAPopup, btnType: 'primary' },
|
|
|
{ label: '查看回答', func: this.openPopup, btnType: 'success' },
|
|
|
{ label: '删除', func: this.delHandle, btnType: 'danger' },
|
|
@@ -98,6 +101,14 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ showHandle (row) {
|
|
|
+ this.$api.user.admquestionshow({
|
|
|
+ question_id: row.id
|
|
|
+ }).then(data => {
|
|
|
+ this.$msgs(`已显示!`)
|
|
|
+ this.fetchData()
|
|
|
+ })
|
|
|
+ },
|
|
|
openQPopup () {
|
|
|
this.isQShow = true
|
|
|
},
|