<template>
    <div class="monitor-weibo">
      <el-table ref="refMonitorTable"
        :data-read-url="accountData"
        class="dimensionality-table"
        :page-size="20"
        tooltip-effect="dark">
       <el-table-column type="index" width="60" align="center" label="序号"></el-table-column>
        <el-table-column label="账号名称" width="180">
          <template slot-scope="scope">
            <img :src="`assets/images/socialmedia/${scope.row.PCode.toLowerCase()}-logo-18x18.png`" onerror="this.src='assets/images/picture404-'+((row.ID||row.$index) % 4)+'.png';" :title="scope.row.MName" /> {{scope.row.MName}}
          </template>
        </el-table-column>
        <el-table-column prop="name" header-align="center" label="token信息">
          <el-table-column prop="starDate" label="生效时间" align="center"></el-table-column>
          <el-table-column prop="endDate" label="失效时间" align="center"></el-table-column>
          <el-table-column prop="validity" label="有效期" align="center"></el-table-column>
          <el-table-column prop="attitudesCount" label="当天调用次数" align="center">
            <template slot-scope="scope">
              <span :class="{'icon-danger': scope.row.attitudesCount > 90}">{{scope.row.attitudesCount ? scope.row.attitudesCount : 0}}</span>
            </template>
          </el-table-column>
          <el-table-column prop="attitudesCount" label="每日次数限制" align="center">
            <template>
              100
            </template>
          </el-table-column>
        </el-table-column>
      </el-table>
    </div>
</template>
<script>
export default {
  methods: {
    // 刷新表格数据
    refresh() {
      this.$refs.refMonitorTable.getData()
    },
    accountData() {
      return ['/mediamonitor/weibo', {params: {}}]
    }
  }
}
</script>
<style>

</style>
