From 11d54c5c4cabebcf8a4395cd6d5d8b602abdbc1b Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期二, 20 一月 2026 17:07:06 +0800
Subject: [PATCH] Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev

---
 utils/common.js |   34 ++++++++++++++++++++++++++--------
 1 files changed, 26 insertions(+), 8 deletions(-)

diff --git a/utils/common.js b/utils/common.js
index 90a457e..6905022 100644
--- a/utils/common.js
+++ b/utils/common.js
@@ -464,7 +464,7 @@
         if(!RoleList) {
             RoleList = [
                 /^[a-zA-Z]+$/,
-                /\bid$/i
+                /id$/i
             ]
         }
         if(!Array.isArray(RoleList)){
@@ -475,21 +475,39 @@
             }
         }
         
-        let FieldListCache = Array(FieldList)
+        let FieldListCache = Array(...FieldList)
         
-        let list1 = FieldListCache.filter(elem => role[0].test(elem.ColmCols))
-        console.log('list1: ',list1);
-        // RoleList.forEach(role => {
-        //     console.log(FieldListCache.filter(field => !role.test(field.ColmCols)))
-        //     FieldListCache = FieldListCache.filter(field => !role.test(field.ColmCols))
-        // })
+        RoleList.forEach(role => {
+            FieldListCache = FieldListCache.filter(elem => !role.test(elem.ColmCols))
+        })
         
+        FieldListCache = FieldListCache.filter(elem => !ExcludeKeys.includes(elem.ColmCols))
         return {
             status: true,
             data: FieldListCache,
             Message: ""
         }
     }
+    
+    emptyValueFilter(item, fieldList){
+        return fieldList.filter(e => {
+            return item[e.ColmCols]
+        })
+    }
+    
+    httpFormatWs(httpUrl=this.serverUrl) {
+        if(httpUrl.indexOf("http://") === 0){
+            httpUrl = httpUrl.replace("http://", "")
+            httpUrl = "ws://" + httpUrl.split(":")[0]+":8089/ws"
+        }else if(httpUrl.indexOf("https://") === 0) {
+            httpUrl = httpUrl.replace("https://", "")
+            httpUrl = "wss://" + httpUrl.split(":")[0]+":8089/ws"
+        }else{
+            // 鎻愮ず浼犲叆杩炴帴閿欒
+        }
+        
+        return httpUrl
+    }
 }
 
 export const CommonUtils = new commonUtils()
\ No newline at end of file

--
Gitblit v1.9.1