Prechádzať zdrojové kódy

首页快速挂号对接

ljj 7 rokov pred
rodič
commit
80f4c29cdd

+ 27 - 4
page/home/css/index.css

@ -1,12 +1,13 @@
.item img{
    height: 450px!important;
    /* height: 450px!important; */
    width: 100%!important
}
.fc{
    display: flex;
    display: -webkit-flex; 
    align-items: center;
    justify-content: center
    justify-content: center;
    flex-wrap: wrap
}
.fcolumn{
    display: flex;
@ -18,9 +19,12 @@
.carousel-indicators .active{
    width: 36px;
}
.box_container{
    overflow: hidden;
.box_container:after {
    clear: both;
}
.box{
    width:414px;
    height: 366px;
@ -29,6 +33,9 @@
    float: left;
    margin-right: 20px
}
.lastBox{
  margin-right:0
}
.box_head{
    padding: 20px 24px 0  20px
}
@ -127,4 +134,20 @@
}
.mb60{
    margin-bottom: 60px
}
.dropdown-menu{
    max-height:300px ;
    overflow: auto;
}
@media (min-width: 1300px){
    .container {
        width: 1300px;
    }
}
@media (max-width: 943px){
    .lastBox{
        margin-right:20px
    }
}

+ 21 - 20
page/home/html/index.html

@ -43,7 +43,7 @@
        </div>
        <div class="fc mb60">
            <div class="index_wrap">
                <div class="box_container">
                <div class="box_container fc fwrap">
                    <div class="box">
                        <div class="box_head">
                            <span class="box_title">我的就诊</span>
@ -51,7 +51,7 @@
                        </div>
                        <div class="box_content">下载APP已便获取提醒消息,我们诚邀您对每一次就诊进行评价,帮助我们提供更好的服务</div>
                        <div class="box_bottom">
                            <button class="box_button">查看详情</button>
                            <button class="box_button" @click="goMyJiuZhen">查看详情</button>
                            <img src="../image/p1.png">
                        </div>
                    </div>
@ -66,68 +66,68 @@
                            <img src="../image/p2.png">
                        </div>
                    </div>
                    <div class="box" style="margin-right:0">
                    <div class="box lastBox" >
                        <div class="box_head">
                            <span class="box_title">快速节约</span>
                            <span class="box_title_remark">节省80%就医时间</span>
                        </div>
                        <div class="fcolumn">
                            <div class="dropdown" style="margin-top:30px">
                                <a type="button" class="btn dropdown-toggle box_select" id="dropdownMenu1" data-toggle="dropdown">{{yuYue.hospital || '请选择医院'}}
                                <a type="button" class="btn dropdown-toggle box_select" id="dropdownMenu1" data-toggle="dropdown">{{YiYuan.hosName || '请选择医院'}}
                                    <span class="caret"></span>
                                </a>
                                <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
                                    <li role="presentation" >
                                        <a role="menuitem" tabindex="-1"  @click="setYiYuan('Java')">Java</a>
                                    <li role="presentation"  v-for="(item,i) in YiYuanArr">
                                        <a role="menuitem" tabindex="-1"  @click="setYiYuan(item)">{{item.hosName}}</a>
                                    </li>
                                    
                                </ul>
                            </div>
                            <div class="dropdown">
                                <a type="button" class="btn dropdown-toggle box_select" id="dropdownMenu2" data-toggle="dropdown">{{yuYue.hospital || '请选择科室'}}
                                <a type="button" class="btn dropdown-toggle box_select" id="dropdownMenu2" data-toggle="dropdown">{{KeShi.deptName   ||  '请选择科室'}}
                                    <span class="caret"></span>
                                </a>
                                <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu2">
                                    <li role="presentation" >
                                        <a role="menuitem" tabindex="-1"  @click="setYiYuan('Java')">Java</a>
                                    <li role="presentation"  v-for="(item,i) in KeShiArr">
                                        <a role="menuitem" tabindex="-1"  @click="setKeShi(item)">{{item.deptName}}</a>
                                    </li>
                                    
                                </ul>
                            </div>
                            <div class="dropdown">
                                <a type="button" class="btn dropdown-toggle box_select" id="dropdownMenu3" data-toggle="dropdown">{{yuYue.hospital || '请选择医生'}}
                                <a type="button" class="btn dropdown-toggle box_select" id="dropdownMenu3" data-toggle="dropdown">{{YiSheng.doctorName  ||  '请选择医生'}}
                                    <span class="caret"></span>
                                </a>
                                <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu3">
                                    <li role="presentation" >
                                        <a role="menuitem" tabindex="-1"  @click="setYiYuan('Java')">Java</a>
                                    <li role="presentation"  v-for="(item,i) in YiShengArr">
                                        <a role="menuitem" tabindex="-1"  @click="setYiSheng(item)">{{item.doctorName}}</a>
                                    </li>
                                    
                                </ul>
                            </div>
                            <button class="box_largeBtn">立即挂号</button>
                            <button class="box_largeBtn" @click="save">立即挂号</button>
                        </div>
        
                    </div>
                </div>
                <div class="frendBox">
                    <div class="frendBox_head">友情链接</div>
                    <div class="frendBox_content">
                    <div class="frendBox_head ml20">友情链接</div>
                    <div class="frendBox_content fc fwrap">
                        <div class="frendBox_content_box fc">
                            <img src="../image/frend_logo.png">
                            <span>国家卫生与计划生育委员会</span>
                        </div>
                        <div class="frendBox_content_box fc">
                            <img src="../image/frend_logo.png">
                            <span>国家卫生与计划生育委员会</span>
                            <span>江西省卫生与计划生育委员会</span>
                        </div>
                        <div class="frendBox_content_box fc">
                            <img src="../image/frend_logo.png">
                            <span>国家卫生与计划生育委员会</span>
                            <span>上饶市卫生与计划生育委员会</span>
                        </div>
                        <div class="frendBox_content_box fc">
                            <img src="../image/frend_logo.png">
                            <span>国家卫生与计划生育委员会</span>
                            <img src="../image/icon_logo.png">
                            <span>健康上饶医生工作管理平台</span>
                        </div>
                    </div>       
                </div>
@ -143,8 +143,9 @@
    <script src="../../../js/es6-promise.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../../js/underscore.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../../js/util.js" type="text/javascript" charset="utf-8"></script>
    <!--<script src="../../api/http-request.js" type="text/javascript" charset="utf-8"></script>-->
    <script src="../../../api/http-request.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../../plugins/artDialog/6.0.5/api/js/dialog-plus.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../../api/patient/appointment-api.js"></script>
    <script src="../../../component/common/header.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../../component/common/footer.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../../component/common/event-bus.js" type="text/javascript" charset="utf-8"></script>

BIN
page/home/image/icon_logo.png


+ 157 - 12
page/home/js/index.js

@ -1,23 +1,168 @@
$(function () {
$(function(){
  
    new Vue({
        el: "#main",
        data: {
            yuYue:{
               hospital:''
            }
            YiYuan: {
                hosName: '',
                hospitalId: ''
            },
            YiYuanArr: [],
            KeShi: {
                deptName: '',
                hosDeptId: ''
            },
            KeShiArr: [],
            YiSheng: {
                doctorName: '',
                doctorSn: ''
            },
            YiShengArr: [],
        },
        mounted: function() {
            $("#myCarousel").carousel('cycle')
        mounted() {
            $("#myCarousel").carousel('cycle');
            this.getYiYuan();
            //从缓存获取前一个页面缓存的信息
            var dateInfo = window.localStorage.getItem("dateInfo"),
                numberInfo = window.localStorage.getItem("numberInfo"),
                patientInfo = window.sessionStorage.getItem("oauthInfo");
            if (patientInfo) {
                patientInfo = JSON.parse(patientInfo);
                this.patientInfo = patientInfo;
            }
            if (numberInfo) {
                numberInfo = JSON.parse(numberInfo);
                this.numberInfo = numberInfo;
            }
        },
        methods: {
            setYiYuan: function(value){
                this.yuYue.hospital = value
            setYiYuan(value) {
                console.log(value);
                this.YiYuan.hosName = value.hosName;
                this.YiYuan.hospitalId = value.hospitalId;
                var vm = this;
                var params = {
                    pageIndex: 1,
                    pageSize: 99,
                    hospitalId: this.YiYuan.hospitalId
                }
                appointmentAPI.querySimpleHosDeptList(params).then(function (res) {
                    console.log(res);
                    if (res.successFlg && res.obj.Code == "10000") {
                        vm.KeShiArr = res.obj.Result;
                        vm.KeShi.deptName = '';
                        vm.KeShi.hosDeptId = '';
                        vm.YiShengArr = [];
                        vm.YiSheng.doctorName = '';
                        vm.YiSheng.doctorUid = '';
                    }
                }).catch(function (err) {
                    consolel.log(err)
                })
            },
            setKeShi(value) {
                console.log(value);
                if (!this.YiYuan.hospitalId) {
                    alert('请先选择医院')
                    return
                }
                this.KeShi.deptName = value.deptName;
                this.KeShi.hosDeptId = value.hosDeptId;
                //查询医生总数
                var vm = this;
                var params = {
                    pageIndex: 1,
                    pageSize: 99,
                    hospitalId: vm.YiYuan.hospitalId,
                    hosDeptId: vm.KeShi.hosDeptId
                }
                appointmentAPI.querySimpleDoctorList(params).then(function (res) {
                    console.log(res);
                    if (res.successFlg && res.obj.Code == "10000") {
                        if (!res.obj.Result) {
                            res.obj.Message && alert(res.obj.Message)
                        } else {
                            vm.YiShengArr = res.obj.Result;
                            vm.YiSheng.doctorName = '';
                            vm.YiSheng.doctorUid = '';
                        }
                        //获取医生排班数据
                    }
                })
            },
            setYiSheng(value) {
                console.log(value);
                if (!this.KeShi.hosDeptId) {
                    alert('请先选择科室')
                    return
                }
                this.YiSheng.doctorName = value.doctorName;
                this.YiSheng.doctorSn = value.doctorSn;
            },
            goMyJiuZhen() {
                window.location.href = '../../mineJiuZhen/html/mineJiuZhen.html'
            },
            getYiYuan() {
                var params = {
                        pageIndex: 1,
                        pageSize: 99,
                        provinceCode: 360000,
                        cityCode: 361100
                    },
                    vm = this;
                appointmentAPI.querySimpleHospitalList(params).then(function (res) {
                    console.log(res);
                    if (res.successFlg && res.obj.Code == "10000") {
                        vm.YiYuanArr = res.obj.Result;
                    }
                }).catch(function (err) {
                    console.error(err)
                })
            },
            save() {
                if (!this.YiYuan.hospitalId) {
                    alert('请选择医院')
                    return
                } else if (!this.KeShi.hosDeptId) {
                    alert('请选择科室')
                    return
                } else if (!this.YiSheng.doctorSn) {
                    alert('请选择医生')
                    return
                }
                 var userInfo = this.patientInfo,
                baseInfo = this.baseInfo,
                dateInfo = this.dateInfo,
                numberInfo = this.numberInfo;
                var params = {
                    thirdPartyUserId: userInfo.id,
                    patientName: userInfo.realName,
                    tel: userInfo.telephone,
                    IP: returnCitySN.cip, //通过搜狐接口获得ip地址
                    cardNo: userInfo.idCardNo,
                    modeId: dateInfo.modeId,
                    hospitalId: this.YiYuan.hospitalId,
                    hospitalName: this.YiYuan.hosName,
                    hosDeptId: this.KeShi.hosDeptId,
                    hosDeptName:  this.KeShi.deptName,
                    doctorSn: this.YiSheng.doctorSn,
                    doctorName: this.YiSheng.doctorName,
                    numberSn: numberInfo.numberSN,
                    numberPrice: dateInfo.specialPrice,
                    thirdPartyOrderId: "",
                    registerDate: dateInfo.registerDate,
                    timeId: dateInfo.timeId,
                    commendTime: numberInfo.commendTime,
                    serialNo: numberInfo.serialNo
                }
                appointmentAPI.createRegOrderForOpen(params).then(function(res){
                });
            }
        }
    })
})
})