Commit 480d8541 by 黑潮

Merge branch 'feature/销售线索' of http://115.159.76.241/marketing-web/marketing into feature/销售线索

parents f3887a3b 3decc754
......@@ -343,6 +343,7 @@ export default {
this.getTableList();
},
storeChange(val) {
this.isAdd = false;
this.uuid = val;
this.getTableList();
}
......
<template>
<div class="content">
<div class="top" v-if="!isCluePage">
<div class="left">计划:踏青特惠</div>
<div class="left">计划:{{ $route.query.name }}</div>
<div class="right" v-if="isRepeat">批次合计:{{ batchNum }} / 最新批次时间:{{ batchTimes }}</div>
</div>
<div class="middle" v-for="(item, index) in data" :key="index">
......
......@@ -117,8 +117,20 @@ export default {
},
getFunnelData() {
ecmTouchEffectFunnelChart({ ecmPlanId: this.ecmPlanId }).then(res => {
this.funnelData = this.formatFunnelData(res.result);
this.clueRate = res.result.map(item => {
let checkData = res.result.map(item => {
if (!item || !Object.keys(item).length) {
// 是否为空对象或者不存在
item = { 转化人数: 'null', 线索转化收益: 'null', 触达人数: 'null', 计划触达人数: 'null' };
} else {
// 存在,将不存在的值 null 0 undefined转为字符串
for (let key in item) {
if (!item[key]) item[key] = item[key] + '';
}
}
return item;
});
this.funnelData = this.formatFunnelData(checkData);
this.clueRate = checkData.map(item => {
if (item.线索转化收益 && parseFloat(item.线索转化收益)) {
item = parseFloat(item.线索转化收益).toFixed(2);
let i = item.indexOf('.');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment