index.vue 1.55 KB
<template>
<div style="margin:40px">
  <el-form :inline="true" :model="formInline" class="demo-form-inline">
    <el-form-item label="航班号">
      <el-input v-model="formInline.flyNum" placeholder="航班号"></el-input>
    </el-form-item>
    <el-form-item>
      <el-button type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button>
    </el-form-item>
  </el-form>
  <el-button style="margin-bottom:20px" type="primary" icon="el-icon-plus">添加</el-button>
  <el-table
    :data="flyList"
    style="width: 800px"
    >
    <el-table-column
      prop="flyNum"
      label="航班号"
      >
    </el-table-column>
    <el-table-column
      label="操作"
      >
    </el-table-column>
  </el-table>
  <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="currentPage"
      :page-sizes="[10, 20, 30, 40]"
      :page-size="10"
      layout="prev, pager, next, jumper, sizes, total"
      :total="total"
      background
      style="margin-top:40px">
    </el-pagination>
</div>
</template>

<script>
  export default {
    data() {
      return {
        formInline: {
          flyNum: ''
        },
        flyList:[],
        currentPage:1,
        total:0
      }
    },
    methods: {
      onSubmit() {
        console.log('submit!');
      },
      handleSizeChange(val) {
        console.log(`每页 ${val} 条`);
      },
      handleCurrentChange(val) {
        console.log(`当前页: ${val}`);
      },
      getAll(){
        
      }
    },
    created:{

    }
  }
</script>