|
@@ -37,7 +37,7 @@
|
|
|
:wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
|
|
|
>
|
|
|
<div style="color:red">
|
|
|
- {{createCount}}
|
|
|
+ {{getData('unitType') == '4' ? createCount.ctmCount : createCount.pgdCount }}
|
|
|
</div>
|
|
|
</a-form-item>
|
|
|
<a-form-item
|
|
@@ -661,39 +661,48 @@
|
|
|
>
|
|
|
<!-- v-model.trim="allForm.description" -->
|
|
|
<!-- @keyup="getData('description')?getData('description')=this.value.replace(/^ +| +$/g,'')" -->
|
|
|
- <a @click="showTitle()">推荐广告语</a>
|
|
|
- <div class="step4-else" style="display: inline-block; position: relative; border-radius: 4px; width: 100%; border: 1px solid #d9d9d9;">
|
|
|
- <a-textarea
|
|
|
- class="rending"
|
|
|
- placeholder="请输入广告语"
|
|
|
- v-decorator="['description',{ rules: [{ required: true, message: '广告语必填' }] }]"
|
|
|
- @keyup="getData('description')?form.setFieldsValue({
|
|
|
- description: getData('description').replace(/\s/g,'')
|
|
|
- }):null"
|
|
|
- @change="getData('description')?form.setFieldsValue({
|
|
|
- description: getData('description').replace(/\s/g,'')
|
|
|
- }):null"
|
|
|
- :autosize="{ minRows: 2, maxRows: 6 }"
|
|
|
- :max-length="30"
|
|
|
- ></a-textarea>
|
|
|
- <p
|
|
|
- style="
|
|
|
- font-size: 12px;
|
|
|
- color: #b6bbc7;
|
|
|
- letter-spacing: 0.3px;
|
|
|
- text-align: right;
|
|
|
- line-height: 20px;
|
|
|
- position: absolute;
|
|
|
- bottom: 0;
|
|
|
- right: 6px;
|
|
|
- width: 100%;
|
|
|
- margin-bottom: 0;
|
|
|
- "
|
|
|
- >
|
|
|
- {{ (getData('description')?getData('description').length:0) + '/30' }}
|
|
|
- </p>
|
|
|
+ <!-- <a @click="showTitle()">推荐广告语</a> -->
|
|
|
+ <div style="position:relative" v-for="(item, index) in descriptionList" :key="index">
|
|
|
+ <a-textarea
|
|
|
+ class="rending"
|
|
|
+ placeholder="请输入广告语"
|
|
|
+ @change="descriptionchange(item.value, index)"
|
|
|
+ v-model="item.value"
|
|
|
+ :autosize="{ minRows: 2, maxRows: 6 }"
|
|
|
+ :max-length="30"
|
|
|
+ style=" width: 80%;"
|
|
|
+ ></a-textarea>
|
|
|
+ <p
|
|
|
+ style="
|
|
|
+ font-size: 12px;
|
|
|
+ color: #b6bbc7;
|
|
|
+ letter-spacing: 0.3px;
|
|
|
+ text-align: right;
|
|
|
+ line-height: 30px;
|
|
|
+ position: absolute;
|
|
|
+ bottom: 0;
|
|
|
+ left: 0;
|
|
|
+ width: 80%;
|
|
|
+ margin-bottom: 0;
|
|
|
+ "
|
|
|
+ >
|
|
|
+ {{ item.value.length }}/30
|
|
|
+ <!-- {{ getFormData('description').length }}/30 -->
|
|
|
+ </p>
|
|
|
+ <div style="position:absolute;right:0;top:-10px">
|
|
|
+ <a-icon
|
|
|
+ type="plus"
|
|
|
+ @click="addDescription()"
|
|
|
+ style="margin-right:15px"
|
|
|
+ v-if="descriptionList.length < 10"
|
|
|
+ />
|
|
|
+ <a-icon
|
|
|
+ type="minus"
|
|
|
+ @click="removeDescription(index)"
|
|
|
+ v-if="descriptionList.length > 1"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <br />
|
|
|
<a @click="cunTitle()">收藏</a>
|
|
|
<a @click="showCunTitle()" style="margin-left: 10px">收藏列表</a>
|
|
|
<!--
|
|
@@ -955,10 +964,13 @@
|
|
|
</video> -->
|
|
|
<a-checkbox
|
|
|
:value="item.photoId"
|
|
|
- style="width: 100%; position: absolute; z-index: 100; right: 0; top: 0"
|
|
|
+ style="width: 100%; position: absolute; z-index: 100; right: 0; top: 0; max-height: 80%;overflow: hidden;"
|
|
|
>
|
|
|
<img :src="item.coverUrl" alt="" style="width: 90%; margin-bottom: 30px" />
|
|
|
- <div>
|
|
|
+
|
|
|
+
|
|
|
+ </a-checkbox>
|
|
|
+ <div style="position: absolute; z-index: 100; bottom: 35px;width:100%;left:0">
|
|
|
<div style="width: 100%; text-align: center">
|
|
|
{{ item.statDate&&item.channelType == 0 ?
|
|
|
'内部 ' + item.statDate.split(' ')[0]:item.statDate&&item.channelType == 1 ?
|
|
@@ -966,9 +978,7 @@
|
|
|
'内部 ' + item.charge :'素造 ' + item.charge}}
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
- </a-checkbox>
|
|
|
- <a @click="matemalVideo(item, index)" style="position: absolute; z-index: 100; right: 56px; bottom: 5px"
|
|
|
+ <a @click="matemalVideo(item, index)" style="position: absolute; z-index: 100; right: 0; bottom: 5px;width:100%;text-align:center"
|
|
|
>查看视频</a
|
|
|
>
|
|
|
</li>
|
|
@@ -1252,6 +1262,7 @@ export default {
|
|
|
|
|
|
data() {
|
|
|
return {
|
|
|
+ descriptionList: [{value:''}],
|
|
|
showNumber:false,
|
|
|
md5Str:'',
|
|
|
photoId:'',
|
|
@@ -1457,6 +1468,17 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
+ descriptionchange(val, index) {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.descriptionList[index].value = val.replace(/\s*/g, '').trim()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ addDescription() {
|
|
|
+ this.descriptionList.push({ value: '' })
|
|
|
+ },
|
|
|
+ removeDescription(index) {
|
|
|
+ this.descriptionList.splice(index, 1)
|
|
|
+ },
|
|
|
searchVideo() {
|
|
|
let url = '/kuaishou/kuaiShouVideoGet/getBatchV2VideoList'
|
|
|
let params = {}
|
|
@@ -1467,6 +1489,7 @@ export default {
|
|
|
params.status = 0
|
|
|
params.photoId = this.photoId
|
|
|
params.photoName = this.photoName
|
|
|
+ params.materialType =this.creativeMaterialType
|
|
|
if(this.mediaDimension == 'a'){
|
|
|
url = '/kuaishou/kuaiShouVideoGet/getBatchV2VideoList'
|
|
|
// params.signatures = this.md5Str
|
|
@@ -1514,28 +1537,49 @@ export default {
|
|
|
},
|
|
|
okTitleCun(item) {
|
|
|
this.allForm.description = item.title
|
|
|
- this.form.setFieldsValue({
|
|
|
- description: item.title,
|
|
|
- })
|
|
|
+ // this.form.setFieldsValue({
|
|
|
+ // description: item.title,
|
|
|
+ // })
|
|
|
+
|
|
|
+
|
|
|
+ if (this.descriptionList[0].value == '') {
|
|
|
+ this.descriptionList = [{value:item.title}]
|
|
|
+ } else {
|
|
|
+ for (let index = 0; index < this.descriptionList.length; index++) {
|
|
|
+ if (this.descriptionList[index].value == '') {
|
|
|
+ this.descriptionList.splice(index, 1)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(this.descriptionList.length<=9){
|
|
|
+ this.descriptionList.push({value:item.title})
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
this.cunTitleVisible = false
|
|
|
this.cunTitleList = []
|
|
|
},
|
|
|
cunTitle() {
|
|
|
- if (this.getData('description') && this.getData('description') == '') {
|
|
|
- this.$message.error('请填写广告语后再进行收藏')
|
|
|
- } else {
|
|
|
- var params = {}
|
|
|
- params.accountId = localStorage.getItem('campaignAccountId')
|
|
|
- params.userId = this.userInfo().id
|
|
|
- params.title = this.getData('description')
|
|
|
- postAction('/kuaishou/kuaiShouTitleCollection/add', params).then((res) => {
|
|
|
- if (res.success) {
|
|
|
- this.$message.success('收藏成功')
|
|
|
- } else {
|
|
|
- this.$message.error(res.message)
|
|
|
- }
|
|
|
- })
|
|
|
+ let isNotComplete = this.descriptionList.findIndex(item => {
|
|
|
+ return item.value === ''
|
|
|
+ })
|
|
|
+ if (isNotComplete > -1) {
|
|
|
+ this.$message.error('广告语未填,不可收藏')
|
|
|
+ return
|
|
|
}
|
|
|
+ var params = {}
|
|
|
+ params.accountId = localStorage.getItem('campaignAccountId')
|
|
|
+ params.userId = this.userInfo().id
|
|
|
+ params.titles = this.descriptionList.map(item=>{
|
|
|
+ return item.value
|
|
|
+ })
|
|
|
+ postAction('/kuaishou/kuaiShouTitleCollection/addMore', params).then((res) => {
|
|
|
+ if (res.success) {
|
|
|
+ this.$message.success('收藏成功')
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.message)
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
},
|
|
|
showCunTitle() {
|
|
|
this.cunTitleVisible = true
|
|
@@ -1556,9 +1600,18 @@ export default {
|
|
|
okTitle(item) {
|
|
|
this.allForm.description = item
|
|
|
this.$nextTick(() => {
|
|
|
- this.form.setFieldsValue({
|
|
|
- description: item,
|
|
|
- })
|
|
|
+ if (this.descriptionList[0].value == '') {
|
|
|
+ this.descriptionList = [{value:item}]
|
|
|
+ } else {
|
|
|
+ for (let index = 0; index < this.descriptionList.length; index++) {
|
|
|
+ if (this.descriptionList[index].value == '') {
|
|
|
+ this.descriptionList.splice(index, 1)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(this.descriptionList.length<=9){
|
|
|
+ this.descriptionList.push({value:item})
|
|
|
+ }
|
|
|
+ }
|
|
|
})
|
|
|
|
|
|
this.titleVisible = false
|
|
@@ -2373,6 +2426,17 @@ export default {
|
|
|
: this.$message.error('选择的素材不能小于创建条数*15'):
|
|
|
this.$message.error('选择的素材不能小于创建条数*'+this.getData('imageCount'))
|
|
|
} else {
|
|
|
+ let isNotComplete = this.descriptionList.findIndex(item => {
|
|
|
+ return item.value === ''
|
|
|
+ })
|
|
|
+ if (isNotComplete > -1) {
|
|
|
+ this.$message.error('广告语未填')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.getData('unitType')=='7'&&this.descriptionList.length<3){
|
|
|
+ this.$message.error('程序化创意广告语最少三条')
|
|
|
+ return
|
|
|
+ }
|
|
|
this.form.validateFieldsAndScroll((err, values) => {
|
|
|
if (!err) {
|
|
|
this.loading = true
|
|
@@ -2401,6 +2465,7 @@ export default {
|
|
|
userId: this.userInfo().id,
|
|
|
...json,
|
|
|
...groupArr[0],
|
|
|
+ description:JSON.stringify(this.descriptionList.map(item=>{return item.value})),
|
|
|
accountId: localStorage.getItem('campaignAccountId'),
|
|
|
campaignId: localStorage.getItem('campaignList'),
|
|
|
beginTime: moment(this.timeRange[0]).format('YYYY-MM-DD'),
|
|
@@ -2653,7 +2718,10 @@ export default {
|
|
|
// this.checkVideo = [...new Set(n)]
|
|
|
},
|
|
|
time(n, o) {
|
|
|
- this.searchVideo()
|
|
|
+ if(this.visibleMatemal){
|
|
|
+ this.searchVideo()
|
|
|
+ }
|
|
|
+
|
|
|
// if (n.length > 0) {
|
|
|
// var params = {}
|
|
|
// params.accountId = localStorage.getItem('campaignAccountId')
|