YYC
2023-06-07 4f20ad52b8d4ab206e3458e488d3950eb2bfb5a3
igds-app/js/admin/security-patrol.js
@@ -49,7 +49,7 @@
   data1.tokenAuth = user.tokenAuth;
   data2.tokenAuth = user.tokenAuth;
   data.data.deptId = selectDeptId;
   data2.data.deptId = selectDeptId;
   data1.data.deptId = selectDeptId;
   dateTime = getDate(new Date())
   document.getElementById("date").value = dateTime;
   //获取巡更记录
@@ -89,17 +89,22 @@
      type: "date", //设置日历初始视图模式 
      // beginDate: new Date(2015, 04, 25), //设置开始日期 
      // endDate: new Date(2016, 04, 25), //设置结束日期 
      value: dateTime
   })
   var time = dateTime;
   dtpicker.show(function(e) {
      dateTime = e.value;
      document.getElementById("date").value = e.value
      getPatrolList();
      if(time != dateTime){
         getPatrolList();
      }
   })
}
//获取巡更记录
function getPatrolList() {
   //赋值参数的日期
   data.data.dataTime = dateTime;
   console.log(JSON.stringify(data.data),"电子巡更记录","security-patrol")
   mui.ajax(url, {
      type: "POST",
      dataType: "json",
@@ -113,7 +118,7 @@
         } else {
            renderPatrol();
            mui.toast(result.msg);
            console.log(JSON.stringify(result))
            // console.log(JSON.stringify(result))
         }
      },
      error: function() {
@@ -151,8 +156,7 @@
   if (PatrolList && PatrolList.length > 0) {
      $.each(PatrolList, function(index, item) {
         html += '<li><div class="item"><div class="top">'
         html += '<div class="date">' + item.createTime + '</div><div class="r-btn" id = "' + item.id +
            '">查看照片</div></div>';
         html += '<div class="date">' + item.createTime + '</div><div class="r-btn" id = "' + item.id + '">查看照片</div></div>';
         html += '<div class="cards"><div class="cd"><div class="con user">'
         html += '<div class="tit">打卡人</div><div class="txt">' + item.userName + '</div></div></div>';
         html += '<div class="cd"><div class="con loc"><div class="tit">坐标</div>'
@@ -167,7 +171,7 @@
}
mui('.mui-scroll-wrapper').scroll({
   indicators: false, //是否显示滚动条
   indicators: true, //是否显示滚动条
   deceleration: 0.0006, //阻尼系数,系数越小滑动越灵敏
   bounce: false, //是否启用回弹
   deceleration: 0.0005 //flick 减速系数,系数越大,滚动速度越慢,滚动距离越小,默认值0.0006
@@ -217,8 +221,6 @@
   $('.m-pop').fadeOut();
});
//使用相机拍照
function cameraImg() {
   var cmr = plus.camera.getCamera();
@@ -245,7 +247,7 @@
      },
      function(t, status) { //上传完成
         if (status == 200) {
            var html = '';
            // var html = '';
            var obj = JSON.parse(t.responseText);
            mui.toast("上传成功!");
            data1.data.imgName = obj.data.fileName;
@@ -290,8 +292,6 @@
      }
   })
}
// function getLatLon() {
//    plus.geolocation.getCurrentPosition(function(position) {