Browse Source

日报页面完成

Longlin 5 years ago
parent
commit
b884f63d22
2 changed files with 348 additions and 87 deletions
  1. 148 87
      whepi-ui/templates/home/ribao.ftl
  2. 200 0
      whepi-ui/templates/home/ribao.js

+ 148 - 87
whepi-ui/templates/home/ribao.ftl

@@ -38,97 +38,158 @@
                         <a class="weui-btn weui-btn_primary" href="javascript:" id="showTooltips" onclick="addReport()">全家报平安</a>
                     </div>
                 </div>
-                <div id="ribao" style="display: none">
-                    <div class="weui-form__control-area">
-                        <div class="weui-cells__group weui-cells__group_form">
-                            <div class="weui-cells weui-cells_form">
-                                <div class="weui-cell weui-cell_active" id="js_cell">
-                                    <div class="weui-cell__hd"><label class="weui-label">家人</label></div>
-                                    <div class="weui-cell__bd weui-flex">
-                                        <input id="js_input_user_name" class="weui-input" autofocus="" type="text"
-                                               placeholder="请输入姓名" maxlength="20">
-                                    </div>
-                                </div>
-                                <div class="weui-cells weui-cells_checkbox">
-                                    <label class="weui-cell weui-cell_active weui-check__label" for="s11">
-                                        <div class="weui-cell__hd">
-                                            <input type="checkbox" class="weui-check" name="checkbox1" id="s11">
-                                            <i class="weui-icon-checked"></i>
-                                        </div>
-                                        <div class="weui-cell__bd">
-                                            <p>咳嗽</p>
-                                        </div>
-                                    </label>
-                                    <label class="weui-cell weui-cell_active weui-check__label" for="s12">
-                                        <div class="weui-cell__hd">
-                                            <input type="checkbox" name="checkbox2" class="weui-check" id="s12">
-                                            <i class="weui-icon-checked"></i>
-                                        </div>
-                                        <div class="weui-cell__bd">
-                                            <p>发烧</p>
-                                        </div>
-                                    </label>
-                                    <label class="weui-cell weui-cell_active weui-check__label" for="s13">
-                                        <div class="weui-cell__hd">
-                                            <input type="checkbox" name="checkbox3" class="weui-check" id="s13">
-                                            <i class="weui-icon-checked"></i>
-                                        </div>
-                                        <div class="weui-cell__bd">
-                                            <p>腹泻</p>
-                                        </div>
-                                    </label>
-                                    <label class="weui-cell weui-cell_active weui-check__label" for="s14">
-                                        <div class="weui-cell__hd">
-                                            <input type="checkbox" name="checkbox4" class="weui-check" id="s14">
-                                            <i class="weui-icon-checked"></i>
-                                        </div>
-                                        <div class="weui-cell__bd">
-                                            <p>酸痛</p>
-                                        </div>
-                                    </label>
-                                    <label class="weui-cell weui-cell_active weui-check__label" for="s15">
-                                        <div class="weui-cell__hd">
-                                            <input type="checkbox" name="checkbox5" class="weui-check" id="s15">
-                                            <i class="weui-icon-checked"></i>
-                                        </div>
-                                        <div class="weui-cell__bd">
-                                            <p>乏力</p>
-                                        </div>
-                                    </label>
-                                    <label class="weui-cell weui-cell_active weui-check__label" for="s16">
-                                        <div class="weui-cell__hd">
-                                            <input type="checkbox" name="checkbox6" class="weui-check" id="s16">
-                                            <i class="weui-icon-checked"></i>
-                                        </div>
-                                        <div class="weui-cell__bd">
-                                            <p>其他</p>
-                                        </div>
-                                    </label>
-                                </div>
-                                <div class="weui-cell ">
-                                    <div class="weui-cell__bd">
-                                        <textarea id="rb_remarks" class="weui-textarea" placeholder="请输入病情描述"
-                                                  rows="3"></textarea>
-                                        <div class="weui-textarea-counter"><span>0</span>/100</div>
-                                    </div>
-                                </div>
-                                <div class="weui-cell weui-cell_switch">
-                                    <div class="weui-cell__bd">是否确诊</div>
-                                    <div class="weui-cell__ft">
-                                        <input class="weui-switch" type="checkbox" name="medical"/>
-                                    </div>
-                                </div>
+                <div id="ribao" class="weui-btn-area" style="display: none">
+                    <div style="text-align: center;">基本信息</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;" />
+                        <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" 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;" />
+                    </div>
+                    <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
+                        <div style="width: 20%;height: 5vh; line-height: 5vh;margin-left: 2vw;">基本状况</div>
+                        <input id="js_input_user_status" 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: 75%;" />
+                    </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>
+                    <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
+                        <div style="width: 20%;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">
                             </div>
                         </div>
                     </div>
-                    <div class="weui-cells__tips"> <span style="color: red">
-                        注:请如实上报情况,便以相互帮助,小区是我家,团结就是力量!
-                    </span></div>
-                    <div class="button-sp-area">
-                        <a id="cancel" href="javascript:;" class="weui-btn weui-btn_default">取消</a>
-                        <a id="commit" href="javascript:;" onclick="ribaoCommit();"
-                           class="weui-btn weui-btn_primary">提交</a>
+                    <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
+                        <div style="color: gray;height: 5vh; line-height: 5vh; width: 10%;">体温</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; width: 35%;" />
+                        <div style="color: gray;height: 5vh; line-height: 5vh; width: 10%;margin-left: 5vw;">咳嗽</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; width: 35%;" />
+                    </div>
+                    <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
+                        <div style="color: gray;height: 5vh;line-height: 2.5vh; width: 10%;">肌肉酸痛</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; width: 35%;" />
+                        <div style="color: gray;height: 5vh;line-height: 2.5vh; width: 10%;margin-left: 5vw;">呼吸困难</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; width: 35%;" />
+                    </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: 10%;">胸闷</div>
+                        <input id="js_input_user_xiongmen" 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%;" />
+                        <div style="color: gray;height: 5vh; line-height: 5vh; width: 10%;margin-left: 5vw;">乏力</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; width: 35%;" />
+                    </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: 10%;">腹泻</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; width: 35%;" />
+                        <div style="width: 50%; display: flex; flex-direction: row;">
+                            <input id="js_input_user_cishu" 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%;" />
+                            <div style="color: gray;height: 5vh; line-height: 5vh; width: 30%; margin-left: 3vw;">次/日</div>
+                        </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: 10%;margin-right: 2vw;">其他</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>
+                    <div style="display: flex; justify-content: center;">
+                        <div style="width: 70%;color: red; text-align: center;">
+                            请认真填写健康信息,会根据信息给予相关居家防控医疗建议!
+                        </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>
+                    <#--                    <div class="weui-form__control-area">-->
+<#--                        <div class="weui-cells__group weui-cells__group_form">-->
+<#--                            <div class="weui-cells weui-cells_form">-->
+<#--                                <div class="weui-cell weui-cell_active" id="js_cell">-->
+<#--                                    <div class="weui-cell__hd"><label class="weui-label">家人</label></div>-->
+<#--                                    <div class="weui-cell__bd weui-flex">-->
+<#--                                        <input id="js_input_user_name" class="weui-input" autofocus="" type="text"-->
+<#--                                               placeholder="请输入姓名" maxlength="20">-->
+<#--                                    </div>-->
+<#--                                </div>-->
+<#--                                <div class="weui-cells weui-cells_checkbox">-->
+<#--                                    <label class="weui-cell weui-cell_active weui-check__label" for="s11">-->
+<#--                                        <div class="weui-cell__hd">-->
+<#--                                            <input type="checkbox" class="weui-check" name="checkbox1" id="s11">-->
+<#--                                            <i class="weui-icon-checked"></i>-->
+<#--                                        </div>-->
+<#--                                        <div class="weui-cell__bd">-->
+<#--                                            <p>咳嗽</p>-->
+<#--                                        </div>-->
+<#--                                    </label>-->
+<#--                                    <label class="weui-cell weui-cell_active weui-check__label" for="s12">-->
+<#--                                        <div class="weui-cell__hd">-->
+<#--                                            <input type="checkbox" name="checkbox2" class="weui-check" id="s12">-->
+<#--                                            <i class="weui-icon-checked"></i>-->
+<#--                                        </div>-->
+<#--                                        <div class="weui-cell__bd">-->
+<#--                                            <p>发烧</p>-->
+<#--                                        </div>-->
+<#--                                    </label>-->
+<#--                                    <label class="weui-cell weui-cell_active weui-check__label" for="s13">-->
+<#--                                        <div class="weui-cell__hd">-->
+<#--                                            <input type="checkbox" name="checkbox3" class="weui-check" id="s13">-->
+<#--                                            <i class="weui-icon-checked"></i>-->
+<#--                                        </div>-->
+<#--                                        <div class="weui-cell__bd">-->
+<#--                                            <p>腹泻</p>-->
+<#--                                        </div>-->
+<#--                                    </label>-->
+<#--                                    <label class="weui-cell weui-cell_active weui-check__label" for="s14">-->
+<#--                                        <div class="weui-cell__hd">-->
+<#--                                            <input type="checkbox" name="checkbox4" class="weui-check" id="s14">-->
+<#--                                            <i class="weui-icon-checked"></i>-->
+<#--                                        </div>-->
+<#--                                        <div class="weui-cell__bd">-->
+<#--                                            <p>酸痛</p>-->
+<#--                                        </div>-->
+<#--                                    </label>-->
+<#--                                    <label class="weui-cell weui-cell_active weui-check__label" for="s15">-->
+<#--                                        <div class="weui-cell__hd">-->
+<#--                                            <input type="checkbox" name="checkbox5" class="weui-check" id="s15">-->
+<#--                                            <i class="weui-icon-checked"></i>-->
+<#--                                        </div>-->
+<#--                                        <div class="weui-cell__bd">-->
+<#--                                            <p>乏力</p>-->
+<#--                                        </div>-->
+<#--                                    </label>-->
+<#--                                    <label class="weui-cell weui-cell_active weui-check__label" for="s16">-->
+<#--                                        <div class="weui-cell__hd">-->
+<#--                                            <input type="checkbox" name="checkbox6" class="weui-check" id="s16">-->
+<#--                                            <i class="weui-icon-checked"></i>-->
+<#--                                        </div>-->
+<#--                                        <div class="weui-cell__bd">-->
+<#--                                            <p>其他</p>-->
+<#--                                        </div>-->
+<#--                                    </label>-->
+<#--                                </div>-->
+<#--                                <div class="weui-cell ">-->
+<#--                                    <div class="weui-cell__bd">-->
+<#--                                        <textarea id="rb_remarks" class="weui-textarea" placeholder="请输入病情描述"-->
+<#--                                                  rows="3"></textarea>-->
+<#--                                        <div class="weui-textarea-counter"><span>0</span>/100</div>-->
+<#--                                    </div>-->
+<#--                                </div>-->
+<#--                                <div class="weui-cell weui-cell_switch">-->
+<#--                                    <div class="weui-cell__bd">是否确诊</div>-->
+<#--                                    <div class="weui-cell__ft">-->
+<#--                                        <input class="weui-switch" type="checkbox" name="medical"/>-->
+<#--                                    </div>-->
+<#--                                </div>-->
+<#--                            </div>-->
+<#--                        </div>-->
+<#--                    </div>-->
+<#--                    <div class="weui-cells__tips"> <span style="color: red">-->
+<#--                        注:请如实上报情况,便以相互帮助,小区是我家,团结就是力量!-->
+<#--                    </span></div>-->
+<#--                    <div class="button-sp-area">-->
+<#--                        <a id="cancel" href="javascript:;" class="weui-btn weui-btn_default">取消</a>-->
+<#--                        <a id="commit" href="javascript:;" onclick="ribaoCommit();"-->
+<#--                           class="weui-btn weui-btn_primary">提交</a>-->
+<#--                    </div>-->
                 </div>
                 </br>
                 </br>

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

@@ -3,6 +3,185 @@ function ribao_init() {
     window.location.href = "/yeweihui/home.html";
   });
 
+  $("#js_input_user_sex").select({
+    title: "选择性别",
+    items: [
+      {
+        title: "男",
+        value: "1",
+      },
+      {
+        title: "女",
+        value: "2",
+      }]
+  });
+
+  $("#js_input_user_status").select({
+    title: "选择基本状况",
+    items: [
+      {
+        title: "心脑血管疾病(服用ARB)",
+        value: "1",
+      },
+      {
+        title: "心脑血管疾病(未服ARB)",
+        value: "2",
+      },
+      {
+        title: "呼吸系统病史",
+        value: "3",
+      },
+      {
+        title: "肿瘤病史",
+        value: "4",
+      },
+      {
+        title: "糖尿病史",
+        value: "5",
+      },
+      {
+        title: "服用过激素药物",
+        value: "6",
+      },
+      {
+        title: "妊娠期",
+        value: "7",
+      },{
+        title: "其他",
+        value: "8",
+      }]
+  });
+
+  $("#js_input_user_kesou").select({
+    title: "选择咳嗽情况",
+    items: [
+      {
+        title: "无咳嗽",
+        value: "1",
+      },
+      {
+        title: "偶尔短暂咳嗽",
+        value: "2",
+      },
+      {
+        title: "频繁咳嗽轻度影响生活",
+        value: "3",
+      },
+      {
+        title: "频繁咳嗽重度影响生活",
+        value: "4",
+      }]
+  });
+
+  $("#js_input_user_jirou").select({
+    title: "选择肌肉情况",
+    items: [
+      {
+        title: "无",
+        value: "1",
+      },
+      {
+        title: "加重",
+        value: "2",
+      },
+      {
+        title: "好转",
+        value: "3",
+      },
+      {
+        title: "无变化",
+        value: "4",
+      }]
+  });
+
+  $("#js_input_user_huxi").select({
+    title: "选择呼吸情况",
+    items: [
+      {
+        title: "无",
+        value: "1",
+      },
+      {
+        title: "加重",
+        value: "2",
+      },
+      {
+        title: "好转",
+        value: "3",
+      },
+      {
+        title: "无变化",
+        value: "4",
+      },
+      {
+        title: "严重",
+        value: "5",
+      }]
+  });
+
+  $("#js_input_user_xiongmen").select({
+    title: "选择胸闷情况",
+    items: [
+      {
+        title: "无",
+        value: "1",
+      },
+      {
+        title: "端坐呼吸",
+        value: "2",
+      },
+      {
+        title: "活动无耐力",
+        value: "3",
+      },
+      {
+        title: "无变化",
+        value: "4",
+      }]
+  });
+
+  $("#js_input_user_fali").select({
+    title: "选择乏力情况",
+    items: [
+      {
+        title: "无",
+        value: "1",
+      },
+      {
+        title: "加重",
+        value: "2",
+      },
+      {
+        title: "好转",
+        value: "3",
+      },
+      {
+        title: "无变化",
+        value: "4",
+      }]
+  });
+
+  $("#js_input_user_fuxie").select({
+    title: "选择乏力情况",
+    items: [
+      {
+        title: "无",
+        value: "1",
+      },
+      {
+        title: "有",
+        value: "2",
+      }]
+  });
+
+  $("#rb_switch").bind("click", function () {
+    if ($("#switchQuezhen").val() == "off") {
+      $("#switchQuezhen").val("on");
+    } else {
+      $("#switchQuezhen").val("off");
+    }
+  });
+
 }
 
 //近日报告
@@ -108,6 +287,27 @@ function ribao_cancel() {
 }
 
 function ribaoCommit() {
+
+  console.log("sss");
+  console.log(
+      "姓名", $("#js_input_user_name").val(),
+      "性别", $("#js_input_user_sex").val(), "实际值", $("#js_input_user_sex").attr("data-values"),
+      "年龄", $("#js_input_user_age").val(),
+      "基本状况", $("#js_input_user_status").val(),
+      "状况描述", $("#jibenmiaoshu").val(),
+      "是否确诊", $("#switchQuezhen").val(),
+      "体温", $("#js_input_user_tiwen").val(),
+      "咳嗽", $("#js_input_user_kesou").val(),
+      "肌肉酸痛", $("#js_input_user_jirou").val(),
+      "呼吸困难", $("#js_input_user_huxi").val(),
+      "胸闷", $("#js_input_user_xiongmen").val(),
+      "乏力", $("#js_input_user_fali").val(),
+      "腹泻", $("#js_input_user_fuxie").val(),
+      "次数", $("#js_input_user_cishu").val(),
+      "其他", $("#shuruqita").val(),
+  );
+  return;
+
   var userId = $("#userId").val();
   var user_name = $("#js_input_user_name").val();
   if (user_name == "") {