Bläddra i källkod

fix: 仪表盘-环比数据参数缺失(权限以及周期)

lanjianrong 5 år sedan
förälder
incheckning
eccd6530b9

+ 2 - 2
src/pages/workbench/Dashboard/components/RatioPanels.jsx

@@ -13,7 +13,7 @@ const dataTypeEunm = {
   2: 'business'
 }
 
-const RatioPanels = ({ dataType }) => {
+const RatioPanels = ({ dataType, retioCyclical, dataPermission }) => {
   const dispatch = useDispatch()
   const closeModal = () => {
     dispatch({
@@ -141,7 +141,7 @@ const RatioPanels = ({ dataType }) => {
           rowKey={record => record.id}
           scroll={{ y: 400 }}
           columns={columnsMap[dataType]}
-          params={{ dataType }}
+          params={{ dataType, dataPermission, cyclical: retioCyclical }}
           request={async params => {
             const { code = -1, data } = await queryRatioPanelsList(params)
             return {

+ 7 - 1
src/pages/workbench/Dashboard/index.jsx

@@ -45,7 +45,13 @@ const Dashboard = () => {
   const handleRatioCard = dataType => {
     setModalProps({
       width: '90vw',
-      modalRender: () => <RatioPanels dataType={dataType} />,
+      modalRender: () => (
+        <RatioPanels
+          dataType={dataType}
+          retioCyclical={state.params.cyclical}
+          dataPermission={state.params.dataPermission}
+        />
+      ),
       onCancel: () => toggleModal()
     })
     toggleModal()