Browse Source

管理库分页问题

master
xuhuajiao 3 months ago
parent
commit
7f79015810
  1. 1
      src/views/archivesManage/managementLibrary/anjuan/tableList.vue
  2. 16
      src/views/archivesManage/managementLibrary/file/index.vue
  3. 11
      src/views/archivesManage/managementLibrary/index.vue
  4. 16
      src/views/archivesManage/managementLibrary/juannei/index.vue
  5. 17
      src/views/archivesManage/managementLibrary/mixins/index.js
  6. 15
      src/views/archivesManage/managementLibrary/project/index.vue
  7. 1
      src/views/collectReorganizi/collectionLibrary/anjuan/tableList.vue
  8. 8
      src/views/collectReorganizi/collectionLibrary/index.vue
  9. 12
      src/views/collectReorganizi/collectionLibrary/mixins/index.js
  10. 3
      src/views/fourTestReport/index.vue

1
src/views/archivesManage/managementLibrary/anjuan/tableList.vue

@ -295,6 +295,7 @@ export default {
if (timeDiff < 300 && distance < 10) {
this.timer = setTimeout(() => {
this.parentId = row.id
localStorage.removeItem('currentPageSize')
this.openJuannei('所属' + this.title + ':' + row.archive_no, this.parentId)
}, 300)
this.selections = this.crud.selections

16
src/views/archivesManage/managementLibrary/file/index.vue

@ -32,7 +32,7 @@
<el-table-column type="selection" width="55" :reserve-selection="true" align="center" />
<el-table-column label="序号" width="55" align="center" show-overflow-tooltip>
<template slot-scope="scope">
<span>{{ (page.page === 1 ? 0 : (page.page === 0 ? 0 : page.page - 1)) * page.size + scope.$index + 1 }}</span>
<span>{{ page.page * page.size + scope.$index + 1 }}</span>
</template>
</el-table-column>
<!-- <el-table-column type="index" label="序号" width="55" align="center" /> -->
@ -82,7 +82,7 @@
<!--分页组件-->
<el-pagination
v-if="fileData.length !== 0"
:current-page="page.page"
:current-page="currentPage"
:total="page.total"
:page-size="page.size"
:pager-count="5"
@ -136,7 +136,8 @@ export default {
isAjNo: 0,
selections: [],
showCoverVisible: false,
previewSrc: null
previewSrc: null,
currentPage: 1
}
},
computed: {
@ -162,6 +163,7 @@ export default {
this.getViewTable(categoryLevel, parentId, type)
},
closeDrawer() {
localStorage.removeItem('currentPageSize')
this.fileDrawer = false
if (this.selectedCategory.arrangeType === 1) {
this.$parent.parentsAnjuanId = null
@ -209,16 +211,18 @@ export default {
this.selections = selection
},
handleSizeChange(size) {
this.currentPage = 1
this.page.size = size
this.page.page = 1
this.page.page = 0
if (this.selectedCategory.arrangeType === 1) {
this.getViewTable(4, this.parentsData.parentsAnjuanId)
} else {
this.getViewTable(4, this.parentsData.parentsJuanneiId)
}
},
handleCurrentPage(val) {
this.page.page = val
handleCurrentPage(pageVal) {
this.currentPage = pageVal
this.page.page = pageVal - 1
if (this.selectedCategory.arrangeType === 1) {
this.getViewTable(4, this.parentsData.parentsAnjuanId)
} else {

11
src/views/archivesManage/managementLibrary/index.vue

@ -400,6 +400,7 @@ export default {
if (this.selectedCategory.arrangeType === 3) {
const tablistEle = this.$refs.projectEle
tablistEle.page.page = 0
tablistEle.currentPage = 0
//
if (isQuickFilter) {
tablistEle.$refs.collectHeaderRef.getInitArchivesClass()
@ -411,6 +412,7 @@ export default {
} else if (this.selectedCategory.arrangeType === 2) {
const tablistEle = this.$refs.anjuanEle.$refs.ajContent.$refs.tableList
tablistEle.page.page = 0
tablistEle.currentPage = 1
//
if (isQuickFilter) {
tablistEle.$refs.collectHeaderRef.getInitArchivesClass()
@ -422,6 +424,7 @@ export default {
} else if (this.selectedCategory.arrangeType === 1) {
const tablistEle = this.$refs.anjuanEle.$refs.ajContent.$refs.tableList
tablistEle.page.page = 0
tablistEle.currentPage = 1
//
if (isQuickFilter) {
tablistEle.$refs.collectHeaderRef.getInitArchivesClass()
@ -627,7 +630,7 @@ export default {
this.$refs.anjuanEle.$refs.ajContent.activeIndex = 0
}
this.$nextTick(() => {
this.$refs.anjuanEle.$refs.ajContent.$refs.tableList.page.page = 1
this.$refs.anjuanEle.$refs.ajContent.$refs.tableList.page.page = 0
this.$refs.anjuanEle.$refs.ajContent.$refs.tableList.getCommonData(2, this.parentsProjectId)
this.$refs.anjuanEle.$refs.ajContent.test = data
})
@ -637,7 +640,7 @@ export default {
if (this.selectedCategory.arrangeType === 1 || (this.selectedCategory.arrangeType === 3 && this.$refs.anjuanEle.$refs.ajContent.activeIndex === 1) || (this.selectedCategory.arrangeType === 2 && this.$refs.anjuanEle.$refs.ajContent.activeIndex === 1)) {
this.$refs.fileEle.fileDrawer = true
this.$nextTick(() => {
this.$refs.fileEle.page.page = 1
this.$refs.fileEle.page.page = 0
this.$refs.fileEle.getCommonData(4, this.parentsAnjuanId)
this.$refs.fileEle.test = data
this.$refs.fileEle.isAjNo = 1
@ -646,7 +649,7 @@ export default {
} else {
this.$refs.juanneiEle.juanneiDrawer = true
this.$nextTick(() => {
this.$refs.juanneiEle.page.page = 1
this.$refs.juanneiEle.page.page = 0
this.$refs.juanneiEle.getCommonData(3, this.parentsAnjuanId)
this.$refs.juanneiEle.test = data
this.$refs.fileEle.isAjNo = 0
@ -657,7 +660,7 @@ export default {
this.parentsJuanneiId = parentId
this.$refs.fileEle.fileDrawer = true
this.$nextTick(() => {
this.$refs.fileEle.page.page = 1
this.$refs.fileEle.page.page = 0
this.$refs.fileEle.getCommonData(4, this.parentsJuanneiId)
this.getIsAuthByLookType(this.parentsJuanneiId)
this.$refs.fileEle.test = data

16
src/views/archivesManage/managementLibrary/juannei/index.vue

@ -32,7 +32,7 @@
<el-table-column type="selection" width="55" :reserve-selection="true" align="center" />
<el-table-column label="序号" width="55" align="center" show-overflow-tooltip>
<template slot-scope="scope">
<span>{{ (page.page === 1 ? 0 : (page.page === 0 ? 0 : page.page - 1)) * page.size + scope.$index + 1 }}</span>
<span>{{ page.page * page.size + scope.$index + 1 }}</span>
</template>
</el-table-column>
<!-- <el-table-column type="index" label="序号" width="55" align="center" /> -->
@ -105,7 +105,7 @@
<!--分页组件-->
<el-pagination
v-if="junneiData.length !== 0"
:current-page="page.page"
:current-page="currentPage"
:total="page.total"
:page-size="page.size"
:pager-count="5"
@ -161,6 +161,7 @@ export default {
test: '',
selections: [],
parentId: null,
currentPage: 1,
mousedownTime: 0,
mousedownX: 0,
mousedownY: 0
@ -211,6 +212,7 @@ export default {
closeDrawer() {
this.juanneiDrawer = false
this.$parent.parentsAnjuanId = null
this.$parent.parentsAnjuanRow = null
},
rowKey(row) {
return row.id
@ -290,12 +292,16 @@ export default {
this.selections = selection
},
handleSizeChange(size) {
this.currentPage = 1
this.page.size = size
this.page.page = 1
this.page.page = 0
localStorage.setItem('currentPageSize', size)
this.getViewTable(3, this.parentsData.parentsAnjuanId)
},
handleCurrentPage(val) {
this.page.page = val
handleCurrentPage(pageVal) {
this.currentPage = pageVal
this.page.page = pageVal - 1
localStorage.setItem('currentPage', JSON.stringify(this.page.page))
this.getViewTable(3, this.parentsData.parentsAnjuanId)
}
}

17
src/views/archivesManage/managementLibrary/mixins/index.js

@ -41,8 +41,22 @@ export const manageLibraryCrud = {
this.fixedStatusBar = val
localStorage.setItem('statusBarFixedType', val)
},
hasValue(obj) {
for (const key in obj) {
if (obj.hasOwnProperty(key) && obj[key] !== null && obj[key] !== '') {
return true
}
}
return false
},
handleSearch(categoryLevel) {
console.log('selectStatus', this.selectStatus)
const queryResult = this.hasValue(this.query)
console.log(queryResult)
if (localStorage.getItem('currentPage') && !queryResult && this.selectStatus.length === 0) {
this.page.page = parseInt(localStorage.getItem('currentPage'))
} else {
this.page.page = 0
}
this.parentsData.$refs.classifyTree.setCurrentKey(null)
// this.smartQuery = {
// 'retention': null,
@ -186,6 +200,7 @@ export const manageLibraryCrud = {
this.$parent.$parent.$emit('myYearEvent', this.yearData)
}
if (type === 'search') {
console.log('wjObj', wjObj)
wjObj.anjuanData = res.list.content
wjObj.currentPage = this.page.page + 1
// wjObj.page.page = 1

15
src/views/archivesManage/managementLibrary/project/index.vue

@ -24,7 +24,7 @@
<el-table-column type="selection" :reserve-selection="true" width="55" align="center" />
<el-table-column label="序号" width="55" align="center" show-overflow-tooltip>
<template slot-scope="scope">
<span>{{ (page.page === 1 ? 0 : (page.page === 0 ? 0 : page.page - 1)) * page.size + scope.$index + 1 }}</span>
<span>{{ page.page * page.size + scope.$index + 1 }}</span>
</template>
</el-table-column>
<!-- <el-table-column type="index" label="序号" width="55" align="center" /> -->
@ -52,7 +52,7 @@
<!--分页组件-->
<el-pagination
v-if="projectData.length !== 0"
:current-page="page.page"
:current-page="currentPage"
:total="page.total"
:page-size="page.size"
:pager-count="5"
@ -112,6 +112,7 @@ export default {
selections: [],
yearData: [],
parentId: null,
currentPage: 1,
mousedownTime: 0,
mousedownX: 0,
mousedownY: 0
@ -214,12 +215,16 @@ export default {
this.selections = selection
},
handleSizeChange(size) {
this.currentPage = 1
this.page.size = size
this.page.page = 1
this.page.page = 0
localStorage.setItem('currentPageSize', size)
this.getViewTable(1)
},
handleCurrentPage(val) {
this.page.page = val
handleCurrentPage(pageVal) {
this.currentPage = pageVal
this.page.page = pageVal - 1
localStorage.setItem('currentPage', JSON.stringify(this.page.page))
this.getViewTable(1)
}
}

1
src/views/collectReorganizi/collectionLibrary/anjuan/tableList.vue

@ -294,7 +294,6 @@ export default {
}
},
handleCurrentPage(pageVal) {
console.log('pageVal', pageVal)
this.currentPage = pageVal
this.page.page = pageVal - 1
localStorage.setItem('currentPage', JSON.stringify(this.page.page))

8
src/views/collectReorganizi/collectionLibrary/index.vue

@ -622,7 +622,7 @@ export default {
this.$refs.anjuanEle.$refs.ajContent.activeIndex = 0
}
this.$nextTick(() => {
this.$refs.anjuanEle.$refs.ajContent.$refs.tableList.page.page = 1
this.$refs.anjuanEle.$refs.ajContent.$refs.tableList.page.page = 0
this.$refs.anjuanEle.$refs.ajContent.$refs.tableList.getCommonData(2, this.parentsProjectId)
this.$refs.anjuanEle.$refs.ajContent.test = data
})
@ -634,7 +634,7 @@ export default {
if (this.selectedCategory.arrangeType === 1 || (this.selectedCategory.arrangeType === 3 && this.$refs.anjuanEle.$refs.ajContent.activeIndex === 1) || (this.selectedCategory.arrangeType === 2 && this.$refs.anjuanEle.$refs.ajContent.activeIndex === 1)) {
this.$refs.fileEle.fileDrawer = true
this.$nextTick(() => {
this.$refs.fileEle.page.page = 1
this.$refs.fileEle.page.page = 0
this.$refs.fileEle.getCommonData(4, this.parentsAnjuanId)
this.$refs.fileEle.test = data
this.$refs.fileEle.isAjNo = 1
@ -642,7 +642,7 @@ export default {
} else {
this.$refs.juanneiEle.juanneiDrawer = true
this.$nextTick(() => {
this.$refs.juanneiEle.page.page = 1
this.$refs.juanneiEle.page.page = 0
this.$refs.juanneiEle.getCommonData(3, this.parentsAnjuanId)
this.$refs.juanneiEle.test = data
this.$refs.fileEle.isAjNo = 0
@ -654,7 +654,7 @@ export default {
this.parentsJuanneiId = parentId
this.$refs.fileEle.fileDrawer = true
this.$nextTick(() => {
this.$refs.fileEle.page.page = 1
this.$refs.fileEle.page.page = 0
this.$refs.fileEle.getCommonData(4, this.parentsJuanneiId)
this.$refs.fileEle.test = data
})

12
src/views/collectReorganizi/collectionLibrary/mixins/index.js

@ -39,8 +39,18 @@ export const collectionLibraryCrud = {
this.fixedStatusBar = val
localStorage.setItem('statusBarFixedType', val)
},
hasValue(obj) {
for (const key in obj) {
if (obj.hasOwnProperty(key) && obj[key] !== null && obj[key] !== '') {
return true
}
}
return false
},
handleSearch(categoryLevel) {
if (localStorage.getItem('currentPage')) {
const queryResult = this.hasValue(this.query)
console.log(queryResult)
if (localStorage.getItem('currentPage') && !queryResult) {
this.page.page = parseInt(localStorage.getItem('currentPage'))
} else {
this.page.page = 0

3
src/views/fourTestReport/index.vue

@ -16,6 +16,7 @@
<i class="iconfont icon-attachment" />
</li>
</ul> -->
<div style="height: calc(100vh - 120px); overflow-y: scroll;">
<el-tree
v-if="allFileTables.length!==0"
ref="tree"
@ -35,6 +36,7 @@
</el-tree>
<el-empty v-else :image-size="100" />
</div>
</div>
<div id="printArea" ref="output" v-loading.body="loading" class="content-right">
<div class="report-header">
<h5>四性检测报告</h5>
@ -336,7 +338,6 @@ export default {
const treeData = [parent]
this.allFileTables = treeData
this.$nextTick(() => {
this.setCurrentKey(this.currentReportInfo.archivesId)
})

Loading…
Cancel
Save