<div class="detail-box">
  <div class="modalBody">
    <!-- <overlay-scrollbars #osComponentRef1 class="content"> -->
     <form nz-form [formGroup]="validateForm" class="addForm">
			<div class="left-form-box">
				<nz-form-item class="form-title-box" *ngIf="!add">
					<div class="form-title">知识库编号：{{solutionNumber}}</div>
					<div class="form-title">版本号：V{{versionNumber}}</div>
				</nz-form-item>
				
				<nz-form-item class="form-item">
				  <nz-form-label nzRequired nzFor="title" [nzSm]="2" [nzXs]="24">标题</nz-form-label>
				  <nz-form-control nzErrorTip="请输入标题!" [nzSm]="22" [nzXs]="24">
						<input nz-input formControlName="title"  placeholder="请输入标题" nzSize="default" />
				  </nz-form-control>
				</nz-form-item>
				
				<nz-form-item class="form-item" *ngIf="add">
				  <nz-form-label nzFor="content" [nzSm]="2" [nzXs]="24">内容</nz-form-label>
					<app-wang-editor (changeContent)="changeContent($event)"></app-wang-editor>
				</nz-form-item>
				
				<nz-form-item class="form-item" *ngIf="!add && isContentShow">
				  <nz-form-label nzFor="content" [nzSm]="2" [nzXs]="24">内容</nz-form-label>
					<app-wang-editor (changeContent)="changeContent($event)" [content]="detailContent"></app-wang-editor>
				</nz-form-item>
			</div>
			
			<div class="right-form-box">
				<nz-form-item class="form-item">
				  <nz-form-label nzRequired nzFor="repairVisible" [nzSm]="6" [nzXs]="24">报修可见</nz-form-label>
					<nz-form-control nzErrorTip="请选择!" [nzSm]="16" [nzXs]="24">
						<nz-radio-group formControlName="repairVisible">
						  <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="form-item">
				  <nz-form-label nzRequired nzFor="knowledgeClass" [nzSm]="6" [nzXs]="24">知识分类</nz-form-label>
					<nz-form-control nzErrorTip="请选择!" [nzSm]="24" [nzXs]="24">
						<nz-radio-group formControlName="knowledgeClass" (ngModelChange)="radioChnage($event)">
						  <label nz-radio [nzValue]="item.id" *ngFor="let item of dicData">{{item.name}}</label>
						</nz-radio-group>
					</nz-form-control>
				</nz-form-item>
				
				<nz-form-item class="form-item" *ngIf="classItem==2">
				  <nz-form-label nzRequired nzFor="polling" [nzSm]="6" [nzXs]="24">关联巡检表</nz-form-label>
				  <nz-form-control nzErrorTip="请选择关联巡检表!" [nzSm]="16" [nzXs]="24">
				    <nz-input-group>
							<nz-select nzSearch nzShowSearch nzPlaceHolder="请选择关联巡检表" formControlName="polling">
							  <ng-container *ngFor="let option of pollingData">
							    <nz-option *ngIf="!isDeptLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
							  </ng-container>
							  <nz-option *ngIf="isDeptLoading" nzDisabled nzCustomContent>
							    <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
							  </nz-option>
							</nz-select>
						</nz-input-group>
				  </nz-form-control>
				</nz-form-item>
				
				<nz-form-item class="form-item" *ngIf="classItem==1">
				  <nz-form-label nzRequired nzFor="malfunction" [nzSm]="6" [nzXs]="24">关联故障现象</nz-form-label>
				  <nz-form-control nzErrorTip="请选择关联故障现象!" [nzSm]="16" [nzXs]="16">
					<!-- 	<nz-cascader [nzOptions]="malfunctionData" 
							formControlName="malfunction" 
							nzPlaceHolder="请选择关联故障现象">
						</nz-cascader> -->
						<nz-select [nzDropdownMatchSelectWidth]="false" nzShowSearch nzPlaceHolder="请选择故障现象" formControlName="malfunction" >
						  <ng-container *ngFor="let option of malfunctionData">
						    <nz-option *ngIf="!isDeptLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
						  </ng-container>
						  <nz-option *ngIf="isDeptLoading" 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="form-item">
				  <nz-form-label nzFor="assetProductId" [nzSm]="6" [nzXs]="24">关联产品</nz-form-label>
				  <nz-form-control nzErrorTip="请选择关联产品!" [nzSm]="16" [nzXs]="24">
				    <nz-input-group>
							<nz-select (nzOnSearch)="changeInp($event)" nzServerSearch nzShowSearch nzPlaceHolder="请选择关联产品" formControlName="assetProductId">
							  <ng-container *ngFor="let option of productData">
							    <nz-option *ngIf="!isDeptLoading" [nzLabel]="option.name + '(' + option.brand + ')' + '(' + option.model + ')'" [nzValue]="option.id"></nz-option>
							  </ng-container>
							  <nz-option *ngIf="isDeptLoading" nzDisabled nzCustomContent>
							    <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
							  </nz-option>
							</nz-select>
						</nz-input-group>
				  </nz-form-control>
				</nz-form-item>
				
				<nz-form-item class="form-item">
				  <nz-form-label nzFor="file" [nzSm]="6" [nzXs]="24">文件上传</nz-form-label>
				  <nz-form-control [nzSm]="16" [nzXs]="24">
						<nz-upload nzFor="file"
						  class="avatar-uploader"
						  nzName="file"
							[(nzFileList)]="fileData"
							[(nzRemove)]="removeFile"
						  [nzBeforeUpload]="beforeUpload"
						>
						  <button nz-button><i nz-icon nzType="upload"></i><span>点击上传</span></button>
							<div class="upload-sign">支持扩展名：PDF、word、ppt、excel、txt...</div>
						</nz-upload>
					</nz-form-control>
				</nz-form-item>
			</div>
			
     </form>
    <!-- </overlay-scrollbars> -->
 
  </div>
	<div class="display_flex justify-content_flex-center form-btn">
	  <button *ngIf="optType!='upgrade'" class="btn" nz-button nzType="primary" (click)="submitForm(1)" [nzLoading]="btnLoading1">保存</button>
		<button *ngIf="optType!='upgrade'" class="btn" nz-button nzType="primary" (click)="submitForm(2)" [nzLoading]="btnLoading2">暂存</button>
		<button *ngIf="optType=='upgrade'" class="btn" nz-button nzType="primary" (click)="submitForm(3)" [nzLoading]="btnLoading2">升级知识</button>
		<button class="btn cancel" nz-button nzType="default" (click)="back()">取消</button>
	</div>
	<div class="mask-style" *ngIf="isSpinning">
		<nz-spin nzSimple class="spin-style"></nz-spin>
	</div>
</div>
<!-- 操作成功/失败提示框 -->
<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
  [info]="promptInfo" (closeModel)="closeModel()"></app-prompt-modal>


