Forráskód Böngészése

提交代码,抽帧

zhuxinbo 5 éve
szülő
commit
a27f3b64d1

+ 20 - 19
src/views/modules/Statistics/videoStatics/vMonth.vue

@@ -318,24 +318,24 @@ let detailConsum = [
       return obj
     }
   },
-//   {
-//     title: '视频链接',
-//     dataIndex: 'url',
-//     align: 'center',
-//     width:250,
-//     customRender: (value, row, index) => {
-//       const obj = {
-//         children: value,
-//         attrs: {}
-//       }
-//       if (index === 0) {         
-//               obj.attrs.rowSpan = length     
-//       } else {
-//         obj.attrs.rowSpan = 0
-//       }
-//       return obj
-//     }
-//   },
+  {
+    title: '项目名称',
+    dataIndex: 'projectName',
+    align: 'center',
+    width:150,
+    customRender: (value, row, index) => {
+      const obj = {
+        children: value,
+        attrs: {}
+      }
+      if (index === 0) {         
+              obj.attrs.rowSpan = length     
+      } else {
+        obj.attrs.rowSpan = 0
+      }
+      return obj
+    }
+  },
   {
     title: '时间',
     dataIndex: 'statDatetime',
@@ -693,7 +693,8 @@ export default {
       postAction('/toutiao/videoReportDaily/bytedanceVideoInfoListDetail', {
         startDate: this.timedata[0],
         endDate: this.timedata[1],
-        signature: record.signature
+        signature: record.signature,
+        accountIds:this.appId
       }).then(res => {
         let resArr = []
 

+ 31 - 21
src/views/modules/Statistics/videoStatics/vWeek.vue

@@ -313,24 +313,24 @@ let detailConsum = [
       return obj
     }
   },
-//   {
-//     title: '视频链接',
-//     dataIndex: 'videoUrl',
-//     align: 'center',
-//     width:250,
-//     customRender: (value, row, index) => {
-//       const obj = {
-//         children: value,
-//         attrs: {}
-//       }
-//       if (index == 0) {
-//         obj.attrs.rowSpan = 7
-//       }else {
-//         obj.attrs.rowSpan = 0
-//       }
-//       return obj
-//     }
-//   },
+  {
+    title: '项目名称',
+    dataIndex: 'projectName',
+    align: 'center',
+    width:150,
+    customRender: (value, row, index) => {
+      const obj = {
+        children: value,
+        attrs: {}
+      }
+      if (index == 0) {
+        obj.attrs.rowSpan = 7
+      }else {
+        obj.attrs.rowSpan = 0
+      }
+      return obj
+    }
+  },
   {
     title: '时间',
     dataIndex: 'statDatetime',
@@ -680,7 +680,8 @@ export default {
       postAction('/toutiao/videoReportDaily/bytedanceVideoInfoListDetail', {
         startDate: this.timedata[0],
         endDate: this.timedata[1],
-        signature: record.signature
+        signature: record.signature,
+        accountIds:this.appId
       }).then(res => {
         let resArr = []
 
@@ -702,6 +703,8 @@ export default {
     this.statDate = moment().subtract(1, 'day')
     moment().format('YYYY-MM-DD_HH:mm')
 
+
+
     postAction('/toutiao/videoReportDaily/getColumnJson', {
       columnType:3,
     }).then((res)=>{
@@ -756,8 +759,15 @@ export default {
   },
   mounted() {
     // this.lastWeekHandle();
-   
-        this.HttpPost()
+    let lastStart = 
+        moment()
+          .subtract(7, 'days')
+    let lastEnd =   moment()
+          .subtract(1, 'days')
+      
+
+    this.dateRange=[lastStart,lastEnd]
+    this.lastWeekHandle()
   },
 }
 </script>

+ 159 - 4
src/views/modules/kuaishouapp/account/stepForm/Step3.vue

@@ -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
               }

+ 64 - 1
src/views/modules/material/videoMaterial.vue

@@ -54,8 +54,38 @@
 .add-image-material .draggable-list {
   display: block !important;
 }
+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;
+}
 </style>
 <style lang="scss" scoped>
+.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
+}
+
 .content {
   display: flex !important;
   flex-direction: column;
@@ -355,7 +385,7 @@ a {
                   <span
                     style="color: #999; fontSize: 16px;padding-bottom:10px;display:block;width:100%;overflow: hidden;text-overflow: ellipsis;"
                   >
-                    {{ items.materialName }}
+                    {{ items.projectName }}
                   </span>
                   <a-icon
                     type="close-circle"
@@ -554,6 +584,11 @@ a {
                     @click="addImage(items)"
                     >添加封面</a
                   >
+                  <a
+                    style="margin-right:20px"
+                    @click="showImage(items)"
+                    >推荐封面</a
+                  >
                   <a-checkbox :value="items.id" style="float:right" v-show="active == '1'"></a-checkbox>
                   <br>
                   {{ items.createTime | getDate }}
@@ -1160,7 +1195,18 @@ a {
           </a-form-item>
         </a-form>
     </a-modal>
+    <a-modal title="抽帧展示" v-model="chouzhen" width="60%">
+        <template slot="footer">
+            <a-button key="back" @click="chouzhen=false">关闭</a-button>
+        </template>
+        <ul v-if="chouzhenList.length>0" style="height:600px;overflow:auto">
+            <li v-for="(item,index) of chouzhenList" :key="index" class="chouzhen" :class="{'first':index == 0}">
+                <img :src="item.url" alt="" style="width:100%">
+            </li>
 
+        </ul>
+        <div style="clear:both"></div>
+    </a-modal>
 
     <account-check ref="check" @synchro="implement"></account-check>
   </a-card>
@@ -1194,6 +1240,8 @@ export default {
   data() {
     return {
       coverPreviewVisible: false,
+      chouzhen:false,
+      chouzhenList:[],
       model: [],
       modelNew: [],
       goodsColumns: [
@@ -2051,6 +2099,21 @@ export default {
       this.addImageVisible = true
       this.addImageData = item
     },
+    showImage(item){
+        this.chouzhen = true
+        this.chouzhenList = []
+        var params = {
+            videoSignature:item.code,
+            pageSize:20,
+            pageNo:1
+        }
+        getAction('/cutFrame/material/list',params).then(res=>{
+            console.log(res)
+            if(res.success){
+                this.chouzhenList.push(...res.result.records)
+            }
+        })
+    },
     closeImage() {
       this.addImageVisible = false
       this.urlListImage = {