Merge branch 'master' of http://gitlab.tianti.tg.unicom.local/eshop/fe_service_ebtp_frontend into master_jnryy_customerservice

This commit is contained in:
jl-zhoujl2
2023-01-31 09:56:50 +08:00
268 changed files with 28966 additions and 3131 deletions

View File

@ -3,11 +3,11 @@ import { history } from 'umi';
import { Row, Col, Tooltip, Card, List, DatePicker, Button, Statistic, Spin, Empty, message } from 'antd';
import { connect } from 'dva';
import './index.less';
import talkPng from '@/images/talk/talk.png';
// import talkPng from '@/images/talk/talk.png';
import { routerRedux } from 'dva/router';
import { RightOutlined } from '@ant-design/icons';
import moment from 'moment';
import { getSessionUserData, getRA } from '@/utils/session';
import { getRA } from '@/utils/session';
import { getDefId } from './service';
import { getURLInformation } from '@/utils/CommonUtils';
import MessageDetail from '@/pages/SystemMessage/message/components/messageDetail'
@ -16,7 +16,7 @@ import NoticeModal from '@/pages/Auction/NoticeModal/noticeModal'
import StopReason from '@/pages/Auction/NoticeModal/stopReason'
import QuestDetail from '@/pages/SystemMessage/message/components/questDetail'
import { getQuestList } from '@/pages/SystemMessage/message/service'
import {submitHiddenForm, createHiddenForm} from '@/utils/CustomerService' //智慧客服
import { submitHiddenForm, createHiddenForm } from '@/utils/CustomerService' //智慧客服
@connect(({ dashboard, loading }) => ({
...dashboard,
fetchtShotList: loading.effects['dashboard/fetchtShotList'],
@ -36,7 +36,7 @@ class manager extends PureComponent {
isModalVisible: false, // 中止原因弹窗
questData: {},//问卷数据
questVisible: false, //问卷弹窗服
roleIds:'',//智慧客服
roleIds: '',//智慧客服
}
componentDidMount() {
this.props.dispatch({
@ -51,19 +51,19 @@ class manager extends PureComponent {
type: "dashboard/fetchtShotList",
payload: { pageNo: 1, pageSize: 4, limit: 4 }
}),
this.props.dispatch({
type: "dashboard/fetchtlistre",
payload: { pageNo: 1, pageSize: 7 }
})
NTKF_PARAM = {
siteid: "bl_1000",                    //企业ID,为固定值
settingid: "bl_1000_1492484340268",           //接待组ID为固定值必填
uid: getSessionUserData()?.userId,
uname: getSessionUserData()?.deptName + "-" + getSessionUserData()?.fullName,            //用户名未登录可以为空但是不能给nulluname赋予的值显示到小能客户端
isvip: "0",                              //是否为vip用户0代表非会员1代表会员取值显示到小能客户端
userlevel: "1",                       //网站自定义会员级别1-N可根据选择判断取值显示到小能客户端
erpparam: "abc"                          //erpparam为erp功能的扩展字段可选购买erp功能后用于erp功能集成
}
this.props.dispatch({
type: "dashboard/fetchtlistre",
payload: { pageNo: 1, pageSize: 7 }
})
// NTKF_PARAM = {
// siteid: "bl_1000",                    //企业ID,为固定值
// settingid: "bl_1000_1492484340268",           //接待组ID为固定值必填
// uid: getSessionUserData()?.userId,
// uname: getSessionUserData()?.deptName + "-" + getSessionUserData()?.fullName,            //用户名未登录可以为空但是不能给nulluname赋予的值显示到小能客户端
// isvip: "0",                              //是否为vip用户0代表非会员1代表会员取值显示到小能客户端
// userlevel: "1",                       //网站自定义会员级别1-N可根据选择判断取值显示到小能客户端
// erpparam: "abc"                          //erpparam为erp功能的扩展字段可选购买erp功能后用于erp功能集成
// }
}
onChange = (date, dateString) => {
this.setState({
@ -109,14 +109,14 @@ class manager extends PureComponent {
toParticipate = async (servicecode) => {//问卷调查弹窗
const { questId } = JSON.parse(servicecode);
await getQuestList({ id: questId }).then(res => {
if (res?.code == 200 && res?.success) {
this.setState({
questData: res?.data,
questVisible: true,
})
}
if (res?.code == 200 && res?.success) {
this.setState({
questData: res?.data,
questVisible: true,
})
}
})
}
}
closeParticipate = () => { // 关闭问卷调查弹窗
this.setState({
questVisible: false
@ -141,63 +141,64 @@ class manager extends PureComponent {
sessionStorage.setItem('projectData', JSON.stringify(projectData));
window.open("/AuctionViewAuctions/Index");
}
//触发客服
initChatUI = ()=>{
//触发客服
initChatUI = () => {
let roleAuthority = sessionStorage.getItem('roleAuthority');
let data = getSessionUserData();
const inputList = [
{
label:null,
paraName:'origin',
isEncode:false,
paraVal:'eBid',
},
{
label:null,
paraName:'organizationId',
isEncode:false,
paraVal: data.organizationId,
},
{
label:null,
paraName:'tenderAgencyId',
isEncode:false,
paraVal:'EMPTY',
},
{
label:null,
paraName:'tenderAgencyName',
isEncode:true,
paraVal:'招标采购中心客服',
},
{
label:null,
paraName:'roleAuthority',
isEncode:false,
paraVal:JSON.parse(roleAuthority)[0],
},
{
label:null,
paraName:'module',
isEncode:false,
paraVal:'2',
},
{
label:null,
paraName:'custType',
isEncode:false,
paraVal:'1',
},
{
label: null,
paraName: 'origin',
isEncode: false,
paraVal: 'eBid',
},
{
label: null,
paraName: 'organizationId',
isEncode: false,
paraVal: data.organizationId,
},
{
label: null,
paraName: 'tenderAgencyId',
isEncode: false,
paraVal: 'EMPTY',
},
{
label: null,
paraName: 'tenderAgencyName',
isEncode: true,
paraVal: '招标采购中心客服',
},
{
label: null,
paraName: 'roleAuthority',
isEncode: false,
paraVal: JSON.parse(roleAuthority)[0],
},
{
label: null,
paraName: 'module',
isEncode: false,
paraVal: '2',
},
{
label: null,
paraName: 'custType',
isEncode: false,
paraVal: '1',
},
]
createHiddenForm(inputList, window.location.pathname)
submitHiddenForm()
}
render() {
const { projectlist, staloading, tlist, trelist, shotList, Participants } = this.props;
const { datevalue, messId, messageDetail, detailId, noticeDetail, noticeModalVis, projectId, isModalVisible, tpid, questData, questVisible, } = this.state;
const { datevalue, messId, messageDetail, detailId, noticeDetail, noticeModalVis, projectId, isModalVisible, tpid, questData, questVisible, } = this.state;
return (
<>
<a className="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>
<a className="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')}>更多<RightOutlined /></div>}>
@ -281,8 +282,8 @@ class manager extends PureComponent {
</Col>
</Row>
</div>
{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}
{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} />}
<NoticeModal projectId={projectId} state={'3'} vis={noticeModalVis} close={() => { this.noticeModel() }} />
<StopReason tpid={tpid} modalVisible={isModalVisible} onCancel={() => { this.noticeModel() }} />