Browse Source

新增主角字段

dev
陈鹏飞 3 years ago
parent
commit
ca71425742
  1. 6
      src/app/pages/plan/plan.component.html
  2. 8
      src/app/pages/plan/plan.component.ts

6
src/app/pages/plan/plan.component.html

@ -257,6 +257,12 @@
<textarea nz-input #description='ngModel' [(ngModel)]="taskDialog.description" name="description"></textarea>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="6">主角</nz-form-label>
<nz-form-control [nzSpan]="18">
<label nz-checkbox [(ngModel)]="taskDialog.isMainCharacter" name="isMainCharacter"></label>
</nz-form-control>
</nz-form-item>
</form>
</nz-modal>
<!-- 应急预案设备任务弹窗 -->

8
src/app/pages/plan/plan.component.ts

@ -681,7 +681,7 @@ export class PlanComponent implements OnInit {
}
contingencyPlanTask: MarkData = null; //应急预案选中 设备
taskDialog: taskDialog = new taskDialog("", "", ""); //设备任务 深拷贝数据
taskDialog: taskDialog = new taskDialog("", "", "", false); //设备任务 深拷贝数据
allTaskList: any[] = []; //所有任务 List
//选中应急预案 设备
@ -696,6 +696,7 @@ export class PlanComponent implements OnInit {
this.taskDialog.institution = JSON.parse(JSON.stringify(markData.property.institution || ""))
this.taskDialog.description = JSON.parse(JSON.stringify(markData.property.description || ""))
this.taskDialog.task = JSON.parse(JSON.stringify(markData.property.task || ""))
this.taskDialog.isMainCharacter = JSON.parse(JSON.stringify(markData.property.isMainCharacter || false))
if (markData.property.taskType === MarkTask.Person) {
this.allTaskList = (new taskList()).character
} else if (markData.property.taskType === MarkTask.Car) {
@ -711,6 +712,7 @@ export class PlanComponent implements OnInit {
this.contingencyPlanTask.property.institution = e.companyName
this.contingencyPlanTask.property.description = e.description
this.contingencyPlanTask.property.task = e.taskName
this.contingencyPlanTask.property.isMainCharacter = e.isMainCharacter
MarkWindow.instance.updateProperty()
this.contingencyPlanTask = null //关闭弹窗
}
@ -876,10 +878,12 @@ export class taskDialog {
institution: string; //单位
task: string; //任务
description: string; //备注
constructor(institution: string, task: string, description: string) {
isMainCharacter: boolean; //主要角色
constructor(institution: string, task: string, description: string, isMainCharacter: boolean) {
this.institution = institution
this.task = task
this.description = description
this.isMainCharacter = isMainCharacter
}
}
//设备任务list

Loading…
Cancel
Save