|
@@ -62,17 +62,43 @@ export default {
|
|
|
{ label: '昵称', prop: 'nickname' },
|
|
|
{ label: '手机号', prop: 'phones' },
|
|
|
{ label: '注册时间', prop: 'create_at' },
|
|
|
- { label: '排序', prop: 'tag', type: 'input', width: 200},
|
|
|
- { label: '操作', width: 100, type: 'handle2', operations:
|
|
|
+ { label: '禁言状态', prop: 'is_gag', type: 'tag', tags: arrToObj(this.$dictData.sys_yesno), tagTypeObj: {'2': 'success', '1': 'danger'} },
|
|
|
+ { label: '备注', prop: 'tag', type: 'input', width: 100},
|
|
|
+ { label: '操作', width: 160, type: 'handle2', operations:
|
|
|
[
|
|
|
{ label: '保存标签', func: this.saveHandle, btnType: 'primary' },
|
|
|
+ { labelFor: 'is_gag', func: this.disHandle,
|
|
|
+ labelConfig: {
|
|
|
+ texts: {
|
|
|
+ 1: '解禁',
|
|
|
+ 2: '禁言'
|
|
|
+ },
|
|
|
+ btnTypes: {
|
|
|
+ 1: 'success',
|
|
|
+ 2: 'danger'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
]
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- saveHandle(row) {
|
|
|
+ disHandle (row) {
|
|
|
+ const is_gag = Number(row.is_gag) === 1 ? 2 : 1
|
|
|
+ const msgText = Number(row.is_gag) === 1 ? '解禁' : '禁言'
|
|
|
+ this.$msg(`确定要${msgText}${row.nickname}吗?`, 'confirm', ()=> {
|
|
|
+ this.$api.user.admwechatusergag({
|
|
|
+ id: row.id,
|
|
|
+ is_gag
|
|
|
+ }).then(data => {
|
|
|
+ this.$msgs(`${msgText}成功!`)
|
|
|
+ this.fetchData()
|
|
|
+ })
|
|
|
+ }, null, true)
|
|
|
+ },
|
|
|
+ saveHandle (row) {
|
|
|
this.$msg(`您确定要保存标签吗?`, 'confirm', () => {
|
|
|
this.$api.user.admwechatuseredit({
|
|
|
id: row.id,
|