
<ion-content>

  <!-- <h1>科室</h1>
  <ion-input  [value]="keshi" placeholder="请输入科室" (ionInput)="keshiInput($event)"></ion-input> -->

  <!-- 文本域：生成提示词 -->
  <!-- <h1>症状的描述</h1>
  <ion-textarea [value]="userPrompt" placeholder="请描述您的症状" (ionInput)="promptInput($event)" autoGrow="true"></ion-textarea> -->
  
  <!-- 按钮：执行消息生成函数 -->
  <!-- <ion-button (click)="sendMessage()" expand="block">初步诊断</ion-button> -->
  
  <!-- 展示：返回消息内容 -->
  <!-- 消息传输过程中，实时预览 -->
  <!-- @if(!isComplete){
    <div>{{responseMsg}}</div>
  } -->
  
  <!-- 消息传输完成后，实时预览Markdown格式 -->
  <!-- @if(isComplete){
    <fm-markdown-preview class="content-style" [content]="responseMsg"></fm-markdown-preview>
  } -->
  <ion-button (click)="doInqueryTask()">执行问诊任务集</ion-button>
  <ul>
    @for(step of taskList;track step.title;){
      <div>
        <!-- 待开始 -->
        @if(step.progress==0 && !step.error){
          <ion-icon name="radio-button-off-outline"></ion-icon>
        }
        <!-- 进行中 -->
        @if(step.progress!=0 && step.progress!=1){
          <ion-icon name="reload-outline"></ion-icon>
        }
        <!-- 已完成 -->
        @if(step.progress==1){
          <ion-icon name="checkmark-circle-outline"></ion-icon>
        }
        <!-- 已出错 -->
        @if(step.error){
          <ion-icon name="close-circle-outline"></ion-icon>
        }
        {{step.title}}  
        @if(step.progress){
          <span>{{step.progress * 100 | number:"2.0-0"}}%</span>
        }
  
        @if(step.error){
          <span style="color:red;">{{step.error}}</span>
        }
      </div>   
    }
    </ul>
    <!-- 问诊报告生成结果 -->
    @if(shareData.diagResult){
      <h1>{{shareData.diagResult.title}}</h1>
      <h2>{{shareData.diagResult.desc}}</h2>
      <p>{{shareData.diagResult.content}}</p>
    }
  
</ion-content>