|
@@ -9,31 +9,21 @@
|
|
|
ref="listData"
|
|
|
>
|
|
|
<el-form-item label="适用业务层级" required>
|
|
|
- <el-select
|
|
|
- v-model="eduType"
|
|
|
- placeholder="请选择教育类型"
|
|
|
- @change="changeEduType"
|
|
|
- >
|
|
|
+ <el-select v-model="eduType" placeholder="请选择教育类型" @change="changeEduType">
|
|
|
<el-option
|
|
|
v-for="(item, index) in eduTypeOptions"
|
|
|
:key="index"
|
|
|
:label="item.educationName"
|
|
|
:value="item.id"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
|
- <el-select
|
|
|
- v-model="courType"
|
|
|
- placeholder="请选择业务层次"
|
|
|
- @change="changecourseType"
|
|
|
- >
|
|
|
+ <el-select v-model="courType" placeholder="请选择业务层次" @change="changecourseType">
|
|
|
<el-option
|
|
|
v-for="(item, index) in newCourTypeOptions"
|
|
|
:key="index"
|
|
|
:label="item.projectName + '-' + item.businessName"
|
|
|
:value="item.id"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
|
<el-popover
|
|
|
ref="popovers"
|
|
@@ -47,8 +37,7 @@
|
|
|
v-model="checkAll"
|
|
|
@change="handleCheckAllChange"
|
|
|
:indeterminate="isIndeterminate"
|
|
|
- >全选</el-checkbox
|
|
|
- >
|
|
|
+ >全选</el-checkbox>
|
|
|
<el-checkbox-group
|
|
|
v-model="sujectArray"
|
|
|
class="checkboxSty"
|
|
@@ -58,53 +47,39 @@
|
|
|
v-for="(item, index) in newSujectOption"
|
|
|
:label="item.newId"
|
|
|
:key="index"
|
|
|
- >{{ item.subjectName }}</el-checkbox
|
|
|
- >
|
|
|
+ >{{ item.subjectName }}</el-checkbox>
|
|
|
</el-checkbox-group>
|
|
|
<div style="display: block; text-align: center; margin-top: 10px">
|
|
|
- <el-button size="mini" type="primary" @click="submitSujectArray"
|
|
|
- >确定</el-button
|
|
|
- >
|
|
|
+ <el-button size="mini" type="primary" @click="submitSujectArray">确定</el-button>
|
|
|
</div>
|
|
|
- <el-button
|
|
|
- slot="reference"
|
|
|
- style="margin-left: 12px"
|
|
|
- @click="getMessage"
|
|
|
- >请选择科目</el-button
|
|
|
- >
|
|
|
+ <el-button slot="reference" style="margin-left: 12px" @click="getMessage">请选择科目</el-button>
|
|
|
</el-popover>
|
|
|
<span style="margin-left: 10px">注:可多选</span>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="">
|
|
|
+ <el-form-item label>
|
|
|
<div :class="changeHeight ? 'ach' : 'clh'">
|
|
|
- <div
|
|
|
- v-for="(item, index) in newSujectApis"
|
|
|
- :key="index"
|
|
|
- class="listBoxStys"
|
|
|
- >
|
|
|
+ <div v-for="(item, index) in newSujectApis" :key="index" class="listBoxStys">
|
|
|
{{
|
|
|
- item.educationName +
|
|
|
- " - " +
|
|
|
- item.projectName +
|
|
|
- " - " +
|
|
|
- item.businessName +
|
|
|
- " - " +
|
|
|
- item.subjectName
|
|
|
+ item.educationName +
|
|
|
+ " - " +
|
|
|
+ item.projectName +
|
|
|
+ " - " +
|
|
|
+ item.businessName +
|
|
|
+ " - " +
|
|
|
+ item.subjectName
|
|
|
}}
|
|
|
- <i class="el-icon-error closeIcons" @click="closeType(index)"></i>
|
|
|
+ <i
|
|
|
+ class="el-icon-error closeIcons"
|
|
|
+ @click="closeType(index)"
|
|
|
+ ></i>
|
|
|
</div>
|
|
|
</div>
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
v-if="newSujectApis.length > 1"
|
|
|
@click="changeType"
|
|
|
- >{{ changeHeight ? "展开" : "关闭" }}</el-button
|
|
|
- ><el-button
|
|
|
- size="mini"
|
|
|
- v-if="newSujectApis.length > 0"
|
|
|
- @click="sujectApis = []"
|
|
|
- >清空</el-button
|
|
|
- >
|
|
|
+ >{{ changeHeight ? "展开" : "关闭" }}</el-button>
|
|
|
+ <el-button size="mini" v-if="newSujectApis.length > 0" @click="sujectApis = []">清空</el-button>
|
|
|
<!-- <span v-if="newSujectApis.length === 0">未选项目类型</span> -->
|
|
|
</el-form-item>
|
|
|
<el-form-item label="标题前缀">
|
|
@@ -113,9 +88,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="节标题" prop="name">
|
|
|
<el-input v-model="listData.name"></el-input>
|
|
|
- <div style="color: #999">
|
|
|
- 注:请尽量规范易懂,方便在课程目录表呈现给学员
|
|
|
- </div>
|
|
|
+ <div style="color: #999">注:请尽量规范易懂,方便在课程目录表呈现给学员</div>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="节类型">
|
|
|
<el-select
|
|
@@ -131,67 +104,46 @@
|
|
|
:disabled="item.value == 1"
|
|
|
:label="item.label"
|
|
|
:value="item.value"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item
|
|
|
- label="频道号"
|
|
|
- v-if="listData.sectionType === 2"
|
|
|
- prop="liveUrl"
|
|
|
- >
|
|
|
- <el-input
|
|
|
- style="width: 300px"
|
|
|
- v-model="listData.liveUrl"
|
|
|
- placeholder="请输入频道号"
|
|
|
- ></el-input>
|
|
|
- <el-select
|
|
|
- v-model="newActiveLiveUrl"
|
|
|
- placeholder="快捷选中频道号"
|
|
|
- @change="changeLiveUrl"
|
|
|
- >
|
|
|
+
|
|
|
+ <el-form-item label="视频类型" prop="viewSign">
|
|
|
+ <el-radio-group v-model="listData.viewSign">
|
|
|
+ <el-radio :label="1">保利威</el-radio>
|
|
|
+ <el-radio :label="2">腾讯</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="频道号" v-if="listData.sectionType === 2" prop="liveUrl">
|
|
|
+ <el-input style="width: 300px" v-model="listData.liveUrl" placeholder="请输入频道号"></el-input>
|
|
|
+ <el-select v-model="newActiveLiveUrl" placeholder="快捷选中频道号" @change="changeLiveUrl">
|
|
|
<el-option
|
|
|
v-for="(item, index) in newLiveUrl"
|
|
|
:key="index"
|
|
|
:label="item.streamingName"
|
|
|
:value="item.id"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
|
<div v-if="listData.liveUrl" style="margin-top: 10px">
|
|
|
- <el-button
|
|
|
- size="small"
|
|
|
- type="warning"
|
|
|
- @click="watchZbVideo(listData.liveUrl)"
|
|
|
- >直播预览</el-button
|
|
|
- >
|
|
|
+ <el-button size="small" type="warning" @click="watchZbVideo(listData.liveUrl)">直播预览</el-button>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
- <el-form-item
|
|
|
- label="直播开始时间"
|
|
|
- prop="liveStartTime"
|
|
|
- v-if="listData.sectionType === 2"
|
|
|
- >
|
|
|
+ <el-form-item label="直播开始时间" prop="liveStartTime" v-if="listData.sectionType === 2">
|
|
|
<el-date-picker
|
|
|
v-model="listData.liveStartTime"
|
|
|
type="datetime"
|
|
|
placeholder="请选择直播开始时间"
|
|
|
value-format="timestamp"
|
|
|
- >
|
|
|
- </el-date-picker>
|
|
|
+ ></el-date-picker>
|
|
|
</el-form-item>
|
|
|
- <el-form-item
|
|
|
- label="直播结束时间"
|
|
|
- prop="liveEndTime"
|
|
|
- v-if="listData.sectionType === 2"
|
|
|
- >
|
|
|
+ <el-form-item label="直播结束时间" prop="liveEndTime" v-if="listData.sectionType === 2">
|
|
|
<el-date-picker
|
|
|
v-model="listData.liveEndTime"
|
|
|
type="datetime"
|
|
|
placeholder="请选择直播结束时间"
|
|
|
value-format="timestamp"
|
|
|
- >
|
|
|
- </el-date-picker>
|
|
|
+ ></el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item
|
|
|
label="直播时长"
|
|
@@ -200,9 +152,7 @@
|
|
|
listData.liveStartTime &&
|
|
|
listData.liveEndTime
|
|
|
"
|
|
|
- >
|
|
|
- {{ compTimeOUT(listData.liveStartTime, listData.liveEndTime) }}
|
|
|
- </el-form-item>
|
|
|
+ >{{ compTimeOUT(listData.liveStartTime, listData.liveEndTime) }}</el-form-item>
|
|
|
<el-form-item
|
|
|
label="URL地址"
|
|
|
v-if="listData.sectionType === 1 || listData.sectionType === 3"
|
|
@@ -218,13 +168,8 @@
|
|
|
for="mobles"
|
|
|
class="el-button el-button--primary"
|
|
|
style="margin: 0px 6px; padding: 10px 20px"
|
|
|
- >上传</label
|
|
|
- ><input
|
|
|
- style="display: none"
|
|
|
- type="file"
|
|
|
- id="mobles"
|
|
|
- @change="importMoble"
|
|
|
- />
|
|
|
+ >上传</label>
|
|
|
+ <input style="display: none" type="file" id="mobles" @change="importMoble" />
|
|
|
<el-select
|
|
|
v-if="listData.sectionType === 1"
|
|
|
v-model="newActiveRecordingUrl1"
|
|
@@ -237,8 +182,7 @@
|
|
|
:key="index"
|
|
|
:label="item.streamingName"
|
|
|
:value="item.id"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
|
<el-select
|
|
|
v-if="listData.sectionType === 3"
|
|
@@ -252,16 +196,10 @@
|
|
|
:key="index"
|
|
|
:label="item.streamingName"
|
|
|
:value="item.id"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
|
<div v-if="listData.recordingUrl" style="margin-top: 10px">
|
|
|
- <el-button
|
|
|
- size="small"
|
|
|
- type="warning"
|
|
|
- @click="watchVideo(listData.recordingUrl)"
|
|
|
- >视频预览</el-button
|
|
|
- >
|
|
|
+ <el-button size="small" type="warning" @click="watchVideo(listData.recordingUrl)">视频预览</el-button>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
<el-form-item
|
|
@@ -275,25 +213,16 @@
|
|
|
range-separator=":"
|
|
|
v-model="listData.durationTime"
|
|
|
placeholder="请填入节时长"
|
|
|
- >
|
|
|
- </el-time-picker>
|
|
|
+ ></el-time-picker>
|
|
|
</el-form-item>
|
|
|
- <el-form-item
|
|
|
- label="讲师"
|
|
|
- :prop="listData.sectionType === 2 ? 'teacherId' : ''"
|
|
|
- >
|
|
|
- <el-select
|
|
|
- v-model="listData.teacherId"
|
|
|
- placeholder="请选择讲师"
|
|
|
- filterable
|
|
|
- >
|
|
|
+ <el-form-item label="讲师" :prop="listData.sectionType === 2 ? 'teacherId' : ''">
|
|
|
+ <el-select v-model="listData.teacherId" placeholder="请选择讲师" filterable>
|
|
|
<el-option
|
|
|
v-for="(item, index) in teacherList"
|
|
|
:key="index"
|
|
|
:label="item.teacherName"
|
|
|
:value="item.teacherId"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="节封面" prop="coverUrl">
|
|
@@ -311,8 +240,8 @@
|
|
|
v-if="!listData.coverUrl"
|
|
|
>
|
|
|
<label for="uplose">
|
|
|
- <i class="el-icon-circle-plus-outline iconStsz"></i
|
|
|
- ></label>
|
|
|
+ <i class="el-icon-circle-plus-outline iconStsz"></i>
|
|
|
+ </label>
|
|
|
<input
|
|
|
ref="file"
|
|
|
type="file"
|
|
@@ -328,13 +257,12 @@
|
|
|
:preview-src-list="[
|
|
|
$methodsTools.splitImgHost(listData.coverUrl),
|
|
|
]"
|
|
|
- >
|
|
|
- </el-image>
|
|
|
+ ></el-image>
|
|
|
</el-col>
|
|
|
<el-col :span="11">
|
|
|
- <span style="color: #999; font-size: 14px"
|
|
|
- >注:请上传小于300kb,尺寸为750*440的图片,支持gif、jpg、jpeg、png等类型</span
|
|
|
- >
|
|
|
+ <span
|
|
|
+ style="color: #999; font-size: 14px"
|
|
|
+ >注:请上传小于300kb,尺寸为750*440的图片,支持gif、jpg、jpeg、png等类型</span>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-button
|
|
@@ -343,8 +271,7 @@
|
|
|
size="mini"
|
|
|
class="margin-top: 20px;"
|
|
|
@click="clearImgs"
|
|
|
- >删除</el-button
|
|
|
- >
|
|
|
+ >删除</el-button>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="是否发布" prop="publishStatus">
|
|
|
<el-radio-group v-model="listData.publishStatus">
|
|
@@ -359,8 +286,7 @@
|
|
|
@click="submit('listData')"
|
|
|
:disabled="listData.sectionType === 1 ? !noStudent : false"
|
|
|
:loading="disabledBtn"
|
|
|
- >确定</el-button
|
|
|
- >
|
|
|
+ >确定</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
@@ -375,11 +301,11 @@
|
|
|
<div slot="title" class="hearders">
|
|
|
<div class="leftTitle">视频预览</div>
|
|
|
<div class="rightBoxs">
|
|
|
- <img src="@/assets/images/Close@2x.png" alt="" @click="clears" />
|
|
|
+ <img src="@/assets/images/Close@2x.png" alt @click="clears" />
|
|
|
</div>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <div id="player"></div>
|
|
|
+ <div id="player" v-show="listData.viewSign == 1"></div>
|
|
|
</div>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="clears">取 消</el-button>
|
|
@@ -395,7 +321,7 @@
|
|
|
<div slot="title" class="hearders">
|
|
|
<div class="leftTitle">直播预览</div>
|
|
|
<div class="rightBoxs">
|
|
|
- <img src="@/assets/images/Close@2x.png" alt="" @click="clearszb" />
|
|
|
+ <img src="@/assets/images/Close@2x.png" alt @click="clearszb" />
|
|
|
</div>
|
|
|
</div>
|
|
|
<div>
|
|
@@ -419,6 +345,8 @@ export default {
|
|
|
isIndeterminate: false,
|
|
|
checkAll: false,
|
|
|
vodPlayerJs: "https://player.polyv.net/script/player.js",
|
|
|
+ vodPlayerJsForTCPlayer:
|
|
|
+ "https://web.sdk.qcloud.com/player/tcplayer/release/v5.1.0/tcplayer.v5.1.0.min.js",
|
|
|
vid: "",
|
|
|
playerJs:
|
|
|
"https://player.polyv.net/resp/live-h5-player/latest/liveplayer.min.js",
|
|
@@ -431,21 +359,21 @@ export default {
|
|
|
cataid: "1639399775001", // 分类ID 可以后端传递 也可以不写 或写死
|
|
|
tag: "i am tag", // 标签
|
|
|
luping: 0, // 是否开启视频课件优化处理,对于上传录屏类视频清晰度有所优化:0为不开启,1为开启
|
|
|
- keepsource: 1, // 是否源文件播放(不对视频进行编码):0为编码,1为不编码
|
|
|
+ keepsource: 1 // 是否源文件播放(不对视频进行编码):0为编码,1为不编码
|
|
|
},
|
|
|
sectionTypeOptions: [
|
|
|
{
|
|
|
label: "录播",
|
|
|
- value: 1,
|
|
|
+ value: 1
|
|
|
},
|
|
|
{
|
|
|
label: "直播",
|
|
|
- value: 2,
|
|
|
+ value: 2
|
|
|
},
|
|
|
{
|
|
|
label: "回放",
|
|
|
- value: 3,
|
|
|
- },
|
|
|
+ value: 3
|
|
|
+ }
|
|
|
],
|
|
|
// 弹窗数据
|
|
|
changeHeight: true,
|
|
@@ -453,7 +381,7 @@ export default {
|
|
|
listData: {
|
|
|
recordingUrl: "",
|
|
|
liveUrl: "",
|
|
|
- coverUrl: "oss/images/avatar/20211013/1634097664410_1397766697",
|
|
|
+ coverUrl: "oss/images/avatar/20211013/1634097664410_1397766697"
|
|
|
},
|
|
|
newActiveLiveUrl: "",
|
|
|
newLiveUrl: [], //直播地址
|
|
@@ -479,47 +407,48 @@ export default {
|
|
|
//表单验证
|
|
|
rules: {
|
|
|
prefixName: [
|
|
|
- { required: true, message: "请输入标题前缀", trigger: "blur" },
|
|
|
+ { required: true, message: "请输入标题前缀", trigger: "blur" }
|
|
|
],
|
|
|
name: [{ required: true, message: "请输入节标题", trigger: "blur" }],
|
|
|
// liveDuration: [
|
|
|
// { required: true, message: "节时长不能为空" },
|
|
|
// { type: "number", message: "节时长必须为数字值" },
|
|
|
// ],
|
|
|
+ viewSign: [
|
|
|
+ { required: true, message: "请选择视频类型", trigger: "change" }
|
|
|
+ ],
|
|
|
recordingUrl: [
|
|
|
{
|
|
|
required: true,
|
|
|
message: "请输入URL地址",
|
|
|
- trigger: ["blur", "change"],
|
|
|
- },
|
|
|
+ trigger: ["blur", "change"]
|
|
|
+ }
|
|
|
],
|
|
|
durationTime: [
|
|
|
- { required: false, message: "请选择节时长", trigger: "change" },
|
|
|
+ { required: false, message: "请选择节时长", trigger: "change" }
|
|
|
],
|
|
|
liveUrl: [
|
|
|
{
|
|
|
required: true,
|
|
|
message: "请输入频道号",
|
|
|
- trigger: ["blur", "change"],
|
|
|
- },
|
|
|
+ trigger: ["blur", "change"]
|
|
|
+ }
|
|
|
],
|
|
|
liveStartTime: [
|
|
|
- { required: true, message: "请选择直播开始时间", trigger: "change" },
|
|
|
+ { required: true, message: "请选择直播开始时间", trigger: "change" }
|
|
|
],
|
|
|
liveEndTime: [
|
|
|
- { required: true, message: "请选择直播结束时间", trigger: "change" },
|
|
|
+ { required: true, message: "请选择直播结束时间", trigger: "change" }
|
|
|
],
|
|
|
teacherId: [
|
|
|
- { required: true, message: "请选择讲师", trigger: "change" },
|
|
|
+ { required: true, message: "请选择讲师", trigger: "change" }
|
|
|
],
|
|
|
publishStatus: [
|
|
|
- { required: true, message: "请选择是否发布", trigger: "change" },
|
|
|
- ],
|
|
|
- coverUrl: [
|
|
|
- { required: true, message: "请上传封面", trigger: "change" },
|
|
|
+ { required: true, message: "请选择是否发布", trigger: "change" }
|
|
|
],
|
|
|
+ coverUrl: [{ required: true, message: "请上传封面", trigger: "change" }]
|
|
|
},
|
|
|
- pageId: this.$route.query.id,
|
|
|
+ pageId: this.$route.query.id
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -527,12 +456,12 @@ export default {
|
|
|
immediate: true,
|
|
|
handler(newName, oldName) {
|
|
|
this.changeTypes();
|
|
|
- },
|
|
|
- },
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
mounted() {
|
|
|
this.$modal.loading("正在导入数据,请稍后...");
|
|
|
- this.$api.gradecheckGoodsChange({ sectionId: this.pageId }).then((res) => {
|
|
|
+ this.$api.gradecheckGoodsChange({ sectionId: this.pageId }).then(res => {
|
|
|
if (res.data > 0) {
|
|
|
// this.noStudent = false;
|
|
|
}
|
|
@@ -544,7 +473,7 @@ export default {
|
|
|
* 复选框点击触发
|
|
|
*/
|
|
|
handleCheckedCitiesChange() {
|
|
|
- let nid = this.newSujectOption.map((item) => {
|
|
|
+ let nid = this.newSujectOption.map(item => {
|
|
|
return item.newId;
|
|
|
});
|
|
|
this.checkAll = this.sujectArray.length === nid.length;
|
|
@@ -567,18 +496,18 @@ export default {
|
|
|
*/
|
|
|
handleCheckAllChange(val) {
|
|
|
if (val) {
|
|
|
- let nid = this.newSujectOption.map((item) => {
|
|
|
+ let nid = this.newSujectOption.map(item => {
|
|
|
return item.newId;
|
|
|
});
|
|
|
let arrays = this.sujectArray.concat(nid);
|
|
|
this.sujectArray = this.setFunc(arrays);
|
|
|
this.isIndeterminate = false;
|
|
|
} else {
|
|
|
- let nid = this.newSujectOption.map((item) => {
|
|
|
+ let nid = this.newSujectOption.map(item => {
|
|
|
return item.newId;
|
|
|
});
|
|
|
let newArr = [];
|
|
|
- this.sujectArray.forEach((item) => {
|
|
|
+ this.sujectArray.forEach(item => {
|
|
|
if (!nid.includes(item)) {
|
|
|
newArr.push(item);
|
|
|
}
|
|
@@ -618,27 +547,53 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
getApiTime(val) {
|
|
|
+ console.log("获取时长");
|
|
|
var self = this;
|
|
|
this.clearTimes(val);
|
|
|
const valueUrl = val.replace(/\s/g, "");
|
|
|
- if (valueUrl && valueUrl.length > 30) {
|
|
|
+ if (this.listData.viewSign == 2) {
|
|
|
this.disabledBtn = true;
|
|
|
this.$api
|
|
|
- .inquirepolyvvideo(valueUrl)
|
|
|
- .then((res) => {
|
|
|
+ .inquirevodvideodetail(valueUrl)
|
|
|
+ .then(res => {
|
|
|
+ console.log("请求腾讯时长", res.data.duration);
|
|
|
if (res.data.duration) {
|
|
|
- self.listData.durationTime = res.data.duration;
|
|
|
+ self.listData.durationTime = this.$methodsTools.secondToDate(
|
|
|
+ res.data.duration,
|
|
|
+ false
|
|
|
+ );
|
|
|
+ console.log("转换后的腾讯时间", self.listData.durationTime);
|
|
|
self.disabloutime = true;
|
|
|
} else {
|
|
|
self.disabloutime = false;
|
|
|
}
|
|
|
})
|
|
|
- .catch((err) => {
|
|
|
+ .catch(err => {
|
|
|
self.disabloutime = false;
|
|
|
})
|
|
|
.finally(() => {
|
|
|
this.disabledBtn = false;
|
|
|
});
|
|
|
+ } else {
|
|
|
+ if (valueUrl && valueUrl.length > 30) {
|
|
|
+ this.disabledBtn = true;
|
|
|
+ this.$api
|
|
|
+ .inquirepolyvvideo(valueUrl)
|
|
|
+ .then(res => {
|
|
|
+ if (res.data.duration) {
|
|
|
+ self.listData.durationTime = res.data.duration;
|
|
|
+ self.disabloutime = true;
|
|
|
+ } else {
|
|
|
+ self.disabloutime = false;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ self.disabloutime = false;
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ this.disabledBtn = false;
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
loadPlayerScript(callback) {
|
|
@@ -654,6 +609,19 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
+ loadPlayerScript_tencent(callback) {
|
|
|
+ if (!window.TCPlayer) {
|
|
|
+ const myScript = document.createElement("script");
|
|
|
+ myScript.setAttribute("src", this.vodPlayerJsForTCPlayer);
|
|
|
+ myScript.onload = callback;
|
|
|
+ document.body.appendChild(myScript);
|
|
|
+ } else {
|
|
|
+ callback();
|
|
|
+ this.player_tencent.on("error", (...params) => {
|
|
|
+ this.$message.error(returnTitle(params[1]));
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
loadPlayer() {
|
|
|
var self = this;
|
|
|
const polyvPlayer = window.polyvPlayer;
|
|
@@ -663,11 +631,36 @@ export default {
|
|
|
height: 533,
|
|
|
vid: self.vid,
|
|
|
teaser_show: 0,
|
|
|
- playsafe: function (vid, next) {
|
|
|
- self.$api.obtainpolyvvideosign(vid).then((res) => {
|
|
|
+ playsafe: function(vid, next) {
|
|
|
+ self.$api.obtainpolyvvideosign(vid).then(res => {
|
|
|
next(res.data);
|
|
|
});
|
|
|
- },
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ loadPlayer_tencent() {
|
|
|
+ var self = this;
|
|
|
+ const TCPlayer = window.TCPlayer;
|
|
|
+ try {
|
|
|
+ let video = document.querySelector("video");
|
|
|
+ video.parentNode.removeChild(video);
|
|
|
+ } catch (error) {
|
|
|
+ console.log("清除video标签异常");
|
|
|
+ }
|
|
|
+ let player_tencent = document.createElement("video");
|
|
|
+ player_tencent.id = "player-tencent";
|
|
|
+ document
|
|
|
+ .getElementById("player")
|
|
|
+ .insertAdjacentElement("afterend", player_tencent);
|
|
|
+ self.$api.obtaintcvideosign(self.vid).then(res => {
|
|
|
+ self.player_tencent = TCPlayer("player-tencent", {
|
|
|
+ width: 800,
|
|
|
+ height: 533,
|
|
|
+ fileID: self.vid,
|
|
|
+ appID: res.data.appID,
|
|
|
+ psign: res.data.psign,
|
|
|
+ licenseUrl: res.data.licenseUrl
|
|
|
+ });
|
|
|
});
|
|
|
},
|
|
|
/**
|
|
@@ -678,6 +671,9 @@ export default {
|
|
|
if (this.player) {
|
|
|
this.player.destroy();
|
|
|
}
|
|
|
+ if (this.player_tencent) {
|
|
|
+ this.player_tencent.dispose();
|
|
|
+ }
|
|
|
},
|
|
|
/**
|
|
|
* @param {String} 视频查看
|
|
@@ -691,12 +687,19 @@ export default {
|
|
|
this.diavos = true;
|
|
|
},
|
|
|
isOkBf() {
|
|
|
- this.loadPlayerScript(this.loadPlayer);
|
|
|
+ if (this.listData.viewSign == 2) {
|
|
|
+ this.loadPlayerScript_tencent(this.loadPlayer_tencent);
|
|
|
+ } else {
|
|
|
+ this.loadPlayerScript(this.loadPlayer);
|
|
|
+ }
|
|
|
},
|
|
|
closePlayer() {
|
|
|
if (this.player) {
|
|
|
this.player.destroy();
|
|
|
}
|
|
|
+ if (this.player_tencent) {
|
|
|
+ this.player_tencent.dispose();
|
|
|
+ }
|
|
|
},
|
|
|
/**
|
|
|
* @param {String} 直播预览
|
|
@@ -727,7 +730,7 @@ export default {
|
|
|
width: 800,
|
|
|
height: 533,
|
|
|
uid: this.uidzb,
|
|
|
- vid: this.vidzb,
|
|
|
+ vid: this.vidzb
|
|
|
});
|
|
|
},
|
|
|
clearszb() {
|
|
@@ -751,7 +754,7 @@ export default {
|
|
|
* @param: this.fileSetting -> 常规配置 上面有备注
|
|
|
* @param: 回调
|
|
|
*/
|
|
|
- uploadFile(file, this.fileSetting, (event) => {
|
|
|
+ uploadFile(file, this.fileSetting, event => {
|
|
|
this.listData.recordingUrl = event.vid;
|
|
|
this.listData.durationTime = "";
|
|
|
this.getApiTime(event.vid);
|
|
@@ -765,7 +768,7 @@ export default {
|
|
|
search() {
|
|
|
this.$api
|
|
|
.obtainCourseSection(this.pageId)
|
|
|
- .then((res) => {
|
|
|
+ .then(res => {
|
|
|
this.bfImg = res.data.coverUrl;
|
|
|
if (res.data.sectionType === 2) {
|
|
|
res.data.liveStartTime = this.$methodsTools.time10to13(
|
|
@@ -786,9 +789,9 @@ export default {
|
|
|
}
|
|
|
this.typeSection = res.data.sectionType;
|
|
|
this.listData = JSON.parse(JSON.stringify(res.data));
|
|
|
- this.$api.obtaincourseSectionbusiness(this.pageId).then((result) => {
|
|
|
+ this.$api.obtaincourseSectionbusiness(this.pageId).then(result => {
|
|
|
var arrays = [];
|
|
|
- result.data.map((item) => {
|
|
|
+ result.data.map(item => {
|
|
|
arrays.push(item.businessId + "-" + item.subjectId);
|
|
|
});
|
|
|
this.sujectApis = arrays;
|
|
@@ -806,7 +809,7 @@ export default {
|
|
|
var self = this;
|
|
|
var arrays = [];
|
|
|
this.sujectApis.map((item, index) => {
|
|
|
- this.courTypeOptions.map((items) => {
|
|
|
+ this.courTypeOptions.map(items => {
|
|
|
if (items.id === item.split("-").map(Number)[0]) {
|
|
|
var obj = {
|
|
|
educationTypeId: items.educationId,
|
|
@@ -814,9 +817,9 @@ export default {
|
|
|
projectId: items.projectId,
|
|
|
projectName: items.projectName,
|
|
|
businessId: items.id,
|
|
|
- businessName: items.businessName,
|
|
|
+ businessName: items.businessName
|
|
|
};
|
|
|
- self.sujectOption.map((i) => {
|
|
|
+ self.sujectOption.map(i => {
|
|
|
if (
|
|
|
i.id === item.split("-").map(Number)[1] &&
|
|
|
i.courseArrays.indexOf(items.projectId) !== -1
|
|
@@ -848,7 +851,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
changeUrl() {
|
|
|
- var arr = this.newSujectApis.map((val) => val.businessId);
|
|
|
+ var arr = this.newSujectApis.map(val => val.businessId);
|
|
|
const unique = [...new Set(arr)];
|
|
|
var busId = "";
|
|
|
if (unique.length) {
|
|
@@ -856,11 +859,11 @@ export default {
|
|
|
} else {
|
|
|
busId = "";
|
|
|
}
|
|
|
- this.$api.inquireCourseStreaming({ status: 1 }).then((res) => {
|
|
|
+ this.$api.inquireCourseStreaming({ status: 1 }).then(res => {
|
|
|
var arraystt = [];
|
|
|
var newarrays1tt = [];
|
|
|
var newarrays2tt = [];
|
|
|
- res.rows.map((item) => {
|
|
|
+ res.rows.map(item => {
|
|
|
if (item.streamingType === 1) {
|
|
|
arraystt.push(item);
|
|
|
}
|
|
@@ -873,11 +876,11 @@ export default {
|
|
|
});
|
|
|
this.$api
|
|
|
.inquireCourseStreaming({ status: 1, businessId: busId })
|
|
|
- .then((result) => {
|
|
|
+ .then(result => {
|
|
|
var arrays = [];
|
|
|
var newarrays1 = [];
|
|
|
var newarrays2 = [];
|
|
|
- result.rows.map((item) => {
|
|
|
+ result.rows.map(item => {
|
|
|
if (item.streamingType === 1) {
|
|
|
arrays.push(item);
|
|
|
}
|
|
@@ -922,7 +925,7 @@ export default {
|
|
|
this.$refs.popovers.doClose();
|
|
|
return;
|
|
|
}
|
|
|
- this.newSujectOption.map((item) => {
|
|
|
+ this.newSujectOption.map(item => {
|
|
|
item.newId = this.courType + "-" + item.id;
|
|
|
});
|
|
|
this.handleCheckedCitiesChange();
|
|
@@ -939,7 +942,7 @@ export default {
|
|
|
},
|
|
|
tearchApi() {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
- this.$api.inquiresystemteacherlist({ status: 1 }).then((res) => {
|
|
|
+ this.$api.inquiresystemteacherlist({ status: 1 }).then(res => {
|
|
|
this.teacherList = res.rows;
|
|
|
resolve();
|
|
|
});
|
|
@@ -947,7 +950,7 @@ export default {
|
|
|
},
|
|
|
eduTys() {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
- this.$api.inquireCourseEducationType({ status: 1 }).then((res) => {
|
|
|
+ this.$api.inquireCourseEducationType({ status: 1 }).then(res => {
|
|
|
this.eduTypeOptions = res.rows;
|
|
|
resolve();
|
|
|
});
|
|
@@ -955,7 +958,7 @@ export default {
|
|
|
},
|
|
|
courseTys() {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
- this.$api.inquireCourseProjectType({ status: 1 }).then((res) => {
|
|
|
+ this.$api.inquireCourseProjectType({ status: 1 }).then(res => {
|
|
|
this.projectTypeOptions = res.rows;
|
|
|
resolve();
|
|
|
});
|
|
@@ -963,7 +966,7 @@ export default {
|
|
|
},
|
|
|
businTys() {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
- this.$api.inquirebusinessList({ status: 1 }).then((res) => {
|
|
|
+ this.$api.inquirebusinessList({ status: 1 }).then(res => {
|
|
|
this.courTypeOptions = res.rows;
|
|
|
this.newCourTypeOptions = res.rows;
|
|
|
resolve();
|
|
@@ -972,7 +975,7 @@ export default {
|
|
|
},
|
|
|
courseSubject() {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
- this.$api.inquireCourseSubject({ status: 1 }).then((res) => {
|
|
|
+ this.$api.inquireCourseSubject({ status: 1 }).then(res => {
|
|
|
res.rows.map((item, index) => {
|
|
|
var array = [];
|
|
|
item.courseProjectTypes.map((items, indexs) => {
|
|
@@ -987,11 +990,11 @@ export default {
|
|
|
},
|
|
|
Streaming() {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
- this.$api.inquireCourseStreaming({ status: 1 }).then((res) => {
|
|
|
+ this.$api.inquireCourseStreaming({ status: 1 }).then(res => {
|
|
|
var arrays = [];
|
|
|
var newarrays1 = [];
|
|
|
var newarrays2 = [];
|
|
|
- res.rows.map((item) => {
|
|
|
+ res.rows.map(item => {
|
|
|
if (item.streamingType === 1) {
|
|
|
arrays.push(item);
|
|
|
}
|
|
@@ -1014,7 +1017,7 @@ export default {
|
|
|
this.courType = "";
|
|
|
}
|
|
|
var arrays = [];
|
|
|
- this.courTypeOptions.map((item) => {
|
|
|
+ this.courTypeOptions.map(item => {
|
|
|
if (item.educationId === this.eduType) {
|
|
|
arrays.push(item);
|
|
|
}
|
|
@@ -1035,7 +1038,7 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
var arrays = [];
|
|
|
- this.courTypeOptions.map((item) => {
|
|
|
+ this.courTypeOptions.map(item => {
|
|
|
if (item.educationId === this.eduType) {
|
|
|
arrays.push(item);
|
|
|
}
|
|
@@ -1044,7 +1047,7 @@ export default {
|
|
|
this.$refs.popovers.doClose();
|
|
|
},
|
|
|
submit(formName) {
|
|
|
- this.$refs[formName].validate((valid) => {
|
|
|
+ this.$refs[formName].validate(valid => {
|
|
|
if (valid) {
|
|
|
if (!this.newSujectApis.length) {
|
|
|
this.$message.error("请选择适用业务层级");
|
|
@@ -1070,11 +1073,12 @@ export default {
|
|
|
status: 1,
|
|
|
sectionId: this.pageId,
|
|
|
businessList: this.newSujectApis,
|
|
|
+ viewSign: this.listData.viewSign,
|
|
|
coverUrl: this.listData.coverUrl,
|
|
|
name: this.listData.name,
|
|
|
prefixName: this.listData.prefixName,
|
|
|
publishStatus: this.listData.publishStatus,
|
|
|
- teacherId: this.listData.teacherId,
|
|
|
+ teacherId: this.listData.teacherId
|
|
|
};
|
|
|
|
|
|
if (this.listData.sectionType === 2) {
|
|
@@ -1116,22 +1120,20 @@ export default {
|
|
|
}
|
|
|
this.$api
|
|
|
.editCourseSection(dataInfos)
|
|
|
- .then((res) => {
|
|
|
+ .then(res => {
|
|
|
this.$message.success("修改成功");
|
|
|
setTimeout(() => {
|
|
|
- this.$store
|
|
|
- .dispatch("tagsView/exitView", this.$route)
|
|
|
- .then((res) => {
|
|
|
- if (this.$store.getters.festivalPage) {
|
|
|
- this.$router.push({
|
|
|
- path: this.$store.getters.festivalPage.name,
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.$router.push({
|
|
|
- path: "festival",
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
+ this.$store.dispatch("tagsView/exitView", this.$route).then(res => {
|
|
|
+ if (this.$store.getters.festivalPage) {
|
|
|
+ this.$router.push({
|
|
|
+ path: this.$store.getters.festivalPage.name
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$router.push({
|
|
|
+ path: "festival"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
}, 500);
|
|
|
})
|
|
|
.catch(() => {
|
|
@@ -1139,14 +1141,14 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
backPage() {
|
|
|
- this.$store.dispatch("tagsView/delView", this.$route).then((res) => {
|
|
|
+ this.$store.dispatch("tagsView/delView", this.$route).then(res => {
|
|
|
if (this.$store.getters.festivalPage) {
|
|
|
this.$router.push({
|
|
|
- path: this.$store.getters.festivalPage.name,
|
|
|
+ path: this.$store.getters.festivalPage.name
|
|
|
});
|
|
|
} else {
|
|
|
this.$router.push({
|
|
|
- path: "festival",
|
|
|
+ path: "festival"
|
|
|
});
|
|
|
}
|
|
|
});
|
|
@@ -1158,7 +1160,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
changeLiveUrl() {
|
|
|
- this.newLiveUrl.map((item) => {
|
|
|
+ this.newLiveUrl.map(item => {
|
|
|
if (item.id === this.newActiveLiveUrl) {
|
|
|
this.listData.liveUrl = item.liveUrl;
|
|
|
}
|
|
@@ -1166,7 +1168,7 @@ export default {
|
|
|
this.newActiveLiveUrl = "";
|
|
|
},
|
|
|
changeRecordingUrl1() {
|
|
|
- this.newSteamUrl1.map((item) => {
|
|
|
+ this.newSteamUrl1.map(item => {
|
|
|
if (item.id === this.newActiveRecordingUrl1) {
|
|
|
this.listData.recordingUrl = item.recordingVideoId;
|
|
|
this.getApiTime(item.recordingVideoId);
|
|
@@ -1175,7 +1177,7 @@ export default {
|
|
|
this.newActiveRecordingUrl1 = "";
|
|
|
},
|
|
|
changeRecordingUrl2() {
|
|
|
- this.newSteamUrl2.map((item) => {
|
|
|
+ this.newSteamUrl2.map(item => {
|
|
|
if (item.id === this.newActiveRecordingUrl2) {
|
|
|
this.listData.recordingUrl = item.playbackUrl;
|
|
|
this.getApiTime(item.recordingVideoId);
|
|
@@ -1194,7 +1196,10 @@ export default {
|
|
|
self.$message.error("图片不得大于300kb");
|
|
|
return;
|
|
|
}
|
|
|
- var type = self.$refs.file.value.toLowerCase().split(".").splice(-1);
|
|
|
+ var type = self.$refs.file.value
|
|
|
+ .toLowerCase()
|
|
|
+ .split(".")
|
|
|
+ .splice(-1);
|
|
|
if (
|
|
|
type[0] != "jpg" &&
|
|
|
type[0] != "png" &&
|
|
@@ -1205,15 +1210,15 @@ export default {
|
|
|
self.$refs.file.value = "";
|
|
|
return;
|
|
|
}
|
|
|
- this.$upload.upload(file, 0).then((res) => {
|
|
|
+ this.$upload.upload(file, 0).then(res => {
|
|
|
self.listData.coverUrl = res;
|
|
|
self.$refs.listData.validateField("coverUrl");
|
|
|
});
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
destroyed() {
|
|
|
this.closePlayer();
|
|
|
- },
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
|