Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-risk-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.education.frontend
pica-risk-admin
提交
496acca8
提交
496acca8
编写于
12月 01, 2020
作者:
huangwensu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
test1问题修复
上级
32c862e4
变更
3
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
42 行增加
和
24 行删除
+42
-24
add-funnel.vue
src/views/user-path/add-funnel.vue
+13
-8
funnel-data.vue
src/views/user-path/funnel-data.vue
+26
-14
funnel.vue
src/views/user-path/funnel.vue
+3
-2
未找到文件。
src/views/user-path/add-funnel.vue
浏览文件 @
496acca8
...
...
@@ -46,7 +46,7 @@
<el-col
:span=
"11"
>
<el-form-item
label=
"触发事件"
>
<el-input
v-show=
"!showEvent
&& funnelId
"
v-show=
"!showEvent"
:class=
"
{'red-b': item.unchecked}"
@focus="getEventData"
v-model="item.eventName"
...
...
@@ -54,7 +54,7 @@
:title="item.eventName"
placeholder="请选择用户触发事件">
</el-input>
<el-select
v-show=
"
!funnelId ||
showEvent"
v-show=
"showEvent"
v-model=
"item.eventId"
filterable
placeholder=
"请选择用户触发事件"
...
...
@@ -148,11 +148,6 @@ export default {
res
=>
{
if
(
res
.
code
==
'000000'
)
{
this
.
searchParam
=
res
.
data
;
for
(
let
i
=
0
;
i
<
this
.
searchParam
.
actionModelList
.
length
;
i
++
)
{
if
(
!
this
.
searchParam
.
actionModelList
[
i
].
actionName
)
{
this
.
searchParam
.
actionModelList
[
i
].
actionName
=
this
.
searchParam
.
actionModelList
[
i
].
eventName
;
}
}
}
}
);
...
...
@@ -205,13 +200,23 @@ export default {
if
(
this
.
searchParam
.
actionModelList
[
i
].
nameCheck
||
this
.
searchParam
.
actionModelList
[
i
].
unchecked
)
{
// 有步骤名称重复
return
;
}
this
.
eventSelect
.
forEach
(
item
=>
{
if
(
this
.
searchParam
.
actionModelList
[
i
].
eventId
==
item
.
eventId
)
{
this
.
$set
(
this
.
searchParam
.
actionModelList
[
i
],
'eventName'
,
item
.
eventName
);
}
});
}
let
req
=
this
.
searchParam
;
for
(
let
i
=
0
;
i
<
req
.
actionModelList
.
length
;
i
++
)
{
if
(
!
req
.
actionModelList
[
i
].
actionName
)
{
req
.
actionModelList
[
i
].
actionName
=
req
.
actionModelList
[
i
].
eventName
;
}
}
this
.
getData
(
"post"
,
`/session/funnel/save`
,
req
,
res
=>
{
if
(
res
.
code
==
'000000'
)
{
this
.
$message
.
success
(
'转化漏斗
创建
成功'
);
this
.
$message
.
success
(
'转化漏斗
保存
成功'
);
this
.
$router
.
push
({
path
:
'path-data'
,
query
:
{
id
:
res
.
data
.
id
,
name
:
res
.
data
.
name
}
});
}
else
if
(
res
.
code
==
'227002'
||
res
.
code
==
'227003'
){
this
.
disabledSave
=
true
;
...
...
src/views/user-path/funnel-data.vue
浏览文件 @
496acca8
...
...
@@ -9,7 +9,7 @@
<el-row
:gutter=
"30"
class=
"row search"
type=
"flex"
style=
"margin-bottom:0;"
>
<el-form
ref=
"form"
:model=
"searchParam"
label-suffix=
":"
style=
"width:100%;"
>
<el-col
:span=
"10"
>
<el-form-item
label=
"时间"
>
<el-form-item
label=
"时间"
required
>
<el-date-picker
type=
"date"
placeholder=
"开始时间"
...
...
@@ -45,7 +45,7 @@
</el-col>
<el-col
:span=
"6"
style=
"padding:0;text-align:right;padding-right:15px;"
>
<el-button
type=
"default"
size=
"small"
@
click=
"reset"
>
重置
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"getAnalysisData"
>
筛选
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"getAnalysisData
(searchParam)
"
>
筛选
</el-button>
</el-col>
</el-form>
</el-row>
...
...
@@ -69,7 +69,7 @@
</div>
<div
class=
"data-analysis"
>
<div
class=
"map-title"
>
转化漏斗详情
</div>
<div
ref=
"chart"
class=
"echart"
></div>
<div
ref=
"chart"
class=
"echart"
:class=
"
{'eh': moreStep}"
>
</div>
<el-table
class=
"data-table"
:data=
"funnelData.funnelReportModels"
...
...
@@ -91,6 +91,7 @@ import { openLoading, closeLoading } from "../../common/utils";
export
default
{
data
()
{
return
{
moreStep
:
false
,
funnelId
:
''
,
name
:
''
,
searchParam
:
{
...
...
@@ -153,13 +154,17 @@ export default {
if
(
res
.
code
==
'000000'
)
{
this
.
versionSelect
=
res
.
data
;
this
.
searchParam
.
version
=
this
.
versionSelect
[
0
];
this
.
getAnalysisData
(
this
.
searchParam
)
this
.
getAnalysisData
(
this
.
searchParam
)
;
}
}
);
},
// 获取漏斗分析数据
getAnalysisData
(
req
)
{
if
(
!
req
.
startDate
||
!
req
.
endDate
)
{
this
.
$message
.
info
(
'请选择时间'
);
return
;
}
this
.
getData
(
"get"
,
`/session/funnel/report?endDate=
${
req
.
endDate
}
&funnelId=
${
this
.
funnelId
}
&startDate=
${
req
.
startDate
}
&version=
${
req
.
version
}
`
,
{},
res
=>
{
...
...
@@ -173,6 +178,7 @@ export default {
},
// 初始化图标--漏斗图
initCharts
()
{
this
.
moreStep
=
false
;
let
lineargroup
=
this
.
funnelData
.
funnelReportModels
;
let
len
=
lineargroup
.
length
;
let
colorObj
=
{
...
...
@@ -201,37 +207,40 @@ export default {
arrowTop
=
115
;
arrowH
=
130
;
lineTop
=
30
;
lineLeft
=
4
0
0
;
lineLeft
=
4
5
0
;
lineHeight
=
306
;
}
else
if
(
len
==
4
)
{
arrowTop
=
88
;
arrowH
=
210
;
lineTop
=
30
;
lineLeft
=
40
0
;
lineLeft
=
55
0
;
lineHeight
=
306
;
}
else
if
(
len
==
5
)
{
arrowTop
=
70
;
arrowH
=
260
;
lineTop
=
20
;
lineLeft
=
40
0
;
lineLeft
=
57
0
;
lineHeight
=
346
;
}
else
if
(
len
==
6
)
{
this
.
moreStep
=
true
;
arrowTop
=
60
;
arrowH
=
300
;
lineTop
=
20
;
lineLeft
=
40
0
;
lineLeft
=
57
0
;
lineHeight
=
366
;
}
else
if
(
len
==
7
)
{
this
.
moreStep
=
true
;
arrowTop
=
50
;
arrowH
=
340
;
lineTop
=
10
;
lineLeft
=
4
0
0
;
lineLeft
=
4
5
0
;
lineHeight
=
406
;
}
else
{
this
.
moreStep
=
true
;
arrowTop
=
40
;
arrowH
=
360
;
lineTop
=
10
;
lineLeft
=
4
0
0
;
lineLeft
=
4
5
0
;
lineHeight
=
436
;
}
for
(
let
i
=
0
;
i
<
lineargroup
.
length
;
i
++
)
{
...
...
@@ -267,7 +276,7 @@ export default {
backgroundColor
:
'#ffffff'
,
grid
:
{
top
:
arrowTop
,
// 箭头距离顶部高度 3-115 4-
left
:
"-
5
4%"
,
left
:
"-
4
4%"
,
right
:
20
,
height
:
arrowH
,
// 箭头之间的距离 3-145 4-
bottom
:
'0'
...
...
@@ -288,7 +297,7 @@ export default {
gap
:
40
,
// 块间距
minSize
:
150
,
// 块两边斜度
left
:
'5%'
,
// 块左边距离
width
:
'
3
5%'
,
// 块宽度
width
:
'
4
5%'
,
// 块宽度
label
:
{
show
:
true
,
position
:
'inside'
,
...
...
@@ -344,7 +353,7 @@ export default {
padding
:
[
30
,
20
,
5
,
10
],
formatter
:
function
(
d
)
{
if
(
d
.
value
)
{
var
ins
=
'{img1|} '
+
'{words|'
+
d
.
value
+
'
%
}'
;
var
ins
=
'{img1|} '
+
'{words|'
+
d
.
value
+
'}'
;
return
ins
;
}
},
...
...
@@ -516,7 +525,10 @@ export default {
.echart {
padding-top: 20px;
width: 100%;
min-height: 400px;
height: 400px;
}
.eh {
height: 500px;
}
.data-table {
margin-top: 20px;
...
...
src/views/user-path/funnel.vue
浏览文件 @
496acca8
...
...
@@ -11,7 +11,7 @@
</el-form-item>
</el-col>
<el-col
:span=
"3"
style=
"padding:0;text-align:right;padding-right:15px;"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"search"
>
搜索
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"search
(1)
"
>
搜索
</el-button>
</el-col>
</el-form>
</el-row>
...
...
@@ -100,7 +100,8 @@ export default {
}
})
},
search
()
{
search
(
param
)
{
if
(
param
)
this
.
searchParam
.
pageNo
=
1
;
let
req
=
this
.
searchParam
;
this
.
getData
(
"get"
,
`/session/funnel/list?searchName=
${
this
.
searchParam
.
searchName
}
&pageNo=
${
this
.
searchParam
.
pageNo
}
&pageSize=
${
this
.
searchParam
.
pageSize
}
`
,
{},
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录