Browse Source

feat: 修复图表Y轴数据错乱

lanjianrong 4 years ago
parent
commit
e0b93cc30c

+ 1 - 2
package.json

@@ -47,7 +47,7 @@
     "not ie <= 10"
   ],
   "dependencies": {
-    "@ant-design/charts": "1.2.14",
+    "@ant-design/charts": "1.3.2",
     "@ant-design/icons": "^4.0.0",
     "@ant-design/pro-descriptions": "^1.0.19",
     "@ant-design/pro-form": "1.42.1",
@@ -55,7 +55,6 @@
     "@ant-design/pro-table": "2.60.0",
     "@arco-design/web-react": "^2.25.0",
     "@icon-park/react": "^1.3.3",
-    "@types/react-window": "^1.8.5",
     "@umijs/route-utils": "^1.0.33",
     "ahooks": "^2.10.0",
     "antd": "^4.17.3",

+ 1 - 1
src/pages/Customer/Business/index.jsx

@@ -7,7 +7,7 @@ import AddBusiness from './components/AddBusiness'
 import Detail from './components/BusinessDetail'
 import { useModal } from '@/components/Modal'
 import CompanyDetail from '../Company/components/CompanyDetail'
-import Funnel from '@ant-design/charts/es/plots/funnel'
+import { Funnel } from '@ant-design/charts'
 import BasicTable from '@/components/Table'
 import { getAuthCache, getPermAuthCache, setAuthCache } from '@/utils/auth'
 import { PermDataTypeEunm } from '@/pages/Customer/Company/components/PermSelect'

+ 6 - 2
src/pages/Statistic/Product/InvoiceAggregate/index.jsx

@@ -54,7 +54,11 @@ const InvoiceAggregate = () => {
       const keys = Object.keys(curr)
       keys.forEach(key => {
         if (key !== 'name') {
-          newList.push({ department: curr.name, type: columnGroupMap[key], value: curr[key] })
+          newList.push({
+            department: curr.name,
+            type: columnGroupMap[key],
+            value: parseInt(curr[key])
+          })
         }
       })
       return newList
@@ -81,7 +85,7 @@ const InvoiceAggregate = () => {
       </div>
 
       <BasicTable
-        manualRequest
+        // manualRequest
         search={false}
         columns={columns}
         actionRef={tRef}