CN-1134 fix:知识库切换展示记录数由20/页切换为50/页时,展示No Date
This commit is contained in:
@@ -105,14 +105,12 @@ export default {
|
|||||||
if (isAll) {
|
if (isAll) {
|
||||||
this.searchLabel = null
|
this.searchLabel = null
|
||||||
} else if (isClearType) {
|
} else if (isClearType) {
|
||||||
// this.searchLabel.tagType = ''
|
|
||||||
this.searchLabel.type = ''// 换新接口需要修改的属性名称
|
this.searchLabel.type = ''// 换新接口需要修改的属性名称
|
||||||
}
|
}
|
||||||
if (params) {
|
if (params) {
|
||||||
this.searchLabel = { ...this.searchLabel, ...params }
|
this.searchLabel = { ...this.searchLabel, ...params }
|
||||||
}
|
}
|
||||||
this.searchLabel = { ...this.searchLabel, ...this.pageObj }
|
this.searchLabel = { ...this.searchLabel, ...this.pageObj }
|
||||||
// this.tableData = []
|
|
||||||
this.isNoData = false
|
this.isNoData = false
|
||||||
this.toggleLoading(true)
|
this.toggleLoading(true)
|
||||||
delete this.searchLabel.total
|
delete this.searchLabel.total
|
||||||
@@ -124,6 +122,11 @@ export default {
|
|||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
this.tableData = response.data.list
|
this.tableData = response.data.list
|
||||||
this.pageObj.total = response.data.total
|
this.pageObj.total = response.data.total
|
||||||
|
if (!this.tableData || this.tableData.length === 0) {
|
||||||
|
this.isNoData = true
|
||||||
|
} else {
|
||||||
|
this.isNoData = false
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
console.error(response)
|
console.error(response)
|
||||||
this.isNoData = true
|
this.isNoData = true
|
||||||
@@ -133,13 +136,10 @@ export default {
|
|||||||
this.$message.error('Something went wrong...')
|
this.$message.error('Something went wrong...')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.isNoData = true
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
this.toggleLoading(false)
|
this.toggleLoading(false)
|
||||||
if (!this.tableData || this.tableData.length === 0) {
|
|
||||||
this.isNoData = true
|
|
||||||
} else {
|
|
||||||
this.isNoData = false
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
del (row) {
|
del (row) {
|
||||||
@@ -217,6 +217,7 @@ export default {
|
|||||||
},
|
},
|
||||||
pageSize (val) {
|
pageSize (val) {
|
||||||
this.pageObj.pageSize = val
|
this.pageObj.pageSize = val
|
||||||
|
this.pageObj.pageNo = 1
|
||||||
localStorage.setItem(storageKey.pageSize + '-' + localStorage.getItem(storageKey.username) + '-' + this.tableId, val)
|
localStorage.setItem(storageKey.pageSize + '-' + localStorage.getItem(storageKey.username) + '-' + this.tableId, val)
|
||||||
this.getTableData()
|
this.getTableData()
|
||||||
},
|
},
|
||||||
@@ -402,7 +403,7 @@ export default {
|
|||||||
this.pageObj.pageSize = pageSize
|
this.pageObj.pageSize = pageSize
|
||||||
}
|
}
|
||||||
const userId = localStorage.getItem(storageKey.userId)
|
const userId = localStorage.getItem(storageKey.userId)
|
||||||
let tableName = dbTableColumnCustomizeConfigPre + '-' + this.tableId
|
const tableName = dbTableColumnCustomizeConfigPre + '-' + this.tableId
|
||||||
let localStorageTableTitle = []
|
let localStorageTableTitle = []
|
||||||
if (indexedDBUtils.selectTable(tableName)) {
|
if (indexedDBUtils.selectTable(tableName)) {
|
||||||
localStorageTableTitle = await indexedDBUtils.selectTable(tableName).get({ id: userId })
|
localStorageTableTitle = await indexedDBUtils.selectTable(tableName).get({ id: userId })
|
||||||
|
|||||||
@@ -316,8 +316,8 @@ export default {
|
|||||||
}
|
}
|
||||||
} else if (formal.indexOf('-') !== -1) {
|
} else if (formal.indexOf('-') !== -1) {
|
||||||
let split2 = formal.split('-')
|
let split2 = formal.split('-')
|
||||||
let startIp = split2[0].replace(/\s+/g, '');
|
let startIp = split2[0].replace(/\s+/g, '')
|
||||||
let endIp = split2[1].replace(/\s+/g, '');
|
let endIp = split2[1].replace(/\s+/g, '')
|
||||||
if (regular.ipv4Range.test(startIp) && regular.ipv4Range.test(endIp)) {
|
if (regular.ipv4Range.test(startIp) && regular.ipv4Range.test(endIp)) {
|
||||||
// ipv4对比大小
|
// ipv4对比大小
|
||||||
if (!(regular.compareIP4(startIp) <= regular.compareIP4(endIp))) {
|
if (!(regular.compareIP4(startIp) <= regular.compareIP4(endIp))) {
|
||||||
|
|||||||
Reference in New Issue
Block a user