From b1fc0a89ce16dd14a6dff98c228a308e85a53828 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 18 十月 2024 16:33:54 +0800
Subject: [PATCH] Merge branch 'positec' into dms

---
 src/components/querylog/index.jsx |   65 ++++++++++++++------------------
 1 files changed, 28 insertions(+), 37 deletions(-)

diff --git a/src/components/querylog/index.jsx b/src/components/querylog/index.jsx
index 5dedf3b..3a3545e 100644
--- a/src/components/querylog/index.jsx
+++ b/src/components/querylog/index.jsx
@@ -48,51 +48,42 @@
     })
 
     let userid = sessionStorage.getItem('UserID') || ''
-    let LText = [...logMap.values()].map(item => `select '${item.menuId}','${item.times}','${item.name}','${window.GLOB.appkey}','${userid}'`)
+    let LText = [...logMap.values()].map(item => `select '${item.menuId}','${item.times}','${item.name || ''}','${window.GLOB.appkey}','${userid}'`)
 
-    Api.genericInterface({func: 's_get_local_users_operation_log'}).then(res => {
-      if (!res.status) {
+    if (LText.length === 0) {
+      setTimeout(() => {
+        this.sendLog()
+      }, 600000)
+      return
+    }
+
+    // {func: 's_get_local_users_operation_log'} 鏈湴鎺ュ彛 杩斿洖 long_param 浼犲叆 sso 鐨� s_get_users_operation_log
+
+    let param = {
+      func: 's_get_users_operation_log',
+      exec_type: window.GLOB.execType || 'y',
+      LText: LText.join(' union all '),
+      long_param: ''
+    }
+
+    param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+    param.secretkey = Utils.encrypt('', param.timestamp)
+    param.LText = Utils.formatOptions(param.LText, param.exec_type)
+
+    Api.getSystemConfig(param).then(result => {
+      if (!result.status) {
         notification.warning({
           top: 92,
-          message: res.message,
+          message: result.message,
           duration: 3
         })
         return
       }
 
-      if (LText.length === 0 && !res.long_param) {
-        setTimeout(() => {
-          this.sendLog()
-        }, 600000)
-        return
-      }
-
-      let param = {
-        func: 's_get_users_operation_log',
-        exec_type: window.GLOB.execType || 'y',
-        LText: LText.join(' union all '),
-        long_param: res.long_param
-      }
-
-      param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
-      param.secretkey = Utils.encrypt('', param.timestamp)
-      param.LText = Utils.formatOptions(param.LText, param.exec_type)
-
-      Api.getSystemConfig(param).then(result => {
-        if (!result.status) {
-          notification.warning({
-            top: 92,
-            message: result.message,
-            duration: 3
-          })
-          return
-        }
-
-        setTimeout(() => {
-          this.sendLog()
-        }, 600000)
-        this.setState({logs: []})
-      })
+      setTimeout(() => {
+        this.sendLog()
+      }, 600000)
+      this.setState({logs: []})
     })
   }
 

--
Gitblit v1.8.0