Commit fd8a03f5 authored by 李维's avatar 李维

表单页添加分数体系字段

parent 0cac9cfa
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -521,6 +521,12 @@
<span style="display: inline-block; text-align: right; width: 100px;">基础分:</span>
<input type="text" nz-input [(ngModel)]="item.basicScore" (blur)="save()" style="display: inline-block; width: 180px;">
</div>
<div style="margin: 10px 10px;">
<span style="display: inline-block; text-align: right; width: 100px;">评分体系:</span>
<nz-select nzShowSearch nzAllowClear [(ngModel)]="item.ratingSystem" style="width: 180px;" (ngModelChange)="save()">
<nz-option *ngFor="let item of ratingSystemList" [nzValue]="item.value" [nzLabel]="item.label"></nz-option>
</nz-select>
</div>
<div style="margin: 10px 10px;">
<span style="display: inline-block; text-align: right; width: 100px;">总分显示:</span>
<nz-select nzShowSearch nzAllowClear [(ngModel)]="item.totalScoreHotZoneIndex" style="width: 180px;" (ngModelChange)="save()">
......
......@@ -55,6 +55,20 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni
SORT_WORDS = "10";
CONNECTION_CHOICE = "11";
// 评分体系
RS_15_5L_FAF = "0";
RS_25_5L_FAF = "1";
RS_30_5L_FAF = "2";
RS_100_3L_FAF = "3";
// 评分体系 清单
ratingSystemList = [
{label: "15分 5段 - FAF", value: this.RS_15_5L_FAF},
{label: "25分 5段 - FAF", value: this.RS_25_5L_FAF},
{label: "30分 5段 - FAF", value: this.RS_30_5L_FAF},
{label: "100分 3段 - FAF", value: this.RS_100_3L_FAF},
]
@ViewChild('customHotZone', {static: true}) customHotZone: ElementRef;
constructor(private appRef: ApplicationRef, private changeDetectorRef: ChangeDetectorRef, private nzMessageService: NzMessageService, private modal: NzModalService) {
......@@ -486,6 +500,17 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni
otherInfo.push(`配置了基础分: ${this.item.basicScore}`)
}
if(this.item.ratingSystem) {
const ratingSys = this.ratingSystemList.find(item => item.value == this.item.ratingSystem);
if(ratingSys == undefined) {
otherInfo.push(`评分体系: 未知错误`)
} else {
otherInfo.push(`评分体系: ${ratingSys.label}`)
}
} else {
otherInfo.push(`评分体系: 空`)
}
// 取整 防止有很长的小数 - 有的分值是5.000000000000004这种
let _totalScore = Math.floor(totalScore * 100) / 100;
totalScore = parseFloat(_totalScore + "");
......
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