|
@@ -119,7 +119,6 @@ li.chouzhen.first:before {
|
|
|
<div style="width: 100%;" class="chartBox">
|
|
|
<a-card>
|
|
|
<div slot="title">
|
|
|
- <a-button style="margin: 0 15px 0 0" @click="backNewBatch" :disabled="newBatch"> 返回 </a-button>
|
|
|
预览区
|
|
|
</div>
|
|
|
<div slot="extra">
|
|
@@ -129,7 +128,7 @@ li.chouzhen.first:before {
|
|
|
全部提交审核
|
|
|
</a-button>
|
|
|
</div>
|
|
|
- <div v-if="campaignList">
|
|
|
+ <div v-if="campaignList && campaignList[0].campaignInfo">
|
|
|
<!-- <div v-for="(item, index) in campaignList" :key="index"></div> -->
|
|
|
<el-collapse v-model="activeName" accordion>
|
|
|
<el-collapse-item v-for="(item, index) in campaignList" :key="index" :name="item.id">
|
|
@@ -162,24 +161,28 @@ li.chouzhen.first:before {
|
|
|
</div>
|
|
|
</h2>
|
|
|
</template>
|
|
|
- <h3 style="display: flex; justify-content: space-between; width: 80%">
|
|
|
- <span style="width: 33%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap"
|
|
|
+ <h3 style="display: flex; justify-content: space-between; width: 113%">
|
|
|
+ <span style="flex:1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap"
|
|
|
>广告计划:{{ item.campaignInfo.campaignName }}</span
|
|
|
>
|
|
|
- <span style="width: 41%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap"
|
|
|
- >营销目标:{{ item.campaignInfo.campaignType == 2 ? '提升应用安装' : '收集销售线索' }}</span
|
|
|
+ <span style="flex:1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap"
|
|
|
+ >营销目标:{{
|
|
|
+ item.campaignInfo.campaignType == 2 ? '提升应用安装' : '收集销售线索'
|
|
|
+ }}</span
|
|
|
>
|
|
|
- <span style="width: 10%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap"
|
|
|
- >预算:{{ item.campaignInfo.dayBudget ? item.campaignInfo.dayBudget / 1000 + '元' : '不限' }}</span
|
|
|
+ <span style="flex:1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap"
|
|
|
+ >预算:{{
|
|
|
+ item.campaignInfo.dayBudget ? item.campaignInfo.dayBudget / 1000 + '元' : '不限'
|
|
|
+ }}</span
|
|
|
>
|
|
|
<!-- <a-checkbox style="width: 10%" v-model="item.checkAll" @click.stop="setAll(item)"> 全选 </a-checkbox> -->
|
|
|
</h3>
|
|
|
+ <!-- :scroll="{ x: 2100 }" -->
|
|
|
<a-table
|
|
|
:columns="columns"
|
|
|
- :data-source="item.kuaishouBatchGroupPreviews"
|
|
|
+ :data-source="item.campaignInfo.unitDetail"
|
|
|
class="components-table-demo-nested"
|
|
|
:pagination="false"
|
|
|
- :scroll="{ x: 2100 }"
|
|
|
bordered
|
|
|
tableLayout="fixed"
|
|
|
:row-selection="{ selectedRowKeys: groupCheck, onChange: onSelectChange }"
|
|
@@ -189,36 +192,64 @@ li.chouzhen.first:before {
|
|
|
<p style="text-align: left">
|
|
|
{{ text }}
|
|
|
</p>
|
|
|
- <a-icon
|
|
|
- type="edit"
|
|
|
- style="float: left; color: #409EFF; margin-top: 5px"
|
|
|
- class="count"
|
|
|
- @click.stop="editUnitName(records)"
|
|
|
- />
|
|
|
</span>
|
|
|
+ <div slot="target" slot-scope="text, records" style=" line-height: 30px;">
|
|
|
+ <a-row :gutter="20">
|
|
|
+ <a-col :sm="12" style="text-align:left">
|
|
|
+ <span>地域:</span>
|
|
|
+ <span>{{ records.regionGroupName }}</span>
|
|
|
+ </a-col>
|
|
|
+ <a-col :sm="12" style="text-align:left"
|
|
|
+ ><span>年龄:</span>
|
|
|
+ <span v-if="records.agesRange">{{
|
|
|
+ JSON.parse(records.agesRange)[0] | ageShow
|
|
|
+ }}</span>
|
|
|
+ <span v-else>不限</span>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <a-row :gutter="20">
|
|
|
+ <a-col :sm="12" style="text-align:left">
|
|
|
+ <span>性别:</span>
|
|
|
+ <span>{{
|
|
|
+ records.gender ? (records.gender == 1 ? '女' : '男') : '不限'
|
|
|
+ }}</span>
|
|
|
+ </a-col>
|
|
|
+ <a-col :sm="12" style="text-align:left"
|
|
|
+ ><span>行为意向:</span>
|
|
|
+ <span>{{ records.intentionTarget ? '系统优选' : '不限' }}</span></a-col
|
|
|
+ >
|
|
|
+ </a-row>
|
|
|
+ <a-row :gutter="20">
|
|
|
+ <a-col :sm="12" style="text-align:left">
|
|
|
+ <span>APP行为:</span>
|
|
|
+ <span>{{ records.appIds ? JSON.parse(records.appIds) : '不限' }}</span>
|
|
|
+ </a-col>
|
|
|
+ <a-col :sm="12" style="text-align:left"
|
|
|
+ ><span>智能扩量:</span>
|
|
|
+ <span>{{ records.isOpen == 0 ? '关闭' : '开启' }}</span></a-col
|
|
|
+ >
|
|
|
+ </a-row>
|
|
|
+ <a-row :gutter="20">
|
|
|
+ <a-col :sm="12" style="text-align:left">
|
|
|
+ <span>投放时段:</span>
|
|
|
+ <span>
|
|
|
+ {{ setItemDate(records.scheduleTime) }}
|
|
|
+ </span>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </div>
|
|
|
<span slot="bidType" slot-scope="text, records">
|
|
|
{{ text | bidType }}
|
|
|
</span>
|
|
|
- <span slot="sceneId" slot-scope="text, records">
|
|
|
- <p v-for="(item, index) in JSON.parse(text)" :key="index" style="text-align: left">
|
|
|
- {{ item | kuaishouSceneId
|
|
|
- }}{{ index == JSON.parse(text).length - 1 ? '' : ',' }}
|
|
|
- </p>
|
|
|
- </span>
|
|
|
- <span slot="materialArr" slot-scope="text, records">
|
|
|
- <p style="color: #409EFF; cursor: pointer" @click="lookVideo(text)">
|
|
|
- 已选{{ text ? text.length : 0 }}个视频素材
|
|
|
- </p>
|
|
|
- </span>
|
|
|
<span slot="dayBudget" slot-scope="text, records">
|
|
|
- <p style="text-align: left">
|
|
|
+ <p>
|
|
|
预算:{{
|
|
|
records.dayBudget || records.dayBudget > 0
|
|
|
? records.dayBudget / 1000 + '元'
|
|
|
: '不限'
|
|
|
}}
|
|
|
</p>
|
|
|
- <p style="text-align: left">
|
|
|
+ <p>
|
|
|
出价:{{
|
|
|
records.bid
|
|
|
? records.bid / 1000
|
|
@@ -227,69 +258,20 @@ li.chouzhen.first:before {
|
|
|
: ''
|
|
|
}}元
|
|
|
</p>
|
|
|
- <p style="text-align: left" v-if="records.deepConversionType">
|
|
|
+ <p v-if="records.deepConversionType">
|
|
|
深度转化出价:{{
|
|
|
records.deepConversionBid ? records.deepConversionBid / 1000 : '无'
|
|
|
}}
|
|
|
</p>
|
|
|
- <a-icon
|
|
|
- type="edit"
|
|
|
- style="float: left; color: #409EFF"
|
|
|
- class="count"
|
|
|
- @click.stop="editBid(records, records.bidType == 2 ? 'bid' : 'cpaBid')"
|
|
|
- />
|
|
|
- </span>
|
|
|
- <span slot="appId" slot-scope="text, records">
|
|
|
- <div style="width: 100%" v-if="text">
|
|
|
- <p style="text-align: left">
|
|
|
- {{ setAppName(text) }}
|
|
|
- </p>
|
|
|
- <a-icon
|
|
|
- type="edit"
|
|
|
- style="float: left; color: #409EFF; margin-top: 5px"
|
|
|
- class="count"
|
|
|
- @click="editAppAndSite(records)"
|
|
|
- />
|
|
|
- </div>
|
|
|
- <p style="text-align: left">
|
|
|
- {{ records.url }}
|
|
|
- </p>
|
|
|
</span>
|
|
|
+
|
|
|
<span slot="action" slot-scope="text, record">
|
|
|
+ <a @click="lookCreative(record.id)">查看创意</a>
|
|
|
+ <a-divider type="vertical" />
|
|
|
<a-popconfirm :title="`确定要删除这项吗?`" @confirm="removeGroup(record.id)">
|
|
|
<a>删除</a>
|
|
|
<span class="gap"></span>
|
|
|
</a-popconfirm>
|
|
|
-
|
|
|
- <!-- <a-divider type="vertical" />
|
|
|
- <a>Delete</a> -->
|
|
|
- </span>
|
|
|
- <span slot="descriptionArr" slot-scope="text, records">
|
|
|
- <p
|
|
|
- v-for="(item, index) in new Set(text)"
|
|
|
- :key="index"
|
|
|
- style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left"
|
|
|
- :title="item"
|
|
|
- >
|
|
|
- {{ item }}
|
|
|
- </p>
|
|
|
- </span>
|
|
|
-
|
|
|
- <span slot="clickTrackUrl" slot-scope="text, records">
|
|
|
- <p style="text-align: left">{{ text }}</p>
|
|
|
-
|
|
|
- <a-icon
|
|
|
- type="edit"
|
|
|
- style="float: left; color: #409EFF"
|
|
|
- class="count"
|
|
|
- @click.stop="editClickTrackUrl(records)"
|
|
|
- />
|
|
|
- </span>
|
|
|
- <span slot="isSuccess" slot-scope="text, records">{{
|
|
|
- text == 0 ? '待提交' : '提交成功'
|
|
|
- }}</span>
|
|
|
- <span slot="siteId" slot-scope="text, records">
|
|
|
- {{ text ? text : '无' }}
|
|
|
</span>
|
|
|
</a-table>
|
|
|
</el-collapse-item>
|
|
@@ -297,159 +279,44 @@ li.chouzhen.first:before {
|
|
|
</div>
|
|
|
</a-card>
|
|
|
<a-modal
|
|
|
- title="修改广告组名称"
|
|
|
- v-model="unitNameEditVisible"
|
|
|
- :width="500"
|
|
|
- @ok="okUnitName"
|
|
|
- @cancel="unitNameEditVisible = false"
|
|
|
- :destroyOnClose="true"
|
|
|
+ title="选择素材"
|
|
|
+ :width="1000"
|
|
|
+ v-if="creativeVisible"
|
|
|
+ :visible="creativeVisible"
|
|
|
+ dialog-class="push-modal"
|
|
|
+ :footer="null"
|
|
|
+ @cancel="creativeVisible = false"
|
|
|
>
|
|
|
- <!-- <a-form-model
|
|
|
- ref="materialForm"
|
|
|
- :hideRequiredMark="true"
|
|
|
- >
|
|
|
- <a-row :gutter="16"> -->
|
|
|
- <div style="display: flex; width: 100%">
|
|
|
- <span>广告组名称:</span>
|
|
|
- <a-input
|
|
|
- v-model="unitName"
|
|
|
- style="width: 70%; margin-left: 10px; position: relative; top: -4px"
|
|
|
- placeholder="请输入广告组名称"
|
|
|
- />
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- </a-row>
|
|
|
- </a-form-model> -->
|
|
|
- </a-modal>
|
|
|
- <a-modal
|
|
|
- title="修改出价预算"
|
|
|
- v-model="bidEditVisible"
|
|
|
- :width="500"
|
|
|
- @ok="okUnitBid"
|
|
|
- @cancel="bidEditVisible = false"
|
|
|
- :destroyOnClose="true"
|
|
|
- >
|
|
|
- <a-form :form="ruleConfigForm" layout="horizontal" hide-required-mark v-bind="formItemLayout">
|
|
|
- <a-form-item label="预算">
|
|
|
- <a-input-number
|
|
|
- v-decorator="['dayBudget']"
|
|
|
- style="width: 100%"
|
|
|
- :min="500"
|
|
|
- :precision="0"
|
|
|
- :max="100000000"
|
|
|
- placeholder="不小于500,不超过100000000,仅支持输入自然数"
|
|
|
+ <a-table
|
|
|
+ :columns="creativeColumns"
|
|
|
+ :dataSource="creativeList"
|
|
|
+ :pagination="false"
|
|
|
+ :loading="dataLoading"
|
|
|
+ bordered
|
|
|
+ @change="tableChange"
|
|
|
+ size="middle"
|
|
|
+ style="word-break: break-all;font-size:16px;font-weight:600"
|
|
|
+ id="outTable"
|
|
|
+ >
|
|
|
+ <span slot="coverUrl" slot-scope="text, records">
|
|
|
+ <img :src="text" alt="" style="width:100%" />
|
|
|
+ </span>
|
|
|
+ <span slot="creativeCategory" slot-scope="text, records">
|
|
|
+ <a-cascader
|
|
|
+ :options="createOptions"
|
|
|
+ v-model="text"
|
|
|
+ :fieldNames="fieldNames"
|
|
|
+ disabled
|
|
|
+ placeholder="请选择创意分类"
|
|
|
+ style="width:100%"
|
|
|
/>
|
|
|
- </a-form-item>
|
|
|
- <a-form-item label="出价">
|
|
|
- <a-input-number
|
|
|
- v-decorator="['bid']"
|
|
|
- style="width: 100%"
|
|
|
- :max="
|
|
|
- getData('dayBudget', 'ruleConfigForm') ? getData('dayBudget', 'ruleConfigForm') : 3000
|
|
|
- "
|
|
|
- :min="0"
|
|
|
- :precision="2"
|
|
|
- />
|
|
|
- </a-form-item>
|
|
|
- <a-form-item label="深度转化出价" v-if="deepConversionType">
|
|
|
- <a-input-number v-decorator="['deepConversionBid']" style="width: 100%" />
|
|
|
- </a-form-item>
|
|
|
- </a-form>
|
|
|
- </a-modal>
|
|
|
-
|
|
|
- <a-modal
|
|
|
- title="修改应用"
|
|
|
- v-model="appIdEditVisible"
|
|
|
- :width="700"
|
|
|
- @ok="okAppId"
|
|
|
- @cancel="appIdEditVisible = false"
|
|
|
- :destroyOnClose="true"
|
|
|
- >
|
|
|
- <a-form :form="appIdConfigForm" layout="horizontal" hide-required-mark v-bind="formItemLayout">
|
|
|
- <a-form-item label="应用">
|
|
|
- <a-select v-decorator="['appId']" style="width: 100%" allowClear @change="setSiteId">
|
|
|
- <a-select-option
|
|
|
- v-for="appModel in appListArr"
|
|
|
- :key="appModel.appId"
|
|
|
- :value="appModel.appId"
|
|
|
- >
|
|
|
- {{ appModel.appName }} {{ appModel.appVersion }}
|
|
|
- </a-select-option>
|
|
|
- </a-select>
|
|
|
- </a-form-item>
|
|
|
- <a-form-item label="应用下载详情页">
|
|
|
- <a-select
|
|
|
- v-decorator="['siteId']"
|
|
|
- style="width: 100%"
|
|
|
- allowClear
|
|
|
- :disabled="
|
|
|
- getData('appId', 'appIdConfigForm') == undefined ||
|
|
|
- getData('appId', 'appIdConfigForm') == null ||
|
|
|
- getData('appId', 'appIdConfigForm') == ''
|
|
|
- "
|
|
|
+ </span>
|
|
|
+ <span slot="creativeTag" slot-scope="text, records">
|
|
|
+ <span v-for="(item, index) in JSON.parse(text)"
|
|
|
+ >{{ item }}{{ index == JSON.parse(text).length - 1 ? '' : ',' }}</span
|
|
|
>
|
|
|
- <a-select-option
|
|
|
- v-for="appModel in siteList"
|
|
|
- :key="appModel.siteId"
|
|
|
- :value="appModel.siteId"
|
|
|
- >
|
|
|
- {{ appModel.name }}
|
|
|
- </a-select-option>
|
|
|
- </a-select>
|
|
|
- </a-form-item>
|
|
|
- </a-form>
|
|
|
- </a-modal>
|
|
|
-
|
|
|
- <a-modal
|
|
|
- title="修改监测链接"
|
|
|
- v-model="clickTrackUrlEditVisible"
|
|
|
- :width="700"
|
|
|
- @ok="okClickTrackUrl"
|
|
|
- @cancel="clickTrackUrlEditVisible = false"
|
|
|
- :destroyOnClose="true"
|
|
|
- >
|
|
|
- <h4 style="text-align: center">不填则保持原样</h4>
|
|
|
- <a-form :form="clickTrackUrlConfigForm" layout="horizontal" hide-required-mark v-bind="formItemLayout">
|
|
|
- <a-form-item label="监测链接">
|
|
|
- <a-input v-decorator="['clickTrackUrl']" placeholder="请输入监测链接" />
|
|
|
- </a-form-item>
|
|
|
- <a-form-item label="点击监测链接">
|
|
|
- <a-input v-decorator="['actionbarClickUrl']" placeholder="请输入点击监测链接" />
|
|
|
- </a-form-item>
|
|
|
- </a-form>
|
|
|
- </a-modal>
|
|
|
-
|
|
|
- <a-modal title="素材预览" v-model="coverPreviewVisible" :width="1000" :footer="null">
|
|
|
- <a-carousel arrows class="cover_carousel_con" v-if="videoData.length > 0" @next="next" @prev="prev">
|
|
|
- <div v-for="(item, index) in videoData" :key="index" class="content">
|
|
|
- <div style="display: flex !important; justify-content: space-around">
|
|
|
- <div style="display: flex; flex-direction: column; align-items: center">
|
|
|
- <!-- <video :src="item.videoUrl.coverUrl" :width="300" /> -->
|
|
|
- <video class="video" :src="item.videoUrl.url" controls="controls" style="width: 300px">
|
|
|
- 您的浏览器不支持 video 标签。
|
|
|
- </video>
|
|
|
- <span style="font-size: 20px; margin-top: 15px">视频素材</span>
|
|
|
- </div>
|
|
|
- <div style="display: flex; flex-direction: column; align-items: center">
|
|
|
- <img :src="item.imageUrl" v-if="item.imageUrl" :width="300" />
|
|
|
- <img :src="item.videoUrl.coverUrl" v-else :width="300" />
|
|
|
- <span style="font-size: 20px; margin-top: 15px">封面素材</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <a-icon
|
|
|
- type="left-circle"
|
|
|
- slot="prevArrow"
|
|
|
- slot-scope
|
|
|
- style="left: 10px; zindex: 9; font-size: 30px; color: black"
|
|
|
- />
|
|
|
- <a-icon
|
|
|
- type="right-circle"
|
|
|
- slot="nextArrow"
|
|
|
- slot-scope
|
|
|
- style="right: 10px; zindex: 9; font-size: 30px; color: black"
|
|
|
- />
|
|
|
- </a-carousel>
|
|
|
+ </span>
|
|
|
+ </a-table>
|
|
|
</a-modal>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -466,6 +333,8 @@ import moment from 'moment'
|
|
|
import selectCheckAll from '@/components/formComponents/toutiaoTime'
|
|
|
import checkBoxGroup from '@/components/formComponents/checkBoxGroup'
|
|
|
import { stopOtherVideo, closeAllVideoFun } from '@/utils/videoControl' // 停止除当前外的其他视频播放,及停止所有视频播放的方法
|
|
|
+
|
|
|
+import { deleteAction } from '@/api/manage'
|
|
|
function tqFun(qcArr1) {
|
|
|
var tempArr = []
|
|
|
function bbFun(qcArr) {
|
|
@@ -480,7 +349,31 @@ function tqFun(qcArr1) {
|
|
|
}
|
|
|
return bbFun(qcArr1)
|
|
|
}
|
|
|
-
|
|
|
+var num = ['一', '二', '三', '四', '五', '六', '日']
|
|
|
+var arr_hour = get_hour_arr()
|
|
|
+//生成时间值数组
|
|
|
+function get_hour_arr() {
|
|
|
+ var arr_hour = []
|
|
|
+ var oDate = new Date('2016/07/01 00:00:00') //实例一个时间对象;
|
|
|
+ var oDate_hour = oDate.getHours()
|
|
|
+ var oDate_minute = oDate.getMinutes()
|
|
|
+ for (var i = 0; i < 24; i++) {
|
|
|
+ if (oDate_minute < 10) {
|
|
|
+ var oDate_minute = '0' + oDate_minute
|
|
|
+ }
|
|
|
+ if (i >= 1) {
|
|
|
+ oDate.setMinutes(oDate.getMinutes() + 60)
|
|
|
+ oDate_hour = oDate.getHours()
|
|
|
+ oDate_minute = oDate.getMinutes()
|
|
|
+ if (oDate_minute < 10) {
|
|
|
+ var oDate_minute = '0' + oDate_minute
|
|
|
+ }
|
|
|
+ }
|
|
|
+ arr_hour[i] = oDate_hour + ':' + oDate_minute
|
|
|
+ // alert(oDate_hour + ':' + oDate.getMinutes());
|
|
|
+ }
|
|
|
+ return arr_hour
|
|
|
+}
|
|
|
export default {
|
|
|
name: 'GlobalHeader',
|
|
|
components: {
|
|
@@ -516,6 +409,14 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ fieldNames: {
|
|
|
+ label: 'category_name',
|
|
|
+ value: 'category_id',
|
|
|
+ children: 'child'
|
|
|
+ },
|
|
|
+ creativeVisible: false,
|
|
|
+ creativeList: [],
|
|
|
+ dataLoading: false,
|
|
|
newBatch: false,
|
|
|
videoData: [],
|
|
|
coverPreviewVisible: false,
|
|
@@ -541,107 +442,85 @@ export default {
|
|
|
accountId: '',
|
|
|
batchId: null,
|
|
|
campaignList: null,
|
|
|
+ createOptions: [],
|
|
|
activeName: null,
|
|
|
- columns: [
|
|
|
+ creativeColumns: [
|
|
|
{
|
|
|
- title: '广告组名称',
|
|
|
- dataIndex: 'unitName',
|
|
|
- key: 'unitName',
|
|
|
- width: 200,
|
|
|
+ title: '封面',
|
|
|
+ dataIndex: 'coverUrl',
|
|
|
+ key: 'coverUrl',
|
|
|
align: 'center',
|
|
|
- scopedSlots: { customRender: 'unitName' },
|
|
|
- fixed: 'left'
|
|
|
+ scopedSlots: { customRender: 'coverUrl' },
|
|
|
+ width: 200
|
|
|
},
|
|
|
{
|
|
|
- title: '优化目标',
|
|
|
- dataIndex: 'bidType',
|
|
|
- key: 'bidType',
|
|
|
- width: 100,
|
|
|
+ title: '广告语',
|
|
|
+ dataIndex: 'description',
|
|
|
+ key: 'description',
|
|
|
align: 'center',
|
|
|
- scopedSlots: { customRender: 'bidType' }
|
|
|
+ scopedSlots: { customRender: 'description' }
|
|
|
},
|
|
|
{
|
|
|
- title: '预算与出价',
|
|
|
- dataIndex: 'dayBudget',
|
|
|
- key: 'dayBudget',
|
|
|
- scopedSlots: { customRender: 'dayBudget' },
|
|
|
- width: 150,
|
|
|
+ title: '行动号召',
|
|
|
+ dataIndex: 'actionBarText',
|
|
|
+ key: 'actionBarText',
|
|
|
+ scopedSlots: { customRender: 'actionBarText' },
|
|
|
align: 'center'
|
|
|
},
|
|
|
{
|
|
|
- title: '广告位',
|
|
|
- dataIndex: 'sceneId',
|
|
|
- key: 'sceneId',
|
|
|
- width: 140,
|
|
|
- scopedSlots: { customRender: 'sceneId' },
|
|
|
+ title: '创意标签',
|
|
|
+ dataIndex: 'creativeTag',
|
|
|
+ key: 'creativeTag',
|
|
|
+ scopedSlots: { customRender: 'creativeTag' },
|
|
|
align: 'center'
|
|
|
},
|
|
|
{
|
|
|
- title: '快手应用/落地页',
|
|
|
- dataIndex: 'appId',
|
|
|
- key: 'appId',
|
|
|
- width: 150,
|
|
|
- scopedSlots: { customRender: 'appId' },
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- title: '定向包',
|
|
|
- dataIndex: 'templateName',
|
|
|
- key: 'templateName',
|
|
|
- width: 150,
|
|
|
- align: 'center',
|
|
|
- scopedSlots: { customRender: 'templateName' }
|
|
|
- },
|
|
|
- {
|
|
|
- title: '广告语',
|
|
|
- dataIndex: 'descriptionArr',
|
|
|
- key: 'descriptionArr',
|
|
|
- width: 350,
|
|
|
+ title: '创意分类',
|
|
|
+ dataIndex: 'creativeCategory',
|
|
|
+ key: 'creativeCategory',
|
|
|
align: 'center',
|
|
|
- scopedSlots: { customRender: 'descriptionArr' },
|
|
|
- ellipsis: true
|
|
|
- },
|
|
|
+ scopedSlots: { customRender: 'creativeCategory' }
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ columns: [
|
|
|
{
|
|
|
- title: '创意素材',
|
|
|
- dataIndex: 'materialArr',
|
|
|
- key: 'materialArr',
|
|
|
- width: 150,
|
|
|
+ title: '广告组名称',
|
|
|
+ dataIndex: 'unitName',
|
|
|
+ key: 'unitName',
|
|
|
align: 'center',
|
|
|
- scopedSlots: { customRender: 'materialArr' }
|
|
|
+ scopedSlots: { customRender: 'unitName' },
|
|
|
+ width: 200
|
|
|
},
|
|
|
{
|
|
|
- title: '监测链接',
|
|
|
- dataIndex: 'clickTrackUrl',
|
|
|
- key: 'clickTrackUrl',
|
|
|
- width: 350,
|
|
|
+ title: '优化目标',
|
|
|
+ dataIndex: 'bidType',
|
|
|
+ key: 'bidType',
|
|
|
align: 'center',
|
|
|
- scopedSlots: { customRender: 'clickTrackUrl' }
|
|
|
+ scopedSlots: { customRender: 'bidType' },
|
|
|
+ width: 150
|
|
|
},
|
|
|
{
|
|
|
- title: '应用下载详情页',
|
|
|
- dataIndex: 'siteId',
|
|
|
- key: 'siteId',
|
|
|
- width: 150,
|
|
|
+ title: '预算与出价',
|
|
|
+ dataIndex: 'dayBudget',
|
|
|
+ key: 'dayBudget',
|
|
|
+ scopedSlots: { customRender: 'dayBudget' },
|
|
|
align: 'center',
|
|
|
- scopedSlots: { customRender: 'siteId' }
|
|
|
+ width: 150
|
|
|
},
|
|
|
{
|
|
|
- title: '状态',
|
|
|
- dataIndex: 'isSuccess',
|
|
|
- key: 'isSuccess',
|
|
|
- width: 100,
|
|
|
- fixed: 'right',
|
|
|
- align: 'center',
|
|
|
- scopedSlots: { customRender: 'isSuccess' }
|
|
|
+ title: '定向',
|
|
|
+ dataIndex: 'target',
|
|
|
+ key: 'target',
|
|
|
+ scopedSlots: { customRender: 'target' },
|
|
|
+ align: 'center'
|
|
|
},
|
|
|
{
|
|
|
title: '操作',
|
|
|
dataIndex: 'action',
|
|
|
key: 'action',
|
|
|
- width: 100,
|
|
|
- fixed: 'right',
|
|
|
align: 'center',
|
|
|
- scopedSlots: { customRender: 'action' }
|
|
|
+ scopedSlots: { customRender: 'action' },
|
|
|
+ width: 150
|
|
|
}
|
|
|
],
|
|
|
appListArr: [],
|
|
@@ -675,67 +554,158 @@ export default {
|
|
|
},
|
|
|
watch: {},
|
|
|
mounted() {
|
|
|
- // this.accountId = this.$route.query.accountId
|
|
|
- // this.batchId = this.$route.query.batchId
|
|
|
this.getPreviewList()
|
|
|
- this.$nextTick(() => {
|
|
|
- let params = {}
|
|
|
- params.accountId = this.$route.query.id
|
|
|
- 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: []
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
+ },
|
|
|
+ filters: {
|
|
|
+ ageShow(val) {
|
|
|
+ let data = { 18: '18-23岁', 24: '24-30岁', 41: '41-49岁', 50: '50-100岁' }
|
|
|
+
|
|
|
+ return data[val]
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
+ setItemDate(external_binary) {
|
|
|
+ //初始化周数数组
|
|
|
+ var time_week_arr = []
|
|
|
+
|
|
|
+ var date_html = ''
|
|
|
+ var binary = external_binary
|
|
|
+
|
|
|
+ for (var y = 0; y < 7; y++) {
|
|
|
+ //初始化小时数组
|
|
|
+ var time_hour_arr = []
|
|
|
+
|
|
|
+ for (var x = 0; x < 24; x++) {
|
|
|
+ //获取当前点击元素的位置
|
|
|
+ if (y == 0) {
|
|
|
+ var index = x
|
|
|
+ } else {
|
|
|
+ var index = y * 24 + x
|
|
|
+ }
|
|
|
+ //获取td对应的二进制值
|
|
|
+ var Selected_val = binary.charAt(index)
|
|
|
+
|
|
|
+ if (Selected_val == 1) {
|
|
|
+ //组装保存进数组里
|
|
|
+ if (time_hour_arr == []) {
|
|
|
+ //表格的第一个位置的值
|
|
|
+ time_hour_arr = arr_hour[x]
|
|
|
+ } else if (binary.charAt(index - 1) == 1 && binary.charAt(index - 2) == 1) {
|
|
|
+ //此位置(包含上一行)的前两个都为选中时
|
|
|
+
|
|
|
+ if (x == 0 && binary.charAt(index + 1) == 0) {
|
|
|
+ //选中行里第一个,后一个表格没选中,加逗号
|
|
|
+ time_hour_arr[time_hour_arr.length] = arr_hour[x] + ', '
|
|
|
+ } else if (x == 0 && binary.charAt(index + 1) == 1) {
|
|
|
+ //选中行里第一个,后一个表格已选中,不加逗号
|
|
|
+ time_hour_arr[time_hour_arr.length] = arr_hour[x]
|
|
|
+ } else if (x == 1 && binary.charAt(index - 1) == 0) {
|
|
|
+ //选中行里第二个,上一个表格没选中,加逗号
|
|
|
+ time_hour_arr[time_hour_arr.length] = arr_hour[x] + ', '
|
|
|
+ } else if (x == 1 && binary.charAt(index - 1) == 1) {
|
|
|
+ //选中行里第二个,上一个表格已选中,前加-号,后加逗号
|
|
|
+ time_hour_arr[time_hour_arr.length] = '-' + arr_hour[x] + ', '
|
|
|
+ } else {
|
|
|
+ //选中行里除第一、二的表格以外,前一个表格已经选中,此元素前加- 后加逗号
|
|
|
+ time_hour_arr[time_hour_arr.length - 1] = '-' + arr_hour[x] + ', '
|
|
|
+ }
|
|
|
+ } else if (binary.charAt(index - 1) == 1 && x > 0) {
|
|
|
+ //选中的前一个已选中,且此次选中的不是行里第一个,此次选中的元素前加-后加逗号
|
|
|
+ time_hour_arr[time_hour_arr.length] = '-' + arr_hour[x] + ', '
|
|
|
+ } else if (binary.charAt(index + 1) != 1 || x == 47) {
|
|
|
+ //选中的后一个没选中,或者此次选中的是行里最后一个,此次选中的元素加逗号
|
|
|
+ time_hour_arr[time_hour_arr.length] = arr_hour[x] + ', '
|
|
|
+ } else {
|
|
|
+ //选中的后一已选中,此次选中的元素不加逗号
|
|
|
+ time_hour_arr[time_hour_arr.length] = arr_hour[x]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ time_week_arr[y] = time_hour_arr
|
|
|
+ }
|
|
|
+ //再次组装并输出数组
|
|
|
+ var time_html = []
|
|
|
+ for (var y = 0; y < 7; y++) {
|
|
|
+ for (var x = 0; x < time_week_arr[y].length; x++) {
|
|
|
+ if (!time_html[y]) {
|
|
|
+ time_html[y] = time_week_arr[y][x]
|
|
|
+ } else {
|
|
|
+ time_html[y] += time_week_arr[y][x]
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (time_html[y]) {
|
|
|
+ time_html[y] = time_html[y].substring(0, time_html[y].length - 1)
|
|
|
+
|
|
|
+ date_html += '星期' + num[y] + ' (' + time_html[y] + ')' + ', '
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (external_binary) {
|
|
|
+ return date_html
|
|
|
+ }
|
|
|
+ // console.info(time_html);
|
|
|
+ },
|
|
|
next() {
|
|
|
closeAllVideoFun()
|
|
|
},
|
|
|
prev() {
|
|
|
closeAllVideoFun()
|
|
|
},
|
|
|
- createArr() {
|
|
|
- this.newBatch = true
|
|
|
- var params = {}
|
|
|
- params.accountId = this.accountId
|
|
|
- params.dataList = {
|
|
|
- campaigns: this.groupCheckRow.map(item => {
|
|
|
- return item.planId
|
|
|
- }),
|
|
|
- groups: this.groupCheck
|
|
|
- }
|
|
|
- this.postDataAction('/kuaishouBatch/creativePreview/createAdcampaignAndGroups', params).then(res => {
|
|
|
+ lookCreative(id) {
|
|
|
+ this.creativeVisible = true
|
|
|
+ this.dataLoading = true
|
|
|
+ this.getAction('/dimension/kuaiShouDimensionCreative/getCreativeList', { unitTableId: id }).then(res => {
|
|
|
if (res.success) {
|
|
|
- this.getAction('/kuaishouBatch/groupPreview/deleteBatch', {
|
|
|
- ids: this.groupCheck.join()
|
|
|
- }).then(res => {
|
|
|
- if (res.success) {
|
|
|
- this.groupCheck = []
|
|
|
- this.getPreviewList()
|
|
|
- setTimeout(() => {
|
|
|
- var dataConunt = this.campaignList.filter(a => {
|
|
|
- return a.kuaishouBatchGroupPreviews.length > 0
|
|
|
- })
|
|
|
- if (dataConunt.length > 0) {
|
|
|
- } else {
|
|
|
- localStorage.removeItem('lookPreview')
|
|
|
- window.close()
|
|
|
- }
|
|
|
- })
|
|
|
+ this.creativeList = res.result.map(item => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ creativeCategory: item.creativeCategory
|
|
|
+ ? item.creativeCategory > 10000
|
|
|
+ ? [
|
|
|
+ parseInt(item.creativeCategory / 10000),
|
|
|
+ parseInt(item.creativeCategory / 100),
|
|
|
+ item.creativeCategory
|
|
|
+ ]
|
|
|
+ : item.creativeCategory > 100
|
|
|
+ ? [parseInt(item.creativeCategory / 100), item.creativeCategory]
|
|
|
+ : [item.creativeCategory]
|
|
|
+ : []
|
|
|
}
|
|
|
})
|
|
|
+ this.dataLoading = false
|
|
|
+ } else {
|
|
|
+ this.dataLoading = false
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ createArr() {
|
|
|
+ this.newBatch = true
|
|
|
+ var params = {}
|
|
|
+ this.newBatch = true
|
|
|
+ var groupIds = []
|
|
|
+ // for (let i = 0; i < this.campaignList.length; i++) {
|
|
|
+ // for (let j = 0; j < this.campaignList[i].campaignInfo.unitDetail.length; j++) {
|
|
|
+ // groupIds.push(this.campaignList[i].campaignInfo.unitDetail[j].id)
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ var params = {}
|
|
|
+ params.submitStatus = 1
|
|
|
+ params.ids = this.groupCheck
|
|
|
+ params.strategyId = this.$route.query.id
|
|
|
+ let that = this
|
|
|
+ this.postDataAction('/dimension/kuaiShouDimensionUnit/editBatch', params).then(res => {
|
|
|
+ this.$success({
|
|
|
+ title: '全部提交成功',
|
|
|
+ // JSX support
|
|
|
+ onOk: function() {
|
|
|
+ that.$router.replace('/autoLaunch/material-test')
|
|
|
+ that.$bus.$emit('remove', `/autoLaunch/lookPreview?id=${that.$route.query.id}`)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
setAll(item) {
|
|
|
// groupIds:[],
|
|
|
// campaignIds:[]
|
|
@@ -762,7 +732,7 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
handleConfirmDelete() {
|
|
|
- this.getAction('/kuaishouBatch/groupPreview/deleteBatch', {
|
|
|
+ deleteAction('/dimension/kuaiShouDimensionUnit/deleteBatch', {
|
|
|
ids: this.groupCheck.join()
|
|
|
}).then(res => {
|
|
|
if (res.success) {
|
|
@@ -817,7 +787,19 @@ export default {
|
|
|
strategyId: this.$route.query.id
|
|
|
}).then(res => {
|
|
|
if (res.success) {
|
|
|
- this.campaignList = res.result
|
|
|
+ if (res.result[0].campaignInfo) {
|
|
|
+ this.campaignList = res.result
|
|
|
+ this.getAction('/kuaishou/batch/getCreativeCategory', {
|
|
|
+ accountId: this.campaignList[0].accountId
|
|
|
+ }).then(result => {
|
|
|
+ if (result.success) {
|
|
|
+ //console.log(res)
|
|
|
+ this.createOptions = result.result
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message.error('没有可预览的值')
|
|
|
+ }
|
|
|
|
|
|
// this.activeName = this.campaignList[0].id
|
|
|
} else {
|
|
@@ -1067,7 +1049,7 @@ export default {
|
|
|
// })
|
|
|
},
|
|
|
removeGroup(id) {
|
|
|
- this.getAction('/kuaishouBatch/groupPreview/delete', { id: id }).then(res => {
|
|
|
+ deleteAction('/dimension/kuaiShouDimensionUnit/deleteBatch', { ids: id }).then(res => {
|
|
|
if (res.success) {
|
|
|
this.$message.success('删除成功')
|
|
|
this.getPreviewList()
|
|
@@ -1097,26 +1079,22 @@ export default {
|
|
|
this.newBatch = true
|
|
|
var groupIds = []
|
|
|
for (let i = 0; i < this.campaignList.length; i++) {
|
|
|
- for (let j = 0; j < this.campaignList[i].kuaishouBatchGroupPreviews.length; j++) {
|
|
|
- groupIds.push(this.campaignList[i].kuaishouBatchGroupPreviews[j].id)
|
|
|
+ for (let j = 0; j < this.campaignList[i].campaignInfo.unitDetail.length; j++) {
|
|
|
+ groupIds.push(this.campaignList[i].campaignInfo.unitDetail[j].id)
|
|
|
}
|
|
|
}
|
|
|
var params = {}
|
|
|
- params.accountId = this.accountId
|
|
|
- params.dataList = {
|
|
|
- campaigns: this.campaignList.map(item => {
|
|
|
- return item.id
|
|
|
- }),
|
|
|
- groups: groupIds
|
|
|
- }
|
|
|
- console.log(params)
|
|
|
- this.postDataAction('/kuaishouBatch/creativePreview/createAdcampaignAndGroups', params).then(res => {
|
|
|
+ params.submitStatus = 1
|
|
|
+ params.ids = groupIds
|
|
|
+ params.strategyId = this.$route.query.id
|
|
|
+ let that = this
|
|
|
+ this.postDataAction('/dimension/kuaiShouDimensionUnit/editBatch', params).then(res => {
|
|
|
this.$success({
|
|
|
title: '全部提交成功',
|
|
|
// JSX support
|
|
|
onOk: function() {
|
|
|
- localStorage.removeItem('lookPreview')
|
|
|
- window.close()
|
|
|
+ that.$router.replace('/autoLaunch/material-test')
|
|
|
+ that.$bus.$emit('remove', `/autoLaunch/lookPreview?id=${that.$route.query.id}`)
|
|
|
}
|
|
|
})
|
|
|
})
|