2021-01-16 11:29:42 +08:00
|
|
|
import React, { useEffect, useState } from 'react';
|
|
|
|
import { Tabs } from 'antd';
|
2020-12-23 11:14:35 +08:00
|
|
|
import First from './components/first';
|
|
|
|
import Detailed from './components/detailed';
|
2021-01-16 11:29:42 +08:00
|
|
|
import { getURLInformation } from '@/utils/CommonUtils'
|
|
|
|
import { getBizInfo } from './service'
|
2020-12-23 11:14:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
const Config: React.FC<{}> = () => {
|
|
|
|
const { TabPane } = Tabs;
|
|
|
|
//控制展示页
|
|
|
|
const callback = (key: any) => {
|
2021-01-16 11:29:42 +08:00
|
|
|
|
2020-12-23 11:14:35 +08:00
|
|
|
}
|
2021-01-16 11:29:42 +08:00
|
|
|
const [method, methodSet] = useState<any>(false)//评分办法 true 综合评估法(有详审) false 最低价(无)
|
|
|
|
const [proType, proTypeSet] = useState<any>(false)//采购方式
|
|
|
|
useEffect(() => {
|
|
|
|
let bizId = ''
|
|
|
|
let commonId: any = "";
|
|
|
|
if (getURLInformation("id") != null) {
|
|
|
|
commonId = getURLInformation("id")
|
|
|
|
}
|
|
|
|
let nodeId: any = '';
|
|
|
|
if (getURLInformation("nodeId") != null) {
|
|
|
|
nodeId = getURLInformation("nodeId");
|
|
|
|
bizId = nodeId;
|
|
|
|
}
|
|
|
|
//查评分办法和采购方式
|
|
|
|
getBizInfo(bizId).then((res) => {
|
|
|
|
console.log(res);
|
|
|
|
let methodT = false;
|
|
|
|
if (res.code == 200) {
|
|
|
|
const data = res.data;
|
|
|
|
data.evalMethodDict === 'eval_method_2' ? methodT = true : null
|
|
|
|
}
|
|
|
|
methodSet(methodT);
|
|
|
|
});
|
|
|
|
|
|
|
|
}, [])
|
|
|
|
return (
|
|
|
|
<div style={{ backgroundColor: 'white', padding: '10px' }}>
|
|
|
|
<Tabs defaultActiveKey="1" onChange={callback} size={"large"} >
|
|
|
|
<TabPane tab="初审设置" key="1">
|
|
|
|
<First />
|
|
|
|
</TabPane>
|
|
|
|
{method ?
|
2020-12-23 11:14:35 +08:00
|
|
|
<TabPane tab="详审设置" key="2">
|
2021-01-16 11:29:42 +08:00
|
|
|
<Detailed />
|
2020-12-23 11:14:35 +08:00
|
|
|
</TabPane>
|
2021-01-16 11:29:42 +08:00
|
|
|
: null
|
|
|
|
}
|
|
|
|
</Tabs>
|
|
|
|
</div>
|
2020-12-23 11:14:35 +08:00
|
|
|
)
|
|
|
|
}
|
|
|
|
export default Config;
|