<nz-layout class="app-layout display_flex flex_auto ant-layout-has-sider">
  <overlay-scrollbars #osComponentRef1 class="menu-sidebar">
    <div class="sidebar-logo display_flex align-items_center justify-content_flex-center">
      <div style="line-height: normal;height:100%;" class="display_flex align-items_center justify-content_flex-center flex-direction_column">
        <img [src]="tool.logoUrl">
        <span>{{tool.logoTitle}}</span>
      </div>
    </div>
    <!-- 导航重写，兼容chrome39 -->
    <ul id="ds-menu">
      <li class="mainMenuOne" (click)="totoMenu('首页')" [ngClass]="{mainMenuSelected:indexFlag}">
        <i nz-icon nzType="home"></i>
        <span>首页</span>
      </li>
      <li *ngFor="let data of menus" class="mainMenuWrap">
        <div class="mainMenuOne" (click)="clickMenuOne(data)" [ngClass]="{mainMenuSelected:data.flagBg}">
          <ng-container [ngSwitch]="data.icon">
            <ng-container *ngSwitchCase="'newicon-yifeiguanli'">
              <i nz-icon>
                <svg t="1708916176632" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="19122" width="16" height="16"><path d="M962.347 289.067a76.8 76.8 0 0 0-38.827-65.707L544.64 10.027a76.843 76.843 0 0 0-76.373 0.64L94.08 232.107a76.587 76.587 0 0 0-37.547 66.56l4.48 434.773c0.214 27.307 15.147 52.267 38.827 65.707l378.88 213.546c11.733 6.4 24.747 9.814 37.547 9.814 13.44 0 26.88-3.627 39.04-10.454l374.186-221.44a76.587 76.587 0 0 0 37.547-66.56l-4.693-434.986z m-67.414 443.306l-374.186 221.44c-2.774 1.494-6.187 1.494-8.96 0.214L133.12 740.267a8.704 8.704 0 0 1-4.48-7.68l-4.693-434.56c0-3.2 1.706-6.187 4.266-7.68l374.4-221.44a9.52 9.52 0 0 1 8.96 0l378.88 213.546c2.774 1.494 4.48 4.48 4.48 7.68l4.48 434.774c0 2.986-1.706 5.973-4.48 7.466" p-id="19123"></path><path d="M784.427 682.24a10.453 10.453 0 0 0-7.894 3.84c-34.986 49.067-82.133 65.493-140.373 53.973-68.907-13.866-107.947-75.306-103.04-140.8 1.493-18.986 9.173-37.333 14.08-57.173-6.827-4.693-14.293-15.36-26.667-4.053-1.92 1.706-5.973 2.133-8.746 1.706-7.254-1.493-14.08-3.84-22.827-6.4l-16.64 11.52c35.2 72.107 15.147 135.68-30.08 174.72a127.659 127.659 0 0 1-84.907 30.72c-50.56 0-85.12-29.013-114.346-66.986l-28.16 17.92c58.666 107.733 197.333 133.546 291.413 62.72 95.573 85.76 260.693 41.386 305.067-75.307-3.84-1.067-7.04-1.92-10.24-2.773-5.334-1.494-11.094-3.2-16.64-3.627z m-76.16-263.04c6.613-57.173 1.28-112.427-35.2-160.213-35.84-47.147-85.76-70.187-143.147-81.28 0 6.826 0.213 11.733 0 16.426-0.427 8.534 3.627 11.947 11.947 14.507 80.426 24.533 119.68 100.693 91.093 177.067-16.64 44.373-51.627 67.626-96 78.506-17.92 4.48-18.133 4.054-17.28 20.694 0.213 2.986 2.56 5.973 4.693 8.746 1.92 2.56 5.76 4.054 6.827 7.04 5.973 13.44 19.84 17.067 31.147 26.667 3.626-4.053 6.4-8.107 10.026-11.307 74.667-68.48 170.667-38.613 210.774 28.587 16.426 27.52 18.56 58.027 15.36 89.173-0.214 2.56 1.066 6.827 2.986 7.894 7.254 3.413 15.147 5.546 22.827 8.32 17.92-65.494 5.333-178.774-116.053-230.827zM225.92 640.213c-3.413-19.413-2.987-39.466 1.707-58.666C246.4 498.987 358.4 442.453 444.8 514.56c15.573 13.013 15.573 13.653 32.213 1.707 16-11.52 25.6-26.454 20.694-47.787-6.614-1.28-13.654-2.56-20.267-4.267-49.493-12.8-85.76-40.746-98.56-91.946-13.227-52.694 0.427-98.56 41.6-135.04 15.787-13.867 34.347-22.614 54.4-29.014 2.773-0.853 6.613-3.413 6.827-5.333 0.853-7.68 0.426-15.573 0.426-24.32-9.173 2.347-17.066 3.84-24.96 6.4-53.333 16.853-98.346 45.227-126.506 95.147-23.68 42.026-27.734 87.466-21.547 134.186 1.067 7.467 0.213 11.52-7.68 15.36C224 468.267 185.813 537.173 193.28 625.28c0.853 11.093 3.413 21.973 5.333 33.92 7.68-2.773 14.08-5.76 20.694-7.467 6.4-1.706 7.68-5.333 6.613-11.52z m0 0" p-id="19124"></path><path d="M416.853 400.213c62.294-42.88 123.52-46.933 184.534 0.214L627.2 364.16c-61.44-55.467-156.16-64.213-236.373-0.213l26.026 36.266zM692.48 502.4h-48.213c-5.334 61.44-38.4 100.053-95.36 120.32l18.56 41.173c68.053-16 135.466-103.68 125.013-161.493z m-284.587 78.293c-17.493-21.333-26.88-46.293-33.066-73.173l-44.8 2.133c-3.627 62.08 68.266 147.2 132.266 157.014l13.654-44.587a120.405 120.405 0 0 1-68.054-41.387z m0 0" p-id="19125"></path></svg>
              </i>
            </ng-container>
            <ng-container *ngSwitchDefault><i nz-icon [nzType]="data.icon"></i></ng-container>
          </ng-container>
          <span>{{data.title}}</span>
          <span class="icon_transport transport-xialajiantou"
            [ngStyle]="{transform:data.flag?'rotate(180deg)':'rotate(0deg)',color:data.flag?'#fff':'#999'}"></span>
        </div>
        <ul>
          <li *ngFor="let item of data.childrens" class="mainMenu" (click)="totoMenu(item.title,item,data)"
            [ngStyle]="{height:data.flag?'44px':0}" [ngClass]="{menuTwoSelected:item.flag}">
            {{item.title}}
          </li>
        </ul>
      </li>
    </ul>
  </overlay-scrollbars>
  <nz-layout style="background:#fff;display: flex;flex-direction: column;position: relative;">
    <nz-header>
      <div class="app-header display_flex justify-content_space-between align-items_center">
        <div class="left">
          <button nz-button nzType="primary" *ngIf='deskRole' (click)="toFuwutai()">调度台</button>
          <button nz-button nzType="primary" *ngIf="nurseRole" (click)="toHuShi()">护士端</button>
          <button nz-button nzType="primary" *ngIf="pharmacyRole" (click)="toPharmacy()">药房端</button>
          <button nz-button nzType="primary" *ngIf="pharmacyRole" (click)="toPharmacy2()">药房端2</button>
          <button nz-button nzType="primary" *ngIf="largeScreenRole" (click)="toBigScreen('largeScreen')">大屏端</button>
          <button nz-button nzType="primary" *ngIf="largeScreenRole2" (click)="toBigScreen('largeScreen2')">大屏端2</button>
          <button nz-button nzType="primary" *ngIf="specimenViewRole" (click)="toBigScreen('specimenView')" [nzLoading]="deptTypeLoading">业务视图</button>
          <button nz-button nzType="primary" *ngIf="specimenViewRole2" (click)="toSpecimenView2()">标本视图</button>
          <button nz-button nzType="primary" *ngIf="disinfectionSupplyRole" (click)="toDisinfectionSupply()">全局业务查看</button>
        </div>
        <div class="right">
          <button class="mr8" nz-button nzType="primary" *ngIf='PCCommutesToWork && userInfo.user && !userInfo.user.online' (click)="GoWork()">我要上班</button>
          <button class="mr8" nz-button nzType="primary" *ngIf='PCCommutesToWork && userInfo.user && userInfo.user.online' (click)="GoWork()">我要下班</button>
          <!-- <div class="msg">
            <div class="msgBtn display_flex align-items_center justify-content_flex-center" nz-popover [nzPopoverContent]="contentTemplate" nzPopoverPlacement="bottomRight">
              <i nz-icon nzType="bell" nzTheme="outline"></i>
            </div>
            <ng-template #contentTemplate>
              <div>
                <p>消息通知</p>
              </div>
            </ng-template>
          </div> -->
          <div class="userInfo">
            <div class="wel" [title]="'欢迎您，' + currentHospital.hosName + '：'">欢迎您，{{currentHospital.hosName}}：</div>
            <div class="user">
              <img src="../../assets/images/icon_keshi.png" alt="">
              <span [title]="(userInfo&&userInfo.user)?userInfo.user.name:''">{{(userInfo&&userInfo.user)?userInfo.user.name:''}}</span>
            </div>
            <div class="logOut">
              <span (click)="hosFlag1 = true">选择院区</span>
              <span (click)="showUpPwd()">修改密码</span>
              <span (click)="logOut()">退出</span>
            </div>
          </div>
        </div>
      </div>
    </nz-header>
    <nz-content style="position: relative;">
      <div class="inner-content">
        <router-outlet></router-outlet>
      </div>
    </nz-content>
  </nz-layout>
</nz-layout>

<!-- 上下班模态框 -->
<app-dialog-delete [delModal]="workModal" (hideDelModalEvent)="hideWorkModal()" [btnLoading]="loading3"
(confirmDelEvent)="confirmWork()" [content]="types"></app-dialog-delete>

<!-- 消息弹框模板 -->
<ng-template #msgTemplate1 let-msg="data">
  <div class="msgTemBox ant-notification-notice-content">
    <div class="borderLeft"></div>
    <div class="ant-notification-notice-with-icon">
      <span class="ant-notification-notice-icon">
        <i class="icon icon_transport transport-shouye9"></i>
      </span>
      <div class="ant-notification-notice-message">{{msg.type==1?'通知':'消息'}}</div>
      <div class="ant-notification-notice-description">{{msg.content}}</div>
    </div>
  </div>
</ng-template>
<!-- 修改密码 -->
<nz-modal [(nzVisible)]="isPwdVisible" nzTitle="修改密码" (nzOnCancel)="pwdHandleCancel()" (nzOnOk)="pwdHandleOk()" [nzOkLoading]="pwdIsOkLoading" (nzAfterOpen)="pwdAfterOpen()">
  <div>
    <label>
      原始密码:
      <nz-input-group [nzSuffix]="suffixTemplate">
        <input minlength="9" [type]="passwordVisible ? 'text' : 'password'" nz-input placeholder="原始密码" [(ngModel)]="upModalData.pwdOld" />
      </nz-input-group>
      <ng-template #suffixTemplate>
        <i nz-icon [nzType]="passwordVisible ? 'eye-invisible' : 'eye'" (click)="passwordVisible = !passwordVisible"></i>
      </ng-template>
    </label>
    <label>新密码:
      <div style="display: flex;">
        <nz-input-group [nzSuffix]="suffixTemplate">
          <input minlength="9" [type]="passwordVisible ? 'text' : 'password'" nz-input placeholder="新密码" [(ngModel)]="upModalData.newPwd" (ngModelChange)="blurNewPwd()" />
        </nz-input-group>
        <ng-template #suffixTemplate>
          <i nz-icon [nzType]="passwordVisible ? 'eye-invisible' : 'eye'" (click)="passwordVisible = !passwordVisible"></i>
        </ng-template>
        <div class="red" style="display: flex;justify-content: center;align-items: center;padding-left: 5px;" *ngIf="enoughRegFlag">弱</div>
        <div style="display: flex;justify-content: center;align-items: center;padding-left: 5px;" *ngIf="mediumRegFlag">中</div>
        <div class="green" style="display: flex;justify-content: center;align-items: center;padding-left: 5px;" *ngIf="strongRegFlag">强</div>
      </div>
    </label>
    <div class="red">强密码需包含大小写字母、数字、特殊字符，长度至少9个字符</div>
    <label>确认新密码:
      <nz-input-group [nzSuffix]="suffixTemplate">
        <input minlength="9" [type]="passwordVisible ? 'text' : 'password'" nz-input placeholder="确认新密码" [(ngModel)]="upModalData.newPwd2" />
      </nz-input-group>
      <ng-template #suffixTemplate>
        <i nz-icon [nzType]="passwordVisible ? 'eye-invisible' : 'eye'" (click)="passwordVisible = !passwordVisible"></i>
      </ng-template>
    </label>
  </div>
</nz-modal>
<!-- 大屏或视图选择院区模态框 -->
<app-select-hospital (hosFlagHand)="hosFlagHand($event)" (submitFormHand)="submitFormHand($event)" [hosFlag]="hosFlag"></app-select-hospital>
<!-- 切换院区 -->
<app-select-hospital (hosFlagHand)="hosFlagHand1($event)" (submitFormHand)="submitFormHand1($event)" [hosFlag]="hosFlag1"></app-select-hospital>
<!-- 模态框 -->
<div class="save display_flex justify-content_flex-center align-items_center" *ngIf="delModal">
  <div class="modalBody">
    <div class="title">提示<i class="icon_transport transport-guanbi" (click)="hideDelModal()"></i></div>
    <div class="content">
      <div class="icon"><i class="icon_transport transport-wenhao"></i></div>
      <div class="defeat">{{tipsMsg1}}</div>
    </div>
    <div class="display_flex justify-content_flex-center">
      <button nz-button nzType="primary" (click)="confirmDel()">确认</button>
      <button class="btn cancel " nz-button nzType="default" (click)="hideDelModal()">关闭</button>
    </div>
  </div>
</div>
<!-- 遮罩 -->
<app-mask *ngIf="maskFlag"></app-mask>
