<div class="sysConfig" *ngIf="!loading1&&!loading4">
  <overlay-scrollbars #osComponentRef1 class="main">
    <h2>系统配置</h2>
    <form nz-form [formGroup]="validateForm" class="forms">
      <div class="form">
        <h3>基本配置</h3>
        <nz-form-item class="formItem">
          <nz-form-label [nzSpan]="24" nzFor="systemName" class="label">系统名称</nz-form-label>
          <nz-form-control [nzSpan]="24" nzErrorTip="请输入系统名称!">
            <input nz-input formControlName="systemName" id="systemName" placeholder="请输入系统名称">
          </nz-form-control>
        </nz-form-item>
        <nz-form-item class="formItem">
          <nz-form-label [nzSpan]="24" nzFor="largeScreenName" class="label">大屏名称</nz-form-label>
          <nz-form-control [nzSpan]="24" nzErrorTip="请输入大屏名称!">
            <input nz-input formControlName="largeScreenName" id="largeScreenName" placeholder="请输入大屏名称">
          </nz-form-control>
        </nz-form-item>
        <nz-form-item class="formItem">
          <nz-form-label [nzSpan]="24" class="label" nzFor="logo">系统logo</nz-form-label>
          <nz-form-control [nzSpan]="24" nzErrorTip="请选择系统logo!">
            <nz-upload nzFor="logo"
              class="avatar-uploader"
              [nzAction]="sysLogoUrl"
              [nzCustomRequest]="customReq"
              nzName="file"
              nzListType="picture-card"
              [nzShowUploadList]="false"
              [nzBeforeUpload]="beforeUpload"
              (nzChange)="handleChange($event, 'avatarUrl')"
            >
              <ng-container *ngIf="!avatarUrl">
                <i class="upload-icon" nz-icon [nzType]="avatarLoading ? 'avatarLoading' : 'plus'"></i>
                <div class="ant-upload-text">点击上传</div>
              </ng-container>
              <img *ngIf="avatarUrl" [src]="avatarUrl" class="avatar" />
            </nz-upload>
          </nz-form-control>
        </nz-form-item>
        <nz-form-item class="formItem">
          <nz-form-label [nzSpan]="24" class="label" nzFor="favicon">favicon图标</nz-form-label>
          <nz-form-control [nzSpan]="24" nzErrorTip="请选择系统favicon图标!">
            <nz-upload nzFor="favicon"
              class="avatar-uploader"
              [nzAction]="faviconLogoUrl"
              [nzCustomRequest]="customReq"
              nzName="file"
              nzListType="picture-card"
              [nzShowUploadList]="false"
              [nzBeforeUpload]="beforeUpload"
              (nzChange)="handleChange($event, 'avatarUrl1')"
            >
              <ng-container *ngIf="!avatarUrl1">
                <i class="upload-icon" nz-icon [nzType]="avatarLoading ? 'avatarLoading' : 'plus'"></i>
                <div class="ant-upload-text">点击上传</div>
              </ng-container>
              <img *ngIf="avatarUrl1" [src]="avatarUrl1" class="avatar" />
            </nz-upload>
          </nz-form-control>
        </nz-form-item>
        <nz-form-item class="formItem">
          <nz-form-label [nzSpan]="24" nzFor="defaultPwd" nzRequired class="label">用户默认密码</nz-form-label>
          <nz-form-control [nzSpan]="24" nzErrorTip="请输入用户默认密码!">
            <input nz-input formControlName="defaultPwd" id="defaultPwd" placeholder="请输入用户默认密码">
          </nz-form-control>
        </nz-form-item>
        <nz-form-item class="formItem">
          <nz-form-label [nzSpan]="24" nzFor="effectiveDuration" nzRequired class="label">登录有效时长</nz-form-label>
          <nz-form-control [nzSpan]="24" nzErrorTip="请输入登录有效时长!">
            <input nz-input formControlName="effectiveDuration" id="effectiveDuration" placeholder="请输入登录有效时长">
          </nz-form-control>
        </nz-form-item>
        <nz-form-item class="formItem">
          <nz-form-label [nzSpan]="24" nzFor="specimenButton" nzRequired class="label">护士端标本建单按钮文字</nz-form-label>
          <nz-form-control [nzSpan]="24" nzErrorTip="请输入护士端标本建单按钮文字!">
            <input nz-input formControlName="specimenButton" id="specimenButton" placeholder="请输入护士端标本建单按钮文字">
          </nz-form-control>
        </nz-form-item>
        <nz-form-item class="formItem">
          <nz-form-label [nzSpan]="24" nzFor="deptDisplay" nzRequired class="label">护士端科室显示选择</nz-form-label>
          <nz-form-control [nzSpan]="24" nzErrorTip="请输入护士端科室显示选择!">
            <nz-radio-group formControlName="deptDisplay">
              <label nz-radio nzValue="1">科室名称</label>
              <label nz-radio nzValue="2">科室别名</label>
            </nz-radio-group>
          </nz-form-control>
        </nz-form-item>
        <nz-form-item class="formItem">
          <nz-form-label [nzSpan]="12" nzFor="orderClearUserSwitch" nzRequired class="label">下班后是否自动调度重新分派
          </nz-form-label>
          <nz-form-control [nzSpan]="12" nzErrorTip="下班后是否自动调度重新分派是必填项!">
            <nz-radio-group formControlName="orderClearUserSwitch">
              <label nz-radio nzValue="1">是</label>
              <label nz-radio nzValue="0">否</label>
            </nz-radio-group>
          </nz-form-control>
        </nz-form-item>
        <nz-form-item class="formItem">
          <nz-form-label [nzSpan]="24" nzFor="busiViewDeptId" nzRequired class="label">业务视图科室类型</nz-form-label>
          <nz-form-control [nzSpan]="24" nzErrorTip="业务视图科室类型是必填项!">
            <nz-select nzPlaceHolder="请选择业务视图科室类型" formControlName="busiViewDeptId">
              <nz-option nzValue="{{item.id}}" nzLabel="{{item.name}}" *ngFor="let item of deptTypes"></nz-option>
            </nz-select>
          </nz-form-control>
        </nz-form-item>
        <nz-form-item class="formItem">
          <nz-form-label [nzSpan]="24" nzFor="formUrl" nzRequired class="label">FORMURL</nz-form-label>
          <nz-form-control [nzSpan]="24" nzErrorTip="请输入FORMURL!">
            <input nz-input formControlName="formUrl" id="formUrl" placeholder="请输入FORMURL">
          </nz-form-control>
        </nz-form-item>
        <nz-form-item class="formItem">
          <nz-form-label [nzSpan]="24" nzFor="serviceUrl" nzRequired class="label">服务地址</nz-form-label>
          <nz-form-control [nzSpan]="24" nzErrorTip="请输入服务地址!">
            <input nz-input formControlName="serviceUrl" id="serviceUrl" placeholder="请输入服务地址">
          </nz-form-control>
        </nz-form-item>
      </div>
      <div class="form">
        <h3>缓存配置</h3>
        <nz-form-item class="formItem">
          <nz-form-label [nzSpan]="24" nzFor="cachePath" nzRequired class="label">用户缓存地址</nz-form-label>
          <nz-form-control [nzSpan]="24" nzErrorTip="请输入用户缓存地址!">
            <input nz-input formControlName="cachePath" id="cachePath" placeholder="请输入用户缓存地址">
          </nz-form-control>
        </nz-form-item>
        <nz-form-item class="formItem">
          <nz-form-label [nzSpan]="24" nzFor="cachePort" nzRequired class="label">用户缓存端口</nz-form-label>
          <nz-form-control [nzSpan]="24" nzErrorTip="请输入用户缓存端口!">
            <input nz-input formControlName="cachePort" id="cachePort" placeholder="请输入用户缓存端口">
          </nz-form-control>
        </nz-form-item>
        <nz-form-item class="formItem">
          <nz-form-label [nzSpan]="8" nzFor="workOrderSettings" nzRequired class="label">自动关闭工单设置
          </nz-form-label>
          <nz-form-control [nzSpan]="16" nzErrorTip="自动关闭工单设置是必填项!">
            <nz-input-number class="w100" formControlName="workOrderSettings" [nzMin]="5" [nzStep]="1" [nzPrecision]="0"
              [nzFormatter]="formatterPercent" [nzParser]="parserPercent"></nz-input-number>
          </nz-form-control>
        </nz-form-item>
        <nz-form-item class="formItem">
          <nz-form-label [nzSpan]="6" nzFor="defaultRoleOfNurse" nzRequired class="label">护士默认角色</nz-form-label>
          <nz-form-control [nzSpan]="18" nzErrorTip="护士默认角色是必填项!">
            <nz-select formControlName="defaultRoleOfNurse" nzPlaceHolder="请输入护士默认角色">
              <ng-container *ngFor="let role of roleList">
                <nz-option *ngIf="!loading4" [nzValue]="role.id" [nzLabel]="role.role"></nz-option>
              </ng-container>
              <nz-option *ngIf="loading4" nzDisabled nzCustomContent>
                <i nz-icon nzType="loading" class="loading-icon"></i> 加载中...
              </nz-option>
            </nz-select>
          </nz-form-control>
        </nz-form-item>
        <nz-form-item class="formItem">
          <nz-form-label [nzSpan]="13" nzFor="nurseDeptSwitchTip" nzRequired class="label">护士科室切换提示自动关闭设置
          </nz-form-label>
          <nz-form-control [nzSpan]="11" nzErrorTip="护士科室切换提示自动关闭设置是必填项!">
            <nz-input-number class="w100" formControlName="nurseDeptSwitchTip" [nzStep]="1"></nz-input-number>
          </nz-form-control>
        </nz-form-item>
        <nz-form-item class="formItem">
          <nz-form-label [nzSpan]="7" nzFor="updateTipsForNurses" class="label">护士端更新提示
          </nz-form-label>
          <nz-form-control [nzSpan]="17" nzErrorTip="护士端更新提示是必填项!">
            <textarea nz-input placeholder="最多50个字" formControlName="updateTipsForNurses"
              [nzAutosize]="{ minRows: 3, maxRows: 3 }" maxlength="50"></textarea>
          </nz-form-control>
        </nz-form-item>
        <nz-form-item class="formItem">
          <nz-form-label [nzSpan]="9" nzFor="itsmIncident" nzRequired class="label">护士端是否显示报修
          </nz-form-label>
          <nz-form-control [nzSpan]="15" nzErrorTip="护士端是否显示报修是必填项!">
            <nz-radio-group formControlName="itsmIncident">
              <label nz-radio nzValue="1">是</label>
              <label nz-radio nzValue="0">否</label>
            </nz-radio-group>
          </nz-form-control>
        </nz-form-item>
        <nz-form-item class="formItem" *ngIf="validateForm.controls.itsmIncident.value == 1">
          <nz-form-label [nzSpan]="24" nzFor="itsmIP" nzRequired class="label">链接地址</nz-form-label>
          <nz-form-control [nzSpan]="24" nzErrorTip="请输入链接地址!">
            <input nz-input formControlName="itsmIP" id="itsmIP" placeholder="请输入链接地址">
          </nz-form-control>
        </nz-form-item>
        <nz-form-item class="formItem">
          <nz-form-label [nzSpan]="10" nzFor="refreshNurseWorkOrderTime" nzRequired class="label">护士工单列表刷新速度
          </nz-form-label>
          <nz-form-control [nzSpan]="14" nzErrorTip="护士工单列表刷新速度是必填项!">
            <nz-input-number class="w100" formControlName="refreshNurseWorkOrderTime" [nzMin]="15" [nzStep]="1" [nzPrecision]="0" [nzFormatter]="formatterSecond" [nzParser]="parserSecond"></nz-input-number>
          </nz-form-control>
        </nz-form-item>
<!-- 				<nz-form-item class="formItem">
				  <nz-form-label [nzSpan]="10" nzFor="repairs" nzRequired class="label">报修方式支持
				  </nz-form-label>
				  <nz-form-control [nzSpan]="14" nzErrorTip="报修方式支持是必填项!">
						<nz-checkbox-group formControlName="repairs" [(ngModel)]="checkOptionsOne" ></nz-checkbox-group>
					</nz-form-control>
				</nz-form-item> -->
				<nz-form-item class="formItem">
				  <nz-form-label [nzSpan]="10" nzFor="cmdbRepair" nzRequired class="label">是否支持资产报修
				  </nz-form-label>
				  <nz-form-control [nzSpan]="14" nzErrorTip="是否支持资产报修是必填项!">
						<nz-radio-group formControlName="cmdbRepair">
						  <label nz-radio nzValue="1">是</label>
						  <label nz-radio nzValue="0">否</label>
						</nz-radio-group>
				  </nz-form-control>
				</nz-form-item>
				<nz-form-item class="formItem">
				  <nz-form-label [nzSpan]="24" nzFor="supportAppVersion" class="label">支助APP版本号</nz-form-label>
				  <nz-form-control [nzSpan]="24" nzErrorTip="请输入支助APP版本号!">
				    <input nz-input formControlName="supportAppVersion" id="supportAppVersion" placeholder="请输入支助APP版本号">
				  </nz-form-control>
				</nz-form-item>
				<nz-form-item class="formItem">
				  <nz-form-label [nzSpan]="24" nzFor="autoIncidentDegree" nzRequired class="label">事件默认评价</nz-form-label>
				  <nz-form-control [nzSpan]="24" nzErrorTip="事件默认评价是必填项!">
				    <nz-select nzPlaceHolder="请选择事件默认评价" formControlName="autoIncidentDegree">
				      <nz-option nzValue="{{item.id}}" nzLabel="{{item.name}}" *ngFor="let item of evaluateData"></nz-option>
				    </nz-select>
				  </nz-form-control>
				</nz-form-item>
				<nz-form-item class="formItem">
				  <nz-form-label [nzSpan]="24" nzFor="autoWechatDegree" nzRequired class="label">微信默认评价</nz-form-label>
				  <nz-form-control [nzSpan]="24" nzErrorTip="微信默认评价是必填项!">
				    <nz-select nzPlaceHolder="请选择微信默认评价" formControlName="autoWechatDegree">
				      <nz-option nzValue="{{item.id}}" nzLabel="{{item.name}}" *ngFor="let item of evaluateData"></nz-option>
				    </nz-select>
				  </nz-form-control>
				</nz-form-item>
				<nz-form-item class="formItem">
				  <nz-form-label [nzSpan]="24" nzFor="workorderEvaluation" nzRequired class="label">转运默认评价</nz-form-label>
				  <nz-form-control [nzSpan]="24" nzErrorTip="转运默认评价是必填项!">
				    <nz-select nzPlaceHolder="请选择转运默认评价" formControlName="workorderEvaluation">
				      <nz-option nzValue="{{item.id}}" nzLabel="{{item.name}}" *ngFor="let item of workorderEvaluation"></nz-option>
				    </nz-select>
				  </nz-form-control>
				</nz-form-item>
      </div>
    </form>
  </overlay-scrollbars>
  <div class="submit">
    <button [disabled]="!coopBtns.edit" nz-button nzType="primary" class="save" (click)="submitForm()"
      [nzLoading]="loading2">保存</button>
    <button [disabled]="!coopBtns.edit" nz-button nzType="primary" class="refresh" (click)="refresh()"
      [nzLoading]="loading3">刷新字典缓存</button>
  </div>
</div>
<div class="sysConfig" *ngIf="loading1||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>
<!-- 操作成功/失败提示框 -->
<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
  [info]="promptInfo">
</app-prompt-modal>
