mirror of
https://github.com/chatopera/cosin.git
synced 2025-07-20 04:23:01 +08:00
https://github.com/chatopera/cosin/issues/256 enable collect feedback
This commit is contained in:
parent
1c089992f5
commit
7a402bad40
@ -67,7 +67,7 @@ public class ACDVisBindingMw implements Middleware<ACDComposeContext> {
|
||||
ctx.getAgentUser().setSkill(null);
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(ctx.getAgentno())) {
|
||||
if (StringUtils.isNotBlank(ctx.getAgentno()) && (!StringUtils.equalsIgnoreCase(ctx.getAgentno(), "null"))) {
|
||||
logger.info("[apply] bind agentno {}, isInvite {}", ctx.getAgentno(), ctx.isInvite());
|
||||
// 绑定坐席
|
||||
// 绑定坐席有可能是因为前端展示了技能组和坐席
|
||||
|
@ -790,6 +790,7 @@ public class MainContext {
|
||||
SERVICE,
|
||||
WRITING,
|
||||
LEAVE, // 浏览器端执行退出
|
||||
SATISFACTION,
|
||||
AUDIT_MESSAGE, // 会话监控消息类型
|
||||
AUDIT_NEW,
|
||||
AUDIT_END,
|
||||
|
@ -56,6 +56,7 @@
|
||||
import org.springframework.util.FileCopyUtils;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
@ -1039,6 +1040,27 @@
|
||||
return request(super.createRequestPageTempletResponse("/apps/agent/contacts"));
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "/evaluation")
|
||||
@Menu(type = "apps", subtype = "evaluation")
|
||||
public String evaluation(HttpServletRequest request, @Valid String agentuserid) {
|
||||
AgentUser agentUser = agentUserRes.findByIdAndOrgi(agentuserid, super.getOrgi(request));
|
||||
|
||||
Message outMessage = new Message();
|
||||
outMessage.setChannelMessage(agentUser);
|
||||
outMessage.setAgentUser(agentUser);
|
||||
|
||||
peerSyncIM.send(
|
||||
MainContext.ReceiverType.VISITOR,
|
||||
MainContext.ChannelType.toValue(agentUser.getChannel()),
|
||||
agentUser.getAppid(),
|
||||
MainContext.MessageType.SATISFACTION,
|
||||
agentUser.getUserid(),
|
||||
outMessage,
|
||||
true);
|
||||
|
||||
return "ok";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/summary")
|
||||
@Menu(type = "apps", subtype = "summary")
|
||||
|
@ -78,6 +78,13 @@ public class ComposeMw2 implements Middleware<PeerContext> {
|
||||
ctx.getMessage().getChannelMessage(),
|
||||
true);
|
||||
return true;
|
||||
case SATISFACTION:
|
||||
NettyClients.getInstance().publishIMEventMessage(
|
||||
ctx.getTouser(),
|
||||
MainContext.MessageType.SATISFACTION.toString(),
|
||||
ctx.getMessage(),
|
||||
true);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -81,14 +81,26 @@ word-break: break-all;"><#if curagentuser??>${curagentuser.username!''}<#if cura
|
||||
</style>
|
||||
<script language="javascript">
|
||||
var editor , layer;
|
||||
$(document).ready(function(){
|
||||
// KindEditor.ready(function(K) {
|
||||
var K = KindEditor;
|
||||
|
||||
KindEditor.plugin('evaluation', function(K) {
|
||||
var editor = this, name = 'evaluation';
|
||||
editor.clickToolbar(name, function() {
|
||||
$.post('/agent/evaluation',{agentuserid:agentuserid}).success(function(){
|
||||
top.layer.msg('发送满意度调研成功!',{icon: 1, time: 3000})
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
KindEditor.lang({
|
||||
evaluation :'满意度评价'
|
||||
});
|
||||
|
||||
KindEditor.ready(function(K) {
|
||||
editor = K.create('#message', {
|
||||
height:"160px",
|
||||
themeType : 'simple',
|
||||
width:"100%",
|
||||
items:['emoticons', 'image','insertfile'],
|
||||
items:['emoticons', 'image','insertfile','evaluation'],
|
||||
resizeType:0,
|
||||
uploadJson : "/agent/image/upload.html?id=${curagentuser.id!''}",
|
||||
allowFileManager : false,
|
||||
@ -449,6 +461,13 @@ word-break: break-all;"><#if curagentuser??>${curagentuser.username!''}<#if cura
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
.ke-icon-evaluation {
|
||||
background-image: url(/im/img/evaluationa.png);
|
||||
background-position: 0px 0px;
|
||||
width: 20px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.layui-flow-more{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
@ -638,7 +638,16 @@
|
||||
socket.on('disconnect',function() {
|
||||
output('<span id="connect-message">连接坐席失败,在线咨询服务不可用</span>' , 'message connect-message');
|
||||
editor.readonly();
|
||||
});
|
||||
});
|
||||
|
||||
socket.on('satisfaction', function() {
|
||||
<#if sessionConfig?? && sessionConfig.satisfaction?? && sessionConfig.satisfaction>
|
||||
document.getElementById("diaShade").style.display = "block";
|
||||
document.getElementById("dialogWrap").style.display = "block";
|
||||
isAgentEnds = true;
|
||||
</#if>
|
||||
});
|
||||
|
||||
function sendDisconnect(){
|
||||
socket.disconnect();
|
||||
}
|
||||
|
@ -527,7 +527,13 @@
|
||||
}else if(data.calltype == "呼出"){
|
||||
output('<div class="chat-left"> <img class="user-img" src="<#if inviteData?? && inviteData.consult_dialog_headimg??>/res/image.html?id=${inviteData.consult_dialog_headimg?url}<#else>/images/agent.png</#if>" alt=""><div class="chat-message"><label class="user">'+data.username+'</label><label class="time">'+data.createtime+'</label> </div><div class="chatting-left"><i class="arrow"></i><div class="chat-content">'+chat+'</div></div>' , "chat-block");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
socket.on('satisfaction', function() {
|
||||
<#if sessionConfig?? && sessionConfig.satisfaction?? && sessionConfig.satisfaction>
|
||||
popup('block');
|
||||
</#if>
|
||||
});
|
||||
|
||||
socket.on('disconnect',function() {
|
||||
output('<span id="connect-message">连接坐席失败,在线咨询服务不可用</span>' , 'message connect-message');
|
||||
|
Loading…
x
Reference in New Issue
Block a user