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
<!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">
        <!-- 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="./consultDoctorTeam2.css" rel="stylesheet">
 
        <style type="text/css">
        </style>
    </head>
 
    <body class="app_page">
        <div style="background-color:  #ECEDEE; 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" style="background-color:  #ECEDEE; ">
                <div class="z_head">
                    <div id="msgTime"></div>
                </div>
                <div class="z_body">
                    <div class="z_body_left">
                        <img id="headPortrait" />
                    </div>
                    <div class="z_body_right">
                        <img src="../../img/bg (1).png" />
                        <div class="z_body_right_text" id="msg1"></div>
                    </div>
 
                </div>
                <div class="z_foot">
                    <div class="z_body_left">
                        <img id="headPortrait1" />
                    </div>
                    <div class="z_body_right">
                        <img src="../../img/bg (1).png" />
                        <div class="z_foot_right_text" id="msg2"></div>
                    </div>
                </div>
 
                <div class="z_cz">
                    <div class="z_ws" >
                        完善健康信息
 
                    </div>
                    <div class="z_next" >
                            下一步
                    </div>
                </div>
            </div>
        </div>
 
 
        <script type="text/javascript">
            mui.init({
                swipeBack: true //启用右滑关闭功能
            });
            
            //1. data
            var client = {};
            var doctor = {};
            var msgTime = "9:40 AM";
            var headPortrait = "../../img/head1.jpg";
            var hz_name = "张翠山";
            var ys_name = "陈维";
            var department = "心内科";
            var labelInfo = [{
                    id: "1",
                    name: "张无忌",
                    role: "自己",
                }, {
                    id: "2",
                    name: "张翠山",
                    role: "父亲",
                }, {
                    id: "3",
                    name: "殷素素",
                    role: "母亲",
                },
            ];
 
            var menurows = [{
                    id: "1",
                    name: "选择疾病类型",
                    path: "./myzs",
                    _id: 10
                }, {
                    id: "2",
                    name: "详细信息",
                    path: "./ysxx"
                }, {
                    id: "3",
                    name: "门诊排班",
                    path: "./mzpb"
                }, {
                    id: "4",
                    name: "共享的随访量表",
                    path: "./sflb"
                },
            ];
            
            setRouteParams({userId: "1352141846545367042",params: {"doctorId": "1285860235186212865"}});
            //2.function
            function initPage() {
                document.getElementById('msgTime').innerText = msgTime;
                document.getElementById('headPortrait').src = headPortrait;
                //document.getElementById('msg1').innerText = "您好,我是" + department + "医生" + ys_name + ",感谢您的信任!请选择一名亲属开始咨询。";
                //document.getElementById('msg2').innerText = "您已选择亲属为" + hz_name + ",为确保给您提供较准确的医学建议,请尽快完善患者的健康信息。";
            }
 
            function click_row(row) {
                var pam = {
                    _id: row._id,
                    params: {
                        userId: login_data.userId
                    }
                };
                app_click("route",pam,callback);
            }
 
            function click_select(e) {
                if (e.getAttribute('class') == "disease_label_txt") {
                    document.getElementById(e.id).classList.replace("disease_label_txt", "disease_label_sel");
                } else {
                    document.getElementById(e.id).classList.replace("disease_label_sel", "disease_label_txt");
                }
                for (var i = 0; i < labelInfo.length; i++) {
                    if (document.getElementById(labelInfo[i].id).className != "next_btn") {
                        var button = document.getElementById('next_button');
                        button.classList.replace('next_btn_txt', 'next_btn');
                        break;
                    } else {
                        button.classList.replace('next_btn', 'next_btn_txt');
                    }
                }
            }
            
            function loadData() {
                ajaxGet('doctor/api/query/' + login_data.params.doctorId, function(result) {
                    if (result) {
                        console.info(result);
                        doctor = result.data
                    }
                    doLoadData();
                    hideloading("loading");
                });
                ajaxPost('client/api/patient/getById',{id: login_data.userId}, function(result) {
                    if (result) {
                        console.info(result);
                        client = result.data
                    }
                    doLoadData();
                    hideloading("loading");
                });
            }
            
            function doLoadData() {
                document.getElementById('msgTime').innerText = msgTime;
                document.getElementById('headPortrait').src = doctor.doctorAvatar;;
                document.getElementById('msg1').innerText = "您好,我是" + doctor.mediDiseaseClassifyName01 + "医生" + doctor.doctorName + ",感谢您的信任!请选择一名亲属开始咨询。";
                document.getElementById('msg2').innerText = "您已选择亲属为" + client.patientName + ",为确保给您提供较准确的医学建议,请尽快完善患者的健康信息。";
                document.getElementById('headPortrait1').src = client.avatar;
            }
            
            //3. run
            mui.ready(function() {
                onInitReady(function() {
                    // setRightBtn("rightBtn", {_id: 3000}, callback);
                    initPage();
                    loadData();
                });
            })
        </script>
    </body>
</html>