NEZ-1048 feat:asset详细视图 右侧内容区域 以及部分优化
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
<div class="bottom-data-list">
|
<div class="bottom-data-list">
|
||||||
<div class="top-tools top-tools--sub">
|
<div class="top-tools top-tools--sub">
|
||||||
<div class="top-tool-left">
|
<div class="top-tool-left">
|
||||||
<div class="sub-list-title">{{bottomHeaderTitle}}:<slot name="title"></slot></div>
|
<div class="sub-list-title" v-if="showTitle">{{bottomHeaderTitle}}:<slot name="title"></slot></div>
|
||||||
<div class="sub-list-tabs">
|
<div class="sub-list-tabs">
|
||||||
<div v-for="tab in tabs" :key="tab.prop" :class="{'sub-list-tab--active': tab.active || tab.prop=== targetTab}" class="sub-list-tab" @click="changeTab(tab.prop)">{{tab.name}}</div>
|
<div v-for="tab in tabs" :key="tab.prop" :class="{'sub-list-tab--active': tab.active || tab.prop=== targetTab}" class="sub-list-tab" @click="changeTab(tab.prop)">{{tab.name}}</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -83,6 +83,10 @@ export default {
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: true
|
||||||
},
|
},
|
||||||
|
showTitle: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
title: {
|
title: {
|
||||||
type: String
|
type: String
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,12 +97,15 @@ import bus from '../../../../libs/bus'
|
|||||||
import alertMessageTable from '@/components/common/table/alert/alertMessageTable.vue'
|
import alertMessageTable from '@/components/common/table/alert/alertMessageTable.vue'
|
||||||
import deleteButton from '../../deleteButton'
|
import deleteButton from '../../deleteButton'
|
||||||
import { fromRoute } from '@/components/common/js/constants'
|
import { fromRoute } from '@/components/common/js/constants'
|
||||||
|
import detailViewRightMixin from '@/components/common/mixin/detailViewRightMixin'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'alertMessageTab',
|
name: 'alertMessageTab',
|
||||||
components: {
|
components: {
|
||||||
alertMessageTable,
|
alertMessageTable,
|
||||||
deleteButton
|
deleteButton
|
||||||
},
|
},
|
||||||
|
mixin: [detailViewRightMixin],
|
||||||
props: {
|
props: {
|
||||||
from: String, // 来自哪个主页面,有:"asset"、"alertRule"
|
from: String, // 来自哪个主页面,有:"asset"、"alertRule"
|
||||||
obj: Object // 关联的实体对象
|
obj: Object // 关联的实体对象
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="full-width-height">
|
<div class="full-width-height">
|
||||||
<nz-bottom-data-list
|
<nz-bottom-data-list
|
||||||
|
:showTitle='showTitle'
|
||||||
:api="url"
|
:api="url"
|
||||||
:custom-table-title.sync="tools.customTableTitle"
|
:custom-table-title.sync="tools.customTableTitle"
|
||||||
:layout="['searchInput', 'elementSet']"
|
:layout="['searchInput', 'elementSet']"
|
||||||
@@ -93,10 +94,11 @@ import chartDataFormat from '@/components/charts/chartDataFormat'
|
|||||||
import chart from '@/components/page/dashboard/overview/chart'
|
import chart from '@/components/page/dashboard/overview/chart'
|
||||||
import { alertMessage as alertMessageConstant, fromRoute } from '@/components/common/js/constants'
|
import { alertMessage as alertMessageConstant, fromRoute } from '@/components/common/js/constants'
|
||||||
import alertSilenceBox from '@/components/common/rightBox/alertSilenceBox'
|
import alertSilenceBox from '@/components/common/rightBox/alertSilenceBox'
|
||||||
|
import detailViewRightMixin from '@/components/common/mixin/detailViewRightMixin'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'alertMessageTab',
|
name: 'alertMessageTab',
|
||||||
mixins: [dataListMixin, subDataListMixin],
|
mixins: [dataListMixin, subDataListMixin, detailViewRightMixin],
|
||||||
components: {
|
components: {
|
||||||
nzBottomDataList,
|
nzBottomDataList,
|
||||||
alertMessageTable,
|
alertMessageTable,
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<nz-bottom-data-list
|
<nz-bottom-data-list
|
||||||
|
:showTitle='showTitle'
|
||||||
:api="url"
|
:api="url"
|
||||||
style="height: 100%"
|
style="height: 100%"
|
||||||
:custom-table-title.sync="tools.customTableTitle"
|
:custom-table-title.sync="tools.customTableTitle"
|
||||||
@@ -60,10 +61,11 @@ import assetTable from '@/components/common/table/asset/assetTable'
|
|||||||
import assetBox from '@/components/common/rightBox/asset/assetBox'
|
import assetBox from '@/components/common/rightBox/asset/assetBox'
|
||||||
import { fromRoute } from '@/components/common/js/constants'
|
import { fromRoute } from '@/components/common/js/constants'
|
||||||
import alertSilenceBox from '@/components/common/rightBox/alertSilenceBox'
|
import alertSilenceBox from '@/components/common/rightBox/alertSilenceBox'
|
||||||
|
import detailViewRightMixin from '@/components/common/mixin/detailViewRightMixin'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'assetTab',
|
name: 'assetTab',
|
||||||
mixins: [dataListMixin, subDataListMixin],
|
mixins: [dataListMixin, subDataListMixin, detailViewRightMixin],
|
||||||
components: {
|
components: {
|
||||||
nzBottomDataList,
|
nzBottomDataList,
|
||||||
assetTable,
|
assetTable,
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<nz-bottom-data-list
|
<nz-bottom-data-list
|
||||||
|
:showTitle='showTitle'
|
||||||
:api="url"
|
:api="url"
|
||||||
style="height: 100%"
|
style="height: 100%"
|
||||||
:custom-table-title.sync="tools.customTableTitle"
|
:custom-table-title.sync="tools.customTableTitle"
|
||||||
@@ -60,10 +61,11 @@ import assetTable from '@/components/common/table/asset/assetTable'
|
|||||||
import assetBox from '@/components/common/rightBox/asset/assetBox'
|
import assetBox from '@/components/common/rightBox/asset/assetBox'
|
||||||
import { fromRoute } from '@/components/common/js/constants'
|
import { fromRoute } from '@/components/common/js/constants'
|
||||||
import alertSilenceBox from '@/components/common/rightBox/alertSilenceBox'
|
import alertSilenceBox from '@/components/common/rightBox/alertSilenceBox'
|
||||||
|
import detailViewRightMixin from '@/components/common/mixin/detailViewRightMixin'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'assetTab',
|
name: 'assetTab',
|
||||||
mixins: [dataListMixin, subDataListMixin],
|
mixins: [dataListMixin, subDataListMixin, detailViewRightMixin],
|
||||||
components: {
|
components: {
|
||||||
nzBottomDataList,
|
nzBottomDataList,
|
||||||
assetTable,
|
assetTable,
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<nz-bottom-data-list
|
<nz-bottom-data-list
|
||||||
|
:showTitle='showTitle'
|
||||||
:api="url"
|
:api="url"
|
||||||
style="height: 100%"
|
style="height: 100%"
|
||||||
:custom-table-title.sync="tools.customTableTitle"
|
:custom-table-title.sync="tools.customTableTitle"
|
||||||
:layout="['searchInput', 'elementSet']"
|
:layout="['searchInput', 'elementSet']"
|
||||||
:search-msg="searchMsg"
|
:search-msg="searchMsg"
|
||||||
:tabs="tabs"
|
:tabs="tabs"
|
||||||
|
:show-title="showTtile"
|
||||||
@search="search"
|
@search="search"
|
||||||
@changeTab="changeTab"
|
@changeTab="changeTab"
|
||||||
>
|
>
|
||||||
@@ -68,13 +70,14 @@
|
|||||||
import cabinetBox from '../../rightBox/setting/cabinetBox'
|
import cabinetBox from '../../rightBox/setting/cabinetBox'
|
||||||
import deleteButton from '../../deleteButton'
|
import deleteButton from '../../deleteButton'
|
||||||
import dataListMixin from '@/components/common/mixin/dataList'
|
import dataListMixin from '@/components/common/mixin/dataList'
|
||||||
|
import detailViewRightMixin from '@/components/common/mixin/detailViewRightMixin'
|
||||||
import subDataListMixin from '@/components/common/mixin/subDataList'
|
import subDataListMixin from '@/components/common/mixin/subDataList'
|
||||||
import nzBottomDataList from '@/components/common/bottomBox/nzBottomDataList'
|
import nzBottomDataList from '@/components/common/bottomBox/nzBottomDataList'
|
||||||
import cabinetTable from '@/components/common/table/settings/cabinetTable'
|
import cabinetTable from '@/components/common/table/settings/cabinetTable'
|
||||||
import topToolMoreOptions from '@/components/common/popBox/topToolMoreOptions'
|
import topToolMoreOptions from '@/components/common/popBox/topToolMoreOptions'
|
||||||
export default {
|
export default {
|
||||||
name: 'cabinetTab',
|
name: 'cabinetTab',
|
||||||
mixins: [dataListMixin, subDataListMixin],
|
mixins: [dataListMixin, subDataListMixin, detailViewRightMixin],
|
||||||
components: {
|
components: {
|
||||||
nzBottomDataList,
|
nzBottomDataList,
|
||||||
'cabinet-box': cabinetBox,
|
'cabinet-box': cabinetBox,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="full-width-height">
|
<div class="full-width-height">
|
||||||
<nz-bottom-data-list
|
<nz-bottom-data-lis
|
||||||
:layout="[]"
|
:layout="[]"
|
||||||
:tabs="tabs"
|
:tabs="tabs"
|
||||||
:targetTab="targetTab"
|
:targetTab="targetTab"
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
</transition>
|
</transition>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</nz-bottom-data-list>
|
</nz-bottom-data-lis>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="full-width-height">
|
<div class="full-width-height">
|
||||||
<nz-bottom-data-list
|
<nz-bottom-data-list
|
||||||
|
:showTitle='showTitle'
|
||||||
:api="url"
|
:api="url"
|
||||||
:layout="['searchInput', 'elementSet']"
|
:layout="['searchInput', 'elementSet']"
|
||||||
:search-msg="searchMsg"
|
:search-msg="searchMsg"
|
||||||
@@ -70,9 +71,10 @@ import subDataListMixin from '@/components/common/mixin/subDataList'
|
|||||||
import nzBottomDataList from '@/components/common/bottomBox/nzBottomDataList'
|
import nzBottomDataList from '@/components/common/bottomBox/nzBottomDataList'
|
||||||
import endpointQueryTab from '@/components/common/table/special/endpointQueryTab'
|
import endpointQueryTab from '@/components/common/table/special/endpointQueryTab'
|
||||||
import bus from '@/libs/bus'
|
import bus from '@/libs/bus'
|
||||||
|
import detailViewRightMixin from '@/components/common/mixin/detailViewRightMixin'
|
||||||
export default {
|
export default {
|
||||||
name: 'endpointTab',
|
name: 'endpointTab',
|
||||||
mixins: [subDataListMixin],
|
mixins: [subDataListMixin, detailViewRightMixin],
|
||||||
props: {
|
props: {
|
||||||
from: {}
|
from: {}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -158,6 +158,7 @@ import exportXLSX from '../../exportXLSX'
|
|||||||
import bus from '@/libs/bus'
|
import bus from '@/libs/bus'
|
||||||
import deleteButton from '../../deleteButton'
|
import deleteButton from '../../deleteButton'
|
||||||
import { fromRoute } from '@/components/common/js/constants'
|
import { fromRoute } from '@/components/common/js/constants'
|
||||||
|
import detailViewRightMixin from '@/components/common/mixin/detailViewRightMixin'
|
||||||
export default {
|
export default {
|
||||||
name: 'endpointTab',
|
name: 'endpointTab',
|
||||||
components: {
|
components: {
|
||||||
@@ -168,6 +169,7 @@ export default {
|
|||||||
obj: Object, // 关联的实体对象
|
obj: Object, // 关联的实体对象
|
||||||
from: { type: String }
|
from: { type: String }
|
||||||
},
|
},
|
||||||
|
mixin: [detailViewRightMixin],
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
fromRoute: fromRoute,
|
fromRoute: fromRoute,
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="full-width-height">
|
<div class="full-width-height">
|
||||||
<nz-bottom-data-list
|
<nz-bottom-data-list
|
||||||
|
:showTitle='showTitle'
|
||||||
:api="url"
|
:api="url"
|
||||||
:custom-table-title.sync="tools.customTableTitle"
|
:custom-table-title.sync="tools.customTableTitle"
|
||||||
:layout="['searchInput', 'elementSet']"
|
:layout="['searchInput', 'elementSet']"
|
||||||
@@ -53,10 +54,11 @@ import endpointTable from '@/components/common/table/settings/endpointTable'
|
|||||||
import EditEndpointBoxNew from '@/components/common/rightBox/editEndpointBoxNew'
|
import EditEndpointBoxNew from '@/components/common/rightBox/editEndpointBoxNew'
|
||||||
import { fromRoute } from '@/components/common/js/constants'
|
import { fromRoute } from '@/components/common/js/constants'
|
||||||
import alertSilenceBox from '@/components/common/rightBox/alertSilenceBox'
|
import alertSilenceBox from '@/components/common/rightBox/alertSilenceBox'
|
||||||
|
import detailViewRightMixin from '@/components/common/mixin/detailViewRightMixin'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'terminalLogTab',
|
name: 'terminalLogTab',
|
||||||
mixins: [dataListMixin, subDataListMixin],
|
mixins: [dataListMixin, subDataListMixin, detailViewRightMixin],
|
||||||
components: {
|
components: {
|
||||||
nzBottomDataList,
|
nzBottomDataList,
|
||||||
endpointTable,
|
endpointTable,
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<nz-bottom-data-list
|
<nz-bottom-data-list
|
||||||
|
:showTitle='showTitle'
|
||||||
:custom-tool="true"
|
:custom-tool="true"
|
||||||
:layout="[]"
|
:layout="[]"
|
||||||
:show-pagination="false"
|
:show-pagination="false"
|
||||||
@@ -35,10 +36,11 @@ import subDataListMixin from '@/components/common/mixin/subDataList'
|
|||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import bus from '@/libs/bus'
|
import bus from '@/libs/bus'
|
||||||
import { fromRoute } from '@/components/common/js/constants'
|
import { fromRoute } from '@/components/common/js/constants'
|
||||||
|
import detailViewRightMixin from '@/components/common/mixin/detailViewRightMixin'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'logBottomTab',
|
name: 'logBottomTab',
|
||||||
mixins: [subDataListMixin],
|
mixins: [subDataListMixin, detailViewRightMixin],
|
||||||
components: {
|
components: {
|
||||||
nzBottomDataList,
|
nzBottomDataList,
|
||||||
logTab
|
logTab
|
||||||
@@ -122,7 +124,7 @@ export default {
|
|||||||
} else if (this.from === fromRoute.asset) {
|
} else if (this.from === fromRoute.asset) {
|
||||||
this.expressions = [`{asset="${this.obj.name}"}`]
|
this.expressions = [`{asset="${this.obj.name}"}`]
|
||||||
}
|
}
|
||||||
this.$nextTick(()=>{
|
this.$nextTick(() => {
|
||||||
this.queryLogData()
|
this.queryLogData()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<nz-bottom-data-list
|
<nz-bottom-data-list
|
||||||
|
:showTitle='showTitle'
|
||||||
:api="url"
|
:api="url"
|
||||||
:custom-table-title.sync="tools.customTableTitle"
|
:custom-table-title.sync="tools.customTableTitle"
|
||||||
:layout="['searchInput', 'elementSet']"
|
:layout="['searchInput', 'elementSet']"
|
||||||
@@ -34,9 +35,10 @@ import dataListMixin from '@/components/common/mixin/dataList'
|
|||||||
import subDataListMixin from '@/components/common/mixin/subDataList'
|
import subDataListMixin from '@/components/common/mixin/subDataList'
|
||||||
import nzBottomDataList from '@/components/common/bottomBox/nzBottomDataList'
|
import nzBottomDataList from '@/components/common/bottomBox/nzBottomDataList'
|
||||||
import operationLogTable from '@/components/common/table/settings/operationLogTable'
|
import operationLogTable from '@/components/common/table/settings/operationLogTable'
|
||||||
|
import detailViewRightMixin from '@/components/common/mixin/detailViewRightMixin'
|
||||||
export default {
|
export default {
|
||||||
name: 'operationLogTab',
|
name: 'operationLogTab',
|
||||||
mixins: [dataListMixin, subDataListMixin],
|
mixins: [dataListMixin, subDataListMixin, detailViewRightMixin],
|
||||||
components: {
|
components: {
|
||||||
nzBottomDataList,
|
nzBottomDataList,
|
||||||
operationLogTable
|
operationLogTable
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="full-width-height chart-list">
|
<div class="full-width-height chart-list">
|
||||||
<nz-bottom-data-list
|
<nz-bottom-data-list
|
||||||
|
:showTitle='showTitle'
|
||||||
:layout="[]"
|
:layout="[]"
|
||||||
:tabs="tabs"
|
:tabs="tabs"
|
||||||
:targetTab="targetTab"
|
:targetTab="targetTab"
|
||||||
@@ -118,9 +119,10 @@ import nzBottomDataList from '@/components/common/bottomBox/nzBottomDataList'
|
|||||||
import { fromRoute } from '@/components/common/js/constants'
|
import { fromRoute } from '@/components/common/js/constants'
|
||||||
import chartTempBox from '@/components/common/rightBox/chartTempBox'
|
import chartTempBox from '@/components/common/rightBox/chartTempBox'
|
||||||
import topToolMoreOptions from '@/components/common/popBox/topToolMoreOptions'
|
import topToolMoreOptions from '@/components/common/popBox/topToolMoreOptions'
|
||||||
|
import detailViewRightMixin from '@/components/common/mixin/detailViewRightMixin'
|
||||||
export default {
|
export default {
|
||||||
name: 'panelTabNew',
|
name: 'panelTabNew',
|
||||||
mixins: [subDataListMixin],
|
mixins: [subDataListMixin, detailViewRightMixin],
|
||||||
props: {
|
props: {
|
||||||
from: String,
|
from: String,
|
||||||
obj: Object,
|
obj: Object,
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<nz-bottom-data-list
|
<nz-bottom-data-list
|
||||||
|
:showTitle='showTitle'
|
||||||
:layout="[]"
|
:layout="[]"
|
||||||
:tabs="tabs"
|
:tabs="tabs"
|
||||||
@changeTab="changeTab"
|
@changeTab="changeTab"
|
||||||
@@ -35,10 +36,11 @@
|
|||||||
import dataListMixin from '@/components/common/mixin/dataList'
|
import dataListMixin from '@/components/common/mixin/dataList'
|
||||||
import subDataListMixin from '@/components/common/mixin/subDataList'
|
import subDataListMixin from '@/components/common/mixin/subDataList'
|
||||||
import nzBottomDataList from '@/components/common/bottomBox/nzBottomDataList'
|
import nzBottomDataList from '@/components/common/bottomBox/nzBottomDataList'
|
||||||
|
import detailViewRightMixin from '@/components/common/mixin/detailViewRightMixin'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'terminalLogRecordTab',
|
name: 'terminalLogRecordTab',
|
||||||
mixins: [dataListMixin, subDataListMixin],
|
mixins: [dataListMixin, subDataListMixin, detailViewRightMixin],
|
||||||
components: {
|
components: {
|
||||||
nzBottomDataList
|
nzBottomDataList
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<nz-bottom-data-list
|
<nz-bottom-data-list
|
||||||
|
:showTitle='showTitle'
|
||||||
:layout="[]"
|
:layout="[]"
|
||||||
:tabs="tabs"
|
:tabs="tabs"
|
||||||
@changeTab="changeTab"
|
@changeTab="changeTab"
|
||||||
@@ -30,9 +31,10 @@ import bus from '../../../../libs/bus'
|
|||||||
import dataListMixin from '@/components/common/mixin/dataList'
|
import dataListMixin from '@/components/common/mixin/dataList'
|
||||||
import subDataListMixin from '@/components/common/mixin/subDataList'
|
import subDataListMixin from '@/components/common/mixin/subDataList'
|
||||||
import nzBottomDataList from '@/components/common/bottomBox/nzBottomDataList'
|
import nzBottomDataList from '@/components/common/bottomBox/nzBottomDataList'
|
||||||
|
import detailViewRightMixin from '@/components/common/mixin/detailViewRightMixin'
|
||||||
export default {
|
export default {
|
||||||
name: 'terminalLogReplayTab',
|
name: 'terminalLogReplayTab',
|
||||||
mixins: [dataListMixin, subDataListMixin],
|
mixins: [dataListMixin, subDataListMixin, detailViewRightMixin],
|
||||||
components: {
|
components: {
|
||||||
nzBottomDataList
|
nzBottomDataList
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<nz-bottom-data-list
|
<nz-bottom-data-list
|
||||||
|
:showTitle='showTitle'
|
||||||
:layout="[]"
|
:layout="[]"
|
||||||
:tabs="tabs"
|
:tabs="tabs"
|
||||||
@changeTab="changeTab"
|
@changeTab="changeTab"
|
||||||
@@ -36,10 +37,11 @@ import bus from '../../../../libs/bus'
|
|||||||
import dataListMixin from '@/components/common/mixin/dataList'
|
import dataListMixin from '@/components/common/mixin/dataList'
|
||||||
import subDataListMixin from '@/components/common/mixin/subDataList'
|
import subDataListMixin from '@/components/common/mixin/subDataList'
|
||||||
import nzBottomDataList from '@/components/common/bottomBox/nzBottomDataList'
|
import nzBottomDataList from '@/components/common/bottomBox/nzBottomDataList'
|
||||||
|
import detailViewRightMixin from '@/components/common/mixin/detailViewRightMixin'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'terminalLogReplayTab',
|
name: 'terminalLogReplayTab',
|
||||||
mixins: [dataListMixin, subDataListMixin],
|
mixins: [dataListMixin, subDataListMixin, detailViewRightMixin],
|
||||||
components: {
|
components: {
|
||||||
nzBottomDataList
|
nzBottomDataList
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<nz-bottom-data-list
|
<nz-bottom-data-list
|
||||||
|
:showTitle='showTitle'
|
||||||
:api="url"
|
:api="url"
|
||||||
:custom-table-title.sync="tools.customTableTitle"
|
:custom-table-title.sync="tools.customTableTitle"
|
||||||
:layout="['searchInput', 'elementSet']"
|
:layout="['searchInput', 'elementSet']"
|
||||||
@@ -36,16 +37,21 @@ import dataListMixin from '@/components/common/mixin/dataList'
|
|||||||
import subDataListMixin from '@/components/common/mixin/subDataList'
|
import subDataListMixin from '@/components/common/mixin/subDataList'
|
||||||
import nzBottomDataList from '@/components/common/bottomBox/nzBottomDataList'
|
import nzBottomDataList from '@/components/common/bottomBox/nzBottomDataList'
|
||||||
import terminalLogTable from '@/components/common/table/settings/terminalLogTable'
|
import terminalLogTable from '@/components/common/table/settings/terminalLogTable'
|
||||||
|
import detailViewRightMixin from '@/components/common/mixin/detailViewRightMixin'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'terminalLogTab',
|
name: 'terminalLogTab',
|
||||||
mixins: [dataListMixin, subDataListMixin],
|
mixins: [dataListMixin, subDataListMixin, detailViewRightMixin],
|
||||||
components: {
|
components: {
|
||||||
nzBottomDataList,
|
nzBottomDataList,
|
||||||
terminalLogTable
|
terminalLogTable
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
obj: Object
|
obj: Object,
|
||||||
|
showTitle: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
obj (n) {
|
obj (n) {
|
||||||
|
|||||||
@@ -19,6 +19,11 @@
|
|||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.nz-detail-view-right{
|
||||||
|
flex: 1;
|
||||||
|
overflow: hidden;
|
||||||
|
padding-right: 10px;
|
||||||
|
}
|
||||||
/deep/ .el-pagination .btn-next, /deep/ .el-pagination .btn-prev {
|
/deep/ .el-pagination .btn-next, /deep/ .el-pagination .btn-prev {
|
||||||
border: none;
|
border: none;
|
||||||
background: none;
|
background: none;
|
||||||
@@ -55,3 +60,4 @@
|
|||||||
|
|
||||||
width: calc(100% - 20px);
|
width: calc(100% - 20px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<ul class="detail-row-box">
|
<ul class="detail-row-box">
|
||||||
<li v-for="(item,index) in tableData" :key="index" class="detail-row" @click="detailViewRightShow(item)">
|
<li v-for="(item,index) in tableData" :key="index" class="detail-row" @click="detailViewRightShow(item)" :class="item.id === detailViewRightObj.id ? 'selected' : ''">
|
||||||
<div class="detail-row-info">
|
<div class="detail-row-info">
|
||||||
<div class="asset-manageIp">
|
<div class="asset-manageIp">
|
||||||
<el-popover :content="$t('asset.assetStatPre')+(item.pingInfo.lastUpdate?utcTimeToTimezoneStr(item.pingInfo.lastUpdate):$t('asset.assetStatDown'))" v-if="item.pingInfo" placement="right" trigger="hover">
|
<el-popover :content="$t('asset.assetStatPre')+(item.pingInfo.lastUpdate?utcTimeToTimezoneStr(item.pingInfo.lastUpdate):$t('asset.assetStatDown'))" v-if="item.pingInfo" placement="right" trigger="hover">
|
||||||
@@ -23,9 +23,12 @@ import detailViewLeftMixin from '@/components/common/mixin/detailViewLeftMixin'
|
|||||||
export default {
|
export default {
|
||||||
name: 'assetDetail',
|
name: 'assetDetail',
|
||||||
mixins: [detailViewLeftMixin],
|
mixins: [detailViewLeftMixin],
|
||||||
|
props: {
|
||||||
|
detailViewRightObj: {}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
detailViewRightShow (item) {
|
detailViewRightShow (item) {
|
||||||
this.$emit('detailViewRightShow')
|
this.$emit('detailViewRightShow', item)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -68,4 +71,7 @@ export default {
|
|||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.selected{
|
||||||
|
background: #FFFBF6;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -14,12 +14,15 @@
|
|||||||
<el-dropdown
|
<el-dropdown
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="showLayout.indexOf('detailViewSet') > -1"
|
v-if="showLayout.indexOf('detailViewSet') > -1"
|
||||||
class="margin-l-10"
|
class="margin-l-5"
|
||||||
@command="changeDetailType">
|
@command="changeDetailType">
|
||||||
|
<button class="top-tool-btn table-column-setting"
|
||||||
|
type="button">
|
||||||
<i class="nz-icon nz-icon-alert-list" />
|
<i class="nz-icon nz-icon-alert-list" />
|
||||||
|
</button>
|
||||||
<el-dropdown-menu slot="dropdown" >
|
<el-dropdown-menu slot="dropdown" >
|
||||||
<el-dropdown-item :command="'list'">列表</el-dropdown-item>
|
<el-dropdown-item :command="'list'" :class="detailType === 'list' ? 'active' : ''">列表</el-dropdown-item>
|
||||||
<el-dropdown-item :command="'view'">详细</el-dropdown-item>
|
<el-dropdown-item :command="'view'" :class="detailType === 'view' ? 'active' : ''">详细</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</div>
|
</div>
|
||||||
@@ -33,6 +36,16 @@
|
|||||||
<slot name="pagination"></slot>
|
<slot name="pagination"></slot>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="nz-detail-view-right">
|
||||||
|
<detailViewRight
|
||||||
|
@getTableData = 'getDetail'
|
||||||
|
ref="detailViewRight"
|
||||||
|
v-if="detailViewRightObj"
|
||||||
|
:from="from"
|
||||||
|
:obj="detailViewRightObj"
|
||||||
|
:target-tab="'panelTab'"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -42,11 +55,12 @@
|
|||||||
<script>
|
<script>
|
||||||
import { fromRoute } from '@/components/common/js/constants'
|
import { fromRoute } from '@/components/common/js/constants'
|
||||||
import { bottomBoxWindow } from '@/components/common/js/tools'
|
import { bottomBoxWindow } from '@/components/common/js/tools'
|
||||||
|
import detailViewRight from '@/components/common/detailView/view/detailViewRight'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'nzDataList',
|
name: 'nzDataList',
|
||||||
components: {
|
components: {
|
||||||
|
detailViewRight
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
from: {
|
from: {
|
||||||
@@ -72,7 +86,8 @@ export default {
|
|||||||
},
|
},
|
||||||
nzTableHeightOffset: Number,
|
nzTableHeightOffset: Number,
|
||||||
searchRight: Boolean,
|
searchRight: Boolean,
|
||||||
operationRecord: Boolean
|
operationRecord: Boolean,
|
||||||
|
detailViewRightObj: {}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
nzTableHeight () {
|
nzTableHeight () {
|
||||||
@@ -158,4 +173,7 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import './detailView.scss';
|
@import './detailView.scss';
|
||||||
|
.active{
|
||||||
|
color: #fa901c;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -0,0 +1,334 @@
|
|||||||
|
<template>
|
||||||
|
<div class="sub-box">
|
||||||
|
<div style="height: 60px;background: #FFFFFF;border: 1px solid #E7EAED;margin-bottom: 10px">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="sub-list__tabs">
|
||||||
|
<!--机柜-->
|
||||||
|
<cabinet-tab :showTitle="false" v-if="from === fromRoute.dc && targetTab === 'cabinet'" :tabs="tabs.dc.cabinet" v-show="subResizeShow" :obj="obj" @changeTab="changeTab"></cabinet-tab>
|
||||||
|
<alertMessageTabNew :showTitle="false" v-if="from === fromRoute.dc && targetTab === 'alertMessageTab'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="tabs.dc.alertMessage" :targetTab="targetTab" @changeTab="changeTab"></alertMessageTabNew>
|
||||||
|
<!--告警信息-->
|
||||||
|
<alert-message-tab :showTitle="false" v-if="((from === fromRoute.alertRule || from === fromRoute.asset || from === fromRoute.endpoint || from === fromRoute.project ) && targetTab === 'alertMessage')" v-show="subResizeShow" :from="from" :obj="obj" @changeTab="changeTab"></alert-message-tab>
|
||||||
|
<!--asset页的endpoint列表-->
|
||||||
|
<endpoint-tab :showTitle="false" v-if="from === fromRoute.asset && targetTab === fromRoute.endpoint" v-show="subResizeShow" :from="from" :obj="obj" @changeTab="changeTab"></endpoint-tab>
|
||||||
|
|
||||||
|
<!--terminal-log的记录和回放-->
|
||||||
|
<terminal-log-cmd-tab :showTitle="false" v-if="from === fromRoute.terminalLog && targetTab === 'cmdTab'" :from="from" :obj="obj" :tabs="tabs.terminalLog.cmd" @changeTab="changeTab"></terminal-log-cmd-tab>
|
||||||
|
<terminal-log-record-tab :showTitle="false" v-if="from === fromRoute.terminalLog && targetTab === 'recordTab'" :from="from" :obj="obj" :tabs="tabs.terminalLog.record" @changeTab="changeTab"></terminal-log-record-tab>
|
||||||
|
<terminal-log-monitor-tab :showTitle="false" v-if="from === fromRoute.terminalLog && targetTab === 'monitorTab'" :from="from" :obj="obj" :tabs="tabs.terminalLog.monitor" @changeTab="changeTab" @exit="closeSubList"></terminal-log-monitor-tab>
|
||||||
|
|
||||||
|
<asset-tab :showTitle="false" v-if="from === fromRoute.dc && targetTab === 'asset'" :tabs="tabs.dc.asset" ref="assetTab" :from="from" :obj="obj" @changeTab="changeTab" @exit="closeSubList"></asset-tab>
|
||||||
|
|
||||||
|
<!--user列表的两个日志-->
|
||||||
|
<operation-log-tab :showTitle="false" v-if="from === fromRoute.user && targetTab === 'operationLogTab'" :from="from" :obj="obj" :tabs="tabs.user.operationLog" @changeTab="changeTab"></operation-log-tab>
|
||||||
|
<terminal-log-tab :showTitle="false" v-if="from === fromRoute.user && targetTab === 'terminalLogTab'" :from="from" :obj="obj" :tabs="tabs.user.terminalLog" @changeTab="changeTab"></terminal-log-tab>
|
||||||
|
<!-- asset列表的3个 -->
|
||||||
|
<panel-tab-new @getTableData="getTableData" :paramsType="'asset'" :showTitle="false" v-if="from === fromRoute.asset && targetTab === 'panelTab'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="tabs.asset.panel" :targetTab.sync="targetTab" @changeTab="changeTab"></panel-tab-new>
|
||||||
|
<alertMessageTabNew :showTitle="false" v-if="from === fromRoute.asset && targetTab === 'alertMessageTab'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="tabs.asset.alertMessage" :targetTab="targetTab" @changeTab="changeTab"></alertMessageTabNew>
|
||||||
|
<endpointTabNew :showTitle="false" v-if="from === fromRoute.asset && targetTab === 'endpointTab'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="tabs.asset.endpoint" :targetTab="targetTab" @changeTab="changeTab"></endpointTabNew>
|
||||||
|
<log-bottom-tab :showTitle="false" v-if="from === fromRoute.asset && targetTab === 'log'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="tabs.asset.log" :targetTab.sync="targetTab" @changeTab="changeTab"></log-bottom-tab>
|
||||||
|
<assetSubTab :showTitle="false" v-if="from === fromRoute.asset && targetTab === 'assetSubTab' && obj.childrenNum" v-show="subResizeShow" :from="from" :obj="obj" :tabs="tabs.asset.alertMessageSub" :targetTab="targetTab" @changeTab="changeTab"></assetSubTab>
|
||||||
|
<!--module列表的tab-->
|
||||||
|
<endpointTabNew :showTitle="false" v-if="from === fromRoute.module && targetTab === 'endpoint'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="tabs.module.moduleTabTitle" :targetTab="targetTab" @changeTab="changeTab"></endpointTabNew>
|
||||||
|
<alertMessageTabNew :showTitle="false" v-if="from === fromRoute.module && targetTab === 'moduleAlertMessage'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="tabs.module.moduleTabTitle" @changeTab="changeTab" :targetTab="targetTab"></alertMessageTabNew>
|
||||||
|
<panel-tab-new @getTableData="getTableData" :paramsType="'module'" :showTitle="false" v-if="from === fromRoute.module && targetTab === 'panel'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="tabs.module.moduleTabTitle" :targetTab.sync="targetTab" @changeTab="changeTab"></panel-tab-new>
|
||||||
|
<!--endpoint列表的tab-->
|
||||||
|
<panel-tab-new :showTitle="false" v-if="from === fromRoute.endpoint && targetTab === 'panelTab'" v-show="subResizeShow" :from="from" :obj="obj" :paramsType="'endpoint'" :tabs="endpointTabs" :targetTab.sync="targetTab" @changeTab="changeTab" @getTableData="getTableData"></panel-tab-new>
|
||||||
|
<endpointQuery :showTitle="false" v-if="from === fromRoute.endpoint && targetTab === 'endpointQuery'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="endpointTabs" :targetTab.sync="targetTab" @changeTab="changeTab"></endpointQuery>
|
||||||
|
<log-bottom-tab :showTitle="false" v-if="from === fromRoute.endpoint && targetTab === 'log' && hasLogConfig" v-show="subResizeShow" :from="from" :obj="obj" :tabs="endpointTabs" :targetTab.sync="targetTab" @changeTab="changeTab"></log-bottom-tab>
|
||||||
|
<alertMessageTabNew :showTitle="false" v-if="from === fromRoute.endpoint && targetTab === 'endpointAlertMessage'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="endpointTabs" :targetTab="targetTab" @changeTab="changeTab"></alertMessageTabNew>
|
||||||
|
<!--chartTemp的Tab-->
|
||||||
|
<panel-tab-new @getTableData="getTableData" :paramsType="'template'" :showTitle="false" v-if="from === fromRoute.chartTemp && targetTab === 'panel'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="tabs.chartTemp.chartTempTabTitle" :targetTab.sync="targetTab" @changeTab="changeTab"></panel-tab-new>
|
||||||
|
<!--alertRule Tab-->
|
||||||
|
<alertMessageTabNew :showTitle="false" v-if="from === fromRoute.alertRule && targetTab === 'alertRuleAlertMessage'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="tabs.alertRule.alertRule" @changeTab="changeTab" :targetTab="targetTab"></alertMessageTabNew>
|
||||||
|
<!--model 下滑-->
|
||||||
|
<asset-tab :showTitle="false" v-if="(from === fromRoute.model) && targetTab === 'asset'" :tabs="tabs.model" ref="assetTab" :from="from" :obj="obj" @changeTab="changeTab" @exit="closeSubList"></asset-tab>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import cabinetTab from '@/components/common/bottomBox/tabs/cabinetTab'
|
||||||
|
import alertMessageTab from '@/components/common/bottomBox/tabs/alertMessageTab'
|
||||||
|
import alertMessageTabNew from '@/components/common/bottomBox/tabs/alertMessageTabNew'
|
||||||
|
import assetSubTab from '@/components/common/bottomBox/tabs/assetSubTab'
|
||||||
|
import endpointQuery from '@/components/common/bottomBox/tabs/endpointQuery'
|
||||||
|
import endpointTab from '@/components/common/bottomBox/tabs/endpointTab'
|
||||||
|
import endpointTabNew from '@/components/common/bottomBox/tabs/endpointTabNew'
|
||||||
|
import panelTabNew from '@/components/common/bottomBox/tabs/panelTabNew'
|
||||||
|
import terminalLogRecordTab from '@/components/common/bottomBox/tabs/terminalLogRecordTab'
|
||||||
|
import terminalLogMonitorTab from '@/components/common/bottomBox/tabs/terminalLogMonitorTab'
|
||||||
|
import terminalLogCMDTab from '@/components/common/bottomBox/tabs/terminalLogCMDTab'
|
||||||
|
import operationLogTab from '@/components/common/bottomBox/tabs/operationLogTab'
|
||||||
|
import terminalLogTab from '@/components/common/bottomBox/tabs/terminalLogTab'
|
||||||
|
import assetTab from '@/components/common/bottomBox/tabs/assetTab'
|
||||||
|
import { fromRoute } from '@/components/common/js/constants'
|
||||||
|
import LogBottomTab from '@/components/common/bottomBox/tabs/logBottomTab'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'detailViewRight',
|
||||||
|
components: {
|
||||||
|
LogBottomTab,
|
||||||
|
cabinetTab,
|
||||||
|
alertMessageTab,
|
||||||
|
endpointTab,
|
||||||
|
terminalLogRecordTab,
|
||||||
|
terminalLogMonitorTab,
|
||||||
|
operationLogTab,
|
||||||
|
terminalLogTab,
|
||||||
|
'terminal-log-cmd-tab': terminalLogCMDTab,
|
||||||
|
endpointTabNew,
|
||||||
|
alertMessageTabNew,
|
||||||
|
endpointQuery,
|
||||||
|
panelTabNew,
|
||||||
|
assetTab,
|
||||||
|
assetSubTab
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
isFullScreen: Boolean, // 是否全屏
|
||||||
|
subResizeShow: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
}, // resize时,用v-show="subResizeShow"控制页面内容是否显示
|
||||||
|
obj: Object, // 关联的实体对象
|
||||||
|
from: String, // 来自哪个页面
|
||||||
|
tabList: Array, // 动态页签列表
|
||||||
|
targetTab: String // 展示哪个页签
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
obj: {
|
||||||
|
immediate: true,
|
||||||
|
handler (n) {
|
||||||
|
console.log(n)
|
||||||
|
if ((this.from === fromRoute.asset) && n) {
|
||||||
|
const assetSub = { prop: 'assetSubTab', name: this.$t('overall.assetSubTab'), active: false }
|
||||||
|
if (n.childrenNum) {
|
||||||
|
if (!this.tabs.asset.panel.find(item => item.prop === assetSub.prop)) {
|
||||||
|
this.tabs.asset.panel.push(assetSub)
|
||||||
|
this.tabs.asset.alertMessage.push(assetSub)
|
||||||
|
this.tabs.asset.endpoint.push(assetSub)
|
||||||
|
this.tabs.asset.log.push(assetSub)
|
||||||
|
}
|
||||||
|
} else if (this.tabs.asset.panel.find(item => item.prop === assetSub.prop)) {
|
||||||
|
this.tabs.asset.panel = this.tabs.asset.panel.filter(item => item.prop !== assetSub.prop)
|
||||||
|
this.tabs.asset.alertMessage = this.tabs.asset.alertMessage.filter(item => item.prop !== assetSub.prop)
|
||||||
|
this.tabs.asset.endpoint = this.tabs.asset.endpoint.filter(item => item.prop !== assetSub.prop)
|
||||||
|
this.tabs.asset.log = this.tabs.asset.log.filter(item => item.prop !== assetSub.prop)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
fromRoute: fromRoute,
|
||||||
|
tabs: {
|
||||||
|
terminalLog: {
|
||||||
|
monitor: [
|
||||||
|
{ prop: 'monitorTab', name: this.$t('config.terminallog.monitor.monitor'), active: true }
|
||||||
|
],
|
||||||
|
cmd: [
|
||||||
|
{ prop: 'cmdTab', name: this.$t('config.terminallog.cmd.cmd'), active: true },
|
||||||
|
{ prop: 'recordTab', name: this.$t('config.terminallog.record.record'), active: false }
|
||||||
|
],
|
||||||
|
record: [
|
||||||
|
{ prop: 'cmdTab', name: this.$t('config.terminallog.cmd.cmd'), active: false },
|
||||||
|
{ prop: 'recordTab', name: this.$t('config.terminallog.record.record'), active: true }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
user: {
|
||||||
|
operationLog: [
|
||||||
|
{ prop: 'operationLogTab', name: this.$t('config.operationlog.operationlog'), active: true },
|
||||||
|
{ prop: 'terminalLogTab', name: this.$t('config.terminallog.terminallog'), active: false }
|
||||||
|
],
|
||||||
|
terminalLog: [
|
||||||
|
{ prop: 'operationLogTab', name: this.$t('config.operationlog.operationlog'), active: false },
|
||||||
|
{ prop: 'terminalLogTab', name: this.$t('config.terminallog.terminallog'), active: true }
|
||||||
|
]
|
||||||
|
// module tab
|
||||||
|
},
|
||||||
|
asset: {
|
||||||
|
panel: [
|
||||||
|
{ prop: 'panelTab', name: this.$t('overall.detail'), active: true },
|
||||||
|
{ prop: 'alertMessageTab', name: this.$t('overall.alert'), active: false },
|
||||||
|
{ prop: 'endpointTab', name: 'Endpoint', active: false },
|
||||||
|
{ prop: 'log', name: 'Log', active: false }
|
||||||
|
],
|
||||||
|
alertMessage: [
|
||||||
|
{ prop: 'panelTab', name: this.$t('overall.detail'), active: false },
|
||||||
|
{ prop: 'alertMessageTab', name: this.$t('overall.alert'), active: true },
|
||||||
|
{ prop: 'endpointTab', name: 'Endpoint', active: false },
|
||||||
|
{ prop: 'log', name: 'Log', active: false }
|
||||||
|
],
|
||||||
|
endpoint: [
|
||||||
|
{ prop: 'panelTab', name: this.$t('overall.detail'), active: false },
|
||||||
|
{ prop: 'alertMessageTab', name: this.$t('overall.alert'), active: false },
|
||||||
|
{ prop: 'endpointTab', name: 'Endpoint', active: true },
|
||||||
|
{ prop: 'log', name: 'Log', active: false }
|
||||||
|
],
|
||||||
|
log: [
|
||||||
|
{ prop: 'panelTab', name: this.$t('overall.detail'), active: false },
|
||||||
|
{ prop: 'alertMessageTab', name: this.$t('overall.alert'), active: false },
|
||||||
|
{ prop: 'endpointTab', name: 'Endpoint', active: false },
|
||||||
|
{ prop: 'log', name: 'Log', active: true }
|
||||||
|
],
|
||||||
|
alertMessageSub: [
|
||||||
|
{ prop: 'panelTab', name: this.$t('overall.detail'), active: false },
|
||||||
|
{ prop: 'alertMessageTab', name: this.$t('overall.alert'), active: false },
|
||||||
|
{ prop: 'endpointTab', name: 'Endpoint', active: false },
|
||||||
|
{ prop: 'log', name: 'Log', active: false },
|
||||||
|
{ prop: 'assetSubTab', name: this.$t('overall.assetSubTab'), active: true }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
module: {
|
||||||
|
moduleTabTitle: [
|
||||||
|
// { prop: 'panel', name: 'Detail' },
|
||||||
|
{ prop: 'endpoint', name: this.$t('asset.endpoint') },
|
||||||
|
{ prop: 'moduleAlertMessage', name: this.$t('overall.alert') }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
endpoint: {
|
||||||
|
endpointTabTitle: [
|
||||||
|
{ prop: 'panelTab', name: this.$t('overall.detail') },
|
||||||
|
{ prop: 'endpointAlertMessage', name: this.$t('overall.alert') },
|
||||||
|
{ prop: 'endpointQuery', name: 'Metrics' },
|
||||||
|
{ prop: 'log', name: 'Log' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
chartTemp: {
|
||||||
|
chartTempTabTitle: [
|
||||||
|
{ prop: 'panel', name: this.$t('overall.tempPrev') }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
alertRule: {
|
||||||
|
alertRule: [
|
||||||
|
{ prop: 'alertRuleAlertMessage', name: this.$t('overall.alert') }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
model: [
|
||||||
|
{ prop: 'asset', name: this.$t('asset.assets'), active: true }
|
||||||
|
],
|
||||||
|
dc: {
|
||||||
|
cabinet: [
|
||||||
|
{ prop: 'cabinet', name: this.$t('config.dc.cabinets'), active: true },
|
||||||
|
{ prop: 'asset', name: this.$t('asset.assets'), active: false },
|
||||||
|
{ prop: 'alertMessageTab', name: this.$t('overall.alert'), active: false }
|
||||||
|
],
|
||||||
|
asset: [
|
||||||
|
{ prop: 'cabinet', name: this.$t('config.dc.cabinets'), active: false },
|
||||||
|
{ prop: 'asset', name: this.$t('asset.assets'), active: true },
|
||||||
|
{ prop: 'alertMessageTab', name: this.$t('overall.alert'), active: false }
|
||||||
|
],
|
||||||
|
alertMessage: [
|
||||||
|
{ prop: 'cabinet', name: this.$t('config.dc.cabinets'), active: false },
|
||||||
|
{ prop: 'asset', name: this.$t('asset.assets'), active: false },
|
||||||
|
{ prop: 'alertMessageTab', name: this.$t('overall.alert'), active: true }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
hasLogConfig () {
|
||||||
|
const config = this.obj.configs.find(c => c.type === 'logs')
|
||||||
|
return config && config.enable === 1
|
||||||
|
},
|
||||||
|
endpointTabs () {
|
||||||
|
const config = this.obj.configs.find(c => c.type === 'logs')
|
||||||
|
const hasLog = config && config.enable === 1
|
||||||
|
const tabs = [
|
||||||
|
{ prop: 'panelTab', name: this.$t('overall.detail') },
|
||||||
|
{ prop: 'endpointAlertMessage', name: this.$t('overall.alert') },
|
||||||
|
{ prop: 'endpointQuery', name: 'Metrics' }
|
||||||
|
]
|
||||||
|
if (hasLog) {
|
||||||
|
tabs.push({ prop: 'log', name: 'Log' })
|
||||||
|
}
|
||||||
|
return tabs
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
exitFullScreen () {
|
||||||
|
this.$emit('exitFullScreen')
|
||||||
|
this.$nextTick(() => { this.afterResize() })
|
||||||
|
},
|
||||||
|
fullScreen () {
|
||||||
|
this.$emit('fullScreen')
|
||||||
|
this.$nextTick(() => { this.afterResize() })
|
||||||
|
},
|
||||||
|
closeSubList () {
|
||||||
|
this.$emit('closeSubList')
|
||||||
|
},
|
||||||
|
listResize (e) {
|
||||||
|
this.$emit('listResize', e)
|
||||||
|
this.$nextTick(() => { this.afterResize() })
|
||||||
|
},
|
||||||
|
changeTab (tab) {
|
||||||
|
this.targetTab = tab
|
||||||
|
},
|
||||||
|
afterResize () {
|
||||||
|
if (this.from === this.fromRoute.endpoint && this.targetTab === 'endpointQuery') {
|
||||||
|
this.$refs.endpointQuery.tableReload()
|
||||||
|
} else if (this.from === this.fromRoute.terminalLog && this.targetTab === 'record') {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$refs.reminalLogRecordTab.consoleResize()
|
||||||
|
}, 600)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getTableData () {
|
||||||
|
this.$emit('getTableData')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.sub-box{
|
||||||
|
height: 100%;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.sub-list__tabs {
|
||||||
|
flex: 1;
|
||||||
|
background-color: white;
|
||||||
|
height: calc(100% - 82px);
|
||||||
|
border: 1px solid #E7EAED;
|
||||||
|
&>div {
|
||||||
|
height: 100%;
|
||||||
|
&>.nz-table2 {
|
||||||
|
height: calc(100% - 92px);
|
||||||
|
padding: 20px 20px 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.chart-list{
|
||||||
|
.nz-table2 {
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/deep/ .sub-container{
|
||||||
|
height: calc(100% - 45px);
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.sub-box /deep/ .top-tools.top-tools--sub{
|
||||||
|
border: none;
|
||||||
|
padding: 0 15px 0px 0px;
|
||||||
|
margin-right: 15px;
|
||||||
|
margin-left: 20px;
|
||||||
|
border-bottom: 1px solid #E7EAED;
|
||||||
|
}
|
||||||
|
.sub-box /deep/ .list-width {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.sub-box /deep/ .nz-table2{
|
||||||
|
padding: 20px;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.sub-box /deep/ .table-list{
|
||||||
|
padding: 0;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.sub-box /deep/ .pagination-bottom {
|
||||||
|
bottom: -3px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -303,11 +303,16 @@ export default {
|
|||||||
this.tools.customTableTitle = this.tools.customTableTitle.concat(arr)
|
this.tools.customTableTitle = this.tools.customTableTitle.concat(arr)
|
||||||
}
|
}
|
||||||
if (!this.fromBottom) {
|
if (!this.fromBottom) {
|
||||||
|
if (this.detailType !== 'view') {
|
||||||
this.getTableData()
|
this.getTableData()
|
||||||
|
} else {
|
||||||
|
this.getDetail()
|
||||||
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.dataTable.$refs.dataTable.doLayout()
|
this.$refs.dataTable.$refs.dataTable.doLayout()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
beforeDestroy () {
|
beforeDestroy () {
|
||||||
if (this.scrollbarWrap) {
|
if (this.scrollbarWrap) {
|
||||||
|
|||||||
@@ -3,21 +3,32 @@ export default {
|
|||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
detailType: 'list',
|
detailType: 'list',
|
||||||
detailViewRightObj: {}
|
detailViewRightObj: '',
|
||||||
|
detailViewLoading: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
created () {
|
||||||
|
this.detailType = localStorage.getItem('detail-view-' + this.tableId) || 'list'
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
changeDetailType (flag) {
|
changeDetailType (flag) {
|
||||||
if (this.detailType === flag) {
|
if (this.detailType === flag) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.detailType = flag
|
this.detailType = flag
|
||||||
|
localStorage.setItem('detail-view-' + this.tableId, this.detailType)
|
||||||
this.pageObj.pageNo = 1
|
this.pageObj.pageNo = 1
|
||||||
|
this.detailViewLoading = true
|
||||||
if (flag === 'list') {
|
if (flag === 'list') {
|
||||||
|
this.searchLabel = {}
|
||||||
|
this.searchCheckBox = {}
|
||||||
this.getTableData()
|
this.getTableData()
|
||||||
} else {
|
} else {
|
||||||
this.getDetail()
|
this.getDetail()
|
||||||
}
|
}
|
||||||
|
setTimeout(() => {
|
||||||
|
this.detailViewLoading = false
|
||||||
|
}, 100)
|
||||||
},
|
},
|
||||||
searchDetail (params) {
|
searchDetail (params) {
|
||||||
this.getDetail()
|
this.getDetail()
|
||||||
@@ -25,7 +36,7 @@ export default {
|
|||||||
getDetail () {
|
getDetail () {
|
||||||
const params = {
|
const params = {
|
||||||
pageNo: this.pageObj.pageNo,
|
pageNo: this.pageObj.pageNo,
|
||||||
pageSize: 50
|
pageSize: this.pageObj.pageSize
|
||||||
}
|
}
|
||||||
this.tools.loading = true
|
this.tools.loading = true
|
||||||
this.$get(this.url, { ...params }).then(response => {
|
this.$get(this.url, { ...params }).then(response => {
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
fromListObj:{}
|
showTitle: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -21,9 +21,12 @@
|
|||||||
<el-dropdown
|
<el-dropdown
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="showLayout.indexOf('detailViewSet') > -1"
|
v-if="showLayout.indexOf('detailViewSet') > -1"
|
||||||
class="margin-l-10"
|
class="margin-l-5"
|
||||||
@command="changeDetailType">
|
@command="changeDetailType">
|
||||||
|
<button class="top-tool-btn table-column-setting"
|
||||||
|
type="button">
|
||||||
<i class="nz-icon nz-icon-alert-list" />
|
<i class="nz-icon nz-icon-alert-list" />
|
||||||
|
</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>
|
||||||
<el-dropdown-item :command="'view'" :class="detailType === 'view' ? 'active' : ''">详细</el-dropdown-item>
|
<el-dropdown-item :command="'view'" :class="detailType === 'view' ? 'active' : ''">详细</el-dropdown-item>
|
||||||
@@ -191,3 +194,8 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.active{
|
||||||
|
color: #fa901c;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="detailType === 'list'">
|
<div>
|
||||||
<nz-data-list
|
<nz-data-list
|
||||||
|
v-loading="detailViewLoading"
|
||||||
|
v-show="detailType === 'list'"
|
||||||
ref="dataList"
|
ref="dataList"
|
||||||
:api="url"
|
:api="url"
|
||||||
:custom-table-title.sync="tools.customTableTitle"
|
:custom-table-title.sync="tools.customTableTitle"
|
||||||
@@ -9,7 +11,7 @@
|
|||||||
:search-msg="searchMsg"
|
:search-msg="searchMsg"
|
||||||
:nz-table-height-offset="assetNzTableHeightOffset"
|
:nz-table-height-offset="assetNzTableHeightOffset"
|
||||||
@search="search"
|
@search="search"
|
||||||
@detailType="detailType"
|
:detailType="detailType"
|
||||||
@changeDetailType="changeDetailType"
|
@changeDetailType="changeDetailType"
|
||||||
@getTableData="getTableData"
|
@getTableData="getTableData"
|
||||||
@getDetail="getDetail"
|
@getDetail="getDetail"
|
||||||
@@ -48,8 +50,8 @@
|
|||||||
</template>
|
</template>
|
||||||
</top-tool-more-options>
|
</top-tool-more-options>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:search>
|
<template v-slot:search >
|
||||||
<click-search ref="clickSearch" :select-value.sync="selectValue" :title-search-list="titleSearchList" @reload="reloadTable"/>
|
<click-search ref="clickSearch" v-if="detailType === 'list'" :select-value.sync="selectValue" :title-search-list="titleSearchList" @reload="reloadTable"/>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:default="slotProps">
|
<template v-slot:default="slotProps">
|
||||||
<asset-table
|
<asset-table
|
||||||
@@ -74,36 +76,13 @@
|
|||||||
<Pagination ref="Pagination" :pageObj="pageObj" :tableId="tableId" @pageNo='pageNo' @pageSize='pageSize'></Pagination>
|
<Pagination ref="Pagination" :pageObj="pageObj" :tableId="tableId" @pageNo='pageNo' @pageSize='pageSize'></Pagination>
|
||||||
</template>
|
</template>
|
||||||
</nz-data-list>
|
</nz-data-list>
|
||||||
<transition name="right-box">
|
|
||||||
<asset-box v-if="rightBox.show"
|
|
||||||
ref="assetBox"
|
|
||||||
:dc-data="dcData"
|
|
||||||
:field-group-data="fieldGroupData"
|
|
||||||
:from="fromRoute.asset"
|
|
||||||
:obj="object"
|
|
||||||
:snmp-credential-data="snmpCredentialData"
|
|
||||||
:state-data="stateData"
|
|
||||||
:type-data="typeData"
|
|
||||||
@close="closeRightBox"
|
|
||||||
@refresh="getTableData"></asset-box>
|
|
||||||
</transition>
|
|
||||||
<transition name="right-box">
|
|
||||||
<asset-batch-edit-box v-if="rightBox.batchShow"
|
|
||||||
:field-group-data="fieldGroupData"
|
|
||||||
:snmp-credential-data="snmpCredentialData"
|
|
||||||
:state-data="stateData"
|
|
||||||
@close="closeRightBox"
|
|
||||||
@refresh="getTableData"></asset-batch-edit-box>
|
|
||||||
</transition>
|
|
||||||
<transition name="right-box"><alert-silence-box v-if='silenceBoxShow' :alert-silence="objectSilence" @close="closeSilenceBox"></alert-silence-box>
|
|
||||||
</transition>
|
|
||||||
</div>
|
|
||||||
<div v-else>
|
|
||||||
<nzDetailView
|
<nzDetailView
|
||||||
|
v-loading="detailViewLoading"
|
||||||
|
v-show="detailType !== 'list'"
|
||||||
:api="url"
|
:api="url"
|
||||||
:layout="dataListLayout"
|
:layout="dataListLayout"
|
||||||
:from="fromRoute.asset"
|
:from="fromRoute.asset"
|
||||||
@detailType="detailType"
|
:detailType="detailType"
|
||||||
:detailViewRightObj="detailViewRightObj"
|
:detailViewRightObj="detailViewRightObj"
|
||||||
@search="searchDetail"
|
@search="searchDetail"
|
||||||
@changeDetailType="changeDetailType"
|
@changeDetailType="changeDetailType"
|
||||||
@@ -134,6 +113,7 @@
|
|||||||
class="data-detail"
|
class="data-detail"
|
||||||
ref="dataDetail"
|
ref="dataDetail"
|
||||||
v-loading="tools.loading"
|
v-loading="tools.loading"
|
||||||
|
:detailViewRightObj="detailViewRightObj"
|
||||||
:api="url"
|
:api="url"
|
||||||
:table-data="tableData"
|
:table-data="tableData"
|
||||||
@detailViewRightShow = 'detailViewRightShow'
|
@detailViewRightShow = 'detailViewRightShow'
|
||||||
|
|||||||
Reference in New Issue
Block a user