index.jsx 3.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. import React, {useState} from 'react'
  2. import { Tabs, Card } from 'antd'
  3. import Poster from '@/components/Poster'
  4. import Share from '@/components/Share'
  5. import Basic from './Basic'
  6. import Apartment from './Apartment'
  7. import AlbumList from './AlbumList'
  8. import Panorama from './Panorama'
  9. import Channel from './Channel'
  10. import News from './News'
  11. import SpecialRoom from './SpecialRoom'
  12. import OnSiteService from './OnSiteService'
  13. import styles from './style.less'
  14. const { TabPane } = Tabs
  15. export default (props) => {
  16. const { history } = props
  17. const { query } = history.location
  18. const { id } = query
  19. const [institutionId,setInstitutionId] = useState()
  20. const [marketingCode,setMarketingCode] = useState('')
  21. const [isPublish,setIsPublish] = useState(false)
  22. const target = { id, type: 'building' }
  23. return (
  24. <Card>
  25. <Tabs defaultActiveKey="1">
  26. <TabPane tab="基础信息" key="1">
  27. <div className={styles['tab-wrapper']} style={{maxWidth: 1000}}>
  28. <Basic {...props} setMarketingCode={(e)=>setMarketingCode(e)} institutionIdChange={(e)=>setInstitutionId(e)} isPublish={isPublish} setIsPublish={(e)=>setIsPublish(e)}/>
  29. </div>
  30. </TabPane>
  31. <TabPane tab="户型设置" key="2">
  32. <div className={styles['tab-wrapper']}>
  33. <Apartment {...props} isPublish={isPublish}/>
  34. </div>
  35. </TabPane>
  36. <TabPane tab="项目相册" key="3">
  37. <div className={styles['tab-wrapper']}>
  38. <AlbumList {...props} isPublish={isPublish}/>
  39. </div>
  40. </TabPane>
  41. <TabPane tab="全景照片" key="4">
  42. <div className={styles['tab-wrapper']}>
  43. <Panorama {...props} isPublish={isPublish} />
  44. </div>
  45. </TabPane>
  46. <TabPane tab="项目动态" key="8">
  47. <div className={styles['tab-wrapper']}>
  48. <News {...props} isPublish={isPublish}/>
  49. </div>
  50. </TabPane>
  51. <TabPane tab="特价房源" key="9">
  52. <div className={styles['tab-wrapper']}>
  53. <SpecialRoom {...props} isPublish={isPublish}/>
  54. </div>
  55. </TabPane>
  56. <TabPane tab="渠道设置" key="7">
  57. <div className={styles['tab-wrapper']} style={{maxWidth: '800px'}}>
  58. <Channel {...props} institutionId={institutionId} isPublish={isPublish}/>
  59. </div>
  60. </TabPane>
  61. <TabPane tab="驻场设置" key="10">
  62. <div className={styles['tab-wrapper']} style={{maxWidth: '1200px'}}>
  63. <OnSiteService {...props} marketingCode={marketingCode} isPublish={isPublish}/>
  64. </div>
  65. </TabPane>
  66. <TabPane tab="海报图片" key="5">
  67. <Poster target={target} rights="building.poster.save" {...props} submitBtn={!isPublish} />
  68. </TabPane>
  69. <TabPane tab="分享设置" key="6">
  70. <div className={styles['tab-wrapper']} style={{maxWidth: '800px'}}>
  71. <Share target={target} rights="building.share.save" {...props} submitBtn={!isPublish} />
  72. </div>
  73. </TabPane>
  74. </Tabs>
  75. </Card>
  76. )
  77. }