diff --git a/nezha-fronted/src/components/chart/chart/chartGroup.vue b/nezha-fronted/src/components/chart/chart/chartGroup.vue index 0e20aa002..eb12424e2 100644 --- a/nezha-fronted/src/components/chart/chart/chartGroup.vue +++ b/nezha-fronted/src/components/chart/chart/chartGroup.vue @@ -54,14 +54,14 @@ export default { }, initChart () { - setTimeout(() => { - this.dataList = this.dataList.map(item => { - return { - ...item - // hide: item.name.indexOf(this.filter.searchName) === -1, // 搜索条件 - } - }) - }, 100) + // setTimeout(() => { + // this.dataList = this.dataList.map(item => { + // return { + // ...item + // // hide: item.name.indexOf(this.filter.searchName) === -1, // 搜索条件 + // } + // }) + // }, 100) } }, watch: { diff --git a/nezha-fronted/src/components/chart/panelChart.vue b/nezha-fronted/src/components/chart/panelChart.vue index 7189deb37..a08b68178 100644 --- a/nezha-fronted/src/components/chart/panelChart.vue +++ b/nezha-fronted/src/components/chart/panelChart.vue @@ -582,6 +582,9 @@ export default { this.$emit('showFullscreen', show, this.chartInfo) }, groupShow (flag) { + if (this.chartInfo.type === 'group' && !flag) { + this.chartData = lodash.get(this, 'chartInfo.children', []) + } this.chartInfo.param.collapse = flag this.groupInit() bus.$emit('groupMove', '', '', true) diff --git a/nezha-fronted/src/components/common/deleteButton.vue b/nezha-fronted/src/components/common/deleteButton.vue index 854fdc7ae..dc17fd1ef 100644 --- a/nezha-fronted/src/components/common/deleteButton.vue +++ b/nezha-fronted/src/components/common/deleteButton.vue @@ -10,6 +10,7 @@ diff --git a/nezha-fronted/src/components/common/timePicker.vue b/nezha-fronted/src/components/common/timePicker.vue index 3b8eb33c6..7d9dd74ba 100644 --- a/nezha-fronted/src/components/common/timePicker.vue +++ b/nezha-fronted/src/components/common/timePicker.vue @@ -92,9 +92,9 @@ class="date-range-history-item" @click="historyChange(item)" > - {{ timeFormate(item.start) }} + {{ momentTz(item.start) }} {{ $t("dashboard.panel.to") }} - {{ timeFormate(item.end) }} + {{ momentTz(item.end) }} @@ -340,8 +340,8 @@ export default { } this.isCustom = true this.rangeHistory.unshift({ - start: item[0], - end: item[1] + start: this.momentStrToTimestamp(item[0]), + end: this.momentStrToTimestamp(item[1]) }) localStorage.setItem( 'date-range-history' + this.sign, diff --git a/nezha-fronted/src/components/page/config/setup.vue b/nezha-fronted/src/components/page/config/setup.vue index 99085a2bc..07b87fd4d 100644 --- a/nezha-fronted/src/components/page/config/setup.vue +++ b/nezha-fronted/src/components/page/config/setup.vue @@ -447,6 +447,39 @@ export default { changeLocal: function (local) { this.language = local this.$i18n.locale = local + this.setRules() + }, + setRules () { + this.dbRules = { + host: [ + { + required: true, + message: this.$t('validate.required'), + trigger: 'blur' + }, + { validator: host, trigger: 'blur' } + ], + port: [{ validator: port, trigger: 'blur' }], + name: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }], + username: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }], + pin: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }] + } + this.redisRules = { + host: [ + { + required: true, + message: this.$t('validate.required'), + trigger: 'blur' + }, + { validator: host, trigger: 'blur' } + ], + port: [{ validator: port, trigger: 'blur' }] + } + this.sysRules = { + username: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }], + pin: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }], + haVip: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }] + } } } }