<script setup lang="ts">
    import { ref } from 'vue'
    const queryParams = ref({})
    import PagingComponent from 'components/PagingComponent/index.vue'
    const pageSize = 20
    const pageNumber = 1
    const total: any = 20
    // 获取数据列表
    const getList = () => {
        console.log('获取数据列表***')
    }

    const tableData = [
        {
            date: '2016-05-02',
            name: '123xxx',
            address: '合肥市蜀山区'
        },
        {
            date: '2016-05-02',
            name: '123xxx',
            address: '合肥市蜀山区'
        },
        {
            date: '2016-05-04',
            name: '123xxx',
            address: '合肥市蜀山区'
        },
        {
            date: '2016-05-01',
            name: '123xxx',
            address: '合肥市蜀山区'
        }
    ]
</script>

<template>
    <!-- 订单管理 -->

    <el-form :model="queryParams" :inline="true" label-width="auto" size="small">
        <el-form-item label="订单编号：" prop="menuName">
            <el-input />
        </el-form-item>
        <el-form-item label="创建时间：" prop="menuName">
            <el-input />
        </el-form-item>
        <el-form-item label="状态：" prop="menuName">
            <el-input />
        </el-form-item>
        <el-form-item label="装备类型：" prop="menuName">
            <el-input />
        </el-form-item>
        <el-form-item label="装备名称：" prop="menuName">
            <el-input />
        </el-form-item>
        <el-form-item>
            <el-button type="primary">查询</el-button>
            <el-button type="success">保存</el-button>
        </el-form-item>
    </el-form>

    <!-- 表格 -->
    <el-table
        :data="tableData"
        :header-cell-style="{
            background: '#3E98FF',
            color: '#fff'
        }"
        fit>
        <el-table-column align="center" prop="name" label="订单编号" />
        <el-table-column align="center" prop="address" label="客户单位" />
        <el-table-column align="center" prop="date" label="订单创建日期" />
        <el-table-column align="center" prop="name" label="联系方式" />
        <el-table-column align="center" prop="name" label="装备类型" />
        <el-table-column align="center" prop="name" label="装备名称" />
        <el-table-column align="center" prop="name" label="订单状态" />
        <el-table-column align="center" prop="name" label="操作" width="260px">
            <template #default="{ row }">
                <el-button size="small" type="primary" @click="row">确认</el-button>
                <el-button size="small" type="success">查看</el-button>
                <el-button size="small" type="danger">删除</el-button>
            </template>
        </el-table-column>
    </el-table>
    <PagingComponent
        @getList="getList"
        :pageSize="pageSize"
        :pageNumber="pageNumber"
        :total="total" />
</template>

<style>
    .el-form {
        margin: 15px 0;
    }
</style>
