style:样式调整
This commit is contained in:
@@ -31,7 +31,22 @@
|
|||||||
.el-tabs__header{
|
.el-tabs__header{
|
||||||
margin: 0;
|
margin: 0;
|
||||||
.el-tabs__item{
|
.el-tabs__item{
|
||||||
|
border: 1px solid $--border-color-light;
|
||||||
|
border-radius: 2px;
|
||||||
|
border-bottom: none;
|
||||||
margin-right: 6px;
|
margin-right: 6px;
|
||||||
|
background: $--background-color-base;
|
||||||
|
color: $--color-text-regular;
|
||||||
|
}
|
||||||
|
.el-tabs__item:hover{
|
||||||
|
color: $--color-warning;
|
||||||
|
background: $--background-color-empty;
|
||||||
|
border-bottom-color: $--background-color-empty;
|
||||||
|
}
|
||||||
|
.el-tabs__item.is-active{
|
||||||
|
color: $--color-warning;
|
||||||
|
background: $--background-color-empty;
|
||||||
|
border-bottom-color: $--background-color-empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.el-tabs__content{
|
.el-tabs__content{
|
||||||
@@ -47,6 +62,17 @@
|
|||||||
.info-box-right{
|
.info-box-right{
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
.table-no-data {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.el-tabs__nav{
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
></chart>
|
></chart>
|
||||||
<alertMessageInfoTab
|
<alertMessageInfoTab
|
||||||
class="alert-message-info-tab"
|
class="alert-message-info-tab"
|
||||||
:id="chartInfo.id" />
|
:infoData="infoData" />
|
||||||
</div>
|
</div>
|
||||||
<div class="info-box-right">
|
<div class="info-box-right">
|
||||||
时间
|
时间
|
||||||
@@ -93,7 +93,8 @@ export default {
|
|||||||
showAllData: false,
|
showAllData: false,
|
||||||
allDataLength: 0,
|
allDataLength: 0,
|
||||||
severityData: this.$store.getters.severityData,
|
severityData: this.$store.getters.severityData,
|
||||||
severityDataWeight: this.$store.getters.severityDataWeight
|
severityDataWeight: this.$store.getters.severityDataWeight,
|
||||||
|
infoData: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -306,6 +307,17 @@ export default {
|
|||||||
},
|
},
|
||||||
showFullscreen (show) {
|
showFullscreen (show) {
|
||||||
this.$emit('showFullscreen', show, this.chartInfo)
|
this.$emit('showFullscreen', show, this.chartInfo)
|
||||||
|
},
|
||||||
|
getAlertMessageInfo () {
|
||||||
|
this.nodata = false
|
||||||
|
this.$get('/alert/message/' + this.chartInfo.id).then(res => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.infoData = res.data
|
||||||
|
this.nodata = false
|
||||||
|
} else {
|
||||||
|
this.nodata = true
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -326,6 +338,7 @@ export default {
|
|||||||
mounted () {
|
mounted () {
|
||||||
this.chartInfo.loaded && this.getChartData()
|
this.chartInfo.loaded && this.getChartData()
|
||||||
this.showAllData = !this.showMultiple(this.chartInfo.type)
|
this.showAllData = !this.showMultiple(this.chartInfo.type)
|
||||||
|
this.getAlertMessageInfo()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-tabs v-model="activeName" type="card" v-if="nodata">
|
<el-tabs v-model="activeName" type="card" v-if="!nodata">
|
||||||
<el-tab-pane label="用户管理" name="first">用户管理</el-tab-pane>
|
<el-tab-pane v-for="item in cardNames" :label="item.label" :name="item.key" :key="item.key">
|
||||||
<el-tab-pane label="配置管理" name="second">配置管理</el-tab-pane>
|
{{item.key}}
|
||||||
<el-tab-pane label="角色管理" name="third">角色管理</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="定时任务补偿" name="fourth">定时任务补偿</el-tab-pane>
|
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
<div v-else class="table-no-data">
|
<div v-else class="table-no-data">
|
||||||
<svg class="icon" aria-hidden="true">
|
<svg class="icon" aria-hidden="true">
|
||||||
@@ -19,35 +18,63 @@
|
|||||||
export default {
|
export default {
|
||||||
name: 'alertMessageInfoTab',
|
name: 'alertMessageInfoTab',
|
||||||
props: {
|
props: {
|
||||||
id: {
|
infoData: {
|
||||||
type: Number
|
type: Object
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
activeName: '',
|
activeName: 'detail',
|
||||||
nodata: false,
|
nodata: false,
|
||||||
cardNames: [{
|
cardNames: [{
|
||||||
key: 'detail',
|
key: 'detail',
|
||||||
label: this.$t('overall.detail')
|
label: this.$t('overall.detail')
|
||||||
|
}],
|
||||||
|
sysArr: [{
|
||||||
|
key: 'dc',
|
||||||
|
label: this.$t('overall.dc')
|
||||||
|
}, {
|
||||||
|
key: 'asset',
|
||||||
|
label: this.$t('overall.asset')
|
||||||
|
}, {
|
||||||
|
key: 'alertRule',
|
||||||
|
label: this.$t('alert.alertRule')
|
||||||
|
}, {
|
||||||
|
key: 'endpoint',
|
||||||
|
label: this.$t('overall.endpoint')
|
||||||
|
}, {
|
||||||
|
key: 'module',
|
||||||
|
label: this.$t('overall.module')
|
||||||
|
}, {
|
||||||
|
key: 'project',
|
||||||
|
label: this.$t('overall.project')
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
watch: {
|
||||||
this.getAlertMessageInfo()
|
infoData: {
|
||||||
},
|
immediate: true,
|
||||||
methods: {
|
handler (n) {
|
||||||
getAlertMessageInfo () {
|
if (n) {
|
||||||
this.nodata = false
|
this.cardNames = [{
|
||||||
this.$get('/alert/message/' + this.id).then(res => {
|
key: 'detail',
|
||||||
if (res.code === 200) {
|
label: this.$t('overall.detail')
|
||||||
console.log(res)
|
}]
|
||||||
} else {
|
this.sysArr.forEach(item => {
|
||||||
this.nodata = true
|
if (n[item.key]) {
|
||||||
|
this.cardNames.push(item)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted () {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user