|
|
@ -1,5 +1,5 @@ |
|
|
|
<template> |
|
|
|
<div class='pages' ref="scroll"> |
|
|
|
<div class='pages' ref="scroll" style="scroll-behavior: smooth;"> |
|
|
|
<div class="scroll-box" ref="scroll-content"> |
|
|
|
<van-tabs :active="active" sticky @change="hadelChangeTab"> |
|
|
|
<van-tab title="待接单"> |
|
|
@ -79,15 +79,13 @@ import throttle from 'lodash/debounce' |
|
|
|
import { getServiceListRcv, getServiceListProcess, getServiceListCompleted, getCommonalityDetail, getMeasureDetail, getListMyIdentities, receiveService, getServiceScopeTree, serviceConfirm, serviceComplete,getSearchResis } from '@/api/service' |
|
|
|
import { uploadvariedfile } from '@/api/basic' |
|
|
|
import { Dialog } from 'vant'; |
|
|
|
|
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
active: 0, |
|
|
|
clientHeight: false, |
|
|
|
active: this.$store.state.app.tabActive, |
|
|
|
scroll: null, |
|
|
|
pageNo: 1, |
|
|
|
pageSize: 10, |
|
|
|
pageSize: 20, |
|
|
|
list: [], |
|
|
|
total: 0, |
|
|
|
requestFlag: false, |
|
|
@ -118,16 +116,23 @@ export default { |
|
|
|
}; |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.getTableData('tab') |
|
|
|
this.getListMyIdentities() |
|
|
|
this.getServiceListRcv() |
|
|
|
this.getServiceScopeTree() |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.clientHeight = document.documentElement.clientHeight; //可视高度 |
|
|
|
this.$nextTick(() => { |
|
|
|
this.scroll = this.$refs.scroll; |
|
|
|
if(this.$store.state.app.scrollTop){ |
|
|
|
setTimeout(()=>{ |
|
|
|
this.$refs.scroll.scrollTo(0, this.$store.state.app.scrollTop); |
|
|
|
},500) |
|
|
|
} |
|
|
|
this.scroll.addEventListener('scroll', this.bottomScroll); //监听底部加载 |
|
|
|
}) |
|
|
|
}, |
|
|
|
activated(){ |
|
|
|
|
|
|
|
}, |
|
|
|
methods: { |
|
|
|
afterRead(file) { |
|
|
@ -269,7 +274,6 @@ export default { |
|
|
|
handelChangeRole(val) { |
|
|
|
this.serviceOrgId = val; |
|
|
|
}, |
|
|
|
|
|
|
|
//接单 |
|
|
|
handleCLickReceive(item) { |
|
|
|
this.showRole = item.source === 4; |
|
|
@ -326,11 +330,14 @@ export default { |
|
|
|
this.list = []; |
|
|
|
this.pageNo = 1; |
|
|
|
this.active = e; |
|
|
|
this.$store.dispatch('setTabActive',e); |
|
|
|
this.getTableData('tab') |
|
|
|
}, |
|
|
|
//滚动加载 |
|
|
|
bottomScroll: throttle(function () { |
|
|
|
console.log('滚动加载'); |
|
|
|
let scrollTop = this.scroll.scrollTop; //滚动条距离顶部的高度 |
|
|
|
this.$store.dispatch('setScrollTop',scrollTop); |
|
|
|
let scrollHeight = this.scroll.scrollHeight; //滚动条的高度 |
|
|
|
let clientHeight = this.scroll.clientHeight; //可视区域的高度 |
|
|
|
if (scrollTop + clientHeight >= scrollHeight) { |
|
|
|