VUE js 编写带有数据上下排序、表格显示、数组不同的数据过滤
1、页面展示图
列表
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/e5f240ef4c884d76f4e2c9c6bf4cfff5.png)
新增
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/7dff8dfa0112e83f25b8169341375047.png)
选择站点后
2、代码如下
<!--add by sumingyu 2022-03-08 11:48:31 乘车线路。-->
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="80px">
<el-form-item label="线路名称" prop="lineName">
<el-input
v-model.trim="queryParams.lineName"
placeholder="请输入线路名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="站点名称" prop="siteName">
<el-input
v-model.trim="queryParams.siteName"
placeholder="请输入站点名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<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-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>新增</el-button>
<!--v-hasPermi="['config:class:add']"-->
</el-col>
</el-row>
<el-table v-loading="loading" :data="lineList" >
<el-table-column label="线路名称" align="center" prop="lineName" />
<el-table-column label="线路编码" align="center" prop="lineCode" />
<el-table-column label="站点名称" align="center" prop="siteName" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
>修改</el-button>
<!--v-hasPermi="['config:class:edit']"-->
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
>删除</el-button>
<!--v-hasPermi="['config:class:remove']"-->
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改班次对话框 -->
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body class="self-dialog">
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="线路名称" prop="lineName">
<el-input v-model.trim="form.lineName" placeholder="请输入线路名称" maxlength="20" style=