<nz-breadcrumb style="margin:12px 0;">
  <nz-breadcrumb-item>内容管理</nz-breadcrumb-item>
  <nz-breadcrumb-item>内容详情</nz-breadcrumb-item>
</nz-breadcrumb>

<div class="inner-content">
  <nz-form-item nzFlex>
    <nz-form-label nzFor="category" nzRequired>内容分类</nz-form-label>
    <nz-form-control>
        <label>{{cmsContentView.categoryName}}</label>
    </nz-form-control>
  </nz-form-item>

<form nz-form [formGroup]="validateForm" class="ant-advanced-search-form">

    <!--标题-->
    <nz-form-item nzFlex>
      <nz-form-label nzFor="title" nzRequired>
        <span>内容标题<i nz-icon nz-tooltip nzTitle="内容标题" type="question-circle" nzTheme="outline"></i></span>
      </nz-form-label>
      <nz-form-control [nzSm]="14" [nzXs]="24">
        <label>{{cmsContentView.title}}</label>
        <!--<input nz-input  formControlName="title" [(ngModel)]="cmsContentView.title" placeholder="请输入内容标题..."  />-->
        </nz-form-control>
    </nz-form-item>

    <!--简要描述-->
    <nz-form-item nzFlex>
      <nz-form-label nzFor="description" nzRequired>
        <span>简要描述<i nz-icon nz-tooltip nzTitle="简要描述" type="question-circle" nzTheme="outline"></i></span>
      </nz-form-label>
      <nz-form-control [nzSm]="14" [nzXs]="24">
        <!--<input nz-input  formControlName="description"  [(ngModel)]="cmsContentView.description"  placeholder="请输入简要描述..."  />-->
        <label>{{cmsContentView.description}}</label>
      </nz-form-control>
    </nz-form-item>

    <!--封面图片-->
    <nz-form-item nzFlex>
      <nz-form-label nzFor="listImg" nzRequired>封面图片</nz-form-label>
      <nz-form-control>
        <img *ngIf="cmsContentView.imgData" [src]=" FILE_URL + cmsContentView.imgData" class="avatar" />
      </nz-form-control>
    </nz-form-item>

    <!--优先级-->
    <nz-form-item nzFlex>
      <nz-form-label nzFor="sortId" nzRequired>
        <span>优先级<i nz-icon nz-tooltip nzTitle="优先级" type="question-circle" nzTheme="outline"></i></span>
      </nz-form-label>
      <nz-form-control [nzSm]="14" [nzXs]="24">
        <!--<input nz-input type="number" formControlName="sortId" [(ngModel)]="cmsContentView.sortId" placeholder="请输入优先级，越小越靠前..."   oninput="if(value.length>5) value=value.slice(0,5)"/>-->
        <label>{{cmsContentView.sortId}}</label>
      </nz-form-control>
    </nz-form-item>

    <!--是否推荐-->
    <nz-form-item nzFlex>
      <nz-form-label nzFor="recommend" >
        <span>是否推荐</span>
      </nz-form-label>
      <nz-form-control [nzSm]="14" [nzXs]="24">
        <nz-switch [nzDisabled]="true" formControlName="recommend" [(ngModel)]="cmsContentView.recommend" nzCheckedChildren="是" nzUnCheckedChildren="否"></nz-switch>
      </nz-form-control>
    </nz-form-item>

    <!--富文本-->
    <nz-form-label nzFor="content">
      <span>内容<i nz-icon nz-tooltip nzTitle="相册、图集、视频集等可不填写内容" type="question-circle" nzTheme="outline"></i></span>
    </nz-form-label>
    <nz-form-item>
      <!--<ngx-neditor formControlName="content" [(ngModel)]="cmsContentView.content" #neditor [config]="config"></ngx-neditor>-->
      <p style="margin-left: 20px" [innerHTML]='cmsContentView.content'></p >
    </nz-form-item>

    <nz-form-label nzFor="suffix">
      <span>附件<i nz-icon nz-tooltip nzTitle="附件列表" type="question-circle" nzTheme="outline"></i></span>
    </nz-form-label>
    <nz-form-item>
      <nz-table [nzShowPagination]="false" #basicTable [nzData]="patchList">
        <thead>
        <tr>
          <th>附件名称</th>
          <th>附件类型</th>
          <th>附件描述</th>
          <th>排序</th>
          <th>添加时间</th>
        </tr>
        </thead>
        <tbody>
        <tr *ngFor="let data of patchList">
          <td>{{ data.patchName }}</td>
          <td *ngIf="data.patchType == 1">图片</td>
          <td *ngIf="data.patchType == 2">音频</td>
          <td *ngIf="data.patchType == 3">视频</td>
          <td *ngIf="data.patchType == 4">文档</td>
          <td *ngIf="data.patchType == 5">其他</td>
          <td>{{data.patchDesc}}</td>
          <td>{{data.sort}}</td>
          <td>{{data.addTime | date:'yyyy-MM-dd'}}</td>
        </tr>
        </tbody>
      </nz-table>
    </nz-form-item>

  <div nz-row style="margin-top: 10px">
    <div nz-col [nzSpan]="24" class="search-area">
      <button nz-button (click)="getBack()">取消</button>
    </div>
  </div>
</form>
</div>
