|
@@ -117,173 +117,180 @@ li.chouzhen.first:before {
|
|
|
<template>
|
|
|
<div ref="questionnaireBox" class="look-preview">
|
|
|
<div style="width: 100%;" class="chartBox">
|
|
|
- <a-card>
|
|
|
- <div slot="title">
|
|
|
- 预览区
|
|
|
- </div>
|
|
|
- <div slot="extra">
|
|
|
- 预估生成<span style="color: #409EFF">{{ groupCount }}</span
|
|
|
- >个广告组
|
|
|
- <a-button type="primary" style="margin: 0 15px" @click="createAll" :disabled="groupCount == 0">
|
|
|
- 全部提交审核
|
|
|
- </a-button>
|
|
|
- </div>
|
|
|
- <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">
|
|
|
- <template slot="title">
|
|
|
- <h2 style="display: flex; justify-content: space-between;width: 100%">
|
|
|
- <span>账户id:{{ item.accountId }}</span
|
|
|
- ><span style="font-size: 14px; font-weight: 500"
|
|
|
- >广告计划数量:{{ item.campaignCount }} 广告组数量:{{
|
|
|
- groupCount
|
|
|
- }}</span
|
|
|
- >
|
|
|
- <div>
|
|
|
- <a-popconfirm
|
|
|
- :title="`确定要删除这 ${groupCheck.length} 项吗?`"
|
|
|
- @confirm="handleConfirmDelete"
|
|
|
+ <a-spin :spinning="spinning">
|
|
|
+ <a-card>
|
|
|
+ <div slot="title">
|
|
|
+ 预览区
|
|
|
+ </div>
|
|
|
+ <div slot="extra">
|
|
|
+ 预估生成<span style="color: #409EFF">{{ groupCount }}</span
|
|
|
+ >个广告组
|
|
|
+ <a-button type="primary" style="margin: 0 15px" @click="createAll" :disabled="groupCount == 0">
|
|
|
+ 全部提交审核
|
|
|
+ </a-button>
|
|
|
+ </div>
|
|
|
+ <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">
|
|
|
+ <template slot="title">
|
|
|
+ <h2 style="display: flex; justify-content: space-between;width: 100%">
|
|
|
+ <span>账户id:{{ item.accountId }}</span
|
|
|
+ ><span style="font-size: 14px; font-weight: 500"
|
|
|
+ >广告计划数量:{{
|
|
|
+ item.campaignCount
|
|
|
+ }} 广告组数量:{{ item.unitCount }}</span
|
|
|
>
|
|
|
- <a-button style="margin: 0 15px" :disabled="groupCheck.length == 0">
|
|
|
- 批量删除广告组
|
|
|
- </a-button>
|
|
|
- </a-popconfirm>
|
|
|
+ <div>
|
|
|
+ <a-popconfirm
|
|
|
+ :title="`确定要删除这 ${groupCheck.length} 项吗?`"
|
|
|
+ @confirm="handleConfirmDelete"
|
|
|
+ >
|
|
|
+ <a-button style="margin: 0 15px" :disabled="groupCheck.length == 0">
|
|
|
+ 批量删除广告组
|
|
|
+ </a-button>
|
|
|
+ </a-popconfirm>
|
|
|
|
|
|
- <a-button
|
|
|
- type="primary"
|
|
|
- style="margin: 0 15px"
|
|
|
- :disabled="groupCheck.length == 0"
|
|
|
- @click="createArr"
|
|
|
+ <a-button
|
|
|
+ type="primary"
|
|
|
+ style="margin: 0 15px"
|
|
|
+ :disabled="groupCheck.length == 0"
|
|
|
+ @click="createArr"
|
|
|
+ >
|
|
|
+ 提交审核
|
|
|
+ </a-button>
|
|
|
+ </div>
|
|
|
+ </h2>
|
|
|
+ </template>
|
|
|
+ <div v-for="(items, indexUnit) in item.campaignInfo" :key="indexUnit">
|
|
|
+ <h3 style="display: flex; justify-content: space-between; width: 113%">
|
|
|
+ <span
|
|
|
+ style="flex:1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap"
|
|
|
+ >广告计划:{{ items.campaignName }}</span
|
|
|
>
|
|
|
- 提交审核
|
|
|
- </a-button>
|
|
|
- </div>
|
|
|
- </h2>
|
|
|
- </template>
|
|
|
- <div v-for="(items, indexUnit) in item.campaignInfo" :key="indexUnit">
|
|
|
- <h3 style="display: flex; justify-content: space-between; width: 113%">
|
|
|
- <span style="flex:1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap"
|
|
|
- >广告计划:{{ items.campaignName }}</span
|
|
|
- >
|
|
|
- <span style="flex:1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap"
|
|
|
- >营销目标:{{
|
|
|
- items.campaignType == 2 ? '提升应用安装' : '收集销售线索'
|
|
|
- }}</span
|
|
|
- >
|
|
|
- <span style="flex:1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap"
|
|
|
- >预算:{{
|
|
|
- items.dayBudget
|
|
|
- ? items.dayBudget / 1000 + '元'
|
|
|
- : '不限'
|
|
|
- }}</span
|
|
|
+ <span
|
|
|
+ style="flex:1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap"
|
|
|
+ >营销目标:{{
|
|
|
+ items.campaignType == 2 ? '提升应用安装' : '收集销售线索'
|
|
|
+ }}</span
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ style="flex:1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap"
|
|
|
+ >预算:{{ items.dayBudget ? items.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="items.unitDetail"
|
|
|
+ class="components-table-demo-nested"
|
|
|
+ :pagination="false"
|
|
|
+ bordered
|
|
|
+ tableLayout="fixed"
|
|
|
+ :row-selection="{ selectedRowKeys: groupCheck, onChange: onSelectChange }"
|
|
|
+ rowKey="id"
|
|
|
>
|
|
|
- <!-- <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="items.unitDetail"
|
|
|
- class="components-table-demo-nested"
|
|
|
- :pagination="false"
|
|
|
- bordered
|
|
|
- tableLayout="fixed"
|
|
|
- :row-selection="{ selectedRowKeys: groupCheck, onChange: onSelectChange }"
|
|
|
- rowKey="id"
|
|
|
- >
|
|
|
- <span slot="unitName" slot-scope="text, records">
|
|
|
- <p style="text-align: left">
|
|
|
- {{ text }}
|
|
|
- </p>
|
|
|
- </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="dayBudget" slot-scope="text, records">
|
|
|
- <p>
|
|
|
- 预算:{{
|
|
|
- records.dayBudget || records.dayBudget > 0
|
|
|
- ? records.dayBudget / 1000 + '元'
|
|
|
- : '不限'
|
|
|
- }}
|
|
|
- </p>
|
|
|
- <p>
|
|
|
- 出价:{{
|
|
|
- records.bid
|
|
|
- ? records.bid / 1000
|
|
|
- : records.cpaBid
|
|
|
- ? records.cpaBid / 1000
|
|
|
- : ''
|
|
|
- }}元
|
|
|
- </p>
|
|
|
- <p v-if="records.deepConversionType">
|
|
|
- 深度转化出价:{{
|
|
|
- records.deepConversionBid ? records.deepConversionBid / 1000 : '无'
|
|
|
- }}
|
|
|
- </p>
|
|
|
- </span>
|
|
|
+ <span slot="unitName" slot-scope="text, records">
|
|
|
+ <p style="text-align: left">
|
|
|
+ {{ text }}
|
|
|
+ </p>
|
|
|
+ </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>
|
|
|
+ <!-- JSON.parse(records.agesRange)[0] | ageShow -->
|
|
|
+ <span v-if="records.ageGroupName">{{ records.ageGroupName }}</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="dayBudget" slot-scope="text, records">
|
|
|
+ <p>
|
|
|
+ 预算:{{
|
|
|
+ records.dayBudget || records.dayBudget > 0
|
|
|
+ ? records.dayBudget / 1000 + '元'
|
|
|
+ : '不限'
|
|
|
+ }}
|
|
|
+ </p>
|
|
|
+ <p>
|
|
|
+ 出价:{{
|
|
|
+ records.bid
|
|
|
+ ? records.bid / 1000
|
|
|
+ : records.cpaBid
|
|
|
+ ? records.cpaBid / 1000
|
|
|
+ : ''
|
|
|
+ }}元
|
|
|
+ </p>
|
|
|
+ <p v-if="records.deepConversionType">
|
|
|
+ 深度转化出价:{{
|
|
|
+ records.deepConversionBid ? records.deepConversionBid / 1000 : '无'
|
|
|
+ }}
|
|
|
+ </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>
|
|
|
- </span>
|
|
|
- </a-table>
|
|
|
- </div>
|
|
|
- </el-collapse-item>
|
|
|
- </el-collapse>
|
|
|
- </div>
|
|
|
- </a-card>
|
|
|
+ <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>
|
|
|
+ </span>
|
|
|
+ </a-table>
|
|
|
+ </div>
|
|
|
+ </el-collapse-item>
|
|
|
+ </el-collapse>
|
|
|
+ </div>
|
|
|
+ </a-card>
|
|
|
+ </a-spin>
|
|
|
<a-modal
|
|
|
- title="选择素材"
|
|
|
+ title="查看创意"
|
|
|
:width="1000"
|
|
|
v-if="creativeVisible"
|
|
|
:visible="creativeVisible"
|
|
@@ -413,6 +420,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ spinning:false,
|
|
|
fieldNames: {
|
|
|
label: 'category_name',
|
|
|
value: 'category_id',
|
|
@@ -570,86 +578,90 @@ export default {
|
|
|
methods: {
|
|
|
setItemDate(external_binary) {
|
|
|
//初始化周数数组
|
|
|
- var time_week_arr = []
|
|
|
+ if (external_binary) {
|
|
|
+ var time_week_arr = []
|
|
|
|
|
|
- var date_html = ''
|
|
|
- var binary = external_binary
|
|
|
+ var date_html = ''
|
|
|
+ var binary = external_binary
|
|
|
|
|
|
- for (var y = 0; y < 7; y++) {
|
|
|
- //初始化小时数组
|
|
|
- var time_hour_arr = []
|
|
|
+ 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)
|
|
|
+ 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 (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) {
|
|
|
- //选中行里第二个,上一个表格已选中,前加-号,后加逗号
|
|
|
+ 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 - 1] = '-' + arr_hour[x] + ', '
|
|
|
+ //选中的后一已选中,此次选中的元素不加逗号
|
|
|
+ time_hour_arr[time_hour_arr.length] = 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]
|
|
|
- }
|
|
|
+ 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)
|
|
|
+ if (time_html[y]) {
|
|
|
+ time_html[y] = time_html[y].substring(0, time_html[y].length - 1)
|
|
|
|
|
|
- date_html += '星期' + num[y] + ' (' + time_html[y] + ')' + ', '
|
|
|
+ date_html += '星期' + num[y] + ' (' + time_html[y] + ')' + ', '
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- if (external_binary) {
|
|
|
- return date_html
|
|
|
+ if (external_binary) {
|
|
|
+ return date_html
|
|
|
+ }
|
|
|
+ // console.info(time_html);
|
|
|
+ } else {
|
|
|
+ return '不限'
|
|
|
}
|
|
|
- // console.info(time_html);
|
|
|
},
|
|
|
next() {
|
|
|
closeAllVideoFun()
|
|
@@ -700,14 +712,22 @@ export default {
|
|
|
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}`)
|
|
|
- }
|
|
|
- })
|
|
|
+ let num = 0
|
|
|
+ for (let i = 0; i < this.campaignList.length; i++) {
|
|
|
+ num += this.campaignList[i].campaignInfo.length
|
|
|
+ }
|
|
|
+ if (num == 0) {
|
|
|
+ this.$success({
|
|
|
+ title: '全部提交成功',
|
|
|
+ // JSX support
|
|
|
+ onOk: function() {
|
|
|
+ that.$router.replace('/autoLaunch/material-test')
|
|
|
+ that.$bus.$emit('remove', `/autoLaunch/lookPreview?id=${that.$route.query.id}`)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.getPreviewList()
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
setAll(item) {
|
|
@@ -787,6 +807,7 @@ export default {
|
|
|
},
|
|
|
|
|
|
getPreviewList() {
|
|
|
+ this.spinning = true
|
|
|
this.getAction('/dimension/kuaiShouDimensionUnit/previewByStrategyId', {
|
|
|
strategyId: this.$route.query.id
|
|
|
}).then(res => {
|
|
@@ -799,15 +820,18 @@ export default {
|
|
|
if (result.success) {
|
|
|
//console.log(res)
|
|
|
this.createOptions = result.result
|
|
|
+ this.spinning = false
|
|
|
}
|
|
|
})
|
|
|
} else {
|
|
|
this.$message.error('没有可预览的值')
|
|
|
+ this.spinning = false
|
|
|
}
|
|
|
|
|
|
// this.activeName = this.campaignList[0].id
|
|
|
} else {
|
|
|
this.$message.error('网络开小差了,请刷新后重试')
|
|
|
+ this.spinning = false
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -1083,8 +1107,10 @@ export default {
|
|
|
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)
|
|
|
+ for (let j = 0; j < this.campaignList[i].campaignInfo.length; j++) {
|
|
|
+ for (let o = 0; o < this.campaignList[i].campaignInfo[j].unitDetail.length; o++) {
|
|
|
+ groupIds.push(this.campaignList[i].campaignInfo[j].unitDetail[o].id)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
var params = {}
|