|
@@ -72,6 +72,9 @@ li.chouzhen.first:before {
|
|
|
}
|
|
|
</style>
|
|
|
<style lang="scss">
|
|
|
+.hide-checkbox .ant-table-thead .ant-table-selection {
|
|
|
+ display: none;
|
|
|
+}
|
|
|
.new-batch .ant-card-head-title {
|
|
|
font-weight: 700;
|
|
|
}
|
|
@@ -228,11 +231,7 @@ li.chouzhen.first:before {
|
|
|
<a-col :xl="10" :md="24" :pull="screenWidth >= 1200 ? 4 : 0">
|
|
|
<a-form-item :label="unitInfo.bidType == 1 ? '出价' : '转化目标出价'">
|
|
|
{{
|
|
|
- groupTemplateId
|
|
|
- ? unitInfo.bidType == 1
|
|
|
- ? unitInfo.bid / 1000 + '元'
|
|
|
- : unitInfo.cpaBid / 1000 + '元'
|
|
|
- : '无'
|
|
|
+ groupTemplateId ? (unitInfo.bidType == 1 ? unitInfo.bid + '元' : unitInfo.cpaBid + '元') : '无'
|
|
|
}}
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
@@ -437,7 +436,7 @@ li.chouzhen.first:before {
|
|
|
v-if="items.image.url"
|
|
|
>
|
|
|
<div style="width: 45%; height: 100%; text-align: center">
|
|
|
- <img :src="items.image.url" style="width: auto; height: 100%" alt="" srcset="" />
|
|
|
+ <img :src="items.photoId.coverUrl" style="width: auto; height: 100%" alt="" srcset="" />
|
|
|
</div>
|
|
|
<div style="width: 45%; height: 100%; text-align: center">
|
|
|
<img :src="items.image.url" style="width: auto; height: 100%" alt="" srcset="" />
|
|
@@ -455,8 +454,7 @@ li.chouzhen.first:before {
|
|
|
</template>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <!-- v-if="materialInfo.matchingMethod != 1 && videoMaterialShow" -->
|
|
|
- <div style="margin-top: 20px">
|
|
|
+ <div style="margin-top: 20px" v-if="materialInfo.matchingMethod != 1 && videoMaterialShow">
|
|
|
<a-list bordered :data-source="descriptionList">
|
|
|
<a-list-item slot="renderItem" slot-scope="item, index">
|
|
|
<p v-if="!item.edit" style="margin-bottom: 0; width: 100%">
|
|
@@ -478,9 +476,19 @@ li.chouzhen.first:before {
|
|
|
style="margin-right: 20px"
|
|
|
@click="addDescription"
|
|
|
:disabled="
|
|
|
- descriptionList.length >= (materialInfo.matchingMethod == 2
|
|
|
- ? materialCount
|
|
|
- : materialInfo.materialList.length)
|
|
|
+ descriptionList.length >=
|
|
|
+ (materialInfo.matchingMethod == 2 ? materialCount : materialInfo.materialList.length)
|
|
|
+ "
|
|
|
+ >
|
|
|
+ 选择广告语
|
|
|
+ </a-button>
|
|
|
+ <a-button
|
|
|
+ type="primary"
|
|
|
+ style="margin-right: 20px"
|
|
|
+ @click="addOne"
|
|
|
+ :disabled="
|
|
|
+ descriptionList.length >=
|
|
|
+ (materialInfo.matchingMethod == 2 ? materialCount : materialInfo.materialList.length)
|
|
|
"
|
|
|
>
|
|
|
添加广告语
|
|
@@ -494,7 +502,7 @@ li.chouzhen.first:before {
|
|
|
</div>
|
|
|
</a-card>
|
|
|
<div style="display: flex; justify-content: space-between; margin-bottom: 100px">
|
|
|
- <a-button type="primary"> 预览应用/链接 </a-button>
|
|
|
+ <a-button type="primary" @click="checkAppIds"> 预览应用/链接 </a-button>
|
|
|
<div>
|
|
|
<a-button type="primary" style="margin-right: 15px" @click="handleSubmit"> 预览广告组 </a-button>
|
|
|
<a-button> 清空配置 </a-button>
|
|
@@ -511,6 +519,7 @@ li.chouzhen.first:before {
|
|
|
:width="1000"
|
|
|
@ok="ruleConfigFormOk"
|
|
|
@cancel="ruleConfigFormCancel"
|
|
|
+ v-dialog-drag
|
|
|
>
|
|
|
<a-form :form="ruleConfigForm" layout="horizontal" hide-required-mark v-bind="formItemLayout">
|
|
|
<a-row :gutter="16">
|
|
@@ -625,10 +634,9 @@ li.chouzhen.first:before {
|
|
|
>
|
|
|
<a-tag color="#2db7f5" @click="getChangeAll('定向包', 'ruleConfigForm', 'campaignName')">+定向包</a-tag>
|
|
|
<a-tag color="#2db7f5" @click="getChangeAll('日期', 'ruleConfigForm', 'campaignName')">+日期</a-tag>
|
|
|
- <a-tag color="#2db7f5" @click="getChangeAll('渠道号(应用标记)', 'ruleConfigForm', 'campaignName')"
|
|
|
+ <a-tag color="#2db7f5" @click="getChangeAll('渠道号', 'ruleConfigForm', 'campaignName')"
|
|
|
>+渠道号(应用标记)</a-tag
|
|
|
>
|
|
|
- <a-tag color="#2db7f5" @click="getChangeAll('标号', 'ruleConfigForm', 'campaignName')">+标号</a-tag>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
@@ -957,11 +965,12 @@ li.chouzhen.first:before {
|
|
|
<a-row :gutter="16">
|
|
|
<a-col :span="16">
|
|
|
<a-form-item label="" v-bind="tailFormItemLayout">
|
|
|
- <a-tag color="#2db7f5" @click="getChangeAll('渠道号(应用标记)', 'unitInfo', 'unitName')"
|
|
|
- >+渠道号(应用标记)</a-tag
|
|
|
- >
|
|
|
+ <a-tag color="#2db7f5" @click="getChangeAll('应用名称', 'unitInfo', 'unitName')">+应用名称</a-tag>
|
|
|
<a-tag color="#2db7f5" @click="getChangeAll('定向包', 'unitInfo', 'unitName')">+定向包</a-tag>
|
|
|
<a-tag color="#2db7f5" @click="getChangeAll('日期', 'unitInfo', 'unitName')">+日期</a-tag>
|
|
|
+ <a-tag color="#2db7f5" @click="getChangeAll('渠道号', 'unitInfo', 'unitName')">+渠道号(应用标记)</a-tag>
|
|
|
+ <a-tag color="#2db7f5" @click="getChangeAll('创意制作方式', 'unitInfo', 'unitName')">+创意制作方式</a-tag>
|
|
|
+ <a-tag color="#2db7f5" @click="getChangeAll('广告位置', 'unitInfo', 'unitName')">+广告位置</a-tag>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
@@ -986,8 +995,8 @@ li.chouzhen.first:before {
|
|
|
zIndex: 1,
|
|
|
}"
|
|
|
>
|
|
|
- <a-button :style="{ marginRight: '8px' }" @click="closeUnit('ruleForm')"> Cancel </a-button>
|
|
|
- <a-button type="primary" @click="onClose"> Submit </a-button>
|
|
|
+ <a-button :style="{ marginRight: '8px' }" @click="closeUnit('ruleForm')"> 取消 </a-button>
|
|
|
+ <a-button type="primary" @click="onClose"> 提交 </a-button>
|
|
|
</div>
|
|
|
</a-drawer>
|
|
|
<!-- 广告组基本信息预设结束 -->
|
|
@@ -1117,6 +1126,13 @@ li.chouzhen.first:before {
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
+ <a-row :gutter="16">
|
|
|
+ <a-col :span="16">
|
|
|
+ <a-form-item label="" v-bind="tailFormItemLayout">
|
|
|
+ <a-checkbox value="1" v-model="creativeInfo.keep"> 存为预设 </a-checkbox>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
</a-form-model>
|
|
|
<div
|
|
|
:style="{
|
|
@@ -1131,8 +1147,8 @@ li.chouzhen.first:before {
|
|
|
zIndex: 1,
|
|
|
}"
|
|
|
>
|
|
|
- <a-button :style="{ marginRight: '8px' }" @click="closeUnit('createForm')"> Cancel </a-button>
|
|
|
- <a-button type="primary" @click="submitCreative"> Submit </a-button>
|
|
|
+ <a-button :style="{ marginRight: '8px' }" @click="closeUnit('createForm')"> 取消 </a-button>
|
|
|
+ <a-button type="primary" @click="submitCreative"> 提交 </a-button>
|
|
|
</div>
|
|
|
</a-drawer>
|
|
|
<!-- 广告创意基本信息预设结束 -->
|
|
@@ -1163,6 +1179,7 @@ li.chouzhen.first:before {
|
|
|
</a-table>
|
|
|
</a-modal>
|
|
|
<!-- 定向包选择结束 -->
|
|
|
+
|
|
|
<!--定向预览-->
|
|
|
<a-modal title="我的定向包" v-model="previewVisible" :width="1000" :footer="null">
|
|
|
<a-form
|
|
@@ -1401,7 +1418,7 @@ li.chouzhen.first:before {
|
|
|
v-if="items.image.url"
|
|
|
>
|
|
|
<div style="width: 45%; height: 100%">
|
|
|
- <img :src="items.image.url" style="width: 100%; height: auto" alt="" srcset="" />
|
|
|
+ <img :src="items.photoId.coverUrl" style="width: 100%; height: auto" alt="" srcset="" />
|
|
|
</div>
|
|
|
<div style="width: 45%; height: 100%">
|
|
|
<img :src="items.image.url" style="width: 100%; height: auto" alt="" srcset="" />
|
|
@@ -1542,7 +1559,7 @@ li.chouzhen.first:before {
|
|
|
<a-checkbox-group v-model="checkVideo" style="width: 100%" @change="setVideoData">
|
|
|
<li v-for="(item, index) of dataSource" :key="index" class="chouzhen" style="height: 400px">
|
|
|
<a-checkbox
|
|
|
- :value="item.signature"
|
|
|
+ :value="item.photoId"
|
|
|
style="width: 100%; position: absolute; z-index: 100; right: 0; top: 0"
|
|
|
>
|
|
|
<img :src="item.coverUrl" alt="" style="width: 90%; margin-bottom: 30px" />
|
|
@@ -1630,6 +1647,124 @@ li.chouzhen.first:before {
|
|
|
</a-row>
|
|
|
</a-modal>
|
|
|
<!-- 推荐广告语结束 -->
|
|
|
+
|
|
|
+ <!-- 预览应用/链接 -->
|
|
|
+ <a-modal
|
|
|
+ :title="getData('campaignType', 'form') == 5 ? '填写链接' : '预览应用'"
|
|
|
+ v-model="appIdVisible"
|
|
|
+ :width="1000"
|
|
|
+ @ok="appIdVisible = false"
|
|
|
+ @cancel="appIdVisible = false"
|
|
|
+ >
|
|
|
+ <a-row :gutter="10" class="hide-checkbox">
|
|
|
+ <a-col :sm="24" style="margin-bottom: 20px; z-index: 10">
|
|
|
+ <a-card class="search-box" style="min-height: 500px">
|
|
|
+ <div style="margin-bottom: 30px">
|
|
|
+ <span style="display: inline-block; width: 140px">应用分配方式</span>
|
|
|
+ <a-radio-group v-model="appList.appAllocation">
|
|
|
+ <a-radio-button :value="1">按账户分配</a-radio-button>
|
|
|
+ <a-radio-button :value="2">按广告计划分配</a-radio-button>
|
|
|
+ <a-radio-button :value="3">按广告组分配</a-radio-button>
|
|
|
+ </a-radio-group>
|
|
|
+ </div>
|
|
|
+ <div style="margin-bottom: 30px">
|
|
|
+ <span style="display: inline-block; width: 140px">选择应用</span>
|
|
|
+ 广告计划:{{ campaignCount }} 广告组数量:{{
|
|
|
+ checkDirectionalList.length * materialInfo.materialList.length * campaignCount
|
|
|
+ }}
|
|
|
+ <a-card style="min-height: 300px; margin-top: 15px">
|
|
|
+ <a-transfer
|
|
|
+ :data-source="appListArr"
|
|
|
+ :target-keys="targetKeys"
|
|
|
+ :disabled="disabled"
|
|
|
+ :show-search="true"
|
|
|
+ :filter-option="(inputValue, item) => item.appName.indexOf(inputValue) !== -1"
|
|
|
+ :show-select-all="true"
|
|
|
+ @change="onChangeTransFer"
|
|
|
+ >
|
|
|
+ <template
|
|
|
+ slot="children"
|
|
|
+ slot-scope="{
|
|
|
+ props: { direction, filteredItems, selectedKeys, disabled: listDisabled },
|
|
|
+ on: { itemSelectAll, itemSelect },
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <a-table
|
|
|
+ :row-selection="
|
|
|
+ getRowSelection({ disabled: listDisabled, selectedKeys, itemSelectAll, itemSelect })
|
|
|
+ "
|
|
|
+ :columns="direction === 'left' ? leftColumns : rightColumns"
|
|
|
+ :data-source="filteredItems"
|
|
|
+ size="small"
|
|
|
+ :style="{ pointerEvents: listDisabled ? 'none' : null }"
|
|
|
+ :custom-row="
|
|
|
+ ({ key, disabled: itemDisabled }) => ({
|
|
|
+ on: {
|
|
|
+ click: () => {
|
|
|
+ if (itemDisabled || listDisabled) return
|
|
|
+ itemSelect(key, !selectedKeys.includes(key))
|
|
|
+ },
|
|
|
+ },
|
|
|
+ })
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <div slot="action" slot-scope="text, records" @click.stop>
|
|
|
+ <!-- {{ records.siteId }} -->
|
|
|
+ <a-select v-model="records.siteId" style="width: 100%" @focus="getSiteList(records)" allowClear>
|
|
|
+ <a-select-option
|
|
|
+ v-for="appModel in records.siteList"
|
|
|
+ :key="appModel.siteId"
|
|
|
+ :value="appModel.siteId"
|
|
|
+ >
|
|
|
+ {{ appModel.name }}
|
|
|
+ </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </div>
|
|
|
+ </a-table>
|
|
|
+ </template>
|
|
|
+ </a-transfer>
|
|
|
+ </a-card>
|
|
|
+ </div>
|
|
|
+ <div style="margin-bottom: 30px">
|
|
|
+ <span style="display: inline-block; width: 140px">链接分配方式</span>
|
|
|
+ <a-radio-group v-model="appList.linkAllocation" @change="setCount">
|
|
|
+ <a-radio-button :value="1">按账户分配</a-radio-button>
|
|
|
+ <a-radio-button :value="2">按广告计划分配</a-radio-button>
|
|
|
+ <a-radio-button :value="3">按广告组分配</a-radio-button>
|
|
|
+ </a-radio-group>
|
|
|
+ </div>
|
|
|
+ <!-- linkAllocation: 1,
|
|
|
+ clickUrlList: [],
|
|
|
+ clickUrlActionList: [], -->
|
|
|
+ <div style="margin-bottom: 30px">
|
|
|
+ <span style="display: inline-block; width: 140px">第三方监测链接</span>
|
|
|
+
|
|
|
+ <a-input
|
|
|
+ v-model="item.value"
|
|
|
+ placeholder="请输入第三方检测链接"
|
|
|
+ style="width: 60%; margin-bottom: 10px"
|
|
|
+ v-for="(item, index) in appList.clickUrlList"
|
|
|
+ :style="{ marginLeft: index != 0 ? '140px' : '0px' }"
|
|
|
+ >
|
|
|
+ </a-input>
|
|
|
+ </div>
|
|
|
+ <div style="margin-bottom: 30px">
|
|
|
+ <span style="display: inline-block; width: 140px">第三方点击监测链接</span>
|
|
|
+ <a-input
|
|
|
+ v-model="item.value"
|
|
|
+ placeholder="请输入第三方点击检测链接"
|
|
|
+ style="width: 60%; margin-bottom: 10px"
|
|
|
+ v-for="(item, index) in appList.clickUrlActionList"
|
|
|
+ :style="{ marginLeft: index != 0 ? '140px' : '0px' }"
|
|
|
+ >
|
|
|
+ </a-input>
|
|
|
+ </div>
|
|
|
+ </a-card>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-modal>
|
|
|
+
|
|
|
+ <!-- 预览应用/链接结束 -->
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -1657,6 +1792,32 @@ function tqFun(qcArr1) {
|
|
|
}
|
|
|
return bbFun(qcArr1)
|
|
|
}
|
|
|
+
|
|
|
+const mockData = []
|
|
|
+
|
|
|
+const originTargetKeys = mockData.filter((item) => +item.key % 3 > 1).map((item) => item.key)
|
|
|
+
|
|
|
+const leftTableColumns = [
|
|
|
+ {
|
|
|
+ dataIndex: 'appName',
|
|
|
+ title: '应用名称',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ dataIndex: 'appId',
|
|
|
+ title: '应用Id',
|
|
|
+ },
|
|
|
+]
|
|
|
+const rightTableColumns = [
|
|
|
+ {
|
|
|
+ dataIndex: 'appName',
|
|
|
+ title: '应用名称',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ dataIndex: 'action',
|
|
|
+ title: '选择应用下载链接',
|
|
|
+ scopedSlots: { customRender: 'action' },
|
|
|
+ },
|
|
|
+]
|
|
|
export default {
|
|
|
name: 'GlobalHeader',
|
|
|
components: {
|
|
@@ -1692,6 +1853,12 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ disabled: false,
|
|
|
+ showSearch: false,
|
|
|
+ targetKeys: [],
|
|
|
+ leftColumns: leftTableColumns,
|
|
|
+ rightColumns: rightTableColumns,
|
|
|
+
|
|
|
active: 0,
|
|
|
previewVisible: false,
|
|
|
|
|
@@ -1793,6 +1960,7 @@ export default {
|
|
|
creativeTag: [],
|
|
|
stickerTitle: '',
|
|
|
actionBarText: '',
|
|
|
+ keep: false,
|
|
|
},
|
|
|
creativeTag: [],
|
|
|
creativeRules: {
|
|
@@ -1880,7 +2048,7 @@ export default {
|
|
|
},
|
|
|
],
|
|
|
//按创意和按创意组匹配
|
|
|
- descriptionList: [{ value: '测试广告语', edit: false }],
|
|
|
+ descriptionList: [],
|
|
|
titleVisible: false,
|
|
|
options: [],
|
|
|
value: '',
|
|
@@ -1890,10 +2058,21 @@ export default {
|
|
|
//素材相关结束
|
|
|
|
|
|
//配置应用/链接
|
|
|
- appAllocation: 1, //1按账户,2按广告计划,3按广告组
|
|
|
- appIds: [],
|
|
|
- linkAllocation: 1,
|
|
|
- clickUrlList: [],
|
|
|
+ appList: {
|
|
|
+ checkType: 'app',
|
|
|
+ appAllocation: 1, //1按账户,2按广告计划,3按广告组
|
|
|
+ appArr: [], //{ appId: '', siteId: 123123 }
|
|
|
+ urlArr: [],
|
|
|
+ linkAllocation: 1,
|
|
|
+ clickUrlList: [{ value: '' }],
|
|
|
+ clickUrlActionList: [{ value: '' }],
|
|
|
+ },
|
|
|
+ // appAllocation: 1, //1按账户,2按广告计划,3按广告组
|
|
|
+ // appIds: [],
|
|
|
+ // linkAllocation: 1,
|
|
|
+ // clickUrlList: [],
|
|
|
+ appIdVisible: false,
|
|
|
+ appListArr: [],
|
|
|
//配置应用/链接结束
|
|
|
|
|
|
stepsArr: [
|
|
@@ -1936,6 +2115,15 @@ export default {
|
|
|
}
|
|
|
return count
|
|
|
},
|
|
|
+ campaignCount() {
|
|
|
+ if (this.campaignData.groupRule) {
|
|
|
+ return this.campaignData.groupRule == 1
|
|
|
+ ? this.checkDirectionalList.length
|
|
|
+ : this.campaignData.groupRule == 2
|
|
|
+ ? this.materialCount
|
|
|
+ : 0
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
watch: {
|
|
|
accountId: function (n, o) {
|
|
@@ -2028,6 +2216,95 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
+ okAppId() {},
|
|
|
+ setCount(e) {
|
|
|
+ if (e.target.value == 1) {
|
|
|
+ this.appList.clickUrlList = [{ value: '' }]
|
|
|
+ this.appList.clickUrlActionList = [{ value: '' }]
|
|
|
+ } else if (e.target.value == 2) {
|
|
|
+ this.appList.clickUrlList = []
|
|
|
+ this.appList.clickUrlActionList = []
|
|
|
+ for (let i = 0; i < this.campaignCount; i++) {
|
|
|
+ this.appList.clickUrlList.push({ value: '' })
|
|
|
+ this.appList.clickUrlActionList.push({ value: '' })
|
|
|
+ }
|
|
|
+ } else if (e.target.value == 3) {
|
|
|
+ this.appList.clickUrlList = []
|
|
|
+ this.appList.clickUrlActionList = []
|
|
|
+ var count = this.checkDirectionalList.length * this.materialInfo.materialList.length * this.campaignCount
|
|
|
+ for (let i = 0; i < count; i++) {
|
|
|
+ this.appList.clickUrlList.push({ value: '' })
|
|
|
+ this.appList.clickUrlActionList.push({ value: '' })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getAllData() {
|
|
|
+ var data = []
|
|
|
+ this.appListArr.filter((co, i) => {
|
|
|
+ let temp = this.targetKeys.indexOf(co.key)
|
|
|
+ if (temp >= 0) {
|
|
|
+ data.push(co)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ return data
|
|
|
+ },
|
|
|
+ onChangeTransFer(nextTargetKeys, direction, moveKeys) {
|
|
|
+ this.targetKeys = nextTargetKeys
|
|
|
+ },
|
|
|
+ getSiteList(item) {
|
|
|
+ this.getAction('/kuaishou/batch/getPageList', {
|
|
|
+ accountId: this.accountId,
|
|
|
+ appId: item.appId,
|
|
|
+ viewComp: 7,
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.success) {
|
|
|
+ console.log(item)
|
|
|
+ item.siteList = res.result
|
|
|
+ } else {
|
|
|
+ this.showSite = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getRowSelection({ disabled, selectedKeys, itemSelectAll, itemSelect }) {
|
|
|
+ return {
|
|
|
+ getCheckboxProps: (item) => ({ props: { disabled: disabled || item.disabled } }),
|
|
|
+ onSelectAll(selected, selectedRows) {
|
|
|
+ itemSelectAll(selected)
|
|
|
+ },
|
|
|
+ onSelect({ key }, selected) {
|
|
|
+ itemSelect(key, selected)
|
|
|
+ },
|
|
|
+ selectedRowKeys: selectedKeys,
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ checkAppIds() {
|
|
|
+ if (
|
|
|
+ this.campaignCount == 0 ||
|
|
|
+ this.checkDirectionalList.length * this.materialInfo.materialList.length * this.campaignCount == 0
|
|
|
+ ) {
|
|
|
+ this.$message.error('请先完成以上操作,再进行此步骤')
|
|
|
+ return
|
|
|
+ } else {
|
|
|
+ this.appIdVisible = true
|
|
|
+
|
|
|
+ let params = {}
|
|
|
+ params.accountId = this.accountId
|
|
|
+ this.getAction('/kuaishou/batch/getAppList', params).then((res) => {
|
|
|
+ if (res.success) {
|
|
|
+ this.appListArr = res.result.map((item, index) => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ key: item.appId + '',
|
|
|
+ title: item.appName,
|
|
|
+ siteId: null,
|
|
|
+ siteList: [],
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
moment,
|
|
|
setItemDate(sum, item) {
|
|
|
let i = sum
|
|
@@ -2099,6 +2376,9 @@ export default {
|
|
|
this.titleVisible = true
|
|
|
this.getHangye()
|
|
|
},
|
|
|
+ addOne() {
|
|
|
+ this.descriptionList.push({ value: '', edit: true })
|
|
|
+ },
|
|
|
getHangye() {
|
|
|
this.getAction('/ctop/creativeTitle/getTitleLabel', '').then((res) => {
|
|
|
if (res.success) {
|
|
@@ -2200,7 +2480,9 @@ export default {
|
|
|
|
|
|
for (let i = 0; i < this.materialInfo.materialList.length; i++) {
|
|
|
for (let j = 0; j < this.materialInfo.materialList[i].photoArr.length; j++) {
|
|
|
- this.setVideUrl(this.materialInfo.materialList[i].photoArr[j].photoId)
|
|
|
+ this.setVideUrl(this.materialInfo.materialList[i].photoArr[j].photoId).then((res) => {
|
|
|
+ this.materialInfo.materialList[i].photoArr[j].photoId = res
|
|
|
+ })
|
|
|
|
|
|
this.getImageCover(this.materialInfo.materialList[i].photoArr[j].photoId).then((res) => {
|
|
|
setTimeout(() => {
|
|
@@ -2210,6 +2492,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
this.checkMatemalVisible = false
|
|
|
+ console.log(this.materialInfo.materialList)
|
|
|
}, 100)
|
|
|
})
|
|
|
}
|
|
@@ -2217,23 +2500,31 @@ export default {
|
|
|
},
|
|
|
setVideUrl(photoId) {
|
|
|
this.videoList = []
|
|
|
- this.getAction('/batch/kuaiShouGroupTemplate/getUrlByPhotoId', { photoId: photoId }).then((res) => {
|
|
|
- if (res.success) {
|
|
|
- this.videoList.push({ url: res.result.url, photoId: photoId, coverUrl: res.result.coverUrl })
|
|
|
- } else {
|
|
|
- }
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
+ this.getAction('/batch/kuaiShouGroupTemplate/getUrlByPhotoId', { photoId: photoId }).then((res) => {
|
|
|
+ if (res.success) {
|
|
|
+ resolve({ ...res.result, photoId: photoId })
|
|
|
+ }
|
|
|
+ })
|
|
|
})
|
|
|
+ // this.getAction('/batch/kuaiShouGroupTemplate/getUrlByPhotoId', { photoId: photoId }).then((res) => {
|
|
|
+ // if (res.success) {
|
|
|
+ // this.videoList.push({ url: res.result.url, photoId: photoId, coverUrl: res.result.coverUrl })
|
|
|
+ // return res.result.url
|
|
|
+ // } else {
|
|
|
+ // }
|
|
|
+ // })
|
|
|
},
|
|
|
getImageCover(photoId) {
|
|
|
var params = {
|
|
|
- videoSignature: photoId,
|
|
|
+ photoId: photoId,
|
|
|
pageSize: 20,
|
|
|
pageNo: 1,
|
|
|
}
|
|
|
return new Promise((resolve, reject) => {
|
|
|
- this.getAction('/cutFrame/material/list', params).then((res) => {
|
|
|
+ this.getAction('/cutFrame/material/queryByPhotoId', params).then((res) => {
|
|
|
if (res.success) {
|
|
|
- resolve(res.result.records)
|
|
|
+ resolve(res.result)
|
|
|
}
|
|
|
})
|
|
|
})
|
|
@@ -2529,7 +2820,112 @@ export default {
|
|
|
},
|
|
|
handleSubmit(e) {
|
|
|
e.preventDefault()
|
|
|
- this.form.validateFields((err, values) => {})
|
|
|
+ this.form.validateFields((err, values) => {
|
|
|
+ if (!err) {
|
|
|
+ var params = {}
|
|
|
+ params.batchId = new Date().getTime()
|
|
|
+ if (this.campaignData.campaignName) {
|
|
|
+ params.campaignJson = {
|
|
|
+ ...this.campaignData,
|
|
|
+ accountId: this.accountId,
|
|
|
+ systemType: this.getData('systemType', 'form'),
|
|
|
+ campaignType: this.getData('campaignType', 'form'),
|
|
|
+ dayBudget: this.campaignData.dayBudget ? this.campaignData.dayBudget : null,
|
|
|
+ timeStart: this.campaignData.timeStart
|
|
|
+ ? moment(this.campaignData.timeStart).format('YYYY-MM-DD hh:mm:ss')
|
|
|
+ : null,
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$message.error('请填写规则的内容')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.unitInfo.unitName) {
|
|
|
+ var str = ''
|
|
|
+ for (let i = 0; i < 7 * 24; i++) {
|
|
|
+ str += '0'
|
|
|
+ }
|
|
|
+ params.unitJson = {
|
|
|
+ ...this.unitInfo,
|
|
|
+ unitType: 4,
|
|
|
+ accountId: this.accountId,
|
|
|
+ sceneId: this.allianceAccount == '1' ? JSON.stringify(this.unitInfo.sceneId) : JSON.stringify([5]),
|
|
|
+ dayBudget: this.dayBudgetType == '1' ? null : this.unitInfo.dayBudget * 1000,
|
|
|
+ beginTime: moment(this.unitInfo.timeRange[0]).format('YYYY-MM-DD'),
|
|
|
+ endTime: this.unitTime == '2' ? moment(this.unitInfo.timeRange[1]).format('YYYY-MM-DD') : null,
|
|
|
+ scheduleTime: this.scheduleTime == '2' ? this.unitInfo.scheduleTime : str,
|
|
|
+ useAppMarket: this.unitInfo.useAppMarket ? 1 : 0,
|
|
|
+ appStore: this.unitInfo.useAppMarket ? JSON.stringify(this.unitInfo.appStore) : null,
|
|
|
+ cpaBid: this.unitInfo.cpaBid ? this.unitInfo.cpaBid * 1000 : null,
|
|
|
+ bid: this.unitInfo.bid ? this.unitInfo.bid * 1000 : null,
|
|
|
+ bidMax: this.unitInfo.bidMax ? this.unitInfo.bidMax * 1000 : null,
|
|
|
+ bidMin: this.unitInfo.bidMin ? this.unitInfo.bidMin * 1000 : null,
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$message.error('请填写组内容')
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.checkDirectionalList.length > 0) {
|
|
|
+ params.targetIds = JSON.stringify(
|
|
|
+ this.checkDirectionalList.map((item) => {
|
|
|
+ return item.templateId
|
|
|
+ })
|
|
|
+ )
|
|
|
+ } else {
|
|
|
+ this.$message.error('请选择定向包')
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ params.creativeJson = {
|
|
|
+ ...this.creativeInfo,
|
|
|
+ accountId: this.accountId,
|
|
|
+ overlayType: this.creativeInfo.overlayType.length > 0 ? this.creativeInfo.overlayType[0] : null,
|
|
|
+ creativeCategory: this.creativeInfo.creativeCategory[this.creativeInfo.creativeCategory.length - 1],
|
|
|
+ creativeTag: JSON.stringify(this.creativeInfo.creativeTag),
|
|
|
+ actionBarText: this.creativeInfo.actionBarText,
|
|
|
+ stickerTitle: this.creativeInfo.overlayType.length > 0 ? this.creativeInfo.stickerTitle : null,
|
|
|
+ }
|
|
|
+
|
|
|
+ params.materialArray = {
|
|
|
+ materialInfo: { ...this.materialInfo },
|
|
|
+ materialList: this.materialInfo.materialList.map((item) => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ photoArr: item.photoArr.map((t) => {
|
|
|
+ return { ...t, photoId: t.photoId.photoId }
|
|
|
+ }),
|
|
|
+ }
|
|
|
+ }),
|
|
|
+ descriptionList:
|
|
|
+ this.materialInfo.matchingMethod != 1
|
|
|
+ ? this.descriptionList.map((item) => {
|
|
|
+ return item.value
|
|
|
+ })
|
|
|
+ : null,
|
|
|
+ }
|
|
|
+ var dataArr = this.getAllData()
|
|
|
+ params.appList = {
|
|
|
+ checkType: this.getData('campaignType', 'form') == 2 ? 'app' : 'url',
|
|
|
+ appAllocation: this.appList.appAllocation, //1按账户,2按广告计划,3按广告组
|
|
|
+ appArr: dataArr.map((item) => {
|
|
|
+ return { appId: item.key, siteId: item.siteId?+item.siteId:null }
|
|
|
+ }),
|
|
|
+ urlArr: null,
|
|
|
+ linkAllocation: this.appList.linkAllocation,
|
|
|
+ clickUrlList: this.appList.clickUrlList.map((item) => {
|
|
|
+ return item.value
|
|
|
+ }),
|
|
|
+ clickUrlActionList: this.appList.clickUrlActionList.map((item) => {
|
|
|
+ return item.value
|
|
|
+ }),
|
|
|
+ }
|
|
|
+ this.postDataAction('/kuaishouBatch/campaignPreview/addPreviewData', params).then((res) => {
|
|
|
+ if (res.success) {
|
|
|
+ window.open('/user/lookPreview?accountId=' + this.accountId + '&batchId=' + params.batchId, '_blank')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
typeChange() {},
|
|
@@ -2636,9 +3032,19 @@ export default {
|
|
|
// dayBudgetType: '1',
|
|
|
// unitTime: '1',
|
|
|
// scheduleTime: '1',
|
|
|
- this.postDataAction('/template/kuaiShouBatchGroupTemplate/saveOrUpdate', params).then((res) => {
|
|
|
- console.log(res)
|
|
|
- })
|
|
|
+
|
|
|
+ if (this.keep) {
|
|
|
+ this.postDataAction('/template/kuaiShouBatchGroupTemplate/saveOrUpdate', params).then((res) => {
|
|
|
+ this.visible = false
|
|
|
+ if (res.success) {
|
|
|
+ this.$message.success(res.message)
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.message)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.visible = false
|
|
|
+ }
|
|
|
} else {
|
|
|
console.log('error submit!!')
|
|
|
return false
|
|
@@ -2662,9 +3068,18 @@ export default {
|
|
|
// dayBudgetType: '1',
|
|
|
// unitTime: '1',
|
|
|
// scheduleTime: '1',
|
|
|
- this.postDataAction('/template/kuaiShouBatchCreativeTemplate/saveOrUpdate', params).then((res) => {
|
|
|
- console.log(res)
|
|
|
- })
|
|
|
+ if (this.creativeInfo.keep) {
|
|
|
+ this.creativeVisible = false
|
|
|
+ this.postDataAction('/template/kuaiShouBatchCreativeTemplate/saveOrUpdate', params).then((res) => {
|
|
|
+ if (res.success) {
|
|
|
+ this.$message.success(res.message)
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.message)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.creativeVisible = false
|
|
|
+ }
|
|
|
} else {
|
|
|
console.log('error submit!!')
|
|
|
return false
|
|
@@ -2684,7 +3099,7 @@ export default {
|
|
|
accountId: accountId,
|
|
|
}).then((res) => {
|
|
|
if (res.success) {
|
|
|
- if (res.result.id) {
|
|
|
+ if (res.result) {
|
|
|
var data = res.result
|
|
|
// params.id = this.createTiveTemplateId
|
|
|
// params.accountId = this.accountId
|
|
@@ -2710,6 +3125,7 @@ export default {
|
|
|
// unitTime: '1',
|
|
|
// scheduleTime: '1',
|
|
|
} else {
|
|
|
+ this.createTiveTemplateId = null
|
|
|
this.closeUnit('createForm')
|
|
|
}
|
|
|
}
|
|
@@ -2720,7 +3136,7 @@ export default {
|
|
|
accountId: accountId,
|
|
|
}).then((res) => {
|
|
|
if (res.success) {
|
|
|
- if (res.result.id) {
|
|
|
+ if (res.result) {
|
|
|
var str = ''
|
|
|
for (let i = 0; i < 7 * 24; i++) {
|
|
|
str += '0'
|
|
@@ -2745,13 +3161,14 @@ export default {
|
|
|
this.unitInfo.ocpxActionType = data.ocpxActionType ? data.ocpxActionType : 2
|
|
|
this.unitInfo.deepConversionType = data.deepConversionType
|
|
|
this.unitInfo.templateBidType = data.templateBidType
|
|
|
- this.unitInfo.cpaBid = data.cpaBid
|
|
|
- this.unitInfo.bid = data.bid
|
|
|
- this.unitInfo.deepConversionBid = data.deepConversionBid
|
|
|
- this.unitInfo.bidMax = data.bidMax
|
|
|
- this.unitInfo.bidMin = data.bidMin
|
|
|
+ this.unitInfo.cpaBid = data.cpaBid ? data.cpaBid / 1000 : null
|
|
|
+ this.unitInfo.bid = data.bid ? data.bid / 1000 : null
|
|
|
+ this.unitInfo.deepConversionBid = data.deepConversionBid ? data.deepConversionBid / 1000 : null
|
|
|
+ this.unitInfo.bidMax = data.bidMax ? data.bidMax / 1000 : null
|
|
|
+ this.unitInfo.bidMin = data.bidMin ? data.bidMin / 1000 : null
|
|
|
this.unitInfo.unitName = data.unitName
|
|
|
} else {
|
|
|
+ this.groupTemplateId = null
|
|
|
this.closeUnit('ruleForm')
|
|
|
}
|
|
|
}
|
|
@@ -2762,7 +3179,7 @@ export default {
|
|
|
accountId: accountId,
|
|
|
}).then((res) => {
|
|
|
if (res.success) {
|
|
|
- if (res.result.id) {
|
|
|
+ if (res.result) {
|
|
|
this.campaignTemplateId = res.result.id
|
|
|
this.campaignData = res.result
|
|
|
if (this.campaignData.timeStart) {
|
|
@@ -2780,6 +3197,7 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
} else {
|
|
|
+ this.campaignTemplateId = null
|
|
|
this.form.resetFields()
|
|
|
}
|
|
|
}
|
|
@@ -2796,9 +3214,20 @@ export default {
|
|
|
params.campaignType = this.getData('campaignType', 'form')
|
|
|
params.dayBudget = values.dayBudget ? values.dayBudget * 1000 : null
|
|
|
params.timeStart = values.timeStart ? moment(values.timeStart).format('YYYY-MM-DD hh:mm:ss') : null
|
|
|
- this.postDataAction('/template/kuaiShouBatchCampaignTemplate/saveOrUpdate', params).then((res) => {
|
|
|
- console.log(res)
|
|
|
- })
|
|
|
+ this.campaignData = { ...params }
|
|
|
+
|
|
|
+ if (values.keep.length > 0) {
|
|
|
+ this.postDataAction('/template/kuaiShouBatchCampaignTemplate/saveOrUpdate', params).then((res) => {
|
|
|
+ this.ruleConfigFormCancel()
|
|
|
+ if (res.success) {
|
|
|
+ this.$message.success(res.message)
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.message)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.ruleConfigFormCancel()
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -2815,6 +3244,7 @@ export default {
|
|
|
that.ruleConfigForm.setFieldsValue(
|
|
|
pick(mdl, ['budgetType', 'campaignName', 'campaignStatus', 'groupRule', 'isTime', 'keep', 'unitStatus'])
|
|
|
)
|
|
|
+
|
|
|
setTimeout(() => {
|
|
|
if (that.campaignData.isTime == '1') {
|
|
|
that.ruleConfigForm.setFieldsValue(pick(mdl, 'timeStart'))
|
|
@@ -2834,6 +3264,10 @@ export default {
|
|
|
},
|
|
|
getChangeAll(type, form, field) {
|
|
|
var node = document.getElementById(field)
|
|
|
+ if (this.getData('groupRule', 'ruleConfigForm') == 2 && form == 'ruleConfigForm' && type == '定向包') {
|
|
|
+ this.$message.error('只有按定向包分组时,才可拼接定向包')
|
|
|
+ return
|
|
|
+ }
|
|
|
var v = '{{' + type + '}}-'
|
|
|
if (document.selection) {
|
|
|
//IE
|