Prechádzať zdrojové kódy

设置初始化值。温度输入框为数字

Longlin 5 rokov pred
rodič
commit
f7bedbd1ab

+ 5 - 3
whepi-ui/templates/home/ribao.ftl

@@ -54,7 +54,6 @@
                         <div style="height: 5vh; line-height: 5vh;margin-left: 2vw;">病情描述</div>
                         <div style="width: 70%;display:flex; flex-direction: row;">
                             <div style="color: gray;height: 5vh; line-height: 5vh;margin-right: 5vw;">是否确诊</div>
-<#--                            <input id="switchQuezhen" class="weui-switch" type="checkbox">-->
                             <input hidden="hidden" name="switchQuezhen" id="switchQuezhen" value="off" type="radio" checked="checked"/>
                             <div class="weui-cell__ft">
                                 <input class="weui-switch" type="checkbox" id="rb_switch" name="rb_switch">
@@ -63,7 +62,7 @@
                     </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: 30%;">体温</div>
-                        <input id="js_input_user_tiwen" 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;" />
+                        <input id="js_input_user_tiwen" class="weui-input" autofocus="" type="number" placeholder="请输入" maxlength="20" style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;" />
                     </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: 30%;">咳嗽</div>
@@ -87,7 +86,10 @@
                     </div>
                     <div style="display:flex; flex-direction: row; margin-top: 1vh;">
                         <div style="color: gray;height: 5vh; line-height: 5vh; margin-right: 2vw;">是否单间隔离</div>
-                        <input id="js_input_user_danjiangeli" 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: 35%;" />
+                        <input hidden="hidden" name="js_input_user_danjiangeli" id="switchQuezhen" value="off" type="radio" checked="checked"/>
+                        <div class="weui-cell__ft">
+                            <input class="weui-switch" type="checkbox" id="rb_switch_2" name="rb_switch">
+                        </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;margin-right: 2vw;width: 13%;">其他</div>

+ 10 - 0
whepi-ui/templates/home/ribao.js

@@ -1,4 +1,7 @@
 function ribao_init() {
+
+  $("#js_input_user_sex").val("女");   //设置初始值
+
   $('#btnRB').on('click', function () {
     window.location.href = "/yeweihui/home.html";
   });
@@ -177,6 +180,13 @@ function ribao_init() {
     }
   });
 
+  $("#rb_switch2").bind("click", function () {
+    if ($("#js_input_user_danjiangeli").val() == "off") {
+      $("#js_input_user_danjiangeli").val("on");
+    } else {
+      $("#js_input_user_danjiangeli").val("off");
+    }
+  });
 }
 
 //近日报告