From 6e7865b1f1c3d310019987f52d7e145cde691942 Mon Sep 17 00:00:00 2001 From: YYC <1833023622@qq.com> Date: 星期五, 19 五月 2023 11:16:23 +0800 Subject: [PATCH] 细节调整 --- igds-app/js/admin/es-detail.js | 86 +++++---- igds-app/js/admin/inout-real.js | 2 igds-app/inout-handle-in.html | 23 ++ igds-app/js/admin/inout-in-handle.js | 43 ++-- igds-app/js/admin/work-apply.js | 36 +++ igds-app/js/admin/work-record.js | 2 igds-app/js/admin/inout-in-handle-list.js | 101 +++++----- igds-app/work-apply.html | 4 igds-app/js/admin/es-read-meter.js | 56 +++++ igds-app/js/admin/inout-out-record.js | 4 igds-app/js/admin/security-video.js | 112 +++++++---- igds-app/js/admin/inout-out-handle.js | 4 igds-app/es-detail.html | 4 igds-app/js/admin/work-audit.js | 4 igds-app/js/admin/es-real-electric.js | 59 ++++++ 15 files changed, 369 insertions(+), 171 deletions(-) diff --git a/igds-app/es-detail.html b/igds-app/es-detail.html index 6817155..2973aab 100644 --- a/igds-app/es-detail.html +++ b/igds-app/es-detail.html @@ -22,7 +22,7 @@ </header> <div class="mui-content"> <div class="g-date_box m-energy-date"> - <div class="inpbox" onclick="chooseDate('start');"> + <div class="inpbox" onclick="chooseDate('start'); ;"> <input id="start" type="text" value="2022-04-15" readonly class="inp inp1" /> </div> <div class="inpbox" onclick="chooseDate('end');"> @@ -38,7 +38,7 @@ <div class="inpbox"> <input id="search" type="search" class="mui-input-clear" placeholder="璇疯緭鍏ヤ粨搴撶紪鍙锋绱�" value=""> </div> - <button type="button" class="mui-btn">鏌ヨ</button> + <button type="button" class="mui-btn">鏌ヨ</button> </div> </form> </div> diff --git a/igds-app/inout-handle-in.html b/igds-app/inout-handle-in.html index f9cf425..56be1f9 100644 --- a/igds-app/inout-handle-in.html +++ b/igds-app/inout-handle-in.html @@ -423,6 +423,29 @@ //鎷嶇収涓婁紶 function choosePic(typeNum) { + + var btnArray = [{ + title: "鎷嶇収涓婁紶" + }, { + title: "浠庣浉鍐岄�夋嫨" + }]; + plus.nativeUI.actionSheet({ + title: "璇烽�夋嫨", + cancel: "鍙栨秷", + buttons: btnArray + }, + function(e) { + var index = e.index; + switch (index) { + case 1: + cameraImg(typeNum); + break; + case 2: + galleryImg(typeNum); + break; + } + }); + //鑾峰彇瀹氫綅淇℃伅 getLatLon(); if(latitude == null || longitude == null){ diff --git a/igds-app/js/admin/es-detail.js b/igds-app/js/admin/es-detail.js index 4ddac47..6643464 100644 --- a/igds-app/js/admin/es-detail.js +++ b/igds-app/js/admin/es-detail.js @@ -22,7 +22,6 @@ data.tokenAuth = user.tokenAuth; data.data.deptId = selectDeptId; startTime = getDate(new Date()); - document.getElementById("start").value = startTime; getEsDetailList(); } @@ -48,14 +47,22 @@ // endDate: new Date(2016, 04, 25), //璁剧疆缁撴潫鏃ユ湡 }) if (tag == 'start') { + var start = startTime; dtpicker.show(function(e) { startTime = e.value document.getElementById("start").value = e.value - }) + if(start != startTime){ + getEsDetailList(); + } + }) } else { + var end = endTime; dtpicker.show(function(e) { endTime = e.value; document.getElementById("end").value = e.value + if(end != endTime){ + getEsDetailList(); + } }) } } @@ -63,6 +70,7 @@ function getEsDetailList() { data.data.startTime = startTime data.data.endTime = endTime + console.log(JSON.stringify(data.data)) mui.ajax(url, { type: "POST", dataType: "json", @@ -76,48 +84,47 @@ } else { renderData(); mui.toast(result.msg); - console.log("else", JSON.stringify(result)) } }, error: function() { mui.alert("绯荤粺绻佸繖,璇烽噸璇曪紒", "鎻愮ず", ["纭畾"], function() {}, "div") } }) - // esDetailList = [ - // { - // "depotId": "16", - // "depotName": "鍊艰瘽鍚勫厓", - // "startEs": "31", - // "endEs": "56", - // "epSum": "13", - // "eqSum": "37", - // "esSum": "25" - // }, - // { - // "depotId": "2", - // "depotName": "鍒掔偣鐜嬫暟闃�", - // "startEs": "55", - // "endEs": "47", - // "epSum": "46", - // "eqSum": "42", - // "esSum": "59" - // }, - // { - // "depotId": "34", - // "depotName": "鍜屽鏂滑", - // "startEs": "78", - // "endEs": "24", - // "epSum": "37", - // "eqSum": "73", - // "esSum": "83" - // } - // ] + esDetailList = [{ + "depotId": "16", + "depotName": "鍊艰瘽鍚勫厓", + "startEs": "31", + "endEs": "56", + "epSum": "13", + "eqSum": "37", + "esSum": "25" + }, + { + "depotId": "2", + "depotName": "鍒掔偣鐜嬫暟闃�", + "startEs": "55", + "endEs": "47", + "epSum": "46", + "eqSum": "42", + "esSum": "59" + }, + { + "depotId": "34", + "depotName": "鍜屽鏂滑", + "startEs": "78", + "endEs": "24", + "epSum": "37", + "eqSum": "73", + "esSum": "83" + } + ] } mui('.mui-content').on("tap", ".g-sobox div button", function() { data.data.depotId = document.getElementById("search").value getEsDetailList() }) + //娓叉煋椤甸潰 function renderData() { @@ -126,13 +133,18 @@ $.each(esDetailList, function(index, item) { html += '<div class="wp"><div class="m-ck-cont"><div class="g-titck1">' + item.depotName + '</div>' html += '<div class="m-energy1"><div class="inner"><div class="con con1">' - html += '<div class="num"><div class="l"></div>' + item.startEs + ' <span>KWh</span></div><div class="desc">璧峰鑳借��</div></div></div>' + html += '<div class="num"><div class="l"></div>' + item.startEs + + ' <span>KWh</span></div><div class="desc">璧峰鑳借��</div></div></div>' html += '<div class="inner"><div class="con con2">' - html += '<div class="num"><div class="l"></div>' + item.endEs + ' <span>KWh</span></div><div class="desc">鎴鑳借��</div></div></div></div>' + html += '<div class="num"><div class="l"></div>' + item.endEs + + ' <span>KWh</span></div><div class="desc">鎴鑳借��</div></div></div></div>' html += '<div class="m-energy2"><div class="tit">鑳借�楃粺璁′俊鎭�</div><ul class="ul-txtliste1">' - html += '<li><div class="con"><div class="num">' + item.epSum + ' <span>KWh</span></div><div class="desc">鏈夊姛鐢佃兘</div></div></li>' - html += '<li><div class="con"><div class="num">' + item.eqSum + ' <span>KWh</span></div><div class="desc">鏃犲姛鐢佃兘</div></div></li>' - html += '<li><div class="con"><div class="num">' + item.esSum + ' <span>KWh</span></div><div class="desc">鎬荤數鑳�</div></div></li>' + html += '<li><div class="con"><div class="num">' + item.epSum + + ' <span>KWh</span></div><div class="desc">鏈夊姛鐢佃兘</div></div></li>' + html += '<li><div class="con"><div class="num">' + item.eqSum + + ' <span>KWh</span></div><div class="desc">鏃犲姛鐢佃兘</div></div></li>' + html += '<li><div class="con"><div class="num">' + item.esSum + + ' <span>KWh</span></div><div class="desc">鎬荤數鑳�</div></div></li>' html += '</ul></div></div></div>' }) } else { diff --git a/igds-app/js/admin/es-read-meter.js b/igds-app/js/admin/es-read-meter.js index 5f78e17..b14cd7b 100644 --- a/igds-app/js/admin/es-read-meter.js +++ b/igds-app/js/admin/es-read-meter.js @@ -23,6 +23,7 @@ getMeterList(); } +//鏃ユ湡鏍煎紡鍖杫yyy-MM-dd function getDate(date) { var year = date.getFullYear(); var month, day; @@ -50,7 +51,7 @@ getMeterList(); }) } - +//鍔犲噺鏃ユ湡锛堝ぉ鏁帮級 function addAndReduceDay(tag) { var date = new Date(dateTime); date = date.setDate(date.getDate() + tag); @@ -61,9 +62,9 @@ } -// +//娓叉煋椤甸潰 function getMeterList() { - // + //璧嬪�煎弬鏁扮殑鏃ユ湡 data.data.dataTime = dateTime mui.ajax(url, { type: "POST", @@ -85,18 +86,61 @@ mui.alert("绯荤粺绻佸繖,璇烽噸璇曪紒", "鎻愮ず", ["纭畾"], function() {}, "div") } }) + meterList = [{ + "depotId": "40", + "depotName": "閲屾秷绗鍔℃剰蹇�", + "epSum": 36, + "eqSum": 51, + "updateTime": "2004-04-04 17:19:14", + "esSum": 13 + }, + { + "depotId": "84", + "depotName": "鐭宠�佹潈鍙婂湴鍦�", + "epSum": 48, + "eqSum": 57, + "updateTime": "1973-05-07 03:38:11", + "esSum": 7 + }, + { + "depotId": "39", + "depotName": "鍐冲惉鍐涚粡鏍煎瀷鍛�", + "epSum": 36, + "eqSum": 3, + "updateTime": "2003-09-19 06:57:50", + "esSum": 72 + }, + { + "depotId": "77", + "depotName": "闄粈鏈熺敱淇¤嚜鑸�", + "epSum": 44, + "eqSum": 59, + "updateTime": "1984-02-29 20:11:43", + "esSum": 92 + }, + { + "depotId": "21", + "depotName": "鎶ュ�欒仈鏈�", + "epSum": 40, + "eqSum": 15, + "updateTime": "2016-03-20 19:38:43", + "esSum": "" + } + ] } //娓叉煋椤甸潰 function renderData() { var html = '' if (meterList && meterList.length > 0) { $.each(meterList, function(index, item) { - html += '<div class="m-ck-cont"><div class="g-titck1">' + item.depotName + ' <span class="right">鏇存柊鏃堕棿: ' + item.updateTime + '</span></div>'; + html += '<div class="m-ck-cont"><div class="g-titck1">' + item.depotName + + ' <span class="right">鏇存柊鏃堕棿: ' + item.updateTime + '</span></div>'; html += '<div class="m-energy2"><ul class="ul-txtliste1"><li><div class="con">'; - html += '<div class="num">' + item.epSum + ' <span>KWh</span></div><div class="desc">鏈夊姛鐢佃兘</div></div></li>'; + html += '<div class="num">' + item.epSum + + ' <span>KWh</span></div><div class="desc">鏈夊姛鐢佃兘</div></div></li>'; html += '<li><div class="con"><div class="num">' + item.eqSum + ' <span>KWh</span></div>' html += '<div class="desc">鏃犲姛鐢佃兘</div></div></li>'; - html += '<li><div class="con"><div class="num">' + item.esSum + ' <span>KWh</span></div>'; + html += '<li><div class="con"><div class="num">' + (item.esSum == null || item.esSum == "" ? "--" : item.esSum) + ' <span>KWh</span></div>'; html += '<div class="desc">鎬荤數鑳�</div></div></li>' html += '</ul></div></div>'; }) diff --git a/igds-app/js/admin/es-real-electric.js b/igds-app/js/admin/es-real-electric.js index 3c0f427..d1147df 100644 --- a/igds-app/js/admin/es-real-electric.js +++ b/igds-app/js/admin/es-real-electric.js @@ -18,6 +18,7 @@ data.data.deptId = selectDeptId; getElectric(); } + function getElectric() { mui.ajax(url, { type: "POST", @@ -39,6 +40,62 @@ mui.alert("绯荤粺绻佸繖,璇烽噸璇曪紒", "鎻愮ず", ["纭畾"], function() {}, "div") } }) + electricList = [{ + "depotId": "18", + "depotName": "鍋氫竴鍑犲姞", + "ua": 97, + "ub": 43, + "uc": 81, + "ia": 85, + "ib": 76, + "ic": 43, + "updateTime": "1982-03-19 23:26:43" + }, + { + "depotId": "35", + "depotName": "灞傝兘姣旂淮", + "ua": 71, + "ub": 60, + "uc": 45, + "ia": 22, + "ib": 42, + "ic": 12, + "updateTime": "1980-11-10 20:35:36" + }, + { + "depotId": "61", + "depotName": "浠庡懆闃剁孩鍏�", + "ua": 88, + "ub": 94, + "uc": 77, + "ia": 33, + "ib": 83, + "ic": 67, + "updateTime": "1972-03-23 06:15:44" + }, + { + "depotId": "31", + "depotName": "鐏簲鍐垫柉鏈簲鍘�", + "ua": 76, + "ub": 76, + "uc": 68, + "ia": 80, + "ib": 54, + "ic": 2, + "updateTime": "2010-02-02 15:07:12" + }, + { + "depotId": "20", + "depotName": "璇濈編涔︾潃鍏锋潵鍒�", + "ua": 96, + "ub": 5, + "uc": 83, + "ia": 74, + "ib": 49, + "ic": 37, + "updateTime": "2007-11-02 05:03:29" + } + ] } //娓叉煋椤甸潰 function renderData() { @@ -76,7 +133,7 @@ html += '<li><div class="con myfancy" style="text-align: center;font-size: 20px;color:#dd524d">鏆傛棤瀹炴椂閰嶇數淇℃伅</div></li>'; } - // $("#recordList").html(html); + $("#recordList").html(html); } var slider = mui(".mui-slider"); slider.slider({ diff --git a/igds-app/js/admin/inout-in-handle-list.js b/igds-app/js/admin/inout-in-handle-list.js index 3f3b2c0..669873a 100644 --- a/igds-app/js/admin/inout-in-handle-list.js +++ b/igds-app/js/admin/inout-in-handle-list.js @@ -55,6 +55,7 @@ if (result.code == "0000") { inHandleData = result.data; renderData(); + mui.toast(result.msg); } else { renderData(); mui.toast(result.msg); @@ -65,55 +66,55 @@ } }) - // inHandleData = [{ - // "id": "44", - // "plateNum": "97", - // "deHandle": "ut", - // "depotId": "16", - // "depotName": "闈掑紶鍒楀仛鎬�", - // "foodVariety": "magna pariatur laboris sunt dolor", - // "foodVarietyName": "鎻愭竻闄�", - // "foodLevel": "fugiat", - // "foodLevelName": "搴斿彂鐑洓姘戞槸濮�", - // "storeKeeperName": "" - // }, - // { - // "id": "62", - // "plateNum": "71", - // "deHandle": "dolore ut non", - // "depotId": "79", - // "depotName": "澧炶薄瀹氱珛鏍�", - // "foodVariety": "Lorem est", - // "foodVarietyName": "甯傛潯缇ゆ眰琚洟涓�", - // "foodLevel": "ex labore", - // "foodLevelName": "鎸佸湪鍐欑О鎯呭苟", - // "storeKeeperName": "2" - // }, - // { - // "id": "96", - // "plateNum": "61", - // "deHandle": "nulla magna ut proident cillum", - // "depotId": "42", - // "depotName": "鏉″叏浠�", - // "foodVariety": "aliquip", - // "foodVarietyName": "杩炲紑闃跺姩闄呭共", - // "foodLevel": "in id sunt", - // "foodLevelName": "娌$疆瀹氫娇鏂�", - // "storeKeeperName": "3" - // }, - // { - // "id": "61", - // "plateNum": "17", - // "deHandle": "commodo", - // "depotId": "80", - // "depotName": "灞曡蹇伀鍏ㄩ", - // "foodVariety": "voluptate eu Lorem", - // "foodVarietyName": "浠栬竟娲炬柉閲嶇", - // "foodLevel": "dolor", - // "foodLevelName": "瑁呯涓�", - // "storeKeeperName": "4" - // } - // ] + inHandleData = [{ + "id": "44", + "plateNum": "97", + "deHandle": "ut", + "depotId": "16", + "depotName": "闈掑紶鍒楀仛鎬�", + "foodVariety": "magna pariatur laboris sunt dolor", + "foodVarietyName": "鎻愭竻闄�", + "foodLevel": "fugiat", + "foodLevelName": "搴斿彂鐑洓姘戞槸濮�", + "storeKeeperName": "" + }, + { + "id": "62", + "plateNum": "71", + "deHandle": "dolore ut non", + "depotId": "79", + "depotName": "澧炶薄瀹氱珛鏍�", + "foodVariety": "Lorem est", + "foodVarietyName": "甯傛潯缇ゆ眰琚洟涓�", + "foodLevel": "ex labore", + "foodLevelName": "鎸佸湪鍐欑О鎯呭苟", + "storeKeeperName": "2" + }, + { + "id": "96", + "plateNum": "61", + "deHandle": "nulla magna ut proident cillum", + "depotId": "42", + "depotName": "鏉″叏浠�", + "foodVariety": "aliquip", + "foodVarietyName": "杩炲紑闃跺姩闄呭共", + "foodLevel": "in id sunt", + "foodLevelName": "娌$疆瀹氫娇鏂�", + "storeKeeperName": "3" + }, + { + "id": "61", + "plateNum": "17", + "deHandle": "commodo", + "depotId": "80", + "depotName": "灞曡蹇伀鍏ㄩ", + "foodVariety": "voluptate eu Lorem", + "foodVarietyName": "浠栬竟娲炬柉閲嶇", + "foodLevel": "dolor", + "foodLevelName": "瑁呯涓�", + "storeKeeperName": "4" + } + ] } //娓叉煋椤甸潰 @@ -163,7 +164,7 @@ picker.show(function(SelectedItem) { console.log(JSON.stringify(SelectedItem)); //鐜板満鍊间粨 - if(SelectedItem.value == 'photo'){ + if(SelectedItem[0].value == 'photo'){ mui.openWindow({ url: "inout-in-handle.html", id: "inout-in-handle", diff --git a/igds-app/js/admin/inout-in-handle.js b/igds-app/js/admin/inout-in-handle.js index ab9c15f..2ddc4cc 100644 --- a/igds-app/js/admin/inout-in-handle.js +++ b/igds-app/js/admin/inout-in-handle.js @@ -84,7 +84,8 @@ getDetail(); }, error: function() { - mui.alert('寮�濮嬭绮彁浜ゅけ璐ワ紝璇烽噸鏂版搷浣滐紒', '鎻愮ず', ["纭畾"], function() {}, "div"); + mui.alert('寮�濮嬭绮彁浜ゅけ璐ワ紝璇烽噸鏂版搷浣滐紒', '鎻愮ず', ["纭畾"], function() {}, + "div"); } }) } else { @@ -165,6 +166,25 @@ } //鎷嶇収涓婁紶 function choosePic(typeNum) { + var picker = new mui.PopPicker(); + picker.setData([{ + value: "cameraImg", + text: "鎷嶇収涓婁紶" + }, { + value: "galleryImg", + text: "浠庣浉鍐岄�夋嫨" + }]) + picker.show(function(SelectedItem) { + console.log(JSON.stringify(SelectedItem[0].value)); + console.log() + if (SelectedItem[0].value == 'cameraImg') { + console.log("鎷嶇収") + cameraImg(typeNum); + } else { + console.log("鐩稿唽") + galleryImg(typeNum); + } + }) // //鑾峰彇瀹氫綅淇℃伅 // if (latitude == null || longitude == null) { // return; @@ -189,7 +209,7 @@ }]) picker.show(function(SelectedItem) { console.log(JSON.stringify(SelectedItem)); - if (SelectedItem == 'cameraImg') { + if (SelectedItem[0].value == 'cameraImg') { cameraImg(typeNum); } else { galleryImg(typeNum); @@ -206,25 +226,10 @@ mui.alert('绯荤粺绻佸繖,璇烽噸璇曪紒', '鎻愮ず', ["纭畾"], function() {}, "div"); } }) - // var picker = new mui.PopPicker(); - // picker.setData([{ - // value: "cameraImg", - // text: "鎷嶇収涓婁紶" - // }, { - // value: "galleryImg", - // text: "浠庣浉鍐岄�夋嫨" - // }]) - // picker.show(function(SelectedItem) { - // console.log(JSON.stringify(SelectedItem)); - // if (SelectedItem == 'cameraImg') { - // cameraImg(typeNum); - // } else { - // galleryImg(typeNum); - // } - // }) + }; -//浣跨敤鐩告満鎷嶇収 +//鐩告満鎷嶇収 function cameraImg(typeNum) { var cmr = plus.camera.getCamera(); cmr.captureImage(function(p) { diff --git a/igds-app/js/admin/inout-out-handle.js b/igds-app/js/admin/inout-out-handle.js index 838c9db..05f97b2 100644 --- a/igds-app/js/admin/inout-out-handle.js +++ b/igds-app/js/admin/inout-out-handle.js @@ -189,7 +189,7 @@ }]) picker.show(function(SelectedItem) { console.log(JSON.stringify(SelectedItem)); - if (SelectedItem == 'cameraImg') { + if (SelectedItem[0].value == 'cameraImg') { cameraImg(typeNum); } else { galleryImg(typeNum); @@ -216,7 +216,7 @@ // }]) // picker.show(function(SelectedItem) { // console.log(JSON.stringify(SelectedItem)); - // if (SelectedItem == 'cameraImg') { + // if (SelectedItem[0].value == 'cameraImg') { // cameraImg(typeNum); // } else { // galleryImg(typeNum); diff --git a/igds-app/js/admin/inout-out-record.js b/igds-app/js/admin/inout-out-record.js index 9a07053..bf8e389 100644 --- a/igds-app/js/admin/inout-out-record.js +++ b/igds-app/js/admin/inout-out-record.js @@ -83,10 +83,10 @@ html += '</ul><div class="time">瀹屾垚鏃堕棿锛�' + getStrDate(item.completeTime) + '</div></div>'; }) } else { - html += '<div class="id" style="text-align: center;font-size: 20px;color:#dd524d">鎵�閫夋棩鏈熸殏鏃犲叆搴撹褰曚俊鎭�</div>'; + html += '<div class="id" style="text-align: center;font-size: 20px;color:#dd524d">鎵�閫夋棩鏈熸殏鏃犲嚭搴撹褰曚俊鎭�</div>'; } }else{ - html += '<div class="id" style="text-align: center;font-size: 20px;color:#dd524d">鎵�閫夋棩鏈熸殏鏃犲叆搴撹褰曚俊鎭�</div>'; + html += '<div class="id" style="text-align: center;font-size: 20px;color:#dd524d">鎵�閫夋棩鏈熸殏鏃犲嚭搴撹褰曚俊鎭�</div>'; } $("#sum").html(sumHtml); $("#recordList").html(html); diff --git a/igds-app/js/admin/inout-real.js b/igds-app/js/admin/inout-real.js index 2b15072..a041212 100644 --- a/igds-app/js/admin/inout-real.js +++ b/igds-app/js/admin/inout-real.js @@ -37,6 +37,7 @@ data: JSON.stringify(data), success: function(result) { if (result.code == "0000") { + console.log(JSON.stringify(result)) recordData = result.data; renderData(); } else { @@ -53,6 +54,7 @@ //娓叉煋椤甸潰 function renderData() { var html = ''; + console.log(JSON.stringify(recordData)) if (recordData) { $("#inSumNum").html(recordData.inSumNum); $("#inCompleteNum").html(recordData.inCompleteNum); diff --git a/igds-app/js/admin/security-video.js b/igds-app/js/admin/security-video.js index 7621866..98d34ab 100644 --- a/igds-app/js/admin/security-video.js +++ b/igds-app/js/admin/security-video.js @@ -1,6 +1,6 @@ var url = null; -var videoData = null; -var playData =null; +var videoList = null; +var playData = null; var data = { "interfaceId": "5604", "tokenAuth": "", @@ -35,6 +35,7 @@ } function getVideoList() { + console.log(JSON.stringify(data.data)) //鍙戦�佽姹傝幏鍙栬棰戣澶� mui.ajax(url, { type: "POST", @@ -44,13 +45,11 @@ data: JSON.stringify(data), success: function(result) { if (result.code == "0000") { - videoData = result.data; - console.log(JSON.stringify(videoData)) + videoList = result.data; renderVideo(); } else { renderVideo(); mui.alert(result.msg, '鎻愮ず', ["纭畾"], function() {}, "div"); - } }, error: function() { @@ -58,54 +57,79 @@ mui.alert('绯荤粺绻佸繖,璇烽噸璇曪紒', '鎻愮ず', ["纭畾"], function() {}, "div"); } }) + videoList = [{ + "id": "45", + "name": "涓滃浘涔犲", + "status": "01", + "playType": "id ea", + "type": "02" + }, + { + "id": "52", + "name": "鑰佸嚭浜蹭簨鍏�", + "status": "02", + "playType": "Ut", + "type": "01" + }, + { + "id": "70", + "name": "瑙i鏂囩‘鍥㈢鐓�", + "status": "02", + "playType": "nisi nostrud", + "type": "02" + }, + { + "id": "13", + "name": "鍥犲眬鍛�", + "status": "01", + "playType": "ex labore esse", + "type": "01" + } + ] } //娓叉煋瑙嗛鐩戞帶璁惧 function renderVideo() { var html = ''; - if (videoData) { - var videoList = videoData.data; - if (videoList && videoList.length > 0) { - $.each(videoList, function(index, item) { - if (index % 3 == 0) { - html += - '<li><a onclick="getVideo(\''+item.id+'\',\''+item.playType+'\')" class="con" style="background-image: url(images/icons/g-i15.png);">'; - } - if (index % 3 == 1) { - html += - '<li><a onclick="getVideo(\''+item.id+'\',\''+item.playType+'\')" class="con" style="background-image: url(images/icons/g-i16.png);">'; - } - if (index % 3 == 2) { - html += - '<li><a onclick="getVideo(\''+item.id+'\',\''+item.playType+'\')" class="con" style="background-image: url(images/icons/g-i17.png);">'; - } - if (item.type = '02') { - html += - '<div class="left"><div class="icon"><img src="images/icons/g-i13.png" alt=""></div><div class="name">' + - item.name + ' (鐞冩満)</div></div>'; - } - if (item.type == '01') { - html += - '<div class="left"><div class="icon"><img src="images/icons/g-i14.png" alt=""></div><div class="name">' + - item.name + ' (鏋満)</div></div>'; - } + if (videoList && videoList.length > 0) { + $.each(videoList, function(index, item) { + if (index % 3 == 0) { + html += + '<li><a onclick="getVideo(\'' + item.id + '\',\'' + item.playType + + '\')" class="con" style="background-image: url(images/icons/g-i15.png);">'; + }else if (index % 3 == 1) { + html += + '<li><a onclick="getVideo(\'' + item.id + '\',\'' + item.playType + + '\')" class="con" style="background-image: url(images/icons/g-i16.png);">'; + }else if (index % 3 == 2) { + html += + '<li><a onclick="getVideo(\'' + item.id + '\',\'' + item.playType + + '\')" class="con" style="background-image: url(images/icons/g-i17.png);">'; + } + if (item.type == '01') { + html +='<div class="left"><div class="icon"><img src="images/icons/g-i14.png" alt=""></div><div class="name">' + + item.name + ' (鏋満)</div></div>'; - html += '<div class="right"><span class="mui-icon mui-icon-forward"></span></div></a></li>'; - }) - } else { - html += '<li><a class="con" style="background-image: url(images/icons/g-i15.png);"><span>鏆傛棤鐩稿叧璁惧</span></a></li>'; - } - }else{ - html += '<li><a class="con" style="background-image: url(images/icons/g-i15.png);"><span>鏆傛棤鐩稿叧璁惧</span></a></li>'; + }else if (item.type == '02') { + html += '<div class="left"><div class="icon"><img src="images/icons/g-i13.png" alt=""></div><div class="name">' + + item.name + ' (鐞冩満)</div></div>'; + + } + + html += '<div class="right"><span class="mui-icon mui-icon-forward"></span></div></a></li>'; + }) + } else { + html += + '<li><a class="con" style="background-image: url(images/icons/g-i15.png);text-align: center;font-size: 20px;color:#dd524d""><span>鏆傛棤鐩稿叧璁惧</span></a></li>'; } $("#recordList").html(html); } -function getVideo(cameraId,playType){ +function getVideo(cameraId, playType) { data1.data.id = cameraId; data1.data.playType = playType; - + console.log(JSON.stringify(data1.data)) //鍙戦�佽姹傝幏鍙栬棰戣澶� mui.ajax(url, { type: "POST", @@ -119,7 +143,8 @@ console.log(JSON.stringify(playData)) toVideo(playData.playAddr); } else { - toVideo(''); + // toVideo("http://player.alicdn.com/video/aliyunmedia.mp4"); + toVideo('') mui.alert(result.msg, '鎻愮ず', ["纭畾"], function() {}, "div"); } }, @@ -130,9 +155,10 @@ }) } -function toVideo(playAddr){ +function toVideo(playAddr) { var html = ''; - html += '<video src="'+playAddr+'" poster="images/pos1.png" class="video" webkit-playsinline="true" playsinline="true" controls></video>' + html += '<video src="' + playAddr + + '" poster="images/pos1.png" class="video" webkit-playsinline="true" playsinline="true" controls></video>' $("#toVideo").html(html); } diff --git a/igds-app/js/admin/work-apply.js b/igds-app/js/admin/work-apply.js index 7f57f76..0965d70 100644 --- a/igds-app/js/admin/work-apply.js +++ b/igds-app/js/admin/work-apply.js @@ -124,8 +124,10 @@ success: function(result) { if (result.code == "0000") { console.log(JSON.stringify(result)) + mui.toast(result.msg); } else { // console.log(JSON.stringify(result)) + // mui.toast(result.msg); mui.alert(result.msg, '鎻愮ず', ["纭畾"], function() {}, "div"); } }, @@ -169,13 +171,39 @@ }) } +function refresh(){ + var html = ''; + html += '<div class="m-gd"><div class="group"><div class="l">涓氬姟绫诲瀷:</div><div class="r">' + html += '<div class="val" id="ywlx"><div class="placeholder">璇烽�夋嫨</div>' + html += '<div class="real-val" id="ywlx-val" ></div></div></div></div>' + html += '<div class="group"><div class="l">鎵�灞炲垎搴�:</div><div class="r">' + html += '<div class="val" id="ssfk"><div class="placeholder">璇烽�夋嫨</div>'; + html += '<div class="real-val" id="ssfk-val"></div></div></div></div>'; + html += '<div class="group"><div class="l">鍏宠仈浠撳簱:</div><div class="r">'; + html += '<div class="val" id="glck"><div class="placeholder">璇烽�夋嫨</div>'; + html += '<div class="real-val" id="glck-val" ></div></div></div></div>'; + html += '<div class="group"><div class="l">鏈夋晥寮�濮嬫椂闂�:</div><div class="r">'; + html += '<div class="val" id="date1" onclick="chooseDate();"><div class="placeholder">璇烽�夋嫨</div>'; + html += '<div class="real-val" id="date1-val"></div></div></div></div>'; + html += '<div class="group"><div class="l">鏈夋晥缁撴潫鏃堕棿:</div><div class="r">'; + html += '<div class="val" id="date2" onclick="chooseDate1();"><div class="placeholder">璇烽�夋嫨</div>'; + html += '<div class="real-val" id="date2-val"></div></div></div></div>'; + html += '<div type="submit" class="submit">鎻愪氦</div></div>'; + $("#refresh").html(html); + data.data.depotId = ''; + data.data.type = '' + data.data.startTime = '' + data.data.endTime = '' + +} + //鎻愪氦 mui(".mui-scroll").on("tap", ".wp form .submit", function() { workApply(); - window.location.reload(); - // window.setTimeout(function() { - // window.location.reload(); - // }, 200) + // window.location.reload(); + window.setTimeout(function() { + refresh(); + }, 200) }) mui('.mui-scroll-wrapper').scroll({ diff --git a/igds-app/js/admin/work-audit.js b/igds-app/js/admin/work-audit.js index 9e5e04f..056d700 100644 --- a/igds-app/js/admin/work-audit.js +++ b/igds-app/js/admin/work-audit.js @@ -36,6 +36,7 @@ //鑾峰彇宸ュ崟瀹℃牳鍒楄〃 function getAuditList() { + console.log(JSON.stringify(data.data),"work-aduit","宸ュ崟瀹℃牳鍒楄〃") mui.ajax(url, { type: "POST", dataType: "json", @@ -140,6 +141,7 @@ //宸ュ崟瀹℃牳 function workAudit() { + console.log(JSON.stringify(data1.data),"work-aduit","宸ュ崟瀹℃牳") mui.ajax(url, { type: "POST", dataType: "json", @@ -167,7 +169,6 @@ data1.data.id = id data1.data.status = '10' workAudit(); - console.log(JSON.stringify(data1.data), "work-audit", "鎷掔粷") }) //閫氳繃 @@ -177,7 +178,6 @@ data1.data.id = id data1.data.status = '20' workAudit(); - console.log(JSON.stringify(data1.data), "work-audit", "閫氳繃") }) //鏌ョ湅鐢宠鍐呭 mui(".mui-scroll").on("tap", ".wp ul li .icon", function() { diff --git a/igds-app/js/admin/work-record.js b/igds-app/js/admin/work-record.js index 2f63e8c..bcbea44 100644 --- a/igds-app/js/admin/work-record.js +++ b/igds-app/js/admin/work-record.js @@ -15,7 +15,7 @@ var user = JSON.parse(localStorage.getItem('user')); url = user.url + "/api-phone/v35/gateway"; data.tokenAuth = user.tokenAuth; - data.data.userName = user.userName; + data.data.userName = user.username; console.log(JSON.stringify(data.data),"work-record") getRecordList(); } diff --git a/igds-app/work-apply.html b/igds-app/work-apply.html index fc2874b..0315efe 100644 --- a/igds-app/work-apply.html +++ b/igds-app/work-apply.html @@ -4,7 +4,7 @@ <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> - <title宸ュ崟鐢宠< /title> + <title>宸ュ崟鐢宠</title> <!-- MUI鏍峰紡 --> <link rel="stylesheet" href="./css/mui.min.css" /> <link rel="stylesheet" href="css/mui.poppicker.css"> @@ -25,7 +25,7 @@ <div class="mui-scroll-wrapper g-src_box" > <div class="mui-scroll"> <div class="wp"> - <form action=""> + <form action="" id="refresh"> <div class="m-gd" > <div class="group"> -- Gitblit v1.9.3