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

修改bug

parent af7a963e
......@@ -26,9 +26,13 @@ export const tableDataMixin = {
methods: {
search() {
this.tableData.loading = true
/* this.pageNum = 1*/
this.getTableData()
},
searchFormSub() {
this.pageNum = 1
// this.pageSize = 10
this.search()
},
handleSizeChange(val) {
this.pageNum = 1
this.pageSize = val
......@@ -44,14 +48,20 @@ export const tableDataMixin = {
handleSelectionChange(val) {
this.multipleSelection = val
},
tableRowClassName({row, rowIndex}) {
tableRowClassName({
row,
rowIndex
}) {
for (let item of this.multipleSelection) {
if (item.id && item.id === row.id) {
return 'selected-row'
}
}
},
handleSortChange({prop, order}) {
handleSortChange({
prop,
order
}) {
this.sortName = prop
if (order === 'descending') {
this.sortValue = 'desc'
......@@ -62,15 +72,15 @@ export const tableDataMixin = {
},
dealTableResponse(res) {
this.tableData.loading = false
if (res && res.msg==201) {
if (res && res.msg == 201) {
this.tableData.body = res.respData.list
if(this.tableData.body.length==0){
if (this.tableData.body.length == 0) {
this.pagination = false
}else {
} else {
this.pagination = true
}
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
} else {
this.$message.error(res.msg)
......
......@@ -95,7 +95,7 @@
<el-button
type="primary"
size="small"
@click="search"
@click="searchFormSub"
>查询</el-button>
<el-button
size="small"
......
......@@ -35,7 +35,7 @@
<el-button
type="primary"
size="small"
@click="search"
@click="searchFormSub"
>查询</el-button>
<el-button
size="small"
......
......@@ -47,7 +47,7 @@
<el-button
type="primary"
size="small"
@click="search"
@click="searchFormSub"
>查询</el-button>
<el-button
size="small"
......
......@@ -45,7 +45,7 @@
<el-button
type="primary"
size="small"
@click="search"
@click="searchFormSub"
>查询</el-button>
<el-button
size="small"
......
......@@ -63,7 +63,7 @@
<el-button
type="primary"
size="small"
@click="search"
@click="searchFormSub"
>查询</el-button>
<el-button
size="small"
......
......@@ -45,7 +45,7 @@
<el-button
type="primary"
size="small"
@click="search"
@click="searchFormSub"
>查询</el-button>
<el-button
size="small"
......
......@@ -35,7 +35,7 @@
<el-button
type="primary"
size="small"
@click="search"
@click="searchFormSub"
>查询</el-button>
<el-button
size="small"
......
......@@ -72,7 +72,7 @@
<el-button
type="primary"
size="small"
@click="search"
@click="searchFormSub"
>查询</el-button>
<el-button
size="small"
......
......@@ -63,7 +63,7 @@
<el-button
type="primary"
size="small"
@click="search"
@click="searchFormSub"
>查询</el-button>
<el-button
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