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
c66dcb4a7be6dbc6d8ecf91147f314adf764a048
1 parent
91fdf9fa
机柜详情页面接口联调,所有机柜可点击进入详情
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
79 additions
and
47 deletions
hg-monitor-web-zj/src/main/resources/static/vue3/src/views/commonComponents/huzhouOne/index.js
hg-monitor-web-zj/src/main/resources/static/vue3/src/views/commonComponents/huzhouThree/index.js
hg-monitor-web-zj/src/main/resources/static/vue3/src/views/commonComponents/huzhouTwo/index.js
hg-monitor-web-zj/src/main/resources/static/vue3/src/views/commonComponents/machineRoomDetail/index.html
hg-monitor-web-zj/src/main/resources/static/vue3/src/views/commonComponents/machineRoomDetail/index.js
hg-monitor-web-zj/src/main/resources/static/vue3/src/views/commonComponents/xiaoshansecond/index.js
hg-monitor-web-zj/src/main/resources/static/vue3/src/views/commonComponents/xiaoshanseven/index.js
hg-monitor-web-zj/src/main/resources/static/vue3/src/views/commonComponents/xiaoshanthird/index.js
hg-monitor-web-zj/src/main/resources/static/vue3/src/views/commonComponents/huzhouOne/index.js
View file @
c66dcb4
...
...
@@ -1494,13 +1494,13 @@ export default {
Vue
.
onMounted
(()
=>
{
})
const
goDetail
=
(
item
)
=>
{
proxy
.
allowClickData
.
map
((
itemName
,
index
)
=>
{
if
(
item
.
name
==
itemName
){
// proxy.allowClickData.map((itemName,index)=>{
// if(item.name==itemName){
proxy
.
isDetailShow
=
true
;
console
.
log
(
"detail"
,
item
)
proxy
.
detailData
=
item
;
}
})
// }
// })
}
...
...
hg-monitor-web-zj/src/main/resources/static/vue3/src/views/commonComponents/huzhouThree/index.js
View file @
c66dcb4
...
...
@@ -263,12 +263,12 @@ export default {
})
const
goDetail
=
(
item
)
=>
{
proxy
.
allowClickData
.
map
((
itemName
,
index
)
=>
{
if
(
item
.
name
==
itemName
){
// proxy.allowClickData.map((itemName,index)=>{
// if(item.name==itemName){
proxy
.
isDetailShow
=
true
;
proxy
.
detailData
=
item
;
}
})
// }
// })
}
return
{
...
...
hg-monitor-web-zj/src/main/resources/static/vue3/src/views/commonComponents/huzhouTwo/index.js
View file @
c66dcb4
...
...
@@ -313,12 +313,12 @@ export default {
})
const
goDetail
=
(
item
)
=>
{
proxy
.
allowClickData
.
map
((
itemName
,
index
)
=>
{
if
(
item
.
name
==
itemName
){
// proxy.allowClickData.map((itemName,index)=>{
// if(item.name==itemName){
proxy
.
isDetailShow
=
true
;
proxy
.
detailData
=
item
;
}
})
// }
// })
}
return
{
...
...
hg-monitor-web-zj/src/main/resources/static/vue3/src/views/commonComponents/machineRoomDetail/index.html
View file @
c66dcb4
...
...
@@ -12,7 +12,7 @@
<div
class=
'img-serve'
>
<img
src=
"/vue3/src/assets/images/machineRoom/icon-state.png"
alt=
""
class=
'state'
>
<div
class=
'img-serve-text'
>
{{item.
name
}}
</div>
<div
class=
'img-serve-text'
>
{{item.
provider
}}
</div>
<div
class=
'lamp'
>
<img
src=
"/vue3/src/assets/images/machineRoom/icon-weblogical.png"
alt=
""
class=
'img-weblog'
>
<div
class=
'img-lamp'
>
...
...
@@ -54,7 +54,7 @@
<p>
品 牌:{{deviceDataInfo.brandName}}
</p>
<p>
型 号:{{deviceDataInfo.model}}
</p>
<p>
序 列 号:{{deviceDataInfo.serialNumber}}
</p>
<p>
业 务 IP:{{deviceDataInfo.
ServiceIP
}}
</p>
<p>
业 务 IP:{{deviceDataInfo.
ip
}}
</p>
<p>
用 途:{{deviceDataInfo.purpose}}
</p>
</div>
</div>
...
...
hg-monitor-web-zj/src/main/resources/static/vue3/src/views/commonComponents/machineRoomDetail/index.js
View file @
c66dcb4
...
...
@@ -16,23 +16,23 @@ export default {
deviceDataInfo
:
''
,
//设备详细信息
deviceDatas
:
[
{
name
:
'E12'
,
name
:
'E12'
,
//机柜名称
cabinetCapacity
:
'42U'
,
deviceData
:[
cabinetCapacity
:
'42U'
,
//机柜总U位数-目前都是42U
deviceData
:[
//机柜所有的服务器
{
name
:
'物理服务器'
,
resName
:
'管理决策二包(数据集市39)'
,
brandName
:
'浪潮'
,
model
:
'TS860'
,
serialNumber
:
'216365930'
,
ServiceIP
:
'80.12.73.39'
,
purpose
:
'管理决策二包使用'
,
uPosition
:
'1-8U'
,
name
:
'物理服务器'
,
//服务器名称
resName
:
'管理决策二包(数据集市39)'
,
//服务器资源名称
brandName
:
'浪潮'
,
//品牌
model
:
'TS860'
,
//型号
serialNumber
:
'216365930'
,
//序列号
ServiceIP
:
'80.12.73.39'
,
//业务ip
purpose
:
'管理决策二包使用'
,
//用途
uPosition
:
'1-8U'
,
//U位
}
],
deviceNum
:
'1'
,
alarmNum
:
'0'
deviceNum
:
'1'
,
//设备数量
alarmNum
:
'0'
//警告量
},
{
name
:
'E13'
,
...
...
@@ -168,29 +168,59 @@ export default {
setup
(
props
,
{
attrs
,
slots
,
emit
})
{
const
{
proxy
}
=
Vue
.
getCurrentInstance
();
const
isShowDevice
=
Vue
.
ref
(
false
);
const
theirRoom
=
Vue
.
ref
(
''
);
//机房名称
const
CabinetNum
=
props
.
detailData
.
name
;
//机柜编号
// 挂载完
Vue
.
onMounted
(()
=>
{
if
(
props
.
machineData
.
name
.
indexOf
(
'huzhou'
)
!=-
1
){
proxy
.
isCenter
=
true
;
proxy
.
theirRoom
=
'湖州灾备'
;
}
else
{
proxy
.
isCenter
=
false
;
proxy
.
theirRoom
=
'兴议机房'
;
}
proxy
.
getDeviceInfo
();
proxy
.
getData
();
// proxy.getDeviceInfo();
})
const
getData
=
()
=>
{
let
parmas
=
{
theirRoom
:
proxy
.
theirRoom
,
theirCabinet
:
CabinetNum
}
$
.
get
(
proxy
.
domainName
+
'/api-web/v32/res/cabinet?access_token='
+
proxy
.
accessToken
,
parmas
,
function
(
res
){
console
.
log
(
"res1"
,
res
)
if
(
res
){
let
resData
=
res
.
data
;
let
deviceDatas
=
[];
deviceDatas
.
push
({
name
:
CabinetNum
,
//机柜名称
cabinetCapacity
:
'42U'
,
//机柜总U位数-目前都是42U
deviceNum
:
resData
.
length
,
//设备数量
alarmNum
:
'0'
,
//警告量
deviceData
:
resData
})
proxy
.
deviceDatas
=
deviceDatas
;
console
.
log
(
"devdats"
,
proxy
.
deviceDatas
)
proxy
.
getDeviceInfo
()
}
})
}
const
getDeviceInfo
=
()
=>
{
proxy
.
deviceDatas
.
map
((
item
,
index
)
=>
{
if
(
CabinetNum
==
item
.
name
){
proxy
.
infoData
=
item
;
proxy
.
serviceData
=
item
.
deviceData
item
.
deviceData
.
map
((
itemD
,
indexD
)
=>
{
let
strArr
=
itemD
.
uPosition
.
split
(
"U"
);
//[0]1-4 [1]U
let
leftStrArr
=
strArr
[
0
].
split
(
'-'
);
//[0]1 [1]4
let
leftStr
=
leftStrArr
[
0
];
let
rightStr
=
leftStrArr
[
1
];
// let strArr=itemD.uPosition.split("U");//[0]1-4 [1]U
// let leftStrArr=strArr[0].split('-');//[0]1 [1]4
let
leftStr
=
itemD
.
startU
;
//leftStrArr[0];
let
rightStr
=
itemD
.
endU
;
//leftStrArr[1];
itemD
.
serviceHeight
=
rightStr
;
//nU的设备
let
serveNum
=
1
;
if
(
leftStr
==
1
){
...
...
@@ -219,7 +249,9 @@ export default {
return
{
showDevice
,
isShowDevice
,
getDeviceInfo
getDeviceInfo
,
getData
,
theirRoom
}
}
}
\ No newline at end of file
...
...
hg-monitor-web-zj/src/main/resources/static/vue3/src/views/commonComponents/xiaoshansecond/index.js
View file @
c66dcb4
...
...
@@ -26,7 +26,7 @@ export default {
detailData
:
''
,
//详情数据
htmlName
:
'xiaoshansecond'
,
machineData
:
this
.
src
,
allowClickData
:[
'E12'
,
'E13'
],
//允许进入详情的机柜
allowClickData
:[
'E12'
,
'E13'
,
'F14'
],
//允许进入详情的机柜
tableData
:[
[
...
...
@@ -477,12 +477,12 @@ export default {
})
const
goDetail
=
(
item
)
=>
{
proxy
.
allowClickData
.
map
((
itemName
,
index
)
=>
{
if
(
item
.
name
==
itemName
){
// proxy.allowClickData.map((itemName,index)=>{
// if(item.name==itemName){
proxy
.
isDetailShow
=
true
;
proxy
.
detailData
=
item
;
}
})
// }
// })
}
return
{
...
...
hg-monitor-web-zj/src/main/resources/static/vue3/src/views/commonComponents/xiaoshanseven/index.js
View file @
c66dcb4
...
...
@@ -1082,12 +1082,12 @@ export default {
})
const
goDetail
=
(
item
)
=>
{
proxy
.
allowClickData
.
map
((
itemName
,
index
)
=>
{
if
(
item
.
name
==
itemName
){
// proxy.allowClickData.map((itemName,index)=>{
// if(item.name==itemName){
proxy
.
isDetailShow
=
true
;
proxy
.
detailData
=
item
;
}
})
// }
// })
}
return
{
...
...
hg-monitor-web-zj/src/main/resources/static/vue3/src/views/commonComponents/xiaoshanthird/index.js
View file @
c66dcb4
...
...
@@ -621,12 +621,12 @@ export default {
})
const
goDetail
=
(
item
)
=>
{
proxy
.
allowClickData
.
map
((
itemName
,
index
)
=>
{
if
(
item
.
name
==
itemName
){
// proxy.allowClickData.map((itemName,index)=>{
// if(item.name==itemName){
proxy
.
isDetailShow
=
true
;
proxy
.
detailData
=
item
;
}
})
// }
// })
}
return
{
...
...
Please
register
or
login
to post a comment