浏览代码

提交代码

zhuxinbo 4 年之前
父节点
当前提交
9c3774c9da
共有 2 个文件被更改,包括 34 次插入17 次删除
  1. 32 15
      src/views/modules/BatchCreate/components/material.vue
  2. 2 2
      vue.config.js

+ 32 - 15
src/views/modules/BatchCreate/components/material.vue

@@ -30,13 +30,11 @@
               <a-button @click="addCreative()" :disabled="count&&materialType!=undefined">添加创意</a-button>
               <a-button @click="addCreative()" :disabled="count&&materialType!=undefined">添加创意</a-button>
               <span style="color:black;margin-left:10px"
               <span style="color:black;margin-left:10px"
                 v-if="creativeType == 'customCreativity'">{{countMany}}/10</span>
                 v-if="creativeType == 'customCreativity'">{{countMany}}/10</span>
-              <span style="color:black;margin-left:10px" v-else-if="creativeType == 'program'">视频数量:{{vadioMany}}/12
-                图片数量:{{imgMany}}/10</span>
+              <span style="color:black;margin-left:10px" v-else>{{countMany}}/12</span>
             </div>
             </div>
             <a-row>
             <a-row>
               <a-col :span="24" v-for="(item,index) of HorizontalLargeImageList" :key="index">
               <a-col :span="24" v-for="(item,index) of HorizontalLargeImageList" :key="index">
                 <a-card title :ref="item">
                 <a-card title :ref="item">
-                  {{item}}
                   <a-icon type="close" style="float:right;cursor: pointer;" @click="deleteCreative(index)" />
                   <a-icon type="close" style="float:right;cursor: pointer;" @click="deleteCreative(index)" />
                   <div style="clear:both"></div>
                   <div style="clear:both"></div>
                   <div class="dynamically_add_form_item">
                   <div class="dynamically_add_form_item">
@@ -52,18 +50,21 @@
                         @click="getVideoList(item)">{{materialType=='CREATIVE_IMAGE_MODE_VIDEO'||materialType=='CREATIVE_IMAGE_MODE_VIDEO_VERTICAL'?'选择视频':'选择图片'}}</a>
                         @click="getVideoList(item)">{{materialType=='CREATIVE_IMAGE_MODE_VIDEO'||materialType=='CREATIVE_IMAGE_MODE_VIDEO_VERTICAL'?'选择视频':'选择图片'}}</a>
                       <div>
                       <div>
                         <!-- {{materialType}} -->
                         <!-- {{materialType}} -->
-                        <video :src="item.videoUrl" style="width:300px" v-show="materialType=='CREATIVE_IMAGE_MODE_VIDEO'&&item.videoUrl"></video>
-                        <video :src="item.videoUrl" style="width:120px"  v-show="materialType=='CREATIVE_IMAGE_MODE_VIDEO_VERTICAL'&&item.videoUrl"></video>
+                        <video :src="item.videoUrl" style="width:300px"
+                          v-show="materialType=='CREATIVE_IMAGE_MODE_VIDEO'&&item.videoUrl"></video>
+                        <video :src="item.videoUrl" style="width:120px"
+                          v-show="materialType=='CREATIVE_IMAGE_MODE_VIDEO_VERTICAL'&&item.videoUrl"></video>
                       </div>
                       </div>
                     </a-form-item>
                     </a-form-item>
 
 
-                    <!-- <a-form-item label="封面上传" :labelCol="labelCol" :wrapperCol="wrapperCol"
+                    <a-form-item label="封面上传" :labelCol="labelCol" :wrapperCol="wrapperCol"
                       v-if="(materialType=='CREATIVE_IMAGE_MODE_VIDEO_VERTICAL'||materialType=='CREATIVE_IMAGE_MODE_VIDEO')">
                       v-if="(materialType=='CREATIVE_IMAGE_MODE_VIDEO_VERTICAL'||materialType=='CREATIVE_IMAGE_MODE_VIDEO')">
-                      <upload-to-ali v-model="item.imageUrl" :customDomain="customDomain" preview :region="region"
+                      <!-- <upload-to-ali v-model="item.imageUrl" :customDomain="customDomain" preview :region="region"
                         :bucket="bucket" :accept="acceptImage" :size="102400" :accessKeyId="accessKeyId"
                         :bucket="bucket" :accept="acceptImage" :size="102400" :accessKeyId="accessKeyId"
-                        :accessKeySecret="accessKeySecret"></upload-to-ali>
-                      <a @click="getImageList(item)">选择图片</a>
-                    </a-form-item> -->
+                        :accessKeySecret="accessKeySecret"></upload-to-ali> -->
+                      <a @click="getImageList(item)" v-if="item.imageUrl==''">选择图片</a>
+                      <img :src="item.imageUrl" alt="" v-else>
+                    </a-form-item>
 
 
                     <a-form-item label="创意标题" :labelCol="labelCol" :wrapperCol="wrapperCol"
                     <a-form-item label="创意标题" :labelCol="labelCol" :wrapperCol="wrapperCol"
                       v-if="creativeType == 'customCreativity'">
                       v-if="creativeType == 'customCreativity'">
@@ -147,7 +148,7 @@
           @change="getDataSource" />
           @change="getDataSource" />
       </div>
       </div>
     </a-modal>
     </a-modal>
-    <a-modal :maskClosable="false" title="选择素材" v-model="visibleMatemalImage" @ok="handleOkShow" :width="1000">
+    <a-modal :maskClosable="false" title="选择素材" v-model="visibleMatemalImage" @ok="handleOkShowImage" :width="1000">
       <a-range-picker name="buildTime" style="width: 400px;margin:10px 0" v-model="time" />
       <a-range-picker name="buildTime" style="width: 400px;margin:10px 0" v-model="time" />
       <ul v-if="dataSource.length>0" style="overflow:auto;padding-left:0">
       <ul v-if="dataSource.length>0" style="overflow:auto;padding-left:0">
         <a-checkbox-group v-model="checkVideo" @change="onChangeVideo" style="width:100%">
         <a-checkbox-group v-model="checkVideo" @change="onChangeVideo" style="width:100%">
@@ -196,7 +197,6 @@
 </template>
 </template>
 
 
 <script>
 <script>
-  import UploadToAli from '@femessage/upload-to-ali'
   import uploadFile from '@/components/uploadFile.vue'
   import uploadFile from '@/components/uploadFile.vue'
   import {
   import {
     postAction,
     postAction,
@@ -256,7 +256,7 @@
             span: 16
             span: 16
           }
           }
         },
         },
-        visibleMatemalImage:false,
+        visibleMatemalImage: false,
         accessKeyId: 'LTAIbNbqWzSOklQV',
         accessKeyId: 'LTAIbNbqWzSOklQV',
         accessKeySecret: '1rkPz7JNoXk8sJevPaeYHWqfkQXBGh',
         accessKeySecret: '1rkPz7JNoXk8sJevPaeYHWqfkQXBGh',
         bucket: 'ctop-media',
         bucket: 'ctop-media',
@@ -294,6 +294,7 @@
         countTag: 0,
         countTag: 0,
         titleData: [{
         titleData: [{
           text: '',
           text: '',
+          creativeWordIds: [],
           showElse: true,
           showElse: true,
           titleMany: 0
           titleMany: 0
         }],
         }],
@@ -329,6 +330,11 @@
         }
         }
         if (this.materialType == 'CREATIVE_IMAGE_MODE_VIDEO' || this.materialType ==
         if (this.materialType == 'CREATIVE_IMAGE_MODE_VIDEO' || this.materialType ==
           'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL') {
           'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL') {
+          if (this.materialType == 'CREATIVE_IMAGE_MODE_VIDEO') {
+            params.type = 2
+          } else {
+            params.type = 1
+          }
           this.showVideoList('/bytedance/batch/getVideoList', params)
           this.showVideoList('/bytedance/batch/getVideoList', params)
         } else {
         } else {
           this.showVideoList('/bytedance/batch/getImageList', params)
           this.showVideoList('/bytedance/batch/getImageList', params)
@@ -337,7 +343,7 @@
       getImageList(item) {
       getImageList(item) {
         this.checkVideo = []
         this.checkVideo = []
         this.nowItem = item
         this.nowItem = item
-        this.visibleMatemal = true
+        this.visibleMatemalImage = true
 
 
         this.ipagination.current = 1
         this.ipagination.current = 1
         var params = {}
         var params = {}
@@ -371,6 +377,11 @@
           this.nowItem.imageUrl = this.checkVideo[0].imageUrl
           this.nowItem.imageUrl = this.checkVideo[0].imageUrl
         }
         }
       },
       },
+      handleOkShowImage() {
+        this.visibleMatemalImage = false
+        this.nowItem.imageId = this.checkVideo[0].id
+        this.nowItem.imageUrl = this.checkVideo[0].imageUrl
+      },
       getVideoList(item) {
       getVideoList(item) {
         this.checkVideo = []
         this.checkVideo = []
         this.nowItem = item
         this.nowItem = item
@@ -387,6 +398,11 @@
         }
         }
         if (this.materialType == 'CREATIVE_IMAGE_MODE_VIDEO' || this.materialType ==
         if (this.materialType == 'CREATIVE_IMAGE_MODE_VIDEO' || this.materialType ==
           'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL') {
           'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL') {
+          if (this.materialType == 'CREATIVE_IMAGE_MODE_VIDEO') {
+            params.type = 2
+          } else {
+            params.type = 1
+          }
 
 
           this.showVideoList('/bytedance/batch/getVideoList', params)
           this.showVideoList('/bytedance/batch/getVideoList', params)
         } else {
         } else {
@@ -472,7 +488,7 @@
         }
         }
         var node = document.getElementsByClassName('rending-all')[index]
         var node = document.getElementsByClassName('rending-all')[index]
         var v = '{' + tag.name + '}'
         var v = '{' + tag.name + '}'
-        item.creativeWordIds.push(tag.name)
+        item.creativeWordIds.push(tag.creative_word_id)
         if (document.selection) {
         if (document.selection) {
           //IE
           //IE
           node.focus()
           node.focus()
@@ -697,6 +713,7 @@
       addTitle() {
       addTitle() {
         this.titleData.push({
         this.titleData.push({
           text: '',
           text: '',
+          creativeWordIds: [],
           titleMany: 0,
           titleMany: 0,
           creativeWordIds: []
           creativeWordIds: []
         })
         })

+ 2 - 2
vue.config.js

@@ -63,9 +63,9 @@ module.exports = {
         // target: 'http://192.168.0.230:8088', //请求本地 需要jeecg-boot后台项目  孙震
         // target: 'http://192.168.0.230:8088', //请求本地 需要jeecg-boot后台项目  孙震
         // target: 'http://192.168.1.51:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.1.51:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.1.165:8848', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.1.165:8848', //请求本地 需要jeecg-boot后台项目  毕洁泉
-        target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目 
+        // target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目 
         // target: 'https://trac.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目 
         // target: 'https://trac.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目 
-        // target: 'http://192.168.1.251', //请求本地 需要jeecg-boot后台项目 
+        target: 'http://39.106.184.70:8088/', //请求本地 需要jeecg-boot后台项目 
         // target: 'http://adsp.tjyourong.com.cn/', //请求本地 需要jeecg-boot后台项目 
         // target: 'http://adsp.tjyourong.com.cn/', //请求本地 需要jeecg-boot后台项目