<template>
    <div>
        <el-form :inline="true" :model="formInline" class="demo-form-inline">
            <el-form-item label="日期:">
                <el-date-picker
                    v-model="formInline.date"
                    type="daterange"
                    range-separator="至"
                    start-placeholder="开始日期"
                    end-placeholder="结束日期"
                ></el-date-picker>
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="onSubmit">查询</el-button>
            </el-form-item>
        </el-form>
        <el-table
            stripe
            :cell-style="{ textAlign: 'center' }"
            :header-cell-style="{ textAlign: 'center' }"
            style="width: 100%"
            :data="tableData"
            height="calc(100vh - 205px)"
        >
            <el-table-column prop="date" label="序号" width="180"></el-table-column>
            <el-table-column prop="name" label="操作名称"></el-table-column>
            <el-table-column prop="name" label="操作时间"></el-table-column>
        </el-table>
        <el-pagination class="mt10" align="right" background layout="prev, pager, next" :total="100"></el-pagination>
    </div>
</template>

<script>
export default {
    data() {
        return {
            formInline: {
                date: ''
            },
            tableData: [
                {
                    date: '2016-05-02',
                    name: '王小虎',
                    address: '上海市普陀区金沙江路 1518 弄'
                },
                {
                    date: '2016-05-04',
                    name: '王小虎',
                    address: '上海市普陀区金沙江路 1517 弄'
                },
                {
                    date: '2016-05-01',
                    name: '王小虎',
                    address: '上海市普陀区金沙江路 1519 弄'
                },
                {
                    date: '2016-05-03',
                    name: '王小虎',
                    address: '上海市普陀区金沙江路 1516 弄'
                }
            ],
            tabHeight: 'calc(100vh - 260px)'
        }
    },
    methods: {
        onSubmit() {
            console.log('submit!')
        }
    }
}
</script>
