<div class="TaskTypeManagement">
  <div class="taskType">
    <div class="title">通知类型</div>
    <div class="taskTypes">
      <overlay-scrollbars #osComponentRef1 [ngStyle]="{ height:'100%' }">
        <div>
          <div class="item" *ngFor="let data of allTaskType" (click)="itemChoice(data)"
            [ngClass]="{'itemChoice':allTaskTypeShow == data.taskName}" [title]="data.taskName">
            {{data.taskName}}</div>
        </div>
      </overlay-scrollbars>
    </div>
  </div>
  <div class="taskTypeInfo">
    <div class="top" id="itemDes">
      <div *ngFor="let tab of tabs" class="item" (click)="tabModal(tab.role)" [ngClass]="{'items':tabModalName == tab.role}" [ngStyle]="{'pointer-events': allTaskType.length ? 'auto' : 'none'}">
        {{tabNames[tab.role]}}
      </div>
    </div>
    <div class="list" *ngIf="!taskTypeLoading && allTaskType.length">
      <ng-container *ngFor="let tab of tabs">
        <div *ngIf="tabModalName == tab.role">
					<div class="tabContent" *ngIf="currentChoice.id != 1">
					  <label class="tabContent_checkbox label">发送时间</label>
					  <div class="tabContent_textarea">
							<nz-time-picker [(ngModel)]="tab.sendTime" nzFormat="HH:mm" nzPlaceHolder="发送时间"></nz-time-picker>
					  </div>
					</div>
					
          <div class="tabContent">
            <label class="tabContent_checkbox" nz-checkbox [(ngModel)]="tab.phoneFlag">短信通知内容</label>
            <div class="tabContent_textarea">
              <textarea rows="4" nz-input [(ngModel)]="tab.phoneContent"></textarea>
              <p>字段：[$变量名称$]可添加<span *ngFor="let item of variableNames; let last = last;" (click)="writeIn(tab, item, $event, 'phoneContent')"><strong>{{item}}</strong><em *ngIf="!last">、</em><em *ngIf="last">。</em></span></p>
            </div>
          </div>

          <div class="tabContent">
            <label class="tabContent_checkbox" nz-checkbox [(ngModel)]="tab.wechatFlag">微信通知内容</label>
            <div class="tabContent_textarea">
              <textarea rows="4" nz-input [(ngModel)]="tab.wechatContent"></textarea>
              <p>字段：[$变量名称$]可添加<span *ngFor="let item of variableNames; let last = last;" (click)="writeIn(tab, item, $event, 'wechatContent')"><strong>{{item}}</strong><em *ngIf="!last">、</em><em *ngIf="last">。</em></span></p>
            </div>
          </div>
					
					<div class="tabContent">
					  <label class="tabContent_checkbox" nz-checkbox [(ngModel)]="tab.outsideFlag">站外消息通知</label>
					</div>
					
					<div class="tabContent">
					  <label class="tabContent_checkbox">自定义标题</label>
					  <div class="tabContent_textarea">
					    <input rows="4" nz-input [(ngModel)]="tab.outsideTitle"/>
					    <p>字段：[$变量名称$]可添加<span *ngFor="let item of variableNames; let last = last;" (click)="writeIn(tab, item, $event, 'outsideTitle')"><strong>{{item}}</strong><em *ngIf="!last">、</em><em *ngIf="last">。</em></span></p>
					  </div>
					</div>
					
					<div class="tabContent">
					  <label class="tabContent_checkbox">消息内容</label>
					  <div class="tabContent_textarea">
					    <textarea rows="4" nz-input [(ngModel)]="tab.outsideContent"></textarea>
					    <p>字段：[$变量名称$]可添加<span *ngFor="let item of variableNames; let last = last;" (click)="writeIn(tab, item, $event, 'outsideContent')"><strong>{{item}}</strong><em *ngIf="!last">、</em><em *ngIf="last">。</em></span></p>
					  </div>
					</div>
        </div>
      </ng-container>

      <div class="bottom">
        <button class="login-form-button" nzType="primary" [nzLoading]="loading5" nz-button (click)="submitForm()"
          *ngIf="coopBtns.edit">保存</button>
      </div>
    </div>
    <div class="list" *ngIf="!taskTypeLoading && !allTaskType.length">
      <div class="loadingFull display_flex justify-content_flex-center align-items_center">
        <div class="loadingFullInner">
          <nz-empty></nz-empty>
        </div>
      </div>
    </div>
    <div class="list" *ngIf="taskTypeLoading">
      <div class="loadingFull display_flex justify-content_flex-center align-items_center">
        <div class="loadingFullInner">
          <img src="../../../assets/images/loading.gif" alt="">
          <div>加载中...</div>
        </div>
      </div>
    </div>
  </div>
</div>

<!-- 操作成功/失败提示框 -->
<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
  [info]="errorInfo"></app-prompt-modal>

