From 771ba48e26496c1de6735cc5cae93f02ff8d7ad1 Mon Sep 17 00:00:00 2001
From: zhangherong <571457620@qq.com>
Date: 星期二, 04 三月 2025 17:22:14 +0800
Subject: [PATCH] art: 所有设备 台账 三保工单 根据设备id查询三保工单,并过滤掉已完成和已取消的三保工单

---
 src/components/table2excel/table2excel.js |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/src/components/table2excel/table2excel.js b/src/components/table2excel/table2excel.js
index 0767353..9fdec8d 100644
--- a/src/components/table2excel/table2excel.js
+++ b/src/components/table2excel/table2excel.js
@@ -3,7 +3,6 @@
 import jQuery from 'jquery'
 (function ( $, window, document, undefined ) {
   var pluginName = "table2excel",
-
     defaults = {
       exclude: ".noExl",
       name: "Table2Excel",
@@ -94,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>";
             }
@@ -253,7 +258,6 @@
         $.data( e, "plugin_" + pluginName, new Plugin( this, options ) );
       }
     });
-
     // chain jQuery functions
     return e;
   };

--
Gitblit v1.9.3