From 98ee5d4c76d2802c552851e46bd4bb43505b4416 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 11 十一月 2020 13:28:05 +0800
Subject: [PATCH] 2020-11-11

---
 src/menu/components/chart/antv-bar/index.jsx |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/menu/components/chart/antv-bar/index.jsx b/src/menu/components/chart/antv-bar/index.jsx
index 07456db..4c4453b 100644
--- a/src/menu/components/chart/antv-bar/index.jsx
+++ b/src/menu/components/chart/antv-bar/index.jsx
@@ -102,7 +102,7 @@
   }
 
   shouldComponentUpdate (nextProps, nextState) {
-    return !is(fromJS(this.state), fromJS(nextState))
+    return !is(fromJS(this.state), fromJS(nextState)) || (!this.props.menu && nextProps.menu)
   }
 
   /**
@@ -748,9 +748,9 @@
         </div>
         <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
           <div className="mk-popover-control">
-            <Icon className="plus" title="娣诲姞鎼滅储" onClick={this.addSearch} type="plus-circle" />
-            <Icon className="plus" title="娣诲姞鎸夐挳" onClick={this.addButton} type="plus-square" />
-            <ChartCompileForm config={card} sysRoles={menu ? menu.sysRoles : []} dict={this.state.dict} plotchange={this.updateComponent}/>
+            {menu && menu.MenuType !== 'billPrint' ? <Icon className="plus" title="娣诲姞鎼滅储" onClick={this.addSearch} type="plus-circle" /> : null}
+            {menu && menu.MenuType !== 'billPrint' ? <Icon className="plus" title="娣诲姞鎸夐挳" onClick={this.addButton} type="plus-square" /> : null}
+            {menu ? <ChartCompileForm config={card} sysRoles={menu.sysRoles} dict={this.state.dict} plotchange={this.updateComponent}/> : null}
             <Icon className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle} type="font-colors" />
             <Icon className="close" title="delete" type="delete" onClick={() => this.props.deletecomponent(card.uuid)} />
             <SettingComponent config={card} updateConfig={this.updateComponent}/>
@@ -758,12 +758,12 @@
         } trigger="hover">
           <Icon type="tool" />
         </Popover>
-        <ActionComponent
+        {menu && menu.MenuType !== 'billPrint' ? <ActionComponent
           type="chart"
           plus="false"
           config={card}
           updateaction={this.updateComponent}
-        />
+        /> : null}
         <div className="canvas" id={card.uuid}></div>
       </div>
     )

--
Gitblit v1.8.0