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
14bf5d40
Commit
14bf5d40
authored
May 26, 2021
by
liuchenxi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:触达效果
parent
254f2d0a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
48 deletions
+30
-48
touch-clue.vue
src/views/ecm/touch-clue.vue
+30
-48
No files found.
src/views/ecm/touch-clue.vue
View file @
14bf5d40
...
...
@@ -136,7 +136,6 @@ export default {
}
}
this
.
currentPage
=
1
;
this
.
tableExtra
=
[];
this
.
getTableFirstData
();
},
changeListTab
(
index
)
{
...
...
@@ -144,7 +143,7 @@ export default {
this
.
currentPage
=
1
;
this
.
$refs
.
table
.
clearSort
();
this
.
getTabData
();
this
.
getTable
List
();
this
.
getTable
FirstData
();
},
getMarketList
()
{
let
meth
;
...
...
@@ -196,7 +195,7 @@ export default {
formatter
(
row
)
{
if
(
!
row
.
groupName
)
return
'--'
;
else
if
(
row
.
groupName
==
'-1'
)
return
'【无归属门店】'
;
else
if
(
row
.
groupName
==
'合计'
||
row
.
groupName
==
'计划整体'
||
row
.
groupId
==
'-1'
)
return
row
.
groupName
;
else
if
(
row
.
groupName
==
'
区域
合计'
||
row
.
groupName
==
'计划整体'
||
row
.
groupId
==
'-1'
)
return
row
.
groupName
;
return
`<span style="color:#1890FF;cursor:pointer;" data-type="groupName">
${
row
.
groupName
}
</span>`
;
}
},
...
...
@@ -240,7 +239,7 @@ export default {
formatter
(
row
)
{
if
(
!
row
.
groupName
)
return
'--'
;
else
if
(
row
.
groupName
==
'-1'
)
return
'【无归属门店】'
;
else
if
(
row
.
groupName
==
'合计'
||
row
.
groupName
==
'计划整体'
||
row
.
groupId
==
'-1'
)
return
row
.
groupName
;
else
if
(
row
.
groupName
==
'
区域
合计'
||
row
.
groupName
==
'计划整体'
||
row
.
groupId
==
'-1'
)
return
row
.
groupName
;
return
`<span style="color:#1890FF;cursor:pointer;" data-type="groupName">
${
row
.
groupName
}
</span>`
;
}
},
...
...
@@ -280,34 +279,24 @@ export default {
meth
(
params
).
then
(
res
=>
{
this
.
tableList
=
[];
if
(
!
res
.
result
.
result
||
!
res
.
result
.
result
.
length
)
return
;
if
(
this
.
currentPage
==
1
&&
this
.
listTabsIndex
!=
0
)
{
// 任务完成情况无表头,且只在第一页获取
// 拼接表头数据
if
(
this
.
currentPage
==
1
)
{
let
resetArr
=
[];
this
.
tableExtra
.
forEach
(
item
=>
{
if
(
item
.
groupName
==
'合计'
)
resetArr
[
0
]
=
item
;
else
resetArr
[
1
]
=
item
;
if
(
item
.
groupName
==
'
区域
合计'
)
resetArr
[
0
]
=
item
;
else
if
(
item
.
groupName
==
'计划整体'
&&
this
.
level
<
2
)
resetArr
[
1
]
=
item
;
});
res
.
result
.
result
&&
(
this
.
tableList
=
resetArr
.
concat
(
res
.
result
.
result
));
}
else
{
this
.
tableList
=
res
.
result
.
result
;
}
this
.
total
=
res
.
result
.
totalCount
;
this
.
loading
=
false
;
});
this
.
getTableHeader
();
},
// 获取tab切换数据
getTabData
()
{
getTabList
({
ecmPlanId
:
this
.
$route
.
query
.
id
,
type
:
this
.
listTabsIndex
}).
then
(
res
=>
{
let
tab
=
res
.
result
||
[];
if
(
this
.
listTabsIndex
==
0
)
this
.
taskTabs
=
[{
name
:
'合计'
,
id
:
0
},
...
tab
];
else
this
.
touchTabs
=
[{
name
:
'整体转化'
,
id
:
0
},
...
tab
];
});
},
// 获取合计的行数据
getTableFirstData
()
{
let
meth
;
let
params
=
{
ecmPlanId
:
this
.
$route
.
query
.
id
,
pageSize
:
this
.
pageSize
,
pageNum
:
this
.
pageNum
,
storeGroupId
:
this
.
storeGroupId
,
level
:
this
.
level
};
let
params
=
{
ecmPlanId
:
this
.
$route
.
query
.
id
,
pageSize
:
this
.
pageSize
,
pageNum
:
this
.
currentPage
,
storeGroupId
:
this
.
storeGroupId
,
level
:
this
.
level
};
if
(
this
.
type
==
2
)
{
meth
=
ecmHeadCluesTaskTabHead
;
// 后台线索计划整体接口
}
else
{
...
...
@@ -319,30 +308,30 @@ export default {
params
.
touchTypes
=
this
.
tabsIndex
;
}
}
else
{
// 这里拿获取任务列表的表头.............
meth
=
ecmGuideCluesTaskTableHead
;
meth
=
ecmGuideCluesTaskTableHead
;
// 任务完成情况表头
if
(
this
.
taskTabIndex
!=
0
)
params
.
taskType
=
this
.
taskTabIndex
;
}
}
meth
(
params
).
then
(
res
=>
{
let
data
=
res
.
result
||
{};
console
.
log
(
data
);
// data.groupName = this.type == 2 ? '计划整体' : '合计'; // 第一期导购线索表格显示合计信息,后台线索表格展示计划整体
// this.tableExtra = data;
let
arr
=
[];
for
(
let
key
in
data
)
{
data
[
key
]
=
data
[
key
]
||
{};
data
[
key
].
groupName
=
key
==
'thisCalc'
?
'区域合计'
:
'计划整体'
;
arr
.
push
(
data
[
key
]);
}
this
.
tableExtra
=
arr
;
this
.
getTableList
();
});
},
// 获取计划整体的行数据
// getSecondSecondData() {
// // 需要判断 后台是1导购线索的计划整体接口,还是2后台线索的合计接口------------------------------------
// let meth;
// let params = { ecmPlanId: this.$route.query.id };
// meth = ecmGuideCluesTouchEffectTabTotalHead1;
// meth(params).then(res => {
// let data = res.result || {};
// data.groupName = this.type == 2 ? '合计' : '计划整体'; // 第二期导购线索添加计划整体信息,后台线索添加合计信息
// this.tableExtra.push(data);
// });
// },
// 获取tab切换数据
getTabData
()
{
getTabList
({
ecmPlanId
:
this
.
$route
.
query
.
id
,
type
:
this
.
listTabsIndex
}).
then
(
res
=>
{
let
tab
=
res
.
result
||
[];
if
(
this
.
listTabsIndex
==
0
)
this
.
taskTabs
=
[{
name
:
'合计'
,
id
:
0
},
...
tab
];
else
this
.
touchTabs
=
[{
name
:
'整体转化'
,
id
:
0
},
...
tab
];
});
},
sortChange
(
column
)
{
let
prop
=
column
.
prop
;
let
orderby
=
column
.
order
;
...
...
@@ -360,20 +349,14 @@ export default {
let
params
=
{
level
:
node
.
level
,
storeGroupId
:
node
.
data
?
node
.
data
.
storeGroupId
:
null
};
this
.
level
=
node
.
level
;
this
.
storeGroupId
=
node
.
data
?
node
.
data
.
storeGroupId
:
null
;
this
.
tableExtra
=
[];
if
(
node
.
level
===
0
)
{
let
allStore
=
await
getGroupTree
(
params
);
this
.
allStoreId
.
push
(
allStore
.
result
[
0
].
storeGroupId
);
// 设置默认展开所有门店的叶子节点
this
.
$nextTick
(()
=>
this
.
$refs
.
treeList
.
setCurrentKey
(
this
.
allStoreId
[
0
]));
// 设置树默认高亮结点
return
resolve
(
allStore
.
result
||
[]);
}
if
(
node
.
level
==
1
)
{
// 默认加载
// this.getSecondSecondData();
this
.
getTableFirstData
();
}
if
(
node
.
level
==
1
)
this
.
getTableFirstData
();
let
otherArea
=
await
getGroupTree
(
params
);
this
.
currentPage
=
1
;
return
resolve
(
otherArea
.
result
||
[]);
},
// 点击表格映射到树结构
...
...
@@ -383,19 +366,18 @@ export default {
this
.
currentPage
=
1
;
this
.
level
=
row
.
level
;
this
.
storeGroupId
=
row
.
groupId
;
this
.
tableExtra
=
[];
this
.
$refs
.
treeList
.
setCurrentKey
(
row
.
groupId
);
this
.
allStoreId
.
push
(
row
.
groupId
);
//
this.getTableFirstData();
this
.
getTableFirstData
();
setTimeout
(()
=>
this
.
allStoreId
.
splice
(
this
.
allStoreId
.
length
-
1
,
1
));
// 点击表格添加进树结构展开组的要删除掉,否则下次展开树结构会直接加载到对应的叶子结点
}
},
refreshLazyTree
(
data
)
{
if
(
data
.
storeGroupId
==
this
.
storeGroupId
)
return
;
this
.
level
=
data
.
level
;
this
.
storeGroupId
=
data
.
storeGroupId
;
this
.
tableExtra
=
[];
// if (data.level == 1) this.getSecondSecondData();
// this.getTableFirstData();
this
.
currentPage
=
1
;
this
.
getTableFirstData
();
},
// 导出表格数据
cdkeyExport
()
{
...
...
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