caixing200 5 лет назад
Родитель
Сommit
6299609043

+ 13 - 3
whepi-ui/templates/home/home.ftl

@@ -412,7 +412,9 @@
             window.addEventListener("resize", function () {
                 if (document.activeElement.tagName == "INPUT" || document.activeElement.tagName == "TEXTAREA") {
                     window.setTimeout(function () {
-                        document.activeElement.scrollIntoViewIfNeeded();
+                        if(document.activeElement && document.activeElement.scrollIntoViewIfNeeded){
+                            document.activeElement.scrollIntoViewIfNeeded();
+                        }
                     }, 0);
                 }
             });
@@ -426,8 +428,16 @@
                 }
             })
         }else {
-            ;(/iphone|ipod|ipad/i.test(navigator.appVersion)) && document.addEventListener('blur', (e) => {
-                ['input', 'textarea'].includes(e.target.localName) && document.body.scrollIntoView(false)
+            ;(/iphone|ipod|ipad/i.test(navigator.appVersion)) && document.addEventListener('blur', function(e) {
+                //console.log(e,'event');
+                var tempList = ['input', 'textarea'];
+                $.each(tempList,function (i,v) {
+                    var name = e.target.localName
+                    if(name && name == v){
+                        document.body.scrollIntoView(false)
+                    }
+                })
+                //['input', 'textarea'].includes(e.target.localName) && document.body.scrollIntoView(false)
             }, true)
         }
         function isAndroidFun() {

+ 5 - 5
whepi-ui/templates/home/htlpXq.ftl

@@ -108,7 +108,7 @@
 
     function send() {
 
-        let qzcontent = $('#qz_content').val();
+        var qzcontent = $('#qz_content').val();
         if (qzcontent.length <= 0) {
             $.alert("请输入内容");
             return;
@@ -150,15 +150,15 @@
                 console.log("---返回数据---", data);
 
                 if (task.taskStatus == 2) {
-                    for (let i = 0; i < data.data.length; i++) {
-                        let reply = data.data[i];
+                    for (var i = 0; i < data.data.length; i++) {
+                        var reply = data.data[i];
                         $("#qz_doing_detail").append('<p class="weui-media-box__desc">' + reply.nickName + '&emsp;' + reply.timeUpdate + '</p>\n' +
                                 '        <h4 class="weui-media-box__title">' + reply.replyContent + '</h4><br>');
                     }
                 }
                 else if (task.taskStatus == 3) {
-                    for (let i = 0; i < data.data.length; i++) {
-                        let reply = data.data[i];
+                    for (var i = 0; i < data.data.length; i++) {
+                        var reply = data.data[i];
                         $("#qz_done_detail").append('<p class="weui-media-box__desc">' + reply.nickName + '&emsp;' + reply.timeUpdate + '</p>\n' +
                                 '        <h4 class="weui-media-box__title">' + reply.replyContent + '</h4><br>');
                     }

+ 38 - 39
whepi-ui/templates/home/ribao.ftl

@@ -56,7 +56,6 @@
                        </span><br/> <span style="color: red;font-size:20px" id="txt_shangbaotime">
                        </span>
                                 <a id="btn_shangbao" class="weui-btn weui-btn_primary" href="javascript:"
-                                   id="showTooltips"
                                    style="background-color: #D9D9D9;width: 200px"
                                    onclick="addReport()">上报</a>
                                 <a id="btnAdd" class="weui-btn weui-btn_primary" href="javascript:"
@@ -68,7 +67,7 @@
                                 <div class="weui-loadmore weui-loadmore_line" style="margin: 20px 0 0 0;width: 100%;height: 20px;">
                                     <span class="weui-loadmore__tips">基本信息</span>
                                 </div>
-                            <div style="display:flex; flex-direction: row; justify-content: space-between;">
+                            <div style="display:flex;display: -webkit-flex; flex-direction: row; -webkit-flex-direction: row;justify-content: space-between;-webkit-justify-content: space-between;">
                                 <input id="js_input_user_name" class="weui-input" autofocus="" type="text"
                                        placeholder="请输入姓名"
                                        maxlength="20"
@@ -83,9 +82,9 @@
                                        maxlength="3"
                                        style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 30px; width: 25%; text-align: center;"/>
                             </div>
-                            <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 10px;">
-                                <div style="color: gray;height: 30px; line-height: 30px; flex:8;">体温</div>
-                                <div class="weui-cells_checkbox" style="flex: 7">
+                            <div style="display:flex; display: -webkit-flex;flex-direction: row; -webkit-flex-direction: row;justify-content: space-between; -webkit-justify-content: space-between;margin-top: 10px;">
+                                <div style="color: gray;height: 30px; line-height: 30px; flex:8;-webkit-flex: 8;">体温</div>
+                                <div class="weui-cells_checkbox" style="flex: 7;-webkit-flex: 7;">
                                     <label class="weui-radio weui-cell_active weui-check__label" for="s60" style="padding: 10px 0 10px 10px;">
                                         <input type="radio" name="radio5" value="0" class="weui-check" id="s60"
                                                style="width: 10%"/>
@@ -172,7 +171,7 @@
                                         </div>
                                     </label>
                                 </div>
-                                <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 10px;">
+                                <div style="display:flex; display: -webkit-flex;flex-direction: row; -webkit-flex-direction: row;justify-content: space-between; -webkit-justify-content: space-between;margin-top: 10px;">
                                     <div style="color: black;height: 30px;line-height: 30px; width: 35%;">健康情况</div>
                                     <input id="js_input_user_status"
                                            class="weui-input" autofocus=""
@@ -190,12 +189,12 @@
                                     <span class="weui-loadmore__tips">病情描述</span>
                                 </div>
 
-                            <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 5px;">
-                                <div style="color: gray;height: 30px; line-height: 30px; flex: 8">新冠肺炎</div>
+                            <div style="display:flex; display: -webkit-flex;flex-direction: row; -webkit-flex-direction: row;justify-content: space-between; -webkit-justify-content: space-between;margin-top: 5px;">
+                                <div style="color: gray;height: 30px; line-height: 30px; flex: 8;-webkit-flex: 8;">新冠肺炎</div>
                             <#--<input id="switchQuezhen" class="weui-input" autofocus="" type="text" placeholder="请选择"-->
                             <#--maxlength="20"-->
                             <#--style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 30px;"/>-->
-                                <div class="weui-cells_checkbox" style="flex: 5">
+                                <div class="weui-cells_checkbox" style="flex: 5;-webkit-flex: 5;">
                                     <label class="weui-radio weui-cell_active weui-check__label" for="s18" style="padding: 10px 0 10px 10px;">
                                         <input type="radio" name="radio" value="0" class="weui-check" id="s18"
                                                style="width: 10%"/>
@@ -242,54 +241,54 @@
                         <#--style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;"/>-->
                         <#--</div>-->
                         <#--</div>-->
-                            <div id="js_input_user_xinguan_view" style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 5px;">
+                            <div id="js_input_user_xinguan_view" style="display:flex; display: -webkit-flex;flex-direction: row; -webkit-flex-direction: row;justify-content: space-between; -webkit-justify-content: space-between;margin-top: 5px;">
                                 <div style="color: gray;height: 30px; line-height: 30px; width: 35%;">新冠现象</div>
                                 <input id="js_input_user_xinguan" class="weui-input" autofocus="" type="text"
                                        placeholder="请选择"
                                        maxlength="20"
                                        style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 30px;"/>
                             </div>
-                            <div id="js_input_user_kesou_view" style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 5px;">
+                            <div id="js_input_user_kesou_view" style="display:flex; display: -webkit-flex;flex-direction: row; -webkit-flex-direction: row;justify-content: space-between; -webkit-justify-content: space-between;margin-top: 5px;">
                                 <div style="color: gray;height: 30px; line-height: 30px; width: 35%;">咳嗽现象</div>
                                 <input id="js_input_user_kesou" class="weui-input" autofocus="" type="text"
                                        placeholder="请选择"
                                        maxlength="20"
                                        style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 30px;"/>
                             </div>
-                            <div id="js_input_user_jirou_view" style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 5px;">
+                            <div id="js_input_user_jirou_view" style="display:flex; display: -webkit-flex;flex-direction: row; -webkit-flex-direction: row;justify-content: space-between; -webkit-justify-content: space-between;margin-top: 5px;">
                                 <div style="color: gray;height: 30px;line-height: 30px; width: 35%;">肌肉酸痛</div>
                                 <input id="js_input_user_jirou" class="weui-input" autofocus="" type="text"
                                        placeholder="请选择"
                                        maxlength="20"
                                        style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 30px;"/>
                             </div>
-                            <div id="js_input_user_huxi_view" style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 5px;">
+                            <div id="js_input_user_huxi_view" style="display:flex; display: -webkit-flex;flex-direction: row; -webkit-flex-direction: row;justify-content: space-between; -webkit-justify-content: space-between;margin-top: 5px;">
                                 <div style="color: gray;height: 30px;line-height: 30px; width: 35%;">呼吸困难</div>
                                 <input id="js_input_user_huxi" class="weui-input" autofocus="" type="text"
                                        placeholder="请选择"
                                        maxlength="20"
                                        style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 30px;"/>
                             </div>
-                            <div id="js_input_user_fali_view" style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 5px;">
+                            <div id="js_input_user_fali_view" style="display:flex; display: -webkit-flex;flex-direction: row; -webkit-flex-direction: row;justify-content: space-between; -webkit-justify-content: space-between;margin-top: 5px;">
                                 <div style="color: gray;height: 30px; line-height: 30px; width: 35%;">乏力现象</div>
                                 <input id="js_input_user_fali" class="weui-input" autofocus="" type="text"
                                        placeholder="请选择"
                                        maxlength="20"
                                        style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 30px;"/>
                             </div>
-                            <div id="js_input_user_fuxie_view" style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 5px;">
+                            <div id="js_input_user_fuxie_view" style="display:flex; display: -webkit-flex;flex-direction: row; -webkit-flex-direction: row;justify-content: space-between; -webkit-justify-content: space-between;margin-top: 5px;">
                                 <div style="color: gray;height: 30px; line-height: 30px; width: 35%;">腹泻现象</div>
                                 <input id="js_input_user_fuxie" class="weui-input" autofocus="" type="text"
                                        placeholder="请选择"
                                        maxlength="20"
                                        style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 30px;"/>
                             </div>
-                            <div id="shuruqita_view" style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 5px;">
+                            <div id="shuruqita_view" style="display:flex; display: -webkit-flex;flex-direction: row; -webkit-flex-direction: row;justify-content: space-between; -webkit-justify-content: space-between;margin-top: 5px;">
                                 <div style="color: gray;height: 30px; line-height: 30px;width: 35%;">其他描述</div>
                                 <textarea id="shuruqita" class="weui-textarea" placeholder="输入内容(300字内)" rows="2"
                                           style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; margin-top: 5px;"></textarea>
                             </div>
-                            <div style="display:none; flex-direction: row; justify-content: space-between; margin-top: 5px;">
+                            <div style="display:none; flex-direction: row; -webkit-flex-direction: row;justify-content: space-between; -webkit-justify-content: space-between;margin-top: 5px;">
                                 <div style="color: gray;height: 30px;width: 35%;">
                                     <button id="ribao_score" style="height:30px;"
                                             class="weui-btn weui-btn_mini weui-btn_primary">健康评估
@@ -311,9 +310,9 @@
                             <div class="weui-loadmore weui-loadmore_line" style="margin: 20px 0 0 0;width: 100%;height: 20px">
                                 <span class="weui-loadmore__tips">接触史</span>
                             </div>
-                            <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 5px;">
-                                <div style="color: gray;height: 30px; line-height: 30px; flex: 8">新冠肺炎接触史</div>
-                                <div class="weui-cells_checkbox" style="flex: 5">
+                            <div style="display:flex; display: -webkit-flex;flex-direction: row; -webkit-flex-direction: row;justify-content: space-between; -webkit-justify-content: space-between;margin-top: 5px;">
+                                <div style="color: gray;height: 30px; line-height: 30px; flex: 8;-webkit-flex: 8;">新冠肺炎接触史</div>
+                                <div class="weui-cells_checkbox" style="flex: 5;-webkit-flex: 5;">
                                     <label class="weui-radio weui-cell_active weui-check__label" for="s40" style="padding: 10px 0 10px 10px;">
                                         <input type="radio" name="radio3" value="0" class="weui-check" id="s40"
                                                style="width: 10%"/>
@@ -326,11 +325,11 @@
                                     </label>
                                 </div>
                             </div>
-                            <div id="isContactView" style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 5px;">
-                                <div style="color: gray;height: 60px; line-height: 30px; flex: 8">
+                            <div id="isContactView" style="display:flex; display: -webkit-flex;flex-direction: row; -webkit-flex-direction: row;justify-content: space-between; -webkit-justify-content: space-between;margin-top: 5px;">
+                                <div style="color: gray;height: 60px; line-height: 30px; flex: 8;-webkit-flex: 8;">
                                     家庭成员中有新冠肺炎疫情或有过病例接触史人员
                                 </div>
-                                <div class="weui-cells_checkbox" style="flex: 5; margin-top: 15px;">
+                                <div class="weui-cells_checkbox" style="flex: 5; -webkit-flex: 5;margin-top: 15px;">
                                     <label class="weui-radio weui-cell_active weui-check__label" for="s28" style="padding: 10px 0 10px 10px;">
                                         <input type="radio" name="radio1" value="0" class="weui-check" id="s28"
                                                style="width: 10%"/>
@@ -343,11 +342,11 @@
                                     </label>
                                 </div>
                             </div>
-                            <div id="isSuspectedView" style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 5px;">
-                                <div style="color: gray;height: 60px; line-height: 30px;flex: 8;">
+                            <div id="isSuspectedView" style="display:flex; display: -webkit-flex;flex-direction: row; -webkit-flex-direction: row;justify-content: space-between; -webkit-justify-content: space-between;margin-top: 5px;">
+                                <div style="color: gray;height: 60px; line-height: 30px;flex: 8;-webkit-flex: 8;">
                                     近期接触的家庭成员中有感冒、发热、咳嗽等症状
                                 </div>
-                                <div class="weui-cells_checkbox" style="flex: 5; margin-top: 15px;">
+                                <div class="weui-cells_checkbox" style="flex: 5; -webkit-flex: 5;margin-top: 15px;">
                                     <label class="weui-radio weui-cell_active weui-check__label" for="s38" style="padding: 10px 0 10px 10px;">
                                         <input type="radio" name="radio2" value="0" class="weui-check" id="s38"
                                                style="width: 10%"/>
@@ -367,9 +366,9 @@
                                     <span class="weui-loadmore__tips">驻地情况</span>
                                 </div>
                             <div id="ribao_trip" class="weui-btn-area" style="margin: 0"><#--style="display: none"-->
-                                <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 0;">
-                                    <div style="color: gray;height: 30px; line-height: 30px; flex: 8">离开工作驻地</div>
-                                    <div class="weui-cells_checkbox" style="flex: 5">
+                                <div style="display:flex; display: -webkit-flex;flex-direction: row; -webkit-flex-direction: row;justify-content: space-between; -webkit-justify-content: space-between;margin-top: 0;">
+                                    <div style="color: gray;height: 30px; line-height: 30px; flex: 8;-webkit-flex: 8;">离开工作驻地</div>
+                                    <div class="weui-cells_checkbox" style="flex: 5;-webkit-flex: 5;">
                                         <label class="weui-radio weui-cell_active weui-check__label" for="s50" style="padding: 10px 0 10px 10px;">
                                             <input type="radio" name="radio4" value="0" class="weui-check" id="s50"
                                                    style="width: 10%"/>
@@ -382,7 +381,7 @@
                                         </label>
                                     </div>
                                 </div>
-                                <div style="display:none; flex-direction: row; justify-content: space-between; margin-top: 0;">
+                                <div style="display:none; flex-direction: row; -webkit-flex-direction: row;justify-content: space-between; -webkit-justify-content: space-between;margin-top: 0;">
                                     <div style="height: 30px; line-height: 30px; width: 35%;">工作驻地</div>
                                     <input id="js_input_gzzd" class="weui-input" type="text" placeholder="请选择"
                                            style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 30px;width: 50%"
@@ -391,7 +390,7 @@
                                     <input id="js_input_qtdd" placeholder="仅填市级如,上海市" disabled="disabled" type="text"
                                            style="width: 80%;text-align: center;border-top-width: 0px;border-right-width: 0px;border-bottom-width: 1px;border-left-width: 0px;border-color: #75859f;height: 30px;font-size:inherit;color:inherit;"/>
                                 </div>
-                                <div style="display:none; flex-direction: row; justify-content: space-between; margin-top: 5px;">
+                                <div style="display:none; flex-direction: row; -webkit-flex-direction: row;justify-content: space-between; -webkit-justify-content: space-between;margin-top: 5px;">
                                     <div style="height: 30px; line-height: 30px; width: 35%;">今晚住地</div>
                                     <input id="js_input_jrszd" class="weui-input" type="text" placeholder="请选择"
                                            style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 30px;width: 50%"
@@ -400,13 +399,13 @@
                                     <input id="js_input_jrszq" placeholder="仅填市级如,上海市" disabled="disabled" type="text"
                                            style="width: 80%;text-align: center;border-top-width: 0px;border-right-width: 0px;border-bottom-width: 1px;border-left-width: 0px;border-color: #75859f;height: 30px;font-size:inherit;color:inherit;"/>
                                 </div>
-                                <div style="display:none; flex-direction: row; justify-content: space-between; margin-top: 5px;">
+                                <div style="display:none; flex-direction: row; -webkit-flex-direction: row;justify-content: space-between; -webkit-justify-content: space-between;margin-top: 5px;">
                                     <div style="height: 30px; line-height: 30px; width: 50%;">是否跨市出行</div>
                                     <input id="js_input_sf" class="weui-input" type="text" placeholder="请选择"
                                            style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 30px;width: 90%"
                                            onchange="selectinput6(this)"/>
                                 </div>
-                                <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 10px;">
+                                <div style="display:flex; display: -webkit-flex;flex-direction: row; -webkit-flex-direction: row;justify-content: space-between; -webkit-justify-content: space-between;margin-top: 10px;">
                                     <div style="height: 30px; line-height: 30px; color: red">
                                         注:本地区出行无需填写行程,到达今晚住地后请重新填写行程,保证行程正确
                                     </div>
@@ -418,7 +417,7 @@
                                     <div class="weui-loadmore weui-loadmore_line" style="width: 100%;height: 5px;">
                                         <span class="weui-loadmore__tips">出行情况上报</span>
                                     </div>
-                                    <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 30px;">
+                                    <div style="display:flex; display: -webkit-flex;flex-direction: row; -webkit-flex-direction: row;justify-content: space-between; -webkit-justify-content: space-between;margin-top: 30px;">
                                         <div style="height: 30px; line-height: 30px; width: 35%;">出发地</div>
                                         <input id="js_input_cfd" class="weui-input" type="text" placeholder="请选择"
                                                style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 30px;width: 50%"
@@ -428,7 +427,7 @@
                                                type="text"
                                                style="width: 80%;text-align: center;border-top-width: 0px;border-right-width: 0px;border-bottom-width: 1px;border-left-width: 0px;border-color: #75859f;height: 30px;font-size:inherit;color:inherit;"/>
                                     </div>
-                                    <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 10px;">
+                                    <div style="display:flex; display: -webkit-flex;flex-direction: row; -webkit-flex-direction: row;justify-content: space-between; -webkit-justify-content: space-between;margin-top: 10px;">
                                         <div style="height: 30px; line-height: 30px; width: 35%;">目的地</div>
                                         <input id="js_input_mdd" class="weui-input" type="text" placeholder="请选择"
                                                style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 30px;width: 50%"
@@ -438,7 +437,7 @@
                                                type="text"
                                                style="width: 80%;text-align: center;border-top-width: 0px;border-right-width: 0px;border-bottom-width: 1px;border-left-width: 0px;border-color: #75859f;height: 30px;font-size:inherit;color:inherit;"/>
                                     </div>
-                                    <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 10px;">
+                                    <div style="display:flex; display: -webkit-flex;flex-direction: row; -webkit-flex-direction: row;justify-content: space-between; -webkit-justify-content: space-between;margin-top: 10px;">
                                         <div style="height: 30px; line-height: 30px; width: 35%;">出行方式</div>
                                         <input id="js_input_cxfs" class="weui-input" type="text" placeholder="请选择出行方式"
                                                style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 30px;width: 50%"
@@ -475,14 +474,14 @@
                                 </div>
 
                             </div>
-                            <div style="display: flex; justify-content: center;">
+                            <div style="display: flex; display: -webkit-flex;justify-content: center;">
                                 <div style="color: red">
                                     <br/>
                                     本人郑重声明,上述信息是我本人或代他人填写,本人对信息内容真实性和完整性负责,因信息填报不实导致相关后果的,本人愿承担相应责任。
                                 </div>
                             </div>
                             <div class="resetRibaoDigiBtn resetRibaoDigiBaseBtn" id="resetRibaoDigiBtn">
-                                <div style="display:flex; flex-direction: row; justify-content: space-between;">
+                                <div style="display:flex; display: -webkit-flex;flex-direction: row; -webkit-flex-direction: row;justify-content: space-between;-webkit-justify-content: space-between;">
                                     <a id="cancel" href="javascript:;" class="weui-btn weui-btn_default"
                                        style="width: 100px;">取消</a>
                                     <a id="commit" href="javascript:;" onclick="ribaoCommit();"
@@ -490,7 +489,7 @@
                                        style="margin-top: 0;width: 100px;">提交</a>
                                 </div>
                             </div>
-                            <div id="dingwei" style="display: flex; justify-content: center;">
+                            <div id="dingwei" style="display: flex; display: -webkit-flex;justify-content: center;">
                                 <div style="color: blue">
                                     正在获取定位信息,请保证开启手机定位和微信定位
                                 </div>

+ 154 - 48
whepi-ui/templates/home/ribao.js

@@ -857,9 +857,12 @@ function ribaoInitialization(reportId) {
         if (data.data.length > 0) {
           hasData = true;
             changeReportBtnState(data.data)
-          data.data.forEach(function (v) {
-            ribao_cell(v);
-          });
+          // data.data.forEach(function (v) {
+          //   ribao_cell(v);
+          // });
+            $.each(data.data,function (i,v) {
+              ribao_cell(v);
+            })
         }else {
             changeReportBtnState(data.data)
         }
@@ -890,9 +893,12 @@ function ribao_refrash() {
         if (data.data.length > 0) {
             changeReportBtnState(data.data)
           hasData = true;
-          data.data.forEach(function (v) {
+          // data.data.forEach(function (v) {
+          //   ribao_cell(v);
+          // });
+          $.each(data.data,function (i,v) {
             ribao_cell(v);
-          });
+          })
         } else {
             changeReportBtnState(data.data)
         }
@@ -904,6 +910,7 @@ function ribao_refrash() {
 }
 
 function ribao_cell(v) {
+  //console.log(v,'vvvvvvvvvvvvv')
   var userName = v.userName;
   var grender = getGreder(v.grender);
   var age = v.age;
@@ -1450,8 +1457,11 @@ function ribaoCommit() {
     $("input[id='s18']").prop("checked", "checked");
     $("input[id='s19']").removeAttr('checked');
     var ids = ['js_input_user_xinguan_view','js_input_user_kesou_view','js_input_user_jirou_view','js_input_user_huxi_view','js_input_user_fali_view','js_input_user_fuxie_view','shuruqita_view']
-    ids.forEach(iv=>{
-      $('#'+iv).hide()
+    // ids.forEach(iv=>{
+    //   $('#'+iv).hide()
+    // })
+    $.each(ids,function (i,v) {
+      $('#'+v).hide()
     })
     medical = $("input[name='radio']:checked").val()
   }
@@ -1786,7 +1796,10 @@ function updateSuspected(suspectedId) {
           $("input[id='s18']").prop("checked", "checked");
         if (suspected.medical == 1){
           $("input[id='s19']").prop("checked", "checked");
-          ids.forEach(v=>{
+          // ids.forEach(v=>{
+          //   $('#'+v).show('fast')
+          // });
+          $.each(ids,function (i,v) {
             $('#'+v).show('fast')
           })
         }
@@ -1814,7 +1827,10 @@ function updateSuspected(suspectedId) {
           $("input[id='s40']").prop("checked", "checked");
         if (suspected.isContact == 1 || suspected.isSuspected == 1){
           $("input[id='s41']").prop("checked", "checked");
-          ids2.forEach(v=>{
+          // ids2.forEach(v=>{
+          //   $('#'+v).show('fast')
+          // })
+          $.each(ids2,function (i,v) {
             $('#'+v).show('fast')
           })
         }
@@ -1911,7 +1927,7 @@ function updateSuspected(suspectedId) {
             }
             listcx.splice(0, listcx.length);
             $('#tabtr').empty();
-            var person;
+            var person = {};
             // var xxIds = [];
             // var xxName = [
             //   "序号",
@@ -1932,30 +1948,44 @@ function updateSuspected(suspectedId) {
             //   html += "<th>" + xxIds[i].name + "</th>";
             // }
             // html += "</tr>"
-            data.data.forEach(function (v) {
-              {
-                person = new Object();
-                person.startLocal = v.startLocal;
-                person.startLocalOther = v.startLocalOther;
-                person.endLocal = v.endLocal;
-                person.endLocalOther = v.endLocalOther;
-                person.tripType = v.tripType;
-                person.startLocalStr = getLocalOther(v.startLocal, v.startLocalOther);
-                person.endlocalStr = getLocalOther(v.endLocal, v.endLocalOther);
-                person.tripTypeStr = getTripType(v.tripType);
-                person.tripTypeDesp = v.tripTypeDesp;
-                listcx.push(person);
-                // html += "<tr>";
-                // html += "<td style='text-align: center;'>" + v.sort + "</td>";
-                // html += "<td style='text-align: center;' >" + getLocalOther(v.startLocal, v.startLocalOther) + " </td>";
-                // html += "<td style='text-align: center;' >" + getLocalOther(v.endLocal, v.endLocalOther) + " </td>";
-                // html += "<td style='text-align: center;' >" + getTripType(v.tripType) + " </td>";
-                // html += "<td style='text-align: center;' >" + v.tripTypeDesp + " </td>";
-                // html += "<td style='text-align: center;' ><button value=" + i + " style='height:5vh;background-color: red;text-align: center; with:60%' class='weui-btn weui-btn_mini weui-btn_primary' onclick='splice(this.value)'>" + "删除" + " </button></td>";
-                // html += "</tr>";
-                // $("#tabtr").html(html);
-              }
-            });
+            // data.data.forEach(function (v) {
+            //   {
+            //     person = new Object();
+            //     person.startLocal = v.startLocal;
+            //     person.startLocalOther = v.startLocalOther;
+            //     person.endLocal = v.endLocal;
+            //     person.endLocalOther = v.endLocalOther;
+            //     person.tripType = v.tripType;
+            //     person.startLocalStr = getLocalOther(v.startLocal, v.startLocalOther);
+            //     person.endlocalStr = getLocalOther(v.endLocal, v.endLocalOther);
+            //     person.tripTypeStr = getTripType(v.tripType);
+            //     person.tripTypeDesp = v.tripTypeDesp;
+            //     listcx.push(person);
+            //     console.log(listcx,'listcx')
+            //     // html += "<tr>";
+            //     // html += "<td style='text-align: center;'>" + v.sort + "</td>";
+            //     // html += "<td style='text-align: center;' >" + getLocalOther(v.startLocal, v.startLocalOther) + " </td>";
+            //     // html += "<td style='text-align: center;' >" + getLocalOther(v.endLocal, v.endLocalOther) + " </td>";
+            //     // html += "<td style='text-align: center;' >" + getTripType(v.tripType) + " </td>";
+            //     // html += "<td style='text-align: center;' >" + v.tripTypeDesp + " </td>";
+            //     // html += "<td style='text-align: center;' ><button value=" + i + " style='height:5vh;background-color: red;text-align: center; with:60%' class='weui-btn weui-btn_mini weui-btn_primary' onclick='splice(this.value)'>" + "删除" + " </button></td>";
+            //     // html += "</tr>";
+            //     // $("#tabtr").html(html);
+            //   }
+            // });
+            $.each(data.data,function (i,v) {
+              person = {};
+              person.startLocal = v.startLocal;
+              person.startLocalOther = v.startLocalOther;
+              person.endLocal = v.endLocal;
+              person.endLocalOther = v.endLocalOther;
+              person.tripType = v.tripType;
+              person.startLocalStr = getLocalOther(v.startLocal, v.startLocalOther);
+              person.endlocalStr = getLocalOther(v.endLocal, v.endLocalOther);
+              person.tripTypeStr = getTripType(v.tripType);
+              person.tripTypeDesp = v.tripTypeDesp;
+              listcx.push(person);
+            })
             tab();
           },
         });
@@ -2005,7 +2035,7 @@ $("#my-input-ribao").calendar({
   dateFormat: 'yyyy-mm-dd',
   inputReadOnly: false,
   onChange: function (p, values, displayValues) {
-    var reportDate = values.toString();
+    var reportDate = values+'';
     var userId = $("#userId").val();
     $.ajax({
       url: '/home/home/queryRibaoReportDate',
@@ -2021,9 +2051,12 @@ $("#my-input-ribao").calendar({
         else {
           if (data.data.length > 0) {
             $('#ribao_famliy').empty();
-            data.data.forEach(function (v) {
+            // data.data.forEach(function (v) {
+            //   helpValue1(v);
+            // });
+            $.each(data.data,function (i,v) {
               helpValue1(v);
-            });
+            })
           } else {
 
           }
@@ -2343,12 +2376,18 @@ function clearShow() {
   console.log("qingkong")
   //病情
   var ids = ['js_input_user_tiwen','js_input_user_xinguan_view','js_input_user_kesou_view','js_input_user_jirou_view','js_input_user_huxi_view','js_input_user_fali_view','js_input_user_fuxie_view','shuruqita_view'];
-  ids.forEach(iv=>{
+  // ids.forEach(iv=>{
+  //   $('#'+iv).hide()
+  // })
+  $.each(ids,function (i,iv) {
     $('#'+iv).hide()
   })
   //接触史
   var ids2 = ['isContactView','isSuspectedView'];
-  ids2.forEach(iv=>{
+  // ids2.forEach(iv=>{
+  //   $('#'+iv).hide()
+  // })
+  $.each(ids2,function (i,iv) {
     $('#'+iv).hide()
   })
   $("#suspectedId").val("");
@@ -2540,15 +2579,56 @@ function initRadioEvent() {
 
   //病情
   var ids = ['js_input_user_xinguan_view','js_input_user_kesou_view','js_input_user_jirou_view','js_input_user_huxi_view','js_input_user_fali_view','js_input_user_fuxie_view','shuruqita_view']
-  ids.forEach(iv=>{
+  // ids.forEach(iv=>{
+  //   $('#'+iv).hide()
+  // })
+  $.each(ids,function (i,iv) {
     $('#'+iv).hide()
   })
   $('input[name="radio"]').on('change',function () {
-    selects.forEach(v=>{
+    // selects.forEach(v=>{
+    //   $('#'+v).select("close")
+    // })
+    $.each(selects,function (i,v) {
       $('#'+v).select("close")
     })
     var state = this.value
-    ids.forEach(v=>{
+    // ids.forEach(v=>{
+    //   if(state == 1){
+    //     $('#'+v).show('fast')
+    //   }else {
+    //     //reset
+    //     $("#switchQuezhen").val(getMedical(0));
+    //     $("#switchQuezhen").attr("data-values", 0);
+    //
+    //     $("#switchDanjiangeli").val(getSingleRoom(0));
+    //     $("#switchDanjiangeli").attr("data-values", 0);
+    //
+    //     $("#js_input_user_xinguan").val(getXinguan(0));
+    //     $("#js_input_user_xinguan").attr("data-values", 0);
+    //
+    //     $("#js_input_user_kesou").val(getCough(0));
+    //     $("#js_input_user_kesou").attr("data-values", 0);
+    //
+    //     $("#js_input_user_jirou").val(getMuscle(0));
+    //     $("#js_input_user_jirou").attr("data-values", 0);
+    //
+    //     $("#js_input_user_huxi").val(getDyspnea(0));
+    //     $("#js_input_user_huxi").attr("data-values", 0);
+    //
+    //     $("#js_input_user_fali").val(getFatigue(0));
+    //     $("#js_input_user_fali").attr("data-values", 0);
+    //
+    //     $("#js_input_user_fuxie").val(getDiarrhea(0));
+    //     $("#js_input_user_fuxie").attr("data-values", 0);
+    //
+    //     $("#shuruqita").val('');
+    //
+    //     $('#'+v).hide('fast')
+    //   }
+    //
+    // })
+    $.each(ids,function (i,v) {
       if(state == 1){
         $('#'+v).show('fast')
       }else {
@@ -2581,7 +2661,6 @@ function initRadioEvent() {
 
         $('#'+v).hide('fast')
       }
-
     })
   })
 
@@ -2593,15 +2672,36 @@ function initRadioEvent() {
 
   //接触史
   var ids2 = ['isContactView','isSuspectedView'];
-  ids2.forEach(iv=>{
+  // ids2.forEach(iv=>{
+  //   $('#'+iv).hide()
+  // })
+  $.each(ids2,function (i,iv) {
     $('#'+iv).hide()
   })
   $('input[name="radio3"]').on('change',function () {
-    selects.forEach(v=>{
+    // selects.forEach(v=>{
+    //   $('#'+v).select("close")
+    // })
+    $.each(selects,function (i,v) {
       $('#'+v).select("close")
     })
     var state = this.value
-    ids2.forEach(v=>{
+    // ids2.forEach(v=>{
+    //   if(state == 1){
+    //     $("input[id='s28']").removeAttr("checked");
+    //     $("input[id='s38']").removeAttr("checked");
+    //     $("input[id='s29']").prop("checked", "checked");
+    //     $("input[id='s39']").prop("checked", "checked");
+    //     $('#'+v).show('fast')
+    //   }else {
+    //     $("input[id='s28']").prop("checked", "checked");
+    //     $("input[id='s29']").removeAttr("checked");
+    //     $("input[id='s38']").prop("checked", "checked");
+    //     $("input[id='s39']").removeAttr("checked");
+    //     $('#'+v).hide('fast')
+    //   }
+    // })
+    $.each(ids2,function (i,v) {
       if(state == 1){
         $("input[id='s28']").removeAttr("checked");
         $("input[id='s38']").removeAttr("checked");
@@ -2622,7 +2722,10 @@ function initRadioEvent() {
     if(state == 0 && $('input[name="radio2"]:checked').val() == 0){
       $("input[id='s41']").removeAttr("checked");
       $("input[id='s40']").prop("checked", "checked");
-      ids2.forEach(iv=>{
+      // ids2.forEach(iv=>{
+      //   $('#'+iv).hide('fast')
+      // })
+      $.each(ids2,function (i,iv) {
         $('#'+iv).hide('fast')
       })
     }
@@ -2632,7 +2735,10 @@ function initRadioEvent() {
     if(state == 0 && $('input[name="radio1"]:checked').val() == 0){
       $("input[id='s41']").removeAttr("checked");
       $("input[id='s40']").prop("checked", "checked");
-      ids2.forEach(iv=>{
+      // ids2.forEach(iv=>{
+      //   $('#'+iv).hide('fast')
+      // })
+      $.each(ids2,function (i,iv) {
         $('#'+iv).hide('fast')
       })
     }

+ 15 - 6
whepi-ui/templates/lingyun/ribao.js

@@ -566,9 +566,12 @@ function ribaoInitialization(reportId) {
             console.log(data);
             if (data.data.length > 0) {
                 hasData = true;
-                data.data.forEach(function (v) {
+                // data.data.forEach(function (v) {
+                //     ribao_cell(v);
+                // });
+                $.each(data.data,function (i,v) {
                     ribao_cell(v);
-                });
+                })
             }
         },
         error: function () {
@@ -594,9 +597,12 @@ function ribao_refrash() {
                 $('#rb_family').empty();
                 if (data.data.length > 0) {
                     hasData = true;
-                    data.data.forEach(function (v) {
+                    // data.data.forEach(function (v) {
+                    //     ribao_cell(v);
+                    // });
+                    $.each(data.data,function (i,v) {
                         ribao_cell(v);
-                    });
+                    })
                 } else {
                 }
             }
@@ -1179,9 +1185,12 @@ $("#my-input-ribao").calendar({
                 else {
                     if (data.data.length > 0) {
                         $('#ribao_famliy').empty();
-                        data.data.forEach(function (v) {
+                        // data.data.forEach(function (v) {
+                        //     helpValue1(v);
+                        // });
+                        $.each(data.data,function (i,v) {
                             helpValue1(v);
-                        });
+                        })
                     } else {
 
                     }