Commit d9d5dba7 authored by 刘怀志's avatar 刘怀志

文章管理暂存-4

parent 1f1359b4
......@@ -88,7 +88,7 @@ export function shareShop(data) {
// 课程管理-章节查询视频
export function getVideoUrl(params) {
return request({
url: '/cmsnews/getVideoUrl',
url: '/cmsvideo/getVideoUrl',
method: 'get',
params,
headers: {}
......
......@@ -375,6 +375,7 @@ export default {
type: 'success'
})
this.shareShopDiaLog = false
this.loadData()
}
this.shareShopLoading = false
}).catch(e => { this.shareShopLoading = false })
......
......@@ -14,9 +14,9 @@
/>
</el-select>
</el-form-item>
<el-form-item label="标题:" prop="username">
<el-form-item label="标题:" prop="videoTitle">
<el-input
v-model.trim="queryParams.title"
v-model.trim="queryParams.videoTitle"
placeholder="请输入标题"
clearable
:maxlength="30"
......@@ -83,32 +83,20 @@
<span>{{ scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column align="left" prop="title" label="视频标题" width="300" show-overflow-tooltip />
<el-table-column align="left" label="视频标题图" prop="pictureId">
<template slot-scope="scope">
<div :id="step(scope.$index)">
<el-image :src="scope.row.path" :preview-src-list="[scope.row.path]" style="width:100%;height:100%;" @mouseover="justEnter($event)" @mouseout="justOut($event)" />
</div>
</template>
</el-table-column>
<el-table-column align="left" prop="videoTitle" label="视频标题" width="300" show-overflow-tooltip />
<!-- <el-table-column align="left" prop="isForntPage" label="是否为头条视频" show-overflow-tooltip>-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ scope.row.isForntPage === 1 ? '是' : '否' }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column align="left" prop="isTop" width="150" label="是否为置顶视频" show-overflow-tooltip>
<template slot-scope="scope">
<span>{{ scope.row.isTop === 1 ? '是' : '否' }}</span>
</template>
</el-table-column>
<el-table-column align="left" prop="isRecommended" width="150" label="是否为推荐视频" show-overflow-tooltip>
<template slot-scope="scope">
<span>{{ scope.row.isRecommended === 1 ? '是' : '否' }}</span>
<span>{{ scope.row.homeDisplay === '1' ? '是' : '否' }}</span>
</template>
</el-table-column>
<el-table-column align="left" prop="newsType" width="150" label="视频来源" show-overflow-tooltip>
<el-table-column align="left" prop="videoType" width="150" label="视频来源" show-overflow-tooltip>
<template slot-scope="scope">
<span>{{ newsTypeMap[scope.row.newsType] }}</span>
<span>{{ newsTypeMap[scope.row.videoType] }}</span>
</template>
</el-table-column>
......@@ -124,9 +112,9 @@
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column align="left" prop="releaseDate" label="发布日期" show-overflow-tooltip>
<el-table-column align="left" prop="releaseTime" label="发布日期" show-overflow-tooltip>
<template slot-scope="scope">
<span>{{ scope.row.releaseDate }}</span>
<span>{{ scope.row.releaseTime }}</span>
</template>
</el-table-column>
<el-table-column align="left" prop="readNum" label="阅读量" show-overflow-tooltip>
......@@ -328,7 +316,7 @@ export default {
rows: 10,
flag: '',
deptId: '',
title: ''
videoTitle: ''
},
// pagination
total: 0,
......@@ -366,7 +354,7 @@ export default {
const temp = {
newsVideoId: this.ruleForm.row,
unitId: this.ruleForm.shops.join(','),
type: '0'
type: '1'
}
shareShop(temp).then(response => {
if (response.code === 200) {
......@@ -375,6 +363,7 @@ export default {
type: 'success'
})
this.shareShopDiaLog = false
this.loadData()
}
this.shareShopLoading = false
}).catch(e => { this.shareShopLoading = false })
......@@ -451,7 +440,7 @@ export default {
rows: 10,
flag: '',
deptId: '',
title: ''
videoTitle: ''
}
this.dateRange = []
......@@ -476,7 +465,7 @@ export default {
page: _this.queryParams.page,
rows: _this.queryParams.rows,
flag: _this.queryParams.flag,
title: _this.queryParams.title,
videoTitle: _this.queryParams.videoTitle,
deptId: _this.queryParams.deptId,
// plate: _this.queryParams.plate,
beginTime: _this.queryParams.beginTime,
......
......@@ -99,10 +99,12 @@
prop="videoUrlId"
>
<el-upload
v-if="!secondFromDisabled"
:disabled="secondFromDisabled"
class="upload-demo"
drag
class="avatar-uploader"
action="#"
drag
:show-file-list="false"
:http-request="handleUploadVideo"
:on-success="handleAvatarSuccessVideo"
:before-upload="beforeAvatarUploadVideo"
......@@ -112,7 +114,7 @@
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
<div slot="tip" class="el-upload__tip">只能上传 mp4 格式的视频文件!</div>
</el-upload>
<el-button :disabled="!videoUrl" @click="previewVideo">视频预览</el-button>
</el-form-item>
</el-col>
</el-row>
......@@ -212,11 +214,11 @@ export default {
isList: [
{
label: '是',
value: 1
value: '1'
},
{
label: '否',
value: 0
value: '0'
}
],
......@@ -300,6 +302,8 @@ export default {
formData.append('temp', 'videoInformation')
uploadPublic(formData).then(res => {
console.log('handleUploadVideo', res)
this.$message.success('上传成功')
this.videoUrl = res.data.businessId
this.form.videoUrlId = res.data.businessId
// this.playerOptions.sources[0].src = urlDecrypt(res.data.url)
})
......@@ -334,6 +338,7 @@ export default {
if (res.code === 200) {
this.form = res.data
this.imageUrl = res.data.path
this.videoUrl = res.data.videoUrlId
}
})
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment