feat:显示顶部详情
This commit is contained in:
@@ -14,11 +14,10 @@
|
|||||||
<el-dropdown
|
<el-dropdown
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="showLayout.indexOf('detailViewSet') > -1"
|
v-if="showLayout.indexOf('detailViewSet') > -1"
|
||||||
class="margin-l-5"
|
|
||||||
@command="changeDetailType">
|
@command="changeDetailType">
|
||||||
<button class="top-tool-btn table-column-setting"
|
<button class="top-tool-btn table-column-setting"
|
||||||
type="button">
|
type="button">
|
||||||
<i class="nz-icon nz-icon-alert-list" />
|
<i class="nz-icon nz-icon-guzhangshuju" />
|
||||||
</button>
|
</button>
|
||||||
<el-dropdown-menu slot="dropdown" >
|
<el-dropdown-menu slot="dropdown" >
|
||||||
<el-dropdown-item :command="'list'" :class="detailType === 'list' ? 'active' : ''">列表</el-dropdown-item>
|
<el-dropdown-item :command="'list'" :class="detailType === 'list' ? 'active' : ''">列表</el-dropdown-item>
|
||||||
|
|||||||
@@ -0,0 +1,83 @@
|
|||||||
|
<template>
|
||||||
|
<div style="height: 100%">
|
||||||
|
<div v-if="from === fromRoute.asset" class="detail-title-box">
|
||||||
|
<div>
|
||||||
|
<span class="detail-title-key">Data center :</span> <span class="detail-title-value">{{obj.dc.name}}</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span class="detail-title-key">Cabinet :</span> <span class="detail-title-value">{{obj.cabinet.name}}</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span class="detail-title-key">Alert :</span> <span class="detail-title-value"><i :class="obj.alertNum ? 'red' : 'green'" class="nz-icon nz-icon-overview-alert"></i> {{obj.alertNum}}</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span class="detail-title-key">Endpoint :</span> <span class="detail-title-value"><i class="nz-icon nz-icon-overview-endpoint monitorColor"></i> {{obj.endpointNum}}</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span class="detail-title-key">Brand :</span> <span class="detail-title-value">{{obj.brand.name}}</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span class="detail-title-key">Brand :</span> <span class="detail-title-value">{{obj.model.name}}</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span class="detail-title-key">SN :</span> <span class="detail-title-value">{{obj.sn}}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { fromRoute } from '@/components/common/js/constants'
|
||||||
|
export default {
|
||||||
|
name: 'detailRightTop',
|
||||||
|
props: {
|
||||||
|
obj: Object, // 关联的实体对象
|
||||||
|
from: String // 来自哪个页面
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
fromRoute: fromRoute
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
from: {
|
||||||
|
immediate: true,
|
||||||
|
handler (n) {
|
||||||
|
console.log(n === fromRoute.asset)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.detail-title-box{
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
overflow-x: auto;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
height: 100%;
|
||||||
|
padding-left: 15px;
|
||||||
|
& > div{
|
||||||
|
height: 100%;
|
||||||
|
line-height: 60px;
|
||||||
|
margin-right: 40px;
|
||||||
|
}
|
||||||
|
.detail-title-key{
|
||||||
|
font-size: 14px;
|
||||||
|
color: #666666;
|
||||||
|
letter-spacing: 0;
|
||||||
|
line-height: 20px;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
.detail-title-value{
|
||||||
|
font-size: 14px;
|
||||||
|
color: #333333;
|
||||||
|
letter-spacing: 0;
|
||||||
|
line-height: 20px;
|
||||||
|
font-weight: 400;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="sub-box">
|
<div class="sub-box">
|
||||||
<div style="height: 60px;background: #FFFFFF;border: 1px solid #E7EAED;margin-bottom: 10px">
|
<div class="detail-view-right-top">
|
||||||
|
<detail-right-top :obj="obj" :from="from"></detail-right-top>
|
||||||
</div>
|
</div>
|
||||||
<div class="sub-list__tabs">
|
<div class="sub-list__tabs">
|
||||||
<!--机柜-->
|
<!--机柜-->
|
||||||
@@ -64,6 +64,7 @@ import terminalLogTab from '@/components/common/bottomBox/tabs/terminalLogTab'
|
|||||||
import assetTab from '@/components/common/bottomBox/tabs/assetTab'
|
import assetTab from '@/components/common/bottomBox/tabs/assetTab'
|
||||||
import { fromRoute } from '@/components/common/js/constants'
|
import { fromRoute } from '@/components/common/js/constants'
|
||||||
import LogBottomTab from '@/components/common/bottomBox/tabs/logBottomTab'
|
import LogBottomTab from '@/components/common/bottomBox/tabs/logBottomTab'
|
||||||
|
import detailRightTop from './detailRightTop/detailRightTop'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'detailViewRight',
|
name: 'detailViewRight',
|
||||||
@@ -82,7 +83,8 @@ export default {
|
|||||||
endpointQuery,
|
endpointQuery,
|
||||||
panelTabNew,
|
panelTabNew,
|
||||||
assetTab,
|
assetTab,
|
||||||
assetSubTab
|
assetSubTab,
|
||||||
|
'detail-right-top': detailRightTop
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
isFullScreen: Boolean, // 是否全屏
|
isFullScreen: Boolean, // 是否全屏
|
||||||
@@ -283,6 +285,12 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
.detail-view-right-top{
|
||||||
|
height: 60px;
|
||||||
|
background: #FFFFFF;
|
||||||
|
border: 1px solid #E7EAED;
|
||||||
|
margin-bottom: 10px
|
||||||
|
}
|
||||||
.sub-box{
|
.sub-box{
|
||||||
height: 100%;
|
height: 100%;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|||||||
Reference in New Issue
Block a user