|
@@ -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: []
|
|
})
|
|
})
|