Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
marketing
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
marketing-web
marketing
Commits
4e09631e
Commit
4e09631e
authored
Apr 30, 2021
by
liuchenxi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:触达效果
parent
1a168cc0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
30 deletions
+37
-30
touch-clue.vue
src/views/ecm/touch-clue.vue
+33
-27
touch-charts.vue
src/views/ecm/touch-components/touch-charts.vue
+4
-3
No files found.
src/views/ecm/touch-clue.vue
View file @
4e09631e
...
...
@@ -33,7 +33,8 @@
</template>
<
script
>
import
{
ecmGuideCluesTable
,
ecmHeadCluesTaskTab
,
ecmHeadGuideCluesTable
,
ecmHeadCluesTaskTabHead
,
ecmGuideCluesTouchEffectTabTotalHead1
,
ecmGuideCluesTaskTable
,
ecmGuideCluesTouchEffectTotalTab
,
ecmGuideCluesTouchEffectTabTotalHead
,
ecmGuideCluesTouchEffectTab
,
ecmGuideCluesTouchEffectTabHead
}
from
'@/service/api/ecmApi.js'
;
// ecmGuideCluesTouchEffectTabTotalHead1
import
{
ecmGuideCluesTable
,
ecmHeadCluesTaskTab
,
ecmHeadGuideCluesTable
,
ecmHeadCluesTaskTabHead
,
ecmGuideCluesTaskTable
,
ecmGuideCluesTouchEffectTotalTab
,
ecmGuideCluesTouchEffectTabTotalHead
,
ecmGuideCluesTouchEffectTab
,
ecmGuideCluesTouchEffectTabHead
}
from
'@/service/api/ecmApi.js'
;
import
marketList
from
'@/views/ecm/touch-components/market-list.vue'
;
import
touchCharts
from
'@/views/ecm/touch-components/touch-charts.vue'
;
export
default
{
...
...
@@ -105,7 +106,7 @@ export default {
pageSize
:
20
,
total
:
0
,
tableFirstData
:
{},
headClueTableFirstData
:
[],
// 后台线索的表头
// headClueTableFirstData: [], // 后台线索的表头第一期不做两个
touchOrderBy
:
''
,
taskOrderBy
:
''
,
uuid
:
''
,
// 新增传空,编辑必传,
...
...
@@ -121,13 +122,14 @@ export default {
this
.
type
=
this
.
$route
.
query
.
type
;
this
.
getMarketList
();
if
(
this
.
type
==
2
)
{
this
.
getTableFirstData
();
this
.
getTableFirstData
(
true
);
// 后台线索调第二个表头接口
//
this.getTableFirstData();
// this.getTableFirstData(true); // 后台线索调第二个表头接口,第一期不做
name
=
'后台线索'
;
}
else
{
name
=
'导购线索'
;
this
.
getTableFirstData
();
//
this.getTableFirstData();
}
this
.
getTableFirstData
();
this
.
$store
.
commit
(
'mutations_breadcrumb'
,
[{
name
:
'营销管理'
,
path
:
''
},
{
name
:
'智能营销'
,
path
:
'/ecm'
},
{
name
:
`
${
planName
}
- 触达效果`
,
path
:
`/ecm/touch/
${
planId
}
?name=
${
planName
}
`
},
{
name
}]);
// eslint-disable-line
},
methods
:
{
...
...
@@ -275,14 +277,15 @@ export default {
if
(
this
.
currentPage
==
1
&&
this
.
listTabsIndex
!=
0
)
{
// 任务完成情况无表头
let
resetArr
=
[];
if
(
this
.
type
==
2
)
{
this
.
headClueTableFirstData
.
forEach
(
item
=>
{
if
(
item
.
storeName
==
'区域合计'
)
resetArr
[
1
]
=
item
;
else
if
(
item
.
storeName
==
'计划整体'
)
resetArr
[
0
]
=
item
;
});
}
else
{
resetArr
[
0
]
=
this
.
tableFirstData
;
}
// if (this.type == 2) {
// this.headClueTableFirstData.forEach(item => {
// if (item.storeName == '区域合计') resetArr[1] = item;
// else if (item.storeName == '计划整体') resetArr[0] = item;
// });
// } else {
// resetArr[0] = this.tableFirstData;
// }
resetArr
[
0
]
=
this
.
tableFirstData
;
res
.
result
.
result
&&
(
this
.
tableList
=
resetArr
.
concat
(
res
.
result
.
result
));
}
else
{
this
.
tableList
=
res
.
result
.
result
;
...
...
@@ -297,10 +300,11 @@ export default {
let
params
=
{
ecmPlanId
:
this
.
$route
.
query
.
id
};
if
(
this
.
type
==
2
)
{
// 后台线索 要调两个表头接口
if
(
head2
)
{
this
.
isHeade2
=
true
;
meth
=
ecmGuideCluesTouchEffectTabTotalHead1
;
}
else
meth
=
ecmHeadCluesTaskTabHead
;
// if (head2) {
// this.isHeade2 = true;
// meth = ecmGuideCluesTouchEffectTabTotalHead1;
// } else meth = ecmHeadCluesTaskTabHead;
meth
=
ecmHeadCluesTaskTabHead
;
}
else
{
if
(
this
.
listTabsIndex
==
1
)
{
if
(
this
.
tabsIndex
==
0
)
{
...
...
@@ -317,17 +321,19 @@ export default {
meth
(
params
).
then
(
res
=>
{
let
data
=
res
.
result
;
data
.
storeName
=
'合计'
;
if
(
this
.
type
==
2
&&
!
head2
)
{
data
.
storeName
=
'计划整体'
;
}
else
if
(
this
.
type
==
2
&&
head2
)
{
data
.
storeName
=
'区域合计'
;
}
if
(
this
.
type
==
2
)
data
.
storeName
=
'计划整体'
;
// if (this.type == 2 && !head2) {
// data.storeName = '计划整体';
// } else if (this.type == 2 && head2) {
// data.storeName = '区域合计';
// }
this
.
tableFirstData
=
data
;
if
(
this
.
type
==
2
)
{
this
.
headClueTableFirstData
.
push
(
data
);
}
if
(
this
.
type
==
2
&&
head2
)
this
.
getTableList
();
else
if
(
this
.
type
==
1
)
this
.
getTableList
();
// if (this.type == 2) {
// this.headClueTableFirstData.push(data);
// }
// if (this.type == 2 && head2) this.getTableList();
// else if (this.type == 1) this.getTableList();
this
.
getTableList
();
});
},
sortChange
(
column
)
{
...
...
src/views/ecm/touch-components/touch-charts.vue
View file @
4e09631e
...
...
@@ -27,6 +27,7 @@ export default {
methods
:
{
draw
()
{
this
.
chartData
=
this
.
formatterData
(
this
.
chartData
);
console
.
log
(
this
.
chartData
);
let
valueArr
=
this
.
chartData
.
filter
(
item
=>
item
.
value
>=
0
);
let
rateArr
=
this
.
chartData
.
filter
(
item
=>
item
.
rate
>=
0
);
let
valueFlag
=
valueArr
.
every
(
item
=>
item
.
value
==
0
);
// value是否出现全为0的情况
...
...
@@ -123,10 +124,10 @@ export default {
}
else
{
this
.
chartData
=
res
.
result
.
map
(
item
=>
{
if
(
item
.
name
==
'线索转化收益'
)
{
item
.
rate
=
item
.
vaule
*
1
;
item
.
rate
=
item
.
vaule
?
parseFloat
(
item
.
vaule
)
:
0
;
delete
item
.
vaule
;
}
else
{
item
.
value
=
item
.
vaule
*
1
;
item
.
value
=
item
.
vaule
?
item
.
vaule
*
1
:
0
;
delete
item
.
vaule
;
}
return
item
;
...
...
@@ -158,7 +159,7 @@ export default {
chartData
.
forEach
(
item
=>
{
dateArr
.
forEach
(
el
=>
{
if
(
item
.
date
==
el
.
date
&&
item
.
name
==
el
.
name
)
{
if
(
el
.
name
==
'线索转化收益'
)
el
.
rate
=
item
.
rate
.
toFixed
(
2
)
;
if
(
el
.
name
==
'线索转化收益'
)
el
.
rate
=
item
.
rate
;
else
el
.
value
=
item
.
value
;
}
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment