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
王涛
3 years ago
Commit
b562cd07d4724581ca1d9790efc53e1be22a377a
2 parents
880f1748
67d3e527
Merge branch 'master' of
http://192.168.1.136:82/monitor_v3/hg-monitor-web
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
49 additions
and
21 deletions
hg-monitor-web-zj/src/main/resources/static/src/controller/activewarning.js
hg-monitor-web-zj/src/main/resources/static/src/controller/bustypeAdd.js
hg-monitor-web-zj/src/main/resources/static/src/views/baseconfig/bustype/add.html
hg-monitor-web-zj/src/main/resources/static/vue3/src/components/page/operationMaintenance/pj/index.html
hg-monitor-web-zj/src/main/resources/static/vue3/src/components/page/operationMaintenance/pj/index.js
hg-monitor-web-zj/src/main/resources/static/vue3/src/views/cacheData/index.js
hg-monitor-web-zj/src/main/resources/static/src/controller/activewarning.js
View file @
b562cd0
...
...
@@ -637,22 +637,24 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common',
field
:
'alarmNo'
,
title
:
'告警编号'
,
align
:
'center'
,
width
:
140
,
sort
:
true
,
}
,
{
field
:
'resName'
,
title
:
'资源名称'
,
width
:
2
3
0
,
sort
:
true
,
field
:
'resName'
,
title
:
'资源名称'
,
width
:
2
5
0
,
sort
:
true
,
templet
:
`
<
div
>
<
div
style
=
"display: flex;align-items: center;"
>
{{
#
if
(
d
.
confirmStatus
==
0
||
d
.
confirmStatus
==
null
)
{
}}
<
i
lay
-
tips
=
"新的告警未确认,告警确认后消失!"
class
=
"shake iconfont"
style
=
"color: red;font-size: 28px;"
>&
#
xe68b
;
<
/i
>
{{
#
}
}}
{{
#
if
(
d
.
isBus
==
'N'
){
}}
<
span
data
-
isBus
=
"{{d.isBus}}"
data
-
resid
=
"{{d.resId}}"
data
-
restype
=
"{{d.resType}}"
data
-
warn
-
zymc
=
"{{d.id}}"
data
-
ip
=
"{{d.ip}}"
<
span
lay
-
tips
=
"{{ d.resName }}"
style
=
"margin:0 5px;max-width: 160px;overflow: hidden; text-overflow: ellipsis; white-space: nowrap;display: inline-block;"
data
-
isBus
=
"{{d.isBus}}"
data
-
resid
=
"{{d.resId}}"
data
-
restype
=
"{{d.resType}}"
data
-
warn
-
zymc
=
"{{d.id}}"
data
-
ip
=
"{{d.ip}}"
data
-
resname
=
"{{d.resName}}"
data
-
pingenable
=
"{{d.pingEnable}}"
class
=
"layui-table-link"
>
{{
d
.
resName
}}
<
/span
>
{{
#
}
else
{
}}
<
span
data
-
isBus
=
"{{d.isBus}}"
data
-
resid
=
"{{d.resId}}"
data
-
restype
=
"{{d.resType}}"
data
-
warn
-
zymc
=
"{{d.id}}"
data
-
ip
=
"{{d.ip}}"
<
span
lay
-
tips
=
"{{ d.resName }}"
style
=
"margin:0 5px;max-width: 160px;overflow: hidden; text-overflow: ellipsis; white-space: nowrap;display: inline-block;"
data
-
isBus
=
"{{d.isBus}}"
data
-
resid
=
"{{d.resId}}"
data
-
restype
=
"{{d.resType}}"
data
-
warn
-
zymc
=
"{{d.id}}"
data
-
ip
=
"{{d.ip}}"
data
-
resname
=
"{{d.resName}}"
data
-
pingenable
=
"{{d.pingEnable}}"
>
{{
d
.
resName
}}
<
/span
>
{{
#
}
}}
<
a
class
=
"layui-icon reslist-view-topo hide"
data
-
resid
=
"{{d.resId}}"
lay
-
tips
=
"查看资源拓扑"
><
i
class
=
"iconfont"
style
=
"font-size: 20px;
color: #FEB61E;"
>
<
/i></
a
>
<
/div
>
<
/div
>
`
}
,
{
...
...
hg-monitor-web-zj/src/main/resources/static/src/controller/bustypeAdd.js
View file @
b562cd0
...
...
@@ -83,10 +83,11 @@ layui.define(['table', 'form', 'admin', 'layer', 'laytpl', 'common', 'view', 'se
}
//是否是乙方运维 1是,0不是
let
system_type
=
busType
.
isOps
||
busType
.
isOps
==
0
?
busType
.
isOps
:
1
;
if
(
system_type
!=
1
)
{
//不是乙方运维 隐藏项目 是否虚拟
可以
点击
if
(
system_type
!=
1
)
{
//不是乙方运维 隐藏项目 是否虚拟
不能
点击
layui
.
jquery
(
'input[name="system_type"]'
).
removeAttr
(
'checked'
);
//改变开关为 关
$
(
'#select_principalName'
).
addClass
(
"hide"
);
layui
.
jquery
(
'input[name="isvirtual"]'
).
removeAttr
(
'disabled'
);
//可以点击
//layui.jquery('input[name="isvirtual"]').removeAttr('disabled');//可以点击
layui
.
jquery
(
'input[name="isvirtual"]'
).
attr
(
"disabled"
,
true
)
//不能点击
}
//是否是虚拟 0是,1不是
let
isvirtual
=
busType
.
isvirtual
||
busType
.
isvirtual
==
0
?
busType
.
isvirtual
:
0
;
...
...
@@ -111,19 +112,19 @@ layui.define(['table', 'form', 'admin', 'layer', 'laytpl', 'common', 'view', 'se
if
(
!
sign
)
{
//不是乙方运维 下拉框隐藏 是否是虚拟项目可以点击
$
(
'#select_principalName'
).
addClass
(
"hide"
);
opsSelect
.
setValue
([]);
layui
.
jquery
(
'input[name="isvirtual"]'
).
removeAttr
(
'disabled'
);
//可以点击
//layui.jquery('input[name="isvirtual"]').removeAttr('disabled');//可以点击
//删除原来的组件 新加dom
$
(
'#isvirtual_ops_switch'
).
empty
();
//删除子元素
let
html
=
'<input type="checkbox" lay-skin="switch" name="isvirtual" lay-filter="switch_isVirtual" value="0" lay-text="是|否" disabled/>'
;
$
(
'#isvirtual_ops_switch'
).
append
(
html
);
//追加子元素
//重新渲染
form
.
render
();
}
else
{
//是乙方运维 下拉框展示 只能是虚拟项目 不能更改是否是虚拟项目
$
(
'#select_principalName'
).
removeClass
(
'hide'
);
//删除原来的组件 新加dom
$
(
'#isvirtual_ops_switch'
).
empty
();
//删除子元素
let
html
=
'<input type="checkbox" lay-skin="switch" name="isvirtual" lay-filter="switch_isVirtual" value="0" lay-text="是|否" checked disabled/>'
;
$
(
'#isvirtual_ops_switch'
).
append
(
html
);
//追加子元素
//layui.jquery('input[name="isvirtual"]').attr("checked", true);//改变状态为开
//layui.jquery('input[name="isvirtual"]').attr("disabled", true)//不能点击
layui
.
jquery
(
'input[name="isvirtual"]'
).
removeAttr
(
'disabled'
);
//可以点击
//渲染下拉框
initUserSelectOps
();
//重新渲染
...
...
hg-monitor-web-zj/src/main/resources/static/src/views/baseconfig/bustype/add.html
View file @
b562cd0
...
...
@@ -83,7 +83,7 @@
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
虚拟业务
<span
style=
"color: red"
>
*
</span></label>
<div
class=
"layui-input-block"
id=
"isvirtual_ops_switch"
>
<input
type=
"checkbox"
lay-skin=
"switch"
name=
"isvirtual"
lay-filter=
"switch_isVirtual"
value=
"0"
lay-text=
"是|否"
checked
disabled
/>
<input
type=
"checkbox"
lay-skin=
"switch"
name=
"isvirtual"
lay-filter=
"switch_isVirtual"
value=
"0"
lay-text=
"是|否"
checked
/>
</div>
</div>
<button
id=
"btn-bustype-submit"
class=
"hide"
lay-submit
lay-filter=
"bus-type-submit"
>
提交
</button>
...
...
hg-monitor-web-zj/src/main/resources/static/vue3/src/components/page/operationMaintenance/pj/index.html
View file @
b562cd0
<div>
<div
v-show=
"showTable"
>
<div>
<!-- 人员信息总汇-->
<el-divider
content-position=
"left"
>
项目评价汇总
</el-divider>
...
...
hg-monitor-web-zj/src/main/resources/static/vue3/src/components/page/operationMaintenance/pj/index.js
View file @
b562cd0
...
...
@@ -115,7 +115,7 @@ export default {
let
dataList
=
Vue
.
ref
([]);
let
currentPage
=
Vue
.
ref
(
1
);
let
total
=
Vue
.
ref
(
0
);
let
showTable
=
Vue
.
ref
(
true
);
// 获取表格数据
let
getPage
=
(
obj
)
=>
{
...
...
@@ -140,12 +140,26 @@ export default {
total
.
value
=
0
;
}
});
getShowTable
();
}
//虚拟业务不展示项目评价
let
getShowTable
=
()
=>
{
if
(
!
props
.
treeNode
.
map
||
!
props
.
treeNode
.
map
.
nodeType
)
{
return
;
}
let
params
=
{
"projectId"
:
props
.
treeNode
.
map
.
nodeType
.
projectId
}
proxy
.
$http
.
get
(
"/api-web/bOpsProject/selectByProjectId"
,
params
,
function
(
res
)
{
if
(
res
&&
res
.
object
)
{
showTable
.
value
=
res
.
object
.
isvirtual
!==
'0'
;
}
});
}
// 挂载完
Vue
.
onMounted
(()
=>
{
getPage
();
if
(
props
.
height
&&
props
.
height
==
0
)
{
props
.
height
=
window
.
innerHeight
-
130
}
...
...
@@ -161,6 +175,7 @@ export default {
dataList
,
currentPage
,
total
,
showTable
,
getPage
}
}
...
...
hg-monitor-web-zj/src/main/resources/static/vue3/src/views/cacheData/index.js
View file @
b562cd0
...
...
@@ -26,8 +26,15 @@ export default {
//表格字段
let
columns
=
Vue
.
ref
([
{
prop
:
'classify'
,
label
:
'分类'
,
prop
:
'classify1'
,
label
:
'一级分类'
,
sortable
:
true
,
align
:
'center'
,
width
:
'300'
},
{
prop
:
'classify2'
,
label
:
'二级分类'
,
sortable
:
true
,
align
:
'center'
,
width
:
'300'
...
...
@@ -36,7 +43,7 @@ export default {
prop
:
'key'
,
label
:
'缓存key'
,
sortable
:
true
,
align
:
'
center
'
,
align
:
'
left
'
,
},
])
let
currentPage
=
Vue
.
ref
(
1
);
...
...
@@ -84,13 +91,16 @@ export default {
}
proxy
.
$http
.
get
(
`
/
api
-
web
/
redis
/
cache
/
key
`
,
params
,
function
(
res
)
{
if
(
res
)
{
viewData
.
value
=
prettyFormat
([
res
])
;
if
(
res
&&
res
.
object
)
{
viewData
.
value
=
prettyFormat
(
res
.
object
)
;
}
else
{
viewData
.
value
=
'暂无数据'
;
}
cacheVisible
.
value
=
true
;
}
});
}
//格式化json数据
let
prettyFormat
=
(
code
)
=>
{
try
{
for
(
const
key
in
code
)
{
...
...
Please
register
or
login
to post a comment