<div class="TaskTypeManagement">
  <div class="taskTypeInfo">
    <div class="top">
      <div class="item" (click)="tabModal('characteristics')" [ngClass]="{'items':tabModalName=='characteristics'}">
        特性配置
      </div>
      <div class="item" (click)="tabModal('automaticOrderCreation')" [ngClass]="{'items':tabModalName=='automaticOrderCreation'}">
        自动建单配置
      </div>
    </div>
    <div class="list" *ngIf="!loading">
      <!-- 特性配置 -->
      <div *ngIf="tabModalName=='characteristics'">
        <!-- 交接方式 -->
        <!-- <div class="display_flex align-items_center">
          <nz-form-label class="label" nzRequired>交接方式</nz-form-label>
          <nz-select class="w320px" nzPlaceHolder="请选择交接方式" [(ngModel)]="handoverMode">
            <nz-option *ngFor="let handoverMode of handoverModes" [nzLabel]="handoverMode.name" [nzValue]="handoverMode.id"></nz-option>
          </nz-select>
        </div> -->
        <!-- 核对方式 -->
        <!-- <div class="display_flex align-items_center mb8">
          <nz-form-label class="label" nzRequired>核对方式</nz-form-label>
          <nz-radio-group [(ngModel)]="radioCheckModesValue">
            <label style="display: block;" nz-radio [nzValue]="item.value" *ngFor="let item of checkModes">{{ item.label }}</label>
          </nz-radio-group>
        </div> -->
        <!-- 签到方式 -->
        <div class="display_flex align-items_center mb8">
          <nz-form-label class="label">签到方式</nz-form-label>
          <nz-checkbox-group class="w320px" [(ngModel)]="checkInModes"></nz-checkbox-group>
        </div>
        <!-- 检查预约时间是否精准填写 -->
        <div class="display_flex align-items_center mb8">
          <nz-form-label class="label">检查预约时间是否精准填写</nz-form-label>
          <nz-checkbox-group [(ngModel)]="accurateTimeFilling" (ngModelChange)="changeAccurateTimeFilling($event)"></nz-checkbox-group>
          <nz-select *ngIf="accurateTimeFilling[0].checked" class="w320px" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzPlaceHolder="请选择精确时间模式" [(ngModel)]="timeMod">
            <ng-container *ngFor="let option of timeModes">
              <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
            </ng-container>
            <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
            </nz-option>
          </nz-select>
        </div>
        <!-- 是否显示排队信息 -->
        <div class="display_flex align-items_center mb8">
          <nz-form-label class="label">是否显示排队信息</nz-form-label>
          <nz-checkbox-group [(ngModel)]="queuingInformation"></nz-checkbox-group>
        </div>
        <!-- 多人模式支持 -->
        <div class="display_flex align-items_center mb8">
          <nz-form-label class="label">多人模式支持</nz-form-label>
          <nz-checkbox-group [(ngModel)]="multiplayerMode" (ngModelChange)="changeMultiplayerMode($event)"></nz-checkbox-group>
        </div>
        <!-- 积分计算方式 -->
        <div class="display_flex align-items_center mb8" *ngIf="multiplayerMode[0].checked">
          <nz-form-label class="label">积分计算方式</nz-form-label>
          <nz-select class="w320px" [nzDropdownMatchSelectWidth]="false" nzPlaceHolder="请选择" [(ngModel)]="integralCalculationMethod">
            <ng-container *ngFor="let data of integralCalculationMethods">
              <nz-option *ngIf="!dLoading" nzLabel="{{data.name}}" nzValue="{{data.id}}"></nz-option>
            </ng-container>
            <nz-option *ngIf="dLoading" nzDisabled nzCustomContent>
              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
            </nz-option>
          </nz-select>
        </div>
        <!-- 是否起点签到成功展示患者其他服务 -->
        <div class="display_flex align-items_center mb8">
          <nz-form-label class="label">是否起点签到成功展示患者其他服务</nz-form-label>
          <nz-checkbox-group [(ngModel)]="startShowAnotherService"></nz-checkbox-group>
        </div>
        <!-- 是否终点签到成功展示患者其他服务 -->
        <div class="display_flex align-items_center mb8">
          <nz-form-label class="label">是否终点签到成功展示患者其他服务</nz-form-label>
          <nz-checkbox-group [(ngModel)]="endShowAnotherService"></nz-checkbox-group>
        </div>
        <!-- 是否允许交接工单 -->
        <div class="display_flex align-items_center mb8">
          <nz-form-label class="label">是否允许交接工单</nz-form-label>
          <nz-checkbox-group [(ngModel)]="handoverOrder"></nz-checkbox-group>
        </div>
        <!-- 是否开启结束服务 -->
        <div class="display_flex align-items_center mb8">
          <nz-form-label class="label">是否开启结束服务</nz-form-label>
          <nz-checkbox-group [(ngModel)]="finishService"></nz-checkbox-group>
        </div>
        <!-- 是否允许追加服务 -->
        <div class="display_flex align-items_center mb8">
          <nz-form-label class="label">是否允许追加服务</nz-form-label>
          <nz-checkbox-group [(ngModel)]="addService" (ngModelChange)="changeAddService($event)"></nz-checkbox-group>
        </div>
        <!-- 追加服务任务类型 -->
        <div class="display_flex align-items_center mb8" *ngIf="addService[0].checked">
          <nz-form-label class="label" nzRequired>追加服务任务类型</nz-form-label>
          <nz-select nzMode="multiple" class="w320px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch nzAllowClear
            (nzOnSearch)="changeTasktype($event)" nzPlaceHolder="请选择追加服务任务类型" [(ngModel)]="addServiceTaskIds">
            <ng-container *ngFor="let option of taskTypes">
              <nz-option *ngIf="!isLoading" [nzLabel]="option.taskName" [nzValue]="option.id"></nz-option>
            </ng-container>
            <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
            </nz-option>
          </nz-select>
          <span class="red">（请选择起点科室为固定科室，终点科室为固定科室的任务类型）</span>
        </div>

        <!-- 患者是否第三方接入 -->
        <div class="display_flex align-items_center mb8">
          <nz-form-label class="label">患者是否第三方接入</nz-form-label>
          <nz-checkbox-group [(ngModel)]="isThirdOutpatient"></nz-checkbox-group>
        </div>

        <!-- 急诊患者是否第三方接入 -->
        <div class="display_flex align-items_center mb8">
          <nz-form-label class="label">急诊患者是否第三方接入</nz-form-label>
          <nz-checkbox-group [(ngModel)]="isThirdEmergencyPatient"></nz-checkbox-group>
        </div>

        <!-- 批量建立送回 -->
        <div class="display_flex align-items_center mb8">
          <nz-form-label class="label">批量建立送回</nz-form-label>
          <nz-checkbox-group [(ngModel)]="batchCreationAndReturn"></nz-checkbox-group>
        </div>
        <!-- 配置执行中扫科室批量签到 -->
        <div class="display_flex align-items_center mb8">
          <nz-form-label class="label">配置执行中扫科室批量签到</nz-form-label>
          <nz-checkbox-group [(ngModel)]="batchSignExecutionDept" (ngModelChange)="changeBatchSignExecutionDept($event)"></nz-checkbox-group>
        </div>
        <!-- 支持父子集科室同签 -->
        <div class="display_flex align-items_center mb8" *ngIf="batchSignExecutionDept[0].checked">
          <nz-form-label class="label">支持父子集科室同签</nz-form-label>
          <nz-checkbox-group [(ngModel)]="batchSignExecutionParent"></nz-checkbox-group>
        </div>
        <!-- 终点科室扫科室批量签到 -->
        <div class="display_flex align-items_center mb8">
          <nz-form-label class="label">终点科室扫科室批量签到</nz-form-label>
          <nz-checkbox-group [(ngModel)]="batchSignEndDept" (ngModelChange)="changeBatchSignEndDept($event)"></nz-checkbox-group>
        </div>
        <!-- 支持父子集科室同签 -->
        <div class="display_flex align-items_center mb8" *ngIf="batchSignEndDept[0].checked">
          <nz-form-label class="label">支持父子集科室同签</nz-form-label>
          <nz-checkbox-group [(ngModel)]="batchSignEndParent"></nz-checkbox-group>
        </div>
        <!-- 隐藏陪检小扫描 -->
        <div class="display_flex align-items_center mb8">
          <nz-form-label class="label">隐藏陪检小扫描</nz-form-label>
          <nz-checkbox-group [(ngModel)]="hideInspectScan"></nz-checkbox-group>
        </div>
        <!-- 是否开启携带设备 -->
        <div class="display_flex align-items_center mb8">
          <nz-form-label class="label">是否开启携带设备</nz-form-label>
          <nz-checkbox-group [(ngModel)]="enableGoods"></nz-checkbox-group>
        </div>
        <!-- 是否开启陪检方式 -->
        <div class="display_flex align-items_center mb8">
          <nz-form-label class="label">是否开启陪检方式</nz-form-label>
          <nz-checkbox-group [(ngModel)]="enableTripType"></nz-checkbox-group>
        </div>
        <!-- 是否开启护士端追加检查 -->
        <div class="display_flex align-items_center mb8">
          <nz-form-label class="label">是否开启护士端追加检查</nz-form-label>
          <nz-checkbox-group [(ngModel)]="nurseAppendInspect"></nz-checkbox-group>
        </div>
        <!-- 是否支持签到并转派 -->
        <div class="display_flex align-items_center mb8">
          <nz-form-label class="label">是否支持签到并转派</nz-form-label>
          <nz-checkbox-group [(ngModel)]="signReassign"></nz-checkbox-group>
        </div>
        <!-- 批量陪检配置方式 -->
        <div class="display_flex align-items_center mb8">
          <nz-form-label class="label" nzRequired>批量陪检配置方式</nz-form-label>
          <nz-radio-group [(ngModel)]="radioBatchInspectTypesValue">
            <label style="display: block;" nz-radio [nzValue]="item.value" *ngFor="let item of batchInspectTypes">{{ item.label }}</label>
          </nz-radio-group>
        </div>
        <!-- 是否自动清空患者标记 -->
        <div class="display_flex align-items_center mb8">
          <nz-form-label class="label">是否自动清空患者标记</nz-form-label>
          <nz-checkbox-group [(ngModel)]="batchInspectAutoClear" (ngModelChange)="changeBatchInspectAutoClear($event)"></nz-checkbox-group>
          <nz-time-picker *ngIf="batchInspectAutoClear[0].checked" [(ngModel)]="batchInspectAutoClearTime" nzFormat="HH:mm"></nz-time-picker>
        </div>
        <!-- 是否修改危重等级 -->
        <div class="display_flex align-items_center mb8">
          <nz-form-label class="label">是否修改危重等级</nz-form-label>
          <nz-checkbox-group [(ngModel)]="updatePatientIllness"></nz-checkbox-group>
        </div>
				<!-- 是否限制陪检人员评估后建单 -->
				<div class="display_flex align-items_center mb8">
				  <nz-form-label class="label">是否限制陪检人员评估后建单</nz-form-label>
				  <nz-checkbox-group [(ngModel)]="inspectUserAuditCreate"></nz-checkbox-group>
				</div>
        <!-- 是否开通非预约检查顺延 -->
        <div class="display_flex align-items_center mb8">
          <nz-form-label class="label">是否开通非预约检查顺延</nz-form-label>
          <nz-checkbox-group [(ngModel)]="inspectDelayOneDay"></nz-checkbox-group>
        </div>
				<!-- 默认预约间隔时长（分钟） -->
				<div class="display_flex align-items_center mb8">
				  <nz-form-label class="label" nzRequired>默认预约间隔时长（分钟）</nz-form-label>
				  <nz-input-number [(ngModel)]="yytimeGapMinute" [nzMin]="1" [nzMax]="99999" [nzStep]="1"></nz-input-number>
				</div>
        <!-- 检查预约不进行工单合并 -->
        <!-- <div class="display_flex align-items_center mb8">
          <nz-form-label class="label">检查预约不进行工单合并</nz-form-label>
          <nz-checkbox-group [(ngModel)]="yyInspectMergeOrder"></nz-checkbox-group>
        </div> -->

        <!-- 自动关单 -->
        <!-- <div class="display_flex align-items_center mb8">
          <nz-form-label class="label">自动关单</nz-form-label>
          <nz-checkbox-group class="w320px" [(ngModel)]="automaticCustomsOrders"></nz-checkbox-group>
        </div> -->
      </div>
      <!-- 自动建单配置 -->
      <div *ngIf="tabModalName=='automaticOrderCreation'">
        <!-- 自动建单 -->
        <!-- <div class="display_flex align-items_center mb8">
          <nz-form-label class="label">自动建单</nz-form-label>
          <nz-checkbox-group [(ngModel)]="autoCreateOrders" (ngModelChange)="changeAutoCreateOrders($event)"></nz-checkbox-group>
          <nz-checkbox-group [(ngModel)]="autoDepts" *ngIf="autoCreateOrders[0].checked"></nz-checkbox-group>
        </div> -->
      </div>
      <div class="bottom">
        <button class="login-form-button" nzType="primary" [nzLoading]="btnLoading" nz-button (click)="submitForm()">保存</button>
      </div>
    </div>
    <div class="list" *ngIf="loading">
      <div class="loadingFull display_flex justify-content_flex-center align-items_center">
        <div class="loadingFullInner">
          <img src="../../../assets/images/loading.gif" alt="">
          <div>加载中...</div>
        </div>
      </div>
    </div>
  </div>
</div>
