Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
Z
zxn-adputin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lijin
zxn-adputin
Commits
6f5abc1c
Commit
6f5abc1c
authored
Dec 19, 2024
by
lijin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 增加标题和内容文本编辑组件
parent
bb032ff8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
398 additions
and
780 deletions
+398
-780
TextInputList.vue
src/views/createDelivery/childComponents/TextInputList.vue
+245
-0
index.vue
src/views/createDelivery/index.vue
+149
-748
materialGroup.vue
src/views/createMaterial/common/materialGroup.vue
+2
-2
materiallibrary.vue
src/views/createMaterial/common/materiallibrary.vue
+2
-2
index.vue
src/views/createMaterial/index.vue
+0
-28
No files found.
src/views/createDelivery/childComponents/TextInputList.vue
0 → 100644
View file @
6f5abc1c
<
template
>
<div
class=
"text-input-list"
>
<!-- 文本输入列表 -->
<div
class=
"input-list"
>
<div
v-for=
"(text, index) in innerTexts"
:key=
"index"
class=
"input-item"
>
<el-input
v-model=
"innerTexts[index]"
:placeholder=
"`$
{placeholder} #${index + 1}`"
:maxlength="maxLength"
:class="{
'is-error': isOverLength(text),
'is-focused': focusedIndex === index
}"
show-word-limit="true"
@input="handleInput(index)"
@focus="focusedIndex = index"
@blur="focusedIndex = -1"
width="50%"
>
<template
slot=
"append"
>
<el-button
v-if=
"canDelete(index)"
icon=
"el-icon-delete"
@
click=
"handleRemove(index)"
class=
"delete-button"
></el-button>
</
template
>
</el-input>
<div
class=
"input-status"
>
<transition
name=
"fade"
>
<span
v-if=
"duplicateIndexes.includes(index)"
class=
"duplicate-warning"
>
重复内容
</span>
</transition>
</div>
</div>
</div>
</div>
</template>
<
script
>
export
default
{
name
:
'TextInputList'
,
props
:
{
value
:
{
type
:
Array
,
default
:
()
=>
[
''
]
},
maxLength
:
{
type
:
Number
,
default
:
100
},
placeholder
:
{
type
:
String
,
default
:
'请输入文本'
},
warningThreshold
:
{
type
:
Number
,
default
:
0.9
// 默认在90%时显示警告
}
},
data
()
{
return
{
innerTexts
:
[
''
],
focusedIndex
:
-
1
,
duplicateIndexes
:
[]
}
},
watch
:
{
value
:
{
handler
(
newVal
)
{
const
valueToSet
=
newVal
.
length
?
newVal
:
[
''
]
if
(
JSON
.
stringify
(
this
.
getNonEmptyTexts
())
!==
JSON
.
stringify
(
valueToSet
))
{
this
.
innerTexts
=
[...
valueToSet
]
if
(
!
this
.
innerTexts
[
this
.
innerTexts
.
length
-
1
])
{
this
.
innerTexts
.
push
(
''
)
}
}
},
immediate
:
true
,
deep
:
true
}
},
methods
:
{
getNonEmptyTexts
()
{
return
this
.
innerTexts
.
filter
(
text
=>
text
.
trim
()
!==
''
)
},
isOverLength
(
text
)
{
return
text
.
length
>
this
.
maxLength
},
canDelete
(
index
)
{
return
this
.
innerTexts
.
length
>
1
},
handleInput
(
index
)
{
const
text
=
this
.
innerTexts
[
index
]
this
.
duplicateIndexes
=
[]
// 清除之前的重复标记
// 检查重复
const
duplicateIndex
=
this
.
innerTexts
.
findIndex
((
t
,
i
)
=>
i
!==
index
&&
t
.
trim
()
===
text
.
trim
()
&&
text
.
trim
()
!==
''
)
if
(
duplicateIndex
!==
-
1
)
{
this
.
$message
({
message
:
'该文本已存在,请输入其他内容'
,
type
:
'warning'
,
duration
:
2000
})
this
.
duplicateIndexes
=
[
index
]
this
.
$set
(
this
.
innerTexts
,
index
,
''
)
return
}
// 如果是最后一行且有内容,添加新行
if
(
index
===
this
.
innerTexts
.
length
-
1
&&
text
.
trim
()
!==
''
)
{
this
.
innerTexts
.
push
(
''
)
}
// 更新父组件的值
this
.
$emit
(
'input'
,
this
.
getNonEmptyTexts
())
},
handleRemove
(
index
)
{
this
.
innerTexts
.
splice
(
index
,
1
)
if
(
this
.
innerTexts
.
length
===
0
)
{
this
.
innerTexts
.
push
(
''
)
}
this
.
$emit
(
'input'
,
this
.
getNonEmptyTexts
())
}
}
}
</
script
>
<
style
>
.text-input-list
{
width
:
100%
;
}
.input-list
{
display
:
flex
;
flex-direction
:
column
;
gap
:
12px
;
}
.input-item
{
position
:
relative
;
margin-bottom
:
24px
;
transition
:
all
0.3s
ease
;
}
.input-item
:hover
.delete-button
{
opacity
:
1
;
}
.delete-button
{
opacity
:
0.5
;
transition
:
opacity
0.3s
ease
;
}
.delete-button
:hover
{
opacity
:
1
;
}
/* 输入框样式 */
.el-input.is-focused
.el-input__inner
{
border-color
:
#409EFF
;
box-shadow
:
0
0
0
2px
rgba
(
64
,
158
,
255
,
0.1
);
}
.el-input__inner
{
transition
:
all
0.3s
ease
;
}
.el-input.is-error
.el-input__inner
{
border-color
:
#F56C6C
;
box-shadow
:
0
0
0
2px
rgba
(
245
,
108
,
108
,
0.1
);
}
/* 状态显示区域 */
.input-status
{
position
:
absolute
;
left
:
0
;
bottom
:
-20px
;
display
:
flex
;
gap
:
8px
;
align-items
:
center
;
font-size
:
12px
;
}
.input-counter
{
color
:
#909399
;
transition
:
all
0.3s
ease
;
}
.input-counter.is-error
{
color
:
#F56C6C
;
}
.input-counter.is-warning
{
color
:
#E6A23C
;
}
.duplicate-warning
{
color
:
#F56C6C
;
display
:
flex
;
align-items
:
center
;
}
/* 动画效果 */
.fade-enter-active
,
.fade-leave-active
{
transition
:
opacity
0.3s
ease
;
}
.fade-enter
,
.fade-leave-to
{
opacity
:
0
;
}
/* 输入框组样式 */
.el-input-group__append
{
padding
:
0
;
}
.el-input-group__append
.el-button
{
border
:
none
;
margin
:
0
;
height
:
100%
;
color
:
#909399
;
}
.el-input-group__append
.el-button
:hover
{
color
:
#F56C6C
;
background-color
:
#fef0f0
;
}
</
style
>
src/views/createDelivery/index.vue
View file @
6f5abc1c
...
@@ -368,46 +368,59 @@
...
@@ -368,46 +368,59 @@
<div
class=
"drawer-item-con"
>
<div
class=
"drawer-item-con"
>
<el-form
ref=
"form"
>
<el-form
ref=
"form"
>
<el-form-item
label=
"投放组名称"
>
<el-input
class=
"drawer-input"
style=
"width: 500px"
v-model=
"putinBaseInfo.taskName"
></el-input>
</el-form-item>
<el-form-item
label=
"选择应用"
>
<el-form-item
label=
"选择应用"
>
<el-select
<el-select
v-model=
"putin
BaseInfo.pkg
"
v-model=
"putin
Task.appInfo
"
filterable
filterable
clearable
clearable
placeholder=
"请选择"
placeholder=
"请选择"
style=
"width: 200px"
style=
"width: 200px"
@
change=
"
putinFetchAccount()
"
@
change=
"
handleChangeApp
"
>
>
<el-option
<el-option
v-for=
"item in pkgList"
v-for=
"item in pkgList"
:key=
"item.value"
:key=
"item.value"
:label=
"item.label"
:label=
"item.label"
:value=
"item
.value
"
:value=
"item"
>
>
</el-option>
</el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"任务名称"
>
<el-input
class=
"drawer-input"
style=
"width: 500px"
v-model=
"putinTask.taskName"
></el-input>
</el-form-item>
<el-form-item
label=
"选择投放账户"
>
<el-form-item
label=
"选择投放账户"
>
<tree-transfer
:mode=
"mode"
<el-transfer
:title=
"title"
style=
"text-align: left; display: inline-block"
:from_data=
"generateData"
v-model=
"putinTask.putinAccounts"
:to_data=
"toData"
filterable
:defaultProps=
"{ label: 'label' }"
width=
"100%"
@
addBtn=
"add"
@
removeBtn=
"remove"
width=
"80%"
height=
"360px"
height=
"360px"
filter
:left-default-checked=
"[]"
>
:right-default-checked=
"[]"
</tree-transfer>
:titles=
"['源列表', '目标列表']"
:button-texts=
"['', '']"
:format=
"{
noChecked: '${total}',
hasChecked: '${checked}/${total}'
}"
:data=
"generateData"
:filter-method=
"filterAccount"
@
change=
"handleChange"
>
<span
slot-scope=
"{ option }"
>
{{ option.label }} - {{ option.key }}
</span>
</el-transfer>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</div>
</div>
...
@@ -422,33 +435,41 @@
...
@@ -422,33 +435,41 @@
<div
class=
"drawer-item-con"
>
<div
class=
"drawer-item-con"
>
<el-form
ref=
"form"
>
<el-form
ref=
"form"
>
<el-form-item
label=
"选择广告系列子类型"
>
<el-form-item
label=
"选择广告系列子类型"
>
<el-radio-group
v-model=
"putinBaseInfo.deliveryRange"
>
<el-select
<
template
v-for=
"item of globalEnums.campaignType"
>
v-model=
"putinTask.campaignType"
<el-radio-button
placeholder=
""
:key=
"item.value"
default-first-option
:label=
"item.value"
style=
"width: 200px"
:value=
"item.value"
>
>
{{
item
.
name
}}
</el-radio-button
<el-option
>
v-for=
"item in [{'name': '应用安装', 'value': 1, 'disabled': false}, { 'name': '应用互动', 'value': 2 , 'disabled': true}, { 'name': '应用预注册', 'value': 3 , 'disabled': true}]"
</
template
>
:key=
"item.value"
</el-radio-group>
:label=
"item.name"
:value=
"item.value"
:disabled=
"item.disabled"
>
</el-option>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"选择移动应用平台"
>
<el-form-item
label=
"选择移动应用平台"
>
<el-radio-group
v-model=
"makeCreative.putinInventoryType"
<el-select
@
change=
"changePutinInventory"
v-model=
"putinTask.appStore"
placeholder=
""
default-first-option
style=
"width: 200px"
>
>
<
template
v-for=
"item of [{'label': 'Android', 'value': 1}, {'label': 'iOS', 'value': 2}]"
>
<
el-option
<el-radio-button
v-for=
"item in [{'label': 'Android', 'value': 3, 'disabled': false}, {'label': 'iOS', 'value': 2, 'disabled': true}]"
:key=
"item.value"
:key=
"item.value"
:label=
"item.label"
:label=
"item.label"
:value=
"item.value"
:value=
"item.value"
>
:disabled=
"item.disabled"
{{
item
.
label
}}
>
</el-radio-butt
on>
</el-opti
on>
</
template
>
</el-select
>
</el-radio-group>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</div>
</div>
...
@@ -460,7 +481,7 @@
...
@@ -460,7 +481,7 @@
<div
class=
"drawer-item-con"
>
<div
class=
"drawer-item-con"
>
<el-input
<el-input
class=
"apk-input"
class=
"apk-input"
v-model=
"putin
BaseInfo.landUrl
"
v-model=
"putin
Task.campaignName
"
></el-input>
></el-input>
</div>
</div>
</div>
</div>
...
@@ -469,12 +490,12 @@
...
@@ -469,12 +490,12 @@
<div
class=
"drawer-item border-bottom"
style=
"padding-bottom: 20px"
>
<div
class=
"drawer-item border-bottom"
style=
"padding-bottom: 20px"
>
<div
class=
"drawer-item-title"
>
地理位置
</div>
<div
class=
"drawer-item-title"
>
地理位置
</div>
<div
class=
"drawer-item-con"
>
<div
class=
"drawer-item-con"
>
<CountrySelector
v-model=
"
countrie
s"
/>
<CountrySelector
v-model=
"
putinTask.location
s"
/>
</div>
</div>
<div
class=
"drawer-item-title"
>
语言
</div>
<div
class=
"drawer-item-title"
>
语言
</div>
<div
class=
"drawer-item-con"
>
<div
class=
"drawer-item-con"
>
<LanguageSelector
v-model=
"languages"
/>
<LanguageSelector
v-model=
"
putinTask.
languages"
/>
</div>
</div>
<div
class=
"drawer-item-title"
>
开始日期和结束日期
</div>
<div
class=
"drawer-item-title"
>
开始日期和结束日期
</div>
...
@@ -482,7 +503,7 @@
...
@@ -482,7 +503,7 @@
<el-form
ref=
"form"
>
<el-form
ref=
"form"
>
<el-form-item
label=
"开始日期"
>
<el-form-item
label=
"开始日期"
>
<el-date-picker
<el-date-picker
v-model=
"startDate"
v-model=
"
putinTask.
startDate"
align=
"right"
align=
"right"
type=
"date"
type=
"date"
value-format=
"yyyy-MM-dd"
value-format=
"yyyy-MM-dd"
...
@@ -492,7 +513,7 @@
...
@@ -492,7 +513,7 @@
<el-form-item
label=
"结束日期"
>
<el-form-item
label=
"结束日期"
>
<el-date-picker
<el-date-picker
v-model=
"endDate"
v-model=
"
putinTask.
endDate"
align=
"right"
align=
"right"
type=
"date"
type=
"date"
value-format=
"yyyy-MM-dd"
value-format=
"yyyy-MM-dd"
...
@@ -510,7 +531,7 @@
...
@@ -510,7 +531,7 @@
<el-form-item
label=
"广告预算"
prop=
"budget"
>
<el-form-item
label=
"广告预算"
prop=
"budget"
>
<el-input
<el-input
v-model=
"dailyBudget"
v-model=
"
putinTask.
dailyBudget"
placeholder=
"请输入广告预算"
placeholder=
"请输入广告预算"
@
blur=
"formatBudget"
@
blur=
"formatBudget"
style=
"width: 30%"
style=
"width: 30%"
...
@@ -528,7 +549,7 @@
...
@@ -528,7 +549,7 @@
<div
class=
"drawer-item-con"
>
<div
class=
"drawer-item-con"
>
<el-form
ref=
"form"
>
<el-form
ref=
"form"
>
<el-select
<el-select
v-model=
"zhuanhuamubiao"
v-model=
"
putinTask.
zhuanhuamubiao"
placeholder=
""
placeholder=
""
default-first-option
default-first-option
style=
"width: 200px"
style=
"width: 200px"
...
@@ -547,23 +568,10 @@
...
@@ -547,23 +568,10 @@
</div>
</div>
<!-- 制作创意 -->
<!-- 制作创意 -->
<div
class=
"drawer-item"
>
<div
class=
"drawer-item
border-bottom
"
>
<div
class=
"drawer-item-title"
>
制作创意
</div>
<div
class=
"drawer-item-title"
>
制作创意
</div>
<div
class=
"drawer-item-con"
>
<div
class=
"drawer-item-con"
>
<el-form
ref=
"form"
>
<el-form
ref=
"form"
>
<el-form-item
label=
"创意方式"
>
<el-radio-group
v-model=
"makeCreative.creativeMaterialMode"
>
<
template
v-for=
"(item, index) of [
{ label: '程序化创意', value: 'STATIC_ASSEMBLE' },
]"
>
<el-radio
:label=
"item.value"
:key=
"index"
>
{{
item
.
label
}}
</el-radio>
</
template
>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"选择素材组"
>
<el-form-item
label=
"选择素材组"
>
<el-select
<el-select
v-model=
"makeCreative.materialGroupId"
v-model=
"makeCreative.materialGroupId"
...
@@ -579,411 +587,26 @@
...
@@ -579,411 +587,26 @@
</el-option>
</el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</el-form>
</div>
</div>
<el-form-item
label=
"素材计划分发策略:"
>
<div
class=
"drawer-item border-bottom"
>
<el-radio-group
v-model=
"putinBaseInfo.putinStrag"
>
<div
class=
"drawer-item-title"
>
标题
</div>
<
template
<div
class=
"drawer-item-con"
>
v-for=
"item of [
<TextInputList
v-model=
"putinTask.headlines"
:maxLength=
"30"
/>
{ label: '默认模式', value: 'default' },
{ label: '均分模式', value: 'avg' },
]"
>
<el-radio-button
:key=
"item.value"
:label=
"item.value"
:value=
"item.value"
>
{{
item
.
label
}}
</el-radio-button
>
>
</
template
>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"创意组合"
>
<el-radio-group
v-model=
"makeCreative.creativeComposeMethod"
>
<
template
v-for=
"(item, index) of portfolioList"
>
<el-radio
:label=
"item.value"
:key=
"index"
>
{{
item
.
label
}}
</el-radio>
</
template
>
</el-radio-group>
</el-form-item>
<div
v-if=
"makeCreative.creativeComposeMethod === 2"
>
<el-form-item
label=
"竖版视频"
>
<el-input
v-model=
"makeCreative.verticalVideo"
placeholder=
"填写数量"
style=
"width: 200px"
></el-input>
</el-form-item>
<el-form-item
label=
"横版视频"
>
<el-input
v-model=
"makeCreative.horizontalVideo"
placeholder=
"填写数量"
style=
"width: 200px"
></el-input>
</el-form-item>
<el-form-item
label=
"大图横图"
>
<el-input
v-model=
"makeCreative.bigImage"
placeholder=
"填写数量"
style=
"width: 200px"
></el-input>
</el-form-item>
<el-form-item
label=
"大图竖图"
>
<el-input
v-model=
"makeCreative.verticalBigImage"
placeholder=
"填写数量"
style=
"width: 200px"
></el-input>
</el-form-item>
<el-form-item
label=
"小图"
>
<el-input
v-model=
"makeCreative.smallImage"
placeholder=
"填写数量"
style=
"width: 200px"
></el-input>
</el-form-item>
</div>
<el-form-item
label=
"添加文案"
>
<el-input
style=
"width: 450px"
ref=
"inputText"
v-model=
"inputValue2"
@
keyup
.
enter
.
native=
"handleInputConfirm2"
@
blur=
"handleInputConfirm2"
>
<
template
slot=
"append"
>
回车
</
template
>
</el-input>
<!-- 选取文案子组件 -->
<span
class=
"outer-father"
>
<!-- 子组件 选取文案列表 -->
<select-text
class=
"select-text"
@
selectData=
"receiveData"
:appId=
"appId"
/>
</span>
<!-- 批量填写 -->
<span>
<text-textarea
:text =
arrays.textGroup.join()
@
confirm=
"handleTextareaData"
/>
</span>
<div
class=
"checkedText"
>
<div
class=
"checkedText-title"
>
<span
style=
"margin-left: 10px"
>
已选 {{ arrays.textGroup.length }}
</span
>
<span
style=
"float: right; margin-right: 10px"
>
<a
href=
"javascript:;"
@
click=
"removeAll"
>
清空
</a>
</span>
</div>
<div
style=
"padding: 10px"
>
<el-tag
class=
"tag-line"
:key=
"tag"
v-for=
"tag in arrays.textGroup"
closable
:disable-transitions=
"false"
@
close=
"handleClose2(tag)"
@
click=
"tagEdit(tag)"
>
{{ tag }}
</el-tag>
</div>
</div>
</el-form-item>
<el-form-item
label=
"创意文案数"
>
<el-input-number
v-model=
"makeCreative.textNum"
:precision=
"0"
:step=
"1"
:min=
"1"
:max=
"10"
></el-input-number>
</el-form-item>
<!-- ********************************************************************** -->
<el-form-item
v-if=
"is_card"
label=
"推广卡片"
>
<span
style=
"color: red"
>
建议尺寸为108*108,大小小于1M。支持JPG、PNG等图片格式
</span>
<el-form-item
label=
"推广卡片"
>
<div
class=
"row-center-start"
>
<img
class=
"promotion-card"
:src=
"makeCreative.promotionCardImg"
alt=
""
/>
<el-upload
ref=
"imgUpload"
:show-file-list=
"false"
:data=
"uploadData"
:on-success=
"imgSuccess"
accept=
"image/gif,image/jpeg,image/jpg,image/png,image/svg"
:action=
"uploadAction"
>
<el-button
type=
"primary"
>
上传图片
</el-button>
</el-upload>
</div>
</el-form-item>
<el-form-item
label=
"卡片标题"
>
<span
style=
"color: red"
>
卡片标题需在7个字符以内
</span
><br
/>
<el-input
minlength=
"1"
maxlength=
"7"
show-word-limit
v-model=
"makeCreative.productDescription"
style=
"width: 300px"
@
change=
"checkCardTitle"
></el-input>
</el-form-item>
<el-form-item
label=
"推广卖点"
>
<span
style=
"color: red"
>
最多不超过10个卖点,每条需要在6-9个字符内
</span
><br
/>
<el-tag
:key=
"tag"
v-for=
"tag in arrays.productSellingPoints"
closable
:disable-transitions=
"false"
@
close=
"handleClose3(tag)"
>
{{ tag }}
</el-tag>
<el-input
minlength=
"6"
maxlength=
"9"
show-word-limit
class=
"input-new-tag"
v-if=
"inputVisible3"
v-model=
"inputValue3"
ref=
"saveTagInput3"
@
keyup
.
enter
.
native=
"handleInputConfirm3"
@
blur=
"handleInputConfirm3"
style=
"width: 300px"
>
</el-input>
<el-button
v-else
class=
"button-new-tag"
size=
"small"
@
click=
"showInput3"
>
+ 添加
</el-button>
</el-form-item>
<el-form-item
label=
"行动号召"
>
<el-radio-group
v-model=
"makeCreative.enablePersonalAction"
>
<
template
v-for=
"item of [
{ label: '开启智能优选', value: 1 },
{ label: '关闭智能优选', value: 0 },
]"
>
<el-radio-button
:key=
"item.value"
:label=
"item.value"
:value=
"item.value"
>
{{
item
.
label
}}
</el-radio-button
>
>
</
template
>
</el-radio-group>
</el-form-item>
<el-form-item
label=
""
>
<el-select
v-model=
"makeCreative.actionText"
placeholder=
"请选择"
style=
"width: 200px"
@
focus=
"getCallActionList()"
>
<el-option
v-for=
"(item, idx) in callActionList"
:key=
"idx"
:label=
"item"
:value=
"item"
>
</el-option>
</el-select>
</el-form-item>
</el-form-item>
<!-- ********************************************************************** -->
<el-form-item
v-if=
"putinBaseInfo.landingType === 'LINK'"
label=
"广告来源"
>
<el-input
v-model=
"makeCreative.adSource"
placeholder=
"落地页推广必填(一般与公司名保持一致)"
/>
</el-form-item>
<el-form-item
label=
"品牌主页"
>
<el-radio-group
v-model=
"makeCreative.brandMainPage"
>
<
template
v-for=
"(item, index) of [
{ label: '不开启', value: 1 },
{ label: '开启抖音主页', value: 2 },
]"
>
<el-radio
:label=
"item.value"
:key=
"index"
>
{{
item
.
label
}}
</el-radio>
</
template
>
</el-radio-group>
</el-form-item>
<el-form-item
v-if=
"!is_card"
label=
"行动号召"
>
<el-select
v-model=
"makeCreative.actionText"
placeholder=
"请选择"
style=
"width: 200px"
@
focus=
"getCallActionList()"
>
<el-option
v-for=
"(item, idx) in callActionList"
:key=
"idx"
:label=
"item"
:value=
"item"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"副标题"
>
<el-input
v-model=
"makeCreative.subTitle"
style=
"width: 600px"
></el-input>
</el-form-item>
<!-- unionVideoType -->
<el-form-item
v-if=
"
putinBaseInfo.unionVideoType === 'REWARDED_VIDEO' ||
(putinBaseInfo.deliveryRange == 'DEFAULT' &&
makeCreative.putinInventoryType === 'inventoryType')
"
label=
"试玩搭配"
>
<el-radio-group
v-model=
"tryItOut"
@
change=
"onpenMetr"
>
<
template
v-for=
"item of [
{ label: '不启用', value: 0 },
{ label: '启用', value: 1 },
]"
>
<el-radio-button
:key=
"item.value"
:label=
"item.value"
:value=
"item.value"
>
{{
item
.
label
}}
</el-radio-button>
</
template
>
</el-radio-group>
</el-form-item>
<el-form-item
v-show=
"tryItOut == 1"
label=
"选择试玩"
>
<
template
v-for=
"(itm, idx) in tryMaterialList"
>
<div
:key=
"idx"
>
{{
"广告主:"
+
idx
+
"—已选择 "
+
itm
+
"条"
}}
</div>
</
template
>
</el-form-item>
<el-form-item
label=
"*自动生成视频素材"
>
<el-radio-group
v-model=
"makeCreative.isPresentedVideo"
>
<
template
v-for=
"item of [
{ label: '不启用', value: 0 },
{ label: '启用', value: 1 },
]"
>
<el-radio-button
:key=
"item.value"
:label=
"item.value"
:value=
"item.value"
>
{{
item
.
label
}}
</el-radio-button
>
>
</
template
>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"最优创意衍生计划"
>
<el-radio-group
v-model=
"makeCreative.bestCreativeDerivePlan"
>
<
template
v-for=
"item of [
{ label: '不启用', value: 0 },
{ label: '启用', value: 1 },
]"
>
<el-radio-button
:key=
"item.value"
:label=
"item.value"
:value=
"item.value"
>
{{
item
.
label
}}
</el-radio-button
>
>
</
template
>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"广告评论"
>
</div>
<el-radio-group
v-model=
"makeCreative.adComment"
>
</div>
<
template
v-for=
"item of [
{ label: '关闭', value: 0 },
{ label: '开启', value: 1 },
]"
>
<el-radio-button
:key=
"item.value"
:label=
"item.value"
:value=
"item.value"
>
{{
item
.
label
}}
</el-radio-button
>
>
</
template
>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"创意展现"
>
<div
class=
"drawer-item border-bottom"
>
<el-radio-group
v-model=
"makeCreative.creativeShowMode"
>
<div
class=
"drawer-item-title"
>
广告内容描述
</div>
<
template
<div
class=
"drawer-item-con"
>
v-for=
"item of [
<TextInputList
v-model=
"putinTask.descriptions"
:maxLength=
"90"
/>
{ label: '优选模式', value: 1 },
{ label: '轮播模式', value: 2 },
]"
>
<el-radio-button
:key=
"item.value"
:label=
"item.value"
:value=
"item.value"
>
{{
item
.
label
}}
</el-radio-button
>
>
</
template
>
</el-radio-group>
</el-form-item>
</el-form>
</div>
</div>
</div>
</div>
<!-- 提交 -->
<!-- 提交 -->
<div
class=
"row-center-end"
style=
"padding-right: 100px"
>
<div
class=
"row-center-end"
style=
"padding-right: 100px"
>
<el-button
<el-button
...
@@ -1038,9 +661,6 @@ import {
...
@@ -1038,9 +661,6 @@ import {
putinUpdateAdvertiseConversion
,
putinUpdateAdvertiseConversion
,
putinCreatePutinTask
,
putinCreatePutinTask
,
putinFetchIndustryList
,
putinFetchIndustryList
,
getCallActionList
,
getCrowdList
,
getCreatedDirectPkg
,
getAdvList
,
getAdvList
,
getAdvertiseCount
,
getAdvertiseCount
,
}
from
"@/api/report"
;
}
from
"@/api/report"
;
...
@@ -1056,6 +676,7 @@ import AddAdvGroup from "./childComponents/AddAdvGroup";
...
@@ -1056,6 +676,7 @@ import AddAdvGroup from "./childComponents/AddAdvGroup";
import
TextTextarea
from
"./childComponents/TextTextarea"
;
import
TextTextarea
from
"./childComponents/TextTextarea"
;
import
CountrySelector
from
"./childComponents/CountrySelector"
;
import
CountrySelector
from
"./childComponents/CountrySelector"
;
import
LanguageSelector
from
"./childComponents/LanguageSelector"
;
import
LanguageSelector
from
"./childComponents/LanguageSelector"
;
import
TextInputList
from
"./childComponents/TextInputList"
;
import
{
stepList
}
from
"./childComponents/util"
;
import
{
stepList
}
from
"./childComponents/util"
;
...
@@ -1070,6 +691,7 @@ export default {
...
@@ -1070,6 +691,7 @@ export default {
AddAdvGroup
,
AddAdvGroup
,
TextTextarea
,
TextTextarea
,
CountrySelector
,
CountrySelector
,
TextInputList
,
},
// 注册
},
// 注册
data
()
{
data
()
{
...
@@ -1179,6 +801,27 @@ export default {
...
@@ -1179,6 +801,27 @@ export default {
ladderStep
:
0
,
// 阶梯价步长
ladderStep
:
0
,
// 阶梯价步长
putinStrag
:
'default'
,
//
putinStrag
:
'default'
,
//
},
},
// 任务保存数据
putinTask
:
{
taskName
:
''
,
putinAccounts
:
[],
campaignName
:
''
,
campaignType
:
1
,
dailyBudget
:
0.0
,
targetCpa
:
0.0
,
appInfo
:
""
,
appStore
:
3
,
startDate
:
''
,
endDate
:
''
,
locations
:
[],
languages
:
[],
adGroupName
:
''
,
headlines
:
[],
descriptions
:
[],
imageAssets
:
[],
videoAssets
:
[]
},
// 用户定向
// 用户定向
orientation
:
{
orientation
:
{
...
@@ -1300,6 +943,8 @@ export default {
...
@@ -1300,6 +943,8 @@ export default {
inputVisible2
:
false
,
inputVisible2
:
false
,
inputValue2
:
""
,
inputValue2
:
""
,
inputValue5
:
""
,
inputVisibleTag
:
false
,
inputVisibleTag
:
false
,
inputValueTag
:
""
,
inputValueTag
:
""
,
...
@@ -1321,14 +966,10 @@ export default {
...
@@ -1321,14 +966,10 @@ export default {
},
},
},
},
created
()
{
created
()
{
this
.
startDate
=
moment
().
subtract
(
0
,
"days"
).
format
(
"YYYY-MM-DD"
);
this
.
putinTask
.
startDate
=
moment
().
subtract
(
0
,
"days"
).
format
(
"YYYY-MM-DD"
);
// [new Date(2000, 10, 10, 10, 10), new Date(2000, 10, 11, 10, 10)],
this
.
_menuSelectApps
();
// 获取App名称配置列表
this
.
_menuSelectApps
();
// 获取App名称配置列表
this
.
APIGetEnums
();
// 获取公共下拉框参数
this
.
APIGetEnums
();
// 获取公共下拉框参数
this
.
putinFetchAccount
();
// 获取投放账号列表
this
.
materialGroupList
();
// 获取创建的素材组列表
this
.
materialGroupList
();
// 获取创建的素材组列表
this
.
putinFetchIndustryList
();
// 抓取创意三级分类信息列表
this
.
putinFetchIndustryList
();
// 抓取创意三级分类信息列表
this
.
putinFetchPutinTasks
();
// 获取投放任务列表
this
.
putinFetchPutinTasks
();
// 获取投放任务列表
...
@@ -1342,62 +983,6 @@ export default {
...
@@ -1342,62 +983,6 @@ export default {
},
},
methods
:
{
methods
:
{
/* 获取人群包列表 */
APIGetCrowdList
(
advertiserId
)
{
let
params
=
{
advertiserId
:
advertiserId
,
};
getCrowdList
(
params
).
then
((
res
)
=>
{
// console.log("res111111", res);
this
.
custom_audienc
=
res
.
result
.
data
;
// 人群定向包
this
.
exclude_audience
=
res
.
result
.
data
;
// 用来处理排除人群 单独处理
});
},
/* 获取已创建的定向包 */
APIGetCreatedDirectPkg
(
pkg
)
{
let
params
=
{
pkg
,
};
getCreatedDirectPkg
(
params
).
then
((
res
)
=>
{
this
.
directPkg
=
res
.
result
.
data
;
});
},
//获取行动号召列表
getCallActionList
()
{
if
(
!
this
.
targetList
[
0
]
||
!
this
.
targetList
[
0
].
pid
||
!
this
.
targetList
[
0
].
id
||
!
this
.
putinBaseInfo
.
landingType
||
this
.
targetList
[
0
].
pid
==
undefined
||
this
.
targetList
[
0
].
id
==
undefined
||
this
.
putinBaseInfo
.
landingType
==
undefined
)
{
this
.
$message
.
error
(
"请先填写上面的参数!"
);
this
.
callActionList
=
[];
return
;
}
let
params
=
{
accountId
:
this
.
targetList
[
0
].
pid
,
advertiserId
:
this
.
targetList
[
0
].
id
,
landType
:
this
.
putinBaseInfo
.
landingType
,
industry
:
this
.
makeCreative
.
creativeCategory
,
//选填
};
getCallActionList
(
params
).
then
((
res
)
=>
{
if
(
res
.
status
==
200
)
{
if
(
res
.
result
.
data
.
length
==
0
)
{
this
.
$message
.
info
(
"没有相关选项"
);
}
this
.
callActionList
=
res
.
result
.
data
;
}
else
{
this
.
$message
.
error
(
"行动请求列数据-请求错误"
);
}
});
},
//创建投放重置数据
//创建投放重置数据
clearAllData
()
{
clearAllData
()
{
this
.
drawer
=
true
;
// 打开抽屉
this
.
drawer
=
true
;
// 打开抽屉
...
@@ -1440,119 +1025,7 @@ export default {
...
@@ -1440,119 +1025,7 @@ export default {
ladderStep
:
0
,
// 阶梯价步长
ladderStep
:
0
,
// 阶梯价步长
putinStrag
:
'default'
putinStrag
:
'default'
};
};
this
.
orientation
=
{
id
:
""
,
allowCity
:
""
,
// 城市
allowGender
:
"NONE"
,
// 性别(默认: 不限)
allowAge
:
""
,
// 年龄
interestActionMode
:
"RECOMMEND"
,
// 行为兴趣(默认: 系统推荐)
allowNetwork
:
""
,
// 网络
allowCarrier
:
""
,
// 运营商
retargetingTagsExclude
:
""
,
retargetingTagsInclude
:
""
,
selectHisPack
:
""
,
};
this
.
makeCreative
=
{
id
:
""
,
adSource
:
""
,
materialGroupId
:
""
,
creativeComposeMethod
:
2
,
verticalVideo
:
""
,
horizontalVideo
:
""
,
bigImage
:
""
,
smallImage
:
""
,
verticalBigImage
:
""
,
textGroup
:
""
,
// 制作创意: 添加文案
textNum
:
5
,
//文案数
promotionCardImg
:
""
,
productImageId
:
""
,
// 商品卡片图片(主图)
productDescription
:
""
,
// 推广卡片 标题(描述)
productSellingPoints
:
""
,
// 推广卡片 商品卖点
enablePersonalAction
:
1
,
// 是否使用智能优选,1为使用,0为不使用
actionText
:
""
,
subTitle
:
""
,
// 制作创意: 副标题
adComment
:
0
,
advanceCreative
:
0
,
isPresentedVideo
:
1
,
bestCreativeDerivePlan
:
1
,
brandMainPage
:
1
,
creativeCategory
:
""
,
// 创意分类
creativeFullCategory
:
""
,
// 创意分类所有id, 便于回显
creativeTags
:
""
,
// 创意标签
creativeMaterialMode
:
"STATIC_ASSEMBLE"
,
// 默认程序化创意
creativeShowMode
:
1
,
// 创意展现方式, 默认优选模式
gdtMonitorUrl
:
""
,
putinInventoryType
:
"smartInventory"
,
// 投放位置的类型
putinInventory
:
""
,
// 投放位置的值
kuaishouMonitorUrl
:
""
,
smartInventory
:
1
,
openPlay
:
"no"
,
//开启试玩素材选择yes否则是no
};
this
.
arrays
=
{
creativeTags
:
[],
// 创意标签
allowAge
:
[
""
],
// 用户定向: 年龄
allowNetwork
:
[
""
],
// 用户定向: 网络
allowCarrier
:
[
""
],
// 用户定向: 运营商
textGroup
:
[],
// 制作创意: 添加文案,
productSellingPoints
:
[],
// 推广卡片 商品卖点
};
this
.
targetList
=
[];
// this.generateData = []; // 未选中数据 清除
this
.
toData
=
[];
//已选中的数据 清除
this
.
targetData
=
""
;
//
this
.
allowDirect
=
"Both"
;
this
.
creativeCategoryDefault
=
[];
//以上是格式化表单
this
.
together_id2
=
[];
this
.
together_id1
=
[];
this
.
custom_audienc_id
=
[];
this
.
activePutin
=
"newPutin"
;
this
.
bid_type
=
"only"
;
},
handleAgeDire
(
value
)
{
// console.log("改变:", value);
let
ages
=
[...
this
.
arrays
.
allowAge
];
let
len
=
ages
.
length
;
if
(
len
>
1
)
{
if
(
ages
[
len
-
1
]
!==
""
)
{
this
.
arrays
.
allowAge
=
ages
.
filter
((
i
)
=>
i
!==
""
);
}
else
{
this
.
arrays
.
allowAge
=
ages
.
filter
((
i
)
=>
i
===
""
);
}
}
},
handleNetDire
()
{
let
net
=
[...
this
.
arrays
.
allowNetwork
];
let
len
=
net
.
length
;
if
(
len
>
1
)
{
if
(
net
[
len
-
1
]
!==
""
)
{
this
.
arrays
.
allowNetwork
=
net
.
filter
((
i
)
=>
i
!==
""
);
}
else
{
this
.
arrays
.
allowNetwork
=
net
.
filter
((
i
)
=>
i
===
""
);
}
}
},
handleCarrierDire
()
{
let
carrier
=
[...
this
.
arrays
.
allowCarrier
];
let
len
=
carrier
.
length
;
if
(
len
>
1
)
{
if
(
carrier
[
len
-
1
]
!==
""
)
{
this
.
arrays
.
allowCarrier
=
carrier
.
filter
((
i
)
=>
i
!==
""
);
}
else
{
this
.
arrays
.
allowCarrier
=
carrier
.
filter
((
i
)
=>
i
===
""
);
}
}
},
checkCardTitle
()
{
// console.log("检查卡片标题:", this.makeCreative.productDescription);
if
(
this
.
makeCreative
.
productDescription
.
length
>
7
)
{
this
.
$message
.
warning
(
"卡片标题需在7字以内"
);
}
},
},
executeTask
()
{
executeTask
()
{
...
@@ -1603,20 +1076,8 @@ export default {
...
@@ -1603,20 +1076,8 @@ export default {
});
});
},
},
changePutinInventory
:
function
(
item
)
{
// console.log(12345, item);
this
.
makeCreative
.
putinInventory
=
""
;
// 广告优选
if
(
this
.
makeCreative
.
putinInventoryType
===
"smartInventory"
)
{
this
.
is_card
=
true
;
}
else
{
this
.
is_card
=
false
;
}
},
handleClose2
(
tag
)
{
handleClose2
(
tag
)
{
this
.
arrays
.
textGroup
.
splice
(
this
.
arrays
.
textGroup
.
indexOf
(
tag
),
1
);
this
.
putinTask
.
headlines
.
splice
(
this
.
putinTask
.
headlines
.
indexOf
(
tag
),
1
);
},
},
/* 点击添加时 显示表单输入 */
/* 点击添加时 显示表单输入 */
...
@@ -1638,29 +1099,30 @@ export default {
...
@@ -1638,29 +1099,30 @@ export default {
handleInputConfirm2
()
{
handleInputConfirm2
()
{
let
inputValue2
=
this
.
inputValue2
;
let
inputValue2
=
this
.
inputValue2
;
if
(
inputValue2
&&
this
.
tagId
==
""
)
{
if
(
inputValue2
&&
this
.
tagId
==
""
)
{
this
.
arrays
.
textGroup
.
push
(
inputValue2
);
this
.
putinTask
.
headlines
.
push
(
inputValue2
);
/* 添加到文案库 */
/* 添加到文案库 */
this
.
APIGetBusinTextAdd
(
inputValue2
);
this
.
APIGetBusinTextAdd
(
inputValue2
);
}
else
if
(
inputValue2
&&
this
.
tagId
!=
""
)
{
}
else
if
(
inputValue2
&&
this
.
tagId
!=
""
)
{
this
.
APIGetBusinTextEdit
(
this
.
tagId
,
inputValue2
);
// 修改文案
this
.
APIGetBusinTextEdit
(
this
.
tagId
,
inputValue2
);
// 修改文案
this
.
arrays
.
textGroup
.
push
(
inputValue2
);
this
.
putinTask
.
headlines
.
push
(
inputValue2
);
}
}
// this.inputVisible2 = false;
// this.inputVisible2 = false;
this
.
inputValue2
=
""
;
// 添加完之后恢复表单为空值
this
.
inputValue2
=
""
;
// 添加完之后恢复表单为空值
},
},
// 批量添加文案
// 批量添加文案
handleTextareaData
(
value
)
{
handleTextareaData
(
value
)
{
this
.
arrays
.
textGroup
=
[];
this
.
putinTask
.
headlines
=
[];
console
.
log
(
value
);
console
.
log
(
value
);
// 过滤空行
// 过滤空行
var
values
=
value
.
filter
((
item
)
=>
item
!=
''
);
var
values
=
value
.
filter
((
item
)
=>
item
!=
''
);
console
.
log
(
values
);
console
.
log
(
values
);
values
.
forEach
((
item
)
=>
{
values
.
forEach
((
item
)
=>
{
this
.
arrays
.
textGroup
.
push
(
item
);
this
.
putinTask
.
headlines
.
push
(
item
);
});
});
this
.
arrays
.
textGroup
=
[...
new
Set
(
this
.
arrays
.
textGroup
)];
this
.
putinTask
.
headlines
=
[...
new
Set
(
this
.
putinTask
.
headlines
)];
/* 添加到文案库 */
/* 添加到文案库 */
this
.
APIGetBusinTextAdd
(
values
.
toString
());
this
.
APIGetBusinTextAdd
(
values
.
toString
());
...
@@ -1719,7 +1181,7 @@ export default {
...
@@ -1719,7 +1181,7 @@ export default {
handleInputConfirmTag
()
{
handleInputConfirmTag
()
{
let
inputValueTag
=
this
.
inputValueTag
;
let
inputValueTag
=
this
.
inputValueTag
;
if
(
inputValueTag
)
{
if
(
inputValueTag
)
{
this
.
arrays
.
textGroup
.
push
(
inputValueTag
);
this
.
putinTask
.
headlines
.
push
(
inputValueTag
);
}
}
this
.
inputVisibleTag
=
false
;
this
.
inputVisibleTag
=
false
;
this
.
inputValueTag
=
""
;
this
.
inputValueTag
=
""
;
...
@@ -1783,7 +1245,7 @@ export default {
...
@@ -1783,7 +1245,7 @@ export default {
this
.
orientation
.
allowAge
=
this
.
arrays
.
allowAge
.
join
();
this
.
orientation
.
allowAge
=
this
.
arrays
.
allowAge
.
join
();
this
.
orientation
.
allowNetwork
=
this
.
arrays
.
allowNetwork
.
join
();
this
.
orientation
.
allowNetwork
=
this
.
arrays
.
allowNetwork
.
join
();
this
.
orientation
.
allowCarrier
=
this
.
arrays
.
allowCarrier
.
join
();
this
.
orientation
.
allowCarrier
=
this
.
arrays
.
allowCarrier
.
join
();
this
.
makeCreative
.
textGroup
=
JSON
.
stringify
(
this
.
arrays
.
textGroup
);
this
.
makeCreative
.
textGroup
=
JSON
.
stringify
(
this
.
putinTask
.
headlines
);
this
.
makeCreative
.
productSellingPoints
=
JSON
.
stringify
(
this
.
makeCreative
.
productSellingPoints
=
JSON
.
stringify
(
this
.
arrays
.
productSellingPoints
this
.
arrays
.
productSellingPoints
);
);
...
@@ -1809,18 +1271,7 @@ export default {
...
@@ -1809,18 +1271,7 @@ export default {
this
.
makeCreative
.
openPlay
=
"yes"
;
this
.
makeCreative
.
openPlay
=
"yes"
;
}
}
console
.
log
(
"任务提交参数:"
,
JSON
.
stringify
(
{
putinBaseInfo
:
this
.
putinBaseInfo
,
orientation
:
this
.
orientation
,
makeCreative
:
this
.
makeCreative
,
},
null
,
4
)
);
//提交按钮禁用
//提交按钮禁用
this
.
submitBtnState
=
true
;
this
.
submitBtnState
=
true
;
/* 接口请求 */
/* 接口请求 */
...
@@ -1934,52 +1385,14 @@ export default {
...
@@ -1934,52 +1385,14 @@ export default {
// console.log("targetList回显:", JSON.stringify(this.targetList, null, 4));
// console.log("targetList回显:", JSON.stringify(this.targetList, null, 4));
},
},
// 监听穿梭框组件添加
add
(
generateData
,
toData
,
obj
)
{
// 树形穿梭框模式transfer时,返回参数为左侧树移动后数据、右侧树移动后数据、移动的{keys,nodes,halfKeys,halfNodes}对象
// 通讯录模式addressList时,返回参数为右侧收件人列表、右侧抄送人列表、右侧密送人列表
// console.log("generateData:", generateData);
// console.log("toData:", JSON.stringify(toData, null, 4));
// console.log("obj:", obj);
/* 取一个广告组的id 用来获取人群包数据 */
this
.
crowdAdvertiserId
=
toData
[
0
].
children
[
0
].
id
+
""
;
this
.
APIGetCrowdList
(
this
.
crowdAdvertiserId
);
this
.
putinBaseInfo
.
selectAdvertisers
=
[];
this
.
targetList
=
[];
// 清空组装投放目标列表
this
.
gettoData
(
toData
);
// 组装投放列表
},
// 监听穿梭框组件移除
remove
(
generateData
,
toData
,
obj
)
{
// 树形穿梭框模式transfer时,返回参数为左侧树移动后数据、右侧树移动后数据、移动的{keys,nodes,halfKeys,halfNodes}对象
// 通讯录模式addressList时,返回参数为右侧收件人列表、右侧抄送人列表、右侧密送人列表
/* console.log("generateData:", generateData);
console.log("toData:", toData);
console.log("obj:", obj); */
this
.
putinBaseInfo
.
selectAdvertisers
=
[];
this
.
targetList
=
[];
// 清空组装投放目标列表
this
.
gettoData
(
toData
);
},
// 获取投放账号列表
// 获取投放账号列表
putinFetchAccount
:
function
()
{
putinFetchAccount
:
function
()
{
for
(
let
i
=
0
;
i
<
this
.
pkgList
.
length
;
i
++
)
{
if
(
this
.
pkgList
[
i
].
value
==
this
.
putinBaseInfo
.
pkg
)
{
this
.
appId
=
this
.
pkgList
[
i
].
id
+
""
;
break
;
}
}
this
.
uploadData
.
pkg
=
this
.
putinBaseInfo
.
pkg
;
putinFetchAccount
({
putinFetchAccount
({
pkg
:
this
.
putinBaseInfo
.
pkg
,
pkg
:
this
.
putinTask
.
appInfo
.
value
,
type
:
this
.
platformId
,
}).
then
((
res
)
=>
{
}).
then
((
res
)
=>
{
this
.
generateData
=
res
.
result
.
data
;
this
.
generateData
=
res
.
result
.
data
;
this
.
generateData
=
this
.
generateData
.
map
(
obj
=>
({
key
:
obj
,
label
:
obj
.
advertiserName
}));
this
.
materialGroupList
();
this
.
materialGroupList
();
});
});
},
},
...
@@ -2010,7 +1423,7 @@ export default {
...
@@ -2010,7 +1423,7 @@ export default {
// 获取创建的素材组列表
// 获取创建的素材组列表
materialGroupList
:
function
()
{
materialGroupList
:
function
()
{
materialGroupList
({
materialGroupList
({
pkg
:
this
.
putin
BaseInfo
.
pkg
,
pkg
:
this
.
putin
Task
.
appInfo
.
value
,
}).
then
((
res
)
=>
{
}).
then
((
res
)
=>
{
this
.
materialList
=
res
.
result
.
data
.
content
;
this
.
materialList
=
res
.
result
.
data
.
content
;
});
});
...
@@ -2115,33 +1528,7 @@ export default {
...
@@ -2115,33 +1528,7 @@ export default {
this
.
makeCreative
.
id
=
""
;
this
.
makeCreative
.
id
=
""
;
},
},
/* 逻辑定向回显 */
saveLogic
(
item
)
{
/* 根据定向逻辑中的值 确定是那个定向逻辑 */
if
(
this
.
orientation
.
retargetingTagsExclude
!=
null
&&
this
.
orientation
.
retargetingTagsInclude
!=
null
)
{
this
.
allowDirect
=
"Both"
;
this
.
together_id1
=
this
.
orientation
.
retargetingTagsInclude
.
split
(
","
);
this
.
together_id2
=
this
.
orientation
.
retargetingTagsExclude
.
split
(
","
);
}
else
if
(
this
.
orientation
.
retargetingTagsExclude
!=
null
)
{
this
.
allowDirect
=
"retargetingTagsExclude"
;
this
.
custom_audienc_id
=
this
.
orientation
.
retargetingTagsExclude
.
split
(
","
);
}
else
if
(
this
.
orientation
.
retargetingTagsInclude
!=
null
)
{
this
.
allowDirect
=
"retargetingTagsInclude"
;
this
.
custom_audienc_id
=
this
.
orientation
.
retargetingTagsInclude
.
split
(
","
);
}
else
if
(
this
.
orientation
.
selectHisPack
!=
null
)
{
this
.
activeName
=
"second"
;
}
else
{
this
.
crowdValue
=
"不限"
;
this
.
logicShow
=
false
;
}
},
resetStatus
(
action
,
id
)
{
resetStatus
(
action
,
id
)
{
resetPutinStatus
({
action
:
action
,
id
:
id
}).
then
((
resp
)
=>
{
resetPutinStatus
({
action
:
action
,
id
:
id
}).
then
((
resp
)
=>
{
...
@@ -2224,7 +1611,7 @@ export default {
...
@@ -2224,7 +1611,7 @@ export default {
// 推广文案回显
// 推广文案回显
let
texts
=
item
.
makeCreative
.
textGroup
;
let
texts
=
item
.
makeCreative
.
textGroup
;
this
.
arrays
.
textGroup
=
JSON
.
parse
(
texts
);
this
.
putinTask
.
headlines
=
JSON
.
parse
(
texts
);
// 推广卖点回显
// 推广卖点回显
let
psp
=
item
.
makeCreative
.
productSellingPoints
;
let
psp
=
item
.
makeCreative
.
productSellingPoints
;
...
@@ -2242,8 +1629,6 @@ export default {
...
@@ -2242,8 +1629,6 @@ export default {
this
.
crowdValue
=
"自定义人群"
;
this
.
crowdValue
=
"自定义人群"
;
this
.
logicShow
=
true
;
this
.
logicShow
=
true
;
/* 定向逻辑回显 */
this
.
saveLogic
(
item
);
/* 选择媒体时的回显 */
/* 选择媒体时的回显 */
this
.
change_putinInventory
();
this
.
change_putinInventory
();
...
@@ -2294,8 +1679,8 @@ export default {
...
@@ -2294,8 +1679,8 @@ export default {
receiveData
(
textData
)
{
receiveData
(
textData
)
{
// console.log("文案数据", textData);
// console.log("文案数据", textData);
textData
.
forEach
((
item
)
=>
{
textData
.
forEach
((
item
)
=>
{
if
(
this
.
arrays
.
textGroup
.
indexOf
(
item
)
===
-
1
)
{
if
(
this
.
putinTask
.
headlines
.
indexOf
(
item
)
===
-
1
)
{
this
.
arrays
.
textGroup
.
push
(
item
);
this
.
putinTask
.
headlines
.
push
(
item
);
}
}
});
});
},
},
...
@@ -2317,7 +1702,7 @@ export default {
...
@@ -2317,7 +1702,7 @@ export default {
/* 删除表单 */
/* 删除表单 */
removeText
(
i
)
{
removeText
(
i
)
{
this
.
arrays
.
textGroup
.
splice
(
i
,
1
);
this
.
putinTask
.
headlines
.
splice
(
i
,
1
);
},
},
/* tab栏切换时触发 参数为被选中的tab */
/* tab栏切换时触发 参数为被选中的tab */
...
@@ -2403,7 +1788,7 @@ export default {
...
@@ -2403,7 +1788,7 @@ export default {
/* 清空选中的文案 */
/* 清空选中的文案 */
removeAll
()
{
removeAll
()
{
this
.
arrays
.
textGroup
=
[];
this
.
putinTask
.
headlines
=
[];
},
},
/* 清空创意分类中的标签 */
/* 清空创意分类中的标签 */
...
@@ -2580,6 +1965,22 @@ export default {
...
@@ -2580,6 +1965,22 @@ export default {
if
(
this
.
dailyBudget
!==
''
&&
!
isNaN
(
Number
(
this
.
dailyBudget
)))
{
if
(
this
.
dailyBudget
!==
''
&&
!
isNaN
(
Number
(
this
.
dailyBudget
)))
{
this
.
dailyBudget
=
Number
(
this
.
dailyBudget
).
toFixed
(
2
);
this
.
dailyBudget
=
Number
(
this
.
dailyBudget
).
toFixed
(
2
);
}
}
},
handleChangeApp
(
item
){
this
.
putinFetchAccount
()
if
(
this
.
putinTask
.
taskName
==
''
){
this
.
putinTask
.
taskName
=
`
${
item
.
label
}
-
${
moment
().
format
(
"YYYY-mm-dd HH:mm:ss"
)}
`
}
if
(
this
.
putinTask
.
campaignName
==
''
){
this
.
putinTask
.
campaignName
=
`
${
item
.
label
}
-
${
moment
().
format
(
"YYYY-mm-dd HH:mm:ss"
)}
`
}
},
filterAccount
(
query
,
item
){
query
=
query
.
toLowerCase
()
return
item
.
key
.
toString
().
toLowerCase
().
includes
(
query
)
||
item
.
label
.
toString
().
toLowerCase
().
includes
(
query
)
}
}
},
},
};
};
...
...
src/views/createMaterial/common/materialGroup.vue
View file @
6f5abc1c
...
@@ -484,8 +484,8 @@ export default {
...
@@ -484,8 +484,8 @@ export default {
// 创意素材组获取列表
// 创意素材组获取列表
APIgetSelectApps
()
{
APIgetSelectApps
()
{
const
params
=
{
const
params
=
{
platformId
:
4
,
platformId
:
5
,
menuCode
:
"
putin.apps
"
,
menuCode
:
"
game.Overview,android
"
,
isGroup
:
"group"
,
isGroup
:
"group"
,
};
};
getSelectApps
(
params
).
then
((
res
)
=>
{
getSelectApps
(
params
).
then
((
res
)
=>
{
...
...
src/views/createMaterial/common/materiallibrary.vue
View file @
6f5abc1c
...
@@ -740,8 +740,8 @@ export default {
...
@@ -740,8 +740,8 @@ export default {
methods
:
{
methods
:
{
APIgetSelectApps
()
{
APIgetSelectApps
()
{
const
params
=
{
const
params
=
{
platformId
:
4
,
platformId
:
5
,
menuCode
:
"
putin.apps
"
,
menuCode
:
"
game.Overview,android
"
,
};
};
getSelectApps
(
params
).
then
((
res
)
=>
{
getSelectApps
(
params
).
then
((
res
)
=>
{
// console.log("创意素材组下的下拉列表", res);
// console.log("创意素材组下的下拉列表", res);
...
...
src/views/createMaterial/index.vue
View file @
6f5abc1c
...
@@ -4,18 +4,12 @@
...
@@ -4,18 +4,12 @@
<el-tab-pane
label=
"素材组"
name=
"first"
>
<el-tab-pane
label=
"素材组"
name=
"first"
>
<materialGroup
v-if=
"isFirst"
>
</materialGroup>
<materialGroup
v-if=
"isFirst"
>
</materialGroup>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"衍生组"
name=
"derive"
>
<materialDerive
v-if=
"isDerive"
>
</materialDerive>
</el-tab-pane>
<el-tab-pane
label=
"视图素材"
name=
"second"
>
<el-tab-pane
label=
"视图素材"
name=
"second"
>
<materiallibrary
v-if=
"isSecond"
></materiallibrary>
<materiallibrary
v-if=
"isSecond"
></materiallibrary>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"文案素材"
name=
"copywriting"
>
<el-tab-pane
label=
"文案素材"
name=
"copywriting"
>
<copywritinglibrary
v-if=
"isCopywriting"
></copywritinglibrary>
<copywritinglibrary
v-if=
"isCopywriting"
></copywritinglibrary>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"试玩素材"
name=
"tryplaymaterial"
>
<try-play-material
v-if=
"isTryPlayMaterial"
/>
</el-tab-pane>
<el-tab-pane
label=
"素材推荐"
name=
"materialRecommend"
>
<el-tab-pane
label=
"素材推荐"
name=
"materialRecommend"
>
<material-recommend
v-if=
"isRecommend"
/>
<material-recommend
v-if=
"isRecommend"
/>
</el-tab-pane>
</el-tab-pane>
...
@@ -27,7 +21,6 @@
...
@@ -27,7 +21,6 @@
// import { getUrlKey } from "../uti";
// import { getUrlKey } from "../uti";
import
{
getEnums
,
getSelectApps
}
from
"@/api/cloud"
;
import
{
getEnums
,
getSelectApps
}
from
"@/api/cloud"
;
import
materialGroup
from
"./common/materialGroup"
;
import
materialGroup
from
"./common/materialGroup"
;
import
materialDerive
from
"./common/materialDerive"
;
import
copywritinglibrary
from
"./common/copywritinglibrary"
;
import
copywritinglibrary
from
"./common/copywritinglibrary"
;
import
materiallibrary
from
"./common/materiallibrary"
;
import
materiallibrary
from
"./common/materiallibrary"
;
import
TryPlayMaterial
from
"./common/TryPlayMaterial"
;
import
TryPlayMaterial
from
"./common/TryPlayMaterial"
;
...
@@ -37,8 +30,6 @@ export default {
...
@@ -37,8 +30,6 @@ export default {
materialGroup
,
materialGroup
,
copywritinglibrary
,
copywritinglibrary
,
materiallibrary
,
materiallibrary
,
materialDerive
,
TryPlayMaterial
,
MaterialRecommend
,
MaterialRecommend
,
},
},
data
()
{
data
()
{
...
@@ -47,10 +38,8 @@ export default {
...
@@ -47,10 +38,8 @@ export default {
checkAll
:
false
,
checkAll
:
false
,
activeName
:
"first"
,
activeName
:
"first"
,
isFirst
:
true
,
isFirst
:
true
,
isDerive
:
false
,
isSecond
:
false
,
isSecond
:
false
,
isCopywriting
:
false
,
isCopywriting
:
false
,
isTryPlayMaterial
:
false
,
isRecommend
:
false
,
isRecommend
:
false
,
/* 提取任务*/
/* 提取任务*/
options2
:
[],
options2
:
[],
...
@@ -92,43 +81,26 @@ export default {
...
@@ -92,43 +81,26 @@ export default {
this
.
isFirst
=
true
;
this
.
isFirst
=
true
;
this
.
isSecond
=
false
;
this
.
isSecond
=
false
;
this
.
isCopywriting
=
false
;
this
.
isCopywriting
=
false
;
this
.
isDerive
=
false
;
this
.
isTryPlayMaterial
=
false
;
this
.
isRecommend
=
false
;
this
.
isRecommend
=
false
;
}
else
if
(
tab
.
name
===
"second"
)
{
}
else
if
(
tab
.
name
===
"second"
)
{
this
.
isFirst
=
false
;
this
.
isFirst
=
false
;
this
.
isSecond
=
true
;
this
.
isSecond
=
true
;
this
.
isCopywriting
=
false
;
this
.
isCopywriting
=
false
;
this
.
isDerive
=
false
;
this
.
isTryPlayMaterial
=
false
;
this
.
isRecommend
=
false
;
this
.
isRecommend
=
false
;
}
else
if
(
tab
.
name
===
"copywriting"
)
{
}
else
if
(
tab
.
name
===
"copywriting"
)
{
this
.
isFirst
=
false
;
this
.
isFirst
=
false
;
this
.
isSecond
=
false
;
this
.
isSecond
=
false
;
this
.
isCopywriting
=
true
;
this
.
isCopywriting
=
true
;
this
.
isDerive
=
false
;
this
.
isTryPlayMaterial
=
false
;
this
.
isRecommend
=
false
;
}
else
if
(
tab
.
name
===
"derive"
)
{
this
.
isFirst
=
false
;
this
.
isSecond
=
false
;
this
.
isCopywriting
=
false
;
this
.
isDerive
=
true
;
this
.
isTryPlayMaterial
=
false
;
this
.
isRecommend
=
false
;
this
.
isRecommend
=
false
;
}
else
if
(
tab
.
name
===
"tryplaymaterial"
)
{
}
else
if
(
tab
.
name
===
"tryplaymaterial"
)
{
this
.
isFirst
=
false
;
this
.
isFirst
=
false
;
this
.
isSecond
=
false
;
this
.
isSecond
=
false
;
this
.
isCopywriting
=
false
;
this
.
isCopywriting
=
false
;
this
.
isDerive
=
false
;
this
.
isTryPlayMaterial
=
true
;
this
.
isRecommend
=
false
;
this
.
isRecommend
=
false
;
}
else
if
(
tab
.
name
==
"materialRecommend"
)
{
}
else
if
(
tab
.
name
==
"materialRecommend"
)
{
this
.
isFirst
=
false
;
this
.
isFirst
=
false
;
this
.
isSecond
=
false
;
this
.
isSecond
=
false
;
this
.
isCopywriting
=
false
;
this
.
isCopywriting
=
false
;
this
.
isDerive
=
false
;
this
.
isTryPlayMaterial
=
false
;
this
.
isRecommend
=
true
;
this
.
isRecommend
=
true
;
}
}
},
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment