Selaa lähdekoodia

fix: 修复水印只有局部BUG

wanrx 1 vuosi sitten
vanhempi
commit
23b98c0df2

+ 3 - 4
src/app/components/ChartGraph/PivotSheetChart/PivotSheetChart.tsx

@@ -330,7 +330,6 @@ class PivotSheetChart extends ReactChart {
             reverseLayout: Boolean(rowTotalPosition),
             showSubTotals: Boolean(enableRowSubTotal),
             reverseSubLayout: Boolean(rowSubTotalPosition),
-            // subTotalsDimensions: ['产品类型','产品大类'],
             subTotalsDimensions: [
               rowSectionConfigRows.map(
                 chartDataSet.getFieldKey,
@@ -340,7 +339,7 @@ class PivotSheetChart extends ReactChart {
             label: context.translator('summary.total'),
             subLabel: context.translator('summary.subTotal'),
             calcTotals: {
-              // aggregation: summaryAggregation,
+              //aggregation: summaryAggregation,
               calcFunc: (_,data)=>modCalcFunc(data,'row'),
             },
             calcSubTotals: {
@@ -362,11 +361,11 @@ class PivotSheetChart extends ReactChart {
             label: context.translator('summary.total'),
             subLabel: context.translator('summary.subTotal'),
             calcTotals: {
-              // aggregation: summaryAggregation,
+              //aggregation: summaryAggregation,
               calcFunc: (_,data)=>modCalcFunc(data,'col'),
             },
             calcSubTotals: {
-              // aggregation: calcSubAggregation,
+              //aggregation: calcSubAggregation,
               calcFunc: (_,data)=>modCalcFunc(data,'col',true),
             },
           },

+ 15 - 2
src/app/constants.ts

@@ -16,8 +16,8 @@
  * limitations under the License.
  */
 
-import { FONT_FAMILY, G90 } from 'styles/StyleConstants';
-import { IFontDefault } from 'types';
+import {FONT_FAMILY, G90} from 'styles/StyleConstants';
+import {IFontDefault} from 'types';
 
 export enum TenantManagementMode {
   Team = 'TEAM',
@@ -253,6 +253,19 @@ export const FONT_DEFAULT: IFontDefault = {
   color: G90,
 };
 
+export const WMStyle_DEFAULT = {
+  gap: [150, 150] as [number, number],
+  zIndex: 999,
+  style: {
+    width: '100%',
+    display: 'flex',
+  },
+  font: {
+    fontSize: 22,
+    color: 'rgba(0,0,0,0.05)'
+  }
+};
+
 export enum AuthorizationStatus {
   Initialized = 'initialized',
   Pending = 'pending',

+ 0 - 1
src/app/pages/LoginPage/index.tsx

@@ -49,7 +49,6 @@ export function LoginPage() {
           params: values,
           resolve: () => {
             history.replace('/');
-            console.log(history)
           },
         }),
       );

+ 2 - 2
src/app/pages/MainPage/index.tsx

@@ -63,6 +63,7 @@ import {
 } from './slice/thunks';
 import { MainPageRouteParams } from './types';
 import Watermark from 'antd-watermark';
+import {WMStyle_DEFAULT} from '../../constants'
 
 export function MainPage() {
   useAppSlice();
@@ -74,7 +75,6 @@ export function MainPage() {
     '/organizations/:orgId',
   );
   const loggedInUser = useSelector(selectLoggedInUser)
-  console.log(loggedInUser)
   const orgId = useSelector(selectOrgId);
   const history = useHistory();
   // loaded first time
@@ -123,7 +123,7 @@ export function MainPage() {
 
   return (
     <AppContainer>
-      <Watermark content={wmContent()} style={{width:'100%',display:'flex'}} font={{fontSize:22,color:'rgba(0,0,0,0.05)'}} gap={[150, 150]}>
+      <Watermark content={wmContent()} {...WMStyle_DEFAULT} >
         <Background />
         <Navbar />