<template>
  <div class="content">
    <div class="topSearch">
      <div class="left">
        选择日期：
         <DatePicker :value="value2" format="yyyy/MM/dd" type="daterange" placement="bottom-end" placeholder="Select date" style="width: 200px"></DatePicker>
         <Button  type="primary" @click="goDetail">查 询</Button>
          <Button type="primary" ghost>重 置</Button>
      </div>
      <div class="right">
        <Button  type="primary">导 出</Button>
      </div>
    </div>
      <Table :loading="$store.state.app.isLoading" border ref="selection" :columns="columns" :data="data">
      <template slot-scope="{ row }" slot="name">
        <span>{{ row.details.name }}</span>
      </template>
      <template slot-scope="{ row }" slot="title">
        <span>{{ row.details.title }}</span>
      </template>
      <template slot-scope="{ row }" slot="created_at">
        <span>{{ row.created_at | format}}</span>
      </template>
      <template slot-scope="{ row }" slot="enable">
        <i-switch
          :value="row.is_enable === 1 ? true : false"
          @on-change="
            value => {
              change(value, row);
            }
          "
        />
      </template>
      <template slot-scope="{ row }" slot="action">
        <a @click="edit(row)">编辑</a>
      </template>
      <template slot-scope="{ row }" slot="edit">
        <a @click="goTheme(row)">编辑</a>
      </template>
    </Table>
  </div>
</template>

<script>
import { getScenes, delScenes, editScenes } from '@/api/scenes'
export default {
  name: 'categories',
  components: {

  },
  data () {
    return {
      data: [],
      columns: [
        {
          title: '活动日期',
          key: 'created_at'
        },
        {
          title: '可获取真我币',
          slot: 'name'
        },
        {
          title: '浏览人数',
          slot: 'title'
        },
        {
          title: '签到人数',
          key: 'created_at'
        },
        {
          title: '操作',
          slot: 'action'
        }
      ]
    }
  },
  methods: {
    goDetail () {
      this.$router.push({ path: '/signIn/detail', query: { id: 'new' } })
    }
  },
  mounted () {

  }
}
</script>

<style lang="less"></style>
