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 ?{this.onOpenBizassessroom(record)}}>开启评标:{this.handleRedirect()}}>进入评审室} {this.onRedirectRate()}}>组建评委会
{this.onRateShow()}}>评审分工{this.onResetVerificationCode(record)}}>重置校验码 }} ] 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 <> {this.onRateOut()}} onOk={()=>{this.onRateOut()}} title="评审分工" visible={ratevisible} > 评审分工地页面 } } export default manager;