
<ion-header>

  <ion-navbar>
    <ion-title>编辑问卷</ion-title>
  </ion-navbar>

</ion-header>


<ion-content class="bgc-e7e8ed">
  <ion-list>
    <ion-item>
      <ion-label class="padding-left-16">{{temp.title}}</ion-label>
    </ion-item>
    <div class="question-list">
      <ion-item *ngFor="let item of contentList;let i = index" (click)="itemEdit(i)">
        <div class="item-content">
          <p>{{i +1}}.{{item.title}}</p>
          <ng-container *ngIf="item.quesType == 1">
            <p><input type="radio">是</p>
            <p><input type="radio">否</p>
          </ng-container>
          <ng-container *ngIf="item.quesType == 2">
            <ng-container *ngFor=" let option1 of item.quesDesc">
                <p>{{option1.option_title}}</p>
            </ng-container>
          </ng-container>
          <ng-container *ngIf="item.quesType == 3">
            <ng-container *ngFor=" let option2 of item.quesDesc">
              <p>{{option2.option_title}}</p>
            </ng-container>
          </ng-container>
          <ng-container *ngIf="item.quesType == 4">
            <textarea placeholder="文字"></textarea>
          </ng-container>
        </div>
        <div class="item-opra" *ngIf="editIndex == i">
          <div (click)="itemEdit(item)"><span>编辑</span></div>
          <div (click)="itemUp(item)"><span>上移</span></div>
          <div (click)="itemDown(item)"><span>下移</span></div>
          <div (click)="itemDelete(i)"><span>删除</span></div>
        </div>
      </ion-item>
    </div>
  </ion-list>
</ion-content>

<ion-footer>
  <div class="footter-opr">
    <div (click)="add()">
      <img src="./assets/imgs/survey/add.png" alt=""> <br>
      <span>题目</span>
    </div>
    <div (click)="set()">
      <img src="./assets/imgs/survey/set.png" alt=""> <br>
      <span>设置</span>
    </div>
    <div (click)="look()">
      <img src="./assets/imgs/survey/look.png" alt=""> <br>
      <span>预览</span>
    </div>
    <div (click)="save()">
      <img src="./assets/imgs/survey/save.png" alt=""> <br>
      <span>保存</span>
    </div>
  </div>
</ion-footer>