|
@@ -447,7 +447,10 @@ li.chouzhen.first:before {
|
|
|
mode="tags"
|
|
|
style="width: 100%"
|
|
|
placeholder="按回车生成标签"
|
|
|
- v-decorator="['creativeTag']"
|
|
|
+ v-decorator="[
|
|
|
+ 'creativeTag',
|
|
|
+ { rules: [{ required: true, message: '标签必选' }, { validator: creativeTagValid }] },
|
|
|
+ ]"
|
|
|
dropdownClassName="display-none-selset"
|
|
|
:token-separators="[',', ' ', ',']"
|
|
|
>
|
|
@@ -1217,11 +1220,15 @@ export default {
|
|
|
getAction('/tag/kuaiShouCreativeTagCollection/list', params).then((res) => {
|
|
|
if (res.success) {
|
|
|
console.log(res.result)
|
|
|
- this.form.setFieldsValue({
|
|
|
- creativeTag: JSON.parse(res.result.records[0].tagArray).map((item) => {
|
|
|
- return item
|
|
|
- }),
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.form.setFieldsValue({
|
|
|
+ creativeTag: JSON.parse(res.result.records[0].tagArray).map((item) => {
|
|
|
+ return item
|
|
|
+ }),
|
|
|
+ })
|
|
|
+ this.form.validateFields(['creativeTag'])
|
|
|
})
|
|
|
+
|
|
|
this.creativeTagVisible = false
|
|
|
} else {
|
|
|
this.$message.error('选择出错,请稍后选择或自行手填')
|
|
@@ -1378,6 +1385,13 @@ export default {
|
|
|
callback('链接不能为空且开头为http://或https://,并且长度小于10000')
|
|
|
}
|
|
|
},
|
|
|
+ creativeTagValid(rule, value, callback) {
|
|
|
+ if (value.length > 10) {
|
|
|
+ callback('创意标签最多填写10个,请删减')
|
|
|
+ } else {
|
|
|
+ callback()
|
|
|
+ }
|
|
|
+ },
|
|
|
showData(item, type) {
|
|
|
var index = this.pans.findIndex((item) => item.key === this.pansKey)
|
|
|
// this.pans[index].list[item.key].imageList = []
|
|
@@ -1646,7 +1660,9 @@ export default {
|
|
|
// var params = {
|
|
|
params.dataJson = allJson.concat(dataAd)
|
|
|
// ...values,
|
|
|
- params.creativeCategory = params.creativeCategory ? params.creativeCategory.pop() : null
|
|
|
+ params.creativeCategory = params.creativeCategory
|
|
|
+ ? params.creativeCategory[params.creativeCategory.length - 1]
|
|
|
+ : null
|
|
|
params.unitId = this.pansKey
|
|
|
params.accountId = localStorage.getItem('accountId')
|
|
|
params.content = this.content
|