|
@@ -239,7 +239,16 @@ li.chouzhen.first:before {
|
|
|
<a-form layout="horizontal" v-bind="formItemLayout" :form="formProject" hide-required-mark>
|
|
|
<a-row :gutter="16">
|
|
|
<a-col :span="16">
|
|
|
+ <a-form-item
|
|
|
+ label="项目名称"
|
|
|
+ :labelCol="formItemLayout.labelCol"
|
|
|
+ class="require-check"
|
|
|
+ v-if="$route.query.id"
|
|
|
+ >
|
|
|
+ <a-input v-model="projectName" disabled></a-input>
|
|
|
+ </a-form-item>
|
|
|
<selectTable
|
|
|
+ v-else
|
|
|
:labelCol="formItemLayout.labelCol"
|
|
|
:projectId.sync="projectId"
|
|
|
ref="selectTable"
|
|
@@ -444,17 +453,18 @@ li.chouzhen.first:before {
|
|
|
<a-collapse expand-icon-position="right">
|
|
|
<a-collapse-panel key="1" :header="item.appName">
|
|
|
<a-descriptions>
|
|
|
- <a-descriptions-item label="应用标识">
|
|
|
+ <a-descriptions-item label="应用标识" :span="2">
|
|
|
{{ item.appVersion }}
|
|
|
</a-descriptions-item>
|
|
|
- <a-descriptions-item label="投放系统">
|
|
|
- {{ item.platform | platform }}
|
|
|
- </a-descriptions-item>
|
|
|
+
|
|
|
<a-descriptions-item label="覆盖账户">
|
|
|
{{ item.count }}
|
|
|
</a-descriptions-item>
|
|
|
- <a-descriptions-item label="调起链接">
|
|
|
- {{ item.schemaUri ? item.schemaUri : '无' }}
|
|
|
+ <a-descriptions-item label="投放系统" :span="3">
|
|
|
+ {{ item.platform | platform }}
|
|
|
+ </a-descriptions-item>
|
|
|
+ <a-descriptions-item label="调起链接" :span="3">
|
|
|
+ {{ appDetail.schemaUri ? appDetail.schemaUri : '无' }}
|
|
|
</a-descriptions-item>
|
|
|
</a-descriptions>
|
|
|
</a-collapse-panel>
|
|
@@ -486,6 +496,7 @@ li.chouzhen.first:before {
|
|
|
:disabled="!projectId"
|
|
|
>选择定向包 ></a-button
|
|
|
>
|
|
|
+ <p v-if="$route.query.id" style="margin:0">重新选择定向包将会重新选取</p>
|
|
|
</div>
|
|
|
</a-form-item>
|
|
|
<a-form-item label="" v-bind="tailFormItemLayout">
|
|
@@ -870,7 +881,6 @@ li.chouzhen.first:before {
|
|
|
</a-row>
|
|
|
</a-card>
|
|
|
<a-card class="search-box step-jump" title="优化目标">
|
|
|
- <a-button type="primary" slot="extra" @click="test">提交</a-button>
|
|
|
<a-form layout="horizontal" v-bind="formItemLayout" :form="formOptimize">
|
|
|
<a-row :gutter="16">
|
|
|
<a-col :span="16">
|
|
@@ -932,6 +942,7 @@ li.chouzhen.first:before {
|
|
|
<a-select
|
|
|
style="width:300px"
|
|
|
size="default"
|
|
|
+ allowClear
|
|
|
v-decorator="['deepConversionType']"
|
|
|
>
|
|
|
<a-select-option :value="3">
|
|
@@ -981,20 +992,24 @@ li.chouzhen.first:before {
|
|
|
]"
|
|
|
>
|
|
|
</a-input>
|
|
|
+ <br>
|
|
|
+ <span style="color:red"
|
|
|
+ >单出价请输入单数字,阶梯出价请用/隔开 例如10/12,区间出价请用-链接
|
|
|
+ 例如20-25</span
|
|
|
+ >
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
+ <!-- { rules: [{ validator: deepBidValid }] } -->
|
|
|
<a-row :gutter="16">
|
|
|
<a-col :span="16">
|
|
|
<a-form-item label="深度转化出价">
|
|
|
- <a-input
|
|
|
- style="width:300px"
|
|
|
- v-decorator="[
|
|
|
- 'deepConversionBid',
|
|
|
- { rules: [{ validator: deepBidValid }] }
|
|
|
- ]"
|
|
|
+ <a-input style="width:300px" v-decorator="['deepConversionBid']"> </a-input>
|
|
|
+ <br>
|
|
|
+ <span style="color:red"
|
|
|
+ >单出价请输入单数字,阶梯出价请用/隔开 例如10/12,区间出价请用-链接
|
|
|
+ 例如20-25</span
|
|
|
>
|
|
|
- </a-input>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
@@ -1007,8 +1022,8 @@ li.chouzhen.first:before {
|
|
|
<a-form-item v-bind="tailFormItemLayoutElse" style="margin-left:1.15%">
|
|
|
<a-descriptions>
|
|
|
<a-descriptions-item label="创意制作方式">
|
|
|
- <span v-if="showCreativeData && showCreativeData.openProgramCreate">
|
|
|
- {{ showCreativeData.openProgramCreate | openProgramCreate }}
|
|
|
+ <span v-if="showCreativeData">
|
|
|
+ {{ showCreativeData.unitType | unitType }}
|
|
|
</span>
|
|
|
<span v-else>-</span>
|
|
|
</a-descriptions-item>
|
|
@@ -1063,14 +1078,7 @@ li.chouzhen.first:before {
|
|
|
</span>
|
|
|
<span v-else>-</span>
|
|
|
</a-descriptions-item>
|
|
|
- <a-descriptions-item label="广告语">
|
|
|
- <span v-if="showCreativeData">
|
|
|
- <span v-for="(item, index) in descriptionList" :key="index">
|
|
|
- {{ item.value }}{{ index === descriptionList.length - 1 ? '' : ',' }}
|
|
|
- </span>
|
|
|
- </span>
|
|
|
- <span v-else>-</span>
|
|
|
- </a-descriptions-item>
|
|
|
+
|
|
|
<a-descriptions-item label="创意分类">
|
|
|
<span v-if="showCreativeData && showCreativeData.creativeCategory">
|
|
|
<a-cascader
|
|
@@ -1085,7 +1093,7 @@ li.chouzhen.first:before {
|
|
|
</a-descriptions-item>
|
|
|
<a-descriptions-item label="行动号召">
|
|
|
<span v-if="showCreativeData && showCreativeData.actionBarText">
|
|
|
- {{ showCreativeData.actionBarText }}
|
|
|
+ {{ showCreativeData.actionBarText.join() }}
|
|
|
</span>
|
|
|
<span v-else>-</span>
|
|
|
</a-descriptions-item>
|
|
@@ -1095,6 +1103,14 @@ li.chouzhen.first:before {
|
|
|
</span>
|
|
|
<span v-else>-</span>
|
|
|
</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="广告语" :span="3">
|
|
|
+ <span v-if="showCreativeData">
|
|
|
+ <span v-for="(item, index) in descriptionList" :key="index">
|
|
|
+ {{ item.value }}{{ index === descriptionList.length - 1 ? '' : ';' }}
|
|
|
+ </span>
|
|
|
+ </span>
|
|
|
+ <span v-else>-</span>
|
|
|
+ </a-descriptions-item>
|
|
|
</a-descriptions>
|
|
|
</a-form-item>
|
|
|
</a-card>
|
|
@@ -1167,6 +1183,20 @@ li.chouzhen.first:before {
|
|
|
</a-row>
|
|
|
</a-form>
|
|
|
</a-card>
|
|
|
+ <div style="display: flex; justify-content: flex-end; margin-bottom: 100px">
|
|
|
+ <div>
|
|
|
+ <a-button
|
|
|
+ type="primary"
|
|
|
+ style="margin-right: 15px"
|
|
|
+ @click="handleSubmit"
|
|
|
+ :loading="sumbitLoading"
|
|
|
+ :disabled="disabled"
|
|
|
+ >
|
|
|
+ 创建
|
|
|
+ </a-button>
|
|
|
+ <a-button @click="clearAllData"> 取消 </a-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
</div>
|
|
@@ -1179,7 +1209,11 @@ li.chouzhen.first:before {
|
|
|
<a-row :gutter="16">
|
|
|
<a-col :span="16">
|
|
|
<a-form-item label="系统平台">
|
|
|
- <a-radio-group v-decorator="['platformOs', { initialValue: 1 }]" button-style="solid">
|
|
|
+ <a-radio-group
|
|
|
+ v-decorator="['platformOs', { initialValue: 2 }]"
|
|
|
+ button-style="solid"
|
|
|
+ @change="changeType"
|
|
|
+ >
|
|
|
<!-- <a-radio-button :value="0">不限</a-radio-button> -->
|
|
|
<a-radio-button :value="1">Android</a-radio-button>
|
|
|
<a-radio-button :value="2">IOS</a-radio-button>
|
|
@@ -1243,6 +1277,7 @@ li.chouzhen.first:before {
|
|
|
:dataSource="multipleBidDataDrawer"
|
|
|
:pagination="false"
|
|
|
style="width:180%"
|
|
|
+ :scroll="{ x: 1200 }"
|
|
|
>
|
|
|
<a-table-column
|
|
|
key="appName"
|
|
@@ -1309,6 +1344,36 @@ li.chouzhen.first:before {
|
|
|
/>
|
|
|
</template>
|
|
|
</a-table-column>
|
|
|
+ <a-table-column
|
|
|
+ width="20%"
|
|
|
+ key="actionbarClickUrl"
|
|
|
+ data-index="actionbarClickUrl"
|
|
|
+ title="第三方点击按钮监测链接"
|
|
|
+ align="center"
|
|
|
+ :ellipsis="true"
|
|
|
+ >
|
|
|
+ <template slot-scope="text, record">
|
|
|
+ <editable-cell
|
|
|
+ :text="text"
|
|
|
+ @change="onCellChange(record.id, 'actionbarClickUrl', $event)"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </a-table-column>
|
|
|
+ <a-table-column
|
|
|
+ width="20%"
|
|
|
+ key="adPhotoPlayedT3sUrl"
|
|
|
+ data-index="adPhotoPlayedT3sUrl"
|
|
|
+ title="第三方有效播放监测链接"
|
|
|
+ align="center"
|
|
|
+ :ellipsis="true"
|
|
|
+ >
|
|
|
+ <template slot-scope="text, record">
|
|
|
+ <editable-cell
|
|
|
+ :text="text"
|
|
|
+ @change="onCellChange(record.id, 'adPhotoPlayedT3sUrl', $event)"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </a-table-column>
|
|
|
</a-table>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
@@ -1377,7 +1442,7 @@ li.chouzhen.first:before {
|
|
|
@close="closePerson"
|
|
|
>
|
|
|
<!-- @close="closeUnit('createForm')" -->
|
|
|
- <h2 slot="title" style="margin-bottom: 0">定向包选择 已选择({{ sumContent }})</h2>
|
|
|
+ <h2 slot="title" style="margin-bottom: 0">定向包选择</h2>
|
|
|
<div style="display: flex">
|
|
|
<a-input placeholder="输入定向包名称关键词" style="width:60%" v-model="searchTemplate" />
|
|
|
<a-button type="primary" :style="{ marginRight: '8px', marginLeft: '8px' }" @click="getTargetPerson()">
|
|
@@ -1392,6 +1457,7 @@ li.chouzhen.first:before {
|
|
|
>
|
|
|
重置
|
|
|
</a-button>
|
|
|
+ <div style="line-height: 32px;font-weight: 700;margin-left: 50px;">已选择({{ sumContent }})</div>
|
|
|
</div>
|
|
|
<a-checkbox-group v-model="checkPerson" style="width: 100%;" @change="setVideoData">
|
|
|
<div class="card-person-drawer info-detail">
|
|
@@ -1704,8 +1770,9 @@ li.chouzhen.first:before {
|
|
|
<a-form-item label="创意制作方式">
|
|
|
<a-radio-group
|
|
|
button-style="solid"
|
|
|
+ @change="unitTypeCheck"
|
|
|
v-decorator="[
|
|
|
- 'openProgramCreate',
|
|
|
+ 'unitType',
|
|
|
{
|
|
|
rules: [
|
|
|
{
|
|
@@ -1713,13 +1780,13 @@ li.chouzhen.first:before {
|
|
|
message: '创意制作方式必选'
|
|
|
}
|
|
|
],
|
|
|
- initialValue: 2
|
|
|
+ initialValue: 0
|
|
|
}
|
|
|
]"
|
|
|
>
|
|
|
- <a-radio-button :value="2">不限</a-radio-button>
|
|
|
- <a-radio-button :value="0">自定义</a-radio-button>
|
|
|
- <a-radio-button :value="1">程序化</a-radio-button>
|
|
|
+ <a-radio-button :value="0">不限</a-radio-button>
|
|
|
+ <a-radio-button :value="4">自定义</a-radio-button>
|
|
|
+ <a-radio-button :value="7">程序化</a-radio-button>
|
|
|
</a-radio-group>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
@@ -1756,7 +1823,7 @@ li.chouzhen.first:before {
|
|
|
<a-form-item label="关联封面数">
|
|
|
<a-input-number
|
|
|
style="width:200px"
|
|
|
- :max="15"
|
|
|
+ :max="imageCntMax"
|
|
|
:step="1"
|
|
|
:min="1"
|
|
|
v-decorator="[
|
|
@@ -1768,7 +1835,7 @@ li.chouzhen.first:before {
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
- <a-row :gutter="16" v-if="getFormData('formOriginality', 'openProgramCreate') != 1">
|
|
|
+ <a-row :gutter="16" v-if="getFormData('formOriginality', 'unitType') != 7">
|
|
|
<a-col :span="16">
|
|
|
<a-form-item label="自定义组上限">
|
|
|
<a-input-number
|
|
@@ -1784,7 +1851,7 @@ li.chouzhen.first:before {
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
- <a-row :gutter="16" v-if="getFormData('formOriginality', 'openProgramCreate') != 0">
|
|
|
+ <a-row :gutter="16" v-if="getFormData('formOriginality', 'unitType') != 4">
|
|
|
<a-col :span="16">
|
|
|
<a-form-item label="程序化组上限">
|
|
|
<a-input-number
|
|
@@ -1819,7 +1886,7 @@ li.chouzhen.first:before {
|
|
|
<a-form-item label="素材挖掘">
|
|
|
<a-radio-group
|
|
|
button-style="solid"
|
|
|
- v-decorator="['assetMining', { rules: [{ required: true }], initialValue: 0 }]"
|
|
|
+ v-decorator="['assetMining', { rules: [{ required: true }], initialValue: 1 }]"
|
|
|
>
|
|
|
<a-radio-button :value="1">开启</a-radio-button>
|
|
|
<a-radio-button :value="0">关闭</a-radio-button>
|
|
@@ -1832,7 +1899,7 @@ li.chouzhen.first:before {
|
|
|
<a-form-item label="智能抽帧">
|
|
|
<a-radio-group
|
|
|
button-style="solid"
|
|
|
- v-decorator="['smartCover', { rules: [{ required: true }], initialValue: 0 }]"
|
|
|
+ v-decorator="['smartCover', { rules: [{ required: true }], initialValue: 1 }]"
|
|
|
>
|
|
|
<a-radio-button :value="1">开启</a-radio-button>
|
|
|
<a-radio-button :value="0">关闭</a-radio-button>
|
|
@@ -1844,6 +1911,7 @@ li.chouzhen.first:before {
|
|
|
<a-col :span="16">
|
|
|
<a-form-item label="行动号召">
|
|
|
<a-select
|
|
|
+ mode="multiple"
|
|
|
v-decorator="[
|
|
|
'actionBarText',
|
|
|
{ rules: [{ required: true, message: '请选择行动号召按钮文案' }] }
|
|
@@ -1981,8 +2049,6 @@ import moment from 'moment'
|
|
|
import selectCheckAll from '@/components/formComponents/toutiaoTime'
|
|
|
import checkBoxGroup from '@/components/formComponents/checkBoxGroup'
|
|
|
import uploadFile from '@/components/uploadFileMd5Push.vue'
|
|
|
-import BMF from 'browser-md5-file'
|
|
|
-import templateModal from '@/views/modules/kuaishouapp/crossAccount/templateModal'
|
|
|
import { stopOtherVideo, closeAllVideoFun } from '@/utils/videoControl' // 停止除当前外的其他视频播放,及停止所有视频播放的方法
|
|
|
import selectTable from '@/views/modules/Statistics/components/selectPagination.vue'
|
|
|
import EditableCell from './editablCell'
|
|
@@ -2016,7 +2082,6 @@ export default {
|
|
|
selectCheckAll,
|
|
|
checkBoxGroup,
|
|
|
uploadFile,
|
|
|
- templateModal,
|
|
|
selectTable,
|
|
|
EditableCell
|
|
|
},
|
|
@@ -2051,10 +2116,12 @@ export default {
|
|
|
formOptimize: this.$form.createForm(this), //优化目标表单
|
|
|
formOriginality: this.$form.createForm(this), //创意表单
|
|
|
formMaterial: this.$form.createForm(this), //素材表单
|
|
|
+ sumbitLoading: false,
|
|
|
//基本信息参数
|
|
|
budgetType: '1',
|
|
|
dayBudgetType: '1',
|
|
|
projectId: null,
|
|
|
+ projectName: null,
|
|
|
//目标应用参数
|
|
|
targetAppVisible: false,
|
|
|
appList: [], //分平台数据,从总数据中筛选,避免多次请求接口
|
|
@@ -2104,6 +2171,7 @@ export default {
|
|
|
programUnitCnt: 60,
|
|
|
customUnitCnt: 400,
|
|
|
customUnitCntMax: 400,
|
|
|
+ imageCntMax: 15,
|
|
|
actionBarTextList: [],
|
|
|
descriptionList: [{ value: '' }],
|
|
|
fieldNames: {
|
|
@@ -2165,19 +2233,56 @@ export default {
|
|
|
offset: 5
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+ disabled: false
|
|
|
}
|
|
|
},
|
|
|
computed: {},
|
|
|
- watch: {},
|
|
|
+ watch: {
|
|
|
+ projectId: function(n, o) {
|
|
|
+ if (this.$route.query.id) {
|
|
|
+ return
|
|
|
+ } else {
|
|
|
+ if (n) {
|
|
|
+ this.getAction('/kuaishouProjectStrategy/checkProjectisOpen', { projectId: n }).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ if (res.success) {
|
|
|
+ if (res.result === 1) {
|
|
|
+ this.disabled = false
|
|
|
+ } else {
|
|
|
+ this.$message.error('此项目有开启的配置,无法新建配置')
|
|
|
+ this.disabled = true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.formProject.resetFields()
|
|
|
+ this.formInformation.resetFields()
|
|
|
+ this.formOptimize.resetFields()
|
|
|
+ this.formMaterial.resetFields()
|
|
|
+ this.multipleBidData = []
|
|
|
+ this.appDetail = {}
|
|
|
+ this.showCheckPerson = []
|
|
|
+ this.checkPerson = []
|
|
|
+ this.checkPersonAll = []
|
|
|
+ this.showCreativeData = null
|
|
|
+ this.description = [{ value: '' }]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
mounted() {
|
|
|
this.$nextTick(function() {
|
|
|
// this.accountId = 23212
|
|
|
+
|
|
|
this.getDataType('APP_INTEREST', 'optionsAppActive')
|
|
|
this.getDataType('BUSINESS_INTEREST', 'businessOptions')
|
|
|
this.getDataType('FANS_STAR', 'fansStarOptions')
|
|
|
this.getDataType('INTEREST_VIDEO', 'interestVideoOptions')
|
|
|
this.getActionBarText()
|
|
|
+
|
|
|
+ if (this.$route.query.id) {
|
|
|
+ this.getQueryById(this.$route.query.id)
|
|
|
+ }
|
|
|
window.addEventListener('scroll', this.onScroll)
|
|
|
const that = this
|
|
|
window.onresize = () => {
|
|
@@ -2189,11 +2294,11 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
filters: {
|
|
|
- openProgramCreate(val) {
|
|
|
+ unitType(val) {
|
|
|
let data = {
|
|
|
- 0: '自定义',
|
|
|
- 1: '程序化',
|
|
|
- 2: '不限'
|
|
|
+ 4: '自定义',
|
|
|
+ 7: '程序化',
|
|
|
+ 0: '不限'
|
|
|
}
|
|
|
return data[val]
|
|
|
},
|
|
@@ -2254,7 +2359,6 @@ export default {
|
|
|
})[0].tagName
|
|
|
}
|
|
|
},
|
|
|
- watch: {},
|
|
|
methods: {
|
|
|
moment,
|
|
|
test() {
|
|
@@ -2277,6 +2381,320 @@ export default {
|
|
|
// formOriginality: this.$form.createForm(this), //创意表单
|
|
|
// formMaterial: this.$form.createForm(this), //素材表单
|
|
|
},
|
|
|
+ getQueryById(id) {
|
|
|
+ this.getAction('/kuaishouProjectStrategy/queryById', { id }).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ this.getActionBarText()
|
|
|
+ this.getAction('/ctop/userAllocation/getAccountListByProjectId', {
|
|
|
+ projectId: res.result.projectId
|
|
|
+ }).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ this.getAction('/kuaishou/batch/getCreativeCategory', {
|
|
|
+ accountId: res.result[0].accountId
|
|
|
+ }).then(result => {
|
|
|
+ if (result.success) {
|
|
|
+ //console.log(res)
|
|
|
+ this.createOptions = result.result
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.$nextTick(() => {
|
|
|
+ let data = res.result
|
|
|
+ this.projectName = data.projectName
|
|
|
+ this.projectId = data.projectId
|
|
|
+ this.formProject.setFieldsValue(pick(data, 'campaignType'))
|
|
|
+ this.formInformation.setFieldsValue(pick(data, 'campaignName', 'groupName'))
|
|
|
+ if (data.campaignDayBudget && data.campaignDayBudget > 0) {
|
|
|
+ this.budgetType = '2'
|
|
|
+ data.campaignDayBudget = data.campaignDayBudget / 1000
|
|
|
+ setTimeout(() => {
|
|
|
+ this.formInformation.setFieldsValue(pick(data, 'campaignDayBudget'))
|
|
|
+ }, 100)
|
|
|
+ } else {
|
|
|
+ this.budgetType = '1'
|
|
|
+ }
|
|
|
+ if (data.unitDayBudget && data.unitDayBudget > 0) {
|
|
|
+ this.dayBudgetType = '2'
|
|
|
+ data.unitDayBudget = data.unitDayBudget / 1000
|
|
|
+ setTimeout(() => {
|
|
|
+ this.formInformation.setFieldsValue(pick(data, 'unitDayBudget'))
|
|
|
+ }, 100)
|
|
|
+ } else {
|
|
|
+ this.dayBudgetType = '1'
|
|
|
+ }
|
|
|
+
|
|
|
+ if (data.deepConversionType && data.deepConversionBid && data.deepConversionBid == '0') {
|
|
|
+ if (res.result.deepConversionBid.includes('/')) {
|
|
|
+ let bidArr = res.result.deepConversionBid.split('/')
|
|
|
+ for (let index = 0; index < bidArr.length; index++) {
|
|
|
+ bidArr[index] = bidArr[index] / 1000
|
|
|
+ }
|
|
|
+ data.deepConversionBid = bidArr.join('/')
|
|
|
+ } else if (res.result.deepConversionBid.includes('-')) {
|
|
|
+ let bidArr = res.result.deepConversionBid.split('-')
|
|
|
+ for (let index = 0; index < bidArr.length; index++) {
|
|
|
+ bidArr[index] = bidArr[index] / 1000
|
|
|
+ }
|
|
|
+ data.deepConversionBid = bidArr.join('-')
|
|
|
+ } else {
|
|
|
+ data.deepConversionBid = res.result.deepConversionBid / 1000 + ''
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ data.deepConversionType = undefined
|
|
|
+ data.deepConversionBid = undefined
|
|
|
+ }
|
|
|
+
|
|
|
+ if (data.cpaBid.includes('/')) {
|
|
|
+ let bidArr = data.cpaBid.split('/')
|
|
|
+ for (let index = 0; index < bidArr.length; index++) {
|
|
|
+ bidArr[index] = bidArr[index] / 1000
|
|
|
+ }
|
|
|
+ data.cpaBid = bidArr.join('/')
|
|
|
+ } else if (data.cpaBid.includes('-')) {
|
|
|
+ let bidArr = data.cpaBid.split('-')
|
|
|
+ for (let index = 0; index < bidArr.length; index++) {
|
|
|
+ bidArr[index] = bidArr[index] / 1000
|
|
|
+ }
|
|
|
+ data.cpaBid = bidArr.join('-')
|
|
|
+ } else {
|
|
|
+ data.cpaBid = data.cpaBid / 1000 + ''
|
|
|
+ }
|
|
|
+ this.formOptimize.setFieldsValue(
|
|
|
+ pick(data, 'bidType', 'ocpxActionType', 'deepConversionType', 'cpaBid', 'deepConversionBid')
|
|
|
+ )
|
|
|
+ res.result.sourceMaterial = JSON.parse(res.result.sourceMaterial)
|
|
|
+ this.formMaterial.setFieldsValue(pick(data, 'sourceMaterial', 'matchingLogic'))
|
|
|
+ if (res.result.creativeCategory) {
|
|
|
+ // let arr=[];
|
|
|
+ if (res.result.creativeCategory > 10000) {
|
|
|
+ res.result.creativeCategory = res.result.creativeCategory
|
|
|
+ ? [
|
|
|
+ parseInt(res.result.creativeCategory / 10000),
|
|
|
+ parseInt(res.result.creativeCategory / 100),
|
|
|
+ res.result.creativeCategory
|
|
|
+ ]
|
|
|
+ : []
|
|
|
+ } else if (res.result.creativeCategory > 100) {
|
|
|
+ res.result.creativeCategory = res.result.creativeCategory
|
|
|
+ ? [parseInt(res.result.creativeCategory / 100), res.result.creativeCategory]
|
|
|
+ : []
|
|
|
+ } else {
|
|
|
+ res.result.creativeCategory = res.result.creativeCategory
|
|
|
+ ? [res.result.creativeCategory]
|
|
|
+ : []
|
|
|
+ }
|
|
|
+ }
|
|
|
+ res.result.creativeTag = res.result.creativeTag ? JSON.parse(res.result.creativeTag) : []
|
|
|
+ this.descriptionList =
|
|
|
+ res.result.description.charAt(0) === '['
|
|
|
+ ? eval(res.result.description).map(item => {
|
|
|
+ return { value: item }
|
|
|
+ })
|
|
|
+ : [{ value: res.result.description }]
|
|
|
+ res.result.sceneId = JSON.parse(res.result.sceneId)
|
|
|
+ data.actionBarText = data.actionBarText.split(',')
|
|
|
+ this.showCreativeData = pick(
|
|
|
+ data,
|
|
|
+ 'unitType',
|
|
|
+ 'sceneId',
|
|
|
+ 'imageCnt',
|
|
|
+ 'customUnitCnt',
|
|
|
+ 'programUnitCnt',
|
|
|
+ 'channelType',
|
|
|
+ 'assetMining',
|
|
|
+ 'smartCover',
|
|
|
+ 'actionBarText',
|
|
|
+ 'creativeCategory',
|
|
|
+ 'creativeTag'
|
|
|
+ )
|
|
|
+ // this.appDetail = { platformOs: data.platformOs, singleAppid: 1 }
|
|
|
+ this.postDataAction('/kuaishouAppPackage/getAppsDetail', {
|
|
|
+ apptemIds: JSON.parse(data.appIdArray)
|
|
|
+ }).then(result => {
|
|
|
+ if (result.success) {
|
|
|
+ this.multipleBidData = result.result
|
|
|
+ this.appDetail = {
|
|
|
+ platformOs: result.result[0].platform < 3 ? 1 : 2,
|
|
|
+ singleAppid: 1,
|
|
|
+ appId: { key: result.result[0].apptemId },
|
|
|
+ schemaUri: res.result.schemaUri
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.checkPerson = JSON.parse(data.templateIdArray)
|
|
|
+ this.checkPersonAll = [JSON.parse(data.templateIdArray)]
|
|
|
+ this.postDataAction('/kuaishouDirectionalPackage/getProjectTargetByIds', {
|
|
|
+ ids: this.checkPerson
|
|
|
+ }).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ this.showCheckPerson = res.result.map(item => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ regionName: []
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ for (let i = 0; i < this.showCheckPerson.length; i++) {
|
|
|
+ if (
|
|
|
+ this.showCheckPerson[i] &&
|
|
|
+ (this.showCheckPerson[i].region == '' ||
|
|
|
+ this.showCheckPerson[i].region == null ||
|
|
|
+ JSON.parse(this.showCheckPerson[i].region).length == 0)
|
|
|
+ ) {
|
|
|
+ } else {
|
|
|
+ // this.showRegion(this.personList[i].region, this.personList[i].regionName)
|
|
|
+ let that = this
|
|
|
+ new Promise((resolve, reject) => {
|
|
|
+ this.postDataAction('/kuaishou/batch/getRegionDetail', {
|
|
|
+ regionArr: that.showCheckPerson[i].region
|
|
|
+ }).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ // this.populationData.allForm.region = res.result
|
|
|
+ that.showCheckPerson[i].regionName = res.result.map(item => {
|
|
|
+ return item.label
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleSubmit() {
|
|
|
+ let formProjectData = new Promise((resolve, reject) => {
|
|
|
+ this.formProject.validateFields((err, values) => {
|
|
|
+ if (!err) {
|
|
|
+ if (this.projectId) {
|
|
|
+ resolve({ ...values, projectId: this.projectId })
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ reject('选择项目表单出错')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ let formInformationData = new Promise((resolve, reject) => {
|
|
|
+ this.formInformation.validateFields((err, values) => {
|
|
|
+ if (!err) {
|
|
|
+ resolve({ ...values })
|
|
|
+ } else {
|
|
|
+ reject('基本信息出错')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ let formOptimizeData = new Promise((resolve, reject) => {
|
|
|
+ this.formOptimize.validateFields((err, values) => {
|
|
|
+ console.log(values, err)
|
|
|
+ if (!err) {
|
|
|
+ resolve({ ...values })
|
|
|
+ } else {
|
|
|
+ reject('优化目标出错')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ let formMaterialData = new Promise((resolve, reject) => {
|
|
|
+ this.formMaterial.validateFields((err, values) => {
|
|
|
+ if (!err) {
|
|
|
+ resolve({ ...values })
|
|
|
+ } else {
|
|
|
+ reject('出错')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ Promise.all([formProjectData, formInformationData, formOptimizeData, formMaterialData])
|
|
|
+ .then(res => {
|
|
|
+ if (!this.showCreativeData || this.checkPerson.length === 0 || this.multipleBidData.length === 0) {
|
|
|
+ this.$message.error('请填写完整')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.sumbitLoading = true
|
|
|
+ let params = { ...res[0], ...res[1], ...res[2], ...res[3], ...this.showCreativeData }
|
|
|
+ if (this.budgetType === '2') {
|
|
|
+ params.campaignDayBudget = params.campaignDayBudget * 1000
|
|
|
+ } else {
|
|
|
+ params.campaignDayBudget = 0
|
|
|
+ }
|
|
|
+ if (this.dayBudgetType === '2') {
|
|
|
+ params.unitDayBudget = params.unitDayBudget * 1000
|
|
|
+ } else {
|
|
|
+ params.unitDayBudget = 0
|
|
|
+ }
|
|
|
+ if (params.cpaBid) {
|
|
|
+ if ((params.cpaBid + '').includes('/')) {
|
|
|
+ let bidArr = params.cpaBid.split('/')
|
|
|
+ for (let index = 0; index < bidArr.length; index++) {
|
|
|
+ bidArr[index] = bidArr[index] * 1000
|
|
|
+ }
|
|
|
+ params.cpaBid = bidArr.join('/')
|
|
|
+ } else if ((params.cpaBid + '').includes('-')) {
|
|
|
+ let bidArr = params.cpaBid.split('-')
|
|
|
+ for (let index = 0; index < bidArr.length; index++) {
|
|
|
+ bidArr[index] = bidArr[index] * 1000
|
|
|
+ }
|
|
|
+ params.cpaBid = bidArr.join('-')
|
|
|
+ } else {
|
|
|
+ params.cpaBid = params.cpaBid * 1000
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ params.cpaBid = 0
|
|
|
+ }
|
|
|
+ if (params.deepConversionBid && params.deepConversionBid != 0) {
|
|
|
+ if ((params.deepConversionBid + '').includes('/')) {
|
|
|
+ let bidArr = params.deepConversionBid.split('/')
|
|
|
+ for (let index = 0; index < bidArr.length; index++) {
|
|
|
+ bidArr[index] = bidArr[index] * 1000
|
|
|
+ }
|
|
|
+ params.deepConversionBid = bidArr.join('/')
|
|
|
+ } else if ((params.deepConversionBid + '').includes('-')) {
|
|
|
+ let bidArr = params.deepConversionBid.split('-')
|
|
|
+ for (let index = 0; index < bidArr.length; index++) {
|
|
|
+ bidArr[index] = bidArr[index] * 1000
|
|
|
+ }
|
|
|
+ params.deepConversionBid = bidArr.join('-')
|
|
|
+ } else {
|
|
|
+ params.deepConversionBid = params.deepConversionBid * 1000
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ params.deepConversionBid = 0
|
|
|
+ }
|
|
|
+ if (params.creativeCategory && params.creativeCategory.length > 0) {
|
|
|
+ params.creativeCategory = params.creativeCategory[params.creativeCategory.length - 1]
|
|
|
+ } else {
|
|
|
+ params.creativeCategory = undefined
|
|
|
+ }
|
|
|
+ params.creativeTag = params.creativeTag ? JSON.stringify(params.creativeTag) : undefined
|
|
|
+ params.appIdArray = this.multipleBidData.map(res => {
|
|
|
+ return res.apptemId
|
|
|
+ })
|
|
|
+ params.templateIdArray = this.checkPerson
|
|
|
+ params.description = JSON.stringify(
|
|
|
+ this.descriptionList.map(item => {
|
|
|
+ return item.value
|
|
|
+ })
|
|
|
+ )
|
|
|
+ params.singleAppid = 1
|
|
|
+ params.actionBarText = params.actionBarText.join()
|
|
|
+ if (this.$route.query.id) {
|
|
|
+ params.id = this.$route.query.id
|
|
|
+ }
|
|
|
+ this.postDataAction('/kuaishouProjectStrategy/createProjectStrategy', params).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ this.sumbitLoading = false
|
|
|
+ window.close()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ this.$message.error('请填写完整')
|
|
|
+ })
|
|
|
+ },
|
|
|
+ clearAllData() {
|
|
|
+ window.close()
|
|
|
+ },
|
|
|
descriptionchange(val, index) {
|
|
|
let data = val
|
|
|
this.$nextTick(() => {
|
|
@@ -2305,15 +2723,22 @@ export default {
|
|
|
},
|
|
|
closeCreative() {
|
|
|
this.optimizeVisible = false
|
|
|
+ this.customUnitCntMax = 400
|
|
|
+ this.imageCntMax = 15
|
|
|
this.formOriginality.resetFields()
|
|
|
},
|
|
|
submitCreative() {
|
|
|
this.formOriginality.validateFields((err, values) => {
|
|
|
- if(!err) {
|
|
|
-
|
|
|
-
|
|
|
+ if (!err) {
|
|
|
+ let isNotComplete = this.descriptionList.findIndex(item => {
|
|
|
+ return item.value === ''
|
|
|
+ })
|
|
|
+ if (isNotComplete > -1) {
|
|
|
+ this.$message.error('请正确填写必填项目,广告语未填')
|
|
|
+ return
|
|
|
+ }
|
|
|
this.showCreativeData = JSON.parse(JSON.stringify(values))
|
|
|
- console.log(values,this.showCreativeData)
|
|
|
+ console.log(values, this.showCreativeData)
|
|
|
this.optimizeVisible = false
|
|
|
// this.closeCreative()
|
|
|
}
|
|
@@ -2338,6 +2763,14 @@ export default {
|
|
|
data.splice(0, data.length - 1)
|
|
|
}
|
|
|
},
|
|
|
+ unitTypeCheck(e) {
|
|
|
+ console.log(e.target.value)
|
|
|
+ if (e.target.value === 1) {
|
|
|
+ this.imageCntMax = 8
|
|
|
+ } else {
|
|
|
+ this.imageCntMax = 15
|
|
|
+ }
|
|
|
+ },
|
|
|
setImageCnt(e) {
|
|
|
this.customUnitCntMax = e ? Math.floor(2000 / e) : 2000
|
|
|
},
|
|
@@ -2357,7 +2790,7 @@ export default {
|
|
|
let z = /-/g
|
|
|
let a = /\//g
|
|
|
let d = /\./g
|
|
|
- if (value === '' || value === undefined) {
|
|
|
+ if (value === '' || value === undefined || value === 0 || value === '0') {
|
|
|
callback('出价必须填写')
|
|
|
} else if (value.startsWith('.') || value.endsWith('.')) {
|
|
|
callback('请填写正确出价')
|
|
@@ -2375,16 +2808,12 @@ export default {
|
|
|
let z = /-/g
|
|
|
let a = /\//g
|
|
|
let d = /\./g
|
|
|
- if (value === '' || value === undefined) {
|
|
|
+ if (value === '' || value === undefined || value == 0 || value == '0') {
|
|
|
callback()
|
|
|
-
|
|
|
- return
|
|
|
} else if (value.startsWith('.') || value.endsWith('.')) {
|
|
|
callback('请填写正确出价')
|
|
|
- return
|
|
|
} else if (value.startsWith('-') || value.endsWith('-')) {
|
|
|
callback('请填写正确出价')
|
|
|
- return
|
|
|
} else if (value.match(a) && value.match(z)) {
|
|
|
callback('不允许出现除"-"和"/"之外的所有字符,并且二者不可同时出现')
|
|
|
} else if (value.match(/[^0-9+-\/]/g)) {
|
|
@@ -2472,13 +2901,18 @@ export default {
|
|
|
//目标应用编辑
|
|
|
targetAppEdit() {
|
|
|
this.targetAppVisible = true
|
|
|
- this.getAppList()
|
|
|
+
|
|
|
if (this.appDetail) {
|
|
|
+ if (this.appDetail.schemaUri) {
|
|
|
+ this.uriCheck = true
|
|
|
+ }
|
|
|
this.$nextTick(() => {
|
|
|
this.formTargetApp.setFieldsValue({ ...this.appDetail })
|
|
|
+
|
|
|
this.multipleBidDataDrawer = JSON.parse(JSON.stringify(this.multipleBidData))
|
|
|
})
|
|
|
}
|
|
|
+ this.getAppList()
|
|
|
},
|
|
|
submitApp() {
|
|
|
this.formTargetApp.validateFields((err, values) => {
|
|
@@ -2502,6 +2936,7 @@ export default {
|
|
|
appIdChange(val) {
|
|
|
// this.siteList = []
|
|
|
// this.getPageList(val)
|
|
|
+ this.multipleBidDataDrawer = []
|
|
|
if (this.getFormData('formTargetApp', 'singleAppid') == 0) {
|
|
|
if (val && val.findIndex(item => item.key === 0) > -1) {
|
|
|
let appidArr = this.appList.map(item => {
|
|
@@ -2558,7 +2993,7 @@ export default {
|
|
|
// this.multipleBidDataDrawer = this.appList.filter(item => {
|
|
|
// return item.id === val.key
|
|
|
// })
|
|
|
- this.postDataAction('/kuaishouAppPackage/getAppsDetail', { ids: [val.key] }).then(res => {
|
|
|
+ this.postDataAction('/kuaishouAppPackage/getAppsDetail', { apptemIds: [val.key] }).then(res => {
|
|
|
if (res.success) {
|
|
|
this.multipleBidDataDrawer = res.result
|
|
|
}
|
|
@@ -2575,9 +3010,37 @@ export default {
|
|
|
if (target) {
|
|
|
target[dataIndex] = value
|
|
|
this.multipleBidDataDrawer = dataSource
|
|
|
+ let params = { id: key }
|
|
|
+ if (dataIndex == 'impressionUrl') {
|
|
|
+ params.impressionUrl = value
|
|
|
+ } else if (dataIndex == 'tracUrl') {
|
|
|
+ params.tracUrl = value
|
|
|
+ }
|
|
|
+ this.postDataAction('/kuaishouAppPackage/edit', params).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ console.log(res)
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
addApplication() {},
|
|
|
+ changeType(e) {
|
|
|
+ console.log(e.target.value)
|
|
|
+ this.appList = []
|
|
|
+ if (e.target.value === 1) {
|
|
|
+ this.appList = this.appListAll.filter(item => {
|
|
|
+ return item.platform == 1 || item.platform == 2
|
|
|
+ })
|
|
|
+ this.formTargetApp.setFieldsValue({ appId: undefined })
|
|
|
+ this.multipleBidDataDrawer = []
|
|
|
+ } else if (e.target.value === 2) {
|
|
|
+ this.appList = this.appListAll.filter(item => {
|
|
|
+ return item.platform == 3 || item.platform == 4
|
|
|
+ })
|
|
|
+ this.formTargetApp.setFieldsValue({ appId: undefined })
|
|
|
+ this.multipleBidDataDrawer = []
|
|
|
+ }
|
|
|
+ },
|
|
|
getAppList() {
|
|
|
let params = {}
|
|
|
params.projectId = this.projectId
|
|
@@ -2605,6 +3068,8 @@ export default {
|
|
|
//目标人群选择
|
|
|
targetPersonCheck() {
|
|
|
this.checkPerson = this.checkPersonAll[0]
|
|
|
+ this.ipagination.current = 1
|
|
|
+ this.sumContent = this.showCheckPerson.length
|
|
|
this.targetPersonVisible = true
|
|
|
this.getTargetPerson()
|
|
|
},
|
|
@@ -2654,14 +3119,15 @@ export default {
|
|
|
})
|
|
|
} else if (this.checkPerson.length > 20) {
|
|
|
this.personLoading = false
|
|
|
- this.$message.error('最多选择20个定向')
|
|
|
+ this.$message.error('最多选择20个定向包')
|
|
|
} else {
|
|
|
this.personLoading = false
|
|
|
- this.$message.error('请选择定向')
|
|
|
+ this.$message.error('请选择定向包')
|
|
|
}
|
|
|
},
|
|
|
closePerson(form) {
|
|
|
this.targetPersonVisible = false
|
|
|
+ this.checkPerson = []
|
|
|
},
|
|
|
getTargetPerson() {
|
|
|
let params = {}
|
|
@@ -2738,6 +3204,14 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
)
|
|
|
+ this.$nextTick(() => {
|
|
|
+ if (this.showCreativeData.unitType === 1) {
|
|
|
+ this.imageCntMax = 8
|
|
|
+ } else {
|
|
|
+ this.imageCntMax = 15
|
|
|
+ }
|
|
|
+ this.formOriginality.setFieldsValue(this.showCreativeData)
|
|
|
+ })
|
|
|
},
|
|
|
//设置通配符
|
|
|
getChangeAll(type, form, field) {
|
|
@@ -2920,6 +3394,4 @@ $height: 59px;
|
|
|
height: $height;
|
|
|
line-height: $height;
|
|
|
}
|
|
|
-
|
|
|
-/* update_end author:scott date:20190220 for: 缩小首页布局顶部的高度*/
|
|
|
</style>
|