<div class="wrapper">
  <header>
    <div class="left">
      <ul>
        <li (click)="changeTag(null,'全部')" [ngClass]="{'selected':tagId === null}">全部</li>
        <li *ngFor="let tagItem of tagLists" (click)="changeTag(tagItem.tagId,tagItem.tagName)"
        [ngClass]="{'selected':tagId === tagItem.tagId}">
          {{tagItem.tagName}}
        </li>
      </ul>
    </div>
    <div class="right">
      <div class="right_line" (click)="isShowFilter = true;erpInitialize();productQry(insurerId)">
        <span class="iconfont icon-shaixuan" style="font-size: 26px;"></span>
        <div>过滤搜索</div> 
      </div>
      <div class="right_line" (click)="clickMyQues()">
        <span class="iconfont icon-wentixietiao" style="font-size: 28px;position: relative;top: -2px;"></span>
        <div style="top: -11px;">我的问题</div>
        <i *ngIf="notViewCont>0">{{notViewCont}}</i>
      </div>
    </div>
    <div class="search">
      <span class="iconfont icon-chazhao"></span>
      <input type="text" class="form-control" placeholder="搜索问题" [(ngModel)]="problem">
      <p (click)="tagId=insurerId = productId = null;insurerChName = '点击选择保险公司';productName = '点击选择产品';
      searchList()">搜索</p>
    </div>
    <div *ngIf="isShowFilter" class="filterMask" (click)="isShowFilter = false">
    </div>
    <div *ngIf="isShowFilter" class="more">
      <div style="border-bottom: 1px #ddd solid;">
        <span>保险公司</span>
        <span (click)="insurerToastFlag = true;insurerListShow = insurerList">{{insurerChName}}</span>
      </div>
      <div>
        <span>产品</span>
        <span (click)="productToastFlag = true;productListShow = productList">{{productName}}</span>
      </div>
    </div>
  </header>
  <div class="content">
    <div *ngFor="let listItem of List;index as i" class="line_content">
      <h4>
        <div>
          <i *ngIf="tagName=='热榜'">{{i+1}}</i>
          <span>{{listItem.problem}}</span>
        </div>
        <span class="iconfont icon-xiangxia" (click)="listItem.spread = !listItem.spread"
        [ngStyle]="{'transform': listItem.spread ? 'rotate(180deg)' : 'rotate(0)'}"
        ></span>
      </h4>
      <div class="answerDate" *ngIf="listItem.spread">{{listItem.submitDate}}</div>
      <div class="answer" *ngIf="listItem.spread">{{listItem.answer}}</div>
      <div class="answerDate" *ngIf="listItem.spread">{{listItem.firstAnswerDate}}</div>
    </div>
    <div *ngIf="!List?.length" style="margin-top: 10%;text-align: center;font-size: 20px;">暂无投核保问题</div>
  </div>
  <footer [routerLink]="['/ask']">
    我要提问
  </footer>
</div>

<div class="toastWrapper toast" *ngIf="insurerToastFlag || productToastFlag" (click)="productToastFlag=insurerToastFlag = false;">
</div>
<!--保险公司筛选-->
<div class="editContainer" style="background: #efeff4;padding: 0;" *ngIf="insurerToastFlag">
  <SearchBar [placeholder]="'请搜索保险公司名称'" [maxLength]="8"
  (onChange)="change($event,1)"
        ></SearchBar>
  <ul class="practitioner_con">
    <li (click)="selectInsurer(null,'点击选择保险公司')">空</li>
    <li *ngFor="let insurerItem of insurerListShow" (click)="selectInsurer(insurerItem.insurerId,insurerItem.insurerChName)">
      {{insurerItem.insurerChName}}
    </li>
  </ul>
</div>

<div class="editContainer" style="background: #efeff4;padding: 0;" *ngIf="productToastFlag">
  <SearchBar [placeholder]="'请搜索产品名称'" [maxLength]="8"
  (onChange)="change($event,2)"
        ></SearchBar>
  <ul class="practitioner_con">
    <li (click)="selectProduct(null,'点击选择产品')">空</li>
    <li *ngFor="let productItem of productListShow" (click)="selectProduct(productItem.productId,productItem.productName)">
      {{productItem.productName}}
    </li>
  </ul>
</div>
