Toggle navigation
Toggle navigation
This project
Loading...
Sign in
monitor_v3
/
hg-monitor-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
王涛
3 years ago
Commit
b3e4e1fe789684f72656d54cf2d0f9e48695a479
1 parent
26a71828
故障结果
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
64 additions
and
24 deletions
hg-monitor-web-base/src/main/resources/static/vue3/src/components/common/echarts/line/index.js
hg-monitor-web-zj/src/main/resources/static/vue3/src/components/page/faultDiagnosis/result/item/index.html
hg-monitor-web-zj/src/main/resources/static/vue3/src/components/page/faultDiagnosis/result/item/index.js
hg-monitor-web-zj/src/main/resources/static/vue3/src/views/faultDiagnosis/result/index.html
hg-monitor-web-base/src/main/resources/static/vue3/src/components/common/echarts/line/index.js
View file @
b3e4e1f
...
...
@@ -51,7 +51,7 @@ export default {
let
sourceData
=
props
.
sourceData
;
let
arr
=
[];
for
(
let
i
=
0
;
i
<
sourceData
[
0
].
length
;
i
++
)
{
for
(
let
i
=
1
;
i
<
sourceData
[
0
].
length
;
i
++
)
{
arr
.
push
({
type
:
'line'
})
}
let
option
=
{
...
...
hg-monitor-web-zj/src/main/resources/static/vue3/src/components/page/faultDiagnosis/result/item/index.html
View file @
b3e4e1f
...
...
@@ -27,11 +27,11 @@
<!-- 弹框区域 -->
<!-- 曲线图 -->
<cm-dialog
top=
"3vh"
title=
"曲线图"
width=
"
9
00px"
:showDialogVisible=
"showLineDialog"
<cm-dialog
top=
"3vh"
title=
"曲线图"
width=
"
10
00px"
:showDialogVisible=
"showLineDialog"
@
hidedialog=
"closeLineDialog"
:showFooter=
"false"
>
<template
v-slot
>
<div
style=
"height: 300px"
>
<echarts-line
height=
"300px"
width=
"880px"
/>
<div
style=
"height: 300px"
v-if=
"dataSet.length > 0"
>
<echarts-line
:sourceData=
"dataSet"
height=
"300px"
width=
"980px"
/>
</div>
</template>
</cm-dialog>
...
...
hg-monitor-web-zj/src/main/resources/static/vue3/src/components/page/faultDiagnosis/result/item/index.js
View file @
b3e4e1f
...
...
@@ -4,21 +4,62 @@
* 作者: Wang
* 时间:2021/12/15 19:59
*/
const
lineDetail
=
()
=>
{
const
lineDetail
=
(
props
)
=>
{
const
{
proxy
}
=
Vue
.
getCurrentInstance
();
let
showLineDialog
=
Vue
.
ref
(
false
);
let
dataSet
=
Vue
.
ref
([]);
let
closeLineDialog
=
(
flg
)
=>
{
showLineDialog
.
value
=
flg
;
}
let
openLine
=
(
row
)
=>
{
debugger
closeLineDialog
(
true
);
getLineData
(
row
);
}
let
getLineData
=
(
row
)
=>
{
let
params
=
{
faultNo
:
props
.
faultNo
,
targetType
:
props
.
targetType
,
resId
:
row
.
resId
,
kpiId
:
row
.
kpiId
,
flag
:
row
.
flag
}
proxy
.
$http
.
get
(
'/api-web/fault/result/findLineData'
,
params
,
function
(
res
)
{
if
(
res
&&
res
.
success
)
{
if
(
res
.
data
)
{
let
arr
=
[];
arr
.
push
([
'product'
,
res
.
data
[
0
].
resName
]);
res
.
data
.
forEach
(
function
(
v
){
let
time
=
v
.
collTime
;
// if(time && time.indexOf(' ') != -1){
// let timeArr = time.split(" ")
// if(timeArr && timeArr.length > 1 && timeArr[1].indexOf(':')){
// let ttArr = timeArr[1].split(':')
// if(ttArr && ttArr.length > 1){
// delete ttArr[0];
// time = ttArr.join(':');
// }
// }
// }
let
val
=
v
.
kpiValue
;
arr
.
push
([
time
,
val
]);
})
dataSet
.
value
=
arr
;
}
}
else
{
proxy
.
$global
.
showMsg
(
res
.
msg
,
"warning"
);
}
});
}
return
{
showLineDialog
,
closeLineDialog
,
openLine
openLine
,
dataSet
}
}
...
...
@@ -236,23 +277,20 @@ const resDetail = (props) => {
let
resListDialog
=
Vue
.
ref
(
false
);
let
resList
=
Vue
.
ref
({
columns
:
[{
prop
:
"resType"
,
label
:
"资源类型"
,
},
{
prop
:
"resName"
,
label
:
"资源名称"
,
},
{
prop
:
"bizName"
,
label
:
"业务名称"
,
},
{
prop
:
"kpiId"
,
label
:
"指标"
,
},
{
prop
:
"kpiName"
,
label
:
"指标名称"
,
},
{
prop
:
"kpiValue"
,
label
:
"指标值"
,
},
{
prop
:
"targetType"
,
label
:
"分类"
,
prop
:
"collTime"
,
label
:
"采集时间"
,
}],
dataList
:
[],
total
:
0
...
...
@@ -263,7 +301,7 @@ const resDetail = (props) => {
}
let
handleClick
=
(
row
,
index
)
=>
{
debugger
showResListDialog
(
true
);
getResListPage
(
row
);
}
...
...
@@ -271,7 +309,7 @@ const resDetail = (props) => {
let
getResListPage
=
(
row
)
=>
{
let
params
=
{
faultNo
:
props
.
faultNo
,
targe
Type
:
props
.
targe
Type
,
targe
tType
:
props
.
target
Type
,
resId
:
row
.
resId
,
kpiId
:
row
.
kpiId
,
flag
:
row
.
flag
...
...
@@ -314,7 +352,7 @@ export default {
return
{}
},
props
:
{
targeType
:
{
targe
t
Type
:
{
type
:
String
,
default
:
''
},
...
...
@@ -354,8 +392,9 @@ export default {
const
{
showLineDialog
,
closeLineDialog
,
openLine
}
=
lineDetail
();
openLine
,
dataSet
}
=
lineDetail
(
props
);
const
{
...
...
@@ -386,7 +425,7 @@ export default {
let
getPage
=
()
=>
{
let
params
=
{
faultNo
:
props
.
faultNo
,
targe
Type
:
props
.
targe
Type
targe
tType
:
props
.
target
Type
}
proxy
.
$http
.
get
(
'/api-web/fault/result/findResult'
,
params
,
function
(
res
)
{
if
(
res
&&
res
.
success
)
{
...
...
@@ -418,7 +457,7 @@ export default {
let
findCountInfo
=
()
=>
{
let
params
=
{
faultNo
:
props
.
faultNo
,
targe
Type
:
props
.
targe
Type
targe
tType
:
props
.
target
Type
}
proxy
.
$http
.
get
(
'/api-web/fault/result/findCountInfo'
,
params
,
function
(
res
)
{
if
(
res
&&
res
.
success
)
{
...
...
@@ -451,6 +490,7 @@ export default {
showLineDialog
,
closeLineDialog
,
openLine
,
dataSet
,
// 资源详情
...
...
hg-monitor-web-zj/src/main/resources/static/vue3/src/views/faultDiagnosis/result/index.html
View file @
b3e4e1f
...
...
@@ -57,7 +57,7 @@
placement=
"top"
:color=
"item.color"
:hollow=
"true"
>
<el-card>
<component
v-bind:is=
"item.components"
:targeType=
"item.faultType"
:targe
t
Type=
"item.faultType"
:faultNo=
"faultDetailDetailInfo.faultNo"
:colType=
"item.colType"
:itemName=
"item.itemName"
...
...
Please
register
or
login
to post a comment