This commit is contained in:
77
2024-08-03 19:23:54 +08:00
parent 1b861661d8
commit 19ac756733

View File

@@ -91,6 +91,16 @@
</el-table-column> </el-table-column>
<el-table-column label="年龄" align="center" prop="age" /> <el-table-column label="年龄" align="center" prop="age" />
<el-table-column label="所在城市" align="center" prop="city" /> <el-table-column label="所在城市" align="center" prop="city" />
<el-table-column label="允许群发" align="center" prop="enableGreet" >
<template v-slot="scope">
<el-switch
v-model="scope.row.enableGreet"
:active-value="1"
:inactive-value="0"
@change="handleEnableGreetChange(scope.row)"
></el-switch>
</template>
</el-table-column>
<el-table-column label="开启视频" align="center" prop="openVideoStatus" > <el-table-column label="开启视频" align="center" prop="openVideoStatus" >
<template v-slot="scope"> <template v-slot="scope">
<el-switch <el-switch
@@ -288,6 +298,20 @@ export default {
this.$refs.anchorInfoDialog.init(row.userId) this.$refs.anchorInfoDialog.init(row.userId)
}) })
}, },
handleEnableGreetChange(row){
let text = row.enableGreet === 0 ? '不允许' : '允许'
this.$confirm('确认要' + text + '[' + row.nickname + ']使用群发吗?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
return updateAnchor({ id: row.id, enableGreet: row.enableGreet })
}).then(() => {
this.$modal.msgSuccess(text + '成功')
}).catch(function() {
row.enableGreet = row.enableGreet === 1 ? 0 : 1
})
},
handleOpenVideoStatusChange(row){ handleOpenVideoStatusChange(row){
let text = row.openVideoStatus === 0 ? '封禁' : '恢复' let text = row.openVideoStatus === 0 ? '封禁' : '恢复'
this.$confirm('确认要' + text + '[' + row.nickname + ']开启视频吗?', '警告', { this.$confirm('确认要' + text + '[' + row.nickname + ']开启视频吗?', '警告', {