diff --git a/nezha-fronted/src/components/chart/panelChart.vue b/nezha-fronted/src/components/chart/panelChart.vue index 94ed585d0..72380bf1c 100644 --- a/nezha-fronted/src/components/chart/panelChart.vue +++ b/nezha-fronted/src/components/chart/panelChart.vue @@ -554,9 +554,11 @@ export default { confirmReg.push(item) } }) - confirmReg = this.$loadsh.sortBy(confirmReg, function (item) { // 根据 匹配的name的长度排序 避免匹配的 $a 没匹配 $asset的问题 + confirmReg = this.$loadsh.orderBy(confirmReg, function (item) { // 根据 匹配的name的长度排序 避免匹配的 $a 没匹配 $asset的问题 + console.log(item.name.length) return item.name.length - }) + }, 'desc') + console.log(confirmReg) if (confirmReg.length) { confirmReg.forEach(item => { const reg = new RegExp('\\$' + item.name, 'g') // 后续需要考虑 item,name 使用特殊字符的问题 diff --git a/nezha-fronted/src/components/common/alert/alertMessageInfoTab.vue b/nezha-fronted/src/components/common/alert/alertMessageInfoTab.vue index a47d6b140..0b1ce75be 100644 --- a/nezha-fronted/src/components/common/alert/alertMessageInfoTab.vue +++ b/nezha-fronted/src/components/common/alert/alertMessageInfoTab.vue @@ -23,7 +23,7 @@ />
-
+
@@ -108,7 +108,7 @@ export default { this.cardNames.push(item) } }) - if (n.alertRule && n.alertRule.trbShot) { + if (n.alertRule && n.alertRule.trbShot && n.alertRule.trbShot != '


') { this.cardNames.push({ key: 'trbShot', label: this.$t('alert.config.trbShot') diff --git a/nezha-fronted/src/components/common/rightBox/alertRuleBox.vue b/nezha-fronted/src/components/common/rightBox/alertRuleBox.vue index b6fd00125..881fd55a1 100644 --- a/nezha-fronted/src/components/common/rightBox/alertRuleBox.vue +++ b/nezha-fronted/src/components/common/rightBox/alertRuleBox.vue @@ -507,6 +507,9 @@ export default { method: this.editAlertRule.method.join(','), type: this.editAlertRule.type } + if (this.editAlertRule.trbShot && this.editAlertRule.trbShot == '


') { + this.editAlertRule.trbShot = '' + } this.$refs.alertRuleForm.validate((valid) => { if (valid) { params.receiver = this.editAlertRule.receiverShow.join(',')