替换小优客服
This commit is contained in:
@ -87,6 +87,7 @@ class manager extends PureComponent {
|
||||
this.setState({staffId: userData.userId})
|
||||
this.setState({staffName: userData.fullName})
|
||||
this.setState({supplierNumber: userData.organizationId})
|
||||
//<<<<<<智慧客服end
|
||||
this.approvalDetail()
|
||||
}
|
||||
onChange = (date, dateString) => {
|
||||
@ -150,12 +151,15 @@ class manager extends PureComponent {
|
||||
questVisible: false
|
||||
})
|
||||
}
|
||||
talkXy = () => {
|
||||
if (NTKF) {
|
||||
NTKF.im_openInPageChat('bl_1000_1492484340268');
|
||||
} else {
|
||||
message.warn('小优客服初始化失败,请联系系统管理员!')
|
||||
}
|
||||
initChatUI = () => {
|
||||
//智慧客服
|
||||
if(this.state.isCloseWs){
|
||||
this.setState({optionsModal: true})
|
||||
}else{
|
||||
this.setState({isModalVisible: true})
|
||||
this.setState({isCloseWs: false})
|
||||
this.setState({isFlash :false})
|
||||
}
|
||||
}
|
||||
followUpProject = async (data) => {
|
||||
// let defId = ''; //项目流程id
|
||||
@ -174,25 +178,14 @@ class manager extends PureComponent {
|
||||
};
|
||||
render() {
|
||||
const { downlist, projectlist, staloading, tlist, trelist, idList, dateNum } = this.props;
|
||||
const { datevalue, messId, messageDetail, detailId, noticeDetail, questData, questVisible, mainDetail, isModalVisible, isCloseWs, optionsModal, projectModal, supplierNumber, staffId, staffName, kfType, questionType,} = this.state;
|
||||
const { datevalue, messId, messageDetail, detailId, noticeDetail, questData, questVisible, mainDetail, isModalVisible, isCloseWs, optionsModal, projectModal, supplierNumber, staffId, staffName, kfType, questionType, isFlash} = this.state; //智慧客服state
|
||||
return (
|
||||
<>
|
||||
{
|
||||
START_ENV == 'UAT' || START_ENV == 'DEV' || START_ENV == 'sim' ? '' :
|
||||
<a className="talk" onClick={() => this.talkXy()}>咨询服务︵<span>8:30</span><span>|</span><span>12:30</span><span>13:00</span><span>|</span><span>17:00</span>︶<img src={talkPng} /></a>
|
||||
}
|
||||
<a className={isFlash && !isModalVisible ? "talk text-effect":"talk"} onClick={() => this.initChatUI()}>咨询服务︵<span>8:30</span><span>|</span><span>12:30</span><span>13:00</span><span>|</span><span>17:00</span>︶<img src={talkPng} /></a>
|
||||
<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')
|
||||
//智慧客服
|
||||
if(isCloseWs){
|
||||
this.setState({optionsModal: true})
|
||||
}else{
|
||||
this.setState({isModalVisible: true})
|
||||
this.setState({isCloseWs: false})
|
||||
this.setState({isFlash :false})
|
||||
}
|
||||
history.push('/SystemMessage/message')
|
||||
}}>更多<RightOutlined /></div>}>
|
||||
{trelist != [] && trelist.map((item, index) => {
|
||||
return (
|
||||
@ -316,8 +309,8 @@ class manager extends PureComponent {
|
||||
{
|
||||
idList.length > 0 ? <ApprovalDetail approvalId={idList[0]} dateNum={dateNum} trelist={idList} onCancel={() => { this.closeModel(), this.props.dispatch({ type: "dashboard/fetchtClarify", payload: { authorizestate: '0', templatetype: '4', size: 6 } }) }} modalVisible={mainDetail} /> : null
|
||||
}
|
||||
{/*智慧客服*/}
|
||||
<ChatUI
|
||||
{/*智慧客服*/}
|
||||
<ChatUI
|
||||
openProjectWin={()=>{
|
||||
this.setState({kfType: 2})
|
||||
this.setState({projectModal: true})
|
||||
@ -348,8 +341,8 @@ class manager extends PureComponent {
|
||||
supplierNumber={supplierNumber}
|
||||
isCloseWs={isCloseWs}
|
||||
hideWin={()=>{
|
||||
this.setState({optionsModal: false})
|
||||
this.setState({isModalVisible: false})
|
||||
this.setState({optionsModal: false})
|
||||
this.setState({isModalVisible: false})
|
||||
}}
|
||||
closeOptionsModal={()=>{
|
||||
this.setState({optionsModal: false})
|
||||
|
Reference in New Issue
Block a user