Commit b2feb1d2 authored by 张耀's avatar 张耀

fix:

修复bug:10740 【研发环境】点击预警规则名称,详情页面未展示出来
parent 1e4b1338
...@@ -126,6 +126,9 @@ const labelData = [ ...@@ -126,6 +126,9 @@ const labelData = [
const info = ref({}); const info = ref({});
const warning_scope_label = ref([]); const warning_scope_label = ref([]);
const watning_scope_data = ref({}); const watning_scope_data = ref({});
const watning_scope_data_key = computed(() => {
return Object.keys(watning_scope_data.value);
});
const advanced_label = [ const advanced_label = [
[ [
{ {
...@@ -232,7 +235,11 @@ const getInfoData = () => { ...@@ -232,7 +235,11 @@ const getInfoData = () => {
ruleRows.value = data.alert_condition.map((e) => { ruleRows.value = data.alert_condition.map((e) => {
let min = e.thresholds_min + unit; let min = e.thresholds_min + unit;
if (e.thresholds_min === undefined) { 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; min = ruleTypeOptions.value[data.alert_rule_type].down + unit;
} else { } else {
min = WIELESS_SMALL; min = WIELESS_SMALL;
...@@ -240,7 +247,11 @@ const getInfoData = () => { ...@@ -240,7 +247,11 @@ const getInfoData = () => {
} }
let max = e.thresholds_max + unit; let max = e.thresholds_max + unit;
if (e.thresholds_max === undefined) { 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; max = ruleTypeOptions.value[data.alert_rule_type].up + unit;
} else { } else {
max = WIELESS_BIG; 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