import React, { PureComponent } from 'react'; import { Row, Col, Tooltip, Card, List, DatePicker, Button, Statistic } from 'antd'; import { history } from 'umi'; import { connect } from 'dva'; import './index.less'; import talkPng from '@/images/talk/talk.png'; import { routerRedux } from 'dva/router'; import { RightOutlined } from '@ant-design/icons'; import moment from 'moment'; import { jurySaveInfo, getSessionUserData, getRA } from '@/utils/session'; import NoticeDetail from '@/pages/notice/noticeList/components/NoticeDetail' import ExpertEnter from '@/pages/BidEvaluation/components/ExpertEnter'; import ChatUI from '@/pages/customerservice/support/conversation' //智慧客服 @connect(({ dashboard, loading }) => ({ ...dashboard, downlistLoading: loading.effects['dashboard/fetchDowntlist'], projectlistLoading: loading.effects['dashboard/fetchprojectRecords'], })) class Jury extends PureComponent { state = { datevalue: moment(moment().format('YYYYMM'), 'YYYY-MM'), datestring: moment().format('YYYYMM'), detailId: '1', // 公告id noticeDetail: false, // 公告弹窗 recordData: '', // 进入评审室弹窗数据 enterVisible: false, // 进入评审室弹窗 isModalVisible: false, //智慧客服 isFlash: false, //智慧客服 isCloseWs: true, //智慧客服 optionsModal: false, //智慧客服 projectModal: false, //智慧客服 supplierNumber: '', //智慧客服 staffId: '', //智慧客服' staffName:'', //智慧客服 kfType:0,//智慧客服 questionType:0,//智慧客服 roleIds:'',//智慧客服 } componentDidMount() { this.props.dispatch({ type: "dashboard/fetchJuryUpList", payload: { selectDate: moment().format('YYYYMM') } }) this.props.dispatch({ type: "dashboard/fetchJuryDownlist", payload: { pageNo: 1, pageSize: 4 } }) this.props.dispatch({ type: "dashboard/fetchtlist", payload: { limit: 7 } }) NTKF_PARAM = { siteid: "bl_1000",                    //企业ID,,为固定值 settingid: "bl_1000_1492484340268",           //接待组ID,为固定值,必填 uid: getSessionUserData()?.userId, uname: getSessionUserData()?.deptName + "-" + getSessionUserData()?.fullName,            //用户名,未登录可以为空,但是不能给null,uname赋予的值显示到小能客户端 isvip: "0",                              //是否为vip用户,0代表非会员,1代表会员,取值显示到小能客户端 userlevel: "1",                       //网站自定义会员级别,1-N,可根据选择判断,取值显示到小能客户端 erpparam: "abc"                          //erpparam为erp功能的扩展字段,可选,购买erp功能后用于erp功能集成 } //智慧客服,获取供应商编码 let userData = getSessionUserData() let roleAuthority = getRA() this.setState({roleIds: roleAuthority && roleAuthority.length>0? roleAuthority[0]: userData.roleIds}) this.setState({staffId: userData.userId}) this.setState({staffName: userData.fullName}) this.setState({supplierNumber: userData.organizationId}) //<<<<<<智慧客服end } onChange = (date, dateString) => { this.setState({ datevalue: moment(dateString, 'YYYY-MM'), datestring: dateString.split('-').join('') }) } onSearch = () => { const { datestring } = this.state; this.props.dispatch({ type: "dashboard/save", payload: { staloading: true } }) this.props.dispatch({ type: "dashboard/fetchJuryUpList", payload: { selectDate: datestring } }) } lookInfo = (id) => { // 公告查看 this.setState({ detailId: id, noticeDetail: true }) } noticeModel = () => { // 公告关闭消息弹窗 this.setState({ noticeDetail: false }) } onRateShow = async (record) => { // 进入评审室 await jurySaveInfo(record) this.setState({ recordData: record, enterVisible: true }) }; onRefresh = () => { //刷新 this.props.dispatch({ type: "dashboard/fetchJuryDownlist", payload: { pageNo: 1, pageSize: 4 } }) } enterModel = () => { // 公告关闭消息弹窗 this.setState({ enterVisible: false }) } initChatUI = () => { //智慧客服 if(this.state.isCloseWs && window.isCloseChatUIModal==undefined){ //弹窗主动关闭或者页面刷新 this.setState({optionsModal: true}) }else{ this.setState({isModalVisible: true}) this.setState({isCloseWs: false}) this.setState({isFlash :false}) } } render() { const { datevalue, detailId, noticeDetail, recordData, enterVisible, isModalVisible, isCloseWs, optionsModal, projectModal, supplierNumber, staffId, staffName, kfType, questionType, isFlash, roleIds} = this.state; //智慧客服state const { Juryuplist, Jurydownlist, staloading, tlist } = this.props; return ( <> this.initChatUI()}>咨询服务︵8:30|12:3013:00|17:00
}> {Juryuplist != "" && Juryuplist.map((item) => { let routerPath = '' // if (item.key == '公开招标') { // routerPath = '/ExpertReview/Review?proTypeCode=procurement_mode_1,procurement_mode_2' // } else if (item.key == '公开比选') { // routerPath = '/ExpertReview/Review?proTypeCode=procurement_mode_3' // } else if (item.key == '谈判') { // routerPath = '/ExpertReview/Review?proTypeCode=procurement_mode_5,procurement_mode_6' // } else if (item.key == '招募') { // routerPath = '/ExpertReview/Review?proTypeCode=procurement_mode_4' // } else if (item.key == '询价') { // routerPath = '/ExpertReview/Review?proTypeCode=procurement_mode_7' // } if (item.key == '公开招标') { routerPath = '/ExpertReview/Bid' } else if (item.key == '公开比选') { routerPath = '/ExpertReview/Comparison' } else if (item.key == '谈判') { routerPath = '/ExpertReview/Negotiation' } else if (item.key == '招募') { routerPath = '/ExpertReview/Recruit' } else if (item.key == '询价') { routerPath = '/ExpertReview/Inquiry' } return (
{item.key}
history.push(routerPath)}>
{item.description}
) }) } history.push('/notice/noticeList')}>更多}> {tlist != [] && tlist.map((item, index) => { return (
{ this.lookInfo(item.id) }} key={item.id}>
{index + 1}
{item.noticeTitle}
{item.updateDate}
) })}
{item.projectName}
标段名称:{item.sectionName}
项目负责人:{item.appManagerName}
开始评审时间:{item.openTime}
} />
{noticeDetail && { this.noticeModel() }} modalVisible={noticeDetail} />} {recordData == '' ? null : { this.enterModel() }} onRefresh={() => { this.onRefresh() }} recordData={recordData} />} {/*智慧客服*/} { this.setState({kfType: 2}) this.setState({projectModal: true}) }} openWin={(kfType, questionType)=>{ this.setState({questionType: questionType}) this.setState({kfType: kfType}) this.setState({optionsModal: false}) this.setState({isModalVisible: true}) this.setState({isCloseWs: false}) this.setState({isFlash :false}) }} closeWin={()=>{ this.setState({kfType: 0}) this.setState({questionType: 0}) this.setState({optionsModal: false}) this.setState({isModalVisible: false}) this.setState({isCloseWs: true}) this.setState({projectModal: false}) }} optionsModal={optionsModal} projectModal={projectModal} isModalVisible={isModalVisible} kfType={kfType} questionType={questionType} staffId={staffId} staffName={staffName} supplierNumber={supplierNumber} isCloseWs={isCloseWs} roleIds={roleIds} hideWin={()=>{ this.setState({optionsModal: false}) this.setState({isModalVisible: false}) }} closeOptionsModal={()=>{ this.setState({optionsModal: false}) }} closeProjectModal={()=>{ this.setState({projectModal: false}) }} msgAlert={()=>{ if(!isModalVisible) this.setState({isFlash: true}) }} /> ) } } export default Jury;