<template>
    <!-- 装备流转记录  -->
    <div class="app-container">
        <el-row>
            <el-form ref="queryForm" size="small" label-width="auto" :model="queryParams">
                <el-row :gutter="10" style="display: flex; justify-content: space-between">
                    <el-col>
                        <el-form-item prop="deptName">
                            <el-input v-model="queryParams.deptName" placeholder="关键字" clearable />
                        </el-form-item>
                    </el-col>
                    <el-col>
                        <el-form-item prop="deptName">
                            <el-input v-model="queryParams.deptName" placeholder="审批状态" clearable />
                        </el-form-item>
                    </el-col>
                    <el-col>
                        <el-form-item prop="deptName">
                            <el-input v-model="queryParams.deptName" placeholder="申请时间" clearable />
                        </el-form-item>
                    </el-col>

                    <el-col style="text-align: right">
                        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">
                            查询
                        </el-button>
                        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
                    </el-col>
                </el-row>
            </el-form>

            <el-table :data="tableData" style="width: 100%">
                <el-table-column align="center" show-overflow-tooltip type="index" label="序号" width="50" />
                <el-table-column align="center" show-overflow-tooltip prop="date" label="申请人" />
                <el-table-column align="center" show-overflow-tooltip prop="name" label="申请时间" />
                <el-table-column align="center" show-overflow-tooltip prop="address" label="装备数量" />
                <el-table-column align="center" show-overflow-tooltip prop="address" label="审批状态" />
                <el-table-column align="center" show-overflow-tooltip prop="address" label="操作" />
            </el-table>
        </el-row>
    </div>
</template>

<script>
export default {
    data() {
        return {
            queryParams: {
                deptName: undefined,
                status: undefined,
            },
            data: [
                {
                    label: '一级 1',
                    children: [
                        {
                            label: '二级 1-1',
                            children: [
                                {
                                    label: '三级 1-1-1',
                                },
                            ],
                        },
                    ],
                },
                {
                    label: '一级 2',
                    children: [
                        {
                            label: '二级 2-1',
                            children: [
                                {
                                    label: '三级 2-1-1',
                                },
                            ],
                        },
                        {
                            label: '二级 2-2',
                            children: [
                                {
                                    label: '三级 2-2-1',
                                },
                            ],
                        },
                    ],
                },
                {
                    label: '一级 3',
                    children: [
                        {
                            label: '二级 3-1',
                            children: [
                                {
                                    label: '三级 3-1-1',
                                },
                            ],
                        },
                        {
                            label: '二级 3-2',
                            children: [
                                {
                                    label: '三级 3-2-1',
                                },
                            ],
                        },
                    ],
                },
            ],
            defaultProps: {
                children: 'children',
                label: 'label',
            },
        }
    },
    methods: {
        handleNodeClick(data) {
            console.log(data)
        },

        // 出库按钮
        onHandleOut() {
            console.log('出库按钮')
            this.$router.push('/equipment-ledger-out')
        },

        // 入库按钮
        onHandleIn() {
            console.log('入库按钮')
            this.$router.push('/equipment-ledger-store')
        },

        // 维修按钮
        onHandleRepair() {
            console.log('维修按钮')
            this.$router.push('/equipment-ledger-repair')
        },

        // 退役按钮
        onHandleRetire() {
            console.log('退役按钮')
            this.$router.push('/equipment-ledger-retire')
        },
    },
}
</script>

<style></style>
