Commit b2feb1d2 authored by 张耀's avatar 张耀

fix:

修复bug:10740 【研发环境】点击预警规则名称,详情页面未展示出来
parent 1e4b1338
......@@ -126,6 +126,9 @@ const labelData = [
const info = ref({});
const warning_scope_label = ref([]);
const watning_scope_data = ref({});
const watning_scope_data_key = computed(() => {
return Object.keys(watning_scope_data.value);
});
const advanced_label = [
[
{
......@@ -232,7 +235,11 @@ const getInfoData = () => {
ruleRows.value = data.alert_condition.map((e) => {
let min = e.thresholds_min + unit;
if (e.thresholds_min === undefined) {
if (ruleTypeOptions.value[data.alert_rule_type].down !== "") {
if (
data.alert_rule_type &&
ruleTypeOptions.value[data.alert_rule_type] &&
ruleTypeOptions.value[data.alert_rule_type]?.down !== ""
) {
min = ruleTypeOptions.value[data.alert_rule_type].down + unit;
} else {
min = WIELESS_SMALL;
......@@ -240,7 +247,11 @@ const getInfoData = () => {
}
let max = e.thresholds_max + unit;
if (e.thresholds_max === undefined) {
if (ruleTypeOptions.value[data.alert_rule_type].up !== "") {
if (
data.alert_rule_type &&
ruleTypeOptions.value[data.alert_rule_type] &&
ruleTypeOptions.value[data.alert_rule_type].up !== ""
) {
max = ruleTypeOptions.value[data.alert_rule_type].up + unit;
} else {
max = WIELESS_BIG;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment