|
@@ -107,7 +107,7 @@
|
|
|
<div
|
|
|
class="accountIndexEchart"
|
|
|
id="accountIndexEchart"
|
|
|
- style='width:100%;height:150px;margin:0 auto;'
|
|
|
+ style="width:100%;height:150px;margin:0 auto;"
|
|
|
ref="accountIndexEchart"
|
|
|
>
|
|
|
<a-empty/>
|
|
@@ -165,7 +165,7 @@
|
|
|
:scroll="{x: 1500}"
|
|
|
>
|
|
|
<span slot="conver" slot-scope="text, record">
|
|
|
- <span v-if="record.cpaBid < text" style="color: #f00;">{{ text }}</span>
|
|
|
+ <span v-if="Number(record.cpaBid) < Number(text)" style="color: #f00;">{{ text }}</span>
|
|
|
<span v-else>{{ text }}</span>
|
|
|
</span>
|
|
|
<span slot="optStatus" slot-scope="text, record">
|
|
@@ -265,7 +265,7 @@
|
|
|
</a-col>
|
|
|
<a-col :span="16">
|
|
|
<a-select
|
|
|
- style="width: 240px;"
|
|
|
+ style="width: 320px;"
|
|
|
v-model="adAudiencePackageId"
|
|
|
allow-clear
|
|
|
placeholder="请选择已有定向包名称"
|
|
@@ -275,7 +275,10 @@
|
|
|
:key="index"
|
|
|
:value="item.audience_package_id"
|
|
|
>
|
|
|
- {{ item.name }}
|
|
|
+ <div class="orient-list">
|
|
|
+ <span class="orient-option-left" style="display: inline-block;width: 150px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">{{ item.name }}</span>
|
|
|
+ <span class="orient-option-right" style="display: inline-block;width: 150px;text-align:right;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">{{ item.changeName }}</span>
|
|
|
+ </div>
|
|
|
</a-select-option>
|
|
|
</a-select>
|
|
|
</a-col>
|
|
@@ -353,7 +356,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- adAudiencePackageId: '',
|
|
|
+ adAudiencePackageId: undefined,
|
|
|
planRangePicker: [],
|
|
|
labelCol: {span: 4},
|
|
|
wrapperCol: {span: 14},
|
|
@@ -430,6 +433,7 @@ export default {
|
|
|
dataIndex: 'adName',
|
|
|
key: 'adName',
|
|
|
align: 'center',
|
|
|
+ fixed: 'left',
|
|
|
width: 240
|
|
|
},
|
|
|
{
|
|
@@ -438,7 +442,7 @@ export default {
|
|
|
key: 'costStr',
|
|
|
align: 'center',
|
|
|
width: 180,
|
|
|
- sorter: (a, b) => a.cost - b.cost
|
|
|
+ sorter: (a, b) => a.costStr - b.costStr
|
|
|
},
|
|
|
{
|
|
|
title: '出价',
|
|
@@ -653,6 +657,44 @@ export default {
|
|
|
materialSortCode: 'charge',
|
|
|
materialSortType: 'DESC',
|
|
|
directionalList: [],
|
|
|
+ promotionTypeList: [
|
|
|
+ {
|
|
|
+ value: 'EXTERNAL',
|
|
|
+ label: '落地页'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 'ARTICLE',
|
|
|
+ label: '文章推广'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 'GOODS',
|
|
|
+ label: '商品推广'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 'DPA',
|
|
|
+ label: '商品目录'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 'STORE',
|
|
|
+ label: '门店推广'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 'AWEME',
|
|
|
+ label: '抖音号推广'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 'SHOP',
|
|
|
+ label: '店铺直投'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 'APP_ANDROID',
|
|
|
+ label: '应用下载-安卓'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 'APP_IOS',
|
|
|
+ label: '应用下载-IOS'
|
|
|
+ }
|
|
|
+ ],
|
|
|
selectDirectionalId: undefined,
|
|
|
topAccountMsg: {},
|
|
|
topCostList: {},
|
|
@@ -676,7 +718,15 @@ export default {
|
|
|
getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getAdAudiencePackage', {accountId: account})
|
|
|
.then(result => {
|
|
|
if (result.code === 0) {
|
|
|
- this.selectiveList = result.result || [];
|
|
|
+ const defaultList = result.result;
|
|
|
+ this.promotionTypeList.forEach(item => {
|
|
|
+ defaultList.forEach(val => {
|
|
|
+ if (val.landing_type === item.value) {
|
|
|
+ val.changeName = item.label;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ this.selectiveList = defaultList;
|
|
|
}
|
|
|
else {
|
|
|
this.$message.error(result.message);
|
|
@@ -734,13 +784,13 @@ export default {
|
|
|
if (valid) {
|
|
|
const paramsData = {
|
|
|
adId: this.currentUnit.adId,
|
|
|
- bid: this.budgetForm.budget,
|
|
|
+ cpaBid: this.budgetForm.budget,
|
|
|
accountId: this.topCostList.account.accountId
|
|
|
};
|
|
|
- getAction(urlAcount + '/bytedance-api/advertiser/bytedanceReportController/updateADBid', paramsData).then(result => {
|
|
|
+ getAction(urlAcount + '/bytedance-api/advertiser/bytedanceReportController/updateADCpaBid', paramsData).then(result => {
|
|
|
if (result.code === 0) {
|
|
|
this.$message.success(result.message);
|
|
|
- this.budgetForm.budget = '';
|
|
|
+ this.budgetForm.budget = 0;
|
|
|
this.budgetVisible = false;
|
|
|
this.handleGetPlanTableList(this.topCostList);
|
|
|
}
|
|
@@ -759,7 +809,7 @@ export default {
|
|
|
},
|
|
|
// 调价修改取消按钮
|
|
|
handleBudgetCancel() {
|
|
|
- this.budgetForm.budget = '';
|
|
|
+ this.budgetForm.budget = 0;
|
|
|
this.budgetVisible = false;
|
|
|
},
|
|
|
// 调价修改确定按钮
|
|
@@ -891,6 +941,10 @@ export default {
|
|
|
},
|
|
|
// 修改定向的确定按钮
|
|
|
handleTargethandleOk() {
|
|
|
+ if (!this.adAudiencePackageId) {
|
|
|
+ this.$message.error('请选择定向包');
|
|
|
+ return;
|
|
|
+ }
|
|
|
const paramsData = {
|
|
|
accountId: this.topCostList.account.accountId,
|
|
|
adId: this.currentUnit.adId,
|
|
@@ -898,7 +952,7 @@ export default {
|
|
|
};
|
|
|
getAction(urlAcount + '/bytedance-api/advertiser/bytedanceReportController/updateADAudiencePackage', paramsData).then(result => {
|
|
|
if (result.code === 0) {
|
|
|
- this.adAudiencePackageId = '';
|
|
|
+ this.adAudiencePackageId = undefined;
|
|
|
this.targetVisible = false;
|
|
|
this.$message.success(result.message);
|
|
|
this.handleGetPlanTableList(this.topCostList);
|
|
@@ -912,7 +966,7 @@ export default {
|
|
|
},
|
|
|
// 修改定向的取消按钮
|
|
|
handleTargethandleCancel() {
|
|
|
- this.adAudiencePackageId = '';
|
|
|
+ this.adAudiencePackageId = undefined;
|
|
|
this.packageName = '';
|
|
|
this.targetVisible = false;
|
|
|
},
|
|
@@ -1031,8 +1085,8 @@ export default {
|
|
|
},
|
|
|
// 默认echarts
|
|
|
initAccountIndexEchart(data, type) {
|
|
|
- const LastX = data.lastMap.costList.map(item => item.time);
|
|
|
- const todayX = data.nowMap.costList.map(item => item.time);
|
|
|
+ const LastX = data.lastMap.costList.length ? data.lastMap.costList.map(item => item.time) : [];
|
|
|
+ const todayX = data.nowMap.costList.length ? data.nowMap.costList.map(item => item.time) : [];
|
|
|
let specialIdentification = '';
|
|
|
if (todayX.length && todayX[0].indexOf('-') !== -1) {
|
|
|
specialIdentification = '';
|
|
@@ -1043,24 +1097,24 @@ export default {
|
|
|
let tadayShowY = [];
|
|
|
let yestodayShowY = [];
|
|
|
if (type === 'spendCost') {
|
|
|
- tadayShowY = data.nowMap.costList.map(item => item.cost);
|
|
|
- yestodayShowY = data.lastMap.costList.map(item => item.cost);
|
|
|
+ tadayShowY = data.nowMap.costList.length ? data.nowMap.costList.map(item => item.cost) : [];
|
|
|
+ yestodayShowY = data.lastMap.costList.length ? data.lastMap.costList.map(item => item.cost) : [];
|
|
|
}
|
|
|
else if (type === 'activationCost') {
|
|
|
- tadayShowY = data.nowMap.costList.map(item => item.conver);
|
|
|
- yestodayShowY = data.lastMap.costList.map(item => item.conver);
|
|
|
+ tadayShowY = data.nowMap.costList.length ? data.nowMap.costList.map(item => item.conver) : [];
|
|
|
+ yestodayShowY = data.lastMap.costList.length ? data.lastMap.costList.map(item => item.conver) : [];
|
|
|
}
|
|
|
else if (type === 'activation') {
|
|
|
- tadayShowY = data.nowMap.costList.map(item => item.convertNum);
|
|
|
- yestodayShowY = data.lastMap.costList.map(item => item.convertNum);
|
|
|
+ tadayShowY = data.nowMap.costList.length ? data.nowMap.costList.map(item => item.convertNum) : [];
|
|
|
+ yestodayShowY = data.lastMap.costList.length ? data.lastMap.costList.map(item => item.convertNum) : [];
|
|
|
}
|
|
|
else if (type === 'bclick') {
|
|
|
- tadayShowY = data.nowMap.costList.map(item => item.converRate);
|
|
|
- yestodayShowY = data.lastMap.costList.map(item => item.converRate);
|
|
|
+ tadayShowY = data.nowMap.costList.length ? data.nowMap.costList.map(item => item.converRate) : [];
|
|
|
+ yestodayShowY = data.lastMap.costList.length ? data.lastMap.costList.map(item => item.converRate) : [];
|
|
|
}
|
|
|
else if (type === 'formCount') {
|
|
|
- tadayShowY = data.nowMap.costList.map(item => item.averageShow);
|
|
|
- yestodayShowY = data.lastMap.costList.map(item => item.averageShow);
|
|
|
+ tadayShowY = data.nowMap.costList.length ? data.nowMap.costList.map(item => item.averageShow) : [];
|
|
|
+ yestodayShowY = data.lastMap.costList.length ? data.lastMap.costList.map(item => item.averageShow) : [];
|
|
|
}
|
|
|
let option = {
|
|
|
tooltip: {
|
|
@@ -1185,8 +1239,8 @@ export default {
|
|
|
};
|
|
|
option.xAxis[0].data = todayX;
|
|
|
option.xAxis[1].data = LastX;
|
|
|
- option.series[0].name = data.nowMap.costList[0].statDatetime;
|
|
|
- option.series[1].name = data.lastMap.costList[0].statDatetime;
|
|
|
+ option.series[0].name = data.nowMap.costList.length ? data.nowMap.costList[0].statDatetime : '';
|
|
|
+ option.series[1].name = data.lastMap.costList.length ? data.lastMap.costList[0].statDatetime : '';
|
|
|
option.series[0].data = tadayShowY;
|
|
|
option.series[1].data = yestodayShowY;
|
|
|
return option;
|
|
@@ -1349,6 +1403,17 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss">
|
|
|
+ .orient-list {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ width: 260px;
|
|
|
+ .orient-option-left {
|
|
|
+ float: left;
|
|
|
+ }
|
|
|
+ .orient-option-right {
|
|
|
+ float: right;
|
|
|
+ }
|
|
|
+ }
|
|
|
.accountPage .accountBody {
|
|
|
line-height: 1;
|
|
|
.ant-input {
|