|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div id="warrant-manage" class="page-list">
|
|
|
- <ListHeader title="数据列表"/>
|
|
|
+ <ListHeader title="数据列表" @search="val=>handleSearch(val)"/>
|
|
|
<div class="list-main">
|
|
|
<el-table :data="tableData.value" ref="table" class="table-default" id="table-list" stripe>
|
|
|
<el-table-column type="index" :index="indexCreate" label="序号" min-width="50"/>
|
|
@@ -52,7 +52,7 @@ onMounted(() => {
|
|
|
|
|
|
const currentPage = ref(1)
|
|
|
const pageSize = ref(10)
|
|
|
-const quickSearch = ref("{\"name\":null}")
|
|
|
+const quickSearch = reactive({name:''})
|
|
|
const tableTotal = ref(20)
|
|
|
|
|
|
function pagi_changePage(page) {
|
|
@@ -63,9 +63,12 @@ function pagi_changePage(page) {
|
|
|
function indexCreate(index) {
|
|
|
return index + 1 + pageSize.value*(currentPage.value - 1)
|
|
|
}
|
|
|
-
|
|
|
+function handleSearch (val){
|
|
|
+ quickSearch.name=val
|
|
|
+ getData()
|
|
|
+}
|
|
|
function getData(page, size) {
|
|
|
- WarrantManageList(currentPage.value, pageSize.value, quickSearch.value).then(res => {
|
|
|
+ WarrantManageList(currentPage.value, pageSize.value, quickSearch).then(res => {
|
|
|
tableData.value = res.data.records
|
|
|
tableTotal.value = res.data.total
|
|
|
for (let data of tableData.value) {
|