1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- import React, {useState} from 'react'
- import { Tabs, Card } from 'antd'
- import Poster from '@/components/Poster'
- import Share from '@/components/Share'
- import Basic from './Basic'
- import Apartment from './Apartment'
- import AlbumList from './AlbumList'
- import Panorama from './Panorama'
- import Channel from './Channel'
- import News from './News'
- import SpecialRoom from './SpecialRoom'
- import OnSiteService from './OnSiteService'
- import styles from './style.less'
-
- const { TabPane } = Tabs
-
- export default (props) => {
- const { history } = props
- const { query } = history.location
- const { id } = query
- const [institutionId,setInstitutionId] = useState()
- const [marketingCode,setMarketingCode] = useState('')
- const [isPublish,setIsPublish] = useState(false)
- const target = { id, type: 'building' }
-
- return (
- <Card>
- <Tabs defaultActiveKey="1">
- <TabPane tab="基础信息" key="1">
- <div className={styles['tab-wrapper']} style={{maxWidth: 1000}}>
- <Basic {...props} setMarketingCode={(e)=>setMarketingCode(e)} institutionIdChange={(e)=>setInstitutionId(e)} isPublish={isPublish} setIsPublish={(e)=>setIsPublish(e)}/>
- </div>
- </TabPane>
- <TabPane tab="户型设置" key="2">
- <div className={styles['tab-wrapper']}>
- <Apartment {...props} isPublish={isPublish}/>
- </div>
- </TabPane>
- <TabPane tab="项目相册" key="3">
- <div className={styles['tab-wrapper']}>
- <AlbumList {...props} isPublish={isPublish}/>
- </div>
- </TabPane>
- <TabPane tab="全景照片" key="4">
- <div className={styles['tab-wrapper']}>
- <Panorama {...props} isPublish={isPublish} />
- </div>
- </TabPane>
- <TabPane tab="项目动态" key="8">
- <div className={styles['tab-wrapper']}>
- <News {...props} isPublish={isPublish}/>
- </div>
- </TabPane>
- <TabPane tab="特价房源" key="9">
- <div className={styles['tab-wrapper']}>
- <SpecialRoom {...props} isPublish={isPublish}/>
- </div>
- </TabPane>
- <TabPane tab="渠道设置" key="7">
- <div className={styles['tab-wrapper']} style={{maxWidth: '800px'}}>
- <Channel {...props} institutionId={institutionId} isPublish={isPublish}/>
- </div>
- </TabPane>
- <TabPane tab="驻场设置" key="10">
- <div className={styles['tab-wrapper']} style={{maxWidth: '1200px'}}>
- <OnSiteService {...props} marketingCode={marketingCode} isPublish={isPublish}/>
- </div>
- </TabPane>
- <TabPane tab="海报图片" key="5">
- <Poster target={target} rights="building.poster.save" {...props} submitBtn={!isPublish} />
- </TabPane>
- <TabPane tab="分享设置" key="6">
- <div className={styles['tab-wrapper']} style={{maxWidth: '800px'}}>
- <Share target={target} rights="building.share.save" {...props} submitBtn={!isPublish} />
- </div>
- </TabPane>
- </Tabs>
- </Card>
- )
- }
|