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

# Conflicts:
#	nezha-fronted/src/components/cli/webSSH.vue
#	nezha-fronted/src/components/common/alert/alertLabel2.vue
#	nezha-fronted/src/components/common/detailView/list/asset/assetDetail.vue
#	nezha-fronted/src/components/common/popBox/topToolMoreOptions.vue
#	nezha-fronted/src/components/common/rightBox/editEndpointBoxNew.vue
#	nezha-fronted/src/components/common/rightBox/moduleBox.vue
#	nezha-fronted/src/components/page/config/system.vue
#	nezha-fronted/src/components/page/monitor/project/index.vue
This commit is contained in:
chenjinsong
2021-11-11 11:28:19 +08:00
10076 changed files with 1357 additions and 604 deletions

View File

@@ -1529,8 +1529,12 @@ export default {
this.$emit('on-duplicate-chart-block', this.data.id)
},
dateChange (time) {
const nowTimeType = this.$refs.pickTime.$refs.timePicker.nowTimeType
this.setSearchTime(nowTimeType.type, nowTimeType.value, nowTimeType)
this.filter.start_time = bus.timeFormate(this.searchTime[0], 'yyyy-MM-dd hh:mm:ss')
this.filter.end_time = bus.timeFormate(this.searchTime[1], 'yyyy-MM-dd hh:mm:ss')
this.filter.value = this.searchTime[2]
this.filter.id = this.$refs.pickTime.$refs.timePicker.showTime.id
// this.echartModalStore.clear()
this.showLegend = false
this.$refs['localLoadingScreen' + this.chartIndex].startLoading()
@@ -1540,6 +1544,28 @@ export default {
this.getQueryChart('dashboard')
}
},
setSearchTime (type, val, nowTimeType) { // 设置searchTime
if (type === 'minute') {
const startTime = bus.timeFormate(new Date(bus.computeTimezone(new Date().getTime())).setMinutes(new Date(bus.computeTimezone(new Date().getTime())).getMinutes() - val), 'yyyy-MM-dd hh:mm:ss')
const endTime = bus.timeFormate(new Date(bus.computeTimezone(new Date().getTime())), 'yyyy-MM-dd hh:mm:ss')
this.$set(this.searchTime, 0, startTime)
this.$set(this.searchTime, 1, endTime)
this.$set(this.searchTime, 2, val + 'm')
} else if (type === 'hour') {
const startTime = bus.timeFormate(new Date(bus.computeTimezone(new Date().getTime())).setHours(new Date(bus.computeTimezone(new Date().getTime())).getHours() - val), 'yyyy-MM-dd hh:mm:ss')
const endTime = bus.timeFormate(new Date(bus.computeTimezone(new Date().getTime())), 'yyyy-MM-dd hh:mm:ss')
this.$set(this.searchTime, 0, startTime)
this.$set(this.searchTime, 1, endTime)
this.$set(this.searchTime, 2, val + 'h')
} else if (type === 'date') {
const startTime = bus.timeFormate(new Date(bus.computeTimezone(new Date().getTime())).setDate(new Date(bus.computeTimezone(new Date().getTime())).getDate() - val), 'yyyy-MM-dd hh:mm:ss')
const endTime = bus.timeFormate(new Date(bus.computeTimezone(new Date().getTime())), 'yyyy-MM-dd hh:mm:ss')
this.$set(this.searchTime, 0, startTime)
this.$set(this.searchTime, 1, endTime)
this.$set(this.searchTime, 2, val + 'd')
}
this.$refs.pickTime.$refs.timePicker.searchTime = this.searchTime
},
// 查询数据,修改日期查询全屏数据
getQueryChart (type) {
/*