Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart_gov_platform
Commits
1125cab3
Commit
1125cab3
authored
Sep 05, 2023
by
“yiyousong”
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.scsmile.cn/zxf/smart_gov_platform
parents
5663e5bb
18e8421d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
148 additions
and
104 deletions
+148
-104
portal-manager-ui/admin/src/views/dataActuary/behaviour/pathanalyse/pathAnalyse.vue
...c/views/dataActuary/behaviour/pathanalyse/pathAnalyse.vue
+148
-104
No files found.
portal-manager-ui/admin/src/views/dataActuary/behaviour/pathanalyse/pathAnalyse.vue
View file @
1125cab3
<
template
>
<!-- 路径分析 -->
<div
class=
"page"
>
<a-form-model
:model=
"queryform"
:label-col=
"labelCol"
:wrapper-col=
"wrapperCol"
layout=
"inline"
>
<a-form-model-item>
<a-select
v-model=
"queryform.productId"
style=
"width: 200px"
placeholder=
"选择产品"
>
<a-select-option
:value=
"item.id"
v-for=
"(item,index) in product"
:key=
"index"
>
{{
item
.
title
}}
</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item>
<a-range-picker
valueFormat=
"yyyy-MM-DD"
v-model=
"time"
style=
"width: 300px"
:allowClear=
"false"
/>
</a-form-model-item>
<a-form-model-item>
<a-button
type=
"primary"
class=
"addclass"
@
click=
"getData"
>
开始分析
</a-button>
</a-form-model-item>
</a-form-model>
<div
id=
"path"
></div>
</div>
<!-- 路径分析 -->
<div
class=
"page"
>
<a-form-model
:model=
"queryform"
:label-col=
"labelCol"
:wrapper-col=
"wrapperCol"
layout=
"inline"
>
<a-form-model-item>
<a-select
v-model=
"queryform.productId"
style=
"width: 200px"
placeholder=
"选择产品"
>
<a-select-option
:value=
"item.id"
v-for=
"(item, index) in product"
:key=
"index"
>
{{
item
.
title
}}
</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item>
<a-range-picker
valueFormat=
"yyyy-MM-DD"
v-model=
"time"
style=
"width: 300px"
:allowClear=
"false"
/>
</a-form-model-item>
<a-form-model-item>
<a-button
type=
"primary"
class=
"addclass"
@
click=
"getData"
>
开始分析
</a-button>
</a-form-model-item>
</a-form-model>
<div
id=
"path"
></div>
</div>
</
template
>
<
script
>
import
*
as
echarts
from
'
echarts
'
import
product
from
"
../mixins/product
"
import
{
getWayAccessAnalyse
}
from
'
@/api/dataActuary.js
'
import
moment
from
'
moment
'
;
export
default
{
mixins
:[
product
],
data
()
{
return
{
queryform
:
{
productId
:
1
,
dateTimeStart
:
moment
().
format
(
'
yyyy-MM-DD
'
),
dateTimeEnd
:
moment
().
format
(
'
yyyy-MM-DD
'
)
},
time
:[
moment
().
format
(
'
yyyy-MM-DD
'
),
moment
().
format
(
'
yyyy-MM-DD
'
)],
product
:[{
title
:
'
排队机
'
,
id
:
1
}],
labelCol
:
{
span
:
1
},
wrapperCol
:
{
span
:
14
},
}
},
mounted
()
{
this
.
getData
()
},
methods
:
{
getData
()
{
this
.
queryform
.
dateTimeStart
=
this
.
time
?
this
.
time
[
0
]
:
null
this
.
queryform
.
dateTimeStart
=
this
.
time
?
this
.
time
[
1
]
:
null
getWayAccessAnalyse
(
this
.
queryform
).
then
(
res
=>
{
let
data
=
res
.
data
.
data
.
map
(
item
=>
({
name
:
item
.
name
}))
let
links
=
res
.
data
.
links
.
map
(
item
=>
({
source
:
item
.
sourceName
,
target
:
item
.
targetName
,
value
:
item
.
value
,
lineStyle
:{
color
:
'
source
'
}
}))
this
.
init
(
data
,
links
)
})
},
uniqueFunc
(
arr
,
uniId
){
const
res
=
new
Map
();
return
arr
.
filter
((
item
)
=>
!
res
.
has
(
item
[
uniId
])
&&
res
.
set
(
item
[
uniId
],
1
));
},
init
(
data
,
links
)
{
let
chartDom
=
document
.
getElementById
(
'
path
'
)
let
myChart
=
echarts
.
init
(
chartDom
);
myChart
.
setOption
({
series
:
{
type
:
'
sankey
'
,
layout
:
'
none
'
,
emphasis
:
{
focus
:
'
adjacency
'
},
color
:[
'
#FFCAC4
'
,
'
#6D86DE
'
,
'
#409AFE
'
,
'
#4DB3EA
'
,
'
#07CF8C
'
],
nodeWidth
:
10
,
data
:
data
,
links
:
links
}
})
}
}
};
import
*
as
echarts
from
"
echarts
"
;
import
product
from
"
../mixins/product
"
;
import
{
getWayAccessAnalyse
}
from
"
@/api/dataActuary.js
"
;
import
moment
from
"
moment
"
;
export
default
{
mixins
:
[
product
],
data
()
{
return
{
queryform
:
{
productId
:
1
,
dateTimeStart
:
moment
().
format
(
"
yyyy-MM-DD
"
),
dateTimeEnd
:
moment
().
format
(
"
yyyy-MM-DD
"
),
},
time
:
[
moment
().
format
(
"
yyyy-MM-DD
"
),
moment
().
format
(
"
yyyy-MM-DD
"
)],
product
:
[
{
title
:
"
排队机
"
,
id
:
1
,
},
],
labelCol
:
{
span
:
1
,
},
wrapperCol
:
{
span
:
14
,
},
myChart
:
null
,
};
},
created
()
{
this
.
$nextTick
(()
=>
{
this
.
getData
();
});
},
methods
:
{
getData
()
{
this
.
queryform
.
dateTimeStart
=
this
.
time
?
this
.
time
[
0
]
:
null
;
this
.
queryform
.
dateTimeStart
=
this
.
time
?
this
.
time
[
1
]
:
null
;
getWayAccessAnalyse
(
this
.
queryform
).
then
((
res
)
=>
{
let
data
=
res
.
data
.
data
.
map
((
item
,
i
)
=>
item
.
code
!=
"
/sceneSignIn
"
?
{
name
:
item
.
name
,
}
:
""
);
let
links
=
res
.
data
.
links
.
map
((
item
)
=>
({
source
:
item
.
sourceName
,
target
:
item
.
targetName
,
value
:
item
.
value
,
lineStyle
:
{
color
:
"
source
"
,
},
}));
data
=
data
.
filter
((
v
)
=>
v
);
links
=
links
.
filter
((
v
)
=>
v
.
target
!=
"
首页
"
);
this
.
init
(
data
,
links
);
});
},
uniqueFunc
(
arr
,
uniId
)
{
const
res
=
new
Map
();
return
arr
.
filter
(
(
item
)
=>
!
res
.
has
(
item
[
uniId
])
&&
res
.
set
(
item
[
uniId
],
1
)
);
},
init
(
data
,
links
)
{
if
(
this
.
myChart
!=
null
&&
this
.
myChart
!=
""
&&
this
.
myChart
!=
undefined
)
{
this
.
myChart
.
dispose
();
//销毁
}
this
.
myChart
=
echarts
.
init
(
document
.
getElementById
(
"
path
"
));
this
.
myChart
.
setOption
({
series
:
{
type
:
"
sankey
"
,
layout
:
"
none
"
,
emphasis
:
{
focus
:
"
adjacency
"
,
},
color
:
[
"
#FFCAC4
"
,
"
#6D86DE
"
,
"
#409AFE
"
,
"
#4DB3EA
"
,
"
#07CF8C
"
],
nodeWidth
:
10
,
data
:
data
,
links
:
links
,
},
});
window
.
addEventListener
(
"
resize
"
,
()
=>
{
if
(
this
.
myChart
)
{
this
.
myChart
.
resize
();
}
});
},
},
};
</
script
>
<
style
lang=
"less"
scoped
>
.page{
height: calc(100% - 50px);
display: flex;
flex-direction: column;
/deep/.ant-form {
padding: 15px;
}
#path{
flex: 1;
width: 70%;
margin: 0 auto;
}
}
</
style
>
\ No newline at end of file
.page {
height: calc(100% - 50px);
display: flex;
flex-direction: column;
/deep/.ant-form {
padding: 15px;
}
#path {
flex: 1;
width: 70%;
margin: 0 auto;
}
}
</
style
>
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