| | |
| | | "outId": "10402", |
| | | "reqDateTime": new Date(), |
| | | "tokenAuth": "", |
| | | "data": [], |
| | | // { |
| | | // "deptId": "", |
| | | // "depotId": "", |
| | | // "type": "", |
| | | // "passCode": "", |
| | | // "serId": "", |
| | | // "targetStatus": "" |
| | | // } |
| | | "data": { |
| | | "deptId": "", |
| | | "depotId": "", |
| | | "type": "", |
| | | "passCode": "", |
| | | "serId": "", |
| | | "targetStatus": "", |
| | | "batchTag":"" |
| | | } |
| | | }; |
| | | //设备列表 |
| | | var data1 = { |
| | |
| | | |
| | | var user = JSON.parse(localStorage.getItem('user')); |
| | | var selectDeptId = JSON.parse(localStorage.getItem('selectDeptId')); |
| | | url = user.url + "/api-phone/v35/gateway"; |
| | | url = user.url + "/api/phone/v35/gateway"; |
| | | data.tokenAuth = user.tokenAuth; |
| | | data.data.deptId = user.deptId; |
| | | data1.data.deptId = user.deptId; |
| | | data1.tokenAuth = user.tokenAuth; |
| | | deptId = user.deptId; |
| | | //获取从上一个页面传递的数据 |
| | | var self = plus.webview.currentWebview(); |
| | | data.data.depotId = self.depotId |
| | | data1.data.depotId = self.depotId |
| | | depotId = self.depotId |
| | | console.log(depotId) |
| | | // depotType = self.depotType |
| | | // depotName = self.depotName |
| | | getDeviceList(); |
| | |
| | | if (deviceData) { |
| | | var deviceList = deviceData.listDevice; |
| | | if (deviceList && deviceList.length > 0) { |
| | | frontList=[]; |
| | | backList=[]; |
| | | leftList=[]; |
| | | rightList=[]; |
| | | $.each(deviceList, function(index, item) { |
| | | if (item.location == '01') { |
| | | frontList.push(item) |
| | |
| | | rightList.push(item) |
| | | } |
| | | }) |
| | | |
| | | if (frontList && frontList.length > 0) { //仓库正面 |
| | | html += '<div class="m-tf"><div class="g-tittf1">仓库正面</div><ul class="ul-listmana1 ullisttf1">'; |
| | | $.each(frontList, function(index, item) { |
| | | targetStatus = item.status |
| | | if (item.type == '01') { //风窗 |
| | | html += '<li><div class="con myfancy chuangkou" status="' + item.status + |
| | | '" passCode="' + item.passCode + '" serId="' + item.serId + '"name="' + item.name + |
| | | '" location="front" type="01">'; |
| | | if(targetStatus == 'OPEN'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_01_OPEN.png"></div>' |
| | | html += '<div class="info in" style="background-image: url(images/e5.png);">'+ item.name +'</div>' |
| | | }else if(targetStatus == 'CLOSE'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_01_CLOSE.png"></div>' |
| | | html += '<div class="info in" style="background-image: url(images/e3.png);">'+ item.name +'</div>' |
| | | } |
| | | html += '</div></li>' |
| | | } else if (item.type == '02') { //轴流风机 |
| | | html += '<li><div class="con myfancy zhouliu" status="'+ item.status + '" passCode="' + |
| | | item.passCode + '" serId="' + item.serId + '"name="' + item.name + |
| | | '" location="front">'; |
| | | if(targetStatus == 'W_CLOSE'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_02_W_CLOSE.png"></div>' |
| | | }else if(targetStatus == 'W_OPEN'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_02_W_OPEN.png"></div>' |
| | | }else if(targetStatus == 'F_OPEN'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_02_F_OPEN.gif"></div>' |
| | | }else if(targetStatus == 'F_OPEN_F'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_02_F_OPEN_F.gif"></div>' |
| | | }else if(targetStatus == 'F_CLOSE'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_02_W_OPEN.png"></div>' |
| | | } |
| | | html += '<div class="info in" style="background-image: url(images/e3.png);">' + item.name +'</div>' |
| | | html += '</div></li>' |
| | | } else if (item.type == '04') { //环流风机 |
| | | html += '<li><div class="con myfancy huanliu" status="' + item.status + '" passCode="' + |
| | | item.passCode + '" serId="' + item.serId + '"name="' + item.name + |
| | | '" location="front">'; |
| | | if(targetStatus == 'CLOSE'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_04_ClOSE.png"></div>' |
| | | }else if(targetStatus == 'OPEN'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_04_OPEN.gif"></div>' |
| | | } |
| | | html += '<div class="info out" style="background-image: url(images/e3.png);"> ' + item.name + '</div>' |
| | | html += '</div></li>' |
| | | } else if (item.type == '0B') { //通风口 |
| | | html += '<li><div class="con myfancy chuangkou" status="' + item.status + |
| | | '" passCode="' +item.passCode + '" serId="' + item.serId + '"name="' + item.name + |
| | | '" location="front" type="0B">'; |
| | | if(targetStatus == 'CLOSE'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_0B_CLOSE.png"></div>' |
| | | }else if(targetStatus == 'OPEN'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_0B_OPEN.png"></div>' |
| | | } |
| | | html += '<div class="info in" style="background-image: url(images/e3.png);">'+ item.name +'</div>' |
| | | html += '</div></li>' |
| | | } else if (item.type == '0C') { //混流风机 |
| | | html += '<li><div class="con myfancy hunliu" status="' + item.status + '" passCode="' + |
| | | item.passCode + '" serId="' + item.serId + '"name="' + item.name +'" location="front">'; |
| | | if(targetStatus == 'W_CLOSE'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_0C_w_CLOSE.png"></div>' |
| | | }else if(targetStatus == 'F_OPEN_F'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_0C_F_OPEN_F.gif"></div>' |
| | | }else if(targetStatus == 'F_OPEN'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_0C_F_OPEN.gif"></div>' |
| | | }else if(targetStatus == 'W_OPEN'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_0C_W_OPEN.png"></div>' |
| | | } |
| | | html += '<div class="info out" style="background-image: url(images/e3.png);"> ' + item.name + '</div>' |
| | | html += '</div></li>' |
| | | } else if (item.type == '0D') { //加压风机 |
| | | html += '<li><div class="con myfancy jiaya" status="' + item.status + '" passCode="' + |
| | | item.passCode + '" serId="' + item.serId + '"name="' + item.name +'" location="front">'; |
| | | if(targetStatus == 'CLOSE'){ |
| | | html += '<div class="pic pic1"><img src="images/device-status/STATUS_0D_CLOSE.png"></div>' |
| | | }else if(targetStatus == 'OPEN'){ |
| | | html += '<div class="pic pic1"><img src="images/device-status/STATUS_0D_OPEN.png"></div>' |
| | | } |
| | | html += '<div class="info out" style="background-image: url(images/e3.png);"> ' + item.name + '</div>' |
| | | html += '</div></li>' |
| | | } |
| | | }) |
| | | html += '</ul></div>' |
| | | } |
| | | if (backList && backList.length > 0) { //仓库反面 |
| | | html += '<div class="m-tf"><div class="g-tittf1">仓库反面</div><ul class="ul-listmana1 ullisttf1">'; |
| | | $.each(frontList, function(index, item) { |
| | | targetStatus = item.status |
| | | if (item.type == '01') { //风窗 |
| | | html += '<li><div class="con myfancy chuangkou" status="' + item.status + |
| | | '" passCode="' + item.passCode + '" serId="' + item.serId + '"name="' + item.name + |
| | | '" location="front" type="01">'; |
| | | if(targetStatus == 'OPEN'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_01_OPEN.png"></div>' |
| | | html += '<div class="info in" style="background-image: url(images/e5.png);">'+ item.name +'</div>' |
| | | }else if(targetStatus == 'CLOSE'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_01_CLOSE.png"></div>' |
| | | html += '<div class="info in" style="background-image: url(images/e3.png);">'+ item.name +'</div>' |
| | | } |
| | | html += '</div></li>' |
| | | } else if (item.type == '02') { //轴流风机 |
| | | html += '<li><div class="con myfancy zhouliu" status="'+ item.status + '" passCode="' + |
| | | item.passCode + '" serId="' + item.serId + '"name="' + item.name + |
| | | '" location="front">'; |
| | | if(targetStatus == 'W_CLOSE'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_02_W_CLOSE.png"></div>' |
| | | }else if(targetStatus == 'W_OPEN'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_02_W_OPEN.png"></div>' |
| | | }else if(targetStatus == 'F_OPEN'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_02_F_OPEN.gif"></div>' |
| | | }else if(targetStatus == 'F_OPEN_F'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_02_F_OPEN_F.gif"></div>' |
| | | }else if(targetStatus == 'F_CLOSE'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_02_W_OPEN.png"></div>' |
| | | } |
| | | html += '<div class="info in" style="background-image: url(images/e3.png);">' + item.name +'</div>' |
| | | html += '</div></li>' |
| | | } else if (item.type == '04') { //环流风机 |
| | | html += '<li><div class="con myfancy huanliu" status="' + item.status + '" passCode="' + |
| | | item.passCode + '" serId="' + item.serId + '"name="' + item.name + |
| | | '" location="front">'; |
| | | if(targetStatus == 'CLOSE'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_04_ClOSE.png"></div>' |
| | | }else if(targetStatus == 'OPEN'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_04_OPEN.gif"></div>' |
| | | } |
| | | html += '<div class="info out" style="background-image: url(images/e3.png);"> ' + item.name + '</div>' |
| | | html += '</div></li>' |
| | | } else if (item.type == '0B') { //通风口 |
| | | html += '<li><div class="con myfancy chuangkou" status="' + item.status + |
| | | '" passCode="' +item.passCode + '" serId="' + item.serId + '"name="' + item.name + |
| | | '" location="front" type="0B">'; |
| | | if(targetStatus == 'CLOSE'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_0B_CLOSE.png"></div>' |
| | | }else if(targetStatus == 'OPEN'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_0B_OPEN.png"></div>' |
| | | } |
| | | html += '<div class="info in" style="background-image: url(images/e3.png);">'+ item.name +'</div>' |
| | | html += '</div></li>' |
| | | } else if (item.type == '0C') { //混流风机 |
| | | html += '<li><div class="con myfancy hunliu" status="' + item.status + '" passCode="' + |
| | | item.passCode + '" serId="' + item.serId + '"name="' + item.name +'" location="front">'; |
| | | if(targetStatus == 'W_CLOSE'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_0C_w_CLOSE.png"></div>' |
| | | }else if(targetStatus == 'F_OPEN_F'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_0C_F_OPEN_F.gif"></div>' |
| | | }else if(targetStatus == 'F_OPEN'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_0C_F_OPEN.gif"></div>' |
| | | }else if(targetStatus == 'W_OPEN'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_0C_W_OPEN.png"></div>' |
| | | } |
| | | html += '<div class="info out" style="background-image: url(images/e3.png);"> ' + item.name + '</div>' |
| | | html += '</div></li>' |
| | | } else if (item.type == '0D') { //加压风机 |
| | | html += '<li><div class="con myfancy jiaya" status="' + item.status + '" passCode="' + |
| | | item.passCode + '" serId="' + item.serId + '"name="' + item.name +'" location="front">'; |
| | | if(targetStatus == 'CLOSE'){ |
| | | html += '<div class="pic pic1"><img src="images/device-status/STATUS_0D_CLOSE.png"></div>' |
| | | }else if(targetStatus == 'OPEN'){ |
| | | html += '<div class="pic pic1"><img src="images/device-status/STATUS_0D_OPEN.png"></div>' |
| | | } |
| | | html += '<div class="info out" style="background-image: url(images/e3.png);"> ' + item.name + '</div>' |
| | | html += '</div></li>' |
| | | } |
| | | }) |
| | | html += '</ul></div>' |
| | | } |
| | | if (leftList && leftList.length > 0) { //仓库左侧面 |
| | | html += '<div class="m-tf"><div class="g-tittf1">仓库左侧面</div><ul class="ul-listmana1 ullisttf1">'; |
| | | $.each(frontList, function(index, item) { |
| | | targetStatus = item.status |
| | | if (item.type == '01') { //风窗 |
| | | html += '<li><div class="con myfancy chuangkou" status="' + item.status + |
| | | '" passCode="' + item.passCode + '" serId="' + item.serId + '"name="' + item.name + |
| | | '" location="front" type="01">'; |
| | | if(targetStatus == 'OPEN'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_01_OPEN.png"></div>' |
| | | html += '<div class="info in" style="background-image: url(images/e5.png);">'+ item.name +'</div>' |
| | | }else if(targetStatus == 'CLOSE'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_01_CLOSE.png"></div>' |
| | | html += '<div class="info in" style="background-image: url(images/e3.png);">'+ item.name +'</div>' |
| | | } |
| | | html += '</div></li>' |
| | | } else if (item.type == '02') { //轴流风机 |
| | | html += '<li><div class="con myfancy zhouliu" status="'+ item.status + '" passCode="' + |
| | | item.passCode + '" serId="' + item.serId + '"name="' + item.name + |
| | | '" location="front">'; |
| | | if(targetStatus == 'W_CLOSE'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_02_W_CLOSE.png"></div>' |
| | | }else if(targetStatus == 'W_OPEN'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_02_W_OPEN.png"></div>' |
| | | }else if(targetStatus == 'F_OPEN'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_02_F_OPEN.gif"></div>' |
| | | }else if(targetStatus == 'F_OPEN_F'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_02_F_OPEN_F.gif"></div>' |
| | | }else if(targetStatus == 'F_CLOSE'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_02_W_OPEN.png"></div>' |
| | | } |
| | | html += '<div class="info in" style="background-image: url(images/e3.png);">' + item.name +'</div>' |
| | | html += '</div></li>' |
| | | } else if (item.type == '04') { //环流风机 |
| | | html += '<li><div class="con myfancy huanliu" status="' + item.status + '" passCode="' + |
| | | item.passCode + '" serId="' + item.serId + '"name="' + item.name + |
| | | '" location="front">'; |
| | | if(targetStatus == 'CLOSE'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_04_ClOSE.png"></div>' |
| | | }else if(targetStatus == 'OPEN'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_04_OPEN.gif"></div>' |
| | | } |
| | | html += '<div class="info out" style="background-image: url(images/e3.png);"> ' + item.name + '</div>' |
| | | html += '</div></li>' |
| | | } else if (item.type == '0B') { //通风口 |
| | | html += '<li><div class="con myfancy chuangkou" status="' + item.status + |
| | | '" passCode="' +item.passCode + '" serId="' + item.serId + '"name="' + item.name + |
| | | '" location="front" type="0B">'; |
| | | if(targetStatus == 'CLOSE'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_0B_CLOSE.png"></div>' |
| | | }else if(targetStatus == 'OPEN'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_0B_OPEN.png"></div>' |
| | | } |
| | | html += '<div class="info in" style="background-image: url(images/e3.png);">'+ item.name +'</div>' |
| | | html += '</div></li>' |
| | | } else if (item.type == '0C') { //混流风机 |
| | | html += '<li><div class="con myfancy hunliu" status="' + item.status + '" passCode="' + |
| | | item.passCode + '" serId="' + item.serId + '"name="' + item.name +'" location="front">'; |
| | | if(targetStatus == 'W_CLOSE'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_0C_w_CLOSE.png"></div>' |
| | | }else if(targetStatus == 'F_OPEN_F'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_0C_F_OPEN_F.gif"></div>' |
| | | }else if(targetStatus == 'F_OPEN'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_0C_F_OPEN.gif"></div>' |
| | | }else if(targetStatus == 'W_OPEN'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_0C_W_OPEN.png"></div>' |
| | | } |
| | | html += '<div class="info out" style="background-image: url(images/e3.png);"> ' + item.name + '</div>' |
| | | html += '</div></li>' |
| | | } else if (item.type == '0D') { //加压风机 |
| | | html += '<li><div class="con myfancy jiaya" status="' + item.status + '" passCode="' + |
| | | item.passCode + '" serId="' + item.serId + '"name="' + item.name +'" location="front">'; |
| | | if(targetStatus == 'CLOSE'){ |
| | | html += '<div class="pic pic1"><img src="images/device-status/STATUS_0D_CLOSE.png"></div>' |
| | | }else if(targetStatus == 'OPEN'){ |
| | | html += '<div class="pic pic1"><img src="images/device-status/STATUS_0D_OPEN.png"></div>' |
| | | } |
| | | html += '<div class="info out" style="background-image: url(images/e3.png);"> ' + item.name + '</div>' |
| | | html += '</div></li>' |
| | | } |
| | | }) |
| | | html += '</ul></div>' |
| | | } |
| | | if (rightList && rightList.length > 0) { //仓库右侧面 |
| | | html += '<div class="m-tf"><div class="g-tittf1">仓库右侧面</div><ul class="ul-listmana1 ullisttf1">'; |
| | | $.each(frontList, function(index, item) { |
| | | targetStatus = item.status |
| | | if (item.type == '01') { //风窗 |
| | | html += '<li><div class="con myfancy chuangkou" status="' + item.status + |
| | | '" passCode="' + |
| | | item.passCode + '" serId="' + item.serId + '"name="' + item.name + |
| | | '" location="front" type="01">'; |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_01_OPEN.png"></div>' |
| | | html += '<div class="info in" style="background-image: url(images/e3.png);">' + item |
| | | .name + |
| | | '</div>' |
| | | if(targetStatus == 'OPEN'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_01_OPEN.png"></div>' |
| | | html += '<div class="info in" style="background-image: url(images/e5.png);">'+ item.name +'</div>' |
| | | }else if(targetStatus == 'CLOSE'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_01_CLOSE.png"></div>' |
| | | html += '<div class="info in" style="background-image: url(images/e3.png);">'+ item.name +'</div>' |
| | | } |
| | | html += '</div></li>' |
| | | } else if (item.type == '02') { //轴流风机 |
| | | html += '<li><div class="con myfancy zhouliu" status="' + item.status + '" passCode="' + |
| | | html += '<li><div class="con myfancy zhouliu" status="'+ item.status + '" passCode="' + |
| | | item.passCode + '" serId="' + item.serId + '"name="' + item.name + |
| | | '" location="front">'; |
| | | html += '<div class="pic"><img src="images/d8.png"></div>' |
| | | html += '<div class="info in" style="background-image: url(images/e4.png);">' + item |
| | | .name + |
| | | '</div>' |
| | | if(targetStatus == 'W_CLOSE'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_02_W_CLOSE.png"></div>' |
| | | }else if(targetStatus == 'W_OPEN'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_02_W_OPEN.png"></div>' |
| | | }else if(targetStatus == 'F_OPEN'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_02_F_OPEN.gif"></div>' |
| | | }else if(targetStatus == 'F_OPEN_F'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_02_F_OPEN_F.gif"></div>' |
| | | }else if(targetStatus == 'F_CLOSE'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_02_W_OPEN.png"></div>' |
| | | } |
| | | html += '<div class="info in" style="background-image: url(images/e3.png);">' + item.name +'</div>' |
| | | html += '</div></li>' |
| | | } else if (item.type == '04') { //环流风机 |
| | | html += '<li><div class="con myfancy huanliu" status="' + item.status + '" passCode="' + |
| | | item.passCode + '" serId="' + item.serId + '"name="' + item.name + |
| | | '" location="front">'; |
| | | html += '<div class="pic"><img src="images/d7.png"></div>' |
| | | html += '<div class="info out" style="background-image: url(images/e5.png);"> ' + item |
| | | .name + '</div>' |
| | | if(targetStatus == 'CLOSE'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_04_ClOSE.png"></div>' |
| | | }else if(targetStatus == 'OPEN'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_04_OPEN.gif"></div>' |
| | | } |
| | | html += '<div class="info out" style="background-image: url(images/e3.png);"> ' + item.name + '</div>' |
| | | html += '</div></li>' |
| | | } else if (item.type == '0B') { //通风口 |
| | | html += '<li><div class="con myfancy chuangkou" status="' + item.status + |
| | | '" passCode="' + |
| | | item.passCode + '" serId="' + item.serId + '"name="' + item.name + |
| | | '" passCode="' +item.passCode + '" serId="' + item.serId + '"name="' + item.name + |
| | | '" location="front" type="0B">'; |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_0B_OPEN.png"></div>' |
| | | html += '<div class="info out" ' + item.name + '</div>' |
| | | if(targetStatus == 'CLOSE'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_0B_CLOSE.png"></div>' |
| | | }else if(targetStatus == 'OPEN'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_0B_OPEN.png"></div>' |
| | | } |
| | | html += '<div class="info in" style="background-image: url(images/e3.png);">'+ item.name +'</div>' |
| | | html += '</div></li>' |
| | | } else if (item.type == '0C') { //混流风机 |
| | | html += '<li><div class="con myfancy hunliu" status="' + item.status + '" passCode="' + |
| | | item.passCode + '" serId="' + item.serId + '"name="' + item.name + |
| | | '" location="front">'; |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_01_OPEN.png"></div>' |
| | | html += '<div class="info full" style="background-image: url(images/e6.png);">' + item |
| | | .name + '</div>' |
| | | item.passCode + '" serId="' + item.serId + '"name="' + item.name +'" location="front">'; |
| | | if(targetStatus == 'W_CLOSE'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_0C_w_CLOSE.png"></div>' |
| | | }else if(targetStatus == 'F_OPEN_F'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_0C_F_OPEN_F.gif"></div>' |
| | | }else if(targetStatus == 'F_OPEN'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_0C_F_OPEN.gif"></div>' |
| | | }else if(targetStatus == 'W_OPEN'){ |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_0C_W_OPEN.png"></div>' |
| | | } |
| | | html += '<div class="info out" style="background-image: url(images/e3.png);"> ' + item.name + '</div>' |
| | | html += '</div></li>' |
| | | } else if (item.type == '0D') { //加压风机 |
| | | html += '<li><div class="con myfancy jiaya" status="' + item.status + '" passCode="' + |
| | | item.passCode + '" serId="' + item.serId + '"name="' + item.name + |
| | | '" location="front">'; |
| | | html += '<div class="pic pic1"><img src="images/d9.png"></div>' |
| | | html += '<div class="info full" style="background-image: url(images/e7.png);">' + item |
| | | .name + '</div>' |
| | | html += '</div></li>' |
| | | } |
| | | }) |
| | | html += '</ul></div>' |
| | | } else if (backList && backList.length > 0) { //仓库反面 |
| | | html += '<div class="m-tf"><div class="g-tittf1">仓库反面</div><ul class="ul-listmana1 ullisttf1">'; |
| | | $.each(backList, function(index, item) { |
| | | if (item.type == '01') { //风窗 |
| | | html += '<li><div class="con myfancy chuangkou" status="' + item.status + |
| | | '" passCode="' + |
| | | item.passCode + '" serId="' + item.serId + '"name="' + item.name + |
| | | '" location="back" type="01">'; |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_01_OPEN.png"></div>' |
| | | html += '<div class="info in" style="background-image: url(images/e3.png);">' + item |
| | | .name + |
| | | '</div>' |
| | | html += '</div></li>' |
| | | } else if (item.type == '02') { //轴流风机 |
| | | html += '<li><div class="con myfancy zhouliu" status="' + item.status + '" passCode="' + |
| | | item.passCode + '" serId="' + item.serId + '"name="' + item.name + |
| | | '" location="back">'; |
| | | html += '<div class="pic"><img src="images/d8.png"></div>' |
| | | html += '<div class="info in" style="background-image: url(images/e4.png);">' + item |
| | | .name + |
| | | '</div>' |
| | | html += '</div></li>' |
| | | } else if (item.type == '04') { //环流风机 |
| | | html += '<li><div class="con myfancy huanliu" status="' + item.status + '" passCode="' + |
| | | item.passCode + '" serId="' + item.serId + '"name="' + item.name + |
| | | '" location="back">'; |
| | | html += '<div class="pic"><img src="images/d7.png"></div>' |
| | | html += '<div class="info out" style="background-image: url(images/e5.png);"> ' + item |
| | | .name + '</div>' |
| | | html += '</div></li>' |
| | | } else if (item.type == '0B') { //通风口 |
| | | html += '<li><div class="con myfancy chuangkou" status="' + item.status + |
| | | '" passCode="' + |
| | | item.passCode + '" serId="' + item.serId + '"name="' + item.name + |
| | | '" location="back" type="0B">'; |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_0B_OPEN.png"></div>' |
| | | html += '<div class="info out" ' + item.name + '</div>' |
| | | html += '</div></li>' |
| | | } else if (item.type == '0C') { //混流风机 |
| | | html += '<li><div class="con myfancy hunliu" status="' + item.status + '" passCode="' + |
| | | item.passCode + '" serId="' + item.serId + '"name="' + item.name + |
| | | '" location="back">'; |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_01_OPEN.png"></div>' |
| | | html += '<div class="info full" style="background-image: url(images/e6.png);">' + item |
| | | .name + '</div>' |
| | | html += '</div></li>' |
| | | } else if (item.type == '0D') { //加压风机 |
| | | html += '<li><div class="con myfancy jiaya" status="' + item.status + '" passCode="' + |
| | | item.passCode + '" serId="' + item.serId + '"name="' + item.name + |
| | | '" location="back">'; |
| | | html += '<div class="pic pic1"><img src="images/d9.png"></div>' |
| | | html += '<div class="info full" style="background-image: url(images/e7.png);">' + item |
| | | .name + '</div>' |
| | | html += '</div></li>' |
| | | } |
| | | }) |
| | | html += '</ul></div>' |
| | | } else if (leftList && leftList.length > 0) { //仓库左侧面 |
| | | html += '<div class="m-tf"><div class="g-tittf1">仓库左侧面</div><ul class="ul-listmana1 ullisttf1">'; |
| | | $.each(leftList, function(index, item) { |
| | | if (item.type == '01') { //风窗 |
| | | html += '<li><div class="con myfancy chuangkou" status="' + item.status + |
| | | '" passCode="' + |
| | | item.passCode + '" serId="' + item.serId + '"name="' + item.name + |
| | | '" location="left" type="01">'; |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_01_OPEN.png"></div>' |
| | | html += '<div class="info in" style="background-image: url(images/e3.png);">' + item |
| | | .name + |
| | | '</div>' |
| | | html += '</div></li>' |
| | | } else if (item.type == '02') { //轴流风机 |
| | | html += '<li><div class="con myfancy zhouliu" status="' + item.status + '" passCode="' + |
| | | item.passCode + '" serId="' + item.serId + '"name="' + item.name + |
| | | '" location="left">'; |
| | | html += '<div class="pic"><img src="images/d8.png"></div>' |
| | | html += '<div class="info in" style="background-image: url(images/e4.png);">' + item |
| | | .name + |
| | | '</div>' |
| | | html += '</div></li>' |
| | | } else if (item.type == '04') { //环流风机 |
| | | html += '<li><div class="con myfancy huanliu" status="' + item.status + '" passCode="' + |
| | | item.passCode + '" serId="' + item.serId + '"name="' + item.name + |
| | | '" location="left">'; |
| | | html += '<div class="pic"><img src="images/d7.png"></div>' |
| | | html += '<div class="info out" style="background-image: url(images/e5.png);"> ' + item |
| | | .name + '</div>' |
| | | html += '</div></li>' |
| | | } else if (item.type == '0B') { //通风口 |
| | | html += '<li><div class="con myfancy chuangkou" status="' + item.status + |
| | | '" passCode="' + |
| | | item.passCode + '" serId="' + item.serId + '"name="' + item.name + |
| | | '" location="left" type="0B">'; |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_0B_OPEN.png"></div>' |
| | | html += '<div class="info out" ' + item.name + '</div>' |
| | | html += '</div></li>' |
| | | } else if (item.type == '0C') { //混流风机 |
| | | html += '<li><div class="con myfancy hunliu" status="' + item.status + '" passCode="' + |
| | | item.passCode + '" serId="' + item.serId + '"name="' + item.name + |
| | | '" location="left">'; |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_01_OPEN.png"></div>' |
| | | html += '<div class="info full" style="background-image: url(images/e6.png);">' + item |
| | | .name + '</div>' |
| | | html += '</div></li>' |
| | | } else if (item.type == '0D') { //加压风机 |
| | | html += '<li><div class="con myfancy jiaya" status="' + item.status + '" passCode="' + |
| | | item.passCode + '" serId="' + item.serId + '"name="' + item.name + |
| | | '" location="left">'; |
| | | html += '<div class="pic pic1"><img src="images/d9.png"></div>' |
| | | html += '<div class="info full" style="background-image: url(images/e7.png);">' + item |
| | | .name + '</div>' |
| | | html += '</div></li>' |
| | | } |
| | | }) |
| | | html += '</ul></div>' |
| | | } else if (rightList && rightList.length > 0) { //仓库右侧面 |
| | | html += '<div class="m-tf"><div class="g-tittf1">仓库右侧面</div><ul class="ul-listmana1 ullisttf1">'; |
| | | $.each(rightList, function(index, item) { |
| | | if (item.type == '01') { //风窗 |
| | | html += '<li><div class="con myfancy chuangkou" status="' + item.status + |
| | | '" passCode="' + |
| | | item.passCode + '" serId="' + item.serId + '"name="' + item.name + |
| | | '" location="right" type="01">'; |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_01_OPEN.png"></div>' |
| | | html += '<div class="info in" style="background-image: url(images/e3.png);">' + item |
| | | .name + |
| | | '</div>' |
| | | html += '</div></li>' |
| | | } else if (item.type == '02') { //轴流风机 |
| | | html += '<li><div class="con myfancy zhouliu" status="' + item.status + '" passCode="' + |
| | | item.passCode + '" serId="' + item.serId + '"name="' + item.name + |
| | | '" location="right">'; |
| | | html += '<div class="pic"><img src="images/d8.png"></div>' |
| | | html += '<div class="info in" style="background-image: url(images/e4.png);">' + item |
| | | .name + |
| | | '</div>' |
| | | html += '</div></li>' |
| | | } else if (item.type == '04') { //环流风机 |
| | | html += '<li><div class="con myfancy huanliu" status="' + item.status + '" passCode="' + |
| | | item.passCode + '" serId="' + item.serId + '"name="' + item.name + |
| | | '" location="right">'; |
| | | html += '<div class="pic"><img src="images/d7.png"></div>' |
| | | html += '<div class="info out" style="background-image: url(images/e5.png);"> ' + item |
| | | .name + '</div>' |
| | | html += '</div></li>' |
| | | } else if (item.type == '0B') { //通风口 |
| | | html += '<li><div class="con myfancy chuangkou" status="' + item.status + |
| | | '" passCode="' + |
| | | item.passCode + '" serId="' + item.serId + '"name="' + item.name + |
| | | '" location="right" type="0B">'; |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_0B_OPEN.png"></div>' |
| | | html += '<div class="info out" ' + item.name + '</div>' |
| | | html += '</div></li>' |
| | | } else if (item.type == '0C') { //混流风机 |
| | | html += '<li><div class="con myfancy hunliu" status="' + item.status + '" passCode="' + |
| | | item.passCode + '" serId="' + item.serId + '"name="' + item.name + |
| | | '" location="right">'; |
| | | html += '<div class="pic"><img src="images/device-status/STATUS_01_OPEN.png"></div>' |
| | | html += '<div class="info full" style="background-image: url(images/e6.png);">' + item |
| | | .name + '</div>' |
| | | html += '</div></li>' |
| | | } else if (item.type == '0D') { //加压风机 |
| | | html += '<li><div class="con myfancy jiaya" status="' + item.status + '" passCode="' + |
| | | item.passCode + '" serId="' + item.serId + '"name="' + item.name + |
| | | '" location="right">'; |
| | | html += '<div class="pic pic1"><img src="images/d9.png"></div>' |
| | | html += '<div class="info full" style="background-image: url(images/e7.png);">' + item |
| | | .name + '</div>' |
| | | item.passCode + '" serId="' + item.serId + '"name="' + item.name +'" location="front">'; |
| | | if(targetStatus == 'CLOSE'){ |
| | | html += '<div class="pic pic1"><img src="images/device-status/STATUS_0D_CLOSE.png"></div>' |
| | | }else if(targetStatus == 'OPEN'){ |
| | | html += '<div class="pic pic1"><img src="images/device-status/STATUS_0D_OPEN.png"></div>' |
| | | } |
| | | html += '<div class="info out" style="background-image: url(images/e3.png);"> ' + item.name + '</div>' |
| | | html += '</div></li>' |
| | | } |
| | | }) |
| | |
| | | } |
| | | |
| | | } else { |
| | | html += |
| | | '<div class="m-tf"><div class="g-tittf1" style="text-align: center;font-size: 20px;color:#dd524d">暂无数据</div></div>'; |
| | | } |
| | | html += |
| | | '<div class="m-tf"><div class="g-tittf1" style="text-align: center;font-size: 20px;color:#dd524d">暂无数据</div></div>'; |
| | | } |
| | | } else { |
| | | html += |
| | | '<div class="m-tf"><div class="g-tittf1" style="text-align: center;font-size: 20px;color:#dd524d">暂无数据</div></div>'; |
| | |
| | | |
| | | //设备操作请求 |
| | | function toControlDevice() { |
| | | console.log(JSON.stringify(data)) |
| | | mui.ajax(url, { |
| | | type: "POST", |
| | | dataType: "json", |
| | |
| | | targetStatus = 'CLOSE'; |
| | | batchTag = true; |
| | | } |
| | | console.log(batchTag); |
| | | |
| | | //仓库前面 |
| | | if (deviceDetail.location == "front") { |
| | | //参数清空 |
| | | data.data = []; |
| | | if (batchTag) { //批量操作 |
| | | $.each(frontList, function(index, item) { |
| | | if (deviceDetail.type == item.type) { |
| | | data.data.push({ |
| | | "deptId": deptId, |
| | | "depotId": depotId, |
| | | "passCode": item.passCode, |
| | | "serId": item.serId, |
| | | "type": item.type, |
| | | "targetStatus": targetStatus |
| | | }) |
| | | } |
| | | }) |
| | | } else { //单设备操作 |
| | | data.data.push({ |
| | | "deptId": deptId, |
| | | "depotId": depotId, |
| | | "passCode": deviceDetail.passCode, |
| | | "serId": deviceDetail.serId, |
| | | "type": deviceDetail.type, |
| | | "targetStatus": targetStatus |
| | | }) |
| | | } |
| | | } else if (deviceDetail.location == "back") { |
| | | //参数清空 |
| | | data.data = []; |
| | | if (batchTag) { //批量操作 |
| | | $.each(backList, function(index, item) { |
| | | if (deviceDetail.type == item.type) { |
| | | data.data.push({ |
| | | "deptId": deptId, |
| | | "depotId": depotId, |
| | | "passCode": item.passCode, |
| | | "serId": item.serId, |
| | | "type": item.type, |
| | | "targetStatus": targetStatus |
| | | }) |
| | | } |
| | | }) |
| | | } else { //单设备操作 |
| | | data.data.push({ |
| | | "deptId": deptId, |
| | | "depotId": depotId, |
| | | "passCode": deviceDetail.passCode, |
| | | "serId": deviceDetail.serId, |
| | | "type": deviceDetail.type, |
| | | "targetStatus": targetStatus |
| | | }) |
| | | } |
| | | } else if (deviceDetail.location == "left") { |
| | | //参数清空 |
| | | data.data = []; |
| | | if (batchTag) { //批量操作 |
| | | $.each(leftList, function(index, item) { |
| | | if (deviceDetail.type == item.type) { |
| | | data.data.push({ |
| | | "deptId": deptId, |
| | | "depotId": depotId, |
| | | "passCode": item.passCode, |
| | | "serId": item.serId, |
| | | "type": item.type, |
| | | "targetStatus": targetStatus |
| | | }) |
| | | } |
| | | }) |
| | | } else { //单设备操作 |
| | | data.data.push({ |
| | | "deptId": deptId, |
| | | "depotId": depotId, |
| | | "passCode": deviceDetail.passCode, |
| | | "serId": deviceDetail.serId, |
| | | "type": deviceDetail.type, |
| | | "targetStatus": targetStatus |
| | | }) |
| | | } |
| | | } else if (deviceDetail.location == "right") { |
| | | //参数清空 |
| | | data.data = []; |
| | | if (batchTag) { //批量操作 |
| | | $.each(rightList, function(index, item) { |
| | | if (deviceDetail.type == item.type) { |
| | | data.data.push({ |
| | | "deptId": deptId, |
| | | "depotId": depotId, |
| | | "passCode": item.passCode, |
| | | "serId": item.serId, |
| | | "type": item.type, |
| | | "targetStatus": targetStatus |
| | | }) |
| | | } |
| | | }) |
| | | } else { //单设备操作 |
| | | data.data.push({ |
| | | "deptId": deptId, |
| | | "depotId": depotId, |
| | | "passCode": deviceDetail.passCode, |
| | | "serId": deviceDetail.serId, |
| | | "type": deviceDetail.type, |
| | | "targetStatus": targetStatus |
| | | }) |
| | | } |
| | | } |
| | | |
| | | // //仓库前面 |
| | | data.data.deptId=deptId; |
| | | data.data.depotId=depotId; |
| | | data.data.passCode=deviceDetail.passCode; |
| | | data.data.serId=deviceDetail.serId; |
| | | data.data.targetStatus=targetStatus; |
| | | data.data.type=deviceDetail.type; |
| | | data.data.batchTag=batchTag; |
| | | console.log(JSON.stringify(data.data)) |
| | | //发送操作请求 |
| | | toControlDevice(); |
| | | |