提交 9ce72377 编写于 作者: guangjun.yang's avatar guangjun.yang

dev ok

上级 85142b4a
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
v-model="isShowSelection" v-model="isShowSelection"
position="top" position="top"
> >
<section >
<article class="lect-selection"> <article class="lect-selection">
<div class="lect-selection-content-mask"></div> <div class="lect-selection-content-mask"></div>
<section class="lect-selection-title"> <section class="lect-selection-title">
...@@ -85,49 +84,19 @@ ...@@ -85,49 +84,19 @@
</table> </table>
</article> </article>
</section> </section>
</section>
</mt-popup> </mt-popup>
</template> </template>
<script> <script>
import { Swipe, SwipeItem} from 'mint-ui'; // import {mapState, mapMutations, mapActions} from 'vuex'
import {mapState, mapMutations, mapActions} from 'vuex' // import BackTop from '@/homecom/components/common/backTop';
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 YqyLecturerSelectContent from '@/componentsn/business/yqy-lecturer-select-content';
import YqyHotLecturer from '@/componentsn/business/yqy-hot-lecturer';
import YqyTeacherList from '@/componentsn/business/yqy-teacher-list'
export default { export default {
data(){ data(){
return { return {
isShowSelection: true, isShowSelection: true,
parmDataDoctList: [], parmDataDoctList: [],
selectedTypeIndex: 1, 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: [], allAreaList: [],
allAreaSubList: [], allAreaSubList: [],
allAreaListHandles: [], allAreaListHandles: [],
...@@ -141,13 +110,12 @@ export default { ...@@ -141,13 +110,12 @@ export default {
selectedAreaSubName: '', selectedAreaSubName: '',
selectedLevelName: '全部等级', selectedLevelName: '全部等级',
selectedDepartName: '全部科室', selectedDepartName: '全部科室',
} }
}, },
props: { props: {
// isShowSelection: { // selectedTypeIndex: {
// type: Boolean, // type: Number,
// default: true // default: 1
// } // }
}, },
computed: { computed: {
...@@ -159,15 +127,6 @@ export default { ...@@ -159,15 +127,6 @@ export default {
} }
}, },
components:{ components:{
Swipe,
SwipeItem,
BackTop,
YqyHomeHeader,
YqyLecturerTitle,
YqyLecturerSelect,
YqyLecturerSelectContent,
YqyHotLecturer,
YqyTeacherList,
}, },
// computed: { // computed: {
// selectedTitle() { // selectedTitle() {
...@@ -177,44 +136,18 @@ export default { ...@@ -177,44 +136,18 @@ export default {
beforeCreate() { beforeCreate() {
}, },
created () { created () {
let _this = this; this.initAll()
_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() { beforeMount() {
}, },
mounted(){ mounted(){
window.addEventListener('scroll', this.scrollFun);
}, },
beforeDestroyed(){ beforeDestroyed(){
window.removeEventListener('scroll', this.scrollFun)
}, },
watch:{ watch:{
}, },
...@@ -239,46 +172,13 @@ export default { ...@@ -239,46 +172,13 @@ export default {
}, },
initAll(){ initAll(){
this.getSwiper() // this.getSwiper()
this.getYqDoctorDataByCD() // this.getYqDoctorDataByCD()
this.getAreas() this.getAreas()
this.getLevels() this.getLevels()
this.getDeparts() 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(){ getYqDoctorDataByCD(){
let _this = this, let _this = this,
...@@ -298,42 +198,6 @@ export default { ...@@ -298,42 +198,6 @@ export default {
}) })
}, },
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() { getAreas() {
let param = { let param = {
...@@ -352,9 +216,18 @@ export default { ...@@ -352,9 +216,18 @@ export default {
let handleList = [] let handleList = []
orginAreaList.forEach(element => { orginAreaList.forEach(element => {
handleList.push({id: element.id, name: element.name, handleList.push({id: element.id, name: element.name,
cities: this.decorateCitiesData({id: 0, name: '全部', provinceId: ''}, element.cities)}) cities: this.decorateCitiesData({id: 0, name: '全部', provinceId: ''}, element.cities, 40)})
}); });
console.log(handleList) console.log(handleList)
handleList.push({id:'',name:'',cities: []})
handleList.push({id:'',name:'',cities: []})
handleList.push({id:'',name:'',cities: []})
handleList.push({id:'',name:'',cities: []})
handleList.push({id:'',name:'',cities: []})
handleList.push({id:'',name:'',cities: []})
handleList.push({id:'',name:'',cities: []})
handleList.push({id:'',name:'',cities: []})
handleList.push({id:'',name:'',cities: []})
return handleList return handleList
}, },
......
...@@ -83,9 +83,9 @@ export function jumpEvaluatPage(){ ...@@ -83,9 +83,9 @@ 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 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/'
......
...@@ -32,101 +32,13 @@ ...@@ -32,101 +32,13 @@
<!-- 全部讲师列表 --> <!-- 全部讲师列表 -->
<YqyTeacherList :parmData="parmDataDoctList"/> <YqyTeacherList :parmData="parmDataDoctList"/>
<YqyLecturerSelectContent ref="lecturerSelContRef" :isShowSelectionB="showSelectedPage"/> <YqyLecturerSelectContent
ref="lecturerSelContRef"
:isShowSelectionB="showSelectedPage"
/>
<!--返回顶部--> <!--返回顶部-->
<BackTop v-if="searchFix"/> <BackTop v-if="searchFix"/>
<!-- 全部讲师选择页面 -->
<!-- <mt-popup
v-model="showSelectedPage"
position="top"
> -->
<!-- <section >
<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: 40%" >
<table class="lect-selection-content-rp-tb-left">
<tr v-for="(item, index) in allAreaList" :class="{'bg-white': selectedAreaIndex === index}" @click="selectAreaAction(item, index)" :key="index">
<td >{{item.name}}</td>
</tr>
</table>
</td>
<td style="width: 4%"></td>
<td class="lect-selection-content-rp-tb-tb" style="width: 55%" >
<table >
<tr v-for="(item, index) in allAreaSubList"
@click="selectAreaSubAction(item, index)" :key="index"
>
<td >{{item.name}}</td>
<td style="text-align: right;"><img v-show="item.name && selectedAreaSubIndex === index" 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> -->
<!-- </mt-popup> -->
</div> </div>
</template> </template>
...@@ -252,12 +164,11 @@ export default { ...@@ -252,12 +164,11 @@ export default {
// }), // }),
selectedTypeFromTitle(index) { selectedTypeFromTitle(index) {
this.selectedTypeIndex = index this.selectedTypeIndex = index
this.showSelectedPage = true // commit
this.$refs.lecturerSelContRef.selectedType(index)
this.$refs.lecturerSelContRef.show() this.$refs.lecturerSelContRef.show()
// this.showSelectedPage = true
}, },
// closeSelectedPage() {
// this.showSelectedPage = false
// },
selectedType(index) { selectedType(index) {
this.selectedTypeIndex = index this.selectedTypeIndex = index
// this.$emit('selectedType', index) // this.$emit('selectedType', index)
...@@ -358,99 +269,7 @@ export default { ...@@ -358,99 +269,7 @@ 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()
}
},
} }
</script> </script>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册