|
|
@@ -1,267 +1,217 @@
|
|
|
<template>
|
|
|
- <div class="app-container">
|
|
|
- <el-row :gutter="10" class="mb8">
|
|
|
- <el-col :span="1.5">
|
|
|
+ <div class="app-container live-page">
|
|
|
+ <div class="live-page__header">
|
|
|
+ <div class="live-page__title-wrap">
|
|
|
+ <h2 class="live-page__title">直播间</h2>
|
|
|
+ <p class="live-page__desc">管理本司直播、录播与回放场次</p>
|
|
|
+ </div>
|
|
|
+ <div class="live-page__actions">
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
- plain
|
|
|
icon="el-icon-plus"
|
|
|
- size="mini"
|
|
|
+ size="small"
|
|
|
@click="handleAdd"
|
|
|
v-hasPermi="['live:live:add']"
|
|
|
- >新增</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">
|
|
|
- <el-form-item label="直播名称" prop="liveName">
|
|
|
- <el-input
|
|
|
- v-model="queryParams.liveName"
|
|
|
- placeholder="请输入直播名称"
|
|
|
- clearable
|
|
|
- size="small"
|
|
|
- @keyup.enter.native="handleQuery"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="直播状态" prop="liveStatus">
|
|
|
- <el-select
|
|
|
- v-model="queryParams.status"
|
|
|
- placeholder="请选择直播状态"
|
|
|
- clearable
|
|
|
- size="small"
|
|
|
- >
|
|
|
- <el-option label="待直播" value="1"></el-option>
|
|
|
- <el-option label="直播中" value="2"></el-option>
|
|
|
- <el-option label="已结束" value="3"></el-option>
|
|
|
- <el-option label="直播回放中" value="4"></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="公司名称" prop="companyName">
|
|
|
- <el-input
|
|
|
- v-model="queryParams.companyName"
|
|
|
- placeholder="请输入公司名称"
|
|
|
- clearable
|
|
|
- size="small"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="直播类型" prop="liveType">
|
|
|
- <el-select
|
|
|
- v-model="queryParams.liveType"
|
|
|
- placeholder="请选择直播类型"
|
|
|
- clearable
|
|
|
- size="small"
|
|
|
- >
|
|
|
- <el-option label="直播" value="1"></el-option>
|
|
|
- <el-option label="录播" value="2"></el-option>
|
|
|
- <el-option label="直播回放" value="3"></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="开始时间" prop="startTimeS">
|
|
|
- <el-date-picker
|
|
|
- v-model="queryParams.startTimeS"
|
|
|
- type="datetime"
|
|
|
- placeholder="选择起始时间"
|
|
|
- value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
- size="small"
|
|
|
- ></el-date-picker>
|
|
|
- </el-form-item>
|
|
|
- <!-- 开始时间-范围结束 -->
|
|
|
- <el-form-item label="结束时间" prop="endTimeE">
|
|
|
- <el-date-picker
|
|
|
- v-model="queryParams.endTimeE"
|
|
|
- type="datetime"
|
|
|
- placeholder="选择结束时间"
|
|
|
- value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
- size="small"
|
|
|
- :disabled="!queryParams.startTimeS"
|
|
|
- ></el-date-picker>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="上下架" prop="isShow">
|
|
|
- <el-select
|
|
|
- v-model="queryParams.isShow"
|
|
|
- placeholder="请选择上下架状态"
|
|
|
- clearable
|
|
|
- size="small"
|
|
|
- >
|
|
|
- <el-option label="上架" value="1"></el-option>
|
|
|
- <el-option label="下架" value="2"></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <!-- 审核状态 -->
|
|
|
- <el-form-item label="审核状态" prop="isAudit">
|
|
|
- <el-select
|
|
|
- v-model="queryParams.isAudit"
|
|
|
- placeholder="请选择审核状态"
|
|
|
- clearable
|
|
|
- size="small"
|
|
|
- >
|
|
|
- <el-option label="审核未通过" value="0"></el-option>
|
|
|
- <el-option label="审核通过" value="1"></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
- <el-button icon="el-icon-download" size="mini" v-hasPermi="['live:live:export']" @click="handleExport">导出</el-button>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- <div class="selection-toolbar">
|
|
|
- <el-checkbox :indeterminate="isIndeterminate" v-model="allChecked" @change="toggleSelectAll">
|
|
|
- {{ multipleSelection.length > 0 ? `已选 ${multipleSelection.length} 条` : '选中本页' }}
|
|
|
- </el-checkbox>
|
|
|
- <el-button plain size="mini" @click="handleShelf" v-hasPermi="['live:live:edit']">上架</el-button>
|
|
|
- <el-button plain size="mini" @click="handleUnshelf" v-hasPermi="['live:live:edit']">下架</el-button>
|
|
|
- <el-button plain size="mini" @click="handleDeleteSelected" v-hasPermi="['live:live:remove']">删除</el-button>
|
|
|
-<!-- <el-dropdown>-->
|
|
|
-<!-- <el-button plain size="mini">-->
|
|
|
-<!-- 更多操作<i class="el-icon-arrow-down el-icon--right"></i>-->
|
|
|
-<!-- </el-button>-->
|
|
|
-<!-- <el-dropdown-menu slot="dropdown">-->
|
|
|
-<!-- <el-dropdown-item>操作一</el-dropdown-item>-->
|
|
|
-<!-- <el-dropdown-item>操作二</el-dropdown-item>-->
|
|
|
-<!-- </el-dropdown-menu>-->
|
|
|
-<!-- </el-dropdown>-->
|
|
|
+ >新建直播间</el-button>
|
|
|
+ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <el-table ref="liveTable" v-loading="loading" :data="liveList" @selection-change="handleSelectionChange">
|
|
|
- <el-table-column type="selection" width="55"></el-table-column>
|
|
|
- <el-table-column label="直播ID" align="center" prop="liveId" />
|
|
|
- <el-table-column label="直播封面" align="center" prop="liveImgUrl" width="180">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-image style="width: 90px;height: 90px;" :src="scope.row.liveImgUrl" mode="aspectFill" :preview-src-list="[scope.row.liveImgUrl]" />
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="直播名称" align="center" prop="liveName" />
|
|
|
- <el-table-column label="显示类型" align="center" prop="showType">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tag v-if="scope.row.showType == 1">横屏</el-tag>
|
|
|
- <el-tag v-if="scope.row.showType == 2">竖屏</el-tag>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="直播状态" align="center" prop="status">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tag type="warning" v-if="scope.row.status == 1">待直播</el-tag>
|
|
|
- <el-tag style="color:#3491FA;background-color:#E8F7FF;border-color: #E8F7FF;" v-if="scope.row.status == 2">直播中</el-tag>
|
|
|
- <el-tag type="info" v-if="scope.row.status == 3">已结束</el-tag>
|
|
|
- <el-tag style="color:#9B6DDA;background-color:#F5E8FF;border-color: #F5E8FF;" v-if="scope.row.status == 4">直播回放中</el-tag>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="公司名称" align="center" prop="companyName" >
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tag v-if="scope.row.companyName">{{ scope.row.companyName }}</el-tag>
|
|
|
- <el-tag v-else>总台</el-tag>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="直播类型" align="center" prop="liveType">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tag type="danger" v-if="scope.row.liveType == 1">直播</el-tag>
|
|
|
- <el-tag type="success" v-if="scope.row.liveType == 2">录播</el-tag>
|
|
|
- <el-tag v-if="scope.row.liveType == 3">直播回放</el-tag>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="开始时间" align="center" prop="startTime" width="180" />
|
|
|
- <el-table-column label="结束时间" align="center" prop="finishTime" width="180" />
|
|
|
- <el-table-column label="上下架" align="center" prop="isShow">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tag v-if="scope.row.isShow == 1">上架</el-tag>
|
|
|
- <el-tag type="info" v-if="scope.row.isShow == 2">下架</el-tag>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="审核状态" align="center" prop="isAudit">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tag type="danger" v-if="scope.row.isAudit == 0">审核未通过</el-tag>
|
|
|
- <el-tag v-if="scope.row.isAudit == 1">审核通过</el-tag>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <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 != '总台' && scope.row.status != 2"
|
|
|
- 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"
|
|
|
- icon="el-icon-setting"
|
|
|
- @click="handleConfig(scope.row)"
|
|
|
- v-hasPermi="['live:config:list']"
|
|
|
- >配置</el-button>
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- icon="el-icon-service"
|
|
|
- @click="handleManage(scope.row)"
|
|
|
- v-hasPermi="['live:console:list']"
|
|
|
- >进入直播间</el-button>
|
|
|
- <el-dropdown trigger="hover">
|
|
|
- <el-button size="mini" type="text" icon="el-icon-more">
|
|
|
- 更多
|
|
|
- </el-button>
|
|
|
- <el-dropdown-menu slot="dropdown">
|
|
|
- <!-- 结束按钮 -->
|
|
|
- <el-dropdown-item
|
|
|
- v-if="scope.row.status == 2 && scope.row.liveType == 1"
|
|
|
- @click.native="showLivingUrl(scope.row)"
|
|
|
- v-hasPermi="['live:live:query']"
|
|
|
- >
|
|
|
- <i class="el-icon-switch-button"></i> 推流码
|
|
|
- </el-dropdown-item>
|
|
|
-
|
|
|
- <!-- 去直播按钮 -->
|
|
|
- <el-dropdown-item
|
|
|
- v-if="scope.row.status != 2"
|
|
|
- @click.native="handleStart(scope.row)"
|
|
|
- v-hasPermi="['live:live:edit']"
|
|
|
- >
|
|
|
- <i class="el-icon-monitor"></i> 去直播
|
|
|
- </el-dropdown-item>
|
|
|
-
|
|
|
- <!-- 进入直播间按钮 -->
|
|
|
- <el-dropdown-item
|
|
|
- v-if="scope.row.status == 2"
|
|
|
- @click.native="handleEnded(scope.row)"
|
|
|
- v-hasPermi="['live:live:edit']"
|
|
|
- >
|
|
|
- <i class="el-icon-service"></i> 结束
|
|
|
- </el-dropdown-item>
|
|
|
- <el-dropdown-item
|
|
|
- @click.native="handleCopy(scope.row)"
|
|
|
- v-hasPermi="['live:live:edit']"
|
|
|
- >
|
|
|
- <i class="el-icon-service"></i> 复制直播间
|
|
|
- </el-dropdown-item>
|
|
|
- <el-dropdown-item
|
|
|
- v-if="scope.row.liveCodeUrl == null"
|
|
|
- @click.native="handleGenerateCode(scope.row)"
|
|
|
- v-hasPermi="['live:live:edit']"
|
|
|
- >
|
|
|
- <i class="el-icon-service"></i> 生成二维码
|
|
|
- </el-dropdown-item>
|
|
|
- <el-dropdown-item
|
|
|
- v-if="scope.row.liveCodeUrl != null"
|
|
|
- @click.native="handleCheckCode(scope.row)"
|
|
|
- >
|
|
|
- <i class="el-icon-service"></i> 查看二维码
|
|
|
- </el-dropdown-item>
|
|
|
- </el-dropdown-menu>
|
|
|
- </el-dropdown>
|
|
|
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
+ <div class="live-panel" v-show="showSearch">
|
|
|
+ <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="72px" class="live-search-form">
|
|
|
+ <el-form-item label="直播名称" prop="liveName">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.liveName"
|
|
|
+ placeholder="搜索名称"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="状态" prop="liveStatus">
|
|
|
+ <el-select v-model="queryParams.status" placeholder="全部状态" clearable size="small">
|
|
|
+ <el-option label="待直播" value="1"></el-option>
|
|
|
+ <el-option label="直播中" value="2"></el-option>
|
|
|
+ <el-option label="已结束" value="3"></el-option>
|
|
|
+ <el-option label="直播回放中" value="4"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="公司" prop="companyName">
|
|
|
+ <el-input v-model="queryParams.companyName" placeholder="公司名称" clearable size="small" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="类型" prop="liveType">
|
|
|
+ <el-select v-model="queryParams.liveType" placeholder="全部类型" clearable size="small">
|
|
|
+ <el-option label="直播" value="1"></el-option>
|
|
|
+ <el-option label="录播" value="2"></el-option>
|
|
|
+ <el-option label="直播回放" value="3"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="开始时间" prop="startTimeS">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="queryParams.startTimeS"
|
|
|
+ type="datetime"
|
|
|
+ placeholder="起始时间"
|
|
|
+ value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ size="small"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="结束时间" prop="endTimeE">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="queryParams.endTimeE"
|
|
|
+ type="datetime"
|
|
|
+ placeholder="结束时间"
|
|
|
+ value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ size="small"
|
|
|
+ :disabled="!queryParams.startTimeS"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="上下架" prop="isShow">
|
|
|
+ <el-select v-model="queryParams.isShow" placeholder="全部" clearable size="small">
|
|
|
+ <el-option label="上架" value="1"></el-option>
|
|
|
+ <el-option label="下架" value="2"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="审核" prop="isAudit">
|
|
|
+ <el-select v-model="queryParams.isAudit" placeholder="全部" clearable size="small">
|
|
|
+ <el-option label="审核未通过" value="0"></el-option>
|
|
|
+ <el-option label="审核通过" value="1"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item class="live-search-form__ops">
|
|
|
+ <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
+ <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
+ <el-button icon="el-icon-download" size="mini" v-hasPermi="['live:live:export']" @click="handleExport">导出</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="live-panel live-panel--table">
|
|
|
+ <div class="selection-toolbar">
|
|
|
+ <el-checkbox :indeterminate="isIndeterminate" v-model="allChecked" @change="toggleSelectAll">
|
|
|
+ {{ multipleSelection.length > 0 ? `已选 ${multipleSelection.length} 条` : '选中本页' }}
|
|
|
+ </el-checkbox>
|
|
|
+ <div class="selection-toolbar__btns">
|
|
|
+ <el-button plain size="mini" @click="handleShelf" v-hasPermi="['live:live:edit']">上架</el-button>
|
|
|
+ <el-button plain size="mini" @click="handleUnshelf" v-hasPermi="['live:live:edit']">下架</el-button>
|
|
|
+ <el-button plain size="mini" @click="handleDeleteSelected" v-hasPermi="['live:live:remove']">删除</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <el-table
|
|
|
+ ref="liveTable"
|
|
|
+ v-loading="loading"
|
|
|
+ :data="liveList"
|
|
|
+ class="live-table"
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
+ >
|
|
|
+ <el-table-column type="selection" width="48" align="center" />
|
|
|
+ <el-table-column label="直播间" min-width="260">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div class="live-cell">
|
|
|
+ <el-image
|
|
|
+ class="live-cell__cover"
|
|
|
+ :src="scope.row.liveImgUrl"
|
|
|
+ fit="cover"
|
|
|
+ :preview-src-list="scope.row.liveImgUrl ? [scope.row.liveImgUrl] : []"
|
|
|
+ >
|
|
|
+ <div slot="error" class="live-cell__cover-empty">无封面</div>
|
|
|
+ </el-image>
|
|
|
+ <div class="live-cell__meta">
|
|
|
+ <div class="live-cell__name" :title="scope.row.liveName">{{ scope.row.liveName }}</div>
|
|
|
+ <div class="live-cell__sub">ID {{ scope.row.liveId }} · {{ scope.row.companyName || '总台' }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="状态" align="center" width="110">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span class="live-status" :class="'is-' + scope.row.status">
|
|
|
+ <i class="live-status__dot"></i>
|
|
|
+ <template v-if="scope.row.status == 1">待直播</template>
|
|
|
+ <template v-else-if="scope.row.status == 2">直播中</template>
|
|
|
+ <template v-else-if="scope.row.status == 3">已结束</template>
|
|
|
+ <template v-else-if="scope.row.status == 4">回放中</template>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="类型" align="center" width="90">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span class="live-muted">
|
|
|
+ <template v-if="scope.row.liveType == 1">直播</template>
|
|
|
+ <template v-else-if="scope.row.liveType == 2">录播</template>
|
|
|
+ <template v-else-if="scope.row.liveType == 3">回放</template>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="画面" align="center" width="80">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span class="live-muted">{{ scope.row.showType == 2 ? '竖屏' : '横屏' }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="开始时间" align="center" prop="startTime" width="168" />
|
|
|
+ <el-table-column label="结束时间" align="center" prop="finishTime" width="168" />
|
|
|
+ <el-table-column label="上架" align="center" width="80">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span :class="scope.row.isShow == 1 ? 'live-ok' : 'live-muted'">{{ scope.row.isShow == 1 ? '上架' : '下架' }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="审核" align="center" width="96">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span :class="scope.row.isAudit == 1 ? 'live-ok' : 'live-warn'">{{ scope.row.isAudit == 1 ? '已通过' : '未通过' }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" align="left" width="230" fixed="right" class-name="small-padding fixed-width">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ v-if="scope.row.companyName != '总台' && scope.row.status != 2"
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ @click="handleUpdate(scope.row)"
|
|
|
+ v-hasPermi="['live:live:edit']"
|
|
|
+ >修改</el-button>
|
|
|
+ <el-button
|
|
|
+ v-if="scope.row.companyName == '总台'"
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ class="live-view-btn"
|
|
|
+ @click="handleView(scope.row)"
|
|
|
+ v-hasPermi="['live:live:edit']"
|
|
|
+ >查看</el-button>
|
|
|
+ <el-button size="mini" type="text" @click="handleConfig(scope.row)" v-hasPermi="['live:config:list']">配置</el-button>
|
|
|
+ <el-button size="mini" type="text" @click="handleManage(scope.row)" v-hasPermi="['live:console:list']">进入</el-button>
|
|
|
+ <el-dropdown trigger="hover">
|
|
|
+ <el-button size="mini" type="text">更多<i class="el-icon-arrow-down el-icon--right"></i></el-button>
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
+ <el-dropdown-item
|
|
|
+ v-if="scope.row.status == 2 && scope.row.liveType == 1"
|
|
|
+ @click.native="showLivingUrl(scope.row)"
|
|
|
+ v-hasPermi="['live:live:query']"
|
|
|
+ >推流码</el-dropdown-item>
|
|
|
+ <el-dropdown-item
|
|
|
+ v-if="scope.row.status != 2"
|
|
|
+ @click.native="handleStart(scope.row)"
|
|
|
+ v-hasPermi="['live:live:edit']"
|
|
|
+ >去直播</el-dropdown-item>
|
|
|
+ <el-dropdown-item
|
|
|
+ v-if="scope.row.status == 2"
|
|
|
+ @click.native="handleEnded(scope.row)"
|
|
|
+ v-hasPermi="['live:live:edit']"
|
|
|
+ >结束</el-dropdown-item>
|
|
|
+ <el-dropdown-item @click.native="handleCopy(scope.row)" v-hasPermi="['live:live:edit']">复制直播间</el-dropdown-item>
|
|
|
+ <el-dropdown-item
|
|
|
+ v-if="scope.row.liveCodeUrl == null"
|
|
|
+ @click.native="handleGenerateCode(scope.row)"
|
|
|
+ v-hasPermi="['live:live:edit']"
|
|
|
+ >生成二维码</el-dropdown-item>
|
|
|
+ <el-dropdown-item
|
|
|
+ v-if="scope.row.liveCodeUrl != null"
|
|
|
+ @click.native="handleCheckCode(scope.row)"
|
|
|
+ >查看二维码</el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
|
|
|
<el-dialog
|
|
|
title="直播二维码"
|
|
|
@@ -951,44 +901,182 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
+.live-page {
|
|
|
+ --live-border: #e8eaed;
|
|
|
+ --live-text: #1f2329;
|
|
|
+ --live-sub: #8a919f;
|
|
|
+ --live-accent: #1a6d5b;
|
|
|
+ --live-soft: #f4f6f8;
|
|
|
+}
|
|
|
+
|
|
|
+.live-page__header {
|
|
|
+ display: flex;
|
|
|
+ align-items: flex-end;
|
|
|
+ justify-content: space-between;
|
|
|
+ gap: 16px;
|
|
|
+ margin-bottom: 16px;
|
|
|
+}
|
|
|
+
|
|
|
+.live-page__title {
|
|
|
+ margin: 0;
|
|
|
+ font-size: 22px;
|
|
|
+ font-weight: 600;
|
|
|
+ color: var(--live-text);
|
|
|
+ letter-spacing: 0.02em;
|
|
|
+}
|
|
|
+
|
|
|
+.live-page__desc {
|
|
|
+ margin: 4px 0 0;
|
|
|
+ font-size: 13px;
|
|
|
+ color: var(--live-sub);
|
|
|
+}
|
|
|
+
|
|
|
+.live-page__actions {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ gap: 8px;
|
|
|
+}
|
|
|
+
|
|
|
+.live-panel {
|
|
|
+ background: #fff;
|
|
|
+ border: 1px solid var(--live-border);
|
|
|
+ border-radius: 10px;
|
|
|
+ padding: 14px 16px 4px;
|
|
|
+ margin-bottom: 14px;
|
|
|
+}
|
|
|
+
|
|
|
+.live-panel--table {
|
|
|
+ padding: 12px 12px 4px;
|
|
|
+}
|
|
|
+
|
|
|
+.live-search-form .el-form-item {
|
|
|
+ margin-bottom: 12px;
|
|
|
+}
|
|
|
+
|
|
|
+.live-search-form__ops {
|
|
|
+ margin-left: 4px;
|
|
|
+}
|
|
|
+
|
|
|
.selection-toolbar {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ gap: 12px;
|
|
|
margin-bottom: 10px;
|
|
|
- padding-left: 10px;
|
|
|
+ padding: 2px 4px 8px;
|
|
|
+ border-bottom: 1px solid var(--live-soft);
|
|
|
+}
|
|
|
+
|
|
|
+.selection-toolbar__btns {
|
|
|
+ display: flex;
|
|
|
+ gap: 8px;
|
|
|
+}
|
|
|
+
|
|
|
+.live-table ::v-deep .el-table__header th {
|
|
|
+ background: var(--live-soft);
|
|
|
+ color: #5c6470;
|
|
|
+ font-weight: 500;
|
|
|
+}
|
|
|
+
|
|
|
+.live-table ::v-deep .el-table__row td {
|
|
|
+ padding: 12px 0;
|
|
|
+}
|
|
|
+
|
|
|
+.live-cell {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ gap: 12px;
|
|
|
+ min-width: 0;
|
|
|
}
|
|
|
|
|
|
-.selection-toolbar .el-checkbox {
|
|
|
- margin-right: 10px;
|
|
|
+.live-cell__cover {
|
|
|
+ width: 56px;
|
|
|
+ height: 74px;
|
|
|
+ border-radius: 8px;
|
|
|
+ flex-shrink: 0;
|
|
|
+ background: var(--live-soft);
|
|
|
+ overflow: hidden;
|
|
|
}
|
|
|
|
|
|
-/* 调整 checkbox 内部输入框的对齐 */
|
|
|
-.selection-toolbar .el-checkbox .el-checkbox__inner {
|
|
|
- top: 8px; /* 根据实际需求调整 */
|
|
|
+.live-cell__cover-empty {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ font-size: 12px;
|
|
|
+ color: var(--live-sub);
|
|
|
+ background: var(--live-soft);
|
|
|
}
|
|
|
-/* 图片容器:居中 + 内边距 */
|
|
|
+
|
|
|
+.live-cell__meta {
|
|
|
+ min-width: 0;
|
|
|
+ text-align: left;
|
|
|
+}
|
|
|
+
|
|
|
+.live-cell__name {
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: 600;
|
|
|
+ color: var(--live-text);
|
|
|
+ line-height: 1.35;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ white-space: nowrap;
|
|
|
+}
|
|
|
+
|
|
|
+.live-cell__sub {
|
|
|
+ margin-top: 4px;
|
|
|
+ font-size: 12px;
|
|
|
+ color: var(--live-sub);
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ white-space: nowrap;
|
|
|
+}
|
|
|
+
|
|
|
+.live-status {
|
|
|
+ display: inline-flex;
|
|
|
+ align-items: center;
|
|
|
+ gap: 6px;
|
|
|
+ font-size: 13px;
|
|
|
+ color: var(--live-text);
|
|
|
+}
|
|
|
+
|
|
|
+.live-status__dot {
|
|
|
+ width: 7px;
|
|
|
+ height: 7px;
|
|
|
+ border-radius: 50%;
|
|
|
+ background: #c0c4cc;
|
|
|
+}
|
|
|
+
|
|
|
+.live-status.is-1 .live-status__dot { background: #e6a23c; }
|
|
|
+.live-status.is-2 .live-status__dot { background: #f56c6c; box-shadow: 0 0 0 3px rgba(245, 108, 108, 0.18); }
|
|
|
+.live-status.is-3 .live-status__dot { background: #909399; }
|
|
|
+.live-status.is-4 .live-status__dot { background: #409eff; }
|
|
|
+
|
|
|
+.live-muted { color: var(--live-sub); font-size: 13px; }
|
|
|
+.live-ok { color: var(--live-accent); font-size: 13px; }
|
|
|
+.live-warn { color: #c45656; font-size: 13px; }
|
|
|
+.live-view-btn { color: #1a6d5b !important; }
|
|
|
+
|
|
|
.qrcode-img-container {
|
|
|
text-align: center;
|
|
|
padding: 20px 0;
|
|
|
}
|
|
|
|
|
|
-/* 图片样式:自适应弹窗宽度,避免溢出 */
|
|
|
.qrcode-img {
|
|
|
- max-width: 100%; /* 最大宽度不超过容器 */
|
|
|
- max-height: 400px; /* 最大高度限制,避免过高 */
|
|
|
- cursor: pointer; /* 鼠标悬浮变指针,提示可点击 */
|
|
|
- transition: all 0.3s ease; /* 过渡动画,hover 更流畅 */
|
|
|
+ max-width: 100%;
|
|
|
+ max-height: 400px;
|
|
|
+ cursor: pointer;
|
|
|
+ transition: all 0.3s ease;
|
|
|
}
|
|
|
|
|
|
-/* 图片 hover 效果:轻微放大 */
|
|
|
.qrcode-img:hover {
|
|
|
transform: scale(1.02);
|
|
|
- box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); /* 加阴影增强层次感 */
|
|
|
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
|
|
}
|
|
|
|
|
|
-/* 底部提示文字样式 */
|
|
|
.qrcode-footer {
|
|
|
- text-align: center !important; /* 覆盖 Element 默认样式,居中显示 */
|
|
|
+ text-align: center !important;
|
|
|
}
|
|
|
|
|
|
.text-gray {
|