NEZ-2264 fix: 全局搜索跳转后 显著提示 搜索记录
This commit is contained in:
@@ -608,3 +608,19 @@ textarea {
|
||||
.el-tabs--border-card {
|
||||
background: $--background-color-empty;
|
||||
}
|
||||
.nz-table-global-select{
|
||||
background: linear-gradient(to right, $--table-row-hover-background-color 0%,$--table-row-hover-background-color 50%,$--background-color-empty 51%,$--background-color-empty 100%);
|
||||
background-size: 200% 100%;
|
||||
animation: gradientBG 5s ease-in infinite;
|
||||
}
|
||||
@keyframes gradientBG {
|
||||
0% {
|
||||
background-position: 100% 0%;
|
||||
}
|
||||
50% {
|
||||
background-position: 0% 0%;
|
||||
}
|
||||
100% {
|
||||
background-position: 100% 0%;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,6 +148,10 @@ export default {
|
||||
},
|
||||
rowKey (row) { // ping trace的 唯一key
|
||||
return row.ip + '-' + row.dc.id
|
||||
},
|
||||
cellMouseEnter (row, column, cell, event) {
|
||||
// console.log(row, column, cell, event)
|
||||
cell.parentNode.classList.remove('nz-table-global-select')
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -173,7 +177,10 @@ export default {
|
||||
if (id) {
|
||||
setTimeout(() => {
|
||||
if (document.getElementById('globalSearch' + id)) {
|
||||
document.getElementById('globalSearch' + id).scrollIntoView(true)
|
||||
document.getElementById('globalSearch' + id).scrollIntoView({ block: 'center', inline: 'center' })
|
||||
if (document.getElementById('globalSearch' + id).parentNode.parentNode.parentNode.classList.contains('el-table__row')) {
|
||||
document.getElementById('globalSearch' + id).parentNode.parentNode.parentNode.classList.add('nz-table-global-select')
|
||||
}
|
||||
this.$store.commit('setGlobalSearchId', '')
|
||||
}
|
||||
}, 500)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="multiple-time-box">
|
||||
<div :class="showDropdown?'compare-box':''" :title="$t('dashboard.panel.customTimeRange')"><i class="nz-icon nz-icon-compare" @click="changeShowDropdown" /></div>
|
||||
<transition>
|
||||
<div v-show="showDropdown" id="panel-calender" class="calendar">
|
||||
<div v-show="showDropdown" id="panel-calender" class="calendar" style="position: relative">
|
||||
<my-date-picker prefix-icon=" " size="mini" ref="calendar"
|
||||
:value-format="timeFormatStrToDatePickFormat(timeFormatMain)"
|
||||
:format="timeFormatStrToDatePickFormat(timeFormatMain)" class="panel-time-picker-hidden" @change="dateChange" v-model="startTime" type="datetime"
|
||||
@@ -76,10 +76,10 @@ export default {
|
||||
text: this.$t('dashboard.panel.noDate')
|
||||
},
|
||||
timeData: [
|
||||
// {
|
||||
// id: 0,
|
||||
// text: this.$t('dashboard.panel.customTimeRange')
|
||||
// },
|
||||
{
|
||||
id: 0,
|
||||
text: this.$t('dashboard.panel.customTimeRange')
|
||||
},
|
||||
{
|
||||
id: 12,
|
||||
text: this.$t('dashboard.panel.noDate')
|
||||
@@ -198,8 +198,11 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
dateChange (val) {
|
||||
const startTime = bus.timeFormate(val, this.multipleTime)
|
||||
const endTime = bus.timeFormate(new Date(val).getTime() + new Date(this.stepSearchTime[1]).getTime() - new Date(this.stepSearchTime[0]).getTime(), this.multipleTime)
|
||||
console.log(val)
|
||||
const startTime = this.momentTz(this.momentStrToTimestamp(val))
|
||||
console.log(this.stepSearchTime[1], this.stepSearchTime[0])
|
||||
const end = this.momentStrToTimestamp(val) + this.momentStrToTimestamp(this.stepSearchTime[1]) - this.momentStrToTimestamp(this.stepSearchTime[0])
|
||||
const endTime = this.momentTz(end, this.multipleTime)
|
||||
this.$set(this.searchTime, 0, startTime)
|
||||
this.$set(this.searchTime, 1, endTime)
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
border
|
||||
:default-sort="orderBy"
|
||||
@header-dragend="dragend"
|
||||
@cell-mouse-enter="cellMouseEnter"
|
||||
@sort-change="tableDataSort"
|
||||
@selection-change="selectionChange"
|
||||
@row-dblclick="(row)=>{queryMessage(row)}"
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
:height="height"
|
||||
:default-sort="orderBy"
|
||||
border
|
||||
@cell-mouse-enter="cellMouseEnter"
|
||||
@header-dragend="dragend"
|
||||
@sort-change="tableDataSort"
|
||||
@selection-change="selectionChange"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
:height="height"
|
||||
border
|
||||
:default-sort="orderBy"
|
||||
@cell-mouse-enter="cellMouseEnter"
|
||||
@header-dragend="dragend"
|
||||
@sort-change="tableDataSort"
|
||||
@selection-change="selectionChange"
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
border
|
||||
:default-sort="orderBy"
|
||||
@header-dragend="dragend"
|
||||
@cell-mouse-enter="cellMouseEnter"
|
||||
@sort-change="tableDataSort"
|
||||
@selection-change="selectionChange"
|
||||
@row-dblclick="(row)=>{$emit('showBottomBox', 'panelTab', row)}"
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
:data="tableData"
|
||||
:height="height"
|
||||
border
|
||||
@cell-mouse-enter="cellMouseEnter"
|
||||
:default-sort="orderBy"
|
||||
@header-dragend="dragend"
|
||||
@sort-change="tableDataSort"
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
border
|
||||
:default-sort="orderBy"
|
||||
@header-dragend="dragend"
|
||||
@cell-mouse-enter="cellMouseEnter"
|
||||
@sort-change="tableDataSort"
|
||||
@selection-change="selectionChange"
|
||||
@row-dblclick="(row)=>{changeProjectTopo(row)}"
|
||||
|
||||
Reference in New Issue
Block a user