feat:添加detail的详情
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
.el-tabs__item{
|
||||
border: 1px solid $--border-color-light;
|
||||
border-radius: 2px;
|
||||
border-bottom: none;
|
||||
//border-bottom: none;
|
||||
margin-right: 6px;
|
||||
background: $--background-color-base;
|
||||
color: $--color-text-regular;
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<template>
|
||||
<div class="">
|
||||
<div v-for="item in cardNames" :key="item.key" v-if="infoData[item.key]">
|
||||
<div>{{item.label}}</div>
|
||||
<div v-if="item.key === 'summary' || item.key === 'remark'">
|
||||
{{infoData[item.key]}}
|
||||
</div>
|
||||
<div v-if="item.key==='labels'">
|
||||
labels
|
||||
</div>
|
||||
<div v-if="item.key==='startAt'">
|
||||
{{utcTimeToTimezoneStr(infoData[item.key])}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'alertMessageInfoDetail',
|
||||
props: {
|
||||
infoData: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
cardNames: [
|
||||
{ key: 'summary', label: this.$t('alert.summary') },
|
||||
{ key: 'remark', label: this.$t('overall.remark') },
|
||||
{ key: 'labels', label: this.$t('alert.list.labels') },
|
||||
{ key: 'startAt', label: this.$t('alert.startAt') }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -3,6 +3,9 @@
|
||||
<el-tabs v-model="activeName" type="card" v-if="!nodata">
|
||||
<el-tab-pane v-for="item in cardNames" :label="item.label" :name="item.key" :key="item.key">
|
||||
{{item.key}}
|
||||
<div v-if="item.key === 'detail'">
|
||||
<alert-message-info-detail :info-data="infoData"/>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<div v-else class="table-no-data">
|
||||
@@ -15,8 +18,12 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import alertMessageInfoDetail from '@/components/common/alert/alertMessageInfoDetail'
|
||||
export default {
|
||||
name: 'alertMessageInfoTab',
|
||||
components: {
|
||||
alertMessageInfoDetail
|
||||
},
|
||||
props: {
|
||||
infoData: {
|
||||
type: Object
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope" :column="item">
|
||||
<template v-if="item.prop === 'time'">{{utcTimeToTimezoneStr(scope.row.time)}}</template>
|
||||
<template v-if="item.prop === 'time'">{{bus.timeFormate(scope.row.time)}}</template>
|
||||
<span v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</span>
|
||||
<template v-else>-</template>
|
||||
</template>
|
||||
|
||||
@@ -104,7 +104,7 @@ Vue.mixin({
|
||||
},
|
||||
utcTimeToTimezoneStr: function (time) {
|
||||
if (time) {
|
||||
return bus.timeFormate(time, localStorage.getItem('nz-default-dateFormat') || 'YYYY-MM-DD HH:mm:ss')
|
||||
return bus.timeFormate(bus.UTCTimeToConfigTimezone(time), localStorage.getItem('nz-default-dateFormat') || 'YYYY-MM-DD HH:mm:ss')
|
||||
} else {
|
||||
return '-'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user