|
|
@@ -11,28 +11,7 @@
|
|
|
v-hasPermi="['live:live:add']"
|
|
|
>新增</el-button>
|
|
|
</el-col>
|
|
|
-<!-- <el-col :span="1.5">-->
|
|
|
-<!-- <el-button-->
|
|
|
-<!-- type="success"-->
|
|
|
-<!-- plain-->
|
|
|
-<!-- icon="el-icon-edit"-->
|
|
|
-<!-- size="mini"-->
|
|
|
-<!-- :disabled="single"-->
|
|
|
-<!-- @click="handleUpdate"-->
|
|
|
-<!-- v-hasPermi="['live:live:edit']"-->
|
|
|
-<!-- >修改</el-button>-->
|
|
|
-<!-- </el-col>-->
|
|
|
-<!-- <el-col :span="1.5">-->
|
|
|
-<!-- <el-button-->
|
|
|
-<!-- type="warning"-->
|
|
|
-<!-- plain-->
|
|
|
-<!-- icon="el-icon-download"-->
|
|
|
-<!-- size="mini"-->
|
|
|
-<!-- :loading="exportLoading"-->
|
|
|
-<!-- @click="handleExport"-->
|
|
|
-<!-- v-hasPermi="['live:live:export']"-->
|
|
|
-<!-- >导出</el-button>-->
|
|
|
-<!-- </el-col>-->
|
|
|
+
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
@@ -196,12 +175,22 @@
|
|
|
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
+ v-if="scope.row.companyName != '总台'"
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-edit"
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
v-hasPermi="['live:live:edit']"
|
|
|
>修改</el-button>
|
|
|
+ <el-button
|
|
|
+ v-if="scope.row.companyName == '总台'"
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ style="color: #00CC66"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ @click="handleView(scope.row)"
|
|
|
+ v-hasPermi="['live:live:edit']"
|
|
|
+ >查看</el-button>
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
@@ -299,16 +288,16 @@
|
|
|
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
<el-form-item label="直播名称" prop="liveName">
|
|
|
- <el-input v-model="form.liveName" placeholder="请输入直播名称" />
|
|
|
+ <el-input v-model="form.liveName" placeholder="请输入直播名称" :disabled="isViewOnly"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="显示类型" prop="showType">
|
|
|
- <el-radio-group v-model="form.showType">
|
|
|
+ <el-radio-group v-model="form.showType" :disabled="isViewOnly">
|
|
|
<el-radio :label="1">横屏</el-radio>
|
|
|
<el-radio :label="2">竖屏</el-radio>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="直播类型" prop="liveType">
|
|
|
- <el-radio-group v-model="form.liveType">
|
|
|
+ <el-radio-group v-model="form.liveType" :disabled="isViewOnly">
|
|
|
<el-radio :label="1">直播</el-radio>
|
|
|
<el-radio :label="2">录播</el-radio>
|
|
|
</el-radio-group>
|
|
|
@@ -324,13 +313,14 @@
|
|
|
<!-- </el-select>-->
|
|
|
<!-- </el-form-item>-->
|
|
|
<el-form-item label="直播描述" prop="liveDesc">
|
|
|
- <Editor ref="myeditor" :height="300" @on-text-change="updateText"/>
|
|
|
+ <Editor ref="myeditor" :height="300" @on-text-change="updateText" />
|
|
|
<!-- <Editor v-model="form.liveDesc" :height="300" placeholder="直播描述" />-->
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="录播视屏" prop="videoUrl" v-if="form.liveType == 2">
|
|
|
+ <el-form-item label="录播视屏" prop="videoUrl" v-if="form.liveType == 2" >
|
|
|
<video-upload :fileKey.sync="form.fileKey" :fileSize.sync="form.fileSize"
|
|
|
:videoUrl.sync="form.videoUrl" :fileName.sync="form.fileName" :line_1.sync="form.lineOne"
|
|
|
:uploadType.sync="form.uploadType" :isTranscode.sync="form.isTranscode"
|
|
|
+ :isViewOnly="isViewOnly"
|
|
|
ref="videoUpload"
|
|
|
:transcodeFileKey.sync="form.transcodeFileKey" @video-duration="handleVideoDuration"
|
|
|
@change="handleVideoChange"></video-upload>
|
|
|
@@ -359,6 +349,7 @@
|
|
|
v-model="form.startTime"
|
|
|
@change="timeChange"
|
|
|
type="datetime"
|
|
|
+ :disabled="isViewOnly"
|
|
|
format="yyyy-MM-dd HH:mm:ss"
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
:picker-options="{
|
|
|
@@ -374,6 +365,7 @@
|
|
|
<el-date-picker size="small"
|
|
|
v-model="form.finishTime"
|
|
|
type="datetime"
|
|
|
+ :disabled="isViewOnly"
|
|
|
format="yyyy-MM-dd HH:mm:ss"
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
:picker-options="{
|
|
|
@@ -386,17 +378,17 @@
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="直播封面" prop="liveImgUrl">
|
|
|
- <image-upload v-model="form.liveImgUrl" :limit="1" />
|
|
|
+ <image-upload v-model="form.liveImgUrl" :limit="1" :disabled="isViewOnly"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="上下架" prop="isShow">
|
|
|
- <el-radio-group v-model="form.isShow">
|
|
|
+ <el-radio-group v-model="form.isShow" :disabled="isViewOnly">
|
|
|
<el-radio :label="1">上架</el-radio>
|
|
|
<el-radio :label="2">下架</el-radio>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
+ <el-button type="primary" @click="submitForm" v-show="!isViewOnly">确 定</el-button>
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
@@ -437,6 +429,8 @@ export default {
|
|
|
components: { Editor,VideoUpload },
|
|
|
data() {
|
|
|
return {
|
|
|
+ // 是否只读
|
|
|
+ isViewOnly:false,
|
|
|
baseUrl: process.env.VUE_APP_BASE_API,
|
|
|
uploadUrl:process.env.VUE_APP_BASE_API+"/common/uploadOSS",
|
|
|
isPrivate:null,
|
|
|
@@ -463,6 +457,7 @@ export default {
|
|
|
title: "",
|
|
|
// 是否显示弹出层
|
|
|
open: false,
|
|
|
+ liveDesc:null,
|
|
|
// 查询参数
|
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
|
@@ -750,6 +745,7 @@ export default {
|
|
|
|
|
|
/** 新增按钮操作 */
|
|
|
handleAdd() {
|
|
|
+ this.isViewOnly = false
|
|
|
this.reset();
|
|
|
this.open = true;
|
|
|
|
|
|
@@ -760,10 +756,19 @@ export default {
|
|
|
this.title = "添加直播间";
|
|
|
},
|
|
|
updateText(text){
|
|
|
- this.form.liveDesc=text
|
|
|
+ setTimeout(() => {
|
|
|
+ if (this.isViewOnly) {
|
|
|
+ this.$refs.myeditor.setText(this.liveDesc);
|
|
|
+ this.form.liveDesc=this.liveDesc;
|
|
|
+ } else {
|
|
|
+ this.form.liveDesc=text;
|
|
|
+ }
|
|
|
+ }, 1);
|
|
|
+
|
|
|
},
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
+ this.isViewOnly = false
|
|
|
this.reset();
|
|
|
const liveId = row.liveId || this.ids
|
|
|
getLive(liveId).then(response => {
|
|
|
@@ -771,6 +776,7 @@ export default {
|
|
|
if(this.form.duration){
|
|
|
this.form.durationTime = this.secondsToTime(this.form.duration)
|
|
|
}
|
|
|
+ this.liveDesc = this.form.liveDesc
|
|
|
|
|
|
setTimeout(() => {
|
|
|
if(this.form.liveDesc==null){
|
|
|
@@ -784,6 +790,30 @@ export default {
|
|
|
this.title = "修改直播间";
|
|
|
});
|
|
|
},
|
|
|
+ /** 修改按钮操作 */
|
|
|
+ handleView(row) {
|
|
|
+ this.isViewOnly = true
|
|
|
+ this.reset();
|
|
|
+ const liveId = row.liveId || this.ids
|
|
|
+ getLive(liveId).then(response => {
|
|
|
+ this.form = response.data;
|
|
|
+ if(this.form.duration){
|
|
|
+ this.form.durationTime = this.secondsToTime(this.form.duration)
|
|
|
+ }
|
|
|
+ this.liveDesc = this.form.liveDesc
|
|
|
+
|
|
|
+ setTimeout(() => {
|
|
|
+ if(this.form.liveDesc==null){
|
|
|
+ this.$refs.myeditor.setText("");
|
|
|
+ }else{
|
|
|
+ this.$refs.myeditor.setText(this.form.liveDesc);
|
|
|
+ }
|
|
|
+ this.form.videoUrl = row.videoUrl
|
|
|
+ }, 1);
|
|
|
+ this.open = true;
|
|
|
+ this.title = "查看直播间";
|
|
|
+ });
|
|
|
+ },
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
if(this.form.liveId != null) { this.videoUrl = this.form.videoUrl; }
|