<div class="mask" [hidden]="!isMask">
  <div class="save add display_flex align-items_center justify-content_flex-center">
    <div class="modalBody">
      <div class="title">工单范围<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
      </div>
      <overlay-scrollbars #osComponentRef1 class="content">
        <form nz-form [formGroup]="validateForm" class="addForm" (ngSubmit)="submitForm()">
          <nz-form-item>
            <nz-form-label [nzSpan]="6" nzRequired nzFor="deptIds">维修科室</nz-form-label>
            <nz-form-control [nzSpan]="18" nzErrorTip="请选择维修科室!">
              <nz-select nzMode="multiple" nzServerSearch [nzDropdownMatchSelectWidth]="false" nzAllowClear formControlName="deptIds" nzPlaceHolder="请选择维修科室" (ngModelChange)="changeHospital($event)">
                <ng-container *ngFor="let option of hospitalList">
                  <nz-option *ngIf="!isLoading" [nzLabel]="option.hosName" [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>
            </nz-form-control>
          </nz-form-item>
          <nz-form-item>
            <nz-form-label [nzSpan]="6" nzFor="groupIds">运维分组</nz-form-label>
            <nz-form-control [nzSpan]="18" nzErrorTip="请选择运维分组!">
              <nz-select nzMode="multiple" (nzOnSearch)="changeInp('group', $event)" (nzOpenChange)="openChangeGroup($event)" [nzDropdownMatchSelectWidth]="false"
                nzServerSearch nzShowSearch nzAllowClear formControlName="groupIds" nzPlaceHolder="请选择运维分组">
                <ng-container *ngFor="let option of groupList">
                  <nz-option *ngIf="!isLoading" [nzLabel]="option.groupName" [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>
            </nz-form-control>
          </nz-form-item>
          <nz-form-item>
            <nz-form-label [nzSpan]="10" nzRequired nzFor="showOvertime">是否单独显示延期处理</nz-form-label>
            <nz-form-control [nzSpan]="14" nzErrorTip="请选择是否单独显示延期处理!">
              <nz-radio-group formControlName="showOvertime">
                <label nz-radio [nzValue]="1">是</label>
                <label nz-radio [nzValue]="0">否</label>
              </nz-radio-group>
            </nz-form-control>
          </nz-form-item>
          <nz-form-item>
            <nz-form-label [nzSpan]="6" nzRequired nzFor="refreshSeconds">数据刷新</nz-form-label>
            <nz-form-control [nzSpan]="18" nzErrorTip="请选择数据刷新!">
              <nz-input-group nzAddOnAfter="秒">
                <nz-input-number class="w100" formControlName="refreshSeconds" nzPlaceHolder="请输入数据刷新时间" [nzMin]="30" [nzStep]="1" [nzPrecision]="0"></nz-input-number>
              </nz-input-group>
            </nz-form-control>
          </nz-form-item>
          <nz-form-item>
            <nz-form-label [nzSpan]="6" nzRequired nzFor="rollingSeconds">滚动频率</nz-form-label>
            <nz-form-control [nzSpan]="18" nzErrorTip="请选择滚动频率!">
              <nz-input-group nzAddOnAfter="秒">
                <nz-input-number class="w100" formControlName="rollingSeconds" nzPlaceHolder="请输入滚动频率时间" [nzMin]="3" [nzStep]="1" [nzPrecision]="0"></nz-input-number>
              </nz-input-group>
            </nz-form-control>
          </nz-form-item>
        </form>
      </overlay-scrollbars>
      <div class="display_flex justify-content_flex-center">
        <button nzType="primary" nz-button (click)="submitForm()" [nzLoading]="btnLoading">确认</button>
        <button class="btn cancel" nz-button nzType="default" (click)="hideModal()">取消</button>
      </div>
    </div>
  </div>
</div>
<div class="realtimeBroadcast" [hidden]="isMask">
  <div class="header">
    <div class="title">
      <h1>{{tool.logoTitle}}</h1>
      <h2>故障实时播报</h2>
    </div>
    <div class="userInfo dropdown">
      <div class="user" (mouseenter)="showDropdown = true" (mouseleave)="showDropdown = false">
        <img src="../../assets/images/icon_keshi.png" alt="">
        <span><ng-container *ngIf="loginUser.dept">{{loginUser.dept.dept}}-</ng-container>{{loginUser.name}}</span>
        <i class="icon_transport transport-xiala1 ml8"></i>
      </div>
      <div class="dropdown-content r8" [hidden]="!showDropdown" (mouseenter)="showDropdown = true" (mouseleave)="showDropdown = false">
        <div class="dropdownItem" (click)="showConfig(true)">工单范围</div>
        <div class="dropdownItem" (click)="toMain()">回到系统管理</div>
        <div class="dropdownItem" (click)="logOut()">退出</div>
      </div>
    </div>
  </div>
  <div class="lists_box">
    <div class="lists" *ngFor="let list of incidentList | keyvalue">
      <div class="head">
        <span class="title_bold">{{list.value.name}}</span>
        <span *ngIf="list.key === '1pending'">{{ mySwiper1pending && ((mySwiper1pending.realIndex || 0) + 1) }}</span>
        <span *ngIf="list.key === '2handler'">{{ mySwiper2handler && ((mySwiper2handler.realIndex || 0) + 1) }}</span>
        <span *ngIf="list.key === '3overtime'">{{ mySwiper3overtime && ((mySwiper3overtime.realIndex || 0) + 1) }}</span>
        <span class="refreshSeconds">{{ num }}S</span>
      </div>
      <div class="cots_body weifenpai swiper" [id]="'mySwiper' + list.key">
        <div class="swiper-wrapper">
          <!-- <div [hidden]="loading" *ngFor="let itemList of list.value.list" class="swiper-slide" (mouseenter)="swiperEnter(list.key)" (mouseleave)="swiperLeave(list.key)"> -->
          <div [hidden]="loading" *ngFor="let itemList of list.value.list" class="swiper-slide">
            <div class="list listsTypeColor" *ngFor="let data of itemList" [attr.data-id]="data.id">
              <div class="left_cots">
                <div class="gongdan">
                  <span class="left gongdan_name">
                    <span [ngClass]="priorityColor(data.priorityId)">{{ data.priorityDTO?.name }} </span><span class="blue">{{ data.incidentsign }}</span> <span class="blue" nz-tooltip [nzTooltipTitle]="data.hosName + (data.repairIncidentType.value === 'public' ? data.repairIncidentType.name : (data.repairIncidentType.value === 'dept' ? data.department?.dept : ''))">{{ data.hosName }}<ng-container *ngIf="data.repairIncidentType.value === 'public'">{{ data.repairIncidentType.name }}</ng-container><ng-container *ngIf="data.repairIncidentType.value === 'dept'">{{ data.department?.dept }}</ng-container></span>
                  </span>
                  <div class="right_all">
                    <span class="right">
                      <span>{{ data.state.name }}</span>
                    </span>
                  </div>
                </div>

                <div class="didian">
                  <span class="left">
                    <span nz-tooltip [nzTooltipTitle]="data.description">{{ data.description }}</span>
                  </span>
                </div>

                <div class="didian">
                  <span class="left">
                    <span nz-tooltip [nzTooltipTitle]="(data.place ? data.place.building.buildingName : '') + (data.place ? data.place.floorName + '层' : '') + data.houseNumber">{{ data.place ? data.place.building.buildingName : '' }}{{ data.place ? data.place.floorName + '层' : '' }}{{ data.houseNumber }}</span>
                    <i class="icon_transport transport-a-11111 ml8" *ngIf="data.reqAttachment"></i>
                    <i class="icon_transport transport-luyin ml8" *ngIf="data.reqRecord"></i>
                  </span>
                </div>

                <div class="didian">
                  <span class="left">
                    <span *ngIf="data.overtimeRemark" [innerHTML]="data.overtimeRemark" nz-tooltip [nzTooltipTitle]="data.overtimeRemark"></span>
                    <span *ngIf="!data.overtimeRemark">无</span>
                  </span>
                </div>
                <!-- 时间 -->
                <div class="shijian">
                  <span class="left">
                    <span>处理人/组：{{ transferSynergetic(data) }}</span>
                  </span>
                  <span class="right">
                    {{ data.startDate | date: 'yyyy-MM-dd HH:mm'}}
                  </span>
                </div>
              </div>
            </div>
          </div>
          <div class="loading display_flex col-flex justify-content_flex-center align-items_center" *ngIf="loading">
            <img src="../../assets/images/loading.gif" alt="" />
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<!-- 详情 -->
<app-incident-detail [id]="coopData.id" *ngIf="detailModalShow" (closeModelHs)="closeDetailModelOrder($event)" (confirmModelHs)="confirmDetailModelOrder($event)"></app-incident-detail>


