|
@@ -33,9 +33,12 @@ function ribaoInitialization(reportId) {
|
|
|
|
|
|
//刷新今日日报
|
|
|
function ribao_refrash() {
|
|
|
+ var userId = $("#userId").val();
|
|
|
$.ajax({
|
|
|
url: '/home/home/queryRibao',
|
|
|
- data: {},
|
|
|
+ data: {
|
|
|
+ userCreate: userId
|
|
|
+ },
|
|
|
type: 'GET',
|
|
|
success: function (data) {
|
|
|
console.log(data);
|
|
@@ -74,7 +77,7 @@ function ribao_cell(v) {
|
|
|
else
|
|
|
conditionStatus += " 未确诊"
|
|
|
$('#rb_family').append($('<div class="weui-media-box weui-media-box_text">\n' +
|
|
|
- ' <h4 class="weui-media-box__title">' + conditionStatus + ' <a style="color: #2a62bc" onclick=\'deleteSuspected(' + JSON.stringify(v.suspectedId)+ ')\'>删除</a></h4>\n' +
|
|
|
+ ' <h4 class="weui-media-box__title">' + conditionStatus + ' <a style="color: #2a62bc" onclick=\'deleteSuspected(' + JSON.stringify(v.suspectedId) + ')\'>删除</a></h4>\n' +
|
|
|
' <p class="weui-media-box__desc">' + v.remarks + '</p>\n' +
|
|
|
' </div>\n' +
|
|
|
' '));
|
|
@@ -104,34 +107,23 @@ function ribao_cancel() {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-function ribao_commit() {
|
|
|
- $('#commit').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';
|
|
|
- }
|
|
|
- });
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
function ribaoCommit() {
|
|
|
+ var userId = $("#userId").val();
|
|
|
var user_name = $("#js_input_user_name").val();
|
|
|
- if(user_name==""){
|
|
|
+ if (user_name == "") {
|
|
|
alert("请填写家人姓名");
|
|
|
return;
|
|
|
- }if(user_name.length>25){
|
|
|
+ }
|
|
|
+ if (user_name.length > 25) {
|
|
|
alert("请填写正确格式家人姓名");
|
|
|
return;
|
|
|
}
|
|
|
var remarks = $("#rb_remarks").val();
|
|
|
- if(remarks==""){
|
|
|
+ if (remarks == "") {
|
|
|
alert("请填写病情描述");
|
|
|
return;
|
|
|
- }if(remarks.length>100){
|
|
|
+ }
|
|
|
+ if (remarks.length > 100) {
|
|
|
alert("病情描述内容太长");
|
|
|
return;
|
|
|
}
|
|
@@ -167,15 +159,23 @@ function ribaoCommit() {
|
|
|
conditionStatus += ",6";
|
|
|
|
|
|
$.ajax({
|
|
|
- url: '/home/addRibao.json',
|
|
|
+ url: '/home/addRibao',
|
|
|
type: "post",
|
|
|
data: {
|
|
|
+ "userCreate": userId,
|
|
|
"userName": user_name,
|
|
|
"conditionStatus": conditionStatus,
|
|
|
"medical": medical,
|
|
|
"remarks": remarks,
|
|
|
},
|
|
|
success: function (data) {
|
|
|
+ if ($('#ribao')[0].style.display == 'none') {
|
|
|
+ $('#notOpenRibao').toggle();
|
|
|
+ $('#ribao')[0].style.display = '';
|
|
|
+ } else {
|
|
|
+ $('#notOpenRibao')[0].style.display = '';
|
|
|
+ $('#ribao')[0].style.display = 'none';
|
|
|
+ }
|
|
|
ribao_refrash();
|
|
|
},
|
|
|
});
|
|
@@ -183,7 +183,7 @@ function ribaoCommit() {
|
|
|
|
|
|
function deleteSuspected(suspectedId) {
|
|
|
$.ajax({
|
|
|
- url: '/home/deleteSuspected.json',
|
|
|
+ url: '/home/deleteSuspected',
|
|
|
type: "post",
|
|
|
data: {
|
|
|
"suspectedId": suspectedId
|
|
@@ -196,15 +196,17 @@ function deleteSuspected(suspectedId) {
|
|
|
|
|
|
|
|
|
function addReport() {
|
|
|
+ var userId = $("#userId").val();
|
|
|
var safety_num = $("#ribao_safety_num").val();
|
|
|
- if(safety_num==""){
|
|
|
+ if (safety_num == "") {
|
|
|
alert("请填写居家人数");
|
|
|
return;
|
|
|
}
|
|
|
$.ajax({
|
|
|
- url: '/home/addReport.json',
|
|
|
+ url: '/home/addReport',
|
|
|
type: "post",
|
|
|
data: {
|
|
|
+ "userCreate": userId,
|
|
|
"safetyNum": safety_num,
|
|
|
},
|
|
|
});
|
|
@@ -215,14 +217,16 @@ $("#my-input-ribao").calendar({
|
|
|
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){
|
|
|
+ if (data.data == undefined) {
|
|
|
$('#ribao_famliy').empty();
|
|
|
}
|
|
|
else {
|
|
@@ -249,13 +253,13 @@ function helpValue1(v) {
|
|
|
if (conditionStatusList[0] > 0)
|
|
|
conditionStatus += " 咳嗽"
|
|
|
if (conditionStatusList[1] > 0) {
|
|
|
- conditionStatus += " 发烧"
|
|
|
+ conditionStatus += " 发烧"
|
|
|
}
|
|
|
if (conditionStatusList[2] > 0) {
|
|
|
- conditionStatus += " 腹泻"
|
|
|
+ conditionStatus += " 腹泻"
|
|
|
}
|
|
|
if (conditionStatusList[3] > 0) {
|
|
|
- conditionStatus += " 酸痛"
|
|
|
+ conditionStatus += " 酸痛"
|
|
|
}
|
|
|
if (conditionStatusList[4] > 0) {
|
|
|
conditionStatus += " 乏力"
|