2021-01-16 11:29:42 +08:00
|
|
|
import { Divider, Button, Form, Card, Tabs, Table, Tooltip, Input, Select, Row, Col, message, Modal } from 'antd';
|
|
|
|
import { Link, history } from 'umi';
|
2020-12-23 11:14:35 +08:00
|
|
|
import './index.less';
|
|
|
|
import { connect } from "dva";
|
|
|
|
import { routerRedux } from 'dva/router';
|
|
|
|
import React, { useState, useEffect, useReducer } from 'react';
|
2021-01-16 11:29:42 +08:00
|
|
|
import { getSessionUserData, getRoomId } from '@/utils/session';
|
|
|
|
import { getLeader } from './service';
|
2020-12-23 11:14:35 +08:00
|
|
|
// @Form.create()
|
|
|
|
// @connect(({ bidev,loading }) => ({
|
|
|
|
// ...bidev,
|
|
|
|
// managerlistLoading:loading.effects['bidev/fetchManagerList'],
|
|
|
|
// }))
|
|
|
|
function BiddingRoom(props) {
|
|
|
|
const [list, setList] = useState();
|
|
|
|
const [width, setWidth] = useState();
|
2021-01-16 11:29:42 +08:00
|
|
|
const [review, reviewSet] = useState();
|
|
|
|
|
|
|
|
const roomId = getRoomId();
|
|
|
|
useEffect(() => {
|
2020-12-23 11:14:35 +08:00
|
|
|
setList(() => {
|
2021-01-16 11:29:42 +08:00
|
|
|
let role = getSessionUserData().roleIds;
|
|
|
|
switch (role) {
|
|
|
|
case 'daili': setList(() => {
|
|
|
|
return managerList
|
|
|
|
})
|
|
|
|
break;
|
|
|
|
case 'zhuanjia': setList(() => {
|
|
|
|
getLeader(getRoomId(), getSessionUserData().userId).then(res => {
|
|
|
|
if (res.code == 200) {
|
|
|
|
if (res.data == 'Review') {
|
|
|
|
reviewSet('Jury')
|
|
|
|
} else {
|
|
|
|
reviewSet('GroupLeader')
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
}
|
|
|
|
})
|
|
|
|
return JuryList
|
|
|
|
})
|
|
|
|
break;
|
|
|
|
case 'gys': setList(() => {
|
|
|
|
return supplierList
|
|
|
|
})
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
setWidth(() => {
|
|
|
|
return 100 / setList.length * 100
|
|
|
|
})
|
2020-12-23 11:14:35 +08:00
|
|
|
})
|
|
|
|
setWidth(() => {
|
2021-01-16 11:29:42 +08:00
|
|
|
return 100 / setList.length * 100
|
2020-12-23 11:14:35 +08:00
|
|
|
})
|
2021-01-16 11:29:42 +08:00
|
|
|
|
|
|
|
}, [])
|
|
|
|
|
|
|
|
const managerList = [
|
|
|
|
{
|
|
|
|
id: 1,
|
|
|
|
path: "/ProjectLayout/EvaRoom",
|
|
|
|
text: "基本信息"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 2,
|
|
|
|
path: "/ProjectLayout/EvaRoom/Eva",
|
|
|
|
text: "评标进展"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 3,
|
|
|
|
path: "/ProjectLayout/EvaRoom/Evaluation/BidControl/BidControlManager",
|
|
|
|
text: "风险点展示"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 4,
|
|
|
|
path: "/ProjectLayout/EvaRoom/BiddingDocumentsDecrypt",
|
|
|
|
text: "投标文件查看"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 5,
|
|
|
|
path: "/ProjectLayout/EvaRoom/BidAbnormal",
|
|
|
|
text: "评标异常"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 6,
|
|
|
|
path: "",
|
|
|
|
text: "澄清说明"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 7,
|
|
|
|
path: "",
|
|
|
|
text: "报表打印"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 8,
|
|
|
|
path: "/ProjectLayout/EvaRoom/Evaluation/projectManager/ReviewResults/Manager",
|
|
|
|
text: "评审结果"
|
|
|
|
}]
|
|
|
|
let JuryList = [
|
|
|
|
{
|
|
|
|
id: 9,
|
|
|
|
path: "/EvaRoom/Eva",
|
|
|
|
text: "评标"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 10,
|
|
|
|
path: "/EvaRoom/BiddingDocumentsDecrypt",
|
|
|
|
text: "投标文件查看"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 11,
|
|
|
|
path: "/EvaRoom/BidControl/BidControlManager",
|
|
|
|
text: "风险点展示"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 12,
|
|
|
|
path: "",
|
|
|
|
text: "辅助评标"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 13,
|
|
|
|
path: "",
|
|
|
|
text: "澄清说明"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 14,
|
|
|
|
path: "",
|
|
|
|
text: "算数错误调整"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 15,
|
|
|
|
path: `/EvaRoom/Evaluation/expert/ReviewResults/`,
|
|
|
|
text: "评审结果",
|
|
|
|
}]
|
|
|
|
const supplierList = [{
|
|
|
|
id: 16,
|
|
|
|
path: "",
|
|
|
|
text: "基本信息"
|
2020-12-23 11:14:35 +08:00
|
|
|
},
|
|
|
|
{
|
2021-01-16 11:29:42 +08:00
|
|
|
id: 17,
|
|
|
|
path: "",
|
|
|
|
text: "项目评审"
|
2020-12-23 11:14:35 +08:00
|
|
|
},
|
|
|
|
{
|
2021-01-16 11:29:42 +08:00
|
|
|
id: 18,
|
|
|
|
path: "",
|
|
|
|
text: "标中质询"
|
2020-12-23 11:14:35 +08:00
|
|
|
}]
|
2021-01-16 11:29:42 +08:00
|
|
|
|
|
|
|
const onclick = (path, id) => {
|
|
|
|
id == 15 ? path = path + review : null;
|
|
|
|
history.push({ pathname: path });
|
2020-12-23 11:14:35 +08:00
|
|
|
}
|
|
|
|
return (
|
2021-01-16 11:29:42 +08:00
|
|
|
<div className="myselfBar">
|
|
|
|
<div className="tablist">
|
|
|
|
{list != undefined && list.map(item => {
|
|
|
|
if (props.selectedId && props.selectedId != "") {
|
|
|
|
return <div className="tab" style={{
|
|
|
|
width: width + "px",
|
|
|
|
color: props.selectedId == item.id ? "#FFFFFF" : "#980000", background: props.selectedId == item.id ? "#980000" : "#FFFFFF"
|
|
|
|
}} onClick={() => { onclick(item.path, item.id) }}>{item.text}</div>
|
|
|
|
} else {
|
|
|
|
return <div className="tab" style={{ width: width + "px" }} onClick={() => { onclick(item.path, item.id); }}>{item.text}</div>
|
|
|
|
}
|
|
|
|
})}
|
|
|
|
</div>
|
2020-12-23 11:14:35 +08:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
2021-01-16 11:29:42 +08:00
|
|
|
export default BiddingRoom;
|