提交 c614dc57 编写于 作者: 杨广俊's avatar 杨广俊

优化完成

上级 b3dc0c06
......@@ -30,7 +30,7 @@
</div>
</section>
</article>
<section class="lect-selection-content">
<section ref="tableWrapperRef" class="lect-selection-content">
<article class="lect-selection-content-region" v-show="selectedTypeIndex === 1">
<table class="lect-selection-content-rp-tb">
<tr>
......@@ -112,14 +112,16 @@ export default {
selectedLevelName: '全部等级',
selectedDepartName: '全部科室',
provinceId: 0,
cProvinceId: 0, // 记录当前左边选择的省或者市
cityId: 0,
countyId: 0,
levelGrade : 0,
departmentId: 0,
oldProinveId: -1,
oldCityId: -1,
oldCountyId: -1,
oldSelectedAreaSubIndex: -1,
oldProvinceId: 0,
oldCityId: 0,
oldCountyId: 0,
oldSelectedAreaSubIndex: 0,
oldCProvinceId: -1, // 记录之前左边选择的省或者市
}
},
props: {
......@@ -256,7 +258,7 @@ export default {
cities: this.decorateCitiesData({id: 0, name: '全部', provinceId: element.id}, element.cities, maxRowNum)})
}
});
handleList.unshift({id:'0',name:'全国',cities: this.decorateCitiesData({id: 0, name: '全国', provinceId: 0}, [], maxRowNum)})
handleList.unshift({id:'-1',name:'全国',cities: this.decorateCitiesData({id: 0, name: '全国', provinceId: 0}, [], maxRowNum)})
for (let i = orginAreaList.length; i < maxRowNum; i++) {
handleList.push({id:'',name:'',cities: []})
......@@ -306,15 +308,12 @@ export default {
// 选中省或直辖市
selectAreaAction(item, index) {
// debugger
if (item.name) {
this.cProvinceId = item.id
this.selectedAreaIndex = index
if (this.oldProinveId = item.provinceId) {
if (item.isMunicipality) {
this.selectedAreaSubIndex = this.oldCountyId
} else {
this.selectedAreaSubIndex = this.oldCityId
}
this.$refs.tableWrapperRef.scrollTop = 0
if (this.oldCProvinceId == item.id) {
this.selectedAreaSubIndex = this.oldSelectedAreaSubIndex
} else {
this.selectedAreaSubIndex = -1
}
......@@ -328,20 +327,22 @@ export default {
// this.selectedAreaIndex = index
// this.allAreaSubList = item.cities
if(item.name){
this.selectedAreaSubIndex = index
this.selectedAreaSubName = item.name
this.selectedAreaSubIndex = index
this.oldSelectedAreaSubIndex = index
this.oldCProvinceId = this.cProvinceId
if(item.isMunicipality){
this.cityId = item.cityId
this.cityId = item.cityId || 0
this.countyId = item.id
this.provinceId = item.provinceId
this.oldProinveId = item.provinceId
this.oldProvinceId = item.provinceId
this.oldCityId = item.cityId
this.oldCountyId = item.id
} else {
this.cityId = item.id
this.countyId = 0
this.provinceId = item.provinceId
this.oldProinveId = item.provinceId
this.oldProvinceId = item.provinceId
this.oldCityId = item.id
this.oldCountyId = 0
}
......@@ -591,6 +592,9 @@ export default {
color: #666666;
margin-right: px2rem(15px);
width: px2rem(360px);
-webkit-overflow-scrolling : touch;
// overflow-scrolling : touch;
overflow: auto;
table {
width: 100%;
border-collapse: collapse;
......@@ -659,7 +663,7 @@ export default {
width: px2rem(25px);
}
span {
height: px2rem(18px);
// height: px2rem(18px);
font-size: px2rem(18px);
color: #333;
}
......
......@@ -18,9 +18,9 @@ body, div, span, header, footer, nav, section, aside, article, ul, dl, dt, dd, l
box-sizing: border-box;
-webkit-tap-highlight-color:transparent;
-webkit-font-smoothing: antialiased;
-webkit-overflow-scrolling : touch;
// -webkit-overflow-scrolling : touch;
// overflow-scrolling : touch;
overflow: auto;
// overflow: auto;
&:hover{
outline: none;
}
......
<template>
<div class="main-body" :class="{'modal-open': showSelectedPage}" ref="wrapper">
<div class="main-body" ref="wrapper">
<section class="home-header">
<div class="home-topMenu">
<YqyHomeHeader :searchFix="searchFix"/>
......@@ -143,7 +143,7 @@ export default {
beforeMount() {
// let appBody = document.getElementById('appBody')
// appBody.style.overflow = 'hidden'
// appBody.style.height = '100%'
// appBody.style.height = '0'
},
mounted(){
window.addEventListener('scroll', this.scrollFun);
......@@ -256,16 +256,26 @@ export default {
},
scrollFun(){
let scrollTop = document.body.scrollTop || document.documentElement.scrollTop
// var clientHeight = document.querySelector('#famus-teacher').clientHeight;
// this.scrollTimer = setTimeout(this.scrollEndFun, 200);
// if(scrollTop > searchBox && scrollTop < adjustTop){
if(scrollTop > 20){
console.log(scrollTop);
this.searchFix = true;
}else{
this.searchFix = false;
let isBusy = false
if (!isBusy) {
isBusy = true
setTimeout(() => {
let scrollTop = document.body.scrollTop || document.documentElement.scrollTop
if(scrollTop > 20){
console.log(scrollTop);
this.searchFix = true;
}else{
this.searchFix = false;
}
isBusy = false
}, 100)
}
// let scrollTop = document.body.scrollTop || document.documentElement.scrollTop
// if(scrollTop > 20){
// this.searchFix = true;
// }else{
// this.searchFix = false;
// }
},
// 获取轮播图数据
......@@ -500,12 +510,7 @@ export default {
</style>
<style lang="scss" scoped>
@import '../../style/mixin.scss';
.modal-open {
&, body {
overflow: hidden;
height: 100%;
}
}
.lect-selection-content {
position: absolute;
top: px2rem(122px);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册