video_admin/src/views/mission/missionWx.vue

2448 lines
68 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="微信短剧列表" name="first">
<div style="position: relative;display: inline-block;margin: 5px;">
<span>短剧名称:</span>
<el-input style="width: 200px;" @keydown.enter.native="select" placeholder="请输入短剧名称" v-model="contentT">
</el-input>&nbsp;&nbsp;
</div>
<div style="position: relative;display: inline-block;margin: 5px;">
<span>微信是否显示:</span>
<el-select v-model="wxShowT" style="width:150px;margin-left: 10px;" @change="animeDat3()">
<el-option v-for="item in isPriceName" :key="item.classificationId" :label="item.classificationName"
:value="item.classificationId">
</el-option>
</el-select>&nbsp;&nbsp;&nbsp;&nbsp;
</div>
<div style="position: relative;display: inline-block;margin: 5px;">
<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="select">查询
</el-button>
<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="cleans">重置
</el-button>
<el-button style="margin-left:15px;" size="mini" type="warning" icon="document" @click="tongbuBtn">同步短剧
</el-button>
</div>
<el-table v-loading="tableDataLoading" :data="tableData.list" height="600px">
<el-table-column prop="courseId" label="编号" fixed="left" width="80"></el-table-column>
<el-table-column prop="title" label="短剧名称" width="180" fixed="left"></el-table-column>
<el-table-column prop="titleImg" label="封面图" width="150">
<template slot-scope="scope">
<el-popover placement="top-start" title="" trigger="hover">
<img style="width: 50px; height: 50px" :src="scope.row.titleImg" alt="" slot="reference">
<img style="width: 200px; height: 200px" :src="scope.row.titleImg" alt="">
</el-popover>
</template>
</el-table-column>
<el-table-column prop="wxCourseId" label="微信短剧ID"></el-table-column>
<el-table-column prop="qualificationType" label="剧目资质" width="160">
<template slot-scope="scope">
<span v-if="scope.row.qualificationType == 1 ">取得《网络剧片发行许可证》或重点节目备案号</span>
<span v-else>未取得《网络剧片发行许可证》或重点节目备案且制作成本小于30万元</span>
</template>
</el-table-column>
<el-table-column prop="registrationNumber" label="剧目备案号" width="160"></el-table-column>
<el-table-column prop="qualificationCertificateMaterialId" label="制作成本(单位:万元)" width="160"></el-table-column>
<el-table-column prop="costOfProduction" label="剧目资质证明编号" width="160"></el-table-column>
<el-table-column prop="costCommitmentLetterMaterialId" label="成本配置比例情况报告编号" width="160"></el-table-column>
<!-- <el-table-column prop="dyImgId" label="微信封面图ID" width="160"></el-table-column>
<el-table-column prop="keyRecordNum" label="重点备案号" width="160"></el-table-column>
<el-table-column prop="ordinaryRecordNum" label="普通备案号" width="160"></el-table-column>
<el-table-column prop="registrationNum" label="登记号" width="160"></el-table-column>
<el-table-column prop="licenseNum" label="许可证号" width="160"></el-table-column>
<el-table-column prop="dyVersion" label="当前版本号" width="160"></el-table-column>
<el-table-column prop="dyStatusContent" label="微信审核内容"></el-table-column>
<el-table-column fixed="right" prop="dyStatus" label="提审状态" width="100">
<template slot-scope="scope">
<span style="color: #4f9dec;" v-if="scope.row.dyStatus === 1 ">已提交</span>
<span v-if="scope.row.dyStatus === 2 ">已通过</span>
<span v-if="scope.row.dyStatus === 3 ">已拒绝</span>
<span v-if="scope.row.dyStatus === 4 ">已上线</span>
</template>
</el-table-column> -->
<el-table-column prop="isPrice" label="是否收费" width="100">
<template slot-scope="scope">
<span v-if="scope.row.isPrice == 1 ">是</span>
<span v-else>免费</span>
</template>
</el-table-column>
<el-table-column prop="courseLabel" label="短剧标签" width="160"></el-table-column>
<el-table-column prop="price" label="购买剧价格" width="100"></el-table-column>
<el-table-column prop="payNum" label="购买次数" width="60"></el-table-column>
<el-table-column prop="viewCounts" label="播放量" width="60"></el-table-column>
<el-table-column prop="updateTime" label="更新时间" width="160"></el-table-column>
<el-table-column prop="wxShow" label="微信是否显示" width="100">
<template slot-scope="scope">
<el-switch v-model="scope.row.wxShow" @change="changeWx(scope.row.wxShow,scope.row.courseId)"
:active-value="openValue1" :inactive-value="closeValue1" active-color="#13ce66"
inactive-color="#ff4949">
</el-switch>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="150" align="center">
<template slot-scope="scope">
<el-button class="btns" size="mini" type="primary" @click="refund1(scope.row)">剧集资源
</el-button>
<!-- <el-button class="btns" size="mini" type="primary" plain :disabled="!isAuth('missionWx:shangchuan')"
@click="shangchuan(scope.row)">短剧上传</el-button>
<el-button class="btns" size="mini" type="warning" :disabled="!isAuth('missionWx:songshen')"
@click="songshen(scope.row)">短剧送审</el-button>
<el-button class="btns" size="mini" type="warning" plain :disabled="!isAuth('missionWx:shangxian')"
@click="shangxian(scope.row)">短剧上线</el-button> -->
<el-button class="btns" size="mini" type="danger" :disabled="!isAuth('missionWx:update')"
@click="xiugai(scope.row)">提交短剧备案信息</el-button>
</template>
</el-table-column>
</el-table>
<div style="text-align: center;margin-top: 10px;">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:page-sizes="[10, 20, 30, 40, 100, 200, 500]" :page-size="limit" :current-page="page"
layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount">
</el-pagination>
</div>
<!-- 设置备案号 -->
<el-dialog title="提交短剧备案信息" :visible.sync="dialogFormVisible1" center width="80%">
<!-- <div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">重点备案号:</span>
<el-input v-model="keyRecordNum" style="width:50%;" placeholder="请输入重点备案号"></el-input>
</div>
<div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">普通备案号:</span>
<el-input v-model="ordinaryRecordNum" style="width:50%;" placeholder="请输入普通备案号"></el-input>
</div>
<div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">登记号:</span>
<el-input v-model="registrationNum" style="width:50%;" placeholder="请输入登记号"></el-input>
</div>
<div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">许可证号:</span>
<el-input v-model="licenseNum" style="width:50%;" placeholder="请输入许可证号"></el-input>
</div> -->
<div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">剧目资质:</span>
<el-radio-group v-model="qualification_type">
<el-radio label="1">取得《网络剧片发行许可证》或重点节目备案号</el-radio></br>
<el-radio label="2">未取得《网络剧片发行许可证》或重点节目备案且制作成本小于30万元</el-radio>
</el-radio-group>
</div>
<div style="margin-bottom: 10px;" v-if="qualification_type==1">
<span style="width: 200px;display: inline-block;text-align: right;">剧目备案号:</span>
<el-input v-model="registration_number" style="width:50%;" placeholder="请输入剧目备案号"></el-input>
</div>
<div style="margin-bottom: 10px;" v-if="qualification_type==2">
<span style="width: 200px;display: inline-block;text-align: right;">制作成本(单位:万元):</span>
<el-input v-model="cost_of_production" style="width:50%;"
placeholder="请输入制作成本"></el-input>
<!-- <el-radio-group v-model="cost_of_production">
<el-radio label="1-29">30万以下</el-radio>
</el-radio-group> -->
</div>
<div style="margin-bottom: 10px;display: flex;align-items: center;" v-if="qualification_type==1">
<span style="width: 200px;display: inline-block;text-align: right;">剧目资质证明:</span>
<el-input v-model="qualification_certificate_material_id" style="width:50%;" placeholder="剧目资质证明"></el-input>
<div>
<el-upload :action="$http.adornUrlWX('cgi-bin/media/upload?access_token='+access_token+'&type=image')" style="margin-left: 10px;"
:show-file-list="false" :on-success="handleUploadSuccess3" :on-progress="onprogress4" >
<el-button type="primary">上传文件</el-button>
</el-upload>
</div>
<!-- <div style="display: flex;flex-wrap: wrap;">
<div class="imgs" v-for="(item,index) in qualification_certificate_material_id" :key="index">
<img width="100%" class="images" height="100%" :src="item" alt="">
<span class="dels">
<i class="el-icon-delete" @click="clear1(index)"></i>
</span>
</div>
<div class="imgs" style="">
<el-upload :action="$http.adornUrlUp('alioss/upload')" list-type="picture-card"
:show-file-list="false" :on-success="handleUploadSuccess3" :on-progress="onprogress1">
<el-progress v-if="percentage1>0 && percentage1<100" type="circle"
:percentage="percentage1"></el-progress>
<i v-else class="el-icon-plus"></i>
</el-upload>
</div>
</div> -->
</div>
<div style="display: block;margin-left: 200px;margin-bottom: 20px;" v-if="qualification_type==1">
<div>
<a href="https://res.wx.qq.com/op_res/X9CuqeIgGZSRP_sI5elvBrSySOz_zV_lR3msHDuzL6jU8hDlIBJ4O82XD7VPVSGMgQpMenlGak5DBsvKHjcYZw"
target="_blank" rel="noopener noreferrer">查看截图示例<span></span></a>
</div>
</div>
<div style="margin-bottom: 10px;display: flex;align-items: center;" v-if="qualification_type==2">
<span style="width: 200px;display: inline-block;text-align: right;">《成本配置比例情况报告》:</span>
<el-input v-model="cost_commitment_letter_material_id" style="width:50%;" placeholder="成本配置比例情况报告"></el-input>
<div>
<el-upload :action="$http.adornUrlWX('cgi-bin/media/upload?access_token='+access_token+'&type=image')" style="margin-left: 10px;"
:show-file-list="false" :on-success="handleUploadSuccess4" :on-progress="onprogress4" >
<el-button type="primary">上传文件</el-button>
</el-upload>
<!-- <div class="imgs" v-for="(item,index) in cost_commitment_letter_material_id" :key="index">
<img width="100%" class="images" height="100%" :src="item" alt="">
<span class="dels">
<i class="el-icon-delete" @click="clear4(index)"></i>
</span>
</div>
<div class="imgs" style="">
<el-upload :action="$http.adornUrlUp('alioss/upload')" list-type="picture-card"
:show-file-list="false" :on-success="handleUploadSuccess4" :on-progress="onprogress4">
<el-progress v-if="percentage2>0 && percentage2<100" type="circle"
:percentage="percentage2"></el-progress>
<i v-else class="el-icon-plus"></i>
</el-upload>
</div> -->
</div>
</div>
<div style="display: block;margin-left: 200px;margin-bottom: 20px;" v-if="qualification_type==2">
<div>
<a href="https://res.wx.qq.com/op_res/8q_kSHE63wbMvg6E5JJMrkIIGJiOOuH5VBccpsz5XxJsHIZQ15KaWbVFUMJskisNEIYnpY6Z9cnrKBp1Fr4pIQ"
target="_blank" rel="noopener noreferrer">点击下载新模板<span></span></a>
</div>
<!-- <div style="background: yellow; display: initial;">
<span><i class="el-icon-warning"></i> 需转化为图片,通过上传图片接口传入</span>
</div> -->
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible1 = false">取 消</el-button>
<el-button type="primary" @click="addDetails()">确 定</el-button>
</div>
</el-dialog>
<!-- 视频详情列表 -->
<el-dialog title="剧集资源列表" :visible.sync="dialogVisible" width="90%" center="">
<div style="display: inline-block;">
<!-- <div style="display: inline-block;">
<span>是否推荐:</span>
<el-select v-model="goods" style="width:150px;margin-left: 10px;" @change="chaxun()">
<el-option v-for="item in goodsList" :key="item.classificationId"
:label="item.classificationName" :value="item.classificationId">
</el-option>
</el-select>&nbsp;&nbsp;&nbsp;&nbsp;
</div> -->
<el-button style="margin-left:15px;" size="mini" type="primary" icon="document"
@click="chaxun">刷新</el-button>
</div>
<el-table v-loading="tableDataLoadingJj" :data="curriList.list">
<!-- <el-table-column type="selection"> @selection-change="changeFun"
</el-table-column> -->
<el-table-column prop="wxCourseDetailsId" label="微信视频ID" width="80" fixed="left"></el-table-column>
<el-table-column prop="courseDetailsName" label="名称" fixed="left"></el-table-column>
<el-table-column prop="titleImg" label="封面图">
<template slot-scope="scope">
<el-popover placement="top-start" title="" trigger="hover">
<img style="width: 50px; height: 50px" :src="scope.row.titleImg" alt=""
slot="reference">
<img style="width: 200px; height: 200px" :src="scope.row.titleImg" alt="">
</el-popover>
</template>
</el-table-column>
<el-table-column prop="content" label="介绍" width="200"></el-table-column>
<el-table-column prop="videoUrl" label="视频链接" width="150">
<template slot-scope="scope">
<el-button size="mini" type="primary" :disabled="!isAuth('mission:update')"
style="margin: 5px;" @click="playVideo(scope.row.videoUrl)">播放视频
</el-button>
</template>
</el-table-column>
<el-table-column prop="goodNum" label="点赞数"></el-table-column>
<el-table-column prop="price" label="集价格"></el-table-column>
<el-table-column prop="isPrice" label="是否收费" align="center">
<template slot-scope="scope">
<div v-if="scope.row.isPrice == 1 ">是</div>
<div v-else>免费</div>
<el-switch v-model="scope.row.isPrice" @change="changeD(scope.row)"
:active-value="openValue1" :inactive-value="closeValue1" active-color="#13ce66"
inactive-color="#ff4949">
</el-switch>
</template>
</el-table-column>
<!-- <el-table-column label="操作" width="120" fixed="right">
<template slot-scope="scope">
<el-button size="mini" type="primary" :disabled="!isAuth('missionWx:shangchuan')"
style="margin: 5px;" @click="shangchuanD(scope.row)">单集上传
</el-button>
</template>
</el-table-column> -->
</el-table>
<div style="text-align: center;margin-top: 10px;">
<el-pagination @size-change="handleSizeChange3" @current-change="handleCurrentChange3"
:page-sizes="[10, 20, 30, 40, 100, 200, 500]" :page-size="limitS" :current-page="pageS"
layout="total,sizes, prev, pager, next,jumper" :total="curriList.totalCount">
</el-pagination>
</div>
</el-dialog>
<!-- 添加视频 -->
<el-dialog title="添加视频" :visible.sync="dialogFormVisible3" width="80%" center="">
<div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">标题:</span>
<el-input v-model="title" style="width:50%;" placeholder="请输入视频标题"></el-input>
</div>
<div style="margin-bottom: 10px;display:flex;">
<span style="width: 200px;display: inline-block;text-align: right;">封面图:</span>
<div
style=" width:148px;height:148px;border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;">
<el-upload class="avatar-uploader" v-model="titleImg" :action="$http.adornUrl('alioss/upload')"
:show-file-list="false" :on-success="handleAvatarSuccess5">
<img v-if="titleImg" :src="titleImg" class="avatar"
style="border-radius: 6px;width: 148px;height: 148px;" />
<i v-else class="el-icon-plus avatar-uploader-icon iconss"></i>
</el-upload>
</div>
</div>
<div style="margin-bottom: 10px;display:flex;">
<span style="width: 200px;display: inline-block;text-align: right;">上传视频:</span>
<div
style=" width:200px;height:148px;border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;">
<el-upload class="avatar-uploader" v-model="url" :action="$http.adornUrl('alioss/upload')"
:show-file-list="false" multiple :on-success="handleAvatarSuccess3"
:before-upload="beforeUploadVideo" :on-progress="beforeUpload">
<video v-if="url" :src="url" class="avatar" controls="controls"
style="width: 200px;height:148px;">您的浏览器不支持视频播放</video>
<i v-else class="el-icon-plus avatar-uploader-icon iconss"></i>
<el-progress type="circle" v-if="percentage>0 && percentage<=100" :percentage="percentage"
color="#efefef"></el-progress>
</el-upload>
</div>
</div>
<div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">视频链接:</span>
<el-input v-model="url" style="width:50%;" placeholder="请输入视频链接"></el-input>
</div>
<div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">集价格:</span>
<el-input v-model="price" type="number" style="width:50%;" placeholder="请输入集价格"></el-input>
</div>
<div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">点赞数:</span>
<el-input v-model="goodNum" type="number" style="width:50%;" placeholder="请输入点赞数"></el-input>
</div>
<div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">是否收费:</span>
<el-radio-group v-model="isPrice">
<el-radio :label="1">是</el-radio>
<el-radio :label="2">免费</el-radio>
</el-radio-group>
</div>
<div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">视频介绍</span>
<el-input v-model="content" style="width:50%;display: none;" placeholder="请输入视频介绍"></el-input>
<quill-editor ref="myTextEditor" v-model="content" :options="quillOption"
style="padding-bottom: 50px;height: 300px;width: 50%;display: inline-table;margin-bottom: 60px;">
</quill-editor>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible3 = false">取 消</el-button>
<el-button type="primary" @click="addVideos()">确 定</el-button>
</div>
</el-dialog>
<!-- 视频弹框 -->
<el-dialog title="视频" :visible.sync="tableDateUrl" center width="600px">
<video v-if="videoUrls!=''" :src="videoUrls" ref="videoRef" width="400" controls
style="margin: 30px 70px;"></video>
<video v-else ref="videoRef" width="400" style="margin: 30px 70px;" type="audio/wav"
controls="controls"></video>
<div slot="footer" class="dialog-footer">
<el-button @click="tableDateUrl = false">取 消</el-button>
</div>
</el-dialog>
<!-- 同步阿里云OSS短剧 -->
<el-dialog title="同步短剧" :visible.sync="dialogFormVisibleTbdj" center v-loading="loading"
element-loading-text="正在读取中" element-loading-spinner="el-icon-loading"
element-loading-background="rgba(0, 0, 0, 0.8)">
<!-- <div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">读取oss路径</span>
<el-input v-model="filePath" type="text" style="width:50%;" placeholder="请输入读取oss路径"></el-input>
</div> -->
<div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">前几集免费:</span>
<el-input v-model="freeNum" type="number" style="width:50%;" placeholder="请输入前几集免费"></el-input>
</div>
<div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">短剧总价:</span>
<el-input v-model="coursePrice" type="number" style="width:50%;" placeholder="请输入短剧总价"></el-input>
</div>
<div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">最大点赞数量:</span>
<el-input v-model="maxGood" type="number" style="width:50%;" placeholder="请输入最大点赞数量"></el-input>
</div>
<div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">最小点赞数量:</span>
<el-input v-model="minGood" type="number" style="width:50%;" placeholder="请输入最小点赞数量"></el-input>
</div>
<div slot="footer" class="dialog-footer" style="text-align: center;">
<el-button @click="dialogFormVisibleTbdj = false">取 消</el-button>
<el-button type="primary" @click="querentongbu()"> </el-button>
</div>
</el-dialog>
</el-tab-pane>
</el-tabs>
</template>
<script>
import {
quillEditor
} from 'vue-quill-editor'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
import quillConfig from '../locality/quill-config.js'
// import videojs from "video.js";
// import "video.js/dist/video-js.css";
import Hls from 'hls.js';
export default {
components: {
quillEditor
},
data() {
return {
openValue: 1,
closeValue: 0,
openValue1: 1,
closeValue1: 2,
contentT: '',
courseType: 1, //资源类型 1:资源 2:链接
isRecommend: 0, //是否推荐 1推荐 0不推荐
statusType: 1, //上下架 1上架 2下架
remark: '', //资源网盘地址
title: '', //资源列表名称
titleImg: '', //资源列表图片
img: [], //详情图合集
bannerImg: [], //轮播图
privilege: [], //标签集合
bq: '', //标签
price: '', //价格
payNum: '', //购买次数
viewCounts: 0, //播放量
details: '', //短剧介绍
courseId: '', //短剧id
curriList: {}, //短剧详情
url: '', //视频链接
isPrice: 1, //是否收费
goodNum: '', //点赞数
content: '', //视频简介
over: 2,
videoId: '',
quillOption: quillConfig,
fenleiId: '',
fenleiIdT: '',
fenleiId1: '',
fenleiId2: '',
limit: 10,
page: 1,
limitS: 10,
pageS: 1,
goods: '',
goodsList: [{
classificationName: '全部',
classificationId: ''
},
{
classificationName: '推荐',
classificationId: 1
}, {
classificationName: '不推荐',
classificationId: 2
}
],
phone: '',
status: 0,
statesnum: [{ //短剧10.2分类
classificationName: '全部',
classificationId: ''
}],
statesnum1: [],
statesnum2: [],
isRecommends: -1,
isRecommendNum: [ //短剧10.2分类
{
classificationName: '全部',
classificationId: -1
},
{
classificationName: '推荐',
classificationId: 1
}, {
classificationName: '普通',
classificationId: 0
}
],
statuss: 0,
statusNum: [ //上下架分类
{
classificationName: '全部',
classificationId: 0
},
{
classificationName: '上架',
classificationId: 1
}, {
classificationName: '下架',
classificationId: 2
}
],
classificationId: '', //分类id
content: '', //短剧搜索标题 拒绝理由
classificationName: '', //分类名称
formLabelWidth: '200px',
activeName: 'first',
dialogVisible: false,
tableDataLoading: false,
dialogFormVisible: false,
dialogFormVisible1: false,
dialogFormVisible2: false,
dialogFormVisible3: false,
tableData: {}, //短剧信息集合
form: {
classificationId: '',
classificationName: ''
},
classifyData: [], //分类管理集合
xg: 0,
classifyId: 0,
userIds: [], //用户列表
nickName: '',
percentage: 0,
titles: '',
types: '',
tableDataLoadingUrl: false,
dialogFormVisiblePl: false,
urlList: [],
show: false,
// ------
tableDateUrl: false,
videoUrls: '',
checkBoxData: [], //多选框选择的值
dialogFormVisiblePltk: false,
dialogFormVisiblePlsxj: false,
dialogVisibleTj: false,
tongjidata: {},
tongjiListdata: {},
info: {
stockDate: this.getNowTime(), //日期
},
flag: 3,
flags: [{
value: 1,
label: '按天查询'
}, {
value: 2,
label: '按月查询'
}, {
value: 3,
label: '按年查询'
}],
totalMoney: 0,
tableDataLoadingJj: false,
tableDataLoadingSr: false,
isPriceT: '',
overT: '',
isPriceName: [{
classificationName: '全部',
classificationId: ''
},
{
classificationName: '是',
classificationId: 1
}, {
classificationName: '否',
classificationId: 2
}
],
keyRecordNum: '',
ordinaryRecordNum: '',
registrationNum: '',
licenseNum: '',
dyVersion: '',
dyShowT: '',
wxShowT: '',
qualification_type: 1, //剧目资质1-取得《网络剧片发行许可证》或重点节目备案号2-未取得《网络剧片发行许可证》或重点节目备案且制作成本小于30万元
registration_number: '', //剧目备案号当qualification_type=1时必填。根据提供的剧目资质证明文件填写对应的网络剧片发行许可证编号或剧目备案号。如(沪)网剧审字(2023)第001号 或 V123456788888888
qualification_certificate_material_id: '', //剧目资质证明文件当qualification_type=1时必填。请提供网络剧片发行许可证或广电备案系统截图。查看截图示例
cost_of_production: '', //剧目制作成本单位万元当qualification_type=2时必填。请填写“1-29” 的整数(如非整数将截断取整),数值需与《成本配置比例情况报告》中对应剧目制作成本一致。
cost_commitment_letter_material_id: '', //《成本配置比例情况报告》material_id当qualification_type=2时必填。点击下载新模板点击下载旧模板2024年5月29日后提审需提供新模板
percentage1: 0,
percentage2: 0,
media:'',
access_token:'',
dialogFormVisibleTbdj: false,
filePath: '',
freeNum: '',
coursePrice: '',
maxGood: '',
minGood: '',
loading: false,
good: '',
}
},
methods: {
//处理默认选中当前日期
getNowTime() {
var now = new Date();
var year = now.getFullYear(); //得到年份
var month = now.getMonth(); //得到月份
var date = now.getDate(); //得到日期
var hh = now.getHours() < 10 ? "0" + now.getHours() : now.getHours();
var mm = now.getMinutes() < 10 ? "0" + now.getMinutes() : now.getMinutes();
var ss = now.getSeconds() < 10 ? "0" + now.getSeconds() : now.getSeconds();
month = month + 1;
month = month.toString().padStart(2, "0");
date = date.toString().padStart(2, "0");
var defaultDate = `${year}-${month}-${date}`;
return defaultDate;
this.$set(this.info, "stockDate", defaultDate);
},
// 详情跳转
updates(row) {
if (row.userId) {
this.$router.push({
path: '/userDetail',
query: {
userId: row.userId
}
})
}
},
handleSizeChange(val) {
this.limit = val
this.dataSelect()
},
handleCurrentChange(val) {
this.page = val
this.dataSelect()
},
handleSizeChange2(val) {
this.limit = val
this.classifySelect()
},
handleCurrentChange2(val) {
this.page = val
this.classifySelect()
},
handleSizeChange3(val) {
this.limitS = val
this.curriculumList(this.courseId);
},
handleCurrentChange3(val) {
this.pageS = val
this.curriculumList(this.courseId);
},
handleSizeChangeTjlist(val) {
this.limitS = val
this.shourutongjiList(this.courseId);
},
handleCurrentChangeTjlist(val) {
this.pageS = val
this.shourutongjiList(this.courseId);
},
handleSizeChange5(val) {
this.limit = val
this.userClass();
},
handleCurrentChange5(val) {
this.page = val
this.userClass();
},
// tabs切换
handleClick(tab, event) {
if (tab._props.label == '微信短剧列表') {
this.page = 1
this.limit = 10
this.dataSelect()
}
},
// 查询短剧列表
select() {
this.page = 1
this.limit = 10
this.dataSelect()
},
// 重置短剧列表
cleans() {
this.phone = ''
this.status = 0
this.contentT = ''
this.fenleiIdT = ''
this.isRecommends = -1
this.isPriceT = ''
this.statuss = ''
this.overT = ''
this.dyShowT = ''
this.wxShowT = ''
this.dataSelect()
},
// 修改资源列表
xiugai(row) {
this.titles = '修改资源'
this.courseId = row.courseId
if(row.qualificationType){
this.qualification_type = row.qualificationType
}else{
this.qualification_type = '1'
}
if(row.registrationNumber){
this.registration_number = row.registrationNumber
}else{
this.registration_number = ''
}
if(row.qualificationCertificateMaterialId){
this.qualification_certificate_material_id = row.qualificationCertificateMaterialId
}else{
this.qualification_certificate_material_id = ''
}
if(row.costOfProduction){
this.cost_of_production = row.costOfProduction
}else{
this.cost_of_production = ''
}
if(row.costCommitmentLetterMaterialId){
this.cost_commitment_letter_material_id = row.costCommitmentLetterMaterialId
}else{
this.cost_commitment_letter_material_id = ''
}
this.tokenSelect()
this.dialogFormVisible1 = true
},
// 封面图片上传
handleAvatarSuccess5(file) {
this.titleImg = file.data;
},
// 详情图片上传
handleRemove(file) {
console.log(file, this.img)
this.img.push(file.data);
},
// 轮播图上传
handleRemoveB(file) {
console.log(file, this.bannerImg)
this.bannerImg.push(file.data);
},
// 上传文档
handleAvatarSuccessWd(file) {
this.remark = file.data;
},
// 删除标签
dels2(index) {
this.privilege.splice(index, 1);
console.log(this.privilege)
},
// 添加标签
btnTj() {
if (this.bq == '' || this.bq == ' ') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入标签',
type: 'warning'
});
return
} else {
console.log('this.bq', this.bq)
this.privilege.push(this.bq)
this.bq = ''
}
},
// 确认添加列表
addDetails() {
if (this.qualification_type == 1) {
if (this.registration_number == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入剧目备案号',
type: 'warning'
})
return
}
if (this.qualification_certificate_material_id == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请上传资质证明文件',
type: 'warning'
})
return
}
}
if (this.qualification_type == 2) {
if (this.cost_of_production === '') {
this.$notify({
title: '提示',
duration: 1800,
message: '剧目制作成本不能为空',
type: 'warning'
})
return
}
if (this.cost_commitment_letter_material_id == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请上传成本配置比例情况报告',
type: 'warning'
})
return
}
}
this.$http({
url: this.$http.adornUrl('course/uploadWxCourse'),
method: 'post',
params: this.$http.adornParams({
// data: this.$http.adornData({
'courseId': this.courseId,
'qualificationType': this.qualification_type,
'registrationNumber': this.registration_number,
'qualificationCertificateMaterialId': this.qualification_certificate_material_id,
'costOfProduction': this.cost_of_production,
'costCommitmentLetterMaterialId': this.cost_commitment_letter_material_id,
})
}).then(({
data
}) => {
var that = this
if (data.code == 0) {
that.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
that.dialogFormVisible1 = false
that.dataSelect()
}
})
} else {
that.$message({
message: data.msg,
type: 'warning',
duration: 1500,
onClose: () => {}
})
}
})
},
// select选择事件
animeDat(state) {
this.page = 1
console.log(state)
this.dataSelect()
},
animeDat1(state) {
this.fenleiId2 = state
},
animeDat2(state) {
this.page = 1
this.isRecommends = state
this.dataSelect()
},
animeDat3(state) {
this.page = 1
this.statuss = state
this.dataSelect()
},
// 获取派单数据列表
dataSelect() {
this.tableDataLoading = true
this.$http({
url: this.$http.adornUrl('course/selectCourse'),
method: 'get',
params: this.$http.adornParams({
'page': this.page,
'limit': this.limit,
'classifyId': this.fenleiIdT,
'title': this.contentT,
'isRecommend': this.isRecommends,
'status': this.statuss,
'isPrice': this.isPriceT,
'over': this.overT,
'wxCourse': 1,
'dyShow': this.dyShowT,
'wxShow': this.wxShowT,
})
}).then(({
data
}) => {
this.tableDataLoading = false
let returnData = data.data
this.tableData = returnData
console.log(this.tableData)
})
},
// 删除短剧列表
deles(row) {
let delid = row.courseId
this.$confirm(`确定删除此条信息?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl(`course/updateDelete/?id=${delid}`),
method: 'get',
params: this.$http.adornParams({})
}).then(({
data
}) => {
this.$message({
message: '删除成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
})
}).catch(() => {})
},
// 查看资源详情
refund1(row) {
this.pageS = 1
this.types = row.courseType
this.courseId = row.courseId
this.curriculumList(this.courseId);
this.dialogVisible = true
},
// 查询
chaxun() {
this.pageS = 1
this.curriculumList(this.courseId);
},
// 获取短剧详情列表
curriculumList(id) {
this.tableDataLoadingJj = true
this.$http({
url: this.$http.adornUrl('course/selectCourseById'),
method: 'get',
params: this.$http.adornParams({
'id': id,
'page': this.pageS,
'limit': this.limitS,
'good': this.goods
})
}).then(({
data
}) => {
if (data.code == 0) {
this.tableDataLoadingJj = false
this.curriList = data.data
this.remark = data.data.list[0].videoUrl
this.videoId = data.data.list[0].courseDetailsId
}
})
},
// 添加视频
addVideo() {
this.title = ''
this.url = ''
this.videoId = ''
this.price = ''
this.titleImg = ''
this.goodNum = ''
this.content = ''
this.isPrice = 1
this.dialogFormVisible3 = true
},
// 修改视频
compileVideo(row) {
this.title = row.courseDetailsName
this.url = row.videoUrl
this.videoId = row.courseDetailsId
this.isPrice = row.isPrice
this.price = row.price
this.titleImg = row.titleImg
this.goodNum = row.goodNum
this.content = row.content
this.dialogFormVisible3 = true
},
// 确认添加视频
addVideos() {
if (this.title == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入视频标题',
type: 'warning'
})
return
}
if (this.url == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请上传视频',
type: 'warning'
})
return
}
if (this.isPrice == 1) {
if (Number(this.price) === '' || Number(this.price) <= 0) {
this.$notify({
title: '提示',
duration: 1800,
message: '集价格不能为空或不能小于0',
type: 'warning'
})
return
}
} else {
if (Number(this.price) === '') {
this.$notify({
title: '提示',
duration: 1800,
message: '集价格不能为空',
type: 'warning'
})
return
}
}
if (Number(this.goodNum) < 0) {
this.$notify({
title: '提示',
duration: 1800,
message: '点赞数不能小于0',
type: 'warning'
})
return
}
if (this.videoId == '') {
var urls = 'courseDetails/insertCourseDetails'
} else {
var urls = 'courseDetails/updateCourseDetails'
}
this.$http({
url: this.$http.adornUrl(urls),
method: 'post',
data: this.$http.adornData({
'courseId': this.courseId,
'courseDetailsName': this.title,
'videoUrl': this.url,
'courseDetailsId': this.videoId,
'isPrice': this.isPrice,
'price': this.price,
'titleImg': this.titleImg,
'goodNum': this.goodNum,
'content': this.content,
})
}).then(({
data
}) => {
console.log('添加短剧视频', data)
if (data.code == 0) {
this.$message({
message: '添加成功',
type: 'success',
duration: 1500,
onClose: () => {
this.title = ''
this.url = ''
this.videoId = ''
this.dialogFormVisible3 = false
this.curriculumList(this.courseId);
}
})
} else {
this.$notify({
title: '提示',
duration: 1800,
message: data.msg,
type: 'warning'
})
}
})
},
// 删除视频
deleteVideo(row) {
let delid = row.courseDetailsId.toString()
this.$confirm(`确定删除此条信息?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl(`courseDetails/deleteCourseDetails?ids=${delid}`),
method: 'post',
params: this.$http.adornParams({})
}).then(({
data
}) => {
if (data.code == 0) {
this.$message({
message: '删除成功',
type: 'success',
duration: 1500,
onClose: () => {
this.curriculumList(this.courseId)
}
})
} else {
this.$notify({
title: '提示',
duration: 1800,
message: data.msg,
type: 'warning'
})
}
})
}).catch(() => {})
},
// 视频上传
handleAvatarSuccess3(file) {
this.url = file.data;
this.percentage = 0
},
// 限制上传格式
beforeUploadVideo(file) {
const isLt10M = file.size / 1024 / 1024 < 1024;
if (['video/mp4', 'video/ogg', 'video/flv', 'video/avi', 'video/wmv', 'video/rmvb'].indexOf(file.type) == -
1) {
this.$message.error('请上传正确的视频格式');
return false;
}
if (!isLt10M) {
this.$message.error('上传视频大小不能超过1G哦!');
return false;
}
},
beforeUpload(file) {
this.url = ''
this.percentage = Math.ceil(file.percent)
},
// 批量导入视频弹框
addVideoPl() {
this.dialogFormVisiblePl = true
},
handleAvatarSuccessPl(file) {
console.log('多个视频', file)
this.urlList.push(file.data)
},
// 分类管理
classifySelect() {
this.$http({
url: this.$http.adornUrl('courseClassification/selectCourseClassification'),
method: 'get',
params: this.$http.adornParams({
'page': this.page,
'limit': this.limit,
'classificationName': ''
})
}).then(({
data
}) => {
let returnData = data.data
this.classifyData = returnData
this.statesnum1 = data.data.list
if (this.statesnum.length == 1) {
for (var i in data.data.list) {
this.statesnum.push(data.data.list[i])
}
}
})
},
classifySelect1() {
this.$http({
url: this.$http.adornUrl('banner/selectBannerList'),
method: 'get',
params: this.$http.adornParams({
'state': -1,
'classify': 2,
})
}).then(({
data
}) => {
let returnData = data.data
this.classifyData = returnData
this.statesnum2 = data.data
})
},
// 添加分类弹框
classifyStair() {
this.dialogFormVisible = true
},
// 添加分类确定
StairNoticeTo() {
if (this.classificationName == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入分类名称',
type: 'warning'
})
return
}
this.$http({
url: this.$http.adornUrl('courseClassification/insertCourseClassification'),
method: 'post',
data: this.$http.adornData({
'classificationName': this.classificationName
})
}).then(({
data
}) => {
this.dialogFormVisible = false
this.$message({
message: '分类添加成功',
type: 'success',
duration: 1500,
onClose: () => {
this.classificationName = ''
this.classifySelect()
}
})
})
},
// 修改分类
compile(index, rows) {
this.dialogFormVisible2 = true
this.form.classificationId = rows.classificationId
this.form.classificationName = rows.classificationName
},
// 修改分类确定
CompileNoticeTo() {
if (this.form.classificationName == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入分类名称',
type: 'warning'
})
return
}
this.$http({
url: this.$http.adornUrl('courseClassification/updateCourseClassification'),
method: 'post',
data: this.$http.adornData({
'classificationId': this.form.classificationId,
'classificationName': this.form.classificationName
})
}).then(({
data
}) => {
this.dialogFormVisible2 = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.classifySelect()
}
})
})
},
//删除分类
deleteStair(row) {
let delid = row.classificationId
this.$confirm(`确定删除此条信息?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl(`courseClassification/updateDelete?id=${delid}`),
method: 'get',
params: this.$http.adornParams({})
}).then(({
data
}) => {
this.$message({
message: '删除成功',
type: 'success',
duration: 1500,
onClose: () => {
this.name = ''
this.classifySelect()
}
})
})
}).catch(() => {})
},
handleSuccess(file) {
console.log(file)
this.url = file.data;
console.log(file.data, this.url)
this.tableDataLoadingUrl = false
},
handlePreview(file) {
this.tableDataLoadingUrl = true
},
// 验证只能上传音频
beforeAvatarUpload(file) {
var testmsg = file.name.substring(file.name.lastIndexOf('.') + 1)
const extension = testmsg === 'mp3'
if (!extension) {
this.$message({
message: "上传文件只能是mp3格式",
type: 'error'
})
}
return extension;
},
// 是否免费
changeD(row) {
if (row.price != null) {
var price = row.price
} else {
var price = 0
}
if (row.isPrice == 1 && price == 0) {
this.$notify({
title: '提示',
duration: 1800,
message: '当前集价格为空或者为0设置为收费前请先设置集价格',
type: 'warning'
})
this.curriculumList(this.courseId)
return
}
this.$http({
url: this.$http.adornUrl('courseDetails/updateCourseDetails'),
method: 'post',
data: this.$http.adornData({
'courseId': row.courseId,
'courseDetailsName': row.courseDetailsName,
'videoUrl': row.videoUrl,
'courseDetailsId': row.courseDetailsId,
'isPrice': row.isPrice,
'price': row.price,
'titleImg': row.titleImg,
'goodNum': row.goodNum,
'content': row.content,
})
}).then(({
data
}) => {
if (data.code == 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.curriculumList(this.courseId)
}
})
} else {
this.$message({
message: data.msg,
type: 'warning',
duration: 1500,
onClose: () => {
this.curriculumList(this.courseId)
}
})
}
})
},
// 是否推荐
changeT(row) {
if (row.isPrice == 1 && row.good == 1) {
this.$notify({
title: '提示',
duration: 1800,
message: '推荐视频应为免费观看,请先设置视频为免费',
type: 'warning'
})
this.curriculumList(this.courseId)
return
}
this.$http({
url: this.$http.adornUrl('courseDetails/updateCourseDetails'),
method: 'post',
data: this.$http.adornData({
'courseDetailsId': row.courseDetailsId,
'good': row.good,
})
}).then(({
data
}) => {
if (data.code == 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.curriculumList(this.courseId)
}
})
} else {
this.$message({
message: data.msg,
type: 'warning',
duration: 1500,
onClose: () => {
this.curriculumList(this.courseId)
}
})
}
})
},
// 是否完结
changeW(row) {
this.$http({
url: this.$http.adornUrl('course/updateCourse'),
method: 'post',
data: this.$http.adornData({
// params: this.$http.adornParams({
'over': row.over,
'courseId': row.courseId
})
}).then(({
data
}) => {
if (data.code == 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
} else {
this.$message({
message: data.msg,
type: 'warning',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
}
})
},
// 是否展示同步短剧按钮
xianshi() {
this.$http({
url: this.$http.adornUrl('common/type/247'),
method: 'get',
params: {
type:247
},
data: this.$http.adornData({})
}).then(({
data
}) => {
if (data.code == 0) {
if (data.data.value == '是') {
this.show = true
}
}
})
},
// 同步短剧
tongbu() {
this.$confirm(`确定要同步短剧?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('course/synCourse'),
method: 'get',
params: this.$http.adornParams({})
}).then(({
data
}) => {
if (data.code == 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
} else {
this.$message({
message: data.msg,
type: 'warning',
duration: 1500,
onClose: () => {}
})
}
})
}).catch(() => {})
},
playVideo(url) {
this.videoUrls = ''
if (url.indexOf("m3u8") != -1) {
var hls = new Hls();
hls.loadSource(url);
hls.attachMedia(this.$refs.videoRef);
hls.on(Hls.Events.MANIFEST_PARSED, function() {
this.$refs.videoRef.play();
});
this.tableDateUrl = true
} else {
this.tableDateUrl = true
this.videoUrls = url;
}
},
// 多选
changeFun(val) {
console.log('val---------', val)
this.checkBoxData = val
},
// 批量修改弹框
transferClcik(id) {
this.price = ''
this.content = ''
this.titleImg = ''
this.dialogFormVisiblePltk = true
},
// 批量修改
updateVideos() {
if (this.price === '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入集价格',
type: 'warning'
})
return
}
// if (Number(this.price)<0) {
// this.$notify({
// title: '提示',
// duration: 1800,
// message: '集价格不能小于0',
// type: 'warning'
// })
// return
// }
var ids = this.checkBoxData.map(item => {
return item.courseDetailsId
})
var datas = {
ids: ids.toString(),
price: this.price,
titleImg: this.titleImg,
content: this.content
}
if (this.titleImg === '') {
datas.titleImg = null
}
if (this.content === '') {
datas.content = null
}
this.$http({
url: this.$http.adornUrl('course/updateCourseDetails'),
method: 'post',
params: this.$http.adornParams(datas)
}).then(({
data
}) => {
if (data.code == 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.curriculumList(this.courseId)
this.dialogFormVisiblePltk = false
}
})
} else {
this.$message({
message: data.msg,
type: 'warning',
duration: 1500,
onClose: () => {}
})
}
})
},
// 批量上下架弹框
shangxiajiaClcik() {
this.isPrice = ''
this.dialogFormVisiblePlsxj = true
},
// 批量上下架
updateVideosSxj() {
var ids = this.checkBoxData.map(item => {
return item.courseId
})
this.$http({
url: this.$http.adornUrl('course/updateCourseStatus'),
method: 'post',
params: this.$http.adornParams({
'ids': ids.toString(),
'status': this.isPrice,
})
}).then(({
data
}) => {
if (data.code == 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
this.dialogFormVisiblePlsxj = false
}
})
} else {
this.$message({
message: data.msg,
type: 'warning',
duration: 1500,
onClose: () => {}
})
}
})
},
// 批量删除
deleteClcik() {
var ids = this.checkBoxData.map(item => {
return item.courseId
})
this.$confirm(`确定要批量删除信息?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('course/deleteCourseByIds'),
method: 'post',
params: this.$http.adornParams({
'ids': ids.toString(),
})
}).then(({
data
}) => {
if (data.code == 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
} else {
this.$message({
message: data.msg,
type: 'warning',
duration: 1500,
onClose: () => {}
})
}
})
}).catch(() => {})
},
// 批量删除剧集
deleteClcikJj() {
var ids = this.checkBoxData.map(item => {
return item.courseDetailsId
})
this.$confirm(`确定要批量删除剧集?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('course/deleteCourseDetailsByIds'),
method: 'post',
params: this.$http.adornParams({
'ids': ids.toString(),
})
}).then(({
data
}) => {
if (data.code == 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.curriculumList(this.courseId)
}
})
} else {
this.$message({
message: data.msg,
type: 'warning',
duration: 1500,
onClose: () => {}
})
}
})
}).catch(() => {})
},
// 查看收入统计
shouru(row) {
this.pageS = 1
this.flag = 3
this.types = row.courseType
this.courseId = row.courseId
this.shourutongji();
this.shourutongjiList()
this.dialogVisibleTj = true
},
// 获取短剧收入统计
shourutongji(id) {
this.$http({
url: this.$http.adornUrl('order/selectCourseOrdersMoneyCount'),
method: 'get',
params: this.$http.adornParams({
'courseId': this.courseId,
// 'page': this.pageS,
// 'limit': this.limitS,
})
}).then(({
data
}) => {
if (data.code == 0) {
this.tongjidata = data.data
}
})
},
// 获取短剧收入统计列表
shourutongjiList(id) {
this.totalMoney = 0
this.tableDataLoadingSr = true
this.$http({
url: this.$http.adornUrl('order/selectOrders'),
method: 'get',
params: this.$http.adornParams({
'courseId': this.courseId,
'page': this.pageS,
'limit': this.limitS,
'time': this.info.stockDate,
'flag': this.flag,
'status': 1
})
}).then(({
data
}) => {
if (data.code == 0) {
this.tableDataLoadingSr = false
for (var i in data.data.list) {
if (data.data.list[i].payMoney) {
this.totalMoney = this.totalMoney + Number(data.data.list[i].payMoney)
}
}
this.tongjiListdata = data.data
}
})
},
chaxunTj() {
this.pageS = 1
this.shourutongjiList()
},
// 短剧上传
shangchuan(row) {
if (row.keyRecordNum) {
this.keyRecordNum = row.keyRecordNum
} else {
this.keyRecordNum = ''
}
if (row.ordinaryRecordNum) {
this.ordinaryRecordNum = row.ordinaryRecordNum
} else {
this.ordinaryRecordNum = ''
}
if (row.registrationNum) {
this.registrationNum = row.registrationNum
} else {
this.registrationNum = ''
}
if (row.licenseNum) {
this.licenseNum = row.licenseNum
} else {
this.licenseNum = ''
}
if (this.keyRecordNum === '' && this.ordinaryRecordNum === '' && this.registrationNum === '' && this
.licenseNum === '') {
this.$confirm(`当前短剧未设置备案号,是否前往设置?`, '提示', {
confirmButtonText: '去设置备案号',
cancelButtonText: '暂不设置,继续上传',
type: 'warning'
}).then(() => {
this.dialogFormVisible1 = true
}).catch(() => {
this.$http({
url: this.$http.adornUrl('course/dyVideoUpload'),
method: 'post',
params: this.$http.adornParams({
'courseId': row.courseId
})
}).then(({
data
}) => {
if (data.code == 0) {
this.$message({
message: '上传成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
} else {
this.$message({
message: data.msg,
type: 'warning',
duration: 1500,
onClose: () => {}
})
}
})
})
return
} else {
this.$confirm(`确定上传短剧?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('course/dyVideoUpload'),
method: 'post',
params: this.$http.adornParams({
'courseId': row.courseId
})
}).then(({
data
}) => {
if (data.code == 0) {
this.$message({
message: '上传成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
} else {
this.$message({
message: data.msg,
type: 'warning',
duration: 1500,
onClose: () => {}
})
}
})
}).catch(() => {})
}
},
// 短剧送审
songshen(row) {
this.$confirm(`确定送审短剧?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('course/dyVideoAudit'),
method: 'post',
params: this.$http.adornParams({
'courseId': row.courseId
})
}).then(({
data
}) => {
if (data.code == 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
} else {
this.$message({
message: data.msg,
type: 'warning',
duration: 1500,
onClose: () => {}
})
}
})
}).catch(() => {})
},
// 短剧上线
shangxian(row) {
this.$confirm(`确定上线短剧?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('course/dyVideoUp'),
method: 'post',
params: this.$http.adornParams({
'courseId': row.courseId
})
}).then(({
data
}) => {
if (data.code == 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
} else {
this.$message({
message: data.msg,
type: 'warning',
duration: 1500,
onClose: () => {}
})
}
})
}).catch(() => {})
},
// 单集上传
shangchuanD(row) {
this.$confirm(`确定上传此集?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('course/uploadCourseDetails'),
method: 'post',
params: this.$http.adornParams({
'courseDetailsId': row.courseDetailsId
})
}).then(({
data
}) => {
if (data.code == 0) {
this.$message({
message: '上传成功',
type: 'success',
duration: 1500,
onClose: () => {
this.curriculumList(this.courseId);
}
})
} else {
this.$message({
message: data.msg,
type: 'warning',
duration: 1500,
onClose: () => {}
})
}
})
}).catch(() => {})
},
// 同步阿里云OSS短剧
tongbuBtn(index) {
// this.types = index
// if (index == 1) {
// this.titles = '同步阿里云OSS短剧'
// }
// if (index == 2) {
// this.titles = '同步腾讯云OSS短剧'
// }
// if (index == 3) {
// this.titles = '同步抖音云OSS短剧'
// }
this.filePath = ''
this.freeNum = ''
this.coursePrice = ''
this.maxGood = ''
this.minGood = ''
this.dialogFormVisibleTbdj = true
},
// querentongbu() {
// // if (this.filePath === '') {
// // this.$notify({
// // title: '提示',
// // duration: 1800,
// // message: '请输入读取oss路径',
// // type: 'warning'
// // })
// // return
// // }
// if (this.freeNum === '') {
// this.$notify({
// title: '提示',
// duration: 1800,
// message: '请输入前几集免费',
// type: 'warning'
// })
// return
// }
// if (this.coursePrice === '') {
// this.$notify({
// title: '提示',
// duration: 1800,
// message: '请输入短剧总价',
// type: 'warning'
// })
// return
// }
// if (this.maxGood === '') {
// this.$notify({
// title: '提示',
// duration: 1800,
// message: '请输入最大点赞数量',
// type: 'warning'
// })
// return
// }
// if (this.minGood === '') {
// this.$notify({
// title: '提示',
// duration: 1800,
// message: '请输入最小点赞数量',
// type: 'warning'
// })
// return
// }
// if (Number(this.minGood) >= Number(this.maxGood)) {
// this.$notify({
// title: '提示',
// duration: 1800,
// message: '最小点赞数量不能大于最大点赞数量',
// type: 'warning'
// })
// return
// }
// this.loading = true
// this.$http({
// url: this.$http.adornUrl('aliossCourse/sysnAliOssCourse'),
// method: 'get',
// params: this.$http.adornParams({
// // 'filePath': this.filePath,
// 'freeNum': this.freeNum,
// 'coursePrice': this.coursePrice,
// 'maxGood': this.maxGood,
// 'minGood': this.minGood,
// 'type': this.types,
// })
// }).then(({
// data
// }) => {
// if (data.code == 0) {
// this.$message({
// message: '操作成功',
// type: 'success',
// duration: 3000,
// onClose: () => {
// this.loading = false
// this.dialogFormVisibleTbdj = false
// this.dataSelect()
// }
// })
// } else {
// this.loading = false
// this.$message({
// message: data.msg,
// type: 'warning',
// duration: 3000,
// onClose: () => {
// }
// })
// }
// })
// },
// 同步短剧
querentongbu() {
// this.$confirm(`确定同步短剧?`, '提示', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
// }).then(() => {
if (this.freeNum === '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入前几集免费',
type: 'warning'
})
return
}
if (this.coursePrice === '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入短剧总价',
type: 'warning'
})
return
}
if (this.maxGood === '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入最大点赞数量',
type: 'warning'
})
return
}
if (this.minGood === '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入最小点赞数量',
type: 'warning'
})
return
}
if (Number(this.minGood) >= Number(this.maxGood)) {
this.$notify({
title: '提示',
duration: 1800,
message: '最小点赞数量不能大于最大点赞数量',
type: 'warning'
})
return
}
this.loading = true
this.$http({
url: this.$http.adornUrl('course/sysWxCourse'),
method: 'get',
params: this.$http.adornParams({
'freeNum': this.freeNum,
'coursePrice': this.coursePrice,
'maxGood': this.maxGood,
'minGood': this.minGood,
// 'type': this.types,
})
}).then(({
data
}) => {
if (data.code == 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.loading = false
this.dialogFormVisibleTbdj = false
this.dataSelect()
}
})
} else {
this.$message({
message: data.msg,
type: 'warning',
duration: 1500,
onClose: () => {}
})
}
})
// }).catch(() => {})
},
// 微信是否显示
changeWx(status, courseId) {
this.$http({
url: this.$http.adornUrl(`course/updateCourse`),
method: 'post',
data: this.$http.adornData({
// params: this.$http.adornParams({
'wxShow': status,
'courseId': courseId
})
}).then(({
data
}) => {
if (data.code == 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
} else {
this.$message({
message: data.msg,
type: 'warning',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
}
})
},
handleUploadSuccess3(file) {
this.qualification_certificate_material_id = file.media_id
console.log('this.contentImg', this.qualification_certificate_material_id)
},
onprogress1(event, file, fileList) {
console.log('详情图上传进度', parseInt(event.percent))
this.percentage1 = parseInt(event.percent)
},
// 删除
clear1(index) {
this.qualification_certificate_material_id.splice(index, 1);
},
clear4(index) {
this.cost_commitment_letter_material_id.splice(index, 1);
},
handleUploadSuccess4(file) {
this.cost_commitment_letter_material_id = file.media_id
console.log('------',file)
// this.media = fileList
// this.cost_commitment_letter_material_id = file.data
},
onprogress4(event, file, fileList) {
// console.log('event, file, fileList', parseInt(event.percent),event, file, fileList)
this.percentage2 = parseInt(event.percent)
},
changeBtn(options){
console.log('===options',options, )
// this.media = options.file
// this.mediaSelect()
},
tokenSelect(){
this.$http({
url: this.$http.adornUrl('course/getWxToken'),
method: 'get',
// data: this.$http.adornData({
params: this.$http.adornParams({
})
}).then(({
data
}) => {
if (data.code == 0) {
// media:'',
this.access_token = data.data
// this.cost_commitment_letter_material_id =
} else {
this.$message({
message: data.msg,
type: 'warning',
duration: 1500,
onClose: () => {
}
})
}
})
},
mediaSelect(){
this.$http({
url: this.$http.adornUrlWX('cgi-bin/media/upload'),
//url: 'https://api.weixin.qq.com/cgi-bin/media/upload',
method: 'post',
// data: this.$http.adornData({
params: this.$http.adornParams({
'access_token': this.access_token,
'type': 'image',
'media':this.media
})
}).then(({
data
}) => {
if (data.code == 0) {
// media:'',
// access_token:'',
// this.cost_commitment_letter_material_id =
} else {
this.$message({
message: data.msg,
type: 'warning',
duration: 1500,
onClose: () => {
}
})
}
})
},
},
mounted() {
this.classifySelect()
this.classifySelect1()
this.dataSelect()
this.xianshi()
}
}
</script>
<style>
.el-dialog {
/* width: 65% !important; */
}
.imgs {
position: relative;
border-radius: 6px;
width: 148px;
height: 148px;
margin-right: 10px;
display: inline-block;
}
.dels {
position: absolute;
top: 0;
left: 0;
display: none;
}
.dels .el-icon-delete {
line-height: 148px;
padding-left: 58px;
font-size: 25px;
color: #fff;
}
.imgs:hover .dels {
width: 100%;
height: 100%;
background: #000;
display: block;
opacity: 0.5;
}
.bqList {
padding: 4px 14px;
margin: 4px;
border: 1px solid #efefef;
font-size: 12px;
color: #999;
border-radius: 4px;
margin-right: 15px;
}
.delss {
display: none;
position: relative;
}
.delss .el-icon-delete {
position: absolute;
top: 0;
}
.bqList:hover .delss {
display: initial;
opacity: 0.5;
}
.tj {
padding: 4px;
margin: 4px;
font-size: 12px;
border: 1px solid #ccc;
border-radius: 4px;
}
.btns {
margin: 4px 0 !important;
}
.video-box {
width: 100%;
max-width: 500px;
max-height: 500px;
}
::v-deep .video-js .vjs-big-play-button {
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.box {
padding: 44px;
border: 1px solid #eee;
margin: 15px 10px;
}
.box_num {
font-size: 14px;
color: #66b1ff;
}
.box_num .box_color {
color: #333;
font-size: 14px;
margin-bottom: 15px;
}
.box_num div span {
font-size: 20px;
margin-left: 5px;
}
.text_color {
color: #4f9dec;
}
.text_color span {
margin-right: 5px;
}
</style>