Commit 250802f0 authored by 黄媛媛's avatar 黄媛媛

update

parent c2f55d3d
...@@ -114,8 +114,10 @@ export default { ...@@ -114,8 +114,10 @@ export default {
}, },
methods: { methods: {
Search(){ Search(){
this.dataList=[]; this.msg.pageIndex=1;
this.getList(); this.nodata=false;
this.dataList=[];
this.getList();
}, },
Setvideo(){ Setvideo(){
this.videoDivState=false; this.videoDivState=false;
...@@ -137,6 +139,8 @@ export default { ...@@ -137,6 +139,8 @@ export default {
}, },
SelectLineId(id){ SelectLineId(id){
this.dataList=[]; this.dataList=[];
this.nodata=false;
this.msg.pageIndex=1;
this.msg.LineId=id; this.msg.LineId=id;
this.getList(); this.getList();
}, },
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
<el-button @click="Search" slot="append" icon="el-icon-search"></el-button> <el-button @click="Search" slot="append" icon="el-icon-search"></el-button>
</el-input> </el-input>
<el-button style="margin-left:20px" size="small" type="danger" @click="addList" round>新增</el-button> <el-button style="margin-left:20px" size="small" type="danger" @click="addList" round>新增</el-button>
<el-button style="margin-left:20px" size="small" type="primary" @click="goUrlHome" round>返回</el-button>
</div> </div>
<div v-loading="loading" class="Content"> <div v-loading="loading" class="Content">
<ul class="videoUl"> <ul class="videoUl">
...@@ -92,6 +93,7 @@ ...@@ -92,6 +93,7 @@
<el-select style="width:220px" v-model="addMsg.VideoStatus" placeholder="请选择状态"> <el-select style="width:220px" v-model="addMsg.VideoStatus" placeholder="请选择状态">
<el-option label="发布" :value="1"></el-option> <el-option label="发布" :value="1"></el-option>
<el-option label="草稿" :value="2"></el-option> <el-option label="草稿" :value="2"></el-option>
<el-option label="撤回" :value="3"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item style="display:inline-block" label="线路" prop="LineId"> <el-form-item style="display:inline-block" label="线路" prop="LineId">
...@@ -218,6 +220,8 @@ export default { ...@@ -218,6 +220,8 @@ export default {
}, },
methods: { methods: {
Search(){ Search(){
this.msg.pageIndex=1;
this.nodata=false;
this.dataList=[]; this.dataList=[];
this.getList(); this.getList();
}, },
...@@ -275,12 +279,16 @@ export default { ...@@ -275,12 +279,16 @@ export default {
// }); // });
// }, // },
uploadFileBtn(file) { uploadFileBtn(file) {
if (['video/mp4', 'video/ogg', 'video/flv', 'video/avi', 'video/wmv', 'video/rmvb', 'video/mov'].indexOf(file.file.type) == -1) {
this.Error("请上传正确的视频格式");
return;
}
let newArr = []; let newArr = [];
newArr.push(file.file); newArr.push(file.file);
let path = "/Sale/Uploadvideo/"; let path = "/Sale/Uploadvideo/";
this.uploadFile(path, newArr, x => { this.uploadFile(path, newArr, x => {
this.addMsg.VideoAddress=this.baseurl+x.name; this.addMsg.VideoAddress=this.baseurl+x.name;
let lastUrl="?x-oss-process=video/snapshot,t_1,f_jpg,w_290,h_195,m_fast"; let lastUrl="?x-oss-process=video/snapshot,t_9,f_jpg,w_290,h_195,m_fast";
this.addMsg.Cover=this.addMsg.VideoAddress+lastUrl; this.addMsg.Cover=this.addMsg.VideoAddress+lastUrl;
}); });
}, },
...@@ -322,6 +330,9 @@ export default { ...@@ -322,6 +330,9 @@ export default {
this.apipost('Video_post_CancelVidelInfo', {VideoId:item.Id}, res => { this.apipost('Video_post_CancelVidelInfo', {VideoId:item.Id}, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.Success(res.data.message) this.Success(res.data.message)
this.dataList=[];
this.msg.pageIndex=1;
this.nodata=false;
this.getList() this.getList()
}else{ }else{
this.Error(res.data.message) this.Error(res.data.message)
...@@ -342,6 +353,9 @@ export default { ...@@ -342,6 +353,9 @@ export default {
this.apipost('Video_post_DelVidelInfo', {VideoId:item.Id}, res => { this.apipost('Video_post_DelVidelInfo', {VideoId:item.Id}, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.Success(res.data.message) this.Success(res.data.message)
this.dataList=[];
this.msg.pageIndex=1;
this.nodata=false;
this.getList() this.getList()
}else{ }else{
this.Error(res.data.message) this.Error(res.data.message)
...@@ -362,6 +376,9 @@ export default { ...@@ -362,6 +376,9 @@ export default {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.Success(res.data.message) this.Success(res.data.message)
this.dialogVisible=false; this.dialogVisible=false;
this.dataList=[];
this.msg.pageIndex=1;
this.nodata=false;
this.getList() this.getList()
}else{ }else{
this.Error(res.data.message) this.Error(res.data.message)
...@@ -384,6 +401,14 @@ export default { ...@@ -384,6 +401,14 @@ export default {
this.dialogVisible=true; this.dialogVisible=true;
}, },
goUrlHome(){
this.$router.push({
name:'Educationvideo',
query: {
blank: "y"
}
});
},
goUrl(path,item){ goUrl(path,item){
this.videoDivState=true; this.videoDivState=true;
this.thisVideoAddress=item.VideoAddress; this.thisVideoAddress=item.VideoAddress;
......
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