Commit 65f2f59c authored by 李维's avatar 李维

添加数据锁,默认开启状态

parent f37b1f06
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
......@@ -592,6 +592,9 @@
<div style="width: 200px; height: 50px; border: 1px solid #ccc ; border-radius: 5px; display: flex; align-items: center; justify-content: center; float: left;">
<label nz-checkbox [(ngModel)]="item.isDebug" (ngModelChange)="save()">调试模式</label>
</div>
<div style="width: 200px; height: 50px; border: 1px solid #ccc ; border-radius: 5px; display: flex; align-items: center; justify-content: center; float: left; margin-left: 10px;">
<label nz-checkbox [(ngModel)]="saveLock">数据锁</label>
</div>
<button nz-button nzType="primary" (click)="copyChangeData()" style="float: right;"><i nz-icon nzType="copy"></i>复制数据表单</button>
<button nz-button nzType="danger" (click)="showPasteModal=true;" style="float: right; margin-right: 10px;"><i nz-icon nzType="import"></i>从JSON导入配置</button>
<button nz-button nzType="default" (click)="showConfigCheckModal=true;" style="float: right; margin-right: 10px;"><i nz-icon nzType="carry-out"></i>配置检查</button>
......
......@@ -70,6 +70,9 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni
{label: "100分 3段 - FAF", value: this.RS_100_3L_FAF},
]
// 保存锁
saveLock = true;
@ViewChild('customHotZone', {static: true}) customHotZone: ElementRef;
constructor(private appRef: ApplicationRef, private changeDetectorRef: ChangeDetectorRef, private nzMessageService: NzMessageService, private modal: NzModalService) {
......@@ -629,9 +632,13 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni
* 储存数据
*/
save() {
(<any>window).courseware.setData(this.item, null, this.saveKey);
this.refresh();
console.log(this.item)
if(this.saveLock) {
console.warn("数据锁开启,修改未保存")
} else {
(<any>window).courseware.setData(this.item, null, this.saveKey);
this.refresh();
console.log(this.item)
}
}
/**
......
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