From 8f4d079c073edd5d95118158fc60800473026073 Mon Sep 17 00:00:00 2001 From: zhuzhuanzhuan Date: 星期四, 09 五月 2024 14:51:31 +0800 Subject: [PATCH] 1、首页调整技术状态图表禁用显示颜色 2、首页设备级看板操作证信息增加操作工字段 3、全局设备组选择设备增加按照设备编号查询功能 --- src/components/table2excel/table2excel.js | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/components/table2excel/table2excel.js b/src/components/table2excel/table2excel.js index 4891d2b..9fdec8d 100644 --- a/src/components/table2excel/table2excel.js +++ b/src/components/table2excel/table2excel.js @@ -93,15 +93,21 @@ if( rc.flag.length > 0 ) { tempRows += "<td> </td>"; // exclude it!! } else { - tempRows += "<td"; + // 鍖归厤鏍煎紡涓�'yyyy-mm'鐨勬棩鏈熷瓧绗︿覆鏁版嵁锛岃嫢鏈夊叾浠栭渶姹傚悗鏈熷啀澧炲姞 + var regexPattern = /^\d{4}-\d{2}$/; + if($(q).html().match(regexPattern)){ + tempRows += "<td style=\"mso-number-format:'yyyy-mm';\""; + }else{ + tempRows += "<td"; + if(additionalStyles){ + tempRows += " style='" + additionalStyles + "'"; + } + } if( rc.rows > 0) { tempRows += " rowspan='" + rc.rows + "' "; } if( rc.cols > 0) { tempRows += " colspan='" + rc.cols + "' "; - } - if(additionalStyles){ - tempRows += " style='" + additionalStyles + "'"; } tempRows += ">" + $(q).html() + "</td>"; } -- Gitblit v1.9.3