Commit 3decc754 by liuchenxi

update:触达效果

parent 61fdac5b
......@@ -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