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
Plain Diff
Browse Files
Authored by
xwx
3 years ago
Commit
e599d68c6cf5494188c40b7e623be56fd076baf5
2 parents
6f1b8e5a
c062ac3f
Merge branch 'master' of
http://113.200.75.45:82/monitor_v3/hg-monitor-web
into master-v32-xwx
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
522 additions
and
57 deletions
hg-monitor-web-base/src/main/resources/static/src/controller/noticeIndex.js
hg-monitor-web-base/src/main/resources/static/src/controller/overviewIndex.js
hg-monitor-web-base/src/main/resources/static/src/controller/userAdd.js
hg-monitor-web-base/src/main/resources/static/src/index.js
hg-monitor-web-base/src/main/resources/static/src/lib/extend/msgTips.js
hg-monitor-web-base/src/main/resources/static/src/style/css/main.css
hg-monitor-web-base/src/main/resources/static/src/views/alarm/overview.html
hg-monitor-web-base/src/main/resources/static/src/views/baseconfig/notice/index.html
hg-monitor-web-base/src/main/resources/static/src/views/index-biz-card.html
hg-monitor-web-base/src/main/resources/static/vue3/src/components/common/document/index.js
hg-monitor-web-base/src/main/resources/static/vue3/src/components/common/table-page/index.html
hg-monitor-web-base/src/main/resources/static/vue3/src/components/common/table-page/index.js
hg-monitor-web-base/src/main/resources/static/vue3/src/components/common/userright/index.js
hg-monitor-web-zj/src/main/resources/static/vue3/src/components/page/faultDiagnosis/result/faultHis/index.html
hg-monitor-web-zj/src/main/resources/static/vue3/src/components/page/faultDiagnosis/result/faultHis/index.js
hg-monitor-web-zj/src/main/resources/static/vue3/src/views/faultDiagnosis/components/diagnosisDoc/index.js
hg-monitor-web-zj/src/main/resources/static/vue3/src/views/faultDiagnosis/result/index.html
hg-monitor-web-zj/src/main/resources/static/vue3/src/views/faultDiagnosis/result/index.js
hg-monitor-web-base/src/main/resources/static/src/controller/noticeIndex.js
View file @
e599d68
...
...
@@ -374,8 +374,8 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect'
},
grid
:
[{
top
:
20
,
bottom
:
35
,
left
:
30
,
bottom
:
45
,
left
:
40
,
right
:
5
}],
xAxis
:
[{
...
...
@@ -385,7 +385,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect'
color
:
'#333'
,
show
:
true
,
interval
:
0
,
rotate
:
20
rotate
:
15
},
axisLine
:
{
lineStyle
:
{
...
...
@@ -439,7 +439,121 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect'
});
});
}
/********************单独加载更多****************************/
function
loadNoticeMoreChart
(
echartObject
,
xData
,
yData
)
{
var
series
=
[{
name
:
'通知次数'
,
data
:
yData
,
barWidth
:
20
,
type
:
'bar'
,
label
:
{
show
:
true
,
position
:
'top'
,
textStyle
:
{
color
:
'#555'
},
},
itemStyle
:
{
normal
:
{
color
:
(
params
)
=>
{
var
colors
=
[
'#b6c2ff'
,
'#96edc1'
,
'#fcb75b'
];
return
colors
[
params
.
dataIndex
%
3
]
}
}
},
emphasis
:
{
itemStyle
:
{
color
:
new
echarts
.
graphic
.
LinearGradient
(
0
,
0
,
0
,
1
,
[
{
offset
:
0
,
color
:
'#2378f7'
},
{
offset
:
0.7
,
color
:
'#2378f7'
},
{
offset
:
1
,
color
:
'#83bff6'
}
])
}
},
}]
var
option
=
{
tooltip
:
{
trigger
:
'axis'
,
axisPointer
:
{
type
:
'shadow'
}
},
grid
:
[{
top
:
20
,
bottom
:
70
,
left
:
30
,
right
:
5
}],
xAxis
:
[{
type
:
'category'
,
data
:
xData
,
axisLabel
:
{
color
:
'#333'
,
show
:
true
,
interval
:
0
,
rotate
:
15
},
axisLine
:
{
lineStyle
:
{
color
:
'#e7e7e7'
}
},
axisTick
:
{
lineStyle
:
{
color
:
'#e7e7e7'
}
},
zlevel
:
1
}],
yAxis
:
[{
type
:
'value'
,
gridIndex
:
0
,
axisLabel
:
{
color
:
'#333'
},
splitLine
:
{
lineStyle
:
{
type
:
'dashed'
}
},
axisLine
:
{
lineStyle
:
{
color
:
'#ccc'
}
},
axisTick
:
{
lineStyle
:
{
color
:
'#ccc'
}
}
}],
series
:
series
,
dataZoom
:
[
{
type
:
'slider'
,
show
:
true
,
xAxisIndex
:
[
0
],
left
:
'1%'
,
bottom
:
-
5
,
start
:
0
,
end
:
50
//初始化滚动条
}
],
}
echartObject
.
setOption
(
option
)
window
.
onresize
=
function
(){
echartObject
.
resize
();
}
// const zoomSize = 6;
// echartObject.on('click', function (params) {
// echartObject.dispatchAction({
// type: 'dataZoom',
// startValue: xData[Math.max(params.dataIndex - zoomSize / 2, 0)],
// endValue:
// xData[Math.min(params.dataIndex + zoomSize / 2, yData.length - 1)]
// });
// });
}
//获取图表数据
function
getChartData
()
{
var
where
=
{
...
...
@@ -522,7 +636,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect'
var
yData
=
res
.
map
.
countList
;
var
xData
=
res
.
map
.
userList
;
//展示前20条数据 @Editor LH
loadNoticeChart
(
noticeTypeChartNew
,
xData
,
yData
);
loadNotice
More
Chart
(
noticeTypeChartNew
,
xData
,
yData
);
}
}
})
...
...
hg-monitor-web-base/src/main/resources/static/src/controller/overviewIndex.js
View file @
e599d68
...
...
@@ -237,7 +237,10 @@ layui.define(['admin', 'form', 'table', 'element', 'sessions', 'common', 'echart
show
:
true
,
position
:
'top'
,
textStyle
:
{
color
:
'#555'
color
:
'#555'
,
// Start 增加padding LSQ 2021/12/29 10:17
padding
:[
5
,
0
,
5
,
0
]
//End LSQ 2021/12/29 10:17
}
}
},{
...
...
hg-monitor-web-base/src/main/resources/static/src/controller/userAdd.js
View file @
e599d68
...
...
@@ -195,7 +195,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'xmSelect
//获取属性值
function
addUserProperty
()
{
var
arr
=
[];
var
$inputs
=
$
(
"#user_property_html_id"
).
find
(
"input"
);
var
$inputs
=
$
(
"#user_property_html_id"
).
find
(
"
.
input"
);
$
.
each
(
$inputs
,
function
(
i
,
e
)
{
var
obj
=
{
id
:
$
(
e
).
attr
(
"data-id"
),
...
...
@@ -207,6 +207,33 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'xmSelect
};
arr
.
push
(
obj
)
})
console
.
log
(
"arr-$inputs"
,
arr
)
// Start 获取select的值 LSQ 2021/12/28 14:29 TODO
var
$selects
=
$
(
"#user_property_html_id"
).
find
(
".select"
);
$
.
each
(
$selects
,
function
(
i
,
e
)
{
var
obj
=
{
id
:
$
(
e
).
attr
(
"data-id"
),
username
:
$
(
e
).
attr
(
"data-username"
),
property
:
$
(
e
).
attr
(
"data-property"
),
value
:
$
(
e
).
val
(),
sort
:
$
(
e
).
attr
(
"data-sort"
),
remark
:
$
(
e
).
attr
(
"data-remark"
)
};
arr
.
push
(
obj
)
})
var
$textareas
=
$
(
"#user_property_html_id"
).
find
(
".textarea"
);
$
.
each
(
$textareas
,
function
(
i
,
e
)
{
var
obj
=
{
id
:
$
(
e
).
attr
(
"data-id"
),
username
:
$
(
e
).
attr
(
"data-username"
),
property
:
$
(
e
).
attr
(
"data-property"
),
value
:
$
(
e
).
val
(),
sort
:
$
(
e
).
attr
(
"data-sort"
),
remark
:
$
(
e
).
attr
(
"data-remark"
)
};
arr
.
push
(
obj
)
})
//End LSQ 2021/12/28 14:50 TODO
return
arr
;
}
...
...
@@ -234,27 +261,83 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'xmSelect
var
rowTail
=
'</div>'
;
var
content
=
''
;
$
.
each
(
propertyList
,
function
(
i
,
v
)
{
// Start 根据字典配置后缀展示输入框,单选框,文本框 LSQ 2021/12/28 16:34 TODO
var
str
=
''
;
var
dropStrIndex
=
v
.
ddicCode
.
indexOf
(
'_drop_'
);
var
textareaStrIndex
=
v
.
ddicCode
.
indexOf
(
'_textarea_'
);
if
(
textareaStrIndex
!=-
1
){
str
=
'<textarea data-property="'
+
v
.
ddicCode
+
'" placeholder="'
+
v
.
ddicDesc
+
'" data-id="" data-username="" data-sort="" data-remark="" class="layui-textarea textarea" name="'
+
v
.
ddicCode
+
'"></textarea>'
}
else
if
(
dropStrIndex
!=-
1
){
var
selectOption
=
''
;
var
strArr
=
v
.
ddicCode
.
split
(
'_drop_'
);
if
(
strArr
&&
strArr
.
length
>
1
){
var
strArrEle
=
strArr
[
1
].
split
(
'_'
);
if
(
strArrEle
[
0
]
==
'yes'
){
selectOption
=
' <option value="0">否</option>'
+
' <option value="1">是</option>'
;
}
else
if
(
strArrEle
[
0
]
==
'long'
){
selectOption
=
' <option value="0">长期</option>'
+
' <option value="1">短期</option>'
;
}
else
{
selectOption
=
' <option value="0">否</option>'
+
' <option value="1">是</option>'
;
}
}
str
=
'<select data-property="'
+
v
.
ddicCode
+
'" placeholder="'
+
v
.
ddicDesc
+
'" data-id="" data-username="" data-sort="" data-remark="" class="select layui-select select-input-my" name="'
+
v
.
ddicCode
+
'" autocomplete="off">'
+
' <option value="" style="display:none;"></option>'
+
selectOption
+
'</select>'
;
}
else
{
str
=
'<input type="text" data-property="'
+
v
.
ddicCode
+
'" placeholder="'
+
v
.
ddicDesc
+
'" data-id="" data-username="" data-sort="" data-remark="" class="layui-input input" name="'
+
v
.
ddicCode
+
'" autocomplete="off">'
}
var
property
=
' <div class="layui-inline ">'
+
' <label class="layui-form-label">'
+
v
.
ddicName
+
'</label>'
+
' <div class="layui-input-inline">'
+
' <input type="text" data-property="'
+
v
.
ddicCode
+
'" placeholder="'
+
v
.
ddicDesc
+
'" data-id="" data-username="" data-sort="" data-remark="" class="layui-input" name="'
+
v
.
ddicCode
+
'" autocomplete="off">'
+
' <div class="layui-input-inline">'
+
str
+
// ' <input type="text" data-property="'+v.ddicCode+'" placeholder="'+v.ddicDesc+'" data-id="" data-username="" data-sort="" data-remark="" class="layui-input" name="' + v.ddicCode + '" autocomplete="off">' +
' </div>'
+
' </div>'
;
if
(
i
%
2
==
0
&&
i
!=
0
)
{
if
(
textareaStrIndex
!=-
1
){
if
(
i
%
1
==
0
)
{
content
+=
rowTail
;
}
if
(
i
%
1
==
0
)
{
//需要添加表头
content
+=
rowHead
+
property
;
}
else
{
//
content
+=
property
;
}
}
else
{
if
(
i
%
2
==
0
&&
i
!=
0
)
{
content
+=
rowTail
;
}
if
(
i
%
2
==
0
)
{
//需要添加表头
content
+=
rowHead
+
property
;
}
else
{
//
content
+=
property
;
}
}
//End LSQ 2021/12/28 16:35 TODO
/* if (i % 2 == 0 && i != 0) {
content += rowTail;
}
if (i % 2 == 0) {//需要添加表头
content += rowHead + property;
} else {//
content += property;
}
}*/
});
$
(
'#user_property_html_id'
).
append
(
content
);
}
//回显属性信息
function
evaluation
(
list
){
var
$inputs
=
$
(
"#user_property_html_id"
).
find
(
"input"
);
var
$inputs
=
$
(
"#user_property_html_id"
).
find
(
"
.
input"
);
$
.
each
(
$inputs
,
function
(
i
,
e
)
{
var
$that
=
$
(
this
);
$
.
each
(
list
,
function
(
index
,
v
)
{
...
...
@@ -267,6 +350,34 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'xmSelect
}
});
});
// Start 回显select的值 LSQ 2021/12/28 14:55 TODO
var
$selects
=
$
(
"#user_property_html_id"
).
find
(
".select"
);
$
.
each
(
$selects
,
function
(
i
,
e
)
{
var
$that
=
$
(
this
);
$
.
each
(
list
,
function
(
index
,
v
)
{
if
(
$that
.
attr
(
'data-property'
)
==
v
.
property
){
$that
.
attr
(
"data-id"
,
v
.
id
);
$that
.
attr
(
"data-username"
,
v
.
username
);
$that
.
val
(
v
.
value
);
$that
.
attr
(
"data-sort"
,
v
.
sort
);
$that
.
attr
(
"data-remark"
,
v
.
remark
);
}
});
});
var
$textarea
=
$
(
"#user_property_html_id"
).
find
(
".textarea"
);
$
.
each
(
$textarea
,
function
(
i
,
e
)
{
var
$that
=
$
(
this
);
$
.
each
(
list
,
function
(
index
,
v
)
{
if
(
$that
.
attr
(
'data-property'
)
==
v
.
property
){
$that
.
attr
(
"data-id"
,
v
.
id
);
$that
.
attr
(
"data-username"
,
v
.
username
);
$that
.
val
(
v
.
value
);
$that
.
attr
(
"data-sort"
,
v
.
sort
);
$that
.
attr
(
"data-remark"
,
v
.
remark
);
}
});
});
//End LSQ 2021/12/28 14:55 TODO
}
})
})
...
...
hg-monitor-web-base/src/main/resources/static/src/index.js
View file @
e599d68
...
...
@@ -467,7 +467,11 @@ layui.extend({
new
msgTips
({
dom
:
".right-bottom-tips"
,
title
:
title
,
message
:
`
<
p
style
=
"line-height: 30px;background: url(${imgUrl}) no-repeat;background-size: 70%;height: 178px;padding: 10px;background-position-x: right;padding-left: 106px;padding-top: 96px;"
>
$
{
content
}
<
/p>`
,
message
:
`
<
p
style
=
"line-height: 24px;background: url(${imgUrl}) no-repeat;background-size: 100%;height: 160px;padding: 10px;background-position-x: right;padding-left: 29px;padding-top: 145px;"
>
<
span
class
=
"title closeFault"
style
=
"position: relative;top: -75px;left: 170px;"
>
X
<
/span
>
<
span
style
=
"position: relative;left: 35px;top: -21px; font-weight: bold;"
>
$
{
title
}
<
/span
>
$
{
content
}
<
/p>`
,
duration
:
10000
,
space
:
10
,
firstSpace
:
8
,
...
...
@@ -485,6 +489,7 @@ layui.extend({
//}
}
})
},
delay
);
}
else
{
setTimeout
(
function
()
{
...
...
hg-monitor-web-base/src/main/resources/static/src/lib/extend/msgTips.js
View file @
e599d68
...
...
@@ -27,7 +27,7 @@ layui.define(['layer', 'laytpl', 'form'], function (exports) {
minus
=
""
;
}
if
(
$
(
'.ez_tips'
).
size
()
==
0
||
$
(
'.ez_tips'
).
size
()
<
options
.
limit
)
{
if
(
(
$
(
'.ez_tips'
).
size
()
==
0
||
$
(
'.ez_tips'
).
size
()
<
options
.
limit
)
&&
(
options
.
toastType
!=
'faultinfo'
&&
options
.
toastType
!=
'faultprogress'
&&
options
.
toastType
!=
'faultover'
)
)
{
var
container
=
"<div class='ez_tips "
+
options
.
toastType
+
"' style="
+
firstDirection
+
":"
+
options
.
margin
+
"px;transform:translateX("
+
minus
+
"110%)></div>"
...
...
@@ -97,13 +97,16 @@ layui.define(['layer', 'laytpl', 'form'], function (exports) {
},
1
);
$
(
options
.
dom
).
append
(
newContainer
);
}
else
if
(
options
.
toastType
==
'faultinfo'
||
options
.
toastType
==
'faultprogress'
||
options
.
toastType
==
'faultover'
){
var
container
=
"<div class='fault_ez_tips "
+
options
.
toastType
+
"' style="
+
firstDirection
+
":"
+
options
.
margin
+
"px;bottom: 319px;transform:translateX("
+
minus
+
"110%);></div>"
var
head
=
"<div class='faultTitle faultClearfix'><i class='faultTips_icon_l fl'></i><i class='FaultTips_icon_r close'></i></div>"
;
var
container
=
"<div class='fault_ez_tips "
+
options
.
toastType
+
"' style="
+
firstDirection
+
":"
+
options
.
margin
+
"px;transform:translateX("
+
minus
+
"110%);width: 226px;bottom: 8px !important; ></div>"
// var head = "<div class='faultTitle faultClearfix'><i class='faultTips_icon_l fl'></i><i class='FaultTips_icon_r close'></i></div>";
var
head
=
""
;
var
content
=
"<div class='FaultTips-message' style='cursor: pointer; display: flex;justify-content: flex-end;'></div>"
var
newHead
=
$
(
head
).
append
(
options
.
title
);
// var newHead = $(head).append(options.title);
var
newHead
=
""
;
var
newContent
=
$
(
content
).
append
(
options
.
message
)
...
...
@@ -122,7 +125,9 @@ layui.define(['layer', 'laytpl', 'form'], function (exports) {
var
times
=
Date
.
now
();
$
(
newContainer
).
css
({
'transition-timing-function'
:
options
.
timingFun
,
'width'
:
options
.
width
,
// 'width':options.width,
'width'
:
'226px'
,
'bottom'
:
'8px'
});
var
height
=
$
(
newContainer
).
outerHeight
(
true
);
var
len
=
$
(
'.fault_ez_tips'
).
size
();
...
...
@@ -159,6 +164,13 @@ layui.define(['layer', 'laytpl', 'form'], function (exports) {
$
(
newContainer
).
remove
();
},
700
)
});
$
(
newContainer
).
find
(
".closeFault"
).
click
(
function
(
event
)
{
event
.
stopPropagation
();
$
(
newContainer
).
removeClass
(
'active'
);
setTimeout
(
function
()
{
$
(
newContainer
).
remove
();
},
700
)
})
if
(
options
.
action
)
{
$
(
newContent
).
css
(
'cursor'
,
'pointer'
).
on
(
options
.
type
,
options
.
action
);
}
...
...
hg-monitor-web-base/src/main/resources/static/src/style/css/main.css
View file @
e599d68
...
...
@@ -7892,4 +7892,20 @@ form[lay-filter="activewarning-form"] .layui-inline {
}
.padding-left-10
{
padding-left
:
10px
;
}
\ No newline at end of file
}
/* Start 自定义select的样式*/
.select-input-my
+
.layui-form-select
.layui-select-title
.layui-input
::-webkit-input-placeholder
{
color
:
#999
;
}
.select-input-my
+
.layui-form-select
.layui-select-title
.layui-input
::-moz-placeholder
{
color
:
#999
;
}
.select-input-my
+
.layui-form-select
.layui-select-title
.layui-input
::-ms-input-placeholder
{
color
:
#999
;
}
.select-input-my
+
.layui-form-select
dl
dd
.layui-this
{
color
:
#666666
;
background-color
:
rgb
(
242
,
242
,
242
);
}
/* End 自定义select的样式*/
...
...
hg-monitor-web-base/src/main/resources/static/src/views/alarm/overview.html
View file @
e599d68
...
...
@@ -16,17 +16,31 @@
<div
class=
"layui-card"
style=
"min-height: calc(30% - 15px)"
>
<div
class=
"layui-card-body"
>
<div
style=
"display: flex"
class=
"layui-card-echart"
>
<div
style=
"width: 60%!important;"
>
<!--1单独一行,宽度由60%设为100%// Start LSQ 2021/12/29 10:19-->
<div
style=
"width: 100%!important;"
>
<h5
class=
"lay-row-title"
>
告警趋势图(24小时)
</h5>
<div
class=
"pie-chart"
id=
"overview_alarm_trend"
></div>
</div>
<div
style=
"width: 40%!important;"
>
</div>
</div>
</div>
<!--2和5一行 // Start LSQ 2021/12/29 10:18-->
<div
class=
"layui-card"
style=
"min-height: calc(30% - 15px)"
>
<div
class=
"layui-card-body"
>
<div
style=
"display: flex"
class=
"layui-card-echart"
>
<div
style=
"width: 50%!important;"
>
<h5
class=
"lay-row-title"
>
指标告警统计Top10
</h5>
<div
class=
"pie-chart"
id=
"overview_alarm_kpi"
></div>
</div>
<div
style=
"flex-grow: 1"
>
<h5
class=
"lay-row-title"
>
业务域告警统计Top10
</h5>
<div
class=
"pie-chart"
id=
"overview_alarm_domain"
></div>
</div>
</div>
</div>
</div>
<!--//End LSQ 2021/12/29 10:18-->
<div
class=
"layui-card"
style=
"min-height: calc(30% - 15px)"
>
<div
class=
"layui-card-body"
>
...
...
@@ -39,10 +53,10 @@
<h5
class=
"lay-row-title"
>
业务类型告警统计Top10
</h5>
<div
class=
"pie-chart"
id=
"overview_alarm_busType"
></div>
</div>
<div
style=
"flex-grow: 1"
>
<!--
<div style="flex-grow: 1">
<h5 class="lay-row-title">业务域告警统计Top10</h5>
<div class="pie-chart" id="overview_alarm_domain"></div>
</div>
</div>
-->
</div>
</div>
</div>
...
...
hg-monitor-web-base/src/main/resources/static/src/views/baseconfig/notice/index.html
View file @
e599d68
...
...
@@ -103,9 +103,9 @@
</article>
<!--上传弹框-->
<script
id=
"more_info"
type=
"text/html"
>
<
div
style
=
"align:center;"
>
<
div
class
=
"lay-row-title"
>
人员分组统计
<
div
style
=
" float:right;"
><
/div></
div
>
<
div
class
=
"pie-chart"
style
=
"height: 350px"
id
=
"notice_chart_type_new"
><
/div
>
<
div
style
=
"align:center;padding: 20px;height: 330px"
>
<
div
class
=
"lay-row-title"
lay
-
tips
=
"灰色拖动条可以左右拉缩并拖动展示其它数据"
>
人员分组统计
<
/div
>
<
div
class
=
"pie-chart"
style
=
"height: 100%"
id
=
"notice_chart_type_new"
><
/div
>
<
/div
>
</script>
<script>
...
...
hg-monitor-web-base/src/main/resources/static/src/views/index-biz-card.html
View file @
e599d68
...
...
@@ -343,7 +343,15 @@
{{
#
});
}}
<
/div
>
<
/div
>
<
span
class
=
"index-banner-count"
>
业务共
{{
d
.
count
}}
个
<
/span
>
<!--
<
span
class
=
"index-banner-count"
>
业务共
{{
d
.
count
}}
个
<
/span>--
>
<!--
业务统计数更改
LSQ
2021
/
12
/
28
11
:
25
-->
{{
#
if
(
d
.
data
[
0
]
&&
d
.
data
[
0
].
bizList
)
{
}}
<
span
class
=
"index-banner-count"
>
业务共
{{
d
.
data
[
0
].
bizList
.
length
}}
个
<
/span
>
{{
#
}
else
{
}}
<
span
class
=
"index-banner-count"
>
业务共
0
个
<
/span
>
{{
#
}
}}
</script>
<!--资源类型监控情况-->
...
...
hg-monitor-web-base/src/main/resources/static/vue3/src/components/common/document/index.js
View file @
e599d68
...
...
@@ -594,12 +594,11 @@ export default {
if
(
arr
.
length
==
1
)
{
// 查询文件的权限
proxy
.
$http
.
get
(
`
/
inspection
-
report
/
doc
/
doc
/
auth
/
getGrant
`
,
{
docId
:
arr
[
0
].
id
},
function
(
res
)
{
proxy
.
$http
.
get
(
`
/
inspection
-
report
/
file
/
auth
/
getGrant
`
,
{
docId
:
arr
[
0
].
id
},
function
(
res
)
{
if
(
res
&&
res
.
code
==
0
)
{
// {roleIds: ["1"], usernames: ["admin"]}
let
map
=
res
.
map
;
if
(
map
)
{
let
all
=
res
.
map
.
roleIds
.
concat
(
res
.
map
.
usernames
)
;
let
all
=
map
.
allIds
;
userFileRight
.
value
=
all
;
}
}
...
...
hg-monitor-web-base/src/main/resources/static/vue3/src/components/common/table-page/index.html
View file @
e599d68
...
...
@@ -18,8 +18,14 @@
<div
v-else-if=
"typeof(item.render) == 'function'"
>
<span
v-html=
"item.render(scope.row)"
>
{{scope.row[item.prop]}}
</span>
</div>
<span
v-else
>
{{scope.row[item.prop]}}
<el-tooltip
placement=
"top"
>
<template
#
content
>
{{getTextContent(scope.row[item.prop])}}
</template>
<div
style=
"overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;"
>
{{scope.row[item.prop]}}
</div>
</el-tooltip>
</span>
</slot>
</template>
...
...
hg-monitor-web-base/src/main/resources/static/vue3/src/components/common/table-page/index.js
View file @
e599d68
...
...
@@ -199,6 +199,23 @@ export default {
}
})
}
let
getTextContent
=
(
val
)
=>
{
// if(!val){
// return val;
// }
// let arr = val.split('')
//
// let text = [];
// for(let i = 0;i < arr.length;i += 20){
// text.push(arr.slice(i, i+20))
// }
// return text.join('\n')
return
val
;
}
// 挂载完
Vue
.
onMounted
(()
=>
{
//callback();
...
...
@@ -224,7 +241,8 @@ export default {
handleCurrentChange
,
prePage
,
nextPage
,
getWidth
getWidth
,
getTextContent
}
}
}
...
...
hg-monitor-web-base/src/main/resources/static/vue3/src/components/common/userright/index.js
View file @
e599d68
...
...
@@ -210,12 +210,12 @@ export default {
let
getUser
=
()
=>
{
let
arr
=
allArr
.
value
;
if
(
!
arr
||
arr
.
length
==
0
)
{
proxy
.
$global
.
showMsg
(
"您没有选择用户!"
,
"warning"
)
return
;
}
// Start Wang 2021/12/28 19:46 删除非空验证,考虑授权时,取消授权,需要清空授权数据
// if (!arr || arr.length == 0) {
// proxy.$global.showMsg("您没有选择用户!", "warning")
// return;
// }
// End Wang 2021/12/28 19:46
let
user
=
[];
let
role
=
[];
...
...
hg-monitor-web-zj/src/main/resources/static/vue3/src/components/page/faultDiagnosis/result/faultHis/index.html
0 → 100644
View file @
e599d68
<div>
<div
style=
"font-weight: bold;text-align: left;"
>
故障相关处理意见
</div>
<cm-table-page
v-if=
"list.columns.length > 0"
:columns=
"list.columns"
:dataList=
"list.dataList"
@
loaddata=
"getPageInfo"
:showIndex=
"true"
:showBorder=
"true"
:showPage=
"false"
:showTools=
"showTools"
:maxWidth=
"width"
size=
"mini"
:height=
"200"
>
<template
#
tools=
"{scope}"
>
<el-button
type=
"text"
size=
"small"
@
click
.
prevent=
"handleClick(scope.row,scope.$index)"
>
引用
</el-button>
</template>
</cm-table-page>
</div>
...
...
hg-monitor-web-zj/src/main/resources/static/vue3/src/components/page/faultDiagnosis/result/faultHis/index.js
0 → 100644
View file @
e599d68
export
default
{
name
:
'faultHisIndex'
,
template
:
''
,
components
:
{
'echarts-line'
:
Vue
.
defineAsyncComponent
(
()
=>
myImport
(
'components/common/echarts/line/index'
)
)
},
data
()
{
return
{}
},
props
:
{
targetType
:
{
type
:
String
,
default
:
''
},
faultNo
:
{
type
:
String
,
default
:
''
},
itemName
:
{
type
:
String
,
default
:
''
},
itemInfo
:
{
type
:
Object
,
default
:
{}
},
// 展示详情页
showDetail
:
{
type
:
String
,
default
:
''
},
// 数据转行方式
colType
:
{
type
:
String
,
default
:
'kpi'
},
width
:{
type
:
Number
,
default
:
window
.
innerWidth
*
0.8
-
160
},
showTools
:
{
type
:
Boolean
,
default
:
false
},
},
setup
(
props
,
{
attrs
,
slots
,
emit
})
{
const
{
proxy
}
=
Vue
.
getCurrentInstance
();
// 列表展示结果
let
list
=
Vue
.
ref
({
columns
:
[{
prop
:
'faultNo'
,
width
:
90
,
label
:
'故障编号'
,
},{
prop
:
'faultBody'
,
width
:
150
,
label
:
'故障主体'
,
},
{
prop
:
'createTime'
,
width
:
100
,
label
:
'发生时间'
,
},
{
prop
:
'duration'
,
width
:
80
,
label
:
'持续时长'
,
},{
prop
:
'solution'
,
width
:
200
,
label
:
'处理方案'
}],
dataList
:
[],
total
:
0
});
/**
* 获取表格数据
* <p>
* 作者: Wang
* 时间:2021/12/15 17:26
*/
let
getPage
=
()
=>
{
let
params
=
{
configId
:
props
.
itemInfo
.
configId
,
}
proxy
.
$http
.
get
(
'/api-web/fault/result/findFaultListByConfigId'
,
params
,
function
(
res
)
{
if
(
res
&&
res
.
success
)
{
list
.
value
.
dataList
=
res
.
data
;
}
else
{
proxy
.
$global
.
showMsg
(
res
.
msg
,
"warning"
);
}
});
}
let
handleClick
=
(
row
,
index
)
=>
{
console
.
log
(
row
,
index
);
emit
(
'callback'
,
row
);
}
// // 监听编辑状态
// Vue.watch(() => props.itemInfo, (newValue, oldVlaue) => {
// getPage();
// });
// 挂载完
Vue
.
onMounted
(()
=>
{
getPage
();
})
return
{
list
,
getPage
,
handleClick
}
}
}
...
...
hg-monitor-web-zj/src/main/resources/static/vue3/src/views/faultDiagnosis/components/diagnosisDoc/index.js
View file @
e599d68
...
...
@@ -42,7 +42,7 @@ export default {
that
.
$global
.
showMsg
(
"删除成功!"
);
that
.
diagnosisData
.
splice
(
index
,
1
);
}
else
{
that
.
$global
.
showMsg
(
"删除失败!"
,
'warning'
)
that
.
$global
.
showMsg
(
res
.
msg
,
'warning'
)
}
})
...
...
hg-monitor-web-zj/src/main/resources/static/vue3/src/views/faultDiagnosis/result/index.html
View file @
e599d68
...
...
@@ -72,7 +72,7 @@
<!-- 处理弹框 -->
<cm-dialog
title=
"故障处理"
width=
"60%"
:showDialogVisible=
"handleInfoDialog"
@
hidedialog=
"showHand
el
InfoDialog"
:showFooter=
"false"
>
@
hidedialog=
"showHand
le
InfoDialog"
:showFooter=
"false"
>
<template
v-slot
>
<el-form
ref=
"handleForm"
:model=
"handleInfoForm"
:rules=
"handleInfoRules"
label-width=
"120px"
>
...
...
@@ -132,6 +132,14 @@
</el-col>
</el-row>
<el-row
:gutter=
"5"
>
<el-col
:span=
"24"
>
<faultHis
:itemInfo=
"{'configId':handleInfoForm.faultconfid}"
:width=
"handleInfoDialogWidth"
:showTools=
"true"
@
callback=
"setSolution"
></faultHis>
</el-col>
</el-row>
<el-form-item>
<el-button
@
click=
"showHandleInfoDialog(false)"
>
取消
</el-button>
<el-button
v-if=
"handleInfoForm.solveTime == null || handleInfoForm.solveTime == ''"
type=
"primary"
@
click=
"saveHandleInfo('handleForm',getPage)"
>
保存
</el-button>
...
...
hg-monitor-web-zj/src/main/resources/static/vue3/src/views/faultDiagnosis/result/index.js
View file @
e599d68
...
...
@@ -48,6 +48,14 @@ const faultDetail = () => {
itemName
:
'检测指标'
,
detail
:
true
,
colType
:
'flag'
},
{
faultType
:
'faultHis'
,
faultTypeName
:
'知识库'
,
components
:
'faultHis'
,
color
:
'#8a9718'
,
itemName
:
'知识库'
,
detail
:
true
,
colType
:
'flag'
}]
});
...
...
@@ -91,6 +99,7 @@ const faultDetail = () => {
const
handleInfo
=
()
=>
{
const
{
proxy
}
=
Vue
.
getCurrentInstance
();
let
handleInfoDialog
=
Vue
.
ref
(
false
);
let
handleInfoDialogWidth
=
Vue
.
ref
(
window
.
innerWidth
*
0.6
-
80
);;
let
handleInfoForm
=
Vue
.
ref
({
faulttype
:
''
,
createTime
:
''
,
...
...
@@ -114,8 +123,8 @@ const handleInfo = () => {
},
{
min
:
5
,
max
:
100
,
message
:
'处理方案内容在5到100个字符之间'
,
max
:
500
,
message
:
'处理方案内容在5到500个字符之间'
,
trigger
:
'blur'
,
}
]
...
...
@@ -125,8 +134,12 @@ const handleInfo = () => {
let
handleClick
=
(
row
,
index
)
=>
{
// 点击弹框
showHandleInfoDialog
(
true
);
handleInfoForm
.
value
=
row
;
//Object.assign(handleInfoForm.value,row);
handleInfoForm
.
value
=
Object
.
assign
(
handleInfoForm
.
value
,
row
);
}
let
setSolution
=
(
row
)
=>
{
handleInfoForm
.
value
.
solution
=
row
.
solution
;
}
/**
...
...
@@ -138,16 +151,6 @@ const handleInfo = () => {
let
saveHandleInfo
=
(
key
,
callback
)
=>
{
proxy
.
$refs
[
key
].
validate
((
valid
)
=>
{
if
(
valid
)
{
// proxy.$http.post('/api-web/fault/solve', handleInfoForm.value, function (res) {
// if (res && res.success) {
// proxy.$global.showMsg("处理成功!");
// showHandleInfoDialog(false);
// } else {
// proxy.$global.showMsg("处理失败,请联系管理员!");
// }
// callback();
// });
proxy
.
$http
.
post
(
'/api-web/fault/faultHandle'
,
{
faultId
:
handleInfoForm
.
value
.
id
,
label
:
handleInfoForm
.
value
.
label
,
...
...
@@ -180,10 +183,12 @@ const handleInfo = () => {
return
{
handleInfoForm
,
handleInfoRules
,
setSolution
,
handleClick
,
handleInfoDialog
,
showHandleInfoDialog
,
saveHandleInfo
saveHandleInfo
,
handleInfoDialogWidth
}
}
export
default
{
...
...
@@ -195,6 +200,9 @@ export default {
),
'netLinks'
:
Vue
.
defineAsyncComponent
(
()
=>
myImport
(
'components/page/faultDiagnosis/result/netLinks/index'
)
),
'faultHis'
:
Vue
.
defineAsyncComponent
(
()
=>
myImport
(
'components/page/faultDiagnosis/result/faultHis/index'
)
)
},
data
()
{
...
...
@@ -327,10 +335,12 @@ export default {
const
{
handleInfoForm
,
handleInfoRules
,
setSolution
,
handleClick
,
handleInfoDialog
,
showHandleInfoDialog
,
saveHandleInfo
saveHandleInfo
,
handleInfoDialogWidth
}
=
handleInfo
();
// 挂载完
...
...
@@ -356,11 +366,12 @@ export default {
// 处理弹框
handleInfoForm
,
handleInfoRules
,
setSolution
,
handleClick
,
handleInfoDialog
,
showHandleInfoDialog
,
saveHandleInfo
saveHandleInfo
,
handleInfoDialogWidth
}
}
}
...
...
Please
register
or
login
to post a comment