From 4e1a7c48a0c1790d34b20b0ad62200eb2d9f57ad Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期三, 10 四月 2024 10:45:58 +0800
Subject: [PATCH] #

---
 zy-asrs-flow/src/pages/map/drawer/conveyor/index.jsx |    4 
 zy-asrs-flow/src/pages/map/drawer/conveyor/view.jsx  |  118 +++++++---------
 zy-asrs-flow/src/pages/map/drawer/shuttle/index.jsx  |    4 
 zy-asrs-flow/src/locales/en-US/map.ts                |   18 ++
 zy-asrs-flow/src/pages/map/drawer/lift/view.jsx      |  118 +++++++---------
 zy-asrs-flow/src/pages/map/drawer/lift/index.jsx     |    8 
 zy-asrs-flow/src/pages/map/drawer/shuttle/view.jsx   |  118 +++++++---------
 7 files changed, 183 insertions(+), 205 deletions(-)

diff --git a/zy-asrs-flow/src/locales/en-US/map.ts b/zy-asrs-flow/src/locales/en-US/map.ts
index 8f15e8f..66dfc60 100644
--- a/zy-asrs-flow/src/locales/en-US/map.ts
+++ b/zy-asrs-flow/src/locales/en-US/map.ts
@@ -22,6 +22,21 @@
     '': '',
     '': '',
     '': '',
+    'map.lift.no': 'Lift Number',
+    '': '',
+    '': '',
+    '': '',
+    '': '',
+    'map.shuttle.no': 'Shuttle Number',
+    '': '',
+    '': '',
+    '': '',
+    '': '',
+    'map.conveyor.no': 'Conveyor Number',
+    '': '',
+    '': '',
+    '': '',
+    '': '',
     'map.sensor.type.shuttle': 'Shuttle',
     'map.sensor.type.shelf': 'Shelf',
     'map.sensor.type.agv': 'Agv',
@@ -32,6 +47,9 @@
     '': '',
     'map.drawer.json': 'JSON',
     'map.drawer.shelf.view.title': 'Shelf Information',
+    'map.drawer.lift.view.title': 'Lift Information',
+    'map.drawer.shuttle.view.title': 'Shuttle Information',
+    'map.drawer.conveyor.view.title': 'Conveyor Information',
     '': '',
     '': '',
     '': '',
diff --git a/zy-asrs-flow/src/pages/map/drawer/conveyor/index.jsx b/zy-asrs-flow/src/pages/map/drawer/conveyor/index.jsx
index 911b37b..70daece 100644
--- a/zy-asrs-flow/src/pages/map/drawer/conveyor/index.jsx
+++ b/zy-asrs-flow/src/pages/map/drawer/conveyor/index.jsx
@@ -19,7 +19,7 @@
         if (!curSprite) {
             return
         }
-        props.setDrawerTitle(intl.formatMessage({ id: 'map.loc.no', defaultMessage: '搴撲綅鍙�' }) + ': ' + curNo);
+        props.setDrawerTitle(intl.formatMessage({ id: 'map.conveyor.no', defaultMessage: '杈撻�佺嚎绔欏彿' }) + ': ' + curNo);
     }, [curNo]);
 
     const contentList = {
@@ -47,7 +47,7 @@
                 tabList={[
                     {
                         key: 'view',
-                        tab: intl.formatMessage({ id: 'map.drawer.shelf.view.title', defaultMessage: '搴撲綅淇℃伅' }),
+                        tab: intl.formatMessage({ id: 'map.drawer.conveyor.view.title', defaultMessage: '杈撻�佺嚎淇℃伅' }),
                     },
                     {
                         key: 'json',
diff --git a/zy-asrs-flow/src/pages/map/drawer/conveyor/view.jsx b/zy-asrs-flow/src/pages/map/drawer/conveyor/view.jsx
index d147168..17c5242 100644
--- a/zy-asrs-flow/src/pages/map/drawer/conveyor/view.jsx
+++ b/zy-asrs-flow/src/pages/map/drawer/conveyor/view.jsx
@@ -1,7 +1,6 @@
 import React, { useState, useRef, useEffect } from 'react';
-import { Spin, Descriptions, Button } from 'antd';
+import { Descriptions, Button, Skeleton, Badge, Space } from 'antd';
 import { FormattedMessage, useIntl, useModel } from '@umijs/max';
-import { LoadingOutlined } from '@ant-design/icons';
 import { createStyles } from 'antd-style';
 import * as Utils from '../../utils'
 import Http from '@/utils/http';
@@ -13,21 +12,9 @@
             display: 'flex',
             gap: '0px',
         },
-        threeInfo: {
-            height: '100%',
-            width: '60%',
-        },
-        spinWrapper: {
-            height: '100%',
-        },
-        threeContainer: {
-            zIndex: 99,
-            width: '100%',
-            height: '100%',
-        },
         tableInfo: {
             height: '100%',
-            width: '40%',
+            width: '100%',
             padding: '0 10px 0 15px',
             overflow: 'auto',
         },
@@ -59,57 +46,56 @@
     return (
         <>
             <div className={styles.infoBox}>
-                <div className={`${styles.threeInfo} three-spin`}>
-                    <Spin
-                        spinning={loading}
-                        indicator={<LoadingOutlined spin />}
-                        size={'large'}
-                        wrapperClassName={styles.spinWrapper}
-                    >
-                    </Spin>
-                </div>
-                <div className={styles.tableInfo}>
-                    <Descriptions
-                        bordered
-                        layout="vertical"
-                        column={1}
-                        items={
-                            [
-                                {
-                                    key: '1',
-                                    label: intl.formatMessage({ id: 'map.loc.no', defaultMessage: '搴撲綅鍙�' }),
-                                },
-                                {
-                                    key: '2',
-                                    label: intl.formatMessage({ id: 'map.pallet.barcode', defaultMessage: '鎵樼洏鏉$爜' }),
-                                    children: '80000010',
-                                },
-                                {
-                                    key: '3',
-                                    label: intl.formatMessage({ id: 'map.is.enable', defaultMessage: '鏄惁鍚敤' }),
-                                    children: 'Disabled',
-                                },
-                                {
-                                    key: '4',
-                                    label: intl.formatMessage({ id: 'map.loc.operation', defaultMessage: '搴撲綅鎿嶄綔' }),
-                                    children: (
-                                        <>
-                                            <Button className={styles.tableButton} size='large' type="primary" danger>
-                                                <FormattedMessage id='map.loc.lock' defaultMessage='閿佸畾' />
-                                            </Button>
-                                            <Button className={styles.tableButton} size='large' disabled>
-                                                <FormattedMessage id='map.loc.unlock' defaultMessage='瑙i攣' />
-                                            </Button>
-                                            <Button className={styles.tableButton} size='large'>
-                                                <FormattedMessage id='map.loc.reset' defaultMessage='娓呴櫎搴撲綅' />
-                                            </Button>
-                                        </>
-                                    )
-                                },
-                            ]
-                        }
-                    />
-                </div>
+                {loading ? (
+                    <Skeleton active />
+                ) : (
+                    <div className={styles.tableInfo}>
+                        <Descriptions
+                            bordered
+                            title=''
+                            size='small'
+                            layout="vertical"
+                            column={3}
+                            items={
+                                [
+                                    {
+                                        key: '1',
+                                        label: intl.formatMessage({ id: 'map.loc.no', defaultMessage: '搴撲綅鍙�' }),
+                                        children: <Badge status="processing" text="Running" />,
+                                    },
+                                    {
+                                        key: '2',
+                                        label: intl.formatMessage({ id: 'map.pallet.barcode', defaultMessage: '鎵樼洏鏉$爜' }),
+                                        children: '80000010',
+                                        span: 1
+                                    },
+                                    {
+                                        key: '3',
+                                        label: intl.formatMessage({ id: 'map.is.enable', defaultMessage: '鏄惁鍚敤' }),
+                                        children: 'Disabled',
+                                    },
+                                    {
+                                        key: '4',
+                                        label: intl.formatMessage({ id: 'map.loc.operation', defaultMessage: '搴撲綅鎿嶄綔' }),
+                                        children: (
+                                            <>
+                                                <Button className={styles.tableButton} size='large' type="primary" danger>
+                                                    <FormattedMessage id='map.loc.lock' defaultMessage='閿佸畾' />
+                                                </Button>
+                                                <Button className={styles.tableButton} size='large' disabled>
+                                                    <FormattedMessage id='map.loc.unlock' defaultMessage='瑙i攣' />
+                                                </Button>
+                                                <Button className={styles.tableButton} size='large'>
+                                                    <FormattedMessage id='map.loc.reset' defaultMessage='娓呴櫎搴撲綅' />
+                                                </Button>
+                                            </>
+                                        )
+                                    },
+                                ]
+                            }
+                        />
+                    </div>
+                )}
             </div>
         </>
     )
diff --git a/zy-asrs-flow/src/pages/map/drawer/lift/index.jsx b/zy-asrs-flow/src/pages/map/drawer/lift/index.jsx
index 9e43797..01fdfcb 100644
--- a/zy-asrs-flow/src/pages/map/drawer/lift/index.jsx
+++ b/zy-asrs-flow/src/pages/map/drawer/lift/index.jsx
@@ -18,8 +18,10 @@
         if (!curSprite) {
             return
         }
-        props.setDrawerTitle(intl.formatMessage({ id: 'map.loc.no', defaultMessage: '搴撲綅鍙�' }) + ': ' + curNo);
-    }, [curNo]);
+        const sensorNo = curSprite?.data?.liftNo;
+        props.setDrawerTitle(intl.formatMessage({ id: 'map.lift.no', defaultMessage: '鎻愬崌鏈哄彿' }) + ': ' + sensorNo);
+        setCurNo(sensorNo)
+    }, [curSprite]);
 
     const contentList = {
         view: (
@@ -46,7 +48,7 @@
                 tabList={[
                     {
                         key: 'view',
-                        tab: intl.formatMessage({ id: 'map.drawer.shelf.view.title', defaultMessage: '搴撲綅淇℃伅' }),
+                        tab: intl.formatMessage({ id: 'map.drawer.lift.view.title', defaultMessage: '鎻愬崌鏈轰俊鎭�' }),
                     },
                     {
                         key: 'json',
diff --git a/zy-asrs-flow/src/pages/map/drawer/lift/view.jsx b/zy-asrs-flow/src/pages/map/drawer/lift/view.jsx
index f029e3e..d139563 100644
--- a/zy-asrs-flow/src/pages/map/drawer/lift/view.jsx
+++ b/zy-asrs-flow/src/pages/map/drawer/lift/view.jsx
@@ -1,7 +1,6 @@
 import React, { useState, useRef, useEffect } from 'react';
-import { Spin, Descriptions, Button } from 'antd';
+import { Descriptions, Button, Skeleton, Badge, Space } from 'antd';
 import { FormattedMessage, useIntl, useModel } from '@umijs/max';
-import { LoadingOutlined } from '@ant-design/icons';
 import { createStyles } from 'antd-style';
 import * as Utils from '../../utils'
 import Http from '@/utils/http';
@@ -13,21 +12,9 @@
             display: 'flex',
             gap: '0px',
         },
-        threeInfo: {
-            height: '100%',
-            width: '60%',
-        },
-        spinWrapper: {
-            height: '100%',
-        },
-        threeContainer: {
-            zIndex: 99,
-            width: '100%',
-            height: '100%',
-        },
         tableInfo: {
             height: '100%',
-            width: '40%',
+            width: '100%',
             padding: '0 10px 0 15px',
             overflow: 'auto',
         },
@@ -59,57 +46,56 @@
     return (
         <>
             <div className={styles.infoBox}>
-                <div className={`${styles.threeInfo} three-spin`}>
-                    <Spin
-                        spinning={loading}
-                        indicator={<LoadingOutlined spin />}
-                        size={'large'}
-                        wrapperClassName={styles.spinWrapper}
-                    >
-                    </Spin>
-                </div>
-                <div className={styles.tableInfo}>
-                    <Descriptions
-                        bordered
-                        layout="vertical"
-                        column={1}
-                        items={
-                            [
-                                {
-                                    key: '1',
-                                    label: intl.formatMessage({ id: 'map.loc.no', defaultMessage: '搴撲綅鍙�' }),
-                                },
-                                {
-                                    key: '2',
-                                    label: intl.formatMessage({ id: 'map.pallet.barcode', defaultMessage: '鎵樼洏鏉$爜' }),
-                                    children: '80000010',
-                                },
-                                {
-                                    key: '3',
-                                    label: intl.formatMessage({ id: 'map.is.enable', defaultMessage: '鏄惁鍚敤' }),
-                                    children: 'Disabled',
-                                },
-                                {
-                                    key: '4',
-                                    label: intl.formatMessage({ id: 'map.loc.operation', defaultMessage: '搴撲綅鎿嶄綔' }),
-                                    children: (
-                                        <>
-                                            <Button className={styles.tableButton} size='large' type="primary" danger>
-                                                <FormattedMessage id='map.loc.lock' defaultMessage='閿佸畾' />
-                                            </Button>
-                                            <Button className={styles.tableButton} size='large' disabled>
-                                                <FormattedMessage id='map.loc.unlock' defaultMessage='瑙i攣' />
-                                            </Button>
-                                            <Button className={styles.tableButton} size='large'>
-                                                <FormattedMessage id='map.loc.reset' defaultMessage='娓呴櫎搴撲綅' />
-                                            </Button>
-                                        </>
-                                    )
-                                },
-                            ]
-                        }
-                    />
-                </div>
+                {loading ? (
+                    <Skeleton active />
+                ) : (
+                    <div className={styles.tableInfo}>
+                        <Descriptions
+                            bordered
+                            title=''
+                            size='small'
+                            layout="vertical"
+                            column={3}
+                            items={
+                                [
+                                    {
+                                        key: '1',
+                                        label: intl.formatMessage({ id: 'map.loc.no', defaultMessage: '搴撲綅鍙�' }),
+                                        children: <Badge status="processing" text="Running" />,
+                                    },
+                                    {
+                                        key: '2',
+                                        label: intl.formatMessage({ id: 'map.pallet.barcode', defaultMessage: '鎵樼洏鏉$爜' }),
+                                        children: '80000010',
+                                        span: 1
+                                    },
+                                    {
+                                        key: '3',
+                                        label: intl.formatMessage({ id: 'map.is.enable', defaultMessage: '鏄惁鍚敤' }),
+                                        children: 'Disabled',
+                                    },
+                                    {
+                                        key: '4',
+                                        label: intl.formatMessage({ id: 'map.loc.operation', defaultMessage: '搴撲綅鎿嶄綔' }),
+                                        children: (
+                                            <>
+                                                <Button className={styles.tableButton} size='large' type="primary" danger>
+                                                    <FormattedMessage id='map.loc.lock' defaultMessage='閿佸畾' />
+                                                </Button>
+                                                <Button className={styles.tableButton} size='large' disabled>
+                                                    <FormattedMessage id='map.loc.unlock' defaultMessage='瑙i攣' />
+                                                </Button>
+                                                <Button className={styles.tableButton} size='large'>
+                                                    <FormattedMessage id='map.loc.reset' defaultMessage='娓呴櫎搴撲綅' />
+                                                </Button>
+                                            </>
+                                        )
+                                    },
+                                ]
+                            }
+                        />
+                    </div>
+                )}
             </div>
         </>
     )
diff --git a/zy-asrs-flow/src/pages/map/drawer/shuttle/index.jsx b/zy-asrs-flow/src/pages/map/drawer/shuttle/index.jsx
index 34b7a6b..472ee07 100644
--- a/zy-asrs-flow/src/pages/map/drawer/shuttle/index.jsx
+++ b/zy-asrs-flow/src/pages/map/drawer/shuttle/index.jsx
@@ -18,7 +18,7 @@
         if (!curSprite) {
             return
         }
-        props.setDrawerTitle(intl.formatMessage({ id: 'map.loc.no', defaultMessage: '搴撲綅鍙�' }) + ': ' + curNo);
+        props.setDrawerTitle(intl.formatMessage({ id: 'map.shuttle.no', defaultMessage: '绌挎杞﹀彿' }) + ': ' + curNo);
     }, [curNo]);
 
     const contentList = {
@@ -46,7 +46,7 @@
                 tabList={[
                     {
                         key: 'view',
-                        tab: intl.formatMessage({ id: 'map.drawer.shelf.view.title', defaultMessage: '搴撲綅淇℃伅' }),
+                        tab: intl.formatMessage({ id: 'map.drawer.shuttle.view.title', defaultMessage: '绌挎杞︿俊鎭�' }),
                     },
                     {
                         key: 'json',
diff --git a/zy-asrs-flow/src/pages/map/drawer/shuttle/view.jsx b/zy-asrs-flow/src/pages/map/drawer/shuttle/view.jsx
index db4773d..efbcb78 100644
--- a/zy-asrs-flow/src/pages/map/drawer/shuttle/view.jsx
+++ b/zy-asrs-flow/src/pages/map/drawer/shuttle/view.jsx
@@ -1,7 +1,6 @@
 import React, { useState, useRef, useEffect } from 'react';
-import { Spin, Descriptions, Button } from 'antd';
+import { Descriptions, Button, Skeleton, Badge, Space } from 'antd';
 import { FormattedMessage, useIntl, useModel } from '@umijs/max';
-import { LoadingOutlined } from '@ant-design/icons';
 import { createStyles } from 'antd-style';
 import * as Utils from '../../utils'
 import Http from '@/utils/http';
@@ -13,21 +12,9 @@
             display: 'flex',
             gap: '0px',
         },
-        threeInfo: {
-            height: '100%',
-            width: '60%',
-        },
-        spinWrapper: {
-            height: '100%',
-        },
-        threeContainer: {
-            zIndex: 99,
-            width: '100%',
-            height: '100%',
-        },
         tableInfo: {
             height: '100%',
-            width: '40%',
+            width: '100%',
             padding: '0 10px 0 15px',
             overflow: 'auto',
         },
@@ -59,57 +46,56 @@
     return (
         <>
             <div className={styles.infoBox}>
-                <div className={`${styles.threeInfo} three-spin`}>
-                    <Spin
-                        spinning={loading}
-                        indicator={<LoadingOutlined spin />}
-                        size={'large'}
-                        wrapperClassName={styles.spinWrapper}
-                    >
-                    </Spin>
-                </div>
-                <div className={styles.tableInfo}>
-                    <Descriptions
-                        bordered
-                        layout="vertical"
-                        column={1}
-                        items={
-                            [
-                                {
-                                    key: '1',
-                                    label: intl.formatMessage({ id: 'map.loc.no', defaultMessage: '搴撲綅鍙�' }),
-                                },
-                                {
-                                    key: '2',
-                                    label: intl.formatMessage({ id: 'map.pallet.barcode', defaultMessage: '鎵樼洏鏉$爜' }),
-                                    children: '80000010',
-                                },
-                                {
-                                    key: '3',
-                                    label: intl.formatMessage({ id: 'map.is.enable', defaultMessage: '鏄惁鍚敤' }),
-                                    children: 'Disabled',
-                                },
-                                {
-                                    key: '4',
-                                    label: intl.formatMessage({ id: 'map.loc.operation', defaultMessage: '搴撲綅鎿嶄綔' }),
-                                    children: (
-                                        <>
-                                            <Button className={styles.tableButton} size='large' type="primary" danger>
-                                                <FormattedMessage id='map.loc.lock' defaultMessage='閿佸畾' />
-                                            </Button>
-                                            <Button className={styles.tableButton} size='large' disabled>
-                                                <FormattedMessage id='map.loc.unlock' defaultMessage='瑙i攣' />
-                                            </Button>
-                                            <Button className={styles.tableButton} size='large'>
-                                                <FormattedMessage id='map.loc.reset' defaultMessage='娓呴櫎搴撲綅' />
-                                            </Button>
-                                        </>
-                                    )
-                                },
-                            ]
-                        }
-                    />
-                </div>
+                {loading ? (
+                    <Skeleton active />
+                ) : (
+                    <div className={styles.tableInfo}>
+                        <Descriptions
+                            bordered
+                            title=''
+                            size='small'
+                            layout="vertical"
+                            column={3}
+                            items={
+                                [
+                                    {
+                                        key: '1',
+                                        label: intl.formatMessage({ id: 'map.loc.no', defaultMessage: '搴撲綅鍙�' }),
+                                        children: <Badge status="processing" text="Running" />,
+                                    },
+                                    {
+                                        key: '2',
+                                        label: intl.formatMessage({ id: 'map.pallet.barcode', defaultMessage: '鎵樼洏鏉$爜' }),
+                                        children: '80000010',
+                                        span: 1
+                                    },
+                                    {
+                                        key: '3',
+                                        label: intl.formatMessage({ id: 'map.is.enable', defaultMessage: '鏄惁鍚敤' }),
+                                        children: 'Disabled',
+                                    },
+                                    {
+                                        key: '4',
+                                        label: intl.formatMessage({ id: 'map.loc.operation', defaultMessage: '搴撲綅鎿嶄綔' }),
+                                        children: (
+                                            <>
+                                                <Button className={styles.tableButton} size='large' type="primary" danger>
+                                                    <FormattedMessage id='map.loc.lock' defaultMessage='閿佸畾' />
+                                                </Button>
+                                                <Button className={styles.tableButton} size='large' disabled>
+                                                    <FormattedMessage id='map.loc.unlock' defaultMessage='瑙i攣' />
+                                                </Button>
+                                                <Button className={styles.tableButton} size='large'>
+                                                    <FormattedMessage id='map.loc.reset' defaultMessage='娓呴櫎搴撲綅' />
+                                                </Button>
+                                            </>
+                                        )
+                                    },
+                                ]
+                            }
+                        />
+                    </div>
+                )}
             </div>
         </>
     )

--
Gitblit v1.9.1