
<ion-header>

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

</ion-header>


<ion-content class="bgc-e7e8ed">
  <ion-list>
    <ion-item class="padding-left-16">
      <!--<ion-input class="padding-left-16" [(ngModel)]="temp.title"></ion-input>-->
      <p class="padding-left-10 padding-right-10" (click)="editQues()">
        <span>{{temp.title}}</span>
        <ion-icon style="font-size: 20px" float-right ios="ios-create-outline" md="md-create-outline"></ion-icon>
      </p>
      <!--<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><span class="input-radio"></span>是</p>
            <p><span class="input-radio"></span>否</p>
          </ng-container>
          <ng-container *ngIf="item.quesType == 2">
            <ng-container *ngFor=" let option1 of item.quesDesc">
              <p><span class="input-radio"></span>{{option1.option_title}}</p>
            </ng-container>
          </ng-container>
          <ng-container *ngIf="item.quesType == 3">
            <ng-container *ngFor=" let option2 of item.quesDesc">
              <p><span class="input-check"></span>{{option2.option_title}}</p>
            </ng-container>
          </ng-container>
          <ng-container *ngIf="item.quesType == 4">
            <div class="textarea-div"></div>
          </ng-container>
        </div>
        <div class="item-opra" *ngIf="editIndex == i">
          <div (click)="goEdit(i)"><span>编辑</span></div>
          <div (click)="itemUp(i)"><span>上移</span></div>
          <div (click)="itemDown(i)"><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)="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 (click)="release()">
      <img src="./assets/imgs/survey/release.png"> <br>
      <span>发布</span>
    </div>
  </div>
</ion-footer>