From f02cf09eb0c6933dd5ccc4dac6c6c09c3b5f3d3c Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期一, 25 八月 2025 15:17:03 +0800 Subject: [PATCH] 1、根据最新设计方案调整设备管理模块点击弹窗样式 2、mdc公司级首页设备管理模块与点击功能联调 --- src/components/table2excel/table2excel.js | 16 ++++++++++++---- 1 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/components/table2excel/table2excel.js b/src/components/table2excel/table2excel.js index 4891d2b..c377223 100644 --- a/src/components/table2excel/table2excel.js +++ b/src/components/table2excel/table2excel.js @@ -82,6 +82,8 @@ compStyle = getComputedStyle(q); additionalStyles += (compStyle && compStyle.backgroundColor ? "background-color: " + compStyle.backgroundColor + ";" : ""); additionalStyles += (compStyle && compStyle.color ? "color: " + compStyle.color + ";" : ""); + additionalStyles += (compStyle && compStyle.height ? "height: " + compStyle.height + ";" : ""); + additionalStyles += (compStyle && compStyle.wordWrap ? "word-wrap: " + compStyle.wordWrap + ";" : ""); } var rc = { @@ -93,15 +95,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