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
cf983d1e695b00b89d9fb2ccbfcdd3764253709d
2 parents
6c62f626
6bb11e89
杭州-首页-大屏title修改
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
44 additions
and
10 deletions
hg-monitor-web-base/src/main/resources/static/src/controller/favorites.js
hg-monitor-web-base/src/main/resources/static/src/controller/main-biz-card.js
hg-monitor-web-base/src/main/resources/static/src/controller/resindex.js
hg-monitor-web-base/src/main/resources/static/src/controller/reslist.js
hg-monitor-web-base/src/main/resources/static/src/views/favorites/index.html
hg-monitor-web-base/src/main/resources/static/vue3/src/components/common/document/index.js
hg-monitor-web-zj/src/main/resources/static/src/views/layout.html
hg-monitor-web-base/src/main/resources/static/src/controller/favorites.js
View file @
cf983d1
...
...
@@ -41,7 +41,10 @@ layui.define(['table', 'admin', 'form', 'common', 'sessions', 'reslist', 'common
loadFavoriteList
(
"0"
);
//解决点击面包屑,favorites_parentId没有赋值问题 joke add 20200518 开始
$
(
"#favorites_parentId"
).
val
(
'0'
);
//解决点击面包屑,favorites_parentId没有赋值问题 joke add 20200518 开始
//解决点击面包屑,favorites_parentId没有赋值问题 joke add 20200518 结束
//清空面包屑其他按钮选中状态
$
(
".layui-breadcrumb .breadcrumb_a"
).
removeClass
(
"active"
);
$
(
"#tofavorite_home"
).
addClass
(
"active"
);
});
//创建收藏夹
$
(
"#create_favorite"
).
on
(
"click"
,
function
()
{
...
...
@@ -57,7 +60,7 @@ layui.define(['table', 'admin', 'form', 'common', 'sessions', 'reslist', 'common
yes
:
function
(
index
,
layero
)
{
var
favoritesName
=
$
(
layero
).
find
(
'input[name=favoritesName]'
).
val
();
// Start xwx 2021/11/1 新建文件夹名称不能为空
if
(
favoritesName
!=
''
){
if
(
favoritesName
.
trim
()
!=
''
){
saveFavorite
(
null
,
favoritesName
,
parentId
);
$
(
"e.empty"
).
hide
();
//刷新列表
...
...
@@ -175,10 +178,16 @@ layui.define(['table', 'admin', 'form', 'common', 'sessions', 'reslist', 'common
$
(
".empty"
).
show
();
loadFavoriteList
(
id
);
}
//反射面包屑选中,先清空所有选中状态 joke add 20211203
$
(
".layui-breadcrumb .breadcrumb_a"
).
removeClass
(
"active"
);
$
(
"#tofavorite_home"
).
removeClass
(
"active"
);
//反射面包屑选中 joke add 20211203
$
(
'#'
+
id
).
addClass
(
"active"
);
//面包屑点击事件
$
(
".layui-breadcrumb a.breadcrumb_a"
).
unbind
(
'click'
).
on
(
"click"
,
function
()
{
$
(
".layui-breadcrumb .breadcrumb_a"
).
removeClass
(
"active"
);
//点击面包屑时,去除我的收藏夹选中状态 joke add 20211203
$
(
"#tofavorite_home"
).
removeClass
(
"active"
);
$
(
this
).
addClass
(
"active"
);
var
id
=
$
(
this
).
attr
(
"id"
);
var
flag
=
$
(
this
).
data
(
"flag"
);
...
...
@@ -213,6 +222,10 @@ layui.define(['table', 'admin', 'form', 'common', 'sessions', 'reslist', 'common
$
(
".layui-icon-ok"
).
on
(
"click"
,
function
(
e
)
{
e
.
stopPropagation
();
var
name
=
$
(
"#name_"
+
id
).
val
();
if
(
name
.
trim
()
==
''
){
layer
.
msg
(
'收藏夹名称不能为空'
,
{
icon
:
0
,
time
:
3000
});
return
;
}
saveFavorite
(
id
,
name
,
parentId
,
"title_"
+
id
);
});
//编辑收藏夹下取消按钮点击事件 joke add 20200515
...
...
@@ -224,7 +237,8 @@ layui.define(['table', 'admin', 'form', 'common', 'sessions', 'reslist', 'common
//删除收藏夹
$
(
".favorite-icon-del"
).
on
(
"click"
,
function
()
{
var
id
=
$
(
this
).
data
(
"id"
);
deleteFavorite
(
id
);
var
pid
=
$
(
this
).
data
(
"pid"
);
deleteFavorite
(
id
,
pid
);
});
}
//判断字符串是否再集合中
...
...
@@ -252,7 +266,7 @@ layui.define(['table', 'admin', 'form', 'common', 'sessions', 'reslist', 'common
});
}
//删除收藏夹
function
deleteFavorite
(
id
)
{
function
deleteFavorite
(
id
,
pid
)
{
//确认提示框
layer
.
confirm
(
'即将删除收藏夹及所有子收藏夹,删除后将无法恢复,您确定要删除吗?'
,
{
btn
:
[
'确定'
,
'取消'
]
//按钮
...
...
@@ -266,6 +280,8 @@ layui.define(['table', 'admin', 'form', 'common', 'sessions', 'reslist', 'common
offset
:
'15px'
,
icon
:
1
,
time
:
1000
},
function
()
{
// loadFavoriteList(pid);
});
}).
error
(
function
(
error
)
{
console
.
log
(
error
);
...
...
hg-monitor-web-base/src/main/resources/static/src/controller/main-biz-card.js
View file @
cf983d1
...
...
@@ -315,7 +315,12 @@ layui.define(['common', 'swiper', 'admin','commonDetail','mxClient','sessions','
layer
.
msg
(
'暂无告警'
,
{
icon
:
0
});
return
false
;
}
//不以资源类型不包括父节点的资源类型 包括阿里云、华为云
if
(
"ALI_CLOUD_PLAT"
==
_resType
||
"HUAWEI_CLOUD_PLAT"
==
_resType
){
_resType
=
_resType
.
substring
(
0
,
_resType
.
lastIndexOf
(
"_"
));
}
$
(
this
).
attr
(
"lay-href"
,
"/alarm/activewarning/restype="
+
_resType
+
"/level="
+
level
);
// $(this).trigger();
});
// 点击资源数量
...
...
hg-monitor-web-base/src/main/resources/static/src/controller/resindex.js
View file @
cf983d1
...
...
@@ -1609,7 +1609,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
id
:
'layer-select-favorites'
,
content
:
'<div class="div-select-favorites"><div id="slt-favorites-tree"></div></div>'
,
offset
:
'150px'
,
area
:
[
'20%'
,
'
1
5%'
],
area
:
[
'20%'
,
'
2
5%'
],
btn
:
[
'选择'
,
'取消'
],
resize
:
false
,
success
:
function
()
{
...
...
@@ -1622,7 +1622,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
clickClose
:
true
,
autoRow
:
true
,
filterable
:
true
,
height
:
'
auto
'
,
height
:
'
200px
'
,
toolbar
:
{
show
:
true
,
},
...
...
@@ -1636,7 +1636,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
showFolderIcon
:
true
,
showLine
:
true
,
indent
:
20
,
expandedKeys
:
[
-
3
]
,
expandedKeys
:
true
,
strict
:
false
},
data
:
data
...
...
hg-monitor-web-base/src/main/resources/static/src/controller/reslist.js
View file @
cf983d1
...
...
@@ -163,6 +163,8 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect'
editMode
:
'true'
},
done
:
function
(
res
)
{
//更新table_data数据 joke add 20211206
table_data
=
res
.
data
;
if
(
resListSelectIds
.
length
>
0
){
$
.
each
(
res
.
data
,
function
(
i
,
e
)
{
$
.
each
(
resListSelectIds
,
function
(
j
,
k
)
{
...
...
hg-monitor-web-base/src/main/resources/static/src/views/favorites/index.html
View file @
cf983d1
...
...
@@ -79,7 +79,7 @@
<
div
class
=
"card-main"
>
<
div
class
=
"layui-btn-group favorites-btngroup"
style
=
"z-index: 99"
>
<
i
class
=
"layui-icon favorite-icon-edit"
title
=
"编辑"
data
-
id
=
"{{item.favId}}"
data
-
pid
=
"{{item.parentId}}"
>&
#
xe642
;
<
/i
>
<
i
class
=
"layui-icon favorite-icon-del"
title
=
"删除"
data
-
id
=
"{{item.favId}}"
>&
#
xe640
;
<
/i
>
<
i
class
=
"layui-icon favorite-icon-del"
title
=
"删除"
data
-
id
=
"{{item.favId}}"
data
-
pid
=
"{{item.parentId}}"
>&
#
xe640
;
<
/i
>
<
/div
>
<
div
class
=
"favorite-icon"
data
-
id
=
"{{item.favId}}"
data
-
pid
=
"{{item.parentId}}"
data
-
child
=
"{{item.childNum}}"
data
-
name
=
"{{item.favName}}"
data
-
res
=
"{{item.resNum}}"
>
...
...
hg-monitor-web-base/src/main/resources/static/vue3/src/components/common/document/index.js
View file @
cf983d1
...
...
@@ -666,8 +666,13 @@ export default {
* 上传
*/
let
showUploadFile
=
(
flg
)
=>
{
if
(
flg
&&
currentNodeData
.
value
.
id
==
0
){
proxy
.
$global
.
showMsg
(
"根目录不可以上传文件!"
,
"warning"
);
}
else
{
showUploadDialogVisible
.
value
=
flg
;
}
}
let
uploadCallBack
=
({
document
,
fileInfo
})
=>
{
reload
(
false
);
// 执行回调
...
...
hg-monitor-web-zj/src/main/resources/static/src/views/layout.html
View file @
cf983d1
...
...
@@ -43,16 +43,22 @@
<i
class=
"layui-icon layui-icon-shrink-right"
id=
"LAY_app_flexible"
></i>
</a>
</li>
<!--判定是否有daping角色,如果有则显示该菜单 joke add 20211203-->
<script
type=
"text/html"
template
lay-url=
"{{sessionStorage.getItem('domainName')}}/api-user/users/checkHasRole?roleCode=daping"
>
{{
#
if
(
d
.
count
>
0
){
}}
<
li
class
=
"layui-nav-item"
lay
-
tips
=
"监控一体化视图"
>
<
a
href
=
"javascript:;"
layadmin
-
event
=
"toBigScreen"
><
img
src
=
"/src/style/img/icon-daping.png"
style
=
"width: 16px;height: 16px"
><
/a
>
<
/li
>
{{
#
}
}}
</script>
<script
type=
"text/html"
template
lay-url=
"{{sessionStorage.getItem('domainName')}}/api-web/sxview/getbizListByUser?access_token={{localStorage.getItem('access_token')}}"
>
{{
#
if
(
d
.
data
.
length
>
0
){
}}
<
li
class
=
"layui-nav-item"
>
<
div
id
=
"toYTHView_div"
>
<
dd
layadmin
-
event
=
"toYTHViewScreen"
lay
-
tips
=
"一体化监控
台"
><
a
><
img
src
=
"/src/style/img/icon-yitihuadaping.png"
style
=
"width: 16px;height: 16px"
><
/a></
dd
>
<
dd
layadmin
-
event
=
"toYTHViewScreen"
title
=
"一体化控制
台"
><
a
><
img
src
=
"/src/style/img/icon-yitihuadaping.png"
style
=
"width: 16px;height: 16px"
><
/a></
dd
>
<
/div
>
<
/li
>
...
...
Please
register
or
login
to post a comment