| | |
| | | }
|
| | | html += "<tr><td>"+cur.name+"</td><td>"+str+"</td><td>"+time+"</td></tr>";
|
| | | }else{
|
| | | html += "<tr><td>"+cur.name+"</td><td>"+renderValue(device.id,device.type,cur.passcode,cur.value)+"</td><td>"+time+"</td></tr>";
|
| | | html += "<tr><td>"+cur.name+"</td><td>"+renderValue(device.type,cur)+"</td><td>"+time+"</td></tr>";
|
| | |
|
| | |
|
| | | //渲染列表
|
| | |
| | | }
|
| | | html += "<tr><td>"+cur.name+"</td><td>"+str+"</td><td>"+time+"</td></tr>";
|
| | | }else{
|
| | | html += "<tr><td>"+cur.name+"</td><td>"+renderValue(device.id,device.type,cur.passcode,cur.value)+"</td><td>"+time+"</td></tr>";
|
| | | html += "<tr><td>"+cur.name+"</td><td>"+renderValue(device.type,cur)+"</td><td>"+time+"</td></tr>";
|
| | |
|
| | | //渲染列表
|
| | | // html += "<tr><td>"+cur.name+"</td><td>"+(cur.value?cur.value:"")+"</td><td>"+time+"</td></tr>";
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | function renderValue(id,type,code,value) {
|
| | | var res = value;
|
| | |
|
| | | // if(type == "1001"){
|
| | | // if(code == 3 || code == 5){
|
| | | // res = value+"V";
|
| | | // }
|
| | | // else if(code == 4 || code == 6){
|
| | | // res = value+"A";
|
| | | // }
|
| | | // else if(code == 7){
|
| | | // res = value+"Hz";
|
| | | // }
|
| | | // else if(code == 8){
|
| | | // res = value+"%";
|
| | | // }
|
| | | // else if(code == 9){
|
| | | // res = value+"℃";
|
| | | // }
|
| | | // else if(code == 10){
|
| | | // if(value == 0){
|
| | | // res = "市电供电"
|
| | | // }
|
| | | // if(value == 1){
|
| | | // res = "电池供电"
|
| | | // }
|
| | | // }
|
| | | // else if(code == 11){
|
| | | // if(value == 0){
|
| | | // res = "正常"
|
| | | // }
|
| | | // if(value == 1){
|
| | | // res = "旁路"
|
| | | // }
|
| | | // if(value == 2){
|
| | | // res = "电池供电"
|
| | | // }
|
| | | // }
|
| | | // else if(code == 12){
|
| | | // res = value+"V";
|
| | | // }
|
| | | // else if(code == 13){
|
| | | // res = value+"%";
|
| | | // }
|
| | | // else if(code == 14){
|
| | | // res = value+"min";
|
| | | // }
|
| | | // else if(code >= 15 && code < 999){
|
| | | // res = value == "0"?"正常":"告警";
|
| | | // }
|
| | | // }
|
| | | //
|
| | | // if(type == "1002"){
|
| | | // if(code >= 3 && code <= 5){
|
| | | // res = value+"V";
|
| | | // }
|
| | | // else if(code >= 6 && code <= 8){
|
| | | // res = value+"A";
|
| | | // }
|
| | | // else if(code >= 9 && code <= 11){
|
| | | // res = value+"V";
|
| | | // }
|
| | | // else if(code >= 12 && code <= 14){
|
| | | // res = value+"A";
|
| | | // }
|
| | | // else if(code == 15){
|
| | | // res = value+"Hz";
|
| | | // }
|
| | | // else if(code >= 16 && code <= 18){
|
| | | // res = value+"%";
|
| | | // }
|
| | | // else if(code == 19){
|
| | | // res = value+"℃";
|
| | | // }
|
| | | // else if(code == 20){
|
| | | // if(value == 0){
|
| | | // res = "市电供电"
|
| | | // }
|
| | | // if(value == 1){
|
| | | // res = "电池供电"
|
| | | // }
|
| | | // if(value == 2){
|
| | | // res = "不供电"
|
| | | // }
|
| | | // if(value == 3){
|
| | | // res = "联合供电"
|
| | | // }
|
| | | // if(value == 4){
|
| | | // res = "旁路供电"
|
| | | // }
|
| | | // }
|
| | | // else if(code == 21){
|
| | | // if(value == 0){
|
| | | // res = "正常"
|
| | | // }
|
| | | // if(value == 1){
|
| | | // res = "旁路"
|
| | | // }
|
| | | // if(value == 2){
|
| | | // res = "电池供电"
|
| | | // }
|
| | | // }
|
| | | // else if(code == 22){
|
| | | // res = value+"V";
|
| | | // }
|
| | | // else if(code == 23){
|
| | | // res = value+"%";
|
| | | // }
|
| | | // else if(code == 24){
|
| | | // res = value+"min";
|
| | | // }
|
| | | // else{
|
| | | // if(code >= 25 && code <= 998){
|
| | | // res = value == 0 ? "正常" : "告警";
|
| | | // if(value != 0 && value != 1){
|
| | | // res = value;
|
| | | // }
|
| | | //
|
| | | // // if(code >= 25 && code <= 27){
|
| | | // // res = value + "V";
|
| | | // // }
|
| | | // // if(code >= 28 && code <= 30){
|
| | | // // res = value + "KW";
|
| | | // // }
|
| | | // // if(code >= 31 && code <= 35){
|
| | | // // res = value + "Hz";
|
| | | // // }
|
| | | //
|
| | | // }
|
| | | //
|
| | | // }
|
| | | // }
|
| | |
|
| | | function renderValue(type,cur) {
|
| | | var res = cur.value;
|
| | |
|
| | | var str = "";
|
| | | if(cur.note && cur.note.length > 0){
|