index.jsx 1.39 KB
Newer Older
mayongxin's avatar
mayongxin committed
1 2 3
import React, { useState, useEffect } from 'react';
import { Tabs } from 'antd';
import PageContainer from '@/components/BasePageContainer';
4 5 6
import BaseConfig from './baseConfig/BaseConfig';
import IotConfig from './IotConfig/IotConfig';
import MessageConfig from './messageConfig/messageConfig';
7
import ETLConfig from './ETLConfig/index';
8 9
import ProxyConfig from './proxyConfig/ProxyConfig';
import GateConfig from './gateWay/gateWay';
mayongxin's avatar
mayongxin committed
10 11 12 13

const { TabPane } = Tabs;

const HostManager = () => {
邓超's avatar
邓超 committed
14
  const [activeKey, setActiveKey] = useState('1');
15 16 17 18
  // 修改选中的tab
  const handleChange = key => {
    setActiveKey(key);
  };
mayongxin's avatar
mayongxin committed
19

20 21
  return (
    <PageContainer>
邓超's avatar
邓超 committed
22
      <Tabs onChange={handleChange} type="card" destroyInactiveTabPane activeKey={activeKey}>
23 24 25 26
        <TabPane tab="基础配置" key="1">
          <BaseConfig />
        </TabPane>
        <TabPane tab="物联配置" key="2">
邓超's avatar
邓超 committed
27
          <IotConfig setActiveKey={setActiveKey} />
28 29 30 31
        </TabPane>
        <TabPane tab="消息配置" key="3">
          <MessageConfig />
        </TabPane>
32
        {/* <TabPane tab="代理配置" key="4">
33
          <ProxyConfig />
34
        </TabPane> */}
邓超's avatar
邓超 committed
35
        <TabPane tab="中台配置" key="6">
36
          <ETLConfig setActiveKey={setActiveKey} />
37
        </TabPane>
邓超's avatar
邓超 committed
38 39 40
        <TabPane tab="网关配置" key="5">
          <GateConfig />
        </TabPane>
41 42 43 44 45
      </Tabs>
    </PageContainer>
  );
};
export default HostManager;