Skip to content

Commit

Permalink
Merge branch 'master' into 0810-yuluo/fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yuluo-yx authored Aug 18, 2024
2 parents 6f18eff + 031e83d commit 26152e1
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export class AlertSettingComponent implements OnInit {
onNewAlertDefine() {
this.define = new AlertDefine();
this.define.tags = [];
this.resetQbData({ condition: 'and', rules: [] });
this.resetQbDataDefault();
this.isManageModalAdd = true;
this.isManageModalVisible = true;
this.isManageModalOkLoading = false;
Expand Down Expand Up @@ -593,6 +593,7 @@ export class AlertSettingComponent implements OnInit {
};

cascadeOnChange(values: string[]): void {
this.resetQbDataDefault();
if (values == null || values.length != 3) {
return;
}
Expand Down Expand Up @@ -645,26 +646,30 @@ export class AlertSettingComponent implements OnInit {
} catch (e) {
console.error(e);
this.isExpr = true;
this.resetQbData({ condition: 'and', rules: [] });
this.resetQbDataDefault();
return;
}
}

onManageModalCancel() {
this.cascadeValues = [];
this.isExpr = false;
this.resetQbData({ condition: 'and', rules: [] });
this.resetQbDataDefault();
this.isManageModalVisible = false;
}

resetQbData(qbData: RuleSet) {
this.qbFormCtrl.reset((this.qbData = qbData));
}

resetQbDataDefault() {
this.resetQbData({ condition: 'and', rules: [] });
}

resetManageModalData() {
this.cascadeValues = [];
this.isExpr = false;
this.resetQbData({ condition: 'and', rules: [] });
this.resetQbDataDefault();
this.isManageModalVisible = false;
}

Expand Down

0 comments on commit 26152e1

Please sign in to comment.