188 lines
5.2 KiB
JavaScript
188 lines
5.2 KiB
JavaScript
![]() |
import React, {PureComponent} from 'react';
|
||
|
import {Divider,Button,Form,Card,Tabs,Table,Tooltip,Input,Select,Row,Col,message,Modal} from 'antd';
|
||
|
import './index.less';
|
||
|
import { connect } from "dva";
|
||
|
import { routerRedux } from 'dva/router';
|
||
|
|
||
|
// @Form.create()
|
||
|
@connect(({ bidev,loading }) => ({
|
||
|
...bidev,
|
||
|
managerlistLoading:loading.effects['bidev/fetchManagerList'],
|
||
|
}))
|
||
|
class manager extends PureComponent {
|
||
|
state={
|
||
|
pageNo:1,
|
||
|
pageSize:10,
|
||
|
tpId:1111111,
|
||
|
ratevisible:false
|
||
|
}
|
||
|
componentDidMount(){
|
||
|
this.setState({
|
||
|
tpId:1111111
|
||
|
})
|
||
|
const { dispatch }=this.props;
|
||
|
// const {pageNo,pageSize}=this.state;
|
||
|
const params={
|
||
|
pageNo:1,
|
||
|
pageSize:10,
|
||
|
roomType:2,
|
||
|
tpId:1111111//项目id
|
||
|
}
|
||
|
dispatch({
|
||
|
type:"bidev/fetchManagerList",
|
||
|
payload:{...params}
|
||
|
})
|
||
|
}
|
||
|
|
||
|
columns=[
|
||
|
{ title: '序号', dataIndex: 'id', width: '10%',
|
||
|
render:(text, record, index)=>{
|
||
|
return (index+1)
|
||
|
}},
|
||
|
{ title: '标段名称', dataIndex: 'sectionName', width: '10%'},
|
||
|
{ title: '标段编号', dataIndex: 'sectionNum', width: '10%'},
|
||
|
{ title: '评标次数', dataIndex: 'roomSort', width: '10%',
|
||
|
render:(text, record, index)=>{
|
||
|
return <>第{text}次评标</>
|
||
|
}},
|
||
|
{ title: '评委信息', dataIndex: 'juryMember', width: '10%'},
|
||
|
{ title: '评标开始时间', dataIndex: 'openTime', width: '10%'},
|
||
|
{ title: '校验码', dataIndex: 'verificationCode', width: '10%'
|
||
|
// render:(text, record, index)=>{
|
||
|
// let t="verificationCode"+record.id;
|
||
|
// this.props.dispatch({
|
||
|
// type:"bidev/save",
|
||
|
// payload:{[t]:text}
|
||
|
// })
|
||
|
// if(this.props[t]){
|
||
|
// return this.props[t]
|
||
|
// }else{
|
||
|
// return text
|
||
|
// }
|
||
|
// }
|
||
|
},
|
||
|
{ title: '状态', dataIndex: 'status', width: '10%',
|
||
|
render:(text, record, index)=>{
|
||
|
let txt="准备评标"
|
||
|
switch(text){
|
||
|
case '2': txt="正在评标"
|
||
|
case '3': txt="评标结束"
|
||
|
}
|
||
|
return txt
|
||
|
}},
|
||
|
{ title: '操作', dataIndex: 'operation', width: '10%',
|
||
|
render:(text, record, index)=>{
|
||
|
let status=record.status;
|
||
|
return <>
|
||
|
{status==0 || status==1 ?<a className="buttont" onClick={()=>{this.onOpenBizassessroom(record)}}>开启评标</a>:<a className="buttont" onClick={()=>{this.handleRedirect()}}>进入评审室</a>}
|
||
|
<a style={{marginLeft:"5px"}} className="buttont" onClick={()=>{this.onRedirectRate()}}>组建评委会</a><br/>
|
||
|
<a className="buttont" onClick={()=>{this.onRateShow()}}>评审分工</a><a style={{marginLeft:"5px"}} className="buttont" onClick={()=>{this.onResetVerificationCode(record)}}>重置校验码</a></>
|
||
|
}}
|
||
|
]
|
||
|
handleRedirect=()=>{
|
||
|
|
||
|
}
|
||
|
onOpenBizassessroom=(record)=>{
|
||
|
const params={
|
||
|
id:record.id
|
||
|
}
|
||
|
this.props.dispatch({
|
||
|
type:"bidev/openBizassessroom",
|
||
|
payload:{...params}
|
||
|
})
|
||
|
}
|
||
|
onResetVerificationCode=(record)=>{
|
||
|
const { pageNo,pageSize,tpId }=this.state;
|
||
|
const params={
|
||
|
id:record.id,
|
||
|
pageNo:pageNo,
|
||
|
pageSize:pageSize,
|
||
|
tpId:tpId
|
||
|
}
|
||
|
this.props.dispatch({
|
||
|
type:"bidev/resetVerificationCode",
|
||
|
payload:{...params}
|
||
|
})
|
||
|
}
|
||
|
// 跳转组建评委会
|
||
|
onRedirectRate=()=>{
|
||
|
this.props.dispatch(routerRedux.push('/JudgingPanel/list'))
|
||
|
}
|
||
|
// 弹出评审分工页面
|
||
|
onRateShow=()=>{
|
||
|
this.setState({
|
||
|
ratevisible:true
|
||
|
})
|
||
|
// this.props.dispatch(routerRedux.push('/JudgingPanel/list'))
|
||
|
}
|
||
|
onRateOut(){
|
||
|
this.setState({
|
||
|
ratevisible:false
|
||
|
})
|
||
|
}
|
||
|
render(){
|
||
|
const { managerList,managerlistLoading}=this.props;
|
||
|
const { pageNo,pageSize,tpId,ratevisible }=this.state;
|
||
|
const pagination = {
|
||
|
current: pageNo,
|
||
|
total: managerList && managerList.total ,
|
||
|
// showSizeChanger: true,
|
||
|
showQuickJumper:true,
|
||
|
showTotal: (total,range) => `共 ${total} 条记录,第${range.slice(',')[0]}-${range.slice(',')[1]}条`,
|
||
|
onChange:(page, pageSize)=>{
|
||
|
this.setState({
|
||
|
pageNo:page,
|
||
|
pageSize:pageSize,
|
||
|
});
|
||
|
const params={
|
||
|
pageNo:page,
|
||
|
pageSize:pageSize,
|
||
|
roomType:2,
|
||
|
tpId:tpId//项目id
|
||
|
}
|
||
|
this.props.dispatch({
|
||
|
type:"bidev/fetchManagerList",
|
||
|
payload:{...params}
|
||
|
})
|
||
|
},
|
||
|
onShowSizeChange: (current, pageSize) => {
|
||
|
this.setState({
|
||
|
pageNo:1,
|
||
|
pageSize:pageSize,
|
||
|
});
|
||
|
const params={
|
||
|
pageNo:1,
|
||
|
pageSize:pageSize,
|
||
|
roomType:2,
|
||
|
tpId:tpId//项目id
|
||
|
}
|
||
|
this.props.dispatch({
|
||
|
type:"bidev/fetchManagerList",
|
||
|
payload:{...params}
|
||
|
})
|
||
|
}
|
||
|
}
|
||
|
return <>
|
||
|
<Card title="评审室">
|
||
|
<Table
|
||
|
loading={managerlistLoading}
|
||
|
columns={this.columns}
|
||
|
dataSource={managerList!="" && managerList.records}
|
||
|
pagination={pagination}
|
||
|
bordered
|
||
|
/>
|
||
|
</Card>
|
||
|
<Modal
|
||
|
cancelText="取消"
|
||
|
okText="确定"
|
||
|
onCancel={()=>{this.onRateOut()}}
|
||
|
onOk={()=>{this.onRateOut()}}
|
||
|
title="评审分工"
|
||
|
visible={ratevisible}
|
||
|
>
|
||
|
评审分工地页面
|
||
|
</Modal>
|
||
|
</>
|
||
|
}
|
||
|
}
|
||
|
export default manager;
|