|
|
@@ -313,6 +313,7 @@ export const indexMixin = {
|
|
|
// 查询数据
|
|
|
this._getData(params).then(res => {
|
|
|
if (res && res.code === this.$config.SUCCESS_CODE) {
|
|
|
+ let isDataDetail = false;
|
|
|
this.searchInfo = res.data; // 记录返回的实体,返回较多的数据,可能会用到
|
|
|
this.tableData = res.data.list;
|
|
|
// 如果list没有值,可能就是data返回
|
|
|
@@ -321,9 +322,13 @@ export const indexMixin = {
|
|
|
}
|
|
|
if (!this.tableData && res.data && Array.isArray(res.data.detail)) {
|
|
|
this.tableData = res.data.detail;
|
|
|
+ isDataDetail = true;
|
|
|
}
|
|
|
if (params.currentPage == 1) {
|
|
|
this.pageInfo.total = res.data.total
|
|
|
+ if (isDataDetail){
|
|
|
+ this.pageInfo.total = res.data.detail.length;
|
|
|
+ }
|
|
|
this.pageInfo.currentPage = 1;
|
|
|
}
|
|
|
this.loading = false
|