From 8d66ff34fae5b048a6b7923cc75d34f13a08be9d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 02 八月 2022 11:42:43 +0800
Subject: [PATCH] Merge branch 'develop'

---
 src/tabviews/commontable/index.jsx |   38 ++++++++++++++++++--------------------
 1 files changed, 18 insertions(+), 20 deletions(-)

diff --git a/src/tabviews/commontable/index.jsx b/src/tabviews/commontable/index.jsx
index b16e840..255c26d 100644
--- a/src/tabviews/commontable/index.jsx
+++ b/src/tabviews/commontable/index.jsx
@@ -100,7 +100,7 @@
       }
       
       // HS涓嶄娇鐢ㄨ嚜瀹氫箟璁剧疆
-      if (result.LongParamUser && this.props.menuType !== 'HS') {
+      if (result.LongParamUser && !window.GLOB.mkHS) {
         try { // 閰嶇疆淇℃伅瑙f瀽
           let userConfig = JSON.parse(window.decodeURIComponent(window.atob(result.LongParamUser)))
           if (userConfig && !userConfig.version) {
@@ -158,7 +158,7 @@
       config = updateCommonTable(config)
 
       // 鏉冮檺杩囨护
-      if (this.props.menuType !== 'HS') {
+      if (!window.GLOB.mkHS) {
         config.action = config.action.filter(item => item.hidden !== 'true' && permAction[item.uuid])
         config.tabgroups.forEach(group => {
           group.sublist = group.sublist.filter(tab => {
@@ -264,7 +264,6 @@
 
         let userName = sessionStorage.getItem('User_Name') || ''
         let fullName = sessionStorage.getItem('Full_Name') || ''
-        let city = sessionStorage.getItem('city') || ''
 
         if (sessionStorage.getItem('isEditState') === 'true') {
           userName = sessionStorage.getItem('CloudUserName') || ''
@@ -273,8 +272,7 @@
 
         let regs = [
           { reg: /@userName@/ig, value: `'${userName}'` },
-          { reg: /@fullName@/ig, value: `'${fullName}'` },
-          { reg: /@login_city@/ig, value: `'${city}'` }
+          { reg: /@fullName@/ig, value: `'${fullName}'` }
         ]
 
         regs.forEach(cell => {
@@ -324,6 +322,7 @@
         }
         
         if (item.position === 'toolbar') {
+          item.$toolbtn = true
           _actions.push(item)
         } else if (item.position === 'grid') {
           _operations.push(item)
@@ -539,7 +538,7 @@
   loadOutResource = () => {
     const { setting, search, BID } = this.state
 
-    let param = UtilsDM.getPrevQueryParams(setting, search, BID, this.props.menuType)
+    let param = UtilsDM.getPrevQueryParams(setting, search, BID)
 
     if (setting.execType === 'sync') {
       this.setState({
@@ -631,7 +630,7 @@
   }
 
   customCallbackRequest = (result) => {
-    const { setting } = this.state
+    const { setting, BID } = this.state
     let errSql = ''
     if (result.$ErrCode === 'E') {
       errSql = `
@@ -653,13 +652,13 @@
       `))
       sql = sql.join('')
       
-      param = UtilsDM.getCallBackQueryParams(setting, sql, errSql)
+      param = UtilsDM.getCallBackQueryParams(setting, sql, errSql, BID)
 
-      if (this.state.BID) {
-        param.BID = this.state.BID
+      if (BID) {
+        param.BID = BID
       }
 
-      if (this.props.menuType === 'HS') { // 鍑芥暟 sPC_TableData_InUpDe 浜戠楠岃瘉
+      if (window.GLOB.mkHS) { // 鍑芥暟 sPC_TableData_InUpDe 浜戠楠岃瘉
         param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp)
       }
     } else {
@@ -714,7 +713,7 @@
     })
 
     let _orderBy = orderBy || setting.order
-    let param = UtilsDM.getQueryDataParams(setting, arr_field, search, _orderBy, pageIndex, pageSize, BID, this.props.menuType)
+    let param = UtilsDM.getQueryDataParams(setting, arr_field, search, _orderBy, pageIndex, pageSize, BID)
 
     let result = await Api.genericInterface(param)
 
@@ -798,7 +797,7 @@
     })
 
     let _orderBy = orderBy || setting.order
-    let param = UtilsDM.getQueryDataParams(setting, arr_field, search, _orderBy, pageIndex, pageSize, BID, this.props.menuType, id)
+    let param = UtilsDM.getQueryDataParams(setting, arr_field, search, _orderBy, pageIndex, pageSize, BID, id)
 
     let result = await Api.genericInterface(param)
     if (result.status) {
@@ -866,7 +865,7 @@
     if (statFields.length === 0 || !(setting.interType === 'system' || (setting.interType === 'custom' && setting.requestMode === 'system')) || !setting.dataresource) return
 
     let _orderBy = orderBy || setting.order
-    let param = UtilsDM.getStatQueryDataParams(setting, statFields, search, _orderBy, BID, this.props.menuType)
+    let param = UtilsDM.getStatQueryDataParams(setting, statFields, search, _orderBy, BID)
 
     Api.genericInterface(param).then(res => {
       if (res.status) {
@@ -1125,14 +1124,14 @@
   }
 
   render() {
-    const { menuType, MenuID } = this.props
+    const { MenuID } = this.props
     const { BID, setting, searchlist, pageSize, actions, columns, loadingview, viewlost, pickup, config, chartId, search, selectedData, shortcuts, autoMatic } = this.state
 
     return (
       <div className="commontable" id={this.state.ContainerId}>
         {loadingview ? <Spin size="large" /> : null}
         {searchlist && searchlist.length ?
-          <MainSearch BID={BID} searchlist={searchlist} setting={setting} menuType={this.props.menuType} refreshdata={this.refreshbysearch}/> : null
+          <MainSearch BID={BID} searchlist={searchlist} setting={setting} refreshdata={this.refreshbysearch}/> : null
         }
         {setting && config.charts ? <Row className="chart-view" gutter={16}>
           {/* 瑙嗗浘缁� */}
@@ -1273,9 +1272,9 @@
             })}
           </Tabs>))
         }
-        {menuType !== 'HS' && autoMatic ? <AutoMatic autoMatic={autoMatic} config={config} /> : null}
-        {menuType !== 'HS' && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null}
-        {menuType !== 'HS' && shortcuts ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts} permAction={this.props.permAction}/> : null}
+        {!window.GLOB.mkHS && autoMatic ? <AutoMatic autoMatic={autoMatic} config={config} /> : null}
+        {!window.GLOB.mkHS && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null}
+        {!window.GLOB.mkHS && shortcuts ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts} permAction={this.props.permAction}/> : null}
         {viewlost ? <NotFount msg={this.state.lostmsg} /> : null}
       </div>
     )
@@ -1284,7 +1283,6 @@
 
 const mapStateToProps = (state) => {
   return {
-    menuType: state.editLevel,
     permAction: state.permAction,
     permMenus: state.permMenus
   }

--
Gitblit v1.8.0