|
@@ -8,7 +8,7 @@
|
|
|
<!-- 搜索项 -->
|
|
|
<el-form :inline="true" class="search-form">
|
|
|
<el-form-item label="数据分级">
|
|
|
- <el-input v-model="keyword"></el-input>
|
|
|
+ <el-input v-model="keyword" clearable></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<dg-button type="primary" @click="handleSearch" icon="el-icon-search">查询</dg-button>
|
|
@@ -19,7 +19,7 @@
|
|
|
<dg-button type="primary" @click="handleImport" icon="el-icon-upload">导入</dg-button>
|
|
|
</el-row>
|
|
|
<!-- 列表 -->
|
|
|
- <dg-table :data="tableList" border row-key="id">
|
|
|
+ <dg-table ref="table" :data="tableList" border row-key="id" paging-type="client">
|
|
|
<dg-table-column type="index" width="75" label="序号"></dg-table-column>
|
|
|
<dg-table-column prop="name" label="代码"></dg-table-column>
|
|
|
<dg-table-column prop="name" label="数据分级"></dg-table-column>
|
|
@@ -44,7 +44,14 @@ export default {
|
|
|
/**
|
|
|
* @description: 查询
|
|
|
*/
|
|
|
- handleSearch() {},
|
|
|
+ handleSearch() {
|
|
|
+ this.$refs.table.paginationOptions.currentPage = 1;
|
|
|
+ if (this.keyword.trim()) {
|
|
|
+ this.tableList = list.filter((item) => item.name.indexOf(this.keyword) > -1);
|
|
|
+ }else {
|
|
|
+ this.tableList = list;
|
|
|
+ }
|
|
|
+ },
|
|
|
/**
|
|
|
* @description: 导入
|
|
|
*/
|