From 7de2d9a4a7b2f97dcbda3cf9a78643854c94318f Mon Sep 17 00:00:00 2001
From: zrg <z1873@LAPTOP-EAVL132E>
Date: 星期四, 25 十二月 2025 10:03:32 +0800
Subject: [PATCH] Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev

---
 utils/common.js |   42 +++++++++++++++++++++++++++++++++++++-----
 1 files changed, 37 insertions(+), 5 deletions(-)

diff --git a/utils/common.js b/utils/common.js
index 7882b3b..69f9d1d 100644
--- a/utils/common.js
+++ b/utils/common.js
@@ -340,7 +340,7 @@
             })
         })
     }
-
+	//娌℃湁娣诲姞閿佺殑寮傛鏌ヨ
     async doRequest2Async({
         url,
         data,
@@ -395,10 +395,7 @@
             console.log('鎾斁鏆傚仠锛岄攢姣�');
             innerAudioContext.destroy();
         });
-		innerAudioContext.onStop(function() {
-		    console.log('鎾斁鏆傚仠锛岄攢姣�');
-		    innerAudioContext.destroy();
-		})
+		
     }
     // playSound(e) {
     //     // 鍏ㄥ眬缁存姢涓�涓煶棰戝疄渚嬶紝闃叉缂撳瓨婧㈠嚭
@@ -462,6 +459,41 @@
             return handler(key, match);
         });
     }
+    
+    fieldListFilterRole({FieldList, ExcludeKeys = [] ,RoleList = null}) {
+        if(!RoleList) {
+            RoleList = [
+                /^[a-zA-Z]+$/,
+                /id$/i
+            ]
+        }
+        if(!Array.isArray(RoleList)){
+            return {
+                status: false,
+                data: null,
+                Message: "杩囨护瀛楁鍒楄〃澶辫触锛岃鍒欏繀椤绘槸鏁扮粍銆�"
+            }
+        }
+        
+        let FieldListCache = Array(...FieldList)
+        
+        RoleList.forEach(role => {
+            FieldListCache = FieldListCache.filter(elem => !role.test(elem.ColmCols))
+        })
+        
+        FieldListCache = FieldListCache.filter(elem => !ExcludeKeys.includes(elem))
+        return {
+            status: true,
+            data: FieldListCache,
+            Message: ""
+        }
+    }
+    
+    emptyValueFilter(item, fieldList){
+        return fieldList.filter(e => {
+            return item[e.ColmCols]
+        })
+    }
 }
 
 export const CommonUtils = new commonUtils()
\ No newline at end of file

--
Gitblit v1.9.1