import React, { PureComponent } from 'react'; import { history } from 'umi'; import { Row, Col, Tooltip, Card, List, DatePicker, Button, Statistic, Spin, Empty, message } from 'antd'; // import PageHeaderWrapper from '@/components/PageHeaderWrapper'; 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 { followUpAProjectManager, getRA } from '@/utils/session'; import { getDefId } from './service'; import { getURLInformation } from '@/utils/CommonUtils'; import MessageDetail from '@/pages/SystemMessage/message/components/messageDetail' import NoticeDetail from '@/pages/notice/noticeList/components/NoticeDetail' import QuestDetail from '@/pages/SystemMessage/message/components/questDetail' import { getQuestList } from '@/pages/SystemMessage/message/service' import ApprovalDetail from '@/pages/SystemMessage/message/components/approvalDetail' @connect(({ dashboard, loading }) => ({ ...dashboard, downlistLoading: loading.effects['dashboard/fetchDowntlist'], projectlistLoading: loading.effects['dashboard/fetchprojectRecords'], })) class manager extends PureComponent { state = { datevalue: moment(moment().format('YYYYMM'), 'YYYY-MM'), datestring: moment().format('YYYYMM'), messId: '0', // 消息id messageDetail: false, // 消息弹窗 detailId: '1', // 公告id noticeDetail: false, // 公告弹窗 questData: {},//问卷数据 questVisible: false,//问卷弹窗 mainDetail: false, // 审批单消息弹窗 // NTKF_PARAM: { // siteid: "bl_1000", //企业ID,,为固定值 // settingid: "bl_1000_1492484340268", //接待组ID,为固定值,必填 // uid: "${getMyVisit().getCzy().getDlh()}",//登录号 uname:"${getMyVisit().getGG_JGBH().getJgmc()}"+"-"+"${getMyVisit().getCzy().getMc()}", //用户名,未登录可以为空,但是不能给null,uname赋予的值显示到小能客户端 // isvip: "0", //是否为vip用户,0代表非会员,1代表会员,取值显示到小能客户端 // userlevel: "1", //网站自定义会员级别,1-N,可根据选择判断,取值显示到小能客户端 // erpparam: "abc" //erpparam为erp功能的扩展字段,可选,购买erp功能后用于erp功能集成 // } } componentDidMount() { this.props.dispatch({ type: "dashboard/fetchDowntlist", payload: { limit: 4 } }) this.props.dispatch({ type: "dashboard/fetchprojectRecords", payload: { selectDate: moment().format('YYYYMM') } }) this.props.dispatch({ type: "dashboard/fetchtlist", payload: { limit: 7 } }) this.props.dispatch({ type: "dashboard/fetchtlistre", payload: { pageNo: 1, pageSize: 7 } }) this.props.dispatch({ type: "dashboard/fetchtClarify", payload: { authorizestate: '0', templatetype: '4', size: 6 } }) // 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功能集成 // } this.approvalDetail() } 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/fetchprojectRecords", payload: { selectDate: datestring } }) } lookDetail = (id) => { // 消息查看详情 this.setState({ messId: id, messageDetail: true }) } closeModel = () => { // 关闭消息弹窗 this.setState({ messageDetail: false, mainDetail: false, }) } lookInfo = (id) => { // 公告查看 this.setState({ detailId: id, noticeDetail: true }) } noticeModel = () => { // 公告关闭消息弹窗 this.setState({ noticeDetail: false }) } approvalDetail = () => { // 审批单消息查看详情 this.setState({ mainDetail: true }) } toParticipate = async (servicecode) => {//问卷调查弹窗 const { questId } = JSON.parse(servicecode); await getQuestList({ id: questId }).then(res => { if (res?.code == 200 && res?.success) { this.setState({ questData: res?.data, questVisible: true, }) } }) } closeParticipate = () => { // 关闭问卷调查弹窗 this.setState({ questVisible: false }) } followUpProject = async (data) => { // let defId = ''; //项目流程id // await getDefId(data.id).then((res) => { // if (res.code == 200) { // defId = res.data; // } // }); // let proTypeCode = ''; // getURLInformation('proTypeCode') != null ? (proTypeCode = getURLInformation('proTypeCode')) : null; // sessionStorage.setItem('proTypeCode', proTypeCode); // sessionStorage.setItem('defId', JSON.stringify(defId)); // sessionStorage.setItem('projectData', JSON.stringify(data)); await followUpAProjectManager(data); history.push('/ProjectLayout/Manager/HomePageSectionList'); }; render() { const { downlist, projectlist, staloading, tlist, trelist, idList, dateNum } = this.props; const { datevalue, messId, messageDetail, detailId, noticeDetail, questData, questVisible, mainDetail, } = this.state; return ( <> {/* 咨询服务︵8:30|12:3013:00|17:00 */}
{ history.push('/SystemMessage/message') }}>更多
}> {trelist != [] && trelist.map((item, index) => { return (
{ item.templatetype == '3' ? this.toParticipate(item.servicecode) : this.lookDetail(item.msgId) }} className="messagetre" key={item.id}>
{index + 1}
{item.title}
{item.createtime}
) })} }> {projectlist != "" ? projectlist.map((item) => { let routerPath = '' if (item.title == '公开招标') { routerPath = '/Bid/Manage' } else if (item.title == '公开比选') { routerPath = '/Comparison/Manage' } else if (item.title == '谈判') { routerPath = '/Negotiation/Manage' } else if (item.title == '招募') { routerPath = '/Recruit/Manage' } else if (item.title == '询价') { routerPath = '/Inquiry/Manage' } return (
{item.title}
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}
) })}
history.push('/Bid/Manage')}>更多}> { this.followUpProject({ id: item.id, bidMethodDict: item.bidMethodDict, biddingSignDict: item.biddingSignDict, isClientFile: item.isClientFile, isIPassDecode: item.isIPassDecode, isIPassFile: item.isIPassFile, projectName: item.projectName, openTenderForm: item.projectName }) }} style={{ height: "25%" }}>
{item.projectName}
建档时间:{item.createDate}
} />
history.push('/Recruit/Manage')}>更多}> { this.followUpProject({ id: item.id, bidMethodDict: item.bidMethodDict, biddingSignDict: item.biddingSignDict, isClientFile: item.isClientFile, isIPassDecode: item.isIPassDecode, isIPassFile: item.isIPassFile, projectName: item.projectName, openTenderForm: item.projectName }) }} style={{ height: "25%" }}>
{item.projectName}
建档时间:{item.createDate}
} />
history.push('/Negotiation/Manage')}>更多}> { this.followUpProject({ id: item.id, bidMethodDict: item.bidMethodDict, biddingSignDict: item.biddingSignDict, isClientFile: item.isClientFile, isIPassDecode: item.isIPassDecode, isIPassFile: item.isIPassFile, projectName: item.projectName, openTenderForm: item.projectName }) }} style={{ height: "25%" }}>
{item.projectName}
建档时间:{item.createDate}
} />
{messageDetail ? { this.closeModel(), this.props.dispatch({ type: "dashboard/fetchtlistre", payload: { pageNo: 1, pageSize: 7 } }) }} modalVisible={messageDetail} /> : null} {questVisible ? { this.closeParticipate(), this.props.dispatch({ type: "dashboard/fetchtlistre", payload: { pageNo: 1, pageSize: 7 } }) }} modalVisible={questVisible} /> : null} {noticeDetail && { this.noticeModel() }} modalVisible={noticeDetail} />} { idList.length > 0 ? { this.closeModel(), this.props.dispatch({ type: "dashboard/fetchtClarify", payload: { authorizestate: '0', templatetype: '4', size: 6 } }) }} modalVisible={mainDetail} /> : null } ) } } export default manager;