diff --git a/nezha-fronted/src/components/chart/chart/chartHexagon.vue b/nezha-fronted/src/components/chart/chart/chartHexagon.vue index 553cfc036..f9d1b803c 100644 --- a/nezha-fronted/src/components/chart/chart/chartHexagon.vue +++ b/nezha-fronted/src/components/chart/chart/chartHexagon.vue @@ -63,7 +63,6 @@ export default { immediate: true, deep: true, handler () { - console.log(this.chartData) } }, chartInfo: { diff --git a/nezha-fronted/src/components/chart/panelChart.vue b/nezha-fronted/src/components/chart/panelChart.vue index 8d9731d4d..fa3958779 100644 --- a/nezha-fronted/src/components/chart/panelChart.vue +++ b/nezha-fronted/src/components/chart/panelChart.vue @@ -152,7 +152,6 @@ export default { !severityData.P3 && (severityData.P3 = 0) moduleStateData.push({ ...alertTopModules[i], alert: [severityData] }) }) - console.log(moduleStateData) resolve(moduleStateData) }) } diff --git a/nezha-fronted/src/components/common/honeycomb/hexagonFigureSvg.vue b/nezha-fronted/src/components/common/honeycomb/hexagonFigureSvg.vue index 46fafacf3..0db2e3c7f 100644 --- a/nezha-fronted/src/components/common/honeycomb/hexagonFigureSvg.vue +++ b/nezha-fronted/src/components/common/honeycomb/hexagonFigureSvg.vue @@ -173,7 +173,6 @@ export default { deep: true, handler (n) { this.init() - console.log(n) } }, col: { // 列数 diff --git a/nezha-fronted/src/components/common/rightBox/chart/chartConfig.vue b/nezha-fronted/src/components/common/rightBox/chart/chartConfig.vue index d021acc94..1d4f134c5 100644 --- a/nezha-fronted/src/components/common/rightBox/chart/chartConfig.vue +++ b/nezha-fronted/src/components/common/rightBox/chart/chartConfig.vue @@ -41,11 +41,13 @@ }">
{{expressionsShow[index-1].error}}
@@ -796,13 +798,13 @@ export default { }, end (event) { this.expressions = [] - this.expressionsShow = [] this.expressionName = [] if (!this.chartConfig.elements.length) { this.addExpression() } else { this.chartConfig.elements.forEach(item => { - this.addExpression(item) + this.expressions.push(item.expression) + this.expressionName.push(item.name) }) } this.change() diff --git a/nezha-fronted/src/components/common/rightBox/chart/publicConfig.js b/nezha-fronted/src/components/common/rightBox/chart/publicConfig.js index 023cda341..fdb1d72ba 100644 --- a/nezha-fronted/src/components/common/rightBox/chart/publicConfig.js +++ b/nezha-fronted/src/components/common/rightBox/chart/publicConfig.js @@ -162,10 +162,11 @@ export default { if (this.expressionsShow[index].error) { this.expressionName[index] = this.expressionsShow[index].oldName this.expressionsShow[index].error = '' + } else if (!this.expressionName[index]) { + this.expressionName[index] = this.expressionsShow[index].oldName } else { this.expressionsShow[index].oldName = this.expressionName[index] } - this.expressionsShow[index].hideInput = true this.$refs.chartForm.clearValidate('elements.' + (index - 1) + '.expression') this.expressionChange() }, @@ -173,13 +174,15 @@ export default { const findIndex = this.expressionName.indexOf(val) const lastIndex = this.expressionName.lastIndexOf(val) if (findIndex !== -1 && lastIndex != -1 && lastIndex !== findIndex) { - this.expressionsShow[index].error = 'The name duplicate' + this.expressionsShow[index].error = this.$t('error.nameDuplicate') + } else if (!val) { + this.expressionsShow[index].error = this.$t('validate.required') } else { this.expressionsShow[index].error = '' } }, - showInput (index) { - this.expressionsShow[index].hideInput = false + showInput (index, flag) { + this.expressionsShow[index].hideInput = flag }, transformNumToLetter (num) { // 相当于26进制 获取id const self = this @@ -220,6 +223,7 @@ export default { ) } }, + getExpressionName () { let name = '' for (let i = 0; i <= this.expressionName.length; i++) {