<template>
  <wrapper
    fill
    margin
    padding
    background
  >
    <span class="c-sibling-item--v u-font-size--sm u-bold">定时任务</span>
    <div class="c-sibling-item--v l-grid--info mini">
      <button
        class="o-button"
        @click="onOnlineDurationTask"
      >
        在线时长统计
      </button>
      <button
        class="o-button"
        @click="onAdTask"
      >
        自助广告统计
      </button>
    </div>
    <time-task-dialog ref="timeTaskDialog" />
  </wrapper>
</template>

<script>
import TimeTaskDialog from './components/TimeTaskDialog.vue'

export default {
  name: 'PlatformSettings',
  components: {
    TimeTaskDialog
  },
  methods: {
    onOnlineDurationTask () {
      this.$refs.timeTaskDialog.show('device_online_summary')
    },
    onAdTask () {
      this.$refs.timeTaskDialog.show('advertisement_statistic')
    }
  }
}
</script>
