From 4f20ad52b8d4ab206e3458e488d3950eb2bfb5a3 Mon Sep 17 00:00:00 2001 From: YYC <1833023622@qq.com> Date: 星期三, 07 六月 2023 16:35:55 +0800 Subject: [PATCH] 细节调整 --- igds-app/js/admin/security-patrol.js | 35 +++++++++++++++++------------------ 1 files changed, 17 insertions(+), 18 deletions(-) diff --git a/igds-app/js/admin/security-patrol.js b/igds-app/js/admin/security-patrol.js index bf2dc53..74e9424 100644 --- a/igds-app/js/admin/security-patrol.js +++ b/igds-app/js/admin/security-patrol.js @@ -1,5 +1,11 @@ var url = null; var uploadUrl = null; +var PatrolList = null; +var ImgFile = null; +var dateTime; +var longitude = null; //鐧惧害鍦板浘(BD-09)缁忓害 +var latitude = null; //鐧惧害鍦板浘(BD-09)绾害 +//鐢靛瓙宸℃洿璁板綍 var data = { "interfaceId": "5601", "outId": "10601", @@ -10,13 +16,6 @@ "dataTime": "", } }; -var PatrolList = null; -var ImgFile = null; -var dateTime; -var longitude = null; //鐧惧害鍦板浘(BD-09)缁忓害 -var latitude = null; //鐧惧害鍦板浘(BD-09)绾害 -//鐢靛瓙宸℃洿璁板綍 - //鐢靛瓙宸℃洿鎵撳崱 var data1 = { "interfaceId": "5602", @@ -50,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; //鑾峰彇宸℃洿璁板綍 @@ -90,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", @@ -114,7 +118,7 @@ } else { renderPatrol(); mui.toast(result.msg); - console.log(JSON.stringify(result)) + // console.log(JSON.stringify(result)) } }, error: function() { @@ -152,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>' @@ -168,7 +171,7 @@ } mui('.mui-scroll-wrapper').scroll({ - indicators: false, //鏄惁鏄剧ず婊氬姩鏉� + indicators: true, //鏄惁鏄剧ず婊氬姩鏉� deceleration: 0.0006, //闃诲凹绯绘暟,绯绘暟瓒婂皬婊戝姩瓒婄伒鏁� bounce: false, //鏄惁鍚敤鍥炲脊 deceleration: 0.0005 //flick 鍑忛�熺郴鏁帮紝绯绘暟瓒婂ぇ锛屾粴鍔ㄩ�熷害瓒婃參锛屾粴鍔ㄨ窛绂昏秺灏忥紝榛樿鍊�0.0006 @@ -218,8 +221,6 @@ $('.m-pop').fadeOut(); }); - - //浣跨敤鐩告満鎷嶇収 function cameraImg() { var cmr = plus.camera.getCamera(); @@ -246,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; @@ -291,8 +292,6 @@ } }) } - - // function getLatLon() { // plus.geolocation.getCurrentPosition(function(position) { -- Gitblit v1.9.3