<template>
  <div class="content">
    <div class="topSearch">
      <div class="left">
        用户搜索：
        <Input style="width:150px" enter-button placeholder="请输入" />
        <span style="margin-left:10px">选择日期：</span>
        <DatePicker
          :value="value2"
          format="yyyy/MM/dd"
          type="daterange"
          placement="bottom-end"
          placeholder="Select date"
          style="width: 200px"
        ></DatePicker>
        <span style="margin-left:10px"> 审核状态：</span>
        <Select style="width: 150px" placeholder="请选择">
          <Option value="beijing">真我币</Option>
          <Option value="shanghai">优惠券</Option>
        </Select>
        <Button type="primary" @click="goDetail">查 询</Button>
        <Button type="primary" ghost>重 置</Button>
      </div>
      <div class="right">
        <Button type="primary">导 出</Button>
      </div>
    </div>
    <Row style="margin:-10px 0 20px 0">
      <Col span="24"
        ><Button type="primary" @click="goDetail">批量通过</Button
        ><Button style="margin-left:20px" type="primary" @click="goDetail"
          >批量拒绝</Button
        ></Col
      >
    </Row>
    <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>
    <Modal
      v-model="modal1"
      title="拒绝"
      @on-ok="ok"
      @on-cancel="cancel"
    >
      <Input v-model="value5" type="textarea" placeholder="请输入退回原因" />
    </Modal>
  </div>
</template>

<script>
import { getScenes, delScenes, editScenes } from "@/api/scenes";
export default {
  name: "categories",
  components: {},
  data() {
    return {
      modal1: true,
      data: [],
      columns: [
        {
          title: "活动日期",
          key: "created_at"
        },
        {
          title: "姓名",
          slot: "name"
        },
        {
          title: "手机号",
          slot: "title"
        },
        {
          title: "图片",
          key: "created_at"
        },
        {
          title: "上传时间",
          slot: "enable"
        },
        {
          title: "审核状态",
          slot: "enable"
        },
        {
          title: "操作",
          slot: "action"
        }
      ]
    };
  },
  methods: {
    goDetail() {
      this.$router.push({ path: "/signIn/detail", query: { id: "new" } });
    }
  },
  mounted() {}
};
</script>

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