Merge branch 'master' into deploy
This commit is contained in:
@@ -5,7 +5,7 @@ import {
|
|||||||
import {
|
import {
|
||||||
parseTime,
|
parseTime,
|
||||||
downloadFile
|
downloadFile
|
||||||
} from '@/utils/index'
|
} from '@/utils'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@@ -57,7 +57,7 @@ export default {
|
|||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
// 请求数据
|
// 请求数据
|
||||||
initData(this.url, this.getQueryParame()).then(data => {
|
initData(this.url, this.getQueryParams()).then(data => {
|
||||||
this.total = data.totalElements
|
this.total = data.totalElements
|
||||||
this.data = data.content
|
this.data = data.content
|
||||||
// time 毫秒后显示表格
|
// time 毫秒后显示表格
|
||||||
@@ -74,7 +74,14 @@ export default {
|
|||||||
beforeInit() {
|
beforeInit() {
|
||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
getQueryParame: function() {
|
getQueryParams: function() {
|
||||||
|
// 清除参数无值的情况
|
||||||
|
Object.keys(this.query).length !== 0 && Object.keys(this.query).forEach(item => {
|
||||||
|
if (this.query[item] === null || this.query[item] === '') this.query[item] = undefined
|
||||||
|
})
|
||||||
|
Object.keys(this.params).length !== 0 && Object.keys(this.params).forEach(item => {
|
||||||
|
if (this.params[item] === null || this.params[item] === '') this.params[item] = undefined
|
||||||
|
})
|
||||||
return {
|
return {
|
||||||
page: this.page,
|
page: this.page,
|
||||||
size: this.size,
|
size: this.size,
|
||||||
|
|||||||
Reference in New Issue
Block a user