|
@@ -40,6 +40,17 @@
|
|
{{createCount}}
|
|
{{createCount}}
|
|
</div>
|
|
</div>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
|
+ <a-form-item
|
|
|
|
+ label="创意制作方式"
|
|
|
|
+ :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
|
|
|
|
+ :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
|
|
|
|
+ >
|
|
|
|
+ <a-radio-group buttonStyle="solid" v-decorator="['unitType', { initialValue: '4' }]" @change="changeUnitType">
|
|
|
|
+ <a-radio-button value="4">自定义</a-radio-button>
|
|
|
|
+ <a-radio-button value="7">程序化</a-radio-button>
|
|
|
|
+ </a-radio-group>
|
|
|
|
+ </a-form-item>
|
|
|
|
+
|
|
|
|
|
|
<a-form-item
|
|
<a-form-item
|
|
label="目标应用"
|
|
label="目标应用"
|
|
@@ -593,6 +604,7 @@
|
|
label="创建类型"
|
|
label="创建类型"
|
|
:labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
|
|
:labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
|
|
:wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
|
|
:wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
|
|
|
|
+ v-if="getData('unitType')=='4'"
|
|
>
|
|
>
|
|
<a-radio-group
|
|
<a-radio-group
|
|
buttonStyle="solid"
|
|
buttonStyle="solid"
|
|
@@ -604,18 +616,18 @@
|
|
</a-radio-group>
|
|
</a-radio-group>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
<a-form-item
|
|
<a-form-item
|
|
- v-if="getData('createType')=='0'"
|
|
|
|
- label="封面数"
|
|
|
|
|
|
+ v-if="getData('unitType')=='7' || getData('createType')!='1'"
|
|
|
|
+ :label="getData('unitType')=='7'?'视频数':'封面数'"
|
|
:labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
|
|
:labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
|
|
:wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
|
|
:wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
|
|
>
|
|
>
|
|
<a-input-number
|
|
<a-input-number
|
|
- :max="15"
|
|
|
|
- :min="1"
|
|
|
|
|
|
+ :max="getData('unitType')=='7'?10:15"
|
|
|
|
+ :min="getData('unitType')=='7'?3:1"
|
|
v-decorator="[
|
|
v-decorator="[
|
|
'imageCount',
|
|
'imageCount',
|
|
{
|
|
{
|
|
- rules: [{ required: true, message: '封面数必填' }],
|
|
|
|
|
|
+ rules: [{ required: true, message: '数量必填必填' }],
|
|
initialValue: 5,
|
|
initialValue: 5,
|
|
},
|
|
},
|
|
]"
|
|
]"
|
|
@@ -629,7 +641,11 @@
|
|
:labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
|
|
:labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
|
|
:wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
|
|
:wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
|
|
>
|
|
>
|
|
- <a @click="getVideoList()">选择视频</a> {{ videoList.length + '/' + (getData('createType')=='0'?getData('createCount'):getData('createCount')*15) }}
|
|
|
|
|
|
+ <a @click="getVideoList()">选择视频</a>
|
|
|
|
+ {{ videoList.length + '/' + (getData('unitType')=='4'
|
|
|
|
+ ?(getData('createType')=='0'?
|
|
|
|
+ getData('createCount'):getData('createCount')*15)
|
|
|
|
+ :getData('createCount')*getData('imageCount')) }}
|
|
<br />
|
|
<br />
|
|
<div v-if="videoList.length > 0 && showVideo" style="display:flex;flex-wrap:wrap">
|
|
<div v-if="videoList.length > 0 && showVideo" style="display:flex;flex-wrap:wrap">
|
|
<span v-for="(item, index) of videoList" :key="index" style="position: relative" class="width-video">
|
|
<span v-for="(item, index) of videoList" :key="index" style="position: relative" class="width-video">
|
|
@@ -890,7 +906,7 @@
|
|
<a-col :span="8">
|
|
<a-col :span="8">
|
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
当前选择数量
|
|
当前选择数量
|
|
- {{ sumContent + '/' + (getData('createType')=='0'?getData('createCount'):getData('createCount')*15) }}
|
|
|
|
|
|
+ {{ sumContent + '/' + (getData('unitType')=='4'?(getData('createType')=='0'?getData('createCount'):getData('createCount')*15):getData('createCount')*getData('imageCount') )}}
|
|
<a-button type="primary" @click="tongbu()" :loading="tongbuLoading" style="margin-left:10px" v-if="mediaDimension == 'a'">
|
|
<a-button type="primary" @click="tongbu()" :loading="tongbuLoading" style="margin-left:10px" v-if="mediaDimension == 'a'">
|
|
刷新素材</a-button>
|
|
刷新素材</a-button>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
@@ -1847,26 +1863,39 @@ export default {
|
|
sum += this.checkVideoWai[i].length
|
|
sum += this.checkVideoWai[i].length
|
|
}
|
|
}
|
|
this.sumContent = sum
|
|
this.sumContent = sum
|
|
- if (this.getData('createType') == '0') {
|
|
|
|
- if (sum > this.getData('createCount')) {
|
|
|
|
- this.$message.error('最多选择' + this.getData('createCount') + '个素材')
|
|
|
|
- this.checkVideo = []
|
|
|
|
- this.sumContent = this.sumContent - 10
|
|
|
|
-
|
|
|
|
- // if (this.active == 0) {
|
|
|
|
- this.checkVideoAll[this.ipagination.current - 1] = this.checkVideo
|
|
|
|
-
|
|
|
|
|
|
+ if(this.getData('unitType') == '4'){
|
|
|
|
+ if (this.getData('createType') == '0') {
|
|
|
|
+ if (sum > this.getData('createCount')) {
|
|
|
|
+ this.$message.error('最多选择' + this.getData('createCount') + '个素材')
|
|
|
|
+ this.checkVideo = []
|
|
|
|
+ this.sumContent = this.sumContent - 10
|
|
|
|
+
|
|
|
|
+ // if (this.active == 0) {
|
|
|
|
+ this.checkVideoAll[this.ipagination.current - 1] = this.checkVideo
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ if (sum > this.getData('createCount') * 15) {
|
|
|
|
+ this.$message.error('最多选择' + this.getData('createCount') * 15 + '个素材')
|
|
|
|
+ this.checkVideo = []
|
|
|
|
+ this.sumContent = this.sumContent - 15
|
|
|
|
+
|
|
|
|
+ // if (this.active == 0) {
|
|
|
|
+ this.checkVideoAll[this.ipagination.current - 1] = this.checkVideo
|
|
|
|
+ // } else if (this.active == 1) {
|
|
|
|
+ // this.checkVideoWai[this.ipagination.current - 1] = this.checkVideo
|
|
|
|
+ // }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- } else {
|
|
|
|
- if (sum > this.getData('createCount') * 15) {
|
|
|
|
- this.$message.error('最多选择' + this.getData('createCount') * 15 + '个素材')
|
|
|
|
|
|
+ }else{
|
|
|
|
+ if (sum > this.getData('createCount')*this.getData('imageCount')) {
|
|
|
|
+ this.$message.error('最多选择'+this.getData('createCount')*this.getData('imageCount')+'个素材')
|
|
this.checkVideo = []
|
|
this.checkVideo = []
|
|
- this.sumContent = this.sumContent - 15
|
|
|
|
-
|
|
|
|
|
|
+ this.sumContent-=10
|
|
// if (this.active == 0) {
|
|
// if (this.active == 0) {
|
|
this.checkVideoAll[this.ipagination.current - 1] = this.checkVideo
|
|
this.checkVideoAll[this.ipagination.current - 1] = this.checkVideo
|
|
// } else if (this.active == 1) {
|
|
// } else if (this.active == 1) {
|
|
- // this.checkVideoWai[this.ipagination.current - 1] = this.checkVideo
|
|
|
|
|
|
+ // this.checkVideoWai[this.ipagination.current - 1] = this.checkVideo
|
|
// }
|
|
// }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1892,21 +1921,33 @@ export default {
|
|
sum += this.checkVideoWai[i].length
|
|
sum += this.checkVideoWai[i].length
|
|
}
|
|
}
|
|
this.sumContent = sum
|
|
this.sumContent = sum
|
|
-
|
|
|
|
- if (this.getData('createType') == '0') {
|
|
|
|
- if (sum > this.getData('createCount')) {
|
|
|
|
- this.$message.error('最多选择' + this.getData('createCount') + '个素材')
|
|
|
|
- this.checkVideo.pop()
|
|
|
|
- this.sumContent--
|
|
|
|
- // if (this.active == 0) {
|
|
|
|
- this.checkVideoAll[this.ipagination.current - 1] = this.checkVideo
|
|
|
|
- // } else if (this.active == 1) {
|
|
|
|
- // this.checkVideoWai[this.ipagination.current - 1] = this.checkVideo
|
|
|
|
- // }
|
|
|
|
|
|
+ if(this.getData('unitType') == '4'){
|
|
|
|
+ if (this.getData('createType') == '0') {
|
|
|
|
+ if (sum > this.getData('createCount')) {
|
|
|
|
+ this.$message.error('最多选择' + this.getData('createCount') + '个素材')
|
|
|
|
+ this.checkVideo.pop()
|
|
|
|
+ this.sumContent--
|
|
|
|
+ // if (this.active == 0) {
|
|
|
|
+ this.checkVideoAll[this.ipagination.current - 1] = this.checkVideo
|
|
|
|
+ // } else if (this.active == 1) {
|
|
|
|
+ // this.checkVideoWai[this.ipagination.current - 1] = this.checkVideo
|
|
|
|
+ // }
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ if (sum > this.getData('createCount') * 15) {
|
|
|
|
+ this.$message.error('最多选择' + this.getData('createCount') * 15 + '个素材')
|
|
|
|
+ this.checkVideo.pop()
|
|
|
|
+ this.sumContent--
|
|
|
|
+ // if (this.active == 0) {
|
|
|
|
+ this.checkVideoAll[this.ipagination.current - 1] = this.checkVideo
|
|
|
|
+ // } else if (this.active == 1) {
|
|
|
|
+ // this.checkVideoWai[this.ipagination.current - 1] = this.checkVideo
|
|
|
|
+ // }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- } else {
|
|
|
|
- if (sum > this.getData('createCount') * 15) {
|
|
|
|
- this.$message.error('最多选择' + this.getData('createCount') * 15 + '个素材')
|
|
|
|
|
|
+ }else{
|
|
|
|
+ if (sum > this.getData('createCount')*this.getData('imageCount')) {
|
|
|
|
+ this.$message.error('最多选择'+this.getData('createCount')*this.getData('imageCount')+'个素材')
|
|
this.checkVideo.pop()
|
|
this.checkVideo.pop()
|
|
this.sumContent--
|
|
this.sumContent--
|
|
// if (this.active == 0) {
|
|
// if (this.active == 0) {
|
|
@@ -1916,6 +1957,8 @@ export default {
|
|
// }
|
|
// }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
},
|
|
},
|
|
getVideoList() {
|
|
getVideoList() {
|
|
this.orderBy = 'time'
|
|
this.orderBy = 'time'
|
|
@@ -1939,7 +1982,8 @@ export default {
|
|
// })
|
|
// })
|
|
},
|
|
},
|
|
getDataSource(page, pageSize) {
|
|
getDataSource(page, pageSize) {
|
|
-
|
|
|
|
|
|
+ console.log(this.checkVideo, this.checkVideoAll)
|
|
|
|
+ this.checkVideo = this.checkVideoAll[page-1]
|
|
this.ipagination.current = page
|
|
this.ipagination.current = page
|
|
this.searchVideo()
|
|
this.searchVideo()
|
|
},
|
|
},
|
|
@@ -1983,13 +2027,17 @@ export default {
|
|
changeType() {
|
|
changeType() {
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
if (this.getData('creativeMaterialType') == '1') {
|
|
if (this.getData('creativeMaterialType') == '1') {
|
|
- this.form.setFieldsValue({
|
|
|
|
- name: '自定义创意_竖版视频',
|
|
|
|
- })
|
|
|
|
|
|
+ if(this.getData('unitType') == '4') {
|
|
|
|
+ this.form.setFieldsValue({creativeName:'自定义创意_竖版视频'})
|
|
|
|
+ }else{
|
|
|
|
+ this.form.setFieldsValue({creativeName:'程序化创意_竖版视频'})
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
- this.form.setFieldsValue({
|
|
|
|
- name: '自定义创意_横版视频',
|
|
|
|
- })
|
|
|
|
|
|
+ if(this.getData('unitType') == '4') {
|
|
|
|
+ this.form.setFieldsValue({creativeName:'自定义创意_横版视频'})
|
|
|
|
+ }else{
|
|
|
|
+ this.form.setFieldsValue({creativeName:'程序化创意_横版视频'})
|
|
|
|
+ }
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -2315,12 +2363,15 @@ export default {
|
|
e.preventDefault()
|
|
e.preventDefault()
|
|
if (
|
|
if (
|
|
this.checkVideo.length <
|
|
this.checkVideo.length <
|
|
- (this.getData('createType') == '0' ? this.getData('createCount') : this.getData('createCount') * 15)
|
|
|
|
|
|
+ (this.getData('unitType')=='4'?this.getData('createType') == '0' ? this.getData('createCount') : this.getData('createCount') * 15:
|
|
|
|
+ this.getData('createCount')*this.getData('imageCount'))
|
|
) {
|
|
) {
|
|
// this.$message.error('选择的素材不能小于创建条数')
|
|
// this.$message.error('选择的素材不能小于创建条数')
|
|
|
|
+ this.getData('unitType')=='4'?
|
|
this.getData('createType') == '0'
|
|
this.getData('createType') == '0'
|
|
? this.$message.error('选择的素材不能小于创建条数')
|
|
? this.$message.error('选择的素材不能小于创建条数')
|
|
- : this.$message.error('选择的素材不能小于创建条数*15')
|
|
|
|
|
|
+ : this.$message.error('选择的素材不能小于创建条数*15'):
|
|
|
|
+ this.$message.error('选择的素材不能小于创建条数*'+this.getData('imageCount'))
|
|
} else {
|
|
} else {
|
|
this.form.validateFieldsAndScroll((err, values) => {
|
|
this.form.validateFieldsAndScroll((err, values) => {
|
|
if (!err) {
|
|
if (!err) {
|
|
@@ -2344,7 +2395,7 @@ export default {
|
|
creativeCategory: values.creativeCategory
|
|
creativeCategory: values.creativeCategory
|
|
? values.creativeCategory[values.creativeCategory.length - 1]
|
|
? values.creativeCategory[values.creativeCategory.length - 1]
|
|
: null,
|
|
: null,
|
|
- unitType: '4',
|
|
|
|
|
|
+ unitType: values.unitType,
|
|
}
|
|
}
|
|
var params = {
|
|
var params = {
|
|
userId: this.userInfo().id,
|
|
userId: this.userInfo().id,
|
|
@@ -2379,6 +2430,34 @@ export default {
|
|
onChange(value) {
|
|
onChange(value) {
|
|
// console.log(value)
|
|
// console.log(value)
|
|
},
|
|
},
|
|
|
|
+ changeUnitType(e){
|
|
|
|
+ this.sumContent = 0
|
|
|
|
+ this.videoList = []
|
|
|
|
+ this.checkVideo = []
|
|
|
|
+ this.checkVideoAll = []
|
|
|
|
+ this.ipagination.pageSize = 10
|
|
|
|
+ this.$nextTick(()=>{
|
|
|
|
+ if (this.getData('creativeMaterialType') == '1') {
|
|
|
|
+ if(this.getData('unitType') == '4') {
|
|
|
|
+ this.form.setFieldsValue({creativeName:'自定义创意_竖版视频'})
|
|
|
|
+ }else{
|
|
|
|
+ this.form.setFieldsValue({creativeName:'程序化创意_竖版视频'})
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ if(this.getData('unitType') == '4') {
|
|
|
|
+ this.form.setFieldsValue({creativeName:'自定义创意_横版视频'})
|
|
|
|
+ }else{
|
|
|
|
+ this.form.setFieldsValue({creativeName:'程序化创意_横版视频'})
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // if(e.target.value == '4') {
|
|
|
|
+ // this.form.setFieldsValue({creativeName:'自定义创意_竖版视频'})
|
|
|
|
+ // }else{
|
|
|
|
+ // this.form.setFieldsValue({creativeName:'程序化创意_竖版视频'})
|
|
|
|
+ // }
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ },
|
|
handleChange(value) {
|
|
handleChange(value) {
|
|
// this.$refs.population.getAppList(value)
|
|
// this.$refs.population.getAppList(value)
|
|
this.getSiteList(value)
|
|
this.getSiteList(value)
|