Commit 9bd0a871 authored by 何鹏程's avatar 何鹏程

修改bug

parent af7a963e
...@@ -26,9 +26,13 @@ export const tableDataMixin = { ...@@ -26,9 +26,13 @@ export const tableDataMixin = {
methods: { methods: {
search() { search() {
this.tableData.loading = true this.tableData.loading = true
/* this.pageNum = 1*/
this.getTableData() this.getTableData()
}, },
searchFormSub() {
this.pageNum = 1
// this.pageSize = 10
this.search()
},
handleSizeChange(val) { handleSizeChange(val) {
this.pageNum = 1 this.pageNum = 1
this.pageSize = val this.pageSize = val
...@@ -44,14 +48,20 @@ export const tableDataMixin = { ...@@ -44,14 +48,20 @@ export const tableDataMixin = {
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val this.multipleSelection = val
}, },
tableRowClassName({row, rowIndex}) { tableRowClassName({
row,
rowIndex
}) {
for (let item of this.multipleSelection) { for (let item of this.multipleSelection) {
if (item.id && item.id === row.id) { if (item.id && item.id === row.id) {
return 'selected-row' return 'selected-row'
} }
} }
}, },
handleSortChange({prop, order}) { handleSortChange({
prop,
order
}) {
this.sortName = prop this.sortName = prop
if (order === 'descending') { if (order === 'descending') {
this.sortValue = 'desc' this.sortValue = 'desc'
...@@ -62,15 +72,15 @@ export const tableDataMixin = { ...@@ -62,15 +72,15 @@ export const tableDataMixin = {
}, },
dealTableResponse(res) { dealTableResponse(res) {
this.tableData.loading = false this.tableData.loading = false
if (res && res.msg==201) { if (res && res.msg == 201) {
this.tableData.body = res.respData.list this.tableData.body = res.respData.list
if(this.tableData.body.length==0){ if (this.tableData.body.length == 0) {
this.pagination = false this.pagination = false
}else { } else {
this.pagination = true this.pagination = true
} }
this.pageNum = res.respData.pageNum > 0 ? res.respData.pageNum : 1 this.pageNum = res.respData.pageNum > 0 ? res.respData.pageNum : 1
this.pageSize = res.respData.pageSize ? res.respData.pageSize :10 this.pageSize = res.respData.pageSize ? res.respData.pageSize : 10
this.total = res.respData.total this.total = res.respData.total
} else { } else {
this.$message.error(res.msg) this.$message.error(res.msg)
......
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
<el-button <el-button
type="primary" type="primary"
size="small" size="small"
@click="search" @click="searchFormSub"
>查询</el-button> >查询</el-button>
<el-button <el-button
size="small" size="small"
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<el-button <el-button
type="primary" type="primary"
size="small" size="small"
@click="search" @click="searchFormSub"
>查询</el-button> >查询</el-button>
<el-button <el-button
size="small" size="small"
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
<el-button <el-button
type="primary" type="primary"
size="small" size="small"
@click="search" @click="searchFormSub"
>查询</el-button> >查询</el-button>
<el-button <el-button
size="small" size="small"
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<el-button <el-button
type="primary" type="primary"
size="small" size="small"
@click="search" @click="searchFormSub"
>查询</el-button> >查询</el-button>
<el-button <el-button
size="small" size="small"
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<el-button <el-button
type="primary" type="primary"
size="small" size="small"
@click="search" @click="searchFormSub"
>查询</el-button> >查询</el-button>
<el-button <el-button
size="small" size="small"
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<el-button <el-button
type="primary" type="primary"
size="small" size="small"
@click="search" @click="searchFormSub"
>查询</el-button> >查询</el-button>
<el-button <el-button
size="small" size="small"
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<el-button <el-button
type="primary" type="primary"
size="small" size="small"
@click="search" @click="searchFormSub"
>查询</el-button> >查询</el-button>
<el-button <el-button
size="small" size="small"
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
<el-button <el-button
type="primary" type="primary"
size="small" size="small"
@click="search" @click="searchFormSub"
>查询</el-button> >查询</el-button>
<el-button <el-button
size="small" size="small"
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<el-button <el-button
type="primary" type="primary"
size="small" size="small"
@click="search" @click="searchFormSub"
>查询</el-button> >查询</el-button>
<el-button <el-button
size="small" size="small"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment