<div class="content-heading  justify-content-between">
  <div>消息模版管理</div>
  <div class="float-right">
    <div class="btn-group mb-1 mr-1" dropdown>
      <button class="btn dropdown-toggle btn-secondary btn-lg" type="button" dropdownToggle>消息模版管理
        <span class="caret"></span>
      </button>
      <div *dropdownMenu class="dropdown-menu" role="menu">
        <a class="dropdown-item" href="#" (click)="showModal()">新增模版</a>
        <div class="dropdown-divider"></div>
        <a class="dropdown-item" href="#" (click)="pager.optrRecord('weixin/template/sync.htm', {wx_id: wxDefine.wx_id}, {successMsg:'消息模版同步完成！', confirmMsg: '确定要和服务器进行消息模版同步吗？需要比较长时间！', successMsgType:'Swal'}, {RequestWithLoading: true})">同步消息模版</a>
        <div class="dropdown-divider"></div>
        <a class="dropdown-item text-danger" href="#" (click)="pager.optrRecord('weixin/template/delete/all.htm', {wx_id: wxDefine.wx_id}, {successMsg:'服务器模版已经全部删除！', confirmMsg: '确定要删除服务器所有模版吗？需要比较长时间！', successMsgType:'Swal'}, {RequestWithLoading: true})">删除服务器模版</a>
        <div class="dropdown-divider"></div>
        <a class="dropdown-item text-danger" href="#" (click)="pager.optrRecord('weixin/template/reload.htm', {wx_id: wxDefine.wx_id}, {successMsg:'系统运行模版已重新加载！', confirmMsg: '确定要重新加载模版吗！', successMsgType:'Swal'}, {RequestWithLoading: true})">重载消息模版</a>
        <div class="dropdown-divider"></div>
        <a class="dropdown-item text-primary" href="#" (click)="showSend()">发送模版消息</a>

      </div>
    </div>
  </div>
</div>
<div class=" table-responsive bg-white">
  <table class="table table-striped table-hover table-bordered">
    <thead>
    <tr>
      <th class="th-index">#</th>
      <th>模版名称</th>
      <th>消息抬头</th>
      <th>模版编号</th>
      <th>是否使用</th>
      <th>嵌入业务</th>
      <th>同步时间</th>
      <th>全局编号</th>
      <th class="th-b-2"></th>
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let v of pager.getRecords(); let i = index">
      <td>{{i + 1}}</td>
      <td>{{v.template_name}}</td>
      <td>{{v.title_note}}</td>
      <td>{{v.template_code}}</td>
      <td [innerHTML]="v.template_status | frameStatus"></td>
      <td>{{v.business_type | frameDict: 'GobalBusinessType'}}</td>
      <td>{{v.sync_time}}</td>
      <td>{{v.template_value}}</td>
      <td><span class="table-button" (click)="showModal({ResponseEntity:v})"><em
        class="fa-lg fas fa-edit"></em></span>
        <span class="table-button ml-3 text-danger"
              (click)="pager.optrRecord('weixin/template/delete.htm', {wx_id:v.wx_id, template_id: v.template_id}, {successMsg:'消息模版成功删除！', confirmMsg: '确定要删除消息模版吗？', successMsgType:'Swal'})"><em
          class="fa-lg fas fa-trash-alt "></em></span>
      </td>
    </tr>
    </tbody>
  </table>
  <frame-pager [url]="'./weixin/template/page.htm'" [pagerParams]="{wx_id: wxDefine?.wx_id}" #pager></frame-pager>
</div>


