mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
added pagination for SpiderList
This commit is contained in:
@@ -220,7 +220,6 @@
|
||||
import {
|
||||
mapState
|
||||
} from 'vuex'
|
||||
import ElUploadDrag from 'element-ui/packages/upload/src/upload-dragger'
|
||||
|
||||
export default {
|
||||
name: 'SpiderList',
|
||||
@@ -270,6 +269,9 @@ export default {
|
||||
}
|
||||
return true
|
||||
})
|
||||
.filter((d, index) => {
|
||||
return (this.pagination.pageSize * (this.pagination.pageNum - 1)) <= index && (index < this.pagination.pageSize * this.pagination.pageNum)
|
||||
})
|
||||
// .filter(d => {
|
||||
// if (!this.filter.keyword) return true
|
||||
// for (let i = 0; i < this.columns.length; i++) {
|
||||
@@ -399,7 +401,7 @@ export default {
|
||||
})
|
||||
},
|
||||
onView (row) {
|
||||
this.$router.push(`/spiders/${row._id}`)
|
||||
this.$router.push('/spiders/' + row._id)
|
||||
this.$st.sendEv('爬虫', '查看')
|
||||
},
|
||||
onPageChange () {
|
||||
@@ -465,7 +467,7 @@ export default {
|
||||
page_size: 100
|
||||
}).then(response => {
|
||||
const data = response.data.items.map(d => {
|
||||
d.value = `${d.name} | ${d.domain}`
|
||||
d.value = d.name + ' | ' + d.domain
|
||||
return d
|
||||
})
|
||||
callback(data)
|
||||
|
||||
Reference in New Issue
Block a user