NEZ-1787 fix : hover显示、 默认时间处理 、快捷选择后文案显示
This commit is contained in:
@@ -83,6 +83,7 @@
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
|
||||||
.utc-str {
|
.utc-str {
|
||||||
|
line-height: 44px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
span{
|
span{
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
@@ -163,7 +164,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.date-range-panel {
|
.date-range-panel {
|
||||||
height: 460px;
|
// height: 460px;
|
||||||
width: 500px;
|
width: 500px;
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
|
box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
|
||||||
|
|||||||
@@ -118,7 +118,8 @@ export default {
|
|||||||
obj: Object, // 关联的实体对象
|
obj: Object, // 关联的实体对象
|
||||||
from: String, // 来自哪个页面
|
from: String, // 来自哪个页面
|
||||||
tabList: Array, // 动态页签列表
|
tabList: Array, // 动态页签列表
|
||||||
targetTab: String // 展示哪个页签
|
targetTab: String, // 展示哪个页签
|
||||||
|
sign:[Number,String], //pickTime历史记录的唯一标识
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
obj: {
|
obj: {
|
||||||
|
|||||||
@@ -20,7 +20,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="calendar-popover-text" v-else>
|
<div class="calendar-popover-text" v-else>
|
||||||
<div class="time-no-data">{{ showTime.text }}</div>
|
<el-tooltip class="item" effect="light" placement="bottom">
|
||||||
|
<div slot="content"> {{searchTime[0]}}<br/><p style="text-align:center">{{$t("dashboard.panel.to")}} </p>{{searchTime[1]}}</div>
|
||||||
|
<div class="time-no-data">{{ showTime.text }}</div>
|
||||||
|
</el-tooltip>
|
||||||
|
<!-- <div class="time-no-data">{{ showTime.text }}</div> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="calendar-popover-text">
|
<div class="calendar-popover-text">
|
||||||
<i class="el-icon-arrow-down"></i>
|
<i class="el-icon-arrow-down"></i>
|
||||||
@@ -96,6 +100,8 @@
|
|||||||
@click="timeChange(item)"
|
@click="timeChange(item)"
|
||||||
:class="showTime.id === item.id ? 'active' : ''"
|
:class="showTime.id === item.id ? 'active' : ''"
|
||||||
:key="key"
|
:key="key"
|
||||||
|
:v-if="item.id !== 12 || showEmpty"
|
||||||
|
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
style="position: relative"
|
style="position: relative"
|
||||||
@@ -263,7 +269,27 @@ export default {
|
|||||||
},
|
},
|
||||||
myDatePickerShow (item) {
|
myDatePickerShow (item) {
|
||||||
this.whoChoose = item
|
this.whoChoose = item
|
||||||
this.$refs.calendar.pickerVisible = true
|
this.isCustom = true
|
||||||
|
this.$refs.calendar.focus()
|
||||||
|
this.$refs.calendar.pickerVisible = true
|
||||||
|
if (document.getElementById('viewGraphDialog')) {
|
||||||
|
// 处理 多弹出的z-index的问题 当前为 alertMessage的处理
|
||||||
|
const viewGraphDialogStyle = window.getComputedStyle(
|
||||||
|
document.getElementById('viewGraphDialog', null)
|
||||||
|
)
|
||||||
|
setTimeout(() => {
|
||||||
|
if (viewGraphDialogStyle['z-index'] !== 'auto') {
|
||||||
|
const dom =
|
||||||
|
document.getElementsByClassName('el-picker-panel')
|
||||||
|
Array.prototype.forEach.call(dom, function (element) {
|
||||||
|
element.style['z-index'] =
|
||||||
|
viewGraphDialogStyle['z-index'] + 1
|
||||||
|
})
|
||||||
|
this.$refs.calendar.$el.style['z-index'] =
|
||||||
|
viewGraphDialogStyle['z-index'] + 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
historyChange (item) {
|
historyChange (item) {
|
||||||
this.searchTime[0] = item.start
|
this.searchTime[0] = item.start
|
||||||
@@ -357,33 +383,33 @@ export default {
|
|||||||
this.$set(this.searchTime, 0, timeGroup.start_time)
|
this.$set(this.searchTime, 0, timeGroup.start_time)
|
||||||
this.$set(this.searchTime, 1, timeGroup.end_time)
|
this.$set(this.searchTime, 1, timeGroup.end_time)
|
||||||
} else {
|
} else {
|
||||||
const time = this.searchTime.splice(' ')
|
// const time = this.searchTime.splice(' ')
|
||||||
this.showTime = this.nowTimeType = {
|
|
||||||
text: time[0] + ' ' + this.$t('dashboard.panel.to') + ' ' + time[1]
|
|
||||||
}
|
|
||||||
this.$set(this.searchTime, 0, bus.timeFormate(time[0]))
|
|
||||||
this.$set(this.searchTime, 1, bus.timeFormate(time[1]))
|
|
||||||
// this.$set(this.searchTime, 0, bus.timeFormate(timeGroup.start_time));
|
|
||||||
// this.$set(this.searchTime, 1, bus.timeFormate(timeGroup.end_time));
|
|
||||||
// this.showTime = this.nowTimeType = {
|
// this.showTime = this.nowTimeType = {
|
||||||
// id: 4,
|
// text: time[0] + ' ' + this.$t('dashboard.panel.to') + ' ' + time[1]
|
||||||
// text: this.$t("dashboard.panel.lastOneHour"),
|
|
||||||
// type: "hour",
|
|
||||||
// value: 1,
|
|
||||||
// };
|
|
||||||
// const time = bus.getTimezontDateRange();
|
|
||||||
// if (timeGroup.start_time) {
|
|
||||||
// this.$set(
|
|
||||||
// this.searchTime,
|
|
||||||
// 0,
|
|
||||||
// bus.timeFormate(timeGroup.start_time)
|
|
||||||
// );
|
|
||||||
// this.$set(this.searchTime, 1, bus.timeFormate(timeGroup.end_time));
|
|
||||||
// } else {
|
|
||||||
// this.$set(this.searchTime, 0, bus.timeFormate(time[0]));
|
|
||||||
// this.$set(this.searchTime, 1, bus.timeFormate(time[1]));
|
|
||||||
// }
|
// }
|
||||||
// this.$set(this.searchTime, 0, bus.timeFormate(time[0]));
|
// this.$set(this.searchTime, 0, bus.timeFormate(time[0]))
|
||||||
|
// this.$set(this.searchTime, 1, bus.timeFormate(time[1]))
|
||||||
|
this.$set(this.searchTime, 0, bus.timeFormate(timeGroup.start_time));
|
||||||
|
this.$set(this.searchTime, 1, bus.timeFormate(timeGroup.end_time));
|
||||||
|
this.showTime = this.nowTimeType = {
|
||||||
|
id: 4,
|
||||||
|
text: this.$t("dashboard.panel.lastOneHour"),
|
||||||
|
type: "hour",
|
||||||
|
value: 1,
|
||||||
|
};
|
||||||
|
const time = bus.getTimezontDateRange();
|
||||||
|
if (timeGroup.start_time) {
|
||||||
|
this.$set(
|
||||||
|
this.searchTime,
|
||||||
|
0,
|
||||||
|
bus.timeFormate(timeGroup.start_time)
|
||||||
|
);
|
||||||
|
this.$set(this.searchTime, 1, bus.timeFormate(timeGroup.end_time));
|
||||||
|
} else {
|
||||||
|
this.$set(this.searchTime, 0, bus.timeFormate(time[0]));
|
||||||
|
this.$set(this.searchTime, 1, bus.timeFormate(time[1]));
|
||||||
|
}
|
||||||
|
this.$set(this.searchTime, 0, bus.timeFormate(time[0]));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.showTime = this.nowTimeType = {
|
this.showTime = this.nowTimeType = {
|
||||||
@@ -437,7 +463,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// this.isCustom = false;
|
this.isCustom = false;
|
||||||
this.showDropdown()
|
this.showDropdown()
|
||||||
if (this.showEmpty && id === 12) {
|
if (this.showEmpty && id === 12) {
|
||||||
this.searchTime = []
|
this.searchTime = []
|
||||||
|
|||||||
@@ -580,7 +580,6 @@ export default {
|
|||||||
},
|
},
|
||||||
messageDetail (row) {
|
messageDetail (row) {
|
||||||
this.sign = Number(row.alertRule.id)
|
this.sign = Number(row.alertRule.id)
|
||||||
console.log(this.sign);
|
|
||||||
this.$get('/alert/rule/' + row.alertRule.id).then(res => {
|
this.$get('/alert/rule/' + row.alertRule.id).then(res => {
|
||||||
this.currentMsg = { ...row, alertRule: { ...res.data } }
|
this.currentMsg = { ...row, alertRule: { ...res.data } }
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user