<template>
  <div class="temp-list clear">
    <el-row>
      <div class="temp-button fr">
        <el-button type="text">重置</el-button>
        <el-button type="primary">查询</el-button>
      </div>
    </el-row>

    <el-form :inline="true" :model="form" class="demo-form-inline" style="min-width:1480px;">
      <el-row class="temp-input">
        <el-col :span="10">
          <el-form-item label="推送名称:">
            <el-input v-model="form.user" placeholder="审批人"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="14">
          <el-form-item label="活动时间">
            <el-date-picker type="date" placeholder="选择日期" v-model="form.date1"></el-date-picker>
            <span class="line time-line" :span="2">-</span>
            <el-time-picker type="fixed-time" placeholder="选择时间" v-model="form.date2"></el-time-picker>
          </el-form-item>
        </el-col>
      </el-row>

      <el-row class="temp-input">
        <el-col :span="10">
          <el-form-item label="活动时间">
            <el-date-picker type="date" placeholder="选择日期" v-model="form.date1"></el-date-picker>
            <span class="line time-line" :span="2">-</span>
            <el-time-picker type="fixed-time" placeholder="选择时间" v-model="form.date2"></el-time-picker>
          </el-form-item>
        </el-col>
        <el-col :span="14">
          <el-form-item label="推送名称:">
            <el-select v-model="value" placeholder="请选择">
              <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>

    <el-table :data="dataList">
      <el-table-column prop="id" label="推送名称" width="140">
      </el-table-column>
      <el-table-column prop="push_state" label="推送类型" width="120">
      </el-table-column>
      <el-table-column label="推送时间">
        <template slot-scope="scope">
          {{scope.row.push_time | fomatDate}}
        </template>
      </el-table-column>
      <el-table-column prop="title" label="推送范围">
      </el-table-column>
      <el-table-column prop="title" label="推送人数">
      </el-table-column>
      <el-table-column prop="title" label="推送成功人数">
      </el-table-column>
      <el-table-column prop="title" label="创建消息节点">
      </el-table-column>
      <el-table-column prop="title" label="推送进度">
      </el-table-column>
    </el-table>
  </div>

</template>
<script>
export default {
  data () {
    return {
      input: '',
      value6: '',
      dataList: [],
      form: {
        name: '',
        region: ''
      },
      options: [
        {
          value: '选项1',
          label: '黄金糕'
        },
        {
          value: '选项2',
          label: '双皮奶'
        },
        {
          value: '选项3',
          label: '蚵仔煎'
        },
        {
          value: '选项4',
          label: '龙须面'
        },
        {
          value: '选项5',
          label: '北京烤鸭'
        }
      ],
      value: ''
    }
  },
  created () {
    this.getDataList()
  },
  methods: {
    getDataList () {
      this.axios.get('http://rap2api.taobao.org/app/mock/115626/getTemplateList').then(res => {
        if (res && res.data && res.data.data) {
          const { dataList } = res.data.data
          this.dataList = dataList
        }
      })
    }
  }
}
</script>
<style lang="stylus" scoped>
>>>.el-input__inner
  min-width 220px
.temp-list
  .temp-button
    height 50px
    width 120px
.time-line
  margin-left 20px
  margin-right 20px
</style>

{
  "dataList": [
    {
      "name": "sdfsdf",
      "template": "微信营销",
      "time": "2018-10-18 17:20:47",
      "type": "全体推送",
      "state": "推送ing",
      "num": "23",
      "suc": "0",
      "node": "测试组商户",
      "result": "推送chenggong"
    },
    {
      "name": "sdfsdf",
      "template": "微信营销",
      "time": "2018-10-18 17:20:47",
      "type": "全体推送",
      "state": "推送ing",
      "num": "23",
      "suc": "0",
      "node": "测试组商户",
      "result": "推送chenggong"
    },
    {
      "name": "sdfsdf",
      "template": "微信营销",
      "time": "2018-10-18 17:20:47",
      "type": "全体推送",
      "state": "推送ing",
      "num": "23",
      "suc": "0",
      "node": "测试组商户",
      "result": "推送chenggong"
    }
  ]
}
