增加获取角色功能

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

@ -8,7 +8,7 @@ import talkPng from '@/images/talk/talk.png';
import { routerRedux } from 'dva/router';
import { RightOutlined } from '@ant-design/icons';
import moment from 'moment';
import { followUpAProjectManager, getSessionUserData } from '@/utils/session';
import { followUpAProjectManager, getSessionUserData, getRA } from '@/utils/session';
import { getDefId } from './service';
import { getURLInformation } from '@/utils/CommonUtils';
import MessageDetail from '@/pages/SystemMessage/message/components/messageDetail'
@ -43,6 +43,7 @@ class manager extends PureComponent {
staffName:'', //智慧客服
kfType:0,//智慧客服
questionType:0,//智慧客服
roleIds:'',//智慧客服
// NTKF_PARAM: {
// siteid: "bl_1000", //企业ID,为固定值
// settingid: "bl_1000_1492484340268", //接待组ID为固定值必填
@ -84,6 +85,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})
@ -178,7 +181,7 @@ 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, isFlash} = this.state; //智慧客服state
const { datevalue, messId, messageDetail, detailId, noticeDetail, questData, questVisible, mainDetail, 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>
@ -340,6 +343,7 @@ class manager extends PureComponent {
staffName={staffName}
supplierNumber={supplierNumber}
isCloseWs={isCloseWs}
roleIds={roleIds}
hideWin={()=>{
this.setState({optionsModal: false})
this.setState({isModalVisible: false})