Răsfoiți Sursa

fix: 分页滚动条位置调整、分页样式调整

Signed-off-by: tangshizhe <48740614+tangshizhe@users.noreply.github.com>
tangshizhe 1 an în urmă
părinte
comite
38ae0f7f4a

+ 2 - 1
apps/bigmember_pc/src/components/report-data/ReportList.vue

@@ -187,7 +187,7 @@ import {
   Tooltip
 } from 'element-ui'
 import Empty from '@/components/common/Empty.vue'
-import { dateFromNow } from '@/utils/'
+import { dateFromNow, scrollTargetView } from '@/utils/'
 import { moneyUnit } from '@/utils/globalFunctions'
 import {
   getReportHistoryList,
@@ -449,6 +449,7 @@ export default {
     onPageChange(p) {
       this.listState.pageNum = p
       this.getList()
+      scrollTargetView('.info-list')
     },
     onSizeChange(size) {
       this.listState.pageNum = 1

+ 1 - 0
apps/bigmember_pc/src/utils/globalFunctions.js

@@ -822,6 +822,7 @@ export function scrollTargetView (targetEvent) {
     targetTop = document.querySelector(targetEvent)?.offsetTop
     // 因浏览器及模式差异,页面滚动元素存在不同(标准模式:document.documentElement;兼容模式:body)
     // scrollingElement可获取页面滚动元素
+    console.log(targetTop, 'targetTop');
     scrollWrapper = document.scrollingElement
     scrollWrapper.scrollTop = targetTop
     // console.log(`非工作桌面---滚动元素:${scrollWrapper.className ? scrollWrapper.className : scrollWrapper.tagName}, 滚动距离:${targetTop}`)

+ 4 - 1
apps/bigmember_pc/src/views/analysisReport/components/ProjectDetailsList.vue

@@ -144,7 +144,7 @@ import AssociationInput from '@/views/reportData/components/AssociationInput.vue
 import ProjectItem from '@/components/article-item/ProjectItem.vue'
 import Empty from '@/components/common/Empty'
 import { getMarketAnalysisReportProjectList } from '@/api/modules'
-import { formatMoney, dateFormatter } from '@/utils/'
+import { formatMoney, dateFormatter, scrollTargetView } from '@/utils/'
 import { debounce } from 'lodash'
 
 export default {
@@ -301,6 +301,9 @@ export default {
     onCurrentChange(p) {
       this.listState.pageNum = p
       this.getList()
+      this.$nextTick(() => {
+        scrollTargetView('.project-details-list')
+      })
     },
     getFilters() {
       const { selectTime, selectTimeExtra } = this.reportFilters

+ 4 - 1
apps/bigmember_pc/src/views/reportData/components/ProjectDetailsList.vue

@@ -148,7 +148,7 @@ import AssociationInput from '@/views/reportData/components/AssociationInput.vue
 import ProjectItem from '@/components/article-item/ProjectItem.vue'
 import Empty from '@/components/common/Empty'
 import { getWeekMonthReportProjectList } from '@/api/modules'
-import { formatMoney, dateFormatter } from '@/utils/'
+import { formatMoney, dateFormatter, scrollTargetView } from '@/utils/'
 import { debounce } from 'lodash'
 
 export default {
@@ -335,6 +335,9 @@ export default {
     onCurrentChange(p) {
       this.listState.pageNum = p
       this.getList()
+      this.$nextTick(() => {
+        scrollTargetView('.project-details-list')
+      })
     },
     getFilters() {
       const { subscribe, area, buyerClass, industry, winner, buyerName, sort } =

+ 2 - 1
apps/bigmember_pc/src/views/reportDownload/record.vue

@@ -249,7 +249,7 @@
 import Empty from '@/components/common/Empty.vue'
 import { mapGetters } from 'vuex'
 import { getPDFDownloadRecord, getPDFPackBalance } from '@/api/modules'
-import { formatIndustry, formatBuyerClass } from '@/utils/'
+import { formatIndustry, formatBuyerClass, scrollTargetView } from '@/utils/'
 
 export default {
   components: {
@@ -486,6 +486,7 @@ export default {
     onPageChange(p) {
       this.listState.pageNum = p
       this.getList()
+      scrollTargetView('.box-container')
     },
     onSizeChange(size) {
       this.listState.pageNum = 1