<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({}, {class: 'modal-65p'})">新增用户标签</a>
        <div class="dropdown-divider"></div>
        <a class="dropdown-item" href="#"
           (click)="pager.optrRecord('weixin/tag/sync.htm', {wx_id: wxDefine.wx_id}, {successMsg:'标签同步完成！', confirmMsg: '确定要和服务器进行标签同步吗？需要比较长时间！', successMsgType:'Swal'}, {RequestWithLoading: true})">同步标签</a>
        <div class="dropdown-divider"></div>
        <a class="dropdown-item" href="#"
           (click)="pager.optrRecord('weixin/tag/sync/all.htm', {wx_id: wxDefine.wx_id}, {successMsg:'用户标签同步完成！', confirmMsg: '确定要和服务器进行所有标签的用户同步吗？需要比较长时间！', successMsgType:'Swal'}, {RequestWithLoading: true})">同步用户</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 class="th-b-3"></th>
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let v of pager.getRecords(); let i = index">
      <td>{{v.tag_id}}</td>
      <td>{{v.tag_name}}</td>
      <td>{{v.std_count}}</td>
      <td>{{v.create_time}}</td>
      <td [innerHTML]="v.tag_status | frameStatus"></td>
      <td>{{v.tag_desc}}</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-info"
              (click)="pager.optrRecord('weixin/tag/sync/user.htm', {wx_id:v.wx_id, tag_id: v.tag_id}, {successMsg:'该标签下用户同步完成！', confirmMsg: '确定要同步该标签下所有用户吗？', successMsgType:'Swal'}, {ResponseWithLoading: true})"><em
          class="fa-lg fas fa-sync-alt"></em></span>

        <span class="table-button ml-3 text-danger"
              (click)="pager.optrRecord('weixin/tag/delete.htm', {wx_id:v.wx_id, tag_id: v.tag_id}, {successMsg:'用户标签成功删除！', confirmMsg: '确定要删除用户标签吗？', successMsgType:'Swal'})"><em
          class="fa-lg fas fa-trash-alt "></em></span>
      </td>
    </tr>
    </tbody>
  </table>
  <frame-pager [url]="'./weixin/tag/page.htm'" [pagerParams]="{wx_id: wxDefine?.wx_id}" #pager></frame-pager>
</div>


