소스 검색

feat: 云版列表应用

lanjianrong 5 년 전
부모
커밋
f5787ef098

+ 5 - 5
src/pages/Product/Cloud/Building/index.jsx

@@ -14,7 +14,7 @@ export const roadpricingEnum = {
   GS: 4 // 大司空概算
 }
 
-const CloudTable = ({ columnStateType }) => {
+export const CloudTable = ({ columnStateType }) => {
   const dispatch = useDispatch()
   const { cloud } = useSelector(state => ({
     cloud: state.cloud,
@@ -109,8 +109,8 @@ const CloudTable = ({ columnStateType }) => {
     },
     {
       title: '截至上一次登录时长',
-      dataIndex: 'all_online_times',
-      key: 'all_online_times',
+      dataIndex: 'onlineTimes',
+      key: 'onlineTimes',
       valueType: 'select',
       width: 70,
       valueEnum: {
@@ -120,7 +120,7 @@ const CloudTable = ({ columnStateType }) => {
         4: { text: '超过3小时' }
       },
       renderText: (t, record) => {
-        if (t && record.online_list?.length) {
+        if (record.all_online_times && record.online_list?.length) {
           return (
             <Tooltip
               title={
@@ -138,7 +138,7 @@ const CloudTable = ({ columnStateType }) => {
                 </div>
               }
             >
-              {t}
+              {record.all_online_times}
             </Tooltip>
           )
         }

+ 2 - 7
src/pages/Product/Cloud/Curing/index.jsx

@@ -1,13 +1,8 @@
 import React from 'react'
-import { Card } from 'antd'
+import { CloudTable } from '../Building'
 
 const Curing = () => {
-  // const { modalVisible, onCancel } = props;
-  return (
-    <Card bordered={false}>
-      Curing
-    </Card>
-  )
+  return <CloudTable columnStateType="CURING" />
 }
 
 export default Curing

+ 2 - 3
src/pages/Product/Cloud/Gs/index.jsx

@@ -1,9 +1,8 @@
 import React from 'react'
-import { Card } from 'antd'
+import { CloudTable } from '../Building'
 
 const Curing = () => {
-  // const { modalVisible, onCancel } = props;
-  return <Card bordered={false}>Curing</Card>
+  return <CloudTable columnStateType="GS" />
 }
 
 export default Curing

+ 2 - 3
src/pages/Product/Cloud/Highway/index.jsx

@@ -1,9 +1,8 @@
 import React from 'react'
-import { Card } from 'antd'
+import { CloudTable } from '../Building'
 
 const Curing = () => {
-  // const { modalVisible, onCancel } = props;
-  return <Card bordered={false}>Curing</Card>
+  return <CloudTable columnStateType="HIGHWAY" />
 }
 
 export default Curing