|  |  | @@ -1,23 +1,76 @@ | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | import { useState, useEffect, useRef } from 'react'; | 
		
	
		
			
			|  |  |  | import { ProList, PageContainer } from '@ant-design/pro-components'; | 
		
	
		
			
			|  |  |  | import { ConfigProvider, Button, Flex, Input, Space, Image, Segmented, Row, Col, Tabs, Tag, Card, Avatar, Typography, Anchor } from 'antd'; | 
		
	
		
			
			|  |  |  | import { SearchOutlined, EllipsisOutlined, ArrowRightOutlined, StarOutlined } from '@ant-design/icons'; | 
		
	
		
			
			|  |  |  | import { ConfigProvider, Button, Flex, Input, Space, Image, Select, Row, Col, Tag, Card, Avatar, Typography } from 'antd'; | 
		
	
		
			
			|  |  |  | import { SearchOutlined, FireOutlined, RightOutlined, StarOutlined } from '@ant-design/icons'; | 
		
	
		
			
			|  |  |  | import { useModel, connect, history, Link } from 'umi'; | 
		
	
		
			
			|  |  |  | import routes from './../../../../config/routes'; | 
		
	
		
			
			|  |  |  | import { Imageprefix } from '@/constants'; | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | import { GetCompanyFamousList } from '@/services/apis/company'; | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | import { GetSectionList, GetArticleList, GetSectionDetailByCode } from '@/services/apis/information'; | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | import TitleIndex from '@/components/Common/Title'; | 
		
	
		
			
			|  |  |  | import EmptyResult from '@/components/Common/EmptyResult' | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | const HomeNewJob: React.FC = () => { | 
		
	
		
			
			|  |  |  | const [list, setList] = useState<object[]>([]) | 
		
	
		
			
			|  |  |  | const [total, setTotal] = useState<number>(0) | 
		
	
		
			
			|  |  |  | const [page, setPage] = useState<number>(1) | 
		
	
		
			
			|  |  |  | const [pageSize, setPageSize] = useState<number>(12) | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | const [selectedTags, setSelectedTags] = useState<string[]>(['']); | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | useEffect(() => { | 
		
	
		
			
			|  |  |  | GetSectionDetailByCode({ code: 'KCYHZHB' }).then(res => { | 
		
	
		
			
			|  |  |  | setList(res.data.childs ? res.data.childs : []) | 
		
	
		
			
			|  |  |  | if (res.data.childs && res.data.childs.length > 0) { | 
		
	
		
			
			|  |  |  | setSelectedTags(res.data.childs[0].name) | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | }, []); | 
		
	
		
			
			|  |  |  | const handleChange = (tag: object, checked: boolean) => { | 
		
	
		
			
			|  |  |  | const nextSelectedTags = checked | 
		
	
		
			
			|  |  |  | ? [tag.name] | 
		
	
		
			
			|  |  |  | : selectedTags.filter((t) => t !== tag.name); | 
		
	
		
			
			|  |  |  | setSelectedTags(nextSelectedTags); | 
		
	
		
			
			|  |  |  | if (tag.childs && tag.childs.length > 0) { | 
		
	
		
			
			|  |  |  | getIntroductionData(tag.childs) | 
		
	
		
			
			|  |  |  | getNewsData(tag.childs) | 
		
	
		
			
			|  |  |  | getConversionData(tag.childs) | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | }; | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  |  | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | const [introduction, setIntroduction] = useState<object | null>(null); | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | // const getIntroductionData = async (value) => { | 
		
	
		
			
			|  |  |  | //     let res = await GetArticleList({ section_id: value[0].id }) | 
		
	
		
			
			|  |  |  | //     setIntroduction(res.data.articles && res.data.articles.length > 0 ? res.data.articles[0].content : null) | 
		
	
		
			
			|  |  |  | // }; | 
		
	
		
			
			|  |  |  | // const [newsList, setNewsList] = useState<object | null>(null); | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | // const getNewsData = async (value) => { | 
		
	
		
			
			|  |  |  | //     let res = await GetArticleList({ section_id: value[0].id }) | 
		
	
		
			
			|  |  |  | //     setNewsList(res.data.articles && res.data.articles.length > 0 ? res.data.articles[0].content : null) | 
		
	
		
			
			|  |  |  | // }; | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | const HomePage: React.FC = () => { | 
		
	
		
			
			|  |  |  | const [expanded, setExpanded] = useState(false); | 
		
	
		
			
			|  |  |  | // const [conversionList, setConversionList] = useState<object | null>(null); | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | // const [selectedTags, setSelectedTags] = useState<string[]>([routes[2].routes[0].name]); | 
		
	
		
			
			|  |  |  | // const handleChange = (tag: string, checked: boolean) => { | 
		
	
		
			
			|  |  |  | //     const nextSelectedTags = checked | 
		
	
		
			
			|  |  |  | //         ? [...selectedTags, tag] | 
		
	
		
			
			|  |  |  | //         : selectedTags.filter((t) => t !== tag); | 
		
	
		
			
			|  |  |  | //     console.log('You are interested in: ', nextSelectedTags); | 
		
	
		
			
			|  |  |  | //     setSelectedTags(nextSelectedTags); | 
		
	
		
			
			|  |  |  | // const getConversionData = async (value) => { | 
		
	
		
			
			|  |  |  | //     let res = await GetArticleList({ section_id: value[0].id }) | 
		
	
		
			
			|  |  |  | //     setConversionList(res.data.articles && res.data.articles.length > 0 ? res.data.articles[0].content : null) | 
		
	
		
			
			|  |  |  | // }; | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | return ( | 
		
	
		
			
			|  |  |  | <> | 
		
	
		
			
			|  |  |  | <ConfigProvider | 
		
	
	
		
			
			|  |  | @@ -27,62 +80,56 @@ const HomePage: React.FC = () => { | 
		
	
		
			
			|  |  |  | }, | 
		
	
		
			
			|  |  |  | components: { | 
		
	
		
			
			|  |  |  | Button: { | 
		
	
		
			
			|  |  |  | colorText: '#19be6e' | 
		
	
		
			
			|  |  |  | colorText: '#19be6e', | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | }} | 
		
	
		
			
			|  |  |  | > | 
		
	
		
			
			|  |  |  | {/* <Flex justify='center' align='center' style={{ background: '#ffffff', width: '100%' }}> | 
		
	
		
			
			|  |  |  | <Flex justify='space-between' align='center' style={{ width: '1152px' }}> | 
		
	
		
			
			|  |  |  | <Typography.Paragraph ellipsis={{ | 
		
	
		
			
			|  |  |  | rows: 2, expandable: 'collapsible', expanded, | 
		
	
		
			
			|  |  |  | onExpand: (_, info) => setExpanded(info.expanded), | 
		
	
		
			
			|  |  |  | }}> | 
		
	
		
			
			|  |  |  | { | 
		
	
		
			
			|  |  |  | routes[2].routes?.map(item => (<> | 
		
	
		
			
			|  |  |  | <Tag.CheckableTag | 
		
	
		
			
			|  |  |  | key={item.name} | 
		
	
		
			
			|  |  |  | checked={selectedTags.includes(item.name)} | 
		
	
		
			
			|  |  |  | onChange={(checked) => handleChange(item.name, checked)} | 
		
	
		
			
			|  |  |  | style={{ marginBottom: 10, fontSize: 14, padding: 4 }} | 
		
	
		
			
			|  |  |  | > | 
		
	
		
			
			|  |  |  | {item.name} | 
		
	
		
			
			|  |  |  | </Tag.CheckableTag> | 
		
	
		
			
			|  |  |  | </>)) | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | </Typography.Paragraph> | 
		
	
		
			
			|  |  |  | </Flex> | 
		
	
		
			
			|  |  |  | </Flex> */} | 
		
	
		
			
			|  |  |  | <PageContainer | 
		
	
		
			
			|  |  |  | header={{ title: '', }} | 
		
	
		
			
			|  |  |  | style={{ minHeight: 800 }} | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | > | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | <Tabs | 
		
	
		
			
			|  |  |  | tabPosition='left' | 
		
	
		
			
			|  |  |  | destroyInactiveTabPane={true} | 
		
	
		
			
			|  |  |  | type="card" | 
		
	
		
			
			|  |  |  | items={[{ | 
		
	
		
			
			|  |  |  | key: '1', | 
		
	
		
			
			|  |  |  | label: '合作伙伴介绍', | 
		
	
		
			
			|  |  |  | children: <div>合作伙伴介绍</div> | 
		
	
		
			
			|  |  |  | }, | 
		
	
		
			
			|  |  |  | { | 
		
	
		
			
			|  |  |  | key: '2', | 
		
	
		
			
			|  |  |  | label: '新闻栏目', | 
		
	
		
			
			|  |  |  | children: <div>新闻栏目</div> | 
		
	
		
			
			|  |  |  | }, { | 
		
	
		
			
			|  |  |  | key: '3', | 
		
	
		
			
			|  |  |  | label: '成果转化', | 
		
	
		
			
			|  |  |  | children: <div>成果转化</div> | 
		
	
		
			
			|  |  |  | }]} | 
		
	
		
			
			|  |  |  | /> | 
		
	
		
			
			|  |  |  | </PageContainer > | 
		
	
		
			
			|  |  |  | <Flex style={{ background: '#ffffff', padding: '20px', width: '100%' }}> | 
		
	
		
			
			|  |  |  | { | 
		
	
		
			
			|  |  |  | list && list.length > 0 && list.map((item, index) => ( | 
		
	
		
			
			|  |  |  | <> | 
		
	
		
			
			|  |  |  | <Tag.CheckableTag | 
		
	
		
			
			|  |  |  | key={item.name} | 
		
	
		
			
			|  |  |  | checked={selectedTags.includes(item.name)} | 
		
	
		
			
			|  |  |  | onChange={(checked) => handleChange(item, checked)} | 
		
	
		
			
			|  |  |  | > | 
		
	
		
			
			|  |  |  | {item.name} | 
		
	
		
			
			|  |  |  | </Tag.CheckableTag> | 
		
	
		
			
			|  |  |  | </> | 
		
	
		
			
			|  |  |  | )) | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | </Flex > | 
		
	
		
			
			|  |  |  | <PageContainer header={{ title: '' }} style={{ minHeight: 1000 }}> | 
		
	
		
			
			|  |  |  | <TitleIndex title="合作伙伴简介" link="/sciencetechnologypark/news"></TitleIndex> | 
		
	
		
			
			|  |  |  | { | 
		
	
		
			
			|  |  |  | introduction && <> | 
		
	
		
			
			|  |  |  | <div style={{ minHeight: 300, background: '#f2f2f2', borderRadius: 8, padding: 20, lineHeight: 2 }}> | 
		
	
		
			
			|  |  |  | <div dangerouslySetInnerHTML={{ __html: he.decode(introduction) }} /> | 
		
	
		
			
			|  |  |  | </div> | 
		
	
		
			
			|  |  |  | </> | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | { | 
		
	
		
			
			|  |  |  | !introduction && <Flex justify='center' align='center' style={{ padding: '16px', borderRadius: 8, cursor: 'pointer' }}> | 
		
	
		
			
			|  |  |  | <EmptyResult description="暂无数据" /> | 
		
	
		
			
			|  |  |  | </Flex> | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | <TitleIndex title="新闻栏目" link="/sciencetechnologypark/news"></TitleIndex> | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | <TitleIndex title="成果转化" link="/sciencetechnologypark/news"></TitleIndex> | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | </PageContainer> | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | </ConfigProvider > | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | </> | 
		
	
		
			
			|  |  |  | ); | 
		
	
		
			
			|  |  |  | }; | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | export default HomePage; | 
		
	
		
			
			|  |  |  | export default HomeNewJob; | 
		
	
		
			
			|  |  |  | 
 |