<template>
  <div>
      <div class="auto">
        <label>{{f_user_name}}日流量列表</label>
        <button type="button" class="btn btn-default" @click="this.$back('asd')">&lt;&lt;</button>
      </div>
      <data-grid :model="model" partial='list' v-ref:grid>
        <template partial='head'>
          <tr>
            <th>日期</th>
            <th>流量Mb</th>
          </tr>
        </template>
        <template partial='body'>
          <td>{{row.f_datetime}}</td>
          <td>{{row.f_traffic}}</td>
        </template>
      </data-grid>
    </criteria-paged>
  </div>
</template>

<script>
import { PagedList } from 'vue-client'
import * as Util from '../Util'
import co from 'co'

let fetchDailyTrafficList = function * (self) {
    let result = yield self.$post('api/af-safecheck/sql/日流量明细?pageNo=1&pageSize=9999', {
        data: {
            f_userinfoid: self.f_userinfoid,
            f_user_name: self.f_user_name,
            f_ym: self.f_ym
        }
    }, {
        resolveMsg: null,
        rejectMsg: '提取任务出错'
    })
    self.$set("model.rows", result.data)
}

export default {
  title: '日流量明细',
  props: ['f_userinfoid', 'f_user_name', 'f_ym'],
  data() {
    return {
      model: {
        rows: []
      }
    }
  },
  ready () {
    let fp = fetchDailyTrafficList(this)
    co(fp)
  }
}
</script>
