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

样式与接口对接

上级 93ac51a7
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
<article class="group-title"> <article class="group-title">
<section class="group-title-order"> <section class="group-title-order">
<div @click="selectedType(1)" class="group-title-order-item"> <div @click="selectedType(1)" class="group-title-order-item">
<span>全国</span><img src="../../images/lecturer/select-down.png"/> <span>{{selectedAreaName}}</span><img src="../../images/lecturer/select-down.png"/>
</div> </div>
<div @click="selectedType(2)" class="group-title-order-item"> <div @click="selectedType(2)" class="group-title-order-item">
<span>全部等级</span><img src="../../images/lecturer/select-down.png"/> <span>{{selectedLevelName}}</span><img src="../../images/lecturer/select-down.png"/>
</div> </div>
<div @click="selectedType(3)" class="group-title-order-item"> <div @click="selectedType(3)" class="group-title-order-item">
<span>全部科室</span><img src="../../images/lecturer/select-down.png"/> <span>{{selectedDepartName}}</span><img src="../../images/lecturer/select-down.png"/>
</div> </div>
</section> </section>
</article> </article>
...@@ -24,7 +24,18 @@ export default { ...@@ -24,7 +24,18 @@ export default {
} }
}, },
props: { props: {
selectedAreaName: {
type: String,
default: '全国'
},
selectedLevelName: {
type: String,
default: '全部等级'
},
selectedDepartName: {
type: String,
default: '全部科室'
}
}, },
computed: { computed: {
// ...mapGetters({ // ...mapGetters({
......
...@@ -84,7 +84,8 @@ export function jumpEvaluatPage(){ ...@@ -84,7 +84,8 @@ export function jumpEvaluatPage(){
// dev地址 // dev地址
// const baseUrl = 'http://10.177.10.149:8080/' // const baseUrl = 'http://10.177.10.149:8080/'
// const baseUrl = 'https://dev-sc.yunqueyi.com/' // const baseUrl = 'https://dev-sc.yunqueyi.com/'
const baseUrl = 'http://10.177.15.180:10202/' // const baseUrl = 'http://10.177.15.180:10202/'
const baseUrl = 'http://192.168.140.14:10201/'
const apiUrl = 'https://dev-api.yunqueyi.com/' const apiUrl = 'https://dev-api.yunqueyi.com/'
const evaluatPageUrl = 'https://dev-phome.yunqueyi.com/gpr/#/home' const evaluatPageUrl = 'https://dev-phome.yunqueyi.com/gpr/#/home'
export const jumpWebPageUrl = 'https://dev-phome.yunqueyi.com/' export const jumpWebPageUrl = 'https://dev-phome.yunqueyi.com/'
......
<template>
<div class="main-body" ref="wrapper">
<section class="home-header">
<div class="home-topMenu">
<YqyHomeHeader :searchFix="searchFix"/>
</div>
<div class="swiper">
<mt-swipe :auto="3000" :speed="speedSwiper" :stopPropagation="prevent">
<mt-swipe-item v-for="(item, index) in listSwiper" :key="index" >
<img :src="item.imageUrl" @click="goLinkByswiper(item)"/>
</mt-swipe-item>
</mt-swipe>
</div>
</section>
<!-- 热门讲师 -->
<YqyHotLecturer />
<!-- 全部讲师标题 -->
<YqyLecturerTitle/>
<!-- 全部讲师选择标题 -->
<YqyLecturerSelect @selectedType="selectedTypeFromTitle"/>
<!-- 全部讲师列表 -->
<YqyTeacherList :parmData="parmDataDoctList"/>
<!--返回顶部-->
<BackTop v-if="searchFix"/>
<!-- 全部讲师选择页面 -->
<section v-show="showSelectedPage">
<article class="lect-selection">
<div class="lect-selection-content-mask"></div>
<section class="lect-selection-title">
<img @click="closeSelectedPage" src="../images/lecturer/select-delete.png"/>
<span>{{selectedTitle}}</span>
<span class="no-content"></span>
</section>
<article class="group-title">
<section class="group-title-order">
<div @click="selectedType(1)" class="group-title-order-item">
<span :class="{'active': selectedTypeIndex === 1}">全国</span>
<img v-show="selectedTypeIndex === 1" src="../images/lecturer/select-up.png"/>
<img v-show="selectedTypeIndex !== 1" src="../images/lecturer/select-down.png"/>
</div>
<div @click="selectedType(2)" class="group-title-order-item">
<span :class="{'active': selectedTypeIndex === 2}">全部等级</span>
<img v-show="selectedTypeIndex === 2" src="../images/lecturer/select-up.png"/>
<img v-show="selectedTypeIndex !== 2" src="../images/lecturer/select-down.png"/>
</div>
<div @click="selectedType(3)" class="group-title-order-item">
<span :class="{'active': selectedTypeIndex === 3}">全部科室</span>
<img v-show="selectedTypeIndex === 3" src="../images/lecturer/select-up.png"/>
<img v-show="selectedTypeIndex !== 3" src="../images/lecturer/select-down.png"/>
</div>
</section>
</article>
</article>
<section class="lect-selection-content">
<!-- 选择地区 -->
<article class="lect-selection-content-region" v-show="selectedTypeIndex === 1">
<table class="lect-selection-content-rp-tb">
<tr>
<td style="width: 35%" >
<table class="lect-selection-content-rp-tb-left">
<tr :class="{'bg-white': selectedAreaIndex === index}" @click="selectAreaAction(item, index)" v-for="(item, index) in allAreaList" :key="index">
<td >{{item.name}}</td>
</tr>
</table>
</td>
<td style="width: 4%"></td>
<td class="lect-selection-content-rp-tb-tb" style="width: 60%" >
<table>
<tr >
<td >11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img v-show="false" src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<!-- <tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr> -->
</table>
</td>
</tr>
</table>
</article>
<!-- 选择医院等级 -->
<article class="lect-selection-content-level" v-show="selectedTypeIndex === 2">
<table class="lect-selection-content-rp-tb">
<tr>
<td class="lect-selection-content-rp-tb-tb-2" >
<table>
<tr @click="selectLevelAction(item, index)" v-for="(item, index) in allLevelList" :key="index">
<td >{{item.value}}</td>
<td style="text-align: right;"><img v-show="selectedLevelIndex === index" src="../images/lecturer/select-selected.png"/></td>
</tr>
</table>
</td>
</tr>
</table>
</article>
<!-- 选择医院科室 -->
<article class="lect-selection-content-region" v-show="selectedTypeIndex === 3">
<table class="lect-selection-content-rp-tb">
<tr>
<td class="lect-selection-content-rp-tb-tb-2">
<table>
<tr @click="selectDepartAction(item, index)" v-for="(item, index) in allDepartList" :key="index">
<td >{{item.name}}</td>
<td style="text-align: right;"><img v-show="selectedDepartIndex === index" src="../images/lecturer/select-selected.png"/></td>
</tr>
</table>
</td>
</tr>
</table>
</article>
</section>
</section>
</div>
</template>
<script>
import { Swipe, SwipeItem} from 'mint-ui';
import {mapState, mapMutations, mapActions} from 'vuex'
import BackTop from '@/homecom/components/common/backTop';
import YqyHomeHeader from '@/componentsn/business/yqy-home-header';
import YqyLecturerTitle from '@/componentsn/business/yqy-lecturer-title';
import YqyLecturerSelect from '@/componentsn/business/yqy-lecturer-select';
import YqyHotLecturer from '@/componentsn/business/yqy-hot-lecturer';
import YqyTeacherList from '@/componentsn/business/yqy-teacher-list'
export default {
data(){
return {
showSelectedPage: false,
parmDataDoctList: [],
selectedTypeIndex: 1,
prevent: true,
isShowBackTop: false,
speedSwiper: 300,
// stopPropagation: true,
listSwiper: [{
"imageUrl": require('../homecom/images/defaults/750420-1.png')
},{
"imageUrl": require('../homecom/images/defaults/750420-1.png')
},{
"imageUrl": require('../homecom/images/defaults/750420-1.png')
},{
"imageUrl": require('../homecom/images/defaults/750420-1.png')
},{
"imageUrl": require('../homecom/images/defaults/750420-1.png')
}],//轮播图数据
scrollTimer: null,
scrollTop: 0,
userToken: '',
searchFix: false,
statusBarHeight: 0,
userMobile: '',
isFailSwiper: 1,
allAreaList: [],
allLevelList: [],
allDepartList: [],
selectedAreaIndex: -1,
selectedLevelIndex: -1,
selectedDepartIndex: -1,
}
},
components:{
Swipe,
SwipeItem,
BackTop,
YqyHomeHeader,
YqyLecturerTitle,
YqyLecturerSelect,
YqyHotLecturer,
YqyTeacherList,
},
computed: {
selectedTitle() {
return this.selectedTypeIndex === 1 ? '选择地区' : this.selectedTypeIndex === 2 ? '选择等级' : '选择科室'
}
},
beforeCreate() {
},
created () {
let _this = this;
_this.initAll()
_this.getUserInfo();
// window.__refresh = function(params){
// }
window.__getStatusBarHeight = function(parm){
// alert(JSON.stringify(parm))
_this.statusBarHeight = parm.statusBarHeight;
}
// alert("token之前");
window.__getUserInfo = function(parm){
// _this.systemType = parm.systemType;
// _this.appVersion = parm.appVersion;
// _this.token = parm.userToken;
// _this.userToken = parm.userToken;
// _this.userMobile = parm.userMobile;
// _this.initByToken(parm.userToken);
}
// _this.getStatusHight()
// _this.initByToken('593F679F62964076AF1C7489DA3343ED');
},
beforeMount() {
},
mounted(){
window.addEventListener('scroll', this.scrollFun);
},
beforeDestroyed(){
window.removeEventListener('scroll', this.scrollFun)
},
watch:{
},
methods:{
// ...mapActions({
// 'setAdjustList': 'setAdjustList'
// }),
selectedTypeFromTitle(index) {
this.selectedTypeIndex = index
this.showSelectedPage = true
},
closeSelectedPage() {
this.showSelectedPage = false
},
selectedType(index) {
this.selectedTypeIndex = index
// this.$emit('selectedType', index)
},
initAll(){
this.getSwiper()
this.getYqDoctorDataByCD()
this.getAreas()
this.getLevels()
this.getDeparts()
},
//获取状态栏高度
getStatusHight(){
rocNative.getStatusBarHeight({
__funcName: '__getStatusBarHeight'
})
},
//获取用户信息及版本号等()
getUserInfo(){
rocNative.getUserInfo({
__funcName: '__getUserInfo'
})
},
//轮播图跳转
goLinkByswiper(itemData){
this.pageBurialPoin({
menuLevel:1,
menuCode:'m_home',
functionCode:'f_banner',
actionCode:'c_banner',
labelId:itemData.id,
labelValue:itemData.name
})
let paramList = this.setEventByModuleCode(itemData);
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: paramList
})
},
//根据条件获取讲师列表
getYqDoctorDataByCD(){
let _this = this,
para = {
provinceId: 0,
cityId: 0,
countyId: 0,
levelGrade: 0,
departmentId: 0,
setEntry: 'headers'
}
this.GET('contents/courseDoctor/v1/getAllTeacher', para).then(res => {
if(res.code == '000000'){
_this.parmDataDoctList = res.data && res.data.list || []
}
})
},
scrollEndFun(){
let scrollTop = document.body.scrollTop || document.documentElement.scrollTop;
// let newCourseTop = document.querySelector('#famus-teacher').offsetTop;
// let fivesTop = document.querySelector('#fiveBoxMenu').offsetTop;
},
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;
}
},
// 获取轮播图数据
getSwiper(){
let _this = this,
para = {
setEntry: 'headers',
}
this.GET('contents/courseDoctorBanner/queryList', para).then(res => {
if(res.code == '000000'){
_this.listSwiper = res.data.bannerList || [];
}
if( _this.listSwiper.length == 0){
_this.isFailSwiper += 1;
}
_this.isFailSwiper = _this.listSwiper.length == 0 ? 2 : 1 ;
})
},
getAreas() {
let param = {
setEntry: 'headers'
}
this.GET('contents/courseDoctor/listAreas', param).then(res => {
if(res.code == '000000'){
this.allAreaList = res.data && res.data.list || []
}
})
},
getLevels() {
let param = {
setEntry: 'headers'
}
this.GET('contents/courseDoctor/listLevels', param).then(res => {
if(res.code == '000000'){
this.allLevelList = res.data && res.data.list || []
}
})
},
getDeparts() {
let param = {
setEntry: 'headers'
}
this.GET('contents/courseDoctor/listDeparts', param).then(res => {
if(res.code == '000000'){
this.allDepartList = res.data && res.data.list || []
}
})
},
selectAreaAction(item, index) {
this.selectedAreaIndex = index
},
selectLevelAction(item, index) {
this.selectedLevelIndex = index
},
selectDepartAction(item, index) {
this.selectedDepartIndex = index
}
},
}
</script>
<style>
.swiper .mint-swipe-indicators{
right: 6px;
top:50%;
bottom: inherit;
left:inherit;
width:10px;
text-align: center;
transform: translateX(0%);
transform: translateY(-50%);
}
.swiper .mint-swipe-item img{
width: 100%;
height: 100%;
}
.swiper .mint-swipe-indicator{
width:2px;
height: 8px;
background: #fff;
opacity: 0.4;
float: left;
margin-top:3px;
border-radius: 0;
}
.swiper .is-active{
opacity: 1;
}
.mint-loadmore-top .mint-loadmore-text{font-size: 12px;}
.banner-container.swiper-container-horizontal>.swiper-pagination-bullets{
width: 2px;
left: inherit;
transform: translateY(-50%);
position: absolute;
right: 6px;
top:50%;
}
.banner-container.swiper-container-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet{
width: 2px;
height: 7px;
background: #fff;
margin:6px 0 0 0;
float: left;
opacity: 0.4;
}
.banner-container.swiper-container-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet-active{
opacity: 1
}
.banner-pagination{
width: 2px;
z-index: 100;
right: 10px;
top:10px;
position: absolute;
}
/* .swiper-pagination-bullet{
} */
.swiper-slide img{
width: 100%;
height: 100%;
}
</style>
<style lang="scss" scoped>
@import '../style/mixin';
@import '../style/swiper.min.css';
.banner-container{
height: px2rem(210px)
}
.main-body{
position: relative;
}
.box-BG{
width: 100%;
height: 100%;
position: absolute;
top:0;
left: 0;
z-index: 10000
}
.mint-header {
background-color: rgba($color: #000000, $alpha: 0)
}
.font-style {
@include sc(0.6rem, #666);
}
.top-evaluat{
}
@keyframes myPullDown{
from {padding-top: 0;}
to {padding-top:px2rem(225px)}
}
@keyframes myPullUp{
from {padding-top: px2rem(225px);}
to {padding-top:0}
}
.pull-down{
-webkit-animation: myPullDown 1.2s;
animation: myPullDown 1.2s;
padding-top:px2rem(225px)
}
.pull-up{
-webkit-animation: myPullUp 1.2s;
animation: myPullUp 1.2s;
padding-top:0
}
.news-update{
display: block;
position: fixed;
background: #F9F6EF;
right: 0;
bottom: px2rem(140px);
height: px2rem(27px);
padding:0 px2rem(12px);;
line-height: px2rem(27px);
border:1px solid RGBA(162, 129, 60, 0.2);
font-size: px2rem(13px);
box-shadow: 0 px2rem(2px) px2rem(3px) RGBA(202, 168, 97, 0.4);
border-radius: px2rem(14px) 0 0 px2rem(14px);
z-index: 101;
.news-info{
color: #A2813C;
position: relative;
display: inline-block;
i{
position: absolute;
right: -(px2rem(6px));
top:px2rem(4px);
display: inline-block;
width: px2rem(4px);
height: px2rem(4px);
border-radius: 100%;
background: #F47A48
}
}
}
.home-topMenu{
width: 100%;
text-align:center;
top:0;
position: absolute;
z-index: 10;
}
.home-header {
height: px2rem(234px); // banner图片变高了
// height: px2rem(210px);
.swiper{
height: 100%;
/* @include bis('../../images/552064153@2x.png');*/
}
.logo_img{
height: px2rem(85px);
width: px2rem(345px);
text-align: center;
}
}
.home-body{
background: #fff
}
.pathologic-list{
width: 100%;
height: px2rem(52px);
padding: 0 px2rem(15px);
margin-top: px2rem(15px);
.pathologic-item{
float: left;
width: 48%;
box-shadow: 0 px2rem(2px) px2rem(8px) rgba(49, 127, 119, 0.2);
border-radius: px2rem(3px);
background: #fff;
/* padding: px2rem(12px) 0 px2rem(12px) 0;*/
margin-right: 4%;
text-align: center;
.pathologic-icon{
height: px2rem(52px);
/* height: px2rem(20px);*/
img{
width: 100%;
height: px2rem(52px);
padding-bottom: px2rem(8px);
vertical-align: middle;
display: inline-block;
}
}
.pathologic-txt{
font-size: px2rem(14px);
line-height: px2rem(20px);
font-weight: 700;
display: inline-block;
vertical-align: middle;
}
}
.clear{
clear: both;
}
}
</style>
<style lang="scss" scoped>
@import '../style/mixin.scss';
.lect-selection-content {
width: px2rem(375px);
font-size: px2rem(14px);
color: #666666;
margin-right: px2rem(15px);
width: px2rem(360px);
position: absolute;
top: px2rem(121px);
z-index: 201;
table {
width: 100%;
border-collapse: collapse;
}
&-rp-tb {
padding: px2rem(4px) px2rem(15px);
&-left {
td {
padding-left: px2rem(15px);
border-bottom: 1px solid #F5F6F6;
}
background: #F5F6F6;
}
tr {
height: px2rem(40px);
line-height: px2rem(40px);
}
td {
height: px2rem(40px);
img {
position: relative;
top: px2rem(6px);
left: 0;
width: 20px;
height: 20px;
}
}
&-tb {
td {
padding-left: px2rem(8px);
border-bottom: 1px solid #f0f0f0;
}
}
&-tb-2 {
td {
padding-left: 0;
border-bottom: 1px solid #f0f0f0;
}
table {
width: 96%;
margin: 0 px2rem(15px);
}
}
}
}
.lect-selection {
display: flex;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 99;
background: #fff;
flex-direction: row;
&-title {
display: flex;
flex-direction: row;
padding: px2rem(33px) px2rem(15px) px2rem(13px);
width: px2rem(375px);
justify-content: space-between;
font-size: px2rem(13px);
height: px2rem(68px);
// line-height: px2rem(64px);
border-bottom: 1px solid #e7e7e7;
img {
position: relative;
top: px2rem(1px);
left: px2rem(1px);
height: px2rem(25px);
width: px2rem(25px);
}
span {
height: px2rem(18px);
font-size: px2rem(18px);
color: #333;
}
}
}
.group-title {
position: absolute;
top: px2rem(80px);
z-index: 202;
display: flex;
flex-direction: row;
padding: px2rem(4px) px2rem(25px) px2rem(16px);
border-bottom: 1px solid #f0f0f0;
&-order {
display: flex;
flex-direction: row;
width: px2rem(325px);
justify-content: space-between;
font-size: px2rem(13px);
&-item {
span {
font-size: px2rem(15px);
color: #333;
}
img {
position: relative;
top: 0;
left: px2rem(-1px);
height: px2rem(11px);
width: px2rem(11px);
}
}
}
}
.active {
color: #449284 !important;
}
.bg-white {
background: #fff;
}
</style>
<template>
<div class="main-body" ref="wrapper">
<section class="home-header">
<div class="home-topMenu">
<YqyHomeHeader :searchFix="searchFix"/>
</div>
<div class="swiper">
<mt-swipe :auto="3000" :speed="speedSwiper" :stopPropagation="prevent">
<mt-swipe-item v-for="(item, index) in listSwiper" :key="index" >
<img :src="item.imageUrl" @click="goLinkByswiper(item)"/>
</mt-swipe-item>
</mt-swipe>
</div>
</section>
<!-- 热门讲师 -->
<YqyHotLecturer />
<!-- 全部讲师标题 -->
<YqyLecturerTitle/>
<!-- 全部讲师选择标题 -->
<YqyLecturerSelect @selectedType="selectedTypeFromTitle"/>
<!-- 全部讲师列表 -->
<YqyTeacherList :parmData="parmDataDoctList"/>
<!--返回顶部-->
<BackTop v-if="searchFix"/>
<!-- 全部讲师选择页面 -->
<section v-show="showSelectedPage">
<article class="lect-selection">
<div class="lect-selection-content-mask"></div>
<section class="lect-selection-title">
<img @click="closeSelectedPage" src="../images/lecturer/select-delete.png"/>
<span>{{selectedTitle}}</span>
<span class="no-content"></span>
</section>
<article class="group-title">
<section class="group-title-order">
<div @click="selectedType(1)" class="group-title-order-item">
<span>全国</span><img src="../images/lecturer/select-down.png"/>
</div>
<div @click="selectedType(2)" class="group-title-order-item">
<span>全部等级</span><img src="../images/lecturer/select-down.png"/>
</div>
<div @click="selectedType(3)" class="group-title-order-item">
<span>全部科室</span><img src="../images/lecturer/select-down.png"/>
</div>
</section>
</article>
</article>
<section class="lect-selection-content">
<!-- 选择地区 -->
<article class="lect-selection-content-region" v-show="selectedTypeIndex === 1">
<table class="lect-selection-content-rp-tb">
<tr>
<td style="width: 33%" >
<table class="lect-selection-content-rp-tb-left">
<tr class="bg-white">
<td >11</td>
</tr>
<tr >
<td>11</td>
</tr>
<tr >
<td>11</td>
</tr>
<tr >
<td>11</td>
</tr>
<tr >
<td>11</td>
</tr>
<tr >
<td>11</td>
</tr>
<tr >
<td>11</td>
</tr>
<tr >
<td>11</td>
</tr>
<!-- <tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr> -->
</table>
</td>
<td style="width: 4%"></td>
<td class="lect-selection-content-rp-tb-tb" style="width: 62%" >
<table>
<tr >
<td >11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img v-show="false" src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<!-- <tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr> -->
</table>
</td>
</tr>
</table>
</article>
<!-- 选择医院等级 -->
<article class="lect-selection-content-level" v-show="selectedTypeIndex === 2">
<table class="lect-selection-content-rp-tb">
<tr>
<td class="lect-selection-content-rp-tb-tb-2" >
<table>
<tr >
<td >11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img v-show="false" src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<!-- <tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr> -->
</table>
</td>
</tr>
</table>
</article>
<!-- 选择医院科室 -->
<article class="lect-selection-content-region" v-show="selectedTypeIndex === 3">
<table class="lect-selection-content-rp-tb">
<tr>
<td class="lect-selection-content-rp-tb-tb-2">
<table>
<tr >
<td >11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img v-show="false" src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<!-- <tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr> -->
</table>
</td>
</tr>
</table>
</article>
</section>
</section>
</div>
</template>
<script>
import { Swipe, SwipeItem} from 'mint-ui';
import {mapState, mapMutations, mapActions} from 'vuex'
import BackTop from '@/homecom/components/common/backTop';
import YqyHomeHeader from '@/componentsn/business/yqy-home-header';
import YqyLecturerTitle from '@/componentsn/business/yqy-lecturer-title';
import YqyLecturerSelect from '@/componentsn/business/yqy-lecturer-select';
import YqyHotLecturer from '@/componentsn/business/yqy-hot-lecturer';
import YqyTeacherList from '@/componentsn/business/yqy-teacher-list'
export default {
data(){
return {
showSelectedPage: false,
parmDataDoctList: [],
selectedTypeIndex: 1,
prevent: true,
isShowBackTop: false,
speedSwiper: 300,
// stopPropagation: true,
listSwiper: [{
"imageUrl": require('../homecom/images/defaults/750420-1.png')
},{
"imageUrl": require('../homecom/images/defaults/750420-1.png')
},{
"imageUrl": require('../homecom/images/defaults/750420-1.png')
},{
"imageUrl": require('../homecom/images/defaults/750420-1.png')
},{
"imageUrl": require('../homecom/images/defaults/750420-1.png')
}],//轮播图数据
scrollTimer: null,
scrollTop: 0,
userToken: '',
searchFix: false,
statusBarHeight: 0,
userMobile: '',
isFailSwiper: 1,
}
},
components:{
Swipe,
SwipeItem,
BackTop,
YqyHomeHeader,
YqyLecturerTitle,
YqyLecturerSelect,
YqyHotLecturer,
YqyTeacherList,
},
computed: {
selectedTitle() {
return this.selectedTypeIndex === 1 ? '选择地区' : this.selectedTypeIndex === 2 ? '选择等级' : '选择科室'
}
},
beforeCreate() {
},
created () {
let _this = this;
_this.initAll()
_this.getUserInfo();
// window.__refresh = function(params){
// }
window.__getStatusBarHeight = function(parm){
// alert(JSON.stringify(parm))
_this.statusBarHeight = parm.statusBarHeight;
}
// alert("token之前");
window.__getUserInfo = function(parm){
// _this.systemType = parm.systemType;
// _this.appVersion = parm.appVersion;
// _this.token = parm.userToken;
// _this.userToken = parm.userToken;
// _this.userMobile = parm.userMobile;
// _this.initByToken(parm.userToken);
}
// _this.getStatusHight()
// _this.initByToken('593F679F62964076AF1C7489DA3343ED');
},
beforeMount() {
},
mounted(){
window.addEventListener('scroll', this.scrollFun);
},
beforeDestroyed(){
window.removeEventListener('scroll', this.scrollFun)
},
watch:{
},
methods:{
// ...mapActions({
// 'setAdjustList': 'setAdjustList'
// }),
selectedTypeFromTitle(index) {
this.selectedTypeIndex = index
this.showSelectedPage = true
},
closeSelectedPage() {
this.showSelectedPage = false
},
selectedType(index) {
this.selectedTypeIndex = index
// this.$emit('selectedType', index)
},
initAll(){
this.getSwiper()
// this.getYqDoctorData()
this.getYqDoctorDataByCD()
},
//获取状态栏高度
getStatusHight(){
rocNative.getStatusBarHeight({
__funcName: '__getStatusBarHeight'
})
},
//获取用户信息及版本号等()
getUserInfo(){
rocNative.getUserInfo({
__funcName: '__getUserInfo'
})
},
//轮播图跳转
goLinkByswiper(itemData){
this.pageBurialPoin({
menuLevel:1,
menuCode:'m_home',
functionCode:'f_banner',
actionCode:'c_banner',
labelId:itemData.id,
labelValue:itemData.name
})
let paramList = this.setEventByModuleCode(itemData);
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: paramList
})
},
//根据条件获取讲师列表
getYqDoctorDataByCD(){
let _this = this,
para = {
provinceId: 0,
cityId: 0,
countyId: 0,
levelGrade: 0,
departmentId: 0,
setEntry: 'headers'
}
this.GET('/contents/courseDoctor/v1/getAllTeacher', para).then(res => {
if(res.code == '000000'){
_this.parmDataDoctList = res.data && res.data.list || []
}
})
},
scrollEndFun(){
let scrollTop = document.body.scrollTop || document.documentElement.scrollTop;
// let newCourseTop = document.querySelector('#famus-teacher').offsetTop;
// let fivesTop = document.querySelector('#fiveBoxMenu').offsetTop;
},
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;
}
},
// 获取轮播图数据
getSwiper(){
let _this = this,
para = {
setEntry: 'headers',
}
this.GET('contents/courseDoctorBanner/queryList', para).then(res => {
if(res.code == '000000'){
_this.listSwiper = res.data.bannerList || [];
}
if( _this.listSwiper.length == 0){
_this.isFailSwiper += 1;
}
_this.isFailSwiper = _this.listSwiper.length == 0 ? 2 : 1 ;
})
}
},
}
</script>
<style>
.swiper .mint-swipe-indicators{
right: 6px;
top:50%;
bottom: inherit;
left:inherit;
width:10px;
text-align: center;
transform: translateX(0%);
transform: translateY(-50%);
}
.swiper .mint-swipe-item img{
width: 100%;
height: 100%;
}
.swiper .mint-swipe-indicator{
width:2px;
height: 8px;
background: #fff;
opacity: 0.4;
float: left;
margin-top:3px;
border-radius: 0;
}
.swiper .is-active{
opacity: 1;
}
.mint-loadmore-top .mint-loadmore-text{font-size: 12px;}
.banner-container.swiper-container-horizontal>.swiper-pagination-bullets{
width: 2px;
left: inherit;
transform: translateY(-50%);
position: absolute;
right: 6px;
top:50%;
}
.banner-container.swiper-container-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet{
width: 2px;
height: 7px;
background: #fff;
margin:6px 0 0 0;
float: left;
opacity: 0.4;
}
.banner-container.swiper-container-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet-active{
opacity: 1
}
.banner-pagination{
width: 2px;
z-index: 100;
right: 10px;
top:10px;
position: absolute;
}
/* .swiper-pagination-bullet{
} */
.swiper-slide img{
width: 100%;
height: 100%;
}
</style>
<style lang="scss" scoped>
@import '../style/mixin';
@import '../style/swiper.min.css';
.banner-container{
height: px2rem(210px)
}
.main-body{
position: relative;
}
.box-BG{
width: 100%;
height: 100%;
position: absolute;
top:0;
left: 0;
z-index: 10000
}
.mint-header {
background-color: rgba($color: #000000, $alpha: 0)
}
.font-style {
@include sc(0.6rem, #666);
}
.top-evaluat{
}
@keyframes myPullDown{
from {padding-top: 0;}
to {padding-top:px2rem(225px)}
}
@keyframes myPullUp{
from {padding-top: px2rem(225px);}
to {padding-top:0}
}
.pull-down{
-webkit-animation: myPullDown 1.2s;
animation: myPullDown 1.2s;
padding-top:px2rem(225px)
}
.pull-up{
-webkit-animation: myPullUp 1.2s;
animation: myPullUp 1.2s;
padding-top:0
}
.news-update{
display: block;
position: fixed;
background: #F9F6EF;
right: 0;
bottom: px2rem(140px);
height: px2rem(27px);
padding:0 px2rem(12px);;
line-height: px2rem(27px);
border:1px solid RGBA(162, 129, 60, 0.2);
font-size: px2rem(13px);
box-shadow: 0 px2rem(2px) px2rem(3px) RGBA(202, 168, 97, 0.4);
border-radius: px2rem(14px) 0 0 px2rem(14px);
z-index: 101;
.news-info{
color: #A2813C;
position: relative;
display: inline-block;
i{
position: absolute;
right: -(px2rem(6px));
top:px2rem(4px);
display: inline-block;
width: px2rem(4px);
height: px2rem(4px);
border-radius: 100%;
background: #F47A48
}
}
}
.home-topMenu{
width: 100%;
text-align:center;
top:0;
position: absolute;
z-index: 10;
}
.home-header {
height: px2rem(234px); // banner图片变高了
// height: px2rem(210px);
.swiper{
height: 100%;
/* @include bis('../../images/552064153@2x.png');*/
}
.logo_img{
height: px2rem(85px);
width: px2rem(345px);
text-align: center;
}
}
.home-body{
background: #fff
}
.pathologic-list{
width: 100%;
height: px2rem(52px);
padding: 0 px2rem(15px);
margin-top: px2rem(15px);
.pathologic-item{
float: left;
width: 48%;
box-shadow: 0 px2rem(2px) px2rem(8px) rgba(49, 127, 119, 0.2);
border-radius: px2rem(3px);
background: #fff;
/* padding: px2rem(12px) 0 px2rem(12px) 0;*/
margin-right: 4%;
text-align: center;
.pathologic-icon{
height: px2rem(52px);
/* height: px2rem(20px);*/
img{
width: 100%;
height: px2rem(52px);
padding-bottom: px2rem(8px);
vertical-align: middle;
display: inline-block;
}
}
.pathologic-txt{
font-size: px2rem(14px);
line-height: px2rem(20px);
font-weight: 700;
display: inline-block;
vertical-align: middle;
}
}
.clear{
clear: both;
}
}
</style>
<style lang="scss" scoped>
@import '../style/mixin.scss';
.lect-selection-content {
width: px2rem(375px);
font-size: px2rem(14px);
color: #666666;
margin-right: px2rem(15px);
width: px2rem(360px);
position: absolute;
top: px2rem(124px);
z-index: 201;
table {
width: 100%;
border-collapse: collapse;
}
&-rp-tb {
padding: px2rem(4px) px2rem(15px);
&-left {
td {
padding-left: px2rem(15px);
border-bottom: 1px solid #F5F6F6;
}
background: #F5F6F6;
}
tr {
height: px2rem(40px);
line-height: px2rem(40px);
}
td {
height: px2rem(40px);
img {
position: relative;
top: px2rem(6px);
left: 0;
width: 20px;
height: 20px;
}
}
&-tb {
td {
padding-left: px2rem(8px);
border-bottom: 1px solid #f0f0f0;
}
}
&-tb-2 {
td {
padding-left: 0;
border-bottom: 1px solid #f0f0f0;
}
table {
width: 96%;
margin: 0 px2rem(15px);
}
}
}
}
.lect-selection {
display: flex;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 99;
background: #fff;
flex-direction: row;
&-title {
display: flex;
flex-direction: row;
padding: px2rem(33px) px2rem(15px) px2rem(13px);
width: px2rem(375px);
justify-content: space-between;
font-size: px2rem(13px);
height: px2rem(68px);
// line-height: px2rem(64px);
border-bottom: 1px solid #e7e7e7;
img {
position: relative;
top: px2rem(1px);
left: px2rem(1px);
height: px2rem(25px);
width: px2rem(25px);
}
span {
height: px2rem(18px);
font-size: px2rem(18px);
color: #333;
}
}
}
.group-title {
position: absolute;
top: px2rem(80px);
z-index: 202;
display: flex;
flex-direction: row;
padding: px2rem(4px) px2rem(25px) px2rem(16px);
border-bottom: 1px solid #f0f0f0;
&-order {
display: flex;
flex-direction: row;
width: px2rem(325px);
justify-content: space-between;
font-size: px2rem(13px);
&-item {
span {
font-size: px2rem(15px);
color: #333;
}
img {
position: relative;
top: px2rem(1px);
left: px2rem(1px);
height: px2rem(11px);
width: px2rem(11px);
}
}
}
}
.active {
color: #449284;
}
.bg-white {
background: #fff;
}
</style>
...@@ -20,7 +20,12 @@ ...@@ -20,7 +20,12 @@
<YqyLecturerTitle/> <YqyLecturerTitle/>
<!-- 全部讲师选择标题 --> <!-- 全部讲师选择标题 -->
<YqyLecturerSelect @selectedType="selectedTypeFromTitle"/> <YqyLecturerSelect
@selectedType="selectedTypeFromTitle"
:selectedAreaName="selectedAreaSubName || selectedAreaName"
:selectedLevelName="selectedLevelName"
:selectedDepartName="selectedDepartName"
/>
<!-- 全部讲师列表 --> <!-- 全部讲师列表 -->
<YqyTeacherList :parmData="parmDataDoctList"/> <YqyTeacherList :parmData="parmDataDoctList"/>
...@@ -40,13 +45,19 @@ ...@@ -40,13 +45,19 @@
<article class="group-title"> <article class="group-title">
<section class="group-title-order"> <section class="group-title-order">
<div @click="selectedType(1)" class="group-title-order-item"> <div @click="selectedType(1)" class="group-title-order-item">
<span>全国</span><img src="../images/lecturer/select-down.png"/> <span :class="{'active': selectedTypeIndex === 1}">全国</span>
<img v-show="selectedTypeIndex === 1" src="../images/lecturer/select-up.png"/>
<img v-show="selectedTypeIndex !== 1" src="../images/lecturer/select-down.png"/>
</div> </div>
<div @click="selectedType(2)" class="group-title-order-item"> <div @click="selectedType(2)" class="group-title-order-item">
<span>全部等级</span><img src="../images/lecturer/select-down.png"/> <span :class="{'active': selectedTypeIndex === 2}">全部等级</span>
<img v-show="selectedTypeIndex === 2" src="../images/lecturer/select-up.png"/>
<img v-show="selectedTypeIndex !== 2" src="../images/lecturer/select-down.png"/>
</div> </div>
<div @click="selectedType(3)" class="group-title-order-item"> <div @click="selectedType(3)" class="group-title-order-item">
<span>全部科室</span><img src="../images/lecturer/select-down.png"/> <span :class="{'active': selectedTypeIndex === 3}">全部科室</span>
<img v-show="selectedTypeIndex === 3" src="../images/lecturer/select-up.png"/>
<img v-show="selectedTypeIndex !== 3" src="../images/lecturer/select-down.png"/>
</div> </div>
</section> </section>
</article> </article>
...@@ -56,79 +67,22 @@ ...@@ -56,79 +67,22 @@
<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>
<td style="width: 33%" > <td style="width: 40%" >
<table class="lect-selection-content-rp-tb-left"> <table class="lect-selection-content-rp-tb-left">
<tr class="bg-white"> <tr v-for="(item, index) in allAreaList" :class="{'bg-white': selectedAreaIndex === index}" @click="selectAreaAction(item, index)" :key="index">
<td >11</td> <td >{{item.name}}</td>
</tr> </tr>
<tr >
<td>11</td>
</tr>
<tr >
<td>11</td>
</tr>
<tr >
<td>11</td>
</tr>
<tr >
<td>11</td>
</tr>
<tr >
<td>11</td>
</tr>
<tr >
<td>11</td>
</tr>
<tr >
<td>11</td>
</tr>
<!-- <tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr> -->
</table> </table>
</td> </td>
<td style="width: 4%"></td> <td style="width: 4%"></td>
<td class="lect-selection-content-rp-tb-tb" style="width: 62%" > <td class="lect-selection-content-rp-tb-tb" style="width: 55%" >
<table> <table >
<tr > <tr v-for="(item, index) in allAreaSubList"
<td >11</td> @click="selectAreaSubAction(item, index)" :key="index"
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td> >
</tr> <td >{{item.name}}</td>
<tr > <td style="text-align: right;"><img v-show="item.name && selectedAreaSubIndex === index" src="../images/lecturer/select-selected.png"/></td>
<td>11</td> </tr>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img v-show="false" src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<!-- <tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr> -->
</table> </table>
</td> </td>
</tr> </tr>
...@@ -140,43 +94,10 @@ ...@@ -140,43 +94,10 @@
<tr> <tr>
<td class="lect-selection-content-rp-tb-tb-2" > <td class="lect-selection-content-rp-tb-tb-2" >
<table> <table>
<tr > <tr @click="selectLevelAction(item, index)" v-for="(item, index) in allLevelList" :key="index">
<td >11</td> <td >{{item.value}}</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td> <td style="text-align: right;"><img v-show="selectedLevelIndex === index" src="../images/lecturer/select-selected.png"/></td>
</tr> </tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img v-show="false" src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<!-- <tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr> -->
</table> </table>
</td> </td>
</tr> </tr>
...@@ -188,43 +109,10 @@ ...@@ -188,43 +109,10 @@
<tr> <tr>
<td class="lect-selection-content-rp-tb-tb-2"> <td class="lect-selection-content-rp-tb-tb-2">
<table> <table>
<tr > <tr @click="selectDepartAction(item, index)" v-for="(item, index) in allDepartList" :key="index">
<td >11</td> <td >{{item.name}}</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td> <td style="text-align: right;"><img v-show="selectedDepartIndex === index" src="../images/lecturer/select-selected.png"/></td>
</tr> </tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img v-show="false" src="../images/lecturer/select-selected.png"/></td>
</tr>
<tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr>
<!-- <tr >
<td>11</td>
<td style="text-align: right;"><img src="../images/lecturer/select-selected.png"/></td>
</tr> -->
</table> </table>
</td> </td>
</tr> </tr>
...@@ -273,6 +161,20 @@ export default { ...@@ -273,6 +161,20 @@ export default {
statusBarHeight: 0, statusBarHeight: 0,
userMobile: '', userMobile: '',
isFailSwiper: 1, isFailSwiper: 1,
allAreaList: [],
allAreaSubList: [],
allAreaListHandles: [],
allLevelList: [],
allDepartList: [],
selectedAreaIndex: -1,
selectedAreaSubIndex: -1,
selectedLevelIndex: -1,
selectedDepartIndex: -1,
selectedAreaName: '全国',
selectedAreaSubName: '',
selectedLevelName: '全部等级',
selectedDepartName: '全部科室',
} }
}, },
components:{ components:{
...@@ -353,8 +255,10 @@ export default { ...@@ -353,8 +255,10 @@ export default {
initAll(){ initAll(){
this.getSwiper() this.getSwiper()
// this.getYqDoctorData()
this.getYqDoctorDataByCD() this.getYqDoctorDataByCD()
this.getAreas()
this.getLevels()
this.getDeparts()
}, },
//获取状态栏高度 //获取状态栏高度
...@@ -401,7 +305,7 @@ export default { ...@@ -401,7 +305,7 @@ export default {
departmentId: 0, departmentId: 0,
setEntry: 'headers' setEntry: 'headers'
} }
this.GET('/contents/courseDoctor/v1/getAllTeacher', para).then(res => { this.GET('contents/courseDoctor/v1/getAllTeacher', para).then(res => {
if(res.code == '000000'){ if(res.code == '000000'){
_this.parmDataDoctList = res.data && res.data.list || [] _this.parmDataDoctList = res.data && res.data.list || []
} }
...@@ -443,7 +347,95 @@ export default { ...@@ -443,7 +347,95 @@ export default {
} }
_this.isFailSwiper = _this.listSwiper.length == 0 ? 2 : 1 ; _this.isFailSwiper = _this.listSwiper.length == 0 ? 2 : 1 ;
}) })
},
// 获取所有区域数据
getAreas() {
let param = {
setEntry: 'headers'
}
this.GET('contents/courseDoctor/listAreas', param).then(res => {
if(res.code == '000000'){
this.allAreaList = this.handleAreaData(res.data && res.data.list || [])
this.allAreaSubList = this.allAreaList[0].cities
}
})
},
// 处理区域数据
handleAreaData (orginAreaList) {
let handleList = []
orginAreaList.forEach(element => {
handleList.push({id: element.id, name: element.name,
cities: this.decorateCitiesData({id: 0, name: '全部', provinceId: ''}, element.cities)})
});
console.log(handleList)
return handleList
},
// 装饰城市数据
decorateCitiesData(appendInitData, cities, dataNum = 31) {
let appendCities = [], appendLength = dataNum - cities.length;
appendCities.unshift(appendInitData)
appendCities = appendCities.concat(cities)
for(let i = 0; i < appendLength; i ++){
appendCities.push({id: '', name: '', provinceId: ''})
}
return appendCities
},
// 获取医院等级
getLevels() {
let param = {
setEntry: 'headers'
}
this.GET('contents/courseDoctor/listLevels', param).then(res => {
if(res.code == '000000'){
this.allLevelList = res.data && res.data.list || []
}
})
},
// 获取医院科室
getDeparts() {
let param = {
setEntry: 'headers'
}
this.GET('contents/courseDoctor/listDeparts', param).then(res => {
if(res.code == '000000'){
this.allDepartList = res.data && res.data.list || []
}
})
},
selectAreaAction(item, index) {
this.selectedAreaIndex = index
this.allAreaSubList = item.cities
this.selectedAreaName = item.name
},
selectAreaSubAction(item, index) {
// this.selectedAreaIndex = index
// this.allAreaSubList = item.cities
if(item.name){
this.selectedAreaSubIndex = index
this.selectedAreaSubName = item.name
this.closeSelectedPage()
}
},
selectLevelAction(item, index) {
this.selectedLevelIndex = index
this.selectedLevelName = item.value
this.closeSelectedPage()
},
selectDepartAction(item, index) {
this.selectedDepartIndex = index
this.selectedDepartName = item.name
this.closeSelectedPage()
} }
}, },
} }
...@@ -661,7 +653,7 @@ export default { ...@@ -661,7 +653,7 @@ export default {
margin-right: px2rem(15px); margin-right: px2rem(15px);
width: px2rem(360px); width: px2rem(360px);
position: absolute; position: absolute;
top: px2rem(124px); top: px2rem(122px);
z-index: 201; z-index: 201;
table { table {
width: 100%; width: 100%;
...@@ -766,8 +758,8 @@ export default { ...@@ -766,8 +758,8 @@ export default {
} }
img { img {
position: relative; position: relative;
top: px2rem(1px); top: 0;
left: px2rem(1px); left: px2rem(-1px);
height: px2rem(11px); height: px2rem(11px);
width: px2rem(11px); width: px2rem(11px);
} }
...@@ -775,7 +767,7 @@ export default { ...@@ -775,7 +767,7 @@ export default {
} }
} }
.active { .active {
color: #449284; color: #449284 !important;
} }
.bg-white { .bg-white {
background: #fff; background: #fff;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册