增加获取角色功能

This commit is contained in:
unknown
2022-06-09 14:20:40 +08:00
parent 52f6fdc42d
commit 7610f7b8fd
8 changed files with 48 additions and 16 deletions

View File

@ -7,7 +7,7 @@ import talkPng from '@/images/talk/talk.png';
import { routerRedux } from 'dva/router';
import { RightOutlined } from '@ant-design/icons';
import moment from 'moment';
import { getSessionUserData } from '@/utils/session';
import { getSessionUserData, getRA } from '@/utils/session';
import { getURLInformation } from '@/utils/CommonUtils';
import NoticeDetail from '@/pages/notice/noticeList/components/NoticeDetail'
import ChatUI from '@/pages/customerservice/support/conversation' //智慧客服
@ -28,6 +28,7 @@ class manager extends PureComponent {
staffName:'', //智慧客服
kfType:0,//智慧客服
questionType:0,//智慧客服
roleIds:'',//智慧客服
}
componentDidMount() {
this.props.dispatch({
@ -45,6 +46,8 @@ class manager extends PureComponent {
}
//智慧客服,获取供应商编码
let userData = getSessionUserData()
let roleAuthority = getRA()
this.setState({roleIds: roleAuthority && roleAuthority.length>0? roleAuthority[0]: userData.roleIds})
this.setState({staffId: userData.userId})
this.setState({staffName: userData.fullName})
this.setState({supplierNumber: userData.organizationId})
@ -73,7 +76,7 @@ class manager extends PureComponent {
}
render() {
const { tlist, trelist } = this.props;
const { detailId, noticeDetail, isModalVisible, isCloseWs, optionsModal, projectModal, supplierNumber, staffId, staffName, kfType, questionType, isFlash} = this.state; //智慧客服state
const { detailId, noticeDetail, isModalVisible, isCloseWs, optionsModal, projectModal, supplierNumber, staffId, staffName, kfType, questionType, isFlash, roleIds} = this.state; //智慧客服state
return (
<>
<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>
@ -124,6 +127,7 @@ class manager extends PureComponent {
staffName={staffName}
supplierNumber={supplierNumber}
isCloseWs={isCloseWs}
roleIds={roleIds}
hideWin={()=>{
this.setState({optionsModal: false})
this.setState({isModalVisible: false})