import React, { useEffect, useState } from 'react'; import { Tabs } from 'antd'; import First from './components/first'; import FirstMain from './components/firstMain'; import Detailed from './components/detailed'; import DetailedMain from './components/detailedMain'; import { getURLInformation } from '@/utils/CommonUtils' import { getBizInfo } from './service' import './style.less'; const Config: React.FC<{}> = () => { const { TabPane } = Tabs; //控制展示页 const callback = (key: string) => { showSet(key) } const [method, methodSet] = useState(false)// true false 不显示 const [show, showSet] = useState('1')// useEffect(() => { let bizId = '' let commonId: any = ""; if (getURLInformation("id") != null) { commonId = getURLInformation("id") } let secId: any = ''; if (getURLInformation("secId") != null) { secId = getURLInformation("secId"); bizId = secId; } let roomType: any = ''; if (getURLInformation("roomType") != null) { roomType = getURLInformation("roomType"); } //查评分办法和采购方式 getBizInfo(bizId).then((res) => { let methodT = false; if (res.code == 200) { const data = res.data; console.log("data",data) if (roomType == '2') { data.evalMethodDict === 'eval_method_2' ? methodT = true : null;//评分办法 1最低价 2综合评估 } data.ptcpMode === 'ptcp_mode_2' ? methodT = true : null;//采购方式 1合格制 2有限数量制 } methodSet(methodT); }); }, []) return (
{show == '1' && } { method && {show == '2' && } }
) } export default Config;