|
@@ -681,6 +681,7 @@ export class ConfigurationCenterComponent implements OnInit, AfterViewInit {
|
681
|
681
|
this.validateDictionaryForm = this.fb.group({
|
682
|
682
|
// name: [null, [Validators.required]],//键
|
683
|
683
|
// value: [null, [Validators.required]],//值
|
|
684
|
+ // orders: [null, [Validators.required]],//排序号
|
684
|
685
|
});
|
685
|
686
|
console.log(this.validateDictionaryForm.controls)
|
686
|
687
|
}
|
|
@@ -707,6 +708,8 @@ export class ConfigurationCenterComponent implements OnInit, AfterViewInit {
|
707
|
708
|
id: v.id,
|
708
|
709
|
name: v.name || null,
|
709
|
710
|
value: v.value || null,
|
|
711
|
+ orders: v.orders || null,
|
|
712
|
+ system: v.system || false,
|
710
|
713
|
}
|
711
|
714
|
});
|
712
|
715
|
}else{
|
|
@@ -715,6 +718,8 @@ export class ConfigurationCenterComponent implements OnInit, AfterViewInit {
|
715
|
718
|
id: uuidv4(),
|
716
|
719
|
name: null,
|
717
|
720
|
value: null,
|
|
721
|
+ orders: null,
|
|
722
|
+ system: false,
|
718
|
723
|
}
|
719
|
724
|
];
|
720
|
725
|
}
|
|
@@ -723,7 +728,7 @@ export class ConfigurationCenterComponent implements OnInit, AfterViewInit {
|
723
|
728
|
// 动态添加表单
|
724
|
729
|
this.dictionaryList.forEach((obj, i) => {
|
725
|
730
|
for (const key in obj) {
|
726
|
|
- if(key !== 'id'){
|
|
731
|
+ if(key !== 'id' && key !== 'system'){
|
727
|
732
|
this.validateDictionaryForm.addControl(key + '_' + obj.id, new FormControl(obj[key], [Validators.required]))
|
728
|
733
|
}
|
729
|
734
|
}
|
|
@@ -737,6 +742,7 @@ export class ConfigurationCenterComponent implements OnInit, AfterViewInit {
|
737
|
742
|
id: uuidv4(),
|
738
|
743
|
name: null,
|
739
|
744
|
value: null,
|
|
745
|
+ orders: null,
|
740
|
746
|
};
|
741
|
747
|
|
742
|
748
|
// 动态添加表单
|
|
@@ -784,7 +790,8 @@ export class ConfigurationCenterComponent implements OnInit, AfterViewInit {
|
784
|
790
|
id: uuidValidate(this.dictionaryList[i].id) ? undefined : this.dictionaryList[i].id,
|
785
|
791
|
name: this.validateDictionaryForm.value['name_' + this.dictionaryList[i].id],
|
786
|
792
|
value: this.validateDictionaryForm.value['value_' + this.dictionaryList[i].id],
|
787
|
|
- orders: i + 1,
|
|
793
|
+ orders: this.validateDictionaryForm.value['orders_' + this.dictionaryList[i].id],
|
|
794
|
+ system: !uuidValidate(this.dictionaryList[i].id),
|
788
|
795
|
key: 'incident_category_score',
|
789
|
796
|
})
|
790
|
797
|
}
|