<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 modal-lg" role="menu">
        <a class="dropdown-item" href="#"
           (click)="pager.optrRecord('weixin/menu/reset.htm', {wx_id: wxDefine.wx_id}, {successMsg:'微信菜单初始化完成！', confirmMsg: '确定要初始化该微信的菜单吗？原有菜单配置将被覆盖', successMsgType:'Swal'})">初始化菜单</a>
        <div class="dropdown-divider"></div>
        <a class="dropdown-item" href="#"
           (click)="makeMenuFromConfig()">配置生成菜单</a>
        <div class="dropdown-divider"></div>
        <a class="dropdown-item" href="#"
           (click)="makeMenuFromServer()">从服务器获取菜单</a>
        <div class="dropdown-divider"></div>
        <a class="dropdown-item text-danger" href="#"
           (click)="deleteMenu()">删除主菜单</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">Key</th>
      <th style="width:100px">Menu PID</th>
      <th style="width:140px">菜单文本</th>
      <th style="width:120px">菜单类型</th>
      <th>菜单参数</th>
      <th style="width:120px">菜单状态</th>
      <th class="th-b-1"></th>
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let v of pager.getRecords(); let i = index">
      <td>{{v.menu_key}}</td>
      <td>{{v.menu_pid}}</td>
      <td>{{v.menu_text}}</td>
      <td>{{v.menu_type | frameDict : 'WeixinMenuType'}}</td>
      <td>{{v.menu_param}}</td>
      <td [innerHTML]="v.menu_status | frameStatus"></td>
      <td><span class="table-button" (click)="showModal({ResponseEntity:v})"><em
        class="fa-lg fas fa-edit"></em></span>
      </td>
    </tr>
    </tbody>
  </table>
  <frame-pager [url]="'./weixin/menu/page.htm'" [pagerParams]="{wx_id: wxDefine?.wx_id}" #pager
               [autoRequest]="false"></frame-pager>
</div>


