| | |
| | | <th nz-th> |
| | | 三级 |
| | | </th> |
| | | <th nz-th> |
| | | 反向一级 |
| | | <th nz-th [ngStyle]="{'width': '72px'}"> |
| | | 启用反向 |
| | | </th> |
| | | <th nz-th> |
| | | 反向二级 |
| | | <span *ngIf="hasDegression">反向一级</span> |
| | | </th> |
| | | <th nz-th> |
| | | 反向三级 |
| | | <span *ngIf="hasDegression">反向二级</span> |
| | | </th> |
| | | <th nz-th> |
| | | <span *ngIf="hasDegression">反向三级</span> |
| | | </th> |
| | | </tr> |
| | | </thead> |
| | | <tbody formGroupName="alarmLevels" nz-tbody> |
| | | <tr nz-tbody-tr *ngFor="let row of nzTable.data" formGroupName="{{row.sensorKey}}"> |
| | | <tr nz-tbody-tr style="height:50px;" *ngFor="let row of nzTable.data" formGroupName="{{row.sensorKey}}"> |
| | | |
| | | <td nz-td [nzCheckbox]="true"> |
| | | <label nz-checkbox formControlName="enable"></label> |
| | | </td> |
| | | <td> |
| | | <td nz-td> |
| | | <span> |
| | | {{ row.name }}({{ row.unit }}) |
| | | </span> |
| | | </td> |
| | | <td formArrayName="increment" *ngFor="let in of validateForm.get('alarmLevels.'+row.sensorKey+'.increment').controls; index as i"> |
| | | <div nz-form-item> |
| | | <div nz-form-control nzHasFeedback> |
| | | <nz-input [formControlName]="i" maxlength="20" nzDisabled="{{ !f.value['alarmLevels'][row.sensorKey]['enable'] }}"></nz-input> |
| | | </div> |
| | | </div> |
| | | </td> |
| | | <td formArrayName="degression" *ngFor="let in of validateForm.get('alarmLevels.'+row.sensorKey+'.degression').controls; index as i"> |
| | | <td nz-td formArrayName="increment" *ngFor="let in of validateForm.get('alarmLevels.'+row.sensorKey+'.increment').controls; index as i"> |
| | | <div nz-form-item> |
| | | <div nz-form-control nzHasFeedback> |
| | | <nz-input [formControlName]="i" maxlength="20" nzDisabled="{{ !f.value['alarmLevels'][row.sensorKey]['enable'] }}"></nz-input> |
| | | <div style="width:100px;" nz-form-control nzHasFeedback> |
| | | <nz-input-number style="width: 100%;" [formControlName]="i" maxlength="20" nzDisabled="{{ !f.value['alarmLevels'][row.sensorKey]['enable'] }}"></nz-input-number> |
| | | </div> |
| | | </div> |
| | | </td> |
| | | </td> |
| | | <td nz-td style="padding-top: 0;"> |
| | | <div nz-form-control> |
| | | <nz-switch formControlName="degressEnable" (click)="refreshHasDegression(f.value['alarmLevels'][row.sensorKey]['degressEnable'])" |
| | | nzDisabled="{{ !f.value['alarmLevels'][row.sensorKey]['enable'] }}"></nz-switch> |
| | | </div> |
| | | </td> |
| | | <td nz-td formArrayName="degression" *ngFor="let in of validateForm.get('alarmLevels.'+row.sensorKey+'.degression').controls; index as i"> |
| | | <div *ngIf="f.value['alarmLevels'][row.sensorKey]['degressEnable']" nz-form-item> |
| | | <div style="width:100px;" nz-form-control nzHasFeedback> |
| | | <nz-input-number style="width: 100%;" [formControlName]="i" maxlength="20" nzDisabled="{{ !f.value['alarmLevels'][row.sensorKey]['enable'] }}"></nz-input-number> |
| | | </div> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | </tbody> |
| | | </nz-table> |
| | | </nz-card> |
| | | <div [ngStyle]="{'background-color':'#f5f7fa','width':'110%','left':'-5%','height':'20px','position':'relative'}"></div> |
| | | <nz-card [nzBordered]="false" nzTitle="报警方式" formGroupName="alarmMode"> |
| | | <label nz-checkbox formControlName="enable"> |
| | | <span>启用报警</span> |
| | | </label> |
| | | <div [ngStyle]="{'margin-left': '20%'}"> |
| | | <nz-card [nzBordered]="false" nzTitle="报警方式" formGroupName="alarmMode"> |
| | | <label nz-checkbox formControlName="enable"> |
| | | <span>启用报警</span> |
| | | </label> |
| | | <div [ngStyle]="{'margin-left': '20%'}"> |
| | | <br/> |
| | | <br/> |
| | | <br/> |
| | | <div *ngFor="let i of [1,2,3]" nz-form-item nz-row class="mb-sm"> |
| | | <div nz-form-label nz-col [nzSm]="4" [nzXs]="24"> |
| | | <span [ngSwitch]="i"> |
| | | <label *ngSwitchCase="1">一级报警方式:</label> |
| | | <label *ngSwitchCase="2">二级报警方式:</label> |
| | | <label *ngSwitchCase="3">三级报警方式:</label> |
| | | </span> |
| | | </div> |
| | | <div nz-form-control nz-col [nzSpan]="12" nzHasFeedback> |
| | | <nz-select formControlName="{{ 'level'+i }}" [nzMode]="'multiple'" [nzPlaceHolder]="'选择 报警方式'" [nzNotFoundContent]="'无法找到'" |
| | | nzDisabled="{{ !f.value['alarmMode']['enable'] }}"> |
| | | <nz-option *ngFor="let option of alarmModes" [nzLabel]="option.label" [nzValue]="option.value" [nzDisabled]="option.disabled"> |
| | | </nz-option> |
| | | </nz-select> |
| | | </div> |
| | | <br/> |
| | | <br/> |
| | | <br/> |
| | | <div *ngFor="let i of [1,2,3]" nz-form-item nz-row class="mb-sm"> |
| | | <div nz-form-label nz-col [nzSm]="3" [nzXs]="24"> |
| | | <span [ngSwitch]="i"> |
| | | <label *ngSwitchCase="1">一级报警方式:</label> |
| | | <label *ngSwitchCase="2">二级报警方式:</label> |
| | | <label *ngSwitchCase="3">三级报警方式:</label> |
| | | </span> |
| | | </div> |
| | | <div nz-form-control nz-col [nzSpan]="12" nzHasFeedback> |
| | | <nz-select formControlName="{{ 'level'+i }}" [nzMode]="'multiple'" [nzPlaceHolder]="'选择 报警方式'" [nzNotFoundContent]="'无法找到'" |
| | | nzDisabled="{{ !f.value['alarmMode']['enable'] }}"> |
| | | <nz-option *ngFor="let option of alarmModes" [nzLabel]="option.label" [nzValue]="option.value" [nzDisabled]="option.disabled"> |
| | | </nz-option> |
| | | </nz-select> |
| | | </div> |
| | | <br/> |
| | | <br/> |
| | | <br/> |
| | | </div> |
| | | <br/> |
| | | <div nz-form-item nz-row class="mb-sm"> |
| | | <div nz-form-label nz-col [nzSm]="5" [nzXs]="24"> |
| | | <span> |
| | | <label>报警间隔时间<small>(单位:分)</small>:</label> |
| | | </span> |
| | | </div> |
| | | <div nz-form-control nz-col [nzSpan]="12"> |
| | | <nz-input-number style="width: 200px;" formControlName="interval" [nzParser]="parserInt" nzMin="1" nzStep="1" nzDisabled="{{ !f.value['alarmMode']['enable'] }}"></nz-input-number> |
| | | </div> |
| | | </div> |
| | | </nz-card> |
| | | </div> |
| | | </nz-card> |
| | | <footer-toolbar errorCollect> |
| | | <span [ngStyle]="{'color':'red','width':'300px','margin-right':'40px'}">{{ errorMessage }}</span> |
| | | <label>组织名称:</label> |
| | |
| | | <span *ngIf="isSaving">中</span> |
| | | </span> |
| | | </button> |
| | | </footer-toolbar> |
| | | </footer-toolbar> |
| | | </form> |