tsg-web/src/views/sz/szzf/ajdj/editTabs.js

51 lines
1.1 KiB
JavaScript

import React, { useState } from 'react';
import { Tabs } from 'antd';
import BascForm from '../form/index'
import { basicData,clqkData,xzfy} from './config'
import Bajz from './bajz'
import Lsyx from './lsyx'
const items = [
{
key: '1',
label: '基本情况',
},
{
key: '2',
label: '处理情况',
},
{
key: '3',
label: '行政复议、行政应诉情况',
},
{
key: '4',
label: '办案宗卷',
},
{
key: '5',
label: '历史影像及图片',
},
];
const Page = () => {
const [key , setKeys] = useState('1')
const onChange = (key) => {
console.log(key);
setKeys(key)
};
return (
<>
<Tabs defaultActiveKey="1" items={items} onChange={onChange} />
<>
{key==1&& <BascForm formJson={basicData}></BascForm>}
{key==2&& <BascForm formJson={clqkData}></BascForm>}
{key==3&& <BascForm formJson={xzfy}></BascForm>}
{key==4&& <Bajz ></Bajz>}
{key==5&& <Lsyx ></Lsyx>}
</>
</>
)
}
export default Page