Prechádzať zdrojové kódy

Merge remote-tracking branch 'origin/master'

Longlin 5 rokov pred
rodič
commit
6f8c31ed02

+ 4 - 0
whepi-ui/templates/home/frag.head.ftl

@@ -148,6 +148,10 @@
             margin-right: 0.5vw;
             margin-top: 0.7vw;
         }
+        .tt{
+            border-top: 3px solid #75859f;
+            margin-top:2.4em
+        }
     </style>
 </head>
 <span hidden="hidden" id="id"></span>

+ 189 - 0
whepi-ui/templates/lingyun/home.ftl

@@ -0,0 +1,189 @@
+<#assign title="凌云是我家"/>
+<#include "/home/frag.head.ftl" />
+
+<div class="weui-tab">
+    <input id="userId" type="text" hidden="hidden" value=${user_id!}/>
+    <div class="weui-tab__bd">
+        <div id="tab1" class="weui-tab__bd-item weui-tab__bd-item--active">
+            <#include "/lingyun/ribao.ftl" /></div>
+        <div id="tab2" class="weui-tab__bd-item">
+            <#include "/home/qiuzhu.ftl" /></div>
+        <div id="tab3" class="weui-tab__bd-item">
+    <#include "/home/buy.ftl" /></div>
+    <#--<div id="tab4" class="weui-tab__bd-item">-->
+    <#--<h1>页面四</h1> </div>-->
+    </div>
+    <div class="weui-tabbar">
+        <a id="jt1" href="#tab1" class="weui-tabbar__item weui-bar__item--on">
+            <div class="weui-tabbar__icon"><img src="/static/images/wx/order.png" alt=""></div>
+            <p class="weui-tabbar__label">健康日报</p>
+        </a>
+        <a id="jt2" href="#tab2" class="weui-tabbar__item" ">
+            <div class="weui-tabbar__icon"><img src="/static/images/wx/customer_service.png" alt=""></div>
+            <p class="weui-tabbar__label">家庭求助</p>
+        </a>
+        <a id="jt3" href="#tab3" class="weui-tabbar__item" ">
+            <div class="weui-tabbar__icon"><img src="/static/images/wx/upload.png" alt=""></div>
+            <p class="weui-tabbar__label">团购</p>
+        </a>
+    <#--<a href="#tab4" class="weui-tabbar__item">-->
+    <#--<div class="weui-tabbar__icon"> <img src="./images/icon_nav_cell.png" alt=""> </div>-->
+    <#--<p class="weui-tabbar__label">我</p>-->
+    <#--</a>-->
+    </div>
+</div>
+
+
+</body>
+
+<#include "/home/frag.foot.ftl" />
+<script>
+    <#include "/lingyun/ribao.js" />
+    <#include "/home/qiuzhu.js" />
+    (function ($) {
+
+        $(function () {
+            $('.weui-navbar__item').on('click', function () {
+                $(this).addClass('weui-bar__item_on').siblings('.weui-bar__item_on').removeClass('weui-bar__item_on');
+                //内容切换
+                var moduleClass = jQuery(this).attr("module");
+                var ss = ".weui-tab__panel ." + moduleClass + "_weui_tab_bd_item_active";
+                $(ss).removeClass(moduleClass + '_weui_tab_bd_item_active');
+                var data_toggle = jQuery(this).attr("target");
+                $(data_toggle).addClass(moduleClass + "_weui_tab_bd_item_active");
+            });
+        });
+
+
+        ribao_init();
+        qiuzhu_init();
+        family_init();
+        ribao_add();
+        ribao_cancel();
+
+        <#if msReport ??>var msReport = ${msReport}</#if>;
+        $('#ribao_jinrijujian').append(msReport.safetyNum);
+        if (msReport.reportStatus == 1) {
+            document.getElementById("btn_shangbao").style['background-color'] = "#D9D9D9";
+        }
+        ribaoInitialization(msReport.reportId);
+        $("#my-input-ribao").calendar();
+        /*submit_back();*/
+        familyClick();
+
+        $(function () {
+            $("#ground").bind("click", function () {
+                if ($("#Gj").val() == "off") {
+                    $("#Gj").val("on");
+                    console.log("关闭查看所有");
+
+                    qzMy_help('', $("#quetyFamily").val());
+                } else {
+                    $("#Gj").val("off");
+                    console.log("查看已解决的");
+                    qzMy_help(3, $("#quetyFamily").val());
+                }
+            });
+        });
+
+
+        function selectTab() {
+            $("#tab1").removeClass('weui-tab__bd-item--active');
+            $("#jt1").removeClass('weui-bar__item--on');
+            $("#tab3").addClass('weui-tab__bd-item--active');
+            $("#jt3").addClass('weui-bar__item--on');
+            buyGroup();
+        }
+
+        function selectqiuzhu() {
+            $("#tab1").removeClass('weui-tab__bd-item--active');
+            $("#jt1").removeClass('weui-bar__item--on');
+            $("#tab2").addClass('weui-tab__bd-item--active');
+            $("#jt2").addClass('weui-bar__item--on');
+            familyClick();
+        }
+
+        var show = ${show!'"-"'};
+
+        if (show == 'tuangou') {
+            selectTab();
+
+        } else if (show == 'qiuzhu') {
+            selectqiuzhu();
+        }
+    })(jQuery);
+
+
+    //小区求助信息的展示
+    function familyClick() {
+        $('#notitle').empty();//清除节点
+        $.ajax({
+            url: '/home/home/queryQzTaskxq',
+            data: {userId: $('#userId').val()},
+            type: 'GET',
+            async: false,
+            success: function (data) {
+                console.log(data);
+                if (data.data.length > 0) {
+                    hasData = true;
+                    data.data.forEach(function (v) {
+                        familyValue(v);
+                    });
+                } else {
+
+                }
+            },
+            error: function () {
+            }
+        });
+    }
+
+    function familyValue(v) {
+        $('#notitle').append($('<a class="weui-cell weui-cell_active weui-cell_access js_item" data-id="form" ' +
+                '                               onclick=\'xiaoQuItemClick(' + JSON.stringify(v) + ')\'>\n' +
+                '                        <div class="weui-cell__bd" taskId="1212>\n' +
+                '                            <div class="weui-media-box weui-media-box_text" id="title">\n' +
+                '                                <p class="weui-media-box__desc" >' + v.taskTitle + '</p>\n' +
+                '                            </div>\n' +
+                '                        </div>\n' +
+                '                        <div class="weui-cell__ft">' + conversion(v.taskStatus) + '</div>\n' +
+                '                    </a>\n<br/>'));
+
+    }
+
+    function xiaoQuItemClick(v) {
+        window.location.href = "/quzhu/home/quxiao.html?taskId=" + v.taskId + "&userId=" + $('#userId').val();
+        /*familyClick();*/
+        /*    $.ajax({
+                url: '/home/home/taskQuery',
+                data: {taskId: v.taskId},
+                type: 'GET',
+                success: function (data) {
+                    console.log(data);
+                    if ($('#userId').val() != data.data.userId) {
+                        $.alert('当前求助信息不是你的')
+                        return;
+                    } else {
+                        window.location.href = "/quzhu/home/quxiao.html?taskId=" + v.taskId + "&userId=" + v.userId;
+                        familyClick()
+                    }
+                },
+                error: function () {
+                }
+            });*/
+
+    }
+
+
+    //完成 已解决  为完成的方法
+    function conversion(a) {
+        if (a == 1) {
+            return "<span style='color:red;'>未解决</span>";
+        } else if (a == 2) {
+            return "<span style='color:Black;'>处理中</span>";
+        } else {
+            return "<span style='color:green;'>已完成</span>";
+        }
+    }
+
+</script>

+ 94 - 0
whepi-ui/templates/lingyun/ribao.ftl

@@ -0,0 +1,94 @@
+
+<div class="page__bd">
+    <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()">
+                今日报告
+            </a>
+            <a class="weui-navbar__item" target="#rb_nav2" module="ri_bao">
+                健康日历
+            </a>
+        </div>
+        <div class="weui-tab__panel">
+            <div id="rb_nav1" class="weui-tab__bd-item ri_bao_weui_tab_bd_item_active">
+
+                <div id="ribao" class="weui-btn-area"><#--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: 55%;">工作驻地</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%" onchange="selectinput(this)"/>
+                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                        <input 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;" />
+                    </div>
+                    <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
+                        <div style="height: 5vh; line-height: 5vh; width: 55%;">今日所在地</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%"/>
+                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                        <input 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;" />
+                    </div>
+                    <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
+                        <div style="height: 5vh; line-height: 5vh; width: 55%;">是否出行</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: 145%"/>
+                      </div>
+                    <br/>
+                    <#--<div style="text-align: center;height: 1vh;">出行情况上报</div>-->
+                    <div class="weui-loadmore weui-loadmore_line" style="width: 100%;height: 1vh;">
+                        <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: 55%;">出发地</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%"/>
+                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                        <input 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;" />
+                    </div>
+                    <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
+                        <div style="height: 5vh; line-height: 5vh; width: 55%;">目的地</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%"/>
+                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                        <input 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;" />
+                    </div>
+                    <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
+                        <div style="height: 5vh; line-height: 5vh; width: 55%;">出行方式</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%"/>
+                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                        <input placeholder="车次/航班/车牌" type="text" disabled="disabled" 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;" />
+
+                    </div>
+                    <div class="weui-cell__ft" style="margin-top: 1vh;">
+                        <button id="btnAdd" href="javascript:" style="height:5vh; margin-right: 0vh;width: 70px;"
+                                class="weui-btn weui-btn_mini weui-btn_primary">添加
+                        </button>
+                    </div>
+                    <div class="weui-loadmore tt" style="width: 100%;height: 1vh;margin-top: 1vh;">
+                    </div>
+                    <div>
+                        <table cellspacing="0" cellpadding="0" style="width: 100%">
+                            <tbody id="tabtr"><#--border="1" cellspacing="0" cellpadding="0"-->
+                            <tr style="background-color: #f8f8f8;">
+                               <#-- <td style="text-align: center;">序号</td>
+                                <td style="text-align: center;">出发地</td>
+                                <td style="text-align: center;">目的地</td>
+                                <td style="text-align: center;">出行方式</td>
+                                <td style="text-align: center;">车次/航班/车牌</td>-->
+                            </tr>
+                            </tbody>
+                        </table>
+                        <table id="tab5" class="new_tab" align="left" cellpadding="0" cellspacing="0"
+                               style="width: 100%;">
+                        </table>
+                    </div>
+                    </div>
+                </br>
+                </br>
+            </div>
+        </div>
+    </div>
+</div>
+
+
+

+ 847 - 0
whepi-ui/templates/lingyun/ribao.js

@@ -0,0 +1,847 @@
+function ribao_init() {
+    var xxIds = [];
+    var xxName = [
+        "序号",
+        "出发地",
+        "目的地",
+        "出行方式",
+        "车次/航班/车牌"
+    ];
+    for (var i = 0; i < xxName.length; i++) {
+        xxIds.push({
+            name: xxName[i]
+        });
+    }
+    var html = "<tr style='background-color: #f8f8f8;'>";
+    for (var i = 0; i < xxIds.length; i++) {
+        // alert(xxIds[i].name);
+        html += "<th>" + xxIds[i].name + "</th>";
+    }
+    html +="</tr>"
+    for (var i = 0; i < 10; i++) {//后端传过来的集合遍历
+        if (i % 2 != 0) {
+            html += "<tr style='background-color: #f8f8f8;'>";
+        }
+        else {
+            html += "<tr>";
+        }
+
+        html += "<td style='text-align: center;'>" + (i + 1) + "</td>";
+        // var isValue = false; //记录是否赋值
+        html += "<td style='text-align: center;' >" + "mao" + " </td>";
+        html += "<td style='text-align: center;' >" + "mao" + " </td>";
+        html += "<td style='text-align: center;' >" + "mao" + " </td>";
+        html += "<td style='text-align: center;' >" + "mao" + " </td>";
+
+        html += "</tr>";
+        $("#tabtr").html(html);
+    }
+
+    $('#btnRB').on('click', function () {
+        window.location.href = "/yeweihui/home.html";
+    });
+
+    $("#js_input_gzzd").select({
+        title: "选择工作驻地",
+        items: [
+            {
+                title: "武汉市",
+                value: "1",
+            },
+            {
+                title: "宜昌市",
+                value: "2",
+            },
+            {
+                title: "当阳市",
+                value: "3",
+            }]
+    });
+
+    $("#js_input_jrszd").select({
+        title: "选择今日所在地",
+        items: [
+            {
+                title: "武汉市",
+                value: "1",
+            }, {
+                title: "宜昌市",
+                value: "2",
+            },
+            {
+                title: "当阳市",
+                value: "3",
+            },
+            {
+                title: "其它地点",
+                value: "4",
+            }]
+    });
+
+    $("#js_input_sf").select({
+        title: "",
+        items: [
+            {
+                title: "是",
+                value: "1",
+            },
+            {
+                title: "否",
+                value: "2",
+            }]
+    });
+
+    $("#js_input_cfd").select({
+        title: "选择出发地",
+        items: [
+            {
+                title: "武汉市",
+                value: "1",
+            }, {
+                title: "宜昌市",
+                value: "2",
+            },
+            {
+                title: "当阳市",
+                value: "3",
+            },
+            {
+                title: "其它地点",
+                value: "4",
+            }]
+    });
+
+    $("#js_input_mdd").select({
+        title: "选择目的地",
+        items: [
+            {
+                title: "武汉市",
+                value: "1",
+            }, {
+                title: "宜昌市",
+                value: "2",
+            },
+            {
+                title: "当阳市",
+                value: "3",
+            },
+            {
+                title: "其它地点",
+                value: "4",
+            }]
+    });
+
+    $("#js_input_cxfs").select({
+        title: "选择出行方式",
+        items: [
+            {
+                title: "自驾",
+                value: "1",
+            },
+            {
+                title: "飞机",
+                value: "2",
+            },
+            {
+                title: "火车",
+                value: "3",
+            },
+            {
+                title: "长途汽车",
+                value: "4",
+            }]
+    });
+
+
+
+}
+
+//近日报告
+function ribaoInitialization(reportId) {
+    if (reportId == null)
+        return;
+    $.ajax({
+        url: '/home/home/queryRibaoRefresh',
+        data: {
+            reportId: reportId
+        },
+        type: 'GET',
+        success: function (data) {
+            console.log(data);
+            if (data.data.length > 0) {
+                hasData = true;
+                data.data.forEach(function (v) {
+                    ribao_cell(v);
+                });
+            }
+        },
+        error: function () {
+        }
+    });
+}
+
+//刷新今日日报
+function ribao_refrash() {
+    var userId = $("#userId").val();
+    $.ajax({
+        url: '/home/home/queryRibao',
+        data: {
+            userCreate: userId
+        },
+        type: 'GET',
+        success: function (data) {
+            console.log(data);
+            if (data.data == undefined) {
+                $('#rb_family').empty();
+            }
+            else {
+                $('#rb_family').empty();
+                if (data.data.length > 0) {
+                    hasData = true;
+                    data.data.forEach(function (v) {
+                        ribao_cell(v);
+                    });
+                } else {
+                }
+            }
+        },
+        error: function () {
+        }
+    });
+}
+
+function ribao_cell(v) {
+    var userName = v.userName + ":";
+    var grender = getGreder(v.grender);
+    var age = v.age;
+    var familyStatus = "";
+    if (v.familyStatus != 0)
+        familyStatus = "基本状况:" + getFamilyStatus(v.familyStatus) + ";";
+    var medical = "";
+    if (v.medical != 0)
+        medical = "是否确诊:" + getMedical(v.medical) + ";";
+    var singleRoom = "";
+    if (v.singleRoom != 0)
+        singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
+    if (v.singleRoom == 0 && v.medical != 0)
+        singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
+    var temperature = "体温:" + v.temperature + ";";
+    var cough = "";
+    if (v.cough != 0)
+        cough = "咳嗽现象:" + getCough(v.cough) + ";";
+    var muscle = "";
+    if (v.muscle != 0)
+        muscle = "肌肉酸痛:" + getMuscle(v.muscle) + ";";
+    var dyspnea = "";
+    if (v.dyspnea != 0)
+        dyspnea = "呼吸困难:" + getDyspnea(v.dyspnea) + ";";
+    var fatigue = "";
+    if (v.fatigue != 0)
+        fatigue = "乏力现象:" + getFatigue(v.fatigue) + ";";
+    var diarrhea = "";
+    if (v.diarrhea != 0)
+        diarrhea = "腹泻现象:" + getDiarrhea(v.diarrhea) + ";";
+    var others = "";
+    if (v.others != "")
+        others = "其他描述:" + v.others + ";";
+    var scoreRezult = "";
+    if (v.scoreRezult != 0)
+        scoreRezult = "评估结果:" + getScoreRezult(v.scoreRezult, v.temperatureScore) + ";";
+    $('#rb_family').append($('<div class="weui-media-box weui-media-box_text" style="height: 15vh">\n' +
+        '                                      <h4 class="weui-media-box__title">' + userName + '&nbsp;&nbsp;&nbsp;' + grender + '&nbsp;&nbsp;&nbsp;' + age + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a style="color: #bc4246" onclick=\'deleteSuspected(' + JSON.stringify(v.suspectedId) + ')\'>删除</a>\n' +
+        '                                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a style="color: #2a62bc" onclick=\'updateSuspected(' + JSON.stringify(v.suspectedId) + ')\'>修改</a></h4>\n' +
+        '                                      <p class="weui-media-box__desc" style="height: 80%">' + familyStatus + medical + singleRoom + temperature + cough + muscle + dyspnea + fatigue + diarrhea + others + scoreRezult + '</p>\n' +
+        '                                    </div>\n' +
+        '                              '));
+}
+
+
+function ribao_cancel() {
+    $('#cancel').on('click', function () {
+
+        if ($('#ribao')[0].style.display == 'none') {
+            $('#notOpenRibao').toggle();
+            $('#ribao')[0].style.display = '';
+        } else {
+            $('#notOpenRibao')[0].style.display = '';
+            $('#ribao')[0].style.display = 'none';
+        }
+        clearShow();
+    });
+}
+
+function ribaoCommit() {
+    var suspectedId = $("#suspectedId").val();
+    var userId = $("#userId").val();
+    var userName = $("#js_input_user_name").val();
+    var grender = $("#js_input_user_sex").attr("data-values") == undefined ? 0 : $("#js_input_user_sex").attr("data-values");
+    var age = $("#js_input_user_age").val();
+    //不能同时选择服用和未服用
+    if ($("input[name='checkbox1']:checked").val() == "on" && $("input[name='checkbox2']:checked").val() == "on") {
+        $.alert("心脑血管不能同时选择服用和未服用");
+        return;
+    }
+    //男性不能选择妊娠期
+    if ($("#js_input_user_sex").attr("data-values") == 1 && $("input[name='checkbox7']:checked").val() == "on") {
+        $.alert("男性不能选择妊娠期");
+        return;
+    }
+    //家庭状态
+    var familyStatus = "";
+    if ($("input[name='checkbox1']:checked").val() == "on")
+        familyStatus += "1";
+    else
+        familyStatus += "0";
+    if ($("input[name='checkbox2']:checked").val() == "on")
+        familyStatus += ",1";
+    else
+        familyStatus += ",0";
+    if ($("input[name='checkbox3']:checked").val() == "on")
+        familyStatus += ",1";
+    else
+        familyStatus += ",0";
+    if ($("input[name='checkbox4']:checked").val() == "on")
+        familyStatus += ",1";
+    else
+        familyStatus += ",0";
+    if ($("input[name='checkbox5']:checked").val() == "on")
+        familyStatus += ",1";
+    else
+        familyStatus += ",0";
+    if ($("input[name='checkbox6']:checked").val() == "on")
+        familyStatus += ",1";
+    else
+        familyStatus += ",0";
+    if ($("input[name='checkbox7']:checked").val() == "on")
+        familyStatus += ",1";
+    else
+        familyStatus += ",0";
+    //var familyStatus = $("#js_input_user_status").attr("data-values") == undefined ? 0 : $("#js_input_user_status").attr("data-values");
+    //var statusDesp = $("#jibenmiaoshu").val() == undefined ? "" : $("#jibenmiaoshu").val();
+    var statusDesp = "";
+    var medical = $("#switchQuezhen").attr("data-values") == undefined ? 0 : $("#switchQuezhen").attr("data-values");
+    var singleRoom = $("#switchDanjiangeli").attr("data-values") == undefined ? 0 : $("#switchDanjiangeli").attr("data-values");
+    var temperature = $("#js_input_user_tiwen").val() == "" ? 0 : $("#js_input_user_tiwen").val();
+    var cough = $("#js_input_user_kesou").attr("data-values") == undefined ? 0 : $("#js_input_user_kesou").attr("data-values");
+    var muscle = $("#js_input_user_jirou").attr("data-values") == undefined ? 0 : $("#js_input_user_jirou").attr("data-values");
+    var dyspnea = $("#js_input_user_huxi").attr("data-values") == undefined ? 0 : $("#js_input_user_huxi").attr("data-values");
+    var fatigue = $("#js_input_user_fali").attr("data-values") == undefined ? 0 : $("#js_input_user_fali").attr("data-values");
+    var diarrhea = $("#js_input_user_fuxie").attr("data-values") == undefined ? 0 : $("#js_input_user_fuxie").attr("data-values");
+    var others = $("#shuruqita").val() == undefined ? "" : $("#shuruqita").val();
+    var scoreRezult = $("#js_input_score_rezult_value").val() == undefined ? "" : $("#js_input_score_rezult_value").val();
+    var temperatureScore = $("#js_input_temperature_score").val() == undefined ? "" : $("#js_input_temperature_score").val();
+    var scoreHistroy = $("#js_input_score_histroy").val() == undefined ? "" : $("#js_input_score_histroy").val();
+    var score = $("#js_input_score").val() == undefined ? "" : $("#js_input_score").val();
+
+    if (userName == undefined || userName == '') {
+        $.alert("请填写姓名");
+        return;
+    }
+    if (grender == 0) {
+        $.alert("请填写性别");
+        return;
+    }
+    if (age == undefined || age == '') {
+        $.alert("请填写年龄");
+        return;
+    }
+    if (age > 150 || age < 0) {
+        $.alert("请填写正确的年龄");
+        return;
+    }
+
+    if (temperature <= 0) {
+        $.alert("请填写体温");
+        return;
+    }
+    if (temperature > 50 || temperature < 30) {
+        $.alert("请填写正确的体温");
+        return;
+    }
+
+    $.ajax({
+        url: '/home/addRibao',
+        type: "post",
+        data: {
+            "suspectedId": suspectedId,
+            "userCreate": userId,
+            "userName": userName,
+            "grender": grender,
+            "age": age,
+            "familyStatus": familyStatus,
+            "statusDesp": statusDesp,
+            "medical": medical,
+            "singleRoom": singleRoom,
+            "temperature": temperature,
+            "cough": cough,
+            "muscle": muscle,
+            "dyspnea": dyspnea,
+            "fatigue": fatigue,
+            "diarrhea": diarrhea,
+            "others": others,
+            "scoreRezult": scoreRezult,
+            "temperatureScore": temperatureScore,
+            "scoreHistroy": scoreHistroy,
+            "score": score,
+        },
+        success: function (data) {
+            if (data.msgReport == "2") {
+                $.toast("家人姓名不能重复,如果重复,可以带上称呼");
+                return;
+            }
+            if ($('#ribao')[0].style.display == 'none') {
+                $('#notOpenRibao').toggle();
+                $('#ribao')[0].style.display = '';
+            } else {
+                $('#notOpenRibao')[0].style.display = '';
+                $('#ribao')[0].style.display = 'none';
+            }
+            $('#ribao_jinrijujian').empty();
+            $('#ribao_jinrijujian').append(data.safetyNum);
+
+            ribao_refrash();
+
+            clearShow();
+            document.getElementById("btn_shangbao").style['background-color'] = "#0bb20c";
+        },
+    });
+}
+
+function deleteSuspected(suspectedId) {
+    $.ajax({
+        url: '/home/deleteSuspected',
+        type: "post",
+        data: {
+            "suspectedId": suspectedId
+        },
+        success: function (data) {
+            $('#ribao_jinrijujian').empty();
+            $('#ribao_jinrijujian').append(data.safetyNum);
+            ribao_refrash();
+        },
+    });
+}
+
+function updateSuspected(suspectedId) {
+    $("#suspectedId").val("");
+    if ($('#ribao')[0].style.display == 'none') {
+        $('#notOpenRibao').toggle();
+        $('#ribao')[0].style.display = '';
+    } else {
+        $('#notOpenRibao')[0].style.display = '';
+        $('#ribao')[0].style.display = 'none';
+    }
+    $.ajax({
+        url: '/home/selectSuspected',
+        get: "get",
+        data: {
+            "suspectedId": suspectedId
+        },
+        success: function (data) {
+            // console.log(data);
+            if (data) {
+                var suspected = data;
+                $("#suspectedId").val(suspected.suspectedId);
+                $("#js_input_user_sex").val(getGreder(suspected.grender));
+                $("#js_input_user_sex").attr("data-values", suspected.grender);
+                $("#js_input_user_name").val(suspected.userName);
+                $("#js_input_user_age").val(suspected.age);
+                //基本情况
+                if (suspected.familyStatus != "") {
+                    var familyStatusList = suspected.familyStatus.split(",");
+                    if (familyStatusList[0] == 1)
+                        $("input[name='checkbox1']").prop("checked", "checked");
+                    else
+                        $("input[name='checkbox1']").removeAttr("checked");
+                    if (familyStatusList[1] == 1)
+                        $("input[name='checkbox2']").prop("checked", "checked");
+                    else
+                        $("input[name='checkbox2']").removeAttr("checked");
+                    if (familyStatusList[2] == 1)
+                        $("input[name='checkbox3']").prop("checked", "checked");
+                    else
+                        $("input[name='checkbox3']").removeAttr("checked");
+                    if (familyStatusList[3] == 1)
+                        $("input[name='checkbox4']").prop("checked", "checked");
+                    else
+                        $("input[name='checkbox4']").removeAttr("checked");
+                    if (familyStatusList[4] == 1)
+                        $("input[name='checkbox5']").prop("checked", "checked");
+                    else
+                        $("input[name='checkbox5']").removeAttr("checked");
+                    if (familyStatusList[5] == 1)
+                        $("input[name='checkbox6']").prop("checked", "checked");
+                    else
+                        $("input[name='checkbox6']").removeAttr("checked");
+                    if (familyStatusList[6] == 1)
+                        $("input[name='checkbox7']").prop("checked", "checked");
+                    else
+                        $("input[name='checkbox7']").removeAttr("checked");
+
+                }
+                // $("#js_input_user_status").val(getFamilyStatus(suspected.familyStatus));
+                // $("#js_input_user_status").attr("data-values", suspected.familyStatus);
+
+                // $("#jibenmiaoshu").val(suspected.statusDesp);
+
+                $("#switchQuezhen").val(getMedical(suspected.medical));
+                $("#switchQuezhen").attr("data-values", suspected.medical);
+
+                $("#switchDanjiangeli").val(getSingleRoom(suspected.singleRoom));
+                $("#switchDanjiangeli").attr("data-values", suspected.singleRoom);
+
+                $("#js_input_user_tiwen").val(suspected.temperature);
+
+                $("#js_input_user_kesou").val(getCough(suspected.cough));
+                $("#js_input_user_kesou").attr("data-values", suspected.cough);
+
+                $("#js_input_user_jirou").val(getMuscle(suspected.muscle));
+                $("#js_input_user_jirou").attr("data-values", suspected.muscle);
+
+                $("#js_input_user_huxi").val(getDyspnea(suspected.dyspnea));
+                $("#js_input_user_huxi").attr("data-values", suspected.dyspnea);
+
+                $("#js_input_user_fali").val(getFatigue(suspected.fatigue));
+                $("#js_input_user_fali").attr("data-values", suspected.fatigue);
+
+                $("#js_input_user_fuxie").val(getDiarrhea(suspected.diarrhea));
+                $("#js_input_user_fuxie").attr("data-values", suspected.diarrhea);
+
+                $("#shuruqita").val(suspected.others);
+                $("#js_input_score_rezult").val(getScoreRezult(suspected.scoreRezult, suspected.temperatureScore));
+                $("#js_input_score_rezult_value").val(suspected.scoreRezult);
+                $("#js_input_temperature_score").val(suspected.temperatureScore);
+                $("#js_input_score_histroy").val(suspected.scoreHistroy);
+                $("#js_input_score").val(suspected.score);
+            }
+        },
+    });
+
+}
+
+
+
+
+$("#my-input-ribao").calendar({
+    dateFormat: 'yyyy-mm-dd',
+    inputReadOnly: false,
+    onChange: function (p, values, displayValues) {
+        var reportDate = values.toString();
+        var userId = $("#userId").val();
+        $.ajax({
+            url: '/home/home/queryRibaoReportDate',
+            data: {
+                "userCreate": userId,
+                "reportDate": reportDate,
+            },
+            type: 'GET',
+            success: function (data) {
+                if (data.data == undefined) {
+                    $('#ribao_famliy').empty();
+                }
+                else {
+                    if (data.data.length > 0) {
+                        $('#ribao_famliy').empty();
+                        data.data.forEach(function (v) {
+                            helpValue1(v);
+                        });
+                    } else {
+
+                    }
+                }
+            },
+            error: function () {
+            }
+        });
+    }
+});
+
+
+function helpValue1(v) {
+    var userName = v.userName + ":";
+    var grender = getGreder(v.grender);
+    var age = v.age;
+    var familyStatus = "";
+    if (v.familyStatus != 0)
+        familyStatus = "基本状况:" + getFamilyStatus(v.familyStatus) + ";";
+    var medical = "";
+    if (v.medical != 0)
+        medical = "是否确诊:" + getMedical(v.medical) + ";";
+    var singleRoom = "";
+    if (v.singleRoom != 0)
+        singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
+    if (v.singleRoom == 0 && v.medical != 0)
+        singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
+    var temperature = "体温:" + v.temperature + ";";
+    var cough = "";
+    if (v.cough != 0)
+        cough = "咳嗽现象:" + getCough(v.cough) + ";";
+    var muscle = "";
+    if (v.muscle != 0)
+        muscle = "肌肉酸痛:" + getMuscle(v.muscle) + ";";
+    var dyspnea = "";
+    if (v.dyspnea != 0)
+        dyspnea = "呼吸困难:" + getDyspnea(v.dyspnea) + ";";
+    var fatigue = "";
+    if (v.fatigue != 0)
+        fatigue = "乏力现象:" + getFatigue(v.fatigue) + ";";
+    var diarrhea = "";
+    if (v.diarrhea != 0)
+        diarrhea = "腹泻现象:" + getDiarrhea(v.diarrhea) + ";";
+    var others = "";
+    if (v.others != "")
+        others = "其他描述:" + v.others + ";";
+    var scoreRezult = "";
+    if (v.scoreRezult != 0)
+        scoreRezult = "评估结果:" + getScoreRezult(v.scoreRezult, v.temperatureScore) + ";";
+    $('#ribao_famliy').append($('<div class="weui-media-box weui-media-box_text" style="height: 15vh">\n' +
+        '                                      <h4 class="weui-media-box__title">' + userName + '&nbsp;&nbsp;&nbsp;' + grender + '&nbsp;&nbsp;&nbsp;' + age + '</h4>\n' +
+        '                                      <p class="weui-media-box__desc" style="height: 80%">' + familyStatus + medical + singleRoom + temperature + cough + muscle + dyspnea + fatigue + diarrhea + others + scoreRezult + '</p>\n' +
+        '                                    </div>\n' +
+        '                              '));
+}
+
+
+function getGreder(greder) {
+    if (greder == 1)
+        return "男";
+    else if (greder == 2)
+        return "女";
+    return "";
+}
+
+function getFamilyStatus(familyStatus) {
+    var familyStatusList = familyStatus.split(",");
+    var familyStatusString = "";
+    if (familyStatus == '0,0,0,0,0,0,0')
+        familyStatusString += "无病史,";
+    else {
+        if (familyStatusList[0] == 1)
+            familyStatusString += "心脑血管疾病(服用ARB),";
+        if (familyStatusList[1] == 1)
+            familyStatusString += "心脑血管疾病(未服ARB),";
+        if (familyStatusList[2] == 1)
+            familyStatusString += "呼吸系统病史,";
+        if (familyStatusList[3] == 1)
+            familyStatusString += "肿瘤病史,";
+        if (familyStatusList[4] == 1)
+            familyStatusString += "糖尿病史,";
+        if (familyStatusList[5] == 1)
+            familyStatusString += "服用过激素药物,";
+        if (familyStatusList[6] == 1)
+            familyStatusString += "妊娠期,";
+    }
+    return familyStatusString.substring(0, familyStatusString.length - 1);
+}
+
+function getCough(cough) {
+    if (cough == 0)
+        return "无咳嗽";
+    else if (cough == 1)
+        return "偶尔短暂咳嗽";
+    else if (cough == 2)
+        return "咳嗽轻度影响生活";
+    else if (cough == 3)
+        return "咳嗽严重影响生活";
+    return "";
+}
+
+function getMuscle(muscle) {
+    if (muscle == 0)
+        return "无";
+    else if (muscle == 1)
+        return "按压有";
+    else if (muscle == 2)
+        return "偶尔";
+    else if (muscle == 3)
+        return "持续有";
+    return "";
+}
+
+function getDyspnea(dyspnea) {
+    if (dyspnea == 0)
+        return "无";
+    else if (dyspnea == 1)
+        return "急走或上坡气短";
+    else if (dyspnea == 2)
+        return "气短而走路变慢";
+    else if (dyspnea == 3)
+        return "走路数分钟后气短";
+    else if (dyspnea == 4)
+        return "气短无法离开房间";
+    return "";
+}
+
+function getFatigue(fatigue) {
+    if (fatigue == 0)
+        return "无";
+    else if (fatigue == 1)
+        return "体力劳动后不能恢复";
+    else if (fatigue == 2)
+        return "轻体力活非常累";
+    else if (fatigue == 3)
+        return "不能正常生活";
+    return "";
+}
+
+function getMedical(medical) {
+    if (medical == 0)
+        return "否";
+    else if (medical == 1)
+        return "是";
+    return "";
+}
+
+function getSingleRoom(singleRoom) {
+    if (singleRoom == 0)
+        return "否";
+    else if (singleRoom == 1)
+        return "是";
+    return "";
+}
+
+
+function getDiarrhea(diarrhea) {
+    if (diarrhea == 0)
+        return "无";
+    else if (diarrhea == 1)
+        return "轻度腹泻(少于3次)";
+    else if (diarrhea == 2)
+        return "中度腹泻(4-6次)";
+    else if (diarrhea == 3)
+        return "重度腹泻(超过6次)";
+    return "";
+}
+
+function clearShow() {
+    console.log("qingkong")
+    $("#suspectedId").val("");
+    $("#js_input_user_sex").val("");
+    $("#js_input_user_sex").attr("data-values", "");
+    $("#js_input_user_name").val("");
+    $("#js_input_user_age").val("");
+    $("#js_input_user_status").val("");
+    $("#js_input_user_status").attr("data-values", "");
+
+    $("#jibenmiaoshu").val("");
+
+    $("#switchQuezhen").val("");
+    $("#switchQuezhen").attr("data-values", "");
+
+    $("#switchDanjiangeli").val("");
+    $("#switchDanjiangeli").attr("data-values", "");
+
+    $("#js_input_user_tiwen").val("");
+
+    $("#js_input_user_kesou").val("");
+    $("#js_input_user_kesou").attr("data-values", "");
+
+    $("#js_input_user_jirou").val("");
+    $("#js_input_user_jirou").attr("data-values", "");
+
+    $("#js_input_user_huxi").val("");
+    $("#js_input_user_huxi").attr("data-values", "");
+
+    $("#js_input_user_fali").val("");
+    $("#js_input_user_fali").attr("data-values", "");
+
+    $("#js_input_user_fuxie").val("");
+    $("#js_input_user_fuxie").attr("data-values", "");
+
+    $("#shuruqita").val("");
+    $("#js_input_score_rezult").val("");
+    $("#js_input_score_rezult_value").val("");
+    $("#js_input_temperature_score").val("");
+    $("#js_input_score_histroy").val("");
+    $("#js_input_score").val("");
+}
+
+//健康评估
+$('#ribao_score').on('click', function () {
+    var suspectedId = $("#suspectedId").val();
+    var userId = $("#userId").val();
+    var userName = $("#js_input_user_name").val();
+    var medical = $("#switchQuezhen").attr("data-values") == undefined ? 0 : $("#switchQuezhen").attr("data-values");
+    var temperature = $("#js_input_user_tiwen").val() == "" ? 0 : $("#js_input_user_tiwen").val();
+    var cough = $("#js_input_user_kesou").attr("data-values") == undefined ? 0 : $("#js_input_user_kesou").attr("data-values");
+    var muscle = $("#js_input_user_jirou").attr("data-values") == undefined ? 0 : $("#js_input_user_jirou").attr("data-values");
+    var dyspnea = $("#js_input_user_huxi").attr("data-values") == undefined ? 0 : $("#js_input_user_huxi").attr("data-values");
+    var fatigue = $("#js_input_user_fali").attr("data-values") == undefined ? 0 : $("#js_input_user_fali").attr("data-values");
+    var diarrhea = $("#js_input_user_fuxie").attr("data-values") == undefined ? 0 : $("#js_input_user_fuxie").attr("data-values");
+    if (userName == undefined || userName == '') {
+        $.alert("请填写姓名");
+        return;
+    }
+    if (temperature <= 0) {
+        $.alert("请填写体温");
+        return;
+    }
+    if (temperature > 50 || temperature < 30) {
+        $.alert("请填写正确的体温");
+        return;
+    }
+
+    $.ajax({
+        url: '/home/addScore',
+        type: "post",
+        data: {
+            "userName": userName,
+            "suspectedId": suspectedId,
+            "userCreate": userId,
+            "medical": medical,
+            "temperature": temperature,
+            "cough": cough,
+            "muscle": muscle,
+            "dyspnea": dyspnea,
+            "fatigue": fatigue,
+            "diarrhea": diarrhea,
+        },
+        success: function (data) {
+            if (data == undefined) {
+                $('#js_input_score_rezult').empty();
+                $('#js_input_score_rezult_value').empty();
+                $('#js_input_temperature_score').empty();
+                $('#js_input_score_histroy').empty();
+                $('#js_input_score').empty();
+            }
+            else {
+                $('#js_input_score_rezult').empty();
+                $('#js_input_temperature_score').empty();
+                $('#js_input_score_histroy').empty();
+                $('#js_input_score').empty();
+                var ScoreRezult = getScoreRezult(data.scoreRezult, data.temperatureScore);
+                $("#js_input_score_rezult").val(ScoreRezult);
+                $("#js_input_score_rezult_value").val(data.scoreRezult);
+                $("#js_input_temperature_score").val(data.temperatureScore);
+                $("#js_input_score_histroy").val(data.scoreHistory);
+                $("#js_input_score").val(data.score);
+            }
+        },
+    });
+});
+
+
+function getScoreRezult(scoreRezult, temperatureScore) {
+    if (scoreRezult == 0)
+        return "未评估";
+    else if (scoreRezult == 1) {
+        if (temperatureScore > 1)
+            return "正常,间隔时间服用退烧药,多休息,多喝水";
+        else
+            return "正常";
+    }
+    else if (scoreRezult == 2) {
+        if (temperatureScore > 1)
+            return "注意观察,间隔时间服用退烧药,多休息,多喝水";
+        else
+            return "注意观察";
+    }
+    else if (scoreRezult == 3)
+        return "联系社区医生(或者在线问诊)";
+    else if (scoreRezult == 4)
+        return "尽快就诊";
+    return "";
+}
+
+
+

+ 1 - 0
whepi-web/src/main/java/com/bofeng/dao/OutUserMapper.java

@@ -15,6 +15,7 @@ import java.util.Map;
 @Repository
 public interface OutUserMapper extends BaseMapper<OutUser> {
 
+
     @Select("SELECT * FROM out_user WHERE name = #{name} and phone = #{phone} and start_date <= curdate() and end_date >= curdate()")
     OutUser getOutUserByPhone(@Param("name") String name, @Param("phone") Long phone);
 

+ 10 - 0
whepi-web/src/main/java/com/bofeng/wx/controller/YeWeiHuiController.java

@@ -167,6 +167,16 @@ public class YeWeiHuiController {
     return new ModelAndView("/yeweihui/ribao.ftl", model);
   }
 
+  @GetMapping("/lingyun/home.html")
+  public ModelAndView lingyunRibao(ModelMap model) {
+
+//        List<QzTask> taskList = qzTaskService.selectAll();
+//
+//        model.put("taskList", YvanUtil.toJsonPretty(taskList));
+
+    return new ModelAndView("/lingyun/home.ftl", model);
+  }
+
   @GetMapping("/yeweihui/ribaoDy")
   public Model<List<SysUptownHouse>> yeweihuiRibaoDy(Long str) {
 //        String[] split = str.split("&");