Commit 0dd33c4e authored by 黄奎's avatar 黄奎

页面修改

parent 41e1b0f3
...@@ -117,9 +117,7 @@ ...@@ -117,9 +117,7 @@
:content="item.Name" placement="top-start"> :content="item.Name" placement="top-start">
<div @click="PageSelect(item,index)" :class="item.Selected ? 'selected' :''" <div @click="PageSelect(item,index)" :class="item.Selected ? 'selected' :''"
class="el-tooltip item material-item "> class="el-tooltip item material-item ">
<img :src="getIconLink(item.Image)" class="material-img" style="width: 140px; height: 140px;"> <img :src="getIconLink(item.Image)" class="material-img" style="width: 140px; height: 140px;">
<div class="material-video-info"><i class="el-icon-video-play"></i> <div class="material-video-info"><i class="el-icon-video-play"></i>
<span>{{Time(item.VideoTime)}}</span></div> <span>{{Time(item.VideoTime)}}</span></div>
<div flex="dir:left" style="margin-top: 5px;"> <div flex="dir:left" style="margin-top: 5px;">
...@@ -475,7 +473,6 @@ ...@@ -475,7 +473,6 @@
that.addpageMsg.Image = res.VideoCoverImg; that.addpageMsg.Image = res.VideoCoverImg;
that.addpageMsg.Path = res.FileUrl; that.addpageMsg.Path = res.FileUrl;
that.addpageMsg.Name = res.FileName; that.addpageMsg.Name = res.FileName;
that.addPageList(); that.addPageList();
that.$forceUpdate(); that.$forceUpdate();
} }
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<div class="basefix app-attachment-list"> <div class="basefix app-attachment-list">
<div class="material-item material-upload"> <div class="material-item material-upload">
<el-upload class="avatar-uploader" action="" accept="video/mp4,video/ogg,video/webm" :show-file-list="false" <el-upload class="avatar-uploader" action="" accept="video/mp4,video/ogg,video/webm" :show-file-list="false"
:http-request="UploadImage"> :http-request="UploadVideo">
<div class="app-upload" flex="main:center cross:center" style="width: 100px; height: 100px;"> <div class="app-upload" flex="main:center cross:center" style="width: 100px; height: 100px;">
<i class="el-icon-upload"></i> <i class="el-icon-upload"></i>
</div> </div>
...@@ -52,21 +52,13 @@ ...@@ -52,21 +52,13 @@
placement="top-start"> placement="top-start">
<div @click="PageSelect(item,index)" :class="selectId==item.Id ? 'selected' :''" <div @click="PageSelect(item,index)" :class="selectId==item.Id ? 'selected' :''"
class="el-tooltip item material-item "> class="el-tooltip item material-item ">
<img :src="getIconLink(item.Path)+'?x-oss-process=video/snapshot,t_9,f_jpg,w_299,h_0,m_fast'" <img :src="getIconLink(item.Image)" class="material-img" style="width: 100px; height: 100px;">
class="material-img" style="width: 100px; height: 100px;">
<div class="material-video-info"><i class="el-icon-video-play"></i> <span>{{item.VideoTime}}</span></div> <div class="material-video-info"><i class="el-icon-video-play"></i> <span>{{item.VideoTime}}</span></div>
<div flex="dir:left" style="margin-top: 5px;"> <div flex="dir:left" style="margin-top: 5px;">
<div class="material-name">{{item.Name}}</div> <div class="material-name">{{item.Name}}</div>
<!-- <div style="margin: 0px 5px;">|</div>
<div>
<button type="button" class="el-button el-button--text" style="padding: 0px;">
<span @click="EditPage(item)">编辑</span>
</button>
</div> -->
</div> </div>
</div> </div>
</el-tooltip> </el-tooltip>
</div> </div>
<div style="padding-right:10px"> <div style="padding-right:10px">
<el-pagination style="text-align:right" background :current-page="currentPage4" <el-pagination style="text-align:right" background :current-page="currentPage4"
...@@ -87,9 +79,6 @@ ...@@ -87,9 +79,6 @@
show-word-limit> show-word-limit>
</el-input> </el-input>
</el-form-item> </el-form-item>
<!-- <el-form-item label="排序" prop="Sort">
<el-input @keyup.native="checkInteger(addGroupMsg,'Sort')" size="small" v-model="addGroupMsg.Sort"></el-input>
</el-form-item> -->
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" @click="addGroupMsgDig = false">取 消</el-button> <el-button size="small" @click="addGroupMsgDig = false">取 消</el-button>
...@@ -165,9 +154,6 @@ ...@@ -165,9 +154,6 @@
selectId: -1, selectId: -1,
emitmsg: {}, emitmsg: {},
} }
},
created() {
}, },
computed: { computed: {
NewItems() { NewItems() {
...@@ -186,10 +172,22 @@ ...@@ -186,10 +172,22 @@
this.GetPageList(); this.GetPageList();
}, },
methods: { methods: {
//上传视频
UploadVideo(file) {
var that = this;
this.UploadSelfFile(this.FileType().Video, file.file, res => {
if (res.resultCode == 1) {
that.addpageMsg.Image = res.VideoCoverImg;
that.addpageMsg.Path = res.FileUrl;
that.addpageMsg.Name = res.FileName;
that.addPageList();
that.$forceUpdate();
}
})
},
InitData(Type) { InitData(Type) {
this.czType = Type; this.czType = Type;
this.selectId = -1; this.selectId = -1;
}, },
SelectImgId() { SelectImgId() {
this.$emit('Selectvideo', this.emitmsg) this.$emit('Selectvideo', this.emitmsg)
...@@ -209,18 +207,16 @@ ...@@ -209,18 +207,16 @@
this.apipost("/api/product/SetMaterialInfo", this.addpageMsg, res => { this.apipost("/api/product/SetMaterialInfo", this.addpageMsg, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.GetPageList(); this.GetPageList();
} }
}) })
}, },
PageSelect(item) { PageSelect(item) {
this.emitmsg = { this.emitmsg = {
Path: this.domainManager().ImageUrl + item.Path, Path:item.Path,
Id: item.Id Id: item.Id
} }
this.selectId = item.Id; this.selectId = item.Id;
}, },
addGroup() { addGroup() {
this.addGroupMsgDig = true; this.addGroupMsgDig = true;
this.addGroupMsg = { this.addGroupMsg = {
...@@ -229,7 +225,6 @@ ...@@ -229,7 +225,6 @@
Type: 2, Type: 2,
Sort: '', Sort: '',
} }
}, },
HsGroup(item) { HsGroup(item) {
let that = this; let that = this;
...@@ -245,7 +240,6 @@ ...@@ -245,7 +240,6 @@
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
this.GetMemberGradeList(); this.GetMemberGradeList();
this.Success(res.data.message) this.Success(res.data.message)
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
...@@ -274,7 +268,6 @@ ...@@ -274,7 +268,6 @@
this.GetMemberGradeList(); this.GetMemberGradeList();
this.Success(res.data.message) this.Success(res.data.message)
this.addGroupMsgDig = false; this.addGroupMsgDig = false;
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
...@@ -308,11 +301,8 @@ ...@@ -308,11 +301,8 @@
this.total = res.data.data.count; this.total = res.data.data.count;
let data = res.data.data.pageData; let data = res.data.data.pageData;
this.PageList = data; this.PageList = data;
}) })
}, },
}, },
} }
......
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