<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 class="display_flex align-items_center justify-content_flex-center logoTitle">
        <div class="title ellipsis-multiline" nz-tooltip nzTooltipTitle="{{tool.logoTitle}}">{{tool.logoTitle}}</div>
      </div>
    </div>
    <!-- 导航重写，兼容chrome39 -->
    <ul id="ds-menu">
      <li class="mainMenuOne" *ngIf="homeRole" (click)="totoMenu('首页')" [ngClass]="{mainMenuSelected:indexFlag}">
        <i nz-icon nzType="home"></i>
        <span nzTooltipPlacement="right" nz-tooltip nzTooltipTitle="首页">首页</span>
      </li>
      <li *ngFor="let data of menus" class="mainMenuWrap">
        <div class="mainMenuOne" (click)="clickMenuOne(data)" [ngClass]="{mainMenuSelected:data.flagBg}">
          <i class="icon_transport" [ngClass]="data.icon" *ngIf="isTransportIcon(data.icon)"></i>
          <i nz-icon [nzType]="data.icon" *ngIf="!isTransportIcon(data.icon)"></i>
          <span nzTooltipPlacement="right" nz-tooltip nzTooltipTitle="{{data.title}}">{{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}">
            <span nzTooltipPlacement="right" nz-tooltip nzTooltipTitle="{{item.title}}">{{item.title}}</span>
          </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">
          <div class="dropdown">
            <i class="icon_transport transport-tianjiahover green" (mouseenter)="showFastDropdown = true" (mouseleave)="showFastDropdown = false"></i>
            <div class="dropdown-content ct" [hidden]="!showFastDropdown" (mouseenter)="showFastDropdown = true" (mouseleave)="showFastDropdown = false">
              <div class="dropdownItem" *ngIf="speediness" (click)="speedinessAdd()">新增故障工单</div>
          	</div>
          </div>
					<i class="icon_transport transport-tiaodu-fill green" *ngIf='deskRole' (click)="toFuwutai()" nz-tooltip nzTooltipTitle="调度台"></i>
          <i class="icon_transport transport-hushizhihanghuligongzuo green" *ngIf="nurseRole" (click)="toHuShi()" nz-tooltip nzTooltipTitle="护士端"></i>
          <i class="icon_transport transport-peizhi1 green" *ngIf="incidentConfigRole || otherConfigRole || pageConfigRole || nurseConfigRole" (click)="toConfigurationCenter()" nz-tooltip nzTooltipTitle="配置中心"></i>
          <i class="icon_transport transport-tongji-2 green" *ngIf="newStatisticsRole" (click)="toNewStatistics()" nz-tooltip nzTooltipTitle="统计"></i>
          <i class="icon_transport transport-shangban green" *ngIf='PCCommutesToWork && userInfo.user && !userInfo.user.online' (click)="GoWork()" nz-tooltip nzTooltipTitle="我要上班"></i>
          <i class="icon_transport transport-shangban green" *ngIf='PCCommutesToWork && userInfo.user && userInfo.user.online' (click)="GoWork()" nz-tooltip nzTooltipTitle="我要下班"></i>
          <div class="dropdown" *ngIf="pharmacyRole || largeScreenRole || largeScreenRole2 || largeScreenRole3 || specimenViewRole || specimenViewRole2 || specimenRoomView || pathology || disinfectionSupplyRole || sampling || communicationBook || realtimeBroadcastRole || inspectClosedLoopViewRole">
            <i class="icon_transport transport-gengduoda-copy" (mouseenter)="showDropdown1 = true" (mouseleave)="showDropdown1 = false"></i>
            <div class="dropdown-content ct" [hidden]="!showDropdown1" (mouseenter)="showDropdown1 = true" (mouseleave)="showDropdown1 = false">
              <div class="dropdownItem" *ngIf="pharmacyRole" (click)="toPharmacy()">药房端</div>
              <div class="dropdownItem" *ngIf="pharmacyRole" (click)="toPharmacy2()">药房端2</div>
              <div class="dropdownItem" *ngIf="largeScreenRole" (click)="queryRangeClick('largeScreen')">综合大屏</div>
              <div class="dropdownItem" *ngIf="largeScreenRole2" (click)="toBigScreen('largeScreen2')">运送陪检大屏</div>
              <div class="dropdownItem" *ngIf="largeScreenRole3" (click)="queryRangeClick('largeScreen3')">运维大屏</div>
              <div class="dropdownItem" *ngIf="specimenViewRole" (click)="toBigScreen('specimenView')">业务视图</div>
              <div class="dropdownItem" *ngIf="specimenViewRole2" (click)="toSpecimenView2()">标本视图</div>
              <div class="dropdownItem" *ngIf="specimenRoomView" (click)="toSpecimenRoomView()">标本间端</div>
              <div class="dropdownItem" *ngIf="pathology" (click)="toPathology()">病理科端</div>
							<div class="dropdownItem" *ngIf="sampling" (click)="toSampling()">门诊病理采样端</div>
							<div class="dropdownItem" *ngIf="communicationBook" (click)="toCommunicationBook()">病理交接本</div>
							<div class="dropdownItem" *ngIf="disinfectionSupplyRole" (click)="toDisinfectionSupply()">全局业务查看</div>
							<div class="dropdownItem" *ngIf="realtimeBroadcastRole" (click)="toRealtimeBroadcast()">故障实时播报</div>
							<div class="dropdownItem" *ngIf="inspectClosedLoopViewRole" (click)="toInspectClosedLoopView()">陪检闭环视图</div>
							<div class="dropdownItem" *ngIf="webRepairs" (click)="toWebRepairs()">web报修</div>
						</div>
          </div>
        </div>
        <div class="right">
          <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="currentHospital.hosName">{{currentHospital.hosName}}-</ng-container>{{(userInfo&&userInfo.user)?userInfo.user.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)="selectHospital()">选择院区</div>
              <div class="dropdownItem" (click)="showUpPwd()">修改密码</div>
              <div class="dropdownItem" (click)="logOut()">退出</div>
            </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-select-menu (cancelMenuModal)="cancelMenuModal($event)" [iShowMenuModal]="iShowMenuModal"></app-select-menu>
<!-- 遮罩 -->
<app-mask *ngIf="maskFlag"></app-mask>
<!-- 直接解决 -->
<app-incident-direct-order *ngIf="directOrderModalShow" (closeModelHs)="closeDirectOrderModelOrder($event)" (confirmModelHs)="confirmDirectOrderModelOrder($event)"></app-incident-direct-order>

<!-- 新建工单 -->
<div class="newOrder display_flex justify-content_flex-center align-items_center" *ngIf="newOrderShowOpen">
	<div class="modalBody">
		<div class="title" *ngIf="currentTabIndex === '故障报修'">
			<div class="newTop">
				<div class="name">来电咨询</div>
				<div class="newTopItem" *ngIf="hospitalModel!=1">
					<span class="grayFont required">院区：</span>
					<nz-select style="width: 160px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzPlaceHolder="请选择院区" [(ngModel)]="incidentModel.hosId" (ngModelChange)="changeApplyHospital($event)" nzAllowClear [nzDisabled]="buildType === '编辑事件'">
						<ng-container *ngFor="let option of applicationHospitalList">
							<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>
				</div>
				<div class="newTopItem" [hidden]="incidentModel.repairIncidentType === 'public'">
					<span class="grayFont required">申请科室：</span>
					<nz-select style="width: 160px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeInp('itsm', $event)" nzPlaceHolder="请选择申请科室" [(ngModel)]="incidentModel.department" (ngModelChange)="changeApplyDept($event)" nzAllowClear (nzOpenChange)="openChangeApplyDept($event)">
						<ng-container *ngFor="let option of applicationDeptList">
							<nz-option *ngIf="!isLoadingApply" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
						</ng-container>
						<nz-option *ngIf="isLoadingApply" nzDisabled nzCustomContent>
							<i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
						</nz-option>
					</nz-select>
				</div>
				<div class="newTopItem">
					<span class="grayFont" [ngClass]="{'required': publicRepair && applicantMustFillIn==1}">申请人：</span>
					<ng-container *ngIf="buildType === '报修转事件'">{{incidentMsg.requesterName}}</ng-container>
					<ng-container *ngIf="buildType !== '报修转事件'">
						<nz-select style="width: 160px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeCommonInp('requester', $event)" nzPlaceHolder="请选择申请人" [(ngModel)]="incidentModel.requester" (ngModelChange)="changeApplyRequester($event)" nzAllowClear (nzOpenChange)="openChangeApplyRequester($event)">
							<ng-container *ngFor="let option of applicationRequesterList">
								<nz-option *ngIf="!isLoading" [nzLabel]="option.name + '('+option.account+')'" [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>
						<label [hidden]="incidentModel.repairIncidentType === 'public'" nz-checkbox [(ngModel)]="isRelatedDepartment" (ngModelChange)="changeApplyRelatedDepartment($event)" class="ml8">关联查</label>
					</ng-container>
				</div>
				<div class="newTopItem" *ngIf="incidentModel.incomingPhone">
					<span class="grayFont">来电电话：{{incidentModel.incomingPhone}}</span>
				</div>
				<div class="newTopItem" *ngIf="deptRepair && publicRepair || !deptRepair && !publicRepair">
					<span class="grayFont">
						<nz-radio-group [nzDisabled]="buildType === '编辑事件'" [(ngModel)]="incidentModel.repairIncidentType" (ngModelChange)="changeRepairIncidentType($event)">
							<label nz-radio [nzValue]="item.value" *ngFor="let item of repairIncidentTypeList">{{item.name}}</label>
						</nz-radio-group>
					</span>
				</div>
			</div>
		</div>
		<div nz-row class="content">
			<div nz-col nzSpan="15" class="col left">
	<!-- 			<div class="tabs">
					<div class="tabs__inner" #tab>
						<div class="tabs__wrap" [style.transform]="'translateX(' + disX + 'px)'">
							<ng-container *ngFor="let item of workTypesArrange;let index = index;">
								<div [ngClass]="{ tab: true, checked: currentTabIndex == item.key}" (click)="tabClick(item.key)" *ngIf="buildType !== '编辑事件' || (buildType === '编辑事件' && item.key == '故障报修')">
									{{ item.key }}
								</div>
							</ng-container>
						</div>
					</div>
					<div class="tabs__operate" *ngIf="workTypesFlag && applyDept">
						<i class="tabs__Icon--right icon_transport transport-xiangzuo" (click)="toLeft()"></i>
						<i class="tabs__Icon--left icon_transport transport-xiangzuo" (click)="toRight()"></i>
					</div>
				</div> -->
				<!-- 底部tab页 -->
				<div class="bottomWrap">
					<ng-container *ngFor="let item of workTypesArrange;let index = index;">
						<!-- 故障报修 -->
						<overlay-scrollbars #osComponentRef15 class="bottom_req" *ngIf="currentTabIndex === '故障报修'">
							<div class="req">
								<div class="row">
									<div class="col flex4">
										<span class="name">详细地址：</span>
										<nz-select class="w100" [(ngModel)]="incidentModel.area" (ngModelChange)="changeApplyBuilding($event)" nzAllowClear nzPlaceHolder="请选择楼栋">
											<nz-option [nzValue]="item.id" [nzLabel]="item.buildingName" *ngFor="let item of applicationBuildingList"></nz-option>
										</nz-select>
									</div>
									<div class="col flex3">
										<nz-select class="w100" [(ngModel)]="incidentModel.place" nzAllowClear nzPlaceHolder="请选择楼层">
											<nz-option [nzValue]="item.id" [nzLabel]="item.floorName" *ngFor="let item of applicationFloorList"></nz-option>
										</nz-select>
									</div>
									<div class="col flex7">
										<input class="addressFocus" nz-input placeholder="请填写详细地址" [(ngModel)]="incidentModel.houseNumber" />
										<div class="addressList" *ngIf="isShowAddressList">
											<ng-container *ngIf="!addressLoading && addressList.length">
												<div class="addressItem ellipsis-oneline" *ngFor="let item of addressList" [title]="item.name" (click)="selectAddress(item.name)">{{item.name}}</div>
											</ng-container>
											<div *ngIf="!addressLoading && !addressList.length" class="w100 h100 padding8 display_flex justify-content_flex-center align-items_center">
												<nz-empty></nz-empty>
											</div>
											<div *ngIf="addressLoading" class="w100 h100 padding8 display_flex justify-content_flex-center align-items_center">
												<nz-spin nzSimple></nz-spin>
											</div>
										</div>
									</div>
								</div>

								<div class="row">
									<div class="col">
										<span class="name">科室电话：</span>
										<ng-container *ngIf="incidentMsg.deptManyPhone">{{incidentMsg.deptManyPhone|stringToFirstValue}}<em (click)="importPhone(incidentMsg.deptManyPhone, true)">引入</em></ng-container>
									</div>
									<div class="col">
										<span class="name">报修人电话：</span>
										<ng-container *ngIf="incidentMsg.requesterPhone">{{incidentMsg.requesterPhone}}<em (click)="importPhone(incidentMsg.requesterPhone)">引入</em></ng-container>
									</div>
									<div class="col">
										<ng-container *ngIf="buildType !== '编辑事件'">
											<span class="name">来电电话：</span>
											<ng-container *ngIf="incidentModel.incomingPhone">{{incidentModel.incomingPhone}}<em (click)="importPhone(incidentModel.incomingPhone)">引入</em></ng-container>
										</ng-container>
									</div>
								</div>

								<div class="row">
									<div class="col">
										<span class="name">联系人：</span>
										<input class="w100" nz-input placeholder="请填写联系人" [(ngModel)]="incidentModel.contacts" />
									</div>
									<div class="col">
										<span class="name required">联系电话：</span>
										<input class="w100" nz-input placeholder="请填写联系电话" [(ngModel)]="incidentModel.contactsInformation" />
									</div>
									<div class="col">
										<span class="name">责任部门：</span>
										{{incidentModel.duty ? incidentModel.duty.hosName : ''}}
									</div>
								</div>

								<div class="row">
									<div class="col" *ngIf="cmdbRepair">
										<span class="name">资产：</span>
										<nz-select class="w100" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch nzPlaceHolder="请选择资产" (nzOnSearch)="changeAsset($event)" [(ngModel)]="incidentModel.assetId">
											<ng-container *ngFor="let option of assetData">
												<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="col">
										<span class="name required">故障现象：</span>
										<nz-select class="w100" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeCommonInp('category', $event)" nzPlaceHolder="请选择故障现象" [(ngModel)]="incidentModel.category" (ngModelChange)="changeApplyCategory($event)" (nzOpenChange)="openChangeApplyCategory($event)">
											<ng-container *ngFor="let option of applicationCategoryList">
												<nz-option *ngIf="!isLoading" [nzLabel]="option.mutiCategory" [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>

								<div class="row">
									<div class="col alignItemsStart">
										<span class="name required">故障描述：</span>
										<nz-input-group [nzSuffix]="suffixTemplate">
											<textarea class="w100" [innerHTML]="incidentModel.description" nz-input rows="4" placeholder="请填写故障描述" [(ngModel)]="incidentModel.description"></textarea>
										</nz-input-group>
										<span #suffixTemplate class="ant-input-clear-icon ml8" *ngIf="incidentModel.description" (click)="incidentModel.description = null">清空</span>
									</div>
								</div>

								<div class="row">
									<div class="col">
										<span class="name required">优先级：</span>
										<nz-select class="w100" [(ngModel)]="incidentModel.priorityId" nzAllowClear nzPlaceHolder="请选择优先级" [nzDisabled]="buildType === '编辑事件'">
											<nz-option [nzValue]="item.id" [nzLabel]="item.name" *ngFor="let item of applicationPriorityList"></nz-option>
										</nz-select>
									</div>
									<div class="col">
										<span class="name required">报修来源：</span>
										<nz-select class="w100" [(ngModel)]="incidentModel.source" nzAllowClear nzPlaceHolder="请选择报修来源">
											<nz-option [nzValue]="item.id" [nzLabel]="item.name" *ngFor="let item of applicationSourceList"></nz-option>
										</nz-select>
									</div>
									<div class="col">
										<span class="name">预约时间：</span>
										<nz-date-picker style="width: 150px;" [(ngModel)]="incidentModel.yyTime" nzShowTime></nz-date-picker>
									</div>
								</div>

								<div class="row">
									<div class="col">
										<span class="name">报修图片：</span>
										<div class="value w100 upload">
											<ng-container *ngIf="repairImgs.length === 0">
												<nz-upload nzListType="picture-card" [(nzFileList)]="fileList" [nzShowUploadList]="showUploadList" [nzPreview]="handlePreview" nzFileType="image/jpeg,image/png" nzAccept="image/jpeg,image/png" [nzShowButton]="fileList.length < 3" [nzBeforeUpload]="beforeUpload" [nzAction]="temporarilyUrl" [nzSize]="10240">
													<i nz-icon nzType="plus"></i>
													<div class="ant-upload-text">上传照片</div>
												</nz-upload>
												<nz-modal [nzVisible]="previewVisible" [nzContent]="modalContent" [nzFooter]="null" (nzOnCancel)="previewVisible = false">
													<ng-template #modalContent>
														<img [src]="previewImage" [ngStyle]="{ width: '100%' }" />
													</ng-template>
												</nz-modal>
												<div class="tips">(支持JPG/PNG格式图片，单张大小10M以内)</div>
											</ng-container>
											<div class="thumbList" *ngIf="repairImgs.length > 0">
												<div class="thumb" *ngFor="let item of repairImgs;let index = index;" (click)="previewImageHandler(repairImgs, index)"><img [src]="item.thumbFilePath" alt=""></div>
											</div>
										</div>
									</div>
								</div>

								<div class="row" *ngIf="buildType !== '编辑事件'">
									<div class="col">
										<span class="name required">处理组：</span>
										<nz-select class="w100" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeCommonInp('group', $event)" nzPlaceHolder="请选择处理组" [(ngModel)]="incidentModel.group" (ngModelChange)="changeApplyGroup($event)" (nzOpenChange)="openChangeApplyGroup($event)">
											<ng-container *ngFor="let option of applicationGroupList">
												<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>
									</div>
									<div class="col">
										<span class="name">处理人：</span>
										<nz-select class="w100" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeCommonInp('user', $event)" nzPlaceHolder="请选择处理人" [(ngModel)]="incidentModel.user" (nzOpenChange)="openChangeApplyUser($event)" nzAllowClear>
											<ng-container *ngFor="let option of applicationUserList">
												<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="col"></div>
								</div>
							</div>
						</overlay-scrollbars>
					</ng-container>
					<!-- loading -->
					<div class="bottom" *ngIf="newLoading">
						<div class="bottom255">
							<div class="txtC">
								<img src="../../../assets/images/loading.gif" alt="" />
								<div>加载中...</div>
							</div>
						</div>
					</div>
				</div>
				<!-- 底部信息提示 -->
				<!-- <div class="bottomInfo" *ngIf="currentTabIndex !== '故障报修'">提示：临床科室建单会更简便哟！</div> -->
			</div>
			<div nz-col nzSpan="9" class="col right">
				<div class="rightTitle">
					<div class="rightTitle_tab" [class.active]="currentRTab == tab.id" *ngFor="let tab of rightTitle_tab;" (click)="rightTitleHandler(tab.id)">{{ tab.name }}</div>
					<span class="toLastTime1"><span class="time" *ngIf="applyDept || incidentModel.requester">{{ orderRefreshTime }}s</span></span>
				</div>
				<!-- 近期配送 start -->
				<div class="cots_body weifenpai" *ngIf="currentRTab == 0" [ngClass]="{ top185: hurseInfoHiding != 1 }">
					<overlay-scrollbars #osComponentRef12 [ngStyle]="{ height: '100%' }">
						<div *ngIf="noArrives.length && !loading4">
							<div class="list listsTypeColor" *ngFor="let data of noArrives">
								<div class="left_cots" (click)="openDetails(data)">
									<!-- 工单 -->
									<div class="gongdan">
										<span class="left">{{ data.taskType.taskName }}({{ data.gdcode }})</span>
										<span class="right">
											<span>{{ data.gdState.name }}</span>
										</span>
									</div>
									<!-- 地点 -->
									<div class="didian">
										<span class="left" *ngIf="data.taskType.associationType.value == 'inspect'">
											{{ data.startDept ? data.startDept.dept : "" }}
											<span *ngFor="let item of data.middleDept">
												->{{ item.dept }}
											</span>
										</span>
										<span class="left" *ngIf="data.taskType.associationType.id != 260">
											{{ data.startDept ? data.startDept.dept : "" }}{{ data.endDepts ? "->" + data.endDepts[0].dept : "" }}
										</span>
										<span class="right" *ngIf="data.goods">
											<i class="icon_transport transport-icon3"></i>
											<span>{{ data.goods }}</span>
										</span>
										<span class="right" *ngIf="data.workOrderRemark" [title]="data.workOrderRemark">
											<i class="icon_transport transport-icon3"></i>
											<span>{{ data.workOrderRemark }}</span>
										</span>
									</div>
									<!-- 时间 -->
									<div class="shijian">
										<span class="left" *ngIf="data.expectTimeNum && data.timeOut != true">
											<i class="icon_transport transport-shouye10" nz-tooltip nzTooltipTitle="进行中"></i>
											<ng-container *ngIf="(data.taskType.associationType.value == 'patientTransport' || data.taskType.associationType.value == 'inspect') && data.patient?.illnessState">
												<i *ngIf="data.patient.illnessState.value === '2'" class="colorRed icon_transport transport-tubiao_wei" nz-tooltip nzTooltipTitle="病危"></i>
												<i *ngIf="data.patient.illnessState.value === '3'" class="colorRed icon_transport transport-zhong" nz-tooltip nzTooltipTitle="病重"></i>
											</ng-container>
											<ng-container *ngIf="(data.taskType.associationType.value == 'patientTransport' || data.taskType.associationType.value == 'inspect') && data.patient?.careLevel">
												<i *ngIf="data.patient.careLevel.value === '0'" class="icon_transport transport-te1" nz-tooltip nzTooltipTitle="特级护理"></i>
												<i *ngIf="data.patient.careLevel.value === '1'" class="icon_transport transport-1_round_solid" nz-tooltip nzTooltipTitle="一级护理"></i>
												<i *ngIf="data.patient.careLevel.value === '2'" class="icon_transport transport-2_round_solid" nz-tooltip nzTooltipTitle="二级护理"></i>
												<i *ngIf="data.patient.careLevel.value === '3'" class="icon_transport transport-3_round_solid" nz-tooltip nzTooltipTitle="三级护理"></i>
											</ng-container>
											<span nz-tooltip nzTooltipTitle="患者姓名（住院号）" *ngIf="data.taskType.associationType.value == 'patientTransport' || data.taskType.associationType.value == 'inspect'">{{ data.patient.patientName }}<span *ngIf="data.patient.residenceNo">（{{ data.patient.residenceNo }}）</span></span>
										</span>
										<span class="left" *ngIf="data.timeOutLength && data.timeOut == true">
											<i class="colorRed icon_transport transport-daojishi" nz-tooltip nzTooltipTitle="超时"></i>
											<ng-container *ngIf="(data.taskType.associationType.value == 'patientTransport' || data.taskType.associationType.value == 'inspect') && data.patient?.illnessState">
												<i *ngIf="data.patient.illnessState.value === '2'" class="colorRed icon_transport transport-tubiao_wei" nz-tooltip nzTooltipTitle="病危"></i>
												<i *ngIf="data.patient.illnessState.value === '3'" class="colorRed icon_transport transport-zhong" nz-tooltip nzTooltipTitle="病重"></i>
											</ng-container>
											<ng-container *ngIf="(data.taskType.associationType.value == 'patientTransport' || data.taskType.associationType.value == 'inspect') && data.patient?.careLevel">
												<i *ngIf="data.patient.careLevel.value === '0'" class="icon_transport transport-te1" nz-tooltip nzTooltipTitle="特级护理"></i>
												<i *ngIf="data.patient.careLevel.value === '1'" class="icon_transport transport-1_round_solid" nz-tooltip nzTooltipTitle="一级护理"></i>
												<i *ngIf="data.patient.careLevel.value === '2'" class="icon_transport transport-2_round_solid" nz-tooltip nzTooltipTitle="二级护理"></i>
												<i *ngIf="data.patient.careLevel.value === '3'" class="icon_transport transport-3_round_solid" nz-tooltip nzTooltipTitle="三级护理"></i>
											</ng-container>
											<span nz-tooltip nzTooltipTitle="患者姓名（住院号）" *ngIf="data.taskType.associationType.value == 'patientTransport' || data.taskType.associationType.value == 'inspect'">{{ data.patient.patientName }}<span *ngIf="data.patient.residenceNo">（{{ data.patient.residenceNo }}）</span></span>
										</span>
										<span class="right" nz-tooltip [nzTooltipTitle]="'总时长' + formatTime(data.expectTimeNum / 1000)">
											{{ data.showCreateTime }}
										</span>
									</div>
									<!-- 急单 -->
									<img *ngIf="data.emergencyType && data.emergencyType.id == 300" src="../../assets/images/icon_ji.png" alt="" class="ji" />
									<!-- 加急单 -->
									<img *ngIf="data.emergencyType && data.emergencyType.id == 301" src="../../assets/images/icon_jiaji.png" alt="" class="ji" />
								</div>
								<div class="right_bots display_flex col-flex align-items_center justify-content_flex-center">
									<input type="button" *ngIf="data.gdState.value == 2" class="top_bot" value="派单" (click)="allotWorker(data.id, data.gdState.id)" />
									<input type="button" *ngIf="data.gdState.value == 3 || data.gdState.value == 4" class="mid_bot" value="撤回" (click)="openRecallModal(data.id)" />
									<input type="button" *ngIf="data.gdState.value == 2 || data.gdState.value == 3 || data.gdState.value == 4" class="btm_bot" value="删除" (click)="openDelModal(data.id, 'hsms')" />
								</div>
								<div *ngIf="data.timeOut != true" class="slider sgreen" [ngStyle]="{ width: data.percent + '%' }"></div>
								<div *ngIf="data.timeOut == true" class="slider sred" [ngStyle]="{ width: '100%' }"></div>
							</div>
						</div>
						<div class="no_data" *ngIf="noArrives.length == 0 && !loading4">
							暂无数据
						</div>
						<div class="no_data" *ngIf="loading4">
							<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>
					</overlay-scrollbars>
				</div>

				<!-- 近期维修 start -->
				<div class="cots_body weifenpai" *ngIf="currentRTab == 2" [ngClass]="{ top185: hurseInfoHiding != 1 }">
					<overlay-scrollbars #osComponentRef16 [ngStyle]="{ height: '100%' }">
						<div *ngIf="itsmOrders.length && !loading6">
							<div class="list listsTypeColor" *ngFor="let data of itsmOrders">
								<div class="left_cots" style="width: 96%;">
									<!-- 工单 -->
									<div class="gongdan">
										<span class="left">{{ data.incidentsign }}</span>
										<span class="right">
											<span>{{ data.state?.name }}</span>
										</span>
									</div>
									<!-- 描述 -->
									<div class="didian">
										<span class="left">
											{{ data.description }}
										</span>
									</div>
									<!-- 时间 -->
									<div class="shijian">
										<span class="left"></span>
										<span class="right">
											{{ data.acceptDate | date: "MM-dd HH:mm" }}
										</span>
									</div>
								</div>
							</div>
						</div>
						<div class="no_data" *ngIf="itsmOrders.length == 0 && !loading6">
							暂无数据
						</div>
						<div class="no_data" *ngIf="loading6">
							<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>
					</overlay-scrollbars>
				</div>
				<!-- 近期维修 end -->
				<!-- 知识库 start -->
				<div class="cots_body weifenpai" *ngIf="currentRTab == 3" [ngClass]="{ top185: hurseInfoHiding != 1 }">
					<overlay-scrollbars #osComponentRef17 [ngStyle]="{ height: '100%' }">
						<div *ngIf="knowageList.length && !loading7">
							<div class="list listsTypeColor" *ngFor="let data of knowageList" style="height: auto;overflow: hidden;">
								<div class="left_cots" style="width: 96%;height: auto;">
									<!-- 工单 -->
									<div class="gongdan" style="font-size: 16px;">
										<span class="left ellipsis-oneline w100" nz-tooltip [nzTooltipTitle]="data.title">{{data.title}}</span>
									</div>
									<!-- 描述 -->
									<div class="didian" style="font-size: 12px;height: auto;">
										<span class="left noEllipsis">{{data.content | stripHtml}}</span>
									</div>
									<!-- 时间 -->
									<div class="shijian" style="height: auto;line-height: normal;overflow: hidden;padding-bottom: 16px;">
										<span class="right">
											<button nz-button nzType="primary" (click)="importKnowage(data)">引用</button>
											<button class="ml8" nz-button nzType="primary" (click)="showKnowledgeModal(data)">查看</button>
										</span>
									</div>
								</div>
							</div>
						</div>
						<div class="no_data" *ngIf="knowageList.length == 0 && !loading7">
							暂无数据
						</div>
						<div class="no_data" *ngIf="loading7">
							<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>
					</overlay-scrollbars>
				</div>
				<!-- 知识库 end -->
			</div>
		</div>
		<div class="btns display_flex justify-content_flex-center align-items_center">
<!-- 			<ng-container *ngIf="applyDept && currentTabIndex !== '故障报修'">
				<button nz-button class="btn" nzType="primary" (click)="newOrderOk('&go&')" [nzLoading]="isGoLoading" *ngIf="(radioValueQt || radioValueZy) && currentTasktype && currentTasktype.associationType && ((currentTasktype.associationType.value === 'inspect' && linkCheckLisTrue && !(currentTasktype.isMoreDept === 0 && isInspects)) || currentTasktype.associationType.value !== 'inspect')">
					继续建单
				</button>
				<button nz-button class="btn" nzType="primary" (click)="newOrderOk()" [nzLoading]="isOkLoading" *ngIf="(radioValueQt || radioValueZy) && currentTasktype && currentTasktype.associationType && ((currentTasktype.associationType.value === 'inspect' && linkCheckLisTrue && !(currentTasktype.isMoreDept === 0 && isInspects)) || currentTasktype.associationType.value !== 'inspect')">
					{{isYyInspect ? '预约建单' :'直接建单'}}
				</button>
			</ng-container> -->
			<ng-container *ngIf="currentTabIndex === '故障报修' && buildType !== '编辑事件'">
				<label nz-checkbox [(ngModel)]="isBuildOrderAgagin" *ngIf="buildType !== '报修转事件' && buildType !== '留言转事件' && buildType !== '继续建单'">是否连续建单</label>
				<button nz-button class="btn" nzType="primary" (click)="directOrder()">
					直接解决
				</button>
				<button nz-button class="btn" nzType="primary" (click)="assignOrder()">
					建单并派单
				</button>
			<!-- 	<button nz-button class="btn" nzType="primary" (click)="temporaryStorage()">
					暂存
				</button> -->
			</ng-container>
			<ng-container *ngIf="currentTabIndex === '故障报修' && buildType === '编辑事件'">
				<button nz-button class="btn" nzType="primary" (click)="saveOrder()">
					保存
				</button>
			</ng-container>
			<button class="btn cancel" nz-button nzType="default" (click)="newOrderCancel()">
				取消
			</button>
		</div>
	</div>
</div>

<!-- 查询范围 -->
<app-query-range [hospital]="hospital" [duty]="duty" [queryType]="queryType" [parent]="parent" [hiddenParent]="true" (cancelQueryRange)="cancelQueryRange()" (submitQueryRange)="submitQueryRange($event)" *ngIf="queryRangeFlag"></app-query-range>

<!-- 知识库查看 -->
<app-knowledge-look (cancelKnowledgeModal)="cancelKnowledgeModal()" *ngIf="isShowKnowledge" [knowledgeData]="coopData"></app-knowledge-look>

<!-- 操作成功/失败提示框 -->
<app-prompt-modal
  *ngIf="promptModalShow"
  [content]="promptContent"
  [success]="ifSuccess"
  [show]="promptModalShow"
  [info]="promptInfo"
  [back]="back"
  (closeModel)="closeModel($event)"
></app-prompt-modal>
