UNPKG

fcc-core

Version:

Fusion communication center.

56 lines (50 loc) 1.76 kB
import nats from './index' // 人员状态上报主题 export function changeEmployeeStatus (status, xw, isHeart=true) { const isFS = xw.public.phone && ['1', '2'].includes(xw.getSysParam('CALLOUT_WAY')) && xw.userInfo.AGENT_ID xw.agentState = status // 修改系统agent_state 1:在线且空闲 2:在线且忙碌 3:离线 const orgId = xw.userInfo.ORG_ID const subject = `icp.store.employee.status.${orgId}` const params = { status: status, // 1-在线,2-通话,3-离线 icp_code: xw.userInfo.ICP_CODE + '', user_code: xw.userInfo.USER_CODE + '', EXTERNAL_SYS_ACCOUNT: xw.userInfo.EXTERNAL_SYS_ACCOUNT || '', org_id: orgId + '', type: 1 } if (isHeart && isFS ) { if (status === '2') { xw.ucc.sayBusy() } else if (status === '1') { xw.ucc.sayFree() } else { xw.ucc.signOut() } } nats.emit(subject, params) // 发布广播 } // 位置上报主题 export function reportStoreLocation (params) { const orgId = window.app.$store.getters.g_user.ORG_ID const subject = `icp.store.location.${orgId}` nats.emit(subject, params) } // 会议过程中地图信息共享主题 export function realMeetingMap (meetingId, params) { const subject = `icp.real.meeting.${meetingId}.map` nats.emit(subject, params) } // 会议话权状态上报 export function realMeetingSpeaker (meetingId, params) { const subject = `icp.real.meeting.${meetingId}.map` nats.emit(subject, params) } // 地图同步主题 export function icpEventMap (params) { const eventId = window.app.$store.state.dispatch.dispatchingEventID if (eventId) { const subject = `icp.map.event.${eventId}` nats.emit(subject, params) } }