由于是前后端分离的demo, 程序的后端我不管,我只负责把前端做好,这只是个demo, 还有很多不完善的地方。
2018-01-09新增:
后端的MQ事件结构现在也改了,该demo只能看看了。
html
当前状态状态改变时间姓名工号分机号对方号码呼入数呼出数
{ {item.agentStatus | transAgentStatus}}{ {item.agentStatusTime}}{ {item.userName}}{ {item.loginName}}{ {item.deviceId}}js
var tm = (function(){
var App = function(){};
var app = App.prototype;
var config = {
dest: 'http://xxx.xxx.xxx.xxx:58080/mvc/stomp',
topic: '/topic/csta/namespace/testwdd2.com'
// topic: '/topic/csta/device/8002@testwdd2.com'
};
var eventQueue = [];
var vm = new Vue({
el:'#event-queue',
data:{
eventQueue: eventQueue
}
});
Vue.filter('transAgentStatus', function(status){
switch(status){
case 'NotReady': return '未就绪';
case 'WorkNotReady': return '话后处理状态';
case 'Idle': return '就绪';
case 'OnCallIn': return '呼入通话';
case 'OnCallOut': return '呼出通话';
case 'Logout': return '登出';
case 'Ringing': return '振铃';
case 'OffHook': return '摘机';
case 'CallInternal': return '内部通话';
case 'Dailing': return '外线已经振铃';
case 'Ringback': return '回铃';
case 'Conference': return '会议';
case 'OnHold': return '保持';
case 'Other': return '其他';
}
return '';
<