|
@@ -349,6 +349,11 @@
|
|
|
<el-dropdown-item @click.native="handleAudit(scope.row)">
|
|
<el-dropdown-item @click.native="handleAudit(scope.row)">
|
|
|
<i class="el-icon-service"></i> 审核
|
|
<i class="el-icon-service"></i> 审核
|
|
|
</el-dropdown-item>
|
|
</el-dropdown-item>
|
|
|
|
|
+ <el-dropdown-item
|
|
|
|
|
+ v-if="scope.row.status != 2"
|
|
|
|
|
+ @click.native="handleRoomPassword(scope.row)">
|
|
|
|
|
+ <i class="el-icon-service"></i> 房间密码
|
|
|
|
|
+ </el-dropdown-item>
|
|
|
<!-- <el-dropdown-item -->
|
|
<!-- <el-dropdown-item -->
|
|
|
<!-- @click.native="handleExportComments(scope.row)"-->
|
|
<!-- @click.native="handleExportComments(scope.row)"-->
|
|
|
<!-- :disabled="exportingComments[scope.row.liveId]"-->
|
|
<!-- :disabled="exportingComments[scope.row.liveId]"-->
|
|
@@ -671,6 +676,38 @@
|
|
|
<el-button @click="addTagCancel">取 消</el-button>
|
|
<el-button @click="addTagCancel">取 消</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 设置房间密码对话框 -->
|
|
|
|
|
+ <el-dialog
|
|
|
|
|
+ title="设置房间密码"
|
|
|
|
|
+ :visible.sync="roomPasswordDialog.open"
|
|
|
|
|
+ width="500px"
|
|
|
|
|
+ append-to-body
|
|
|
|
|
+ class="simple-dialog"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-form ref="roomPasswordForm" :model="roomPasswordForm" :rules="roomPasswordRules" label-width="100px">
|
|
|
|
|
+ <el-form-item label="直播ID">
|
|
|
|
|
+ <el-input v-model="roomPasswordForm.liveId" disabled />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="直播名称">
|
|
|
|
|
+ <el-input v-model="roomPasswordForm.liveName" disabled />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="房间密码" prop="roomPassword">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="roomPasswordForm.roomPassword"
|
|
|
|
|
+ placeholder="请输入房间密码(留空表示无密码)"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ maxlength="20"
|
|
|
|
|
+ show-word-limit
|
|
|
|
|
+ />
|
|
|
|
|
+ <div class="form-tip">提示:设置密码后,用户进入直播间需要输入密码</div>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
|
+ <el-button type="primary" @click="submitRoomPassword">确 定</el-button>
|
|
|
|
|
+ <el-button @click="roomPasswordDialog.open = false">取 消</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -822,6 +859,22 @@ export default {
|
|
|
},
|
|
},
|
|
|
// 导出评论状态:key为liveId,value为是否正在导出
|
|
// 导出评论状态:key为liveId,value为是否正在导出
|
|
|
exportingComments: {},
|
|
exportingComments: {},
|
|
|
|
|
+ // 房间密码弹窗
|
|
|
|
|
+ roomPasswordDialog: {
|
|
|
|
|
+ open: false
|
|
|
|
|
+ },
|
|
|
|
|
+ // 房间密码表单
|
|
|
|
|
+ roomPasswordForm: {
|
|
|
|
|
+ liveId: null,
|
|
|
|
|
+ liveName: null,
|
|
|
|
|
+ roomPassword: null
|
|
|
|
|
+ },
|
|
|
|
|
+ // 房间密码表单校验
|
|
|
|
|
+ roomPasswordRules: {
|
|
|
|
|
+ roomPassword: [
|
|
|
|
|
+ { max: 20, message: '密码长度不能超过20个字符', trigger: 'blur' }
|
|
|
|
|
+ ]
|
|
|
|
|
+ }
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
@@ -1252,6 +1305,37 @@ export default {
|
|
|
handleImgError(e) {
|
|
handleImgError(e) {
|
|
|
e.target.src = this.defaultImg;
|
|
e.target.src = this.defaultImg;
|
|
|
},
|
|
},
|
|
|
|
|
+ // 设置房间密码
|
|
|
|
|
+ handleRoomPassword(row){
|
|
|
|
|
+ this.roomPasswordForm.liveId = row.liveId
|
|
|
|
|
+ this.roomPasswordForm.liveName = row.liveName
|
|
|
|
|
+ this.roomPasswordForm.roomPassword = row.roomPassword || ''
|
|
|
|
|
+ this.roomPasswordDialog.open = true
|
|
|
|
|
+ },
|
|
|
|
|
+ // 提交房间密码
|
|
|
|
|
+ submitRoomPassword() {
|
|
|
|
|
+ this.$refs['roomPasswordForm'].validate(valid => {
|
|
|
|
|
+ if (valid) {
|
|
|
|
|
+ const params = {
|
|
|
|
|
+ liveId: this.roomPasswordForm.liveId,
|
|
|
|
|
+ roomPassword: this.roomPasswordForm.roomPassword || ''
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ updateLive(params).then(response => {
|
|
|
|
|
+ if (response.code === 200) {
|
|
|
|
|
+ this.$message.success('房间密码设置成功')
|
|
|
|
|
+ this.roomPasswordDialog.open = false
|
|
|
|
|
+ this.getList()
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message.error(response.msg || '设置失败')
|
|
|
|
|
+ }
|
|
|
|
|
+ }).catch(error => {
|
|
|
|
|
+ console.error('设置房间密码失败:', error)
|
|
|
|
|
+ this.$message.error('设置失败,请稍后重试')
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
handleAudit(row) {
|
|
handleAudit(row) {
|
|
|
this.$alert("是否审核通过?", "审核", {
|
|
this.$alert("是否审核通过?", "审核", {
|
|
|
confirmButtonText: "同意",
|
|
confirmButtonText: "同意",
|