|
@@ -1,4 +1,40 @@
|
|
|
+<style>
|
|
|
+ .chouzhen span {
|
|
|
+ display: inline-block;
|
|
|
+ }
|
|
|
+</style>
|
|
|
<style scoped lang="scss">
|
|
|
+ .chouzhen {
|
|
|
+ border-style: solid;
|
|
|
+ border-width: 1px;
|
|
|
+ border-color: #e4e4e4;
|
|
|
+ width: calc(20% - 10px);
|
|
|
+ padding: 10px;
|
|
|
+ margin-right: 10px;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ background: #fff;
|
|
|
+ position: relative;
|
|
|
+ z-index: 99;
|
|
|
+ float: left
|
|
|
+ }
|
|
|
+
|
|
|
+ li.chouzhen.first:before {
|
|
|
+ font-size: 12px;
|
|
|
+ content: "首帧";
|
|
|
+ position: absolute;
|
|
|
+ top: 7px;
|
|
|
+ left: 5px;
|
|
|
+ width: 36px;
|
|
|
+ height: 20px;
|
|
|
+ color: rgb(255, 255, 255);
|
|
|
+ line-height: 20px;
|
|
|
+ text-align: center;
|
|
|
+ background: rgba(255, 0, 0, 0.5);
|
|
|
+ border-radius: 2px;
|
|
|
+ }
|
|
|
+
|
|
|
.actor-photo-list {
|
|
|
display: flex;
|
|
|
padding-left: 0;
|
|
@@ -70,6 +106,8 @@
|
|
|
<a-form-item label="">
|
|
|
<a @click="getVideoList('image', index, item, bestIndex)">选择封面</a>
|
|
|
<a @click="uploadImages(index,bestIndex)" style="margin-left:10px">上传封面</a>
|
|
|
+ <a @click="showImages(index,bestIndex)" v-if="item.chouzhenShow"
|
|
|
+ style="margin-left:10px">推荐封面</a>
|
|
|
<br />
|
|
|
<span v-for="(item,deleteIndex) of item.imageList" style="position:relative;">
|
|
|
<img :src="item.url" style="width:18%;margin:1%;" :key="item.url" />
|
|
@@ -183,6 +221,30 @@
|
|
|
<span v-if="messageTip" style="color:red">{{messageTip}}</span>
|
|
|
</a-form-item>
|
|
|
</a-modal>
|
|
|
+ <a-modal title="抽帧展示" v-model="chouzhen" width="60%">
|
|
|
+ <template slot="footer">
|
|
|
+ <a-button key="back" @click="chouzhen=false">关闭</a-button>
|
|
|
+ <a-button key="submit" type="primary" @click="handleOkChouzhen">
|
|
|
+ 确定
|
|
|
+ </a-button>
|
|
|
+ </template>
|
|
|
+ <a-button type="primary" @click="onCheckAllChange">
|
|
|
+ 全选
|
|
|
+ </a-button>
|
|
|
+ <!-- </a-checkbox> -->
|
|
|
+ <ul v-if="chouzhenList.length>0" style="height:600px;overflow:auto;padding-left:0">
|
|
|
+
|
|
|
+ <a-checkbox-group v-model="checkList" @change="onChange">
|
|
|
+ <li v-for="(item,index) of chouzhenList" :key="index" class="chouzhen" :class="{'first':index == 0}">
|
|
|
+
|
|
|
+ <img :src="item.url" alt="" style="width:100%">
|
|
|
+ <a-checkbox :value="item.signature" style="position:absolute;z-index: 100;right:0;top:0;"></a-checkbox>
|
|
|
+
|
|
|
+ </li>
|
|
|
+ </a-checkbox-group>
|
|
|
+ </ul>
|
|
|
+
|
|
|
+ </a-modal>
|
|
|
|
|
|
</a-card>
|
|
|
</template>
|
|
@@ -219,6 +281,11 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ chouzhen: false,
|
|
|
+ chouzhenList: [],
|
|
|
+ checkList: [],
|
|
|
+ indeterminate: true,
|
|
|
+ checkAll: false,
|
|
|
pans: [],
|
|
|
pansKey: '',
|
|
|
addImageVisible: false,
|
|
@@ -293,6 +360,27 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ onChange(checkedList) {
|
|
|
+ this.indeterminate = !!checkedList.length && checkedList.length < this.chouzhenList.length;
|
|
|
+ this.checkAll = checkedList.length === this.chouzhenList.length;
|
|
|
+ },
|
|
|
+ onCheckAllChange(e) {
|
|
|
+ if (this.checkAll) {
|
|
|
+ this.checkList = []
|
|
|
+ } else {
|
|
|
+ this.checkList = this.chouzhenList.map(item => {
|
|
|
+ return item.signature
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.checkAll = !this.checkAll
|
|
|
+ // Object.assign(this, {
|
|
|
+ // checkList: e.target.checked ? this.chouzhenList.map(item => {
|
|
|
+ // return item.signature
|
|
|
+ // }) : [],
|
|
|
+ // indeterminate: false,
|
|
|
+ // checkAll: e.target.checked,
|
|
|
+ // });
|
|
|
+ },
|
|
|
onCheckAllImageChange(index, item) {
|
|
|
|
|
|
if (this.pans[index].list[item.key].checkAllImage) {
|
|
@@ -341,6 +429,21 @@
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
+ var params = {
|
|
|
+ videoSignature: item.video.signature,
|
|
|
+ pageSize: 20,
|
|
|
+ pageNo: 1
|
|
|
+ }
|
|
|
+ getAction('/cutFrame/material/list', params).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ if (res.success) {
|
|
|
+ if (res.result.records.length > 0) {
|
|
|
+ this.pans[index].list[item.key].chouzhenShow = true
|
|
|
+ } else {
|
|
|
+ this.pans[index].list[item.key].chouzhenShow = false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
} else {
|
|
|
this.pans[index].list[item.key].imageList.push(...item.image)
|
|
|
}
|
|
@@ -496,7 +599,8 @@
|
|
|
actionBarText: '',
|
|
|
imageUrlList: [],
|
|
|
checkArrImage: [],
|
|
|
- checkAllImage: false
|
|
|
+ checkAllImage: false,
|
|
|
+ chouzhenShow: false
|
|
|
})
|
|
|
},
|
|
|
deleteCreative(bestIndex, index) {
|
|
@@ -506,10 +610,46 @@
|
|
|
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
},
|
|
|
uploadVideo(index, bestIndex) {
|
|
|
+ console.log(index, bestIndex)
|
|
|
nowIndex = index
|
|
|
bestIndex = bestIndex
|
|
|
this.addVideoVisible = true
|
|
|
},
|
|
|
+ handleOkChouzhen(e) {
|
|
|
+
|
|
|
+ var arr = []
|
|
|
+ for (let i = 0; i < this.chouzhenList.length; i++) {
|
|
|
+ for (let j = 0; j < this.checkList.length; j++) {
|
|
|
+ if (this.chouzhenList[i].signature == this.checkList[j]) {
|
|
|
+ arr.push(this.chouzhenList[i])
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ this.pans[bestIndex].list[nowIndex].imageList = arr
|
|
|
+ this.chouzhen = false
|
|
|
+ this.chouzhenList = []
|
|
|
+ this.checkList = []
|
|
|
+ this.checkAll = false
|
|
|
+ },
|
|
|
+ showImages(index, bestIndex) {
|
|
|
+ this.chouzhen = true
|
|
|
+ this.chouzhenList = []
|
|
|
+ nowIndex = index
|
|
|
+ bestIndex = bestIndex
|
|
|
+ var params = {
|
|
|
+ videoSignature: this.pans[index].list[bestIndex].videoList.signature,
|
|
|
+ pageSize: 20,
|
|
|
+ pageNo: 1
|
|
|
+ }
|
|
|
+ getAction('/cutFrame/material/list', params).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ if (res.success) {
|
|
|
+ this.chouzhenList.push(...res.result.records)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
uploadImages(index, bestIndex) {
|
|
|
nowIndex = index
|
|
|
bestIndex = bestIndex
|
|
@@ -545,7 +685,7 @@
|
|
|
}
|
|
|
postAction("/kusiShouUpload/image", params).then(res => {
|
|
|
if (res.success) {
|
|
|
- this.pans[nowIndex].list[bestIndex].imageList = res.result
|
|
|
+ this.pans[bestIndex].list[nowIndex].imageList = res.result
|
|
|
this.closeImage()
|
|
|
this.loadingImage = false
|
|
|
} else {
|
|
@@ -706,11 +846,26 @@
|
|
|
handleOkVideo(e) {
|
|
|
this.loadingVideo = true
|
|
|
if (showRemove) {
|
|
|
- this.pans[nowIndex].list[bestIndex].videoList = {
|
|
|
+ this.pans[bestIndex].list[nowIndex].videoList = {
|
|
|
photoId: this.urlList.photoId,
|
|
|
url: this.urlList.url
|
|
|
}
|
|
|
this.loadingVideo = false
|
|
|
+ var params = {
|
|
|
+ videoSignature: this.urlList.md5,
|
|
|
+ pageSize: 20,
|
|
|
+ pageNo: 1
|
|
|
+ }
|
|
|
+ getAction('/cutFrame/material/list', params).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ if (res.success) {
|
|
|
+ if (res.result.records.length > 0) {
|
|
|
+ this.pans[bestIndex].list[nowIndex].chouzhenShow = true
|
|
|
+ } else {
|
|
|
+ this.pans[bestIndex].list[nowIndex].chouzhenShow = false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
this.closeVideo()
|
|
|
} else {
|
|
|
var params = {
|
|
@@ -722,7 +877,7 @@
|
|
|
postAction("/kusiShouUpload/video", params).then(res => {
|
|
|
console.log(res)
|
|
|
if (res.success) {
|
|
|
- this.pans[nowIndex].list[bestIndex].videoList = {
|
|
|
+ this.pans[bestIndex].list[nowIndex].videoList = {
|
|
|
photoId: res.result.photoId,
|
|
|
url: this.urlList.url
|
|
|
}
|