From e8c9c0ca7e6c307243c158fd529c59c5a3717f2f Mon Sep 17 00:00:00 2001 From: wuwei <wuquan-1230@q63.com> Date: 星期五, 13 六月 2025 10:05:06 +0800 Subject: [PATCH] 1.同步最新的文件 --- local/www/detail-ups.html | 139 +--------------------------------------------- 1 files changed, 4 insertions(+), 135 deletions(-) diff --git a/local/www/detail-ups.html b/local/www/detail-ups.html index 0a853b2..205581f 100644 --- a/local/www/detail-ups.html +++ b/local/www/detail-ups.html @@ -203,7 +203,7 @@ } 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>"; //娓叉煋鍒楄〃 @@ -284,7 +284,7 @@ } 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>"; @@ -357,139 +357,8 @@ } } - 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 = "姝e父" - // } - // 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"?"姝e父":"鍛婅"; - // } - // } - // - // 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 = "姝e父" - // } - // 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 ? "姝e父" : "鍛婅"; - // 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){ -- Gitblit v1.9.3