wuzhenkun
2021-02-18 b0163a90cc1b62af2ed4d3c1d3fd5661ce0eb054
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
<!doctype html>
<html>
    <head>
        <meta charset="utf-8" />
        <title>医院主页</title>
        <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        
        <!-- js引用 -->
        <script src="../../js/config.js"></script>
        <script src="../../js/h5toapp.js"></script>
        <script src="../../js/h5to.js"></script>
        
        <!-- 组件js引用 -->
        <script src="../../js/mui.min.js"></script>
        <!-- 组件标准css引用 -->
        <link rel="stylesheet" href="../../css/mui.min.css">
        <link rel="stylesheet" href="../../css/mui.picker.min.css">
        <link rel="stylesheet" href="../../css/mui.poppicker.css">
        <!-- css引用 -->
        <link href="../../css/currency.css" rel="stylesheet">
        <link href="../../css/spinkit.css" rel="stylesheet">
        <link href="../../css/icon/iconfont.css" rel="stylesheet">
        <!-- 界面本身css引用 -->
        <link href="./yyhome.css" rel="stylesheet">
        
        <style type="text/css">
            .mui-input-row .mui-input-clear~.mui-icon-clear {
                line-height: 15px;
            }
            
            input::-webkit-input-placeholder {
                color: #9393AC;
                -webkit-text-fill-color: #9393AC;
            }
            .address_list_all::-webkit-scrollbar {
                display: none;
            }
            .tel_list_all::-webkit-scrollbar {
                display: none;
            }
        </style>
    </head>
 
    <body class="app_page">
        <div style="background-color:  #F9FAFC; height: 100vh; width: 100%; margin: 0; overflow: auto;">
            <div id="loading" class="example">
              <div class="sk-plane loading_location"></div>
            </div>
            
            <div class="mui-content">
                    
                    <div style="margin: 16px; box-sizing: border-box;">
                        <div class="mui-card">
                            <div class="z_menu_btn_row" style="height: 262px;line-height: normal;padding: 0;">
                                <div class="top_img">
                                <img id = "hospitalHeadImage" src="../../img/head1.jpg" />
                                </div>
                                <div class="hospital_side">
                                    <span id="hospital_name" class="hospital_name">复旦大学附属华山医院</span>
                                    <div class="label_area">
                                        <div id="label1" class="label1">三级甲等</div>
                                        <div id="label2" class="label2">医保</div>
                                    </div>
                                </div>
                                <button class="appointment_button" onclick="click_row_direct(menurows[0])">预约挂号</button>
                            </div>
                            
                            <div class="z_menu_btn_row" style="height: 100%;line-height: 48px;" onclick="click_address_list()">
                                <div class="" style="float: left;">
                                    <div style="float: left;">
                                    <img src="../../img/Icons/24pt/ic_pin_map.png"/>
                                    </div>
                                    <div class="left_area" style="width: 267px">
                                        <div id="hospitalAddress" class="font_txt">总院:上海市乌鲁木齐中路12号</div>
                                        <div class="distance">到这里15km</div>
                                    </div>
                                </div>
                                <div class="right_area">
                                    <img id="img1" src="../../img/ic_arrow_right.png" />
                                </div>
                                <div id ="departmentName"  class="address_list_all">
                                    <div class="address_list"><span class="address_list_txt">全部一级科室</span></div>
                                    <div class="address_list"><span class="address_list_txt">呼吸科</span></div>
                                    <div class="address_list"><span class="address_list_txt">心血管内科</span></div>
                                    <div class="address_list"><span class="address_list_txt">心血管外科</span></div>
                                </div>
                            </div>
                            <div class="z_menu_btn_row" style="height: 100%;line-height: 48px;" onclick="click_tel_list()">
                                <div class="" style="float: left;">
                                    <div style="float: left;">
                                    <img src="../../img/Path.png"/>
                                    </div>
                                    <div id="hospitalMobile" class="font_txt">021-52889999(本院总机)</div>
                                </div>
                                
                                <div class="right_area">
                                    <img id="img2" src="../../img/ic_arrow_right.png" />
                                </div>
                                <div class="tel_list_all">
                                    <div class="tel_list"><span class="tel_list_txt">021-52889999(本院副机)</span></div>
                                    <div class="tel_list"><span class="tel_list_txt">021-52889999(南院总机)</span></div>
                                
                                </div>
                            </div>
                        </div>
                    </div>
                    
                    <div class="title_txt">医院简介</div>
                    
                    <div style="margin: 16px; box-sizing: border-box;">
                        <div class="mui-card">
                            <div class="z_menu_btn_row" style="height: 100%;line-height: normal;">
                                <div id="hospital_introduction" class="hospital_introduction_txt" style="max-height: 169px;">
                                    <span class="hospital_name">复旦大学附属华山医院创建于1907年,是国家卫生计生委委属医院、复旦大学附属教学医院和中国红十字会冠名的医院,1992年首批通过国家三级甲等医院评审,为全国文明单位,是国内最著名、最具国际化特征的医教研中心之一,也是全国首家通过JCI认证的部属公立医院,在国内外享有很高声誉。复旦大学附属华山医院创建于1907年,是国家卫生计生委委属医院、复旦大学附属教学医院和中国红十字会冠名的医院,1992年首批通过国家三级甲等医院评审,为全国文明单位,是国内最著名、最具国际化特征的医教研中心之一,也是全国首家通过JCI认证的部属公立医院,在国内外享有很高声誉。</span>
                                    
                                </div>
                                <div class="right_area" style="margin: 16px 0;margin-right: 3px;">
                                    <span class="check_all_introduction" onclick="click_expand()">查看全部简介>></span>
                                </div>
                            </div>
                        </div>
                    </div>
                    
                    <div class="title_txt">按科室查找医生:</div>
                    
                <div id="down_frame_locate" style="margin: 16px; box-sizing: border-box;">
                    <div class="mui-card">
                        <div class="z_menu_btn_row" style="height: 59px;line-height: normal;">
                            <div>
                                <div class="z_menu_btn_row " style="height: 66px;line-height: 0;width: 50%;float: left;padding: 0;padding-right: 5%;">
                                    <div  class="sffy_title" onclick="f()">
                                        <span id="select_txt" class="sffy_title_text">请选择</span>
                                        <div class="arrow_down" onclick="">
                                            <img src="../../img/btn/general/arrow/down.png" />
                                        </div>
                                    </div>
                                    
                                        <div id="cover_background" style="width: 100vw;height: 100vh;display: none;position: fixed;z-index: 1;top: 0;left: 0;" onclick="click_hidden()">
                                        <div class="sffy_dropdown" style="width: 37%;left: 32px;">
                                        <div class="sffy_dropdown_style" style="margin-top: 11px;" onclick="click_option(0)"><span class="sffy_dropdown_text">全部二级科室</span></div>
                                        <div class="sffy_dropdown_style" style="margin-top: 11px;" onclick="click_option(2)"><span class="sffy_dropdown_text">心血管内科</span></div>
                                        <div class="sffy_dropdown_style" style="margin-top: 11px;" onclick="click_option(1)"><span class="sffy_dropdown_text">呼吸科</span></div>
                                        <div class="sffy_dropdown_style" onclick="click_option(3)"><span class="sffy_dropdown_text">心血管外科</span></div>
                                        </div>
                                    </div>
                                    
                                </div>
                                
                                <div class="z_menu_btn_row " style="height: 66px;line-height: 0;width: 50%;float: left;padding: 0;padding-right: 5%;">
                                    <div class="sffy_title" onclick="f1()">
                                        <span id="select_txt1" class="sffy_title_text">请选择</span>
                                        <div class="arrow_down" onclick="">
                                            <img src="../../img/btn/general/arrow/down.png" />
                                        </div>
                                    </div>
                                    <div id="cover_background1" style="width: 100vw;height: 100vh;display: none;position: fixed;z-index: 1;top: 0;left: 0;" onclick="click_hidden1()">
                                        <div class="sffy_dropdown1" style="width: 37%;left: 188px;">
                                        <div class="sffy_dropdown_style" style="margin-top: 11px;" onclick="click_option1(0)"><span class="sffy_dropdown_text">全部一级科室</span></div>
                                        <div class="sffy_dropdown_style" style="margin-top: 11px;" onclick="click_option1(1)"><span class="sffy_dropdown_text">呼吸科</span></div>
                                        <div class="sffy_dropdown_style" style="margin-top: 11px;" onclick="click_option1(2)"><span class="sffy_dropdown_text">心血管内科</span></div>
                                        <div class="sffy_dropdown_style" onclick="click_option1(3)"><span class="sffy_dropdown_text">心血管外科</span></div>
                                        </div>
                                    </div>
                                </div>
                                
                            </div>
                        </div>
                    </div>
                </div>
                
                <div style="margin: 16px; box-sizing: border-box;">
                    <div class="mui-card">
                        <div id="doctor_area"></div>
                    </div>
                </div>
                
                </div>
            </div>
        
        
        <script type="text/javascript" src="../../js/mui.picker.min.js"></script>
        <script type="text/javascript" src="../../js/mui.poppicker.js"></script>
        <script type="text/javascript">
            mui.init({
                swipeBack: true //启用右滑关闭功能
            });
            //1. data
            
            var hospital = {};
            var doctorInfo = [
                {id: "1", doctorName: "陈维", profession: "主任医师", hospital: "上海第十人民医院", department: "心内科", img: "../../img/组%201.png", status: "直播中"},
                {id: "2", doctorName: "陈维", profession: "主任医师", hospital: "上海第十人民医院", department: "心内科", img: "../../img/组%201.png", status: "直播中"},
                {id: "3", doctorName: "陈维", profession: "主任医师", hospital: "上海第十人民医院", department: "心内科", img: "../../img/组%201.png", status: "直播中"},
                {id: "4", doctorName: "陈维", profession: "主任医师", hospital: "上海第十人民医院", department: "心内科", img: "../../img/组%203.png", status: "在线"},
                {id: "5", doctorName: "陈维", profession: "主任医师", hospital: "上海第十人民医院", department: "心内科", img: "", status: ""}
            ];
            
            var doctorInfoOBJ = {};
            
            var menurows = [
                {id: "1", name: "医院主页", path: "./",_id: 1001},//查看医院主页
                {id: "2", name: "智能导诊", path: "./",_id: 10},//智能导诊
            ];
            
            setRouteParams({userId: "1352141846545367042",params: {"hospitalId":"1285906997284376577"}});
            //2.function
            function initPage() {
                doctorInfoOBJ = {};
                doctorInfo.map(e=> {
                    doctorInfoOBJ[e.id] = e;
                })
                
                var doctor_list = document.getElementById('doctor_area');
                var doctor_data = "";
                for (var i = 0; i < doctorInfo.length; i++) {
                    var doctor_data1 = 
                '<div class="z_menu_btn_row" onclick="click_row('+"'" + doctorInfo[i].id + "'"+')" style="height: 120px;line-height: normal;">'+
                    '<div class="left_area">'+
                    '<img src="../../img/head.png" />'+
                    '</div>'+
                    '<div class="left_area">'+
                        '<div style="margin-top: 16px;">'+
                        '<div class="doctor_name">'+doctorInfo[i].doctorName+'</div>'+
                        '<div class="doctor_message" style="width: 61px;height: 17px;border-radius: 6px;border: 1px solid #FA6400;-webkit-text-fill-color: #FA6400;padding: 0 3px">'+doctorInfo[i].profession+'</div>'+
                        '<div class="doctor_message">'+doctorInfo[i].hospital+'</div>'+
                        '<div class="doctor_message">'+doctorInfo[i].department+'</div>'+
                        '</div>'+
                    '</div>'+
                    '<div class="right_area" style="margin: 23px 0;text-align: center;">'+
                        '<img src="'+doctorInfo[i].img+'" />'+
                        '<div class="live_status">'+doctorInfo[i].status+'</div>'+
                    '</div>'+
                '</div>'
                    
                    doctor_data += doctor_data1
                }
                    doctor_list.innerHTML = doctor_data;
            }
            
            function click_row(idStr) {
                var row = doctorInfoOBJ[idStr];
                if(row.status == "直播中"){
                var pam = { 
                    _id: 2001,
                    params:{
                        userId: login_data.userId
                     }
                   };
                }else {
                    var pam = {
                        _id: 1056,
                        params:{
                            userId: login_data.userId
                         }
                       };
                }
                app_click("route", pam, callback);
            }
            
            function click_row_direct(row) {
                
                var pam = { 
                    _id: row._id,
                    params:{
                        userId: login_data.userId
                     }
                   };
                app_click("route", pam, callback);
            }
            
            function click_expand(){
                if(document.getElementById('hospital_introduction').style.maxHeight == '169px'){
                document.getElementById('hospital_introduction').style.maxHeight = 'none';
                }else {
                document.getElementById('hospital_introduction').style.maxHeight = '169px';
                }
            }
            
            function click_hidden(){
                document.getElementsByClassName('sffy_dropdown')[0].classList.toggle('sffy_down');
                document.getElementById('cover_background').style.display = "none";
            }
            function click_hidden1(){
                document.getElementsByClassName('sffy_dropdown1')[0].classList.toggle('sffy_down');
                document.getElementById('cover_background1').style.display = "none";
            }
 
            function click_tel_list() {
                document.getElementById('img2').style.transform = 'rotate(90deg)';
                document.getElementsByClassName('tel_list_all')[0].classList.toggle('tel_down');
                if (document.getElementsByClassName('tel_list_all')[0].classList.contains('tel_down')) {
                    setTimeout(function() {
                        document.getElementsByClassName('tel_list_all')[0].style.overflow = 'overlay';
                        // document.getElementsByClassName('tel_list_all')[0].style.border = '1px solid #F2F2F2';
                    }, 100)
                } else {
                    document.getElementsByClassName('tel_list_all')[0].style.overflow = 'hidden';
                    document.getElementsByClassName('tel_list_all')[0].style.border = '0px solid #F2F2F2';
                    document.getElementById('img2').style.transform = 'rotate(0deg)';
                }
            }
            
            function click_address_list() {
                document.getElementById('img1').style.transform = 'rotate(90deg)';
                document.getElementsByClassName('address_list_all')[0].classList.toggle('address_down');
                if (document.getElementsByClassName('address_list_all')[0].classList.contains('address_down')) {
                    setTimeout(function() {
                        document.getElementsByClassName('address_list_all')[0].style.overflow = 'overlay';
                        // document.getElementsByClassName('address_list_all')[0].style.border = '1px solid #F2F2F2';
                    }, 100)
                } else {
                    document.getElementsByClassName('address_list_all')[0].style.overflow = 'hidden';
                    document.getElementsByClassName('address_list_all')[0].style.border = '0px solid #F2F2F2';
                    document.getElementById('img1').style.transform = 'rotate(0deg)';
                }
            }
            
            
            function f() {
                var domObj = document.getElementById('down_frame_locate');
                var aa=domObj.getBoundingClientRect().top;
                document.getElementsByClassName('sffy_dropdown')[0].style.top=aa+55+"px";
                
                document.getElementById('cover_background').style.display = "block";
                document.getElementsByClassName('sffy_dropdown')[0].classList.toggle('sffy_down');
                if (document.getElementsByClassName('sffy_dropdown')[0].classList.contains('sffy_down')) {
                    setTimeout(function() {
                        document.getElementsByClassName('sffy_dropdown')[0].style.overflow = 'overlay';
                        document.getElementsByClassName('sffy_dropdown')[0].style.border = '1px solid #F2F2F2';
                    }, 100)
                } else {
                    document.getElementsByClassName('sffy_dropdown')[0].style.overflow = 'hidden';
                    document.getElementsByClassName('sffy_dropdown')[0].style.border = '0px solid #F2F2F2';
                }
            }
            
            function f1() {
                var domObj = document.getElementById('down_frame_locate');
                var aa=domObj.getBoundingClientRect().top;
                
                document.getElementsByClassName('sffy_dropdown1')[0].style.top=aa+55+"px";
                
                document.getElementById('cover_background1').style.display = "block";
                document.getElementsByClassName('sffy_dropdown1')[0].classList.toggle('sffy_down');
                if (document.getElementsByClassName('sffy_dropdown1')[0].classList.contains('sffy_down')) {
                    setTimeout(function() {
                        document.getElementsByClassName('sffy_dropdown1')[0].style.overflow = 'overlay';
                        document.getElementsByClassName('sffy_dropdown1')[0].style.border = '1px solid #F2F2F2';
                    }, 100)
                } else {
                    document.getElementsByClassName('sffy_dropdown1')[0].style.overflow = 'hidden';
                    document.getElementsByClassName('sffy_dropdown1')[0].style.border = '0px solid #F2F2F2';
                }
            }
            
            function click_option(e){
                if(e == 0){
                    document.getElementById('select_txt').innerText = "全部一级科室";
                }else {
                    document.getElementById('select_txt').innerText = "心内科";
                }
                
                document.getElementsByClassName('sffy_dropdown')[0].style.overflow = 'hidden';
                document.getElementsByClassName('sffy_dropdown')[0].style.border = '0px solid #F2F2F2';
                document.getElementsByClassName('sffy_dropdown')[0].classList.toggle('sffy_down');
            }
            function click_option1(e){
                if(e == 0){
                    document.getElementById('select_txt1').innerText = "全部一级科室";
                }else {
                    document.getElementById('select_txt1').innerText = "心内科";
                }
                
                document.getElementsByClassName('sffy_dropdown')[0].style.overflow = 'hidden';
                document.getElementsByClassName('sffy_dropdown')[0].style.border = '0px solid #F2F2F2';
                document.getElementsByClassName('sffy_dropdown')[0].classList.toggle('sffy_down');
            }
            
            function loadData() {
                ajaxGet('doctor/api/hospital/query/home/' + login_data.params.hospitalId, function(result) {
                    if (result) {
                        console.info(result);
                        hospital = result.data
                    }
                    doLoadData();
                    hideloading("loading");
                });
                ajaxGet('search/api/query/department/one/hospital/id/' + login_data.params.hospitalId, function(result) {
                    if (result) {
                        console.info(result);
                        department = result.data
                    }
                    doLoadData();
                    hideloading("loading");
                });
            }
            
            function doLoadData(){
                document.getElementById('hospitalHeadImage').src = hospital.hospitalHeadImage;
                document.getElementById('hospital_name').innerHTML = hospital.hospitalName;
                document.getElementById('hospital_introduction').innerHTML = hospital.hospitalIntroduce;
                document.getElementById('label1').innerHTML = hospital.hospitalLevel;
                document.getElementById('hospitalAddress').innerHTML = hospital.hospitalAddress;
                document.getElementById('hospitalMobile').innerHTML = hospital.hospitalMobile;
                
                document.getElementById('departmentName').classList.replace(department.mediDiseaseClassifyId01,department.mediDiseaseClassifyName01);
            }
            
            //3. run
            mui.ready(function() {
                onInitReady(function() {
                    // setRightBtn("rightBtn", {_id: 3000}, callback);
                    initPage();
                    loadData();
                });
            })
            
        </script>
    </body>
 
</html>