fcc-core
Version:
Fusion communication center.
41 lines (39 loc) • 1.26 kB
JavaScript
import AgentEvents from '../events/agentEvent'
import attribute from './agentAttribute'
import uccmethod from './uccmethod'
import voicecallevent from './voicecallevent'
import onlineevent from './onlineevent'
import agentmethod from './agentmethod'
import uccutils from './uccutils'
import { extend } from '../util/util'
import DB from '../util/log'
class CallManage {
constructor (xw) {
// 装载坐席属性配置
extend(this, attribute)
this.userInfo = xw.userInfo
this.xw = xw
// 绑定事件处理对象
this.eventctrl = new AgentEvents(this)
// 事件计时器
this.eventTimer = {}
// 绑定数据操作对象
this.db = new DB({
databasename: 'xwlog',
tablename: 'agentlog'
})
}
}
// 装载话务工具方法
extend(CallManage.prototype, uccutils)
// 装载坐席业务方法
extend(CallManage.prototype, uccmethod)
// 装载平台方法
extend(CallManage.prototype, agentmethod)
// 装载坐席在线操作事件处理逻辑
extend(CallManage.prototype, onlineevent)
// 装载语音相关事件业务处理逻辑
extend(CallManage.prototype, voicecallevent)
// const callmanage = new CallManage()
// window.ucc = callmanage
export default CallManage