From 83c548d3dba59aaed9b52b5d413c6912a87d2efc Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期日, 16 六月 2024 15:50:14 +0800
Subject: [PATCH] #

---
 zy-asrs-flow/src/pages/map/components/settings.jsx |   22 ++++++++++++++++++----
 1 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/zy-asrs-flow/src/pages/map/components/settings.jsx b/zy-asrs-flow/src/pages/map/components/settings.jsx
index 70405a7..0a82de3 100644
--- a/zy-asrs-flow/src/pages/map/components/settings.jsx
+++ b/zy-asrs-flow/src/pages/map/components/settings.jsx
@@ -1,6 +1,10 @@
 import React, { useState, useRef, useEffect } from 'react';
 import { Col, Form, Input, Row, Checkbox, Slider, Select, Drawer, Space, Button, InputNumber, Card } from 'antd';
 import { FormattedMessage, useIntl, useModel } from '@umijs/max';
+import {
+    BranchesOutlined,
+    BorderOuterOutlined,
+} from '@ant-design/icons';
 import { createStyles } from 'antd-style';
 import * as Utils from '../utils'
 import Http from '@/utils/http';
@@ -15,6 +19,7 @@
     const intl = useIntl();
     const { styles } = useStyles();
     const [activeTabKey, setActiveTabKey] = useState('map');
+
     const [mapForm] = Form.useForm();
     const [configForm] = Form.useForm();
 
@@ -46,7 +51,12 @@
     };
 
     const handleOk = () => {
-        mapForm.submit();
+        if (activeTabKey === 'map') {
+            mapForm.submit();
+        }
+        if (activeTabKey === 'config') {
+            configForm.submit();
+        }
     }
 
     return (
@@ -63,7 +73,7 @@
                         <Button onClick={handleCancel}>
                             <FormattedMessage id='common.cancel' defaultMessage='鍙栨秷' />
                         </Button>
-                        <Button onClick={handleOk} type="primary">
+                        <Button hidden={activeTabKey === 'map' || activeTabKey === 'config'} onClick={handleOk} type="primary">
                             <FormattedMessage id='common.submit' defaultMessage='淇濆瓨' />
                         </Button>
                     </Space>
@@ -72,14 +82,18 @@
                 <Card
                     hoverable
                     bordered={false}
+                    type='inner'
                     tabList={[
                         {
                             key: 'map',
-                            tab: '鍦板浘鍙傛暟',
+                            tab: intl.formatMessage({ id: 'map.settings.map.param', defaultMessage: '鍦板浘鍙傛暟' }),
+                            icon: <BorderOuterOutlined />
+
                         },
                         {
                             key: 'config',
-                            tab: '閰嶇疆鍙傛暟',
+                            tab: intl.formatMessage({ id: 'map.settings.config.param', defaultMessage: '绯荤粺鍙傛暟' }),
+                            icon: <BranchesOutlined />
                         },
                     ]}
                     activeTabKey={activeTabKey}

--
Gitblit v1.9.1