diff --git a/src/pages/MainPage/ProjectManager/manager.js b/src/pages/MainPage/ProjectManager/manager.js index 59aee38..6728594 100644 --- a/src/pages/MainPage/ProjectManager/manager.js +++ b/src/pages/MainPage/ProjectManager/manager.js @@ -14,6 +14,7 @@ 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 ChatUI from '@/pages/customerservice/support/conversation' import { getQuestList } from '@/pages/SystemMessage/message/service' @connect(({ dashboard, loading }) => ({ ...dashboard, @@ -29,7 +30,15 @@ class manager extends PureComponent { detailId: '1', // 公告id noticeDetail: false, // 公告弹窗 questData: {},//问卷数据 - questVisible: false //问卷弹窗 + questVisible: false, //问卷弹窗 + isModalVisible: false, //智慧客服 + isFlash: false, //智慧客服 + isCloseWs: true, //智慧客服 + optionsModal: false, //智慧客服 + projectModal: false, //智慧客服 + supplierNumber: '', //智慧客服 + staffId: '', //智慧客服' + staffName:'', //智慧客服 // NTKF_PARAM: { // siteid: "bl_1000", //企业ID,,为固定值 // settingid: "bl_1000_1492484340268", //接待组ID,为固定值,必填 @@ -65,6 +74,12 @@ class manager extends PureComponent { userlevel: "1",                       //网站自定义会员级别,1-N,可根据选择判断,取值显示到小能客户端 erpparam: "abc"                          //erpparam为erp功能的扩展字段,可选,购买erp功能后用于erp功能集成 } + //智慧客服,获取供应商编码 + let userData = getSessionUserData() + console.log(userData) + this.setState({staffId: userData.userId}) + this.setState({staffName: userData.fullName}) + this.setState({supplierNumber: userData? userData.organizationId: 'EMPTY'}) } onChange = (date, dateString) => { this.setState({ @@ -145,7 +160,7 @@ class manager extends PureComponent { }; render() { const { downlist, projectlist, staloading, tlist, trelist } = this.props; - const { datevalue, messId, messageDetail, detailId, noticeDetail, questData, questVisible } = this.state; + const { datevalue, messId, messageDetail, detailId, noticeDetail, questData, questVisible, isModalVisible, isCloseWs, optionsModal, projectModal, supplierNumber, staffId, staffName,} = this.state; //智慧客服 return ( <> { @@ -154,7 +169,16 @@ class manager extends PureComponent { }
- history.push('/SystemMessage/message')}>更多
}> + { + /*history.push('/SystemMessage/message')*/ + if(isCloseWs){ + this.setState({optionsModal: true}) + }else{ + this.setState({isModalVisible: true}) + this.setState({isCloseWs: false}) + this.setState({isFlash :false}) + } + }}>更多}> {trelist != [] && trelist.map((item, index) => { return (
{ item.templatetype == '3' ? this.toParticipate(item.servicecode) : this.lookDetail(item.msgId) }} className="messagetre" key={item.id}> @@ -274,6 +298,45 @@ class manager extends PureComponent { {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} />} + {/*智慧客服*/} + { + this.setState({projectModal: true}) + }} + openWin={()=>{ + this.setState({optionsModal: false}) + this.setState({isModalVisible: true}) + this.setState({isCloseWs: false}) + this.setState({isFlash :false}) + }} + closeWin={()=>{ + this.setState({optionsModal: false}) + this.setState({isModalVisible: false}) + this.setState({isCloseWs: true}) + this.setState({projectModal: false}) + }} + optionsModal={optionsModal} + projectModal={projectModal} + isModalVisible={isModalVisible} + //supplierNo='EMPTY' + staffId={staffId} + staffName={staffName} + supplierNumber={supplierNumber} + isCloseWs={isCloseWs} + 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}) + }} + /> ) }