From 0c1a33a33b45fc3265cb7fef20beb48407cd6c98 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 24 八月 2023 14:54:06 +0800
Subject: [PATCH] 2023-08-24

---
 src/views/systemproc/proc/index.jsx |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/src/views/systemproc/proc/index.jsx b/src/views/systemproc/proc/index.jsx
index cad4d02..62ce63a 100644
--- a/src/views/systemproc/proc/index.jsx
+++ b/src/views/systemproc/proc/index.jsx
@@ -13,7 +13,7 @@
 
 class ProcControl extends Component {
   state = {
-    procName: '',
+    procName: this.props.func || '',
     content: '',
     loading: false,
     visible: false,
@@ -24,9 +24,12 @@
   }
 
   componentDidMount () {
+    sessionStorage.setItem('User_Name', sessionStorage.getItem('CloudUserName'))
+    sessionStorage.setItem('Full_Name', sessionStorage.getItem('CloudFullName'))
+    
     if (sessionStorage.getItem('permFuncField')) {
       this.setState({permFuncs: JSON.parse(sessionStorage.getItem('permFuncField'))})
-    } else {
+    } else if (sessionStorage.getItem('UserID')) {
       Api.getCloudConfig({func: 'sPC_Get_Roles_sModular'}).then(res => {
         if (res.status) {
           let _permFuncs = []
@@ -53,6 +56,12 @@
           })
         }
       })
+    }
+
+    if (this.props.func && sessionStorage.getItem('UserID')) {
+      setTimeout(() => {
+        this.search(this.props.func)
+      }, 500)
     }
   }
 
@@ -108,7 +117,8 @@
         {key: 'alter', reg: /(^|\s)alter\s/ig},
         {key: 'object', reg: /(^|\s)object(\s|\()/ig},
         {key: 'kill', reg: /(^|\s)kill\s/ig},
-        {key: '--', reg: /--/ig}
+        {key: '--', reg: /--/ig},
+        {key: ',,', reg: /,,/ig}
       ]
 
       let error = ''
@@ -158,7 +168,6 @@
     dropParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
     dropParam.secretkey = Utils.encrypt(dropParam.LText, dropParam.timestamp)
     dropParam.open_key = Utils.encryptOpenKey(dropParam.secretkey, dropParam.timestamp)
-
 
     let createParam = {
       func: 'sPC_TableData_InUpDe',

--
Gitblit v1.8.0