修改fe_service_ebtp_frontend\src\pages\MainPage\ProjectManager\manager.js
This commit is contained in:
@ -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 {
|
||||
}
|
||||
<div className="dashboard" style={{ height: innerHeight - 70, overflow: "hidden" }}>
|
||||
<Row className="topt">
|
||||
<Col span={8}><Card title="我的消息" bordered={false} className="cardtre" style={{ marginRight: "10px" }} extra={<div className="moret" onClick={() => history.push('/SystemMessage/message')}>更多<RightOutlined /></div>}>
|
||||
<Col span={8}><Card title="我的消息" bordered={false} className="cardtre" style={{ marginRight: "10px" }} extra={<div className="moret" onClick={() =>{
|
||||
/*history.push('/SystemMessage/message')*/
|
||||
if(isCloseWs){
|
||||
this.setState({optionsModal: true})
|
||||
}else{
|
||||
this.setState({isModalVisible: true})
|
||||
this.setState({isCloseWs: false})
|
||||
this.setState({isFlash :false})
|
||||
}
|
||||
}}>更多<RightOutlined /></div>}>
|
||||
{trelist != [] && trelist.map((item, index) => {
|
||||
return (
|
||||
<div onClick={() => { 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 ? <MessageDetail messId={messId} onCancel={() => { this.closeModel(), this.props.dispatch({type: "dashboard/fetchtlistre", payload: { pageNo: 1, pageSize: 7 }}) }} modalVisible={messageDetail} /> : null}
|
||||
{questVisible ? <QuestDetail questData={questData} onCancel={() => { this.closeParticipate(), this.props.dispatch({type: "dashboard/fetchtlistre", payload: { pageNo: 1, pageSize: 7 }}) }} modalVisible={questVisible} /> : null}
|
||||
{noticeDetail && <NoticeDetail detailId={detailId} onCancel={() => { this.noticeModel() }} modalVisible={noticeDetail} />}
|
||||
{/*智慧客服*/}
|
||||
<ChatUI
|
||||
openProjectWin={()=>{
|
||||
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})
|
||||
}}
|
||||
/>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user