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

优化完成

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