Bladeren bron

xielianghe

lange 5 jaren geleden
bovenliggende
commit
999fd27a14
1 gewijzigde bestanden met toevoegingen van 20 en 17 verwijderingen
  1. 20 17
      whepi-ui/templates/home/ribao.js

+ 20 - 17
whepi-ui/templates/home/ribao.js

@@ -32,7 +32,7 @@ function ribao_init() {
             }
           }
         });
-        wx.error(function(res){
+        wx.error(function (res) {
           alert("接口调取失败")
         });
       });
@@ -42,8 +42,6 @@ function ribao_init() {
   //lingyun
 
 
-
-
   $('#btnRB').on('click', function () {
     window.location.href = "/yeweihui/home.html";
   });
@@ -814,7 +812,7 @@ 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+ singleRoom + temperature + cough + muscle + dyspnea + fatigue + diarrhea + others + scoreRezult + workLocal + todayLocal + isTrip + tripDet + '</>\n' +
+    '                                      <div style="height: auto">' + familyStatus + medical + isContact + singleRoom + temperature + cough + muscle + dyspnea + fatigue + diarrhea + others + scoreRezult + workLocal + todayLocal + isTrip + tripDet + '</>\n' +
     '                                    </div>\n' +
     '                              '));
 }
@@ -1068,6 +1066,12 @@ function ribaoCommit() {
     return
   }
   cantijiao = false
+  //判断是否获取到定位
+  if (autoLocal == '') {
+    cantijiao = true;
+    $.alert("请先设置微信获取当前位置");
+    return;
+  }
   var sf = $("#js_input_sf").attr("data-values") == undefined ? 3 : $("#js_input_sf").attr("data-values");
   if (listcx.length == 0 && sf == 1) {
     cantijiao = true;
@@ -1254,8 +1258,7 @@ function ribaoCommit() {
       isTrip = sf;
     }
 
-  } else
-    {
+  } else {
     workLocal = 0;
     workLocalOther = "";
     todyLocal = 0;
@@ -1302,14 +1305,14 @@ function ribaoCommit() {
     data: JSON.stringify(pdata),
     success: function (data) {
 
-      console.log('data:',data.msgReport);
+      console.log('data:', data.msgReport);
       if (data == {} || data == '' || data == null || data == undefined) {
-        $.toast("数据提交失败,请重新提交!",'forbidden');
+        $.toast("数据提交失败,请重新提交!", 'forbidden');
         cantijiao = true;
         return;
       }
       if (data.reportId == null || data.reportId == undefined || data.reportId <= 0) {
-        $.toast("数据提交失败,请重新提交!",'forbidden');
+        $.toast("数据提交失败,请重新提交!", 'forbidden');
         cantijiao = true;
         return;
       }
@@ -1523,16 +1526,16 @@ function updateSuspected(suspectedId) {
         }
         $("#js_input_qtdd").val(suspected.workLocalOther);
         //今晚驻地
-        $("#js_input_jrszd").val(getLocal(suspected.todayLocal));
-        $("#js_input_jrszd").attr("data-values", suspected.todayLocal);
-        if (suspected.todayLocal != 4) {
-          $('#js_input_jrszq').attr("disabled", "disabled");
-          $("#js_input_jrszq").val("");
-        }
+        // $("#js_input_jrszd").val(getLocal(suspected.todayLocal));
+        // $("#js_input_jrszd").attr("data-values", suspected.todayLocal);
+        // if (suspected.todayLocal != 4) {
+        //   $('#js_input_jrszq').attr("disabled", "disabled");
+        //   $("#js_input_jrszq").val("");
+        // }
         // else {
         //   $('#js_input_jrszq').removeAttr("disabled")
         // }
-        $("#js_input_jrszq").val(suspected.todayLocalOther);
+        //$("#js_input_jrszq").val(suspected.todayLocalOther);
         //是否出行
         $("#js_input_sf").val(getIsTrip(suspected.isTrip));
         $("#js_input_sf").attr("data-values", suspected.isTrip);
@@ -1758,7 +1761,7 @@ function helpValue1(v) {
 
   $('#ribao_famliy').append($('<div class="weui-media-box weui-media-box_text" style="height: auto">\n' +
     '                                      <h4 class="weui-media-box__title">' + userName + '&nbsp;&nbsp;&nbsp;' + grender + '&nbsp;&nbsp;&nbsp;' + age + '</h4>\n' +
-    '                                      <div style="height: auto">' + familyStatus + medical +isContact+ singleRoom + temperature + cough + muscle + dyspnea + fatigue + diarrhea + others + scoreRezult + workLocal + todayLocal + isTrip + tripDet + '</div>\n' +
+    '                                      <div style="height: auto">' + familyStatus + medical + isContact + singleRoom + temperature + cough + muscle + dyspnea + fatigue + diarrhea + others + scoreRezult + workLocal + todayLocal + isTrip + tripDet + '</div>\n' +
     '                                    </div>\n' +
     '                              '));
 }