更新版本库
This commit is contained in:
@ -1,10 +1,17 @@
|
||||
import React, {PureComponent} from 'react';
|
||||
import {Divider,Button,Form,Card,Tabs,Table,Tooltip,Input,Select,Row,Col,message,Modal} from 'antd';
|
||||
import {Divider,Button,Form,Card,Tabs,Table,Tooltip,Input,Select,Row,Col,message,Modal,Popconfirm} from 'antd';
|
||||
import { getRoomId} from '@/utils/session';
|
||||
import { saveLeaderId,getJuryData } from './components/service';
|
||||
import './index.less';
|
||||
import { connect } from "dva";
|
||||
import { routerRedux } from 'dva/router';
|
||||
import { getProId } from '@/utils/session';
|
||||
import ReviewDevided from '@/pages/BidEvaluation/components/ReviewDevided';
|
||||
//import SetLeader from '@/pages/BidEvaluation/components/SetLeader';
|
||||
|
||||
|
||||
// @Form.create()
|
||||
const InfId = getRoomId();
|
||||
@connect(({ bidev,loading }) => ({
|
||||
...bidev,
|
||||
managerlistLoading:loading.effects['bidev/fetchManagerList'],
|
||||
@ -13,20 +20,55 @@ class manager extends PureComponent {
|
||||
state={
|
||||
pageNo:1,
|
||||
pageSize:10,
|
||||
tpId:1111111,
|
||||
ratevisible:false
|
||||
tpId: getProId(),
|
||||
ratevisible:false,
|
||||
record:undefined,
|
||||
visible: false,
|
||||
data: '',
|
||||
roomStatus: 1,
|
||||
}
|
||||
componentDidMount(){
|
||||
showModal = (record) => {
|
||||
getJuryData( record.id ).then(res=>{
|
||||
if(res.code == 200) {
|
||||
if(res.data == undefined) {} else {
|
||||
this.setState({
|
||||
visible: true,
|
||||
data:res.data
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
};
|
||||
hideModal = () => {
|
||||
this.setState({
|
||||
tpId:1111111
|
||||
visible: false
|
||||
})
|
||||
};
|
||||
handleOk = e => {
|
||||
console.log(e);
|
||||
this.setState({
|
||||
visible: false,
|
||||
});
|
||||
};
|
||||
|
||||
handleCancel = e => {
|
||||
console.log(e);
|
||||
this.setState({
|
||||
visible: false,
|
||||
});
|
||||
};
|
||||
componentDidMount(){
|
||||
console.log(this.props.match.params.roomType)
|
||||
this.setState({
|
||||
tpId:getProId()
|
||||
})
|
||||
const { dispatch }=this.props;
|
||||
// const {pageNo,pageSize}=this.state;
|
||||
const params={
|
||||
pageNo:1,
|
||||
pageSize:10,
|
||||
roomType:2,
|
||||
tpId:1111111//项目id
|
||||
roomType:this.props.match.params.roomType,
|
||||
tpId: getProId(),//项目id
|
||||
}
|
||||
dispatch({
|
||||
type:"bidev/fetchManagerList",
|
||||
@ -63,24 +105,24 @@ class manager extends PureComponent {
|
||||
},
|
||||
{ title: '状态', dataIndex: 'status', width: '10%',
|
||||
render:(text, record, index)=>{
|
||||
let txt="准备评标"
|
||||
switch(text){
|
||||
case '2': txt="正在评标"
|
||||
case '3': txt="评标结束"
|
||||
}
|
||||
return txt
|
||||
let txt = record.status
|
||||
return txt == 0 || txt == 1 ? '准备评标' : (txt == 2 ? '正在评标' : (txt == 3 ? '评标结束': null))
|
||||
}},
|
||||
{ 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></>
|
||||
{status==0 || status==1 ?<Button type="link" block><a className="buttont" onClick={()=>{this.onOpenBizassessroom(record)}}>开启评标</a></Button>:<Button type="link" block><a className="buttont" onClick={()=>{this.handleRedirect(record)}}>进入评审室</a></Button>}
|
||||
{record.reviewMark == 0 ? null : (<a style={{textAlign: 'center',width: '100%'}} className="buttont" onClick={()=>{this.onRedirectRate()}}>组建评委会</a>)}
|
||||
<Button type="link" block><a style={{textAlign: 'center',width: '100%'}} className="buttont" onClick={()=>{this.onRateShow(record)}}>评审分工</a></Button>
|
||||
<Button type="link" block><a style={{textAlign: 'center',width: '100%'}} className="buttont" onClick={()=>{this.onResetVerificationCode(record)}}>重置校验码</a></Button>
|
||||
{status==0 || status==1 ? <Button type="link" block onClick={() => this.showModal(record)}><a style={{textAlign: 'center',width: '100%'}} className="buttont" >设置组长</a></Button>: null}
|
||||
</>
|
||||
}}
|
||||
]
|
||||
handleRedirect=()=>{
|
||||
|
||||
handleRedirect=(record)=>{
|
||||
sessionStorage.setItem("roomId",record.id)
|
||||
this.props.dispatch(routerRedux.push('/ProjectLayout/EvaRoom'))
|
||||
}
|
||||
onOpenBizassessroom=(record)=>{
|
||||
const params={
|
||||
@ -109,20 +151,22 @@ class manager extends PureComponent {
|
||||
this.props.dispatch(routerRedux.push('/JudgingPanel/list'))
|
||||
}
|
||||
// 弹出评审分工页面
|
||||
onRateShow=()=>{
|
||||
onRateShow=(record)=>{
|
||||
this.setState({
|
||||
record: {...record},
|
||||
ratevisible:true
|
||||
})
|
||||
// this.props.dispatch(routerRedux.push('/JudgingPanel/list'))
|
||||
}
|
||||
onRateOut(){
|
||||
this.setState({
|
||||
ratevisible:false
|
||||
ratevisible:false,
|
||||
record:undefined
|
||||
})
|
||||
}
|
||||
render(){
|
||||
const { managerList,managerlistLoading}=this.props;
|
||||
const { pageNo,pageSize,tpId,ratevisible }=this.state;
|
||||
const { pageNo,pageSize,tpId,ratevisible, data }=this.state;
|
||||
const pagination = {
|
||||
current: pageNo,
|
||||
total: managerList && managerList.total ,
|
||||
@ -162,6 +206,40 @@ class manager extends PureComponent {
|
||||
})
|
||||
}
|
||||
}
|
||||
const confirm =(values)=> {
|
||||
this.setState({
|
||||
visible: false
|
||||
})
|
||||
saveLeaderId(values.id).then(res=>{
|
||||
})
|
||||
}
|
||||
const columns = [
|
||||
{
|
||||
title: '评委会成员',
|
||||
dataIndex: 'name',
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
dataIndex: 'status',
|
||||
},
|
||||
{
|
||||
title: '身份',
|
||||
dataIndex: 'duty',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
render: (record, index) => {
|
||||
return record.duty == 1?(
|
||||
<Popconfirm title="确认设为组长?" okText="是" cancelText="否" onConfirm={()=>confirm(record)}>
|
||||
<Button type="link">设为组长</Button>
|
||||
</Popconfirm>
|
||||
):null
|
||||
}
|
||||
}
|
||||
]
|
||||
const renderSetLeader = ()=>{
|
||||
return <Table pagination={false} columns={columns} dataSource={data}/>
|
||||
}
|
||||
return <>
|
||||
<Card title="评审室">
|
||||
<Table
|
||||
@ -172,16 +250,16 @@ class manager extends PureComponent {
|
||||
bordered
|
||||
/>
|
||||
</Card>
|
||||
<Modal
|
||||
cancelText="取消"
|
||||
okText="确定"
|
||||
onCancel={()=>{this.onRateOut()}}
|
||||
onOk={()=>{this.onRateOut()}}
|
||||
title="评审分工"
|
||||
visible={ratevisible}
|
||||
>
|
||||
评审分工地页面
|
||||
</Modal>
|
||||
<ReviewDevided title="评审分工" modalVisible={ratevisible} onCancel={() => {this.onRateOut()}} values={this.state.record}/>
|
||||
<Modal
|
||||
title="设置组长"
|
||||
visible= {this.state.visible}
|
||||
footer= {null}
|
||||
onCancel={this.handleCancel}
|
||||
width={600}
|
||||
>
|
||||
{renderSetLeader()}
|
||||
</Modal>
|
||||
</>
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user