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
bfba23ad9307798b1349a3717ba7df02b75f8059
2 parents
c31def79
3229a214
Merge branch 'master' of
http://192.168.1.136:82/monitor_v3/hg-monitor-web
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
10 deletions
hg-monitor-web-base/src/main/resources/static/vue3/src/components/common/dateRange/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/views/portSense/index.html
hg-monitor-web-base/src/main/resources/static/vue3/src/views/portSenseConfig/index.js
hg-monitor-web-base/src/main/resources/static/vue3/src/components/common/dateRange/index.js
View file @
bfba23a
...
...
@@ -59,7 +59,7 @@ export default {
])
//自定义选择时间
let
dateValue
=
Vue
.
ref
();
let
dateValue
=
Vue
.
ref
(
[]
);
//选中的聚合频率
let
checkedId
=
Vue
.
ref
();
let
commandVal
=
Vue
.
ref
(
'聚合频率'
)
...
...
@@ -239,7 +239,8 @@ export default {
const
getDateTime
=
(
newDate
)
=>
{
let
dateTime
=
''
;
let
year
=
newDate
.
getFullYear
();
//获取当前年
let
month
=
timeFormat
(
newDate
.
getMonth
()
+
1
);
//获取当前月
let
month1
=
(
newDate
.
getMonth
()
+
1
)
+
''
;
let
month
=
timeFormat
(
month1
);
//获取当前月
let
day
=
timeFormat
(
newDate
.
getDate
());
//获取当前日
let
hours
=
timeFormat
(
newDate
.
getHours
()
+
''
);
//获取当前时
let
minutes
=
timeFormat
(
newDate
.
getMinutes
()
+
''
);
//获取当前分
...
...
@@ -281,6 +282,8 @@ export default {
if
(
props
.
dateValueData
&&
props
.
dateValueData
.
length
>
0
){
dateValue
.
value
=
props
.
dateValueData
changeDate
(
dateValue
.
value
);
}
else
{
oneDay
();
}
checkedId
.
value
=
props
.
intervalGroup
;
}
...
...
@@ -304,12 +307,19 @@ export default {
});
}
const
oneDay
=
()
=>
{
const
end
=
getDateTime
(
new
Date
());
const
start
=
formatDate
(
1
,
'd'
);
dateValue
.
value
=
[
start
,
end
]
changeDate
(
dateValue
.
value
)
}
// 挂载完
Vue
.
onMounted
(()
=>
{
isDetail
();
})
return
{
oneDay
,
commandVal
,
calcDayNum
,
calcDay
,
...
...
hg-monitor-web-base/src/main/resources/static/vue3/src/components/common/table-page/index.html
View file @
bfba23a
<div
>
<!-- 表格-->
<el-table
:border=
"showBorder"
v-loading=
"loading"
:size=
"size"
ref=
"multipleTable"
@
selection-change=
"handleSelectionChange"
:data=
"dataList"
stripe
header-row-class-name=
"tbl-header-class"
:height=
"height"
style=
"width: 100%;margin: 0px 0px;"
>
style=
"width: 100%;margin: 0px 0px;
font-size:13.5px;
"
>
<el-table-column
v-if=
"showSelection && columns.length > 0"
align=
"center"
type=
"selection"
width=
"55"
/>
<el-table-column
v-if=
"showIndex && columns.length > 0"
type=
"index"
:label=
"indexLabel"
align=
"center"
width=
"50"
/>
...
...
@@ -25,7 +25,7 @@
<div
v-html=
"getTextContent(scope.row[item.prop])"
>
</div>
</template>
<div
style=
"overflow: hidden; text-overflow: ellipsis;
font-size:15px;
display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;"
>
<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>
...
...
hg-monitor-web-base/src/main/resources/static/vue3/src/components/common/table-page/index.js
View file @
bfba23a
...
...
@@ -162,7 +162,7 @@ export default {
let
prePage
=
(
val
)
=>
{
// console.log(`当前页: ${val}`)
// props.currentPage = val - 1;
currentPage
.
value
=
val
;
currentPage
.
value
=
val
-
1
;
callback
();
}
...
...
@@ -170,7 +170,7 @@ export default {
let
nextPage
=
(
val
)
=>
{
// console.log(`当前页: ${val}`)
// props.currentPage = val + 1;
currentPage
.
value
=
val
;
currentPage
.
value
=
val
+
1
;
callback
();
}
...
...
hg-monitor-web-base/src/main/resources/static/vue3/src/views/portSense/index.html
View file @
bfba23a
...
...
@@ -5,11 +5,13 @@
<el-row
style=
"margin-bottom: 5px;margin-top: 5px"
>
<el-col
:span=
"24"
>
<div
class=
"flex-div-start margin-top-bottom-10"
>
<el-tooltip
placement=
"right-end"
>
<template
#
content
>
关键字检索包含
<br
/>
资源名称
<br
/>
IP地址
</template>
<el-tooltip>
<template
#
content
>
关键字检索包含
<br/>
资源名称
<br/>
IP地址
</template>
<el-input
style=
"width:160px;margin-left: 10px;float: left;"
class=
"margin-right-10"
v-model=
"keyWords"
placeholder=
"输入关键字"
@
click
.
danger=
"deleteItem(scope.row,scope.$index)"
/>
placeholder=
"输入关键字"
clearable
/>
</el-input>
</el-tooltip>
<el-dropdown
style=
"margin-top: -15px;margin-left: 10px;float: left;"
>
<el-icon
class=
"el-icon--right"
>
...
...
@@ -57,9 +59,12 @@
<template
#
default=
"{row,prop,column}"
>
<div
v-if=
"prop == 'resName'"
>
<!-- 资源名称点击事件 -->
<el-tooltip
placement=
"top"
>
<el-button
type=
"text"
size=
"small"
@
click
.
prevent=
"resourceClick(row)"
>
<span
class=
""
>
{{row.resName}}
</span>
</el-button>
<template
#
content
>
{{row.resName}}
</template>
</el-tooltip>
</div>
</template>
<template
#
tools=
"{scope}"
>
...
...
hg-monitor-web-base/src/main/resources/static/vue3/src/views/portSenseConfig/index.js
View file @
bfba23a
...
...
@@ -202,6 +202,14 @@ export default {
}
else
{
if
([
'protocolType'
,
'portDesc'
].
indexOf
(
e
.
prop
)
===
-
1
&&
!
/^
\d
+$/
.
test
(
item
[
e
.
prop
]))
{
msg
=
e
.
label
+
'请输入数字'
;
}
else
{
if
([
'protocolType'
,
'portDesc'
].
indexOf
(
e
.
prop
)
===
-
1
&&
item
[
e
.
prop
].
length
>=
8
){
msg
=
e
.
label
+
'不能超过8位'
;
}
else
{
if
([
'protocolType'
,
'portDesc'
].
indexOf
(
e
.
prop
)
===
-
1
&&
item
[
e
.
prop
]
<=
0
){
msg
=
e
.
label
+
'只能大于零'
;
}
}
}
}
})
...
...
Please
register
or
login
to post a comment