From 45c4742c0cf31b0217874944127491990bf1a097 Mon Sep 17 00:00:00 2001
From: lgq <1015864684@qq.com>
Date: 星期六, 19 七月 2025 11:05:17 +0800
Subject: [PATCH] Merge branch 'master' of http://124.71.187.17:8299/r/~lgq/IGD5300-package
---
local/www/js/page/record-his.js | 75 +++++++++++++++++++++++++------------
1 files changed, 51 insertions(+), 24 deletions(-)
diff --git a/local/www/js/page/record-his.js b/local/www/js/page/record-his.js
index 59066d1..3f2abd9 100644
--- a/local/www/js/page/record-his.js
+++ b/local/www/js/page/record-his.js
@@ -162,7 +162,7 @@
//娓叉煋鍘嗗彶鏁版嵁鍒楄〃
function renderRecordInfo(data) {
-
+ var num = getWHNum();
var div_body_x = false;
var thead = "";
thead += "<tr><th style='width: 100px'>ID</th>";
@@ -172,22 +172,6 @@
var theadData = [];
if (data != null && data.length > 0) {
- // $.each(data, function (index, item) {
- // html += "<tr><td>" + item.id + "</td>";
- // html += "<td>" + item.name + "</td>";
- // html += "<td>" + timeStr(item.time) + "</td>";
- // var tempData = eval(item.value);
- // var temp = '';
- // for (var i = 0; i < tempData.length; i++) {
- // if (i != 0) {
- // temp += "锛�";
- // }
- // temp += tempData[i].name + "=" + tempData[i].value;
- // }
- // html += "</tr>";
- // });
-
-
//鑾峰彇琛ㄥご
$.each(data, function (index, item) {
var tempData = eval(item.value);
@@ -197,12 +181,12 @@
});
// console.log(theadData);
for(var i=0;i<theadData.length;i++){
- if(i >= 5){
+ if(i >= num){
break;
}
thead += "<th style='width: 150px'>"+ theadData[i].name +"</th>";
}
- thead += "<th style='width: 150px'>璇︽儏</th>";
+ thead += "<th style=''>璇︽儏</th>";
thead += "</tr>";
$.each(data, function (index, item) {
@@ -211,7 +195,7 @@
tbody += "<td>" + timeStr(item.time) + "</td>";
var tempData = eval(item.value);
for (var i = 0; i < theadData.length; i++) {
- if(i >= 5){
+ if(i >= num){
break;
}
if(i < tempData.length){
@@ -226,10 +210,10 @@
dataMap[key] = tempData;
});
} else {
- thead += "<th style='width: 150px'>鏁版嵁</th></tr>";
+ thead += "<th style=''>鏁版嵁</th></tr>";
tbody += '<tr><td colspan="4">鏆傛湭鏌ュ埌鏁版嵁</td></tr>';
}
- $("#div-body").attr("style","height: 615px;");
+ // $("#div-body").attr("style","height: 615px;");
$("#thead").html(thead);
$("#recordList").html(tbody);
}
@@ -261,7 +245,6 @@
//瀵煎嚭Excel鐐瑰嚮浜嬩欢
function generateClick(){
- // var tableId = "record-his-list";
var request = {};
request.id = $("#deviceId").val();
if(!request.id)
@@ -365,6 +348,7 @@
}
function getTable(data) {
+
var thead = "";
thead += "<tr><th style='width: 100px'>ID</th>";
thead += "<th style='width: 180px'>璁惧鍚嶇О</th>";
@@ -445,11 +429,14 @@
});
$("#tbody").html(html);
+
+ var paramWH = getWH("detail");
layer.open({
skin: 'mypop',
type: 1,
title: false,
- area: ['40%', '65%'],
+ // area: ['40%', '65%'],
+ area: [paramWH.w, paramWH.h],
closeBtn: 0,
shade: 0,
scrollbar: false,
@@ -464,3 +451,43 @@
+
+function getWH(tag) {
+ var res = {
+ w:"50%",
+ h:"64%"
+ };
+ if(screen.width==1920 && screen.height==1080){
+ res = {w:"80%",h:"64%"};
+ if(tag == "batchHandle"){
+ res = {w:"80%",h:"64%"};
+ }
+ }else if(screen.width==1280 && screen.height==1024){
+ res = {w:"80%",h:"64%"};
+ if(tag == "detail"){
+ res = {w:"80%",h:"95%"};
+ }
+ if(tag == "batchHandle"){
+ res = {w:"80%",h:"64%"};
+ }
+ }else if(screen.width==1280 && screen.height==800){
+ res = {w:"80%",h:"64%"};
+ if(tag == "detail"){
+ res = {w:"80%",h:"95%"};
+ }
+ if(tag == "batchHandle"){
+ res = {w:"80%",h:"64%"};
+ }
+ }
+ return res;
+}
+
+function getWHNum() {
+ var res = 5;
+ if(screen.width==1920){
+ res = 5;
+ }else if(screen.width==1280){
+ res = 1;
+ }
+ return res;
+}
--
Gitblit v1.9.3