增加参数questionType

This commit is contained in:
unknown
2022-05-13 11:02:56 +08:00
parent baec521f7c
commit 42b9e51aeb
3 changed files with 14 additions and 10 deletions

View File

@ -42,6 +42,7 @@ class manager extends PureComponent {
staffId: '', //智慧客服' staffId: '', //智慧客服'
staffName:'', //智慧客服 staffName:'', //智慧客服
kfType:0,//智慧客服 kfType:0,//智慧客服
questionType:0,//智慧客服
// NTKF_PARAM: { // NTKF_PARAM: {
// siteid: "bl_1000", //企业ID,为固定值 // siteid: "bl_1000", //企业ID,为固定值
// settingid: "bl_1000_1492484340268", //接待组ID为固定值必填 // settingid: "bl_1000_1492484340268", //接待组ID为固定值必填
@ -173,7 +174,7 @@ class manager extends PureComponent {
}; };
render() { render() {
const { downlist, projectlist, staloading, tlist, trelist, idList, dateNum } = this.props; 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,} = this.state; const { datevalue, messId, messageDetail, detailId, noticeDetail, questData, questVisible, mainDetail, isModalVisible, isCloseWs, optionsModal, projectModal, supplierNumber, staffId, staffName, kfType, questionType,} = this.state;
return ( return (
<> <>
{ {
@ -321,8 +322,9 @@ class manager extends PureComponent {
this.setState({kfType: 2}) this.setState({kfType: 2})
this.setState({projectModal: true}) this.setState({projectModal: true})
}} }}
openWin={(index)=>{ openWin={(kfType, questionType)=>{
this.setState({kfType: index}) this.setState({questionType: questionType})
this.setState({kfType: kfType})
this.setState({optionsModal: false}) this.setState({optionsModal: false})
this.setState({isModalVisible: true}) this.setState({isModalVisible: true})
this.setState({isCloseWs: false}) this.setState({isCloseWs: false})
@ -330,6 +332,7 @@ class manager extends PureComponent {
}} }}
closeWin={()=>{ closeWin={()=>{
this.setState({kfType: 0}) this.setState({kfType: 0})
this.setState({questionType: 0})
this.setState({optionsModal: false}) this.setState({optionsModal: false})
this.setState({isModalVisible: false}) this.setState({isModalVisible: false})
this.setState({isCloseWs: true}) this.setState({isCloseWs: true})
@ -338,8 +341,8 @@ class manager extends PureComponent {
optionsModal={optionsModal} optionsModal={optionsModal}
projectModal={projectModal} projectModal={projectModal}
isModalVisible={isModalVisible} isModalVisible={isModalVisible}
//supplierNo='EMPTY'
kfType={kfType} kfType={kfType}
questionType={questionType}
staffId={staffId} staffId={staffId}
staffName={staffName} staffName={staffName}
supplierNumber={supplierNumber} supplierNumber={supplierNumber}

View File

@ -26,6 +26,7 @@ const ChatInput = ((props) => {
isModalVisible, isModalVisible,
supplierNo, supplierNo,
kfType, kfType,
questionType,
conversationId, conversationId,
isSend, isSend,
sendMsg, sendMsg,
@ -200,8 +201,7 @@ const ChatInput = ((props) => {
"contentType": msg.message.type=="text"?1:msg.message.type=="image"?2:msg.message.type=="file"?3:'', "contentType": msg.message.type=="text"?1:msg.message.type=="image"?2:msg.message.type=="file"?3:'',
"custType": kfType == 2? 2 : 1, "custType": kfType == 2? 2 : 1,
"message": msg.message.type=="image" || msg.message.type=="file" ?JSON.stringify(msg.message.content):msg.message.content, "message": msg.message.type=="image" || msg.message.type=="file" ?JSON.stringify(msg.message.content):msg.message.content,
//"questionType": location.pathname.indexOf('/home')!=-1? 3 : 1, "questionType": questionType,
"questionType": 2,
"supplierNo": supplierNo "supplierNo": supplierNo
} }
API.sendToCs(params).then(res => { API.sendToCs(params).then(res => {

View File

@ -45,7 +45,7 @@ const conversation = (props) => {
const wid = 600 const wid = 600
const hei = 500 const hei = 500
let {isModalVisible, isCloseWs, closeWin, hideWin, msgAlert, supplierNumber, staffId, staffName, optionsModal, projectModal, closeOptionsModal, closeProjectModal, kfType, openWin, openProjectWin} = props let {isModalVisible, isCloseWs, closeWin, hideWin, msgAlert, supplierNumber, staffId, staffName, optionsModal, projectModal, closeOptionsModal, closeProjectModal, kfType, questionType, openWin, openProjectWin} = props
const onMsgRender = ()=>{ const onMsgRender = ()=>{
let serverAvatar = user let serverAvatar = user
let data = wsMsg let data = wsMsg
@ -292,7 +292,7 @@ const getProject = (params)=>{
} }
]) ])
closeProjectModal && closeProjectModal() closeProjectModal && closeProjectModal()
openWin && openWin(2) openWin && openWin(2,10)
}} }}
okText="确定" okText="确定"
cancelText="取消" cancelText="取消"
@ -317,6 +317,7 @@ const getProject = (params)=>{
textHeight={textHeight} textHeight={textHeight}
listHeight={listHeight} listHeight={listHeight}
kfType={kfType} kfType={kfType}
questionType={questionType}
supplierNo={kfType==1?'EMPTY':agentNumber} supplierNo={kfType==1?'EMPTY':agentNumber}
conversationId={conversationId} conversationId={conversationId}
closeWin={()=>{ closeWin={()=>{
@ -396,8 +397,8 @@ const getProject = (params)=>{
<Modal title="请选择您要咨询的客服类型" visible={optionsModal} footer={null} onCancel={()=>{ <Modal title="请选择您要咨询的客服类型" visible={optionsModal} footer={null} onCancel={()=>{
closeOptionsModal && closeOptionsModal() closeOptionsModal && closeOptionsModal()
}}> }}>
<p><a href="#" onClick={()=> openWin && openWin(1)}>点击咨询平台客服</a>平台操作相关问题</p> <p><a href="#" onClick={()=> openWin && openWin(1,2)}>点击咨询平台客服</a>平台操作相关问题</p>
<p><a href="#" onClick={()=> openWin && openWin(1)}>点击咨询智慧安全公司客服</a>iPASS及电子签章相关问题</p> <p><a href="#" onClick={()=> openWin && openWin(1,6)}>点击咨询智慧安全公司客服</a>iPASS及电子签章相关问题</p>
<p><a href="#" onClick={()=> openProjectWin && openProjectWin()}>点击咨询代理机构客服</a>项目内容相关问题</p> <p><a href="#" onClick={()=> openProjectWin && openProjectWin()}>点击咨询代理机构客服</a>项目内容相关问题</p>
</Modal> </Modal>
} }