From e543372cc70a19ff2630c79d8421c2c593e54e5f Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 02 六月 2021 17:15:21 +0800
Subject: [PATCH] 2021-06-02

---
 src/utils/utils-datamanage.js |   48 ++++++++++++++++++++++++------------------------
 1 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/src/utils/utils-datamanage.js b/src/utils/utils-datamanage.js
index f684846..b995699 100644
--- a/src/utils/utils-datamanage.js
+++ b/src/utils/utils-datamanage.js
@@ -108,6 +108,13 @@
       `
     }
 
+    _dataresource = _dataresource.replace(/@select\$|\$select@/ig, '')
+    _customScript = _customScript.replace(/@select\$|\$select@/ig, '')
+    _dataresource = _dataresource.replace(/\$sum@/ig, '/*')
+    _dataresource = _dataresource.replace(/@sum\$/ig, '*/')
+    _customScript = _customScript.replace(/\$sum@/ig, '/*')
+    _customScript = _customScript.replace(/@sum\$/ig, '*/')
+
     let regoptions = null
     if (setting.queryType === 'statistics' || _customScript) {
       let allSearch = Utils.getAllSearchOptions(search)
@@ -118,15 +125,6 @@
         }
       })
       regoptions.push({
-        reg: new RegExp('@login_city@', 'ig'),
-        value: `'${city}'`
-      }, {
-        reg: new RegExp('@userName@', 'ig'),
-        value: `'${userName}'`
-      }, {
-        reg: new RegExp('@fullName@', 'ig'),
-        value: `'${fullName}'`
-      }, {
         reg: new RegExp('@orderBy@', 'ig'),
         value: orderBy
       }, {
@@ -190,8 +188,8 @@
 
     // 娴嬭瘯绯荤粺鎵撳嵃鏌ヨ璇彞
     if ((options.sysType === 'local' && !window.GLOB.systemType) || window.debugger === true) {
-      _customScript &&  console.info(`${LText ? '' : '/*涓嶆墽琛岄粯璁ql*/\n'}${_customScript}`)
-      LText &&  console.info(LText)
+      _customScript &&  console.info(`${setting.$name ? `/*缁勪欢-${setting.$name} 鑷畾涔夎剼鏈�*/\n` : ''}${LText ? '' : '/*涓嶆墽琛岄粯璁ql*/\n'}${_customScript}`)
+      LText &&  console.info(`${setting.$name ? `/*缁勪欢-${setting.$name} 鏁版嵁婧�*/\n` : ''}` + LText)
     }
 
     param.custom_script = Utils.formatOptions(_customScript)
@@ -240,6 +238,13 @@
       `
     }
 
+    _dataresource = _dataresource.replace(/@sum\$|\$sum@/ig, '')
+    _customScript = _customScript.replace(/@sum\$|\$sum@/ig, '')
+    _dataresource = _dataresource.replace(/\$select@/ig, '/*')
+    _dataresource = _dataresource.replace(/@select\$/ig, '*/')
+    _customScript = _customScript.replace(/\$select@/ig, '/*')
+    _customScript = _customScript.replace(/@select\$/ig, '*/')
+
     let regoptions = null
     if (setting.queryType === 'statistics' || _customScript) {
       let allSearch = Utils.getAllSearchOptions(search)
@@ -251,15 +256,6 @@
         }
       })
       regoptions.push({
-        reg: new RegExp('@login_city@', 'ig'),
-        value: `'${city}'`
-      }, {
-        reg: new RegExp('@userName@', 'ig'),
-        value: `'${userName}'`
-      }, {
-        reg: new RegExp('@fullName@', 'ig'),
-        value: `'${fullName}'`
-      }, {
         reg: new RegExp('@orderBy@', 'ig'),
         value: orderBy
       }, {
@@ -280,6 +276,7 @@
       regoptions.forEach(item => {
         _dataresource = _dataresource.replace(item.reg, item.value)
       })
+      _search = ''
     }
 
     if (_customScript) {
@@ -300,8 +297,8 @@
 
     // 娴嬭瘯绯荤粺鎵撳嵃鏌ヨ璇彞
     if ((options.sysType === 'local' && !window.GLOB.systemType) || window.debugger === true) {
-      _customScript &&  console.info(`${LText ? '' : '/*涓嶆墽琛岄粯璁ql*/\n'}${_customScript}`)
-      LText &&  console.info(LText)
+      _customScript &&  console.info(`${setting.$name ? `/*缁勪欢-${setting.$name} 鑷畾涔夎剼鏈� 缁熻鏌ヨ*/\n` : ''}${LText ? '' : '/*涓嶆墽琛岄粯璁ql*/\n'}${_customScript}`)
+      LText &&  console.info(`${setting.$name ? `/*缁勪欢-${setting.$name} 鏁版嵁婧� 缁熻鏌ヨ*/\n` : ''}` + LText)
     }
     
     param.custom_script = Utils.formatOptions(_customScript)
@@ -357,7 +354,7 @@
   }
 
   /**
-   * @description 鑾峰彇绯荤粺瀛樺偍杩囩▼ sPC_Get_TableData 鐨勫弬鏁�
+   * @description 鑾峰彇绯荤粺鍓嶇疆鑴氭湰
    */
   static getDefaultPrevQueryParam (setting, search, menuType) {
     let param = {
@@ -441,7 +438,7 @@
   }
 
   /**
-   * @description 鑾峰彇绯荤粺瀛樺偍杩囩▼ sPC_Get_TableData 鐨勫弬鏁�
+   * @description 鑾峰彇绯荤粺鍥炶皟鑴氭湰
    */
   static getCallBackQueryParams (setting, sql, errSql) {
     let param = {
@@ -540,6 +537,9 @@
             subObjs.push(val)
           }
         } else {
+          if (typeof(val) === 'string') {
+            val = val.replace(/'/ig, '"')
+          }
           keys.push(key)
           vals.push(`'${val}'`)
         }

--
Gitblit v1.8.0