Merge remote-tracking branch 'origin/dev-3.1' into dev-3.1.1_theme

# Conflicts:
#	nezha-fronted/src/assets/css/common.scss
#	nezha-fronted/src/assets/css/common/tableCommon.scss
#	nezha-fronted/src/assets/stylus/main.scss
#	nezha-fronted/src/components/charts/chart-list.vue
#	nezha-fronted/src/components/charts/logs.vue
#	nezha-fronted/src/components/common/alert/alertLabel.vue
#	nezha-fronted/src/components/common/alert/alertRuleInfo.vue
#	nezha-fronted/src/components/common/bottomBox/bottomBox.vue
#	nezha-fronted/src/components/common/bottomBox/tabs/endpointQuery.vue
#	nezha-fronted/src/components/common/bottomBox/tabs/endpointQueryTab.vue
#	nezha-fronted/src/components/common/bottomBox/tabs/logBottomTab.vue
#	nezha-fronted/src/components/common/bottomBox/tabs/panelTabNew.vue
#	nezha-fronted/src/components/common/detailView/list/alertRule/alertRuleDetail.vue
#	nezha-fronted/src/components/common/detailView/list/asset/assetDetail.vue
#	nezha-fronted/src/components/common/detailView/list/dc/dcDetail.vue
#	nezha-fronted/src/components/common/detailView/list/endpoint/endpointDetail.vue
#	nezha-fronted/src/components/common/detailView/list/module/moduleDetail.vue
#	nezha-fronted/src/components/common/detailView/nzDetailView.vue
#	nezha-fronted/src/components/common/detailView/view/detailViewRight.vue
#	nezha-fronted/src/components/common/labelFilter/clickSearch.vue
#	nezha-fronted/src/components/common/multipleTime.vue
#	nezha-fronted/src/components/common/pickTime.vue
#	nezha-fronted/src/components/common/popBox/topToolMoreOptions.vue
#	nezha-fronted/src/components/common/project/L5/topoTooltip.vue
#	nezha-fronted/src/components/common/project/popData/Info.vue
#	nezha-fronted/src/components/common/rightBox/alertRuleBox.vue
#	nezha-fronted/src/components/common/table/alert/alertRuleTable.vue
#	nezha-fronted/src/components/common/table/alert/alertSilenceTable.vue
#	nezha-fronted/src/components/common/table/settings/userTable.vue
#	nezha-fronted/src/components/layout/header.vue
#	nezha-fronted/src/components/page/alert/alertMessage.vue
#	nezha-fronted/src/components/page/alert/nzAlertTag.vue
#	nezha-fronted/src/components/page/asset/components/operation.vue
#	nezha-fronted/src/components/page/config/mibBrowser.vue
#	nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue
#	nezha-fronted/src/components/page/dashboard/explore/logTab.vue
#	nezha-fronted/src/components/page/dashboard/explore/promqlInput.vue
#	nezha-fronted/src/components/page/dashboard/overview/overview2.vue
#	nezha-fronted/src/components/page/dashboard/panel.vue
This commit is contained in:
chenjinsong
2021-11-01 18:24:01 +08:00
151 changed files with 5009 additions and 618 deletions

View File

@@ -4,11 +4,11 @@
<multipleTime v-if="showMultiple" ref="multipleTime" :stepSearchTime="searchTime" class="multiple-time margin-r-10" @change="dateChange(searchTime)"/>
<chart-unit v-if="useChartUnit" v-model="unit" class="margin-r-10"></chart-unit>
<div v-show="useRefresh" class="top-tool-btn-group">
<button :id="id+'-refresh'" class="top-tool-btn top-tool-btn--text" @click="refreshDataFunc">
<button :id="id+'-refresh'" class="top-tool-btn top-tool-btn--text" @click="antiShake">
<i class="global-active-color nz-icon nz-icon-refresh" style="font-size: 14px"></i>&nbsp;
<span><slot name="added-text"></slot></span>
</button>
<button id="browser-go" class="top-tool-btn top-tool-btn--dropdown" @mouseenter="dropdownHandler(true)" @mouseleave="dropdownHandler(false)">
<button id="browser-go" class="top-tool-btn top-tool-btn--dropdown" @click="dropdownHandler(dropdownShow)">
<span class="select-refresh-time-label" v-if="interval !== -1">{{interLabel}}</span>
<i class="nz-icon nz-icon-arrow-down" style="font-size: 12px;"></i>
<transition name="el-zoom-in-top">
@@ -81,6 +81,7 @@ export default {
theme: {
themeColor: ''
}
timer: ''
}
},
created () {
@@ -112,13 +113,10 @@ export default {
}
},
dropdownHandler (show) {
if (show) {
clearTimeout(timeout)
if (!show) {
this.dropdownShow = true
} else {
timeout = setTimeout(() => {
this.dropdownShow = false
}, 700)
this.dropdownShow = false
}
},
getIntervalData (interval) { // interval:结束时间到现在的秒数
@@ -145,6 +143,20 @@ export default {
this.searchTime = time
this.$emit('change', this.searchTime)
this.refreshDataFunc()
},
antiShake () {
if (this.timer) {
clearTimeout(this.timer)
this.timer = setTimeout(() => {
this.refreshDataFunc()
this.timer = ''
}, 200)
} else {
this.timer = setTimeout(() => {
this.refreshDataFunc()
this.timer = ''
}, 200)
}
}
},
watch: {