From d441fa1e1cc80f4ea462a750a42a2b25c1f2b202 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 04 十二月 2020 15:17:51 +0800
Subject: [PATCH] 2020-12-04

---
 src/views/billprint/index.jsx |   22 ++++++++++------------
 1 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/src/views/billprint/index.jsx b/src/views/billprint/index.jsx
index 90cf3f7..2c5686e 100644
--- a/src/views/billprint/index.jsx
+++ b/src/views/billprint/index.jsx
@@ -24,7 +24,6 @@
   state = {
     dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
     loadingview: true,
-    dataManager: false,
     pages: null,
     BID: '',
     data: '',
@@ -35,10 +34,11 @@
   UNSAFE_componentWillMount() {
     try {
       let param = JSON.parse(window.decodeURIComponent(window.atob(this.props.match.params.param)))
+
+      sessionStorage.setItem('dataM', param.dataM || '')
       this.setState({
         BID: param.id || '',
-        tempId: param.tempId,
-        dataManager: param.dataManager
+        tempId: param.tempId
       }, () => {
         this.getMenuParam()
       })
@@ -65,7 +65,7 @@
   }
 
   getMenuParam = () => {
-    const { tempId, BID, dataManager } = this.state
+    const { tempId, BID } = this.state
 
     let _param = {
       func: 'sPC_Get_LongParam',
@@ -178,7 +178,7 @@
             component.setting.dataresource = '(' + component.setting.dataresource + ') tb'
           }
       
-          if (dataManager) { // 鏁版嵁鏉冮檺
+          if (sessionStorage.getItem('dataM') === 'true') { // 鏁版嵁鏉冮檺
             component.setting.dataresource = component.setting.dataresource.replace(/\$@/ig, '/*')
             component.setting.dataresource = component.setting.dataresource.replace(/@\$/ig, '*/')
             _customScript = _customScript.replace(/\$@/ig, '/*')
@@ -198,7 +198,7 @@
             _pars.push(param)
           } else {
             let arr_field = component.columns.map(col => col.field).join(',')
-            let param = UtilsDM.getQueryDataParams(component.setting, arr_field, [], component.setting.order || '', 1, 1000, BID, '', dataManager)
+            let param = UtilsDM.getQueryDataParams(component.setting, arr_field, [], component.setting.order || '', 1, 1000, BID, '')
             
             param.componentId = component.uuid
 
@@ -511,31 +511,29 @@
   }
 
   getComponents = (components) => {
-    const { dataManager } = this.state
-
     return components.map(item => {
       if (item.type === 'bar' || item.type === 'line') {
         return (
           <Col span={item.width} key={item.uuid}>
-            <AntvBarAndLine config={item} initdata={item.data} mainSearch={[]} menuType="" dataManager={dataManager} />
+            <AntvBarAndLine config={item} initdata={item.data} mainSearch={[]} menuType="" />
           </Col>
         )
       } else if (item.type === 'pie') {
         return (
           <Col span={item.width} key={item.uuid}>
-            <AntvPie config={item} initdata={item.data} mainSearch={[]} menuType="" dataManager={dataManager} />
+            <AntvPie config={item} initdata={item.data} mainSearch={[]} menuType="" />
           </Col>
         )
       } else if (item.type === 'card' && item.subtype === 'datacard') {
         return (
           <Col span={item.width} key={item.uuid}>
-            <DataCard config={item} initdata={item.data} mainSearch={[]} menuType="" dataManager={dataManager} />
+            <DataCard config={item} initdata={item.data} mainSearch={[]} menuType="" />
           </Col>
         )
       } else if (item.type === 'card' && item.subtype === 'propcard') {
         return (
           <Col span={item.width} key={item.uuid}>
-            <PropCard config={item} initdata={item.data} mainSearch={[]} menuType="" dataManager={dataManager} />
+            <PropCard config={item} initdata={item.data} mainSearch={[]} menuType="" />
           </Col>
         )
       } else {

--
Gitblit v1.8.0