e 5 éve
szülő
commit
7f6b161da0

+ 13 - 1
whepi-ui/templates/home/frag.head.ftl

@@ -63,7 +63,19 @@
         }
         .cx-reset-ribao .resetpanel .resetinfo{
             margin: 0;
-            padding: 0 10px;
+            padding: 0 10px 61px 10px;
+        }
+        .cx-reset-ribao .resetpanel .resetinfo .resetRibaoDigiBaseBtn{
+            height: 46px;
+            background-color: #fff;
+            padding: 5px 0 5px 0;
+            border-top: 1px solid #e5e5e5;
+        }
+        .cx-reset-ribao .resetpanel .resetinfo .resetRibaoDigiBtn{
+            position: fixed;
+            bottom: 0;
+            left: 0;
+            right: 0;
         }
 
         .user-header {

+ 22 - 0
whepi-ui/templates/home/home.ftl

@@ -51,6 +51,8 @@
     var autoAddr='';
     var longitude = '';
     var latitude = '';
+    var userFamilyStatus = '';
+    var userFamilyStatusStr = '';
     <#include "/home/ribao.js" />
     <#include "/home/qiuzhu.js" />
     <#include "/home/getLocation.js" />
@@ -403,4 +405,24 @@
         }
     }
 
+    $(function () {
+        //微信内置浏览器浏览H5页面弹出的键盘遮盖文本框的解决办法
+        window.addEventListener("resize", function () {
+            if (document.activeElement.tagName == "INPUT" || document.activeElement.tagName == "TEXTAREA") {
+                window.setTimeout(function () {
+                    document.activeElement.scrollIntoViewIfNeeded();
+                }, 0);
+            }
+        });
+        var clientHeight = $(window).height();
+        $(window).on('resize',function () {
+            var height = $(this).height();
+            if (height < clientHeight) {
+                $('#resetRibaoDigiBtn').removeClass('resetRibaoDigiBtn');
+            } else {
+                $('#resetRibaoDigiBtn').addClass('resetRibaoDigiBtn');
+            }
+        })
+    })
+
 </script>

+ 121 - 98
whepi-ui/templates/home/ribao.ftl

@@ -1,4 +1,4 @@
-<div class="page__bd cx-reset-ribao">
+<div class="page__bd cx-reset-ribao" id="cx-reset-ribao">
     <div class="weui-tab">
         <div class="weui-navbar">
             <a class="weui-navbar__item weui-bar__item_on" target="#rb_nav1" module="ri_bao" onclick="ribao_refrash()">
@@ -21,11 +21,11 @@
         <div class="weui-tab__panel">
             <div id="rb_nav1" class="weui-tab__bd-item ri_bao_weui_tab_bd_item_active" style="position: relative">
                 <div class="weui-panel weui-panel_access resetpanel">
-                    <div style="height: 100%;overflow-y: auto;">
+                    <div style="height: 100%;overflow-y: auto;position: relative">
                         <div id="notOpenRibao" style="height: 100%;position: relative;">
-                            <div class="weui-cells weui-cells_form" style="margin-top: 0">
+                            <div class="weui-cells weui-cells_form" style="margin-top: 0;display: none">
                                 <div class="weui-cell" style="padding: 20px 20px 10px 20px">
-                                    <div class="weui-cell__hd" style="display: none">
+                                    <div class="weui-cell__hd">
                                         <label class="weui-label">今日居家</label>
                                     </div>
                                     <div class="weui-cell__bd" id="ribao_jinrijujian" style="display: none">
@@ -34,7 +34,7 @@
                                     <div class="">
 
                                     </div>
-                                    <button id="btnAdd" href="javascript:"
+                                    <button id="" href="javascript:"
                                             class="weui-btn weui-btn_mini weui-btn_primary">添加人员
                                     </button>
                                 </div>
@@ -45,39 +45,46 @@
                             <#--<p class="weui-media-box__desc">由各种物质组成的巨型球状天体,叫做星球。星球有一定的形状,有自己的运行轨道。</p>-->
                             <#--</div>-->
                             </div>
-                            <div class="weui-cells__tips"> <span style="color: red; display: none">
+                            <div class="weui-cells__tips" style="margin: 0"> <span style="color: red; display: none">
                         <br/>
                         注:请如实上报情况,便以相互帮助,小区是我家,团结就是力量!后期会有医生跟踪分析,给予大家医疗建议,请认真填报!
                     </span></div>
-                            <div class="weui-btn-area" style="position: absolute;bottom: 0;left: 0;width: 100%;margin: 0;padding-bottom:10px;text-align: center">
-                        <span style="color: red;font-size:x-large" id="txt_shangbao">
+                            <div class="weui-btn-area"
+                                 style="position: absolute;bottom: 0;left: 0;width: 100%;margin: 0;padding-bottom:10px;text-align: center">
+                        <span style="color: red;font-size:20px" id="txt_shangbao">
                             今日未上报
-                       </span><br/> <span style="color: red;font-size:x-large" id="txt_shangbaotime">
+                       </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:"
+                                   style="width: 200px;display: none;">填报</a>
                             </div>
                         </div>
-                        <div id="ribao" class="weui-btn-area resetinfo" style="display: none">
-                            <div style="text-align: center;padding: 10px 0;font-size: 16px;font-weight: 600;">基本信息</div>
+                        <div id="ribao" class="weui-btn-area resetinfo" style="display: none;">
+                            <#--<div style="text-align: center;padding: 5px 0;font-size: 16px;font-weight: 600;">基本信息</div>-->
+                                <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;">
                                 <input id="js_input_user_name" 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: 5vh; width: 30%; text-align: center;"/>
+                                       style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 30px; width: 30%; text-align: center;"/>
                                 <input id="js_input_user_sex" 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: 5vh; width: 25%; text-align: center;"/>
-                                <input id="js_input_user_age" class="weui-input" autofocus="" type="text"
+                                       style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 30px; width: 25%; text-align: center;"/>
+                                <input id="js_input_user_age" class="weui-input" autofocus="" type="number"
+                                       pattern="[0-9]*"
                                        placeholder="年龄"
                                        maxlength="3"
-                                       style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh; width: 25%; text-align: center;"/>
+                                       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 id="ribao_jbqk">
-                                <div style="height: 5vh; line-height: 5vh;margin-left: 2vw; display: none;">基本情况</div>
+                                <div style="height: 30px; line-height: 30px;margin-left: 2vw; display: none;">基本情况</div>
                                 <div class="weui-cells weui-cells_checkbox" style="display: none;">
                                     <label class="weui-cell weui-cell_active weui-check__label" for="s11">
                                         <div class="weui-cell__hd">
@@ -143,26 +150,31 @@
                                         </div>
                                     </label>
                                 </div>
-                                <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
-                                    <div style="color: gray;height: 5vh;line-height: 5vh; width: 35%;">基本情况</div>
-                                    <input id="js_input_user_status" class="weui-input" autofocus="" type="text"
+                                <div style="display:flex; flex-direction: row; 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=""
+                                           type="text"
                                            placeholder="请选择"
-                                           style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;"/>
+                                           style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 30px;"/>
                                 </div>
 
                             </div>
 
                         <#--<textarea id="jibenmiaoshu" class="weui-textarea" placeholder="身体基本状况描述" rows="5"-->
-                        <#--style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; margin-top: 1vh;"></textarea>-->
+                        <#--style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; margin-top: 5px;"></textarea>-->
                             <input id="suspectedId" type="text" hidden="hidden" value=""/>
-                            <div style="height: 5vh; line-height: 5vh;margin-left: 2vw;">病情描述</div>
+                            <#--<div style="height: 30px; line-height: 30px;">病情描述</div>-->
+                                <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: 1vh;">
-                                <div style="color: gray;height: 5vh; line-height: 5vh; width: 55%;">新冠肺炎</div>
+                            <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 5px;">
+                                <div style="color: gray;height: 30px; line-height: 30px; width: 35%;">新冠肺炎</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: 5vh;"/>-->
-                                <div class="weui-cells_checkbox" style="width: 125%">
+                            <#--style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 30px;"/>-->
+                                <div class="weui-cells_checkbox" style="width: 125%;display: none;">
                                     <label class="weui-radio weui-cell_active weui-check__label" for="s18">
                                         <input type="radio" name="radio" value="0" class="weui-check" id="s18"
                                                style="width: 10%"/>
@@ -194,35 +206,41 @@
                                         <i class="weui-icon-checked"></i>解除隔离
                                     </label>
                                 </div>
+                                <input id="js_input_user_crov19"
+                                       class="weui-input"
+                                       autofocus=""
+                                       type="text"
+                                       placeholder="请选择"
+                                       style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 30px;"/>
                             </div>
-                            <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
-                                <div style="color: gray;height: 10vh; line-height: 5vh; width: 150%;">
+                            <div 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>
-                                <div class="weui-cells_checkbox" style="width: 100%; margin-top: 2.5vh;">
-                                    <label class="weui-radio weui-cell_active weui-check__label" for="s28">
+                                <div class="weui-cells_checkbox" style="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%"/>
                                         <i class="weui-icon-checked"></i>否
                                     </label>
-                                    <label class="weui-radio weui-cell_active weui-check__label" for="s29">
+                                    <label class="weui-radio weui-cell_active weui-check__label" for="s29" style="padding: 10px 0 10px 10px;">
                                         <input type="radio" name="radio1" value="1" class="weui-check" id="s29"
                                                style="width: 10%"/>
                                         <i class="weui-icon-checked"></i>是
                                     </label>
                                 </div>
                             </div>
-                            <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
-                                <div style="color: gray;height: 10vh; line-height: 5vh; width: 150%;">
+                            <div 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>
-                                <div class="weui-cells_checkbox" style="width: 100%; margin-top: 2.5vh;">
-                                    <label class="weui-radio weui-cell_active weui-check__label" for="s38">
+                                <div class="weui-cells_checkbox" style="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%"/>
                                         <i class="weui-icon-checked"></i>否
                                     </label>
-                                    <label class="weui-radio weui-cell_active weui-check__label" for="s39">
+                                    <label class="weui-radio weui-cell_active weui-check__label" for="s39" style="padding: 10px 0 10px 10px;">
                                         <input type="radio" name="radio2" value="1" class="weui-check" id="s39"
                                                style="width: 10%"/>
                                         <i class="weui-icon-checked"></i>是
@@ -230,7 +248,7 @@
                                 </div>
                             </div>
                         <#--<div id="ribao_djgl">-->
-                        <#--<div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">-->
+                        <#--<div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 5px;">-->
                         <#--<div style="color: gray;height: 5vh; line-height: 5vh; width: 55%;">单间隔离</div>-->
                         <#--<input id="switchDanjiangeli" class="weui-input" autofocus="" type="text"-->
                         <#--placeholder="请选择"-->
@@ -239,61 +257,61 @@
                         <#--</div>-->
                         <#--</div>-->
 
-                            <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
-                                <div style="color: gray;height: 5vh; line-height: 5vh; width: 35%;">体温</div>
+                            <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 5px;">
+                                <div style="color: gray;height: 30px; line-height: 30px; width: 35%;">体温</div>
                                 <input id="js_input_user_tiwen" class="weui-input" autofocus="" type="number"
                                        placeholder="请输入"
                                        maxlength="4"
-                                       style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;"/>
+                                       style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 30px;"/>
                             </div>
-                            <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
-                                <div style="color: gray;height: 5vh; line-height: 5vh; width: 35%;">咳嗽现象</div>
+                            <div style="display:flex; flex-direction: row; 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: 5vh;"/>
+                                       style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 30px;"/>
                             </div>
-                            <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
-                                <div style="color: gray;height: 5vh;line-height: 5vh; width: 35%;">肌肉酸痛</div>
+                            <div style="display:flex; flex-direction: row; 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: 5vh;"/>
+                                       style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 30px;"/>
                             </div>
-                            <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
-                                <div style="color: gray;height: 5vh;line-height: 5vh; width: 35%;">呼吸困难</div>
+                            <div style="display:flex; flex-direction: row; 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: 5vh;"/>
+                                       style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 30px;"/>
                             </div>
-                            <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
-                                <div style="color: gray;height: 5vh; line-height: 5vh; width: 35%;">乏力现象</div>
+                            <div style="display:flex; flex-direction: row; 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: 5vh;"/>
+                                       style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 30px;"/>
                             </div>
-                            <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
-                                <div style="color: gray;height: 5vh; line-height: 5vh; width: 35%;">腹泻现象</div>
+                            <div style="display:flex; flex-direction: row; 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: 5vh;"/>
+                                       style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 30px;"/>
                             </div>
-                            <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
-                                <div style="color: gray;height: 5vh; line-height: 5vh;width: 35%;">其他描述</div>
-                                <textarea id="shuruqita" class="weui-textarea" placeholder="输入内容(300字内)" rows="5"
-                                          style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; margin-top: 1vh;"></textarea>
+                            <div style="display:flex; flex-direction: row; 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:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
-                                <div style="color: gray;height: 5vh; line-height: 5vh;width: 35%;">
-                                    <button id="ribao_score" style="height:5vh;"
+                            <div style="display:flex; flex-direction: row; 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">健康评估
                                     </button>
                                 </div>
                                 <input id="js_input_score_rezult" class="weui-input" autofocus="" readonly="readonly"
-                                       style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;"/>
+                                       style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 30px;"/>
                                 <input id="js_input_score_rezult_value" type="text" hidden="hidden"/>
                                 <input id="js_input_temperature_score" type="text" hidden="hidden"/>
                                 <input id="js_input_score_histroy" type="text" hidden="hidden"/>
@@ -305,33 +323,36 @@
                         <#--自愿填写病情描述(温度为必填项),提交后会根据每天病情描述变化趋势给出更加科学的健康评估建议-->
                         <#--</div>-->
                         <#--</div>-->
+                                <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 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: 6vh;">
-                                    <div style="height: 5vh; line-height: 5vh; width: 35%;">工作驻地</div>
+                                <div style="display:flex; flex-direction: row; 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: 5vh;width: 50%"
+                                           style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 30px;width: 50%"
                                            onchange="selectinput1(this)"/>
                                     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                     <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: 5vh;font-size:inherit;color:inherit;"/>
+                                           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: 1vh;">
-                                    <div style="height: 5vh; line-height: 5vh; width: 35%;">今晚住地</div>
+                                <div style="display:flex; flex-direction: row; 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: 5vh;width: 50%"
+                                           style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 30px;width: 50%"
                                            onchange="selectinput2(this)"/>
                                     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                     <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: 5vh;font-size:inherit;color:inherit;"/>
+                                           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: 1vh;">
-                                    <div style="height: 5vh; line-height: 5vh; width: 35%;">是否跨市出行</div>
+                                <div style="display:flex; flex-direction: row; 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: 5vh;width: 90%"
+                                           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: 1vh;">
-                                    <div style="height: 5vh; line-height: 5vh; color: red">
+                                <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 10px;">
+                                    <div style="height: 30px; line-height: 30px; color: red">
                                         注:本地区出行无需填写行程,到达今晚住地后请重新填写行程,保证行程正确
                                     </div>
                                 </div>
@@ -339,46 +360,46 @@
                             <#--<div style="text-align: center;height: 1vh;">出行情况上报</div>-->
 
                                 <div id="none">
-                                    <div class="weui-loadmore weui-loadmore_line" style="width: 100%;height: 1vh;">
+                                    <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: 6vh;">
-                                        <div style="height: 5vh; line-height: 5vh; width: 35%;">出发地</div>
+                                    <div style="display:flex; flex-direction: row; 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: 5vh;width: 50%"
+                                               style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 30px;width: 50%"
                                                onchange="selectinput3(this)"/>
                                         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                         <input id="js_input_cfdq" 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: 5vh;font-size:inherit;color:inherit;"/>
+                                               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: 1vh;">
-                                        <div style="height: 5vh; line-height: 5vh; width: 35%;">目的地</div>
+                                    <div style="display:flex; flex-direction: row; 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: 5vh;width: 50%"
+                                               style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 30px;width: 50%"
                                                onchange="selectinput4(this)"/>
                                         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                         <input id="js_input_mddq" 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: 5vh;font-size:inherit;color:inherit;"/>
+                                               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: 1vh;">
-                                        <div style="height: 5vh; line-height: 5vh; width: 35%;">出行方式</div>
+                                    <div style="display:flex; flex-direction: row; 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: 5vh;width: 50%"
+                                               style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 30px;width: 50%"
                                                onchange="selectinput5(this)"/>
                                         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                         <input id="js_input_cxfsq" placeholder="车次/航班/车牌" 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: 5vh;font-size:inherit;color:inherit;"/>
+                                               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 class="weui-cell__ft" style="margin-top: 1vh;">
-                                        <button href="javascript:" style="height:5vh; margin-right: 0vh;width: 70px;"
+                                    <div class="weui-cell__ft" style="margin-top: 10px;">
+                                        <button href="javascript:" style="height:30px; margin-right: 0;width: 70px;"
                                                 class="weui-btn weui-btn_mini weui-btn_primary"
                                                 onclick="insertlingyun()">添加
                                         </button>
                                     </div>
-                                    <div class="weui-loadmore tt" style="width: 100%;height: 1vh;margin-top: 1vh;">
+                                    <div class="weui-loadmore tt" style="width: 100%;height: 10px;margin-top: 10px;">
                                     </div>
                                     <div>
                                         <table cellspacing="0" cellpadding="0" style="width: 100%">
@@ -405,12 +426,14 @@
                                     本人郑重声明,上述信息是我本人或代他人填写,本人对信息内容真实性和完整性负责,因信息填报不实导致相关后果的,本人愿承担相应责任。
                                 </div>
                             </div>
-                            <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh; margin-bottom: 5vh;">
-                                <a id="cancel" href="javascript:;" class="weui-btn weui-btn_default"
-                                   style="width: 30%;">取消</a>
-                                <a id="commit" href="javascript:;" onclick="ribaoCommit();"
-                                   class="weui-btn weui-btn_primary"
-                                   style="margin-top: 0;width: 30%;">提交</a>
+                            <div class="resetRibaoDigiBtn resetRibaoDigiBaseBtn" id="resetRibaoDigiBtn">
+                                <div style="display:flex; flex-direction: row; 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();"
+                                       class="weui-btn weui-btn_primary"
+                                       style="margin-top: 0;width: 100px;">提交</a>
+                                </div>
                             </div>
                             <div id="dingwei" style="display: flex; justify-content: center;">
                                 <div style="color: blue">

+ 245 - 61
whepi-ui/templates/home/ribao.js

@@ -183,45 +183,80 @@ function ribao_init() {
   });
 
   var userStatus = [
+      // {
+      //     title: "无病史",
+      //     value: "0",
+      // },
       {
-          title: "无病史",
-          value: "0",
-      }, {
-          title: "心脑血管疾病(服用ARB)",
-          value: "1",
+          title: "心脑血管疾病(服用ARB)",
+          value: 0,
       },
       {
-          title: "心脑血管疾病(未服ARB)",
-          value: "2",
+          title: "心脑血管疾病(未服ARB)",
+          value: 1,
       },
       {
           title: "呼吸系统病史",
-          value: "3",
+          value: 2,
       },
       {
           title: "肿瘤病史",
-          value: "4",
+          value: 3,
       },
       {
           title: "糖尿病史",
-          value: "5",
+          value: 4,
       },
       {
           title: "服用过激素药物",
-          value: "6",
+          value: 5,
       },
       {
           title: "妊娠期",
-          value: "7",
+          value: 6,
       }
       ];
 
   $("#js_input_user_status").select({
     title: "选择基本状况",
       multi: true,
-    items: userStatus
+    items: userStatus,
+      // onOpen:function (e) {
+      //   var target = $("#js_input_user_status");
+      //   console.log(target.data().values,userFamilyStatusStr,userFamilyStatus)
+      //   target.val(userFamilyStatusStr);
+      //   target.data('values',userFamilyStatus);
+      //     console.log(target.data().values,userFamilyStatusStr,userFamilyStatus)
+      // }
+  });
+
+  $("#js_input_user_crov19").select({
+    title: "选择基本状况",
+    items: [
+        {
+            title: "无",
+            value: "0",
+        },
+        {
+            title: "确诊",
+            value: "1",
+        },
+        {
+            title: "疑似",
+            value: "2",
+        },
+        {
+            title: "有接触史",
+            value: "3",
+        },
+        {
+            title: "解除隔离",
+            value: "4",
+        },
+    ],
   });
 
+
   $("#js_input_user_kesou").select({
     title: "选择咳嗽情况",
     items: [
@@ -668,7 +703,7 @@ function tab() {
     html += "<td style='text-align: center;' >" + listcx[i].endlocalStr + " </td>";
     html += "<td style='text-align: center;' >" + listcx[i].tripTypeStr + " </td>";
     html += "<td style='text-align: center;' >" + listcx[i].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 += "<td style='text-align: center;' ><button value=" + i + " style='height:30px;padding:0 10px;background-color: red;text-align: center;' class='weui-btn weui-btn_mini weui-btn_primary' onclick='splice(this.value)'>" + "删除" + " </button></td>";
 
     html += "</tr>";
     $("#tabtr").html(html);
@@ -680,6 +715,36 @@ function splice(obj) {
   tab()
 }
 
+function changeReportBtnState(list) {
+  console.log(list)
+    if(!list){
+        $('#btn_shangbao').css({
+            display: 'none'
+        })
+        $('#btnAdd').css({
+            display: 'block'
+        })
+    }else {
+        if(list.length){
+            $('#btn_shangbao').css({
+                display: 'block'
+            })
+            $('#btnAdd').css({
+                display: 'none'
+            })
+        }else {
+            $('#btn_shangbao').css({
+                display: 'none'
+            })
+            $('#btnAdd').css({
+                display: 'block'
+            })
+        }
+
+    }
+
+}
+
 //首次近日报告
 function ribaoInitialization(reportId) {
   if (reportId == null)
@@ -697,13 +762,17 @@ function ribaoInitialization(reportId) {
         $('#rb_family').empty();
         document.getElementById("btn_shangbao").style['background-color'] = "#D9D9D9";
         canSahngbao = false;
+        changeReportBtnState(data.data)
       }
       else {
         if (data.data.length > 0) {
           hasData = true;
+            changeReportBtnState(data.data)
           data.data.forEach(function (v) {
             ribao_cell(v);
           });
+        }else {
+            changeReportBtnState(data.data)
         }
       }
     },
@@ -725,15 +794,18 @@ function ribao_refrash() {
       if (data.data == undefined || data.data == "") {
         $('#rb_family').empty();
         document.getElementById("btn_shangbao").style['background-color'] = "#D9D9D9";
+          changeReportBtnState(data.data)
       }
       else {
         $('#rb_family').empty();
         if (data.data.length > 0) {
+            changeReportBtnState(data.data)
           hasData = true;
           data.data.forEach(function (v) {
             ribao_cell(v);
           });
         } else {
+            changeReportBtnState(data.data)
         }
       }
     },
@@ -743,12 +815,12 @@ function ribao_refrash() {
 }
 
 function ribao_cell(v) {
-  var userName = v.userName + ":";
+  var userName = v.userName;
   var grender = getGreder(v.grender);
   var age = v.age;
   var familyStatus = "";
   if (v.familyStatus != 0)
-    familyStatus = "基本状况:" + getFamilyStatus(v.familyStatus) + ";";
+    familyStatus = getFamilyStatus(v.familyStatus) + ";";
   var medical = "";
   if (v.medical != 0)
     medical = "新冠肺炎:" + getMedical(v.medical) + ";";
@@ -818,16 +890,35 @@ function ribao_cell(v) {
 
   }
 
-  $('#rb_family').append($('<div class="weui-media-box weui-media-box_text" style="height: auto">\n' +
-    '                                      <h4 class="weui-media-box__title">' + userName + '&nbsp;&nbsp;' + grender + '&nbsp;&nbsp;&nbsp;' + age + '&nbsp;&nbsp;<a style="color: #bc4246" onclick=\'deleteSuspected(' + JSON.stringify(v.suspectedId) + ')\'>删除</a>\n' +
-    '                                      &nbsp;&nbsp;<a style="color: #2a62bc" onclick=\'updateSuspected(' + JSON.stringify(v.suspectedId) + ')\'>修改上报</a></h4>\n' +
-    '                                      <div style="height: auto">' + familyStatus + medical + isContact + isSuspected + singleRoom + temperature + cough + muscle + dyspnea + fatigue + diarrhea + others + scoreRezult + workLocal + todayLocal + isTrip + tripDet + '</>\n' +
-    '                                    </div>\n' +
-    '                              '));
+  // $('#rb_family').append($('<div class="weui-media-box weui-media-box_text" style="height: auto">\n' +
+  //   '                                      <h4 class="weui-media-box__title">' + userName + '&nbsp;&nbsp;' + grender + '&nbsp;&nbsp;&nbsp;' + age + '&nbsp;&nbsp;<a style="color: #bc4246" onclick=\'deleteSuspected(' + JSON.stringify(v.suspectedId) + ')\'>删除</a>\n' +
+  //   '                                      &nbsp;&nbsp;<a style="color: #2a62bc" onclick=\'updateSuspected(' + JSON.stringify(v.suspectedId) + ')\'>修改上报</a></h4>\n' +
+  //   '                                      <div style="height: auto">' + familyStatus + medical + isContact + isSuspected + singleRoom + temperature + cough + muscle + dyspnea + fatigue + diarrhea + others + scoreRezult + workLocal + todayLocal + isTrip + tripDet + '</>\n' +
+  //   '                                    </div>\n' +
+  //   '                              '));
+  $('#rb_family').append($('<div class="weui-form-preview">\n' +
+      '  <div class="weui-form-preview__hd">\n' +
+      '    <label class="weui-form-preview__label">员工</label>\n' +
+      '    <em class="weui-form-preview__value">'+userName + '&nbsp;&nbsp;' + grender + '&nbsp;&nbsp;&nbsp;' + age + '&nbsp;&nbsp;' +
+      '    </em>\n' +
+      '  </div>\n' +
+      '  <div class="weui-form-preview__bd">\n' +
+      '    <div class="weui-form-preview__item">\n' +
+      '      <label class="weui-form-preview__label">基本情况</label>\n' +
+      '      <span class="weui-form-preview__value" style="text-align: left;">'+familyStatus + medical + isContact + isSuspected + singleRoom + temperature + cough + muscle + dyspnea + fatigue + diarrhea + others + scoreRezult + workLocal + todayLocal + isTrip + tripDet+'</span>\n' +
+      '    </div>\n' +
+      '  </div>\n' +
+      '  <div class="weui-form-preview__ft">\n' +
+      '    <a class="weui-form-preview__btn weui-form-preview__btn_default" style="color: #bc4246" href="javascript:" onclick=\'deleteSuspected(' + JSON.stringify(v.suspectedId) + ')\'>删除</a>\n' +
+      '    <button class="weui-form-preview__btn weui-form-preview__btn_primary" style="color:#2a62bc" href="javascript:" onclick=\'updateSuspected(' + JSON.stringify(v.suspectedId) + ')\'>修改上报</button>\n' +
+      '  </div>\n' +
+      '</div>'));
 }
 
 function ribao_add() {
   $('#btnAdd').on('click', function () {
+    userFamilyStatus = '';
+    userFamilyStatusStr = '';
     if ($('#ribao')[0].style.display == 'none') {
       $('#notOpenRibao').toggle();
       $('#ribao')[0].style.display = '';
@@ -836,13 +927,25 @@ function ribao_add() {
       $('#ribao')[0].style.display = 'none';
     }
     //基本情况
-    $("input[name='checkbox1']").removeAttr("checked");
-    $("input[name='checkbox2']").removeAttr("checked");
-    $("input[name='checkbox3']").removeAttr("checked");
-    $("input[name='checkbox4']").removeAttr("checked");
-    $("input[name='checkbox5']").removeAttr("checked");
-    $("input[name='checkbox6']").removeAttr("checked");
-    $("input[name='checkbox7']").removeAttr("checked");
+    // $("input[name='checkbox1']").removeAttr("checked");
+    // $("input[name='checkbox2']").removeAttr("checked");
+    // $("input[name='checkbox3']").removeAttr("checked");
+    // $("input[name='checkbox4']").removeAttr("checked");
+    // $("input[name='checkbox5']").removeAttr("checked");
+    // $("input[name='checkbox6']").removeAttr("checked");
+    // $("input[name='checkbox7']").removeAttr("checked");
+
+      $("#js_input_user_sex").val('男');
+      $("#js_input_user_sex").attr("data-values", 1);
+
+      $("#js_input_user_status").val('');
+      $("#js_input_user_status").attr("data-values", '');
+      $("#js_input_user_crov19").val('无');
+      $("#js_input_user_crov19").attr("data-values", 0);
+
+      $("input[id='s28']").prop("checked", "checked");
+      $("input[id='s38']").prop("checked", "checked");
+
 
     $("#switchQuezhen").val(getMedical(0));
     $("#switchQuezhen").attr("data-values", 0);
@@ -850,7 +953,7 @@ function ribao_add() {
     $("#switchDanjiangeli").val(getSingleRoom(0));
     $("#switchDanjiangeli").attr("data-values", 0);
 
-    $("#js_input_user_tiwen").val(0);
+    $("#js_input_user_tiwen").val(36.5);
 
     $("#js_input_user_kesou").val(getCough(0));
     $("#js_input_user_kesou").attr("data-values", 0);
@@ -1101,53 +1204,53 @@ function ribaoCommit() {
   var age = $("#js_input_user_age").val();
   var userStatus = filterUserStatus($("#js_input_user_status").data().values)
   //不能同时选择服用和未服用
-  if (userStatus.include('1') && userStatus.include('2')) {
+  if (userStatus.indexOf('0')>-1 && userStatus.indexOf('1')>-1) {
     cantijiao = true;
     $.alert("心脑血管不能同时选择服用和未服用");
     return;
   }
   //男性不能选择妊娠期
-  if ($("#js_input_user_sex").attr("data-values") == 1 && userStatus.include('7')) {
+  if ($("#js_input_user_sex").attr("data-values") == 1 && userStatus.indexOf('6')>-1) {
     cantijiao = true;
     $.alert("男性不能选择妊娠期");
     return;
   }
   //家庭状态
   var familyStatus = "";
-  if(userStatus.include('0')){
+  if(!userStatus.length){
       familyStatus += '0,0,0,0,0,0,0'
   }else {
-      if (userStatus.include('1'))
+      if (userStatus.indexOf('0')>-1)
           familyStatus += "1";
       else
           familyStatus += "0";
-      if (userStatus.include('2'))
+      if (userStatus.indexOf('1')>-1)
           familyStatus += ",1";
       else
           familyStatus += ",0";
-      if (userStatus.include('3'))
+      if (userStatus.indexOf('2')>-1)
           familyStatus += ",1";
       else
           familyStatus += ",0";
-      if (userStatus.include('4'))
+      if (userStatus.indexOf('3')>-1)
           familyStatus += ",1";
       else
           familyStatus += ",0";
-      if (userStatus.include('5'))
+      if (userStatus.indexOf('4')>-1)
           familyStatus += ",1";
       else
           familyStatus += ",0";
-      if (userStatus.include('6'))
+      if (userStatus.indexOf('5')>-1)
           familyStatus += ",1";
       else
           familyStatus += ",0";
-      if (userStatus.include('7'))
+      if (userStatus.indexOf('6')>-1)
           familyStatus += ",1";
       else
           familyStatus += ",0";
   }
 
-  var medical = $("input[name='radio']:checked").val();
+  var medical = $("#js_input_user_crov19").data().values;
   if (medical == undefined) {
     cantijiao = true;
     $.alert("请选择新冠肺炎");
@@ -1327,12 +1430,18 @@ function ribaoCommit() {
     "tripDet": listcx,
   };
 
+  //loading
+    var tempTimes = $.toast.prototype.defaults.duration
+    $.toast.prototype.defaults.duration = 0
+    $.toast("处理中...", 'loading');
+
   $.ajax({
     url: '/home/addRibaoTrip',
     type: "post",
     contentType: "application/json; charset=utf-8",
     data: JSON.stringify(pdata),
     success: function (data) {
+        $.toast.prototype.defaults.duration = tempTimes
 
       console.log('data:', data.msgReport);
       if (data == {} || data == '' || data == null || data == undefined) {
@@ -1406,6 +1515,7 @@ function ribaoCommit() {
         $('#txt_shangbaotime').empty();
         // $.toast("请点击上报");
       }
+        $.toast("操作成功");
       ribao_refrash();
       clearShow();
     },
@@ -1434,6 +1544,7 @@ function deleteSuspected(suspectedId) {
           $('#txt_shangbao').append("今日未上报");
           $('#txt_shangbaotime').empty();
           ribao_refrash();
+          clearShow();
           $.toast("删除后请重新添加上报");
         },
       });
@@ -1442,8 +1553,44 @@ function deleteSuspected(suspectedId) {
     }
   });
 }
+//重新填报
+function goReport() {
+    $("#suspectedId").val("");
+    if ($('#ribao')[0].style.display == 'none') {
+        $('#notOpenRibao').toggle();
+        $('#ribao')[0].style.display = '';
+    } else {
+        $('#notOpenRibao')[0].style.display = '';
+        $('#ribao')[0].style.display = 'none';
+    }
+}
 
+//修改上报
 function updateSuspected(suspectedId) {
+    userFamilyStatus = ''
+    userFamilyStatusStr = ''
+  var crov19States = [
+          {
+              title: "无",
+              value: "0",
+          },
+          {
+              title: "确诊",
+              value: "1",
+          },
+          {
+              title: "疑似",
+              value: "2",
+          },
+          {
+              title: "有接触史",
+              value: "3",
+          },
+          {
+              title: "解除隔离",
+              value: "4",
+          },
+      ];
   $("#suspectedId").val("");
   if ($('#ribao')[0].style.display == 'none') {
     $('#notOpenRibao').toggle();
@@ -1503,20 +1650,28 @@ function updateSuspected(suspectedId) {
         //     $("input[name='checkbox7']").removeAttr("checked");
         //
         // }
-        $("#js_input_user_status").val(getFamilyStatus(suspected.familyStatus));
-        $("#js_input_user_status").attr("data-values", formatUserStatus(suspected.familyStatus));
+          userFamilyStatus = formatUserStatus(suspected.familyStatus)
+          userFamilyStatusStr = getFamilyStatus(suspected.familyStatus)
+        $("#js_input_user_status").val(userFamilyStatusStr);
+        // $("#js_input_user_status").attr("data-values", formatUserStatus(suspected.familyStatus));
+
+        $("#js_input_user_status").data("values", userFamilyStatus);
 
         // $("#jibenmiaoshu").val(suspected.statusDesp);
-        if (suspected.medical == 0)
-          $("input[id='s18']").prop("checked", "checked");
-        if (suspected.medical == 1)
-          $("input[id='s19']").prop("checked", "checked");
-        if (suspected.medical == 2)
-          $("input[id='s20']").prop("checked", "checked");
-        if (suspected.medical == 3)
-          $("input[id='s21']").prop("checked", "checked");
-        if (suspected.medical == 4)
-          $("input[id='s22']").prop("checked", "checked");
+        // if (suspected.medical == 0)
+        //   $("input[id='s18']").prop("checked", "checked");
+        // if (suspected.medical == 1)
+        //   $("input[id='s19']").prop("checked", "checked");
+        // if (suspected.medical == 2)
+        //   $("input[id='s20']").prop("checked", "checked");
+        // if (suspected.medical == 3)
+        //   $("input[id='s21']").prop("checked", "checked");
+        // if (suspected.medical == 4)
+        //   $("input[id='s22']").prop("checked", "checked");
+          $("#js_input_user_crov19").val(crov19States[suspected.medical].title);
+          $("#js_input_user_crov19").attr("data-values", suspected.medical);
+
+
         if (suspected.isContact == 0)
           $("input[id='s28']").prop("checked", "checked");
         if (suspected.isContact == 1)
@@ -1682,7 +1837,6 @@ function addReport() {
         $('#txt_shangbaotime').empty();
         $('#txt_shangbaotime').append("上报时间:" + time);
       }
-
     },
   });
 }
@@ -1821,6 +1975,7 @@ function getGreder(greder) {
 
 function getFamilyStatus(familyStatus) {
   var familyStatusList = familyStatus.split(",");
+  console.log(familyStatusList)
   var familyStatusString = "";
   if (familyStatus == '0,0,0,0,0,0,0')
     familyStatusString += "无病史";
@@ -1844,8 +1999,21 @@ function getFamilyStatus(familyStatus) {
 }
 
 function formatUserStatus(str) {
-    var statusList = str.split(',')
-
+    var statusList = str.split(',');
+    console.log(statusList)
+    var resultStr = '';
+    for(var i = 0;i<statusList.length;i++){
+      if(statusList[i] == 1){
+        resultStr += i+','
+      }
+    }
+    if(resultStr){
+        var tempArr = resultStr.split(',')
+        tempArr.pop()
+        resultStr = tempArr.join(',')
+    }
+    console.log(resultStr)
+    return resultStr
 }
 
 function getCough(cough) {
@@ -1994,6 +2162,12 @@ function getDiarrhea(diarrhea) {
 function clearShow() {
   console.log("qingkong")
   $("#suspectedId").val("");
+    $("#js_input_user_name").val("");
+    $("#js_input_user_age").val("");
+
+    $("#js_input_user_sex").val('男');
+    $("#js_input_user_sex").attr("data-values", 1);
+
 
   $("#switchQuezhen").attr("data-values", "");
 
@@ -2039,13 +2213,21 @@ function clearShow() {
   $('#none')[0].style.display = 'none';
 
 
-  $("input[id='s18']").removeAttr("checked");
-  $("input[id='s19']").removeAttr("checked");
-  $("input[id='s20']").removeAttr("checked");
-  $("input[id='s21']").removeAttr("checked");
-  $("input[id='s22']").removeAttr("checked");
+  // $("input[id='s18']").removeAttr("checked");
+  // $("input[id='s19']").removeAttr("checked");
+  // $("input[id='s20']").removeAttr("checked");
+  // $("input[id='s21']").removeAttr("checked");
+  // $("input[id='s22']").removeAttr("checked");
+    $("#js_input_user_status").val('');
+    $("#js_input_user_status").attr("data-values", '');
+    $("#js_input_user_crov19").val('无');
+    $("#js_input_user_crov19").attr("data-values", '0');
+
+
   $("input[id='s28']").removeAttr("checked");
   $("input[id='s29']").removeAttr("checked");
+  $("input[id='s38']").removeAttr("checked");
+  $("input[id='s39']").removeAttr("checked");
 }
 
 //健康评估
@@ -2138,3 +2320,5 @@ function getScoreRezult(scoreRezult, temperatureScore) {
 
 
 
+
+