diff --git a/contact-center/admin/dev.sh b/contact-center/admin/dev.sh new file mode 100644 index 00000000..eaf87c41 --- /dev/null +++ b/contact-center/admin/dev.sh @@ -0,0 +1,13 @@ +#! /bin/bash +########################################### +# +########################################### + +# constants +baseDir=$(cd `dirname "$0"`;pwd) +# functions + +# main +[ -z "${BASH_SOURCE[0]}" -o "${BASH_SOURCE[0]}" = "$0" ] || return +cd $baseDir/../app +SPRING_PROFILES_ACTIVE=dev mvn spring-boot:run \ No newline at end of file diff --git a/contact-center/app/.gitignore b/contact-center/app/.gitignore index c673875b..2d941f0e 100644 --- a/contact-center/app/.gitignore +++ b/contact-center/app/.gitignore @@ -9,4 +9,7 @@ src/main/resources/templates/admin/channel/* src/main/resources/templates/apps/callout src/main/resources/templates/apps/chatbot src/main/resources/templates/apps/callcenter + +# ignore system views for chatbot +src/main/resources/templates/admin/system/chatbot logs/ diff --git a/contact-center/app/pom.xml b/contact-center/app/pom.xml index 07ab5287..741c949b 100644 --- a/contact-center/app/pom.xml +++ b/contact-center/app/pom.xml @@ -9,7 +9,7 @@ com.chatopera.cc cc-root - 6.0.0-SNAPSHOT + 6.1.0-SNAPSHOT @@ -130,10 +130,10 @@ - hain - Hai Liang Wang - hain@chatopera.com - https://github.com/Samurais + chatopera + Chatopera + info@chatopera.com + https://www.chatopera.com Chatopera Inc. https://www.chatopera.com diff --git a/contact-center/app/src/main/java/com/chatopera/cc/acd/ACDAgentService.java b/contact-center/app/src/main/java/com/chatopera/cc/acd/ACDAgentService.java index 750c49ec..25f1d732 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/acd/ACDAgentService.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/acd/ACDAgentService.java @@ -117,6 +117,7 @@ public class ACDAgentService { * 发送消息给访客 */ Message outMessage = new Message(); + outMessage.setAgentUser(ctx.getAgentUser()); outMessage.setMessage(ctx.getMessage()); outMessage.setMessageType(MainContext.MessageType.MESSAGE.toString()); outMessage.setCalltype(MainContext.CallType.IN.toString()); @@ -127,7 +128,8 @@ public class ACDAgentService { } MainContext.getPeerSyncIM().send(MainContext.ReceiverType.VISITOR, - MainContext.ChannelType.WEBIM, ctx.getAppid(), + MainContext.ChannelType.toValue(ctx.getChannel()), + ctx.getAppid(), MainContext.MessageType.NEW, ctx.getOnlineUserId(), outMessage, true); @@ -380,6 +382,8 @@ public class ACDAgentService { agentStatusRes.save(agentStatus); } + Message outMessage = new Message(); + /** * 发送到访客端的通知 */ @@ -387,7 +391,6 @@ public class ACDAgentService { case WEBIM: // WebIM 发送对话结束事件 // 向访客发送消息 - Message outMessage = new Message(); outMessage.setAgentStatus(agentStatus); outMessage.setMessage(acdMessageHelper.getServiceFinishMessage(agentUser.getChannel(), agentUser.getSkill(), orgi)); outMessage.setMessageType(MainContext.AgentUserStatusEnum.END.toString()); @@ -418,6 +421,30 @@ public class ACDAgentService { NettyClients.getInstance().sendCalloutEventMessage( agentUser.getAgentno(), MainContext.MessageType.END.toString(), agentUser); break; + case MESSENGER: + outMessage.setAgentStatus(agentStatus); + outMessage.setMessage(acdMessageHelper.getServiceFinishMessage(agentUser.getChannel(), agentUser.getSkill(), orgi)); + outMessage.setMessageType(MainContext.AgentUserStatusEnum.END.toString()); + outMessage.setCalltype(MainContext.CallType.IN.toString()); + outMessage.setCreatetime(MainUtils.dateFormate.format(new Date())); + outMessage.setAgentUser(agentUser); + + // 向访客发送消息 + peerSyncIM.send( + MainContext.ReceiverType.VISITOR, + MainContext.ChannelType.toValue(agentUser.getChannel()), agentUser.getAppid(), + MainContext.MessageType.STATUS, agentUser.getUserid(), outMessage, true + ); + + if (agentStatus != null) { + // 坐席在线,通知结束会话 + outMessage.setChannelMessage(agentUser); + outMessage.setAgentUser(agentUser); + peerSyncIM.send(MainContext.ReceiverType.AGENT, MainContext.ChannelType.MESSENGER, + agentUser.getAppid(), + MainContext.MessageType.END, agentUser.getAgentno(), outMessage, true); + } + break; default: logger.info( "[finishAgentService] ignore notify agent service end for channel {}, agent user id {}", diff --git a/contact-center/app/src/main/java/com/chatopera/cc/acd/middleware/visitor/ACDVisBodyParserMw.java b/contact-center/app/src/main/java/com/chatopera/cc/acd/middleware/visitor/ACDVisBodyParserMw.java index cc434dd3..d4283c09 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/acd/middleware/visitor/ACDVisBodyParserMw.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/acd/middleware/visitor/ACDVisBodyParserMw.java @@ -205,6 +205,13 @@ public class ACDVisBodyParserMw implements Middleware { default: } ctx.setChannelMessage(ctx.getAgentUser()); + } else { + ctx.setNoagent(true); + ctx.setMessage(acdMessageHelper.getNoAgentMessage( + 0, + ctx.getChannel(), + ctx.getOrganid(), + ctx.getOrgi())); } logger.info( diff --git a/contact-center/app/src/main/java/com/chatopera/cc/basic/Constants.java b/contact-center/app/src/main/java/com/chatopera/cc/basic/Constants.java index a023fe9e..0de3e7c5 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/basic/Constants.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/basic/Constants.java @@ -78,6 +78,7 @@ public class Constants { * Channels */ public static final String CHANNEL_TYPE_WEBIM = "webim"; + public static final String CHANNEL_TYPE_MESSENGER = "messenger"; public final static String IM_MESSAGE_TYPE_MESSAGE = "message"; public final static String IM_MESSAGE_TYPE_WRITING = "writing"; public final static String CHATBOT_EVENT_TYPE_CHAT = "chat"; @@ -89,6 +90,7 @@ public class Constants { public final static String CSKEFU_MODULE_CHATBOT = "chatbot"; public final static String CSKEFU_MODULE_CONTACTS = "contacts"; public final static String CSKEFU_MODULE_SKYPE = "skype"; + public final static String CSKEFU_MODULE_MESSENGER = "messenger"; public final static String CSKEFU_MODULE_CCA = "cca"; public final static String CSKEFU_MODULE_ENTIM = "entim"; public final static String CSKEFU_MODULE_WORKORDERS = "workorders"; @@ -121,7 +123,11 @@ public class Constants { // 发送给聊天机器人并处理返回结果 public final static String INSTANT_MESSAGING_MQ_QUEUE_CHATBOT = "cskefu.outbound.chatbot"; public static final String AUDIT_AGENT_MESSAGE = "cskefu.agent.audit"; + // 机器人返回的结果数据来源为faq + public final static String PROVIDER_FAQ = "faq"; + // Facebook OTN 发送 + public final static String INSTANT_MESSAGING_MQ_QUEUE_FACEBOOK_OTN = "cskefu.outbound.faceboot.otn"; /** * 登录用户的唯一登录会话管理 diff --git a/contact-center/app/src/main/java/com/chatopera/cc/basic/MainContext.java b/contact-center/app/src/main/java/com/chatopera/cc/basic/MainContext.java index 0affabdc..3f6e2e46 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/basic/MainContext.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/basic/MainContext.java @@ -635,6 +635,7 @@ public class MainContext { WEBIM, PHONE, SKYPE, + MESSENGER, EMAIL, AI; @@ -904,6 +905,7 @@ public class MainContext { APP, TELECOM, SKYPE, + MESSENGER, OTHER, WEIBO; @@ -1017,6 +1019,15 @@ public class MainContext { } } + public enum FbMessengerStatus { + ENABLED, + DISABLED; + + public String toString() { + return super.toString().toLowerCase(); + } + } + /** * 呼出电话的主叫类型 */ diff --git a/contact-center/app/src/main/java/com/chatopera/cc/basic/MainUtils.java b/contact-center/app/src/main/java/com/chatopera/cc/basic/MainUtils.java index 72c59fb4..d733a6a6 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/basic/MainUtils.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/basic/MainUtils.java @@ -34,8 +34,13 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; import com.googlecode.aviator.AviatorEvaluator; -import freemarker.template.Configuration; -import freemarker.template.TemplateException; +import de.neuland.pug4j.Pug4J; +import de.neuland.pug4j.PugConfiguration; +import de.neuland.pug4j.expression.JexlExpressionHandler; +import de.neuland.pug4j.parser.Parser; +import de.neuland.pug4j.parser.node.Node; +import de.neuland.pug4j.template.PugTemplate; +import de.neuland.pug4j.template.ReaderTemplateLoader; import io.netty.handler.codec.http.HttpHeaders; import net.coobird.thumbnailator.Thumbnails; import org.apache.commons.beanutils.BeanUtilsBean; @@ -59,6 +64,7 @@ import org.springframework.util.ClassUtils; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import java.awt.image.BufferedImage; import java.beans.BeanInfo; import java.beans.Introspector; import java.beans.PropertyDescriptor; @@ -748,7 +754,7 @@ public class MainUtils { public static File processImage(final File destFile, final File imageFile) throws IOException { if (imageFile != null && imageFile.exists()) { - Thumbnails.of(imageFile).width(460).keepAspectRatio(true).toFile(destFile); + Thumbnails.of(imageFile).imageType(BufferedImage.TYPE_INT_ARGB).width(460).keepAspectRatio(true).toFile(destFile); } return destFile; } @@ -973,25 +979,32 @@ public class MainUtils { return hexString.toString(); } + private static PugTemplate getPugTemplate(String name, String templet) throws IOException { + Reader reader = new StringReader(templet); + ReaderTemplateLoader loader = new ReaderTemplateLoader(reader, name); + JexlExpressionHandler expressionHandler = new JexlExpressionHandler(); + Parser parser = new Parser(name, loader, expressionHandler); + Node root = parser.parse(); + PugTemplate template = new PugTemplate(); + template.setExpressionHandler(expressionHandler); + template.setTemplateLoader(loader); + template.setRootNode(root); + return template; + } + /** * @throws IOException - * @throws TemplateException */ @SuppressWarnings("deprecation") - public static String getTemplet(String templet, Map values) throws IOException, TemplateException { - StringWriter writer = new StringWriter(); - Configuration cfg = null; - freemarker.template.Template template = null; - String retValue = templet; - if (templet != null && templet.length() > 0 && templet.indexOf("$") >= 0) { - cfg = new Configuration(); - TempletLoader loader = new TempletLoader(templet); - cfg.setTemplateLoader(loader); - cfg.setDefaultEncoding("UTF-8"); - template = cfg.getTemplate(""); - template.process(values, writer); - retValue = writer.toString(); - } + public static String getTemplet(String templet, Map values) throws IOException { + PugTemplate template = getPugTemplate("templet.pug", templet); + + PugConfiguration config = new PugConfiguration(); + config.setCaching(false); + config.setMode(Pug4J.Mode.XML); + config.setPrettyPrint(true); + String retValue = config.renderTemplate(template,values); + return retValue; } diff --git a/contact-center/app/src/main/java/com/chatopera/cc/basic/Viewport.java b/contact-center/app/src/main/java/com/chatopera/cc/basic/Viewport.java index 8db72d4d..6d3c1e93 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/basic/Viewport.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/basic/Viewport.java @@ -18,10 +18,10 @@ package com.chatopera.cc.basic; public class Viewport { private String page; - private String templet; + private String template; - public Viewport(String templet, String page) { - this.templet = templet; + public Viewport(String template, String page) { + this.template = template; this.page = page; } @@ -37,11 +37,11 @@ public class Viewport { this.page = page; } - public String getTemplet() { - return templet; + public String getTemplate() { + return template; } - public void setTemplet(String templet) { - this.templet = templet; + public void setTemplate(String template) { + this.template = template; } } diff --git a/contact-center/app/src/main/java/com/chatopera/cc/basic/plugins/PluginRegistry.java b/contact-center/app/src/main/java/com/chatopera/cc/basic/plugins/PluginRegistry.java index c37a70c4..a8735084 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/basic/plugins/PluginRegistry.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/basic/plugins/PluginRegistry.java @@ -33,6 +33,8 @@ public class PluginRegistry { */ public final static String PLUGIN_CHANNEL_MESSAGER_SUFFIX = "ChannelMessager"; + public final static String PLUGIN_CHATBOT_MESSAGER_SUFFIX = "ChatbotMessager"; + // 插件列表 private final List plugins = new ArrayList<>(); diff --git a/contact-center/app/src/main/java/com/chatopera/cc/config/CSKeFuWebAppConfigurer.java b/contact-center/app/src/main/java/com/chatopera/cc/config/CSKeFuWebAppConfigurer.java index df81be53..4313cdf9 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/config/CSKeFuWebAppConfigurer.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/config/CSKeFuWebAppConfigurer.java @@ -32,7 +32,7 @@ public class CSKeFuWebAppConfigurer // 多个拦截器组成一个拦截器链 // addPathPatterns 用于添加拦截规则 // excludePathPatterns 用户排除拦截 - registry.addInterceptor(new UserInterceptorHandler()).addPathPatterns("/**").excludePathPatterns("/login.html","/im/**","/res/image*","/res/file*","/cs/**"); + registry.addInterceptor(new UserInterceptorHandler()).addPathPatterns("/**").excludePathPatterns("/login.html","/im/**","/res/image*","/res/file*","/cs/**","/messenger/webhook/*"); registry.addInterceptor(new CrossInterceptorHandler()).addPathPatterns("/**"); registry.addInterceptor(new LogIntercreptorHandler()).addPathPatterns("/**"); super.addInterceptors(registry); diff --git a/contact-center/app/src/main/java/com/chatopera/cc/config/PugConfig.java b/contact-center/app/src/main/java/com/chatopera/cc/config/PugConfig.java new file mode 100644 index 00000000..a7c82978 --- /dev/null +++ b/contact-center/app/src/main/java/com/chatopera/cc/config/PugConfig.java @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2020 Chatopera Inc, + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.chatopera.cc.config; + +import org.springframework.beans.factory.annotation.Value; +import de.neuland.pug4j.PugConfiguration; +import de.neuland.pug4j.spring.template.SpringTemplateLoader; +import de.neuland.pug4j.spring.view.PugViewResolver; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.ViewResolver; + +@Configuration +public class PugConfig { + @Value("${spring.pug4j.cache}") + private Boolean pug4jCache; + + @Value("${spring.pug4j.template-loader-path}") + private String templatePath; + + @Bean + public SpringTemplateLoader templateLoader() { + SpringTemplateLoader templateLoader = new SpringTemplateLoader(); + templateLoader.setTemplateLoaderPath(templatePath); + templateLoader.setEncoding("UTF-8"); + templateLoader.setSuffix(".pug"); + return templateLoader; + } + + @Bean + public PugConfiguration pugConfiguration() { + PugConfiguration configuration = new PugConfiguration(); + configuration.setCaching(pug4jCache); + configuration.setTemplateLoader(templateLoader()); + return configuration; + } + + @Bean + public ViewResolver viewResolver() { + PugViewResolver viewResolver = new PugCskefuViewResolver(); + viewResolver.setConfiguration(pugConfiguration()); + viewResolver.setOrder(0); + viewResolver.setSuffix(".pug"); + return viewResolver; + } +} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/config/PugCskefuViewResolver.java b/contact-center/app/src/main/java/com/chatopera/cc/config/PugCskefuViewResolver.java new file mode 100644 index 00000000..d63fcaa5 --- /dev/null +++ b/contact-center/app/src/main/java/com/chatopera/cc/config/PugCskefuViewResolver.java @@ -0,0 +1,17 @@ +package com.chatopera.cc.config; + +import de.neuland.pug4j.spring.view.PugView; +import de.neuland.pug4j.spring.view.PugViewResolver; +import org.springframework.web.servlet.view.AbstractUrlBasedView; + +public class PugCskefuViewResolver extends PugViewResolver { + @Override + protected AbstractUrlBasedView buildView(String viewName) throws Exception { + AbstractUrlBasedView view = super.buildView(viewName); + if (viewName.startsWith("/resource/css")) { + PugView pugView = (PugView) view; + pugView.setContentType("text/css ; charset=UTF-8"); + } + return view; + } +} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/ApplicationController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/ApplicationController.java index 8cc7648d..172d19dd 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/ApplicationController.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/controller/ApplicationController.java @@ -86,7 +86,7 @@ public class ApplicationController extends Handler { @RequestMapping("/") public ModelAndView admin(HttpServletRequest request) { // logger.info("[admin] path {} queryString {}", request.getPathInfo(),request.getQueryString()); - ModelAndView view = request(super.createRequestPageTempletResponse("/apps/index")); + ModelAndView view = request(super.createView("/apps/index")); User logined = super.getUser(request); Organ currentOrgan = super.getOrgan(request); @@ -156,7 +156,7 @@ public class ApplicationController extends Handler { @RequestMapping("/lazyAgentStatus") public ModelAndView lazyAgentStatus(HttpServletRequest request) { - ModelAndView view = request(super.createRequestPageTempletResponse("/public/agentstatustext")); + ModelAndView view = request(super.createView("/public/agentstatustext")); Organ currentOrgan = super.getOrgan(request); view.addObject("agentStatusReport", acdWorkMonitor.getAgentReport(currentOrgan != null ? currentOrgan.getId() : null, super.getOrgi(request))); diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/Handler.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/Handler.java index fdc3cc41..9ff235e1 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/Handler.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/controller/Handler.java @@ -25,7 +25,6 @@ import com.chatopera.cc.controller.api.QueryParams; import com.chatopera.cc.exception.CSKefuException; import com.chatopera.cc.model.Organ; import com.chatopera.cc.model.StreamingFile; -import com.chatopera.cc.model.SystemConfig; import com.chatopera.cc.model.User; import com.chatopera.cc.persistence.blob.JpaBlobHelper; import com.chatopera.cc.persistence.repository.StreamingFileRepository; @@ -392,7 +391,7 @@ public class Handler { * @param page * @return */ - public Viewport createAdminTempletResponse(String page) { + public Viewport createViewIncludedByFreemarkerTplForAdmin(String page) { return new Viewport("/admin/include/tpl", page); } @@ -402,7 +401,7 @@ public class Handler { * @param page * @return */ - public Viewport createAppsTempletResponse(String page) { + public Viewport createViewIncludedByFreemarkerTpl(String page) { return new Viewport("/apps/include/tpl", page); } @@ -412,11 +411,11 @@ public class Handler { * @param page * @return */ - public Viewport createEntIMTempletResponse(final String page) { + public Viewport createViewIncludedByFreemarkerTplForEntIM(final String page) { return new Viewport("/apps/entim/include/tpl", page); } - public Viewport createRequestPageTempletResponse(final String page) { + public Viewport createView(final String page) { return new Viewport(page); } @@ -425,7 +424,7 @@ public class Handler { * @return */ public ModelAndView request(Viewport data) { - return new ModelAndView(data.getTemplet() != null ? data.getTemplet() : data.getPage(), "data", data); + return new ModelAndView(data.getTemplate() != null ? data.getTemplate() : data.getPage(), "data", data); } public int getP(HttpServletRequest request) { diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/LoginController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/LoginController.java index ef7e77eb..0f81bb84 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/LoginController.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/controller/LoginController.java @@ -127,7 +127,7 @@ public class LoginController extends Handler { } } catch (EncryptionOperationNotPossibleException e) { logger.error("[login] error:", e); - view = request(super.createRequestPageTempletResponse("/public/clearcookie")); + view = request(super.createView("/public/clearcookie")); return view; } catch (NoSuchAlgorithmException e) { logger.error("[login] error:", e); @@ -232,7 +232,7 @@ public class LoginController extends Handler { } } } else { - view = request(super.createRequestPageTempletResponse("/login")); + view = request(super.createView("/login")); if (StringUtils.isNotBlank(referer)) { view.addObject("referer", referer); } @@ -342,9 +342,9 @@ public class LoginController extends Handler { @RequestMapping(value = "/register") @Menu(type = "apps", subtype = "user", access = true) public ModelAndView register(HttpServletRequest request, HttpServletResponse response, @Valid String msg) { - ModelAndView view = request(super.createRequestPageTempletResponse("redirect:/")); + ModelAndView view = request(super.createView("redirect:/")); if (request.getSession(true).getAttribute(Constants.USER_SESSION_NAME) == null) { - view = request(super.createRequestPageTempletResponse("/register")); + view = request(super.createView("/register")); } if (StringUtils.isNotBlank(msg)) { view.addObject("msg", msg); @@ -358,7 +358,7 @@ public class LoginController extends Handler { String msg = ""; msg = validUser(user); if (StringUtils.isNotBlank(msg)) { - return request(super.createRequestPageTempletResponse("redirect:/register.html?msg=" + msg)); + return request(super.createView("redirect:/register.html?msg=" + msg)); } else { user.setUname(user.getUsername()); user.setAdmin(true); diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/AdminController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/AdminController.java index 4d521342..742a1b95 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/AdminController.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/AdminController.java @@ -67,7 +67,7 @@ public class AdminController extends Handler { @RequestMapping("/admin") public ModelAndView index(ModelMap map, HttpServletRequest request) { - ModelAndView view = request(super.createRequestPageTempletResponse("redirect:/")); + ModelAndView view = request(super.createView("redirect:/")); User user = super.getUser(request); view.addObject("agentStatusReport", acdWorkMonitor.getAgentReport(user.getOrgi())); view.addObject("agentStatus", cache.findOneAgentStatusByAgentnoAndOrig(user.getId(), user.getOrgi())); @@ -115,7 +115,7 @@ public class AdminController extends Handler { @Menu(type = "admin", subtype = "content") public ModelAndView content(ModelMap map, HttpServletRequest request) { aggValues(map, request); - return request(super.createAdminTempletResponse("/admin/content")); + return request(super.createView("/admin/content")); /*if(super.getUser(request).isSuperuser()) { aggValues(map, request); return request(super.createAdminTempletResponse("/admin/content")); @@ -133,49 +133,6 @@ public class AdminController extends Handler { } else { request.getSession().setAttribute(Constants.CSKEFU_SYSTEM_INFOACQ, "true"); } - return request(super.createRequestPageTempletResponse("redirect:/")); + return request(super.createView("redirect:/")); } - - @RequestMapping("/admin/auth/event") - @Menu(type = "admin", subtype = "authevent") - public ModelAndView authevent(ModelMap map, HttpServletRequest request, @Valid String title, @Valid String url, @Valid String iconstr, @Valid String icontext) { - map.addAttribute("title", title); - map.addAttribute("url", url); - if (StringUtils.isNotBlank(iconstr) && StringUtils.isNotBlank(icontext)) { - map.addAttribute("iconstr", iconstr.replaceAll(icontext, "&#x" + MainUtils.string2HexString(icontext) + ";")); - } - return request(super.createRequestPageTempletResponse("/admin/system/auth/exchange")); - } - - @RequestMapping("/admin/auth/save") - @Menu(type = "admin", subtype = "authsave") - public ModelAndView authsave(ModelMap map, HttpServletRequest request, @Valid String title, @Valid SysDic dic) { - SysDic sysDic = sysDicRes.findByCode(Constants.CSKEFU_SYSTEM_AUTH_DIC); - boolean newdic = false; - if (sysDic != null && StringUtils.isNotBlank(dic.getName())) { - if (StringUtils.isNotBlank(dic.getParentid())) { - if (dic.getParentid().equals("0")) { - dic.setParentid(sysDic.getId()); - newdic = true; - } else { - List dicList = sysDicRes.findByDicid(sysDic.getId()); - for (SysDic temp : dicList) { - if (temp.getCode().equals(dic.getParentid()) || temp.getName().equals(dic.getParentid())) { - dic.setParentid(temp.getId()); - newdic = true; - } - } - } - } - if (newdic) { - dic.setCreater(super.getUser(request).getId()); - dic.setCreatetime(new Date()); - dic.setCtype("auth"); - dic.setDicid(sysDic.getId()); - sysDicRes.save(dic); - } - } - return request(super.createRequestPageTempletResponse("/public/success")); - } - } \ No newline at end of file diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/AgentSkillController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/AgentSkillController.java deleted file mode 100644 index 8ef45843..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/AgentSkillController.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.controller.admin; - -import com.chatopera.cc.controller.Handler; -import com.chatopera.cc.model.Skill; -import com.chatopera.cc.persistence.repository.SkillRepository; -import com.chatopera.cc.util.Menu; -import org.apache.commons.lang.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.servlet.ModelAndView; - -import javax.servlet.http.HttpServletRequest; -import javax.validation.Valid; -import java.util.Date; -import java.util.List; - -/** - * - * @author 程序猿DD - * @version 1.0.0 - * @blog http://blog.didispace.com - * - */ -@Controller -@RequestMapping("/admin/skill") -public class AgentSkillController extends Handler{ - - @Autowired - private SkillRepository skillRepository; - - @RequestMapping("/index") - @Menu(type = "admin" , subtype = "skill") - public ModelAndView index(ModelMap map , HttpServletRequest request , @Valid String skill) { - List skillGroups = skillRepository.findAll() ; - map.addAttribute("skillGroups", skillGroups); - if(skillGroups.size() > 0){ - if(!StringUtils.isBlank(skill)){ - for(Skill data : skillGroups){ - if(data.getId().equals(skill)){ - map.addAttribute("skillData", data); - } - } - }else{ - map.addAttribute("skillData", skillGroups.get(0)); - } - -// map.addAttribute("userList", userRepository.findBySkill(skill)); - } - return request(super.createAdminTempletResponse("/admin/skill/index")); - } - - @RequestMapping("/add") - @Menu(type = "admin" , subtype = "skill") - public ModelAndView add(ModelMap map , HttpServletRequest request) { - return request(super.createRequestPageTempletResponse("/admin/skill/add")); - } - - @RequestMapping("/save") - @Menu(type = "admin" , subtype = "skill") - public ModelAndView save(HttpServletRequest request ,@Valid Skill skill) { - Skill tempSkill = skillRepository.findByNameAndOrgi(skill.getName() , super.getOrgi(request)) ; - String msg = "admin_skill_save_success" ; - if(tempSkill != null){ - msg = "admin_skill_save_exist"; - }else{ - skillRepository.save(skill) ; - } - return request(super.createRequestPageTempletResponse("redirect:/admin/skill/index.html?msg="+msg)); - } - - @RequestMapping("/edit") - @Menu(type = "admin" , subtype = "skill") - public ModelAndView edit(ModelMap map ,HttpServletRequest request , @Valid String id) { - ModelAndView view = request(super.createRequestPageTempletResponse("/admin/skill/edit")) ; - view.addObject("skillData", skillRepository.findByIdAndOrgi(id , super.getOrgi(request))) ; - return view; - } - - @RequestMapping("/update") - @Menu(type = "admin" , subtype = "skill") - public ModelAndView update(HttpServletRequest request ,@Valid Skill skill) { - Skill tempSkill = skillRepository.findByIdAndOrgi(skill.getId() , super.getOrgi(request)) ; - String msg = "admin_skill_update_success" ; - if(tempSkill != null){ - tempSkill.setName(skill.getName()); - tempSkill.setUpdatetime(new Date()); - skillRepository.save(tempSkill) ; - }else{ - msg = "admin_skill_update_not_exist"; - } - return request(super.createRequestPageTempletResponse("redirect:/admin/skill/index.html?msg="+msg)); - } - - @RequestMapping("/delete") - @Menu(type = "admin" , subtype = "skill") - public ModelAndView delete(HttpServletRequest request ,@Valid Skill skill) { - String msg = "admin_skill_delete" ; - if(skill!=null){ - skillRepository.delete(skill); - }else{ - msg = "admin_skill_not_exist" ; - } - return request(super.createRequestPageTempletResponse("redirect:/admin/skill/index.html?msg="+msg)); - } -} \ No newline at end of file diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/AreaController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/AreaController.java deleted file mode 100644 index 583e277b..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/AreaController.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.controller.admin; - -import com.chatopera.cc.basic.Constants; -import com.chatopera.cc.basic.MainUtils; -import com.chatopera.cc.controller.Handler; -import com.chatopera.cc.model.AreaType; -import com.chatopera.cc.model.Dict; -import com.chatopera.cc.model.SysDic; -import com.chatopera.cc.persistence.repository.AreaTypeRepository; -import com.chatopera.cc.persistence.repository.SysDicRepository; -import com.chatopera.cc.util.Menu; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.servlet.ModelAndView; - -import javax.servlet.http.HttpServletRequest; -import javax.validation.Valid; -import java.io.IOException; -import java.util.Date; - -/** - * - * @author 程序猿DD - * @version 1.0.0 - * @blog http://blog.didispace.com - * - */ -@Controller -@RequestMapping("/admin/area") -public class AreaController extends Handler{ - - @Autowired - private AreaTypeRepository areaRepository; - - @Autowired - private SysDicRepository sysDicRepository; - - @RequestMapping("/index") - @Menu(type = "admin" , subtype = "area") - public ModelAndView index(ModelMap map , HttpServletRequest request) throws IOException { - map.addAttribute("areaList", areaRepository.findByOrgi(super.getOrgi(request))); - return request(super.createAdminTempletResponse("/admin/area/index")); - } - - @RequestMapping("/add") - @Menu(type = "admin" , subtype = "area") - public ModelAndView add(ModelMap map , HttpServletRequest request) { - SysDic sysDic = sysDicRepository.findByCode(Constants.CSKEFU_SYSTEM_AREA_DIC) ; - if(sysDic!=null){ - map.addAttribute("sysarea", sysDic) ; - map.addAttribute("areaList", sysDicRepository.findByDicid(sysDic.getId())) ; - } - map.addAttribute("cacheList", Dict.getInstance().getDic(Constants.CSKEFU_SYSTEM_AREA_DIC)) ; - return request(super.createRequestPageTempletResponse("/admin/area/add")); - } - - @RequestMapping("/save") - @Menu(type = "admin" , subtype = "area") - public ModelAndView save(HttpServletRequest request ,@Valid AreaType area) { - int areas = areaRepository.countByNameAndOrgi(area.getName(), super.getOrgi(request)) ; - if(areas == 0){ - area.setOrgi(super.getOrgi(request)); - area.setCreatetime(new Date()); - area.setCreater(super.getUser(request).getId()); - areaRepository.save(area) ; - MainUtils.initSystemArea(); - } - return request(super.createRequestPageTempletResponse("redirect:/admin/area/index.html")); - } - - @RequestMapping("/edit") - @Menu(type = "admin" , subtype = "area") - public ModelAndView edit(ModelMap map ,HttpServletRequest request , @Valid String id) { - map.addAttribute("area", areaRepository.findByIdAndOrgi(id, super.getOrgi(request))) ; - - SysDic sysDic = sysDicRepository.findByCode(Constants.CSKEFU_SYSTEM_AREA_DIC) ; - if(sysDic!=null){ - map.addAttribute("sysarea", sysDic) ; - map.addAttribute("areaList", sysDicRepository.findByDicid(sysDic.getId())) ; - } - map.addAttribute("cacheList", Dict.getInstance().getDic(Constants.CSKEFU_SYSTEM_AREA_DIC)) ; - return request(super.createRequestPageTempletResponse("/admin/area/edit")); - } - - @RequestMapping("/update") - @Menu(type = "admin" , subtype = "area" , admin = true) - public ModelAndView update(HttpServletRequest request ,@Valid AreaType area) { - AreaType areaType = areaRepository.findByIdAndOrgi(area.getId(), super.getOrgi(request)) ; - if(areaType != null){ - area.setCreatetime(areaType.getCreatetime()); - area.setOrgi(super.getOrgi(request)); - area.setCreater(areaType.getCreater()); - areaRepository.save(area) ; - MainUtils.initSystemArea(); - } - return request(super.createRequestPageTempletResponse("redirect:/admin/area/index.html")); - } - - @RequestMapping("/delete") - @Menu(type = "admin" , subtype = "area") - public ModelAndView delete(HttpServletRequest request ,@Valid AreaType area) { - AreaType areaType = areaRepository.findByIdAndOrgi(area.getId(), super.getOrgi(request)) ; - if(areaType!=null){ - areaRepository.delete(areaType); - MainUtils.initSystemArea(); - } - return request(super.createRequestPageTempletResponse("redirect:/admin/area/index.html")); - } -} \ No newline at end of file diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/OrganController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/OrganController.java index c652a227..ca64fd1e 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/OrganController.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/OrganController.java @@ -17,12 +17,10 @@ package com.chatopera.cc.controller.admin; import com.chatopera.cc.basic.Constants; -import com.chatopera.cc.basic.MainContext; import com.chatopera.cc.cache.Cache; import com.chatopera.cc.controller.Handler; import com.chatopera.cc.model.*; import com.chatopera.cc.persistence.repository.*; -import com.chatopera.cc.proxy.OnlineUserProxy; import com.chatopera.cc.proxy.OrganProxy; import com.chatopera.cc.proxy.UserProxy; import com.chatopera.cc.util.Menu; @@ -113,7 +111,7 @@ public class OrganController extends Handler { map.addAttribute("areaList", areaRepository.findByOrgi(super.getOrgi())); map.addAttribute("roleList", roleRepository.findByOrgi(super.getOrgi())); map.put("msg", msg); - return request(super.createAdminTempletResponse("/admin/organ/index")); + return request(super.createView("/admin/organ/index")); } @RequestMapping("/add") @@ -129,7 +127,7 @@ public class OrganController extends Handler { map.addAttribute("organList", getOwnOragans(request)); - return request(super.createRequestPageTempletResponse("/admin/organ/add")); + return request(super.createView("/admin/organ/add")); } @RequestMapping("/save") @@ -146,7 +144,7 @@ public class OrganController extends Handler { organRepository.save(organ); } - return request(super.createRequestPageTempletResponse( + return request(super.createView( "redirect:/admin/organ/index.html?msg=" + msg + "&organ=" + firstId)); } @@ -167,7 +165,7 @@ public class OrganController extends Handler { map.addAttribute("userOrganList", userProxy .findByOrganAndOrgiAndDatastatus(organ, super.getOrgi(), false)); map.addAttribute("organ", organData); - return request(super.createRequestPageTempletResponse("/admin/organ/seluser")); + return request(super.createView("/admin/organ/seluser")); } @@ -239,7 +237,7 @@ public class OrganController extends Handler { userRepository.save(organUserList); } - return request(super.createRequestPageTempletResponse("redirect:/admin/organ/index.html?organ=" + organ)); + return request(super.createView("redirect:/admin/organ/index.html?organ=" + organ)); } @RequestMapping("/user/delete") @@ -255,16 +253,16 @@ public class OrganController extends Handler { if (organUsers.size() > 1) { organUserRes.deleteOrganUserByUseridAndOrgan(id, organ); } else { - return request(super.createRequestPageTempletResponse("redirect:/admin/organ/index.html?organ=" + organ + "&msg=not_allow_remove_user")); + return request(super.createView("redirect:/admin/organ/index.html?organ=" + organ + "&msg=not_allow_remove_user")); } } - return request(super.createRequestPageTempletResponse("redirect:/admin/organ/index.html?organ=" + organ)); + return request(super.createView("redirect:/admin/organ/index.html?organ=" + organ)); } @RequestMapping("/edit") @Menu(type = "admin", subtype = "organ") public ModelAndView edit(ModelMap map, HttpServletRequest request, @Valid String id) { - ModelAndView view = request(super.createRequestPageTempletResponse("/admin/organ/edit")); + ModelAndView view = request(super.createView("/admin/organ/edit")); Organ currentOrgan = super.getOrgan(request); map.addAttribute("areaList", areaRepository.findByOrgi(super.getOrgi())); view.addObject("organData", organRepository.findByIdAndOrgi(id, super.getOrgi())); @@ -277,7 +275,7 @@ public class OrganController extends Handler { @Menu(type = "admin", subtype = "organ") public ModelAndView update(HttpServletRequest request, @Valid Organ organ) { String msg = organProxy.updateOrgan(organ, super.getOrgi(request), super.getUser(request)); - return request(super.createRequestPageTempletResponse( + return request(super.createView( "redirect:/admin/organ/index.html?msg=" + msg + "&organ=" + organ.getId())); } @@ -293,7 +291,7 @@ public class OrganController extends Handler { map.addAttribute("cacheList", Dict.getInstance().getDic(Constants.CSKEFU_SYSTEM_AREA_DIC)); map.addAttribute("organData", organRepository.findByIdAndOrgi(id, super.getOrgi())); - return request(super.createRequestPageTempletResponse("/admin/organ/area")); + return request(super.createView("/admin/organ/area")); } @@ -308,7 +306,7 @@ public class OrganController extends Handler { } else { msg = "admin_organ_update_not_exist"; } - return request(super.createRequestPageTempletResponse( + return request(super.createView( "redirect:/admin/organ/index.html?msg=" + msg + "&organ=" + organ.getId())); } @@ -328,7 +326,7 @@ public class OrganController extends Handler { } else { msg = "admin_organ_not_exist"; } - return request(super.createRequestPageTempletResponse("redirect:/admin/organ/index.html?msg=" + msg)); + return request(super.createView("redirect:/admin/organ/index.html?msg=" + msg)); } @RequestMapping("/auth/save") @@ -356,6 +354,6 @@ public class OrganController extends Handler { } } return request( - super.createRequestPageTempletResponse("redirect:/admin/organ/index.html?organ=" + organData.getId())); + super.createView("redirect:/admin/organ/index.html?organ=" + organData.getId())); } } \ No newline at end of file diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/RoleController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/RoleController.java index 9c3a9c6e..3ab1bbed 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/RoleController.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/RoleController.java @@ -17,7 +17,6 @@ package com.chatopera.cc.controller.admin; import com.chatopera.cc.basic.Constants; -import com.chatopera.cc.basic.MainContext; import com.chatopera.cc.controller.Handler; import com.chatopera.cc.model.*; import com.chatopera.cc.persistence.repository.*; @@ -91,13 +90,13 @@ public class RoleController extends Handler { map.addAttribute("userRoleList", userRoleRes.findByOrgiAndRole(super.getOrgi(), roleData, new PageRequest(super.getP(request), super.getPs(request)))); } } - return request(super.createAdminTempletResponse("/admin/role/index")); + return request(super.createView("/admin/role/index")); } @RequestMapping("/add") @Menu(type = "admin", subtype = "role") public ModelAndView add(ModelMap map, HttpServletRequest request) { - return request(super.createRequestPageTempletResponse("/admin/role/add")); + return request(super.createView("/admin/role/add")); } @RequestMapping("/save") @@ -116,7 +115,7 @@ public class RoleController extends Handler { role.setOrgan(currentOrgan.getId()); roleRepository.save(role); } - return request(super.createRequestPageTempletResponse("redirect:/admin/role/index.html?msg=" + msg)); + return request(super.createView("redirect:/admin/role/index.html?msg=" + msg)); } @RequestMapping("/seluser") @@ -127,7 +126,7 @@ public class RoleController extends Handler { Role roleData = roleRepository.findByIdAndOrgi(role, super.getOrgi()); map.addAttribute("userRoleList", userRoleRes.findByOrgiAndRole(super.getOrgi(), roleData)); map.addAttribute("role", roleData); - return request(super.createRequestPageTempletResponse("/admin/role/seluser")); + return request(super.createView("/admin/role/seluser")); } @RequestMapping("/saveuser") @@ -154,7 +153,7 @@ public class RoleController extends Handler { } } } - return request(super.createRequestPageTempletResponse("redirect:/admin/role/index.html?role=" + role)); + return request(super.createView("redirect:/admin/role/index.html?role=" + role)); } @RequestMapping("/user/delete") @@ -163,13 +162,13 @@ public class RoleController extends Handler { if (role != null) { userRoleRes.delete(id); } - return request(super.createRequestPageTempletResponse("redirect:/admin/role/index.html?role=" + role)); + return request(super.createView("redirect:/admin/role/index.html?role=" + role)); } @RequestMapping("/edit") @Menu(type = "admin", subtype = "role") public ModelAndView edit(ModelMap map, HttpServletRequest request, @Valid String id) { - ModelAndView view = request(super.createRequestPageTempletResponse("/admin/role/edit")); + ModelAndView view = request(super.createView("/admin/role/edit")); view.addObject("roleData", roleRepository.findByIdAndOrgi(id, super.getOrgi())); return view; } @@ -188,7 +187,7 @@ public class RoleController extends Handler { } else if (!role.getId().equals(tempRoleExist.getId())) { msg = "admin_role_update_not_exist"; } - return request(super.createRequestPageTempletResponse("redirect:/admin/role/index.html?msg=" + msg)); + return request(super.createView("redirect:/admin/role/index.html?msg=" + msg)); } @RequestMapping("/delete") @@ -201,7 +200,7 @@ public class RoleController extends Handler { } else { msg = "admin_role_not_exist"; } - return request(super.createRequestPageTempletResponse("redirect:/admin/role/index.html?msg=" + msg)); + return request(super.createView("redirect:/admin/role/index.html?msg=" + msg)); } @RequestMapping("/auth") @@ -216,7 +215,7 @@ public class RoleController extends Handler { Role role = roleRepository.findByIdAndOrgi(id, super.getOrgi()); map.addAttribute("role", role); map.addAttribute("roleAuthList", roleAuthRes.findByRoleidAndOrgi(role.getId(), super.getOrgi())); - return request(super.createRequestPageTempletResponse("/admin/role/auth")); + return request(super.createView("/admin/role/auth")); } @RequestMapping("/auth/save") @@ -250,6 +249,6 @@ public class RoleController extends Handler { } } } - return request(super.createRequestPageTempletResponse("redirect:/admin/role/index.html?role=" + id)); + return request(super.createView("redirect:/admin/role/index.html?role=" + id)); } } diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/UsersController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/UsersController.java index e2dda0be..7bb85dee 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/UsersController.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/UsersController.java @@ -24,7 +24,6 @@ import com.chatopera.cc.model.OrganUser; import com.chatopera.cc.model.User; import com.chatopera.cc.model.UserRole; import com.chatopera.cc.persistence.repository.*; -import com.chatopera.cc.proxy.OnlineUserProxy; import com.chatopera.cc.proxy.OrganProxy; import com.chatopera.cc.proxy.UserProxy; import com.chatopera.cc.util.Menu; @@ -89,13 +88,13 @@ public class UsersController extends Handler { ))); - return request(super.createAdminTempletResponse("/admin/user/index")); + return request(super.createView("/admin/user/index")); } @RequestMapping("/add") @Menu(type = "admin", subtype = "user") public ModelAndView add(ModelMap map, HttpServletRequest request) { - ModelAndView view = request(super.createRequestPageTempletResponse("/admin/user/add")); + ModelAndView view = request(super.createView("/admin/user/add")); Organ currentOrgan = super.getOrgan(request); Map organs = organProxy.findAllOrganByParentAndOrgi(currentOrgan, super.getOrgi(request)); map.addAttribute("currentOrgan", currentOrgan); @@ -107,7 +106,7 @@ public class UsersController extends Handler { @RequestMapping("/edit") @Menu(type = "admin", subtype = "user") public ModelAndView edit(ModelMap map, HttpServletRequest request, @Valid String id) { - ModelAndView view = request(super.createRequestPageTempletResponse("/admin/user/edit")); + ModelAndView view = request(super.createView("/admin/user/edit")); User user = userRepository.findById(id); if (user != null && MainContext.hasModule(Constants.CSKEFU_MODULE_CALLCENTER)) { // 加载呼叫中心信息 @@ -146,7 +145,7 @@ public class UsersController extends Handler { } else { msg = "admin_user_not_exist"; } - return request(super.createRequestPageTempletResponse("redirect:/admin/user/index.html?msg=" + msg)); + return request(super.createView("redirect:/admin/user/index.html?msg=" + msg)); } } \ No newline at end of file diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/channel/SNSAccountIMController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/channel/SNSAccountIMController.java index 710b4e29..f511f1d1 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/channel/SNSAccountIMController.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/channel/SNSAccountIMController.java @@ -75,13 +75,13 @@ public class SNSAccountIMController extends Handler { if (StringUtils.isNotBlank(execute) && execute.equals("false")) { map.addAttribute("execute", execute); } - return request(super.createAdminTempletResponse("/admin/channel/im/index")); + return request(super.createView("/admin/channel/im/index")); } @RequestMapping("/add") @Menu(type = "admin", subtype = "send", access = false, admin = true) public ModelAndView add(ModelMap map, HttpServletRequest request) { - return request(super.createRequestPageTempletResponse("/admin/channel/im/add")); + return request(super.createView("/admin/channel/im/add")); } @RequestMapping("/save") @@ -123,7 +123,7 @@ public class SNSAccountIMController extends Handler { } } } - return request(super.createRequestPageTempletResponse("redirect:/admin/im/index.html?status=" + status)); + return request(super.createView("redirect:/admin/im/index.html?status=" + status)); } @RequestMapping("/delete") @@ -141,14 +141,14 @@ public class SNSAccountIMController extends Handler { } } - return request(super.createRequestPageTempletResponse("redirect:/admin/im/index.html?execute=" + execute)); + return request(super.createView("redirect:/admin/im/index.html?execute=" + execute)); } @RequestMapping("/edit") @Menu(type = "admin", subtype = "send", access = false, admin = true) public ModelAndView edit(ModelMap map, HttpServletRequest request, @Valid String id) { map.addAttribute("snsAccount", snsAccountRes.findByIdAndOrgi(id, super.getOrgi(request))); - return request(super.createRequestPageTempletResponse("/admin/channel/im/edit")); + return request(super.createView("/admin/channel/im/edit")); } @RequestMapping("/update") @@ -180,6 +180,6 @@ public class SNSAccountIMController extends Handler { oldSnsAccount.setSnstype(MainContext.ChannelType.WEBIM.toString()); snsAccountRes.save(oldSnsAccount); } - return request(super.createRequestPageTempletResponse("redirect:/admin/im/index.html")); + return request(super.createView("redirect:/admin/im/index.html")); } } \ No newline at end of file diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/channel/WebIMController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/channel/WebIMController.java index 2dc4b718..226cb2c2 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/channel/WebIMController.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/channel/WebIMController.java @@ -20,7 +20,6 @@ import com.chatopera.cc.cache.Cache; import com.chatopera.cc.controller.Handler; import com.chatopera.cc.model.CousultInvite; import com.chatopera.cc.model.Organ; -import com.chatopera.cc.model.OrgiSkillRel; import com.chatopera.cc.model.User; import com.chatopera.cc.persistence.repository.*; import com.chatopera.cc.proxy.OnlineUserProxy; @@ -86,10 +85,10 @@ public class WebIMController extends Handler { map.addAttribute("inviteData", coultInvite); map.addAttribute("skillGroups", getSkillGroups(request)); map.addAttribute("agentList", getUsers(request)); - map.addAttribute("import", request.getServerPort()); + map.addAttribute("port", request.getServerPort()); map.addAttribute("snsAccount", snsAccountRes.findBySnsidAndOrgi(snsid, super.getOrgi(request))); } - return request(super.createAdminTempletResponse("/admin/webim/index")); + return request(super.createView("/admin/webim/index")); } /** @@ -134,7 +133,7 @@ public class WebIMController extends Handler { } inviteRes.save(inviteData); cache.putConsultInviteByOrgi(inviteData.getOrgi(), inviteData); - return request(super.createRequestPageTempletResponse("redirect:/admin/webim/index.html?snsid=" + inviteData.getSnsaccountid())); + return request(super.createView("redirect:/admin/webim/index.html?snsid=" + inviteData.getSnsaccountid())); } @RequestMapping("/profile") @@ -151,7 +150,7 @@ public class WebIMController extends Handler { map.addAttribute("snsAccount", snsAccountRes.findBySnsidAndOrgi(snsid, super.getOrgi(request))); map.put("serviceAiList", serviceAiRes.findByOrgi(super.getOrgi(request))); - return request(super.createAdminTempletResponse("/admin/webim/profile")); + return request(super.createView("/admin/webim/profile")); } @RequestMapping("/profile/save") @@ -236,7 +235,7 @@ public class WebIMController extends Handler { } cache.putConsultInviteByOrgi(orgi, inviteData); - return request(super.createRequestPageTempletResponse("redirect:/admin/webim/profile.html?snsid=" + inviteData.getSnsaccountid())); + return request(super.createView("redirect:/admin/webim/profile.html?snsid=" + inviteData.getSnsaccountid())); } @RequestMapping("/invote") @@ -250,7 +249,7 @@ public class WebIMController extends Handler { } map.addAttribute("import", request.getServerPort()); map.addAttribute("snsAccount", snsAccountRes.findBySnsidAndOrgi(snsid, super.getOrgi(request))); - return request(super.createAdminTempletResponse("/admin/webim/invote")); + return request(super.createView("/admin/webim/invote")); } @RequestMapping("/invote/save") @@ -280,7 +279,7 @@ public class WebIMController extends Handler { inviteRes.save(inviteData); } cache.putConsultInviteByOrgi(inviteData.getOrgi(), inviteData); - return request(super.createRequestPageTempletResponse("redirect:/admin/webim/invote.html?snsid=" + inviteData.getSnsaccountid())); + return request(super.createView("redirect:/admin/webim/invote.html?snsid=" + inviteData.getSnsaccountid())); } /** diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/config/SystemConfigController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/config/SystemConfigController.java index 09241889..4e7bb98c 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/config/SystemConfigController.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/config/SystemConfigController.java @@ -93,9 +93,11 @@ public class SystemConfigController extends Handler { map.addAttribute("server", server); map.addAttribute("imServerStatus", MainContext.getIMServerStatus()); List secretConfig = secRes.findByOrgi(super.getOrgi(request)); + // check out secretConfig if (secretConfig != null && secretConfig.size() > 0) { map.addAttribute("secret", secretConfig.get(0)); } + List dicList = Dict.getInstance().getDic(Constants.CSKEFU_SYSTEM_DIC); SysDic callCenterDic = null, workOrderDic = null, smsDic = null; for (SysDic dic : dicList) { @@ -133,7 +135,7 @@ public class SystemConfigController extends Handler { if (StringUtils.isNotBlank(request.getParameter("msg"))) { map.addAttribute("msg", request.getParameter("msg")); } - return request(super.createAdminTempletResponse("/admin/config/index")); + return request(super.createView("/admin/config/index")); } @RequestMapping("/stopimserver") @@ -144,21 +146,21 @@ public class SystemConfigController extends Handler { server.stop(); MainContext.setIMServerStatus(false); } - return request(super.createRequestPageTempletResponse("redirect:/admin/config/index.html?execute=" + execute)); + return request(super.createView("redirect:/admin/config/index.html?execute=" + execute)); } @RequestMapping("/startentim") @Menu(type = "admin", subtype = "startentim", access = false, admin = true) public ModelAndView startentim(ModelMap map, HttpServletRequest request) throws SQLException { MainContext.enableModule(Constants.CSKEFU_MODULE_ENTIM); - return request(super.createRequestPageTempletResponse("redirect:/admin/config/index.html")); + return request(super.createView("redirect:/admin/config/index.html")); } @RequestMapping("/stopentim") @Menu(type = "admin", subtype = "stopentim", access = false, admin = true) public ModelAndView stopentim(ModelMap map, HttpServletRequest request) throws SQLException { MainContext.removeModule(Constants.CSKEFU_MODULE_ENTIM); - return request(super.createRequestPageTempletResponse("redirect:/admin/config/index.html")); + return request(super.createView("redirect:/admin/config/index.html")); } /** @@ -178,7 +180,7 @@ public class SystemConfigController extends Handler { MainContext.setIMServerStatus(false); System.exit(0); } - return request(super.createRequestPageTempletResponse("redirect:/admin/config/index.html?execute=" + execute)); + return request(super.createView("redirect:/admin/config/index.html?execute=" + execute)); } @@ -277,6 +279,6 @@ public class SystemConfigController extends Handler { MainContext.getCache().putSystemByIdAndOrgi("systemConfig", super.getOrgi(request), systemConfig); map.addAttribute("imServerStatus", MainContext.getIMServerStatus()); - return request(super.createRequestPageTempletResponse("redirect:/admin/config/index.html?msg=" + msg)); + return request(super.createView("redirect:/admin/config/index.html?msg=" + msg)); } } \ No newline at end of file diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/config/SystemMessageController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/config/SystemMessageController.java index ff173b86..32e87f58 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/config/SystemMessageController.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/config/SystemMessageController.java @@ -61,14 +61,14 @@ public class SystemMessageController extends Handler { }); map.addAttribute("emailList", emails); - return request(super.createAdminTempletResponse("/admin/email/index")); + return request(super.createView("/admin/email/index")); } @RequestMapping("/email/add") @Menu(type = "admin", subtype = "email") public ModelAndView add(ModelMap map, HttpServletRequest request) { map.put("organList", organRes.findByOrgi(super.getOrgi(request))); - return request(super.createRequestPageTempletResponse("/admin/email/add")); + return request(super.createView("/admin/email/add")); } @RequestMapping("/email/save") @@ -80,7 +80,7 @@ public class SystemMessageController extends Handler { email.setSmtppassword(MainUtils.encryption(email.getSmtppassword())); } systemMessageRepository.save(email); - return request(super.createRequestPageTempletResponse("redirect:/admin/email/index.html")); + return request(super.createView("redirect:/admin/email/index.html")); } @RequestMapping("/email/edit") @@ -88,7 +88,7 @@ public class SystemMessageController extends Handler { public ModelAndView edit(ModelMap map, HttpServletRequest request, @Valid String id) { map.put("organList", organRes.findByOrgi(super.getOrgi(request))); map.addAttribute("email", systemMessageRepository.findByIdAndOrgi(id, super.getOrgi(request))); - return request(super.createRequestPageTempletResponse("/admin/email/edit")); + return request(super.createView("/admin/email/edit")); } @RequestMapping("/email/update") @@ -106,7 +106,7 @@ public class SystemMessageController extends Handler { } systemMessageRepository.save(email); } - return request(super.createRequestPageTempletResponse("redirect:/admin/email/index.html")); + return request(super.createView("redirect:/admin/email/index.html")); } @RequestMapping("/email/delete") @@ -116,7 +116,7 @@ public class SystemMessageController extends Handler { if (email != null) { systemMessageRepository.delete(temp); } - return request(super.createRequestPageTempletResponse("redirect:/admin/email/index.html")); + return request(super.createView("redirect:/admin/email/index.html")); } @@ -124,15 +124,14 @@ public class SystemMessageController extends Handler { @Menu(type = "setting", subtype = "sms") public ModelAndView smsindex(ModelMap map, HttpServletRequest request) throws IOException { map.addAttribute("smsList", systemMessageRepository.findByMsgtypeAndOrgi("sms", super.getOrgi(request), new PageRequest(super.getP(request), super.getPs(request)))); - return request(super.createAdminTempletResponse("/admin/sms/index")); + return request(super.createView("/admin/sms/index")); } @RequestMapping("/sms/add") @Menu(type = "admin", subtype = "sms") public ModelAndView smsadd(ModelMap map, HttpServletRequest request) { - map.addAttribute("smsType", Dict.getInstance().getDic("com.dic.sms.type")); - return request(super.createRequestPageTempletResponse("/admin/sms/add")); + return request(super.createView("/admin/sms/add")); } @RequestMapping("/sms/save") @@ -144,7 +143,7 @@ public class SystemMessageController extends Handler { sms.setSmtppassword(MainUtils.encryption(sms.getSmtppassword())); } systemMessageRepository.save(sms); - return request(super.createRequestPageTempletResponse("redirect:/admin/sms/index.html")); + return request(super.createView("redirect:/admin/sms/index.html")); } @RequestMapping("/sms/edit") @@ -152,7 +151,7 @@ public class SystemMessageController extends Handler { public ModelAndView smsedit(ModelMap map, HttpServletRequest request, @Valid String id) { map.addAttribute("smsType", Dict.getInstance().getDic("com.dic.sms.type")); map.addAttribute("sms", systemMessageRepository.findByIdAndOrgi(id, super.getOrgi(request))); - return request(super.createRequestPageTempletResponse("/admin/sms/edit")); + return request(super.createView("/admin/sms/edit")); } @RequestMapping("/sms/update") @@ -170,7 +169,7 @@ public class SystemMessageController extends Handler { } systemMessageRepository.save(sms); } - return request(super.createRequestPageTempletResponse("redirect:/admin/sms/index.html")); + return request(super.createView("redirect:/admin/sms/index.html")); } @RequestMapping("/sms/delete") @@ -180,6 +179,6 @@ public class SystemMessageController extends Handler { if (sms != null) { systemMessageRepository.delete(temp); } - return request(super.createRequestPageTempletResponse("redirect:/admin/sms/index.html")); + return request(super.createView("redirect:/admin/sms/index.html")); } } \ No newline at end of file diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/system/MetadataController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/system/MetadataController.java index 7bc647f7..9511d0bc 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/system/MetadataController.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/system/MetadataController.java @@ -80,14 +80,14 @@ public class MetadataController extends Handler { @Menu(type = "admin", subtype = "metadata", admin = true) public ModelAndView index(ModelMap map, HttpServletRequest request) throws SQLException { map.addAttribute("metadataList", metadataRes.findAll(new PageRequest(super.getP(request), super.getPs(request)))); - return request(super.createAdminTempletResponse("/admin/system/metadata/index")); + return request(super.createView("/admin/system/metadata/index")); } @RequestMapping("/edit") @Menu(type = "admin", subtype = "metadata", admin = true) public ModelAndView edit(ModelMap map, HttpServletRequest request, @Valid String id) { map.addAttribute("metadata", metadataRes.findById(id)); - return request(super.createRequestPageTempletResponse("/admin/system/metadata/edit")); + return request(super.createView("/admin/system/metadata/edit")); } @RequestMapping("/update") @@ -99,7 +99,7 @@ public class MetadataController extends Handler { table.setListblocktemplet(metadata.getListblocktemplet()); table.setPreviewtemplet(metadata.getPreviewtemplet()); metadataRes.save(table); - return request(super.createRequestPageTempletResponse("redirect:/admin/metadata/index.html")); + return request(super.createView("redirect:/admin/metadata/index.html")); } @RequestMapping("/properties/edit") @@ -109,7 +109,7 @@ public class MetadataController extends Handler { map.addAttribute("sysdicList", sysDicRes.findByParentid("0")); map.addAttribute("dataImplList", Dict.getInstance().getDic("com.dic.data.impl")); - return request(super.createRequestPageTempletResponse("/admin/system/metadata/tpedit")); + return request(super.createView("/admin/system/metadata/tpedit")); } @RequestMapping("/properties/update") @@ -134,7 +134,7 @@ public class MetadataController extends Handler { tableProperties.setImpfield(tp.isImpfield()); tablePropertiesRes.save(tableProperties); - return request(super.createRequestPageTempletResponse("redirect:/admin/metadata/table.html?id=" + tableProperties.getDbtableid())); + return request(super.createView("redirect:/admin/metadata/table.html?id=" + tableProperties.getDbtableid())); } @RequestMapping("/delete") @@ -142,7 +142,7 @@ public class MetadataController extends Handler { public ModelAndView delete(ModelMap map, HttpServletRequest request, @Valid String id) throws SQLException { MetadataTable table = metadataRes.findById(id); metadataRes.delete(table); - return request(super.createRequestPageTempletResponse("redirect:/admin/metadata/index.html")); + return request(super.createView("redirect:/admin/metadata/index.html")); } @RequestMapping("/batdelete") @@ -151,7 +151,7 @@ public class MetadataController extends Handler { if (ids != null && ids.length > 0) { metadataRes.delete(metadataRes.findAll(Arrays.asList(ids))); } - return request(super.createRequestPageTempletResponse("redirect:/admin/metadata/index.html")); + return request(super.createView("redirect:/admin/metadata/index.html")); } @RequestMapping("/properties/delete") @@ -159,7 +159,7 @@ public class MetadataController extends Handler { public ModelAndView propertiesdelete(ModelMap map, HttpServletRequest request, @Valid String id, @Valid String tbid) throws SQLException { TableProperties prop = tablePropertiesRes.findById(id); tablePropertiesRes.delete(prop); - return request(super.createRequestPageTempletResponse("redirect:/admin/metadata/table.html?id=" + (!StringUtils.isBlank(tbid) ? tbid : prop.getDbtableid()))); + return request(super.createView("redirect:/admin/metadata/table.html?id=" + (!StringUtils.isBlank(tbid) ? tbid : prop.getDbtableid()))); } @RequestMapping("/properties/batdelete") @@ -168,7 +168,7 @@ public class MetadataController extends Handler { if (ids != null && ids.length > 0) { tablePropertiesRes.delete(tablePropertiesRes.findAll(Arrays.asList(ids))); } - return request(super.createRequestPageTempletResponse("redirect:/admin/metadata/table.html?id=" + tbid)); + return request(super.createView("redirect:/admin/metadata/table.html?id=" + tbid)); } @RequestMapping("/table") @@ -177,7 +177,7 @@ public class MetadataController extends Handler { map.addAttribute("propertiesList", tablePropertiesRes.findByDbtableid(id)); map.addAttribute("tbid", id); map.addAttribute("table", metadataRes.findById(id)); - return request(super.createAdminTempletResponse("/admin/system/metadata/table")); + return request(super.createView("/admin/system/metadata/table")); } @RequestMapping("/imptb") @@ -197,7 +197,7 @@ public class MetadataController extends Handler { }); return request(super - .createRequestPageTempletResponse("/admin/system/metadata/imptb")); + .createView("/admin/system/metadata/imptb")); } @RequestMapping("/imptbsave") @@ -236,7 +236,7 @@ public class MetadataController extends Handler { } - return request(super.createRequestPageTempletResponse("redirect:/admin/metadata/index.html")); + return request(super.createView("redirect:/admin/metadata/index.html")); } private MetadataTable processMetadataTable(UKTableMetaData metaData, MetadataTable table) { @@ -293,7 +293,7 @@ public class MetadataController extends Handler { } } } - return request(super.createRequestPageTempletResponse("redirect:/admin/metadata/index.html")); + return request(super.createView("redirect:/admin/metadata/index.html")); } @SuppressWarnings({"rawtypes", "unchecked"}) @@ -324,7 +324,7 @@ public class MetadataController extends Handler { } } } - return request(super.createRequestPageTempletResponse("redirect:/admin/metadata/index.html")); + return request(super.createView("redirect:/admin/metadata/index.html")); } @SuppressWarnings({"rawtypes"}) @@ -351,7 +351,7 @@ public class MetadataController extends Handler { } } } - return request(super.createRequestPageTempletResponse("redirect:/admin/metadata/index.html")); + return request(super.createView("redirect:/admin/metadata/index.html")); } } \ No newline at end of file diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/system/SysDicController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/system/SysDicController.java index 583254ed..fe0ae0a7 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/system/SysDicController.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/system/SysDicController.java @@ -50,13 +50,13 @@ public class SysDicController extends Handler { @Menu(type = "admin", subtype = "sysdic") public ModelAndView index(ModelMap map, HttpServletRequest request) { map.addAttribute("sysDicList", sysDicRes.findByParentid("0", new PageRequest(super.getP(request), super.getPs(request), Direction.DESC, "createtime"))); - return request(super.createAdminTempletResponse("/admin/system/sysdic/index")); + return request(super.createView("/admin/system/sysdic/index")); } @RequestMapping("/add") @Menu(type = "admin", subtype = "sysdic") public ModelAndView add(ModelMap map, HttpServletRequest request) { - return request(super.createRequestPageTempletResponse("/admin/system/sysdic/add")); + return request(super.createView("/admin/system/sysdic/add")); } @RequestMapping("/save") @@ -75,7 +75,7 @@ public class SysDicController extends Handler { } else { msg = "exist"; } - return request(super.createRequestPageTempletResponse("redirect:/admin/sysdic/index.html" + (msg != null ? "?msg=" + msg : ""))); + return request(super.createView("redirect:/admin/sysdic/index.html" + (msg != null ? "?msg=" + msg : ""))); } @RequestMapping("/edit") @@ -83,7 +83,7 @@ public class SysDicController extends Handler { public ModelAndView edit(ModelMap map, HttpServletRequest request, @Valid String id, @Valid String p) { map.addAttribute("sysDic", sysDicRes.findById(id)); map.addAttribute("p", p); - return request(super.createRequestPageTempletResponse("/admin/system/sysdic/edit")); + return request(super.createView("/admin/system/sysdic/edit")); } @RequestMapping("/update") @@ -102,7 +102,7 @@ public class SysDicController extends Handler { String orgi = super.getOrgi(request); reloadSysDicItem(sysDic, orgi); } - return request(super.createRequestPageTempletResponse("redirect:/admin/sysdic/index.html?p=" + p)); + return request(super.createView("redirect:/admin/sysdic/index.html?p=" + p)); } @RequestMapping("/delete") @@ -114,7 +114,7 @@ public class SysDicController extends Handler { reloadSysDicItem(sysDic, super.getOrgi(request)); - return request(super.createRequestPageTempletResponse("redirect:/admin/sysdic/index.html?p=" + p)); + return request(super.createView("redirect:/admin/sysdic/index.html?p=" + p)); } @RequestMapping("/dicitem") @@ -122,7 +122,7 @@ public class SysDicController extends Handler { public ModelAndView dicitem(ModelMap map, HttpServletRequest request, @Valid String id) { map.addAttribute("sysDic", sysDicRes.findById(id)); map.addAttribute("sysDicList", sysDicRes.findByParentid(id, new PageRequest(super.getP(request), super.getPs(request), Direction.DESC, "createtime"))); - return request(super.createAdminTempletResponse("/admin/system/sysdic/dicitem")); + return request(super.createView("/admin/system/sysdic/dicitem")); } @RequestMapping("/dicitem/add") @@ -130,7 +130,7 @@ public class SysDicController extends Handler { public ModelAndView dicitemadd(ModelMap map, HttpServletRequest request, @Valid String id, @Valid String p) { map.addAttribute("sysDic", sysDicRes.findById(id)); map.addAttribute("p", p); - return request(super.createRequestPageTempletResponse("/admin/system/sysdic/dicitemadd")); + return request(super.createView("/admin/system/sysdic/dicitemadd")); } @RequestMapping("/dicitem/save") @@ -149,7 +149,7 @@ public class SysDicController extends Handler { } else { msg = "exist"; } - return request(super.createRequestPageTempletResponse("redirect:/admin/sysdic/dicitem.html?id=" + dic.getParentid() + (msg != null ? "&p=" + p + "&msg=" + msg : ""))); + return request(super.createView("redirect:/admin/sysdic/dicitem.html?id=" + dic.getParentid() + (msg != null ? "&p=" + p + "&msg=" + msg : ""))); } /** @@ -179,7 +179,7 @@ public class SysDicController extends Handler { public ModelAndView dicitembatadd(ModelMap map, HttpServletRequest request, @Valid String id, @Valid String p) { map.addAttribute("sysDic", sysDicRes.findById(id)); map.addAttribute("p", p); - return request(super.createRequestPageTempletResponse("/admin/system/sysdic/batadd")); + return request(super.createView("/admin/system/sysdic/batadd")); } @RequestMapping("/dicitem/batsave") @@ -210,7 +210,7 @@ public class SysDicController extends Handler { } reloadSysDicItem(sysDicRes.getOne(sysDic.getParentid()), orig); - return request(super.createRequestPageTempletResponse("redirect:/admin/sysdic/dicitem.html?id=" + sysDic.getParentid() + "&p=" + p)); + return request(super.createView("redirect:/admin/sysdic/dicitem.html?id=" + sysDic.getParentid() + "&p=" + p)); } @RequestMapping("/dicitem/edit") @@ -218,7 +218,7 @@ public class SysDicController extends Handler { public ModelAndView dicitemedit(ModelMap map, HttpServletRequest request, @Valid String id, @Valid String p) { map.addAttribute("sysDic", sysDicRes.findById(id)); map.addAttribute("p", p); - return request(super.createRequestPageTempletResponse("/admin/system/sysdic/dicitemedit")); + return request(super.createView("/admin/system/sysdic/dicitemedit")); } @RequestMapping("/dicitem/update") @@ -240,7 +240,7 @@ public class SysDicController extends Handler { reloadSysDicItem(sysDic, orgi); } - return request(super.createRequestPageTempletResponse("redirect:/admin/sysdic/dicitem.html?id=" + dic.getParentid() + "&p=" + p)); + return request(super.createView("redirect:/admin/sysdic/dicitem.html?id=" + dic.getParentid() + "&p=" + p)); } @RequestMapping("/dicitem/delete") @@ -250,7 +250,7 @@ public class SysDicController extends Handler { SysDic dic = sysDicRes.getOne(id); sysDicRes.delete(dic); reloadSysDicItem(dic, super.getOrgi(request)); - return request(super.createRequestPageTempletResponse("redirect:/admin/sysdic/dicitem.html?id=" + dic.getParentid() + "&p=" + p)); + return request(super.createView("redirect:/admin/sysdic/dicitem.html?id=" + dic.getParentid() + "&p=" + p)); } } \ No newline at end of file diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/system/TemplateController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/system/TemplateController.java index 5014a165..ee4fe314 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/system/TemplateController.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/controller/admin/system/TemplateController.java @@ -60,7 +60,7 @@ public class TemplateController extends Handler{ @Menu(type = "admin" , subtype = "template" , access = false , admin = true) public ModelAndView index(ModelMap map , HttpServletRequest request) { map.addAttribute("sysDicList", Dict.getInstance().getDic(Constants.CSKEFU_SYSTEM_DIC)); - return request(super.createAdminTempletResponse("/admin/system/template/index")); + return request(super.createView("/admin/system/template/index")); } @RequestMapping("/expall") @@ -75,7 +75,7 @@ public class TemplateController extends Handler{ @RequestMapping("/imp") @Menu(type = "admin" , subtype = "template" , access = false , admin = true) public ModelAndView imp(ModelMap map , HttpServletRequest request) { - return request(super.createRequestPageTempletResponse("/admin/system/template/imp")); + return request(super.createView("/admin/system/template/imp")); } @SuppressWarnings("unchecked") @@ -91,7 +91,7 @@ public class TemplateController extends Handler{ } } } - return request(super.createRequestPageTempletResponse("redirect:/admin/template/index.html")); + return request(super.createView("redirect:/admin/template/index.html")); } @RequestMapping("/list") @@ -99,14 +99,14 @@ public class TemplateController extends Handler{ public ModelAndView list(ModelMap map , HttpServletRequest request ,@Valid String type) { map.addAttribute("sysDic", dicRes.findById(type)); map.addAttribute("templateList", templateRes.findByTemplettypeAndOrgi(type, super.getOrgi(request))); - return request(super.createAdminTempletResponse("/admin/system/template/list")); + return request(super.createView("/admin/system/template/list")); } @RequestMapping("/add") @Menu(type = "admin" , subtype = "template" , access = false , admin = true) public ModelAndView add(ModelMap map , HttpServletRequest request ,@Valid String type) { map.addAttribute("sysDic", dicRes.findById(type)); - return request(super.createRequestPageTempletResponse("/admin/system/template/add")); + return request(super.createView("/admin/system/template/add")); } @RequestMapping( "/save") @@ -121,7 +121,7 @@ public class TemplateController extends Handler{ } templateRes.save(template) ; - return request(super.createRequestPageTempletResponse("redirect:/admin/template/list.html?type="+template.getTemplettype())); + return request(super.createView("redirect:/admin/template/list.html?type="+template.getTemplettype())); } @RequestMapping("/edit") @@ -129,7 +129,7 @@ public class TemplateController extends Handler{ public ModelAndView edit(ModelMap map , HttpServletRequest request , @Valid String id, @Valid String type) { map.addAttribute("sysDic", dicRes.findById(type)); map.addAttribute("template", templateRes.findByIdAndOrgi(id, super.getOrgi(request))) ; - return request(super.createRequestPageTempletResponse("/admin/system/template/edit")); + return request(super.createView("/admin/system/template/edit")); } @RequestMapping( "/update") @@ -153,7 +153,7 @@ public class TemplateController extends Handler{ cache.deleteSystembyIdAndOrgi(template.getId(), super.getOrgi(request)); } - return request(super.createRequestPageTempletResponse("redirect:/admin/template/list.html?type="+template.getTemplettype())); + return request(super.createView("redirect:/admin/template/list.html?type="+template.getTemplettype())); } @RequestMapping("/code") @@ -161,7 +161,7 @@ public class TemplateController extends Handler{ public ModelAndView code(ModelMap map , HttpServletRequest request , @Valid String id, @Valid String type) { map.addAttribute("sysDic", dicRes.findById(type)); map.addAttribute("template", templateRes.findByIdAndOrgi(id, super.getOrgi(request))) ; - return request(super.createRequestPageTempletResponse("/admin/system/template/code")); + return request(super.createView("/admin/system/template/code")); } @RequestMapping( "/codesave") @@ -175,7 +175,7 @@ public class TemplateController extends Handler{ cache.deleteSystembyIdAndOrgi(template.getId(), super.getOrgi(request)); } - return request(super.createRequestPageTempletResponse("redirect:/admin/template/list.html?type="+template.getTemplettype())); + return request(super.createView("redirect:/admin/template/list.html?type="+template.getTemplettype())); } @RequestMapping("/delete") @@ -186,7 +186,7 @@ public class TemplateController extends Handler{ cache.deleteSystembyIdAndOrgi(template.getId(), super.getOrgi(request)); } - return request(super.createRequestPageTempletResponse("redirect:/admin/template/list.html?type="+template.getTemplettype())); + return request(super.createView("redirect:/admin/template/list.html?type="+template.getTemplettype())); } } \ No newline at end of file diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/api/ApiQuickReplyController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/api/ApiQuickReplyController.java deleted file mode 100644 index 930c78fd..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/api/ApiQuickReplyController.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.controller.api; - -import com.chatopera.cc.controller.Handler; -import com.chatopera.cc.model.QuickReply; -import com.chatopera.cc.persistence.es.QuickReplyRepository; -import com.chatopera.cc.util.Menu; -import com.chatopera.cc.util.RestResult; -import com.chatopera.cc.util.RestResultType; -import org.apache.commons.lang.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.PageRequest; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RestController; - -import javax.servlet.http.HttpServletRequest; -import javax.validation.Valid; - -/** - * 快捷回复服务 - * 快捷回复管理功能 - */ -@RestController -@RequestMapping("/api/quickreply") -public class ApiQuickReplyController extends Handler { - - @Autowired - private QuickReplyRepository quickReplyRepository; - - /** - * 返回快捷回复列表,cate为分类id,通过/api/quicktype 获取分类id,支持分页,分页参数为 p=1&ps=50,默认分页尺寸为 20条每页 - * @param request - * @param cate 搜索分类id,精确搜索,通过/api/quicktype 获取分类id - * @return - */ - @RequestMapping(method = RequestMethod.GET) - @Menu(type = "apps", subtype = "quickreply", access = true) - public ResponseEntity list(HttpServletRequest request, String id, @Valid String cate, @Valid String q, Integer p, Integer ps) { - if (StringUtils.isNotBlank(id)) { - return new ResponseEntity<>(new RestResult(RestResultType.OK, quickReplyRepository.findOne(id)), HttpStatus.OK); - } - - Page replyList = quickReplyRepository.getByOrgiAndCate(getOrgi(request), cate, q, - new PageRequest(p == null ? 1 : p, ps == null ? 20 : ps)); - return new ResponseEntity<>(new RestResult(RestResultType.OK, replyList), HttpStatus.OK); - } - - /** - * 新增或修改快捷回复 - * @param request - * @param user - * @return - */ - @RequestMapping(method = RequestMethod.PUT) - @Menu(type = "apps", subtype = "quickreply", access = true) - public ResponseEntity put(HttpServletRequest request, @Valid QuickReply quickReply) { - if (quickReply != null && !StringUtils.isBlank(quickReply.getTitle())) { - quickReply.setOrgi(getOrgi(request)); - quickReply.setCreater(getUser(request).getId()); - quickReplyRepository.save(quickReply); - } - return new ResponseEntity<>(new RestResult(RestResultType.OK), HttpStatus.OK); - } - - /** - * 删除用户,只提供 按照用户ID删除 - * @param request - * @param id - * @return - */ - @RequestMapping(method = RequestMethod.DELETE) - @Menu(type = "apps", subtype = "quickreply", access = true) - public ResponseEntity delete(HttpServletRequest request, @Valid String id) { - RestResult result = new RestResult(RestResultType.OK); - if (!StringUtils.isBlank(id)) { - QuickReply reply = quickReplyRepository.findOne(id); - if (reply != null) { - quickReplyRepository.delete(reply); - } else { - return new ResponseEntity<>(new RestResult(RestResultType.ORGAN_DELETE), HttpStatus.OK); - } - } - return new ResponseEntity<>(result, HttpStatus.OK); - } -} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/api/ApiQuickTypeController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/api/ApiQuickTypeController.java deleted file mode 100644 index 3dcd063a..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/api/ApiQuickTypeController.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.controller.api; - -import com.chatopera.cc.controller.Handler; -import com.chatopera.cc.model.QuickType; -import com.chatopera.cc.persistence.es.QuickReplyRepository; -import com.chatopera.cc.persistence.repository.QuickTypeRepository; -import com.chatopera.cc.util.Menu; -import com.chatopera.cc.util.RestResult; -import com.chatopera.cc.util.RestResultType; -import org.apache.commons.lang.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RestController; - -import javax.servlet.http.HttpServletRequest; -import javax.validation.Valid; -import java.util.Date; -import java.util.List; - -/** - * 快捷回复分类服务 - * 快捷回复分类管理功能 - */ -@RestController -@RequestMapping("/api/quicktype") -public class ApiQuickTypeController extends Handler { - - @Autowired - private QuickTypeRepository quickTypeRepository; - - @Autowired - private QuickReplyRepository quickReplyRepository; - - /** - * 返回快捷回复分类列表 - * @param request - * @param quicktype 搜索pub,pri - * @return - */ - @RequestMapping(method = RequestMethod.GET) - @Menu(type = "apps", subtype = "quicktype", access = true) - public ResponseEntity list(HttpServletRequest request, @Valid String id, @Valid String quicktype) { - if (StringUtils.isNotBlank(id)) { - return new ResponseEntity<>(new RestResult(RestResultType.OK, quickTypeRepository.findOne(id)), HttpStatus.OK); - } - List quickTypeList = quickTypeRepository.findByOrgiAndQuicktype(getOrgi(request), quicktype); - return new ResponseEntity<>(new RestResult(RestResultType.OK, quickTypeList), HttpStatus.OK); - } - - /** - * 新增或修改快捷回复分类 - * @param request - * @param user - * @return - */ - @RequestMapping(method = RequestMethod.PUT) - @Menu(type = "apps", subtype = "quicktype", access = true) - public ResponseEntity put(HttpServletRequest request, @Valid QuickType quickType) { - if (quickType != null && !StringUtils.isBlank(quickType.getName())) { - quickType.setOrgi(getOrgi(request)); - quickType.setCreater(getUser(request).getId()); - quickType.setCreatetime(new Date()); - if (StringUtils.isNotBlank(quickType.getId())) { - quickType.setUpdatetime(new Date()); - } - quickType = quickTypeRepository.save(quickType); - } - return new ResponseEntity<>(new RestResult(RestResultType.OK, quickType), HttpStatus.OK); - } - - /** - * 删除分类,并且删除分类下的快捷回复 - * @param request - * @param id - * @return - */ - @RequestMapping(method = RequestMethod.DELETE) - @Menu(type = "apps", subtype = "reply", access = true) - public ResponseEntity delete(HttpServletRequest request, @Valid String id) { - RestResult result = new RestResult(RestResultType.OK); - if (!StringUtils.isBlank(id)) { - QuickType quickType = quickTypeRepository.findOne(id); - if (quickType != null) { - quickReplyRepository.deleteByCate(quickType.getId(), quickType.getOrgi()); - quickTypeRepository.delete(quickType); - } else { - return new ResponseEntity<>(new RestResult(RestResultType.ORGAN_DELETE), HttpStatus.OK); - } - } - return new ResponseEntity<>(result, HttpStatus.OK); - } -} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/AgentAuditController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/AgentAuditController.java index 2e09956b..c6a3d3f6 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/AgentAuditController.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/AgentAuditController.java @@ -32,7 +32,7 @@ import com.chatopera.cc.persistence.repository.*; import com.chatopera.cc.proxy.*; import com.chatopera.cc.socketio.message.Message; import com.chatopera.cc.util.Menu; -import freemarker.template.TemplateException; + import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -121,6 +121,9 @@ public class AgentAuditController extends Handler { @Autowired private OrganProxy organProxy; + @Autowired + private ChatbotRepository chatbotRes; + @RequestMapping(value = "/index") @Menu(type = "cca", subtype = "cca", access = true) public ModelAndView index( @@ -136,7 +139,7 @@ public class AgentAuditController extends Handler { Map organs = organProxy.findAllOrganByParentAndOrgi(super.getOrgan(request), super.getOrgi(request)); - ModelAndView view = request(super.createAppsTempletResponse("/apps/cca/index")); + ModelAndView view = request(super.createView("/apps/cca/index")); Sort defaultSort = null; if (StringUtils.isNotBlank(sort)) { @@ -207,7 +210,7 @@ public class AgentAuditController extends Handler { @RequestMapping("/query") @Menu(type = "apps", subtype = "cca") public ModelAndView query(HttpServletRequest request, String skill, String agentno) { - ModelAndView view = request(super.createRequestPageTempletResponse("/apps/cca/chatusers")); + ModelAndView view = request(super.createView("/apps/cca/chatusers")); final String orgi = super.getOrgi(request); final User logined = super.getUser(request); @@ -240,7 +243,7 @@ public class AgentAuditController extends Handler { @RequestMapping("/agentusers") @Menu(type = "apps", subtype = "cca") public ModelAndView agentusers(HttpServletRequest request, String userid) { - ModelAndView view = request(super.createRequestPageTempletResponse("/apps/cca/agentusers")); + ModelAndView view = request(super.createView("/apps/cca/agentusers")); User logined = super.getUser(request); final String orgi = super.getOrgi(request); Sort defaultSort = new Sort(Sort.Direction.DESC, "status"); @@ -261,12 +264,12 @@ public class AgentAuditController extends Handler { HttpServletRequest request, String id, String channel - ) throws IOException, TemplateException { + ) throws IOException { String mainagentuser = "/apps/cca/mainagentuser"; if (channel.equals("phone")) { mainagentuser = "/apps/cca/mainagentuser_callout"; } - ModelAndView view = request(super.createRequestPageTempletResponse(mainagentuser)); + ModelAndView view = request(super.createView(mainagentuser)); final User logined = super.getUser(request); final String orgi = logined.getOrgi(); AgentUser agentUser = agentUserRepository.findByIdAndOrgi(id, orgi); @@ -274,10 +277,11 @@ public class AgentAuditController extends Handler { if (agentUser != null) { view.addObject("curagentuser", agentUser); - CousultInvite invite = OnlineUserProxy.consult(agentUser.getAppid(), agentUser.getOrgi()); - if (invite != null) { - view.addObject("ccaAisuggest", invite.isAisuggest()); + Chatbot c = chatbotRes.findBySnsAccountIdentifierAndOrgi(agentUser.getAppid(), agentUser.getOrgi()); + if (c != null) { + view.addObject("ccaAisuggest", c.isAisuggest()); } + view.addObject("inviteData", OnlineUserProxy.consult(agentUser.getAppid(), agentUser.getOrgi())); List agentUserTaskList = agentUserTaskRes.findByIdAndOrgi(id, orgi); if (agentUserTaskList.size() > 0) { @@ -420,7 +424,7 @@ public class AgentAuditController extends Handler { map.addAttribute("currentorgan", currentOrgan); } - return request(super.createRequestPageTempletResponse("/apps/cca/transfer")); + return request(super.createView("/apps/cca/transfer")); } @@ -462,7 +466,7 @@ public class AgentAuditController extends Handler { map.addAttribute("userList", userList); map.addAttribute("currentorgan", organ); } - return request(super.createRequestPageTempletResponse("/apps/cca/transferagentlist")); + return request(super.createView("/apps/cca/transferagentlist")); } /** @@ -575,7 +579,7 @@ public class AgentAuditController extends Handler { agentServiceRes.save(agentService); } } - return request(super.createRequestPageTempletResponse("redirect:/apps/cca/index.html")); + return request(super.createView("redirect:/apps/cca/index.html")); } @@ -612,7 +616,7 @@ public class AgentAuditController extends Handler { } } - return request(super.createRequestPageTempletResponse("redirect:/apps/cca/index.html")); + return request(super.createView("redirect:/apps/cca/index.html")); } @RequestMapping({"/blacklist/add"}) @@ -623,7 +627,7 @@ public class AgentAuditController extends Handler { map.addAttribute("agentserviceid", agentserviceid); map.addAttribute("userid", userid); map.addAttribute("agentUser", agentUserRes.findByIdAndOrgi(userid, super.getOrgi(request))); - return request(super.createRequestPageTempletResponse("/apps/cca/blacklistadd")); + return request(super.createView("/apps/cca/blacklistadd")); } @RequestMapping({"/blacklist/save"}) diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/AgentController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/AgentController.java index e24bfc26..407c6a7f 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/AgentController.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/AgentController.java @@ -25,13 +25,13 @@ import com.chatopera.cc.basic.MainUtils; import com.chatopera.cc.cache.Cache; import com.chatopera.cc.controller.Handler; + import com.chatopera.cc.controller.api.request.RestUtils; import com.chatopera.cc.exception.CSKefuException; import com.chatopera.cc.model.*; import com.chatopera.cc.peer.PeerSyncIM; import com.chatopera.cc.persistence.blob.JpaBlobHelper; import com.chatopera.cc.persistence.es.ChatMessageEsRepository; import com.chatopera.cc.persistence.es.ContactsRepository; - import com.chatopera.cc.persistence.es.QuickReplyRepository; import com.chatopera.cc.persistence.interfaces.DataExchangeInterface; import com.chatopera.cc.persistence.repository.*; import com.chatopera.cc.proxy.*; @@ -40,7 +40,7 @@ import com.chatopera.cc.util.Menu; import com.chatopera.cc.util.PinYinTools; import com.chatopera.cc.util.PropertiesEventUtil; - import freemarker.template.TemplateException; + import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -50,6 +50,9 @@ import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Sort; import org.springframework.data.domain.Sort.Direction; + import org.springframework.http.HttpHeaders; + import org.springframework.http.HttpStatus; + import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.util.FileCopyUtils; @@ -122,12 +125,6 @@ @Autowired private TagRelationRepository tagRelationRes; - @Autowired - private QuickReplyRepository quickReplyRes; - - @Autowired - private QuickTypeRepository quickTypeRes; - @Autowired private AgentUserTaskRepository agentUserTaskRes; @@ -182,6 +179,9 @@ @Autowired private OrganRepository organRes; + @Autowired + private ChatbotRepository chatbotRes; + /** * 坐席从联系人列表进入坐席工作台和该联系人聊天 * @@ -203,11 +203,11 @@ HttpServletResponse response, @Valid String sort, @Valid String channels, - @RequestParam(name = "contactid", required = false) String contactid) throws IOException, TemplateException, CSKefuException { + @RequestParam(name = "contactid", required = false) String contactid) throws IOException, CSKefuException { if (StringUtils.isBlank(contactid)) { logger.info("[chat] empty contactid, fast return error page."); - return request(super.createRequestPageTempletResponse("/public/error")); + return request(super.createView("/public/error")); } logger.info( @@ -230,7 +230,7 @@ // TODO 在agentUser没有得到的情况下,传回的前端信息增加提示,提示放在modelview中 // 处理原聊天数据 - ModelAndView view = request(super.createAppsTempletResponse("/apps/agent/index")); + ModelAndView view = request(super.createView("/apps/agent/index")); agentUserProxy.buildIndexViewWithModels(view, map, request, response, sort, logined, orgi, agentUser); return view; } @@ -253,10 +253,10 @@ ModelMap map, HttpServletRequest request, HttpServletResponse response, - @Valid String sort) throws IOException, TemplateException { + @Valid String sort) throws IOException { final User logined = super.getUser(request); final String orgi = logined.getOrgi(); - ModelAndView view = request(super.createAppsTempletResponse("/apps/agent/index")); + ModelAndView view = request(super.createView("/apps/agent/index")); agentUserProxy.buildIndexViewWithModels(view, map, request, response, sort, logined, orgi, null); return view; } @@ -264,7 +264,7 @@ @RequestMapping("/agentusers") @Menu(type = "apps", subtype = "agent") public ModelAndView agentusers(HttpServletRequest request, String userid) { - ModelAndView view = request(super.createRequestPageTempletResponse("/apps/agent/agentusers")); + ModelAndView view = request(super.createView("/apps/agent/agentusers")); User logined = super.getUser(request); view.addObject( "agentUserList", agentUserRes.findByAgentnoAndOrgi(logined.getId(), logined.getOrgi(), @@ -283,9 +283,9 @@ HttpServletRequest request, String id, Integer page, - Integer current) throws IOException, TemplateException { + Integer current) throws IOException { String mainagentuserconter = "/apps/agent/mainagentuserconter"; - ModelAndView view = request(super.createRequestPageTempletResponse(mainagentuserconter)); + ModelAndView view = request(super.createView(mainagentuserconter)); AgentUser agentUser = agentUserRes.findByIdAndOrgi(id, super.getOrgi(request)); if (agentUser != null) { view.addObject("curagentuser", agentUser); @@ -300,9 +300,9 @@ public ModelAndView agentuserLabel( ModelMap map, HttpServletRequest request, - String iconid) throws IOException, TemplateException { + String iconid) throws IOException { String mainagentuserconter = "/apps/agent/mainagentuserconter"; - ModelAndView view = request(super.createRequestPageTempletResponse(mainagentuserconter)); + ModelAndView view = request(super.createView(mainagentuserconter)); ChatMessage labelid = this.chatMessageRes.findById(iconid); if (labelid != null) { if (labelid.isIslabel() == false) { @@ -323,9 +323,9 @@ String id, String search, String condition - ) throws IOException, TemplateException { + ) throws IOException { String mainagentuserconter = "/apps/agent/mainagentusersearch"; - ModelAndView view = request(super.createRequestPageTempletResponse(mainagentuserconter)); + ModelAndView view = request(super.createView(mainagentuserconter)); AgentUser agentUser = agentUserRes.findByIdAndOrgi(id, super.getOrgi(request)); if (agentUser != null) { @@ -350,9 +350,9 @@ HttpServletRequest request, String id, String createtime, - String thisid) throws IOException, TemplateException, ParseException { + String thisid) throws IOException, ParseException { String mainagentuserconter = "/apps/agent/mainagentuserconter"; - ModelAndView view = request(super.createRequestPageTempletResponse(mainagentuserconter)); + ModelAndView view = request(super.createView(mainagentuserconter)); AgentUser agentUser = agentUserRes.findByIdAndOrgi(id, super.getOrgi(request)); if (agentUser != null) { SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); @@ -373,10 +373,13 @@ ModelMap map, HttpServletRequest request, String id, - String channel) throws IOException, TemplateException { + String channel) throws IOException { // set default Value as WEBIM String mainagentuser = "/apps/agent/mainagentuser"; switch (MainContext.ChannelType.toValue(channel)) { + case MESSENGER: + mainagentuser = "/apps/agent/mainagentuser_messenger"; + break; case PHONE: mainagentuser = "/apps/agent/mainagentuser_callout"; break; @@ -385,7 +388,7 @@ break; } - ModelAndView view = request(super.createRequestPageTempletResponse(mainagentuser)); + ModelAndView view = request(super.createView(mainagentuser)); final User logined = super.getUser(request); final String orgi = logined.getOrgi(); AgentUser agentUser = agentUserRes.findByIdAndOrgi(id, orgi); @@ -393,10 +396,11 @@ if (agentUser != null) { view.addObject("curagentuser", agentUser); - CousultInvite invite = OnlineUserProxy.consult(agentUser.getAppid(), agentUser.getOrgi()); - if (invite != null) { - view.addObject("aisuggest", invite.isAisuggest()); + Chatbot c = chatbotRes.findBySnsAccountIdentifierAndOrgi(agentUser.getAppid(), agentUser.getOrgi()); + if (c != null) { + view.addObject("aisuggest", c.isAisuggest()); } + view.addObject("inviteData", OnlineUserProxy.consult(agentUser.getAppid(), agentUser.getOrgi())); List agentUserTaskList = agentUserTaskRes.findByIdAndOrgi(id, orgi); if (agentUserTaskList.size() > 0) { @@ -472,57 +476,13 @@ view.addObject("tagRelationList", tagRelationRes.findByUserid(agentUser.getUserid())); } -// SessionConfig sessionConfig = acdPolicyService.initSessionConfig(super.getOrgi(request)); -// -// view.addObject("sessionConfig", sessionConfig); -// if (sessionConfig.isOtherquickplay()) { -// view.addObject("topicList", OnlineUserProxy.search(null, orgi, super.getUser(request))); -// } - AgentService service = agentServiceRes.findByIdAndOrgi(agentUser.getAgentserviceid(), orgi); if (service != null) { view.addObject("tags", tagRes.findByOrgiAndTagtypeAndSkill(orgi, MainContext.ModelType.USER.toString(), service.getSkill())); } - view.addObject( - "quickReplyList", quickReplyRes.findByOrgiAndCreater(orgi, super.getUser(request).getId(), null)); - List quickTypeList = quickTypeRes.findByOrgiAndQuicktype( - orgi, MainContext.QuickType.PUB.toString()); - List priQuickTypeList = quickTypeRes.findByOrgiAndQuicktypeAndCreater( - orgi, MainContext.QuickType.PRI.toString(), super.getUser(request).getId()); - quickTypeList.addAll(priQuickTypeList); - view.addObject("pubQuickTypeList", quickTypeList); - return view; } -// TODO: mdx-organ clean -// @RequestMapping("/other/topic") -// @Menu(type = "apps", subtype = "othertopic") -// public ModelAndView othertopic(ModelMap map, HttpServletRequest request, String q) throws IOException, TemplateException { -// SessionConfig sessionConfig = acdPolicyService.initSessionConfig(super.getOrgi(request)); -// -// map.put("sessionConfig", sessionConfig); -// if (sessionConfig.isOtherquickplay()) { -// map.put("topicList", OnlineUserProxy.search(q, super.getOrgi(request), super.getUser(request))); -// } -// -// return request(super.createRequestPageTempletResponse("/apps/agent/othertopic")); -// } -// -// @RequestMapping("/other/topic/detail") -// @Menu(type = "apps", subtype = "othertopicdetail") -// public ModelAndView othertopicdetail(ModelMap map, HttpServletRequest request, String id) throws IOException, TemplateException { -// SessionConfig sessionConfig = acdPolicyService.initSessionConfig(super.getOrgi(request)); -// -// map.put("sessionConfig", sessionConfig); -// if (sessionConfig.isOtherquickplay()) { -// map.put("topic", OnlineUserProxy.detail(id, super.getOrgi(request), super.getUser(request))); -// } -// -// return request(super.createRequestPageTempletResponse("/apps/agent/topicdetail")); -// } - - @RequestMapping("/workorders/list") @Menu(type = "apps", subtype = "workorderslist") public ModelAndView workorderslist(HttpServletRequest request, String contactsid, ModelMap map) { @@ -537,7 +497,7 @@ } map.addAttribute("contactsid", contactsid); } - return request(super.createRequestPageTempletResponse("/apps/agent/workorders")); + return request(super.createView("/apps/agent/workorders")); } /** @@ -569,7 +529,7 @@ MainContext.AgentWorkType.MEIDIACHAT.toString(), orgi, null); - return request(super.createRequestPageTempletResponse("/public/success")); + return request(super.createView("/public/success")); } /** @@ -607,7 +567,7 @@ MainContext.AgentWorkType.MEIDIACHAT.toString(), orgi, null); - return request(super.createRequestPageTempletResponse("/public/success")); + return request(super.createView("/public/success")); } /** @@ -642,7 +602,7 @@ agentStatusProxy.broadcastAgentsStatus(super.getOrgi(request), "agent", "busy", logined.getId()); - return request(super.createRequestPageTempletResponse("/public/success")); + return request(super.createView("/public/success")); } /** @@ -686,7 +646,7 @@ // 重新分配访客给坐席 acdAgentService.assignVisitors(agentStatus.getAgentno(), super.getOrgi(request)); - return request(super.createRequestPageTempletResponse("/public/success")); + return request(super.createView("/public/success")); } @RequestMapping(value = "/clean") @@ -709,7 +669,7 @@ } agentServiceRes.save(agentServiceList); return request(super - .createRequestPageTempletResponse("redirect:/agent/index.html")); + .createView("redirect:/agent/index.html")); } @@ -747,7 +707,7 @@ } return request(super - .createRequestPageTempletResponse("redirect:/agent/index.html")); + .createView("redirect:/agent/index.html")); } @RequestMapping({"/readmsg"}) @@ -759,7 +719,7 @@ agentUserTask.setTokenum(0); agentUserTaskRes.save(agentUserTask); } - return request(super.createRequestPageTempletResponse("/public/success")); + return request(super.createView("/public/success")); } @RequestMapping({"/blacklist/add"}) @@ -770,7 +730,7 @@ map.addAttribute("agentserviceid", agentserviceid); map.addAttribute("userid", userid); map.addAttribute("agentUser", agentUserRes.findByIdAndOrgi(userid, super.getOrgi(request))); - return request(super.createRequestPageTempletResponse("/apps/agent/blacklistadd")); + return request(super.createView("/apps/agent/blacklistadd")); } @RequestMapping({"/blacklist/save"}) @@ -823,7 +783,7 @@ } else { tagRelationRes.delete(tagRelation); } - return request(super.createRequestPageTempletResponse("/public/success")); + return request(super.createView("/public/success")); } /** @@ -839,7 +799,7 @@ */ @RequestMapping("/image/upload") @Menu(type = "im", subtype = "image", access = false) - public ModelAndView upload( + public ResponseEntity upload( ModelMap map, HttpServletRequest request, @RequestParam(value = "imgFile", required = false) MultipartFile multipart, @@ -848,8 +808,9 @@ logger.info("[upload] image file, agentUser id {}, paste {}", id, paste); final User logined = super.getUser(request); final String orgi = super.getOrgi(request); - ModelAndView view = request(super.createRequestPageTempletResponse("/apps/agent/upload")); - UploadStatus notify; + + JSONObject result = new JSONObject(); + HttpHeaders headers = RestUtils.header(); final AgentUser agentUser = agentUserRes.findByIdAndOrgi(id, orgi); if (multipart != null && multipart.getOriginalFilename().lastIndexOf(".") > 0) { @@ -859,15 +820,17 @@ if (!paste) { agentProxy.sendFileMessageByAgent(logined, agentUser, multipart, sf); } - notify = new UploadStatus("0", sf.getFileUrl()); + result.put("error", 0); + result.put("url", sf.getFileUrl()); } catch (CSKefuException e) { - notify = new UploadStatus("请选择文件"); + result.put("error", 1); + result.put("message", "请选择文件"); } } else { - notify = new UploadStatus("请选择图片文件"); + result.put("error", 1); + result.put("message", "请选择图片文件"); } - map.addAttribute("upload", notify); - return view; + return new ResponseEntity<>(result.toString(), headers, HttpStatus.OK); } @RequestMapping("/message/image") @@ -880,7 +843,7 @@ map.addAttribute("t", t) ; }*/ map.addAttribute("t", true); - return request(super.createRequestPageTempletResponse("/apps/agent/media/messageimage")); + return request(super.createView("/apps/agent/media/messageimage")); } @RequestMapping("/message/image/upload") @@ -945,7 +908,7 @@ } } } - return request(super.createRequestPageTempletResponse("/public/success")); + return request(super.createView("/public/success")); } @@ -1031,7 +994,7 @@ agentUserContactsRes.save(agentUserContacts); } } - return request(super.createRequestPageTempletResponse("/apps/agent/contacts")); + return request(super.createView("/apps/agent/contacts")); } @@ -1047,7 +1010,7 @@ } } - return request(super.createRequestPageTempletResponse("/apps/agent/contacts")); + return request(super.createView("/apps/agent/contacts")); } @ResponseBody @@ -1103,7 +1066,7 @@ map.addAttribute("agentuserid", agentuserid); map.addAttribute("channel", channel); } - return request(super.createRequestPageTempletResponse("/apps/agent/summary")); + return request(super.createView("/apps/agent/summary")); } @RequestMapping(value = "/summary/save") @@ -1137,7 +1100,7 @@ serviceSummaryRes.save(summary); } - return request(super.createRequestPageTempletResponse( + return request(super.createView( "redirect:/agent/agentuser.html?id=" + agentuserid + "&channel=" + channel)); } @@ -1210,7 +1173,7 @@ map.addAttribute("currentorgan", currentOrgan); } - return request(super.createRequestPageTempletResponse("/apps/agent/transfer")); + return request(super.createView("/apps/agent/transfer")); } /** @@ -1250,188 +1213,15 @@ map.addAttribute("userList", userList); map.addAttribute("currentorgan", organ); } - return request(super.createRequestPageTempletResponse("/apps/agent/transferagentlist")); + return request(super.createView("/apps/agent/transferagentlist")); } - @RequestMapping("/quicklist") - @Menu(type = "setting", subtype = "quickreply", admin = true) - public ModelAndView quicklist(ModelMap map, HttpServletRequest request, @Valid String typeid) { - map.addAttribute( - "quickReplyList", - quickReplyRes.findByOrgiAndCreater(super.getOrgi(request), super.getUser(request).getId(), null)); - List quickTypeList = quickTypeRes.findByOrgiAndQuicktype( - super.getOrgi(request), MainContext.QuickType.PUB.toString()); - List priQuickTypeList = quickTypeRes.findByOrgiAndQuicktypeAndCreater( - super.getOrgi(request), MainContext.QuickType.PRI.toString(), super.getUser(request).getId()); - quickTypeList.addAll(priQuickTypeList); - map.addAttribute("pubQuickTypeList", quickTypeList); - - if (StringUtils.isNotBlank(typeid)) { - map.addAttribute("quickType", quickTypeRes.findByIdAndOrgi(typeid, super.getOrgi(request))); - } - - return request(super.createRequestPageTempletResponse("/apps/agent/quicklist")); - } - - @RequestMapping("/quickreply/add") - @Menu(type = "setting", subtype = "quickreplyadd", admin = true) - public ModelAndView quickreplyadd(ModelMap map, HttpServletRequest request, @Valid String parentid) { - if (StringUtils.isNotBlank(parentid)) { - map.addAttribute("quickType", quickTypeRes.findByIdAndOrgi(parentid, super.getOrgi(request))); - } - map.addAttribute( - "quickTypeList", quickTypeRes.findByOrgiAndQuicktypeAndCreater( - super.getOrgi(request), - MainContext.QuickType.PRI.toString(), - super.getUser(request).getId())); - return request(super.createRequestPageTempletResponse("/apps/agent/quickreply/add")); - } - - @RequestMapping("/quickreply/save") - @Menu(type = "setting", subtype = "quickreply", admin = true) - public ModelAndView quickreplysave(ModelMap map, HttpServletRequest request, @Valid QuickReply quickReply) { - if (StringUtils.isNotBlank(quickReply.getTitle()) && StringUtils.isNotBlank(quickReply.getContent())) { - quickReply.setOrgi(super.getOrgi(request)); - quickReply.setCreater(super.getUser(request).getId()); - quickReply.setType(MainContext.QuickType.PRI.toString()); - quickReplyRes.save(quickReply); - } - return request(super.createRequestPageTempletResponse( - "redirect:/agent/quicklist.html?typeid=" + quickReply.getCate())); - } - - @RequestMapping("/quickreply/delete") - @Menu(type = "setting", subtype = "quickreply", admin = true) - public ModelAndView quickreplydelete(ModelMap map, HttpServletRequest request, @Valid String id) { - QuickReply quickReply = quickReplyRes.findOne(id); - if (quickReply != null) { - quickReplyRes.delete(quickReply); - } - return request(super.createRequestPageTempletResponse( - "redirect:/agent/quicklist.html?typeid=" + quickReply.getCate())); - } - - @RequestMapping("/quickreply/edit") - @Menu(type = "setting", subtype = "quickreply", admin = true) - public ModelAndView quickreplyedit(ModelMap map, HttpServletRequest request, @Valid String id) { - QuickReply quickReply = quickReplyRes.findOne(id); - map.put("quickReply", quickReply); - if (quickReply != null) { - map.put("quickType", quickTypeRes.findByIdAndOrgi(quickReply.getCate(), super.getOrgi(request))); - } - map.addAttribute( - "quickTypeList", quickTypeRes.findByOrgiAndQuicktype( - super.getOrgi(request), - MainContext.QuickType.PUB.toString())); - return request(super.createRequestPageTempletResponse("/apps/agent/quickreply/edit")); - } - - @RequestMapping("/quickreply/update") - @Menu(type = "setting", subtype = "quickreply", admin = true) - public ModelAndView quickreplyupdate(ModelMap map, HttpServletRequest request, @Valid QuickReply quickReply) { - if (StringUtils.isNotBlank(quickReply.getId())) { - QuickReply temp = quickReplyRes.findOne(quickReply.getId()); - quickReply.setOrgi(super.getOrgi(request)); - quickReply.setCreater(super.getUser(request).getId()); - if (temp != null) { - quickReply.setCreatetime(temp.getCreatetime()); - } - quickReply.setType(MainContext.QuickType.PUB.toString()); - quickReplyRes.save(quickReply); - } - return request(super.createRequestPageTempletResponse( - "redirect:/agent/quicklist.html?typeid=" + quickReply.getCate())); - } - - @RequestMapping({"/quickreply/addtype"}) - @Menu(type = "apps", subtype = "kbs") - public ModelAndView addtype(ModelMap map, HttpServletRequest request, @Valid String typeid) { - map.addAttribute( - "quickTypeList", quickTypeRes.findByOrgiAndQuicktypeAndCreater( - super.getOrgi(request), - MainContext.QuickType.PRI.toString(), - super.getUser(request).getId())); - if (StringUtils.isNotBlank(typeid)) { - map.addAttribute("quickType", quickTypeRes.findByIdAndOrgi(typeid, super.getOrgi(request))); - } - return request(super.createRequestPageTempletResponse("/apps/agent/quickreply/addtype")); - } - - @RequestMapping("/quickreply/type/save") - @Menu(type = "apps", subtype = "kbs") - public ModelAndView typesave(HttpServletRequest request, @Valid QuickType quickType) { - int count = quickTypeRes.countByOrgiAndNameAndParentid( - super.getOrgi(request), quickType.getName(), quickType.getParentid()); - if (count == 0) { - quickType.setOrgi(super.getOrgi(request)); - quickType.setCreater(super.getUser(request).getId()); - quickType.setCreatetime(new Date()); - quickType.setQuicktype(MainContext.QuickType.PRI.toString()); - quickTypeRes.save(quickType); - } - return request(super.createRequestPageTempletResponse( - "redirect:/agent/quicklist.html?typeid=" + quickType.getParentid())); - } - - @RequestMapping({"/quickreply/edittype"}) - @Menu(type = "apps", subtype = "kbs") - public ModelAndView edittype(ModelMap map, HttpServletRequest request, String id) { - map.addAttribute("quickType", quickTypeRes.findByIdAndOrgi(id, super.getOrgi(request))); - map.addAttribute( - "quickTypeList", quickTypeRes.findByOrgiAndQuicktypeAndCreater( - super.getOrgi(request), - MainContext.QuickType.PRI.toString(), - super.getUser(request).getId())); - return request(super.createRequestPageTempletResponse("/apps/agent/quickreply/edittype")); - } - - @RequestMapping("/quickreply/type/update") - @Menu(type = "apps", subtype = "kbs") - public ModelAndView typeupdate(HttpServletRequest request, @Valid QuickType quickType) { - QuickType tempQuickType = quickTypeRes.findByIdAndOrgi(quickType.getId(), super.getOrgi(request)); - if (tempQuickType != null) { - tempQuickType.setName(quickType.getName()); - tempQuickType.setDescription(quickType.getDescription()); - tempQuickType.setInx(quickType.getInx()); - tempQuickType.setParentid(quickType.getParentid()); - quickTypeRes.save(tempQuickType); - } - return request( - super.createRequestPageTempletResponse("redirect:/agent/quicklist.html?typeid=" + quickType.getId())); - } - - @RequestMapping({"/quickreply/deletetype"}) - @Menu(type = "apps", subtype = "kbs") - public ModelAndView deletetype(ModelMap map, HttpServletRequest request, @Valid String id) { - QuickType tempQuickType = quickTypeRes.findByIdAndOrgi(id, super.getOrgi(request)); - if (tempQuickType != null) { - quickTypeRes.delete(tempQuickType); - - Page quickReplyList = quickReplyRes.getByOrgiAndCate( - super.getOrgi(request), id, null, new PageRequest(0, 10000)); - - quickReplyRes.delete(quickReplyList.getContent()); - } - return request(super.createRequestPageTempletResponse( - "redirect:/agent/quicklist.html" + (tempQuickType != null ? "?typeid=" + tempQuickType.getParentid() : ""))); - } - - @RequestMapping({"/quickreply/content"}) - @Menu(type = "apps", subtype = "quickreply") - public ModelAndView quickreplycontent(ModelMap map, HttpServletRequest request, @Valid String id) { - QuickReply quickReply = quickReplyRes.findOne(id); - if (quickReply != null) { - map.addAttribute("quickReply", quickReply); - } - return request(super.createRequestPageTempletResponse("/apps/agent/quickreplycontent")); - } - @RequestMapping("/calloutcontact/add") @Menu(type = "apps", subtype = "calloutcontact", admin = true) public ModelAndView add(ModelMap map, HttpServletRequest request, @Valid String ckind) { map.addAttribute("ckind", ckind); - return request(super.createRequestPageTempletResponse("/apps/agent/calloutcontact/add")); + return request(super.createView("/apps/agent/calloutcontact/add")); } @RequestMapping(value = "/calloutcontact/save") @@ -1468,7 +1258,7 @@ auc.setAppid(au.getAppid()); auc.setCreater(logined.getId()); agentUserContactsRes.save(auc); - return request(super.createRequestPageTempletResponse("redirect:/agent/index.html")); + return request(super.createView("redirect:/agent/index.html")); } @RequestMapping("/calloutcontact/update") @@ -1503,6 +1293,6 @@ contactsRes.save(contacts); } - return request(super.createRequestPageTempletResponse("redirect:/agent/index.html")); + return request(super.createView("redirect:/agent/index.html")); } } diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/AgentQualityController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/AgentQualityController.java deleted file mode 100644 index 2337a0f1..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/AgentQualityController.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.chatopera.cc.controller.apps; - -import com.chatopera.cc.acd.ACDPolicyService; -import com.chatopera.cc.basic.MainContext; -import com.chatopera.cc.cache.Cache; -import com.chatopera.cc.controller.Handler; -import com.chatopera.cc.model.Quality; -import com.chatopera.cc.model.QualityRequest; -import com.chatopera.cc.model.SessionConfig; -import com.chatopera.cc.model.Tag; -import com.chatopera.cc.persistence.repository.QualityRepository; -import com.chatopera.cc.persistence.repository.SessionConfigRepository; -import com.chatopera.cc.persistence.repository.TagRepository; -import com.chatopera.cc.util.Menu; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.servlet.ModelAndView; - -import javax.servlet.http.HttpServletRequest; -import javax.validation.Valid; -import java.util.ArrayList; -import java.util.List; - -@Controller -@RequestMapping("/apps/quality") -public class AgentQualityController extends Handler { - - @Autowired - private ACDPolicyService acdPolicyService; - - @Autowired - private QualityRepository qualityRes; - - @Autowired - private SessionConfigRepository sessionConfigRes; - - @Autowired - private TagRepository tagRes; - - @Autowired - private Cache cache; - - @RequestMapping(value = "/index") - @Menu(type = "agent", subtype = "quality", access = false) - public ModelAndView index(ModelMap map, HttpServletRequest request) { - // TODO: mdx-organ clean -// map.addAttribute("sessionConfig", acdPolicyService.initSessionConfig(super.getOrgi(request))); - map.addAttribute("qualityList", qualityRes.findByQualitytypeAndOrgi(MainContext.QualityType.CHAT.toString(), super.getOrgi(request))); - map.addAttribute("tagList", tagRes.findByOrgiAndTagtype(super.getOrgi(request), MainContext.TagType.QUALITY.toString())); - return request(super.createAppsTempletResponse("/apps/quality/index")); - } - - - @RequestMapping(value = "/save") - @Menu(type = "agent", subtype = "quality", access = false) - public ModelAndView save(ModelMap map, HttpServletRequest request, @Valid QualityRequest qualityArray) { - String orgi = super.getOrgi(request); - - if (qualityArray != null && qualityArray.getTitle() != null) { - List qualityList = qualityRes.findByQualitytypeAndOrgi(MainContext.QualityType.CHAT.toString(), super.getOrgi(request)); - qualityRes.delete(qualityList); - List tempList = new ArrayList(); - for (int i = 0; i < qualityArray.getTitle().length; i++) { - Quality temp = new Quality(); - temp.setName(qualityArray.getTitle()[i]); - if (qualityArray.getDescription().length == qualityArray.getTitle().length) { - temp.setDescription(qualityArray.getDescription()[i]); - } - if (qualityArray.getScore().length == qualityArray.getTitle().length) { - temp.setScore(qualityArray.getScore()[i]); - } - temp.setOrgi(super.getOrgi(request)); - temp.setQualitytype(MainContext.QualityType.CHAT.toString()); - tempList.add(temp); - } - if (tempList.size() > 0) { - qualityRes.save(tempList); - } - - // TODO: mdx-organ clean -// SessionConfig config = acdPolicyService.initSessionConfig(super.getOrgi(request)); -// if (config != null) { -// if ("points".equals(request.getParameter("qualityscore"))) { -// config.setQualityscore("points"); -// } else { -// config.setQualityscore("score"); -// } -// -// sessionConfigRes.save(config); -// cache.putSessionConfigByOrgi(config, orgi); -// cache.deleteSessionConfigListByOrgi(orgi); -// } - if (qualityArray != null && qualityArray.getTag() != null && qualityArray.getTag().length > 0) { - List tagList = tagRes.findByOrgiAndTagtype(super.getOrgi(request), MainContext.TagType.QUALITY.toString()); - if (tagList.size() > 0) { - tagRes.delete(tagList); - } - List tagTempList = new ArrayList(); - for (String tag : qualityArray.getTag()) { - Tag temp = new Tag(); - temp.setOrgi(super.getOrgi(request)); - temp.setCreater(super.getUser(request).getId()); - temp.setTag(tag); - temp.setCreater(super.getOrgi(request)); - temp.setTagtype(MainContext.TagType.QUALITY.toString()); - tagTempList.add(temp); - } - if (tagTempList.size() > 0) { - tagRes.save(tagTempList); - } - } - } - return request(super.createRequestPageTempletResponse("redirect:/apps/quality/index.html")); - } -} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/AgentSettingsController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/AgentSettingsController.java index 27cd7e26..1a4094cd 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/AgentSettingsController.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/AgentSettingsController.java @@ -18,7 +18,6 @@ package com.chatopera.cc.controller.apps; import com.chatopera.cc.acd.ACDPolicyService; import com.chatopera.cc.basic.Constants; -import com.chatopera.cc.basic.MainContext; import com.chatopera.cc.basic.MainUtils; import com.chatopera.cc.cache.Cache; import com.chatopera.cc.controller.Handler; @@ -27,6 +26,8 @@ import com.chatopera.cc.persistence.repository.*; import com.chatopera.cc.proxy.OrganProxy; import com.chatopera.cc.util.Menu; import org.apache.commons.lang.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.data.domain.Page; @@ -49,6 +50,7 @@ import java.util.Map; @Controller @RequestMapping("/setting") public class AgentSettingsController extends Handler { + private final static Logger logger = LoggerFactory.getLogger(AgentSettingsController.class); @Autowired private ACDPolicyService acdPolicyService; @@ -90,8 +92,8 @@ public class AgentSettingsController extends Handler { if (sessionConfig == null) { sessionConfig = new SessionConfig(); } - map.put("sessionConfig", sessionConfig); + map.put("sessionConfig", sessionConfig); List dicList = Dict.getInstance().getDic(Constants.CSKEFU_SYSTEM_DIC); SysDic inputDic = null, outputDic = null; @@ -110,7 +112,7 @@ public class AgentSettingsController extends Handler { map.addAttribute("outputtemlet", templateRes.findByTemplettypeAndOrgi(outputDic.getId(), super.getOrgi(request))); } - return request(super.createAppsTempletResponse("/apps/setting/agent/index")); + return request(super.createView("/apps/setting/agent/index")); } @RequestMapping("/agent/sessionconfig/save") @@ -119,7 +121,7 @@ public class AgentSettingsController extends Handler { Organ currentOrgan = super.getOrgan(request); String orgi = super.getOrgi(request); SessionConfig tempSessionConfig = sessionConfigRes.findByOrgiAndSkill(orgi, currentOrgan.getId()); - + if (tempSessionConfig == null) { tempSessionConfig = sessionConfig; tempSessionConfig.setCreater(super.getUser(request).getId()); @@ -141,7 +143,7 @@ public class AgentSettingsController extends Handler { acdPolicyService.initSessionConfigList(); map.put("sessionConfig", tempSessionConfig); - return request(super.createRequestPageTempletResponse("redirect:/setting/agent/index.html")); + return request(super.createView("redirect:/setting/agent/index.html")); } @RequestMapping("/blacklist") @@ -152,9 +154,10 @@ public class AgentSettingsController extends Handler { Page blackList = blackListRes.findByOrgiAndSkillIn(super.getOrgi(request), organs.keySet(), new PageRequest(super.getP(request), super.getPs(request), Sort.Direction.DESC, "endtime")); + map.put("blackList", blackList); map.put("tagTypeList", Dict.getInstance().getDic("com.dic.tag.type")); - return request(super.createAppsTempletResponse("/apps/setting/agent/blacklist")); + return request(super.createView("/apps/setting/agent/blacklist")); } @RequestMapping("/blacklist/delete") @@ -167,7 +170,7 @@ public class AgentSettingsController extends Handler { cache.deleteSystembyIdAndOrgi(tempBlackEntity.getUserid(), Constants.SYSTEM_ORGI); } } - return request(super.createRequestPageTempletResponse("redirect:/setting/blacklist.html")); + return request(super.createView("redirect:/setting/blacklist.html")); } @RequestMapping("/tag") @@ -194,14 +197,14 @@ public class AgentSettingsController extends Handler { map.put("tagList", tagRes.findByOrgiAndTagtypeAndSkill(super.getOrgi(request), tagType.getCode(), currentOrgan.getId(), new PageRequest(super.getP(request), super.getPs(request)))); } map.put("tagTypeList", tagList); - return request(super.createAppsTempletResponse("/apps/setting/agent/tag")); + return request(super.createView("/apps/setting/agent/tag")); } @RequestMapping("/tag/add") @Menu(type = "setting", subtype = "tag", admin = false) public ModelAndView tagadd(ModelMap map, HttpServletRequest request, @Valid String tagtype) { map.addAttribute("tagtype", tagtype); - return request(super.createRequestPageTempletResponse("/apps/setting/agent/tagadd")); + return request(super.createView("/apps/setting/agent/tagadd")); } @RequestMapping("/tag/edit") @@ -209,7 +212,7 @@ public class AgentSettingsController extends Handler { public ModelAndView tagedit(ModelMap map, HttpServletRequest request, @Valid String id, @Valid String tagtype) { map.put("tag", tagRes.findOne(id)); map.addAttribute("tagtype", tagtype); - return request(super.createRequestPageTempletResponse("/apps/setting/agent/tagedit")); + return request(super.createView("/apps/setting/agent/tagedit")); } @RequestMapping("/tag/update") @@ -228,7 +231,7 @@ public class AgentSettingsController extends Handler { tag.setSkill(currentOrgan.getId()); tagRes.save(tag); } - return request(super.createRequestPageTempletResponse("redirect:/setting/tag.html?code=" + tagtype)); + return request(super.createView("redirect:/setting/tag.html?code=" + tagtype)); } @RequestMapping("/tag/save") @@ -242,14 +245,14 @@ public class AgentSettingsController extends Handler { tag.setSkill(currentOrgan.getId()); tagRes.save(tag); } - return request(super.createRequestPageTempletResponse("redirect:/setting/tag.html?code=" + tagtype)); + return request(super.createView("redirect:/setting/tag.html?code=" + tagtype)); } @RequestMapping("/tag/delete") @Menu(type = "setting", subtype = "tag", admin = false) public ModelAndView tagdelete(ModelMap map, HttpServletRequest request, @Valid String id, @Valid String tagtype) { tagRes.delete(id); - return request(super.createRequestPageTempletResponse("redirect:/setting/tag.html?code=" + tagtype)); + return request(super.createView("redirect:/setting/tag.html?code=" + tagtype)); } @@ -257,7 +260,7 @@ public class AgentSettingsController extends Handler { @Menu(type = "setting", subtype = "acd", admin = false) public ModelAndView acd(ModelMap map, HttpServletRequest request) { map.put("tagTypeList", Dict.getInstance().getDic("com.dic.tag.type")); - return request(super.createAppsTempletResponse("/apps/setting/agent/acd")); + return request(super.createView("/apps/setting/agent/acd")); } @@ -288,14 +291,14 @@ public class AgentSettingsController extends Handler { map.put("advTypeList", Dict.getInstance().getDic("com.dic.adv.type")); - return request(super.createAppsTempletResponse("/apps/setting/agent/adv")); + return request(super.createView("/apps/setting/agent/adv")); } @RequestMapping("/adv/add") @Menu(type = "setting", subtype = "adv", admin = false) public ModelAndView advadd(ModelMap map, HttpServletRequest request, @Valid String adpos) { map.addAttribute("adpos", adpos); - return request(super.createRequestPageTempletResponse("/apps/setting/agent/adadd")); + return request(super.createView("/apps/setting/agent/adadd")); } @RequestMapping("/adv/save") @@ -319,7 +322,7 @@ public class AgentSettingsController extends Handler { MainUtils.initAdv(super.getOrgi(request), adv.getSkill()); - return request(super.createRequestPageTempletResponse("redirect:/setting/adv.html?adpos=" + adv.getAdpos())); + return request(super.createView("redirect:/setting/adv.html?adpos=" + adv.getAdpos())); } @RequestMapping("/adv/edit") @@ -327,7 +330,7 @@ public class AgentSettingsController extends Handler { public ModelAndView advedit(ModelMap map, HttpServletRequest request, @Valid String adpos, @Valid String id) { map.addAttribute("adpos", adpos); map.put("ad", adTypeRes.findByIdAndOrgi(id, super.getOrgi(request))); - return request(super.createRequestPageTempletResponse("/apps/setting/agent/adedit")); + return request(super.createView("/apps/setting/agent/adedit")); } @RequestMapping("/adv/update") @@ -356,7 +359,7 @@ public class AgentSettingsController extends Handler { adTypeRes.save(ad); MainUtils.initAdv(orgi, tempad.getSkill()); } - return request(super.createRequestPageTempletResponse("redirect:/setting/adv.html?adpos=" + adpos)); + return request(super.createView("redirect:/setting/adv.html?adpos=" + adpos)); } @RequestMapping("/adv/delete") @@ -368,6 +371,6 @@ public class AgentSettingsController extends Handler { adTypeRes.delete(id); MainUtils.initAdv(orgi, adType.getSkill()); } - return request(super.createRequestPageTempletResponse("redirect:/setting/adv.html?adpos=" + adpos)); + return request(super.createView("redirect:/setting/adv.html?adpos=" + adpos)); } } \ No newline at end of file diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/AppsController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/AppsController.java index 62adb656..163e2047 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/AppsController.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/AppsController.java @@ -143,12 +143,13 @@ public class AppsController extends Handler { map.put("onlineUserList", onlineUserList); map.put("msg", msg); + map.put("now", new Date()); aggValues(map, request); // 获取agentStatus map.put("agentStatus", cache.findOneAgentStatusByAgentnoAndOrig(user.getId(), orgi)); - return request(super.createAppsTempletResponse("/apps/desktop/index")); + return request(super.createView("/apps/desktop/index")); } private void aggValues(ModelMap map, HttpServletRequest request) { @@ -242,7 +243,7 @@ public class AppsController extends Handler { map.put("onlineUserList", onlineUserList); aggValues(map, request); - return request(super.createAppsTempletResponse("/apps/desktop/onlineuser")); + return request(super.createView("/apps/desktop/onlineuser")); } @RequestMapping({"/apps/profile"}) @@ -250,7 +251,7 @@ public class AppsController extends Handler { public ModelAndView profile(ModelMap map, HttpServletRequest request, @Valid String index) { map.addAttribute("userData", super.getUser(request)); map.addAttribute("index", index); - return request(super.createRequestPageTempletResponse("/apps/desktop/profile")); + return request(super.createView("/apps/desktop/profile")); } @RequestMapping({"/apps/profile/save"}) @@ -266,9 +267,9 @@ public class AppsController extends Handler { if (StringUtils.isNotBlank(msg) && (!StringUtils.equals(msg, "edit_user_success"))) { // 处理异常返回 if (StringUtils.isBlank(index)) { - return request(super.createRequestPageTempletResponse("redirect:/apps/content.html?msg=" + msg)); + return request(super.createView("redirect:/apps/content.html?msg=" + msg)); } - return request(super.createRequestPageTempletResponse("redirect:/apps/tenant/index.html?msg=" + msg)); + return request(super.createView("redirect:/apps/tenant/index.html?msg=" + msg)); } // 执行更新 @@ -306,17 +307,17 @@ public class AppsController extends Handler { if (!(agentStatus == null && cache.getInservAgentUsersSizeByAgentnoAndOrgi( super.getUser(request).getId(), super.getOrgi(request)) == 0)) { if (StringUtils.isBlank(index)) { - return request(super.createRequestPageTempletResponse("redirect:/apps/content.html?msg=t1")); + return request(super.createView("redirect:/apps/content.html?msg=t1")); } - return request(super.createRequestPageTempletResponse("redirect:/apps/tenant/index.html?msg=t1")); + return request(super.createView("redirect:/apps/tenant/index.html?msg=t1")); } } } if (StringUtils.isBlank(index)) { - return request(super.createRequestPageTempletResponse("redirect:/apps/content.html")); + return request(super.createView("redirect:/apps/content.html")); } - return request(super.createRequestPageTempletResponse("redirect:/apps/tenant/index.html")); + return request(super.createView("redirect:/apps/tenant/index.html")); } /** diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/ContactsController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/ContactsController.java index 2c04e678..d8201273 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/ContactsController.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/ContactsController.java @@ -110,7 +110,7 @@ public class ContactsController extends Handler { BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery(); if (!super.esOrganFilter(request, boolQueryBuilder)) { - return request(super.createAppsTempletResponse("/apps/business/contacts/index")); + return request(super.createViewIncludedByFreemarkerTpl("/apps/contacts/index")); } if (StringUtils.isNotBlank(q)) { @@ -143,7 +143,7 @@ public class ContactsController extends Handler { contactsProxy.bindContactsApproachableData(contacts, map, logined); - return request(super.createAppsTempletResponse("/apps/business/contacts/index")); + return request(super.createView("/apps/contacts/index")); } @RequestMapping("/today") @@ -158,7 +158,7 @@ public class ContactsController extends Handler { boolQueryBuilder.must(termsQuery("organ", organs.keySet())); if (!super.esOrganFilter(request, boolQueryBuilder)) { - return request(super.createAppsTempletResponse("/apps/business/contacts/index")); + return request(super.createView("/apps/contacts/index")); } if (StringUtils.isNotBlank(q)) { @@ -183,7 +183,7 @@ public class ContactsController extends Handler { contactsProxy.bindContactsApproachableData(contacts, map, logined); - return request(super.createAppsTempletResponse("/apps/business/contacts/index")); + return request(super.createView("/apps/contacts/index")); } @RequestMapping("/week") @@ -198,7 +198,7 @@ public class ContactsController extends Handler { boolQueryBuilder.must(termsQuery("organ", organs.keySet())); if (!super.esOrganFilter(request, boolQueryBuilder)) { - return request(super.createAppsTempletResponse("/apps/business/contacts/index")); + return request(super.createView("/apps/contacts/index")); } if (StringUtils.isNotBlank(q)) { @@ -222,7 +222,7 @@ public class ContactsController extends Handler { contactsProxy.bindContactsApproachableData(contacts, map, logined); - return request(super.createAppsTempletResponse("/apps/business/contacts/index")); + return request(super.createView("/apps/contacts/index")); } @RequestMapping("/creater") @@ -237,7 +237,7 @@ public class ContactsController extends Handler { boolQueryBuilder.must(termsQuery("organ", organs.keySet())); if (!super.esOrganFilter(request, boolQueryBuilder)) { - return request(super.createAppsTempletResponse("/apps/business/contacts/index")); + return request(super.createView("/apps/contacts/index")); } boolQueryBuilder.must(termQuery("creater", logined.getId())); @@ -262,7 +262,7 @@ public class ContactsController extends Handler { map.addAttribute( "contactsList", contacts); contactsProxy.bindContactsApproachableData(contacts, map, logined); - return request(super.createAppsTempletResponse("/apps/business/contacts/index")); + return request(super.createView("/apps/contacts/index")); } @RequestMapping("/delete") @@ -273,7 +273,7 @@ public class ContactsController extends Handler { contacts.setDatastatus(true); //客户和联系人都是 逻辑删除 contactsRes.save(contacts); } - return request(super.createRequestPageTempletResponse( + return request(super.createView( "redirect:/apps/contacts/index.html?p=" + p + "&ckind=" + ckind)); } @@ -281,7 +281,7 @@ public class ContactsController extends Handler { @Menu(type = "contacts", subtype = "add") public ModelAndView add(ModelMap map, HttpServletRequest request, @Valid String ckind) { map.addAttribute("ckind", ckind); - return request(super.createRequestPageTempletResponse("/apps/business/contacts/add")); + return request(super.createView("/apps/contacts/add")); } @@ -317,11 +317,11 @@ public class ContactsController extends Handler { contactsRes.save(contacts); msg = "new_contacts_success"; - return request(super.createRequestPageTempletResponse( + return request(super.createView( "redirect:/apps/contacts/index.html?ckind=" + contacts.getCkind() + "&msg=" + msg)); } msg = "new_contacts_fail"; - return request(super.createRequestPageTempletResponse( + return request(super.createView( "redirect:/apps/contacts/index.html?ckind=" + contacts.getCkind() + "&msg=" + msg)); } @@ -330,7 +330,7 @@ public class ContactsController extends Handler { public ModelAndView edit(ModelMap map, HttpServletRequest request, @Valid String id, @Valid String ckind) { map.addAttribute("contacts", contactsRes.findOne(id)); map.addAttribute("ckindId", ckind); - return request(super.createRequestPageTempletResponse("/apps/business/contacts/edit")); + return request(super.createView("/apps/contacts/edit")); } @RequestMapping("/detail") @@ -340,7 +340,8 @@ public class ContactsController extends Handler { return null; // id is required. Block strange requst anyway with g2.min, https://github.com/alibaba/BizCharts/issues/143 } map.addAttribute("contacts", contactsRes.findOne(id)); - return request(super.createAppsTempletResponse("/apps/business/contacts/detail")); + + return request(super.createView("/apps/contacts/detail")); } @@ -403,13 +404,13 @@ public class ContactsController extends Handler { msg = "edit_contacts_success"; } else { //无修改,直接点击确定 - return request(super.createRequestPageTempletResponse( + return request(super.createView( "redirect:/apps/contacts/index.html?ckind=" + ckindId)); } } else { logger.info("[contacts edit] errer :The same skypeid exists"); msg = "edit_contacts_fail"; - return request(super.createRequestPageTempletResponse( + return request(super.createView( "redirect:/apps/contacts/index.html?ckind=" + ckindId + "&msg=" + msg)); } @@ -443,7 +444,7 @@ public class ContactsController extends Handler { if (msg.equals("edit_contacts_success")) { contactsRes.save(contacts); } - return request(super.createRequestPageTempletResponse( + return request(super.createView( "redirect:/apps/contacts/index.html?ckind=" + ckindId + "&msg=" + msg)); } @@ -452,7 +453,7 @@ public class ContactsController extends Handler { @Menu(type = "contacts", subtype = "contacts") public ModelAndView imp(ModelMap map, HttpServletRequest request, @Valid String ckind) { map.addAttribute("ckind", ckind); - return request(super.createRequestPageTempletResponse("/apps/business/contacts/imp")); + return request(super.createView("/apps/contacts/imp")); } @RequestMapping("/impsave") @@ -483,16 +484,7 @@ public class ContactsController extends Handler { reporterRes.save(event.getDSData().getReport()); new ExcelImportProecess(event).process(); //启动导入任务 } - return request(super.createRequestPageTempletResponse("redirect:/apps/contacts/index.html")); - } - - @RequestMapping("/startmass") - @Menu(type = "contacts", subtype = "contacts") - public ModelAndView mass(ModelMap map, HttpServletRequest request, @Valid String ids) { - map.addAttribute("organList", organRes.findByOrgiAndSkill(super.getOrgi(request), true)); - - map.addAttribute("ids", ids); - return request(super.createRequestPageTempletResponse("/apps/business/contacts/mass")); + return request(super.createView("redirect:/apps/contacts/index.html")); } @RequestMapping("/expids") @@ -607,7 +599,7 @@ public class ContactsController extends Handler { BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery(); map.put("msg", msg); if (!super.esOrganFilter(request, boolQueryBuilder)) { - return request(super.createAppsTempletResponse("/apps/business/contacts/embed/index")); + return request(super.createViewIncludedByFreemarkerTpl("/apps/contacts/embed/index")); } if (StringUtils.isNotBlank(q)) { map.put("q", q); @@ -636,7 +628,7 @@ public class ContactsController extends Handler { }); } - return request(super.createRequestPageTempletResponse("/apps/business/contacts/embed/index")); + return request(super.createView("/apps/contacts/embed/index")); } @RequestMapping("/embed/add") @@ -645,7 +637,7 @@ public class ContactsController extends Handler { if (StringUtils.isNotBlank(agentserviceid)) { map.put("agentserviceid", agentserviceid); } - return request(super.createRequestPageTempletResponse("/apps/business/contacts/embed/add")); + return request(super.createView("/apps/contacts/embed/add")); } @RequestMapping("/embed/save") @@ -675,10 +667,10 @@ public class ContactsController extends Handler { contactsRes.save(contacts); msg = "new_contacts_success"; return request( - super.createRequestPageTempletResponse("redirect:/apps/contacts/embed/index.html?msg=" + msg + "&agentserviceid=" + agentserviceid)); + super.createView("redirect:/apps/contacts/embed/index.html?msg=" + msg + "&agentserviceid=" + agentserviceid)); } msg = "new_contacts_fail"; - return request(super.createRequestPageTempletResponse("redirect:/apps/contacts/embed/index.html?msg=" + msg + "&agentserviceid=" + agentserviceid)); + return request(super.createView("redirect:/apps/contacts/embed/index.html?msg=" + msg + "&agentserviceid=" + agentserviceid)); } @RequestMapping("/embed/edit") @@ -688,7 +680,7 @@ public class ContactsController extends Handler { if (StringUtils.isNotBlank(agentserviceid)) { map.addAttribute("agentserviceid", agentserviceid); } - return request(super.createRequestPageTempletResponse("/apps/business/contacts/embed/edit")); + return request(super.createView("/apps/contacts/embed/edit")); } @RequestMapping("/embed/update") @@ -714,13 +706,13 @@ public class ContactsController extends Handler { msg = "edit_contacts_success"; } else { //无修改,直接点击确定 - return request(super.createRequestPageTempletResponse("redirect:/apps/contacts/embed/index.html?agentserviceid=" + agentserviceid)); + return request(super.createView("redirect:/apps/contacts/embed/index.html?agentserviceid=" + agentserviceid)); } } else { logger.info("[contacts edit] errer :The same skypeid exists"); msg = "edit_contacts_fail"; return request( - super.createRequestPageTempletResponse("redirect:/apps/contacts/embed/index.html?msg=" + msg + "&agentserviceid=" + agentserviceid)); + super.createView("redirect:/apps/contacts/embed/index.html?msg=" + msg + "&agentserviceid=" + agentserviceid)); } List events = PropertiesEventUtil.processPropertiesModify( @@ -753,6 +745,6 @@ public class ContactsController extends Handler { if (msg.equals("edit_contacts_success")) { contactsRes.save(contacts); } - return request(super.createRequestPageTempletResponse("redirect:/apps/contacts/embed/index.html?msg=" + msg + "&agentserviceid=" + agentserviceid)); + return request(super.createView("redirect:/apps/contacts/embed/index.html?msg=" + msg + "&agentserviceid=" + agentserviceid)); } } diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/CustomerController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/CustomerController.java index df10d1e7..5626342c 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/CustomerController.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/CustomerController.java @@ -106,7 +106,7 @@ public class CustomerController extends Handler { map.put("msg", msg); if (!super.esOrganFilter(request, boolQueryBuilder)) { - return request(super.createAppsTempletResponse("/apps/business/customer/index")); + return request(super.createView("/apps/customer/index")); } if (StringUtils.isNotBlank(q)) { @@ -129,7 +129,7 @@ public class CustomerController extends Handler { q, new PageRequest(super.getP(request), super.getPs(request)))); - return request(super.createAppsTempletResponse("/apps/business/customer/index")); + return request(super.createView("/apps/customer/index")); } @RequestMapping("/today") @@ -142,7 +142,7 @@ public class CustomerController extends Handler { boolQueryBuilder.must(termsQuery("organ", organs.keySet())); if (!super.esOrganFilter(request, boolQueryBuilder)) { - return request(super.createAppsTempletResponse("/apps/business/customer/index")); + return request(super.createView("/apps/customer/index")); } if (StringUtils.isNotBlank(q)) { @@ -155,7 +155,7 @@ public class CustomerController extends Handler { } map.addAttribute("entCustomerList", entCustomerRes.findByCreaterAndSharesAndOrgi(super.getUser(request).getId(), super.getUser(request).getId(), super.getOrgi(request), MainUtils.getStartTime(), null, false, boolQueryBuilder, q, new PageRequest(super.getP(request), super.getPs(request)))); - return request(super.createAppsTempletResponse("/apps/business/customer/index")); + return request(super.createView("/apps/customer/index")); } @RequestMapping("/week") @@ -168,7 +168,7 @@ public class CustomerController extends Handler { boolQueryBuilder.must(termsQuery("organ", organs.keySet())); if (!super.esOrganFilter(request, boolQueryBuilder)) { - return request(super.createAppsTempletResponse("/apps/business/customer/index")); + return request(super.createView("/apps/customer/index")); } if (StringUtils.isNotBlank(q)) { @@ -180,7 +180,7 @@ public class CustomerController extends Handler { } map.addAttribute("entCustomerList", entCustomerRes.findByCreaterAndSharesAndOrgi(super.getUser(request).getId(), super.getUser(request).getId(), super.getOrgi(request), MainUtils.getWeekStartTime(), null, false, boolQueryBuilder, q, new PageRequest(super.getP(request), super.getPs(request)))); - return request(super.createAppsTempletResponse("/apps/business/customer/index")); + return request(super.createView("/apps/customer/index")); } @RequestMapping("/enterprise") @@ -193,7 +193,7 @@ public class CustomerController extends Handler { boolQueryBuilder.must(termsQuery("organ", organs.keySet())); if (!super.esOrganFilter(request, boolQueryBuilder)) { - return request(super.createAppsTempletResponse("/apps/business/customer/index")); + return request(super.createView("/apps/customer/index")); } boolQueryBuilder.must(termQuery("etype", MainContext.CustomerTypeEnum.ENTERPRISE.toString())); @@ -205,7 +205,7 @@ public class CustomerController extends Handler { map.put("q", q); } map.addAttribute("entCustomerList", entCustomerRes.findByCreaterAndSharesAndOrgi(super.getUser(request).getId(), super.getUser(request).getId(), super.getOrgi(request), null, null, false, boolQueryBuilder, q, new PageRequest(super.getP(request), super.getPs(request)))); - return request(super.createAppsTempletResponse("/apps/business/customer/index")); + return request(super.createView("/apps/customer/index")); } @RequestMapping("/personal") @@ -218,7 +218,7 @@ public class CustomerController extends Handler { boolQueryBuilder.must(termsQuery("organ", organs.keySet())); if (!super.esOrganFilter(request, boolQueryBuilder)) { - return request(super.createAppsTempletResponse("/apps/business/customer/index")); + return request(super.createView("/apps/customer/index")); } boolQueryBuilder.must(termQuery("etype", MainContext.CustomerTypeEnum.PERSONAL.toString())); @@ -232,7 +232,7 @@ public class CustomerController extends Handler { map.put("q", q); } map.addAttribute("entCustomerList", entCustomerRes.findByCreaterAndSharesAndOrgi(super.getUser(request).getId(), super.getUser(request).getId(), super.getOrgi(request), null, null, false, boolQueryBuilder, q, new PageRequest(super.getP(request), super.getPs(request)))); - return request(super.createAppsTempletResponse("/apps/business/customer/index")); + return request(super.createView("/apps/customer/index")); } @RequestMapping("/creater") @@ -245,7 +245,7 @@ public class CustomerController extends Handler { boolQueryBuilder.must(termsQuery("organ", organs.keySet())); if (!super.esOrganFilter(request, boolQueryBuilder)) { - return request(super.createAppsTempletResponse("/apps/business/customer/index")); + return request(super.createView("/apps/customer/index")); } boolQueryBuilder.must(termQuery("creater", super.getUser(request).getId())); @@ -259,14 +259,14 @@ public class CustomerController extends Handler { } map.addAttribute("entCustomerList", entCustomerRes.findByCreaterAndSharesAndOrgi(super.getUser(request).getId(), super.getUser(request).getId(), super.getOrgi(request), null, null, false, boolQueryBuilder, q, new PageRequest(super.getP(request), super.getPs(request)))); - return request(super.createAppsTempletResponse("/apps/business/customer/index")); + return request(super.createView("/apps/customer/index")); } @RequestMapping("/add") @Menu(type = "customer", subtype = "customer") public ModelAndView add(ModelMap map, HttpServletRequest request, @Valid String ekind) { map.addAttribute("ekind", ekind); - return request(super.createRequestPageTempletResponse("/apps/business/customer/add")); + return request(super.createView("/apps/customer/add")); } @RequestMapping("/save") @@ -300,7 +300,7 @@ public class CustomerController extends Handler { contactsRes.save(customerGroupForm.getContacts()); } - return request(super.createRequestPageTempletResponse("redirect:/apps/customer/index.html?ekind=" + customerGroupForm.getEntcustomer().getEkind() + "&msg=" + msg)); + return request(super.createView("redirect:/apps/customer/index.html?ekind=" + customerGroupForm.getEntcustomer().getEkind() + "&msg=" + msg)); } @RequestMapping("/delete") @@ -311,7 +311,7 @@ public class CustomerController extends Handler { entCustomer.setDatastatus(true); //客户和联系人都是 逻辑删除 entCustomerRes.save(entCustomer); } - return request(super.createRequestPageTempletResponse("redirect:/apps/customer/index.html?p=" + p + "&ekind=" + ekind)); + return request(super.createView("redirect:/apps/customer/index.html?p=" + p + "&ekind=" + ekind)); } @RequestMapping("/edit") @@ -319,7 +319,7 @@ public class CustomerController extends Handler { public ModelAndView edit(ModelMap map, HttpServletRequest request, @Valid String id, @Valid String ekind) { map.addAttribute("entCustomer", entCustomerRes.findOne(id)); map.addAttribute("ekindId", ekind); - return request(super.createRequestPageTempletResponse("/apps/business/customer/edit")); + return request(super.createView("/apps/customer/edit")); } @RequestMapping("/update") @@ -350,14 +350,14 @@ public class CustomerController extends Handler { customerGroupForm.getEntcustomer().setPinyin(PinYinTools.getInstance().getFirstPinYin(customerGroupForm.getEntcustomer().getName())); entCustomerRes.save(customerGroupForm.getEntcustomer()); - return request(super.createRequestPageTempletResponse("redirect:/apps/customer/index.html?ekind=" + ekindId + "&msg=" + msg)); + return request(super.createView("redirect:/apps/customer/index.html?ekind=" + ekindId + "&msg=" + msg)); } @RequestMapping("/imp") @Menu(type = "customer", subtype = "customer") public ModelAndView imp(ModelMap map, HttpServletRequest request, @Valid String ekind) { map.addAttribute("ekind", ekind); - return request(super.createRequestPageTempletResponse("/apps/business/customer/imp")); + return request(super.createView("/apps/customer/imp")); } @RequestMapping("/impsave") @@ -390,7 +390,7 @@ public class CustomerController extends Handler { new ExcelImportProecess(event).process(); //启动导入任务 } - return request(super.createRequestPageTempletResponse("redirect:/apps/customer/index.html")); + return request(super.createView("redirect:/apps/customer/index.html")); } @RequestMapping("/expids") diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/EntIMController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/EntIMController.java index 2b9ce5e4..d30c26e5 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/EntIMController.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/EntIMController.java @@ -17,10 +17,12 @@ package com.chatopera.cc.controller.apps; +import com.alibaba.fastjson.JSONObject; import com.chatopera.cc.basic.Constants; import com.chatopera.cc.basic.MainContext; import com.chatopera.cc.basic.MainUtils; import com.chatopera.cc.controller.Handler; +import com.chatopera.cc.controller.api.request.RestUtils; import com.chatopera.cc.model.*; import com.chatopera.cc.peer.PeerSyncEntIM; import com.chatopera.cc.persistence.blob.JpaBlobHelper; @@ -37,6 +39,9 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Sort; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.util.FileCopyUtils; @@ -120,7 +125,7 @@ public class EntIMController extends Handler { @RequestMapping("/index") @Menu(type = "im", subtype = "entim", access = false) public ModelAndView index(HttpServletRequest request, HttpServletResponse response) { - ModelAndView view = request(super.createEntIMTempletResponse("/apps/entim/index")); + ModelAndView view = request(super.createView("/apps/entim/index")); User logined = super.getUser(request); @@ -145,7 +150,7 @@ public class EntIMController extends Handler { @RequestMapping("/skin") @Menu(type = "im", subtype = "entim", access = false) public ModelAndView skin(HttpServletRequest request, HttpServletResponse response) { - ModelAndView view = request(super.createEntIMTempletResponse("/apps/entim/skin")); + ModelAndView view = request(super.createView("/apps/entim/skin")); return view; } @@ -153,7 +158,7 @@ public class EntIMController extends Handler { @RequestMapping("/point") @Menu(type = "im", subtype = "entim", access = false) public ModelAndView point(HttpServletRequest request, HttpServletResponse response) { - ModelAndView view = request(super.createEntIMTempletResponse("/apps/entim/point")); + ModelAndView view = request(super.createView("/apps/entim/point")); view.addObject( "recentUserList", recentUserRes.findByCreaterAndOrgi(super.getUser(request).getId(), super.getOrgi(request)) @@ -164,14 +169,14 @@ public class EntIMController extends Handler { @RequestMapping("/expand") @Menu(type = "im", subtype = "entim", access = false) public ModelAndView expand(HttpServletRequest request, HttpServletResponse response) { - ModelAndView view = request(super.createEntIMTempletResponse("/apps/entim/expand")); + ModelAndView view = request(super.createView("/apps/entim/expand")); return view; } @RequestMapping("/chat") @Menu(type = "im", subtype = "entim", access = false) public ModelAndView chat(HttpServletRequest request, HttpServletResponse response, @Valid String userid) { - ModelAndView view = request(super.createEntIMTempletResponse("/apps/entim/chat")); + ModelAndView view = request(super.createView("/apps/entim/chat")); User entImUser = userRes.findById(userid); if (entImUser != null) { @@ -226,7 +231,7 @@ public class EntIMController extends Handler { HttpServletRequest request, HttpServletResponse response, @Valid String userid, @Valid Date createtime ) { - ModelAndView view = request(super.createRequestPageTempletResponse("/apps/entim/more")); + ModelAndView view = request(super.createView("/apps/entim/more")); Page chatMessageList = chatMessageRes.findByContextidAndUseridAndOrgiAndCreatetimeLessThan(userid, super.getUser(request).getId(), super.getOrgi(request), createtime, @@ -240,7 +245,7 @@ public class EntIMController extends Handler { @RequestMapping("/group") @Menu(type = "im", subtype = "entim", access = false) public ModelAndView groupMore(HttpServletRequest request, HttpServletResponse response, @Valid String id) { - ModelAndView view = request(super.createEntIMTempletResponse("/apps/entim/group/index")); + ModelAndView view = request(super.createView("/apps/entim/group/index")); IMGroup imGroup = imGroupRes.findById(id); view.addObject("imGroup", imGroup); view.addObject("imGroupUserList", imGroupUserRes.findByImgroupAndOrgi(imGroup, super.getOrgi(request))); @@ -257,7 +262,7 @@ public class EntIMController extends Handler { HttpServletRequest request, HttpServletResponse response, @Valid String id, @Valid Date createtime ) { - ModelAndView view = request(super.createRequestPageTempletResponse("/apps/entim/group/more")); + ModelAndView view = request(super.createView("/apps/entim/group/more")); view.addObject("chatMessageList", chatMessageRes.findByContextidAndOrgiAndCreatetimeLessThan(id, super.getOrgi(request), createtime, new PageRequest(0, 20, Sort.Direction.DESC, "createtime") )); @@ -267,7 +272,7 @@ public class EntIMController extends Handler { @RequestMapping("/group/user") @Menu(type = "im", subtype = "entim", access = false) public ModelAndView user(HttpServletRequest request, HttpServletResponse response, @Valid String id) { - ModelAndView view = request(super.createEntIMTempletResponse("/apps/entim/group/user")); + ModelAndView view = request(super.createView("/apps/entim/group/user")); User logined = super.getUser(request); HashSet affiliates = logined.getAffiliates(); @@ -328,7 +333,7 @@ public class EntIMController extends Handler { HttpServletRequest request, HttpServletResponse response, @Valid String id, @Valid String tipmsg ) { - ModelAndView view = request(super.createRequestPageTempletResponse("/apps/entim/group/tipmsg")); + ModelAndView view = request(super.createView("/apps/entim/group/tipmsg")); IMGroup imGroup = imGroupRes.findById(id); if (imGroup != null) { imGroup.setTipmessage(tipmsg); @@ -341,7 +346,7 @@ public class EntIMController extends Handler { @RequestMapping("/group/save") @Menu(type = "im", subtype = "entim", access = false) public ModelAndView groupsave(HttpServletRequest request, HttpServletResponse response, @Valid IMGroup group) { - ModelAndView view = request(super.createRequestPageTempletResponse("/apps/entim/group/grouplist")); + ModelAndView view = request(super.createView("/apps/entim/group/grouplist")); if (!StringUtils.isBlank(group.getName()) && imGroupRes.countByNameAndOrgi(group.getName(), super.getOrgi(request)) == 0) { group.setOrgi(super.getUser(request).getOrgi()); @@ -387,16 +392,17 @@ public class EntIMController extends Handler { @RequestMapping("/image/upload") @Menu(type = "im", subtype = "image", access = true) - public ModelAndView upload( + public ResponseEntity upload( ModelMap map, HttpServletRequest request, @RequestParam(value = "imgFile", required = false) MultipartFile multipart, @Valid String group, @Valid String userid, @Valid String username, @Valid String orgi, @Valid String paste ) throws IOException { - ModelAndView view = request(super.createRequestPageTempletResponse("/apps/im/upload")); + ModelAndView view = request(super.createView("/apps/im/upload")); final User logined = super.getUser(request); - UploadStatus upload = null; String fileName = null; + JSONObject result = new JSONObject(); + HttpHeaders headers = RestUtils.header(); if (multipart != null && multipart.getOriginalFilename().lastIndexOf(".") > 0 && StringUtils.isNotBlank(userid)) { @@ -425,7 +431,8 @@ public class EntIMController extends Handler { sf.setThumbnail(jpaBlobHelper.createBlobWithFile(thumbnail)); streamingFileRepository.save(sf); String fileUrl = "/res/image.html?id=" + fileid; - upload = new UploadStatus("0", fileUrl); + result.put("error", 0); + result.put("url", fileUrl); if (paste == null) { ChatMessage fileMessage = createFileMessage(fileUrl, (int) multipart.getSize(), multipart.getName(), MainContext.MediaType.IMAGE.toString(), userid, fileid, super.getOrgi(request)); @@ -433,7 +440,8 @@ public class EntIMController extends Handler { peerSyncEntIM.send(logined.getId(), group, orgi, MainContext.MessageType.MESSAGE, fileMessage); } } else { - upload = new UploadStatus(invalid); + result.put("error", 1); + result.put("message", invalid); } } else { String invalid = StreamingFileUtil.getInstance().validate(Constants.ATTACHMENT_TYPE_FILE, multipart.getOriginalFilename()); @@ -444,22 +452,25 @@ public class EntIMController extends Handler { String id = attachmentProxy.processAttachmentFile(multipart, fileid, logined.getOrgi(), logined.getId() ); - upload = new UploadStatus("0", "/res/file.html?id=" + id); + result.put("error", 0); + result.put("url", "/res/file.html?id=" + id); + String file = "/res/file.html?id=" + id; ChatMessage fileMessage = createFileMessage(file, (int) multipart.getSize(), multipart.getOriginalFilename(), MainContext.MediaType.FILE.toString(), userid, fileid, super.getOrgi(request)); fileMessage.setUsername(logined.getUname()); peerSyncEntIM.send(logined.getId(), group, orgi, MainContext.MessageType.MESSAGE, fileMessage); } else { - upload = new UploadStatus(invalid); + result.put("error", 1); + result.put("message", invalid); } } } else { - upload = new UploadStatus("请选择文件"); + result.put("error", 1); + result.put("message", "请选择文件"); } - map.addAttribute("upload", upload); - return view; + return new ResponseEntity<>(result.toString(), headers, HttpStatus.OK); } } \ No newline at end of file diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/IMController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/IMController.java index 6dc62972..eebab5c3 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/IMController.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/IMController.java @@ -17,6 +17,7 @@ package com.chatopera.cc.controller.apps; +import com.alibaba.fastjson.JSONObject; import com.chatopera.cc.acd.ACDPolicyService; import com.chatopera.cc.acd.ACDWorkMonitor; import com.chatopera.cc.basic.Constants; @@ -24,6 +25,7 @@ import com.chatopera.cc.basic.MainContext; import com.chatopera.cc.basic.MainUtils; import com.chatopera.cc.cache.Cache; import com.chatopera.cc.controller.Handler; +import com.chatopera.cc.controller.api.request.RestUtils; import com.chatopera.cc.model.*; import com.chatopera.cc.persistence.blob.JpaBlobHelper; import com.chatopera.cc.persistence.es.ContactsRepository; @@ -31,7 +33,7 @@ import com.chatopera.cc.persistence.repository.*; import com.chatopera.cc.proxy.OnlineUserProxy; import com.chatopera.cc.socketio.util.RichMediaUtils; import com.chatopera.cc.util.*; -import freemarker.template.TemplateException; + import org.apache.commons.io.FileUtils; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; @@ -41,6 +43,9 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Sort.Direction; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; @@ -152,6 +157,42 @@ public class IMController extends Handler { private void init() { } + @RequestMapping("/{id}") + @Menu(type = "im", subtype = "point", access = true) + public ModelAndView loader( + HttpServletRequest request, HttpServletResponse response, + @PathVariable String id, + @Valid String userid, + @Valid String title, + @Valid String aiid) { + ModelAndView view = request(super.createView("/apps/im/loader")); + + view.addObject("hostname", request.getServerName()); + SystemConfig systemConfig = MainUtils.getSystemConfig(); + if (systemConfig != null && systemConfig.isEnablessl()) { + view.addObject("schema", "https"); + if (request.getServerPort() == 80) { + view.addObject("port", 443); + } else { + view.addObject("port", request.getServerPort()); + } + } else { + view.addObject("schema", request.getScheme()); + String header = request.getHeader("X-Forwarded-Proto"); + if (header != null) { + view.addObject("schema", header); + } + view.addObject("port", request.getServerPort()); + } + + view.addObject("appid", id); + view.addObject("userid", userid); + view.addObject("title", title); + view.addObject("aiid", aiid); + + return view; + } + /** * 在客户或第三方网页内,写入聊天控件 * @@ -163,7 +204,7 @@ public class IMController extends Handler { * @param aiid * @return */ - @RequestMapping("/{id}") + @RequestMapping("/point/{id}") @Menu(type = "im", subtype = "point", access = true) public ModelAndView point( HttpServletRequest request, HttpServletResponse response, @@ -171,7 +212,7 @@ public class IMController extends Handler { @Valid String userid, @Valid String title, @Valid String aiid) { - ModelAndView view = request(super.createRequestPageTempletResponse("/apps/im/point")); + ModelAndView view = request(super.createView("/apps/im/point")); view.addObject("channelVisitorSeparate", channelWebIMVisitorSeparate); final String sessionid = MainUtils.getContextID(request.getSession().getId()); @@ -352,8 +393,8 @@ public class IMController extends Handler { String sid, String system_name, Boolean whitelist_mode, - @RequestParam String sessionid) throws IOException, TemplateException { - ModelAndView view = request(super.createRequestPageTempletResponse("/apps/im/point")); + @RequestParam String sessionid) throws IOException { + ModelAndView view = request(super.createView("/apps/im/point")); final User logined = super.getUser(request); request.getSession().setAttribute("Sessionuid", uid); @@ -575,6 +616,8 @@ public class IMController extends Handler { traceid, isInvite, exchange); Map sessionMessageObj = cache.findOneSystemMapByIdAndOrgi(sessionid, orgi); + map.put("pugHelper", new PugHelper()); + if (sessionMessageObj != null) { request.getSession().setAttribute("Sessionusername", sessionMessageObj.get("username")); request.getSession().setAttribute("Sessioncid", sessionMessageObj.get("cid")); @@ -585,7 +628,7 @@ public class IMController extends Handler { request.getSession().setAttribute("Sessionuid", sessionMessageObj.get("uid")); } - ModelAndView view = request(super.createRequestPageTempletResponse("/apps/im/index")); + ModelAndView view = request(super.createView("/apps/im/index")); Optional blackOpt = cache.findOneBlackEntityByUserIdAndOrgi(userid, Constants.SYSTEM_ORGI); CousultInvite invite = OnlineUserProxy.consult(appid, orgi); if (StringUtils.isNotBlank( @@ -688,7 +731,7 @@ public class IMController extends Handler { isLeavemsg = true; boolean isInWorkingHours = MainUtils.isInWorkingHours(sessionConfig.getWorkinghours()); map.addAttribute("isInWorkingHours", isInWorkingHours); - view = request(super.createRequestPageTempletResponse("/apps/im/leavemsg")); + view = request(super.createView("/apps/im/leavemsg")); } else if (invite.isConsult_info()) { //启用了信息收集,从Request获取, 或从 Cookies 里去 // 验证 OnlineUser 信息 if (contacts != null && StringUtils.isNotBlank( @@ -770,7 +813,7 @@ public class IMController extends Handler { } if (StringUtils.isBlank(contacts.getName())) { consult = false; - view = request(super.createRequestPageTempletResponse("/apps/im/collecting")); + view = request(super.createView("/apps/im/collecting")); } } } else { @@ -877,10 +920,10 @@ public class IMController extends Handler { if (chatbotConfig != null) { map.addAttribute("chatbotConfig", chatbotConfig); } - view = request(super.createRequestPageTempletResponse("/apps/im/chatbot/index")); + view = request(super.createView("/apps/im/chatbot/index")); if (MobileDevice.isMobile(request.getHeader("User-Agent")) || StringUtils.isNotBlank( mobile)) { - view = request(super.createRequestPageTempletResponse( + view = request(super.createView( "/apps/im/chatbot/mobile")); // 智能机器人 移动端 } } else { @@ -888,7 +931,7 @@ public class IMController extends Handler { if (!isLeavemsg && (MobileDevice.isMobile( request.getHeader("User-Agent")) || StringUtils.isNotBlank(mobile))) { view = request( - super.createRequestPageTempletResponse("/apps/im/mobile")); // WebIM移动端。再次点选技能组? + super.createView("/apps/im/mobile")); // WebIM移动端。再次点选技能组? } } @@ -960,7 +1003,7 @@ public class IMController extends Handler { @Valid String imgurl, @Valid String pid, @Valid String purl) throws Exception { - ModelAndView view = request(super.createRequestPageTempletResponse("/apps/im/text")); + ModelAndView view = request(super.createView("/apps/im/text")); CousultInvite invite = OnlineUserProxy.consult( appid, StringUtils.isBlank(orgi) ? Constants.SYSTEM_ORGI : orgi); @@ -1051,7 +1094,7 @@ public class IMController extends Handler { } }); } - return request(super.createRequestPageTempletResponse("/apps/im/leavemsgsave")); + return request(super.createView("/apps/im/leavemsgsave")); } @RequestMapping("/refuse") @@ -1098,7 +1141,7 @@ public class IMController extends Handler { @RequestMapping("/image/upload") @Menu(type = "im", subtype = "image", access = true) - public ModelAndView upload( + public ResponseEntity upload( ModelMap map, HttpServletRequest request, @RequestParam(value = "imgFile", required = false) MultipartFile multipart, @Valid String channel, @@ -1107,11 +1150,11 @@ public class IMController extends Handler { @Valid String appid, @Valid String orgi, @Valid String paste) throws IOException { - ModelAndView view = request(super.createRequestPageTempletResponse("/apps/im/upload")); final User logined = super.getUser(request); - UploadStatus upload = null; String fileName = null; + JSONObject result = new JSONObject(); + HttpHeaders headers = RestUtils.header(); // String multipartLast = null; // if ( multipart != null && multipart.getOriginalFilename() != null ){ // Number multipartLenght = multipart.getOriginalFilename().split("\\.").length - 1; @@ -1156,7 +1199,8 @@ public class IMController extends Handler { sf.setThumbnail(jpaBlobHelper.createBlobWithFile(thumbnail)); streamingFileRepository.save(sf); String fileUrl = "/res/image.html?id=" + fileid; - upload = new UploadStatus("0", fileUrl); + result.put("error", 0); + result.put("url", fileUrl); if (paste == null) { if (StringUtils.isNotBlank(channel)) { @@ -1169,7 +1213,8 @@ public class IMController extends Handler { } } } else { - upload = new UploadStatus(invalid); + result.put("error", 1); + result.put("message", invalid); } } else { String invalid = StreamingFileUtil.getInstance().validate( @@ -1182,7 +1227,8 @@ public class IMController extends Handler { // 存储到本地硬盘 String id = processAttachmentFile(multipart, fileid, logined.getOrgi(), logined.getId()); - upload = new UploadStatus("0", "/res/file.html?id=" + id); + result.put("error", 0); + result.put("url", "/res/file.html?id=" + id); String file = "/res/file.html?id=" + id; File tempFile = new File(multipart.getOriginalFilename()); @@ -1194,11 +1240,13 @@ public class IMController extends Handler { RichMediaUtils.uploadFile(file, (int) multipart.getSize(), tempFile.getName(), userid, id); } } else { - upload = new UploadStatus(invalid); + result.put("error", 1); + result.put("message", invalid); } } } else { - upload = new UploadStatus("请选择文件"); + result.put("error", 1); + result.put("message", "请选择文件"); } // }else { // upload = new UploadStatus("请上传格式为jpg,png,jpeg,bmp类型图片"); @@ -1206,8 +1254,8 @@ public class IMController extends Handler { // } else { // upload = new UploadStatus("请上传格式为jpg,png,jpeg,bmp类型图片"); // } - map.addAttribute("upload", upload); - return view; + + return new ResponseEntity<>(result.toString(), headers, HttpStatus.OK); } diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/JobController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/JobController.java deleted file mode 100644 index 49b7fc09..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/JobController.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.chatopera.cc.controller.apps; - -import com.chatopera.cc.basic.MainUtils; -import com.chatopera.cc.controller.Handler; -import com.chatopera.cc.model.JobDetail; -import com.chatopera.cc.model.JobTask; -import com.chatopera.cc.persistence.repository.JobDetailRepository; -import com.chatopera.cc.util.Menu; -import com.fasterxml.jackson.databind.ObjectMapper; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.servlet.ModelAndView; - -import javax.servlet.http.HttpServletRequest; -import javax.validation.Valid; -import java.text.ParseException; -import java.util.Date; - - -@Controller -@RequestMapping("/apps/job") -public class JobController extends Handler { - - @Autowired - private JobDetailRepository jobRes ; - /** - * 跳转到修改执行时间的页面 - * @param request - * @param orgi - * @param id - * @return - * @throws Exception - */ - @RequestMapping({"/setting"}) - @Menu(type="job", subtype="setting") - public ModelAndView setting(ModelMap map , HttpServletRequest request , @Valid String id) throws Exception { - JobDetail detail = jobRes.findByIdAndOrgi(id, super.getOrgi(request)) ; - if(detail.getTaskinfo() != null && detail.getTaskinfo() != ""){ - ObjectMapper objectMapper = new ObjectMapper(); - JobTask taskInfo = objectMapper.readValue(detail.getTaskinfo(), JobTask.class) ; - map.put("taskinfo",taskInfo); - } - map.put("job", detail); - return request(super.createRequestPageTempletResponse("/apps/business/job/setting")); - } - - @RequestMapping({"/save"}) - @Menu(type="job", subtype="save") - public ModelAndView save(HttpServletRequest request, - @Valid JobTask taskinfo,@Valid Boolean plantask, @Valid String id) throws ParseException { - JobDetail detail = jobRes.findByIdAndOrgi(id, super.getOrgi(request)) ; - - if(detail != null ){ - try { - detail.setPlantask(plantask) ; - ObjectMapper mapper = new ObjectMapper(); - detail.setTaskinfo(mapper.writeValueAsString(taskinfo)); - - detail.setCronexp(MainUtils.convertCrond(taskinfo)); - /** - * 设定触发时间 - */ - detail.setNextfiretime(new Date()); - detail.setNextfiretime(MainUtils.updateTaskNextFireTime(detail)); - } catch (Exception e) { - e.printStackTrace(); - } - jobRes.save(detail) ; - } - return request(super.createRequestPageTempletResponse("/public/success")); - } -} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/KbsController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/KbsController.java deleted file mode 100644 index b77034cc..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/KbsController.java +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.chatopera.cc.controller.apps; - -import com.chatopera.cc.basic.MainContext; -import com.chatopera.cc.basic.MainUtils; -import com.chatopera.cc.controller.Handler; -import com.chatopera.cc.model.AttachmentFile; -import com.chatopera.cc.model.KbsTopic; -import com.chatopera.cc.model.KbsType; -import com.chatopera.cc.persistence.es.KbsTopicRepository; -import com.chatopera.cc.persistence.repository.AttachmentRepository; -import com.chatopera.cc.persistence.repository.KbsTypeRepository; -import com.chatopera.cc.persistence.repository.TagRepository; -import com.chatopera.cc.util.Menu; -import org.apache.commons.io.FileUtils; -import org.apache.commons.lang.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.multipart.MultipartFile; -import org.springframework.web.servlet.ModelAndView; - -import javax.servlet.http.HttpServletRequest; -import javax.validation.Valid; -import java.io.File; -import java.io.IOException; -import java.util.Date; - -@Controller -@RequestMapping({"/apps/kbs"}) -public class KbsController extends Handler { - - @Autowired - private TagRepository tagRes ; - - @Autowired - private KbsTypeRepository kbsTypeRes ; - - @Autowired - private KbsTopicRepository kbsTopicRes ; - - @Autowired - private AttachmentRepository attachementRes; - - @Value("${web.upload-path}") - private String path; - - @RequestMapping({"/index"}) - @Menu(type="apps", subtype="kbs") - public ModelAndView index(ModelMap map , HttpServletRequest request){ - return request(super.createAppsTempletResponse("/apps/business/kbs/index")); - } - - @RequestMapping({"/list"}) - @Menu(type="apps", subtype="kbs") - public ModelAndView list(ModelMap map , HttpServletRequest request){ - map.addAttribute("kbsTypeResList", kbsTypeRes.findByOrgi(super.getOrgi(request))) ; - return request(super.createAppsTempletResponse("/apps/business/kbs/list")); - } - - @RequestMapping({"/list/type"}) - @Menu(type="apps", subtype="kbs") - public ModelAndView listtype(ModelMap map , HttpServletRequest request,@Valid String typeid){ - if(!StringUtils.isBlank(typeid) && !typeid.equals("0")){ - map.addAttribute("kbsType", kbsTypeRes.findByIdAndOrgi(typeid, super.getOrgi(request))) ; - } - return request(super.createRequestPageTempletResponse("/apps/business/kbs/typelist")); - } - - @RequestMapping({"/addtype"}) - @Menu(type="apps", subtype="kbs") - public ModelAndView addtype(ModelMap map , HttpServletRequest request ){ - map.addAttribute("kbsTypeResList", kbsTypeRes.findByOrgi(super.getOrgi(request))) ; - return request(super.createRequestPageTempletResponse("/apps/business/kbs/addtype")); - } - - @RequestMapping("/type/save") - @Menu(type = "apps" , subtype = "kbs") - public ModelAndView typesave(HttpServletRequest request ,@Valid KbsType kbsType) { - int count = kbsTypeRes.countByOrgiAndNameAndParentid(super.getOrgi(request), kbsType.getName(), kbsType.getParentid()) ; - if(count == 0){ - kbsType.setOrgi(super.getOrgi(request)); - kbsType.setCreater(super.getUser(request).getId()); - kbsType.setCreatetime(new Date()); - kbsTypeRes.save(kbsType) ; - } - return request(super.createRequestPageTempletResponse("redirect:/apps/kbs/list.html")); - } - - @RequestMapping({"/add"}) - @Menu(type="apps", subtype="kbs") - public ModelAndView add(ModelMap map , HttpServletRequest request ,@Valid String typeid){ - map.addAttribute("kbsTypeResList", kbsTypeRes.findByOrgi(super.getOrgi(request))) ; - map.addAttribute("tags", tagRes.findByOrgiAndTagtype(super.getOrgi(request) , MainContext.ModelType.KBS.toString())) ; - if(!StringUtils.isBlank(typeid) && !typeid.equals("0")){ - map.addAttribute("kbsType", kbsTypeRes.findByIdAndOrgi(typeid, super.getOrgi(request))) ; - } - return request(super.createRequestPageTempletResponse("/apps/business/kbs/add")); - } - - @RequestMapping("/save") - @Menu(type = "topic" , subtype = "save" , access = false) - public ModelAndView save(HttpServletRequest request , - final @Valid KbsTopic topic , - @RequestParam(value = "files", required = false) MultipartFile[] files) throws IOException { - ModelAndView view = request(super.createRequestPageTempletResponse("redirect:/apps/kbs/index.html")); - topic.setOrgi(super.getOrgi(request)); - topic.setCreater(super.getUser(request).getId()); - topic.setUsername(super.getUser(request).getUsername()); - - processAttachmentFile(files, topic, request, topic.getId(), topic.getId()); - - KbsType workOrderType = kbsTypeRes.findByIdAndOrgi(topic.getTptype(), super.getOrgi(request)) ; - // 知识处理流程,如果知识分类需要审批,则触发知识流程 - if(workOrderType.isApproval()){ - topic.setApproval(false); - }else{ - topic.setApproval(true); - } - kbsTopicRes.save(topic) ; - return view; - } - - - private void processAttachmentFile(MultipartFile[] files , KbsTopic topic, HttpServletRequest request , String dataid , String modelid) throws IOException{ - if(files!=null && files.length > 0){ - topic.setAttachment(""); //序列化 附件文件,方便显示,避免多一次查询 附件的操作 - //保存附件 - for(MultipartFile file : files){ - if(file.getSize() > 0){ //文件尺寸 限制 ?在 启动 配置中 设置 的最大值,其他地方不做限制 - String fileid = MainUtils.md5(file.getBytes()) ; //使用 文件的 MD5作为 ID,避免重复上传大文件 - if(!StringUtils.isBlank(fileid)){ - AttachmentFile attachmentFile = new AttachmentFile() ; - attachmentFile.setCreater(super.getUser(request).getId()); - attachmentFile.setOrgi(super.getOrgi(request)); - attachmentFile.setDataid(dataid); - attachmentFile.setModelid(modelid); - attachmentFile.setModel(MainContext.ModelType.WORKORDERS.toString()); - attachmentFile.setFilelength((int) file.getSize()); - if(file.getContentType()!=null && file.getContentType().length() > 255){ - attachmentFile.setFiletype(file.getContentType().substring(0 , 255)); - }else{ - attachmentFile.setFiletype(file.getContentType()); - } - if(file.getOriginalFilename()!=null && file.getOriginalFilename().length() > 255){ - attachmentFile.setTitle(file.getOriginalFilename().substring(0 , 255)); - }else{ - attachmentFile.setTitle(file.getOriginalFilename()); - } - if(!StringUtils.isBlank(attachmentFile.getFiletype()) && attachmentFile.getFiletype().indexOf("image") >= 0){ - attachmentFile.setImage(true); - } - attachmentFile.setFileid(fileid); - attachementRes.save(attachmentFile) ; - FileUtils.writeByteArrayToFile(new File(path , "app/kbs/"+fileid), file.getBytes()); - } - } - } - - } - } -} - diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/MessageController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/MessageController.java index df038f76..7f045152 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/MessageController.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/MessageController.java @@ -33,6 +33,6 @@ public class MessageController extends Handler{ @RequestMapping("/ping") @Menu(type = "message" , subtype = "ping" , admin= true) public ModelAndView ping(ModelMap map , HttpServletRequest request) { - return request(super.createRequestPageTempletResponse("/apps/message/ping")); + return request(super.createView("/apps/message/ping")); } } \ No newline at end of file diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/QuickReplyController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/QuickReplyController.java deleted file mode 100644 index cdcdca9c..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/QuickReplyController.java +++ /dev/null @@ -1,335 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.controller.apps; - -import com.chatopera.cc.basic.Constants; -import com.chatopera.cc.basic.MainContext; -import com.chatopera.cc.basic.MainUtils; -import com.chatopera.cc.controller.Handler; -import com.chatopera.cc.model.MetadataTable; -import com.chatopera.cc.model.QuickReply; -import com.chatopera.cc.persistence.es.QuickReplyRepository; -import com.chatopera.cc.persistence.repository.MetadataRepository; -import com.chatopera.cc.persistence.repository.QuickTypeRepository; -import com.chatopera.cc.persistence.repository.ReporterRepository; -import com.chatopera.cc.util.Menu; -import com.chatopera.cc.util.dsdata.DSData; -import com.chatopera.cc.util.dsdata.DSDataEvent; -import com.chatopera.cc.util.dsdata.ExcelImportProecess; -import com.chatopera.cc.util.dsdata.export.ExcelExporterProcess; -import com.chatopera.cc.util.dsdata.process.QuickReplyProcess; -import org.apache.commons.io.FileUtils; -import org.apache.commons.lang.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.PageRequest; -import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.multipart.MultipartFile; -import org.springframework.web.servlet.ModelAndView; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.validation.Valid; -import java.io.File; -import java.io.IOException; -import java.text.SimpleDateFormat; -import java.util.*; - -@Controller -@RequestMapping("/setting/quickreply") -public class QuickReplyController extends Handler { - - @Autowired - private QuickReplyRepository quickReplyRes ; - - @Autowired - private QuickTypeRepository quickTypeRes ; - - @Autowired - private MetadataRepository metadataRes ; - - @Autowired - private ReporterRepository reporterRes ; - - @Value("${web.upload-path}") - private String path; - - @RequestMapping("/index") - @Menu(type = "setting" , subtype = "quickreply" , admin= true) - public ModelAndView index(ModelMap map , HttpServletRequest request , @Valid String typeid) { - List quickTypeList = quickTypeRes.findByOrgiAndQuicktype(super.getOrgi(request) , MainContext.QuickType.PUB.toString()) ; - if(!StringUtils.isBlank(typeid)){ - map.put("quickType", quickTypeRes.findByIdAndOrgi(typeid, super.getOrgi(request))) ; - map.put("quickReplyList", quickReplyRes.getByOrgiAndCate(super.getOrgi(request) , typeid , null , new PageRequest(super.getP(request), super.getPs(request)))) ; - }else{ - map.put("quickReplyList", quickReplyRes.getByOrgiAndType(super.getOrgi(request) , MainContext.QuickType.PUB.toString(), null, new PageRequest(super.getP(request), super.getPs(request)))) ; - } - map.put("pubQuickTypeList", quickTypeList) ; - return request(super.createAppsTempletResponse("/apps/setting/quickreply/index")); - } - @RequestMapping("/replylist") - @Menu(type = "setting" , subtype = "quickreply" , admin= true) - public ModelAndView list(ModelMap map , HttpServletRequest request , @Valid String typeid) { - if(!StringUtils.isBlank(typeid) && !typeid.equals("0")){ - map.put("quickReplyList", quickReplyRes.getByOrgiAndCate(super.getOrgi(request) , typeid, null, new PageRequest(super.getP(request), super.getPs(request)))) ; - }else{ - map.put("quickReplyList", quickReplyRes.getByOrgiAndType(super.getOrgi(request), MainContext.QuickType.PUB.toString() , null , new PageRequest(super.getP(request), super.getPs(request)))) ; - } - map.put("quickType", quickTypeRes.findByIdAndOrgi(typeid, super.getOrgi(request))) ; - return request(super.createRequestPageTempletResponse("/apps/setting/quickreply/replylist")); - } - - @RequestMapping("/add") - @Menu(type = "setting" , subtype = "quickreplyadd" , admin= true) - public ModelAndView quickreplyadd(ModelMap map , HttpServletRequest request , @Valid String parentid) { - if(!StringUtils.isBlank(parentid)){ - map.addAttribute("quickType", quickTypeRes.findByIdAndOrgi(parentid, super.getOrgi(request))) ; - } - map.addAttribute("quickTypeList", quickTypeRes.findByOrgiAndQuicktype(super.getOrgi(request) , MainContext.QuickType.PUB.toString())) ; - return request(super.createRequestPageTempletResponse("/apps/setting/quickreply/add")); - } - - @RequestMapping("/save") - @Menu(type = "setting" , subtype = "quickreply" , admin= true) - public ModelAndView quickreplysave(ModelMap map , HttpServletRequest request , @Valid QuickReply quickReply) { - if(!StringUtils.isBlank(quickReply.getTitle()) && !StringUtils.isBlank(quickReply.getContent())){ - quickReply.setOrgi(super.getOrgi(request)); - quickReply.setCreater(super.getUser(request).getId()); - quickReply.setType(MainContext.QuickType.PUB.toString()); - quickReplyRes.save(quickReply) ; - } - return request(super.createRequestPageTempletResponse("redirect:/setting/quickreply/index.html?typeid="+quickReply.getCate())); - } - - @RequestMapping("/delete") - @Menu(type = "setting" , subtype = "quickreply" , admin= true) - public ModelAndView quickreplydelete(ModelMap map , HttpServletRequest request , @Valid String id) { - QuickReply quickReply = quickReplyRes.findOne(id) ; - if(quickReply!=null){ - quickReplyRes.delete(quickReply); - } - return request(super.createRequestPageTempletResponse("redirect:/setting/quickreply/index.html?typeid="+quickReply.getCate())); - } - @RequestMapping("/edit") - @Menu(type = "setting" , subtype = "quickreply" , admin= true) - public ModelAndView quickreplyedit(ModelMap map , HttpServletRequest request , @Valid String id) { - QuickReply quickReply = quickReplyRes.findOne(id) ; - map.put("quickReply", quickReply) ; - if(quickReply!=null){ - map.put("quickType", quickTypeRes.findByIdAndOrgi(quickReply.getCate(), super.getOrgi(request))) ; - } - map.addAttribute("quickTypeList", quickTypeRes.findByOrgiAndQuicktype(super.getOrgi(request) , MainContext.QuickType.PUB.toString())) ; - return request(super.createRequestPageTempletResponse("/apps/setting/quickreply/edit")); - } - - @RequestMapping("/update") - @Menu(type = "setting" , subtype = "quickreply" , admin= true) - public ModelAndView quickreplyupdate(ModelMap map , HttpServletRequest request , @Valid QuickReply quickReply) { - if(!StringUtils.isBlank(quickReply.getId())){ - QuickReply temp = quickReplyRes.findOne(quickReply.getId()) ; - quickReply.setOrgi(super.getOrgi(request)); - quickReply.setCreater(super.getUser(request).getId()); - if(temp!=null){ - quickReply.setCreatetime(temp.getCreatetime()); - } - quickReply.setType(MainContext.QuickType.PUB.toString()); - quickReplyRes.save(quickReply) ; - } - return request(super.createRequestPageTempletResponse("redirect:/setting/quickreply/index.html?typeid="+quickReply.getCate())); - } - - @RequestMapping({"/addtype"}) - @Menu(type="apps", subtype="kbs") - public ModelAndView addtype(ModelMap map , HttpServletRequest request , @Valid String typeid){ - map.addAttribute("quickTypeList", quickTypeRes.findByOrgiAndQuicktype(super.getOrgi(request) , MainContext.QuickType.PUB.toString())) ; - if(!StringUtils.isBlank(typeid)){ - map.addAttribute("quickType", quickTypeRes.findByIdAndOrgi(typeid, super.getOrgi(request))) ; - } - return request(super.createRequestPageTempletResponse("/apps/setting/quickreply/addtype")); - } - - @RequestMapping("/type/save") - @Menu(type = "apps" , subtype = "kbs") - public ModelAndView typesave(HttpServletRequest request ,@Valid com.chatopera.cc.model.QuickType quickType) { - com.chatopera.cc.model.QuickType qr = quickTypeRes.findByOrgiAndName(super.getOrgi(request), quickType.getName()) ; - if(qr==null){ - quickType.setOrgi(super.getOrgi(request)); - quickType.setCreater(super.getUser(request).getId()); - quickType.setCreatetime(new Date()); - quickType.setQuicktype(MainContext.QuickType.PUB.toString()); - quickTypeRes.save(quickType) ; - }else { - return request(super.createRequestPageTempletResponse("redirect:/setting/quickreply/index.html?msg=qr_type_exist")); - } - return request(super.createRequestPageTempletResponse("redirect:/setting/quickreply/index.html")); - } - - @RequestMapping({"/edittype"}) - @Menu(type="apps", subtype="kbs") - public ModelAndView edittype(ModelMap map , HttpServletRequest request , String id){ - map.addAttribute("quickType", quickTypeRes.findByIdAndOrgi(id, super.getOrgi(request))) ; - map.addAttribute("quickTypeList", quickTypeRes.findByOrgiAndQuicktype(super.getOrgi(request) , MainContext.QuickType.PUB.toString())) ; - return request(super.createRequestPageTempletResponse("/apps/setting/quickreply/edittype")); - } - - @RequestMapping("/type/update") - @Menu(type = "apps" , subtype = "kbs") - public ModelAndView typeupdate(HttpServletRequest request ,@Valid com.chatopera.cc.model.QuickType quickType) { - com.chatopera.cc.model.QuickType tempQuickType = quickTypeRes.findByIdAndOrgi(quickType.getId(), super.getOrgi(request)) ; - if(tempQuickType !=null){ - //判断名称是否重复 - com.chatopera.cc.model.QuickType qr = quickTypeRes.findByOrgiAndName(super.getOrgi(request), quickType.getName()); - if(qr!=null && !qr.getId().equals(quickType.getId())) { - return request(super.createRequestPageTempletResponse("redirect:/setting/quickreply/index.html?msg=qr_type_exist&typeid="+quickType.getId())); - } - tempQuickType.setName(quickType.getName()); - tempQuickType.setDescription(quickType.getDescription()); - tempQuickType.setInx(quickType.getInx()); - tempQuickType.setParentid(quickType.getParentid()); - quickTypeRes.save(tempQuickType) ; - } - return request(super.createRequestPageTempletResponse("redirect:/setting/quickreply/index.html?typeid="+quickType.getId())); - } - - @RequestMapping({"/deletetype"}) - @Menu(type="apps", subtype="kbs") - public ModelAndView deletetype(ModelMap map , HttpServletRequest request , @Valid String id){ - if(!StringUtils.isBlank(id)){ - com.chatopera.cc.model.QuickType tempQuickType = quickTypeRes.findByIdAndOrgi(id, super.getOrgi(request)) ; - quickTypeRes.delete(tempQuickType); - - Page quickReplyList = quickReplyRes.getByOrgiAndCate(super.getOrgi(request), id, null, new PageRequest(0, 10000)) ; - - quickReplyRes.delete(quickReplyList.getContent()); - } - return request(super.createRequestPageTempletResponse("redirect:/setting/quickreply/index.html")); - } - - @RequestMapping("/imp") - @Menu(type = "setting" , subtype = "quickreplyimp") - public ModelAndView imp(ModelMap map , HttpServletRequest request , @Valid String type) { - map.addAttribute("type", type) ; - return request(super.createRequestPageTempletResponse("/apps/setting/quickreply/imp")); - } - - @RequestMapping("/impsave") - @Menu(type = "setting" , subtype = "quickreplyimpsave") - public ModelAndView impsave(ModelMap map , HttpServletRequest request , @RequestParam(value = "cusfile", required = false) MultipartFile cusfile , @Valid String type) throws IOException { - DSDataEvent event = new DSDataEvent(); - String fileName = "quickreply/"+ MainUtils.getUUID()+cusfile.getOriginalFilename().substring(cusfile.getOriginalFilename().lastIndexOf(".")) ; - File excelFile = new File(path , fileName) ; - if(!excelFile.getParentFile().exists()){ - excelFile.getParentFile().mkdirs() ; - } - MetadataTable table = metadataRes.findByTablename("uk_quickreply") ; - if(table!=null){ - FileUtils.writeByteArrayToFile(new File(path , fileName), cusfile.getBytes()); - event.setDSData(new DSData(table,excelFile , cusfile.getContentType(), super.getUser(request))); - event.getDSData().setClazz(QuickReply.class); - event.setOrgi(super.getOrgi(request)); - if(!StringUtils.isBlank(type)){ - event.getValues().put("cate", type) ; - }else{ - event.getValues().put("cate", Constants.DEFAULT_TYPE) ; - } - event.getValues().put("type", MainContext.QuickType.PUB.toString()) ; - event.getValues().put("creater", super.getUser(request).getId()) ; - event.getDSData().setProcess(new QuickReplyProcess(quickReplyRes)); - reporterRes.save(event.getDSData().getReport()) ; - new ExcelImportProecess(event).process() ; //启动导入任务 - } - - return request(super.createRequestPageTempletResponse("redirect:/setting/quickreply/index.html"+(!StringUtils.isBlank(type)? "?typeid="+type:""))); - } - - @RequestMapping("/batdelete") - @Menu(type = "setting" , subtype = "quickreplybatdelete") - public ModelAndView batdelete(ModelMap map , HttpServletRequest request , HttpServletResponse response , @Valid String[] ids ,@Valid String type) throws IOException { - if(ids!=null && ids.length > 0){ - Iterable topicList = quickReplyRes.findAll(Arrays.asList(ids)) ; - quickReplyRes.delete(topicList); - } - - return request(super.createRequestPageTempletResponse("redirect:/setting/quickreply/index.html"+(!StringUtils.isBlank(type) ? "?typeid="+type:""))); - } - - @RequestMapping("/expids") - @Menu(type = "setting" , subtype = "quickreplyexpids") - public void expids(ModelMap map , HttpServletRequest request , HttpServletResponse response , @Valid String[] ids) throws IOException { - if(ids!=null && ids.length > 0){ - Iterable topicList = quickReplyRes.findAll(Arrays.asList(ids)) ; - MetadataTable table = metadataRes.findByTablename("uk_quickreply") ; - List> values = new ArrayList>(); - for(QuickReply topic : topicList){ - values.add(MainUtils.transBean2Map(topic)) ; - } - - response.setHeader("content-disposition", "attachment;filename=UCKeFu-QuickReply-"+new SimpleDateFormat("yyyy-MM-dd").format(new Date())+".xls"); - if(table!=null){ - ExcelExporterProcess excelProcess = new ExcelExporterProcess( values, table, response.getOutputStream()) ; - excelProcess.process(); - } - } - - return ; - } - - @RequestMapping("/expall") - @Menu(type = "setting" , subtype = "quickreplyexpall") - public void expall(ModelMap map , HttpServletRequest request , HttpServletResponse response,@Valid String type) throws IOException { - Iterable topicList = quickReplyRes.getQuickReplyByOrgi(super.getOrgi(request) , !StringUtils.isBlank(type) ? type : null, MainContext.QuickType.PUB.toString(), null) ; - - MetadataTable table = metadataRes.findByTablename("uk_quickreply") ; - List> values = new ArrayList>(); - for(QuickReply topic : topicList){ - values.add(MainUtils.transBean2Map(topic)) ; - } - - response.setHeader("content-disposition", "attachment;filename=UCKeFu-QuickReply-"+new SimpleDateFormat("yyyy-MM-dd").format(new Date())+".xls"); - - if(table!=null){ - ExcelExporterProcess excelProcess = new ExcelExporterProcess( values, table, response.getOutputStream()) ; - excelProcess.process(); - } - return ; - } - - @RequestMapping("/expsearch") - @Menu(type = "setting" , subtype = "quickreplyexpsearch") - public void expall(ModelMap map , HttpServletRequest request , HttpServletResponse response , @Valid String q , @Valid String type) throws IOException { - - Iterable topicList = quickReplyRes.getQuickReplyByOrgi(super.getOrgi(request) , type, MainContext.QuickType.PUB.toString(), q) ; - - MetadataTable table = metadataRes.findByTablename("uk_quickreply") ; - List> values = new ArrayList>(); - for(QuickReply topic : topicList){ - values.add(MainUtils.transBean2Map(topic)) ; - } - - response.setHeader("content-disposition", "attachment;filename=UCKeFu-QuickReply-"+new SimpleDateFormat("yyyy-MM-dd").format(new Date())+".xls"); - - if(table!=null){ - ExcelExporterProcess excelProcess = new ExcelExporterProcess( values, table, response.getOutputStream()) ; - excelProcess.process(); - } - return ; - } -} \ No newline at end of file diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/TopicController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/TopicController.java deleted file mode 100644 index 9fbbd110..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/TopicController.java +++ /dev/null @@ -1,457 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.chatopera.cc.controller.apps; - -import com.chatopera.cc.basic.Constants; -import com.chatopera.cc.basic.MainContext; -import com.chatopera.cc.basic.MainUtils; -import com.chatopera.cc.controller.Handler; -import com.chatopera.cc.model.*; -import com.chatopera.cc.persistence.es.TopicRepository; -import com.chatopera.cc.persistence.interfaces.DataExchangeInterface; -import com.chatopera.cc.persistence.repository.*; -import com.chatopera.cc.proxy.OnlineUserProxy; -import com.chatopera.cc.util.Menu; -import com.chatopera.cc.util.dsdata.DSData; -import com.chatopera.cc.util.dsdata.DSDataEvent; -import com.chatopera.cc.util.dsdata.ExcelImportProecess; -import com.chatopera.cc.util.dsdata.export.ExcelExporterProcess; -import com.chatopera.cc.util.dsdata.process.TopicProcess; -import org.apache.commons.io.FileUtils; -import org.apache.commons.lang.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.data.domain.Page; -import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.multipart.MultipartFile; -import org.springframework.web.servlet.ModelAndView; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.validation.Valid; -import java.io.File; -import java.io.IOException; -import java.text.SimpleDateFormat; -import java.util.*; - -@Controller -@RequestMapping("/apps") -public class TopicController extends Handler{ - - @Value("${web.upload-path}") - private String path; - - @Value("${uk.im.server.port}") - private Integer port; - - @Autowired - private KnowledgeTypeRepository knowledgeTypeRes ; - - @Autowired - private AreaTypeRepository areaRepository; - - @Autowired - private SysDicRepository sysDicRepository; - - @Autowired - private TopicRepository topicRes; - - - @Autowired - private MetadataRepository metadataRes ; - - - @Autowired - private TopicItemRepository topicItemRes ; - - @Autowired - private ReporterRepository reporterRes ; - - - @RequestMapping("/topic") - @Menu(type = "xiaoe" , subtype = "knowledge") - public ModelAndView knowledge(ModelMap map , HttpServletRequest request , @Valid String q , @Valid String type, @Valid String aiid) { - List knowledgeTypeList = knowledgeTypeRes.findByOrgi(super.getOrgi(request)) ; - map.put("knowledgeTypeList", knowledgeTypeList); - KnowledgeType ktype = null ; - if(!StringUtils.isBlank(type)){ - for(KnowledgeType knowledgeType : knowledgeTypeList){ - if(knowledgeType.getId().equals(type)){ - ktype = knowledgeType ; - break ; - } - } - } - if(!StringUtils.isBlank(q)){ - map.put("q", q) ; - } - if(ktype!=null){ - map.put("curtype", ktype) ; - map.put("topicList", topicRes.getTopicByCateAndOrgi(ktype.getId(),super.getOrgi(request), q, super.getP(request), super.getPs(request))) ; - }else{ - map.put("topicList", topicRes.getTopicByCateAndOrgi(Constants.DEFAULT_TYPE,super.getOrgi(request), q, super.getP(request), super.getPs(request))) ; - } - map.addAttribute("areaList", areaRepository.findByOrgi(super.getOrgi(request))) ; - return request(super.createAppsTempletResponse("/apps/business/topic/index")); - } - - @RequestMapping("/topic/add") - @Menu(type = "xiaoe" , subtype = "knowledgeadd") - public ModelAndView knowledgeadd(ModelMap map , HttpServletRequest request , @Valid String type, @Valid String aiid) { - map.put("type", type); - map.put("aiid", aiid); - return request(super.createRequestPageTempletResponse("/apps/business/topic/add")); - } - - @RequestMapping("/topic/save") - @Menu(type = "xiaoe" , subtype = "knowledgesave") - public ModelAndView knowledgesave(HttpServletRequest request , @Valid Topic topic , @Valid String type , @Valid String aiid) { - if(!StringUtils.isBlank(topic.getTitle())){ - if(!StringUtils.isBlank(type)){ - topic.setCate(type); - }else{ - topic.setCate(Constants.DEFAULT_TYPE); - } - topic.setOrgi(super.getOrgi(request)); - topicRes.save(topic) ; - List topicItemList = new ArrayList(); - for(String item : topic.getSilimar()) { - TopicItem topicItem = new TopicItem(); - topicItem.setTitle(item); - topicItem.setTopicid(topic.getId()); - topicItem.setOrgi(topic.getOrgi()); - topicItem.setCreater(topic.getCreater()); - topicItem.setCreatetime(new Date()); - topicItemList.add(topicItem) ; - } - if(topicItemList.size() > 0) { - topicItemRes.save(topicItemList) ; - } - /** - * 重新缓存 - * - */ - OnlineUserProxy.resetHotTopic((DataExchangeInterface) MainContext.getContext().getBean("topic") , super.getUser(request) , super.getOrgi(request) , aiid) ; - } - return request(super.createRequestPageTempletResponse("redirect:/apps/topic.html"+(!StringUtils.isBlank(type) ? "?type="+type : ""))); - } - - @RequestMapping("/topic/edit") - @Menu(type = "xiaoe" , subtype = "knowledgeedit") - public ModelAndView knowledgeedit(ModelMap map , HttpServletRequest request , @Valid String id , @Valid String type, @Valid String aiid) { - map.put("type", type); - if(!StringUtils.isBlank(id)){ - map.put("topic", topicRes.findOne(id)) ; - } - List knowledgeTypeList = knowledgeTypeRes.findByOrgi(super.getOrgi(request)) ; - map.put("knowledgeTypeList", knowledgeTypeList); - return request(super.createRequestPageTempletResponse("/apps/business/topic/edit")); - } - - @RequestMapping("/topic/update") - @Menu(type = "xiaoe" , subtype = "knowledgeupdate") - public ModelAndView knowledgeupdate(HttpServletRequest request ,@Valid Topic topic , @Valid String type, @Valid String aiid) { - Topic temp = topicRes.findOne(topic.getId()) ; - if(!StringUtils.isBlank(topic.getTitle())){ - if(!StringUtils.isBlank(type)){ - topic.setCate(type); - }else{ - topic.setCate(Constants.DEFAULT_TYPE); - } - topic.setCreater(temp.getCreater()); - topic.setCreatetime(temp.getCreatetime()); - topic.setOrgi(super.getOrgi(request)); - - topicRes.save(topic) ; - topicItemRes.delete(topicItemRes.findByTopicid(topic.getId())) ; - List topicItemList = new ArrayList(); - for(String item : topic.getSilimar()) { - TopicItem topicItem = new TopicItem(); - topicItem.setTitle(item); - topicItem.setTopicid(topic.getId()); - topicItem.setOrgi(topic.getOrgi()); - topicItem.setCreater(topic.getCreater()); - topicItem.setCreatetime(new Date()); - topicItemList.add(topicItem) ; - } - if(topicItemList.size() > 0) { - topicItemRes.save(topicItemList) ; - } - - /** - * 重新缓存 - * - */ - OnlineUserProxy.resetHotTopic((DataExchangeInterface) MainContext.getContext().getBean("topic") , super.getUser(request) , super.getOrgi(request),aiid) ; - } - return request(super.createRequestPageTempletResponse("redirect:/apps/topic.html"+(!StringUtils.isBlank(type) ? "?type="+type : ""))); - } - - @RequestMapping("/topic/delete") - @Menu(type = "xiaoe" , subtype = "knowledgedelete") - public ModelAndView knowledgedelete(HttpServletRequest request ,@Valid String id , @Valid String type, @Valid String aiid) { - if(!StringUtils.isBlank(id)){ - topicRes.delete(topicRes.findOne(id)); - /** - * 重新缓存 - * - */ - topicItemRes.delete(topicItemRes.findByTopicid(id)) ; - - OnlineUserProxy.resetHotTopic((DataExchangeInterface) MainContext.getContext().getBean("topic") , super.getUser(request) , super.getOrgi(request) , aiid) ; - } - return request(super.createRequestPageTempletResponse("redirect:/apps/topic.html"+(!StringUtils.isBlank(type) ? "?type="+type : ""))); - } - - @RequestMapping("/topic/type/add") - @Menu(type = "xiaoe" , subtype = "knowledgetypeadd") - public ModelAndView knowledgetypeadd(ModelMap map , HttpServletRequest request ,@Valid String type, @Valid String aiid) { - map.addAttribute("areaList", areaRepository.findByOrgi(super.getOrgi(request))) ; - - List knowledgeTypeList = knowledgeTypeRes.findByOrgi(super.getOrgi(request)) ; - map.put("knowledgeTypeList", knowledgeTypeList); - map.put("aiid", aiid); - if(!StringUtils.isBlank(type)){ - map.put("type", type) ; - } - - return request(super.createRequestPageTempletResponse("/apps/business/topic/addtype")); - } - - @RequestMapping("/topic/type/save") - @Menu(type = "xiaoe" , subtype = "knowledgetypesave") - public ModelAndView knowledgetypesave(HttpServletRequest request ,@Valid KnowledgeType type, @Valid String aiid) { - //int tempTypeCount = knowledgeTypeRes.countByNameAndOrgiAndParentidNot(type.getName(), super.getOrgi(request) , !StringUtils.isBlank(type.getParentid()) ? type.getParentid() : "0") ; - KnowledgeType knowledgeType = knowledgeTypeRes.findByNameAndOrgi(type.getName(), super.getOrgi(request)) ; - if(knowledgeType == null){ - type.setOrgi(super.getOrgi(request)); - type.setCreatetime(new Date()); - type.setId(MainUtils.getUUID()); - type.setTypeid(type.getId()); - type.setUpdatetime(new Date()); - if(StringUtils.isBlank(type.getParentid())){ - type.setParentid("0"); - }else{ - type.setTypeid(type.getParentid()); - } - type.setCreater(super.getUser(request).getId()); - knowledgeTypeRes.save(type) ; - OnlineUserProxy.resetHotTopicType((DataExchangeInterface) MainContext.getContext().getBean("topictype") , super.getUser(request), super.getOrgi(request) , aiid); - }else { - return request(super.createRequestPageTempletResponse("redirect:/apps/topic.html?aiid="+aiid+"&msg=k_type_exist")); - } - return request(super.createRequestPageTempletResponse("redirect:/apps/topic.html?aiid="+aiid)); - } - - @RequestMapping("/topic/type/edit") - @Menu(type = "xiaoe" , subtype = "knowledgetypeedit") - public ModelAndView knowledgetypeedit(ModelMap map , HttpServletRequest request, @Valid String type , @Valid String aiid) { - map.put("knowledgeType", knowledgeTypeRes.findOne(type)) ; - map.addAttribute("areaList", areaRepository.findByOrgi(super.getOrgi(request))) ; - - map.put("aiid", aiid); - - List knowledgeTypeList = knowledgeTypeRes.findByOrgi(super.getOrgi(request)) ; - map.put("knowledgeTypeList", knowledgeTypeList); - return request(super.createRequestPageTempletResponse("/apps/business/topic/edittype")); - } - - @RequestMapping("/topic/type/update") - @Menu(type = "xiaoe" , subtype = "knowledgetypeupdate") - public ModelAndView knowledgetypeupdate(HttpServletRequest request ,@Valid KnowledgeType type, @Valid String aiid) { - //int tempTypeCount = knowledgeTypeRes.countByNameAndOrgiAndIdNot(type.getName(), super.getOrgi(request) , type.getId()) ; - KnowledgeType knowledgeType = knowledgeTypeRes.findByNameAndOrgiAndIdNot(type.getName(), super.getOrgi(request),type.getId()) ; - if(knowledgeType == null){ - KnowledgeType temp = knowledgeTypeRes.findByIdAndOrgi(type.getId(), super.getOrgi(request)) ; - temp.setName(type.getName()); - temp.setParentid(type.getParentid()); - if(StringUtils.isBlank(type.getParentid()) || type.getParentid().equals("0")){ - temp.setParentid("0"); - temp.setTypeid(temp.getId()); - }else{ - temp.setParentid(type.getParentid()); - temp.setTypeid(type.getParentid()); - } - knowledgeTypeRes.save(temp) ; - OnlineUserProxy.resetHotTopicType((DataExchangeInterface) MainContext.getContext().getBean("topictype") , super.getUser(request), super.getOrgi(request) , aiid); - }else { - return request(super.createRequestPageTempletResponse("redirect:/apps/topic.html?aiid="+aiid+"&msg=k_type_exist&type="+type.getId())); - } - return request(super.createRequestPageTempletResponse("redirect:/apps/topic.html?aiid="+aiid+"type="+type.getId())); - } - - @RequestMapping("/topic/type/delete") - @Menu(type = "xiaoe" , subtype = "knowledgedelete") - public ModelAndView knowledgetypedelete(HttpServletRequest request ,@Valid String id , @Valid String type, @Valid String aiid) { - Page page = topicRes.getTopicByCateAndOrgi(type,super.getOrgi(request), null, super.getP(request), super.getPs(request)) ; - String msg = null ; - if(page.getTotalElements() == 0){ - if(!StringUtils.isBlank(id)){ - knowledgeTypeRes.delete(id); - OnlineUserProxy.resetHotTopicType((DataExchangeInterface) MainContext.getContext().getBean("topictype") , super.getUser(request), super.getOrgi(request) , aiid); - } - }else{ - msg = "notempty" ; - } - return request(super.createRequestPageTempletResponse("redirect:/apps/topic.html"+(msg!=null ? "?msg=notempty" : ""))); - } - - @RequestMapping("/topic/area") - @Menu(type = "admin" , subtype = "area") - public ModelAndView area(ModelMap map ,HttpServletRequest request , @Valid String id, @Valid String aiid) { - - SysDic sysDic = sysDicRepository.findByCode(Constants.CSKEFU_SYSTEM_AREA_DIC) ; - if(sysDic!=null){ - map.addAttribute("sysarea", sysDic) ; - map.addAttribute("areaList", sysDicRepository.findByDicid(sysDic.getId())) ; - } - map.addAttribute("cacheList", Dict.getInstance().getDic(Constants.CSKEFU_SYSTEM_AREA_DIC)) ; - - map.put("knowledgeType", knowledgeTypeRes.findOne(id)) ; - return request(super.createRequestPageTempletResponse("/apps/business/topic/area")); - } - - - @RequestMapping("/topic/area/update") - @Menu(type = "admin" , subtype = "organ") - public ModelAndView areaupdate(HttpServletRequest request ,@Valid KnowledgeType type, @Valid String aiid) { - KnowledgeType temp = knowledgeTypeRes.findByIdAndOrgi(type.getId(), super.getOrgi(request)) ; - if(temp != null){ - temp.setArea(type.getArea()); - knowledgeTypeRes.save(temp) ; - OnlineUserProxy.resetHotTopicType((DataExchangeInterface) MainContext.getContext().getBean("topictype") , super.getUser(request), super.getOrgi(request) , aiid); - } - return request(super.createRequestPageTempletResponse("redirect:/apps/topic.html?type="+type.getId())); - } - - - @RequestMapping("/topic/imp") - @Menu(type = "xiaoe" , subtype = "knowledge") - public ModelAndView imp(ModelMap map , HttpServletRequest request , @Valid String type, @Valid String aiid) { - map.addAttribute("type", type) ; - return request(super.createRequestPageTempletResponse("/apps/business/topic/imp")); - } - - @RequestMapping("/topic/impsave") - @Menu(type = "xiaoe" , subtype = "knowledge") - public ModelAndView impsave(ModelMap map , HttpServletRequest request , @RequestParam(value = "cusfile", required = false) MultipartFile cusfile , @Valid String type, @Valid String aiid) throws IOException { - DSDataEvent event = new DSDataEvent(); - String fileName = "xiaoe/"+ MainUtils.getUUID()+cusfile.getOriginalFilename().substring(cusfile.getOriginalFilename().lastIndexOf(".")) ; - File excelFile = new File(path , fileName) ; - if(!excelFile.getParentFile().exists()){ - excelFile.getParentFile().mkdirs() ; - } - MetadataTable table = metadataRes.findByTablename("uk_xiaoe_topic") ; - if(table!=null){ - FileUtils.writeByteArrayToFile(new File(path , fileName), cusfile.getBytes()); - event.setDSData(new DSData(table,excelFile , cusfile.getContentType(), super.getUser(request))); - event.getDSData().setClazz(Topic.class); - event.setOrgi(super.getOrgi(request)); - if(!StringUtils.isBlank(type)){ - event.getValues().put("cate", type) ; - }else{ - event.getValues().put("cate", Constants.DEFAULT_TYPE) ; - } - event.getValues().put("creater", super.getUser(request).getId()) ; - event.getDSData().setProcess(new TopicProcess(topicRes)); - reporterRes.save(event.getDSData().getReport()) ; - new ExcelImportProecess(event).process() ; //启动导入任务 - } - - return request(super.createRequestPageTempletResponse("redirect:/apps/topic.html?type="+type)); - } - - @RequestMapping("/topic/batdelete") - @Menu(type = "xiaoe" , subtype = "knowledge") - public ModelAndView batdelete(ModelMap map , HttpServletRequest request , HttpServletResponse response , @Valid String[] ids ,@Valid String type, @Valid String aiid) throws IOException { - if(ids!=null && ids.length > 0){ - Iterable topicList = topicRes.findAll(Arrays.asList(ids)) ; - topicRes.delete(topicList); - for(Topic topic : topicList) { - topicItemRes.delete(topicItemRes.findByTopicid(topic.getId())) ; - } - } - - return request(super.createRequestPageTempletResponse("redirect:/apps/topic.html"+(!StringUtils.isBlank(type) ? "?type="+type:""))); - } - - @RequestMapping("/topic/expids") - @Menu(type = "xiaoe" , subtype = "knowledge") - public void expids(ModelMap map , HttpServletRequest request , HttpServletResponse response , @Valid String[] ids, @Valid String aiid) throws IOException { - if(ids!=null && ids.length > 0){ - Iterable topicList = topicRes.findAll(Arrays.asList(ids)) ; - MetadataTable table = metadataRes.findByTablename("uk_xiaoe_topic") ; - List> values = new ArrayList>(); - for(Topic topic : topicList){ - values.add(MainUtils.transBean2Map(topic)) ; - } - - response.setHeader("content-disposition", "attachment;filename=CSKefu-Contacts-"+new SimpleDateFormat("yyyy-MM-dd").format(new Date())+".xls"); - if(table!=null){ - ExcelExporterProcess excelProcess = new ExcelExporterProcess( values, table, response.getOutputStream()) ; - excelProcess.process(); - } - } - - return ; - } - - @RequestMapping("/topic/expall") - @Menu(type = "xiaoe" , subtype = "knowledge") - public void expall(ModelMap map , HttpServletRequest request , HttpServletResponse response,@Valid String type, @Valid String aiid) throws IOException { - Iterable topicList = topicRes.getTopicByOrgi(super.getOrgi(request) ,type , null) ; - - MetadataTable table = metadataRes.findByTablename("uk_xiaoe_topic") ; - List> values = new ArrayList>(); - for(Topic topic : topicList){ - values.add(MainUtils.transBean2Map(topic)) ; - } - - response.setHeader("content-disposition", "attachment;filename=UCKeFu-XiaoE-"+new SimpleDateFormat("yyyy-MM-dd").format(new Date())+".xls"); - - if(table!=null){ - ExcelExporterProcess excelProcess = new ExcelExporterProcess( values, table, response.getOutputStream()) ; - excelProcess.process(); - } - return ; - } - - @RequestMapping("/topic/expsearch") - @Menu(type = "xiaoe" , subtype = "knowledge") - public void expall(ModelMap map , HttpServletRequest request , HttpServletResponse response , @Valid String q , @Valid String type, @Valid String aiid) throws IOException { - - Iterable topicList = topicRes.getTopicByOrgi(super.getOrgi(request) , type , q) ; - - MetadataTable table = metadataRes.findByTablename("uk_xiaoe_topic") ; - List> values = new ArrayList>(); - for(Topic topic : topicList){ - values.add(MainUtils.transBean2Map(topic)) ; - } - - response.setHeader("content-disposition", "attachment;filename=UCKeFu-XiaoE-"+new SimpleDateFormat("yyyy-MM-dd").format(new Date())+".xls"); - - if(table!=null){ - ExcelExporterProcess excelProcess = new ExcelExporterProcess( values, table, response.getOutputStream()) ; - excelProcess.process(); - } - return ; - } -} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/report/CubeController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/report/CubeController.java deleted file mode 100644 index 0fc288ba..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/report/CubeController.java +++ /dev/null @@ -1,563 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.controller.apps.report; - -import com.chatopera.cc.basic.MainUtils; -import com.chatopera.cc.controller.Handler; -import com.chatopera.cc.model.*; -import com.chatopera.cc.persistence.repository.*; -import com.chatopera.cc.util.Menu; -import org.apache.commons.codec.binary.Base64; -import org.apache.commons.lang.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.data.domain.PageRequest; -import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.servlet.ModelAndView; - -import javax.servlet.http.HttpServletRequest; -import javax.validation.Valid; -import java.util.Date; -import java.util.List; - -@Controller -@RequestMapping("/apps/report/cube") -public class CubeController extends Handler{ - - @Autowired - private CubeTypeRepository cubeTypeRes; - - @Autowired - private CubeRepository cubeRes; - - @Autowired - private DimensionRepository dimensionRes; - - @Autowired - private CubeMeasureRepository cubeMeasureRes; - - @Autowired - private CubeLevelRepository cubeLevelRes; - - @Autowired - private CubeMetadataRepository cubeMetadataRes; - - @Autowired - private MetadataRepository metadataRes; - - @Autowired - private PublishedCubeRepository publishedCubeRes; - - @RequestMapping({"/type/add"}) - @Menu(type="report", subtype="cube") - public ModelAndView addtype(ModelMap map , HttpServletRequest request , @Valid String typeid){ - map.addAttribute("cubeTypeList", cubeTypeRes.findByOrgi(super.getOrgi(request))) ; - if(!StringUtils.isBlank(typeid)){ - map.addAttribute("cubeType", cubeTypeRes.findByIdAndOrgi(typeid, super.getOrgi(request))) ; - } - return request(super.createRequestPageTempletResponse("/apps/business/report/cube/type/add")); - } - - @RequestMapping("/type/save") - @Menu(type = "report" , subtype = "cube") - public ModelAndView typesave(HttpServletRequest request ,@Valid CubeType cubeType) { - CubeType ct = cubeTypeRes.findByOrgiAndName(super.getOrgi(request),cubeType.getName()) ; - if(ct==null){ - cubeType.setOrgi(super.getOrgi(request)); - cubeType.setCreater(super.getUser(request).getId()); - cubeType.setCreatetime(new Date()); - cubeTypeRes.save(cubeType) ; - }else { - return request(super.createRequestPageTempletResponse("redirect:/apps/business/report/cube/index.html?msg=ct_type_exist")); - } - return request(super.createRequestPageTempletResponse("redirect:/apps/report/cube/index.html")); - } - - @RequestMapping({"/type/edit"}) - @Menu(type="report", subtype="cube") - public ModelAndView edittype(ModelMap map , HttpServletRequest request , String id){ - map.addAttribute("cubeType", cubeTypeRes.findByIdAndOrgi(id, super.getOrgi(request))) ; - map.addAttribute("cubeTypeList",cubeTypeRes.findByOrgi(super.getOrgi(request))) ; - return request(super.createRequestPageTempletResponse("/apps/business/report/cube/type/edit")); - } - - @RequestMapping("/type/update") - @Menu(type = "report" , subtype = "cube") - public ModelAndView typeupdate(HttpServletRequest request ,@Valid CubeType cubeType) { - CubeType tempCubeType = cubeTypeRes.findByIdAndOrgi(cubeType.getId(), super.getOrgi(request)) ; - if(tempCubeType !=null){ - //判断名称是否重复 - CubeType ct = cubeTypeRes.findByOrgiAndName(super.getOrgi(request),cubeType.getName()); - if(ct!=null && !ct.getId().equals(cubeType.getId())) { - return request(super.createRequestPageTempletResponse("redirect:/apps/business/report/cube/index.html?msg=ct_type_exist&typeid="+cubeType.getId())); - } - tempCubeType.setName(cubeType.getName()); - tempCubeType.setDescription(cubeType.getDescription()); - tempCubeType.setInx(cubeType.getInx()); - tempCubeType.setParentid(cubeType.getParentid()); - cubeTypeRes.save(tempCubeType) ; - } - return request(super.createRequestPageTempletResponse("redirect:/apps/business/report/cube/index.html?typeid="+cubeType.getId())); - } - - @RequestMapping({"/type/delete"}) - @Menu(type="report", subtype="cube") - public ModelAndView deletetype(ModelMap map , HttpServletRequest request , @Valid String id){ - if(!StringUtils.isBlank(id)){ - CubeType tempCubeType = cubeTypeRes.findByIdAndOrgi(id, super.getOrgi(request)) ; - cubeTypeRes.delete(tempCubeType); - List cubeList = cubeRes.findByOrgiAndTypeid(super.getOrgi(request) , id); - if(!cubeList.isEmpty()) { - cubeRes.delete(cubeList); - for(Cube c:cubeList) { - Cube cube = getCube(c.getId()); - cubeMetadataRes.delete(cube.getMetadata()); - cubeMeasureRes.delete(cube.getMeasure()); - dimensionRes.delete(cube.getDimension()); - } - } - } - return request(super.createRequestPageTempletResponse("redirect:/apps/report/cube/index.html")); - } - - @RequestMapping("/index") - @Menu(type = "report" , subtype = "cube" ) - public ModelAndView index(ModelMap map , HttpServletRequest request , @Valid String typeid,@Valid String msg) { - List cubeTypeList = cubeTypeRes.findByOrgi(super.getOrgi(request)) ; - if(!StringUtils.isBlank(typeid)){ - map.put("cubeType", cubeTypeRes.findByIdAndOrgi(typeid, super.getOrgi(request))) ; - map.put("cubeList", cubeRes.getByOrgiAndTypeid(super.getOrgi(request) , typeid , new PageRequest(super.getP(request), super.getPs(request)))) ; - }else{ - map.put("cubeList", cubeRes.getByOrgi(super.getOrgi(request), new PageRequest(super.getP(request), super.getPs(request)))) ; - } - map.put("pubCubeTypeList", cubeTypeList) ; - map.put("typeid", typeid); - map.put("msg", msg); - return request(super.createAppsTempletResponse("/apps/business/report/cube/index")); - } - @RequestMapping("/list") - @Menu(type = "report" , subtype = "cube" ) - public ModelAndView list(ModelMap map , HttpServletRequest request , @Valid String typeid) { - //List cubeTypeList = cubeTypeRes.findByOrgi(super.getOrgi(request)) ; - if(!StringUtils.isBlank(typeid)){ - map.put("cubeType", cubeTypeRes.findByIdAndOrgi(typeid, super.getOrgi(request))) ; - map.put("cubeList", cubeRes.getByOrgiAndTypeid(super.getOrgi(request) , typeid , new PageRequest(super.getP(request), super.getPs(request)))) ; - }else{ - map.put("cubeList", cubeRes.getByOrgi(super.getOrgi(request), new PageRequest(super.getP(request), super.getPs(request)))) ; - } - //map.put("pubCubeTypeList", cubeTypeList) ; - map.put("typeid", typeid); - return request(super.createRequestPageTempletResponse("/apps/business/report/cube/list")); - } - @RequestMapping("/add") - @Menu(type = "report" , subtype = "cube") - public ModelAndView cubeadd(ModelMap map , HttpServletRequest request , @Valid String typeid) { - if(!StringUtils.isBlank(typeid)){ - map.addAttribute("cubeType", cubeTypeRes.findByIdAndOrgi(typeid, super.getOrgi(request))) ; - } - map.addAttribute("cubeTypeList", cubeTypeRes.findByOrgi(super.getOrgi(request))) ; - map.addAttribute("typeid", typeid); - return request(super.createRequestPageTempletResponse("/apps/business/report/cube/add")); - } - - @RequestMapping("/save") - @Menu(type = "report" , subtype = "cube" ) - public ModelAndView cubesave(ModelMap map , HttpServletRequest request , @Valid Cube cube) { - if(!StringUtils.isBlank(cube.getName())){ - cube.setOrgi(super.getOrgi(request)); - cube.setCreater(super.getUser(request).getId()); - cubeRes.save(cube) ; - } - return request(super.createRequestPageTempletResponse("redirect:/apps/report/cube/index.html?typeid="+cube.getTypeid())); - } - - @RequestMapping("/delete") - @Menu(type = "report" , subtype = "cube" ) - public ModelAndView quickreplydelete(ModelMap map , HttpServletRequest request , @Valid String id) { - Cube cube = cubeRes.findOne(id) ; - if(cube!=null){ - cubeRes.delete(cube); - dimensionRes.delete(dimensionRes.findByCubeid(cube.getId())); - cubeLevelRes.delete(cubeLevelRes.findByCubeid(cube.getId())); - cubeMeasureRes.delete(cubeMeasureRes.findByCubeid(cube.getId())); - cubeMetadataRes.delete(cubeMetadataRes.findByCubeid(cube.getId())); - } - return request(super.createRequestPageTempletResponse("redirect:/apps/report/cube/index.html?typeid="+cube.getTypeid())); - } - @RequestMapping("/edit") - @Menu(type = "report" , subtype = "cube" , admin= true) - public ModelAndView cubeedit(ModelMap map , HttpServletRequest request , @Valid String id) { - Cube cube = cubeRes.findOne(id) ; - map.put("cube", cube) ; - if(cube!=null){ - map.put("cubeType", cubeTypeRes.findByIdAndOrgi(cube.getTypeid(), super.getOrgi(request))) ; - } - map.addAttribute("cubeTypeList", cubeTypeRes.findByOrgi(super.getOrgi(request))) ; - return request(super.createRequestPageTempletResponse("/apps/business/report/cube/edit")); - } - - @RequestMapping("/update") - @Menu(type = "report" , subtype = "cube" , admin= true) - public ModelAndView cubeupdate(ModelMap map , HttpServletRequest request , @Valid Cube cube) { - if(!StringUtils.isBlank(cube.getId())){ - Cube temp = cubeRes.findOne(cube.getId()) ; - cube.setOrgi(super.getOrgi(request)); - cube.setCreater(super.getUser(request).getId()); - if(temp!=null){ - cube.setCreatetime(temp.getCreatetime()); - } - cube.setUpdatetime(new Date()); - cubeRes.save(cube); - } - return request(super.createRequestPageTempletResponse("redirect:/apps/report/cube/index.html?typeid="+cube.getTypeid())); - } - @RequestMapping("/imptb") - @Menu(type = "report" , subtype = "metadata" , admin = true) - public ModelAndView imptb(final ModelMap map , HttpServletRequest request,@Valid String cubeid) throws Exception { - - map.put("tablesList", metadataRes.findByOrgi(super.getOrgi(request))); - map.put("cubeid",cubeid ); - return request(super.createRequestPageTempletResponse("/apps/business/report/cube/cubemetadata/imptb")); - } - @RequestMapping("/imptbsave") - @Menu(type = "report" , subtype = "metadata" , admin = true) - public ModelAndView imptb(ModelMap map , HttpServletRequest request , final @Valid String[] tables,@Valid String cubeid) throws Exception { - final User user = super.getUser(request) ; - for(String tableid : tables){ - MetadataTable tb = new MetadataTable(); - tb.setId(tableid); - int count = cubeMetadataRes.countByTbAndCubeid(tb,cubeid); - if(count == 0) { - CubeMetadata cubeMetaData = new CubeMetadata(); - cubeMetaData.setCubeid(cubeid) ; - cubeMetaData.setOrgi(super.getOrgi(request)) ; - cubeMetaData.setTb(tb); - cubeMetaData.setCreater(user.getId()); - cubeMetaData.setMtype("1"); - cubeMetadataRes.save(cubeMetaData); - } - } - return request(super.createRequestPageTempletResponse("redirect:/apps/report/cube/detail.html?id="+cubeid)); - } - @RequestMapping("/metadata/edit") - @Menu(type = "report" , subtype = "metadata" , admin = true) - public ModelAndView metadataedit(ModelMap map , HttpServletRequest request , final @Valid String id,@Valid String cubeid) throws Exception { - map.put("cubeMetadata", cubeMetadataRes.findOne(id)); - return request(super.createRequestPageTempletResponse("/apps/business/report/cube/cubemetadata/edit")); - } - @RequestMapping("/metadata/update") - @Menu(type = "report" , subtype = "metadata" , admin = true) - public ModelAndView metadataedit(ModelMap map , HttpServletRequest request ,@Valid CubeMetadata cubeMetadata) throws Exception { - if(!StringUtils.isBlank(cubeMetadata.getId())){ - CubeMetadata temp = cubeMetadataRes.findOne(cubeMetadata.getId()) ; - temp.setNamealias(cubeMetadata.getNamealias()); - if("0".equals(cubeMetadata.getMtype())) { - List list = cubeMetadataRes.findByCubeid(temp.getCubeid()); - if(!list.isEmpty()) { - //设置其他数据表为从表 - for(CubeMetadata cm:list) { - if(!cm.getId().equals(temp.getId())) { - cm.setMtype("1"); - cubeMetadataRes.save(cm); - } - } - } - } - temp.setMtype(cubeMetadata.getMtype()); - temp.setParameters(cubeMetadata.getParameters()); - cubeMetadataRes.save(temp); - } - return request(super.createRequestPageTempletResponse("redirect:/apps/report/cube/detail.html?id="+cubeMetadata.getCubeid())); - } - @RequestMapping("/metadata/del") - @Menu(type = "report" , subtype = "metadata" , admin = true) - public ModelAndView metadatadel(ModelMap map , HttpServletRequest request ,@Valid CubeMetadata cubeMetadata) throws Exception { - String msg = ""; - if(!StringUtils.isBlank(cubeMetadata.getId())){ - boolean flag = true; - CubeMetadata temp = cubeMetadataRes.findOne(cubeMetadata.getId()) ; - String tablename = null; - String tableid = null; - if(temp.getTb()!=null) { - tablename = temp.getTb().getName(); - tableid = temp.getTb().getId(); - } - if(!StringUtils.isBlank(tableid) ) { - if(dimensionRes.countByFktable(tableid) > 0) { - flag = false; - } - } - if(!StringUtils.isBlank(tablename) ) { - if(cubeLevelRes.countByTablename(tablename) > 0) { - flag = false; - } - if(cubeMeasureRes.countByTablename(tablename) > 0) { - flag = false; - } - } - if(flag) { - cubeMetadataRes.delete(temp); - }else { - msg = "CM_DEL_FAILED"; - } - - } - return request(super.createRequestPageTempletResponse("redirect:/apps/report/cube/detail.html?id="+cubeMetadata.getCubeid()+"&msg="+msg)); - } - @RequestMapping("/detail") - @Menu(type = "report" , subtype = "cube" ) - public ModelAndView detail(ModelMap map , HttpServletRequest request , @Valid String id,@Valid String dimensionId,@Valid String msg) { - List dimensionList = dimensionRes.findByCubeid(id); - map.put("dimensionList", dimensionList); - if(!dimensionList.isEmpty()) { - if(StringUtils.isBlank(dimensionId)) { - dimensionId = dimensionList.get(0).getId(); - } - map.put("cubeLevelList", cubeLevelRes.findByOrgiAndDimid(super.getOrgi(request), dimensionId)); - } - if(!StringUtils.isBlank(dimensionId) && "cubemeasure".equals(dimensionId)) { - List cubeMeasureList = cubeMeasureRes.findByCubeid(id); - map.put("cubeMeasureList", cubeMeasureList); - } - map.put("cubeMetadataList", cubeMetadataRes.findByCubeid(id)); - map.put("cubeid", id); - map.put("dimensionId", dimensionId); - map.put("msg", msg); - return request(super.createAppsTempletResponse("/apps/business/report/cube/detail")); - } - /** - * 模型验证 - * @param map - * @param request - * @param id - * @return - */ - @RequestMapping("/cubevalid") - @Menu(type = "report" , subtype = "cube" ) - public ModelAndView cubevalid(ModelMap map , HttpServletRequest request , @Valid String id) { - boolean hasMasterTable = false ; - Cube cube = cubeRes.findOne(id); - List cubeMetadataList = cubeMetadataRes.findByCubeid(id); - if(!cubeMetadataList.isEmpty()) { - for(CubeMetadata cm:cubeMetadataList) { - //至少一个主表 - if("0".equals(cm.getMtype())) { - hasMasterTable = true; - break; - } - } - } - boolean hasLeastMeasure = false ; - if("cube".equals(cube.getModeltype())) { - //立方体必须至少一个指标 - List cubeMeasureList = cubeMeasureRes.findByCubeid(id); - if(!cubeMeasureList.isEmpty()) { - hasLeastMeasure = true; - } - } - String msg = ""; - if(!hasMasterTable) { - msg = "CUBE_VALID_FAILED_1"; - }else if(!hasLeastMeasure) { - msg = "CUBE_VALID_FAILED_2"; - } - map.put("msg", msg); - return request(super.createRequestPageTempletResponse("redirect:/apps/report/cube/detail.html?id="+id+"&msg="+msg)); - } - - /** - * 模型发布页面加载 - * @param request - * @param cubeid - * @return - * @throws Exception - */ - @RequestMapping("/cubepublish") - @Menu(type = "report" , subtype = "cube" ) - public ModelAndView cubepublish(ModelMap map ,HttpServletRequest request , @Valid String cubeid,@Valid String isRecover) throws Exception{ - map.put("cubeid", cubeid); - return request(super.createRequestPageTempletResponse("/apps/business/report/cube/cubepublish")); - } - /** - * 模型发布 - * @param request - * @param cubeid - * @return - * @throws Exception - */ - @RequestMapping("/cubepublished") - @Menu(type = "report" , subtype = "cube" ) - public ModelAndView cubepublished(ModelMap map ,HttpServletRequest request , @Valid String cubeid,@Valid String isRecover) throws Exception{ - this.cubevalid(map,request, cubeid) ; - if(!StringUtils.isBlank((String)map.get("msg"))) { - map.put("cubeid", cubeid); - return request(super.createRequestPageTempletResponse("redirect:/apps/report/cube/index.html?msg="+ map.get("msg"))); - } - User user = super.getUser(request); - Cube cube =this.getCube(cubeid); - PublishedCube publishCube = new PublishedCube(); - MainUtils.copyProperties(cube, publishCube, ""); - publishCube.setId(null); - Base64 base64 = new Base64(); - publishCube.setCubecontent(base64.encodeToString(MainUtils.toBytes(cube))) ; - publishCube.setDataid(cubeid); - publishCube.setUserid(user.getId()); - publishCube.setUsername(user.getUsername()); - publishCube.setCreatetime(new Date()); - - List pbCubeList = publishedCubeRes.findByOrgiAndDataidOrderByDataversionDesc(super.getOrgi(request), cubeid); - if(!pbCubeList.isEmpty()){ - int maxVersion = pbCubeList.get(0).getDataversion() ; - if("yes".equals(isRecover)){ - publishCube.setId(pbCubeList.get(0).getId()) ; - publishCube.setDataversion(pbCubeList.get(0).getDataversion()); - publishedCubeRes.save(publishCube); - }else if("no".equals(isRecover)){ - publishCube.setDataversion(maxVersion+1) ; - publishedCubeRes.save(publishCube); - }else{ - publishedCubeRes.delete(pbCubeList); - publishCube.setDataversion(1) ; - publishedCubeRes.save(publishCube); - } - }else{ - publishCube.setDataversion(1) ; - publishedCubeRes.save(publishCube); - } - return request(super.createRequestPageTempletResponse("redirect:/apps/report/cube/index.html?typeid="+cube.getTypeid())); - } - /** - * 已发布模型列表 - * @param map - * @param request - * @param typeid - * @param msg - * @return - */ - @RequestMapping("/pbcubeindex") - @Menu(type = "report" , subtype = "pbcube" ) - public ModelAndView pbcubeindex(ModelMap map , HttpServletRequest request , @Valid String typeid) { - List cubeTypeList = cubeTypeRes.findByOrgi(super.getOrgi(request)) ; - if(!StringUtils.isBlank(typeid)){ - map.put("cubeType", cubeTypeRes.findByIdAndOrgi(typeid, super.getOrgi(request))) ; - map.put("cubeList", publishedCubeRes.getByOrgiAndTypeid(super.getOrgi(request) , typeid , new PageRequest(super.getP(request), super.getPs(request)))) ; - }else{ - map.put("cubeList", publishedCubeRes.getByOrgi(super.getOrgi(request), new PageRequest(super.getP(request), super.getPs(request)))) ; - } - map.put("pubCubeTypeList", cubeTypeList) ; - map.put("typeid", typeid); - return request(super.createAppsTempletResponse("/apps/business/report/cube/pbCubeIndex")); - } - /** - * 已发布模型列表 - * @param map - * @param request - * @param typeid - * @param msg - * @return - */ - @RequestMapping("/pbcubelist") - @Menu(type = "report" , subtype = "pbcube" ) - public ModelAndView pbcubelist(ModelMap map , HttpServletRequest request , @Valid String typeid) { - if(!StringUtils.isBlank(typeid)){ - map.put("cubeType", cubeTypeRes.findByIdAndOrgi(typeid, super.getOrgi(request))) ; - map.put("cubeList", publishedCubeRes.getByOrgiAndTypeid(super.getOrgi(request) , typeid , new PageRequest(super.getP(request), super.getPs(request)))) ; - }else{ - map.put("cubeList", publishedCubeRes.getByOrgi(super.getOrgi(request), new PageRequest(super.getP(request), super.getPs(request)))) ; - } - map.put("typeid", typeid); - return request(super.createRequestPageTempletResponse("/apps/business/report/cube/pbcubelist")); - } - /** - * 已发布模型列表 - * @param map - * @param request - * @param typeid - * @param msg - * @return - */ - @RequestMapping("/pbcubedelete") - @Menu(type = "report" , subtype = "pbcube" ) - public ModelAndView pbcubedelete(ModelMap map , HttpServletRequest request , @Valid String id) { - PublishedCube pbCube = publishedCubeRes.findOne(id); - String typeid = ""; - if(pbCube!=null) { - typeid = pbCube.getTypeid(); - publishedCubeRes.delete(pbCube); - } - return request(super.createRequestPageTempletResponse("redirect:/apps/report/cube/pbcubeindex.html?typeid="+typeid)); - } - - /** - * 选择已发布模型列表 - * @param map - * @param request - * @param typeid - * @param msg - * @return - */ - @RequestMapping("/selpbcubeindex") - @Menu(type = "report" , subtype = "pbcube" ) - public ModelAndView selpbcubeindex(ModelMap map , HttpServletRequest request , @Valid String typeid,@Valid String mid) { - List cubeTypeList = cubeTypeRes.findByOrgi(super.getOrgi(request)) ; - if(!StringUtils.isBlank(typeid)){ - map.put("cubeType", cubeTypeRes.findByIdAndOrgi(typeid, super.getOrgi(request))) ; - map.put("cubeList", publishedCubeRes.getByOrgiAndTypeid(super.getOrgi(request) , typeid , new PageRequest(super.getP(request), super.getPs(request)))) ; - }else{ - map.put("cubeList", publishedCubeRes.getByOrgi(super.getOrgi(request), new PageRequest(super.getP(request), super.getPs(request)))) ; - } - map.put("pubCubeTypeList", cubeTypeList) ; - map.put("typeid", typeid); - map.put("mid", mid); - return request(super.createRequestPageTempletResponse("/apps/business/report/design/cube/pbCubeIndex")); - } - /** - * 选择已发布模型列表 - * @param map - * @param request - * @param typeid - * @param msg - * @return - */ - @RequestMapping("/selpbcubelist") - @Menu(type = "report" , subtype = "pbcube" ) - public ModelAndView selpbcubelist(ModelMap map , HttpServletRequest request , @Valid String typeid, @Valid String mid) { - if(!StringUtils.isBlank(typeid)){ - map.put("cubeType", cubeTypeRes.findByIdAndOrgi(typeid, super.getOrgi(request))) ; - map.put("cubeList", publishedCubeRes.getByOrgiAndTypeid(super.getOrgi(request) , typeid , new PageRequest(super.getP(request), super.getPs(request)))) ; - }else{ - map.put("cubeList", publishedCubeRes.getByOrgi(super.getOrgi(request), new PageRequest(super.getP(request), super.getPs(request)))) ; - } - map.put("typeid", typeid); - map.put("mid", mid); - return request(super.createRequestPageTempletResponse("/apps/business/report/design/cube/pbcubelist")); - } - - private Cube getCube(String id){ - Cube cube = cubeRes.findOne(id); - if(cube!=null) { - cube.setMetadata(cubeMetadataRes.findByCubeid(id)); - cube.setMeasure(cubeMeasureRes.findByCubeid(id)); - cube.setDimension(dimensionRes.findByCubeid(id)); - } - return cube; - - } - - -} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/report/CubeLevelController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/report/CubeLevelController.java deleted file mode 100644 index e1ab168b..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/report/CubeLevelController.java +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.controller.apps.report; - -import com.chatopera.cc.controller.Handler; -import com.chatopera.cc.model.CubeLevel; -import com.chatopera.cc.model.CubeMetadata; -import com.chatopera.cc.model.Dimension; -import com.chatopera.cc.model.TableProperties; -import com.chatopera.cc.persistence.repository.CubeLevelRepository; -import com.chatopera.cc.persistence.repository.CubeMetadataRepository; -import com.chatopera.cc.persistence.repository.DimensionRepository; -import com.chatopera.cc.persistence.repository.TablePropertiesRepository; -import com.chatopera.cc.util.Menu; -import org.apache.commons.lang.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.servlet.ModelAndView; - -import javax.servlet.http.HttpServletRequest; -import javax.validation.Valid; -import java.util.List; - -@Controller -@RequestMapping("/apps/report/cubelevel") -public class CubeLevelController extends Handler{ - - @Autowired - private CubeLevelRepository cubeLevelRes; - - @Autowired - private DimensionRepository dimensionRes; - - @Autowired - private TablePropertiesRepository tablePropertiesRes; - - @Autowired - private CubeMetadataRepository cubeMetadataRes; - - @RequestMapping("/add") - @Menu(type = "report" , subtype = "cubelevel") - public ModelAndView cubeLeveladd(ModelMap map , HttpServletRequest request , @Valid String cubeid,@Valid String dimid) { - map.addAttribute("cubeid", cubeid); - map.addAttribute("dimid", dimid); - //map.addAttribute("fktableList",cubeMetadataRes.findByCubeid(cubeid)); - Dimension dim = dimensionRes.findByIdAndOrgi(dimid,super.getOrgi(request)); - - if(dim!=null){ - if(!StringUtils.isBlank(dim.getFktable())) { - map.put("fktableidList", tablePropertiesRes.findByDbtableid(dim.getFktable())); - }else { - List cmList = cubeMetadataRes.findByCubeidAndMtype(cubeid,"0"); - if(!cmList.isEmpty() && cmList.get(0)!=null) { - map.put("fktableidList", tablePropertiesRes.findByDbtableid(cmList.get(0).getTb().getId())); - } - } - - } - return request(super.createRequestPageTempletResponse("/apps/business/report/cube/cubelevel/add")); - } - - @RequestMapping("/save") - @Menu(type = "report" , subtype = "cubelevel" ) - public ModelAndView cubeLevelsave(ModelMap map , HttpServletRequest request , @Valid CubeLevel cubeLevel,@Valid String tableid) { - if(!StringUtils.isBlank(cubeLevel.getName())){ - cubeLevel.setOrgi(super.getOrgi(request)); - cubeLevel.setCreater(super.getUser(request).getId()); - cubeLevel.setCode(cubeLevel.getColumname()); - if(!StringUtils.isBlank(tableid)) { - TableProperties tb = new TableProperties(); - tb.setId(tableid); - TableProperties t = tablePropertiesRes.findById(tableid); - cubeLevel.setTablename(t.getTablename()); - cubeLevel.setCode(t.getFieldname()); - cubeLevel.setColumname(t.getFieldname()); - cubeLevel.setTableproperty(tb); - } - cubeLevelRes.save(cubeLevel) ; - } - return request(super.createRequestPageTempletResponse("redirect:/apps/report/cube/detail.html?id="+cubeLevel.getCubeid()+"&dimensionId="+cubeLevel.getDimid())); - } - - @RequestMapping("/delete") - @Menu(type = "report" , subtype = "cubelevel" ) - public ModelAndView quickreplydelete(ModelMap map , HttpServletRequest request , @Valid String id) { - CubeLevel cubeLevel = cubeLevelRes.findOne(id) ; - if(cubeLevel!=null){ - cubeLevelRes.delete(cubeLevel); - } - return request(super.createRequestPageTempletResponse("redirect:/apps/report/cube/detail.html?id="+cubeLevel.getCubeid()+"&dimensionId="+cubeLevel.getDimid())); - } - @RequestMapping("/edit") - @Menu(type = "report" , subtype = "cubelevel" , admin= true) - public ModelAndView quickreplyedit(ModelMap map , HttpServletRequest request , @Valid String id) { - CubeLevel cubeLevel = cubeLevelRes.findOne(id) ; - map.put("cubeLevel", cubeLevel) ; - Dimension dim = dimensionRes.findByIdAndOrgi(cubeLevel.getDimid(),super.getOrgi(request)); - if(dim!=null){ - if(!StringUtils.isBlank(dim.getFktable())) { - map.put("fktableidList", tablePropertiesRes.findByDbtableid(dim.getFktable())); - map.addAttribute("tableid", dim.getFktable()); - }else { - List cmList = cubeMetadataRes.findByCubeidAndMtype(cubeLevel.getCubeid(),"0"); - if(!cmList.isEmpty() && cmList.get(0)!=null) { - map.put("fktableidList", tablePropertiesRes.findByDbtableid(cmList.get(0).getTb().getId())); - map.addAttribute("tableid", cmList.get(0).getId()); - } - } - - } - return request(super.createRequestPageTempletResponse("/apps/business/report/cube/cubelevel/edit")); - } - - @RequestMapping("/update") - @Menu(type = "report" , subtype = "cubelevel" , admin= true) - public ModelAndView quickreplyupdate(ModelMap map , HttpServletRequest request , @Valid CubeLevel cubeLevel,@Valid String tableid) { - if(!StringUtils.isBlank(cubeLevel.getId())){ - CubeLevel temp = cubeLevelRes.findOne(cubeLevel.getId()) ; - cubeLevel.setOrgi(super.getOrgi(request)); - cubeLevel.setCreater(super.getUser(request).getId()); - if(temp!=null){ - cubeLevel.setCreatetime(temp.getCreatetime()); - } - if(!StringUtils.isBlank(tableid)) { - TableProperties tb = new TableProperties(); - tb.setId(tableid); - TableProperties t = tablePropertiesRes.findById(tableid); - cubeLevel.setTablename(t.getTablename()); - cubeLevel.setCode(t.getFieldname()); - cubeLevel.setColumname(t.getFieldname()); - cubeLevel.setTableproperty(tb); - } - cubeLevelRes.save(cubeLevel) ; - } - return request(super.createRequestPageTempletResponse("redirect:/apps/report/cube/detail.html?id="+cubeLevel.getCubeid()+"&dimensionId="+cubeLevel.getDimid())); - } - @RequestMapping("/fktableid") - @Menu(type = "report" , subtype = "cubelevel" , admin= true) - public ModelAndView fktableid(ModelMap map , HttpServletRequest request , @Valid String tableid) { - if(!StringUtils.isBlank(tableid)){ - map.put("fktableidList", tablePropertiesRes.findByDbtableid(tableid)); - } - return request(super.createRequestPageTempletResponse("/apps/business/report/cube/cubelevel/fktableiddiv")); - } -} \ No newline at end of file diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/report/CubeMeasureController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/report/CubeMeasureController.java deleted file mode 100644 index f37acdb5..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/report/CubeMeasureController.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.controller.apps.report; - -import com.chatopera.cc.controller.Handler; -import com.chatopera.cc.model.CubeMeasure; -import com.chatopera.cc.model.CubeMetadata; -import com.chatopera.cc.persistence.repository.CubeMeasureRepository; -import com.chatopera.cc.persistence.repository.CubeMetadataRepository; -import com.chatopera.cc.persistence.repository.TablePropertiesRepository; -import com.chatopera.cc.util.Menu; -import org.apache.commons.lang.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.servlet.ModelAndView; - -import javax.servlet.http.HttpServletRequest; -import javax.validation.Valid; -import java.util.List; - -@Controller -@RequestMapping("/apps/report/cubemeasure") -public class CubeMeasureController extends Handler{ - - @Autowired - private CubeMeasureRepository cubeMeasureRes; - - @Autowired - private TablePropertiesRepository tablePropertiesRes; - - @Autowired - private CubeMetadataRepository cubeMetadataRes; - - @RequestMapping("/add") - @Menu(type = "report" , subtype = "cubemeasure") - public ModelAndView cubeMeasureadd(ModelMap map , HttpServletRequest request , @Valid String cubeid) { - map.addAttribute("cubeid", cubeid); - List cmList = cubeMetadataRes.findByCubeidAndMtype(cubeid,"0"); - if(!cmList.isEmpty() && cmList.get(0)!=null) { - map.put("fktableidList", tablePropertiesRes.findByDbtableid(cmList.get(0).getTb().getId())); - map.put("table", cmList.get(0).getTb()); - } - return request(super.createRequestPageTempletResponse("/apps/business/report/cube/cubemeasure/add")); - } - - @RequestMapping("/save") - @Menu(type = "report" , subtype = "cubemeasure" ) - public ModelAndView cubeMeasuresave(ModelMap map , HttpServletRequest request , @Valid CubeMeasure cubeMeasure) { - if(!StringUtils.isBlank(cubeMeasure.getName())){ - cubeMeasure.setOrgi(super.getOrgi(request)); - cubeMeasure.setCreater(super.getUser(request).getId()); - cubeMeasure.setCode(cubeMeasure.getColumname()); - cubeMeasureRes.save(cubeMeasure) ; - } - return request(super.createRequestPageTempletResponse("redirect:/apps/report/cube/detail.html?dimensionId=cubemeasure&id="+cubeMeasure.getCubeid())); - } - - @RequestMapping("/delete") - @Menu(type = "report" , subtype = "cubemeasure" ) - public ModelAndView quickreplydelete(ModelMap map , HttpServletRequest request , @Valid String id) { - CubeMeasure cubeMeasure = cubeMeasureRes.findOne(id) ; - if(cubeMeasure!=null){ - cubeMeasureRes.delete(cubeMeasure); - } - return request(super.createRequestPageTempletResponse("redirect:/apps/report/cube/detail.html?dimensionId=cubemeasure&id="+cubeMeasure.getCubeid())); - } - @RequestMapping("/edit") - @Menu(type = "report" , subtype = "cubemeasure" , admin= true) - public ModelAndView quickreplyedit(ModelMap map , HttpServletRequest request , @Valid String id) { - CubeMeasure cubeMeasure = cubeMeasureRes.findOne(id) ; - map.put("cubemeasure", cubeMeasure) ; - if(cubeMeasure!=null) { - List cmList = cubeMetadataRes.findByCubeidAndMtype(cubeMeasure.getCubeid(),"0"); - if(!cmList.isEmpty() && cmList.get(0)!=null) { - map.put("fktableidList", tablePropertiesRes.findByDbtableid(cmList.get(0).getTb().getId())); - map.put("table", cmList.get(0).getTb()); - } - } - return request(super.createRequestPageTempletResponse("/apps/business/report/cube/cubemeasure/edit")); - } - - @RequestMapping("/update") - @Menu(type = "report" , subtype = "cubemeasure" , admin= true) - public ModelAndView quickreplyupdate(ModelMap map , HttpServletRequest request , @Valid CubeMeasure cubeMeasure) { - if(!StringUtils.isBlank(cubeMeasure.getId())){ - CubeMeasure temp = cubeMeasureRes.findOne(cubeMeasure.getId()) ; - cubeMeasure.setOrgi(super.getOrgi(request)); - cubeMeasure.setCreater(super.getUser(request).getId()); - if(temp!=null){ - cubeMeasure.setCreatetime(temp.getCreatetime()); - } - cubeMeasure.setCode(cubeMeasure.getColumname()); - cubeMeasureRes.save(cubeMeasure) ; - } - return request(super.createRequestPageTempletResponse("redirect:/apps/report/cube/detail.html?dimensionId=cubemeasure&id="+cubeMeasure.getCubeid())); - } - @RequestMapping("/fktableid") - @Menu(type = "report" , subtype = "cubemeasure" , admin= true) - public ModelAndView fktableid(ModelMap map , HttpServletRequest request , @Valid String tableid) { - if(!StringUtils.isBlank(tableid)){ - map.put("fktableidList", tablePropertiesRes.findByDbtableid(tableid)); - } - return request(super.createRequestPageTempletResponse("/apps/business/report/cube/cubemeasure/fktableiddiv")); - } -} \ No newline at end of file diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/report/DimensionController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/report/DimensionController.java deleted file mode 100644 index 85509b9e..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/report/DimensionController.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.controller.apps.report; - -import com.chatopera.cc.controller.Handler; -import com.chatopera.cc.model.CubeLevel; -import com.chatopera.cc.model.CubeMetadata; -import com.chatopera.cc.model.Dimension; -import com.chatopera.cc.persistence.repository.CubeLevelRepository; -import com.chatopera.cc.persistence.repository.CubeMetadataRepository; -import com.chatopera.cc.persistence.repository.DimensionRepository; -import com.chatopera.cc.persistence.repository.TablePropertiesRepository; -import com.chatopera.cc.util.Menu; -import org.apache.commons.lang.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.servlet.ModelAndView; - -import javax.servlet.http.HttpServletRequest; -import javax.validation.Valid; -import java.util.List; - -@Controller -@RequestMapping("/apps/report/dimension") -public class DimensionController extends Handler{ - - @Autowired - private DimensionRepository dimensionRes; - - @Autowired - private CubeLevelRepository cubeLevelRes; - - @Autowired - private CubeMetadataRepository cubeMetadataRes; - - @Autowired - private TablePropertiesRepository tablePropertiesRes; - - @RequestMapping("/add") - @Menu(type = "report" , subtype = "dimension") - public ModelAndView dimensionadd(ModelMap map , HttpServletRequest request , @Valid String cubeid) { - map.addAttribute("cubeid", cubeid); - map.addAttribute("fkfieldList",cubeMetadataRes.findByCubeidAndMtype(cubeid,"0")); - map.addAttribute("fktableList",cubeMetadataRes.findByCubeidAndMtypeNot(cubeid,"0")); - return request(super.createRequestPageTempletResponse("/apps/business/report/cube/dimension/add")); - } - - @RequestMapping("/save") - @Menu(type = "report" , subtype = "dimension" ) - public ModelAndView dimensionsave(ModelMap map , HttpServletRequest request , @Valid Dimension dimension) { - if(!StringUtils.isBlank(dimension.getName())){ - dimension.setOrgi(super.getOrgi(request)); - dimension.setCreater(super.getUser(request).getId()); - dimensionRes.save(dimension) ; - } - return request(super.createRequestPageTempletResponse("redirect:/apps/report/cube/detail.html?id="+dimension.getCubeid()+"&dimensionId="+dimension.getId())); - } - - @RequestMapping("/delete") - @Menu(type = "report" , subtype = "dimension" ) - public ModelAndView quickreplydelete(ModelMap map , HttpServletRequest request , @Valid String id) { - Dimension dimension = dimensionRes.findOne(id) ; - if(dimension!=null){ - dimensionRes.delete(dimension); - List cubeLevelList = cubeLevelRes.findByOrgiAndDimid(super.getOrgi(request), id); - if(!cubeLevelList.isEmpty()) { - cubeLevelRes.delete(cubeLevelList); - } - } - return request(super.createRequestPageTempletResponse("redirect:/apps/report/cube/detail.html?id="+dimension.getCubeid())); - } - @RequestMapping("/edit") - @Menu(type = "report" , subtype = "dimension" , admin= true) - public ModelAndView quickreplyedit(ModelMap map , HttpServletRequest request , @Valid String id) { - Dimension dimension = dimensionRes.findOne(id) ; - map.put("dimension", dimension) ; - String cubeid = dimension.getCubeid(); - map.addAttribute("cubeid", cubeid); - map.addAttribute("fkfieldList",cubeMetadataRes.findByCubeidAndMtype(cubeid,"0")); - List fktableList = cubeMetadataRes.findByCubeidAndMtypeNot(cubeid,"0"); - map.addAttribute("fktableList",fktableList); - map.put("fktableidList", tablePropertiesRes.findByDbtableid(dimension.getFktable())); - return request(super.createRequestPageTempletResponse("/apps/business/report/cube/dimension/edit")); - } - - @RequestMapping("/update") - @Menu(type = "report" , subtype = "dimension" , admin= true) - public ModelAndView quickreplyupdate(ModelMap map , HttpServletRequest request , @Valid Dimension dimension) { - if(!StringUtils.isBlank(dimension.getId())){ - Dimension temp = dimensionRes.findOne(dimension.getId()) ; - dimension.setOrgi(super.getOrgi(request)); - dimension.setCreater(super.getUser(request).getId()); - if(temp!=null){ - dimension.setCreatetime(temp.getCreatetime()); - } - dimensionRes.save(dimension) ; - } - return request(super.createRequestPageTempletResponse("redirect:/apps/report/cube/detail.html?id="+dimension.getCubeid()+"&dimensionId="+dimension.getId())); - } - @RequestMapping("/fktableid") - @Menu(type = "report" , subtype = "dimension" , admin= true) - public ModelAndView fktableid(ModelMap map , HttpServletRequest request , @Valid String tableid) { - if(!StringUtils.isBlank(tableid)){ - map.put("fktableidList", tablePropertiesRes.findByDbtableid(tableid)); - } - return request(super.createRequestPageTempletResponse("/apps/business/report/cube/dimension/fktableiddiv")); - } -} \ No newline at end of file diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/report/ReportController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/report/ReportController.java deleted file mode 100644 index 0735e1a5..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/report/ReportController.java +++ /dev/null @@ -1,387 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.controller.apps.report; - -import com.chatopera.cc.basic.Constants; -import com.chatopera.cc.basic.MainContext; -import com.chatopera.cc.basic.MainUtils; -import com.chatopera.cc.controller.Handler; -import com.chatopera.cc.model.*; -import com.chatopera.cc.persistence.repository.*; -import com.chatopera.cc.util.Menu; -import com.chatopera.cc.util.dsdata.DSData; -import com.chatopera.cc.util.dsdata.DSDataEvent; -import com.chatopera.cc.util.dsdata.ExcelImportProecess; -import com.chatopera.cc.util.dsdata.export.ExcelExporterProcess; -import org.apache.commons.io.FileUtils; -import org.apache.commons.lang.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.data.domain.PageRequest; -import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.multipart.MultipartFile; -import org.springframework.web.servlet.ModelAndView; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.validation.Valid; -import java.io.File; -import java.io.IOException; -import java.text.SimpleDateFormat; -import java.util.*; - -@Controller -@RequestMapping("/apps/report") -public class ReportController extends Handler{ - - @Value("${web.upload-path}") - private String path; - - @Value("${uk.im.server.port}") - private Integer port; - - @Autowired - private DataDicRepository dataDicRes; - - @Autowired - private ReportRepository reportRes; - - @Autowired - private PublishedReportRepository publishedReportRes; - - @Autowired - private MetadataRepository metadataRes ; - - @Autowired - private ReportCubeService reportCubeService; - - @RequestMapping("/index") - @Menu(type = "setting" , subtype = "report" , admin= true) - public ModelAndView index(ModelMap map , HttpServletRequest request , @Valid String dicid) { - if(!StringUtils.isBlank(dicid) && !"0".equals(dicid)){ - map.put("dataDic", dataDicRes.findByIdAndOrgi(dicid, super.getOrgi(request))) ; - map.put("reportList", reportRes.findByOrgiAndDicid(super.getOrgi(request) , dicid , new PageRequest(super.getP(request), super.getPs(request)))) ; - }else{ - map.put("reportList", reportRes.findByOrgi(super.getOrgi(request) , new PageRequest(super.getP(request), super.getPs(request)))) ; - } - map.put("dataDicList", dataDicRes.findByOrgi(super.getOrgi(request))) ; - return request(super.createAppsTempletResponse("/apps/business/report/index")); - } - - @RequestMapping("/add") - @Menu(type = "setting" , subtype = "reportadd" , admin= true) - public ModelAndView quickreplyadd(ModelMap map , HttpServletRequest request , @Valid String dicid) { - if(!StringUtils.isBlank(dicid)){ - map.addAttribute("dataDic", dataDicRes.findByIdAndOrgi(dicid, super.getOrgi(request))) ; - } - map.addAttribute("dataDicList", dataDicRes.findByOrgi(super.getOrgi(request))) ; - return request(super.createRequestPageTempletResponse("/apps/business/report/add")); - } - - @RequestMapping("/save") - @Menu(type = "setting" , subtype = "report" , admin= true) - public ModelAndView quickreplysave(ModelMap map , HttpServletRequest request , @Valid Report report) { - ModelAndView view = request(super.createRequestPageTempletResponse("redirect:/apps/report/index.html?dicid="+report.getDicid())); - if(!StringUtils.isBlank(report.getName())){ - int count = reportRes.countByOrgiAndName(super.getOrgi(request), report.getName()) ; - if(count == 0) { - report.setOrgi(super.getOrgi(request)); - report.setCreater(super.getUser(request).getId()); - report.setReporttype(MainContext.ReportType.REPORT.toString()); - report.setCode(MainUtils.genID()); - reportRes.save(report) ; - }else { - view = request(super.createRequestPageTempletResponse("redirect:/apps/report/index.html?msg=rt_name_exist&dicid="+report.getDicid())); - } - } - return view ; - } - - @RequestMapping("/delete") - @Menu(type = "setting" , subtype = "report" , admin= true) - public ModelAndView quickreplydelete(ModelMap map , HttpServletRequest request , @Valid String id) { - Report report = reportRes.findOne(id) ; - if(report!=null){ - reportRes.delete(report); - } - return request(super.createRequestPageTempletResponse("redirect:/apps/report/index.html?dicid="+report.getDicid())); - } - @RequestMapping("/edit") - @Menu(type = "setting" , subtype = "report" , admin= true) - public ModelAndView quickreplyedit(ModelMap map , HttpServletRequest request , @Valid String id) { - Report report = reportRes.findOne(id) ; - map.put("report", report) ; - if(report!=null){ - map.put("dataDic", dataDicRes.findByIdAndOrgi(report.getDicid(), super.getOrgi(request))) ; - } - map.addAttribute("dataDicList", dataDicRes.findByOrgi(super.getOrgi(request))) ; - return request(super.createRequestPageTempletResponse("/apps/business/report/edit")); - } - - @RequestMapping("/update") - @Menu(type = "setting" , subtype = "report" , admin= true) - public ModelAndView quickreplyupdate(ModelMap map , HttpServletRequest request , @Valid Report report) { - if(!StringUtils.isBlank(report.getId())){ - Report temp = reportRes.findOne(report.getId()) ; - if(temp!=null) { - temp.setName(report.getName()); - temp.setCode(report.getCode()); - temp.setDicid(report.getDicid()); - temp.setUpdatetime(new Date()); - temp.setDescription(report.getDescription()); - reportRes.save(temp) ; - } - } - return request(super.createRequestPageTempletResponse("redirect:/apps/report/index.html?dicid="+report.getDicid())); - } - - @RequestMapping({"/addtype"}) - @Menu(type="apps", subtype="kbs") - public ModelAndView addtype(ModelMap map , HttpServletRequest request , @Valid String dicid){ - map.addAttribute("dataDicList", dataDicRes.findByOrgi(super.getOrgi(request))) ; - if(!StringUtils.isBlank(dicid)){ - map.addAttribute("dataDic", dataDicRes.findByIdAndOrgi(dicid, super.getOrgi(request))) ; - } - return request(super.createRequestPageTempletResponse("/apps/business/report/addtype")); - } - - @RequestMapping("/type/save") - @Menu(type = "apps" , subtype = "report") - public ModelAndView typesave(HttpServletRequest request ,@Valid DataDic dataDic) { - List dicList = dataDicRes.findByOrgiAndName(super.getOrgi(request),dataDic.getName()) ; - if(dicList!=null && dicList.size() > 0){ - return request(super.createRequestPageTempletResponse("redirect:/apps/report/index.html?dicid="+dataDic.getParentid()+"&msg=qr_type_exist")); - }else { - dataDic.setOrgi(super.getOrgi(request)); - dataDic.setCreater(super.getUser(request).getId()); - dataDic.setCreatetime(new Date()); - dataDic.setTabtype(MainContext.QuickType.PUB.toString()); - dataDicRes.save(dataDic) ; - } - return request(super.createRequestPageTempletResponse("redirect:/apps/report/index.html?dicid="+dataDic.getId())); - } - - @RequestMapping({"/edittype"}) - @Menu(type="apps", subtype="kbs") - public ModelAndView edittype(ModelMap map , HttpServletRequest request , String id){ - DataDic dataDic = dataDicRes.findByIdAndOrgi(id, super.getOrgi(request)) ; - map.addAttribute("dataDic", dataDic) ; - if(dataDic!=null) { - map.addAttribute("parentDataDic", dataDicRes.findByIdAndOrgi(dataDic.getParentid(), super.getOrgi(request))) ; - } - map.addAttribute("dataDicList", dataDicRes.findByOrgi(super.getOrgi(request))) ; - return request(super.createRequestPageTempletResponse("/apps/business/report/edittype")); - } - - @RequestMapping("/type/update") - @Menu(type = "apps" , subtype = "report") - public ModelAndView typeupdate(HttpServletRequest request ,@Valid DataDic dataDic) { - ModelAndView view = request(super.createRequestPageTempletResponse("redirect:/apps/report/index.html?dicid="+dataDic.getId())); - DataDic tempDataDic= dataDicRes.findByIdAndOrgi(dataDic.getId(), super.getOrgi(request)) ; - if(tempDataDic !=null){ - //判断名称是否重复 - List dicList = dataDicRes.findByOrgiAndNameAndIdNot(super.getOrgi(request) , dataDic.getName() , dataDic.getId()) ; - if(dicList!=null && dicList.size() > 0) { - view = request(super.createRequestPageTempletResponse("redirect:/apps/report/index.html?msg=qr_type_exist&dicid="+dataDic.getId())); - }else { - tempDataDic.setName(dataDic.getName()); - tempDataDic.setDescription(dataDic.getDescription()); - tempDataDic.setParentid(dataDic.getParentid()); - dataDicRes.save(tempDataDic) ; - } - } - return view ; - } - - @RequestMapping({"/deletetype"}) - @Menu(type="apps", subtype="kbs") - public ModelAndView deletetype(ModelMap map , HttpServletRequest request , @Valid String id){ - ModelAndView view = request(super.createRequestPageTempletResponse("redirect:/apps/report/index.html?dicid="+id)); - if(!StringUtils.isBlank(id)){ - DataDic tempDataDic = dataDicRes.findByIdAndOrgi(id, super.getOrgi(request)) ; - int count = reportRes.countByOrgiAndDicid(super.getOrgi(request), id) ; - if(count == 0) { - dataDicRes.delete(tempDataDic); - view = request(super.createRequestPageTempletResponse("redirect:/apps/report/index.html?dicid="+tempDataDic.getParentid())); - }else { - view = request(super.createRequestPageTempletResponse("redirect:/apps/report/index.html?msg=report_exist&dicid="+id)); - } - } - return view ; - } - - @RequestMapping("/imp") - @Menu(type = "setting" , subtype = "reportimp") - public ModelAndView imp(ModelMap map , HttpServletRequest request , @Valid String type) { - map.addAttribute("type", type) ; - return request(super.createRequestPageTempletResponse("/apps/business/report/imp")); - } - - @RequestMapping("/impsave") - @Menu(type = "setting" , subtype = "reportimpsave") - public ModelAndView impsave(ModelMap map , HttpServletRequest request , @RequestParam(value = "cusfile", required = false) MultipartFile cusfile , @Valid String type) throws IOException { - DSDataEvent event = new DSDataEvent(); - String fileName = "quickreply/"+ MainUtils.getUUID()+cusfile.getOriginalFilename().substring(cusfile.getOriginalFilename().lastIndexOf(".")) ; - File excelFile = new File(path , fileName) ; - if(!excelFile.getParentFile().exists()){ - excelFile.getParentFile().mkdirs() ; - } - MetadataTable table = metadataRes.findByTablename("uk_report") ; - if(table!=null){ - FileUtils.writeByteArrayToFile(new File(path , fileName), cusfile.getBytes()); - event.setDSData(new DSData(table,excelFile , cusfile.getContentType(), super.getUser(request))); - event.getDSData().setClazz(Report.class); - event.setOrgi(super.getOrgi(request)); - if(!StringUtils.isBlank(type)){ - event.getValues().put("cate", type) ; - }else{ - event.getValues().put("cate", Constants.DEFAULT_TYPE) ; - } - event.getValues().put("type", MainContext.QuickType.PUB.toString()) ; - event.getValues().put("creater", super.getUser(request).getId()) ; -// exchange.getDSData().setProcess(new QuickReplyProcess(reportRes)); -// reporterRes.save(exchange.getDSData().getReport()) ; - new ExcelImportProecess(event).process() ; //启动导入任务 - } - - return request(super.createRequestPageTempletResponse("redirect:/apps/report/index.html"+(!StringUtils.isBlank(type)? "?dicid="+type:""))); - } - - @RequestMapping("/batdelete") - @Menu(type = "setting" , subtype = "reportbatdelete") - public ModelAndView batdelete(ModelMap map , HttpServletRequest request , HttpServletResponse response , @Valid String[] ids ,@Valid String type) throws IOException { - if(ids!=null && ids.length > 0){ - Iterable topicList = reportRes.findAll(Arrays.asList(ids)) ; - reportRes.delete(topicList); - } - - return request(super.createRequestPageTempletResponse("redirect:/apps/report/index.html"+(!StringUtils.isBlank(type) ? "?dicid="+type:""))); - } - - @RequestMapping("/expids") - @Menu(type = "setting" , subtype = "reportexpids") - public void expids(ModelMap map , HttpServletRequest request , HttpServletResponse response , @Valid String[] ids) throws IOException { - if(ids!=null && ids.length > 0){ - Iterable topicList = reportRes.findAll(Arrays.asList(ids)) ; - MetadataTable table = metadataRes.findByTablename("uk_report") ; - List> values = new ArrayList>(); - for(Report topic : topicList){ - values.add(MainUtils.transBean2Map(topic)) ; - } - - response.setHeader("content-disposition", "attachment;filename=UCKeFu-Report-"+new SimpleDateFormat("yyyy-MM-dd").format(new Date())+".xls"); - if(table!=null){ - ExcelExporterProcess excelProcess = new ExcelExporterProcess( values, table, response.getOutputStream()) ; - excelProcess.process(); - } - } - - return ; - } - - @RequestMapping("/expall") - @Menu(type = "setting" , subtype = "reportexpall") - public void expall(ModelMap map , HttpServletRequest request , HttpServletResponse response,@Valid String type) throws IOException { - List reportList = reportRes.findByOrgiAndDicid(super.getOrgi(request) , type) ; - - MetadataTable table = metadataRes.findByTablename("uk_report") ; - List> values = new ArrayList>(); - for(Report report : reportList){ - values.add(MainUtils.transBean2Map(report)) ; - } - - response.setHeader("content-disposition", "attachment;filename=UCKeFu-Report-"+new SimpleDateFormat("yyyy-MM-dd").format(new Date())+".xls"); - - if(table!=null){ - ExcelExporterProcess excelProcess = new ExcelExporterProcess( values, table, response.getOutputStream()) ; - excelProcess.process(); - } - return ; - } - - @RequestMapping("/pbreportindex") - @Menu(type = "setting" , subtype = "pbreport" , admin= true) - public ModelAndView pbreportindex(ModelMap map , HttpServletRequest request , @Valid String dicid) { - if(!StringUtils.isBlank(dicid) && !"0".equals(dicid)){ - map.put("dataDic", dataDicRes.findByIdAndOrgi(dicid, super.getOrgi(request))) ; - map.put("reportList", publishedReportRes.findByOrgiAndDicid(super.getOrgi(request) , dicid , new PageRequest(super.getP(request), super.getPs(request)))) ; - }else{ - map.put("reportList", publishedReportRes.findByOrgi(super.getOrgi(request) , new PageRequest(super.getP(request), super.getPs(request)))) ; - } - map.put("dataDicList", dataDicRes.findByOrgi(super.getOrgi(request))) ; - return request(super.createAppsTempletResponse("/apps/business/report/pbreportindex")); - } - @RequestMapping("/pbreportlist") - @Menu(type = "setting" , subtype = "pbreport" , admin= true) - public ModelAndView pbreportlist(ModelMap map , HttpServletRequest request , @Valid String dicid) { - if(!StringUtils.isBlank(dicid) && !"0".equals(dicid)){ - map.put("dataDic", dataDicRes.findByIdAndOrgi(dicid, super.getOrgi(request))) ; - map.put("reportList", publishedReportRes.findByOrgiAndDicid(super.getOrgi(request) , dicid , new PageRequest(super.getP(request), super.getPs(request)))) ; - }else{ - map.put("reportList", publishedReportRes.findByOrgi(super.getOrgi(request) , new PageRequest(super.getP(request), super.getPs(request)))) ; - } - map.put("dataDicList", dataDicRes.findByOrgi(super.getOrgi(request))) ; - return request(super.createRequestPageTempletResponse("/apps/business/report/pbreportlist")); - } - - @RequestMapping("/pbdelete") - @Menu(type = "setting" , subtype = "pbreport" , admin= true) - public ModelAndView pbdelete(ModelMap map , HttpServletRequest request , @Valid String id) { - PublishedReport report = publishedReportRes.findOne(id) ; - if(report!=null){ - publishedReportRes.delete(report); - } - return request(super.createRequestPageTempletResponse("redirect:/apps/report/pbreportindex.html?dicid="+report.getDicid())); - } - /** - * 报表 - * @param map - * @param request - * @param id - * @return - * @throws Exception - */ - @RequestMapping("/view") - @Menu(type = "report", subtype = "report") - public ModelAndView view(ModelMap map, HttpServletRequest request, @Valid String id) throws Exception { - if (!StringUtils.isBlank(id)) { - PublishedReport publishedReport = publishedReportRes.findById(id); - if(publishedReport!=null) { - map.addAttribute("publishedReport", publishedReport); - map.addAttribute("report", publishedReport.getReport()); - map.addAttribute("reportModels", publishedReport.getReport().getReportModels()); - List listFilters = publishedReport.getReport().getReportFilters(); - if(!listFilters.isEmpty()) { - Map filterMap = new HashMap(); - for(ReportFilter rf:listFilters) { - filterMap.put(rf.getId(), rf); - } - for(ReportFilter rf:listFilters) { - if(!StringUtils.isBlank(rf.getCascadeid())) { - rf.setChildFilter(filterMap.get(rf.getCascadeid())); - } - } - } - map.addAttribute("reportFilters", reportCubeService.fillReportFilterData(listFilters, request)); - } - } - return request(super.createRequestPageTempletResponse("/apps/business/report/view")); - } -} \ No newline at end of file diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/report/ReportDesignController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/report/ReportDesignController.java deleted file mode 100644 index d8b8a30a..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/report/ReportDesignController.java +++ /dev/null @@ -1,1271 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.controller.apps.report; - -import com.chatopera.cc.basic.Constants; -import com.chatopera.cc.basic.MainContext; -import com.chatopera.cc.basic.MainUtils; -import com.chatopera.cc.controller.Handler; -import com.chatopera.cc.model.*; -import com.chatopera.cc.persistence.repository.*; -import com.chatopera.cc.util.Menu; -import com.chatopera.cc.util.bi.ReportData; -import org.apache.commons.codec.binary.Base64; -import org.apache.commons.lang.exception.ExceptionUtils; -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.servlet.ModelAndView; - -import javax.servlet.http.HttpServletRequest; -import javax.validation.Valid; -import java.util.*; - -@Controller -@RequestMapping("/apps/report/design") -public class ReportDesignController extends Handler { - - @Value("${web.upload-path}") - private String path; - - @Value("${uk.im.server.port}") - private Integer port; - - @Autowired - private TemplateRepository templateRes; - - @Autowired - private ReportRepository reportRes; - - @Autowired - private ReportModelRepository reportModelRes; - - @Autowired - private PublishedCubeRepository publishedCubeRepository; - - @Autowired - private ColumnPropertiesRepository columnPropertiesRepository; - - - @Autowired - private ReportFilterRepository reportFilterRepository; - - @Autowired - private ReportCubeService reportCubeService; - - @Autowired - private TablePropertiesRepository tablePropertiesRes; - - @Autowired - private PublishedReportRepository publishedReportRes; - - @Autowired - private SysDicRepository sysDicRes; - @Autowired - private MetadataRepository metadataRes; - - @RequestMapping("/index") - @Menu(type = "report", subtype = "reportdesign") - public ModelAndView index(ModelMap map, HttpServletRequest request, @Valid String q, @Valid String id) throws Exception { - List tpDicList = Dict.getInstance().getDic(Constants.CSKEFU_SYSTEM_DIC); - for (SysDic sysDic : tpDicList) { - if (sysDic.getCode().equals("layout")) { - map.addAttribute("layoutList", - templateRes.findByTemplettypeAndOrgi(sysDic.getId(), super.getOrgi(request))); - } else if (sysDic.getCode().equals("report")) { - map.addAttribute("reportList", - templateRes.findByTemplettypeAndOrgi(sysDic.getId(), super.getOrgi(request))); - } else if (sysDic.getCode().equals("filter")) { - map.addAttribute("filterList", - templateRes.findByTemplettypeAndOrgi(sysDic.getId(), super.getOrgi(request))); - } - } - - if (!StringUtils.isBlank(id)) { - map.addAttribute("report", reportRes.findByIdAndOrgi(id, super.getOrgi(request))); - map.addAttribute("reportModels", reportModelRes.findByOrgiAndReportid(super.getOrgi(request), id)); - - List listFilters = reportFilterRepository.findByReportidAndFiltertypeAndOrgi(id, "report", super.getOrgi(request)); - if(!listFilters.isEmpty()) { - Map filterMap = new HashMap(); - for(ReportFilter rf:listFilters) { - filterMap.put(rf.getId(), rf); - } - for(ReportFilter rf:listFilters) { - if(!StringUtils.isBlank(rf.getCascadeid())) { - rf.setChildFilter(filterMap.get(rf.getCascadeid())); - } - } - } - map.addAttribute("reportFilters", reportCubeService.fillReportFilterData(listFilters, request)); - } - return request(super.createRequestPageTempletResponse("/apps/business/report/design/index")); - } - - /** - * 请求 报表的模板组件, 请求的时候,生成个报表组件,报表组件 需要存放在列的对应关系中 - * - * @param map - * @param request - * @param template - * @param id - * @return - * @throws Exception - */ - @RequestMapping("/rtpl") - @Menu(type = "report", subtype = "reportdesign") - public ModelAndView rtpl(ModelMap map, HttpServletRequest request, @Valid String tplname, @Valid String template, - @Valid String colindex, @Valid String id, @Valid String parentid, @Valid String mid) throws Exception { - Template tp = templateRes.findByIdAndOrgi(template, super.getOrgi(request)); - map.addAttribute("eltemplet", tp); - if (!StringUtils.isBlank(parentid)) { - ReportModel model = new ReportModel(); - model.setOrgi(super.getOrgi(request)); - model.setCreatetime(new Date()); - model.setReportid(id); - model.setParentid(parentid); - model.setName(tplname); - if (!StringUtils.isBlank(colindex) && colindex.matches("[\\d]{1,}")) { - model.setColindex(Integer.parseInt(colindex)); - } else { - model.setColindex(1); - } - ChartProperties chartProperties = new ChartProperties(); - chartProperties.setChartype(tp.getCharttype()); - Base64 base64 = new Base64(); - model.setChartcontent(base64.encodeToString(MainUtils.toBytes(chartProperties))) ; - model.setTempletid(template); - model.setMid(mid); - - reportModelRes.save(model); - map.addAttribute("element", model); - } - return request(super.createRequestPageTempletResponse("/apps/business/report/design/element")); - } - - /** - * 请求 报表的模板组件, 请求的时候,生成个报表组件,报表组件 需要存放在列的对应关系中 - * - * @param map - * @param request - * @param template - * @param id - * @return - */ - @RequestMapping("/element") - @Menu(type = "report", subtype = "reportdesign") - public ModelAndView element(ModelMap map, HttpServletRequest request, @Valid String colindex, @Valid String id, - @Valid String parentid, @Valid String mid) { - - if (!StringUtils.isBlank(id) && !StringUtils.isBlank(parentid)) { - ReportModel model = reportModelRes.findByIdAndOrgi(id, super.getOrgi(request)); - if (model != null) { - model.setParentid(parentid); - if (!StringUtils.isBlank(colindex) && colindex.matches("[\\d]{1,}")) { - model.setColindex(Integer.parseInt(colindex)); - } else { - model.setColindex(1); - } - reportModelRes.save(model); - } - } - return request(super.createRequestPageTempletResponse("/public/success")); - } - - /** - * 请求 布局的模板组件 , 请求的时候,生成一个布局记录,布局记录分两个部分,一个是行,一个是列 ,一次请求,创建一条行记录(ROW)和多个列记录(COL) - * 行记录和列记录都存放到 ES中 - * - * @param map - * @param request - * @param template - * @param id - * @return - */ - @RequestMapping("/ltpl") - @Menu(type = "report", subtype = "reportdesign") - public ModelAndView ltpl(ModelMap map, HttpServletRequest request, @Valid String template, @Valid String id, - @Valid String mid, @Valid String colspan) { - map.addAttribute("templet", templateRes.findByIdAndOrgi(template, super.getOrgi(request))); - ReportModel model = new ReportModel(); - model.setOrgi(super.getOrgi(request)); - model.setCreatetime(new Date()); - model.setReportid(id); - model.setParentid(id); - - if (!StringUtils.isBlank(colspan) && colspan.matches("[\\d]{1,}")) { - model.setColspan(Integer.parseInt(colspan)); - } else { - model.setColspan(4); - } - model.setTempletid(template); - model.setMid(mid); - - reportModelRes.save(model); - map.addAttribute("model", model); - - return request(super.createRequestPageTempletResponse("/apps/business/report/design/layout")); - } - /** - * 请求 过滤器的模板组件, 请求的时候,生成个过滤器组件 - * - * @param map - * @param request - * @param template - * @param id - * @return - */ - @RequestMapping("/ftpl") - @Menu(type = "report", subtype = "reportdesign") - public ModelAndView ftpl(ModelMap map, HttpServletRequest request, @Valid String tplname, @Valid String template, - @Valid String colindex, @Valid String id, @Valid String parentid, @Valid String mid) { - Template t = templateRes.findByIdAndOrgi(template, super.getOrgi(request)); - map.addAttribute("eltemplet",t); - if (!StringUtils.isBlank(parentid)) { - ReportFilter filter = new ReportFilter(); - filter.setCode(MainUtils.genID()); - filter.setReportid(id); - filter.setOrgi(super.getOrgi(request)); - filter.setCreatetime(new Date()); - filter.setName(t.getName()); - filter.setDataname(t.getName()); - filter.setTitle(t.getName()); - filter.setFiltertype("report"); - filter.setFuntype("filter"); - filter.setFiltertemplet(template); - filter.setModelid(mid); - filter.setModeltype(t.getCode()); - - filter.setConvalue(MainContext.FilterConValueType.INPUT.toString()); - filter.setValuefiltertype(MainContext.FilterValuefilterType.COMPARE.toString()); - filter.setComparetype(MainContext.FilterCompType.EQUAL.toString()); - filter.setFormatstr("yyyy-MM-dd"); - reportFilterRepository.save(filter); - map.addAttribute("filter", filter); - } - return request(super.createRequestPageTempletResponse("/apps/business/report/design/filter")); - } - /** - * 删除模板组件 - * - * @param map - * @param request - * @param id - * @return - */ - @RequestMapping("/modeldelete") - @Menu(type = "report", subtype = "reportdesign") - public ModelAndView modeldelete(ModelMap map, HttpServletRequest request, @Valid String id) { - ReportModel model = reportModelRes.findByIdAndOrgi(id, super.getOrgi(request)); - if (model != null) { - List childsList = reportModelRes.findByParentidAndOrgi(model.getId(), super.getOrgi(request)); - if (!childsList.isEmpty()) { - reportModelRes.delete(childsList); - } - reportModelRes.delete(model); - } - return request(super.createRequestPageTempletResponse("/public/success")); - } - - /** - * 组件设计 - * - * @param map - * @param request - * @param id - * @return - * @throws Exception - */ - @RequestMapping("/modeldesign") - @Menu(type = "report", subtype = "reportdesign") - public ModelAndView modeldesign(ModelMap map, HttpServletRequest request, @Valid String id, @Valid String tabid , HashMap semap) - throws Exception { - List tpDicList = Dict.getInstance().getDic(Constants.CSKEFU_SYSTEM_DIC); - for (SysDic sysDic : tpDicList) { - if (sysDic.getCode().equals("report")) { - map.addAttribute("reportList", - templateRes.findByTemplettypeAndOrgi(sysDic.getId(), super.getOrgi(request))); - } - } - - ReportModel model = this.getModel(id, super.getOrgi(request)); - map.addAttribute("reportModel", model); - map.addAttribute("element", model); - if (model != null && !StringUtils.isBlank(model.getPublishedcubeid())) { - PublishedCube cube = publishedCubeRepository.findOne(model.getPublishedcubeid()); - map.addAttribute("cube", cube); - if (canGetReportData(model, cube.getCube())) { - ReportData reportData = null ; - try { - reportData = reportCubeService.getReportData(model, cube.getCube(), request, true,semap) ; - map.addAttribute("reportData",reportData); - }catch(Exception ex) { - map.addAttribute("msg",(ExceptionUtils.getMessage(ex).replaceAll("\r\n","") + ExceptionUtils.getRootCauseMessage(ex)).replaceAll("\"", "'")); - } - } - map.addAttribute("eltemplet", templateRes.findByIdAndOrgi(model.getTempletid(), super.getOrgi(request))); - } - map.addAttribute("tabid", tabid); - return request(super.createRequestPageTempletResponse("/apps/business/report/design/modeldesign")); - } - private boolean canGetReportData(ReportModel model,Cube cube) { - return !model.getProperties().isEmpty() || !model.getColproperties().isEmpty() || !model.getMeasures().isEmpty(); - } - private ReportModel getModel(String id,String orgi) { - ReportModel model = reportModelRes.findByIdAndOrgi(id, orgi); - if (model != null) { - model.setProperties( - columnPropertiesRepository.findByModelidAndCurOrderBySortindexAsc(model.getId(), "field")); - model.setColproperties( - columnPropertiesRepository.findByModelidAndCurOrderBySortindexAsc(model.getId(), "cfield")); - model.setMeasures( - columnPropertiesRepository.findByModelidAndCurOrderBySortindexAsc(model.getId(), "measure")); - List listFilters = reportFilterRepository.findByModelidOrderBySortindexAsc(model.getId()); - if(!listFilters.isEmpty()) { - for(ReportFilter rf:listFilters) { - if(!StringUtils.isBlank(rf.getCascadeid())) { - rf.setChildFilter(reportFilterRepository.findByIdAndOrgi(rf.getCascadeid(), orgi)); - } - } - } - model.setFilters(listFilters); - } - return model; - } - - /** - * 选择模型 - * - * @param request - * @return - * @throws Exception - */ - @RequestMapping("/dataset") - @Menu(type = "report", subtype = "reportdesign") - public ModelAndView dataset(ModelMap map, HttpServletRequest request, @Valid String mid, @Valid String cubeid) - throws Exception { - if (!StringUtils.isBlank(cubeid)) { - PublishedCube cube = publishedCubeRepository.findOne(cubeid); - map.put("cube", cube); - } - ReportModel model = this.getModel(mid, super.getOrgi(request)); - if (!StringUtils.isBlank(cubeid)) { - model.setPublishedcubeid(cubeid); - if(model!=null) { - columnPropertiesRepository.delete(model.getProperties()); - columnPropertiesRepository.delete(model.getColproperties()); - columnPropertiesRepository.delete(model.getMeasures()); - reportFilterRepository.delete(model.getFilters()); - } - } - reportModelRes.save(model); - map.put("reportModel", model); - return request(super.createRequestPageTempletResponse( - "redirect:/apps/report/design/modeldesign.html?id=" + model.getId())); - } - - @RequestMapping("/adddata") - @Menu(type = "report", subtype = "reportdesign") - public ModelAndView dimensionadd(ModelMap map, HttpServletRequest request, @Valid String cubeid, @Valid String t,@Valid String dtype, - @Valid String mid, @Valid String dim, @Valid String tabid) { - ModelAndView view = request( - super.createRequestPageTempletResponse("/apps/business/report/design/modeldesign/add")); - if (!StringUtils.isBlank(cubeid)) { - PublishedCube cube = publishedCubeRepository.findOne(cubeid); - map.addAttribute("cube", cube); - } - map.addAttribute("t", t); - ReportModel model = reportModelRes.findByIdAndOrgi(mid, super.getOrgi(request)); - if (!StringUtils.isBlank(cubeid)) { - model.setPublishedcubeid(cubeid); - } - map.addAttribute("reportModel", model); - map.addAttribute("dim", dim); - map.addAttribute("tabid", tabid); - map.addAttribute("dtype", dtype); - return view; - } - /** - * 添加过滤器 - * @param map - * @param request - * @return - */ - @RequestMapping("/filteradd") - @Menu(type = "report", subtype = "reportdesign") - public ModelAndView filteradd(ModelMap map, HttpServletRequest request, @Valid String cubeid,@Valid String dtype, - @Valid String mid) { - ModelAndView view = request( - super.createRequestPageTempletResponse("/apps/business/report/design/modeldesign/filteradd")); - if (!StringUtils.isBlank(cubeid)) { - PublishedCube cube = publishedCubeRepository.findOne(cubeid); - map.addAttribute("cube", cube); - List metadataTable = new ArrayList<>(); - for(CubeMetadata cm:cube.getCube().getMetadata()) { - if("0".equals(cm.getMtype())) { - map.addAttribute("table",cm.getTb()); - map.addAttribute("fieldList",cm.getTb().getTableproperty()); - } - metadataTable.add(cm.getTb()); - } - map.addAttribute("fktableList",metadataTable); - } - map.addAttribute("sysdicList", sysDicRes.findByParentid("0")) ; - map.addAttribute("mid", mid); - map.addAttribute("dtype", dtype); - return view; - } - /** - * 保存过滤器 - * - * @param map - * @param request - * @return - */ - @RequestMapping("/filtersave") - @Menu(type = "report", subtype = "reportdesign") - public ModelAndView filterupfiltersavedate(ModelMap map, HttpServletRequest request, @Valid ReportFilter f,@Valid String tbppy) { - String modelId = ""; - if (f != null) { - if(StringUtils.isBlank(f.getCode())) { - f.setCode(MainUtils.genID()); - } - f.setOrgi(super.getOrgi(request)); - f.setCreatetime(new Date()); - f.setName(f.getTitle()); - f.setDataname(f.getTitle()); - if(MainContext.FilterConValueType.AUTO.toString().equals(f.getConvalue()) && MainContext.FilterModelType.SIGSEL.toString().equals(f.getModeltype())) { - f.setCascadeid(f.getCascadeid()); - f.setTableproperty(null); - if(!StringUtils.isBlank(tbppy)) { - TableProperties t = new TableProperties(); - t.setId(tbppy); - f.setTableproperty(t); - } - }else { - f.setCascadeid(null); - f.setTableproperty(null); - } - modelId = f.getModelid(); - reportFilterRepository.save(f); - } - return request(super.createRequestPageTempletResponse( - "redirect:/apps/report/design/modeldesign.html?id=" + modelId + "&tabid=filter")); - } - @RequestMapping("/gettableid") - @Menu(type = "report" , subtype = "reportdesign") - public ModelAndView gettableid(ModelMap map , HttpServletRequest request , @Valid String tableid) { - if(!StringUtils.isBlank(tableid)){ - map.put("fktableidList", tablePropertiesRes.findByDbtableid(tableid)); - } - return request(super.createRequestPageTempletResponse("/apps/business/report/design/modeldesign/fktableid")); - } - @RequestMapping("/values") - @Menu(type = "report", subtype = "reportdesign") - public ModelAndView values(ModelMap map, HttpServletRequest request, @Valid String mid, @Valid String dsid, - @Valid String t, @Valid String d,@Valid String dtype, @Valid String m, @Valid String f, @Valid String tabid) throws Exception { - ReportModel model = this.getModel(mid, super.getOrgi(request)); - if (!StringUtils.isBlank(dsid)) { - model.setPublishedcubeid(dsid); - } - PublishedCube cube = publishedCubeRepository.findOne(dsid); - - if (!StringUtils.isBlank(d)) { - boolean inlist = false; - ColumnProperties currCp = null; - if (cube != null && cube.getCube() != null && cube.getCube().getDimension().size() > 0) { - for (ColumnProperties level : model.getProperties()) { - if (level.getDataid().equals(d)) { - inlist = true; - currCp = level; - break; - } - } - for (ColumnProperties level : model.getColproperties()) { - if (level.getDataid().equals(d)) { - inlist = true; - currCp = level; - break; - } - } - if (!inlist) { - ColumnProperties col = new ColumnProperties(); - if(StringUtils.isBlank(dtype)) { - col.setCur("field"); // 数据结构字段 - }else{ - col.setCur(dtype); - } - col.setId(MainUtils.genID()); - CubeLevel cubeLevel = null; - for (Dimension dim : cube.getCube().getDimension()) { - for (CubeLevel level : dim.getCubeLevel()) { - if (level.getId().equals(d)) { - cubeLevel = level; - break; - } - } - } - if (cubeLevel != null) { - col.setDataid(d); - col.setDataname(cubeLevel.getName()); - col.setColname(cubeLevel.getColumname()); - col.setTitle(cubeLevel.getName()); - } - col.setSortindex(("cfield".equals(dtype))?model.getColproperties().size()+1:model.getProperties().size() + 1); - col.setOrgi(super.getOrgi(request)); - col.setModelid(model.getId()); - columnPropertiesRepository.save(col); - }else { - if(!StringUtils.isBlank(dtype)) { - currCp.setCur(dtype); - currCp.setSortindex(("cfield".equals(dtype))?model.getColproperties().size()+1:model.getProperties().size() + 1); - columnPropertiesRepository.save(currCp); - } - } - } - } - if (!StringUtils.isBlank(m)) { - boolean inlist = false; - if (cube != null && cube.getCube() != null && cube.getCube().getMeasure().size() > 0) { - for (ColumnProperties measure : model.getMeasures()) { - if (measure.getDataid().equals(m)) { - inlist = true; - break; - } - } - if (!inlist) { - ColumnProperties col = new ColumnProperties(); - col.setCur("measure"); // 数据结构字段 - col.setId(MainUtils.genID()); - CubeMeasure cubeMeasure = null; - for (CubeMeasure measure : cube.getCube().getMeasure()) { - if (measure.getId().equals(m)) { - cubeMeasure = measure; - break; - } - } - if (cubeMeasure != null) { - col.setDataid(m); - col.setDataname(cubeMeasure.getName()); - col.setColname(cubeMeasure.getColumname()); - col.setTitle(cubeMeasure.getName()); - } - col.setSortindex(model.getMeasures().size() + 1); - col.setOrgi(super.getOrgi(request)); - col.setModelid(model.getId()); - model.getMeasures().add(col); - columnPropertiesRepository.save(col); - } - } - } - if (!StringUtils.isBlank(f)) { - boolean inlist = false; - if (cube != null && cube.getCube() != null && cube.getCube().getDimension().size() > 0) { - for (ReportFilter filter : model.getFilters()) { - if (filter.getDataid().equals(f)) { - inlist = true; - break; - } - } - if (!inlist) { - ReportFilter filter = new ReportFilter(); - filter.setId(MainUtils.genID()); - CubeLevel cubeLevel = null; - if (cube != null && cube.getCube() != null && cube.getCube().getDimension().size() > 0) { - for (Dimension dim : cube.getCube().getDimension()) { - for (CubeLevel level : dim.getCubeLevel()) { - if (level.getId().equals(f)) { - cubeLevel = level; - break; - } - } - } - if (cubeLevel != null) { - filter.setCubeid(cube.getId()); - filter.setDataid(cubeLevel.getId()); - filter.setDimid(cubeLevel.getDimid()); - filter.setLevel(cubeLevel); - filter.setDataname(cubeLevel.getName()); - filter.setTitle(cubeLevel.getName()); - filter.setModelid(mid); - - filter.setModeltype(MainContext.FilterModelType.TEXT.toString()); - filter.setConvalue(MainContext.FilterConValueType.INPUT.toString()); - filter.setValuefiltertype(MainContext.FilterValuefilterType.COMPARE.toString()); - filter.setComparetype(MainContext.FilterCompType.EQUAL.toString()); - - if ("select".equalsIgnoreCase(filter.getModeltype())) { - filter.setConvalue(MainContext.FilterConValueType.AUTO.toString()); - } - } - filter.setReportid(model.getReportid()); - filter.setSortindex(model.getFilters().size() + 1); - filter.setOrgi(super.getOrgi(request)); - model.getFilters().add(filter); - reportFilterRepository.save(filter); - } - } - } - } - return request(super.createRequestPageTempletResponse( - "redirect:/apps/report/design/modeldesign.html?id=" + model.getId() + "&tabid=" + tabid)); - } - - /** - * 异步 请求 报表的模板组件 - * - * @param map - * @param request - * @param template - * @param id - * @return - * @throws Exception - */ - @RequestMapping("/getelement") - @Menu(type = "report", subtype = "reportdesign") - public ModelAndView getelement(ModelMap map, HttpServletRequest request, @Valid String id,@Valid String publishedid, HashMap semap) throws Exception { - if (!StringUtils.isBlank(id)) { - ReportModel model = this.getModel(id, super.getOrgi(request),publishedid); - if(model!=null) { - map.addAttribute("eltemplet", MainUtils.getTemplate(model.getTempletid())); - } - map.addAttribute("element", model); - map.addAttribute("reportModel", model); - - if (model != null && !StringUtils.isBlank(model.getPublishedcubeid())) { - List cubeList = publishedCubeRepository.findByIdAndOrgi(model.getPublishedcubeid() , super.getOrgi(request)); - if(cubeList.size() > 0) { - PublishedCube cube = cubeList.get(0) ; - map.addAttribute("cube", cube); - if (canGetReportData(model, cube.getCube())) { - ReportData reportData = null ; - try { - reportData = reportCubeService.getReportData(model, cube.getCube(), request, true, semap) ; - map.addAttribute("reportData",reportData); - }catch(Exception ex) { - map.addAttribute("msg",ex.getMessage()); - } - } - } - } - } - return request(super.createRequestPageTempletResponse("/apps/business/report/design/elementajax")); - } - private ReportModel getModel(String id,String orgi,String publishedid) { - if(!StringUtils.isBlank(publishedid)) { - PublishedReport publishedReport = publishedReportRes.findById(publishedid); - if(publishedReport!=null) { - if(publishedReport.getReport()!=null && !publishedReport.getReport().getReportModels().isEmpty()) { - for(ReportModel rm :publishedReport.getReport().getReportModels()) { - if(rm.getId().equals(id)) { - return rm; - } - } - } - return this.getModel(id, orgi); - }else{ - return this.getModel(id, orgi); - } - }else { - return this.getModel(id, orgi); - } - - } - - /** - * 编辑报表过滤器 - * - * @param map - * @param request - * @return - * @throws Exception - */ - @RequestMapping("/rfilteredit") - @Menu(type = "report", subtype = "reportdesign") - public ModelAndView rfilteredit(ModelMap map, HttpServletRequest request, @Valid String fid) throws Exception { - map.addAttribute("sysdicList", sysDicRes.findByParentid("0")) ; - if (!StringUtils.isBlank(fid)) { - ReportFilter rf = reportFilterRepository.findByIdAndOrgi(fid, super.getOrgi(request)); - if(rf!=null) { - map.addAttribute("fktableList", metadataRes.findByOrgi(super.getOrgi(request))); - map.put("fktableidList", tablePropertiesRes.findByDbtableid(rf.getFktableid())); - if(!StringUtils.isBlank(rf.getCascadeid())) { - ReportFilter rfcas = reportFilterRepository.findByIdAndOrgi(rf.getCascadeid(), super.getOrgi(request)); - if(rfcas!=null) { - map.put("fktableiddivList", tablePropertiesRes.findByDbtableid(rfcas.getFktableid())); - } - } - } - map.addAttribute("reportFilter", rf); - map.addAttribute("reportFilters", reportCubeService.fillReportFilterData(reportFilterRepository.findByReportidAndFiltertypeAndOrgi(rf.getReportid(), "report", super.getOrgi(request)),request)); - } - return request(super.createRequestPageTempletResponse("/apps/business/report/design/filteredit")); - } - /** - * 编辑过滤器 - * - * @param map - * @param request - * @return - */ - @RequestMapping("/rfilterupdate") - @Menu(type = "report", subtype = "reportdesign") - public ModelAndView rfilterupdate(ModelMap map, HttpServletRequest request, @Valid ReportFilter f,@Valid String tbppy) { - String reportId = ""; - if (!StringUtils.isBlank(f.getId())) { - ReportFilter rf = reportFilterRepository.findByIdAndOrgi(f.getId(), super.getOrgi(request)); - if (rf != null) { - reportId = rf.getReportid(); - rf.setTitle(f.getTitle()); - rf.setCode(f.getCode()); - rf.setModeltype(f.getModeltype()); - rf.setConvalue(f.getConvalue()); - rf.setValuefiltertype(f.getValuefiltertype()); - rf.setComparetype(f.getComparetype()); - rf.setDefaultvalue(f.getDefaultvalue()); - rf.setStartvalue(f.getStartvalue()); - rf.setEndvalue(f.getEndvalue()); - rf.setFormatstr(f.getFormatstr()); - rf.setMustvalue(f.getMustvalue()); - - rf.setTableid(f.getTableid()); - rf.setFieldid(f.getFieldid()); - rf.setFktableid(f.getFktableid()); - rf.setFkfieldid(f.getFkfieldid()); - rf.setFilterfieldid(f.getFilterfieldid()); - - if(MainContext.FilterConValueType.AUTO.toString().equals(f.getConvalue()) && MainContext.FilterModelType.SIGSEL.toString().equals(f.getModeltype())) { - rf.setCascadeid(f.getCascadeid()); - rf.setTableproperty(null); - rf.setIsdic(f.isIsdic()); - rf.setDiccode(f.getDiccode()); - rf.setKeyfield(f.getKeyfield()); - rf.setValuefield(f.getValuefield()); - if(!StringUtils.isBlank(tbppy)) { - TableProperties t = new TableProperties(); - t.setId(tbppy); - rf.setTableproperty(t); - } - }else { - rf.setCascadeid(null); - rf.setTableproperty(null); - rf.setIsdic(false); - rf.setDiccode(""); - rf.setKeyfield(""); - rf.setValuefield(""); - } - reportFilterRepository.save(rf); - } - } - return request(super.createRequestPageTempletResponse( - "redirect:/apps/report/design/index.html?id=" + reportId)); - } - /** - * 编辑模型过滤器 - * - * @param map - * @param request - * @return - */ - @RequestMapping("/filteredit") - @Menu(type = "report", subtype = "reportdesign") - public ModelAndView filteredit(ModelMap map, HttpServletRequest request, @Valid String fid) { - map.addAttribute("sysdicList", sysDicRes.findByParentid("0")) ; - if (!StringUtils.isBlank(fid)) { - ReportFilter rf = reportFilterRepository.findByIdAndOrgi(fid, super.getOrgi(request)); - if(rf!=null) { - if (!StringUtils.isBlank(rf.getCubeid())) { - PublishedCube cube = publishedCubeRepository.findOne(rf.getCubeid()); - map.addAttribute("cube", cube); - List metadataTable = new ArrayList<>(); - for(CubeMetadata cm:cube.getCube().getMetadata()) { - if("0".equals(cm.getMtype())) { - map.addAttribute("table",cm.getTb()); - map.addAttribute("fieldList",cm.getTb().getTableproperty()); - } - metadataTable.add(cm.getTb()); - } - if(!StringUtils.isBlank(rf.getCascadeid())) { - ReportFilter rfcas = reportFilterRepository.findByIdAndOrgi(rf.getCascadeid(), super.getOrgi(request)); - if(rfcas!=null) { - map.put("fktableiddivList", tablePropertiesRes.findByDbtableid(rfcas.getFktableid())); - } - } - map.addAttribute("fktableList",metadataTable); - map.put("fktableidList", tablePropertiesRes.findByDbtableid(rf.getFktableid())); - } - ReportModel model = this.getModel(rf.getModelid(), super.getOrgi(request)); - map.addAttribute("reportModel", model); - } - map.addAttribute("reportFilter", rf); - } - return request(super.createRequestPageTempletResponse("/apps/business/report/design/modeldesign/filteredit")); - } - /** - * 编辑过滤器 - * - * @param map - * @param request - * @return - */ - @RequestMapping("/filterupdate") - @Menu(type = "report", subtype = "reportdesign") - public ModelAndView filterupdate(ModelMap map, HttpServletRequest request, @Valid ReportFilter f,@Valid String tbppy) { - String modelId = ""; - if (!StringUtils.isBlank(f.getId())) { - ReportFilter rf = reportFilterRepository.findByIdAndOrgi(f.getId(), super.getOrgi(request)); - if (rf != null) { - modelId = rf.getModelid(); - rf.setTitle(f.getTitle()); - rf.setCode(f.getCode()); - rf.setModeltype(f.getModeltype()); - rf.setConvalue(f.getConvalue()); - rf.setValuefiltertype(f.getValuefiltertype()); - rf.setComparetype(f.getComparetype()); - rf.setDefaultvalue(f.getDefaultvalue()); - rf.setStartvalue(f.getStartvalue()); - rf.setEndvalue(f.getEndvalue()); - rf.setFormatstr(f.getFormatstr()); - rf.setMustvalue(f.getMustvalue()); - - rf.setTableid(f.getTableid()); - rf.setFieldid(f.getFieldid()); - rf.setFktableid(f.getFktableid()); - rf.setFkfieldid(f.getFkfieldid()); - rf.setFilterfieldid(f.getFilterfieldid()); - - if(MainContext.FilterConValueType.AUTO.toString().equals(f.getConvalue()) && MainContext.FilterModelType.SIGSEL.toString().equals(f.getModeltype())) { - rf.setCascadeid(f.getCascadeid()); - rf.setTableproperty(null); - rf.setIsdic(f.isIsdic()); - rf.setDiccode(f.getDiccode()); - rf.setKeyfield(f.getKeyfield()); - rf.setValuefield(f.getValuefield()); - if(!StringUtils.isBlank(tbppy)) { - TableProperties t = new TableProperties(); - t.setId(tbppy); - rf.setTableproperty(t); - } - }else { - rf.setCascadeid(null); - rf.setTableproperty(null); - rf.setIsdic(false); - rf.setDiccode(""); - rf.setKeyfield(""); - rf.setValuefield(""); - } - reportFilterRepository.save(rf); - } - } - return request(super.createRequestPageTempletResponse( - "redirect:/apps/report/design/modeldesign.html?id=" + modelId + "&tabid=filter")); - } - @RequestMapping("/fktableid") - @Menu(type = "report" , subtype = "reportdesign" , admin= true) - public ModelAndView fktableid(ModelMap map , HttpServletRequest request , @Valid String fid,@Valid String fkId) { - if (!StringUtils.isBlank(fid)) { - ReportFilter rf = reportFilterRepository.findByIdAndOrgi(fid, super.getOrgi(request)); - if(rf!=null) { - if(!StringUtils.isBlank(fkId)) { - ReportFilter rfcas = reportFilterRepository.findByIdAndOrgi(fkId, super.getOrgi(request)); - if(rfcas!=null) { - map.put("fktableiddivList", tablePropertiesRes.findByDbtableid(rfcas.getFktableid())); - } - } - } - map.addAttribute("reportFilter", rf); - } - return request(super.createRequestPageTempletResponse("/apps/business/report/design/modeldesign/fktableiddiv")); - } - /** - * 编辑过滤器 - * - * @param map - * @param request - * @return - */ - @RequestMapping("/filterdel") - @Menu(type = "report", subtype = "reportdesign") - public ModelAndView filterdel(ModelMap map, HttpServletRequest request, @Valid String id) { - String modelId = ""; - if (!StringUtils.isBlank(id)) { - ReportFilter rf = reportFilterRepository.findByIdAndOrgi(id, super.getOrgi(request)); - if (rf != null) { - modelId = rf.getModelid(); - reportFilterRepository.delete(rf); - } - } - return request(super.createRequestPageTempletResponse( - "redirect:/apps/report/design/modeldesign.html?id=" + modelId + "&tabid=filter")); - } - /** - * 编辑过滤器 - * - * @param map - * @param request - * @return - */ - @RequestMapping("/rfilterdel") - @Menu(type = "report", subtype = "reportdesign") - public ModelAndView rfilterdel(ModelMap map, HttpServletRequest request, @Valid String id) { - String reportId = ""; - if (!StringUtils.isBlank(id)) { - ReportFilter rf = reportFilterRepository.findByIdAndOrgi(id, super.getOrgi(request)); - if (rf != null) { - reportId = rf.getReportid(); - reportFilterRepository.delete(rf); - } - } - return request(super.createRequestPageTempletResponse( - "redirect:/apps/report/design/index.html?id=" + reportId)); - } - /** - * 排序 - * - * @param map - * @param request - * @return - */ - @RequestMapping("/sort") - @Menu(type = "report", subtype = "reportdesign") - public ModelAndView sort(ModelMap map, HttpServletRequest request,@Valid String modelId,@Valid String type, @Valid String[] sort, @Valid String[] colsort, @Valid String[] rowsort) { - String tabid = "data"; - if (!StringUtils.isBlank(type)) { - if("dim".equals(type) || "measure".equals(type)) { - if(sort!=null && sort.length > 0 ) { - int index = 1; - for(String id:sort) { - ColumnProperties col = columnPropertiesRepository.findByIdAndOrgi(id,super.getOrgi(request)); - if(col!=null) { - col.setSortindex(index); - columnPropertiesRepository.save(col); - index++; - } - } - } - if(colsort!=null && colsort.length > 0 ) { - int index = 1; - for(String id:colsort) { - ColumnProperties col = columnPropertiesRepository.findByIdAndOrgi(id,super.getOrgi(request)); - if(col!=null) { - col.setSortindex(index); - col.setCur("cfield"); - columnPropertiesRepository.save(col); - index++; - } - } - } - if(rowsort!=null && rowsort.length > 0 ) { - int index = 1; - for(String id:rowsort) { - ColumnProperties col = columnPropertiesRepository.findByIdAndOrgi(id,super.getOrgi(request)); - if(col!=null) { - col.setSortindex(index); - col.setCur("field"); - columnPropertiesRepository.save(col); - index++; - } - } - } - }else { - tabid = "filter"; - if(sort!=null && sort.length > 0 ) { - int index = 1; - for(String id:sort) { - ReportFilter rf = reportFilterRepository.findByIdAndOrgi(id,super.getOrgi(request)); - if(rf!=null) { - rf.setSortindex(index); - reportFilterRepository.save(rf); - index++; - } - } - } - } - } - return request(super.createRequestPageTempletResponse( - "redirect:/apps/report/design/modeldesign.html?id=" + modelId + "&tabid="+tabid)); - } - - /** - * 移除维度或指标 - * - * @param map - * @param request - * @return - */ - @RequestMapping("/columndel") - @Menu(type = "report", subtype = "reportdesign") - public ModelAndView columndel(ModelMap map, HttpServletRequest request, @Valid String id) { - String modelId = ""; - if (!StringUtils.isBlank(id)) { - ColumnProperties col = columnPropertiesRepository.findByIdAndOrgi(id, super.getOrgi(request)); - if (col != null) { - modelId = col.getModelid(); - columnPropertiesRepository.delete(col); - } - } - return request(super.createRequestPageTempletResponse( - "redirect:/apps/report/design/modeldesign.html?id=" + modelId + "&tabid=data")); - } - - /** - * 修改指标 - * - * @param map - * @param request - * @return - */ - @RequestMapping("/columnedit") - @Menu(type = "report", subtype = "reportdesign") - public ModelAndView columnedit(ModelMap map, HttpServletRequest request, @Valid String id) { - if (!StringUtils.isBlank(id)) { - ColumnProperties col = columnPropertiesRepository.findByIdAndOrgi(id, super.getOrgi(request)); - if (col != null) { - map.put("col", col) ; - } - } - return request(super.createRequestPageTempletResponse("/apps/business/report/design/modeldesign/measureedit")); - } - - /** - * 保存指标 - * - * @param map - * @param request - * @return - */ - @RequestMapping("/columnupdate") - @Menu(type = "report", subtype = "reportdesign") - public ModelAndView columnupdte(ModelMap map, HttpServletRequest request, @Valid String id,@Valid String title, @Valid String mid) { - if (!StringUtils.isBlank(id) && !StringUtils.isBlank(title)) { - ColumnProperties col = columnPropertiesRepository.findByIdAndOrgi(id, super.getOrgi(request)); - if (col != null) { - col.setTitle(title); - columnPropertiesRepository.save(col) ; - } - } - return request(super.createRequestPageTempletResponse( - "redirect:/apps/report/design/modeldesign.html?id=" + mid + "&tabid=data")); - } - - @RequestMapping("/changetpl") - @Menu(type = "report", subtype = "reportdesign") - public ModelAndView changetpl(ModelMap map, HttpServletRequest request, @Valid String mid, @Valid String tplid) throws Exception { - ReportModel model = this.getModel(mid, super.getOrgi(request)); - if (!StringUtils.isBlank(tplid)) { - model.setTempletid(tplid); - Template tp = templateRes.findByIdAndOrgi(tplid, super.getOrgi(request)); - ChartProperties oldChartppy = model.getChartProperties(); - oldChartppy.setChartype(tp.getCharttype()); - Base64 base64 = new Base64(); - model.setChartcontent(base64.encodeToString(MainUtils.toBytes(oldChartppy))) ; - reportModelRes.save(model); - } - return request(super.createRequestPageTempletResponse( - "redirect:/apps/report/design/modeldesign.html?id=" + model.getId() + "&tabid=data")); - } - - @RequestMapping("/changechartppy") - @Menu(type = "report", subtype = "reportdesign") - public ModelAndView changechartppy(ModelMap map,HttpServletRequest request, @Valid ReportModel reportModel, @Valid ChartProperties chartProperties, HashMap semap) throws Exception { - ReportModel model = this.getModel(reportModel.getId(), super.getOrgi(request)); - if (null!=model) { - model.setExchangerw(reportModel.isExchangerw()); - model.setIsloadfulldata("true".equals(reportModel.getIsloadfulldata())?"true":"false"); - model.setPagesize(reportModel.getPagesize()); - ChartProperties oldChartppy = model.getChartProperties(); - oldChartppy = oldChartppy==null? new ChartProperties():oldChartppy; - oldChartppy.setLegen(chartProperties.isLegen()); - oldChartppy.setLegenalign(chartProperties.getLegenalign()); - oldChartppy.setDataview(chartProperties.isDataview()); - oldChartppy.setFormat(StringUtils.isBlank(chartProperties.getFormat())?"val":chartProperties.getFormat()); - Base64 base64 = new Base64(); - model.setChartcontent(base64.encodeToString(MainUtils.toBytes(oldChartppy))) ; - reportModelRes.save(model); - } - map.addAttribute("eltemplet", templateRes.findByIdAndOrgi(model.getTempletid(), super.getOrgi(request))); - map.addAttribute("element", model); - map.addAttribute("reportModel", model); - if (model != null && !StringUtils.isBlank(model.getPublishedcubeid())) { - PublishedCube cube = publishedCubeRepository.findOne(model.getPublishedcubeid()); - map.addAttribute("cube", cube); - if (!model.getMeasures().isEmpty()) { - map.addAttribute("reportData",reportCubeService.getReportData(model, cube.getCube(), request, true, semap)); - } - } - return request(super.createRequestPageTempletResponse("/apps/business/report/design/elementajax")); - } - - /** - * 组件设计 - * - * @param map - * @param request - * @param id - * @return - * @throws Exception - */ - @RequestMapping("/filtervalchange") - @Menu(type = "report", subtype = "reportdesign") - public ModelAndView filtervalchange(ModelMap map, HttpServletRequest request, @Valid String id, @Valid String fid,@Valid String publishedid) - throws Exception { - if(StringUtils.isBlank(publishedid)) { - ReportFilter filter = reportFilterRepository.findByIdAndOrgi(fid, super.getOrgi(request)); - if(filter!=null) { - if("report".equals(filter.getFiltertype())) { - ReportModel model = new ReportModel(); - List reportFilterList = reportFilterRepository.findByReportidAndFiltertypeAndOrgi(filter.getReportid(), "report", super.getOrgi(request)); - model.setFilters(reportFilterList); - map.addAttribute("filter", reportCubeService.processFilter(model, filter,null, request)); - }else { - ReportModel model = this.getModel(id, super.getOrgi(request)); - if (model!=null && !StringUtils.isBlank(fid) && !StringUtils.isBlank(model.getPublishedcubeid())) { - PublishedCube cube = publishedCubeRepository.findOne(model.getPublishedcubeid()); - map.addAttribute("filter", reportCubeService.processFilter(model, filter, cube.getCube(), request)); - } - } - } - }else { - PublishedReport publishedReport = publishedReportRes.findById(publishedid); - if(publishedReport!=null) { - map.addAttribute("publishedReport", publishedReport); - ReportFilter filter = null; - for(ReportFilter f : publishedReport.getReport().getReportFilters()) { - if(!StringUtils.isBlank(fid) && f.getId().equals(fid)) { - filter = f; - break; - } - } - ReportModel model = null; - for(ReportModel rm:publishedReport.getReport().getReportModels()) { - if(id.equals(rm.getId())) { - model = rm; - } - for(ReportFilter f:rm.getFilters()) { - if(!StringUtils.isBlank(fid) && f.getId().equals(fid)) { - filter = f; - break; - } - } - } - if(filter!=null) { - if("report".equals(filter.getFiltertype())) { - ReportModel modelr = new ReportModel(); - List reportFilterList = publishedReport.getReport().getReportFilters(); - modelr.setFilters(reportFilterList); - map.addAttribute("filter", reportCubeService.processFilter(modelr, filter,null, request)); - }else { - if (model!=null && !StringUtils.isBlank(fid) && !StringUtils.isBlank(model.getPublishedcubeid())) { - PublishedCube cube = publishedCubeRepository.findOne(model.getPublishedcubeid()); - map.addAttribute("filter", reportCubeService.processFilter(model, filter, cube.getCube(), request)); - } - } - } - } - } - - return request(super.createRequestPageTempletResponse("/apps/business/report/design/modeldesign/filter")); - } - @RequestMapping("/editmodelname") - @Menu(type = "report", subtype = "reportdesign") - public ModelAndView editmodelname(ModelMap map,HttpServletRequest request, @Valid String id, @Valid String name) { - map.addAttribute("id", id); - map.addAttribute("name", name); - return request(super.createRequestPageTempletResponse( - "/apps/business/report/design/modeldesign/editmodelname")); - } - @RequestMapping("/updatemodelname") - @Menu(type = "report", subtype = "reportdesign") - public ModelAndView updatemodelname(ModelMap map,HttpServletRequest request,@Valid String name, @Valid String id) { - ReportModel model = this.getModel(id, super.getOrgi(request)); - if(!StringUtils.isBlank(name)) { - model.setName(name); - reportModelRes.save(model); - } - return request(super.createRequestPageTempletResponse( - "redirect:/apps/report/design/modeldesign.html?id=" + model.getId() + "&tabid=data")); - } - /** - * 报表发布页面加载 - * @param request - * @param cubeid - * @return - * @throws Exception - */ - @RequestMapping("/reportpublish") - @Menu(type = "report" , subtype = "reportdesign" ) - public ModelAndView reportpublish(ModelMap map ,HttpServletRequest request , @Valid String reportid) throws Exception{ - map.put("reportid", reportid); - return request(super.createRequestPageTempletResponse("/apps/business/report/reportpublish")); - } - - /** - * 报表发布 - * @param request - * @param reportid - * @return - * @throws Exception - */ - @RequestMapping("/reportpublished") - @Menu(type = "report" , subtype = "reportdesign" ) - public ModelAndView reportpublished(ModelMap map ,HttpServletRequest request , @Valid String reportid,@Valid String isRecover) throws Exception{ - User user = super.getUser(request); - if(!StringUtils.isBlank(reportid)) { - Report report = reportRes.findByIdAndOrgi(reportid, super.getOrgi(request)); - List reportModels = reportModelRes.findByOrgiAndReportid(super.getOrgi(request), reportid); - - for(ReportModel r:reportModels){ - getModel(r.getId(), super.getOrgi(request)); - } - report.setReportModels(reportModels); - List reportFilters = reportCubeService.fillReportFilterData(reportFilterRepository.findByReportidAndFiltertypeAndOrgi(reportid, "report", super.getOrgi(request)),request); - report.setReportFilters(reportFilters); - PublishedReport publishedReport = new PublishedReport(); - MainUtils.copyProperties(report, publishedReport, ""); - publishedReport.setId(null); - Base64 base64 = new Base64(); - publishedReport.setReportcontent(base64.encodeToString(MainUtils.toBytes(report))) ; - publishedReport.setDataid(reportid); - publishedReport.setCreatetime(new Date()); - publishedReport.setCreater(user.getId()); - List pbReportList = publishedReportRes.findByOrgiAndDataidOrderByDataversionDesc(super.getOrgi(request), reportid); - if(!pbReportList.isEmpty()){ - int maxVersion = pbReportList.get(0).getDataversion() ; - if("yes".equals(isRecover)){ - publishedReport.setId(pbReportList.get(0).getId()) ; - publishedReport.setDataversion(pbReportList.get(0).getDataversion()); - publishedReportRes.save(publishedReport); - }else if("no".equals(isRecover)){ - publishedReport.setDataversion(maxVersion+1) ; - publishedReportRes.save(publishedReport); - }else{ - publishedReportRes.delete(pbReportList); - publishedReport.setDataversion(1) ; - publishedReportRes.save(publishedReport); - } - }else{ - publishedReport.setDataversion(1) ; - publishedReportRes.save(publishedReport); - } - return request(super.createRequestPageTempletResponse("redirect:/apps/report/index.html?dicid="+publishedReport.getDicid())); - } - return request(super.createRequestPageTempletResponse("redirect:/apps/report/index.html")); - } -} \ No newline at end of file diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/report/ReportViewController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/report/ReportViewController.java deleted file mode 100644 index 4919d928..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/report/ReportViewController.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.controller.apps.report; - -import com.chatopera.cc.controller.Handler; -import com.chatopera.cc.model.PublishedReport; -import com.chatopera.cc.model.ReportFilter; -import com.chatopera.cc.persistence.repository.DataDicRepository; -import com.chatopera.cc.persistence.repository.PublishedReportRepository; -import com.chatopera.cc.persistence.repository.ReportCubeService; -import com.chatopera.cc.util.Menu; -import org.apache.commons.lang.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.PageRequest; -import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.servlet.ModelAndView; - -import javax.servlet.http.HttpServletRequest; -import javax.validation.Valid; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -@Controller -@RequestMapping("/apps/view") -public class ReportViewController extends Handler{ - - @Value("${web.upload-path}") - private String path; - - @Value("${uk.im.server.port}") - private Integer port; - - @Autowired - private DataDicRepository dataDicRes; - - @Autowired - private PublishedReportRepository publishedReportRes; - - @Autowired - private ReportCubeService reportCubeService; - - - @RequestMapping("/index") - @Menu(type = "setting" , subtype = "report" , admin= true) - public ModelAndView index(ModelMap map , HttpServletRequest request , @Valid String dicid , @Valid String id) throws Exception { - Page publishedReportList = null ; - if(!StringUtils.isBlank(dicid) && !"0".equals(dicid)){ - map.put("dataDic", dataDicRes.findByIdAndOrgi(dicid, super.getOrgi(request))) ; - map.put("reportList", publishedReportList = publishedReportRes.findByOrgiAndDicid(super.getOrgi(request) , dicid , new PageRequest(super.getP(request), super.getPs(request)))) ; - }else{ - map.put("reportList", publishedReportList = publishedReportRes.findByOrgi(super.getOrgi(request) , new PageRequest(super.getP(request), super.getPs(request)))) ; - } - if(publishedReportList!=null && publishedReportList.getContent().size() > 0) { - PublishedReport publishedReport = publishedReportList.getContent().get(0); - if(!StringUtils.isBlank(id)) { - for(PublishedReport report : publishedReportList) { - if(report.getId().equals(id)) { - publishedReport = report ; break ; - } - } - } - map.put("report", publishedReport) ; - - if(publishedReport!=null) { - map.addAttribute("publishedReport", publishedReport); - map.addAttribute("report", publishedReport.getReport()); - map.addAttribute("reportModels", publishedReport.getReport().getReportModels()); - List listFilters = publishedReport.getReport().getReportFilters(); - if(!listFilters.isEmpty()) { - Map filterMap = new HashMap(); - for(ReportFilter rf:listFilters) { - filterMap.put(rf.getId(), rf); - } - for(ReportFilter rf:listFilters) { - if(!StringUtils.isBlank(rf.getCascadeid())) { - rf.setChildFilter(filterMap.get(rf.getCascadeid())); - } - } - } - map.addAttribute("reportFilters", reportCubeService.fillReportFilterData(listFilters, request)); - } - - } - map.put("dataDicList", dataDicRes.findByOrgi(super.getOrgi(request))) ; - return request(super.createRequestPageTempletResponse("/apps/business/view/index")); - } -} \ No newline at end of file diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/service/AgentSummaryController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/service/AgentSummaryController.java index e5848d8a..73289e38 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/service/AgentSummaryController.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/service/AgentSummaryController.java @@ -121,7 +121,7 @@ public class AgentSummaryController extends Handler{ map.addAttribute("tags", tagRes.findByOrgiAndTagtype(super.getOrgi(request) , MainContext.ModelType.SUMMARY.toString())) ; - return request(super.createAppsTempletResponse("/apps/service/summary/index")); + return request(super.createView("/apps/service/summary/index")); } @RequestMapping(value = "/process") @@ -139,7 +139,7 @@ public class AgentSummaryController extends Handler{ } } - return request(super.createRequestPageTempletResponse("/apps/service/summary/process")); + return request(super.createView("/apps/service/summary/process")); } @RequestMapping(value = "/save") @@ -154,7 +154,7 @@ public class AgentSummaryController extends Handler{ serviceSummaryRes.save(oldSummary) ; } - return request(super.createRequestPageTempletResponse("redirect:/apps/agent/summary/index.html")); + return request(super.createView("redirect:/apps/agent/summary/index.html")); } @RequestMapping("/expids") diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/service/ChatServiceController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/service/ChatServiceController.java index 05270036..7a57b7e4 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/service/ChatServiceController.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/service/ChatServiceController.java @@ -163,7 +163,7 @@ public class ChatServiceController extends Handler { map.put("deptlist", organs.values()); map.put("userlist", userProxy.findUserInOrgans(organs.keySet())); - return request(super.createAppsTempletResponse("/apps/service/history/index")); + return request(super.createView("/apps/service/history/index")); } @RequestMapping("/current/index") @@ -181,7 +181,7 @@ public class ChatServiceController extends Handler { super.getPs(request), Direction.DESC, "createtime"))); - return request(super.createAppsTempletResponse("/apps/service/current/index")); + return request(super.createView("/apps/service/current/index")); } @RequestMapping("/current/trans") @@ -224,7 +224,7 @@ public class ChatServiceController extends Handler { map.addAttribute("currentorgan", currentOrgan); } - return request(super.createRequestPageTempletResponse("/apps/service/current/transfer")); + return request(super.createView("/apps/service/current/transfer")); } @RequestMapping(value = "/transfer/save") @@ -317,7 +317,7 @@ public class ChatServiceController extends Handler { } } - return request(super.createRequestPageTempletResponse("redirect:/service/current/index.html")); + return request(super.createView("redirect:/service/current/index.html")); } @RequestMapping("/current/end") @@ -336,7 +336,7 @@ public class ChatServiceController extends Handler { agentServiceRes.save(agentService); } } - return request(super.createRequestPageTempletResponse("redirect:/service/current/index.html")); + return request(super.createView("redirect:/service/current/index.html")); } /** @@ -395,7 +395,7 @@ public class ChatServiceController extends Handler { } } } - return request(super.createRequestPageTempletResponse("redirect:/service/current/index.html")); + return request(super.createView("redirect:/service/current/index.html")); } @@ -429,7 +429,7 @@ public class ChatServiceController extends Handler { } map.put("agentUserList", agentUserList); - return request(super.createAppsTempletResponse("/apps/service/quene/index")); + return request(super.createView("/apps/service/quene/index")); } @RequestMapping("/quene/transfer") @@ -469,7 +469,7 @@ public class ChatServiceController extends Handler { map.addAttribute("skillGroups", skillGroups); map.addAttribute("currentorgan", currentOrgan); } - return request(super.createRequestPageTempletResponse("/apps/service/quene/transfer")); + return request(super.createView("/apps/service/quene/transfer")); } @RequestMapping("/quene/transfer/save") @@ -484,7 +484,7 @@ public class ChatServiceController extends Handler { agentUser, false, MainContext.ChatInitiatorType.USER.toString()); acdVisitorDispatcher.enqueue(ctx); } - return request(super.createRequestPageTempletResponse("redirect:/service/quene/index.html")); + return request(super.createView("redirect:/service/quene/index.html")); } @RequestMapping("/quene/invite") @@ -496,7 +496,7 @@ public class ChatServiceController extends Handler { if (agentUser != null && agentUser.getStatus().equals(MainContext.AgentUserStatusEnum.INQUENE.toString())) { acdAgentService.assignVisitorAsInvite(logined.getId(), agentUser, orgi); } - return request(super.createRequestPageTempletResponse("redirect:/service/quene/index.html")); + return request(super.createView("redirect:/service/quene/index.html")); } /** @@ -522,7 +522,7 @@ public class ChatServiceController extends Handler { } } map.put("agentStatusList", lis); - return request(super.createAppsTempletResponse("/apps/service/agent/index")); + return request(super.createView("/apps/service/agent/index")); } /** @@ -546,7 +546,7 @@ public class ChatServiceController extends Handler { agentStatusProxy.broadcastAgentsStatus( super.getOrgi(request), "agent", "offline", super.getUser(request).getId()); - return request(super.createRequestPageTempletResponse("redirect:/service/agent/index.html")); + return request(super.createView("redirect:/service/agent/index.html")); } /** @@ -576,7 +576,7 @@ public class ChatServiceController extends Handler { map.put("userList", userList); map.put("onlines", onlines); - return request(super.createAppsTempletResponse("/apps/service/user/index")); + return request(super.createView("/apps/service/user/index")); } @RequestMapping("/leavemsg/index") @@ -593,7 +593,7 @@ public class ChatServiceController extends Handler { } map.put("leaveMsgList", leaveMsgs); - return request(super.createAppsTempletResponse("/apps/service/leavemsg/index")); + return request(super.createView("/apps/service/leavemsg/index")); } @RequestMapping("/leavemsg/delete") @@ -602,6 +602,6 @@ public class ChatServiceController extends Handler { if (StringUtils.isNotBlank(id)) { leaveMsgRes.delete(id); } - return request(super.createRequestPageTempletResponse("redirect:/service/leavemsg/index.html")); + return request(super.createView("redirect:/service/leavemsg/index")); } } diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/service/CommentController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/service/CommentController.java index 37d1f044..5f0ab46b 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/service/CommentController.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/service/CommentController.java @@ -50,6 +50,6 @@ public class CommentController extends Handler{ Map organs = organProxy.findAllOrganByParentAndOrgi(currentOrgan, super.getOrgi(request)); Page agentServiceList = agentServiceRes.findByOrgiAndSatisfactionAndSkillIn(super.getOrgi(request) , true ,organs.keySet(),new PageRequest(super.getP(request), super.getPs(request))) ; map.addAttribute("serviceList", agentServiceList) ; - return request(super.createAppsTempletResponse("/apps/service/comment/index")); + return request(super.createView("/apps/service/comment/index")); } } diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/service/OnlineUserController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/service/OnlineUserController.java index 8042deae..c0a9b092 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/service/OnlineUserController.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/service/OnlineUserController.java @@ -174,11 +174,12 @@ public class OnlineUserController extends Handler { cache.findOneAgentUserByUserIdAndOrgi(userid, orgi).ifPresent(agentUser -> { map.put("agentUser", agentUser); + map.put("curagentuser", agentUser); }); } - return request(super.createAppsTempletResponse("/apps/service/online/index")); + return request(super.createView("/apps/service/online/index")); } @RequestMapping("/online/chatmsg") @@ -187,7 +188,7 @@ public class OnlineUserController extends Handler { AgentService agentService = agentServiceRes.getOne(id); map.put("curAgentService", agentService); cache.findOneAgentUserByUserIdAndOrgi(agentService.getUserid(), super.getOrgi(request)).ifPresent(p -> { - map.put("curragentuser", p); + map.put("curagentuser", p); }); if (StringUtils.isNotBlank(title)) { @@ -213,7 +214,7 @@ public class OnlineUserController extends Handler { new PageRequest(0, 50, Direction.DESC, "updatetime"))); - return request(super.createRequestPageTempletResponse("/apps/service/online/chatmsg")); + return request(super.createView("/apps/service/online/chatmsg")); } @RequestMapping("/trace") @@ -228,6 +229,6 @@ public class OnlineUserController extends Handler { "traceHisList", userEventRes.findBySessionidAndOrgi(sessionid, super.getOrgi(request), new PageRequest(0, 100))); } - return request(super.createRequestPageTempletResponse("/apps/service/online/trace")); + return request(super.createView("/apps/service/online/trace")); } } diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/service/ProcessedSummaryController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/service/ProcessedSummaryController.java index 3efd0bb8..1fa7d945 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/service/ProcessedSummaryController.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/service/ProcessedSummaryController.java @@ -125,7 +125,7 @@ public class ProcessedSummaryController extends Handler { map.addAttribute("tags", tagRes.findByOrgiAndTagtype(super.getOrgi(request), MainContext.ModelType.SUMMARY.toString())); - return request(super.createAppsTempletResponse("/apps/service/processed/index")); + return request(super.createView("/apps/service/processed/index")); } @@ -144,7 +144,7 @@ public class ProcessedSummaryController extends Handler { } } - return request(super.createRequestPageTempletResponse("/apps/service/processed/process")); + return request(super.createView("/apps/service/processed/process")); } @RequestMapping(value = "/save") @@ -159,7 +159,7 @@ public class ProcessedSummaryController extends Handler { serviceSummaryRes.save(oldSummary); } - return request(super.createRequestPageTempletResponse("redirect:/apps/agent/processed/index.html")); + return request(super.createView("redirect:/apps/agent/processed/index.html")); } @RequestMapping("/expids") diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/service/StatsController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/service/StatsController.java index 64cdaa70..c3e0a7ac 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/service/StatsController.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/controller/apps/service/StatsController.java @@ -90,7 +90,7 @@ public class StatsController extends Handler { mapR.put("skill", organs.keySet().stream().map(p -> "'" + p + "'").collect(Collectors.joining(","))); } - ReportData reportData = new CubeService("coment.xml", path, dataSource, mapR).execute("SELECT [comment].[满意度].members on columns , NonEmptyCrossJoin([time].[日期].members , NonEmptyCrossJoin([skill].[技能组].members,[agent].[坐席].members)) on rows FROM [满意度]"); + ReportData reportData = new CubeService("coment.pug", path, dataSource, mapR).execute("SELECT [comment].[满意度].members on columns , NonEmptyCrossJoin([time].[日期].members , NonEmptyCrossJoin([skill].[技能组].members,[agent].[坐席].members)) on rows FROM [满意度]"); List dicList = Dict.getInstance().getDic(Constants.CSKEFU_SYSTEM_COMMENT_DIC); for (Level title : reportData.getCol().getChilderen()) { @@ -120,7 +120,7 @@ public class StatsController extends Handler { */ map.addAttribute("skillGroups", organs.values()); - return request(super.createAppsTempletResponse("/apps/service/stats/coment")); + return request(super.createView("/apps/service/stats/coment")); } @RequestMapping("/stats/coment/exp") @@ -138,7 +138,7 @@ public class StatsController extends Handler { mapR.put("skill", organs.keySet().stream().map(p -> "'" + p + "'").collect(Collectors.joining(","))); } mapR.put("orgi", super.getOrgi(request)); - ReportData reportData = new CubeService("coment.xml", path, dataSource, mapR).execute("SELECT [comment].[满意度].members on columns , NonEmptyCrossJoin([time].[日期].members , NonEmptyCrossJoin([skill].[技能组].members,[agent].[坐席].members)) on rows FROM [满意度]"); + ReportData reportData = new CubeService("coment.pug", path, dataSource, mapR).execute("SELECT [comment].[满意度].members on columns , NonEmptyCrossJoin([time].[日期].members , NonEmptyCrossJoin([skill].[技能组].members,[agent].[坐席].members)) on rows FROM [满意度]"); List dicList = Dict.getInstance().getDic(Constants.CSKEFU_SYSTEM_COMMENT_DIC); for (Level title : reportData.getCol().getChilderen()) { @@ -173,7 +173,7 @@ public class StatsController extends Handler { mapR.put("skill", organs.keySet().stream().map(p -> "'" + p + "'").collect(Collectors.joining(","))); } mapR.put("orgi", super.getOrgi(request)); - ReportData reportData = new CubeService("consult.xml", path, dataSource, mapR).execute("SELECT {[Measures].[咨询数量],[Measures].[平均等待时长(秒)],[Measures].[平均咨询时长(秒)]} on columns , NonEmptyCrossJoin([time].[日期].members , NonEmptyCrossJoin([skill].[技能组].members,[agent].[坐席].members)) on rows FROM [咨询]"); + ReportData reportData = new CubeService("consult.pug", path, dataSource, mapR).execute("SELECT {[Measures].[咨询数量],[Measures].[平均等待时长(秒)],[Measures].[平均咨询时长(秒)]} on columns , NonEmptyCrossJoin([time].[日期].members , NonEmptyCrossJoin([skill].[技能组].members,[agent].[坐席].members)) on rows FROM [咨询]"); map.addAttribute("reportData", reportData); if (StringUtils.isNotBlank(agent)) { @@ -189,7 +189,7 @@ public class StatsController extends Handler { * 查询 技能组 , 缓存? */ map.addAttribute("skillGroups", organs.values()); - return request(super.createAppsTempletResponse("/apps/service/stats/consult")); + return request(super.createView("/apps/service/stats/consult")); } @RequestMapping("/stats/agent/exp") @@ -207,7 +207,7 @@ public class StatsController extends Handler { mapR.put("skill", organs.keySet().stream().map(p -> "'" + p + "'").collect(Collectors.joining(","))); } mapR.put("orgi", super.getOrgi(request)); - ReportData reportData = new CubeService("consult.xml", path, dataSource, mapR).execute("SELECT {[Measures].[咨询数量],[Measures].[平均等待时长(秒)],[Measures].[平均咨询时长(秒)]} on columns , NonEmptyCrossJoin([time].[日期].members , NonEmptyCrossJoin([skill].[技能组].members,[agent].[坐席].members)) on rows FROM [咨询]"); + ReportData reportData = new CubeService("consult.pug", path, dataSource, mapR).execute("SELECT {[Measures].[咨询数量],[Measures].[平均等待时长(秒)],[Measures].[平均咨询时长(秒)]} on columns , NonEmptyCrossJoin([time].[日期].members , NonEmptyCrossJoin([skill].[技能组].members,[agent].[坐席].members)) on rows FROM [咨询]"); response.setHeader("content-disposition", "attachment;filename=UCKeFu-Report-" + new SimpleDateFormat("yyyy-MM-dd").format(new Date()) + ".xls"); new UKExcelUtil(reportData, response.getOutputStream(), "客服坐席统计").createFile(); return; diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/resource/CallAgentResourceController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/resource/CallAgentResourceController.java index f1dc78b8..d4966101 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/resource/CallAgentResourceController.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/controller/resource/CallAgentResourceController.java @@ -16,6 +16,8 @@ */ package com.chatopera.cc.controller.resource; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; import com.chatopera.cc.basic.Constants; import com.chatopera.cc.controller.Handler; import com.chatopera.cc.model.User; @@ -27,6 +29,7 @@ import org.springframework.data.jpa.domain.Specification; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.servlet.ModelAndView; import javax.persistence.criteria.CriteriaBuilder; @@ -41,43 +44,54 @@ import java.util.List; @Controller public class CallAgentResourceController extends Handler { - - @Autowired - private UserRepository userRes ; - - @RequestMapping("/res/agent") - @Menu(type = "res" , subtype = "agent") - public ModelAndView add(ModelMap map , HttpServletRequest request , @Valid String q) { - if(q==null){ - q = "" ; - } - final String search = q; - final String orgi = super.getOrgi(request); - final List organList = CallCenterUtils.getExistOrgan(super.getUser(request)); - map.put("owneruserList", userRes.findAll(new Specification(){ - @Override - public Predicate toPredicate(Root root, CriteriaQuery query, - CriteriaBuilder cb) { - List list = new ArrayList(); - In in = cb.in(root.get("organ")); - - list.add(cb.equal(root.get("orgi").as(String.class),orgi )); - - list.add(cb.or(cb.like(root.get("username").as(String.class),"%"+search+"%" ),cb.like(root.get("uname").as(String.class),"%"+search+"%" ))); - - if(organList.size() > 0){ - - for(String id : organList){ - in.value(id) ; - } - }else{ - in.value(Constants.CSKEFU_SYSTEM_NO_DAT) ; - } - list.add(in) ; - - Predicate[] p = new Predicate[list.size()]; - return cb.and(list.toArray(p)); - }})); - return request(super.createRequestPageTempletResponse("/public/agent")); + + @Autowired + private UserRepository userRes; + + @RequestMapping("/res/agent") + @Menu(type = "res", subtype = "agent") + @ResponseBody + public String add(ModelMap map, HttpServletRequest request, @Valid String q) { + if (q == null) { + q = ""; + } + final String search = q; + final String orgi = super.getOrgi(request); + final List organList = CallCenterUtils.getExistOrgan(super.getUser(request)); + List owneruserList = userRes.findAll(new Specification() { + @Override + public Predicate toPredicate(Root root, CriteriaQuery query, + CriteriaBuilder cb) { + List list = new ArrayList(); + In in = cb.in(root.get("organ")); + + list.add(cb.equal(root.get("orgi").as(String.class), orgi)); + + list.add(cb.or(cb.like(root.get("username").as(String.class), "%" + search + "%"), cb.like(root.get("uname").as(String.class), "%" + search + "%"))); + + if (organList.size() > 0) { + + for (String id : organList) { + in.value(id); + } + } else { + in.value(Constants.CSKEFU_SYSTEM_NO_DAT); + } + list.add(in); + + Predicate[] p = new Predicate[list.size()]; + return cb.and(list.toArray(p)); + } + }); + + JSONArray result = new JSONArray(); + for (User owneruser : owneruserList) { + JSONObject item = new JSONObject(); + item.put("id", owneruser.getId()); + item.put("text", owneruser.getUsername()); + result.add(item); + } + + return result.toJSONString(); } } \ No newline at end of file diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/resource/ContactsResourceController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/resource/ContactsResourceController.java index c298b1a0..4f1737c9 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/resource/ContactsResourceController.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/controller/resource/ContactsResourceController.java @@ -16,32 +16,48 @@ */ package com.chatopera.cc.controller.resource; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; import com.chatopera.cc.controller.Handler; +import com.chatopera.cc.model.Contacts; +import com.chatopera.cc.model.User; import com.chatopera.cc.persistence.es.ContactsRepository; import com.chatopera.cc.util.Menu; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.servlet.ModelAndView; import javax.servlet.http.HttpServletRequest; import javax.validation.Valid; @Controller -public class ContactsResourceController extends Handler{ - - @Autowired - private ContactsRepository contactsRes ; - - @RequestMapping("/res/contacts") - @Menu(type = "res" , subtype = "contacts") - public ModelAndView add(ModelMap map , HttpServletRequest request , @Valid String q) { - if(q==null){ - q = "" ; - } - map.addAttribute("contactsList", contactsRes.findByCreaterAndSharesAndOrgi(super.getUser(request).getId(),super.getUser(request).getId(),super.getOrgi(request), false , q , new PageRequest(0, 10))) ; - return request(super.createRequestPageTempletResponse("/public/contacts")); +public class ContactsResourceController extends Handler { + + @Autowired + private ContactsRepository contactsRes; + + @RequestMapping("/res/contacts") + @Menu(type = "res", subtype = "contacts") + @ResponseBody + public String add(ModelMap map, HttpServletRequest request, @Valid String q) { + if (q == null) { + q = ""; + } + Page contactsList = contactsRes.findByCreaterAndSharesAndOrgi(super.getUser(request).getId(), super.getUser(request).getId(), super.getOrgi(request), false, q, new PageRequest(0, 10)); + + JSONArray result = new JSONArray(); + for (Contacts contact : contactsList.getContent()) { + JSONObject item = new JSONObject(); + item.put("id", contact.getId()); + item.put("text", contact.getName()); + result.add(item); + } + + return result.toJSONString(); } } \ No newline at end of file diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/resource/CssResourceController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/resource/CssResourceController.java index 48f8b784..c4842eb7 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/resource/CssResourceController.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/controller/resource/CssResourceController.java @@ -33,13 +33,13 @@ public class CssResourceController extends Handler{ @Menu(type = "resouce" , subtype = "css" , access = true) public ModelAndView index(HttpServletResponse response, @Valid String id) throws IOException { response.setContentType("text/css ; charset=UTF-8"); - return request(super.createRequestPageTempletResponse("/resource/css/ukefu")); + return request(super.createView("/resource/css/ukefu")); } @RequestMapping("/res/css/system") @Menu(type = "resouce" , subtype = "css" , access = true) public ModelAndView system(HttpServletResponse response, @Valid String id) throws IOException { response.setContentType("text/css ; charset=UTF-8"); - return request(super.createRequestPageTempletResponse("/resource/css/system")); + return request(super.createView("/resource/css/system")); } } \ No newline at end of file diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/resource/MediaController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/resource/MediaController.java index c0bae1c8..4b978ad8 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/resource/MediaController.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/controller/resource/MediaController.java @@ -16,8 +16,10 @@ */ package com.chatopera.cc.controller.resource; +import com.alibaba.fastjson.JSONObject; import com.chatopera.cc.basic.MainUtils; import com.chatopera.cc.controller.Handler; +import com.chatopera.cc.controller.api.request.RestUtils; import com.chatopera.cc.model.AttachmentFile; import com.chatopera.cc.model.StreamingFile; import com.chatopera.cc.model.UploadStatus; @@ -32,6 +34,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; @@ -118,11 +123,11 @@ public class MediaController extends Handler { @RequestMapping("/image/upload") @Menu(type = "resouce", subtype = "imageupload", access = false) - public ModelAndView upload(ModelMap map, - HttpServletRequest request, - @RequestParam(value = "imgFile", required = false) MultipartFile multipart) throws IOException { - ModelAndView view = request(super.createRequestPageTempletResponse("/public/upload")); - UploadStatus notify = null; + public ResponseEntity upload(ModelMap map, + HttpServletRequest request, + @RequestParam(value = "imgFile", required = false) MultipartFile multipart) throws IOException { + JSONObject result = new JSONObject(); + HttpHeaders headers = RestUtils.header(); if (multipart != null && multipart.getOriginalFilename().lastIndexOf(".") > 0) { File uploadDir = new File(path, "upload"); if (!uploadDir.exists()) { @@ -136,12 +141,15 @@ public class MediaController extends Handler { sf.setData(jpaBlobHelper.createBlob(multipart.getInputStream(), multipart.getSize())); streamingFileRes.save(sf); String fileURL = "/res/image.html?id=" + fileid; - notify = new UploadStatus("0", fileURL); //图片直接发送给 客户,不用返回 + result.put("error", 0); + result.put("url", fileURL); //图片直接发送给 客户,不用返回 } else { - notify = new UploadStatus("请选择图片文件"); + result.put("error", 1); + result.put("message", "请选择图片文件"); } - map.addAttribute("upload", notify); - return view; + + return new ResponseEntity<>(result.toString(), headers, HttpStatus.OK); + } @RequestMapping("/file") diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/resource/QuickReplyResourceController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/resource/QuickReplyResourceController.java deleted file mode 100644 index a28e8cd1..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/resource/QuickReplyResourceController.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.controller.resource; - -import com.chatopera.cc.controller.Handler; -import com.chatopera.cc.proxy.OnlineUserProxy; -import com.chatopera.cc.util.Menu; -import freemarker.template.TemplateException; -import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.servlet.ModelAndView; - -import javax.servlet.http.HttpServletRequest; -import javax.validation.Valid; -import java.io.IOException; - -@Controller -public class QuickReplyResourceController extends Handler{ - - @RequestMapping("/res/quickreply") - @Menu(type = "res" , subtype = "quickreply") - public ModelAndView add(ModelMap map , HttpServletRequest request , @Valid String q) throws IOException, TemplateException { - if(q==null){ - q = "" ; - } -// map.addAttribute("quickReplyList", OnlineUserProxy.search(q, super.getOrgi(request), super.getUser(request))) ; - return request(super.createRequestPageTempletResponse("/public/quickreply")); - } -} \ No newline at end of file diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/resource/SysDicResourceController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/resource/SysDicResourceController.java index 0970f263..74fcca01 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/resource/SysDicResourceController.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/controller/resource/SysDicResourceController.java @@ -53,7 +53,7 @@ public class SysDicResourceController extends Handler{ map.addAttribute("name", name) ; map.addAttribute("attr", attr) ; map.addAttribute("style", style) ; - return request(super.createRequestPageTempletResponse("/public/select")); + return request(super.createView("/public/select")); } } \ No newline at end of file diff --git a/contact-center/app/src/main/java/com/chatopera/cc/controller/resource/UsersResourceController.java b/contact-center/app/src/main/java/com/chatopera/cc/controller/resource/UsersResourceController.java index 9c234e46..17b01d65 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/controller/resource/UsersResourceController.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/controller/resource/UsersResourceController.java @@ -16,9 +16,11 @@ */ package com.chatopera.cc.controller.resource; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; import com.chatopera.cc.controller.Handler; +import com.chatopera.cc.model.Contacts; import com.chatopera.cc.model.Organ; -import com.chatopera.cc.model.OrgiSkillRel; import com.chatopera.cc.model.User; import com.chatopera.cc.persistence.repository.OrganRepository; import com.chatopera.cc.persistence.repository.OrgiSkillRelRepository; @@ -31,11 +33,11 @@ import org.springframework.data.domain.PageRequest; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.servlet.ModelAndView; import javax.servlet.http.HttpServletRequest; import javax.validation.Valid; -import java.util.ArrayList; import java.util.List; @Controller @@ -55,12 +57,21 @@ public class UsersResourceController extends Handler { @RequestMapping("/users") @Menu(type = "res", subtype = "users") - public ModelAndView add(ModelMap map, HttpServletRequest request, @Valid String q, @Valid String id) { + @ResponseBody + public String add(ModelMap map, HttpServletRequest request, @Valid String q, @Valid String id) { if (q == null) { q = ""; } - map.addAttribute("usersList", getUsers(request, q)); - return request(super.createRequestPageTempletResponse("/public/users")); + Page usersList = getUsers(request, q); + JSONArray result = new JSONArray(); + for (User user : usersList.getContent()) { + JSONObject item = new JSONObject(); + item.put("id", user.getId()); + item.put("text", user.getUsername() + "(" + user.getUname() + ")"); + result.add(item); + } + + return result.toJSONString(); } @RequestMapping("/bpm/users") @@ -70,7 +81,7 @@ public class UsersResourceController extends Handler { q = ""; } map.addAttribute("usersList", getUsers(request, q)); - return request(super.createRequestPageTempletResponse("/public/bpmusers")); + return request(super.createView("/public/bpmusers")); } @RequestMapping("/bpm/organ") @@ -79,7 +90,7 @@ public class UsersResourceController extends Handler { map.addAttribute("organList", getOrgans(request)); map.addAttribute("usersList", getUsers(request)); map.addAttribute("ids", ids); - return request(super.createRequestPageTempletResponse("/public/organ")); + return request(super.createView("/public/organ")); } private List getUsers(HttpServletRequest request) { diff --git a/contact-center/app/src/main/java/com/chatopera/cc/interceptor/UserInterceptorHandler.java b/contact-center/app/src/main/java/com/chatopera/cc/interceptor/UserInterceptorHandler.java index f690195c..0fa0e99e 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/interceptor/UserInterceptorHandler.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/interceptor/UserInterceptorHandler.java @@ -25,6 +25,7 @@ import com.chatopera.cc.model.SystemConfig; import com.chatopera.cc.model.User; import com.chatopera.cc.proxy.UserProxy; import com.chatopera.cc.util.Menu; +import com.chatopera.cc.util.PugHelper; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -153,6 +154,8 @@ public class UserInterceptorHandler extends HandlerInterceptorAdapter { view.addObject("advTypeList", Dict.getInstance().getDic("com.dic.adv.type")); view.addObject("ip", request.getRemoteAddr()); + + view.addObject("pugHelper", new PugHelper()); } } diff --git a/contact-center/app/src/main/java/com/chatopera/cc/model/AiConfig.java b/contact-center/app/src/main/java/com/chatopera/cc/model/AiConfig.java index 7a42a4c7..99ef620c 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/model/AiConfig.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/model/AiConfig.java @@ -22,7 +22,7 @@ import javax.persistence.*; import java.util.Date; @Entity -@Table(name = "uk_xiaoe_config") +@Table(name = "cs_chatbot_config") @org.hibernate.annotations.Proxy(lazy = false) public class AiConfig implements java.io.Serializable{ /** diff --git a/contact-center/app/src/main/java/com/chatopera/cc/model/FbMessenger.java b/contact-center/app/src/main/java/com/chatopera/cc/model/FbMessenger.java new file mode 100644 index 00000000..e735f4ea --- /dev/null +++ b/contact-center/app/src/main/java/com/chatopera/cc/model/FbMessenger.java @@ -0,0 +1,157 @@ +/* + * Copyright (C) 2018-2019 Chatopera Inc, + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.chatopera.cc.model; + +import org.hibernate.annotations.GenericGenerator; + +import javax.persistence.*; +import java.io.Serializable; +import java.util.Date; + +@Entity +@Table(name = "cs_fb_messenger") +@org.hibernate.annotations.Proxy(lazy = false) +public class FbMessenger implements Serializable { + + private String id; + private String pageId; + private String token; + private String verifyToken; + private String name; + private String status; + private String organ; + private String aiid; + private boolean aisuggest; + private boolean ai; + private Date createtime; + private Date updatetime; + private String config; + + @Id + @Column(length = 32) + @GeneratedValue(generator = "system-uuid") + @GenericGenerator(name = "system-uuid", strategy = "assigned") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + + public String getPageId() { + return pageId; + } + + public void setPageId(String pageId) { + this.pageId = pageId; + } + + + public String getToken() { + return token; + } + + public void setToken(String token) { + this.token = token; + } + + + public String getVerifyToken() { + return verifyToken; + } + + public void setVerifyToken(String verifyToken) { + this.verifyToken = verifyToken; + } + + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + + public String getOrgan() { + return organ; + } + + public void setOrgan(String organ) { + this.organ = organ; + } + + public String getAiid() { + return aiid; + } + + public void setAiid(String aiid) { + this.aiid = aiid; + } + + public boolean isAi() { + return ai; + } + + public void setAi(boolean ai) { + this.ai = ai; + } + + public boolean isAisuggest() { + return aisuggest; + } + + public void setAisuggest(boolean aisuggest) { + this.aisuggest = aisuggest; + } + + public Date getCreatetime() { + return createtime; + } + + public void setCreatetime(Date createtime) { + this.createtime = createtime; + } + + public Date getUpdatetime() { + return updatetime; + } + + public void setUpdatetime(Date updatetime) { + this.updatetime = updatetime; + } + + public String getConfig() { + return config; + } + + public void setConfig(String config) { + this.config = config; + } +} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/model/FbOTN.java b/contact-center/app/src/main/java/com/chatopera/cc/model/FbOTN.java new file mode 100644 index 00000000..c98cc13f --- /dev/null +++ b/contact-center/app/src/main/java/com/chatopera/cc/model/FbOTN.java @@ -0,0 +1,165 @@ +/* + * Copyright (C) 2018-2019 Chatopera Inc, + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.chatopera.cc.model; + +import org.hibernate.annotations.GenericGenerator; +import org.hibernate.annotations.NotFound; +import org.hibernate.annotations.NotFoundAction; + +import javax.persistence.*; +import java.io.Serializable; +import java.util.Date; + +@Entity +@Table(name = "cs_fb_otn") +@org.hibernate.annotations.Proxy(lazy = false) +public class FbOTN implements Serializable { + + private String id; + private String name; + private String pageId; + private String preSubMessage; + private String subMessage; + private String successMessage; + private String otnMessage; + private String status; + private Date createtime; + private Date updatetime; + private Date sendtime; + private Integer subNum; + + private FbMessenger fbMessenger; + + @Id + @Column(length = 32) + @GeneratedValue(generator = "system-uuid") + @GenericGenerator(name = "system-uuid", strategy = "assigned") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getPageId() { + return pageId; + } + + public void setPageId(String pageId) { + this.pageId = pageId; + } + + + public String getPreSubMessage() { + return preSubMessage; + } + + public void setPreSubMessage(String preSubMessage) { + this.preSubMessage = preSubMessage; + } + + + public String getSubMessage() { + return subMessage; + } + + public void setSubMessage(String subMessage) { + this.subMessage = subMessage; + } + + + public String getSuccessMessage() { + return successMessage; + } + + public void setSuccessMessage(String successMessage) { + this.successMessage = successMessage; + } + + + public String getOtnMessage() { + return otnMessage; + } + + public void setOtnMessage(String otnMessage) { + this.otnMessage = otnMessage; + } + + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + + public Date getCreatetime() { + return createtime; + } + + public void setCreatetime(Date createtime) { + this.createtime = createtime; + } + + + public Date getUpdatetime() { + return updatetime; + } + + public void setUpdatetime(Date updatetime) { + this.updatetime = updatetime; + } + + + public Date getSendtime() { + return sendtime; + } + + public void setSendtime(Date sendtime) { + this.sendtime = sendtime; + } + + public Integer getSubNum() { + return subNum; + } + + public void setSubNum(Integer subNum) { + this.subNum = subNum; + } + + @ManyToOne(fetch = FetchType.EAGER) + @JoinColumn(name = "pageId", referencedColumnName = "pageId", insertable = false, updatable = false) + @NotFound(action = NotFoundAction.IGNORE) + public FbMessenger getFbMessenger() { + return fbMessenger; + } + + public void setFbMessenger(FbMessenger fbMessenger) { + this.fbMessenger = fbMessenger; + } +} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/model/FbOtnFollow.java b/contact-center/app/src/main/java/com/chatopera/cc/model/FbOtnFollow.java new file mode 100644 index 00000000..32885626 --- /dev/null +++ b/contact-center/app/src/main/java/com/chatopera/cc/model/FbOtnFollow.java @@ -0,0 +1,114 @@ +/* + * Copyright (C) 2018-2019 Chatopera Inc, + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.chatopera.cc.model; + + +import org.hibernate.annotations.GenericGenerator; + +import javax.persistence.*; +import java.util.Date; + +@Entity +@Table(name = "cs_fb_otn_follow") +@org.hibernate.annotations.Proxy(lazy = false) +public class FbOtnFollow { + + private String id; + private String pageId; + private String otnId; + private String userId; + private String otnToken; + private Date createtime; + private Date updatetime; + private Date sendtime; + + @Id + @Column(length = 32) + @GeneratedValue(generator = "system-uuid") + @GenericGenerator(name = "system-uuid", strategy = "assigned") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + + public String getPageId() { + return pageId; + } + + public void setPageId(String pageId) { + this.pageId = pageId; + } + + + public String getOtnId() { + return otnId; + } + + public void setOtnId(String otnId) { + this.otnId = otnId; + } + + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + + public String getOtnToken() { + return otnToken; + } + + public void setOtnToken(String otnToken) { + this.otnToken = otnToken; + } + + + public Date getCreatetime() { + return createtime; + } + + public void setCreatetime(Date createtime) { + this.createtime = createtime; + } + + + public Date getUpdatetime() { + return updatetime; + } + + public void setUpdatetime(Date updatetime) { + this.updatetime = updatetime; + } + + + public Date getSendtime() { + return sendtime; + } + + public void setSendtime(Date sendtime) { + this.sendtime = sendtime; + } + +} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/model/KbsExpert.java b/contact-center/app/src/main/java/com/chatopera/cc/model/KbsExpert.java deleted file mode 100644 index fcc1bd2e..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/model/KbsExpert.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -package com.chatopera.cc.model; - -import org.hibernate.annotations.GenericGenerator; - -import javax.persistence.*; -import java.util.Date; - -@Entity -@Table(name = "uk_kbs_expert") -@org.hibernate.annotations.Proxy(lazy = false) -public class KbsExpert implements java.io.Serializable{ - /** - * - */ - private static final long serialVersionUID = 707069993826500239L; - private String id ; - private User user ; - private String kbstype ; - private String creater ; - private String orgi ; - private Date createtime = new Date(); - - @Id - @Column(length = 32) - @GeneratedValue(generator = "system-uuid") - @GenericGenerator(name = "system-uuid", strategy = "uuid") - public String getId() { - return id; - } - public void setId(String id) { - this.id = id; - } - @OneToOne(optional = true) - public User getUser() { - return user; - } - public void setUser(User user) { - this.user = user; - } - public String getKbstype() { - return kbstype; - } - public void setKbstype(String kbstype) { - this.kbstype = kbstype; - } - public String getCreater() { - return creater; - } - public void setCreater(String creater) { - this.creater = creater; - } - public Date getCreatetime() { - return createtime; - } - public void setCreatetime(Date createtime) { - this.createtime = createtime; - } - public String getOrgi() { - return orgi; - } - public void setOrgi(String orgi) { - this.orgi = orgi; - } -} \ No newline at end of file diff --git a/contact-center/app/src/main/java/com/chatopera/cc/model/KbsTopic.java b/contact-center/app/src/main/java/com/chatopera/cc/model/KbsTopic.java deleted file mode 100644 index 1e247b22..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/model/KbsTopic.java +++ /dev/null @@ -1,443 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.chatopera.cc.model; - -import com.chatopera.cc.basic.MainUtils; -import org.hibernate.annotations.GenericGenerator; -import org.springframework.data.elasticsearch.annotations.Document; - -import javax.persistence.*; -import java.util.Date; - - -/** - * - */ -@Document(indexName = "cskefu", type = "kbs_topic") -@Entity -@Table(name = "uk_kbs_topic") -@org.hibernate.annotations.Proxy(lazy = false) -public class KbsTopic extends ESBean implements java.io.Serializable , UKAgg{ - /** - * - */ - private static final long serialVersionUID = 1L; - - /** - * - */ - - private String id = MainUtils.getUUID(); - - private String sessionid ; - - private String title ; //标题 - private String content ; //内容 - private String weixin; //微信渠道回复 - private String email ; //邮件渠道回复 - private String sms ; //短信回复 - private String tts ; //语音播报回复 - - private float price ; //问题价格 - private String keyword ; //关键词 - private String summary ; //摘要 - private String tags ; //标签 - private boolean anonymous ; //是否匿名提问 - private boolean datastatus ; //逻辑删除 - - private boolean approval ; //是否已经审批通过 - - - private Date begintime ; //有效期开始 - - private Date endtime ; //有效期结束 - - private boolean top ; //是否置顶 - private boolean essence ; //是否精华 - private boolean accept ; //是否已采纳最佳答案 - private boolean finish ; //结贴 - - private int answers ; //回答数量 - - @Column(name="sviews") - private int views ; //阅读数量 - private int followers ; //关注数量 - private int collections; //收藏数量 - private int comments ; //评论数量 - private boolean frommobile ; //是否移动端提问 - private String status ; // 状态 - private String tptype; //知识分类 - private String cate ; //知识 栏目 - private String attachment ; //附件 - - private String username ; - private String orgi ; - private String creater; - - private Date createtime = new Date(); - - private Date updatetime = new Date(); - private String memo; - private String organ; - - private int rowcount ; - private String key ; - - - private User user ; - - - /** - * @return the id - */ - @Id - @Column(length = 32) - @GeneratedValue(generator = "system-uuid") - @GenericGenerator(name = "system-uuid", strategy = "assigned") - public String getId() { - return id; - } - - @Transient - public String getSessionid() { - return sessionid; - } - - - public void setSessionid(String sessionid) { - this.sessionid = sessionid; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public String getContent() { - return content; - } - - public void setContent(String content) { - this.content = content; - } - - public float getPrice() { - return price; - } - - public void setPrice(float price) { - this.price = price; - } - - public String getKeyword() { - return keyword; - } - - public void setKeyword(String keyword) { - this.keyword = keyword; - } - - public String getSummary() { - return summary; - } - - public void setSummary(String summary) { - this.summary = summary; - } - - public boolean isAnonymous() { - return anonymous; - } - - public void setAnonymous(boolean anonymous) { - this.anonymous = anonymous; - } - - public String getTptype() { - return tptype; - } - - public void setTptype(String tptype) { - this.tptype = tptype; - } - - public int getAnswers() { - return answers; - } - - public void setAnswers(int answers) { - this.answers = answers; - } - - public int getViews() { - return views; - } - - public void setViews(int views) { - this.views = views; - } - - public int getFollowers() { - return followers; - } - - public void setFollowers(int followers) { - this.followers = followers; - } - - public int getCollections() { - return collections; - } - - public void setCollections(int collections) { - this.collections = collections; - } - - public int getComments() { - return comments; - } - - public void setComments(int comments) { - this.comments = comments; - } - - public boolean isFrommobile() { - return frommobile; - } - - public void setFrommobile(boolean frommobile) { - this.frommobile = frommobile; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getOrgi() { - return orgi; - } - - public void setOrgi(String orgi) { - this.orgi = orgi; - } - - public String getCreater() { - return creater; - } - - public void setCreater(String creater) { - this.creater = creater; - } - - public Date getCreatetime() { - return createtime; - } - - public void setCreatetime(Date createtime) { - this.createtime = createtime; - } - - public Date getUpdatetime() { - return updatetime; - } - - public void setUpdatetime(Date updatetime) { - this.updatetime = updatetime; - } - - public String getMemo() { - return memo; - } - - public void setMemo(String memo) { - this.memo = memo; - } - - public String getOrgan() { - return organ; - } - - public void setOrgan(String organ) { - this.organ = organ; - } - - - public void setId(String id) { - this.id = id; - } - - public String getCate() { - return cate; - } - - public void setCate(String cate) { - this.cate = cate; - } - - public boolean isTop() { - return top; - } - - public void setTop(boolean top) { - this.top = top; - } - - public boolean isEssence() { - return essence; - } - - public void setEssence(boolean essence) { - this.essence = essence; - } - - public boolean isAccept() { - return accept; - } - - public void setAccept(boolean accept) { - this.accept = accept; - } - - public boolean isFinish() { - return finish; - } - - public void setFinish(boolean finish) { - this.finish = finish; - } - - @Transient - public User getUser() { - return user; - } - - public void setUser(User user) { - this.user = user; - } - - public Date getBegintime() { - return begintime; - } - - public void setBegintime(Date begintime) { - this.begintime = begintime; - } - - public Date getEndtime() { - return endtime; - } - - public void setEndtime(Date endtime) { - this.endtime = endtime; - } - - public String getWeixin() { - return weixin; - } - - public void setWeixin(String weixin) { - this.weixin = weixin; - } - - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - public String getSms() { - return sms; - } - - public void setSms(String sms) { - this.sms = sms; - } - - public String getTts() { - return tts; - } - - public void setTts(String tts) { - this.tts = tts; - } - @Transient - public int getRowcount() { - return rowcount; - } - - public void setRowcount(int rowcount) { - this.rowcount = rowcount; - } - @Transient - public String getKey() { - return key; - } - - public void setKey(String key) { - this.key = key; - } - - public String getTags() { - return tags; - } - - public void setTags(String tags) { - this.tags = tags; - } - - public String getAttachment() { - return attachment; - } - - public void setAttachment(String attachment) { - this.attachment = attachment; - } - - public boolean isDatastatus() { - return datastatus; - } - - public void setDatastatus(boolean datastatus) { - this.datastatus = datastatus; - } - - public boolean isApproval() { - return approval; - } - - public void setApproval(boolean approval) { - this.approval = approval; - } -} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/model/KbsTopicComment.java b/contact-center/app/src/main/java/com/chatopera/cc/model/KbsTopicComment.java deleted file mode 100644 index 193f5326..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/model/KbsTopicComment.java +++ /dev/null @@ -1,225 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -package com.chatopera.cc.model; - -import com.chatopera.cc.basic.MainUtils; -import org.hibernate.annotations.GenericGenerator; -import org.springframework.data.elasticsearch.annotations.Document; -import org.springframework.data.elasticsearch.annotations.Field; -import org.springframework.data.elasticsearch.annotations.FieldIndex; -import org.springframework.data.elasticsearch.annotations.FieldType; - -import javax.persistence.Column; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.Transient; -import java.util.Date; -@Document(indexName = "cskefu", type = "kbs_topiccomment") -public class KbsTopicComment implements UKAgg{ - - /** - * - */ - private static final long serialVersionUID = -4911955236794918875L; - private String id = MainUtils.getUUID(); - private String username; - private String creater ; - - private Date createtime = new Date() ; - - @Field(index = FieldIndex.not_analyzed , type = FieldType.String) - private String dataid ; - - private String content ; //评论内容 - - private Date updatetime = new Date() ; - - private boolean optimal ; //是否最佳答案 - - private int up ; //点赞数量 - private int comments ; //回复数量 - - private boolean admin ; - - private String cate ; - - private String optype ; - private String ipcode ; - private String country ; - private String province ; - private String city ; - private String isp ; - private String region ; - - private int rowcount ; - private String key ; - - private Topic topic ; - - private User user ; - - @Id - @Column(length = 32) - @GeneratedValue(generator = "system-uuid") - @GenericGenerator(name = "system-uuid", strategy = "uuid") - public String getId() { - return id; - } - public void setId(String id) { - this.id = id; - } - public String getUsername() { - return username; - } - public void setUsername(String username) { - this.username = username; - } - public String getCreater() { - return creater; - } - public void setCreater(String creater) { - this.creater = creater; - } - public Date getCreatetime() { - return createtime; - } - public void setCreatetime(Date createtime) { - this.createtime = createtime; - } - public String getIpcode() { - return ipcode; - } - public void setIpcode(String ipcode) { - this.ipcode = ipcode; - } - public String getCountry() { - return country; - } - public void setCountry(String country) { - this.country = country; - } - public String getProvince() { - return province; - } - public void setProvince(String province) { - this.province = province; - } - public String getCity() { - return city; - } - public void setCity(String city) { - this.city = city; - } - public String getIsp() { - return isp; - } - public void setIsp(String isp) { - this.isp = isp; - } - public String getRegion() { - return region; - } - public void setRegion(String region) { - this.region = region; - } - public String getDataid() { - return dataid; - } - public void setDataid(String dataid) { - this.dataid = dataid; - } - public String getOptype() { - return optype; - } - public void setOptype(String optype) { - this.optype = optype; - } - public String getContent() { - return content; - } - public void setContent(String content) { - this.content = content; - } - public boolean isOptimal() { - return optimal; - } - public void setOptimal(boolean optimal) { - this.optimal = optimal; - } - public boolean isAdmin() { - return admin; - } - public void setAdmin(boolean admin) { - this.admin = admin; - } - public int getUp() { - return up; - } - public void setUp(int up) { - this.up = up; - } - public int getComments() { - return comments; - } - public void setComments(int comments) { - this.comments = comments; - } - public Date getUpdatetime() { - return updatetime; - } - public void setUpdatetime(Date updatetime) { - this.updatetime = updatetime; - } - @Transient - public Topic getTopic() { - return topic; - } - public void setTopic(Topic topic) { - this.topic = topic; - } - @Transient - public User getUser() { - return user; - } - public void setUser(User user) { - this.user = user; - } - public String getCate() { - return cate; - } - public void setCate(String cate) { - this.cate = cate; - } - @Transient - public int getRowcount() { - return rowcount; - } - public void setRowcount(int rowcount) { - this.rowcount = rowcount; - } - @Transient - public String getKey() { - return key; - } - public void setKey(String key) { - this.key = key; - } - - -} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/model/KbsType.java b/contact-center/app/src/main/java/com/chatopera/cc/model/KbsType.java deleted file mode 100644 index 7ad65e38..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/model/KbsType.java +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -package com.chatopera.cc.model; - -import org.hibernate.annotations.GenericGenerator; - -import javax.persistence.*; -import java.util.Date; - -@Entity -@Table(name = "uk_kbs_type") -@org.hibernate.annotations.Proxy(lazy = false) -public class KbsType implements java.io.Serializable{ - - /** - * - */ - private static final long serialVersionUID = 1115593425069549681L; - - private String id ; - private String name ; - private String code ; - private boolean approval ; //是否需要专家审批 - - private boolean bpm ; //是否需要流程审批 - - private String bpmid ; //知识审批流程ID - - private String pc ; //知识分类负责人 - - private int inx; //知识分类排序位置 - - private Date createtime ; - private String creater; - private String username ; - - private Date startdate; //有效期开始 - private Date enddate ; //有效期结束 - - private boolean enable ; //状态是否可用 - - private String description ;//分类备注描述信息 - - private Date updatetime ; - private String parentid ; //父级ID - private String orgi ; - - @Id - @Column(length = 32) - @GeneratedValue(generator = "system-uuid") - @GenericGenerator(name = "system-uuid", strategy = "uuid") - public String getId() { - return id; - } - public void setId(String id) { - this.id = id; - } - public String getName() { - return name; - } - public void setName(String name) { - this.name = name; - } - public String getCode() { - return code; - } - public void setCode(String code) { - this.code = code; - } - public String getCreater() { - return creater; - } - public void setCreater(String creater) { - this.creater = creater; - } - public String getUsername() { - return username; - } - public void setUsername(String username) { - this.username = username; - } - public String getOrgi() { - return orgi; - } - public void setOrgi(String orgi) { - this.orgi = orgi; - } - public Date getCreatetime() { - return createtime; - } - public void setCreatetime(Date createtime) { - this.createtime = createtime; - } - public Date getUpdatetime() { - return updatetime; - } - public void setUpdatetime(Date updatetime) { - this.updatetime = updatetime; - } - public String getParentid() { - return parentid; - } - public void setParentid(String parentid) { - this.parentid = parentid; - } - public boolean isApproval() { - return approval; - } - public void setApproval(boolean approval) { - this.approval = approval; - } - public String getBpmid() { - return bpmid; - } - public void setBpmid(String bpmid) { - this.bpmid = bpmid; - } - public String getPc() { - return pc; - } - public void setPc(String pc) { - this.pc = pc; - } - public int getInx() { - return inx; - } - public void setInx(int inx) { - this.inx = inx; - } - public Date getStartdate() { - return startdate; - } - public void setStartdate(Date startdate) { - this.startdate = startdate; - } - public Date getEnddate() { - return enddate; - } - public void setEnddate(Date enddate) { - this.enddate = enddate; - } - public boolean isEnable() { - return enable; - } - public void setEnable(boolean enable) { - this.enable = enable; - } - public String getDescription() { - return description; - } - public void setDescription(String description) { - this.description = description; - } - public boolean isBpm() { - return bpm; - } - public void setBpm(boolean bpm) { - this.bpm = bpm; - } -} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/model/KnowledgeType.java b/contact-center/app/src/main/java/com/chatopera/cc/model/KnowledgeType.java deleted file mode 100644 index f7b8484a..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/model/KnowledgeType.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.chatopera.cc.model; - -import org.hibernate.annotations.GenericGenerator; - -import javax.persistence.*; -import java.util.Date; - -@Entity -@Table(name = "uk_xiaoe_kbs_type") -@org.hibernate.annotations.Proxy(lazy = false) -public class KnowledgeType implements java.io.Serializable{ - - /** - * - */ - private static final long serialVersionUID = 1115593425069549681L; - - private String id ; - private String name ; - private String code ; - private Date createtime ; - private String parentid ; - private String typeid ; - private String creater; - private String username ; - private Date updatetime ; - private String orgi ; - private String area ; - - @Id - @Column(length = 32) - @GeneratedValue(generator = "system-uuid") - @GenericGenerator(name = "system-uuid", strategy = "assigned") - public String getId() { - return id; - } - public void setId(String id) { - this.id = id; - } - public String getName() { - return name; - } - public void setName(String name) { - this.name = name; - } - public String getCode() { - return code; - } - public void setCode(String code) { - this.code = code; - } - public String getCreater() { - return creater; - } - public void setCreater(String creater) { - this.creater = creater; - } - public String getUsername() { - return username; - } - public void setUsername(String username) { - this.username = username; - } - public String getOrgi() { - return orgi; - } - public void setOrgi(String orgi) { - this.orgi = orgi; - } - public Date getCreatetime() { - return createtime; - } - public void setCreatetime(Date createtime) { - this.createtime = createtime; - } - public Date getUpdatetime() { - return updatetime; - } - public void setUpdatetime(Date updatetime) { - this.updatetime = updatetime; - } - public String getArea() { - return area; - } - public void setArea(String area) { - this.area = area; - } - public String getParentid() { - return parentid; - } - public void setParentid(String parentid) { - this.parentid = parentid; - } - public String getTypeid() { - return typeid; - } - public void setTypeid(String typeid) { - this.typeid = typeid; - } -} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/model/OnlineUser.java b/contact-center/app/src/main/java/com/chatopera/cc/model/OnlineUser.java index 36771b06..19ff94b8 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/model/OnlineUser.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/model/OnlineUser.java @@ -26,7 +26,7 @@ import java.util.Date; @Entity @Table(name = "uk_onlineuser") @Proxy(lazy = false) -public class OnlineUser implements java.io.Serializable { +public class OnlineUser implements java.io.Serializable { /** * */ @@ -75,7 +75,7 @@ public class OnlineUser implements java.io.Serializable { private String useragent; private String phone; private String contactsid; - + private String headimgurl; private int invitetimes; // 邀请次数 private String invitestatus; // 邀请状态 @@ -83,6 +83,14 @@ public class OnlineUser implements java.io.Serializable { private Contacts contacts; + public String getHeadimgurl() { + return headimgurl; + } + + public void setHeadimgurl(String headimgurl) { + this.headimgurl = headimgurl; + } + public String getCreater() { return this.creater; } @@ -463,4 +471,6 @@ public class OnlineUser implements java.io.Serializable { public void setPhone(String phone) { this.phone = phone; } + + } diff --git a/contact-center/app/src/main/java/com/chatopera/cc/model/QuickReply.java b/contact-center/app/src/main/java/com/chatopera/cc/model/QuickReply.java deleted file mode 100644 index 174a5c34..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/model/QuickReply.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.model; - -import com.chatopera.cc.basic.MainUtils; -import org.hibernate.annotations.GenericGenerator; -import org.springframework.data.elasticsearch.annotations.Document; - -import javax.persistence.*; -import java.util.Date; - -@Document(indexName = "cskefu", type = "quickreply") -@Entity -@Table(name = "uk_quickreply") -@org.hibernate.annotations.Proxy(lazy = false) -public class QuickReply { - - private String id = MainUtils.getUUID(); - - private String title ; //标题 - private String content ; //内容 - - private String type ; //公用 /私有 - private String creater; //创建人 - private Date createtime = new Date(); //创建时间 - - private String orgi ; // - - private String cate ; //所属分类 - - - @Id - @Column(length = 32) - @GeneratedValue(generator = "system-uuid") - @GenericGenerator(name = "system-uuid", strategy = "assigned") - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public String getContent() { - return content; - } - - public void setContent(String content) { - this.content = content; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public String getCreater() { - return creater; - } - - public void setCreater(String creater) { - this.creater = creater; - } - - public Date getCreatetime() { - return createtime; - } - - public void setCreatetime(Date createtime) { - this.createtime = createtime; - } - - public String getCate() { - return cate; - } - - public void setCate(String cate) { - this.cate = cate; - } - - public String getOrgi() { - return orgi; - } - - public void setOrgi(String orgi) { - this.orgi = orgi; - } -} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/model/QuickType.java b/contact-center/app/src/main/java/com/chatopera/cc/model/QuickType.java deleted file mode 100644 index 1fe11e09..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/model/QuickType.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.model; - -import org.hibernate.annotations.GenericGenerator; - -import javax.persistence.*; -import java.util.Date; - -@Entity -@Table(name = "uk_quick_type") -@org.hibernate.annotations.Proxy(lazy = false) -public class QuickType implements java.io.Serializable{ - - /** - * - */ - private static final long serialVersionUID = 1115593425069549681L; - - private String id ; - private String name ; - private String code ; - - private int inx; //知识分类排序位置 - - private String quicktype ; //个人/公共 - private Date createtime ; - private String creater; - private String username ; - - private Date startdate; //有效期开始 - private Date enddate ; //有效期结束 - - private boolean enable ; //状态是否可用 - - private String description ;//分类备注描述信息 - - private Date updatetime ; - private String parentid ; //父级ID - private String orgi ; - - @Id - @Column(length = 32) - @GeneratedValue(generator = "system-uuid") - @GenericGenerator(name = "system-uuid", strategy = "uuid") - public String getId() { - return id; - } - public void setId(String id) { - this.id = id; - } - public String getName() { - return name; - } - public void setName(String name) { - this.name = name; - } - public String getCode() { - return code; - } - public void setCode(String code) { - this.code = code; - } - public int getInx() { - return inx; - } - public void setInx(int inx) { - this.inx = inx; - } - public String getQuicktype() { - return quicktype; - } - public void setQuicktype(String quicktype) { - this.quicktype = quicktype; - } - public Date getCreatetime() { - return createtime; - } - public void setCreatetime(Date createtime) { - this.createtime = createtime; - } - public String getCreater() { - return creater; - } - public void setCreater(String creater) { - this.creater = creater; - } - public String getUsername() { - return username; - } - public void setUsername(String username) { - this.username = username; - } - public Date getStartdate() { - return startdate; - } - public void setStartdate(Date startdate) { - this.startdate = startdate; - } - public Date getEnddate() { - return enddate; - } - public void setEnddate(Date enddate) { - this.enddate = enddate; - } - public boolean isEnable() { - return enable; - } - public void setEnable(boolean enable) { - this.enable = enable; - } - public String getDescription() { - return description; - } - public void setDescription(String description) { - this.description = description; - } - public Date getUpdatetime() { - return updatetime; - } - public void setUpdatetime(Date updatetime) { - this.updatetime = updatetime; - } - public String getParentid() { - return parentid; - } - public void setParentid(String parentid) { - this.parentid = parentid; - } - public String getOrgi() { - return orgi; - } - public void setOrgi(String orgi) { - this.orgi = orgi; - } -} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/model/Scene.java b/contact-center/app/src/main/java/com/chatopera/cc/model/Scene.java deleted file mode 100644 index f8e22a72..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/model/Scene.java +++ /dev/null @@ -1,387 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.model; - -import com.chatopera.cc.basic.MainUtils; -import org.hibernate.annotations.GenericGenerator; - -import javax.persistence.*; -import java.util.Date; - - -/** - * - */ -@Entity -@Table(name = "uk_xiaoe_scene") -@org.hibernate.annotations.Proxy(lazy = false) -public class Scene implements java.io.Serializable{ - /** - * - */ - private static final long serialVersionUID = 1L; - - /** - * - */ - - private String id = MainUtils.getUUID(); - - private String sessionid ; - - private String title ; //标题 - private String content ; //内容 - private float price ; //问题价格 - private String keyword ; //关键词 - private String summary ; //摘要 - private boolean anonymous ; //是否匿名提问 - - private Date begintime ; //有效期开始 - private Date endtime ; //有效期结束 - - private boolean top ; //是否置顶 - private boolean essence ; //是否精华 - private boolean accept ; //是否已采纳最佳答案 - private boolean finish ; //结贴 - - private String replaytype ; //回复方式 , random ; order - private boolean allowask ; //允许AI自动询问用户 - - private String inputcon ; //输入条件 - private String outputcon ; //输出条件 - - private String userinput ; //用户输入的提问 首条 - private String aireply ; //AI回复的 首条 - - private int answers ; //回答数量 - - private int views ; //阅读数量 - private int followers ; //关注数量 - private int collections; //收藏数量 - private int comments ; //评论数量 - private boolean frommobile ; //是否移动端提问 - private String status ; // 状态 - private String tptype; //主题类型 问答:分享:讨论 - private String cate ; //主题 栏目 - - private String username ; - private String orgi ; - private String creater; - private Date createtime = new Date(); - private Date updatetime = new Date(); - private String memo; - private String organ; - - - /** - * @return the id - */ - @Id - @Column(length = 32) - @GeneratedValue(generator = "system-uuid") - @GenericGenerator(name = "system-uuid", strategy = "assigned") - public String getId() { - return id; - } - - @Transient - public String getSessionid() { - return sessionid; - } - - - public void setSessionid(String sessionid) { - this.sessionid = sessionid; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public String getContent() { - return content; - } - - public void setContent(String content) { - this.content = content; - } - - public float getPrice() { - return price; - } - - public void setPrice(float price) { - this.price = price; - } - - public String getKeyword() { - return keyword; - } - - public void setKeyword(String keyword) { - this.keyword = keyword; - } - - public String getSummary() { - return summary; - } - - public void setSummary(String summary) { - this.summary = summary; - } - - public boolean isAnonymous() { - return anonymous; - } - - public void setAnonymous(boolean anonymous) { - this.anonymous = anonymous; - } - - public String getTptype() { - return tptype; - } - - public void setTptype(String tptype) { - this.tptype = tptype; - } - - public int getAnswers() { - return answers; - } - - public void setAnswers(int answers) { - this.answers = answers; - } - - @Column(name="sviews") - public int getViews() { - return views; - } - - public void setViews(int views) { - this.views = views; - } - - public int getFollowers() { - return followers; - } - - public void setFollowers(int followers) { - this.followers = followers; - } - - public int getCollections() { - return collections; - } - - public void setCollections(int collections) { - this.collections = collections; - } - - public int getComments() { - return comments; - } - - public void setComments(int comments) { - this.comments = comments; - } - - public boolean isFrommobile() { - return frommobile; - } - - public void setFrommobile(boolean frommobile) { - this.frommobile = frommobile; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getOrgi() { - return orgi; - } - - public void setOrgi(String orgi) { - this.orgi = orgi; - } - - public String getCreater() { - return creater; - } - - public void setCreater(String creater) { - this.creater = creater; - } - - public Date getCreatetime() { - return createtime; - } - - public void setCreatetime(Date createtime) { - this.createtime = createtime; - } - - public Date getUpdatetime() { - return updatetime; - } - - public void setUpdatetime(Date updatetime) { - this.updatetime = updatetime; - } - - public String getMemo() { - return memo; - } - - public void setMemo(String memo) { - this.memo = memo; - } - - public String getOrgan() { - return organ; - } - - public void setOrgan(String organ) { - this.organ = organ; - } - - - public void setId(String id) { - this.id = id; - } - - public String getCate() { - return cate; - } - - public void setCate(String cate) { - this.cate = cate; - } - - public boolean isTop() { - return top; - } - - public void setTop(boolean top) { - this.top = top; - } - - public boolean isEssence() { - return essence; - } - - public void setEssence(boolean essence) { - this.essence = essence; - } - - public boolean isAccept() { - return accept; - } - - public void setAccept(boolean accept) { - this.accept = accept; - } - - public boolean isFinish() { - return finish; - } - - public void setFinish(boolean finish) { - this.finish = finish; - } - public Date getBegintime() { - return begintime; - } - - public void setBegintime(Date begintime) { - this.begintime = begintime; - } - - public Date getEndtime() { - return endtime; - } - - public void setEndtime(Date endtime) { - this.endtime = endtime; - } - - public String getReplaytype() { - return replaytype; - } - - public void setReplaytype(String replaytype) { - this.replaytype = replaytype; - } - - public boolean isAllowask() { - return allowask; - } - - public void setAllowask(boolean allowask) { - this.allowask = allowask; - } - - public String getInputcon() { - return inputcon; - } - - public void setInputcon(String inputcon) { - this.inputcon = inputcon; - } - - public String getOutputcon() { - return outputcon; - } - - public void setOutputcon(String outputcon) { - this.outputcon = outputcon; - } - - public String getUserinput() { - return userinput; - } - - public void setUserinput(String userinput) { - this.userinput = userinput; - } - - public String getAireply() { - return aireply; - } - - public void setAireply(String aireply) { - this.aireply = aireply; - } -} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/model/SceneType.java b/contact-center/app/src/main/java/com/chatopera/cc/model/SceneType.java deleted file mode 100644 index 44269350..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/model/SceneType.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.model; - -import org.hibernate.annotations.GenericGenerator; - -import javax.persistence.*; -import java.util.Date; - -@Entity -@Table(name = "uk_xiaoe_scene_type") -@org.hibernate.annotations.Proxy(lazy = false) -public class SceneType implements java.io.Serializable{ - - /** - * - */ - private static final long serialVersionUID = 1115593425069549681L; - - private String id ; - private String name ; - private String code ; - private Date createtime ; - private String creater; - private String username ; - private Date updatetime ; - private String orgi ; - - private String area ; - - @Id - @Column(length = 32) - @GeneratedValue(generator = "system-uuid") - @GenericGenerator(name = "system-uuid", strategy = "uuid") - public String getId() { - return id; - } - public void setId(String id) { - this.id = id; - } - public String getName() { - return name; - } - public void setName(String name) { - this.name = name; - } - public String getCode() { - return code; - } - public void setCode(String code) { - this.code = code; - } - public String getCreater() { - return creater; - } - public void setCreater(String creater) { - this.creater = creater; - } - public String getUsername() { - return username; - } - public void setUsername(String username) { - this.username = username; - } - public String getOrgi() { - return orgi; - } - public void setOrgi(String orgi) { - this.orgi = orgi; - } - public Date getCreatetime() { - return createtime; - } - public void setCreatetime(Date createtime) { - this.createtime = createtime; - } - public Date getUpdatetime() { - return updatetime; - } - public void setUpdatetime(Date updatetime) { - this.updatetime = updatetime; - } - public String getArea() { - return area; - } - public void setArea(String area) { - this.area = area; - } -} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/model/Topic.java b/contact-center/app/src/main/java/com/chatopera/cc/model/Topic.java deleted file mode 100644 index bb4c29d8..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/model/Topic.java +++ /dev/null @@ -1,413 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.model; - -import com.chatopera.cc.basic.MainUtils; -import org.hibernate.annotations.GenericGenerator; -import org.springframework.data.elasticsearch.annotations.Document; - -import javax.persistence.*; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - - -/** - * 表 uk_xiaoe_topic - */ -@Document(indexName = "cskefu", type = "xiaoe_topic") -@Entity -@Table(name = "uk_xiaoe_topic") -@org.hibernate.annotations.Proxy(lazy = false) -public class Topic implements java.io.Serializable{ - /** - * - */ - private static final long serialVersionUID = 1L; - - /** - * - */ - - private String id = MainUtils.getUUID(); - - private String sessionid ; - - private String title ; //标题 - private String content ; //内容 - private String weixin; //微信渠道回复 - private String email ; //邮件渠道回复 - private String sms ; //短信回复 - private String tts ; //语音播报回复 - - private float price ; //问题价格 - private String keyword ; //关键词 - private String summary ; //摘要 - private boolean anonymous ; //是否匿名提问 - - - private Date begintime ; //有效期开始 - - private Date endtime ; //有效期结束 - - private boolean top ; //是否置顶 - private boolean essence ; //是否精华 - private boolean accept ; //是否已采纳最佳答案 - private boolean finish ; //结贴 - - - @Transient - private List silimar = new ArrayList(); - - private int answers ; //回答数量 - - - private int views ; //阅读数量 - private int followers ; //关注数量 - private int collections; //收藏数量 - private int comments ; //评论数量 - private boolean mobile ; //是否移动端提问 - private String status ; // 状态 - private String tptype; //主题类型 问答:分享:讨论 - private String cate ; //主题 栏目 - - private String username ; - private String orgi ; - private String creater; - - private Date createtime = new Date(); - - private Date updatetime = new Date(); - private String memo; - private String organ; - - private String aiid ; //机器人ID - - - private User user ; - - - - - /** - * @return the id - */ - @Id - @Column(length = 32) - @GeneratedValue(generator = "system-uuid") - @GenericGenerator(name = "system-uuid", strategy = "assigned") - public String getId() { - return id; - } - - @Transient - public String getSessionid() { - return sessionid; - } - - - public void setSessionid(String sessionid) { - this.sessionid = sessionid; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public String getContent() { - return content; - } - - public void setContent(String content) { - this.content = content; - } - - public float getPrice() { - return price; - } - - public void setPrice(float price) { - this.price = price; - } - - public String getKeyword() { - return keyword; - } - - public void setKeyword(String keyword) { - this.keyword = keyword; - } - - public String getSummary() { - return summary; - } - - public void setSummary(String summary) { - this.summary = summary; - } - - public boolean isAnonymous() { - return anonymous; - } - - public void setAnonymous(boolean anonymous) { - this.anonymous = anonymous; - } - - public String getTptype() { - return tptype; - } - - public void setTptype(String tptype) { - this.tptype = tptype; - } - - public int getAnswers() { - return answers; - } - - public void setAnswers(int answers) { - this.answers = answers; - } - - @Column(name="sviews") - public int getViews() { - return views; - } - - public void setViews(int views) { - this.views = views; - } - - public int getFollowers() { - return followers; - } - - public void setFollowers(int followers) { - this.followers = followers; - } - - public int getCollections() { - return collections; - } - - public void setCollections(int collections) { - this.collections = collections; - } - - public int getComments() { - return comments; - } - - public void setComments(int comments) { - this.comments = comments; - } - - public boolean isMobile() { - return mobile; - } - - public void setMobile(boolean mobile) { - this.mobile = mobile; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getOrgi() { - return orgi; - } - - public void setOrgi(String orgi) { - this.orgi = orgi; - } - - public String getCreater() { - return creater; - } - - public void setCreater(String creater) { - this.creater = creater; - } - - public Date getCreatetime() { - return createtime; - } - - public void setCreatetime(Date createtime) { - this.createtime = createtime; - } - - public Date getUpdatetime() { - return updatetime; - } - - public void setUpdatetime(Date updatetime) { - this.updatetime = updatetime; - } - - public String getMemo() { - return memo; - } - - public void setMemo(String memo) { - this.memo = memo; - } - - public String getOrgan() { - return organ; - } - - public void setOrgan(String organ) { - this.organ = organ; - } - - - public void setId(String id) { - this.id = id; - } - - public String getCate() { - return cate; - } - - public void setCate(String cate) { - this.cate = cate; - } - - public boolean isTop() { - return top; - } - - public void setTop(boolean top) { - this.top = top; - } - - public boolean isEssence() { - return essence; - } - - public void setEssence(boolean essence) { - this.essence = essence; - } - - public boolean isAccept() { - return accept; - } - - public void setAccept(boolean accept) { - this.accept = accept; - } - - public boolean isFinish() { - return finish; - } - - public void setFinish(boolean finish) { - this.finish = finish; - } - @Transient - public User getUser() { - return user; - } - - public void setUser(User user) { - this.user = user; - } - - public Date getBegintime() { - return begintime; - } - - public void setBegintime(Date begintime) { - this.begintime = begintime; - } - - public Date getEndtime() { - return endtime; - } - - public void setEndtime(Date endtime) { - this.endtime = endtime; - } - - public String getWeixin() { - return weixin; - } - - public void setWeixin(String weixin) { - this.weixin = weixin; - } - - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - public String getSms() { - return sms; - } - - public void setSms(String sms) { - this.sms = sms; - } - - public String getTts() { - return tts; - } - - public void setTts(String tts) { - this.tts = tts; - } - @Transient - public List getSilimar() { - return silimar; - } - - public void setSilimar(List silimar) { - this.silimar = silimar; - } - - public String getAiid() { - return aiid; - } - - public void setAiid(String aiid) { - this.aiid = aiid; - } - -} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/model/TopicItem.java b/contact-center/app/src/main/java/com/chatopera/cc/model/TopicItem.java deleted file mode 100644 index 90cd1e63..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/model/TopicItem.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.model; - -import org.hibernate.annotations.GenericGenerator; - -import javax.persistence.*; -import java.util.Date; - -@Entity -@Table(name = "uk_xiaoe_topic_item") -@org.hibernate.annotations.Proxy(lazy = false) -public class TopicItem implements java.io.Serializable{ - - /** - * - */ - private static final long serialVersionUID = 1115593425069549681L; - - private String id ; - private String topicid ; - private String title ; - - private Date createtime ; - private String creater; - private String orgi ; - - @Id - @Column(length = 32) - @GeneratedValue(generator = "system-uuid") - @GenericGenerator(name = "system-uuid", strategy = "uuid") - public String getId() { - return id; - } - public void setId(String id) { - this.id = id; - } - public String getTopicid() { - return topicid; - } - public void setTopicid(String topicid) { - this.topicid = topicid; - } - public String getTitle() { - return title; - } - public void setTitle(String title) { - this.title = title; - } - public Date getCreatetime() { - return createtime; - } - public void setCreatetime(Date createtime) { - this.createtime = createtime; - } - public String getCreater() { - return creater; - } - public void setCreater(String creater) { - this.creater = creater; - } - public String getOrgi() { - return orgi; - } - public void setOrgi(String orgi) { - this.orgi = orgi; - } -} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/peer/PeerSyncIM.java b/contact-center/app/src/main/java/com/chatopera/cc/peer/PeerSyncIM.java index 506c1c45..6b23cc70 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/peer/PeerSyncIM.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/peer/PeerSyncIM.java @@ -35,6 +35,7 @@ import org.springframework.beans.BeansException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; +import org.springframework.context.annotation.Configuration; import org.springframework.stereotype.Component; import javax.annotation.PostConstruct; @@ -68,6 +69,8 @@ public class PeerSyncIM implements ApplicationContextAware { @PostConstruct public void postConstruct() { + applicationContext.getBeansWithAnnotation(Configuration.class); + composer = new Composer<>(); /** @@ -85,6 +88,11 @@ public class PeerSyncIM implements ApplicationContextAware { p.getPluginId() + PluginRegistry.PLUGIN_CHANNEL_MESSAGER_SUFFIX)); }); + pluginRegistry.getPlugin(Constants.CSKEFU_MODULE_MESSENGER).ifPresent(p -> { + composer.use((Middleware) applicationContext.getBean( + p.getPluginId() + PluginRegistry.PLUGIN_CHANNEL_MESSAGER_SUFFIX)); + }); + composer.use(imMw3); } diff --git a/contact-center/app/src/main/java/com/chatopera/cc/persistence/es/KbsTopicCommentEsCommonRepository.java b/contact-center/app/src/main/java/com/chatopera/cc/persistence/es/KbsTopicCommentEsCommonRepository.java deleted file mode 100644 index d28df883..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/persistence/es/KbsTopicCommentEsCommonRepository.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.persistence.es; - -import com.chatopera.cc.model.KbsTopicComment; -import org.springframework.data.domain.Page; -import org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilder; - -import java.util.List; - - -public interface KbsTopicCommentEsCommonRepository { - Page findByDataid(String id, int p, int ps) ; - - List findByOptimal(String dataid) ; - - Page findByCon(NativeSearchQueryBuilder searchQueryBuilder, String q, int p, int ps); - - Page findByCon(NativeSearchQueryBuilder searchQueryBuilder, String field, String aggname, String q, int p, int ps); - - Page countByCon(NativeSearchQueryBuilder searchQuery, String q, int p, int ps); -} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/persistence/es/KbsTopicCommentRepository.java b/contact-center/app/src/main/java/com/chatopera/cc/persistence/es/KbsTopicCommentRepository.java deleted file mode 100644 index 3317b207..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/persistence/es/KbsTopicCommentRepository.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.persistence.es; - -import com.chatopera.cc.model.KbsTopicComment; -import org.springframework.data.elasticsearch.repository.ElasticsearchRepository; - -public interface KbsTopicCommentRepository extends ElasticsearchRepository , KbsTopicCommentEsCommonRepository { -} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/persistence/es/KbsTopicCommentRepositoryImpl.java b/contact-center/app/src/main/java/com/chatopera/cc/persistence/es/KbsTopicCommentRepositoryImpl.java deleted file mode 100644 index 09a4ce2b..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/persistence/es/KbsTopicCommentRepositoryImpl.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.persistence.es; - -import com.chatopera.cc.model.KbsTopicComment; -import com.chatopera.cc.model.Topic; -import org.apache.commons.lang.StringUtils; -import org.elasticsearch.index.query.QueryStringQueryBuilder; -import org.elasticsearch.index.query.QueryStringQueryBuilder.Operator; -import org.elasticsearch.search.highlight.HighlightBuilder; -import org.elasticsearch.search.sort.FieldSortBuilder; -import org.elasticsearch.search.sort.SortOrder; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.PageRequest; -import org.springframework.data.elasticsearch.core.ElasticsearchTemplate; -import org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilder; -import org.springframework.data.elasticsearch.core.query.SearchQuery; -import org.springframework.stereotype.Component; - -import java.util.List; - -import static org.elasticsearch.index.query.QueryBuilders.termQuery; - -@Component -public class KbsTopicCommentRepositoryImpl implements KbsTopicCommentEsCommonRepository{ - private ElasticsearchTemplate elasticsearchTemplate; - - @Autowired - public void setElasticsearchTemplate(ElasticsearchTemplate elasticsearchTemplate) { - this.elasticsearchTemplate = elasticsearchTemplate; - } - @Override - public Page findByDataid(String id , int p , int ps) { - Page pages = null ; - SearchQuery searchQuery = new NativeSearchQueryBuilder().withQuery(termQuery("dataid" , id)).withSort(new FieldSortBuilder("optimal").unmappedType("boolean").order(SortOrder.DESC)).withSort(new FieldSortBuilder("updatetime").unmappedType("date").order(SortOrder.DESC)).build().setPageable(new PageRequest(p, ps)) ; - if(elasticsearchTemplate.indexExists(KbsTopicComment.class)){ - pages = elasticsearchTemplate.queryForPage(searchQuery, KbsTopicComment.class); - } - return pages ; - } - - @Override - public List findByOptimal(String dataid) { - List commentList = null ; - SearchQuery searchQuery = new NativeSearchQueryBuilder().withQuery(termQuery("dataid" , dataid)).withQuery(termQuery("optimal" , true)).build(); - if(elasticsearchTemplate.indexExists(KbsTopicComment.class)){ - commentList = elasticsearchTemplate.queryForList(searchQuery, KbsTopicComment.class); - } - return commentList ; - } - - @Override - public Page findByCon(NativeSearchQueryBuilder searchQueryBuilder , String field , String aggname, String q , final int p , final int ps) { - Page pages = null ; - if(!StringUtils.isBlank(q)){ - searchQueryBuilder.withQuery(new QueryStringQueryBuilder(q).defaultOperator(Operator.AND)) ; - } - SearchQuery searchQuery = searchQueryBuilder.build(); - if(elasticsearchTemplate.indexExists(KbsTopicComment.class)){ - if(!StringUtils.isBlank(q)){ - pages = elasticsearchTemplate.queryForPage(searchQuery, KbsTopicComment.class , new UKResultMapper()); - }else{ - pages = elasticsearchTemplate.queryForPage(searchQuery, KbsTopicComment.class , new UKAggTopResultExtractor(field , aggname)); - } - } - return pages ; - } - @Override - public Page findByCon( - NativeSearchQueryBuilder searchQueryBuilder, String q, int p, int ps) { - searchQueryBuilder.withPageable(new PageRequest(p, ps)).withSort(new FieldSortBuilder("updatetime").unmappedType("date").order(SortOrder.DESC)) ; - searchQueryBuilder.withHighlightFields(new HighlightBuilder.Field("content").fragmentSize(200)) ; - if(!StringUtils.isBlank(q)){ - searchQueryBuilder.withQuery(new QueryStringQueryBuilder(q).defaultOperator(Operator.AND)) ; - } - return elasticsearchTemplate.queryForPage(searchQueryBuilder.build(), KbsTopicComment.class , new UKResultMapper()) ; - } - - @Override - public Page countByCon( - NativeSearchQueryBuilder searchQueryBuilder, String q, int p, int ps) { - Page pages = null ; - if(!StringUtils.isBlank(q)){ - searchQueryBuilder.withQuery(new QueryStringQueryBuilder(q).defaultOperator(Operator.AND)) ; - } - SearchQuery searchQuery = searchQueryBuilder.build().setPageable(new PageRequest(p, ps)); - if(elasticsearchTemplate.indexExists(Topic.class)){ - pages = elasticsearchTemplate.queryForPage(searchQuery, KbsTopicComment.class , new UKAggResultExtractor("creater") ); - } - return pages ; - } -} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/persistence/es/KbsTopicEsCommonRepository.java b/contact-center/app/src/main/java/com/chatopera/cc/persistence/es/KbsTopicEsCommonRepository.java deleted file mode 100644 index af3dabad..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/persistence/es/KbsTopicEsCommonRepository.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.persistence.es; - -import com.chatopera.cc.model.KbsTopic; -import org.elasticsearch.index.query.BoolQueryBuilder; -import org.springframework.data.domain.Page; - -import java.util.List; - -public interface KbsTopicEsCommonRepository { - Page getTopicByCate(String cate, String q, int p, int ps) ; - - Page getTopicByTop(boolean top, int p, int ps) ; - - List getTopicByOrgi(String orgi, String type, String q) ; - - Page getTopicByCateAndUser(String cate, String q, String user, int p, int ps) ; - - Page getTopicByCon(BoolQueryBuilder booleanQueryBuilder, int p, int ps) ; -} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/persistence/es/KbsTopicRepository.java b/contact-center/app/src/main/java/com/chatopera/cc/persistence/es/KbsTopicRepository.java deleted file mode 100644 index 587e7985..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/persistence/es/KbsTopicRepository.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.persistence.es; - -import com.chatopera.cc.model.KbsTopic; -import org.springframework.data.elasticsearch.repository.ElasticsearchRepository; - -public interface KbsTopicRepository extends ElasticsearchRepository , KbsTopicEsCommonRepository { - -} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/persistence/es/KbsTopicRepositoryImpl.java b/contact-center/app/src/main/java/com/chatopera/cc/persistence/es/KbsTopicRepositoryImpl.java deleted file mode 100644 index 792c30ac..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/persistence/es/KbsTopicRepositoryImpl.java +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.persistence.es; - -import com.chatopera.cc.model.KbsTopic; -import org.apache.commons.lang.StringUtils; -import org.elasticsearch.index.query.BoolQueryBuilder; -import org.elasticsearch.index.query.QueryBuilder; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.index.query.QueryStringQueryBuilder; -import org.elasticsearch.index.query.QueryStringQueryBuilder.Operator; -import org.elasticsearch.search.highlight.HighlightBuilder; -import org.elasticsearch.search.sort.FieldSortBuilder; -import org.elasticsearch.search.sort.SortOrder; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.PageRequest; -import org.springframework.data.elasticsearch.core.ElasticsearchTemplate; -import org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilder; -import org.springframework.data.elasticsearch.core.query.SearchQuery; -import org.springframework.stereotype.Component; - -import java.util.Date; -import java.util.List; - -import static org.elasticsearch.index.query.QueryBuilders.termQuery; - -@Component -public class KbsTopicRepositoryImpl implements KbsTopicEsCommonRepository{ - private ElasticsearchTemplate elasticsearchTemplate; - - @Autowired - public void setElasticsearchTemplate(ElasticsearchTemplate elasticsearchTemplate) { - this.elasticsearchTemplate = elasticsearchTemplate; - } - @Override - public Page getTopicByCate(String cate , String q, final int p , final int ps) { - - Page pages = null ; - - BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery(); - boolQueryBuilder.must(termQuery("cate" , cate)) ; - - if(!StringUtils.isBlank(q)){ - boolQueryBuilder.must(new QueryStringQueryBuilder(q).defaultOperator(Operator.AND)) ; - } - NativeSearchQueryBuilder searchQueryBuilder = new NativeSearchQueryBuilder().withQuery(boolQueryBuilder).withSort(new FieldSortBuilder("createtime").unmappedType("date").order(SortOrder.DESC)); - searchQueryBuilder.withHighlightFields(new HighlightBuilder.Field("title").fragmentSize(200)) ; - SearchQuery searchQuery = searchQueryBuilder.build().setPageable(new PageRequest(p, ps)) ; - if(elasticsearchTemplate.indexExists(KbsTopic.class)){ - pages = elasticsearchTemplate.queryForPage(searchQuery, KbsTopic.class , new UKResultMapper()); - } - return pages ; - } - - @SuppressWarnings("deprecation") - @Override - public Page getTopicByTop(boolean top , final int p , final int ps) { - - Page pages = null ; - - BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery(); - boolQueryBuilder.must(termQuery("top" , top)) ; - - QueryBuilder beginFilter = QueryBuilders.boolQuery().should(QueryBuilders.missingQuery("begintime")).should(QueryBuilders.rangeQuery("begintime").from(new Date().getTime())) ; - QueryBuilder endFilter = QueryBuilders.boolQuery().should(QueryBuilders.missingQuery("endtime")).should(QueryBuilders.rangeQuery("endtime").to(new Date().getTime())) ; - - NativeSearchQueryBuilder searchQueryBuilder = new NativeSearchQueryBuilder().withQuery(boolQueryBuilder).withFilter(QueryBuilders.boolQuery().must(beginFilter).must(endFilter)).withSort(new FieldSortBuilder("createtime").unmappedType("date").order(SortOrder.DESC)); - - searchQueryBuilder.withHighlightFields(new HighlightBuilder.Field("title").fragmentSize(200)) ; - SearchQuery searchQuery = searchQueryBuilder.build().setPageable(new PageRequest(p, ps)) ; - if(elasticsearchTemplate.indexExists(KbsTopic.class)){ - pages = elasticsearchTemplate.queryForPage(searchQuery, KbsTopic.class , new UKResultMapper()); - } - return pages ; - } - - @Override - public Page getTopicByCateAndUser(String cate , String q , String user ,final int p , final int ps) { - - Page pages = null ; - - BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery(); - boolQueryBuilder.must(termQuery("cate" , cate)) ; - - if(!StringUtils.isBlank(q)){ - boolQueryBuilder.must(new QueryStringQueryBuilder(q).defaultOperator(Operator.AND)) ; - } - - NativeSearchQueryBuilder searchQueryBuilder = new NativeSearchQueryBuilder().withQuery(boolQueryBuilder).withQuery(termQuery("creater" , user)).withSort(new FieldSortBuilder("top").unmappedType("boolean").order(SortOrder.DESC)).withSort(new FieldSortBuilder("updatetime").unmappedType("date").order(SortOrder.DESC)); - SearchQuery searchQuery = searchQueryBuilder.build().setPageable(new PageRequest(p, ps)); - if(elasticsearchTemplate.indexExists(KbsTopic.class)){ - pages = elasticsearchTemplate.queryForPage(searchQuery, KbsTopic.class, new UKResultMapper()); - } - return pages ; - } - - @SuppressWarnings("deprecation") - @Override - public Page getTopicByCon(BoolQueryBuilder boolQueryBuilder, final int p , final int ps) { - - Page pages = null ; - - QueryBuilder beginFilter = QueryBuilders.boolQuery().should(QueryBuilders.missingQuery("begintime")).should(QueryBuilders.rangeQuery("begintime").from(new Date().getTime())) ; - QueryBuilder endFilter = QueryBuilders.boolQuery().should(QueryBuilders.missingQuery("endtime")).should(QueryBuilders.rangeQuery("endtime").to(new Date().getTime())) ; - - NativeSearchQueryBuilder searchQueryBuilder = new NativeSearchQueryBuilder().withQuery(boolQueryBuilder).withFilter(QueryBuilders.boolQuery().must(beginFilter).must(endFilter)).withSort(new FieldSortBuilder("createtime").unmappedType("date").order(SortOrder.DESC)); - - SearchQuery searchQuery = searchQueryBuilder.build().setPageable(new PageRequest(p, ps)) ; - if(elasticsearchTemplate.indexExists(KbsTopic.class)){ - pages = elasticsearchTemplate.queryForPage(searchQuery, KbsTopic.class); - } - return pages ; - } - @Override - public List getTopicByOrgi(String orgi , String type, String q) { - - List list = null ; - - BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery(); - boolQueryBuilder.must(termQuery("orgi" , orgi)) ; - - if(!StringUtils.isBlank(type)){ - boolQueryBuilder.must(termQuery("cate" , type)) ; - } - - if(!StringUtils.isBlank(q)){ - boolQueryBuilder.must(new QueryStringQueryBuilder(q).defaultOperator(Operator.AND)) ; - } - - NativeSearchQueryBuilder searchQueryBuilder = new NativeSearchQueryBuilder().withQuery(boolQueryBuilder).withSort(new FieldSortBuilder("top").unmappedType("boolean").order(SortOrder.DESC)).withSort(new FieldSortBuilder("updatetime").unmappedType("date").order(SortOrder.DESC)); - SearchQuery searchQuery = searchQueryBuilder.build(); - if(elasticsearchTemplate.indexExists(KbsTopic.class)){ - list = elasticsearchTemplate.queryForList(searchQuery, KbsTopic.class); - } - return list ; - } -} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/persistence/es/QuickReplyEsCommonRepository.java b/contact-center/app/src/main/java/com/chatopera/cc/persistence/es/QuickReplyEsCommonRepository.java deleted file mode 100644 index 85c4124d..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/persistence/es/QuickReplyEsCommonRepository.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.persistence.es; - -import com.chatopera.cc.model.QuickReply; -import org.elasticsearch.index.query.BoolQueryBuilder; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; - -import java.util.List; - -public interface QuickReplyEsCommonRepository { - - Page getByOrgiAndCate(String orgi, String cate, String q, Pageable page) ; - - Page getByQuicktype(String quicktype, int p, int ps) ; - - Page getByOrgiAndType(String orgi, String type, String q, Pageable page) ; - - List findByOrgiAndCreater(String orgi, String creater, String q) ; - - Page getByCateAndUser(String cate, String q, String user, int p, int ps) ; - - Page getByCon(BoolQueryBuilder booleanQueryBuilder, int p, int ps) ; - - void deleteByCate(String cate, String orgi) ; - - List getQuickReplyByOrgi(String orgi, String cate, String type, String q); -} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/persistence/es/QuickReplyRepository.java b/contact-center/app/src/main/java/com/chatopera/cc/persistence/es/QuickReplyRepository.java deleted file mode 100644 index ed673e8d..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/persistence/es/QuickReplyRepository.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.persistence.es; - -import com.chatopera.cc.model.QuickReply; -import org.springframework.data.elasticsearch.repository.ElasticsearchRepository; - -public interface QuickReplyRepository extends ElasticsearchRepository , QuickReplyEsCommonRepository { - -} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/persistence/es/QuickReplyRepositoryImpl.java b/contact-center/app/src/main/java/com/chatopera/cc/persistence/es/QuickReplyRepositoryImpl.java deleted file mode 100644 index 78cc6f77..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/persistence/es/QuickReplyRepositoryImpl.java +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.persistence.es; - -import com.chatopera.cc.basic.MainContext; -import com.chatopera.cc.model.QuickReply; -import org.apache.commons.lang.StringUtils; -import org.elasticsearch.index.query.BoolQueryBuilder; -import org.elasticsearch.index.query.QueryBuilder; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.index.query.QueryStringQueryBuilder; -import org.elasticsearch.index.query.QueryStringQueryBuilder.Operator; -import org.elasticsearch.search.highlight.HighlightBuilder; -import org.elasticsearch.search.sort.FieldSortBuilder; -import org.elasticsearch.search.sort.SortOrder; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.PageRequest; -import org.springframework.data.domain.Pageable; -import org.springframework.data.elasticsearch.core.ElasticsearchTemplate; -import org.springframework.data.elasticsearch.core.query.DeleteQuery; -import org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilder; -import org.springframework.data.elasticsearch.core.query.SearchQuery; -import org.springframework.stereotype.Component; - -import java.util.Date; -import java.util.List; - -import static org.elasticsearch.index.query.QueryBuilders.termQuery; - -@Component -public class QuickReplyRepositoryImpl implements QuickReplyEsCommonRepository{ - private ElasticsearchTemplate elasticsearchTemplate; - - @Autowired - public void setElasticsearchTemplate(ElasticsearchTemplate elasticsearchTemplate) { - this.elasticsearchTemplate = elasticsearchTemplate ; - } - @Override - public Page getByOrgiAndCate(String orgi , String cate , String q, Pageable page) { - - Page pages = null ; - - BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery(); - boolQueryBuilder.must(termQuery("cate" , cate)) ; - - if(!StringUtils.isBlank(q)){ - boolQueryBuilder.must(new QueryStringQueryBuilder(q).defaultOperator(Operator.AND)) ; - } - NativeSearchQueryBuilder searchQueryBuilder = new NativeSearchQueryBuilder().withQuery(boolQueryBuilder).withSort(new FieldSortBuilder("createtime").unmappedType("date").order(SortOrder.DESC)); - searchQueryBuilder.withHighlightFields(new HighlightBuilder.Field("title").fragmentSize(200)) ; - SearchQuery searchQuery = searchQueryBuilder.build().setPageable(page) ; - if(elasticsearchTemplate.indexExists(QuickReply.class)){ - pages = elasticsearchTemplate.queryForPage(searchQuery, QuickReply.class , new UKResultMapper()); - } - return pages ; - } - - @Override - public List findByOrgiAndCreater(String orgi ,String creater , String q) { - - List pages = null ; - - BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery(); - boolQueryBuilder.must(termQuery("orgi" , orgi)) ; - - BoolQueryBuilder quickQueryBuilder = QueryBuilders.boolQuery(); - - quickQueryBuilder.should(termQuery("type" , MainContext.QuickType.PUB.toString())) ; - - BoolQueryBuilder priQueryBuilder = QueryBuilders.boolQuery(); - - priQueryBuilder.must(termQuery("type" , MainContext.QuickType.PRI.toString())) ; - priQueryBuilder.must(termQuery("creater" , creater)) ; - - quickQueryBuilder.should(priQueryBuilder) ; - - boolQueryBuilder.must(quickQueryBuilder) ; - - if(!StringUtils.isBlank(q)){ - boolQueryBuilder.must(new QueryStringQueryBuilder(q).defaultOperator(Operator.AND)) ; - } - NativeSearchQueryBuilder searchQueryBuilder = new NativeSearchQueryBuilder().withQuery(boolQueryBuilder).withSort(new FieldSortBuilder("createtime").unmappedType("date").order(SortOrder.DESC)); - searchQueryBuilder.withHighlightFields(new HighlightBuilder.Field("title").fragmentSize(200)) ; - SearchQuery searchQuery = searchQueryBuilder.build().setPageable(new PageRequest(0, 10000)) ; - if(elasticsearchTemplate.indexExists(QuickReply.class)){ - pages = elasticsearchTemplate.queryForList(searchQuery, QuickReply.class); - } - return pages ; - } - - - @Override - public Page getByQuicktype(String quicktype , final int p , final int ps) { - - Page pages = null ; - - BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery(); - boolQueryBuilder.must(termQuery("type" , quicktype)) ; - - NativeSearchQueryBuilder searchQueryBuilder = new NativeSearchQueryBuilder().withQuery(boolQueryBuilder).withSort(new FieldSortBuilder("createtime").unmappedType("date").order(SortOrder.DESC)); - - searchQueryBuilder.withHighlightFields(new HighlightBuilder.Field("title").fragmentSize(200)) ; - SearchQuery searchQuery = searchQueryBuilder.build().setPageable(new PageRequest(p, ps)) ; - if(elasticsearchTemplate.indexExists(QuickReply.class)){ - pages = elasticsearchTemplate.queryForPage(searchQuery, QuickReply.class , new UKResultMapper()); - } - return pages ; - } - - @Override - public Page getByCateAndUser(String cate , String q , String user ,final int p , final int ps) { - - Page pages = null ; - - BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery(); - boolQueryBuilder.must(termQuery("cate" , cate)) ; - - if(!StringUtils.isBlank(q)){ - boolQueryBuilder.must(new QueryStringQueryBuilder(q).defaultOperator(Operator.AND)) ; - } - - NativeSearchQueryBuilder searchQueryBuilder = new NativeSearchQueryBuilder().withQuery(boolQueryBuilder).withQuery(termQuery("creater" , user)).withSort(new FieldSortBuilder("top").unmappedType("boolean").order(SortOrder.DESC)).withSort(new FieldSortBuilder("updatetime").unmappedType("date").order(SortOrder.DESC)); - SearchQuery searchQuery = searchQueryBuilder.build().setPageable(new PageRequest(p, ps)); - if(elasticsearchTemplate.indexExists(QuickReply.class)){ - pages = elasticsearchTemplate.queryForPage(searchQuery, QuickReply.class, new UKResultMapper()); - } - return pages ; - } - - @SuppressWarnings("deprecation") - @Override - public Page getByCon(BoolQueryBuilder boolQueryBuilder, final int p , final int ps) { - - Page pages = null ; - - QueryBuilder beginFilter = QueryBuilders.boolQuery().should(QueryBuilders.missingQuery("begintime")).should(QueryBuilders.rangeQuery("begintime").from(new Date().getTime())) ; - QueryBuilder endFilter = QueryBuilders.boolQuery().should(QueryBuilders.missingQuery("endtime")).should(QueryBuilders.rangeQuery("endtime").to(new Date().getTime())) ; - - NativeSearchQueryBuilder searchQueryBuilder = new NativeSearchQueryBuilder().withQuery(boolQueryBuilder).withFilter(QueryBuilders.boolQuery().must(beginFilter).must(endFilter)).withSort(new FieldSortBuilder("createtime").unmappedType("date").order(SortOrder.DESC)); - - SearchQuery searchQuery = searchQueryBuilder.build().setPageable(new PageRequest(p, ps)) ; - if(elasticsearchTemplate.indexExists(QuickReply.class)){ - pages = elasticsearchTemplate.queryForPage(searchQuery, QuickReply.class); - } - return pages ; - } - @Override - public Page getByOrgiAndType(String orgi ,String type, String q , Pageable page) { - - Page list = null ; - - BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery(); - boolQueryBuilder.must(termQuery("orgi" , orgi)) ; - if(!StringUtils.isBlank(type)) { - boolQueryBuilder.must(termQuery("type" , type)) ; - } - - if(!StringUtils.isBlank(q)){ - boolQueryBuilder.must(new QueryStringQueryBuilder(q).defaultOperator(Operator.AND)) ; - } - - NativeSearchQueryBuilder searchQueryBuilder = new NativeSearchQueryBuilder().withQuery(boolQueryBuilder).withSort(new FieldSortBuilder("createtime").unmappedType("date").order(SortOrder.DESC)); - SearchQuery searchQuery = searchQueryBuilder.build().setPageable(page); - if(elasticsearchTemplate.indexExists(QuickReply.class)){ - list = elasticsearchTemplate.queryForPage(searchQuery, QuickReply.class); - } - return list ; - } - @Override - public void deleteByCate(String cate ,String orgi) { - DeleteQuery deleteQuery = new DeleteQuery(); - BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery(); - boolQueryBuilder.must(termQuery("orgi" , orgi)) ; - boolQueryBuilder.must(termQuery("cate" , cate)) ; - deleteQuery.setQuery(boolQueryBuilder); - elasticsearchTemplate.delete(deleteQuery); - } - - @Override - public List getQuickReplyByOrgi(String orgi , String cate,String type, String q) { - - List list = null ; - - BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery(); - boolQueryBuilder.must(termQuery("orgi" , orgi)) ; - - if(!StringUtils.isBlank(cate)){ - boolQueryBuilder.must(termQuery("cate" , cate)) ; - } - if(!StringUtils.isBlank(type)){ - boolQueryBuilder.must(termQuery("type" , type)) ; - } - if(!StringUtils.isBlank(q)){ - boolQueryBuilder.must(new QueryStringQueryBuilder(q).defaultOperator(Operator.AND)) ; - } - - NativeSearchQueryBuilder searchQueryBuilder = new NativeSearchQueryBuilder().withQuery(boolQueryBuilder).withSort(new FieldSortBuilder("top").unmappedType("boolean").order(SortOrder.DESC)).withSort(new FieldSortBuilder("updatetime").unmappedType("date").order(SortOrder.DESC)); - SearchQuery searchQuery = searchQueryBuilder.build().setPageable(new PageRequest(0, 10000)); - if(elasticsearchTemplate.indexExists(QuickReply.class)){ - list = elasticsearchTemplate.queryForList(searchQuery, QuickReply.class); - } - return list ; - } -} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/persistence/es/TopicEsCommonRepository.java b/contact-center/app/src/main/java/com/chatopera/cc/persistence/es/TopicEsCommonRepository.java deleted file mode 100644 index 29dc03ff..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/persistence/es/TopicEsCommonRepository.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.persistence.es; - -import com.chatopera.cc.model.Topic; -import org.elasticsearch.index.query.BoolQueryBuilder; -import org.springframework.data.domain.Page; - -import java.util.List; - -public interface TopicEsCommonRepository { - Page getTopicByCateAndOrgi(String cate, String orgi, String q, int p, int ps) ; - - Page getTopicByTopAndOrgi(boolean top, String orgi, String aiid, int p, int ps) ; - - List getTopicByOrgi(String orgi, String type, String q) ; - - Page getTopicByCateAndUser(String cate, String q, String user, int p, int ps) ; - - Page getTopicByCon(BoolQueryBuilder booleanQueryBuilder, int p, int ps) ; -} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/persistence/es/TopicRepository.java b/contact-center/app/src/main/java/com/chatopera/cc/persistence/es/TopicRepository.java deleted file mode 100644 index 3c7844d1..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/persistence/es/TopicRepository.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.persistence.es; - -import com.chatopera.cc.model.Topic; -import org.springframework.data.elasticsearch.repository.ElasticsearchRepository; - -public interface TopicRepository extends ElasticsearchRepository , TopicEsCommonRepository { - -} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/persistence/es/TopicRepositoryImpl.java b/contact-center/app/src/main/java/com/chatopera/cc/persistence/es/TopicRepositoryImpl.java deleted file mode 100644 index b34177c7..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/persistence/es/TopicRepositoryImpl.java +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.persistence.es; - -import com.chatopera.cc.model.Topic; -import com.chatopera.cc.persistence.repository.XiaoEUKResultMapper; -import org.apache.commons.lang.StringUtils; -import org.elasticsearch.index.query.BoolQueryBuilder; -import org.elasticsearch.index.query.QueryBuilder; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.index.query.QueryStringQueryBuilder; -import org.elasticsearch.index.query.QueryStringQueryBuilder.Operator; -import org.elasticsearch.search.highlight.HighlightBuilder; -import org.elasticsearch.search.sort.FieldSortBuilder; -import org.elasticsearch.search.sort.SortOrder; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.PageRequest; -import org.springframework.data.elasticsearch.core.ElasticsearchTemplate; -import org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilder; -import org.springframework.data.elasticsearch.core.query.SearchQuery; -import org.springframework.stereotype.Component; - -import java.util.Date; -import java.util.List; - -import static org.elasticsearch.index.query.QueryBuilders.termQuery; - -@Component -public class TopicRepositoryImpl implements TopicEsCommonRepository{ - private ElasticsearchTemplate elasticsearchTemplate; - - @Autowired - public void setElasticsearchTemplate(ElasticsearchTemplate elasticsearchTemplate) { - this.elasticsearchTemplate = elasticsearchTemplate; - } - @Override - public Page getTopicByCateAndOrgi(String cate ,String orgi, String q, final int p , final int ps) { - - Page pages = null ; - - BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery(); - if(!StringUtils.isBlank(cate)) { - boolQueryBuilder.must(termQuery("cate" , cate)) ; - } - boolQueryBuilder.must(termQuery("orgi" , orgi)) ; - if(!StringUtils.isBlank(q)){ - boolQueryBuilder.must(new QueryStringQueryBuilder(q).defaultOperator(Operator.AND)) ; - } - NativeSearchQueryBuilder searchQueryBuilder = new NativeSearchQueryBuilder().withQuery(boolQueryBuilder).withSort(new FieldSortBuilder("top").unmappedType("boolean").order(SortOrder.DESC)).withSort(new FieldSortBuilder("createtime").unmappedType("date").order(SortOrder.DESC)); - searchQueryBuilder.withHighlightFields(new HighlightBuilder.Field("title").fragmentSize(200)) ; - SearchQuery searchQuery = searchQueryBuilder.build().setPageable(new PageRequest(p, ps)) ; - if(elasticsearchTemplate.indexExists(Topic.class)){ - pages = elasticsearchTemplate.queryForPage(searchQuery, Topic.class , new XiaoEUKResultMapper()); - } - return pages ; - } - - @SuppressWarnings("deprecation") - @Override - public Page getTopicByTopAndOrgi(boolean top ,String orgi, String aiid ,final int p , final int ps) { - - Page pages = null ; - - BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery(); - boolQueryBuilder.must(termQuery("top" , top)) ; - boolQueryBuilder.must(termQuery("orgi" , orgi)) ; - if(!StringUtils.isBlank(aiid)) { - boolQueryBuilder.must(termQuery("aiid" , aiid)) ; - } - - QueryBuilder beginFilter = QueryBuilders.boolQuery().should(QueryBuilders.missingQuery("begintime")).should(QueryBuilders.rangeQuery("begintime").to(new Date().getTime())) ; - QueryBuilder endFilter = QueryBuilders.boolQuery().should(QueryBuilders.missingQuery("endtime")).should(QueryBuilders.rangeQuery("endtime").from(new Date().getTime())) ; - - NativeSearchQueryBuilder searchQueryBuilder = new NativeSearchQueryBuilder().withQuery(boolQueryBuilder).withFilter(QueryBuilders.boolQuery().must(beginFilter).must(endFilter)).withSort(new FieldSortBuilder("createtime").unmappedType("date").order(SortOrder.DESC)); - - - searchQueryBuilder.withHighlightFields(new HighlightBuilder.Field("title").fragmentSize(200)) ; - SearchQuery searchQuery = searchQueryBuilder.build().setPageable(new PageRequest(p, ps)) ; - if(elasticsearchTemplate.indexExists(Topic.class)){ - pages = elasticsearchTemplate.queryForPage(searchQuery, Topic.class , new XiaoEUKResultMapper()); - } - return pages ; - } - - @Override - public Page getTopicByCateAndUser(String cate , String q , String user ,final int p , final int ps) { - - Page pages = null ; - - BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery(); - boolQueryBuilder.must(termQuery("cate" , cate)) ; - - if(!StringUtils.isBlank(q)){ - boolQueryBuilder.must(new QueryStringQueryBuilder(q).defaultOperator(Operator.AND)) ; - } - - NativeSearchQueryBuilder searchQueryBuilder = new NativeSearchQueryBuilder().withQuery(boolQueryBuilder).withQuery(termQuery("creater" , user)).withSort(new FieldSortBuilder("top").unmappedType("boolean").order(SortOrder.DESC)).withSort(new FieldSortBuilder("updatetime").unmappedType("date").order(SortOrder.DESC)); - SearchQuery searchQuery = searchQueryBuilder.build().setPageable(new PageRequest(p, ps)); - if(elasticsearchTemplate.indexExists(Topic.class)){ - pages = elasticsearchTemplate.queryForPage(searchQuery, Topic.class, new XiaoEUKResultMapper()); - } - return pages ; - } - - @SuppressWarnings("deprecation") - @Override - public Page getTopicByCon(BoolQueryBuilder boolQueryBuilder, final int p , final int ps) { - - Page pages = null ; - - QueryBuilder beginFilter = QueryBuilders.boolQuery().should(QueryBuilders.missingQuery("begintime")).should(QueryBuilders.rangeQuery("begintime").to(new Date().getTime())) ; - QueryBuilder endFilter = QueryBuilders.boolQuery().should(QueryBuilders.missingQuery("endtime")).should(QueryBuilders.rangeQuery("endtime").from(new Date().getTime())) ; - - NativeSearchQueryBuilder searchQueryBuilder = new NativeSearchQueryBuilder().withQuery(boolQueryBuilder).withFilter(QueryBuilders.boolQuery().must(beginFilter).must(endFilter)).withSort(new FieldSortBuilder("createtime").unmappedType("date").order(SortOrder.DESC)); - SearchQuery searchQuery = searchQueryBuilder.build().setPageable(new PageRequest(p, ps)) ; - if(elasticsearchTemplate.indexExists(Topic.class)){ - pages = elasticsearchTemplate.queryForPage(searchQuery, Topic.class); - } - return pages ; - } - @Override - public List getTopicByOrgi(String orgi , String type, String q) { - - List list = null ; - - BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery(); - boolQueryBuilder.must(termQuery("orgi" , orgi)) ; - - if(!StringUtils.isBlank(type)){ - boolQueryBuilder.must(termQuery("cate" , type)) ; - } - - if(!StringUtils.isBlank(q)){ - boolQueryBuilder.must(new QueryStringQueryBuilder(q).defaultOperator(Operator.AND)) ; - } - - NativeSearchQueryBuilder searchQueryBuilder = new NativeSearchQueryBuilder().withQuery(boolQueryBuilder).withSort(new FieldSortBuilder("top").unmappedType("boolean").order(SortOrder.DESC)).withSort(new FieldSortBuilder("updatetime").unmappedType("date").order(SortOrder.DESC)); - SearchQuery searchQuery = searchQueryBuilder.build(); - if(elasticsearchTemplate.indexExists(Topic.class)){ - list = elasticsearchTemplate.queryForList(searchQuery, Topic.class); - } - return list ; - } -} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/persistence/es/UKAggResultExtractor.java b/contact-center/app/src/main/java/com/chatopera/cc/persistence/es/UKAggResultExtractor.java deleted file mode 100644 index 3025cd05..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/persistence/es/UKAggResultExtractor.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.persistence.es; - -import com.chatopera.cc.model.KbsTopic; -import com.chatopera.cc.model.KbsTopicComment; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.search.aggregations.Aggregations; -import org.elasticsearch.search.aggregations.bucket.histogram.InternalDateHistogram; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.springframework.data.domain.Pageable; -import org.springframework.data.elasticsearch.core.aggregation.AggregatedPage; -import org.springframework.data.elasticsearch.core.aggregation.impl.AggregatedPageImpl; - -import java.util.ArrayList; -import java.util.List; - - -public class UKAggResultExtractor extends UKResultMapper{ - - private String term ; - - public UKAggResultExtractor(String term){ - this.term = term ; - } - - @SuppressWarnings("unchecked") - @Override - public AggregatedPage mapResults(SearchResponse response, Class clazz, Pageable pageable) { - Aggregations aggregations = response.getAggregations(); - List results = new ArrayList(); - long total = 0 ; - if(aggregations!=null && aggregations.get(term)!=null){ - if(aggregations.get(term) instanceof Terms){ - Terms agg = aggregations.get(term) ; - if(agg!=null){ - total = agg.getSumOfOtherDocCounts() ; - if(agg.getBuckets()!=null && agg.getBuckets().size()>0){ - for (Terms.Bucket entry : agg.getBuckets()) { - if(clazz.equals(KbsTopic.class)){ - KbsTopic topic = new KbsTopic(); - topic.setCreater(entry.getKeyAsString()); - topic.setRowcount((int) entry.getDocCount()); - results.add((T) topic) ; - }else if(clazz.equals(KbsTopicComment.class)){ - KbsTopicComment topicComment = new KbsTopicComment(); - topicComment.setCreater(entry.getKeyAsString()); - topicComment.setRowcount((int) entry.getDocCount()); - results.add((T) topicComment) ; - } - } - } - } - }else if(aggregations.get(term) instanceof InternalDateHistogram){ - InternalDateHistogram agg = aggregations.get(term) ; - total = response.getHits().getTotalHits() ; - if(agg!=null){ - // if(agg.getBuckets()!=null && agg.getBuckets().size()>0){ - // for (DateHistogram.Bucket entry : agg.getBuckets()) { - // if(clazz.equals(KbsTopic.class)){ - // KbsTopic topic = new KbsTopic(); - // topic.setKey(entry.getKey().substring(0 , 10)); - // topic.setRowcount((int) entry.getDocCount()); - // results.add((T) topic) ; - // } - // } - // } - } - } - } - return new AggregatedPageImpl(results, pageable, total); - } -} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/persistence/impl/QuickTypeDataExchangeImpl.java b/contact-center/app/src/main/java/com/chatopera/cc/persistence/impl/QuickTypeDataExchangeImpl.java deleted file mode 100644 index 1a0a4ece..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/persistence/impl/QuickTypeDataExchangeImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.persistence.impl; - -import com.chatopera.cc.model.QuickType; -import com.chatopera.cc.persistence.interfaces.DataExchangeInterface; -import com.chatopera.cc.persistence.repository.QuickTypeRepository; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.io.Serializable; -import java.util.List; - -@Service("quicktypedata") -public class QuickTypeDataExchangeImpl implements DataExchangeInterface { - @Autowired - private QuickTypeRepository quickTypeRes ; - - public String getDataByIdAndOrgi(String id, String orgi){ - QuickType quickType = quickTypeRes.findByIdAndOrgi(id,orgi); - return quickType!=null ? quickType.getName() : id; - } - - @Override - public List getListDataByIdAndOrgi(String id , String creater, String orgi) { - return null ; - } - - public void process(Object data , String orgi) { - - } -} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/persistence/impl/TopicDataExchangeImpl.java b/contact-center/app/src/main/java/com/chatopera/cc/persistence/impl/TopicDataExchangeImpl.java deleted file mode 100644 index 2a3fd7b9..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/persistence/impl/TopicDataExchangeImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.persistence.impl; - -import com.chatopera.cc.model.Topic; -import com.chatopera.cc.persistence.es.TopicRepository; -import com.chatopera.cc.persistence.interfaces.DataExchangeInterface; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; - -@Service("topic") -public class TopicDataExchangeImpl implements DataExchangeInterface{ - @Autowired - private TopicRepository topicRes ; - - public Topic getDataByIdAndOrgi(String id, String orgi){ - return topicRes.findOne(id) ; - } - - @Override - public List getListDataByIdAndOrgi(String id , String creater, String orgi) { - return topicRes.getTopicByTopAndOrgi(true,orgi , id , 0, 10).getContent() ; - } - - public void process(Object data , String orgi) { - - } -} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/persistence/impl/TopicMoreDataExchangeImpl.java b/contact-center/app/src/main/java/com/chatopera/cc/persistence/impl/TopicMoreDataExchangeImpl.java deleted file mode 100644 index aa577f2b..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/persistence/impl/TopicMoreDataExchangeImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.persistence.impl; - -import com.chatopera.cc.model.TopicItem; -import com.chatopera.cc.persistence.interfaces.DataExchangeInterface; -import com.chatopera.cc.persistence.repository.TopicItemRepository; -import com.chatopera.cc.util.dsdata.process.TopicProcess; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; - -@Service("topicmore") -public class TopicMoreDataExchangeImpl implements DataExchangeInterface{ - @Autowired - private TopicItemRepository topicItemRes ; - - private TopicProcess topicProcess = new TopicProcess(); - - public TopicItem getDataByIdAndOrgi(String id, String orgi){ - return topicItemRes.findByIdAndOrgi(id, orgi) ; - } - - @Override - public List getListDataByIdAndOrgi(String id , String creater, String orgi) { - return null ; - } - - public void process(Object data , String orgi) { - topicProcess.process(data, orgi); - } -} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/persistence/impl/TopicTypeDataExchangeImpl.java b/contact-center/app/src/main/java/com/chatopera/cc/persistence/impl/TopicTypeDataExchangeImpl.java deleted file mode 100644 index 9cb6f317..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/persistence/impl/TopicTypeDataExchangeImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.persistence.impl; - -import com.chatopera.cc.model.KnowledgeType; -import com.chatopera.cc.persistence.interfaces.DataExchangeInterface; -import com.chatopera.cc.persistence.repository.KnowledgeTypeRepository; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; - -@Service("topictype") -public class TopicTypeDataExchangeImpl implements DataExchangeInterface{ - @Autowired - private KnowledgeTypeRepository knowledgeTypeRes ; - - public KnowledgeType getDataByIdAndOrgi(String id, String orgi){ - return knowledgeTypeRes.findByIdAndOrgi(id, orgi) ; - } - - @Override - public List getListDataByIdAndOrgi(String id , String creater, String orgi) { - return knowledgeTypeRes.findByOrgi(orgi) ; - } - - public void process(Object data , String orgi) { - - } -} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/persistence/repository/AgentUserRepository.java b/contact-center/app/src/main/java/com/chatopera/cc/persistence/repository/AgentUserRepository.java index 2867e418..ec0d400e 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/persistence/repository/AgentUserRepository.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/persistence/repository/AgentUserRepository.java @@ -94,5 +94,13 @@ public interface AgentUserRepository extends JpaRepository { "ORDER BY u.createtime DESC LIMIT 1", nativeQuery = true) Optional findOneByContactIdAndChannelAndOrgi(final String contactid, final String channel, final String orgi); + @Query(value = "SELECT * FROM uk_agentuser AS u " + + "WHERE u.userid = ?1 " + + "AND u.channel = ?3 AND NOT u.status = ?2 AND u.orgi = ?4 " + + "ORDER BY u.createtime DESC LIMIT 1", nativeQuery = true) + Optional findOneByUseridAndStatusNotAndChannelAndOrgi(final String userid, final String status, final String channel, final String orgi); + + AgentUser findOneByUseridAndStatusAndChannelAndOrgi(String userid, String status, String channel, String orgi); + } diff --git a/contact-center/app/src/main/java/com/chatopera/cc/persistence/repository/CubeService.java b/contact-center/app/src/main/java/com/chatopera/cc/persistence/repository/CubeService.java index 57f47898..e3e79a1b 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/persistence/repository/CubeService.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/persistence/repository/CubeService.java @@ -23,7 +23,7 @@ import com.chatopera.cc.util.bi.CubeReportData; import com.chatopera.cc.util.bi.model.FirstTitle; import com.chatopera.cc.util.bi.model.Level; import com.chatopera.cc.util.bi.model.ValueData; -import freemarker.template.TemplateException; + import mondrian.olap.*; import mondrian.rolap.RolapCubeLevel; import mondrian.rolap.RolapLevel; @@ -40,9 +40,8 @@ public class CubeService { private String SCHEMA_DATA_PATH = "WEB-INF/data/mdx/"; private File schemaFile = null ; - - - public CubeService(String xml , String path , DataSourceService dataSource , Map requestValues) throws IOException, TemplateException { + + public CubeService(String xml , String path , DataSourceService dataSource , Map requestValues) throws IOException { this.dataSource = dataSource ; File mdxFileDir = new File(path , "mdx") ; if(!mdxFileDir.exists()){ @@ -54,7 +53,7 @@ public class CubeService { FileUtils.write(schemaFile, MainUtils.getTemplet(writer.toString(), requestValues) , "UTF-8"); //使用系统默认编码 } - public CubeService(String xml , String path , DataSourceService dataSource , Map requestValues,boolean isContentStr) throws IOException, TemplateException { + public CubeService(String xml , String path , DataSourceService dataSource , Map requestValues,boolean isContentStr) throws IOException { this.dataSource = dataSource ; File mdxFileDir = new File(path , "mdx") ; if(!mdxFileDir.exists()){ diff --git a/contact-center/app/src/main/java/com/chatopera/cc/persistence/repository/TopicItemRepository.java b/contact-center/app/src/main/java/com/chatopera/cc/persistence/repository/FbMessengerRepository.java similarity index 64% rename from contact-center/app/src/main/java/com/chatopera/cc/persistence/repository/TopicItemRepository.java rename to contact-center/app/src/main/java/com/chatopera/cc/persistence/repository/FbMessengerRepository.java index 925ba9c1..df601a91 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/persistence/repository/TopicItemRepository.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/persistence/repository/FbMessengerRepository.java @@ -1,29 +1,28 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.persistence.repository; - -import com.chatopera.cc.model.TopicItem; -import org.springframework.data.jpa.repository.JpaRepository; - -import java.util.List; - -public interface TopicItemRepository extends JpaRepository { - List findByTopicid(String topicid); - - TopicItem findByIdAndOrgi(String id, String orgi); - -} +/* + * Copyright (C) 2019 Chatopera Inc, + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.chatopera.cc.persistence.repository; + +import com.chatopera.cc.model.FbMessenger; +import org.springframework.data.jpa.repository.JpaRepository; + +import java.util.List; +import java.util.Set; + +public interface FbMessengerRepository extends JpaRepository { + List findByOrganIn(final Set organs); + FbMessenger findOneByPageId(final String pageId); +} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/persistence/repository/SceneRepository.java b/contact-center/app/src/main/java/com/chatopera/cc/persistence/repository/FbOTNFollowRepository.java similarity index 60% rename from contact-center/app/src/main/java/com/chatopera/cc/persistence/repository/SceneRepository.java rename to contact-center/app/src/main/java/com/chatopera/cc/persistence/repository/FbOTNFollowRepository.java index 3dbe523c..ab567ae6 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/persistence/repository/SceneRepository.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/persistence/repository/FbOTNFollowRepository.java @@ -1,27 +1,28 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.persistence.repository; - -import com.chatopera.cc.model.Scene; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.data.jpa.repository.JpaRepository; - -public interface SceneRepository extends JpaRepository{ - - Page findByOrgiAndCate(String orgi, String cate, Pageable paramPageable); -} +/* + * Copyright (C) 2018-2019 Chatopera Inc, + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.chatopera.cc.persistence.repository; + +import com.chatopera.cc.model.FbMessenger; +import com.chatopera.cc.model.FbOTN; +import com.chatopera.cc.model.FbOtnFollow; +import org.springframework.data.jpa.repository.JpaRepository; + +import java.util.List; + +public interface FbOTNFollowRepository extends JpaRepository { + List findByOtnId(final String otnId); +} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/persistence/repository/FbOTNRepository.java b/contact-center/app/src/main/java/com/chatopera/cc/persistence/repository/FbOTNRepository.java new file mode 100644 index 00000000..b2430933 --- /dev/null +++ b/contact-center/app/src/main/java/com/chatopera/cc/persistence/repository/FbOTNRepository.java @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2018-2019 Chatopera Inc, + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.chatopera.cc.persistence.repository; + +import com.chatopera.cc.model.FbMessenger; +import com.chatopera.cc.model.FbOTN; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Modifying; +import org.springframework.data.jpa.repository.Query; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Collection; +import java.util.List; +import java.util.Set; + +public interface FbOTNRepository extends JpaRepository { + List findByPageId(final String pageId); + + @Query(nativeQuery = true, value = "select o.* from cs_fb_otn o left join cs_fb_messenger m on o.page_id = m.page_id where m.organ in (?1)") + List findByOrgans(final Collection organIds); + + Page findByPageIdIn(final Collection organIds, Pageable page); + + @Transactional + @Modifying + @Query(nativeQuery = true, value = "update cs_fb_otn set sub_num = sub_num +1 where id = ?1") + void incOneSubNumById(final String id); +} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/persistence/repository/KbsExpertRepository.java b/contact-center/app/src/main/java/com/chatopera/cc/persistence/repository/KbsExpertRepository.java deleted file mode 100644 index 25899d85..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/persistence/repository/KbsExpertRepository.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.persistence.repository; - -import com.chatopera.cc.model.KbsExpert; -import com.chatopera.cc.model.User; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.data.jpa.repository.JpaRepository; - -import java.util.List; - -public interface KbsExpertRepository extends JpaRepository -{ - - Page findByOrgiAndKbstype(String orgi, String kbstype, Pageable paramPageable); - - List findByOrgiAndKbstype(String orgi, String kbstype); - - List findByOrgiAndUser(String orgi, User user); -} - diff --git a/contact-center/app/src/main/java/com/chatopera/cc/persistence/repository/KbsTypeRepository.java b/contact-center/app/src/main/java/com/chatopera/cc/persistence/repository/KbsTypeRepository.java deleted file mode 100644 index bcc48d88..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/persistence/repository/KbsTypeRepository.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.persistence.repository; - -import com.chatopera.cc.model.KbsType; -import org.springframework.data.jpa.repository.JpaRepository; - -import java.util.List; - -public interface KbsTypeRepository extends JpaRepository { - - KbsType findByIdAndOrgi(String id, String orgi); - - int countByNameAndOrgi(String name, String orgi); - - List findByOrgi(String orgi) ; - - int countByOrgiAndNameAndParentid(String orgi, String name, String parentid) ; - -} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/persistence/repository/KnowledgeTypeRepository.java b/contact-center/app/src/main/java/com/chatopera/cc/persistence/repository/KnowledgeTypeRepository.java deleted file mode 100644 index 1f3b3449..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/persistence/repository/KnowledgeTypeRepository.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.persistence.repository; - -import com.chatopera.cc.model.KnowledgeType; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.data.jpa.domain.Specification; -import org.springframework.data.jpa.repository.JpaRepository; - -import java.util.List; - -public interface KnowledgeTypeRepository extends - JpaRepository { - - KnowledgeType findByIdAndOrgi(String id, String orgi); - - int countByNameAndOrgiAndIdNot(String name, String orgi, String id); - - int countByNameAndOrgiAndParentidNot(String name, String orgi, String parentid); - - List findByOrgi(String orgi) ; - - List findByOrgiAndTypeid(String orgi, String typeid) ; - - KnowledgeType findByNameAndOrgi(String name, String orgi); - - KnowledgeType findByNameAndOrgiAndIdNot(String name, String orgi, String id); - - Page findAll(Specification spec, Pageable pageable); //分页按条件查询 -} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/persistence/repository/QuickTypeRepository.java b/contact-center/app/src/main/java/com/chatopera/cc/persistence/repository/QuickTypeRepository.java deleted file mode 100644 index 526af5bb..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/persistence/repository/QuickTypeRepository.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.persistence.repository; - -import com.chatopera.cc.model.QuickType; -import org.springframework.data.jpa.repository.JpaRepository; - -import java.util.List; - -public interface QuickTypeRepository extends JpaRepository { - - QuickType findByIdAndOrgi(String id, String orgi); - - int countByNameAndOrgi(String name, String orgi); - - /** - * 获取所有的公共分类 - * @param orgi - * @param quicktype - * @return - */ - List findByOrgiAndQuicktype(String orgi, String quicktype) ; - - /** - * 获取个人分类 - * @param orgi - * @param quicktype - * @param creater - * @return - */ - List findByOrgiAndQuicktypeAndCreater(String orgi, String quicktype, String creater) ; - - int countByOrgiAndNameAndParentid(String orgi, String name, String parentid) ; - - QuickType findByOrgiAndName(String orgi, String name); - -} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/persistence/repository/ReportCubeService.java b/contact-center/app/src/main/java/com/chatopera/cc/persistence/repository/ReportCubeService.java index 3e1fc458..6c15571b 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/persistence/repository/ReportCubeService.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/persistence/repository/ReportCubeService.java @@ -21,7 +21,7 @@ import com.chatopera.cc.basic.MainContext; import com.chatopera.cc.basic.MainUtils; import com.chatopera.cc.model.*; import com.chatopera.cc.util.bi.ReportData; -import freemarker.template.TemplateException; + import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; diff --git a/contact-center/app/src/main/java/com/chatopera/cc/proxy/AgentServiceProxy.java b/contact-center/app/src/main/java/com/chatopera/cc/proxy/AgentServiceProxy.java index 3cf03cba..ab064138 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/proxy/AgentServiceProxy.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/proxy/AgentServiceProxy.java @@ -20,7 +20,6 @@ import com.chatopera.cc.basic.Constants; import com.chatopera.cc.basic.MainContext; import com.chatopera.cc.model.*; import com.chatopera.cc.persistence.es.ContactsRepository; -import com.chatopera.cc.persistence.es.QuickReplyRepository; import com.chatopera.cc.persistence.interfaces.DataExchangeInterface; import com.chatopera.cc.persistence.repository.*; import com.chatopera.cc.util.mobile.MobileAddress; @@ -68,12 +67,6 @@ public class AgentServiceProxy { @Autowired private TagRepository tagRes; - @Autowired - private QuickTypeRepository quickTypeRes; - - @Autowired - private QuickReplyRepository quickReplyRes; - @Autowired private TagRelationRepository tagRelationRes; @@ -83,6 +76,9 @@ public class AgentServiceProxy { @Autowired private ContactsRepository contactsRes; + @Autowired + private ChatbotRepository chatbotRes; + /** * 关联关系 * @@ -200,10 +196,10 @@ public class AgentServiceProxy { final User logined) { view.addObject("curagentuser", agentUser); - CousultInvite invite = OnlineUserProxy.consult(agentUser.getAppid(), agentUser.getOrgi()); - if (invite != null) { - view.addObject("aisuggest", invite.isAisuggest()); - view.addObject("ccaAisuggest", invite.isAisuggest()); + Chatbot c = chatbotRes.findBySnsAccountIdentifierAndOrgi(agentUser.getAppid(), agentUser.getOrgi()); + if (c != null) { + view.addObject("aisuggest", c.isAisuggest()); + view.addObject("ccaAisuggest", c.isAisuggest()); } // 客服设置 @@ -255,14 +251,5 @@ public class AgentServiceProxy { if (service != null) { view.addObject("tags", tagRes.findByOrgiAndTagtypeAndSkill(orgi, MainContext.ModelType.USER.toString(), service.getSkill())); } - view.addObject("quickReplyList", quickReplyRes.findByOrgiAndCreater(logined.getOrgi(), logined.getId(), null)); - List quickTypeList = quickTypeRes.findByOrgiAndQuicktype( - logined.getOrgi(), MainContext.QuickType.PUB.toString()); - List priQuickTypeList = quickTypeRes.findByOrgiAndQuicktypeAndCreater( - logined.getOrgi(), - MainContext.QuickType.PRI.toString(), - logined.getId()); - quickTypeList.addAll(priQuickTypeList); - view.addObject("pubQuickTypeList", quickTypeList); } } diff --git a/contact-center/app/src/main/java/com/chatopera/cc/proxy/AgentUserProxy.java b/contact-center/app/src/main/java/com/chatopera/cc/proxy/AgentUserProxy.java index 3a09b1f8..721307b0 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/proxy/AgentUserProxy.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/proxy/AgentUserProxy.java @@ -25,7 +25,7 @@ import com.chatopera.cc.peer.PeerSyncIM; import com.chatopera.cc.persistence.es.ContactsRepository; import com.chatopera.cc.persistence.repository.*; import com.chatopera.cc.socketio.message.Message; -import freemarker.template.TemplateException; + import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -183,7 +183,6 @@ public class AgentUserProxy { * @param logined * @param orgi * @throws IOException - * @throws TemplateException */ public void buildIndexViewWithModels( final ModelAndView view, @@ -193,7 +192,7 @@ public class AgentUserProxy { String sort, final User logined, final String orgi, - final AgentUser agentUser) throws IOException, TemplateException { + final AgentUser agentUser) throws IOException { Sort defaultSort = null; if (StringUtils.isBlank(sort)) { Cookie[] cookies = request.getCookies();// 这样便可以获取一个cookie数组 diff --git a/contact-center/app/src/main/java/com/chatopera/cc/proxy/OnlineUserProxy.java b/contact-center/app/src/main/java/com/chatopera/cc/proxy/OnlineUserProxy.java index e7fb119d..6ef80879 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/proxy/OnlineUserProxy.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/proxy/OnlineUserProxy.java @@ -22,13 +22,12 @@ import com.chatopera.cc.basic.MainUtils; import com.chatopera.cc.cache.Cache; import com.chatopera.cc.model.*; import com.chatopera.cc.persistence.es.ContactsRepository; -import com.chatopera.cc.persistence.interfaces.DataExchangeInterface; import com.chatopera.cc.persistence.repository.*; import com.chatopera.cc.socketio.message.OtherMessageItem; import com.chatopera.cc.util.*; import com.fasterxml.jackson.databind.JavaType; import com.fasterxml.jackson.databind.ObjectMapper; -import freemarker.template.TemplateException; + import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -212,117 +211,6 @@ public class OnlineUserProxy { return atList; } - /** - * 只要有一级 地区命中就就返回 - * - * @param orgi - * @param ipdata - * @param topicTypeList - * @return - */ - public static List topicType(String orgi, IP ipdata, List topicTypeList) { - List tempTopicTypeList = new ArrayList(); - for (KnowledgeType topicType : topicTypeList) { - if (getParentArea(ipdata, topicType, topicTypeList) != null) { - tempTopicTypeList.add(topicType); - } - } - return tempTopicTypeList; - } - - /** - * @param topicType - * @param topicTypeList - * @return - */ - private static KnowledgeType getParentArea(IP ipdata, KnowledgeType topicType, List topicTypeList) { - KnowledgeType area = null; - if (StringUtils.isNotBlank(topicType.getArea())) { - if ((topicType.getArea().indexOf(ipdata.getProvince()) >= 0 || topicType.getArea().indexOf( - ipdata.getCity()) >= 0)) { - area = topicType; - } - } else { - if (StringUtils.isNotBlank(topicType.getParentid()) && !topicType.getParentid().equals("0")) { - for (KnowledgeType temp : topicTypeList) { - if (temp.getId().equals(topicType.getParentid())) { - if (StringUtils.isNotBlank(temp.getArea())) { - if ((temp.getArea().indexOf(ipdata.getProvince()) >= 0 || temp.getArea().indexOf( - ipdata.getCity()) >= 0)) { - area = temp; - break; - } else { - break; - } - } else { - area = getParentArea(ipdata, temp, topicTypeList); - } - } - } - } else { - area = topicType; - } - } - return area; - } - - public static List topic(String orgi, List topicTypeList, List topicList) { - List tempTopicList = new ArrayList(); - if (topicList != null) { - for (Topic topic : topicList) { - if (StringUtils.isBlank(topic.getCate()) || Constants.DEFAULT_TYPE.equals( - topic.getCate()) || getTopicType(topic.getCate(), topicTypeList) != null) { - tempTopicList.add(topic); - } - } - } - return tempTopicList; - } - - /** - * 根据热点知识找到 非空的 分类 - * - * @param topicTypeList - * @param topicList - * @return - */ - public static List filterTopicType(List topicTypeList, List topicList) { - List tempTopicTypeList = new ArrayList(); - if (topicTypeList != null) { - for (KnowledgeType knowledgeType : topicTypeList) { - boolean hasTopic = false; - for (Topic topic : topicList) { - if (knowledgeType.getId().equals(topic.getCate())) { - hasTopic = true; - break; - } - } - if (hasTopic) { - tempTopicTypeList.add(knowledgeType); - } - } - } - return tempTopicTypeList; - } - - /** - * 找到知识点对应的 分类 - * - * @param cate - * @param topicTypeList - * @return - */ - private static KnowledgeType getTopicType(String cate, List topicTypeList) { - KnowledgeType kt = null; - for (KnowledgeType knowledgeType : topicTypeList) { - if (knowledgeType.getId().equals(cate)) { - kt = knowledgeType; - break; - } - } - return kt; - } - /** * @param orgi * @return @@ -730,116 +618,7 @@ public class OnlineUserProxy { } } - public static void resetHotTopic(DataExchangeInterface dataExchange, User user, String orgi, String aiid) { - getCache().deleteSystembyIdAndOrgi("xiaoeTopic", orgi); - cacheHotTopic(dataExchange, user, orgi, aiid); - } - - @SuppressWarnings("unchecked") - public static List cacheHotTopic(DataExchangeInterface dataExchange, User user, String orgi, String aiid) { - List topicList = null; - if ((topicList = getCache().findOneSystemListByIdAndOrgi("xiaoeTopic", orgi)) == null) { - topicList = (List) dataExchange.getListDataByIdAndOrgi(aiid, null, orgi); - getCache().putSystemListByIdAndOrgi("xiaoeTopic", orgi, topicList); - } - return topicList; - } - - public static void resetHotTopicType(DataExchangeInterface dataExchange, User user, String orgi, String aiid) { - if (getCache().existSystemByIdAndOrgi("xiaoeTopicType" + "." + orgi, orgi)) { - getCache().deleteSystembyIdAndOrgi("xiaoeTopicType" + "." + orgi, orgi); - } - cacheHotTopicType(dataExchange, user, orgi, aiid); - } - - @SuppressWarnings("unchecked") - public static List cacheHotTopicType(DataExchangeInterface dataExchange, User user, String orgi, String aiid) { - List topicTypeList = null; - if ((topicTypeList = getCache().findOneSystemListByIdAndOrgi("xiaoeTopicType" + "." + orgi, orgi)) == null) { - topicTypeList = (List) dataExchange.getListDataByIdAndOrgi(aiid, null, orgi); - getCache().putSystemListByIdAndOrgi("xiaoeTopicType" + "." + orgi, orgi, topicTypeList); - } - return topicTypeList; - } - - @SuppressWarnings("unchecked") - public static List cacheSceneType(DataExchangeInterface dataExchange, User user, String orgi) { - List sceneTypeList = null; - if ((sceneTypeList = getCache().findOneSystemListByIdAndOrgi("xiaoeSceneType", orgi)) == null) { - sceneTypeList = (List) dataExchange.getListDataByIdAndOrgi(null, null, orgi); - getCache().putSystemListByIdAndOrgi("xiaoeSceneType", orgi, sceneTypeList); - } - return sceneTypeList; - } - - @SuppressWarnings("unchecked") - public static boolean filterSceneType(String cate, String orgi, IP ipdata) { - boolean result = false; - List sceneTypeList = cacheSceneType( - (DataExchangeInterface) MainContext.getContext().getBean("scenetype"), null, orgi); - List areaTypeList = getCache().findOneSystemListByIdAndOrgi( - Constants.CSKEFU_SYSTEM_AREA, Constants.SYSTEM_ORGI); - if (sceneTypeList != null && cate != null && !Constants.DEFAULT_TYPE.equals(cate)) { - for (SceneType sceneType : sceneTypeList) { - if (cate.equals(sceneType.getId())) { - if (StringUtils.isNotBlank(sceneType.getArea())) { - if (ipdata != null) { - List atList = getAreaTypeList( - sceneType.getArea(), areaTypeList); //找到技能组配置的地区信息 - for (AreaType areaType : atList) { - if (areaType.getArea().indexOf(ipdata.getProvince()) >= 0 || areaType.getArea().indexOf( - ipdata.getCity()) >= 0) { - result = true; - break; - } - } - } - } else { - result = true; - } - } - if (result) { - break; - } - } - } else { - result = true; - } - return result; - } - -// public static List search(String q, String orgi, User user) throws IOException, TemplateException { -// List otherMessageItemList = null; -// String param = ""; -// SessionConfig sessionConfig = ACDServiceRouter.getAcdPolicyService().initSessionConfig( -// orgi); -// if (StringUtils.isNotBlank(sessionConfig.getOqrsearchurl())) { -// Template templet = MainUtils.getTemplate(sessionConfig.getOqrsearchinput()); -// Map values = new HashMap(); -// values.put("q", q); -// values.put("user", user); -// param = MainUtils.getTemplet(templet.getTemplettext(), values); -// } -// String result = HttpClientUtil.doPost(sessionConfig.getOqrsearchurl(), param), text = null; -// if (StringUtils.isNotBlank(result) && StringUtils.isNotBlank( -// sessionConfig.getOqrsearchoutput()) && !result.equals("error")) { -// Template templet = MainUtils.getTemplate(sessionConfig.getOqrsearchoutput()); -// @SuppressWarnings("unchecked") -// Map jsonData = objectMapper.readValue(result, Map.class); -// Map values = new HashMap(); -// values.put("q", q); -// values.put("user", user); -// values.put("data", jsonData); -// text = MainUtils.getTemplet(templet.getTemplettext(), values); -// } -// if (StringUtils.isNotBlank(text)) { -// JavaType javaType = getCollectionType(ArrayList.class, OtherMessageItem.class); -// otherMessageItemList = objectMapper.readValue(text, javaType); -// } -// return otherMessageItemList; -// } - - public static OtherMessageItem suggestdetail(AiConfig aiCofig, String id, String orgi, User user) throws IOException, TemplateException { + public static OtherMessageItem suggestdetail(AiConfig aiCofig, String id, String orgi, User user) throws IOException { OtherMessageItem otherMessageItem = null; String param = ""; if (StringUtils.isNotBlank(aiCofig.getOqrdetailinput())) { diff --git a/contact-center/app/src/main/java/com/chatopera/cc/socketio/message/ChatMessage.java b/contact-center/app/src/main/java/com/chatopera/cc/socketio/message/ChatMessage.java index b67b33fe..56be1e92 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/socketio/message/ChatMessage.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/socketio/message/ChatMessage.java @@ -119,10 +119,6 @@ public class ChatMessage implements java.io.Serializable { return userid; } - public String getUserid(String userid) { - return userid; - } - public void setUserid(String userid) { this.userid = userid; } diff --git a/contact-center/app/src/main/java/com/chatopera/cc/util/PugHelper.java b/contact-center/app/src/main/java/com/chatopera/cc/util/PugHelper.java new file mode 100644 index 00000000..83ed7c19 --- /dev/null +++ b/contact-center/app/src/main/java/com/chatopera/cc/util/PugHelper.java @@ -0,0 +1,62 @@ +package com.chatopera.cc.util; + +import com.alibaba.fastjson.JSON; +import com.google.common.collect.BoundType; +import com.google.common.collect.Range; +import org.apache.commons.lang.StringUtils; + +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Date; +import java.util.Collections; +import java.util.List; + +public class PugHelper { + public String formatDate(String pattern, Date value) { + if (value == null) { + return ""; + } + + SimpleDateFormat format = new SimpleDateFormat(pattern); + return format.format(value); + } + + public String padRight(Object src, String ch) { + return padRight(src.toString(), ch); + } + + public String padRight(String src, String ch) { + int len = ch.length(); + int diff = len - src.length(); + if (diff <= 0) { + return src; + } + + char[] charr = ch.toCharArray(); + System.arraycopy(src.toCharArray(), 0, charr, diff, src.length()); + return new String(charr); + } + + public String toJSON(Object input) { + return JSON.toJSON(input).toString(); + } + + public ArrayList range(Integer start, Integer end) { + ArrayList result = new ArrayList(); + for (Integer i = start; i < end; i++) { + result.add(i); + } + return result; + } + + public long currentTimeMillis() { + return System.currentTimeMillis(); + } + + public List reverse(Collection input) { + List result = new ArrayList<>(input); + Collections.reverse(result); + return result; + } +} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/util/TempletLoader.java b/contact-center/app/src/main/java/com/chatopera/cc/util/TempletLoader.java deleted file mode 100644 index 5069f5c5..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/util/TempletLoader.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.util; - -import freemarker.cache.TemplateLoader; - -import java.io.IOException; -import java.io.Reader; -import java.io.StringReader; -import java.util.HashMap; -import java.util.Map; - -public class TempletLoader implements TemplateLoader { - private static final String DEFAULT_TEMPLATE_KEY = "_default_template_key"; - private Map templates = new HashMap(); - - public TempletLoader(String defaultTemplate) { - if (defaultTemplate != null && !defaultTemplate.equals("")) { - templates.put(DEFAULT_TEMPLATE_KEY, defaultTemplate); - } - } - - public void AddTemplate(String name, String template) { - if (name == null || template == null || name.equals("") - || template.equals("")) { - return; - } - if (!templates.containsKey(name)) { - templates.put(name, template); - } - } - - public void closeTemplateSource(Object templateSource) throws IOException { - } - - public Object findTemplateSource(String name) throws IOException { - if (name == null || name.equals("")) { - name = DEFAULT_TEMPLATE_KEY; - } - return templates.get(name); - } - - public long getLastModified(Object templateSource) { - return 0; - } - - public Reader getReader(Object templateSource, String encoding) - throws IOException { - return new StringReader((String) templateSource); - } -} \ No newline at end of file diff --git a/contact-center/app/src/main/java/com/chatopera/cc/util/dsdata/process/QuickReplyProcess.java b/contact-center/app/src/main/java/com/chatopera/cc/util/dsdata/process/QuickReplyProcess.java deleted file mode 100644 index de57512c..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/util/dsdata/process/QuickReplyProcess.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.util.dsdata.process; - -import com.chatopera.cc.model.QuickReply; -import com.chatopera.cc.persistence.es.QuickReplyRepository; - -public class QuickReplyProcess implements JPAProcess{ - - private QuickReplyRepository quickReplyRes ; - - public QuickReplyProcess(QuickReplyRepository quickReplyRes){ - this.quickReplyRes = quickReplyRes ; - } - - @Override - public void process(Object data) { - quickReplyRes.save((QuickReply)data) ; - } - - @Override - public void end() { - - } - -} diff --git a/contact-center/app/src/main/java/com/chatopera/cc/util/dsdata/process/TopicProcess.java b/contact-center/app/src/main/java/com/chatopera/cc/util/dsdata/process/TopicProcess.java deleted file mode 100644 index 39c925b4..00000000 --- a/contact-center/app/src/main/java/com/chatopera/cc/util/dsdata/process/TopicProcess.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (C) 2017 优客服-多渠道客服系统 - * Modifications copyright (C) 2018-2019 Chatopera Inc, - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.chatopera.cc.util.dsdata.process; - -import com.chatopera.cc.basic.MainContext; -import com.chatopera.cc.model.Topic; -import com.chatopera.cc.model.TopicItem; -import com.chatopera.cc.persistence.es.TopicRepository; -import com.chatopera.cc.persistence.repository.TopicItemRepository; - -import java.util.Date; -import java.util.List; - -public class TopicProcess implements JPAProcess{ - - private TopicRepository topicRes ; - - public TopicProcess(TopicRepository topicRes){ - this.topicRes = topicRes ; - } - - public TopicProcess(){} - - @Override - public void process(Object data) { - Topic topic = (Topic) data ; - topicRes.save(topic) ; - this.process(data, topic.getOrgi()); - } - /** - * 只处理 类似问题 - * @param data - * @param orgi - */ - public void process(Object data , String orgi) { - Topic topic = (Topic) data ; - if(topic.getSilimar()!=null && topic.getSilimar().size() > 0) { - TopicItemRepository topicItemRes = MainContext.getContext().getBean(TopicItemRepository.class) ; - List topicItemList = topicItemRes.findByTopicid(topic.getId()) ; - if(topicItemList!=null && topicItemList.size() > 0) { - topicItemRes.delete(topicItemList); - } - topicItemList.clear(); - for(String item : topic.getSilimar()) { - TopicItem topicItem = new TopicItem(); - topicItem.setTitle(item); - topicItem.setTopicid(topic.getId()); - topicItem.setOrgi(topic.getOrgi()); - topicItem.setCreater(topic.getCreater()); - topicItem.setCreatetime(new Date()); - topicItemList.add(topicItem) ; - } - if(topicItemList.size() > 0) { - topicItemRes.save(topicItemList) ; - } - } - } - - @Override - public void end() { - - } -} diff --git a/contact-center/app/src/main/resources/WEB-INF/data/mdx/coment.pug b/contact-center/app/src/main/resources/WEB-INF/data/mdx/coment.pug new file mode 100644 index 00000000..b7010486 --- /dev/null +++ b/contact-center/app/src/main/resources/WEB-INF/data/mdx/coment.pug @@ -0,0 +1,26 @@ +Schema(name="ukefu") + Cube(name="满意度") + View(alias="agentservice") + SQL + | = str_to_date('" + begin + "', '%Y-%m-%d %H:%i:%s')" : ""} !{end ? "AND satistime <= str_to_date('" + end + " 23:59:59', '%Y-%m-%d %H:%i:%s')" : ""} + | ]]> + Dimension(name="agent", foreignKey="agentno") + Hierarchy(hasAll="true", allMemberName="合计", primaryKey="id") + Table(name="cs_user") + Level(name="坐席", column="uname", uniqueMembers="false", type="") + Dimension(name="skill", foreignKey="agentskill") + Hierarchy(hasAll="true", allMemberName="合计", primaryKey="id") + Table(name="uk_organ") + Level(name="技能组", column="name", uniqueMembers="false", type="") + Dimension(name="time") + Hierarchy(hasAll="true", allMemberName="合计") + Level(name="日期", column="satistime", uniqueMembers="false") + KeyExpression + SQL(dialect="generic") date_format(agentservice.satistime,'%Y-%m-%d') + SQL(dialect="mysql") date_format(agentservice.satistime,'%Y-%m-%d') + SQL(dialect="oracle") TO_DATE(agentservice.satistime,'YYYY-MM-DD') + Dimension(name="comment") + Hierarchy(hasAll="true", allMemberName="合计") + Level(name="满意度", column="satislevel", uniqueMembers="false", type="") + Measure(name="评价", column="id", aggregator="count", formatString="") diff --git a/contact-center/app/src/main/resources/WEB-INF/data/mdx/coment.xml b/contact-center/app/src/main/resources/WEB-INF/data/mdx/coment.xml deleted file mode 100644 index ea0121fb..00000000 --- a/contact-center/app/src/main/resources/WEB-INF/data/mdx/coment.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - AND agentskill IN (${skill!''}) <#if agent?? && agent!=""> AND agentno = '${agent!''}' <#if orgi?? && orgi!=""> AND orgi = '${orgi!''}' <#if begin?? && begin!=""> AND satistime >= str_to_date('${begin!''}', '%Y-%m-%d %H:%i:%s') <#if end?? && end!=""> AND satistime <= str_to_date('${end!''} 23:59:59', '%Y-%m-%d %H:%i:%s') - ]]> - - - - - -
- -
-
- - -
- -
-
- - - - - date_format(agentservice.satistime,'%Y-%m-%d') - date_format(agentservice.satistime,'%Y-%m-%d') - TO_DATE(agentservice.satistime,'YYYY-MM-DD') - - - - - - - - - - -
-
\ No newline at end of file diff --git a/contact-center/app/src/main/resources/WEB-INF/data/mdx/consult.pug b/contact-center/app/src/main/resources/WEB-INF/data/mdx/consult.pug new file mode 100644 index 00000000..cb2cb010 --- /dev/null +++ b/contact-center/app/src/main/resources/WEB-INF/data/mdx/consult.pug @@ -0,0 +1,27 @@ +Schema(name="ukefu") + Cube(name="咨询") + View(alias="agentservice") + SQL + | = str_to_date('" + begin + "', '%Y-%m-%d %H:%i:%s')" : ""} !{end ? "AND createtime <= str_to_date('" + end + " 23:59:59', '%Y-%m-%d %H:%i:%s')" : ""} + | ]]> + Dimension(name="agent", foreignKey="agentno") + Hierarchy(hasAll="true", allmemberName="合计", primaryKey="id") + table(name="cs_user") + level(name="坐席", column="uname", uniqueMembers="false", type="") + Dimension(name="skill", foreignKey="agentskill") + Hierarchy(hasAll="true", allMemberName="合计", primaryKey="id") + table(name="uk_organ") + level(name="技能组", column="name", uniqueMembers="false", type="") + Dimension(name="time") + Hierarchy(hasAll="true", allMemberName="合计") + Level(name="日期", column="createtime", uniqueMembers="false") + KeyExpression + SQL(dialect="generic") date_format(agentservice.createtime,'%Y-%m-%d') + SQL(dialect="mysql") date_format(agentservice.createtime,'%Y-%m-%d') + SQL(dialect="oracle") TO_DATE(agentservice.createtime,'YYYY-MM-DD') + Measure(name="咨询数量", column="id", aggregator="count", formatString="") + Measure(name="平均等待时长_ms", column="waittingtime", aggregator="avg", formatString="") + Measure(name="平均咨询时长_ms", column="sessiontimes", aggregator="avg", formatString="") + CalculatedMember(name="平均等待时长(秒)", dimension="Measures", formula="[Measures].[平均等待时长_ms]/1000") + CalculatedMember(name="平均咨询时长(秒)", dimension="Measures", formula="[Measures].[平均咨询时长_ms]/1000") diff --git a/contact-center/app/src/main/resources/WEB-INF/data/mdx/consult.xml b/contact-center/app/src/main/resources/WEB-INF/data/mdx/consult.xml deleted file mode 100644 index 04972b70..00000000 --- a/contact-center/app/src/main/resources/WEB-INF/data/mdx/consult.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - AND agentskill IN (${skill!''}) <#if agent?? && agent!=""> AND agentno = '${agent!''}' <#if orgi?? && orgi!=""> AND orgi = '${orgi!''}' <#if begin?? && begin!=""> AND createtime >= str_to_date('${begin!''}', '%Y-%m-%d %H:%i:%s') <#if end?? && end!=""> AND createtime <= str_to_date('${end!''} 23:59:59', '%Y-%m-%d %H:%i:%s') - ]]> - - - - -
- -
-
- - -
- -
-
- - - - - date_format(agentservice.createtime,'%Y-%m-%d') - date_format(agentservice.createtime,'%Y-%m-%d') - TO_DATE(agentservice.createtime,'YYYY-MM-DD') - - - - - - - - - -
-
\ No newline at end of file diff --git a/contact-center/app/src/main/resources/application.properties b/contact-center/app/src/main/resources/application.properties index 2dda5521..e7b771ad 100644 --- a/contact-center/app/src/main/resources/application.properties +++ b/contact-center/app/src/main/resources/application.properties @@ -67,28 +67,10 @@ server.log.level=INFO web.upload-path=../data ############################################## -# FREEMARKER (FreeMarkerAutoConfiguration) +# Pug4j ############################################## -spring.freemarker.allow-request-override=false -spring.freemarker.allow-session-override=false -spring.freemarker.cache=true -spring.freemarker.charset=UTF-8 -spring.freemarker.check-template-location=true -spring.freemarker.content-type=text/html -spring.freemarker.enabled=true -spring.freemarker.expose-request-attributes=false -spring.freemarker.expose-session-attributes=false -spring.freemarker.expose-spring-macro-helpers=true -spring.freemarker.prefer-file-system-access=true -spring.freemarker.suffix=.html -spring.freemarker.settings.output_format=HTMLOutputFormat -spring.freemarker.template-loader-path=classpath:/templates/ -spring.freemarker.settings.template_update_delay=0 -spring.freemarker.settings.default_encoding=UTF-8 -spring.freemarker.settings.url_escaping_charset=UTF-8 -spring.freemarker.settings.classic_compatible=true -spring.freemarker.settings.number_format=0.### -spring.freemarker.order=1 +spring.pug4j.cache=true +spring.pug4j.template-loader-path=classpath:/templates/ ############################################## # Spring Data @@ -224,12 +206,6 @@ tongji.baidu.sitekey= # Loop Interval cskefu.callout.watch.interval=60000 -############################################## -# 企业聊天机器人 -############################################## -bot.baseurl=https://bot.chatopera.com -ads.login.banner=placeholder - ############################################## # 业务功能相关设置 ############################################## @@ -247,3 +223,9 @@ cskefu.settings.webim.visitor-separate=false ############################################## # 从外部系统获得 SkypeID对应的联系人信息 channel.skype.crm= + +############################################## +# Miscs +############################################## +# 登陆页面公告 +ads.login.banner=placeholder \ No newline at end of file diff --git a/contact-center/app/src/main/resources/static/fonts/csfont/iconfont.eot b/contact-center/app/src/main/resources/static/fonts/csfont/iconfont.eot index b34c166f..3e92318e 100644 Binary files a/contact-center/app/src/main/resources/static/fonts/csfont/iconfont.eot and b/contact-center/app/src/main/resources/static/fonts/csfont/iconfont.eot differ diff --git a/contact-center/app/src/main/resources/static/fonts/csfont/iconfont.svg b/contact-center/app/src/main/resources/static/fonts/csfont/iconfont.svg index d4130a30..3dd5945a 100644 --- a/contact-center/app/src/main/resources/static/fonts/csfont/iconfont.svg +++ b/contact-center/app/src/main/resources/static/fonts/csfont/iconfont.svg @@ -20,63 +20,78 @@ Created by iconfont /> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - - - diff --git a/contact-center/app/src/main/resources/static/fonts/csfont/iconfont.ttf b/contact-center/app/src/main/resources/static/fonts/csfont/iconfont.ttf index d370c50a..221ca4b7 100644 Binary files a/contact-center/app/src/main/resources/static/fonts/csfont/iconfont.ttf and b/contact-center/app/src/main/resources/static/fonts/csfont/iconfont.ttf differ diff --git a/contact-center/app/src/main/resources/static/fonts/csfont/iconfont.woff b/contact-center/app/src/main/resources/static/fonts/csfont/iconfont.woff index 74200566..f5c1582f 100644 Binary files a/contact-center/app/src/main/resources/static/fonts/csfont/iconfont.woff and b/contact-center/app/src/main/resources/static/fonts/csfont/iconfont.woff differ diff --git a/contact-center/app/src/main/resources/static/fonts/csfont/iconfont.woff2 b/contact-center/app/src/main/resources/static/fonts/csfont/iconfont.woff2 index 767f3295..a293f499 100644 Binary files a/contact-center/app/src/main/resources/static/fonts/csfont/iconfont.woff2 and b/contact-center/app/src/main/resources/static/fonts/csfont/iconfont.woff2 differ diff --git a/contact-center/app/src/main/resources/static/images/upload.png b/contact-center/app/src/main/resources/static/images/upload.png new file mode 100644 index 00000000..7768530c Binary files /dev/null and b/contact-center/app/src/main/resources/static/images/upload.png differ diff --git a/contact-center/app/src/main/resources/static/js/cskefu.js b/contact-center/app/src/main/resources/static/js/cskefu.js index e980c44a..d9d53d75 100644 --- a/contact-center/app/src/main/resources/static/js/cskefu.js +++ b/contact-center/app/src/main/resources/static/js/cskefu.js @@ -1,300 +1,337 @@ -var layer , iframe , layerwin , cursession ; -$(document).ready(function(){ - var hide ; - $('.dropdown-menu').on("click" , function(){ - var distance = getDistance(this); - if(hide = true){ - $(this).closest(".ukefu-btn-group").addClass("open"); - }else{ - $(this).closest(".ukefu-btn-group").removeClass("open"); - } - if(distance.right < 200){ - $(this).next().css("right" , "0px").css("left" , "auto"); - } - }).hover(function(){ - hide = true ; - } , function(){ - hide = false ; - var btn = $(this); - setTimeout(function(){ - if(hide){ - $(btn).removeClass("open"); - } - } , 500); - }); - $('.ukefu-btn-group').hover(function(){ - $(this).addClass("open"); - $(this).find('.ukefu-dropdown-menu').css("right" , "0px").css("left" , "auto"); - hide = false ; - } , function(){ - hide = true ; - setTimeout(function(){ - if(hide){ - $(".ukefu-btn-group.open").removeClass("open"); - } - } , 500); - }); - layui.use(['layer'], function(){ - layer = layui.layer; - }); - //password验证 - layui.use(['form'], function(){ - var form = layui.form(); - form.verify({ - pass: function(value, item){ //value:表单的值、item:表单的DOM对象 - if(value && !(/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{6,18}$/.test(value))){ - return '密码由6到18位数字和字母组成'; - } - } - }); - }); - $(document).on('click','[data-toggle="tab"]', function ( e ) { - var type = $(this).data('type'); - if(type == "tabAdd"){ - top.active.tabAdd($(this).data('href') , $(this).data('title'), $(this).data('id')); - }else if(type == "tabChange"){ - top.active.tabChange($(this).data('href') , $(this).data('title'), $(this).data('id')); - } - - return false; - }); - $(document).on('click','[data-toggle="ajax"]', function ( e ) { - var url = $(this).attr("href"); - if(url && url != "javascript:void(0)"){ - var title = $(this).attr("title") ? $(this).attr("title") : $(this).attr("data-title"); - var artwidth = $(this).attr("data-width") ? $(this).attr("data-width") : 800 ; - var artheight = $(this).attr("data-height") ? $(this).attr("data-height") : 400 ; - var target = $(this) ; - top.iframe = window.frameElement && window.frameElement.id || ''; - $.ajax({ - url:url, - cache:false, - success: function(data){ - var multiTitle = $(target).data("multi") ; - if(multiTitle){ - var img = $(target).data("icon") ? $(target).data("icon") : "/images/workorders.png" ; - var name = title ; - var text = $(target).data("text") ? $(target).data("text") : title ; - top.layerwin = top.layer.open({ - title: ["
"+name+"

"+text+"

" , "height:55px"], - type: 1, - maxmin: true, - anim: 2, - id: 'mainajaxwin', - area:[artwidth+"px" , artheight+"px"] , - content: data} - ); - }else{ - top.layerwin = top.layer.open({title:title, type: 1, id: 'mainajaxwin', area:[artwidth+"px" , artheight+"px"] , maxmin: true, anim: 2,content: data}); - } - } - }); - } - - return false; - }); - - $(document).on('click','[data-toggle="load"]', function ( e ) { - var url = $(this).attr("href"); - var target = $(this).data("target"); - var callback = $(this).data("callback"); - var index = top.layer.load(0, {shade: false}); - $.ajax({ - url:url, - cache:false, - success: function(data){ - if(target){ - $(target).empty().html(data); - } - top.layer.close(index); - if(callback){ - eval(callback); - } - } - }); - - return false; - }); - - $(document).on('click','[data-toggle="tip"]', function ( e ) { - var title = $(this).attr("title") ? $(this).attr("title") : $(this).attr("data-title"); - var href = $(this).attr('href') ; - var confirm = $(this).data('confirm') ; - var target = $(this).data('target') ; - if(href == null){ - href = $(this).data('href') ; - } - var callback = $(this).data('callback') ; - top.layer.confirm(title, {icon: 3, title:'提示'}, function(index){ - top.layer.close(index); - if(confirm){ - top.layer.prompt({title: confirm, formType:1}, function(text, cindex){ - top.layer.close(cindex); - if(href){ - if(href.indexOf("?") > 0){ - href = href + "&confirm="+text ; - }else{ - href = href + "?confirm="+text ; - } - if(callback!=null){ - eval(callback+"('"+href+"' , '"+target+"')"); - }else{ - location.href = href ; - } - } - - }); - }else{ - if(href){ - if(callback!=null){ - eval(callback+"('"+href+"' , '"+target+"')"); - }else{ - location.href = href ; - } - } - } - }); - return false; - }); - $(document).on('submit.form.data-api','form', function ( e ) { - var formValue = $(e.target) ; - var disabled = $(e.target).data("disabled") ; - if(disabled !=null && disabled == "true"){ - return false ; - }else{ - $(e.target).data("disabled","true"); - var close = $(this).data("close"); - if(iframe){ - $(e.target).attr('target' , iframe); - } - if(layerwin && close == null){ - layer.close(layerwin); - } - } - }); - - /** - *表单验证 - * - * - */ - $(document).on('submit.form.data-api','[data-toggle="ajax-form"]', function ( e ) { - var formValue = $(e.target) ; - var target = $(this).data("target"); - var inner = $(this).data("inner"); - var callback = $(this).data("callback"); - var close = $(this).data("close"); - var message = $(this).data("message"); - var index ; - if(close == null){ - index = top.layer.load(0, {shade: false}); - } - $(this).ajaxSubmit({ - url:formValue.attr("action"), - success: function(data){ - if(target){ - $(target).empty().append(data) ; - }else if(callback){ - var targetIFrame = eval(iframe); - targetIFrame.Proxy.callback(callback, data) ; - }else if(inner){ - var targetIFrame = eval(iframe); - targetIFrame.Proxy.updateData(inner , data) ; - } - if(close == null || close == true){ - if(close == null){ - top.layer.close(index); - }else{ - layer.close(layer.index); - } - if(message == false){ - - }else if(message){ - top.layer.msg(message,{icon: 1, offset: 'b', time: 1500}) - }else{ - top.layer.msg('保存成功!',{icon: 1, offset: 'b', time: 1500}) - } - } - }, - error:function(xhr, type, s){ - //notification("",false); //结束 - } - }); - return false; - }); - - function getDistance(obj) { - var distance = {}; - distance.top = ($(obj).offset().top - $(document).scrollTop()); - distance.bottom = ($(window).height() - distance.top - $(obj).outerHeight()); - distance.left = ($(obj).offset().left - $(document).scrollLeft()); - distance.right = ($(window).width() - distance.left - $(obj).outerWidth()); - return distance; - } +var layer, iframe, layerwin, cursession, curHeadImgUrl, cususerid; +$(document).ready(function () { + var hide; + $('.dropdown-menu').on("click", function () { + var distance = getDistance(this); + if (hide = true) { + $(this).closest(".ukefu-btn-group").addClass("open"); + } else { + $(this).closest(".ukefu-btn-group").removeClass("open"); + } + if (distance.right < 200) { + $(this).next().css("right", "0px").css("left", "auto"); + } + }).hover(function () { + hide = true; + }, function () { + hide = false; + var btn = $(this); + setTimeout(function () { + if (hide) { + $(btn).removeClass("open"); + } + }, 500); + }); + $('.ukefu-btn-group').hover(function () { + $(this).addClass("open"); + $(this).find('.ukefu-dropdown-menu').css("right", "0px").css("left", "auto"); + hide = false; + }, function () { + hide = true; + setTimeout(function () { + if (hide) { + $(".ukefu-btn-group.open").removeClass("open"); + } + }, 500); + }); + layui.use(['layer'], function () { + layer = layui.layer; + }); + //password验证 + layui.use(['form'], function () { + var form = layui.form(); + form.verify({ + pass: function (value, item) { //value:表单的值、item:表单的DOM对象 + if (value && !(/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{6,18}$/.test(value))) { + return '密码由6到18位数字和字母组成'; + } + } + }); + }); + $(document).on('click', '[data-toggle="tab"]', function (e) { + var type = $(this).data('type'); + if (type == "tabAdd") { + top.active.tabAdd($(this).data('href'), $(this).data('title'), $(this).data('id')); + } else if (type == "tabChange") { + top.active.tabChange($(this).data('href'), $(this).data('title'), $(this).data('id')); + } + + return false; + }); + $(document).on('click', '[data-toggle="ajax"]', function (e) { + var url = $(this).attr("href"); + if (url && url != "javascript:void(0)") { + var title = $(this).attr("title") ? $(this).attr("title") : $(this).attr("data-title"); + var artwidth = $(this).attr("data-width") ? $(this).attr("data-width") : 800; + var artheight = $(this).attr("data-height") ? $(this).attr("data-height") : 400; + var target = $(this); + top.iframe = window.frameElement && window.frameElement.id || ''; + $.ajax({ + url: url, + cache: false, + success: function (data) { + var multiTitle = $(target).data("multi"); + if (multiTitle) { + var img = $(target).data("icon") ? $(target).data("icon") : "/images/workorders.png"; + var name = title; + var text = $(target).data("text") ? $(target).data("text") : title; + top.layerwin = top.layer.open({ + title: ["
" + name + "

" + text + "

", "height:55px"], + type: 1, + maxmin: true, + anim: 2, + id: 'mainajaxwin', + area: [artwidth + "px", artheight + "px"], + content: data + } + ); + } else { + top.layerwin = top.layer.open({ + title: title, + type: 1, + id: 'mainajaxwin', + area: [artwidth + "px", artheight + "px"], + maxmin: true, + anim: 2, + content: data + }); + } + } + }); + } + + return false; + }); + + $(document).on('click', '[data-toggle="load"]', function (e) { + var url = $(this).attr("href"); + var target = $(this).data("target"); + var callback = $(this).data("callback"); + var index = top.layer.load(0, {shade: false}); + $.ajax({ + url: url, + cache: false, + success: function (data) { + if (target) { + $(target).empty().html(data); + } + top.layer.close(index); + if (callback) { + eval(callback); + } + } + }); + + return false; + }); + + $(document).on('click', '[data-toggle="tip"]', function (e) { + var title = $(this).attr("title") ? $(this).attr("title") : $(this).attr("data-title"); + var href = $(this).attr('href'); + var confirm = $(this).data('confirm'); + var target = $(this).data('target'); + if (href == null) { + href = $(this).data('href'); + } + var callback = $(this).data('callback'); + top.layer.confirm(title, {icon: 3, title: '提示'}, function (index) { + top.layer.close(index); + if (confirm) { + top.layer.prompt({title: confirm, formType: 1}, function (text, cindex) { + top.layer.close(cindex); + if (href) { + if (href.indexOf("?") > 0) { + href = href + "&confirm=" + text; + } else { + href = href + "?confirm=" + text; + } + if (callback != null) { + eval(callback + "('" + href + "' , '" + target + "')"); + } else { + location.href = href; + } + } + + }); + } else { + if (href) { + if (callback != null) { + eval(callback + "('" + href + "' , '" + target + "')"); + } else { + location.href = href; + } + } + } + }); + return false; + }); + $(document).on('submit.form.data-api', 'form', function (e) { + var formValue = $(e.target); + var disabled = $(e.target).data("disabled"); + if (disabled != null && disabled == "true") { + return false; + } else { + $(e.target).data("disabled", "true"); + var close = $(this).data("close"); + if (iframe) { + $(e.target).attr('target', iframe); + } + if (layerwin && close == null) { + layer.close(layerwin); + } + } + }); + + /** + *表单验证 + * + * + */ + $(document).on('submit.form.data-api', '[data-toggle="ajax-form"]', function (e) { + var formValue = $(e.target); + var target = $(this).data("target"); + var inner = $(this).data("inner"); + var callback = $(this).data("callback"); + var close = $(this).data("close"); + var message = $(this).data("message"); + var index; + if (close == null) { + index = top.layer.load(0, {shade: false}); + } + $(this).ajaxSubmit({ + url: formValue.attr("action"), + success: function (data) { + if (target) { + $(target).empty().append(data); + } else if (callback) { + var targetIFrame = eval(iframe); + targetIFrame.Proxy.callback(callback, data); + } else if (inner) { + var targetIFrame = eval(iframe); + targetIFrame.Proxy.updateData(inner, data); + } + if (close == null || close == true) { + if (close == null) { + top.layer.close(index); + } else { + layer.close(layer.index); + } + if (message == false) { + + } else if (message) { + top.layer.msg(message, {icon: 1, offset: 'b', time: 1500}) + } else { + top.layer.msg('保存成功!', {icon: 1, offset: 'b', time: 1500}) + } + } + }, + error: function (xhr, type, s) { + //notification("",false); //结束 + } + }); + return false; + }); + + function getDistance(obj) { + var distance = {}; + distance.top = ($(obj).offset().top - $(document).scrollTop()); + distance.bottom = ($(window).height() - distance.top - $(obj).outerHeight()); + distance.left = ($(obj).offset().left - $(document).scrollLeft()); + distance.right = ($(window).width() - distance.left - $(obj).outerWidth()); + return distance; + } }); -function loadURL(url , panel , callback , append){ - loadURLWithTip(url , panel , callback , append , false) ; +function loadURL(url, panel, callback, append) { + loadURLWithTip(url, panel, callback, append, false); } -function loadURLWithTip(url , panel , callback , append , tip){ - var inx ; - if(tip){ - index = top.layer.load(0, {shade: false}); - } - $.ajax({ - url:url, - cache:false, - success: function(data){ - if(tip){ - top.layer.close(index); - } - if(panel){ - if(append){ - $(panel).append(data); - }else{ - $(panel).empty().html(data); - } - } - if(callback){ - callback(data); - } - }, - error: function(xhr, type, s){ - if(xhr.getResponseHeader("emsg")){ - art.alert(xhr.getResponseHeader("emsg")); - } - } - }).done(function(){ - - }); +function loadURLWithTip(url, panel, callback, append, tip) { + var inx; + if (tip) { + index = top.layer.load(0, {shade: false}); + } + $.ajax({ + url: url, + cache: false, + success: function (data) { + if (tip) { + top.layer.close(index); + } + if (panel) { + if (append) { + $(panel).append(data); + } else { + $(panel).empty().html(data); + } + } + if (callback) { + callback(data); + } + }, + error: function (xhr, type, s) { + if (xhr.getResponseHeader("emsg")) { + art.alert(xhr.getResponseHeader("emsg")); + } + } + }).done(function () { + + }); } function formatDate(value) { - var gtoMs = new Date().getTimezoneOffset() * 60000 - if (parent.timeDifference) { - var date = new Date(value + gtoMs + parent.timeDifference) - } else { - var date = new Date(value) - } - var y = date.getFullYear(); - var m = date.getMonth() + 1; - m = m < 10 ? ('0' + m) : m; - var d = date.getDate(); - d = d < 10 ? ('0' + d) : d; - var h = date.getHours(); - h = h < 10 ? ('0' + h) : h; - var minute = date.getMinutes(); - minute = minute < 10 ? ('0' + minute) : minute; - var second = date.getSeconds(); - second = second < 10 ? ('0' + second) : second; - return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second; + var gtoMs = new Date().getTimezoneOffset() * 60000 + if (parent.timeDifference) { + var date = new Date(value + gtoMs + parent.timeDifference) + } else { + var date = new Date(value) + } + var y = date.getFullYear(); + var m = date.getMonth() + 1; + m = m < 10 ? ('0' + m) : m; + var d = date.getDate(); + d = d < 10 ? ('0' + d) : d; + var h = date.getHours(); + h = h < 10 ? ('0' + h) : h; + var minute = date.getMinutes(); + minute = minute < 10 ? ('0' + minute) : minute; + var second = date.getSeconds(); + second = second < 10 ? ('0' + second) : second; + return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second; +} + +function chatScorllBottom(box) { + var imgdefereds = []; //定义一个操作数组 + $('#' + box + ' .ukefu-media-image').each(function () { //遍历所有图片,将图片 + var dfd = $.Deferred(); //定义一个将要完成某个操作的对象 + $(this).bind('load', function () { + dfd.resolve(); //图片加载完成后,表示操作成功 + }); + if (this.complete) { //如果图片加载状态为完成,那么也标识操作成功 + setTimeout(function () { + dfd.resolve(); + }, 1000); + } + imgdefereds.push(dfd); //将所有操作对象放入数组中 + }) + $.when.apply(null, imgdefereds).done(function () { //注册所有操作完成后的执行方法 + document.getElementById(box).scrollTop = document.getElementById(box).scrollHeight + }); +} + +function newMessageScorllBottom(type, msgType) { + var box = type == "agent" ? 'chat_msg_list' : 'chat_msg_list_cca'; + if (msgType == "image") { + chatScorllBottom(box) + } else { + document.getElementById(box).scrollTop = document.getElementById(box).scrollHeight + } } var Proxy = { - newAgentUserService:function(data,type){ - if($('#tip_message_'+data.userid).length >0){ - if(data.channel){ + newAgentUserService: function (data, type) { + if ($('#tip_message_' + data.userid).length > 0) { + if (data.channel) { var channel = data.channel; switch (channel) { case 'weixin': @@ -304,138 +341,139 @@ var Proxy = { $('#tip_icon_webim_' + data.userid).removeClass('ukefu-channel-icon-end').addClass("ukefu-channel-icon"); break; case 'phone': - $('#tip_icon_phone_' + data.userid).attr("src","/images/phone-ico.png"); + $('#tip_icon_phone_' + data.userid).attr("src", "/images/phone-ico.png"); break; } } - $('#tip_message_' + data.userid).removeClass('bg-gray').addClass("bg-green").text('在线'); - }else{ - if($('.chat-list-item.active').length > 0){ - var id = $('.chat-list-item.active').data('id') ; - type == "agent" ? loadURL('/agent/agentusers.html?newuser=true&userid='+id , '#agentusers') : loadURL('/apps/cca/agentusers.html?newuser=true&userid='+id , '#agentuserscca'); - }else{ - type == "agent" ? location.href = "/agent/index.html?newuser=true" : location.href = "/apps/cca/index.html?newuser=true"; - } - } - if(data.userid == cursession){ - $('#agentuser-curstatus').remove(); - type == "agent" ? $("#chat_msg_list").append(template($('#begin_tpl').html(), {data: data})) : $("#chat_msg_list_cca").append(template($('#begin_tpl').html(), {data: data})); - } - }, - newAgentUserMessage:function(data,type){ - if(data.usession == cursession){ - if(data.type == 'writing' && $('#writing').length > 0){ - $('#writing').remove(); - } - var id = $('.chat-list-item.active').data('id') ; - if(data.message!=""){ - data.createtime = formatDate(data.createtime); - var newlist = template($('#message_tpl').html(), {data: data}) - var nodeMeassage = $(newlist); - nodeMeassage.find(".iconclick").click(function () { - if($(this).attr('name') == 'nolabe'){ - $(this).html('') - $(this).css('color','#46cad4') - $(this).attr('name','yeslabe') - }else{ - $(this).html('စ') - $(this).css('color','#aaaaaa') - $(this).attr('name','nolabe') - } - $.ajax({ - url: '/agent/agentuserLabel.html', - data: {'iconid': $(this).attr('id')}, - type: "get", - success: function () { - } - }); - }); - type == "agent" ? $("#chat_msg_list").append(nodeMeassage) : $("#chat_msg_list_cca").append(nodeMeassage); - type == "agent" ? - document.getElementById('chat_msg_list').scrollTop = document.getElementById('chat_msg_list').scrollHeight - : document.getElementById('chat_msg_list_cca').scrollTop = document.getElementById('chat_msg_list_cca').scrollHeight; - } - loadURL("/agent/readmsg.html?userid="+data.agentuser); //更新数据状态,将当前对话的新消息数量清空 - }else{ - if(data.type == 'message'){ - $('#last_msg_'+data.userid).text(data.tokenum).show(); - if(type == "agent"){ - Proxy.addTopMsgTip(1) ; - } - } - } - }, - quickReply:function(data,type){ - if(data.usession == cursession){ - if(data.message!=""){ - restApiRequest({ - silent: true, - path: 'chatbot', - data: { - ops: 'faq', - snsaccountid: data.appid , - userId:data.userid, - textMessage:data.message - } - }).then(function(result){ - if(result.rc === 0){ - if(result.data.length>0){ - type == "agent" ? $("#quickReplyBox").html("") : $("#ccaQuickReplyBox").html(""); - $.each(sortByKey(result.data,'score'),function(j,n){ - var answerList = result.data[j].replies; - var answer; - for(var i = 0; i < answerList.length; i++) { - if(answerList[i].rtype == 'plain' && answerList[i].enabled==true) { - answer=answerList[i] - break; - } - } - if(answer) { - var li = '
  • \n' + - '
    问题:' + result.data[j].post + '
    \n' + - '
    \n' + - '

    答案:' + answer.content + '

    \n' + - ' \n' + - '
    \n' + - '
  • ' - type == "agent" ? $("#quickReplyBox").append(li) : $("#ccaQuickReplyBox").append(li); - } - if(i>4){ - return false; - } - }); - if(!$("#robot").hasClass('layui-this')){ - $("#dot").css("display","inline-block") - } - }else{ - type == "agent" ? $("#quickReplyBox").html("") : $("#ccaQuickReplyBox").html("") ; - $("#dot").css("display","none") - var liNone = '
  • \n' + - '
    \n' + - ' \n' + - '
    在知识库中未得到相关问题
    \n' + - '
    \n' + - '
  • ' - type == "agent" ? $("#quickReplyBox").html(liNone) : $("#ccaQuickReplyBox").html(liNone) ; - } - }else{ - type == "agent" ? $("#quickReplyBox").html("") : $("#ccaQuickReplyBox").html("") ; - $("#dot").css("display","none") - } - }, function(error){ - console.log("error", error); - // 服务器异常 - top.layer.msg('服务器抽风,请稍后再试!',{icon: 2, time: 3000}) - }) + $('#tip_message_' + data.userid).removeClass('bg-gray').addClass("bg-green").text('在线'); + } else { + if ($('.chat-list-item.active').length > 0) { + var id = $('.chat-list-item.active').data('id'); + type == "agent" ? loadURL('/agent/agentusers.html?newuser=true&userid=' + id, '#agentusers') : loadURL('/apps/cca/agentusers.html?newuser=true&userid=' + id, '#agentuserscca'); + } else { + type == "agent" ? location.href = "/agent/index.html?newuser=true" : location.href = "/apps/cca/index.html?newuser=true"; + } + } + if (data.userid == cursession) { + $('#agentuser-curstatus').remove(); + type == "agent" ? $("#chat_msg_list").append(template($('#begin_tpl').html(), {data: data})) : $("#chat_msg_list_cca").append(template($('#begin_tpl').html(), {data: data})); + } + }, + newAgentUserMessage: function (data, type) { + if (data.usession == cursession) { + if (data.type == 'writing' && $('#writing').length > 0) { + $('#writing').remove(); + } + var id = $('.chat-list-item.active').data('id'); + if (data.message != "") { + data.createtime = formatDate(data.createtime); + data.cususerid = cususerid; + data.headimgurl = curHeadImgUrl; + var newlist = template($('#message_tpl').html(), {data: data}) + var nodeMeassage = $(newlist); + nodeMeassage.find(".iconclick").click(function () { + if ($(this).attr('name') == 'nolabe') { + $(this).html('') + $(this).css('color', '#46cad4') + $(this).attr('name', 'yeslabe') + } else { + $(this).html('စ') + $(this).css('color', '#aaaaaa') + $(this).attr('name', 'nolabe') + } + $.ajax({ + url: '/agent/agentuserLabel.html', + data: {'iconid': $(this).attr('id')}, + type: "get", + success: function () { + } + }); + }); + type == "agent" ? $("#chat_msg_list").append(nodeMeassage) : $("#chat_msg_list_cca").append(nodeMeassage); + newMessageScorllBottom(type, data.msgtype) + } + loadURL("/agent/readmsg.html?userid=" + data.agentuser); //更新数据状态,将当前对话的新消息数量清空 + } else { + if (data.type == 'message') { + $('#last_msg_' + data.userid).text(data.tokenum).show(); + if (type == "agent") { + Proxy.addTopMsgTip(1); + } + } + } + }, - } - } - }, + quickReply: function (data, type) { + if (data.usession == cursession) { + if (data.message != "") { + restApiRequest({ + silent: true, + path: 'chatbot', + data: { + ops: 'faq', + snsaccountid: data.appid, + userId: data.userid, + textMessage: data.message + } + }).then(function (result) { + if (result.rc === 0) { + if (result.data.length > 0) { + type == "agent" ? $("#quickReplyBox").html("") : $("#ccaQuickReplyBox").html(""); + $.each(sortByKey(result.data, 'score'), function (j, n) { + var answerList = result.data[j].replies; + var answer; + for (var i = 0; i < answerList.length; i++) { + if (answerList[i].rtype == 'plain' && answerList[i].enabled == true) { + answer = answerList[i] + break; + } + } + if (answer) { + var li = '
  • \n' + + '
    问题:' + result.data[j].post + '
    \n' + + '
    \n' + + '

    答案:' + answer.content + '

    \n' + + ' \n' + + '
    \n' + + '
  • ' + type == "agent" ? $("#quickReplyBox").append(li) : $("#ccaQuickReplyBox").append(li); + } + if (i > 4) { + return false; + } + }); + if (!$("#robot").hasClass('layui-this')) { + $("#dot").css("display", "inline-block") + } + } else { + type == "agent" ? $("#quickReplyBox").html("") : $("#ccaQuickReplyBox").html(""); + $("#dot").css("display", "none") + var liNone = '
  • \n' + + '
    \n' + + ' \n' + + '
    在知识库中未得到相关问题
    \n' + + '
    \n' + + '
  • ' + type == "agent" ? $("#quickReplyBox").html(liNone) : $("#ccaQuickReplyBox").html(liNone); + } + } else { + type == "agent" ? $("#quickReplyBox").html("") : $("#ccaQuickReplyBox").html(""); + $("#dot").css("display", "none") + } + }, function (error) { + console.log("error", error); + // 服务器异常 + top.layer.msg('服务器抽风,请稍后再试!', {icon: 2, time: 3000}) + }) + + } + } + }, - endAgentUserService:function(data){ - if($('#tip_message_'+data.userid).length >0){ - if(data.channel){ + endAgentUserService: function (data) { + if ($('#tip_message_' + data.userid).length > 0) { + if (data.channel) { var channel = data.channel; switch (channel) { case 'weixin': @@ -445,112 +483,112 @@ var Proxy = { $('#tip_icon_webim_' + data.userid).removeClass("ukefu-channel-icon").addClass('ukefu-channel-icon-end'); break; case 'phone': - $('#tip_icon_phone_' + data.userid).attr("src","/images/cde-ico-gray.png"); + $('#tip_icon_phone_' + data.userid).attr("src", "/images/cde-ico-gray.png"); break; } } $('#tip_message_' + data.userid).removeClass("bg-green").addClass('bg-gray').text('离开'); - } - if(data.userid == cursession){ - $('#agentuser-curstatus').remove(); - $("#chat_msg_list").append(template($('#end_tpl').html(), {data: data})); - } - }, - transoutAgentUserService:function(data){ - if($("#chat_users li").length>1){ - $('#agentuser_' + data.userid).remove(); - $("#chat_users li:first-child a").click(); - }else{ - parent.$('#agentdesktop').click(); - } - }, - tipMsgForm : function(href){ - top.layer.prompt({formType: 2,title: '请输入拉黑原因',area: ['300px', '50px']} , function(value, index, elem){ - location.href = href+"&description="+encodeURIComponent(value); - top.layer.close(index); - }); - }, - // 坐席对话关联联系人 - execLinkContactsFunction: function(data){ - if(data!=null && data!= ""){ - if(typeof ani != "undefined"){ - loadURL("/apps/softphone/search.html?display=false&ani="+ani+"&q="+data, "#ukefu-chat-agent") ; - }else if(userid && userid != '' && agentserviceid && agentserviceid != '' && agentuserid && agentuserid != ''){ - loadURL("/agent/contacts.html?userid="+userid+"&agentserviceid="+agentserviceid+"&agentuserid="+agentuserid+"&contactsid="+data , "#ukefu_contacts_info") ; - } - } - }, - // 坐席对话取消关联联系人 - execCancelContactsFunction: function(data){ - if (data != null){ - loadURL("/agent/clean/associated.html?currentAgentUserContactsId="+data,"#ukefu_contacts_info"); - } - }, - updateData : function(inner , data){ - $(inner).empty().append(data) ; - }, - callback:function(callback , data){ - eval(callback); - }, - updateFormData : function(inner , data){ - $(inner).val(data).click() ; - }, - addTopMsgTip : function(num){ - var msgNum = top.$('#ukefu-last-msg').data("num"); - msgNum = msgNum + num ; - if(msgNum > 0){ - top.$('#ukefu-last-msg').data("num" , msgNum).show(); - } - top.$('#msgnum').text(msgNum); - }, - cleanTopMsgTip : function(num){ - var msgNum = top.$('#ukefu-last-msg').data("num"); - msgNum = msgNum - num ; - if(msgNum > 0){ - top.$('#ukefu-last-msg').data("num" , msgNum).show(); - top.$('#msgnum').text(msgNum); - }else{ - top.$('#ukefu-last-msg').data("num" , 0).hide(); - top.$('#msgnum').text(0); - } - } + } + if (data.userid == cursession) { + $('#agentuser-curstatus').remove(); + $("#chat_msg_list").append(template($('#end_tpl').html(), {data: data})); + } + }, + transoutAgentUserService: function (data) { + if ($("#chat_users li").length > 1) { + $('#agentuser_' + data.userid).remove(); + $("#chat_users li:first-child a").click(); + } else { + parent.$('#agentdesktop').click(); + } + }, + tipMsgForm: function (href) { + top.layer.prompt({formType: 2, title: '请输入拉黑原因', area: ['300px', '50px']}, function (value, index, elem) { + location.href = href + "&description=" + encodeURIComponent(value); + top.layer.close(index); + }); + }, + // 坐席对话关联联系人 + execLinkContactsFunction: function (data) { + if (data != null && data != "") { + if (typeof ani != "undefined") { + loadURL("/apps/softphone/search.html?display=false&ani=" + ani + "&q=" + data, "#ukefu-chat-agent"); + } else if (userid && userid != '' && agentserviceid && agentserviceid != '' && agentuserid && agentuserid != '') { + loadURL("/agent/contacts.html?userid=" + userid + "&agentserviceid=" + agentserviceid + "&agentuserid=" + agentuserid + "&contactsid=" + data, "#ukefu_contacts_info"); + } + } + }, + // 坐席对话取消关联联系人 + execCancelContactsFunction: function (data) { + if (data != null) { + loadURL("/agent/clean/associated.html?currentAgentUserContactsId=" + data, "#ukefu_contacts_info"); + } + }, + updateData: function (inner, data) { + $(inner).empty().append(data); + }, + callback: function (callback, data) { + eval(callback); + }, + updateFormData: function (inner, data) { + $(inner).val(data).click(); + }, + addTopMsgTip: function (num) { + var msgNum = top.$('#ukefu-last-msg').data("num"); + msgNum = msgNum + num; + if (msgNum > 0) { + top.$('#ukefu-last-msg').data("num", msgNum).show(); + } + top.$('#msgnum').text(msgNum); + }, + cleanTopMsgTip: function (num) { + var msgNum = top.$('#ukefu-last-msg').data("num"); + msgNum = msgNum - num; + if (msgNum > 0) { + top.$('#ukefu-last-msg').data("num", msgNum).show(); + top.$('#msgnum').text(msgNum); + } else { + top.$('#ukefu-last-msg').data("num", 0).hide(); + top.$('#msgnum').text(0); + } + } } var active = { - tabAdd : function(href, title, id , reload) { - //新增一个Tab项 - var layelement = layui.element(); - if ($('#' + id).length == 0) { - layelement.tabAdd('ukefutab', { - title : title //用于演示 - , - content : '', - id : id - }); - } - layelement.tabChange('ukefutab', id); - $(".layui-this").each(function() { - if (!$(this).parent().hasClass("layui-tab-title")) { - $(this).removeClass("layui-this"); - } - }); - if(reload == null){ - $('#' + id).attr("src", href); - } - }, - tabChange : function(href, title, id) { - var layelement = layui.element(); - var inx = $('#' + id).parent().index(); - if ($('#' + id).length > 0) { - $('#' + id).attr('src', href); - layelement.tabChange('ukefutab', id); - } - $(".layui-this").each(function() { - if (!$(this).parent().hasClass("layui-tab-title")) { - $(this).removeClass("layui-this"); - } + tabAdd: function (href, title, id, reload) { + //新增一个Tab项 + var layelement = layui.element(); + if ($('#' + id).length == 0) { + layelement.tabAdd('ukefutab', { + title: title //用于演示 + , + content: '', + id: id + }); + } + layelement.tabChange('ukefutab', id); + $(".layui-this").each(function () { + if (!$(this).parent().hasClass("layui-tab-title")) { + $(this).removeClass("layui-this"); + } + }); + if (reload == null) { + $('#' + id).attr("src", href); + } + }, + tabChange: function (href, title, id) { + var layelement = layui.element(); + var inx = $('#' + id).parent().index(); + if ($('#' + id).length > 0) { + $('#' + id).attr('src', href); + layelement.tabChange('ukefutab', id); + } + $(".layui-this").each(function () { + if (!$(this).parent().hasClass("layui-tab-title")) { + $(this).removeClass("layui-this"); + } - }); - } + }); + } }; diff --git a/contact-center/app/src/main/resources/static/js/otnContent.js b/contact-center/app/src/main/resources/static/js/otnContent.js new file mode 100644 index 00000000..e0d999f3 --- /dev/null +++ b/contact-center/app/src/main/resources/static/js/otnContent.js @@ -0,0 +1,76 @@ +(function ($) { + $.fn.otnContent = function () { + this.each(function () { + var $this = $(this); + if ($this.attr('value')) { + var json = JSON.parse($this.attr('value')); + } else { + var json = {"type": "text", "content": "", "url": "/images/upload.png"} + } + var box = $('
    ') + var jsonInput = $('') + var select = $('') + var textInput = $('') + var imageBox = $('
    ') + var imageInput = $(' ') + var img = $('') + var uploadText = $('
    点击上传
    ') + imageBox.append(imageInput) + imageBox.append(img) + imageBox.append(uploadText) + box.append(textInput) + box.append(imageBox) + if (json.url == '/images/upload.png') { + img.css('height', '100px'); + uploadText.show(); + } else { + img.css('height', '130px'); + uploadText.hide(); + } + if (json.type == 'text') { + imageBox.hide() + select.val("text"); + } else { + textInput.hide() + select.val("image"); + } + imageInput.change(function () { + var form = new FormData(); + form.append('imgFile', this.files[0]); + $.ajax({ + type: 'POST', + url: "/apps/messenger/otn/image/upload.html", + data: form, + processData: false, + contentType: false + }).done(function (data) { + img.attr('src', data.url); + uploadText.hide(); + json.url = data.url; + jsonInput.val(JSON.stringify(json)); + img.css('height', '130px'); + }); + }); + textInput.bind("input propertychange", function (event) { + json.content = textInput.val(); + jsonInput.val(JSON.stringify(json)); + }); + select.change(function () { + if (select.val() == 'image') { + textInput.hide(); + imageBox.show() + json.type = 'image' + } else { + textInput.show(); + imageBox.hide(); + json.type = 'text' + } + jsonInput.val(JSON.stringify(json)); + }) + jsonInput.val(JSON.stringify(json)); + $this.append(jsonInput) + $this.append(select) + $this.append(box) + }) + }; +})(jQuery); \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/admin/area/add.html b/contact-center/app/src/main/resources/templates/admin/area/add.html deleted file mode 100644 index 6afe7c9e..00000000 --- a/contact-center/app/src/main/resources/templates/admin/area/add.html +++ /dev/null @@ -1,101 +0,0 @@ -
    -
    - -
    - -
    - -
    -
    区域名称,例如:华南、华北
    -
    -
    - -
    -
      -
      -
      -
      -
      - - -
      -
      -
      -
      - diff --git a/contact-center/app/src/main/resources/templates/admin/area/edit.html b/contact-center/app/src/main/resources/templates/admin/area/edit.html deleted file mode 100644 index 87cd0dcb..00000000 --- a/contact-center/app/src/main/resources/templates/admin/area/edit.html +++ /dev/null @@ -1,102 +0,0 @@ -
      -
      - - -
      - -
      - -
      -
      区域名称,例如:华南、华北
      -
      -
      - -
      -
        -
        -
        -
        -
        - - -
        -
        -
        -
        - diff --git a/contact-center/app/src/main/resources/templates/admin/area/index.html b/contact-center/app/src/main/resources/templates/admin/area/index.html deleted file mode 100644 index dab70178..00000000 --- a/contact-center/app/src/main/resources/templates/admin/area/index.html +++ /dev/null @@ -1,74 +0,0 @@ -
        -
        -

        - 区域列表<#if areaList??>(${areaList?size}) - - - -

        -
        -
        - - - - - - - - - - - - - - - - <#if areaList??> - <#list areaList as area> - - - - - - - - -
        名称区域操作
        - ${area.name!''} - ${area.area!''} - - - 编辑 - - - - 删除 - -
        -
        -
        -
        -
        -
        -
        -
        - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/admin/channel/im/add.html b/contact-center/app/src/main/resources/templates/admin/channel/im/add.html deleted file mode 100644 index 70e7b8d4..00000000 --- a/contact-center/app/src/main/resources/templates/admin/channel/im/add.html +++ /dev/null @@ -1,49 +0,0 @@ -
        -
        -
        -
        - -
        - -
        -
        - * - 网站名称 -
        -
        -
        -
        -
        - -
        - -
        -
        - * -
        -
        -
        - -
        - 网站信息填写后会根据网站的URL生成网站标识,URL中不包含http或https -
        - -
        -
        - - -
        -
        -
        -
        - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/admin/channel/im/add.pug b/contact-center/app/src/main/resources/templates/admin/channel/im/add.pug new file mode 100644 index 00000000..dac7edd5 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/channel/im/add.pug @@ -0,0 +1,32 @@ +.uk-layui-form + form.layui-form(action="/admin/im/save.html", method="post") + .layui-form-item + .layui-inline + label.layui-form-label(style="width:150px;") 网站名称: + .layui-input-inline + input.layui-input(type="text", name="name", required="", lay-verify="required", autocomplete="off") + .layui-form-mid.layui-word-aux + font(color="red") * + | 网站名称 + .layui-form-item + .layui-inline + label.layui-form-label(style="width:150px;") 网站地址: + .layui-input-inline + input.layui-input(type="text", name="baseURL", required="", lay-verify="required", autocomplete="off") + .layui-form-mid.layui-word-aux + font(color="red") * + | 网站地址 + .ukefu-imp-tips(style="margin-top:0px;padding: 0;width: 548px;text-align: center") + | 网站信息填写后会根据网站的URL生成网站标识,URL中不包含http或https + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit="", lay-filter="formDemo") 立即提交 + button.layui-btn.layui-btn-original(type="reset") 重置 +script. + layui.use('form', function () { + var form = layui.form(); + form.render(); //更新全部 + }); + layui.use('element', function () { + var element = layui.element(); + }); diff --git a/contact-center/app/src/main/resources/templates/admin/channel/im/edit.html b/contact-center/app/src/main/resources/templates/admin/channel/im/edit.html deleted file mode 100644 index d4a3eaaf..00000000 --- a/contact-center/app/src/main/resources/templates/admin/channel/im/edit.html +++ /dev/null @@ -1,50 +0,0 @@ -
        -
        - -
        -
        - -
        - -
        -
        - * - 网站名称 -
        -
        -
        -
        -
        - -
        - -
        -
        - * -
        -
        -
        - -
        - 网站信息填写后会根据网站的URL生成网站标识,URL中不包含http或https -
        - -
        -
        - - -
        -
        -
        -
        - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/admin/channel/im/edit.pug b/contact-center/app/src/main/resources/templates/admin/channel/im/edit.pug new file mode 100644 index 00000000..99f5bf0a --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/channel/im/edit.pug @@ -0,0 +1,32 @@ +.uk-layui-form + form.layui-form(action="/admin/im/update.html", method="post") + input(type="hidden", name="id", value=snsAccount.id) + .layui-form-item + .layui-inline + label.layui-form-label(style="width:150px;") 网站名称: + .layui-input-inline + input.layui-input(type="text", name="name", value=snsAccount.name, required="", lay-verify="required", autocomplete="off") + .layui-form-mid.layui-word-aux + font(color="red") * + | 网站名称 + .layui-form-item + .layui-inline + label.layui-form-label(style="width:150px;") 网站地址: + .layui-input-inline + input.layui-input(type="text", name="baseURL", value=snsAccount.baseURL, required="", lay-verify="required", autocomplete="off") + .layui-form-mid.layui-word-aux + font(color="red") * + .ukefu-imp-tips(style="margin-top:0px;padding: 0;width: 548px;text-align: ") + | 网站信息填写后会根据网站的URL生成网站标识,URL中不包含http或https + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit="", lay-filter="formDemo") 立即提交 + button.layui-btn.layui-btn-original(type="reset") 重置 +script. + layui.use('form', function () { + var form = layui.form(); + form.render(); //更新全部 + }); + layui.use('element', function () { + var element = layui.element(); + }); diff --git a/contact-center/app/src/main/resources/templates/admin/channel/im/index.html b/contact-center/app/src/main/resources/templates/admin/channel/im/index.html deleted file mode 100644 index 286ca506..00000000 --- a/contact-center/app/src/main/resources/templates/admin/channel/im/index.html +++ /dev/null @@ -1,106 +0,0 @@ -
        -
        -

        - 网站列表<#if snsAccountList??>(${snsAccountList.totalElements!''}) - - <#if user.superadmin || user.admin> - - - -

        -
        -
        - - - - - - - - - - - - <#if snsAccountList?? && snsAccountList.content??> - <#list snsAccountList.content as snsAccount> - - - - - - - - - - -
        名称网站地址网站标识创建时间操作
        - ${snsAccount.name!''} - ${snsAccount.baseURL!''}${snsAccount.snsid!''}${snsAccount.createtime?string("yyyy-MM-dd HH:mm:ss")} - - - 接入 - - <#if user.superadmin || user.admin> - - - 编辑 - - - - <#if (user.superadmin || user.admin) && snsAccount.datastatus != true > - data-confirm="请输入二次安全验证密码" title="删除网站需要进行二次密码验证,请确认是否删除?" > - - 删除 - - - - -
        -
        -
        -
        -
        -
        -
        -
        - diff --git a/contact-center/app/src/main/resources/templates/admin/channel/im/index.pug b/contact-center/app/src/main/resources/templates/admin/channel/im/index.pug new file mode 100644 index 00000000..76c05a12 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/channel/im/index.pug @@ -0,0 +1,77 @@ +extends /admin/include/layout.pug + +block content + .row + .col-lg-12 + h1.site-h1(style="background-color:#FFFFFF;") + | 网站列表 (#{snsAccountList.totalElements}) + span(style="float:right;") + if user.superadmin || user.admin + button.layui-btn.layui-btn-small.green(href="/admin/im/add.html", data-toggle="ajax", data-width="550", data-height="300", data-title="创建新网站") 创建新网站 + .ror(style="padding:5px;") + .col-lg-12 + table.layui-table(lay-skin="line", style="table-layout: fixed; word-break: break-all") + thead + tr + th 名称 + th 网站地址 + th(width="80px") 网站标识 + th 创建时间 + th(style="white-space:nowrap;", nowrap="nowrap") 操作 + tbody + for snsAccount in snsAccountList.content + tr + td(title="#{snsAccount.name}", style="text-overflow: ellipsis;white-space: nowrap;overflow: hidden;")= snsAccount.name + td(title="#{snsAccount.baseURL}", style="text-overflow: ellipsis;white-space: nowrap;overflow: hidden;")= snsAccount.baseURL + td= snsAccount.snsid + td= pugHelper.formatDate("yyyy-MM-dd HH:mm:ss", snsAccount.createtime) + td(style="white-space:nowrap;", nowrap="nowrap") + a(href="/admin/webim/index.html?snsid=" + snsAccount.snsid) + i.layui-icon  + | 接入 + if user.superadmin || user.admin + a(href="/admin/im/edit.html?id=" + snsAccount.id, data-toggle="ajax", data-width="550", data-height="300", data-title="编辑网站") + i.layui-icon  + | 编辑 + if (user.superadmin || user.admin) && snsAccount.datastatus != true + a(href="/admin/im/delete.html?id=" + snsAccount.id, style="margin-left:10px;", data-toggle="tip", data-confirm=(secret.enable ? "请输入二次安全验证密码" : false),title="删除网站需要进行二次密码验证,请确认是否删除?") + i.layui-icon(style="color:red;") ဆ + | 删除 + .row(style="padding:5px;") + #page.col-lg-12(style="text-align:center;") + script. + if ("#{execute}" == "false") + top.layer.alert('二次 验证密码设置失败,输入的密码错误,请重新操作!', {icon: 2}); + var msg = '#{msg}'; + if (msg == '1') + top.layer.alert('二次验证密码设置成功', {icon: 1}); + else if (msg == '2') + top.layer.alert('二次验证密码设置失败,请确认两次输入的密码一致', {icon: 2}); + else if (msg == '3') + top.layer.alert('二次验证密码设置失败,旧的密码验证失败,请输入正确的密码', {icon: 2}); + + layui.use('layer', function () { + var layer = layui.layer; + console.log(window.location.href) + var status = '#{status}'; + if (status == 'new_webim_success') + layer.msg('网站添加成功', {icon: 1, time: 1000}) + else if (status == 'new_webim_fail') + layer.msg('网站添加失败', {icon: 2, time: 3000}) + + }); + layui.use(['laypage', 'layer'], function () { + var laypage = layui.laypage + , layer = layui.layer; + laypage({ + cont: 'page' + , pages: #{snsAccountList.totalPages} //总页数 + , curr: #{snsAccountList.number + 1} + , groups: 5 //连续显示分页数 + , jump: function (data, first) { + if (!first) { + location.href = "/admin/im/index.html?p=" + data.curr; + } + } + }); + }); diff --git a/contact-center/app/src/main/resources/templates/admin/config/index.html b/contact-center/app/src/main/resources/templates/admin/config/index.html deleted file mode 100644 index af5b31ba..00000000 --- a/contact-center/app/src/main/resources/templates/admin/config/index.html +++ /dev/null @@ -1,794 +0,0 @@ -
        - <#if systemConfig??> -
        -
        -
        -
        -
        -

        系统设置

        -
        -
        -
        -
        -
        -
        系统颜色风格选择
        -
        -
        -
        -

        春松客服系统界面颜色风格

        -

        默认的配色是绿色,选择颜色可以在右侧预览风格,点击保存即可生效

        -
        -
        - -
        -
        -
        -
        - - - -
        -
        产品登录界面和后台管理界面标题
        -
        -
        -
        -

        登录页和产品后台页面显示标题

        - -
        -
        - -
        -
        -
        -
        - -
        -
        登录页欢迎Logo图片
        -
        -
        -
        -

        登录页显示的Logo图片,建议尺寸220*60。

        -

        - -

        -
        -
        -
        -
        - - 上传图片 -
        -
        -
        -
        -
        -
        -
        - -
        -
        产品后台管理界面Logo图片
        -
        -
        -
        -

        登录页显示的Logo图片,建议尺寸280*80。

        -

        -

        -

        -
        -
        -
        -
        - - 上传图片 -
        -
        -
        -
        -
        -
        -
        - -
        -
        产品标题栏缩略小图
        -
        -
        -
        -

        产品登录页和后台管理页面的标题栏小缩略图,文件扩展名是ico格式

        -

        -

        -

        -
        -
        -
        -
        - - 上传图片 -
        -
        -
        -
        -
        -
        -
        - -
        -
        重启或停止对话服务
        -
        -
        -
        -

        Netty SocketIO服务,服务端口:${webimport} , 状态:<#if imServerStatus?? && imServerStatus == true>服务中<#else>已停止

        -

        建议通过界面停止或启动对话服务,避免出现端口被占用的问题

        -
        - -
        -
        -
        - -
        -
        启用企业聊天功能
        -
        -
        -
        -

        启用企业聊天组件,右下角出现企业聊天窗口,当前状态:<#if entim?? && entim == true>已启用<#else>已关闭

        -

        默认关闭企业聊天功能

        -
        -
        - <#if entim?? && entim == true> - 关闭企业聊天功能 - <#else> - 启用企业聊天功能 - -
        -
        -
        -
        - -
        -
        启用权限数据采集功能功能
        -
        -
        -
        -

        启用权限数据采集功能后,会进入数据采集模式,当前状态:<#if infoace?? && infoace == true>已启用<#else>已关闭

        -

        启用后,在春松客服界面上的任何链接点击操作都会触发数据收集功能

        -
        -
        - <#if infoace?? && infoace == true> - 退出数据采集功能 - <#else> - 进入数据采集功能 - -
        -
        -
        -
        - - - -
        -
        修改微信接收消息的日志级别
        -
        -
        -
        -

        动态修改微信接收消息的日志级别

        -

        默认是INFO,调整到DEBUG能够方便微信消息排查错误

        -
        -
        - -
        -
        -
        -
        - - - -
        -
        百度地图的Key代码(AK)
        -
        -
        -
        -

        用于调用百度地图的API

        -

        需要使用的API包括坐标转换和Javascript接口

        -
        -
        - -
        -
        -
        -
        - - - -
        -
        启用权限控制
        -
        -
        -
        -

        系统菜单的权限控制

        -

        默认不启用权限控制,如果选择启用,用户需要授权才能访问需要授权的系统菜单功能,系统管理员账号(admin)不受控制

        -
        -
        - checked="checked"> -
        -
        -
        -
        - - - - - - - -
        -
        -
        -
        - - - -
        -
        -
        -
          -
        • 首页
        • -
        • 系统管理
        • -
        • 坐席对话
        • -
        -
        -
        -
        -
        -
        -
        -
        -
        - -
        -
        -
        -
        -
        -
        -
        -
        - - -
        -
        -
        -
        -
        - - diff --git a/contact-center/app/src/main/resources/templates/admin/config/index.pug b/contact-center/app/src/main/resources/templates/admin/config/index.pug new file mode 100644 index 00000000..a5d0ae7c --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/config/index.pug @@ -0,0 +1,539 @@ +extends /admin/include/layout.pug +block content + form.layui-form(method='post', key='set-mine', enctype='multipart/form-data', action='/admin/config/save.html') + if systemConfig + input(type="hidden" name="id" value=systemConfig.id) + .row + .col-lg-12 + .ukefu-customer-div.setting-wrapper + .box.default-box + .box-header + h3.box-title 系统设置 + + //- 主题索引 在 class 里引用 + - var ukefuThemeColorNum = '1' + if systemConfig.theme == '01' + - ukefuThemeColorNum = '1' + else if systemConfig.theme == '02' + - ukefuThemeColorNum = '2' + else if systemConfig.theme == '03' + - ukefuThemeColorNum = '3' + .box-body.ukefu-im-theme + .row + .col-lg-8 + .ukefu-webim-prop + .ukefu-webim-tl(style='clear:both;') 系统颜色风格选择 + .box-item + .row + .col-lg-8 + p 春松客服系统界面颜色风格 + p(style='color:#888888;font-size:13px;margin-top:10px;') 默认的配色是绿色,选择颜色可以在右侧预览风格,点击保存即可生效 + .col-lg-4 + select(name='theme', lay-filter='sysconfig') + option(value="01", selected= systemConfig.theme == '01' && "selected") 绿色 + option(value="02", selected= systemConfig.theme == '02' && "selected") 黑色 + option(value="03", selected= systemConfig.theme == '03' && "selected") 蓝色 + .ukefu-webim-prop(hidden) + .ukefu-webim-tl(style='clear:both;') 请填写服务器的访问地址 + .box-item + .row + .col-lg-8 + p 服务器的访问地址,包含端口。 + p(style='color:#888888;font-size:13px;margin-top:10px;') 后台访问静态资源时需要使用 + .col-lg-4(style='text-align:right;') + .layui-input-block + input.layui-input(type='text', name='iconstr', value= systemConfig.iconstr, autocomplete='off') + .ukefu-webim-prop + .ukefu-webim-tl(style='clear:both;') 产品登录界面和后台管理界面标题 + .box-item + .row + .col-lg-8 + p 登录页和产品后台页面显示标题 + .col-lg-4(style='text-align:right;position: relative;') + input.layui-input(type='text', name='title', value=systemConfig.title ? systemConfig.title: "春松客服-全渠道智能客服", autocomplete='off') + .ukefu-webim-prop + .ukefu-webim-tl(style='clear:both;') 登录页欢迎Logo图片 + .box-item + .row + .col-lg-8 + p 登录页显示的Logo图片,建议尺寸220*60。 + p(style='color:#888888;font-size:13px;margin-top:10px;') + span.ukefu-logo + img(src= systemConfig.loginlogo ? '/res/image.html?id=' + systemConfig.loginlogo: '/images/logo2.png', style='height:60px;') + .col-lg-4(style='text-align:right;position: relative;') + .layui-input-block + .layui-box.layui-upload-button + input.layui-upload-file(type='file', name='loginlogo', accept='image/gif, image/jpeg, image/png', lay-ext='jpg|png|gif', onchange='$(\'#logo_img\').html($(this).val());') + span.layui-upload-icon + i.layui-icon  + | 上传图片 + #logo_img(style='position:absolute;right: 20px;') + .ukefu-webim-prop + .ukefu-webim-tl(style='clear:both;') 产品后台管理界面Logo图片 + .box-item + .row + .col-lg-8 + p 登录页显示的Logo图片,建议尺寸280*80。 + p(style='color:#888888;font-size:13px;margin-top:10px;') + .ukefu-console-logo(class='ukefu-system-theme' + ukefuThemeColorNum, style='width:140px;height:40px;padding:5px;') + img(src= systemConfig.consolelogo ? '/res/image.html?id=' + systemConfig.consolelogo: '/images/logo.png', style='height:40px;') + p + .col-lg-4(style='text-align:right;position: relative;') + .layui-input-block + .layui-box.layui-upload-button + input.layui-upload-file(type='file', name='consolelogo', accept='image/gif, image/jpeg, image/png', lay-ext='jpg|png|gif', onchange='$(\'#consolelogo_img\').html($(this).val());') + span.layui-upload-icon + i.layui-icon  + | 上传图片 + #consolelogo_img(style='position:absolute;right: 20px;') + .ukefu-webim-prop + .ukefu-webim-tl(style='clear:both;') 产品标题栏缩略小图 + .box-item + .row + .col-lg-8 + p 产品登录页和后台管理页面的标题栏小缩略图,文件扩展名是ico格式 + p(style='color:#888888;font-size:13px;margin-top:10px;'). + .ukefu-console-logo(style='width:140px;height:40px;padding:5px;') + img(src= systemConfig.favlogo ? '/res/image.html?id=' + systemConfig.favlogo:'/images/favicon.ico', style='height:40px;') + p + .col-lg-4(style='text-align:right;position: relative;') + .layui-input-block + .layui-box.layui-upload-button + input.layui-upload-file(type='file', name='favlogo', accept='image/ico, image/icon, image/gif, image/jpeg, image/png', lay-ext='jpg|png|ico|icon|gif', onchange='$(\'#favlogo_img\').html($(this).val());') + span.layui-upload-icon + i.layui-icon  + | 上传图片 + #favlogo_img(style='position:absolute;right: 20px;') + .ukefu-webim-prop + .ukefu-webim-tl(style='clear:both;') 重启或停止对话服务 + .box-item + .row + .col-lg-8 + p Netty SocketIO服务,服务端口:#{webimport}, 状态: + if imServerStatus == true + small.ukefu-label.theme4 服务中 + else + small.ukefu-label.theme4(style="background-color:#FF5722;") 已停止 + p(style='color:#888888;font-size:13px;margin-top:10px;') 建议通过界面停止或启动对话服务,避免出现端口被占用的问题 + .col-lg-4 + if imServerStatus == true + a.layui-btn.layui-btn-small.layui-btn-danger(href="/admin/config/stopimserver.html", data-toggle="tip", title="停止对话服务后不能从Web界面再次启动,请确认是否退出?", data-confirm= secret.enable==true ? "请输入二次安全验证密码":null ) 停止对话服务 + .ukefu-webim-prop + .ukefu-webim-tl(style='clear:both;') 启用企业聊天功能 + .box-item + .row + .col-lg-8 + p 启用企业聊天组件,右下角出现企业聊天窗口,当前状态: + if entim == true + small.ukefu-label.theme4 已启用 + else + small.ukefu-label.theme4(style="background-color:#FF5722;") 已关闭 + p(style='color:#888888;font-size:13px;margin-top:10px;') 默认关闭企业聊天功能 + .col-lg-4 + if entim == true + a(href="/admin/config/stopentim.html" data-toggle="tip" title="请确认是否关闭企业聊天功能?" class="layui-btn layui-btn-small layui-btn-danger") 关闭企业聊天功能 + else + a(href="/admin/config/startentim.html" data-toggle="tip" title="启用企业聊天功能" class="layui-btn layui-btn-small") 启用企业聊天功能 + .ukefu-webim-prop + .ukefu-webim-tl(style='clear:both;') 启用权限数据采集功能功能 + .box-item + .row + .col-lg-8 + p 启用权限数据采集功能后,会进入数据采集模式,当前状态: + if infoace == true + small.ukefu-label.theme4 已启用 + else + small.ukefu-label.theme4(style="background-color:#FF5722;") 已关闭 + p(style='color:#888888;font-size:13px;margin-top:10px;') 启用后,在春松客服界面上的任何链接点击操作都会触发数据收集功能 + .col-lg-4 + if infoace == true + a(href="/admin/auth/infoacq.html" target="parent" class="layui-btn layui-btn-small layui-btn-danger") 退出数据采集功能 + else + a(href="/admin/auth/infoacq.html" target="parent" class="layui-btn layui-btn-small") 进入数据采集功能 + .ukefu-webim-prop(hidden) + .ukefu-webim-tl(style='clear:both;') 停止春松客服系统 + .box-item + .row + .col-lg-8 + p 安全退出系统服务,停止服务调用JVM的退出指令 + p(style='color:#888888;font-size:13px;margin-top:10px;') 适用于Tomcat、Jetty等系统,WebLogic/WebSphere等中间件严禁使用 + .col-lg-4 + a.layui-btn.layui-btn-small.layui-btn-danger(href="/admin/config/stop.html", data-toggle="tip", title="停止服务将会调用JVM退出指令,请确认是否退出?", data-confirm= secret.enable ? '请输入二次安全验证密码':null) 停止服务 + .ukefu-webim-prop + .ukefu-webim-tl(style='clear:both;') 修改微信接收消息的日志级别 + .box-item + .row + .col-lg-8 + p 动态修改微信接收消息的日志级别 + p(style='color:#888888;font-size:13px;margin-top:10px;') 默认是INFO,调整到DEBUG能够方便微信消息排查错误 + .col-lg-4 + select(name='loglevel', lay-filter='sysconfig') + option(value="info", selected = (systemConfig.loglevel == 'info'?'selected' : false)) INFO + option(value="debug", selected = (systemConfig.loglevel == 'debug'?'selected' : false)) DEBUG + .ukefu-webim-prop(hidden) + .ukefu-webim-tl(style='clear:both;') 启用服务SSL安全访问 + .box-item + .row + .col-lg-8 + p 启用 SSL 安全协议 + p(style='color:#888888;font-size:13px;margin-top:10px;') 启用后需要上传SSL证书和设置SSL证书密码 + .col-lg-4(style='text-align:right;') + input(type="checkbox" title="启用" name="enablessl" lay-filter="enablessl" value="1", checked=(systemConfig.enablessl?'checked':false)) + .row.httpsconfig(style='margin-top:20px;display:' + (systemConfig.enablessl == false? "none;":"block;")) + .col-lg-8 + p + | JKS 证书文件 + span(style='color:red;font-weight:bold;')= systemConfig.jksfile + p(style='color:#888888;font-size:13px;margin-top:10px;'). + 受信的SSL证书文件,请上传.JKS类型的证书文件 + .col-lg-4(style='text-align:right;') + span#jkstip + .layui-box.layui-upload-button + input.layui-upload-file(type='file', name='keyfile', accept='.jks', lay-ext='jks', onchange='$(\'#jkstip\').html($(this).val());') + span.layui-upload-icon + i.layui-icon  + | 上传 JKS 文件 + .row.httpsconfig(style='margin-top:20px;display:' + (systemConfig.enablessl == false ? 'none;':'block;')) + .col-lg-8 + p JKS证书密码 + p(style='color:#888888;font-size:13px;margin-top:10px;') + | .JKS文件的证书密码, + b(style='color:red;font-weight:bold;') 如无改变,不用填写 + .col-lg-4(style='text-align:right;') + input.layui-input(type='password', name='jkspassword', autocomplete='off') + .ukefu-webim-prop(hidden) + .ukefu-webim-tl(style='clear:both;') 启用涉及重要操作的二次验证密码 + .box-item + .row + .col-lg-8 + p 启用重要操作的二次密码验证 + p(style='color:#888888;font-size:13px;margin-top:10px;') 启用后重启服务器、关闭对话服务器和修改证书等操作将会进行二次安全验证 + .col-lg-4(style='text-align:right;') + input(type="checkbox", title="启用", name="enable", lay-filter="enable", value="1", checked = (secret.enable == true?'checked':false)) + if secret.enable == true + .row.elablesec(style="margin-top:20px;display:" + (secret.enable == true?'block;':'none;')) + .col-lg-8 + p 已设定的旧的密码 + p(style="color:#888888;font-size:13px;margin-top:10px;") 请填写已经保存的旧的密码,提交后会验证旧密码是否正确 + .col-lg-4(style="text-align:right;") + input(type="password" name="oldpass" id="oldpass" value="" autocomplete="off" class="layui-input") + .row.elablesec(style='margin-top:20px;display:' + (secret.enable == true ? 'block;':'none;')) + .col-lg-8 + p 安全操作的二次验证新密码 + p(style='color:#888888;font-size:13px;margin-top:10px;') 首次设置密码无需验证旧密码 + .col-lg-4(style='text-align:right;') + input#password.layui-input(type='password', name='password', autocomplete='off') + .row.elablesec(style='margin-top:20px;display:' + (secret.enable == true ? 'block;':'none;')) + .col-lg-8 + p 再次确认安全操作的二次验证新密码 + p(style='color:#888888;font-size:13px;margin-top:10px;') + b(style='color:red;font-weight:bold;') 请保证新密码两次输入相同 + .col-lg-4(style='text-align:right;') + input#repassword.layui-input(type='password', name='repassword', lay-verify='pass', autocomplete='off') + .ukefu-webim-prop + .ukefu-webim-tl(style='clear:both;') 百度地图的Key代码(AK) + .box-item + .row + .col-lg-8 + p 用于调用百度地图的API + p(style='color:#888888;font-size:13px;margin-top:10px;') 需要使用的API包括坐标转换和Javascript接口 + .col-lg-4 + input.layui-input(type='text', name='mapkey', value=systemConfig.mapkey, autocomplete='off') + .ukefu-webim-prop(hidden) + .ukefu-webim-tl(style='clear:both;') 工单系统布局方式 + .box-item + .row + .col-lg-8 + p 启用三栏布局 + p(style='color:#888888;font-size:13px;margin-top:10px;') 工单系统默认采用的是两栏布局,启用此功能后,工单系统展现将采用三栏布局方式 + .col-lg-4(style='text-align:right;') + input(type="checkbox", title="启用", name="workorders", lay-filter="workorders", value="1", checked= (systemConfig.workorders ? 'checked': false)) + .ukefu-webim-prop + .ukefu-webim-tl(style='clear:both;') 启用权限控制 + .box-item + .row + .col-lg-8 + p 系统菜单的权限控制 + p(style='color:#888888;font-size:13px;margin-top:10px;') 默认不启用权限控制,如果选择启用,用户需要授权才能访问需要授权的系统菜单功能,系统管理员账号(admin)不受控制 + .col-lg-4(style='text-align:right;') + input(type="checkbox", title="启用", name="auth", value="1", checked= (systemConfig.auth ? 'checked': false)) + .ukefu-webim-prop(hidden) + .ukefu-webim-tl(style='clear:both;') 启用语音平台模板配置 + .box-item + .row + .col-lg-8 + p 启用语音接入平台上的模板配置功能 + p(style='color:#888888;font-size:13px;margin-top:10px;') 开启后语音平台能够从系统模板中的配置信息读取配置文件,具备热更新能力 + .col-lg-4(style='text-align:right;') + input(type="checkbox" title="启用" name="callcenter" lay-filter="callcenter", checked = (systemConfig.callcenter == true ? 'checked': false) ) + .box-item#callcenter(style='position: relative;display:' + (systemConfig.callcenter == true ? 'block;':'none;')) + .row(style='margin-bottom:20px;') + .col-lg-8 + p a、选择分机配置模板 + p(style='color:#888888;font-size:13px;margin-top:10px;') 语音平台的分机资源模板配置文件,用于配置分机号码资源 + .col-lg-4(style='text-align:right;') + .layui-input-block + select(name='cc_extention') + option(value) 请选择分机配置模板... + if size(templateList) > 0 + for template in templateList + option(value=template.id, selected= ((systemConfig.cc_extention && template.id == systemConfig.cc_extention) ? 'selected': false))= template.name + .row(style='margin-bottom:20px;') + .col-lg-8 + p b、呼叫中心配置 + p(style='color:#888888;font-size:13px;margin-top:10px;') 语音平台的呼叫中心配置模板 + .col-lg-4(style='text-align:right;') + .layui-input-block + select(name='cc_quene') + option(value) 请选择呼叫中心配置模板... + if size(templateList) > 0 + for template in templateList + option(value=template.id, selected=((systemConfig.cc_quene && template.id == systemConfig.cc_quene) ? 'selected' : false))= template.name + .row(style='margin-bottom:20px;') + .col-lg-8 + p c、拨号计划(路由规则) + p(style='color:#888888;font-size:13px;margin-top:10px;') 系统拨号计划、路由规则配置模板 + .col-lg-4(style='text-align:right;') + .layui-input-block + select(name='cc_router') + option(value) 请选择路由规则模板... + if size(templateList) > 0 + for template in templateList + option(value=template.id, selected=((systemConfig.cc_router && template.id == systemConfig.cc_router) ? 'selected' : false))= template.name + .row(style='margin-bottom:20px;') + .col-lg-8 + p d、IVR导航语音配置模板 + p(style='color:#888888;font-size:13px;margin-top:10px;') 语音平台的IVR导航语音菜单配置 + .col-lg-4(style='text-align:right;') + .layui-input-block + select(name='cc_ivr') + option(value) 请选择IVR模板... + if size(templateList) > 0 + for template in templateList + option(value=template.id, selected=((systemConfig.cc_ivr && template.id == systemConfig.cc_ivr) ? 'selected' : false))= template.name + .row(style='margin-bottom:20px;') + .col-lg-8 + p e、访问列表控制(ACL) + p(style='color:#888888;font-size:13px;margin-top:10px;') 语音平台的访问控制列表配置模板 + .col-lg-4(style='text-align:right;') + .layui-input-block + select(name='cc_acl') + option(value) 请选择ACL模板... + if size(templateList) > 0 + for template in templateList + option(value=template.id, selected=((systemConfig.cc_acl && template.id == systemConfig.cc_acl) ? 'selected' : false))= template.name + .row(style='margin-bottom:20px;') + .col-lg-8 + p f、语音网关配置(SPI中继) + p(style='color:#888888;font-size:13px;margin-top:10px;') 语音平台的语音接入网关配置模板(SIP Trunk) + .col-lg-4(style='text-align:right;') + .layui-input-block + select(name='cc_siptrunk') + option(value) 请选择SIP中继模板... + if size(templateList) > 0 + for template in templateList + option(value=template.id, selected=((systemConfig.cc_siptrunk && template.id == systemConfig.cc_siptrunk) ? 'selected' : false))= template.name + .row(style='margin-bottom:20px;') + .col-lg-8 + p g、启用号码外呼功能 + p(style='color:#888888;font-size:13px;margin-top:10px;') 点击联系人电话号码自动拨号 + .col-lg-4(style='text-align:right;') + .layui-input-block + input(type="checkbox", title="启用" name="callout", checked=(systemConfig.callout == true?'checked':false)) + .ukefu-webim-prop(hidden) + .ukefu-webim-tl(style='clear:both;') 启用工单系统的邮件通知 + .box-item + .row + .col-lg-8 + p 工单在流转到达的时候是否发送邮件通知 + p(style='color:#888888;font-size:13px;margin-top:10px;') 开启后工单状态变更的时候,会发送 + .col-lg-4(style='text-align:right;') + input(type="checkbox", title="启用", name="enablemail", lay-filter="email", checked=(systemConfig.enablemail == true?'checked':false)) + .box-item#email(style='position: relative;display:' + (systemConfig.enablemail == true ? 'block;':'none;')) + .row(style='margin-bottom:20px;') + .col-lg-8 + p a、发送邮件的服务器 + p(style='color:#888888;font-size:13px;margin-top:10px;') 选用发送邮件的邮件服务器配置信息 + .col-lg-4(style='text-align:right;') + .layui-input-block + select(name='emailid') + option(value) 请选择邮件服务器... + if size(sysMessageList) > 0 + for server in sysMessageList + option(value=server.id, selected = ((systemConfig.emailid && systemConfig.emailid == server.id)? 'checked':false) )= server.name + .row(style='margin-bottom:20px;') + .col-lg-8 + p b、默认邮件模板 + p(style='color:#888888;font-size:13px;margin-top:10px;') 发送邮件的时候,默认使用的邮件模板 + .col-lg-4(style='text-align:right;') + .layui-input-block + select(name='emailworkordertp') + option(value) 请选择邮件模板... + if size(workOrderList) + for template in workOrderList + option(value=template.id, checked=((systemConfig.emailworkordertp && systemConfig.emailworkordertp == template.id) ? 'checked':false))= template.name + .row(style='margin-bottom:20px;') + .col-lg-8 + p c、创建工单的邮件模板 + p(style='color:#888888;font-size:13px;margin-top:10px;') 创建工单的时候,发送给发起人的邮件模板 + .col-lg-4(style='text-align:right;') + .layui-input-block + select(name='mailcreatetp') + option(value) 请选择邮件模板... + if size(workOrderList) + for template in workOrderList + option(value=template.id, selected=(template.id == systemConfig.mailcreatetp ? 'selected':false) )= template.name + .row(style='margin-bottom:20px;') + .col-lg-8 + p d、工单有状态改变的模板 + p(style='color:#888888;font-size:13px;margin-top:10px;') 工单的状态发生改变时候,发送给当前处理人的邮件模板 + .col-lg-4(style='text-align:right;') + .layui-input-block + select(name='mailupdatetp') + option(value) 请选择邮件模板... + if size(workOrderList) > 0 + for template in workOrderList + option(value=template.id, selected=(template.id == systemConfig.mailupdatetp ? 'selected' : false) )= template.name + .row(style='margin-bottom:20px;') + .col-lg-8 + p e、工单有状态变更的时候发送邮件给创建人 + p(style='color:#888888;font-size:13px;margin-top:10px;') 工单的状态发生改变时候,发送给工单状态变更邮件给创建人 + .col-lg-4(style='text-align:right;') + .layui-input-block + input(type="checkbox" title="启用" name="emailtocreater", checked=(systemConfig.emailtocreater == true?'checked':false) ) + .row(style='margin-bottom:20px;') + .col-lg-8 + p f、工单有状态变更的时候发送给创建人的邮件模板 + p(style='color:#888888;font-size:13px;margin-top:10px;') 工单的状态发生改变时候,发送给工单创建人的邮件模板 + .col-lg-4(style='text-align:right;') + .layui-input-block + select(name='emailtocreatertp') + option(value) 请选择邮件模板... + if size(workOrderList) + for template in workOrderList + option(value=template.id, selected=(template.id == systemConfig.emailtocreatertp?'selected': false) )= template.name + .row(style='margin-bottom:20px;') + .col-lg-8 + p g、工单邮件是否显示邮件收件人名称 + p(style='color:#888888;font-size:13px;margin-top:10px;') 工单邮件是否显示邮件收件人名称 + .col-lg-4(style='text-align:right;') + .layui-input-block + input(type="checkbox" title="启用" name="emailshowrecipient", checked=(systemConfig.emailshowrecipient== true?'checked':false)) + .ukefu-webim-prop(hidden) + - var multiTenantsAlias = systemConfig.namealias ? systemConfig.namealias : '租户' + .ukefu-webim-tl(style='clear:both;')= '启用多' + multiTenantsAlias + '管理模式' + .box-item + .row + .col-lg-8 + p= '启用多' + multiTenantsAlias + '管理模式,运行系统中运行多个组织机构' + p(style='color:#888888;font-size:13px;margin-top:10px;')= '开启后登录后首页会进入到' + multiTenantsAlias + '选择模式' + .col-lg-4(style='text-align:right;') + input(type="checkbox" title="启用" name="enabletneant" lay-filter="tenant", checked=(systemConfig.enabletneant == true?'checked':false) ) + .box-item#tenant(style='position: relative;display:' + (systemConfig.enabletneant == true? 'block;': 'none;')) + .row(style='margin-bottom:20px;') + .col-lg-8 + p a、多#{multiTenantsAlias}模式下共享组织机构、角色和用户 + p(style='color:#888888;font-size:13px;margin-top:10px;') 系统的组织机构、角色和账号系统租户共享 + .col-lg-4(style='text-align:right;') + .layui-input-block + input(type="checkbox" title="启用" name="tenantshare", checked=(systemConfig.tenantshare == true ? 'checked': false) ) + .row(style='margin-bottom:20px;') + .col-lg-8 + p b、多#{multiTenantsAlias}模式别称 + p(style='color:#888888;font-size:13px;margin-top:10px;') 多#{multiTenantsAlias}模式在业务种的名称别称。 + .col-lg-4(style='text-align:right;') + .layui-input-block + input(type="text", name="namealias", value=(systemConfig.namealias ? systemConfig.namealias: "租户"), autocomplete="off", class="layui-input" ) + .row(style='margin-bottom:20px;') + .col-lg-8 + p c、登录后进入到#{multiTenantsAlias}选择界面 + p(style='color:#888888;font-size:13px;margin-top:10px;') 登录后进入到#{multiTenantsAlias}选择界面 + .col-lg-4(style='text-align:right;') + .layui-input-block + input(type="checkbox" title="启用" name="tenantconsole", checked=(systemConfig.tenantconsole == true?'checked':false) ) + .row(style='margin-bottom:20px;') + .col-lg-8 + p d、开启自助注册机构的功能 + p(style='color:#888888;font-size:13px;margin-top:10px;') 在登录界面上出现注册机构的功能,运行用户自助注册机构 + .col-lg-4(style='text-align:right;') + .layui-input-block + input(type="checkbox" title="启用" name="enableregorgi", checked=(systemConfig.enableregorgi == true?'checked': false)) + .col-md-4 + .ukefu-im-preview.ukefu-im-preview-dialog#pv(style='width:380px;position: fixed;background-color:#e6e6e6;') + .ukefu-im-preview-bar.ukefu-theme-color#ukefu-sys-preview(class='ukefu-system-theme' + ukefuThemeColorNum, style='padding:5px;') + img(src='/images/logo.png', style='height:22px;float:left;') + .ukefu-im-preview-menu + .ukefu-im-preview-top + ul.layui-tab-title + li.ukefu-home(lay-id='maincontent') + i.kfont(style='position: relative;')  + | 首页 + li.layui-this(lay-id='admin') 系统管理 + li(lay-id='multiMediaDialogWin') 坐席对话 + .ukefu-im-preview-left + .ukefu-im-preview-right + .row + .col-lg-3 + .col-lg-9 + .layui-form-item + .layui-input-block + button.layui-btn(lay-submit, lay-filter='formDemo') 保存 + button.layui-btn.layui-btn-original(type='reset') 重置 + + if execute && execute == 'false' + script(language='javascript') top.layer.alert('二次 验证密码设置失败,输入的密码错误,请重新操作!', {icon: 2}); + if msg + if msg == '1' + script(language='javascript') top.layer.alert('二次验证密码设置成功', {icon: 1}); + else if msg == '2' + script(language='javascript') top.layer.alert('二次验证密码设置失败,请确认两次输入的密码一致', {icon: 2}); + else if msg == '3' + script(language='javascript') top.layer.alert('二次验证密码设置失败,旧的密码验证失败,请输入正确的密码', {icon: 2}); + + script(language='javascript'). + layui.use('form', function(){ + var form = layui.form(); + form.render('select'); //刷新select选择框渲染 + form.on("checkbox(enablessl)" , function(data){ + if(data.elem.checked == true){ + $('.httpsconfig').show(); + }else{ + $('.httpsconfig').hide(); + } + }) + form.on("checkbox(enable)" , function(data){ + if(data.elem.checked == true){ + $('.elablesec').show(); + }else{ + $('.elablesec').hide(); + } + }) + form.on("checkbox(callcenter)" , function(data){ + if(data.elem.checked == true){ + $('#callcenter').show(); + }else{ + $('#callcenter').hide(); + } + }); + form.on("checkbox(email)" , function(data){ + if(data.elem.checked == true){ + $('#email').show(); + }else{ + $('#email').hide(); + } + }); + form.on("checkbox(tenant)" , function(data){ + if(data.elem.checked == true){ + $('#tenant').show(); + }else{ + $('#tenant').hide(); + } + }); + form.verify({ + pass:function(value){ + if(value != $('#password').val()){ + return "请确认两次输入密码相同" ; + } + } + }); + }); diff --git a/contact-center/app/src/main/resources/templates/admin/content.html b/contact-center/app/src/main/resources/templates/admin/content.html deleted file mode 100644 index 253e3dd0..00000000 --- a/contact-center/app/src/main/resources/templates/admin/content.html +++ /dev/null @@ -1,267 +0,0 @@ - -
        -
        -
        -
        -

        接入站的访问统计

        -
        -
        - -
        - -
        -
        -
        -
        -
        -
        -

        坐席咨询数据统计

        -
        -
        - -
        - -
        -
        -
        -
        - -
        -
        -
        -
        -

        咨询用户系统占比

        -
        -
        - -
        - -
        -
        -
        -
        -
        -
        -

        咨询用户浏览器占比

        -
        -
        - -
        - -
        -
        -
        -
        \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/admin/content.pug b/contact-center/app/src/main/resources/templates/admin/content.pug new file mode 100644 index 00000000..e0abae0e --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/content.pug @@ -0,0 +1,247 @@ +extends /admin/include/layout.pug + +block content + .row(style='margin-bottom:20px;') + .col-lg-12 + h1.site-h1 在线客服业务概况 + .row + .col-lg-3 + .ukefu-measure + a.ukefu-bt(href='/apps/onlineuser.html') + i.layui-icon.ukewo-btn.ukefu-measure-btn  + .ukefu-bt-text + .ukefu-bt-text-title(style='font-weight:400;font-size:19px;') + | #{onlineUserCache ? onlineUserCache : 0}/#{onlineUserClients ? onlineUserClients : 0} + .ukefu-bt-text-content 访客:在线/长连接 + .col-lg-3 + .ukefu-measure + a.ukefu-bt(href='/service/agent/index.html') + i.kfont.icon-iconfontagent.ukewo-btn.ukefu-measure-btn.ukefu-bg-color-yellow + .ukefu-bt-text + .ukefu-bt-text-title(style='font-weight:400;font-size:19px;') + | #{agentReport.agents}/#{agents ? agents : 0} + .ukefu-bt-text-content 坐席:在线/全部 + .col-lg-3 + .ukefu-measure + a.ukefu-bt(href='/service/quene/index.html') + i.layui-icon.ukewo-btn.ukefu-measure-btn.ukefu-bg-color-pink  + .ukefu-bt-text + .ukefu-bt-text-title(style='font-weight:400;font-size:19px;') + | #{agentReport.users}/#{agentReport.inquene} + .ukefu-bt-text-content 会话:服务/排队 + .col-lg-3 + .ukefu-measure + a.ukefu-bt(href='/apps/onlineuser.html') + i.layui-icon.ukewo-btn.ukefu-measure-btn.ukefu-bg-color-green  + .ukefu-bt-text(title='访客端对话建立的NettySocketIO链接数量/系统缓存数据(SystemCache)') + .ukefu-bt-text-title(style='font-weight:400;font-size:19px;') + | #{chatClients ? chatClients : 0}/#{systemCaches ? systemCaches : 0} + .ukefu-bt-text-content 缓存:Netty/Cache + .row + .col-lg-6(style='padding-right:5px;') + .box + .box-title + h1.site-h1(style='background-color:#EEEEEE;') 接入站的访问统计 + .box-body(style='padding:5px;') + // 为ECharts准备一个具备大小(宽高)的Dom + #ippv(style='width: 100%;height:200px;') + script(type='text/javascript'). + // 基于准备好的dom,初始化echarts实例 + var ippvchat = echarts.init(document.getElementById('ippv'), 'wonderland'); + // 指定图表的配置项和数据 + var webinviteList = !{pugHelper.toJSON(webInviteReport)} + var data = [];ipnums = [];pvnums = [] + $.each(webinviteList, function (i, w) { + data.push(w.data); + ipnums.push(w.ipnums); + pvnums.push(w.pvnums) + }) + var ippvchat_option = { + title: { + text: '' + }, + tooltip: {}, + legend: { + data: ['发帖量'] + }, + grid: { + x: 30, + y: 10, + x2: 30, + y2: 40, + // width: {totalWidth} - x - x2, + // height: {totalHeight} - y - y2, + backgroundColor: 'rgba(0,0,0,0)', + borderWidth: 1, + borderColor: '#ccc' + }, + xAxis: { + data: data + }, + yAxis: {}, + series: [{ + name: '访问IP', + type: 'line', + data: ipnums + }, { + name: '访问PV', + type: 'line', + data: pvnums + }] + }; + // 使用刚指定的配置项和数据显示图表。 + ippvchat.setOption(ippvchat_option); + + .col-lg-6(style='padding-left:5px;') + .box + .box-title + h1.site-h1(style='background-color:#EEEEEE;') 坐席咨询数据统计 + .box-body(style='padding:5px;') + // 为ECharts准备一个具备大小(宽高)的Dom + #consult(style='width: 100%;height:200px;') + script(type='text/javascript'). + // 基于准备好的dom,初始化echarts实例 + var consultchart = echarts.init(document.getElementById('consult'), 'wonderland'); + var consultList = !{pugHelper.toJSON(agentConsultReport)}; + var data = [];users = [] + $.each(consultList, function (i, c) { + data.push(c.data); + users.push(c.users); + }) + // 指定图表的配置项和数据 + var consultchart_option = { + title: { + text: '' + }, + tooltip: {}, + legend: { + data: ['日期'] + }, + grid: { + x: 30, + y: 10, + x2: 30, + y2: 40, + // width: {totalWidth} - x - x2, + // height: {totalHeight} - y - y2, + backgroundColor: 'rgba(0,0,0,0)', + borderWidth: 1, + borderColor: '#ccc' + }, + xAxis: { + data: data + }, + yAxis: {}, + series: [{ + name: '坐席咨询量', + type: 'line', + data: users + }] + }; + + // 使用刚指定的配置项和数据显示图表。 + consultchart.setOption(consultchart_option); + .row + .col-lg-6(style='padding-right:5px;') + .box + .box-title + h1.site-h1(style='background-color:#EEEEEE;') 咨询用户系统占比 + .box-body(style='padding:5px;') + // 为ECharts准备一个具备大小(宽高)的Dom + #osname(style='width: 100%;height:200px;') + script(type='text/javascript'). + // 基于准备好的dom,初始化echarts实例 + var osnamechart = echarts.init(document.getElementById('osname'), 'wonderland'); + var osnameList = !{pugHelper.toJSON(clentConsultReport)} + var data = [];valueList = [] + $.each(osnameList, function (i, o) { + data.push(o.data); + valueList.push({'value':o.users,'name':o.data}); + }) + var osnamechart_option = { + title: { + text: '咨询用户操作系统占比', + x: 'center' + }, + tooltip: { + trigger: 'item', + formatter: "{a}
        {b} : {c} ({d}%)" + }, + legend: { + orient: 'vertical', + left: 'left', + data: data + }, + series: [ + { + name: '咨询用户操作系统占比', + type: 'pie', + radius: '55%', + center: ['50%', '60%'], + data: valueList, + itemStyle: { + emphasis: { + shadowBlur: 10, + shadowOffsetX: 0, + shadowColor: 'rgba(0, 0, 0, 0.5)' + } + } + } + ] + }; + + // 使用刚指定的配置项和数据显示图表。 + osnamechart.setOption(osnamechart_option); + + .col-lg-6(style='padding-left:5px;') + .box + .box-title + h1.site-h1(style='background-color:#EEEEEE;') 咨询用户浏览器占比 + .box-body(style='padding:5px;') + // 为ECharts准备一个具备大小(宽高)的Dom + #browser(style='width: 100%;height:200px;') + script(type='text/javascript'). + // 基于准备好的dom,初始化echarts实例 + var browserchart = echarts.init(document.getElementById('browser'), 'wonderland'); + var browserList = !{pugHelper.toJSON(browserConsultReport)} + var data = [];valueList = [] + $.each(browserList, function (i, b) { + data.push(b.data); + valueList.push({'value':b.users,'name':b.data}); + }) + console.log(valueList) + var browserchart_option = { + title: { + text: '咨询用户浏览器占比', + x: 'center' + }, + tooltip: { + trigger: 'item', + formatter: "{a}
        {b} : {c} ({d}%)" + }, + legend: { + orient: 'vertical', + left: 'left', + data: data + }, + series: [ + { + name: '咨询用户浏览器占比', + type: 'pie', + radius: '55%', + center: ['50%', '60%'], + data: valueList, + itemStyle: { + emphasis: { + shadowBlur: 10, + shadowOffsetX: 0, + shadowColor: 'rgba(0, 0, 0, 0.5)' + } + } + } + ] + }; + + // 使用刚指定的配置项和数据显示图表。 + browserchart.setOption(browserchart_option); + diff --git a/contact-center/app/src/main/resources/templates/admin/email/add.html b/contact-center/app/src/main/resources/templates/admin/email/add.html deleted file mode 100644 index d3d5ece7..00000000 --- a/contact-center/app/src/main/resources/templates/admin/email/add.html +++ /dev/null @@ -1,125 +0,0 @@ -
        -
        -
        -
        - -
        - -
        -
        - * -
        -
        -
        -
        -
        - -
        - -
        -
        - * -
        -
        -
        -
        -
        - -
        - -
        -
        - * -
        -
        -
        -
        -
        - -
        - -
        -
        - * -
        -
        -
        - -
        -
        - -
        - -
        -
        - * -
        -
        -
        - -
        -
        - -
        - -
        -
        -
        - -
        -
        - -
        - -
        -
        -
        - - -
        -
        - - -
        -
        -
        -
        - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/admin/email/add.pug b/contact-center/app/src/main/resources/templates/admin/email/add.pug new file mode 100644 index 00000000..591f4be5 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/email/add.pug @@ -0,0 +1,79 @@ +.uk-layui-form + form.layui-form(action='/admin/email/save.html', method='post') + .layui-form-item(style='margin-top:10px;') + .layui-inline + label.layui-form-label(style='width:150px;') 技能组: + .layui-input-inline + select(name='organ', required, lay-verify='required') + if size(organList) > 0 + for o in organList + option(value=o.id)= o.name + else + option(value="") 请选择 + .layui-form-mid.layui-word-aux + font(color='red') * + .layui-form-item(style='margin-top:10px;') + .layui-inline + label.layui-form-label(style='width:150px;') 邮件服务器名称: + .layui-input-inline + input.layui-input(type='text', name='name', required, lay-verify='required', autocomplete='off') + .layui-form-mid.layui-word-aux + font(color='red') * + .layui-form-item + .layui-inline + label.layui-form-label(style='width:150px;') 邮件服务器地址: + .layui-input-inline + input.layui-input(type='text', name='smtpserver', required, lay-verify='required', autocomplete='off') + .layui-form-mid.layui-word-aux + font(color='red') * + .layui-form-item + .layui-inline + label.layui-form-label(style='width:150px;') 账号: + .layui-input-inline + input.layui-input(type='text', name='smtpuser', required, lay-verify='required', autocomplete='off') + .layui-form-mid.layui-word-aux + font(color='red') * + .layui-form-item + .layui-inline + label.layui-form-label(style='width:150px;') 密码: + .layui-input-inline + input.layui-input(type='password', name='smtppassword', required, lay-verify='required', autocomplete='off') + .layui-form-mid.layui-word-aux + font(color='red') * + .layui-form-item + .layui-inline + label.layui-form-label(style='width:150px;') 邮件发件人: + .layui-input-inline + input.layui-input(type='text', name='mailfrom', required, autocomplete='off') + .layui-form-item + .layui-inline + label.layui-form-label(style='width:150px;') 邮件服务器启用SSL: + .layui-input-inline + input(type='checkbox', title='启用', name='seclev', value='true', lay-filter='ssl') + .layui-form-item#sslport(style='display:none;') + .layui-inline + label.layui-form-label(style='width:150px;') SSL端口: + .layui-input-inline + input.layui-input(type='text', name='sslport', autocomplete='off') + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 立即提交 + button.layui-btn.layui-btn-original(type='reset') 重置 + +script. + layui.use('form', function () { + var form = layui.form(); + form.render(); //更新全部 + form.on("checkbox(ssl)", function (data) { + if (data.elem.checked == true) { + $('#sslport').show(); + } else { + $('#sslport').hide(); + $("input[name=sslport]").val(""); + } + }); + }); + layui.use('element', function () { + var element = layui.element(); + }); + diff --git a/contact-center/app/src/main/resources/templates/admin/email/edit.html b/contact-center/app/src/main/resources/templates/admin/email/edit.html deleted file mode 100644 index 2435e285..00000000 --- a/contact-center/app/src/main/resources/templates/admin/email/edit.html +++ /dev/null @@ -1,123 +0,0 @@ -
        -
        - -
        -
        - -
        - -
        -
        - * -
        -
        -
        - -
        -
        - -
        - -
        -
        - * -
        -
        -
        - -
        -
        - -
        - -
        -
        - * -
        -
        -
        -
        -
        - -
        - -
        -
        - * -
        -
        -
        - -
        -
        - -
        - -
        -
        -
        - -
        -
        - -
        - -
        -
        -
        - -
        -
        - -
        - checked="checked"> -
        -
        -
        - -
        -
        - - -
        -
        -
        -
        - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/admin/email/edit.pug b/contact-center/app/src/main/resources/templates/admin/email/edit.pug new file mode 100644 index 00000000..6a107f09 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/email/edit.pug @@ -0,0 +1,85 @@ +.uk-layui-form + form.layui-form(action='/admin/email/update.html', method='post') + input(type='hidden', name='id', value=email.id) + .layui-form-item(style='margin-top:10px;') + .layui-inline + label.layui-form-label(style='width:150px;') 技能组: + .layui-input-inline + select(name='organ', required, lay-verify='required') + if size(organList) > 0 + for o in organList + option(value=o.id, selected=(email.organ == o.id ? 'selected' : false))= o.name + else + option(value="") 请选择 + .layui-form-mid.layui-word-aux + font(color='red') * + + .layui-form-item(style='margin-top:10px;') + .layui-inline + label.layui-form-label(style='width:150px;') 邮件服务器名称: + .layui-input-inline + input.layui-input(type='text', name='name', required, lay-verify='required', autocomplete='off', value=email.name) + .layui-form-mid.layui-word-aux + font(color='red') * + + .layui-form-item + .layui-inline + label.layui-form-label(style='width:150px;') 邮件服务器地址: + .layui-input-inline + input.layui-input(type='text', name='smtpserver', required, lay-verify='required', autocomplete='off', value=email.smtpserver) + .layui-form-mid.layui-word-aux + font(color='red') * + + .layui-form-item + .layui-inline + label.layui-form-label(style='width:150px;') 账号: + .layui-input-inline + input.layui-input(type='text', name='smtpuser', required, lay-verify='required', autocomplete='off', value=email.smtpuser) + .layui-form-mid.layui-word-aux + font(color='red') * + + .layui-form-item + .layui-inline + label.layui-form-label(style='width:150px;') 密码: + .layui-input-inline + input.layui-input(type='password', name='smtppassword', autocomplete='off') + + .layui-form-item + .layui-inline + label.layui-form-label(style='width:150px;') 邮件发件人: + .layui-input-inline + input.layui-input(type='text', name='mailfrom', required, autocomplete='off', value=email.mailfrom) + + .layui-form-item + .layui-inline + label.layui-form-label(style='width:150px;') 邮件服务器启用SSL: + .layui-input-inline + input(type="checkbox", title="启用", name="seclev", value="true", lay-filter="ssl", checked=(email.seclev == "true" ? 'checked' : false)) + + .layui-form-item(style="display:" + (email.seclev == "true" ? 'block;' : 'none;') )#sslport + .layui-inline + label.layui-form-label(style='width:150px;') SSL端口: + .layui-input-inline + input.layui-input(type='text', name='sslport', autocomplete='off', value=email.sslport) + + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 立即提交 + button.layui-btn.layui-btn-original(type='reset') 重置 +script. + layui.use('form', function () { + var form = layui.form(); + form.render(); //更新全部 + form.on("checkbox(ssl)", function (data) { + if (data.elem.checked == true) { + $('#sslport').show(); + } else { + $('#sslport').hide(); + $("input[name=sslport]").val(""); + } + }); + }); + layui.use('element', function () { + var element = layui.element(); + }); + diff --git a/contact-center/app/src/main/resources/templates/admin/email/index.html b/contact-center/app/src/main/resources/templates/admin/email/index.html deleted file mode 100644 index dc789e0c..00000000 --- a/contact-center/app/src/main/resources/templates/admin/email/index.html +++ /dev/null @@ -1,99 +0,0 @@ -
        -
        -

        - 邮件服务器列表<#if emailList??>(${emailList.totalElements!''}) - - - -

        -
        -
        - - - - - - - - - - - - - - - - - - - - - - - <#if emailList?? && emailList??> - <#list emailList.content as email> - - - - - - - - - - - - -
        部门名称邮件服务器地址账号发件人创建时间操作
        - ${email.organ!''} - - ${email.name!''} - ${email.smtpserver!''}${email.smtpuser!''}${email.mailfrom!''}${email.createtime?string("yyyy-MM-dd HH:mm:ss")} - - - 编辑 - - - - 删除 - -
        -
        -
        -
        -
        -
        -
        -
        - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/admin/email/index.pug b/contact-center/app/src/main/resources/templates/admin/email/index.pug new file mode 100644 index 00000000..05b6c9e5 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/email/index.pug @@ -0,0 +1,66 @@ +extends /admin/include/layout.pug +block content + .row: .col-lg-12 + h1.site-h1(style='background-color:#FFFFFF;') + | 邮件服务器列表 (#{emailList.totalElements}) + span(style='float:right;') + button.layui-btn.layui-btn-small.green(href='/admin/email/add.html', data-toggle='ajax', data-width='550', data-height='450', data-title='创建新邮件服务器') + | 创建新邮件服务器 + + .row(style='padding:5px;') + .col-lg-12 + table.layui-table(lay-skin='line') + colgroup + col(width='10%') + col(width='10%') + col(width='15%') + col(width='10%') + col(width='15%') + col(width='20%') + col(width='1%') + thead + tr + th 部门 + th 名称 + th 邮件服务器地址 + th 账号 + th 发件人 + th 创建时间 + th(style='white-space:nowrap;', nowrap) 操作 + tbody + for email in emailList.content + tr + td= email.organ + td= email.name + td= email.smtpserver + td= email.smtpuser + td= email.mailfrom + td= pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', email.createtime) + td(style="white-space:nowrap;" nowrap="nowrap") + a(href="/admin/email/edit.html?id=" + email.id, data-toggle="ajax", data-width="550", data-height="450", data-title="编辑邮件服务器") + i.layui-icon  + span 编辑 + a(href="/admin/email/delete.html?id=" + email.id style="margin-left:10px;" data-toggle="tip" title="请确认是否删除邮件服务器?") + i.layui-icon(style="color:red;") ဆ + span 删除 + .row(style='padding:5px;') + .col-lg-12#page(style='text-align:center;') + + script. + layui.use(['laypage', 'layer'], function () { + var laypage = layui.laypage + , layer = layui.layer; + + laypage({ + cont: 'page' + , pages: #{emailList.totalPages} //总页数 + , curr: #{emailList.number + 1} + , groups: 5 //连续显示分页数 + , jump: function (data, first) { + if (!first) { + location.href = "/admin/email/index.html?p=" + data.curr; + } + } + }); + }); + diff --git a/contact-center/app/src/main/resources/templates/admin/include/layout.pug b/contact-center/app/src/main/resources/templates/admin/include/layout.pug new file mode 100644 index 00000000..df124eae --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/include/layout.pug @@ -0,0 +1,39 @@ +doctype html +html(xmlns='http://www.w3.org/1999/xhtml', xmlns:th='http://www.thymeleaf.org', xmlns:sec='http://www.thymeleaf.org/thymeleaf-extras-springsecurity3') + head + meta(charset='utf-8') + meta(http-equiv='X-UA-Compatible', content='IE=edge') + meta(http-equiv='Cache-Control', content='no-siteapp') + meta(name='viewport', content='width=device-width,maximum-scale=1,initial-scale=1,initial-scale=1,user-scalable=no') + meta(name='apple-mobile-web-app-capable', content='yes') + title 春松客服-全渠道智能客服 + link(rel='shortcut icon', type='image/x-icon', href='/images/favicon.ico?t=1487250759056') + link(rel='stylesheet', href='/js/ztree/zTreeStyle/zTreeStyle.css') + link(rel='stylesheet', href='/css/flexboxgrid.min.css') + link(rel='stylesheet', href='/css/layui.css') + link(rel='stylesheet', href='/res/css.html') + link(rel='stylesheet', href='/css/flexboxgrid.min.css') + script(src='/js/jquery-1.10.2.min.js') + script(src='/js/jquery.form.js') + script(src='/js/ztree/jquery.ztree.all.min.js') + script(src='/js/echarts.common.min.js') + script(language='javascript', src='/js/theme/wonderland.js') + script(src='/layui.js') + script(src='/js/cskefu.js') + body + .layui-layout.layui-layout-content + .layui-side.layui-bg-black + .layui-side-scroll + include left + .layui-body + .layui-side-scroll + block content + script. + layui.use('element', function () { + var element = layui.element(); //导航的hover效果、二级菜单等功能,需要依赖element模块 + //监听导航点击 + element.on('nav(layui)', function (elem) { + + }); + }); + diff --git a/contact-center/app/src/main/resources/templates/admin/include/left.html b/contact-center/app/src/main/resources/templates/admin/include/left.html deleted file mode 100644 index 1736486a..00000000 --- a/contact-center/app/src/main/resources/templates/admin/include/left.html +++ /dev/null @@ -1,109 +0,0 @@ - - - diff --git a/contact-center/app/src/main/resources/templates/admin/include/left.pug b/contact-center/app/src/main/resources/templates/admin/include/left.pug new file mode 100644 index 00000000..bfc01366 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/include/left.pug @@ -0,0 +1,66 @@ +ul.layui-nav.layui-nav-tree(lay-filter='demo') + li.layui-nav-item(class={'layui-this': subtype == 'content'}) + a.layui-nav-default(href='/admin/content.html') 系统概况 + li.layui-nav-item.layui-nav-itemed + a.layui-nav-title(href='javascript:;') 用户和组 + dl.layui-nav-child + if user.roleAuthMap["B02_B01"] || user.superadmin + dd(class={'layui-this': subtype == 'user'}) + a(href='/admin/user/index.html') 用户账号 + if user.roleAuthMap["B02_B02"] || user.superadmin + dd(class={'layui-this': subtype == 'role'}) + a(href='/admin/role/index.html') 系统角色 + if user.roleAuthMap["B02_B03"] || user.superadmin + dd(class={'layui-this': subtype == 'organ'}) + a(href='/admin/organ/index.html') 组织机构 + + li.layui-nav-item.layui-nav-itemed + a.layui-nav-title(href='javascript:;') 渠道管理 + dl.layui-nav-child + if user.roleAuthMap["B02_B04"] || user.superadmin + dd(class={'layui-this': subtype == 'im'}) + a(href='/admin/im/index.html') 网站渠道 + if models.contains("callcenter") + dd(class={'layui-this': maintype == 'callcenter' || subtype == 'channel'}) + a(href='/admin/callcenter/index.html') 呼叫中心 + if models.contains("skype") + dd(class={'layui-this': maintype == 'skype' || subtype == 'skype'}) + a(href='/admin/skype/index.html') Skype + if models.contains("messenger") + dd(class={'layui-this': maintype == 'messenger' || subtype == 'messenger'}) + a(href='/admin/messenger/index.html') Messenger + if models.contains("wexin") + li.layui-nav-item.layui-nav-itemed + a.layui-nav-title(href='javascript:;') 微信接入 + dl.layui-nav-child + dd(class={'layui-this': subtype == 'weixin'}) + a(href='/admin/weixin/index.html') 公众号配置 + dd(class={'layui-this': subtype == 'material'}) + a(href='/admin/weixin/material.html') 素材管理 + dd(class={'layui-this': subtype == 'interf'}) + a(href='/admin/weixin/interf.html') 接口管理 + | –> + if user.superadmin + li.layui-nav-item.layui-nav-itemed + a.layui-nav-title(href='javascript:;') 系统设置 + dl.layui-nav-child + dd(class={'layui-this': subtype == 'config'}) + a(href='/admin/config/index.html') 系统设置 + dd(class={'layui-this': subtype == 'sysdic'}) + a(href='/admin/sysdic/index.html') 字典管理 + dd(class={'layui-this': subtype == 'metadata'}) + a(href='/admin/metadata/index.html') 元数据 + if models.contains("chatbot") && (user.roleAuthMap["A09"] || user.admin) + dd + a(href='javascript:void(0)',data-title="智能机器人",onclick="openChatbot()",data-href="/admin/system/chatbot/index.html",class="iframe_btn",data-id="chatbotIntegrationWin", data-type="tabAdd") 智能机器人 + dd(class={'layui-this': subtype == 'template'}) + a(href='/admin/template/index.html') 系统模板 + dd(class={'layui-this': subtype == 'email'}) + a(href='/admin/email/index.html') 邮件通知设置 + dd(class={'layui-this': subtype == 'sms'}) + a(href='/admin/sms/index.html') 短信通知设置 + +script. + function openChatbot() { + window.parent.active.tabAdd($(".iframe_btn").data('href'), $(".iframe_btn").data('title'), $(".iframe_btn").data('id')); + }; diff --git a/contact-center/app/src/main/resources/templates/admin/include/tpl.html b/contact-center/app/src/main/resources/templates/admin/include/tpl.html deleted file mode 100644 index a297bbfb..00000000 --- a/contact-center/app/src/main/resources/templates/admin/include/tpl.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - 春松客服-全渠道智能客服 - - - - - - - - - - - - - - - - - -
        -
        -
        - <#include "/admin/include/left.html"/>
        -
        -
        -
        <#include "${data.page}.html"/> -
        -
        -
        - - - - diff --git a/contact-center/app/src/main/resources/templates/admin/organ/add.html b/contact-center/app/src/main/resources/templates/admin/organ/add.html deleted file mode 100644 index 60aa9883..00000000 --- a/contact-center/app/src/main/resources/templates/admin/organ/add.html +++ /dev/null @@ -1,161 +0,0 @@ -
        -
        - -
        - -
        - -
        -
        -
        -
        - -
        - - - - -
        -
        -
        -
        - -
        - -
        -
        - -
        -
        - - -
        -
        -
        -
        - - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/admin/organ/add.pug b/contact-center/app/src/main/resources/templates/admin/organ/add.pug new file mode 100644 index 00000000..d44e9559 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/organ/add.pug @@ -0,0 +1,134 @@ +.uk-layui-form + form.layui-form.uk-form(action='/admin/organ/save.html') + input#area(type='hidden', name='area') + .layui-form-item + label.layui-form-label 部门: + .layui-input-inline + input.layui-input(type='text', name='name', required, lay-verify='required', placeholder='请输入部门名称', autocomplete='off') + .layui-form-item + .layui-inline + label.layui-form-label 上级机构: + .layui-input-inline(style='position: relative;') + input#parent(type='hidden', name='parent', value=(organ ? organ.id : 0)) + input#parentname.layui-input(type='text', name='parentname', required, value=(organ ? organ.name : area ? area.name : '组织机构'), lay-verify='required', autocomplete='off', readonly, onclick='showMenu();') + i.layui-icon(style='position: absolute;right: 3px;top: 6px;font-size: 25px;(#{systemConfig.color ? systemConfig.color : "color:#0096C4"})', onclick='showMenu()')  + #menuContent.ukefu-ztree(style='display:none; position: absolute;z-index:10000;width: 218px;') + ul#organTree.ztree(style='width:208px;') + .layui-form-item + label.layui-form-label 启用技能组: + .layui-input-block + input(type='checkbox', name='skill', lay-skin='switch', lay-filter='area', value='1', lay-text='开启|关闭') + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 立即提交 + button.layui-btn.layui-btn-original(type='reset') 重置 +script. + //Demo + layui.use('form', function () { + var form = layui.form(); + form.render(); //更新全部 + form.verify({ + required: function (value) { + if (value.length > 50) { + return "部门名称不能超过50字"; + } + } + }) + form.on("switch(area)", function (data) { + if (data.elem.checked) { + $('#area').show(); + } else { + $('#area').hide(); + } + }); + }); + +script(type='text/javascript'). + var setting = { + data: {simpleData: {enable: true}}, + callback: {onClick: onClick, beforeClick: beforeClick} + }; + function beforeClick(treeId, treeNode) { + var zTree = $.fn.zTree.getZTreeObj("organTree") + nodes = zTree.getSelectedNodes(); + var allow = true, lastnode; + for (var i = 0, l = nodes.length; i < l; i++) { + lastnode = nodes[i].type; + if (nodes[i].organ && (nodes.length >= 1 && (event.ctrlKey || event.shiftKey))) { + allow = false; + break; + } + } + if (lastnode != treeNode.type && (event.ctrlKey || event.shiftKey)) { + allow = false; + } + if (allow == false) { + top.layer.alert("组织机构不能点选多个上级机构,也不能同时选择地区和机构", {icon: 3}); + return false; + } else { + return true; + } + } + function onClick(e, treeId, treeNode) { + var zTree = $.fn.zTree.getZTreeObj("organTree"), nodes = zTree.getSelectedNodes(), v = "", value = ""; + nodes.sort(function compare(a, b) { + return a.id - b.id; + }); + for (var i = 0, l = nodes.length; i < l; i++) { + v += nodes[i].name + ","; + if (value != "") { + value = value + ","; + } + value = nodes[i].id; + } + if (v.length > 0) v = v.substring(0, v.length - 1); + if (treeNode.type == "area") { + $("#parentname").attr("value", v); + $("#parent").attr("value", "0"); + $("#area").attr("value", value); + } else { + $("#parentname").attr("value", v); + $("#parent").attr("value", value); + $("#area").attr("value", ""); + } + if (!event.ctrlKey && !event.shiftKey) { + hideMenu(); + } + } + var zNodes = !{pugHelper.toJSON(organList)} + $.each(zNodes, function (i, o) { + o.id = o.id; + o.pId = o.parent ? o.parent : '0'; + o.name = o.name; + o.open = true; + o.organ = true; + o.type = "organ"; + o.icon = '/images/dept.png' + }); + console.log(zNodes) + $(document).ready(function () { + var ztree = $.fn.zTree.init($("#organTree"), setting, zNodes); + if ('#{organ}') { + var node = ztree.getNodeByParam('id', '#{organ.id}');//获取id为1的点 + ztree.selectNode(node);//选择点 + } + ; + if ('#{area}') { + var node = ztree.getNodeByParam('id', '#{area.id}');//获取id为1的点 + ztree.selectNode(node);//选择点 + } + }); + function showMenu() { + $("#menuContent").css({left: "0px", top: "38px"}).show(); + $("body").bind("mousedown", onBodyDown); + } + function hideMenu() { + $("#menuContent").hide(); + $("body").unbind("mousedown", onBodyDown); + } + function onBodyDown(event) { + if (!(event.target.id == "menuBtn" || event.target.id == "menuContent" || $(event.target).parents("#menuContent").length > 0)) { + hideMenu(); + } + } + diff --git a/contact-center/app/src/main/resources/templates/admin/organ/area.html b/contact-center/app/src/main/resources/templates/admin/organ/area.html deleted file mode 100644 index 7d7d34fb..00000000 --- a/contact-center/app/src/main/resources/templates/admin/organ/area.html +++ /dev/null @@ -1,114 +0,0 @@ -
        -
        - - -
        -
        -
        -
          -
          -
          -
          -
          -
          - - -
          -
          -
          -
          - - - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/admin/organ/area.pug b/contact-center/app/src/main/resources/templates/admin/organ/area.pug new file mode 100644 index 00000000..61786509 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/organ/area.pug @@ -0,0 +1,106 @@ +.uk-layui-form + form.layui-form.uk-form(action='/admin/organ/area/update.html') + input(type='hidden', name='id', value=organData.id) + input#area(type='hidden', name='area', value=organData.area) + .layui-form-item + .layui-inline + .layui-input-inline(style='position: relative;') + ul#areaTree.ztree + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 立即提交 + button#reset.layui-btn.layui-btn-original(type='reset') 重置 +script. + //Demo + layui.use('form', function () { + var form = layui.form(); + form.render(); //更新全部 + form.on("switch(area)", function (data) { + if (data.elem.checked) { + $('#area').show(); + } else { + $('#area').hide(); + } + }); + }); + +script(type='text/javascript'). + var setting = {check: {enable: true}, data: {simpleData: {enable: true}}, callback: {onCheck: zTreeOnCheck}}; + //获取所有选中节点的值 + function zTreeOnCheck() { + var treeObj = $.fn.zTree.getZTreeObj("areaTree"); + var root = treeObj.getNodesByParam("id", "#{sysarea.id}"); + var nodes = root[0].children; + var msg = ""; + for (var i = 0; i < nodes.length; i++) { + var node = nodes[i]; + var check = true; + var children = node.children; + var citys = ""; + if (children && children.length > 0) { + for (j = 0; j < children.length; j++) { + if (children[j].checked == false) { + check = false; + } else { + if (citys != "") { + citys += ","; + } + citys = citys + children[j].name; + } + } + } else if (nodes[i].checked == false) { + check = false; + } + if (check == true) { + if (msg != '' && nodes[i].name != '') { + msg = msg + ","; + } + msg += nodes[i].name; + } else { + if (msg != '' && citys != '') { + msg = msg + ","; + } + msg += citys; + } + } + $("#area").val(msg); + } + var _cacheList = !{pugHelper.toJSON(cacheList)} + $.each(_cacheList, function (i, c) { + c.id = c.id; + c.checked = ('#{organData.area}'.indexOf(c.name) >= 0 ? true : false); + c.pId = c.parentid; + c.name = c.name; + c.city = false; + c.open = false; + if ('#{areaList}' && c.name.indexOf('市') < 0) { + var _areaList = !{pugHelper.toJSON(areaList)} + $.each(_areaList, function (u, a) { + if (a.parentid == c.id) { + a.id = a.id; + a.pId = a.parentid; + a.name = a.name; + a.city = true; + a.open = false; + a.checked = ('#{organData.area}'.indexOf(a.name) > 0 ? true : false); + _cacheList.push(a) + } + }) + } + }); + _cacheList.unshift( + { + id: "#{sysarea.id ? sysarea.id : ''}", + pId: '0', + name: "地区", + open: true, + value: "" + } + ) + var zNodes = _cacheList; + $(document).ready(function () { + $.fn.zTree.init($("#areaTree"), setting, zNodes); + }); $("#reset").on('click', function () { + $.fn.zTree.init($("#areaTree"), setting, zNodes); + }) + diff --git a/contact-center/app/src/main/resources/templates/admin/organ/edit.html b/contact-center/app/src/main/resources/templates/admin/organ/edit.html deleted file mode 100644 index 8372034d..00000000 --- a/contact-center/app/src/main/resources/templates/admin/organ/edit.html +++ /dev/null @@ -1,177 +0,0 @@ -
          -
          - - - -
          - -
          - -
          -
          - <#if isRootOrgan!=true> -
          -
          - -
          - - - -
          -
          -
          - -
          - -
          - checked> -
          -
          - -
          -
          - - -
          -
          -
          -
          - - - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/admin/organ/edit.pug b/contact-center/app/src/main/resources/templates/admin/organ/edit.pug new file mode 100644 index 00000000..895d90fa --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/organ/edit.pug @@ -0,0 +1,146 @@ +.uk-layui-form + form.layui-form.uk-form(action='/admin/organ/update.html') + input(type='hidden', name='id', value=organData.id) + input#area(type='hidden', name='area', value=organData.area) + input#parent(type='hidden', name='parent', value=(organData ? organData.parent : 0)) + .layui-form-item + label.layui-form-label 部门: + .layui-input-inline + input.layui-input(type='text', name='name', lay-verify='requiredOrgiName', value=organData.name, placeholder='请输入部门名称', autocomplete='off') + if isRootOrgan != true + .layui-form-item + .layui-inline + label.layui-form-label 上级机构: + .layui-input-inline(style='position: relative;') + input#parentname.layui-input(type="text", name="parentname", required="", value=(organData ? organData.name : '组织机构'), lay-verify="requiredTwo", autocomplete="off", readonly="readonly", onclick="showMenu();") + i.layui-icon(style="position: absolute;right: 3px;top: 6px;font-size: 25px;(#{systemConfig.color ? systemConfig.color : 'color:#0096C4;'})", onclick="showMenu()")  + #menuContent.ukefu-ztree(style="display:none; position: absolute;z-index:10000;width: 218px;") + ul#organTree.ztree(style="width:208px;") + .layui-form-item + label.layui-form-label 启用技能组: + .layui-input-block + input(type='checkbox', name='skill', lay-skin='switch', lay-filter='area', value='1', lay-text='开启|关闭' checked=(organData.skill ? 'checked' : false)) + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 立即提交 + button.layui-btn.layui-btn-original(type='reset') 重置 +script. + //Demo + layui.use('form', function () { + var form = layui.form(); + form.render(); //更新全部 + form.verify({ + requiredOrgiName: function (value) { + if (value == $('#parentname').val()) { + return '部门和上级部门不能一致'; + } + if (value.length > 50) { + return "部门名称不能超过50字"; + } + + if (!value) { + return "部门名称必填"; + } + }, + + }) + form.on("switch(area)", function (data) { + if (data.elem.checked) { + $('#area').show(); + } else { + $('#area').hide(); + } + }); + }); + +script(type='text/javascript'). + var setting = { + data: {simpleData: {enable: true}}, + callback: {onClick: onClick, beforeClick: beforeClick} + }; + function beforeClick(treeId, treeNode) { + var zTree = $.fn.zTree.getZTreeObj("organTree") + nodes = zTree.getSelectedNodes(); + var allow = true, lastnode; + for (var i = 0, l = nodes.length; i < l; i++) { + lastnode = nodes[i].type; + if (nodes[i].organ && (nodes.length >= 1 && (event.ctrlKey || event.shiftKey))) { + allow = false; + break; + } + } + if (lastnode != treeNode.type && (event.ctrlKey || event.shiftKey)) { + allow = false; + } + if (allow == false) { + top.layer.alert("组织机构不能点选多个上级机构,也不能同时选择地区和机构", {icon: 3}); + return false; + } else { + return true; + } + } + function onClick(e, treeId, treeNode) { + var zTree = $.fn.zTree.getZTreeObj("organTree"), nodes = zTree.getSelectedNodes(), v = "", value = ""; + nodes.sort(function compare(a, b) { + return a.id - b.id; + }); + for (var i = 0, l = nodes.length; i < l; i++) { + v += nodes[i].name + ","; + if (value != "") { + value = value + ","; + } + value = nodes[i].id; + } + if (v.length > 0) v = v.substring(0, v.length - 1); + if (treeNode.type == "area") { + $("#parentname").attr("value", v); + $("#parent").attr("value", "0"); + $("#area").attr("value", value); + } else { + $("#parentname").attr("value", v); + $("#parent").attr("value", value); + $("#area").attr("value", ""); + } + if (!event.ctrlKey && !event.shiftKey) { + hideMenu(); + } + } + var zNodes = !{pugHelper.toJSON(organList)} + $.each(zNodes, function (i, o) { + o.id = o.id; + o.pId = o.parent ? o.parent : '0'; + o.name = o.name; + o.open = true; + o.organ = true; + o.type = "organ"; + o.icon = '/images/dept.png' + }); + $(document).ready(function () { + var ztree = $.fn.zTree.init($("#organTree"), setting, zNodes); + if ('#{organData}') { + var node = ztree.getNodeByParam('id', '#{organData.parent}');//获取id为1的点 + ztree.selectNode(node);//选择点 + if (node) { + $("#parentname").attr("value", node.name); + } + var areaList = '#{organData.area}'.split(",") + areaList.forEach(function (area, index) { + var areanode_#{index} = ztree.getNodeByParam('id', area);//获取id为1的点 + ztree.selectNode(areanode_#{index}, true);//选择点 + }); + } + }) + function showMenu() { + $("#menuContent").css({left: "0px", top: "38px"}).show(); + $("body").bind("mousedown", onBodyDown); + } + function hideMenu() { + $("#menuContent").hide(); + $("body").unbind("mousedown", onBodyDown); + } + function onBodyDown(event) { + if (!(event.target.id == "menuBtn" || event.target.id == "menuContent" || $(event.target).parents("#menuContent").length > 0)) { + hideMenu(); + } + } + diff --git a/contact-center/app/src/main/resources/templates/admin/organ/index.html b/contact-center/app/src/main/resources/templates/admin/organ/index.html deleted file mode 100644 index 49c922a3..00000000 --- a/contact-center/app/src/main/resources/templates/admin/organ/index.html +++ /dev/null @@ -1,164 +0,0 @@ - -
          -
          -

          - 组织机构 - - - -

          -
          -
          -
            -
            -
            -
            - -

            - <#if organData??>${organData.name!''}<#else>默认机构<#if userList??>(${userList?size!''}) - - <#if organData??> - - - - - - -

            -
            -
            - - - - - - - - - - - - - - - - - - - - <#if userList??> - <#list userList as organUser> - - - - - - - - - - -
            用户姓名电子邮件手机操作
            - - ${organUser.username!''} - - ${organUser.uname!''}${organUser.email!''}${organUser.mobile!''} - - - 移除 - -
            -
            -
            -
            -
            -
            -
            - - - diff --git a/contact-center/app/src/main/resources/templates/admin/organ/index.pug b/contact-center/app/src/main/resources/templates/admin/organ/index.pug new file mode 100644 index 00000000..399fe6de --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/organ/index.pug @@ -0,0 +1,128 @@ +extends /admin/include/layout.pug + +block content + style. + .ztree li span { + display: inline-block !important; + white-space: pre-wrap; + width: 90px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + .row(style='height:100%;') + .col-lg-3(style='border-right:1px solid #e6e6e6;padding-right:0px;') + h1.site-h1(style='background-color:#FFFFFF;') + | 组织机构 + span(style='float:right;') + button.layui-btn.layui-btn-small.green#areaadd(href='/admin/organ/add.html?' + (organData ? 'parent=' + organData.id : ''), data-toggle='ajax', data-height='400', data-width='650', data-title='创建部门') + | 创建部门 + .row(style='padding:5px;') + .col-lg-12 + ul#organTree.ztree + span.col-lg-9 + h1.site-h1(style='background-color:#FFFFFF;') + span(style='width:150px;display:inline-block;;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;') + if organData + | #{organData.name} + else + | 默认机构 + if userList + | (#{userList.size()}) + span(style='float:right;') + if organData + button.layui-btn.layui-btn-small.green(href="/admin/organ/seluser.html?organ=" + organData.id, data-toggle="ajax", data-width="750", data-title="添加用户到当前部门") + | 添加用户到当前部门 + button.layui-btn.layui-btn-original.layui-btn-small(href="/admin/organ/area.html?id=" + organData.id, data-toggle="ajax", data-width="450", data-height="400", data-title="地区设置") + | 地区设置 + button.layui-btn.layui-btn-original.layui-btn-small(href="/admin/organ/edit.html?id=" + organData.id, data-toggle="ajax", data-width="650", data-height="400", data-title="修改部门") + | 修改部门 + button.layui-btn.layui-btn-danger.layui-btn-small(href="/admin/organ/delete.html?id=" + organData.id, data-toggle="tip", data-title="请确认是否删除该部门?") + | 删除部门 + .row(style='padding:5px;') + .col-lg-12 + table.layui-table(lay-skin='line') + colgroup + col(width='30%') + col(width='20%') + col(width='25%') + col(width='24%') + col(width='1%') + col + thead + tr + th 用户 + th 姓名 + th 电子邮件 + th 手机 + th(style='white-space:nowrap;', nowrap) 操作 + tbody(style='table-layout: fixed; word-break: break-all;') + if userList + for organUser in userList + tr + td(style="width:150px;") + a(href="") + | #{organUser.username} + td(style="width: 100px")= organUser.uname + td= organUser.email + td= organUser.mobile + td(style="white-space: nowrap;") + a(href="/admin/organ/user/delete.html?id=" + organUser.id + "&organ=" + organData.id, data-toggle="tip", data-title="请确认是否从坐席组中移除坐席?") + i.layui-icon(style="color:red;") ဆ + | 移除 + .row(style='padding:5px;') + .col-lg-12#page(style='text-align:center;') + script(type='text/javascript'). + var setting = { + data: {simpleData: {enable: true}}, + callback: {onClick: onClick} + }; + function onClick(e, treeId, treeNode) { + if (treeNode.topic) { + location.href = "/admin/organ/index.html?organ=" + treeNode.id; + } else if (treeNode.id == "0") { + location.href = "/admin/organ/index.html"; + } else if (treeNode.area) { + $('#areaadd').attr("href", "/admin/organ/add.html?area=" + treeNode.id); + } + } + var zNodes = !{pugHelper.toJSON(organList)} + $.each(zNodes, function (i, o) { + o.id = o.id; + o.pId = o.parent ? o.parent : '0'; + o.name = o.name; + o.open = true; + o.topic = true; + o.icon = (o.area && o.area != "") ? '/images/area.png' : '/images/dept.png' + }); + $(document).ready(function () { + var ztree = $.fn.zTree.init($("#organTree"), setting, zNodes); + if ('#{organData}') { + var node = ztree.getNodeByParam('id', "#{organData.id}");//获取id为1的点 + ztree.selectNode(node);//选择点 // + } + // var x = document.getElementById("node_Name"); + // var y = x.getElementsByClassName("child"); + // var i; + // for (i = 0; i < y.length; i++) { + // y[i].style.backgroundColor = "red"; + // } + }); + layui.use('layer', function () { + var layer = layui.layer; + var msg = '#{msg}'; + if (msg == 'admin_organ_update_name_not') { + layer.msg('组织机构分类名已存在!', {icon: 2, time: 1500}) + } else if (msg == 'admin_oran_not_delete') { + layer.msg('无法删除,因为存在子组织', {icon: 2, time: 1500}) + } else if (msg == 'admin_organ_update_success') { + layer.msg('修改组织成功', {icon: 1, time: 1500}) + } else if (msg == 'admin_organ_new_success') { + layer.msg('新建组织成功', {icon: 1, time: 1500}) + } else if (msg == 'admin_organ_update_not_standard') { + layer.msg('修改无法完成,上级机构选择错误', {icon: 2, time: 1500}) + } else if (msg == 'not_allow_remove_user') { + layer.msg('用户只有一个组织,不允许移除', {icon: 2, time: 1500}) + } + }); + diff --git a/contact-center/app/src/main/resources/templates/admin/organ/seluser.html b/contact-center/app/src/main/resources/templates/admin/organ/seluser.html deleted file mode 100644 index 85f4e3f5..00000000 --- a/contact-center/app/src/main/resources/templates/admin/organ/seluser.html +++ /dev/null @@ -1,22 +0,0 @@ -
            -
            - -
            -
            - -
            -
            -
            -
            - - -
            -
            -
            -
            diff --git a/contact-center/app/src/main/resources/templates/admin/organ/seluser.pug b/contact-center/app/src/main/resources/templates/admin/organ/seluser.pug new file mode 100644 index 00000000..4c6a6acf --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/organ/seluser.pug @@ -0,0 +1,14 @@ +.uk-layui-form + form.layui-form.uk-form(action='/admin/organ/saveuser.html') + input(type='hidden', name='organ', value=organ.id) + .layui-form-item + .layui-input-inline + select.ukefu-form-multiple(multiple, name='users') + if userList + for curruser in userList + option(value=curruser.id, selected=curruser.organ && curruser.organ == organ.id?'selected':false) + | #{curruser.username}(#{curruser.uname}) + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 立即提交 + button.layui-btn.layui-btn-original(type='reset') 重置 diff --git a/contact-center/app/src/main/resources/templates/admin/role/add.html b/contact-center/app/src/main/resources/templates/admin/role/add.html deleted file mode 100644 index 9c5eae53..00000000 --- a/contact-center/app/src/main/resources/templates/admin/role/add.html +++ /dev/null @@ -1,30 +0,0 @@ -
            -
            -
            - -
            - -
            -
            -
            -
            - - -
            -
            -
            -
            - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/admin/role/add.pug b/contact-center/app/src/main/resources/templates/admin/role/add.pug new file mode 100644 index 00000000..e9cb011e --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/role/add.pug @@ -0,0 +1,22 @@ +.uk-layui-form + form.layui-form.uk-form(action='/admin/role/save.html') + .layui-form-item + label.layui-form-label 角色: + .layui-input-inline + input.layui-input(type='text', name='name', required, lay-verify='required_name', placeholder='请输入角色名称', autocomplete='off') + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 立即提交 + button.layui-btn.layui-btn-original(type='reset') 重置 +script. + layui.use('form', function () { + var form = layui.form(); + form.verify({ + required_name: function (value) { + if (value.length > 50) { + return "角色名称不能超过50字"; + } + } + }); + }); + diff --git a/contact-center/app/src/main/resources/templates/admin/role/auth.html b/contact-center/app/src/main/resources/templates/admin/role/auth.html deleted file mode 100644 index 68a024e3..00000000 --- a/contact-center/app/src/main/resources/templates/admin/role/auth.html +++ /dev/null @@ -1,62 +0,0 @@ -
            -
            - - -
            -
            -
              -
              -
              -
              -
              - - -
              -
              -
              -
              - diff --git a/contact-center/app/src/main/resources/templates/admin/role/auth.pug b/contact-center/app/src/main/resources/templates/admin/role/auth.pug new file mode 100644 index 00000000..0a4afbf6 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/role/auth.pug @@ -0,0 +1,67 @@ +.uk-layui-form + form.layui-form.uk-form(action='/admin/role/auth/save.html') + input(type='hidden', name='id', value=role.id) + - var roleAuthString=[] + if roleAuthList + for i, index in roleAuthList + if index>0 + - roleAuthString.push(i.dicid) + input#menus(type='hidden', name='menus', value=roleAuthString) + .layui-form-item + .layui-input-inline + ul#roleTree.ztree + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 立即提交 + button#reset.layui-btn.layui-btn-original(type='reset', href='/admin/role/auth.html?id=${role.id}') 重置 +script(type='text/javascript'). + var setting = { + check: {enable: true}, + data: {simpleData: {enable: true}}, + callback: {onCheck: zTreeOnCheck} + }; + //获取所有选中节点的值 + function zTreeOnCheck() { + var treeObj = $.fn.zTree.getZTreeObj("roleTree"); + var nodes = treeObj.getCheckedNodes(true); + var msg = ""; + for (var i = 0; i < nodes.length; i++) { + if (msg != '' && nodes[i].id != '') { + msg = msg + ","; + } + msg += nodes[i].id; + } + $("#menus").val(msg); + } + var _resourceList = !{pugHelper.toJSON(resourceList)} + var _roleAuthList = !{pugHelper.toJSON(roleAuthList)} + $.each(_resourceList, function (i, r) { + r.id = r.id; + r.pId = r.parentid; + $.each(_roleAuthList, function (u, o) { + if (o.dicid == r.id) { + r.checked = true + } + }) + r.name = r.name; + r.value = r.code; + r.open = true; + r.icon = r.level && (r.level == '1' || r.level == '2') ? '/images/dir.png' : '/images/menu.png'; + }); + _resourceList.unshift( + { + id: "#{sysDic.id ? sysDic.id : ''}", + pId: '0', + name: "菜单资源", + open: true, + value: "" + } + ) + var zNodes = _resourceList; + $(document).ready(function () { + $.fn.zTree.init($("#roleTree"), setting, zNodes); + }); + $("#reset").on('click', function () { + $.fn.zTree.init($("#roleTree"), setting, zNodes); + }) + diff --git a/contact-center/app/src/main/resources/templates/admin/role/edit.html b/contact-center/app/src/main/resources/templates/admin/role/edit.html deleted file mode 100644 index 85be202e..00000000 --- a/contact-center/app/src/main/resources/templates/admin/role/edit.html +++ /dev/null @@ -1,31 +0,0 @@ -
              -
              - -
              - -
              - -
              -
              -
              -
              - - -
              -
              -
              -
              - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/admin/role/edit.pug b/contact-center/app/src/main/resources/templates/admin/role/edit.pug new file mode 100644 index 00000000..7ab75d6d --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/role/edit.pug @@ -0,0 +1,24 @@ +.uk-layui-form + form.layui-form.uk-form(action='/admin/role/update.html') + input(type='hidden', name='id', value=roleData.id) + .layui-form-item + label.layui-form-label 坐席组: + .layui-input-inline + input.layui-input(type='text', name='name', required, lay-verify='required_name', value=roleData.name, placeholder='请输入坐席组名称', autocomplete='off') + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 立即提交 + button.layui-btn.layui-btn-original(type='reset') 重置 +script. + //Demo + layui.use('form', function () { + var form = layui.form(); + form.verify({ + required_name: function (value) { + if (value.length > 50) { + return "角色名称不能超过50字"; + } + } + }); + }); + diff --git a/contact-center/app/src/main/resources/templates/admin/role/index.html b/contact-center/app/src/main/resources/templates/admin/role/index.html deleted file mode 100644 index 91f2ccb9..00000000 --- a/contact-center/app/src/main/resources/templates/admin/role/index.html +++ /dev/null @@ -1,123 +0,0 @@ -
              -
              -

              - 角色列表 - - - -

              -
              -
              - -
              -
              -
              -
              -

              - <#if roleData??>${roleData.name!''}<#else>坐席组<#if userList??>(${userList?size!''}) - - <#if roleData??> - - - - - - -

              -
              -
              - - - - - - - - - - - - - - - - - - - - <#if userRoleList?? && userRoleList.content??> - <#list userRoleList.content as userRole> - - - - - - - - - - -
              用户姓名电子邮件手机操作
              - - -
              - ${userRole.user.username!''} -
              - ${userRole.role.name!''} -
              -
              -
              -
              ${userRole.user.uname!''}${userRole.user.email!''}${userRole.user.mobile!''} - - - 移除 - -
              -
              -
              -
              -
              -
              -
              -
              - - diff --git a/contact-center/app/src/main/resources/templates/admin/role/index.pug b/contact-center/app/src/main/resources/templates/admin/role/index.pug new file mode 100644 index 00000000..f16c4dc6 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/role/index.pug @@ -0,0 +1,90 @@ +extends /admin/include/layout.pug + +block content + .row(style='height:100%;') + .col-lg-3(style='border-right:1px solid #e6e6e6;padding-right:0px;') + h1.site-h1(style='background-color:#FFFFFF;') + | 角色列表 + span(style='float:right;') + button.layui-btn.layui-btn-small.green(href='/admin/role/add.html', data-toggle='ajax', data-height='200', data-width='550', data-title='新建角色') + | 新建角色 + .row(style='padding:5px;') + .col-lg-12 + ul + if roleList + for role in roleList + li.uk_role(class={'this': roleData.id == role.id}) + a(href="/admin/role/index.html?role=" + role.id, style="word-wrap: break-word;word-break: break-all;") + i.kfont(style="margin-top: 3px;float: left")  + | #{role.name} + .col-lg-9 + h1.site-h1(style='background-color:#FFFFFF;') + span(style='width:200px;display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-wrap: break-word;word-break: break-all;') + if roleData + | #{roleData.name} + else + | 坐席组 + if userList + | (#{userList.size()}) + span(style='float:right;') + if roleData + button.layui-btn.layui-btn-small.green(href="/admin/role/seluser.html?role=" + roleData.id, data-toggle="ajax", data-width="750", data-title="添加用户到角色") + | 添加用户到角色 + button.layui-btn.layui-btn-original.layui-btn-small(href="/admin/role/edit.html?id=" + roleData.id, data-toggle="ajax", data-width="550", data-height="200", data-title="修改角色") + | 修改角色 + button.layui-btn.layui-btn-warm.layui-btn-small(href="/admin/role/auth.html?id=" + roleData.id, data-toggle="ajax", title="角色授权", data-width="400", data-height="500") + | 角色授权 + button.layui-btn.layui-btn-danger.layui-btn-small(href="/admin/role/delete.html?id=" + roleData.id, data-toggle="tip", data-title="请确认是否删除角色?") + | 删除角色 + .row(style='padding:5px;') + .col-lg-12 + table.layui-table(lay-skin='line') + colgroup + col(width='30%') + col(width='20%') + col(width='25%') + col(width='24%') + col(width='1%') + col + thead + tr + th 用户 + th 姓名 + th 电子邮件 + th 手机 + th(style='white-space:nowrap;', nowrap) 操作 + tbody(style='table-layout: fixed; word-break: break-all;') + if userRoleList && userRoleList.content + for userRole in userRoleList.content + tr + td(style="150px") + a(href="") + i.layui-icon.headimg  + div(style="margin-left:50px;margin-top:0px;") + | #{userRole.user.username} + div(style="color:#aaaaaa;font-size:12px;") + | #{userRole.role.name} + td(style="width:150px")= userRole.user.uname + td(style="wdth:150px")= userRole.user.email + td= userRole.user.mobile + td(style="white-space: nowrap;") + a(href="/admin/role/user/delete.html?id=" + userRole.id + "&role=" + userRole.role.id, data-toggle="tip", data-title="请确认是否移除?") + i.layui-icon(style="color:red;") ဆ + | 移除 + .row(style='padding:5px;') + .col-lg-12#page(style='text-align:center;') + script. + layui.use('layer', function () { + var layer = layui.layer + var msg = '#{msg}'; + if (msg == 'admin_role_save_success') + layer.msg('添加成功', {icon: 1, time: 1000}) + else if (msg == 'admin_role_save_exist') { + layer.msg('角色添加失败,角色已存在', {icon: 2, time: 3000}) + } else if (msg == 'admin_role_update_success') { + layer.msg('角色修改成功', {icon: 1, time: 1000}) + } else if (msg == 'admin_role_update_not_exist') { + layer.msg('角色修改失败', {icon: 2, time: 3000}) + } + }); + diff --git a/contact-center/app/src/main/resources/templates/admin/role/seluser.html b/contact-center/app/src/main/resources/templates/admin/role/seluser.html deleted file mode 100644 index 23d847c5..00000000 --- a/contact-center/app/src/main/resources/templates/admin/role/seluser.html +++ /dev/null @@ -1,30 +0,0 @@ -
              -
              - -
              -
              - -
              -
              -
              -
              - - -
              -
              -
              -
              diff --git a/contact-center/app/src/main/resources/templates/admin/role/seluser.pug b/contact-center/app/src/main/resources/templates/admin/role/seluser.pug new file mode 100644 index 00000000..dc2bf400 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/role/seluser.pug @@ -0,0 +1,20 @@ +.uk-layui-form + form.layui-form.uk-form(action='/admin/role/saveuser.html') + input(type='hidden', name='role', value=role.id) + .layui-form-item + .layui-input-inline + select.ukefu-form-multiple(multiple, name='users') + if userList + for curruser in userList + - var has = false + if userRoleList + for userRole in userRoleList + if userRole.user && userRole.user.id == curruser.id + - has = true + option(value=curruser.id,selected=has == true ? 'selected' : false) + | #{curruser.username}(#{curruser.uname}) + .layui-form-button + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 立即提交 + button.layui-btn.layui-btn-original(type='reset') 重置 diff --git a/contact-center/app/src/main/resources/templates/admin/skill/add.html b/contact-center/app/src/main/resources/templates/admin/skill/add.html deleted file mode 100644 index 1d548a44..00000000 --- a/contact-center/app/src/main/resources/templates/admin/skill/add.html +++ /dev/null @@ -1,24 +0,0 @@ -
              -
              -
              - -
              - -
              -
              -
              -
              - - -
              -
              -
              -
              - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/admin/skill/edit.html b/contact-center/app/src/main/resources/templates/admin/skill/edit.html deleted file mode 100644 index 659dab7f..00000000 --- a/contact-center/app/src/main/resources/templates/admin/skill/edit.html +++ /dev/null @@ -1,25 +0,0 @@ -
              -
              - -
              - -
              - -
              -
              -
              -
              - - -
              -
              -
              -
              - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/admin/skill/index.html b/contact-center/app/src/main/resources/templates/admin/skill/index.html deleted file mode 100644 index f0dfb23d..00000000 --- a/contact-center/app/src/main/resources/templates/admin/skill/index.html +++ /dev/null @@ -1,101 +0,0 @@ -
              -
              -

              - 坐席组 - - - -

              -
              -
              - -
              -
              -
              -
              -

              - <#if skillData??>${skillData.name!''}<#else>坐席组<#if userList??>(${userList?size!''}) - - <#if skillData??> - - - - - -

              -
              -
              - - - - - - - - - - - - - - - - - - - - <#if userList??> - <#list userList as user> - - - - - - - - - - -
              用户姓名电子邮件手机操作
              - - -
              - ${user.username!''} -
              - 系统管理员 -
              -
              -
              - -
              ${user.uname!''}${user.email!''}${user.mobile!''} - - - 移除 - -
              -
              -
              -
              -
              -
              -
              -
              diff --git a/contact-center/app/src/main/resources/templates/admin/skill/seluser.html b/contact-center/app/src/main/resources/templates/admin/skill/seluser.html deleted file mode 100644 index 85f4e3f5..00000000 --- a/contact-center/app/src/main/resources/templates/admin/skill/seluser.html +++ /dev/null @@ -1,22 +0,0 @@ -
              -
              - -
              -
              - -
              -
              -
              -
              - - -
              -
              -
              -
              diff --git a/contact-center/app/src/main/resources/templates/admin/sms/add.html b/contact-center/app/src/main/resources/templates/admin/sms/add.html deleted file mode 100644 index e1cc82e5..00000000 --- a/contact-center/app/src/main/resources/templates/admin/sms/add.html +++ /dev/null @@ -1,118 +0,0 @@ -<#include "/public/macro.html"> -
              -
              -
              -
              - -
              - -
              -
              - * -
              -
              -
              -
              -
              - -
              - -
              -
              - * -
              -
              -
              -
              -
              - -
              - <@select "com.dic.sms.type" "smstype" "" "lay-verify=required" ""/> -
              -
              - * -
              -
              -
              -
              -
              - -
              - -
              -
              - * -
              -
              -
              -
              -
              - -
              - -
              -
              - * -
              -
              -
              -
              -
              - -
              - -
              -
              - * -
              -
              -
              - -
              -
              - -
              - -
              -
              - * -
              -
              -
              - -
              -
              - -
              - -
              -
              - * -
              -
              -
              - -
              -
              - - -
              -
              -
              -
              - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/admin/sms/add.pug b/contact-center/app/src/main/resources/templates/admin/sms/add.pug new file mode 100644 index 00000000..0a557714 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/sms/add.pug @@ -0,0 +1,74 @@ +include /mixins/dic.mixin.pug + +.uk-layui-form + form.layui-form(action='/admin/sms/save.html', method='post') + .layui-form-item(style='margin-top:10px;') + .layui-inline + label.layui-form-label(style='width:150px;') 短信网关名称: + .layui-input-inline + input.layui-input(type='text', name='name', required, lay-verify='required', autocomplete='off') + .layui-form-mid.layui-word-aux + font(color='red') * + .layui-form-item(style='margin-top:10px;') + .layui-inline + label.layui-form-label(style='width:150px;') 短信网关地址: + .layui-input-inline + input.layui-input(type='text', name='url', required, lay-verify='required', autocomplete='off') + .layui-form-mid.layui-word-aux + font(color='red') * + .layui-form-item(style='margin-top:10px;') + .layui-inline + label.layui-form-label(style='width:150px;') 短信网关类型: + .layui-input-inline + +sysDicSelect('com.dic.sms.type','smstype','',"lay-verify='required' ", '') + .layui-form-mid.layui-word-aux + font(color='red') * + .layui-form-item + .layui-inline + label.layui-form-label(style='width:150px;') 签名: + .layui-input-inline + input.layui-input(type='text', name='sign', required, lay-verify='required', autocomplete='off') + .layui-form-mid.layui-word-aux + font(color='red') * + .layui-form-item + .layui-inline + label.layui-form-label(style='width:150px;') 模板ID: + .layui-input-inline + input.layui-input(type='text', name='tpcode', required, lay-verify='required', autocomplete='off') + .layui-form-mid.layui-word-aux + font(color='red') * + .layui-form-item + .layui-inline + label.layui-form-label(style='width:150px;') AppKey: + .layui-input-inline + input.layui-input(type='text', name='appkey', required, lay-verify='required', autocomplete='off') + .layui-form-mid.layui-word-aux + font(color='red') * + .layui-form-item + .layui-inline + label.layui-form-label(style='width:150px;') AppSec: + .layui-input-inline + input.layui-input(type='password', name='appsec', required, lay-verify='required', autocomplete='off') + .layui-form-mid.layui-word-aux + font(color='red') * + .layui-form-item + .layui-inline + label.layui-form-label(style='width:150px;') 其他参数: + .layui-input-inline + textarea.layui-textarea(name='moreparam', placeholder='请输入参数') + .layui-form-mid.layui-word-aux + font(color='red') * + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 立即提交 + button.layui-btn.layui-btn-original(type='reset') 重置 + +script. + layui.use('form', function() { + var form = layui.form(); + form.render(); //更新全部 + }); + layui.use('element', function(){ + var element = layui.element(); + }); + diff --git a/contact-center/app/src/main/resources/templates/admin/sms/edit.html b/contact-center/app/src/main/resources/templates/admin/sms/edit.html deleted file mode 100644 index ba2ad74b..00000000 --- a/contact-center/app/src/main/resources/templates/admin/sms/edit.html +++ /dev/null @@ -1,117 +0,0 @@ -<#include "/public/macro.html"> -
              -
              - -
              -
              - -
              - -
              -
              - * -
              -
              -
              -
              -
              - -
              - -
              -
              - * -
              -
              -
              -
              -
              - -
              - <@select "com.dic.sms.type" "smstype" sms.smstype "lay-verify=required" ""/> -
              -
              - * -
              -
              -
              -
              -
              - -
              - -
              -
              - * -
              -
              -
              -
              -
              - -
              - -
              -
              - * -
              -
              -
              -
              -
              - -
              - -
              -
              - * -
              -
              -
              - -
              -
              - -
              - -
              -
              - * -
              -
              -
              - -
              -
              - -
              - -
              -
              - * -
              -
              -
              -
              -
              - - -
              -
              -
              -
              - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/admin/sms/edit.pug b/contact-center/app/src/main/resources/templates/admin/sms/edit.pug new file mode 100644 index 00000000..318317fc --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/sms/edit.pug @@ -0,0 +1,74 @@ +include /mixins/dic.mixin.pug + +.uk-layui-form + form.layui-form(action='/admin/sms/update.html', method='post') + input(type='hidden', name='id', value=sms.id ) + .layui-form-item(style='margin-top:10px;') + .layui-inline + label.layui-form-label(style='width:150px;') 短信网关名称: + .layui-input-inline + input.layui-input(type='text', name='name', required, lay-verify='required', autocomplete='off', value=sms.name) + .layui-form-mid.layui-word-aux + font(color='red') * + .layui-form-item(style='margin-top:10px;') + .layui-inline + label.layui-form-label(style='width:150px;') 短信网关地址: + .layui-input-inline + input.layui-input(type='text', name='url', required, lay-verify='required', autocomplete='off', value=sms.url) + .layui-form-mid.layui-word-aux + font(color='red') * + .layui-form-item(style='margin-top:10px;') + .layui-inline + label.layui-form-label(style='width:150px;') 短信网关类型: + .layui-input-inline + +sysDicSelect('com.dic.sms.type','smstype',sms.smstype,"lay-verify='required' ", "") + .layui-form-mid.layui-word-aux + font(color='red') * + .layui-form-item + .layui-inline + label.layui-form-label(style='width:150px;') 签名: + .layui-input-inline + input.layui-input(type='text', name='sign', required, lay-verify='required', autocomplete='off', value=sms.sign) + .layui-form-mid.layui-word-aux + font(color='red') * + .layui-form-item + .layui-inline + label.layui-form-label(style='width:150px;') 模板ID: + .layui-input-inline + input.layui-input(type='text', name='tpcode', required, lay-verify='required', autocomplete='off', value=sms.tpcode) + .layui-form-mid.layui-word-aux + font(color='red') * + .layui-form-item + .layui-inline + label.layui-form-label(style='width:150px;') AppKey: + .layui-input-inline + input.layui-input(type='text', name='appkey', required, lay-verify='required', autocomplete='off', value=sms.appkey) + .layui-form-mid.layui-word-aux + font(color='red') * + .layui-form-item + .layui-inline + label.layui-form-label(style='width:150px;') AppSec: + .layui-input-inline + input.layui-input(type='password', name='appsec', required, lay-verify='required', autocomplete='off', value=sms.appsec) + .layui-form-mid.layui-word-aux + font(color='red') * + .layui-form-item + .layui-inline + label.layui-form-label(style='width:150px;') 其他参数: + .layui-input-inline + textarea.layui-textarea(name='moreparam', placeholder='请输入参数')= sms.moreparam + .layui-form-mid.layui-word-aux + font(color='red') * + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 立即提交 + button.layui-btn.layui-btn-original(type='reset') 重置 +script. + layui.use('form', function () { + var form = layui.form(); + form.render(); //更新全部 + }); + layui.use('element', function () { + var element = layui.element(); + }); + diff --git a/contact-center/app/src/main/resources/templates/admin/sms/index.html b/contact-center/app/src/main/resources/templates/admin/sms/index.html deleted file mode 100644 index af12073c..00000000 --- a/contact-center/app/src/main/resources/templates/admin/sms/index.html +++ /dev/null @@ -1,100 +0,0 @@ -
              -
              -

              - 短信网关列表<#if smsList??>(${smsList.totalElements!''}) - - - -

              -
              -
              - - - - - - - - - - - - - - - - - - - - - - - - - <#if smsList?? && smsList??> - <#list smsList.content as sms> - - - - - - - - - - - - - -
              名称短信网关类型访问的URL模板IDAppKey参数创建时间操作
              - ${sms.name!''} - ${uKeFuDic[sms.smstype!'']!''}${sms.url!''}${sms.tpcode!''}${sms.appkey!''}${sms.moreparam!''}${sms.createtime?string("yyyy-MM-dd HH:mm:ss")} - - - 编辑 - - - - 删除 - -
              -
              -
              -
              -
              -
              -
              -
              - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/admin/sms/index.pug b/contact-center/app/src/main/resources/templates/admin/sms/index.pug new file mode 100644 index 00000000..6c4aeedf --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/sms/index.pug @@ -0,0 +1,69 @@ +extends /admin/include/layout.pug +block content + .row: .col-lg-12 + h1.site-h1(style='background-color:#FFFFFF;') + | 短信网关列表 #{smsList.totalElements} + span(style='float:right;') + button.layui-btn.layui-btn-small.green(href='/admin/sms/add.html', data-toggle='ajax', data-width='550', data-height='450', data-title='创建新短信网关') + | 创建新短信网关 + + .row(style='padding:5px;') + .col-lg-12 + table.layui-table(lay-skin='line') + colgroup + col(width='10%') + col(width='15%') + col(width='10%') + col(width='15%') + col(width='10%') + col(width='10%') + col(width='20%') + col(width='1%') + thead + tr + th 名称 + th 短信网关类型 + th 访问的URL + th 模板ID + th AppKey + th 参数 + th 创建时间 + th(style='white-space:nowrap;', nowrap) 操作 + tbody + for sms in smsList.content + tr + td= sms.name + td= uKeFuDic[sms.smstype] + td= sms.url + td= sms.tpcode + td= sms.appkey + td= sms.moreparam + td= pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', sms.createtime) + td(style="white-space:nowrap;" nowrap="nowrap") + a(href="/admin/sms/edit.html?id=" + sms.id, data-toggle="ajax", data-width="550", data-height="450", data-title="编辑短信服务器") + i.layui-icon  + span 编辑 + a(href="/admin/sms/delete.html?id=" + sms.id style="margin-left:10px;" data-toggle="tip" title="请确认是否删除短信服务器?") + i.layui-icon(style="color:red;") ဆ + span 删除 + .row(style='padding:5px;') + .col-lg-12#page(style='text-align:center;') + + script. + layui.use(['laypage', 'layer'], function () { + var laypage = layui.laypage + , layer = layui.layer; + + laypage({ + cont: 'page' + // ,pages: <#if smsList??>${smsList.totalPages}<#else>0 //总页数 + // ,curr:<#if smsList??>${smsList.number+1}<#else>0 + , groups: 5 //连续显示分页数 + , jump: function (data, first) { + if (!first) { + location.href = "/admin/sms/index.html?p=" + data.curr; + } + } + }); + }); + diff --git a/contact-center/app/src/main/resources/templates/admin/system/auth/event.html b/contact-center/app/src/main/resources/templates/admin/system/auth/event.html deleted file mode 100644 index 62baafaa..00000000 --- a/contact-center/app/src/main/resources/templates/admin/system/auth/event.html +++ /dev/null @@ -1,97 +0,0 @@ -
              -
              -
              - -
              - -
              -
              -
              - -
              - -
              -
              -
              - -
              - -
              -
              -
              - -
              - -
              -
              -
              - -
              - -
              -
              -
              - -
              - -
              -
              -
              - -
              - -
              -
              -
              - -
              - -
              -
              -
              - -
              - - - - -
              -
              -
              -
              - - -
              -
              -
              -
              - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/admin/system/metadata/edit.html b/contact-center/app/src/main/resources/templates/admin/system/metadata/edit.html deleted file mode 100644 index dc8f91ba..00000000 --- a/contact-center/app/src/main/resources/templates/admin/system/metadata/edit.html +++ /dev/null @@ -1,64 +0,0 @@ -<#include "/public/macro.html"> -
              -
              - -
              - -
              - -
              -
              - -
              - -
              - checked> -
              -
              - -
              style="display:none;"> - -
              - <@select "com.dic.es.type" "listblocktemplet" metadata.listblocktemplet!'' "lay-ignore required lay-verify='required' "/> -
              -
              - -
              style="display:none;"> - -
              - <@select "com.dic.db.type" "previewtemplet" metadata.previewtemplet!'' "lay-ignore required lay-verify='required' "/> -
              -
              - -
              -
              - - -
              -
              -
              -
              - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/admin/system/metadata/edit.pug b/contact-center/app/src/main/resources/templates/admin/system/metadata/edit.pug new file mode 100644 index 00000000..58e194bb --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/system/metadata/edit.pug @@ -0,0 +1,49 @@ +include /mixins/dic.mixin.pug + +.uk-layui-form + form.layui-form.uk-form(action='/admin/metadata/update.html') + input(type='hidden', name='id', value=metadata.id) + .layui-form-item + label.layui-form-label 标题: + .layui-input-inline + input.layui-input(type='text', name='name', value=metadata.name, required, lay-verify='required', placeholder='标题', autocomplete='off') + + .layui-form-item + label.layui-form-label 选项: + .layui-input-inline + input(type="checkbox", name="fromdb", title="ES数据", lay-skin="primary", lay-filter="es", checked=(metadata.fromdb ? 'checked' : false) ) + + .layui-form-item.es(style="display:" + (metadata.fromdb == false ? 'none;' : 'block;')) + label.layui-form-label ES资源: + .layui-input-inline + +sysDicSelect('com.dic.es.type','listblocktemplet',metadata.listblocktemplet,"lay-ignore required lay-verify='required' ") + + .layui-form-item.es(style="display:" + (metadata.fromdb == false ? 'none;' : 'block;')) + label.layui-form-label JAVABean: + .layui-input-inline + +sysDicSelect('com.dic.db.type','previewtemplet',metadata.previewtemplet,"lay-ignore required lay-verify='required' ") + + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 立即提交 + button.layui-btn.layui-btn-original(type='reset') 重置 +script. + layui.use('form', function () { + var form = layui.form(); + form.render(); //更新全部 + form.on("checkbox(es)", function (data) { + if (data.elem.checked == true) { + $('.es').show(); + } else { + $('.es').hide(); + } + }); + form.verify({ + repass: function (value) { + if (value != $('#password').val()) { + return '两次输入的密码不一致,请确认'; + } + } + }); + }); + diff --git a/contact-center/app/src/main/resources/templates/admin/system/metadata/imptb.html b/contact-center/app/src/main/resources/templates/admin/system/metadata/imptb.html deleted file mode 100644 index b7fc3799..00000000 --- a/contact-center/app/src/main/resources/templates/admin/system/metadata/imptb.html +++ /dev/null @@ -1,22 +0,0 @@ -
              -
              - -
              -
              - -
              -
              -
              -
              - - -
              -
              -
              -
              diff --git a/contact-center/app/src/main/resources/templates/admin/system/metadata/imptb.pug b/contact-center/app/src/main/resources/templates/admin/system/metadata/imptb.pug new file mode 100644 index 00000000..d11eb6a2 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/system/metadata/imptb.pug @@ -0,0 +1,12 @@ +.uk-layui-form + form.layui-form.uk-form(action='/admin/metadata/imptbsave.html') + input(type='hidden', name='role', value=role.id) + .layui-form-item + .layui-input-inline + select.ukefu-form-multiple(multiple, name='tables') + for table in tablesList + option(value=table.name)= table.name + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 立即提交 + button.layui-btn.layui-btn-original(type='reset') 重置 diff --git a/contact-center/app/src/main/resources/templates/admin/system/metadata/index.html b/contact-center/app/src/main/resources/templates/admin/system/metadata/index.html deleted file mode 100644 index 821a7442..00000000 --- a/contact-center/app/src/main/resources/templates/admin/system/metadata/index.html +++ /dev/null @@ -1,118 +0,0 @@ -
              -
              -

              - 元数据列表<#if sysDicList??>(${metadataList.totalElements!''}) - - - - 批量删除 - - -

              -
              -
              - - - - - - - - - - - - - - - - - - - - - - - <#if metadataList?? && metadataList.content??> - <#list metadataList.content as table> - - - - - - - - - - - - -
              - - 中文名表名类型ES数据创建时间操作
              - - - - ${table.name!''} - - ${table.tablename!''} <#if table.tabletype?? && table.tabletype == "1">数据表<#else>SQL - <#if table.fromdb?? && table.fromdb == true> - - ${uKeFuDic[table.listblocktemplet!''].name!''} - ${uKeFuDic[table.previewtemplet!''].name!''} - - <#if table.createtime??>${table.createtime?string("yyyy-MM-dd HH:mm:ss")} - - - 编辑 - - - - 删除 - -
              -
              -
              -
              -
              -
              -
              -
              - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/admin/system/metadata/index.pug b/contact-center/app/src/main/resources/templates/admin/system/metadata/index.pug new file mode 100644 index 00000000..85d9aed8 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/system/metadata/index.pug @@ -0,0 +1,96 @@ +extends /admin/include/layout.pug +block content + .row: .col-lg-12 + h1.site-h1(style='background-color:#FFFFFF;') + | 元数据列表 (#{metadataList.totalElements}) + span(style='float:right;') + button.layui-btn.layui-btn-small.green(href='/admin/metadata/imptb.html', data-toggle='ajax', data-width='550', data-title='创建新字典项') + | 导入元数据 + a.layui-btn.layui-btn-small.layui-btn-danger#batdel(href='javascript:void(0)', data-toggle='tip', data-title='删除数据表项同时会删除数据表元数据下的所有内容,请确认是否继续操作”?', title='删除数据表') + | 批量删除 + .row(style='padding:5px;') + .col-lg-12 + table.layui-table(lay-skin='line') + colgroup + col(width='1%') + col(width='25%') + col(width='15%') + col(width='10%') + col(width='24%') + col(width='15%') + col + thead + tr + th + input#all(type='checkbox', onclick='$(".ids").prop("checked" , $(this).prop("checked"));') + th 中文名 + th 表名 + th 类型 + th ES数据 + th 创建时间 + th(style='white-space:nowrap;', nowrap) 操作 + tbody + if size(metadataList.content) > 0 + for table in metadataList.content + tr + td(style="width:1%;"): input(type="checkbox", class="ids", name="ids", value=table.id) + td: a(href="/admin/metadata/table.html?id=" + table.id)= table.name + td= table.tablename + td= (table.tabletype == "1") ? '数据表' : 'SQL' + if table.fromdb == true + td + i.layui-icon(style="color:#19a55d;")  + span= uKeFuDic[table.listblocktemplet].name + span= uKeFuDic[table.previewtemplet].name + else + td + if table.createtime + td= pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', table.createtime) + else + td + td(style="white-space:nowrap;width:1%;", nowrap="nowrap") + a(href="/admin/metadata/edit.html?id=" + table.id + "&p=" + (metadataList.number + 1), data-width="550", data-height="320", data-toggle="ajax", title="编辑" + table.name) + i.layui-icon  + span 编辑 + a(href="/admin/metadata/delete.html?id=" + table.id + "&p=" + (metadataList.number + 1), data-toggle="tip" data-title="删除数据表项同时会删除数据表元数据下的所有内容,请确认是否删除数据表“" + table.name + "”?" title="删除" + table.name) + i.layui-icon(style="color:red;") ဆ + span 删除 + .row(style='padding:5px;') + .col-lg-12#page(style='text-align:center;') + script. + $(document).ready(function () { + $('#batdel').click(function () { + var ids = ""; + $('.ids').each(function () { + if ($(this).prop("checked")) { + if (ids != "") { + ids += "&"; + } + ids += "ids=" + $(this).val(); + } + }); + $('#batdel').attr('href', '/admin/metadata/batdelete.html?' + ids); + + }); + + }); + layui.use(['laypage', 'layer'], function () { + var laypage = layui.laypage + , layer = layui.layer; + + var msg = "#{msg}"; + if (msg) top.layer.msg(msg); + + laypage({ + cont: 'page' + // ,pages: <#if metadataList??>${metadataList.totalPages}<#else>0 //总页数 + // ,curr:<#if metadataList??>${metadataList.number+1}<#else>0 + , groups: 5 //连续显示分页数 + , jump: function (data, first) { + if (!first) { + location.href = "/admin/metadata/index.html?p=" + data.curr; + } + } + }); + }); + diff --git a/contact-center/app/src/main/resources/templates/admin/system/metadata/table.html b/contact-center/app/src/main/resources/templates/admin/system/metadata/table.html deleted file mode 100644 index b770c34d..00000000 --- a/contact-center/app/src/main/resources/templates/admin/system/metadata/table.html +++ /dev/null @@ -1,99 +0,0 @@ -
              -
              -

              - 数据表结构列表<#if sysDicList??>(${propertiesList?size!''}) - - - 批量删除 - - <#if table?? && table.fromdb && table.listblocktemplet??> - - 清空ES数据 - - - 同步数据库表到ES表 - - - 同步ES表到数据库表 - - - -

              -
              -
              - - - - - - - - - - - - - - - - - - - <#if propertiesList??> - <#list propertiesList as prop> - - - - - - - - - - - - - - - - - - -
              - - 标题字段校验长度关联生成ID多值启用字典禁用导入导出流程变量操作
              - - - ${prop.name!''} - ${prop.fieldname!''}(${prop.datatypename!''})${prop.defaultvaluetitle!''}${prop.length!''}<#if prop.reffk == true><#if prop.pk == true><#if prop.modits == true><#if prop.seldata == true><#if prop.impfield == true><#if prop.systemfield == true> - - - 编辑 - - - - 删除 - -
              -
              -
              -
              -
              - diff --git a/contact-center/app/src/main/resources/templates/admin/system/metadata/table.pug b/contact-center/app/src/main/resources/templates/admin/system/metadata/table.pug new file mode 100644 index 00000000..32a2ce9c --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/system/metadata/table.pug @@ -0,0 +1,83 @@ +extends /admin/include/layout.pug +block content + .row + .col-lg-12 + h1.site-h1(style='background-color:#FFFFFF;') + | 数据表结构列表 #{size(propertiesList)} + span(style='float:right;') + a.layui-btn.layui-btn-small.layui-btn-danger#batdel(href='javascript:void(0)', data-toggle='tip', data-title='删除数据表项同时会删除数据表元数据下的所有内容,请确认是否继续操作”?', title='删除数据表') + | 批量删除 + if table && table.fromdb && table.listblocktemplet + a.layui-btn.layui-btn-small.layui-btn-danger(href="/admin/metadata/clean.html?id=" + table.id, id="batdel", data-toggle="tip", data-title="清空" + table.name + "存储在ES数据表里的所有数据,请确认是否继续操作?") + | 清空ES数据 + a.layui-btn.layui-btn-small.layui-btn-danger(href="/admin/metadata/synctoes.html?id=" + table.id, id="batdel", data-toggle="tip", data-title="同步" + table.name + "数据库表到ES表,请确认是否继续操作?") + | 同步数据库表到ES表 + a.layui-btn.layui-btn-small.layui-btn-danger(href="/admin/metadata/synctodb.html?id=" + table.id, id="batdel", data-toggle="tip", data-title="同步" + table.name + "的ES表到数据库表,请确认是否继续操作?") + | 同步数据库表到ES表 + .row(style='padding:5px;') + .col-lg-12 + table.layui-table(lay-skin='line') + thead + tr + th + input#all(type='checkbox', onclick='$(".ids").prop("checked" , $(this).prop("checked"));') + th 标题 + th 字段 + th 校验 + th 长度 + th 关联 + th 生成ID + th 多值 + th 启用字典 + th 禁用导入导出 + th 流程变量 + th(style='white-space:nowrap;', nowrap) 操作 + tbody + for prop in propertiesList + tr + td(style="width:1%;"): input(type="checkbox", class="ids", name="ids", value=prop.id) + td= prop.name + td= prop.fieldname + '(' + prop.datatypename + ')' + td= prop.defaultvaluetitle + td= prop.length + td(align="center") + if prop.reffk == true + i.layui-icon(class="green")  + td(align="center") + if prop.pk == true + i.layui-icon(class="green")  + td(align="center") + if prop.modits == true + i.layui-icon(class="green")  + td(align="center") + if prop.seldata == true + i.layui-icon(class="green", title=prop.seldatacode)  + td(align="center") + if prop.impfield == true + i.layui-icon(class="green")  + td(align="center") + if prop.systemfield == true + i.layui-icon(class="green")  + td(style="white-space:nowrap;width:1%;" nowrap="nowrap") + a(href="/admin/metadata/properties/edit.html?id=" + prop.id + "&p=" + (metadataList.number + 1), data-width="650" data-height="460" data-toggle="ajax" title="编辑" + table.name) + i.layui-icon  + span 编辑 + a(href="/admin/metadata/properties/delete.html?id=" + prop.id + "&tbid=" + prop.dbtableid, data-toggle="tip", data-title="删除数据表项同时会删除数据表元数据下的所有内容,请确认是否删除数据表“" + prop.name + "”?" title="删除" + prop.name) + i.layui-icon(style="color:red;") ဆ + span 删除 + script. + $(document).ready(function () { + $('#batdel').click(function () { + var ids = ""; + $('.ids').each(function () { + if ($(this).prop("checked")) { + if (ids != "") { + ids += "&"; + } + ids += "ids=" + $(this).val(); + } + }); + $('#batdel').attr('href', '/admin/metadata/properties/batdelete.html?tbid=#{tbid}&' + ids); + }); + }); + diff --git a/contact-center/app/src/main/resources/templates/admin/system/metadata/tpedit.html b/contact-center/app/src/main/resources/templates/admin/system/metadata/tpedit.html deleted file mode 100644 index 06fd6873..00000000 --- a/contact-center/app/src/main/resources/templates/admin/system/metadata/tpedit.html +++ /dev/null @@ -1,134 +0,0 @@ -
              -
              - -
              - -
              - -
              -
              - -
              -
              - -
              - checked="checked" lay-text="开启|关闭"> -
              -
              -
              - -
              - checked="checked" lay-text="开启|关闭"> -
              -
              -
              - -
              -
              - -
              - checked="checked" lay-text="开启|关闭"> -
              -
              -
              - -
              - -
              -
              -
              - -
              -
              - -
              - checked="checked" lay-text="开启|关闭"> -
              -
              -
              - -
              - checked="checked" lay-text="开启|关闭"> -
              -
              -
              - -
              -
              - -
              - checked="checked" lay-text="开启|关闭"> -
              -
              -
              - -
              - -
              -
              -
              -
              -
              - -
              - checked lay-skin="primary"> - checked lay-skin="primary"> - checked lay-skin="primary"> - checked lay-skin="primary"> -
              -
              -
              -
              -
              - -
              - checked="checked" lay-text="开启|关闭"> -
              -
              -
              -
              -
              - - -
              -
              -
              -
              - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/admin/system/metadata/tpedit.pug b/contact-center/app/src/main/resources/templates/admin/system/metadata/tpedit.pug new file mode 100644 index 00000000..e43d0af7 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/system/metadata/tpedit.pug @@ -0,0 +1,86 @@ +.uk-layui-form + form.layui-form.uk-form(action='/admin/metadata/properties/update.html') + input(type='hidden', name='id', value=tp.id) + .layui-form-item + label.layui-form-label 标题: + .layui-input-inline + input.layui-input(type='text', name='name', value=tp.name, required, lay-verify='required', placeholder='标题', autocomplete='off') + .layui-form-item + .layui-inline + label.layui-form-label 禁用导入导出: + .layui-input-inline(style='line-height: 25px;width:80px;') + input(type="checkbox", name="impfield", lay-skin="switch", value="1", checked=(tp.impfield == true ? 'checked' : false),lay-text="开启|关闭" ) + .layui-inline + label.layui-form-label(style='width:100px;') 生成ID: + .layui-input-inline(style='line-height: 25px;width:80px;') + input(type="checkbox", name="pk", lay-skin="switch", value="1", checked=(tp.pk == true ? 'checked' : false),lay-text="开启|关闭" ) + .layui-form-item + .layui-inline + label.layui-form-label 启用字典: + .layui-input-inline(style='line-height: 25px;width:80px;') + input(type="checkbox", name="seldata", lay-filter="dic", lay-skin="switch", value="1", checked=(tp.seldata == true ? 'checked' : false),lay-text="开启|关闭" ) + .layui-inline#sysdicsel(style='<#if tp.seldata == false>display:none;') + label.layui-form-label(style='width:60px;') 字典项: + .layui-input-inline + select(name='seldatacode', lay-ignore, style='width:220px;') + option(value) 请选择字典项 + for sysDic in sysdicList + option(value=sysDic.code, selected=((tp.seldatacode && tp.seldatacode == sysDic.code) ? 'selected' : false) )= sysDic.name + .layui-form-item + .layui-inline + label.layui-form-label 启用流程变量: + .layui-input-inline(style='line-height: 25px;width:80px;') + input(type="checkbox", name="systemfield", lay-skin="switch", value="1", checked=(tp.systemfield == true ? 'checked' : false),lay-text="开启|关闭" ) + .layui-inline + label.layui-form-label(style='width:100px;') 启用多值: + .layui-input-inline(style='line-height: 25px;width:80px;') + input(type="checkbox" name="modits" lay-skin="switch" value="1", checked=(tp.modits == true ? 'checked' : false),lay-text="开启|关闭" ) + .layui-form-item + .layui-inline + label.layui-form-label 启用关联: + .layui-input-inline(style='line-height: 25px;width:80px;') + input(type="checkbox" name="reffk" lay-skin="switch" lay-filter="fk" value="1" , checked=(tp.reffk == true ? 'checked' : false),lay-text="开启|关闭" ) + .layui-inline#fk(style='<#if tp.reffk?? && tp.reffk><#else>display:none;', lay-ignore) + label.layui-form-label(style='width:60px;') 关联表: + .layui-input-inline(style='line-height: 25px;width:80px;') + select(name='reftbid', lay-ignore, style='width:220px;') + option(value) 请选择数据接口 + for datadic in dataImplList + option(value=datadic.code, selected=((tp.reftbid && tp.reftbid == datadic.code) ? 'selected' : false) )= datadic.name + .layui-form-item + .layui-inline + label.layui-form-label 数据校验: + .layui-input-inline(style='line-height: 25px;width:380px;margin-top:0px;') + input(type="checkbox", name="defaultvaluetitle", title="非空", value="required", lay-skin="primary", checked=(tp.defaultvaluetitle.contains('required') ? 'checked' : false)) + input(type="checkbox", name="defaultvaluetitle", title="数字", value="numstr", lay-skin="primary", checked=(tp.defaultvaluetitle.contains('numstr') ? 'checked' : false)) + input(type="checkbox", name="defaultvaluetitle", title="日期", value="datenum", lay-skin="primary", checked=(tp.defaultvaluetitle.contains('datenum') ? 'checked' : false)) + input(type="checkbox", name="defaultvaluetitle", title="日期时间", value="datetime", lay-skin="primary", checked=(tp.defaultvaluetitle.contains('datetime') ? 'checked' : false)) + .layui-form-item + .layui-inline + label.layui-form-label 转日期: + .layui-input-inline(style='line-height: 25px;width:380px;margin-top:0px;') + input(type="checkbox" name=defaultfieldvalue lay-skin="switch" value="date", checked=((tp.defaultfieldvalue && tp.defaultfieldvalue == "date") ? 'checked' : false),lay-text="开启|关闭" ) + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 立即提交 + button.layui-btn.layui-btn-original(type='reset') 重置 +script. + layui.use('form', function () { + var form = layui.form(); + form.render(); //更新全部 + form.on("switch(dic)", function (data) { + if (data.elem.checked) { + $("#sysdicsel").show(); + } else { + $("#sysdicsel").hide(); + } + }); + form.on("switch(fk)", function (data) { + if (data.elem.checked) { + $("#fk").show(); + } else { + $("#fk").hide(); + } + }); + }); + diff --git a/contact-center/app/src/main/resources/templates/admin/system/sysdic/add.html b/contact-center/app/src/main/resources/templates/admin/system/sysdic/add.html deleted file mode 100644 index c9438595..00000000 --- a/contact-center/app/src/main/resources/templates/admin/system/sysdic/add.html +++ /dev/null @@ -1,53 +0,0 @@ -
              -
              -
              - -
              - -
              -
              -
              - -
              - -
              -
              -
              - -
              - -
              -
              -
              - -
              - -
              -
              -
              -
              - - -
              -
              -
              -
              - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/admin/system/sysdic/add.pug b/contact-center/app/src/main/resources/templates/admin/system/sysdic/add.pug new file mode 100644 index 00000000..0daac645 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/system/sysdic/add.pug @@ -0,0 +1,38 @@ +.uk-layui-form + form.layui-form.uk-form(action='/admin/sysdic/save.html') + .layui-form-item + label.layui-form-label 名称: + .layui-input-inline + input.layui-input(type='text', name='name', required, lay-verify='required', placeholder='请输入名称', autocomplete='off') + .layui-form-item + label.layui-form-label 代码: + .layui-input-inline + input.layui-input(type='text', name='code', required, lay-verify='required', placeholder='请输入代码', autocomplete='off') + .layui-form-item + label.layui-form-label 类型: + .layui-input-inline + select(name='ctype', lay-verify) + option(value='data') 数据字典 + option(value='auth') 权限字典 + option(value='resu') 系统资源 + .layui-form-item + label.layui-form-label 说明: + .layui-input-inline + textarea.layui-textarea(name='description', placeholder='请输入') + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 立即提交 + button.layui-btn.layui-btn-original(type='reset') 重置 +script. + layui.use('form', function(){ + var form = layui.form(); + form.render(); //更新全部 + form.verify({ + repass: function(value){ + if(value != $('#password').val()){ + return '两次输入的密码不一致,请确认'; + } + } + }); + }); + diff --git a/contact-center/app/src/main/resources/templates/admin/system/sysdic/batadd.html b/contact-center/app/src/main/resources/templates/admin/system/sysdic/batadd.html deleted file mode 100644 index 77ebd01d..00000000 --- a/contact-center/app/src/main/resources/templates/admin/system/sysdic/batadd.html +++ /dev/null @@ -1,35 +0,0 @@ -
              -
              - - - -
              -
              - -
              -
              -
              -
              -
              -文本中的每一行需要包含两个部分,字典项名称  和 字典项代码,两部分中间以空格或逗号隔开
              -例如:	第一联系人	01
              -	第二联系人	02
              -
              -
              -
              -
              -
              - - -
              -
              -
              -
              - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/admin/system/sysdic/batadd.pug b/contact-center/app/src/main/resources/templates/admin/system/sysdic/batadd.pug new file mode 100644 index 00000000..2ab06c33 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/system/sysdic/batadd.pug @@ -0,0 +1,25 @@ +.uk-layui-form + form.layui-form.uk-form(action='/admin/sysdic/dicitem/batsave.html') + input(type='hidden', name='parentid', value=sysDic.id) + input(type='hidden', name='dicid', value=((sysDic.parentid && sysDic.parentid == '0') ? sysDic.id : sysDic.dicid)) + input(type='hidden', name='p', value=(p ? p : 1)) + .layui-form-item + .layui-input-inline(style='width:95%;') + textarea.layui-textarea(name='content', required, lay-verify='required', placeholder='请输入', style='height:150px;') + .layui-form-item + .layui-input-inline(style='width:95%;margin-top:20px;') + pre(style='color:#AAAAAA;'). + 文本中的每一行需要包含两个部分,字典项名称 和 字典项代码,两部分中间以空格或逗号隔开。例如: + 第一联系人 01 + 第二联系人 02 + + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 立即提交 + button.layui-btn.layui-btn-original(type='reset') 重置 +script. + layui.use('form', function () { + var form = layui.form(); + form.render(); //更新全部 + }); + diff --git a/contact-center/app/src/main/resources/templates/admin/system/sysdic/dicitem.html b/contact-center/app/src/main/resources/templates/admin/system/sysdic/dicitem.html deleted file mode 100644 index 732ed157..00000000 --- a/contact-center/app/src/main/resources/templates/admin/system/sysdic/dicitem.html +++ /dev/null @@ -1,140 +0,0 @@ -
              -
              -

              - ${sysDic.name} 字典项<#if sysDicList??>(${sysDicList.totalElements!''}) - - - - - -

              -
              -
              - - - - - - - - - - - <#if sysDic?? && sysDic.ctype?? && sysDic.ctype == "auth"> - - - - - - - - - - - - <#if sysDicList?? && sysDicList.content??> - <#list sysDicList.content as dic> - - - - - - - - - - - - <#else> - - - - - - - - - - - - <#if sysDicList?? && sysDicList.content??> - <#list sysDicList.content as dic> - - - - - - - - - - - - -
              名称代码URL菜单级别样式操作
              - ${dic.name!''} - ${dic.code!''}${dic.url!''} - <#if dic.level?? && dic.level == "1">一级菜单 - <#if dic.level?? && dic.level == "2">二级菜单 - <#if dic.level?? && dic.level == "3">三级菜单 - <#if dic.level?? && dic.level == "4">按钮或链接 - <#if dic.iconstr??>${dic.iconstr} - - - 编辑 - - - - 删除 - -
              名称代码图标显示代码创建时间操作
              - ${dic.name!''} - ${dic.code!''}<#if dic.iconskin?? && dic.iconskin != ''> - - <#if dic.iconstr?? && dic.iconstr != ""> - ${dic.iconstr?no_esc} - - ${dic.name!''} - - - <#if dic.discode><#if dic.createtime??>${dic.createtime?string("yyyy-MM-dd HH:mm:ss")} - - - 编辑 - - - - 删除 - -
              -
              -
              -
              -
              -
              -
              -
              - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/admin/system/sysdic/dicitem.pug b/contact-center/app/src/main/resources/templates/admin/system/sysdic/dicitem.pug new file mode 100644 index 00000000..a443409a --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/system/sysdic/dicitem.pug @@ -0,0 +1,112 @@ +extends /admin/include/layout.pug + +mixin operations(dictid, dictname, pageNumber) + td(style="white-space:nowrap;" nowrap="nowrap") + a(href="/admin/sysdic/dicitem/edit.html?id=" + dictid + "p=" + pageNumber,data-width="550", data-height="450", data-toggle="ajax", title="编辑" + dictname) + i.layui-icon  + span 编辑 + a(href="/admin/sysdic/dicitem/delete.html?id=" + dictid + "&p=" + pageNumber, data-toggle="tip" data-title="删除字典项同时会删除字典项下的所有子项,请确认是否删除字典项“" + dictname + "”?", title="删除" + dictname) + i.layui-icon(style="color:red;") ဆ + span 删除 + +block content + .row + .col-lg-12 + h1.site-h1(style='background-color:#FFFFFF;') + | #{sysDic.name} 字典项 (#{sysDicList.totalElements}) + span(style='float:right;') + button.layui-btn.layui-btn-small.green(href='/admin/sysdic/dicitem/add.html?id=' + sysDic.id, data-toggle='ajax', data-width='550', data-height='450', data-title='创建新字典项') + | 创建新字典项 + button.layui-btn.layui-btn-small.green(href='/admin/sysdic/dicitem/batadd.html?id=' + sysDic.id, data-toggle='ajax', data-width='750', data-title='创建新字典项') + | 批量创建字典项 + .row(style='padding:5px;') + .col-lg-12 + table.layui-table(lay-skin='line') + colgroup + col(width='20%') + col(width='10%') + col(width='10%') + col(width='10%') + col(width='35%') + col(width='10%') + col + if sysDic.ctype == "auth" + thead + tr + th 名称 + th 代码 + th URL + th 菜单级别 + th 样式 + th(style="white-space:nowrap;" nowrap="nowrap") 操作 + tbody + if size(sysDicList.content) > 0 + for dic in sysDicList.content + tr + td: a(href="/admin/sysdic/dicitem.html?id=" + dic.id + "&dicid=" + dic.id) dic.name + td= dic.code + td= dic.url + if dic.level == "1" + td 一级菜单 + else if dic.level == "2" + td 二级菜单 + else if dic.level == "3" + td 三级菜单 + else if dic.level == "4" + td 按钮或链接 + td= dic.iconstr + +operations(dic.id, dic.name, sysDicList.number + 1) + else + thead + tr + th 名称 + th 代码 + th 图标 + th 显示代码 + th 创建时间 + th(style="white-space:nowrap;" nowrap="nowrap") 操作 + tbody + if size(sysDicList.content) > 0 + for dic in sysDicList.content + tr + td: a(href="/admin/sysdic/dicitem.html?id=" + dic.id + "&dicid=" + dic.id)= dic.name + td= dic.code + if dic.iconskin + small(class="ukefu-label" style="background-color:" + dic.iconskin + ";") + if dic.iconstr + i(class=dic.ctype)!= dic.iconstr + | #{dic.name} + else + td + if dic.discode + td: i.layui-icon(style="color:#19a55d;")  + else + td + if dic.createtime + td= pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', dic.createtime) + else + td + +operations(dic.id, dic.name, sysDicList.number + 1) + + + .row(style='padding:5px;') + .col-lg-12#page(style='text-align:center;') + script. + layui.use(['laypage', 'layer'], function () { + var laypage = layui.laypage + , layer = layui.layer; + var msg = "#{msg}" + if (msg) top.layer.msg(msg); + laypage({ + cont: 'page' + , pages: #{sysDicList.totalPages} //总页数 + , curr: #{sysDicList.number + 1} + , groups: 5 //连续显示分页数 + , jump: function (data, first) { + if (!first) { + location.href = "/admin/sysdic/dicitem.html?id=#{sysDic.id}&p=" + data.curr; + } + } + }); + }); + diff --git a/contact-center/app/src/main/resources/templates/admin/system/sysdic/dicitemadd.html b/contact-center/app/src/main/resources/templates/admin/system/sysdic/dicitemadd.html deleted file mode 100644 index 3271803f..00000000 --- a/contact-center/app/src/main/resources/templates/admin/system/sysdic/dicitemadd.html +++ /dev/null @@ -1,75 +0,0 @@ -
              -
              - - - -
              - -
              - -
              -
              -
              - -
              - -
              -
              -
              - -
              - -
              -
              -
              - -
              - -
              -
              -
              - -
              - -
              -
              -
              - -
              - -
              -
              -
              - -
              - -
              -
              -
              -
              - - -
              -
              -
              -
              - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/admin/system/sysdic/dicitemadd.pug b/contact-center/app/src/main/resources/templates/admin/system/sysdic/dicitemadd.pug new file mode 100644 index 00000000..a63d8498 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/system/sysdic/dicitemadd.pug @@ -0,0 +1,54 @@ +.uk-layui-form + form.layui-form.uk-form(action='/admin/sysdic/dicitem/save.html') + input(type='hidden', name='parentid', value=sysDic.id) + input(type='hidden', name='dicid', value=((sysDic.parentid && sysDic.parentid == 0) ? sysDic.id : sysDic.dicid)) + input(type='hidden', name='p', value=(p ? p : '1')) + .layui-form-item + label.layui-form-label 名称: + .layui-input-inline + input.layui-input(type='text', name='name', required, lay-verify='required', placeholder='请输入名称', autocomplete='off') + .layui-form-item + label.layui-form-label 代码: + .layui-input-inline + input.layui-input(type='text', name='code', required, lay-verify='required', placeholder='请输入代码', autocomplete='off') + .layui-form-item + label.layui-form-label 图标: + .layui-input-inline + input.layui-input(type='text', name='iconstr', placeholder='请输入图标代码', autocomplete='off') + .layui-form-item + label.layui-form-label 图标类型: + .layui-input-inline + select(name='ctype', lay-verify) + option(value='layui-icon') LayUI + option(value='kfont') KFont + option(value='layout') Layout + option(value='report') Report + .layui-form-item + label.layui-form-label 颜色: + .layui-input-inline + input.layui-input(type='text', name='iconskin', placeholder='请输入颜色', autocomplete='off') + .layui-form-item + label.layui-form-label 显示代码: + .layui-input-inline + input(type='checkbox', name='discode', lay-skin='switch', lay-text='启用|禁用', value='1') + .layui-form-item + label.layui-form-label 说明: + .layui-input-inline + textarea.layui-textarea(name='description', placeholder='请输入') + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 立即提交 + button.layui-btn.layui-btn-original(type='reset') 重置 +script. + layui.use('form', function () { + var form = layui.form(); + form.render(); //更新全部 + form.verify({ + repass: function (value) { + if (value != $('#password').val()) { + return '两次输入的密码不一致,请确认'; + } + } + }); + }); + diff --git a/contact-center/app/src/main/resources/templates/admin/system/sysdic/dicitemedit.html b/contact-center/app/src/main/resources/templates/admin/system/sysdic/dicitemedit.html deleted file mode 100644 index b7039ee1..00000000 --- a/contact-center/app/src/main/resources/templates/admin/system/sysdic/dicitemedit.html +++ /dev/null @@ -1,76 +0,0 @@ -
              -
              - - - - -
              - -
              - -
              -
              -
              - -
              - -
              -
              -
              - -
              - -
              -
              -
              - -
              - -
              -
              -
              - -
              - -
              -
              -
              - -
              - checked> -
              -
              -
              - -
              - -
              -
              -
              -
              - - -
              -
              -
              -
              - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/admin/system/sysdic/dicitemedit.pug b/contact-center/app/src/main/resources/templates/admin/system/sysdic/dicitemedit.pug new file mode 100644 index 00000000..0cc3cfe2 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/system/sysdic/dicitemedit.pug @@ -0,0 +1,55 @@ +.uk-layui-form + form.layui-form.uk-form(action='/admin/sysdic/dicitem/update.html') + input(type='hidden', name='id', value=sysDic.id) + input(type='hidden', name='parentid', value=sysDic.parentid) + input(type='hidden', name='dicid', value=((sysDic.parentid && sysDic.parentid == '0') ? sysDic.id : sysDic.dicid)) + input(type='hidden', name='p', value=(p ? p : '1')) + .layui-form-item + label.layui-form-label 名称: + .layui-input-inline + input.layui-input(type='text', name='name', required, lay-verify='required', placeholder='请输入名称', autocomplete='off', value=sysDic.name) + .layui-form-item + label.layui-form-label 代码: + .layui-input-inline + input.layui-input(type='text', name='code', required, lay-verify='required', placeholder='请输入代码', autocomplete='off', value=sysDic.code) + .layui-form-item + label.layui-form-label 图标: + .layui-input-inline + input.layui-input(type='text', name='iconstr', value=sysDic.iconstr, placeholder='请输入图标代码', autocomplete='off') + .layui-form-item + label.layui-form-label 图标类型: + .layui-input-inline + select(name='ctype', lay-verify) + option(value="layui-icon", selected=((sysDic.ctype == 'layui-icon') ? 'selected' : false) ) LayUI + option(value="kfont", selected=((sysDic.ctype == 'kfont') ? 'selected' : false) ) KFont + option(value="layout", selected=((sysDic.ctype == 'layout') ? 'selected' : false) ) Layout + option(value="report", selected=((sysDic.ctype == 'report') ? 'selected' : false) ) Report + .layui-form-item + label.layui-form-label 颜色: + .layui-input-inline + input.layui-input(type='text', name='iconskin', placeholder='请输入颜色', value=sysDic.iconskin, autocomplete='off') + .layui-form-item + label.layui-form-label 显示代码: + .layui-input-inline + input(type="checkbox", name="discode", lay-skin="switch", lay-text="启用|禁用", value="1", checked=(sysDic.discode == true ? 'checked' : false) ) + .layui-form-item + label.layui-form-label 说明: + .layui-input-inline + textarea.layui-textarea(name='description', placeholder='请输入')= sysDic.description + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 立即提交 + button.layui-btn.layui-btn-original(type='reset') 重置 +script. + layui.use('form', function () { + var form = layui.form(); + form.render(); //更新全部 + form.verify({ + repass: function (value) { + if (value != $('#password').val()) { + return '两次输入的密码不一致,请确认'; + } + } + }); + }); + diff --git a/contact-center/app/src/main/resources/templates/admin/system/sysdic/edit.html b/contact-center/app/src/main/resources/templates/admin/system/sysdic/edit.html deleted file mode 100644 index b4f64dfe..00000000 --- a/contact-center/app/src/main/resources/templates/admin/system/sysdic/edit.html +++ /dev/null @@ -1,55 +0,0 @@ -
              -
              - - -
              - -
              - -
              -
              -
              - -
              - -
              -
              -
              - -
              - -
              -
              -
              - -
              - -
              -
              -
              -
              - - -
              -
              -
              -
              - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/admin/system/sysdic/edit.pug b/contact-center/app/src/main/resources/templates/admin/system/sysdic/edit.pug new file mode 100644 index 00000000..527f7d72 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/system/sysdic/edit.pug @@ -0,0 +1,39 @@ +.uk-layui-form + form.layui-form.uk-form(action='/admin/sysdic/update.html') + input(type='hidden', name='id', value=sysDic.id) + input(type='hidden', name='p', value=p) + .layui-form-item + label.layui-form-label 名称: + .layui-input-inline + input.layui-input(type='text', name='name', required, lay-verify='required', placeholder='请输入名称', autocomplete='off', value=sysDic.name) + .layui-form-item + label.layui-form-label 代码: + .layui-input-inline + input.layui-input(type='text', name='code', required, lay-verify='required', placeholder='请输入代码', autocomplete='off', value=sysDic.code) + .layui-form-item + label.layui-form-label 类型: + .layui-input-inline + select(name='ctype', lay-verify) + option(value="data", selected=(sysDic.ctype == 'data'?'selected': false)) 数据字典 + option(value="auth", selected=(sysDic.ctype == 'auth'?'selected': false)) 权限字典 + option(value="resu", selected=(sysDic.ctype == 'resu'?'selected': false)) 系统资源 + .layui-form-item + label.layui-form-label 说明: + .layui-input-inline + textarea.layui-textarea(name='description', placeholder='请输入')= sysDic.description + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 立即提交 + button.layui-btn.layui-btn-original(type='reset') 重置 +script. + layui.use('form', function(){ + var form = layui.form(); + form.render(); //更新全部 + form.verify({ + repass: function(value){ + if(value != $('#password').val()){ + return '两次输入的密码不一致,请确认'; + } + } + }); + }); diff --git a/contact-center/app/src/main/resources/templates/admin/system/sysdic/index.html b/contact-center/app/src/main/resources/templates/admin/system/sysdic/index.html deleted file mode 100644 index a592e470..00000000 --- a/contact-center/app/src/main/resources/templates/admin/system/sysdic/index.html +++ /dev/null @@ -1,90 +0,0 @@ -
              -
              -

              - 系统数据字典列表<#if sysDicList??>(${sysDicList.totalElements!''}) - - - -

              -
              -
              - - - - - - - - - - - - - - - - - - - - - - <#if sysDicList?? && sysDicList.content??> - <#list sysDicList.content as dic> - - - - - - - - - - - -
              名称代码系统字典说明创建时间操作
              - <#if dic.haschild?? && dic.haschild> - ${dic.name!''} - <#else> - ${dic.name!''} - - - ${dic.code!''}<#if dic.ctype?? && dic.ctype == "data">数据字典<#elseif dic.ctype?? && dic.ctype == "auth">权限字典<#elseif dic.ctype?? && dic.ctype == "resu">系统资源${dic.description!''}<#if dic.createtime??>${dic.createtime?string("yyyy-MM-dd HH:mm:ss")} - - - 编辑 - - - - 删除 - -
              -
              -
              -
              -
              -
              -
              -
              - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/admin/system/sysdic/index.pug b/contact-center/app/src/main/resources/templates/admin/system/sysdic/index.pug new file mode 100644 index 00000000..f9de8b27 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/system/sysdic/index.pug @@ -0,0 +1,79 @@ +extends /admin/include/layout.pug +block content + .row: div.col-lg-12 + h1.site-h1(style='background-color:#FFFFFF;') + | 系统数据字典列表 (#{sysDicList.totalElements}) + span(style='float:right;') + button.layui-btn.layui-btn-small.green(href='/admin/sysdic/add.html', data-toggle='ajax', data-width='550', data-title='创建新字典项') + | 创建新字典项 + .row(style='padding:5px;') + .col-lg-12 + table.layui-table(lay-skin='line') + colgroup + col(width='15%') + col(width='15%') + col(width='15%') + col(width='20%') + col(width='20%') + col(width='13%') + col + thead + tr + th 名称 + th 代码 + th 系统字典 + th 说明 + th 创建时间 + th(style='white-space:nowrap;', nowrap) 操作 + tbody + if sysDicList.totalElements > 0 + for dic in sysDicList.content + tr + td + if dic.haschild && dic.haschild + a(href='/admin/sysdic/dicitem.html?id=' + dic.id + '&dicid=' + dic.id)= dic.name + else + | #{dic.name} + td= dic.code + if dic.ctype == "data" + td 数据字典 + else if dic.ctype == "auth" + td 权限字典 + else if dic.ctype == "resu" + td 系统资源 + else + td + td=dic.description + if dic.createtime + td= pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', dic.createtime) + else + td + td(style="white-space:nowrap;" nowrap="nowrap") + a(title="编辑"+dic.name, data-width="550", data-toggle="ajax", href="/admin/sysdic/edit.html?id="+dic.id+"&p="+(sysDicList.number+1)) + i.layui-icon  + span 编辑 + a(title="删除"+dic.name, data-toggle="tip", data-title="删除字典项同时会删除字典项下的所有子项,请确认是否删除字典项“"+dic.name+"”?", href="/admin/sysdic/delete.html?id="+dic.id+"&p="+(sysDicList.number+1)) + i.layui-icon(style="color:red;") ဆ + span 删除 + .row(style='padding:5px;') + .col-lg-12#page(style='text-align:center;') + script. + layui.use(['laypage', 'layer'], function(){ + var laypage = layui.laypage + ,layer = layui.layer; + var msg = "#{msg}"; + if(msg){ + top.layer.msg(msg) + }; + laypage({ + cont: 'page' + ,pages: #{sysDicList.totalPages} //总页数 + ,curr: #{sysDicList.number+1} + ,groups: 5 //连续显示分页数 + ,jump:function(data , first){ + if(!first){ + location.href = "/admin/sysdic/index.html?p="+data.curr ; + } + } + }); + }); \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/admin/system/template/add.html b/contact-center/app/src/main/resources/templates/admin/system/template/add.html deleted file mode 100644 index 3f304d12..00000000 --- a/contact-center/app/src/main/resources/templates/admin/system/template/add.html +++ /dev/null @@ -1,80 +0,0 @@ -<#include "/public/macro.html"> -
              -
              - -
              - -
              - -
              -
              - * - 模板名称,请使用字母填写 -
              -
              -
              - -
              - -
              -
              - <#if sysDic.discode == true> -
              - -
              - -
              -
              - * - 模板图标,显示的图标路径 -
              -
              - <#if sysDic.ctype?? && sysDic.ctype == "layout"> -
              - -
              - -
              -
              - * - 布局模板的列数量 -
              -
              - - <#if sysDic.ctype?? && sysDic.ctype == "report"> - -
              - -
              - -
              -
              - - -
              -
              - - -
              -
              -
              -
              - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/admin/system/template/add.pug b/contact-center/app/src/main/resources/templates/admin/system/template/add.pug new file mode 100644 index 00000000..7c6bfd95 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/system/template/add.pug @@ -0,0 +1,67 @@ +.uk-layui-form + form.layui-form.uk-form(action='/admin/template/save.html') + input(type='hidden', name='templettype', value=sysDic.id) + .layui-form-item + label.layui-form-label 模板名称: + .layui-input-inline + input.layui-input(type='text', name='name', required, lay-verify='required', placeholder='请输入模板名称', autocomplete='off') + .layui-form-mid.layui-word-aux + font(color='red') * + | 模板名称,请使用字母填写 + + .layui-form-item + label.layui-form-label 模板代码: + .layui-input-inline + input.layui-input(type='text', name='code', placeholder='请输入模板代码', autocomplete='off') + + if sysDic.discode == true + .layui-form-item + label.layui-form-label 图标: + .layui-input-inline + input(type="text" name="iconstr" required lay-verify="required" placeholder="请输入模板图标" autocomplete="off" class="layui-input") + .layui-form-mid.layui-word-aux + font(color="red") * + span 模板图标,显示的图标路径 + + if sysDic.ctype == "layout" + .layui-form-item + label.layui-form-label 列数: + .layui-input-inline + select(name="layoutcols", lay-verify="") + - var opt = 1 + while opt <= 12 + option(value="'" + opt + "'") #{opt}列 + + .layui-form-mid.layui-word-aux + font(color="red") * + span 布局模板的列数量 + + if sysDic.ctype == "report" + //- 以下再原文件中被注释 + //- https://gitlab.chatopera.com/chatopera/cskefu/blob/760e130e770a96a43e8f6f2c8a1eb0885c0bbf90/contact-center/app/src/main/resources/templates/admin/system/template/add.html + //- include /mixins/dic.mixin.pug + //- <!–
              + //- + //-
              + //- <@select "com.dic.template.datatype" "datatype" '' "lay-ignore required" "width: 220px;"/> + //-
              + //-
              + //- * + //- 报表默认数据 + //-
              + //-
              –> + .layui-form-item + label.layui-form-label 报表类型: + .layui-input-inline + input(type="text", name="charttype", required, lay-verify="required", placeholder="请输入报表类型", autocomplete="off", class="layui-input") + + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 立即提交 + button.layui-btn.layui-btn-original(type='reset') 重置 +script. + layui.use('form', function () { + var form = layui.form(); + form.render(); + }); + diff --git a/contact-center/app/src/main/resources/templates/admin/system/template/code.html b/contact-center/app/src/main/resources/templates/admin/system/template/code.html deleted file mode 100644 index 240f260a..00000000 --- a/contact-center/app/src/main/resources/templates/admin/system/template/code.html +++ /dev/null @@ -1,29 +0,0 @@ -
              -
              - - -
              - -
              ${template.templettext!''}
              -
              - -
              -
              - - -
              -
              -
              -
              - - diff --git a/contact-center/app/src/main/resources/templates/admin/system/template/code.pug b/contact-center/app/src/main/resources/templates/admin/system/template/code.pug new file mode 100644 index 00000000..0bb33dc1 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/system/template/code.pug @@ -0,0 +1,23 @@ +.uk-layui-form + form.layui-form.uk-form(action='/admin/template/codesave.html') + input(type='hidden', name='templettype', value=sysDic.id) + input(type='hidden', name='id', value=template.id) + .layui-form-item + textarea#templettext(name='templettext', style='display:none;') template.templettext + #editor= template.templettext + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 立即提交 + button.layui-btn.layui-btn-original(type='reset') 重置 + +script(language='javascript'). + $(document).ready(function () { + var editor = ace.edit("editor"); + editor.setTheme("ace/theme/chrome"); + editor.getSession().setMode("ace/mode/xml"); + var textarea = $("#templettext"); + editor.getSession().on("change", function () { + textarea.val(editor.getSession().getValue()); + }); + }); + diff --git a/contact-center/app/src/main/resources/templates/admin/system/template/edit.html b/contact-center/app/src/main/resources/templates/admin/system/template/edit.html deleted file mode 100644 index 7c5cc9b8..00000000 --- a/contact-center/app/src/main/resources/templates/admin/system/template/edit.html +++ /dev/null @@ -1,83 +0,0 @@ -<#include "/public/macro.html"> -
              -
              - - -
              - -
              - -
              -
              - * - 模板名称,请使用字母填写 -
              -
              -
              - -
              - -
              -
              - - <#if sysDic.discode == true> -
              - -
              - -
              -
              - * - 模板图标,显示的图标路径 -
              -
              - <#if sysDic.ctype?? && sysDic.ctype == "layout"> -
              - -
              - -
              -
              - * - 布局模板的列数量 -
              -
              - - <#if sysDic.ctype?? && sysDic.ctype == "report"> - -
              - -
              - -
              -
              - - - -
              -
              - - -
              -
              -
              -
              - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/admin/system/template/edit.pug b/contact-center/app/src/main/resources/templates/admin/system/template/edit.pug new file mode 100644 index 00000000..42c58ac5 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/system/template/edit.pug @@ -0,0 +1,69 @@ +.uk-layui-form + form.layui-form.uk-form(action='/admin/template/update.html') + input(type='hidden', name='templettype', value=sysDic.id) + input(type='hidden', name='id', value=template.id) + .layui-form-item + label.layui-form-label 模板名称: + .layui-input-inline + input.layui-input(type='text', name='name', value=template.name, required, lay-verify='required', placeholder='请输入模板名称', autocomplete='off') + .layui-form-mid.layui-word-aux + font(color='red') * + | 模板名称,请使用字母填写 + + .layui-form-item + label.layui-form-label 模板代码: + .layui-input-inline + input.layui-input(type='text', name='code', placeholder='请输入模板代码', value=template.code, autocomplete='off') + + if sysDic.discode == true + .layui-form-item + label.layui-form-label 图标: + .layui-input-inline + input(type="text", name="iconstr", required, lay-verify="required", value=template.iconstr, placeholder="请输入模板图标", autocomplete="off", class="layui-input") + .layui-form-mid.layui-word-aux + font(color="red") * + span 模板图标,显示的图标路径 + + if sysDic.ctype == "layout" + .layui-form-item + label.layui-form-label 列数: + .layui-input-inline + select(name="layoutcols" lay-verify="") + - var opt = 1 + while opt <= 12 + option(value="#{opt}", selected=(template.layoutcols == opt ? 'selected' : false)) #{opt}列 + opt++ + + .layui-form-mid.layui-word-aux + font(color="red") * + span 布局模板的列数量 + + if sysDic.ctype == "report" + // - comment out by original file + // - https://gitlab.chatopera.com/chatopera/cskefu/blob/760e130e770a96a43e8f6f2c8a1eb0885c0bbf90/contact-center/app/src/main/resources/templates/admin/system/template/edit.html + // - <#include "/public/macro.html"> + // <!–
              + // + //
              + // <@select "com.dic.template.datatype" "datatype" template.datatype!'' "lay-ignore required" "width: 220px;"/> + //
              + //
              + // * + // 报表默认数据 + //
              + .layui-form-item + .layui-form-label 报表类型: + .layui-input-inline + input(type="text", name="charttype", required, lay-verify="required", value=template.charttype, placeholder="请输入报表类型", autocomplete="off", class="layui-input") + + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 立即提交 + button.layui-btn.layui-btn-original(type='reset') 重置 + +script. + layui.use('form', function () { + var form = layui.form(); + form.render(); + }); + diff --git a/contact-center/app/src/main/resources/templates/admin/system/template/imp.html b/contact-center/app/src/main/resources/templates/admin/system/template/imp.html deleted file mode 100644 index 06d35a98..00000000 --- a/contact-center/app/src/main/resources/templates/admin/system/template/imp.html +++ /dev/null @@ -1,45 +0,0 @@ -
              -
              -
              -
              - -
              -
              - 上传系统模板数据文件 -
              -
              -
              -
              - *(必填项) (需要导入的系统模板数据文件,data格式文件) -
              -
              - -
              -
              - -
              - -
              -
              -
              - -
              -
              - - -
              -
              -
              -
              - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/admin/system/template/imp.pug b/contact-center/app/src/main/resources/templates/admin/system/template/imp.pug new file mode 100644 index 00000000..20430cea --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/system/template/imp.pug @@ -0,0 +1,34 @@ +.uk-layui-form + form.layui-form(action='/admin/template/impsave.html', enctype='multipart/form-data', method='post') + .layui-form-item + .layui-inline + label.layui-form-label 数据文件: + .layui-input-inline + .layui-box.layui-upload-button + input.layui-upload-file(type='file', name='dataFile', required, lay-verify='required', onchange="$('#dataFile').html($(this).val());") + | + span.layui-upload-icon + i.layui-icon  + | 上传系统模板数据文件 + .layui-inline + font(color='red') *(必填项) + | (需要导入的系统模板数据文件,data格式文件) + + .layui-form-item(style='height:40px;line-height:40px;') + .layui-inline + label.layui-form-label + .layui-input-inline#dataFile(style='width:500px;'). + + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 立即导入 + button.layui-btn.layui-btn-original(type='reset') 重置 +script. + layui.use('upload', function () { + var target = $(this).attr("data-target"); + }); + layui.use('form', function () { + var form = layui.form(); + form.render(); + }); + diff --git a/contact-center/app/src/main/resources/templates/admin/system/template/index.html b/contact-center/app/src/main/resources/templates/admin/system/template/index.html deleted file mode 100644 index 5885849c..00000000 --- a/contact-center/app/src/main/resources/templates/admin/system/template/index.html +++ /dev/null @@ -1,49 +0,0 @@ -
              -
              -

              - 系统模板 - - - - - 导出系统模板 - - -

              -
              -
              - - - - - - - - - - - - - - - - <#if sysDicList??> - <#list sysDicList as dic> - - - - - - - - -
              分类名称分类代码创建时间
              - ${dic.name!''} - ${dic.code!''}<#if dic.createtime??>${dic.createtime?string("yyyy-MM-dd HH:mm:ss")}
              -
              -
              -
              -
              \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/admin/system/template/index.pug b/contact-center/app/src/main/resources/templates/admin/system/template/index.pug new file mode 100644 index 00000000..11249c00 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/system/template/index.pug @@ -0,0 +1,38 @@ +extends /admin/include/layout.pug +block content + .row + .col-lg-12 + h1.site-h1(style='background-color:#FFFFFF;') + | 系统模板 + + span(style='float:right;') + button.layui-btn.layui-btn-small.green(href='/admin/template/imp.html', data-toggle='ajax', data-width='750', data-height='220', data-title='导入系统模板') + i.kfont  + span 导入系统模板 + + a.layui-btn.layui-btn-small.green(href='/admin/template/expall.html', target='_blank') + i.kfont  + span 导出系统模板 + + .row(style='padding:5px;') + .col-lg-12 + table.layui-table(lay-skin='line') + colgroup + col(width='15%') + col(width='20%') + col(width='20%') + col + thead + tr + th 分类名称 + th 分类代码 + th 创建时间 + tbody + for dic in sysDicList + tr + td: a(href="/admin/template/list.html?type=" + dic.id)= dic.name + td= dic.code + if dic.createtime + td= pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', dic.createtime) + else + td \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/admin/system/template/list.html b/contact-center/app/src/main/resources/templates/admin/system/template/list.html deleted file mode 100644 index 39769c53..00000000 --- a/contact-center/app/src/main/resources/templates/admin/system/template/list.html +++ /dev/null @@ -1,70 +0,0 @@ -
              -
              -

              - ${sysDic.name!''} 分类模板 - - - -

              -
              -
              - - - - - <#if sysDic.ctype == "layout"> - - - - - - - - - - - <#if sysDic.ctype == "layout"> - - - - - - - - <#if templateList??> - <#list templateList as template> - - - - - <#if sysDic.ctype == "layout"> - - - - - - -
              模板名称创建时间列数模板内容操作
              - ${template.name!''} - <#if template.createtime??>${template.createtime?string("yyyy-MM-dd HH:mm:ss")}${template.layoutcols} - - - <#if template.templettext??> - - - - - - 编辑 - - - - 删除 - -
              -
              -
              -
              -
              \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/admin/system/template/list.pug b/contact-center/app/src/main/resources/templates/admin/system/template/list.pug new file mode 100644 index 00000000..d006f41b --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/system/template/list.pug @@ -0,0 +1,50 @@ +extends /admin/include/layout.pug +block content + .row + .col-lg-12 + h1.site-h1(style='background-color:#FFFFFF;') + | #{sysDic.name} 分类模板 + span(style='float:right;') + button.layui-btn.layui-btn-small.green(href='/admin/template/add.html?type=' + sysDic.id, data-toggle='ajax', data-width='700', data-height='350', data-title='创建新模板') + | 创建新模板 + + .row(style='padding:5px;') + .col-lg-12 + table.layui-table(lay-skin='line') + colgroup + col(width='15%') + col(width='20%') + if sysDic.ctype == "layout" + col(width="10%") + col(width='10%') + col(width='1%') + col + thead + tr + th 模板名称 + th 创建时间 + if sysDic.ctype == "layout" + th 列数 + th 模板内容 + th(style='white-space:nowrap;', nowrap) 操作 + tbody + for template in templateList + tr + td: a(href="/admin/template/code.html?type="+sysDic.id+"&id="+template.id, data-width="750", data-height="450", data-toggle="ajax", title="编辑"+template.name) + if template.createtime + td= pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', template.createtime) + else + td + if sysDic.ctype == "layout" + td= template.layoutcols + if template.templettext + i.layui-icon(style="color:#19a55d;")  + else + td + td(style="white-space:nowrap;" nowrap="nowrap") + a(href="/admin/template/edit.html?type="+sysDic.id+"&id="+template.id, data-width="750" data-height="350" data-toggle="ajax" title="编辑"+template.name) + i.layui-icon  + span 编辑 + a(href="/admin/template/delete.html?templettype="+sysDic.id+"&id=" +template.id, data-toggle="tip" data-title="请确认是否系统模板“"+template.name+"”?") + i.layui-icon(class="layui-icon") ဆ + span 删除 diff --git a/contact-center/app/src/main/resources/templates/admin/user/add.html b/contact-center/app/src/main/resources/templates/admin/user/add.html deleted file mode 100644 index 92de78d8..00000000 --- a/contact-center/app/src/main/resources/templates/admin/user/add.html +++ /dev/null @@ -1,392 +0,0 @@ -
              -
              -
              - -
              - -
              -
              用户登录的账号
              -
              -
              - -
              - -
              -
              -
              - -
              - -
              -
              -
              - -
              - -
              -
              - -
              -
              -
              - -
              - -
              -
              - -
              -
              - -
              - - - - -
              -
              -
              - -
              - -
              - -
              -
              管理员具备访问和修改所有系统资源的权限,同时也设定为多媒体坐席
              -
              -
              - -
              - -
              -
              - <#if models?seq_contains("callcenter")> - - - - - - - - - - -
              - -
              - -
              -
              -
              - -
              - -
              -
              - -
              -
              - -
              -
              - - - -
              -
              -
              -
              - - - - diff --git a/contact-center/app/src/main/resources/templates/admin/user/add.pug b/contact-center/app/src/main/resources/templates/admin/user/add.pug new file mode 100644 index 00000000..cfae25cb --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/user/add.pug @@ -0,0 +1,345 @@ +.uk-layui-form + form.layui-form.uk-form(action='/admin/user/save.html') + .layui-form-item + label.layui-form-label 用户名: + .layui-input-inline + input.layui-input(type='text', name='username', required, lay-verify='required_username', placeholder='请输入用户名', autocomplete='off') + .layui-form-mid.layui-word-aux 用户登录的账号 + .layui-form-item + label.layui-form-label 姓名: + .layui-input-inline + input.layui-input(type='text', name='uname', required, lay-verify='required_name', placeholder='请输入用户姓名', autocomplete='off') + .layui-form-item + label.layui-form-label 电子邮件: + .layui-input-inline + input.layui-input(type='email', name='email', placeholder='请输入电子邮件地址', autocomplete='off') + .layui-form-item + label.layui-form-label 密码: + .layui-input-inline + input#password.layui-input(type='password', name='password', required, lay-verify='required|pass', placeholder='请输入登录密码', autocomplete='off') + .layui-form-mid.layui-word-aux(style='padding-top: 5px;padding-bottom: 0px') + input#repassword.layui-input(type='password', name='repassword', required, lay-verify='required|repass', placeholder='请再次输入密码', autocomplete='off') + .layui-form-item + label.layui-form-label 手机号: + .layui-input-inline + input.layui-input(type='mobile', name='mobile', placeholder='请输入手机号码', autocomplete='off') + .layui-form-item + .layui-inline + label.layui-form-label 组织机构: + .layui-input-inline(style='position: relative;') + input#parent(type='hidden', name='parent', value=(currentOrgan ? currentOrgan.id : "0")) + input#parentname.layui-input(type='text', name='parentname', required, value=(currentOrgan ? currentOrgan.name : "组织机构"), lay-verify='requiredTwo', autocomplete='off', readonly, onclick='showMenu();') + i.layui-icon(style='position: absolute;right: 3px;top: 6px;font-size: 25px;${systemConfig.color!\'color:#0096C4;\'}', onclick='showMenu()')  + #menuContent.ukefu-ztree(style='display:none; position: absolute;z-index:10000;width: 218px;') + ul#organTree.ztree(style='width:208px;') + .layui-form-item + label.layui-form-label 管理员: + .layui-input-inline + input(type='checkbox', name='admin', lay-skin='switch', lay-filter='admincheckbox', value='1', lay-text='是|否') + .layui-form-mid.layui-word-aux(style='padding: 0 0; line-height: 20px') 管理员具备访问和修改所有系统资源的权限,同时也设定为多媒体坐席 + .layui-form-item#agentDiv + label.layui-form-label 多媒体坐席: + .layui-input-inline + input(type='checkbox', name='agent', lay-skin='switch', value='1', lay-filter='agent', lay-text='开启|关闭') + if models.contains("callcenter") + //
              + // + //
              + // + //
              + //
              + // + //
              + //
              + #callcenter.layui-form-item + label.layui-form-label 呼叫中心坐席: + .layui-input-inline(style="margin-left:0px;") + input(type="checkbox", name="callcenter", lay-skin="switch", lay-filter="callcenter", value="1", lay-text="开启|关闭") + #bindext_tip.layui-form-item + label.layui-form-label 呼叫中心: + .layui-input-inline + select#callcenterhostid(name="pbxhostid", lay-filter="hostid", lay-verify="callcenterhost") + option(value="") 请选择呼叫中心 + #extenttions.layui-form-mid(style="padding-top:5px !important;") + select#callcenterExtid(name="extensionid", lay-verify="callcenterext") + option(value="") 请选择分机 + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='sys-user-create') 提交 + button.layui-btn(lay-submit, lay-filter='sys-user-create-follow') 提交并创建下一个 + button.layui-btn.layui-btn-original(type='reset') 重置 +script. + layui.use('form', function () { + var form = layui.form(); + form.render(); //更新全部 + form.verify({ + repass: function (value) { + if (value != $('#password').val()) { + return '两次输入的密码不一致,请确认'; + } + }, + sip: function (value) { + if ($("input[name=callcenter]:checked").length > 0 && value === '') { + return 'SIP地址不能为空,请确认'; + } + }, + required_username: function (value) { + if (value.length > 50) { + return "用户名不能超过50字"; + } + }, + required_name: function (value) { + if (value.length > 100) { + return "用户姓名不能超过100字"; + } + }, + callcenterhost: function (value) { + if ($("input[name=callcenter]:checked").length > 0 && value === '') { + return '呼叫中心不能为空,请确认'; + } + }, + callcenterext: function (value) { + if ($("input[name=callcenter]:checked").length > 0 && value === '') { + return '分机不能为空,请确认'; + } + } + }); + + // 当账号为管理员类型时,强制设定为坐席! + form.on('switch(admincheckbox)', function (data) { + if (data.elem.checked) { + // 坐席的按钮 + if ($('#agentDiv > div > div > em').text() == "关闭") { + // 之前未开启 + document.querySelector('#agentDiv > div > div > i').click(); + } + // 设置为禁用 + $("#agentDiv > div > input[name=agent]").attr('disabled', 'disabled'); + } else { + // 取消禁用 + $("#agentDiv > div > input[name=agent]").removeAttr('disabled'); + } + }); + + $('#bindext_tip').hide(); + + form.on('switch(callcenter)', function (data) { + if (data.elem.checked) { + $('#bindext_tip').show(); + restApiRequest({ + silent: true, + path: 'callcenter', + data: { + ops: "my-pbxlist" + } + }).then(function (result) { + if (result.rc == 0) { + $("#callcenterhostid").html(''); + if (result.data.length > 0) { + for (var i = 0; i < result.data.length; i++) { + $("#callcenterhostid").append('') + } + ; + form.render("select"); + } + } + }, function (err) { + handleRestApiFail(err); + }); + } else { + $('#bindext_tip').hide(); + } + }); + + form.on('select(hostid)', function (data) { + restApiRequest({ + silent: true, + path: 'callcenter', + data: { + ops: "ext-dd-vacant", + id: data.value + } + }).then(function (result) { + if (result.rc == 0) { + if (result.data.length > 0) { + $("#callcenterExtid").html(''); + for (var i = 0; i < result.data.length; i++) { + $("#callcenterExtid").append('') + } + ; + form.render("select"); + } + } + }, function (err) { + handleRestApiFail(err); + }); + }); + + // 根据“多媒体坐席”显示“呼叫中心坐席”状态 + // form.on('switch(agent)', function(data){ + // $("input[name=callcenter]").prop("checked", false); + // form.render('checkbox','callcenter'); + // if(data.elem.checked){ + // $('#callcenterDiv').show(); + // }else{ + // $('#callcenterDiv').hide(); + // } + // $('#sipAccount').val(""); + // $('#sipAccountDiv').hide(); + // }); + + // 根据“呼叫中心坐席”状态 显示呼叫地址输入框 + // form.on('switch(callcenter)', function(data){ + // $('#sipAccount').val(""); + // if(data.elem.checked){ + // $('#sipAccountDiv').show(); + // }else{ + // $('#sipAccountDiv').hide(); + // } + // }); + + form.on('submit(sys-user-create)', function (data) { + data.field['ops'] = 'create'; + restApiRequest({ + silent: true, + path: 'user', + data: data.field + }).then(function (result) { + if (result.rc == 0) { + processUserAddOrUpdateResult(result.data, function () { + // close win + // 关闭form + $("span.layui-layer-setwin > a.layui-layer-close1").click(); + // 刷新页面 + document.getElementById("admin").contentWindow.location = '/admin/user/index.html'; + }); + } + }, function (err) { + handleRestApiFail(err); + }); + return false; + }); + + // 保存成功后,继续留在当前页面,重制并创建下一个 + form.on('submit(sys-user-create-follow)', function (data) { + data.field['ops'] = 'create'; + restApiRequest({ + silent: true, + path: 'user', + data: data.field + }).then(function (result) { + if (result.rc == 0) { + processUserAddOrUpdateResult(result.data, function () { + // 清空部分参数 + $('input[name="username"]').val(""); + $('input[name="uname"]').val(""); + $('input[name="mobile"]').val(""); + $('input[name="email"]').val(""); + $('input[name="callcenter"]').attr('checked', false); + $('#bindext_tip').hide(); + $("#callcenterExtid").html(''); + form.render('checkbox') + }); + } + }, function (err) { + handleRestApiFail(err); + }); + return false; + }) + }); + +script(type='text/javascript'). + var setting = { + data: {simpleData: {enable: true}}, + callback: {onClick: onClick, beforeClick: beforeClick} + } + function beforeClick(treeId, treeNode) { + var zTree = $.fn.zTree.getZTreeObj("organTree") + nodes = zTree.getSelectedNodes(); + var allow = true, lastnode; + for (var i = 0, l = nodes.length; i < l; i++) { + lastnode = nodes[i].type; + if (nodes[i].organ && (nodes.length >= 1 && (event.ctrlKey || event.shiftKey))) { + allow = false; + break; + } + } + if (lastnode != treeNode.type && (event.ctrlKey || event.shiftKey)) { + allow = false; + } + if (allow == false) { + top.layer.alert("组织机构不能点选多个上级机构,也不能同时选择地区和机构", {icon: 3}); + return false; + } else { + return true; + } + } + function onClick(e, treeId, treeNode) { + var zTree = $.fn.zTree.getZTreeObj("organTree"), nodes = zTree.getSelectedNodes(), v = "", value = ""; + nodes.sort(function compare(a, b) { + return a.id - b.id; + }); + for (var i = 0, l = nodes.length; i < l; i++) { + v += nodes[i].name + ","; + if (value != "") { + value = value + ","; + } + value = nodes[i].id; + } + if (v.length > 0) v = v.substring(0, v.length - 1); + if (treeNode.type == "area") { + $("#parentname").attr("value", v); + $("#parent").attr("value", "0"); + $("#area").attr("value", value); + } else { + $("#parentname").attr("value", v); + $("#parent").attr("value", value); + $("#area").attr("value", ""); + } + if (!event.ctrlKey && !event.shiftKey) { + hideMenu(); + } + } + + var zNodes = !{pugHelper.toJSON(organList)}; + $.each(zNodes, function (i, o) { + o.pId = o.parent; + o.open = true; + o.organ = true; + o.type = "organ"; + o.icon = "/images/dept.png" + }) + + $(document).ready(function () { + var ztree = $.fn.zTree.init($("#organTree"), setting, zNodes); + if ('#{organData}') { + var node = ztree.getNodeByParam('id', '#{organData.parent}');//获取id为1的点 + ztree.selectNode(node);//选择点 + if (node) { + $("#parentname").attr("value", node.name); + } + if ('#{organData.area}') { + var areaList = '#{organData.area}'.split(",") + areaList.forEach(function (area, index) { + var areanode_#{index} = ztree.getNodeByParam('id', area);//获取id为1的点 + ztree.selectNode(areanode_#{index}, true);//选择点 + }); + } + } + }) + + function showMenu() { + $("#menuContent").css({left: "0px", top: "38px"}).show(); + + $("body").bind("mousedown", onBodyDown); + } + function hideMenu() { + $("#menuContent").hide(); + $("body").unbind("mousedown", onBodyDown); + } + function onBodyDown(event) { + if (!(event.target.id == "menuBtn" || event.target.id == "menuContent" || $(event.target).parents("#menuContent").length > 0)) { + hideMenu(); + } + } + diff --git a/contact-center/app/src/main/resources/templates/admin/user/edit.html b/contact-center/app/src/main/resources/templates/admin/user/edit.html deleted file mode 100644 index 32af0222..00000000 --- a/contact-center/app/src/main/resources/templates/admin/user/edit.html +++ /dev/null @@ -1,301 +0,0 @@ -
              -
              - -
              - -
              - -
              -
              用户登录的账号
              -
              -
              - -
              - -
              -
              -
              - -
              - -
              -
              -
              - -
              - -
              -
              - -
              -
              -
              - -
              - -
              -
              -
              - -
              - checked="checked"> -
              -
              管理员具备访问和修改所有系统资源的权限,同时也设定为多媒体坐席
              -
              -
              -
              - -
              - checked> -
              -
              -
              - <#if models?seq_contains("callcenter")> - - - - - - - - - - -
              - -
              - checked> -
              -
              -
              - -
              - -
              -
              - -
              -
              - -
              -
              - -
              -
              -
              -
              - - diff --git a/contact-center/app/src/main/resources/templates/admin/user/edit.pug b/contact-center/app/src/main/resources/templates/admin/user/edit.pug new file mode 100644 index 00000000..16c362dc --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/user/edit.pug @@ -0,0 +1,274 @@ +.uk-layui-form + form.layui-form.uk-form + input(type='hidden', name='id', value=userData.id) + .layui-form-item + label.layui-form-label 用户名: + .layui-input-inline + input.layui-input(type='text', name='username', value=userData.username, required, lay-verify='required_username', placeholder='请输入用户名', autocomplete='off') + .layui-form-mid.layui-word-aux 用户登录的账号 + .layui-form-item + label.layui-form-label 姓名: + .layui-input-inline + input.layui-input(type='text', name='uname', value=userData.uname, required, lay-verify='required_name', placeholder='请输入用户姓名', autocomplete='off') + .layui-form-item + label.layui-form-label 电子邮件: + .layui-input-inline + input.layui-input(type='email', name='email', value=userData.email, placeholder='请输入电子邮件地址', autocomplete='off') + .layui-form-item + label.layui-form-label 密码: + .layui-input-inline + input#password.layui-input(type='password', name='password', placeholder='请输入登录密码', lay-verify='pass', autocomplete='off') + .layui-form-mid.layui-word-aux(style='padding-bottom: 0px') + input#repassword.layui-input(type='password', name='repassword', lay-verify='repass', placeholder='请再次输入密码', autocomplete='off', style='margin-top: 6px;') + .layui-form-item + label.layui-form-label 手机号: + .layui-input-inline + input.layui-input(type='mobile', name='mobile', value=userData.mobile, placeholder='请输入手机号码', autocomplete='off') + .layui-form-item + label.layui-form-label 管理员: + .layui-input-inline + input(type="checkbox" name="admin" lay-skin="switch" value="1" lay-filter="admincheckbox" lay-text="是|否" checked= userData.admin && "checked") + .layui-form-mid.layui-word-aux(style='padding: 0 0; line-height: 20px') 管理员具备访问和修改所有系统资源的权限,同时也设定为多媒体坐席 + .layui-form-item#agentDiv + .layui-form-item + label.layui-form-label 多媒体坐席: + .layui-input-inline + input(type="checkbox" name="agent" lay-skin="switch" value="1" lay-filter="agent" lay-text="开启|关闭" checked=userData && userData.agent == true && "checked") + if models.contains("callcenter") + //
              + // + //
              + // + //
              + //
              + // + //
              + //
              + #callcenter.layui-form-item + label.layui-form-label 呼叫中心坐席: + .layui-input-inline(style="margin-left:0px;") + input(type="checkbox", name="callcenter", lay-skin="switch", lay-filter="callcenter", value="1", lay-text="开启|关闭") + #bindext_tip.layui-form-item + label.layui-form-label 呼叫中心: + .layui-input-inline + select#callcenterhostid(name="pbxhostid", lay-filter="hostid", lay-verify="callcenterhost") + option(value="") 请选择呼叫中心 + #extenttions.layui-form-mid(style="padding-top:5px !important;") + select#callcenterExtid(name="extensionid", lay-verify="callcenterext") + option(value="") 请选择分机 + if userData && userData.callcenter == true && userData.extension + for extension in userData.extension + if userData.extensionId + option( + value=extension.id + selected=userData.extensionId && userData.extensionId == extension.id && "selected" + ) + = extension.extension + else + option(value=extension.id)= extension.extension + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='sys-user-update') 立即提交 +script. + layui.use('form', function () { + var form = layui.form(); + form.render(); //更新全部 + form.verify({ + repass: function (value) { + if (value != $('#password').val()) { + return '两次输入的密码不一致,请确认'; + } + }, + sip: function (value) { + if ($("input[name=callcenter]:checked").length > 0 && value === '') { + return 'SIP地址不能为空,请确认'; + } + }, + required_username: function (value) { + if (value.length > 50) { + return "用用户名不能超过50字"; + } + }, + required_name: function (value) { + if (value.length > 100) { + return "用户姓名不能超过100字"; + } + }, + callcenterhost: function (value) { + if ($("input[name=callcenter]:checked").length > 0 && value === '') { + return '呼叫中心不能为空,请确认'; + } + }, + callcenterext: function (value) { + if ($("input[name=callcenter]:checked").length > 0 && value === '') { + return '分机不能为空,请确认'; + } + } + }); + + // if($("input[name=callcenter]:checked").length < 1){ + // $('#callcenterDiv').hide(); + // $('#sipAccountDiv').hide(); + // } + + // 当账号为管理员类型时,强制设定为坐席! + form.on('switch(admincheckbox)', function (data) { + if (data.elem.checked) { + // 坐席的按钮 + if ($('#agentDiv > div > div > div > em').text() == "关闭") { + // 之前未开启 + document.querySelector('#agentDiv > div > div > div > i').click(); + } + // 设置为禁用 + $("#agentDiv > div > div > input[name=agent]").attr('disabled', 'disabled'); + } else { + // 取消禁用 + $("#agentDiv > div > div > input[name=agent]").removeAttr('disabled'); + } + }); + + form.on('switch(callcenter)', function (data) { + if (data.elem.checked) { + $('#bindext_tip').show(); + restApiRequest({ + silent: true, + path: 'callcenter', + data: { + ops: "my-pbxlist" + } + }).then(function (result) { + if (result.rc == 0) { + if (result.data.length > 0) { + for (var i = 0; i < result.data.length; i++) { + $("#callcenterhostid").append('') + } + ; + form.render("select"); + } + } + }, function (err) { + handleRestApiFail(err); + }); + } else { + $('#bindext_tip').hide(); + } + }); + + form.on('select(hostid)', function (data) { + restApiRequest({ + silent: true, + path: 'callcenter', + data: { + ops: "ext-dd-vacant", + id: data.value + } + }).then(function (result) { + if (result.rc == 0) { + if (result.data.length > 0) { + for (var i = 0; i < result.data.length; i++) { + $("#callcenterExtid").append('') + } + ; + form.render("select"); + } + } + }, function (err) { + handleRestApiFail(err); + }); + }); + + var callcenter = "${userData.callcenter!''}", pbxhostId = "${userData.pbxhostId!''}", + extensionId = "${userData.extensionId!''}"; + if (callcenter == 'true') { + restApiRequest({ + silent: true, + path: 'callcenter', + data: { + ops: "my-pbxlist" + } + }).then(function (result) { + if (result.rc == 0) { + if (result.data.length > 0) { + for (var i = 0; i < result.data.length; i++) { + var Option = $(''); + if (result.data[i].id = pbxhostId) { + $(Option).attr('selected', true) + } + $("#callcenterhostid").append(Option) + } + ; + form.render("select"); + } + } + }, function (err) { + handleRestApiFail(err); + }); + + restApiRequest({ + silent: true, + path: 'callcenter', + data: { + ops: "ext-dd-vacant", + id: pbxhostId + } + }).then(function (result) { + if (result.rc == 0) { + if (result.data.length > 0) { + for (var i = 0; i < result.data.length; i++) { + $("#callcenterExtid").append('') + } + ; + form.render("select"); + } + } + }, function (err) { + handleRestApiFail(err); + }); + } + + // 根据“多媒体坐席”显示“呼叫中心坐席”状态 + // form.on('switch(agent)', function(data){ + // $("input[name=callcenter]").prop("checked", false); + // form.render('checkbox','callcenter'); + // if(data.elem.checked){ + // $('#callcenterDiv').show(); + // }else{ + // $('#callcenterDiv').hide(); + // } + // $('#sipAccount').val(""); + // $('#sipAccountDiv').hide(); + // }); + // + // // 根据“多媒体坐席”显示“呼叫中心坐席”状态 + // form.on('switch(callcenter)', function(data){ + // $('#sipAccount').val(""); + // if(data.elem.checked){ + // $('#sipAccountDiv').show(); + // }else{ + // $('#sipAccountDiv').hide(); + // } + // }); + + // 处理表单提交 + form.on('submit(sys-user-update)', function (data) { + data.field['ops'] = 'update'; + restApiRequest({ + silent: true, + path: 'user', + data: data.field + }).then(function (result) { + if (result.rc == 0) { + processUserAddOrUpdateResult(result.data, function () { + $("span.layui-layer-setwin > a.layui-layer-close1").click(); + // 关闭并刷新页面 + document.getElementById("admin").contentWindow.location = '/admin/user/index.html'; + }); + } + }, function (err) { + handleRestApiFail(err); + }); + return false; + }); + + }); + diff --git a/contact-center/app/src/main/resources/templates/admin/user/index.html b/contact-center/app/src/main/resources/templates/admin/user/index.html deleted file mode 100644 index 0ae66bfd..00000000 --- a/contact-center/app/src/main/resources/templates/admin/user/index.html +++ /dev/null @@ -1,142 +0,0 @@ -
              -
              -

              - 用户列表<#if userList??>(${userList.totalElements!''}) - - - -

              -
              -

              提示:除管理员外,账号必须在【组织结构】中关联一个部门,必须在【系统角色】中关联一个角色,才可以使用资源。设置后,该账号需重新登系统才能生效。

              -
              - - - - - - - - <#if models?seq_contains("callout")> - - - - - - - - - - - - - - - <#if models?seq_contains("callcenter")> - - - - - - - - <#if userList?? && userList.content??> - <#list userList.content as user> - - - - - - - - <#if models?seq_contains("callcenter")> - - - - - - - - -
              用户注册时间姓名电子邮件手机多媒体呼叫中心管理员操作
              - - -
              - ${user.username!''} - <#if user.datastatus == true>(已删除) -
              -
              -
              ${user.createtime!''}${user.uname!''}${user.email!''}${user.mobile!''} - <#if user.agent> - - <#else> - - - - <#if user.callcenter> - - <#else> - - - - <#if user.admin> - - <#else> - - - - - - 编辑 - - <#if !(user.admin) && user.datastatus != true > - - - 删除 - - -
              -
              -
              -
              -
              -
              -
              -
              - diff --git a/contact-center/app/src/main/resources/templates/admin/user/index.pug b/contact-center/app/src/main/resources/templates/admin/user/index.pug new file mode 100644 index 00000000..1ce7817a --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/user/index.pug @@ -0,0 +1,118 @@ +extends /admin/include/layout.pug + +block content + .row + .col-lg-12 + h1.site-h1(style='background-color:#FFFFFF;') + | 用户列表 (#{userList.totalElements?userList.totalElements:0}) + span(style='float:right') + button.layui-btn.layui-btn-small.green(href='/admin/user/add.html', data-toggle='ajax', data-width='750', data-height='540', data-title='创建新用户') + | 创建新用户 + .row(style='padding:5px;') + blockquote.layui-elem-quote.layui-quote-nm + i.layui-icon(style="color:gray")  + font(color="#999").layui-word-aux 除管理员外,账号必须在【组织结构】中关联一个部门,必须在【系统角色】中关联一个角色,才可以使用资源。设置后,该账号需重新登系统才能生效。 + .col-lg-12 + table.layui-table(lay-skin='line', style='table-layout: fixed;word-break: break-all') + colgroup + col + col + col + col + col + if models.contains("callout") + col + col + col + col + thead + tr + th(width='18%') 用户 + th(width='10%') 注册时间 + th(width='15%') 姓名 + th(width='12%') 电子邮件 + th(width='12%') 手机 + th(width='50px') 多媒体 + if models.contains("callcenter") + th(width="60px") 呼叫中心 + th(width='50px') 管理员 + th(style='white-space:nowrap;width: 110px', nowrap) 操作 + tbody + if size(userList.content) > 0 + for user in userList.content + tr + td + a(href='javascript:void(0)') + i.layui-icon.headimg(style='margin-right: 10px')  + div(title=user.username, style="margin-top:10px;width: 90px;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;") + = user.username + if user.datastatus == true + i(style="color:red") (已删除) + td + | #{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', user.createtime)} + td(title=user.uname, style="text-overflow: ellipsis;white-space: nowrap;overflow: hidden;")=user.uname + td= user.email + td= user.mobile + td + if user.agent + i.layui-icon(style="color:#19a55d")  + else + i.layui-icon(style="color:#19a55d") ဆ + if models.contains("callcenter") + td + if user.callcenter + i.layui-icon(style="color:#19a55d")  + else + i.layui-icon(style="color:#19a55d") ဆ + td + if user.admin + i.layui-icon(style="color:#19a55d")  + else + i.layui-icon(style="color:#19a55d") ဆ + td(style="white-space:nowrap;" nowrap="nowrap") + a(href='/admin/user/edit.html?id=' + user.id, data-toggle="ajax" data-width="750" data-height="540" data-title="编辑用户信息") + i.layui-icon  + | 编辑 + if !user.admin && user.datastatus != true + a(href='/admin/user/delete.html?id=' + user.id, style="margin-left:10px;" data-toggle="tip" data-title="请确认是否删除记录?") + i.layui-icon(style="color:red") ဆ + | 删除 + .row(style='padding:5px;') + .col-lg-12#page(style='text-align:center;') + + script(language="javascript"). + layui.use('layer', function(){ + var layer = layui.layer; + var msg = '#{msg}'; + if(msg == 'username_exist') + layer.msg('用户名存在,请重新填写',{icon: 2, time: 3000}) + else if(msg == 'email_exist') + layer.msg('邮件存在,请重新填写',{icon: 2, time: 3000}) + else if (msg == 'mobile_exist') + layer.msg('手机存在,请重新填写', {icon: 2, time: 3000}) + else if (msg == 'sip_account_exist') + layer.msg('SIP地址已经存在,请重新填写', {icon: 2, time: 3000}) + else if (msg == 't1') + layer.msg('当前用户坐席就绪或对话未结束,不能切换为非坐席', {icon: 2, time: 3000}) + else if (msg == 'new_user_success') + layer.msg('新用户创建成功',{icon: 1, time: 1000}) + else if (msg == 'edit_user_success') + layer.msg('用户编辑成功', {icon: 1, time: 1000}) + }); + layui.use(['laypage', 'layer'], function(){ + var laypage = layui.laypage + ,layer = layui.layer; + + laypage({ + cont: 'page' + ,pages: #{userList.totalPages? userList.totalPages:0} //总页数 + ,curr: #{userList.number? userList.number+1:0} + ,groups: 5 //连续显示分页数 + ,jump:function(data , first){ + if(!first){ + location.href = "/admin/user/index.html?p="+data.curr ; + } + } + }); + }); + diff --git a/contact-center/app/src/main/resources/templates/admin/webim/head.pug b/contact-center/app/src/main/resources/templates/admin/webim/head.pug new file mode 100644 index 00000000..b1bf5d2a --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/webim/head.pug @@ -0,0 +1,21 @@ +.row(style="border-bottom: 10px solid #EFEFEF;padding:10px;") + .col-lg-8 + .ukefu-measure + .ukefu-bt + .layui-icon.ukewo-btn.ukefu-content-ind + img(src="/images/webim.png", style="width:60px;height:60px;") + .ukefu-bt-text + .ukefu-bt-text-title(style="font-weight:400;font-size:24px;border-bottom:1px solid #dedede;") + | #{snsAccount.name} + span(style="font-size:15px;color:#AAAAAA;") 接入网站创建时间:#{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', snsAccount.createtime)} + .ukefu-bt-text-content(style="")= snsAccount.name +.ukefu-tab-title(style="margin-left: 0px;") + ul.tab-title + .ukefu-tab-title(style="margin-left: 0px;") + ul.tab-title + li(class={'layui-this': subtype == 'webim'}) + a(href="/admin/webim/index.html?snsid=" + snsAccount.snsid) 基本设置 + li(class={'layui-this': subtype == 'invote'}) + a(href="/admin/webim/invote.html?snsid=" + snsAccount.snsid) 邀请设置 + li(class={'layui-this': subtype == 'profile'}) + a(href="/admin/webim/profile.html?snsid=" + snsAccount.snsid) 客服信息 \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/admin/webim/hidden.pug b/contact-center/app/src/main/resources/templates/admin/webim/hidden.pug new file mode 100644 index 00000000..ff4828de --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/webim/hidden.pug @@ -0,0 +1,14 @@ +if inviteData + input(type="hidden", name="id", value=inviteData.id) + input(type="hidden", name="snsaccountid", value=inviteData.snsaccountid) + if inviteData.ai + input(type="hidden", name="ai", value=inviteData.ai ? 'true' : 'false') + else + input(type="hidden", name="ai", value="false") + if inviteData.aifirst + input(type="hidden", name="aifirst", value=inviteData.aifirst ? 'true' : 'false') + else + input(type="hidden", name="aifirst", value="false") + input(type="hidden", name="aisuccesstip", value=inviteData.aisuccesstip) + input(type="hidden", name="ainame", value=inviteData.ainame) + input(type="hidden", name="aiid", value=inviteData.aiid) \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/admin/webim/index.html b/contact-center/app/src/main/resources/templates/admin/webim/index.html deleted file mode 100644 index 167e5190..00000000 --- a/contact-center/app/src/main/resources/templates/admin/webim/index.html +++ /dev/null @@ -1,501 +0,0 @@ -
              -
              -
              -
              -
              -
              -
              - ${snsAccount.name!''} - 接入网站创建时间:${snsAccount.createtime!?string("yyyy-MM-dd HH:mm:ss")} -
              -
              ${snsAccount.name!''}
              -
              -
              -
              -
              -
              - -
              - -
              -
              -
              -
              -
              - <#if inviteData??> - - - <#if inviteData.ai??> - - <#else> - - - <#if inviteData.aifirst??> - - <#else> - - - - - - -
              -
              -
              -
              -
              -

              接入代码

              -
              -
              -
              请将以下代码添加到你的网站 HTML - 源代码中,放在<head></head>标签之间.
              - - -
              -
              -
              -
              -

              文字链代码

              -
              -
              -
              -
                -
              • 文字链代码
              • - <#if skillGroups?? && inviteData?? && inviteData.skill == true && inviteData.consult_skill_fixed == false> - <#list skillGroups as skill> -
              • ${skill.name!''}
              • - - -
              -
              -
              -
              请将以下代码添加到你的网站 链接代码上,可以自由定义链接的内容形式
              - -
              - <#if skillGroups?? && inviteData?? && inviteData.skill == true && inviteData.consult_skill_fixed == false> - <#list skillGroups as skill> -
              -
              技能组“${skill.name!''}”文字连接,你可以复制此链接,并可以自由定义链接的内容形式
              -
              -
              -
                -
              • ${skill.name!''}
              • - <#if agentList?? > - <#list agentList as agent> - <#if agent.organ?? && agent.organ == skill.id> -
              • ${agent.username!''}
              • - - - -
              -
              -
              - -
              - <#if agentList?? > - <#list agentList as agent> - <#if agent.organ?? && agent.organ == skill.id> -
              - -
              - - - -
              -
              -
              - -
              - - -
              -
              -
              -
              -
              -
              -

              访客对话入口样式

              -
              -
              -
              -
              -
              1、访客入口样式
              -
              - -
              -
              -
              -
              在线客服 -
              -
              -
              - -
              -
              -
              -
              -
              -
              在线客服 -
              -
              -
              - -
              -
              -
              -
              -
              -
              在线客服 -
              -
              -
              - -
              -
              -
              -
              -
              -
              无 -
              -
              -
              - -
              -
              -
              -
              2、选择入口颜色
              -
              - -
              -
              - -
              -
              - -
              -
              - -
              -
              - -
              -
              - -
              -
              - -
              -
              -
              -
              3、选择入口按钮位置
              -
              - - -
              -
              -
              4、入口按钮文本
              -
              -
              -
              -

              用户访问接入网站的时候提示用户操作的文本内容

              -

              默认提示文本是:在线客服

              -
              -
              - -
              -
              -
              -
              -
              - -
              5、延时显示
              -
              -
              -
              -

              用户访问接入网站的时候提示用户的按钮弹出延时时间

              -

              如果不设置延时时间,则页面载入即显示入口按钮

              -
              -
              - -
              -
              -
              -
              -
              -
              -
              - <#if inviteData?? && inviteData.consult_vsitorbtn_position?? && inviteData.consult_vsitorbtn_position == 'left,top'> - <#assign position = "left:10px;top:10px;"> - <#elseif inviteData?? && inviteData.consult_vsitorbtn_position?? && inviteData.consult_vsitorbtn_position == 'left,middle'> - <#assign position = "left:10px;top:80px;"> - <#elseif inviteData?? && inviteData.consult_vsitorbtn_position?? && inviteData.consult_vsitorbtn_position == 'left,bottom'> - <#assign position = "left:10px;bottom:10px;"> - <#elseif inviteData?? && inviteData.consult_vsitorbtn_position?? && inviteData.consult_vsitorbtn_position == 'right,top'> - <#assign position = "right:10px;top:10px;"> - <#elseif inviteData?? && inviteData.consult_vsitorbtn_position?? && inviteData.consult_vsitorbtn_position == 'right,middle'> - <#assign position = "right:10px;top:80px;"> - <#elseif inviteData?? && inviteData.consult_vsitorbtn_position?? && inviteData.consult_vsitorbtn_position == 'right,bottom'> - <#assign position = "right:10px;bottom:10px;"> - - style="width: 227px;height: 200px;border-radius: 2px;padding: 70px 20px;"> -
              - -
              -
              <#if inviteData??>${(inviteData.consult_vsitorbtn_content!'在线客服')?no_esc}<#else>在线客服 -
              -
              -
              -
              -
              -
              - -
              -
              -
              -

              对话框样式

              -
              -
              -
              -
              -
              1、选择对话框颜色
              -
              -
              - -
              - -
              -
              - -
              -
              - -
              -
              - -
              -
              - -
              -
              - -
              -
              -
              -
              2、自定义LOGO (建议尺寸:220*60)
              -
              - -
              - - 上传图片 -
              -
              - - -
              -
              - -
              3、自定义客服图标 (建议尺寸:80*80)
              -
              - -
              - - 上传图片 -
              -
              - - -
              -
              -
              -
              -
              -
              -
              - - - - -
              -
              -
              -
              - -
              - -
              -
              -
              - -
              -
              - -
              - -
              -
              - -
              - -
              - -
              -
              - 发送 -
              - -
              -
              -
              -
              -
              - -
              -
              -
              -
              -
              -
              -
              -
              -
              - - -
              -
              -
              -
              -
              -
              -
              -
              - - - diff --git a/contact-center/app/src/main/resources/templates/admin/webim/index.pug b/contact-center/app/src/main/resources/templates/admin/webim/index.pug new file mode 100644 index 00000000..a8fefba4 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/webim/index.pug @@ -0,0 +1,332 @@ +extends /admin/include/layout.pug + +block content + include head + + .layui-tab + .layui-tab-content + .layui-tab-item.layui-show + form.layui-form(method="post", key="set-mine", enctype="multipart/form-data", action="/admin/webim/save.html") + include hidden + .row + .col-lg-12 + .ukefu-customer-div.setting-wrapper + .box.default-box + .box-header + h3.box-title 接入代码 + .box-body + .ukefu-webim-tip= '请将以下代码添加到你的网站 HTML源代码中,放在标签之间.' + textarea.ukefu-webim-sdk(readonly="readonly") + if inviteData + | + .box.default-box + .box-header + h3.box-title 文字链代码 + .box-body(style="padding-top:5px;") + .layui-tab.layui-tab-card + ul.layui-tab-title + li.layui-this 文字链代码 + .layui-tab-content + .layui-tab-item.layui-show + .ukefu-webim-tip 请将以下代码添加到你的网站 链接代码上,可以自由定义链接的内容形式 + textarea.ukefu-webim-sdk(readonly="readonly") + if inviteData + | #{schema}://#{hostname}:#{port}/im/text/#{inviteData.snsaccountid}.html + if inviteData.skill == true && inviteData.consult_skill_fixed == false + for skill in skillGroups + .layui-tab-item + .ukefu-webim-tip 技能组“#{skill.name}”文字连接,你可以复制此链接,并可以自由定义链接的内容形式 + .ukefu-webim-tip + .layui-tab.layui-tab-brief(lay-filter="docDemoTabBrief") + ul.layui-tab-title + li.layui-this #{skill.name} + for agent in agentList + if agent.organ == skill.id + li(title=agent.name)= agent.username + .layui-tab-content + .layui-tab-item.layui-show + textarea.ukefu-webim-sdk(readonly="readonly") + if inviteData + | #{schema}://#{hostname}:#{port}/im/text/#{inviteData.snsaccountid}.html?skill=#{skill.id} + for agent in agentList + if agent.organ == skill.id + .layui-tab-item + textarea.ukefu-webim-sdk(readonly="readonly") + | #{schema}://#{hostname}:#{port}/im/text/#{inviteData.snsaccountid}.html?skill=#{skill.id}&agent=#{agent.id} + + .box.default-box + .box-header + h3.box-title 访客对话入口样式 + .box-body.ukefu-im-theme + .row(style="margin-right:0px;") + .col-md-8 + .ukefu-webim-tl 1、访客入口样式 + .box-item + input#consult_vsitorbtn_model(type="hidden", name="consult_vsitorbtn_model", value=(inviteData.consult_vsitorbtn_model ? inviteData.consult_vsitorbtn_model : 1)) + .ukefu-im-point(class={'ukefu-point-checked': !inviteData.consult_vsitorbtn_model || inviteData.consult_vsitorbtn_model == '1'}, data-class="ukefu-point-theme1", data-value="1") + .ukefu-point-theme1(style="text-align:center;") + .ukefu-im-point-text + i.layui-icon  + br + | 在线客服 + .ok + i.layui-icon  + .ukefu-im-point(class={'ukefu-point-checked': inviteData.consult_vsitorbtn_model == '2'}, data-class="ukefu-point-theme2", data-value="2") + .ukefu-point-theme2 + .ukefu-im-point-text + i.layui-icon  + br + | 在线客服 + .ok + i.layui-icon  + .ukefu-im-point(class={'ukefu-point-checked': inviteData.consult_vsitorbtn_model == '3'}, data-class="ukefu-point-theme3", data-value="3") + .ukefu-point-theme3 + .ukefu-im-point-text + i.layui-icon  + br + | 在线客服 + .ok + i.layui-icon  + .ukefu-im-point(class={'ukefu-point-checked': inviteData.consult_vsitorbtn_model == '9'}, data-class="ukefu-point-theme9", data-value="9") + .ukefu-point-theme9 + .ukefu-im-point-text + br + | 无 + .ok + i.layui-icon  + .ukefu-webim-tl(style="clear:both;") 2、选择入口颜色 + .box-item + input#consult_vsitorbtn_color(type="hidden", name="consult_vsitorbtn_color", value=(inviteData.consult_vsitorbtn_color ? inviteData.consult_vsitorbtn_color : 1)) + .item-cnt.ukefu-im-ping-color(style="display: block;") + .ukefu-im-item.theme1(class={'ukefu-im-checked': !inviteData.consult_vsitorbtn_color || inviteData.consult_vsitorbtn_color == '1'} , data-class="theme1", data-value="1") + i.layui-icon.ukefu-im-check  + .ukefu-im-item.theme2(class={'ukefu-im-checked': inviteData.consult_vsitorbtn_color == '2'}, data-class="theme2", data-value="2") + i.layui-icon.ukefu-im-check  + .ukefu-im-item.theme3(class={'ukefu-im-checked': inviteData.consult_vsitorbtn_color == '3'}, data-class="theme3", data-value="3") + i.layui-icon.ukefu-im-check  + .ukefu-im-item.theme4(class={'ukefu-im-checked': inviteData.consult_vsitorbtn_color == '4'}, data-class="theme4", data-value="4") + i.layui-icon.ukefu-im-check  + .ukefu-im-item.theme5(class={'ukefu-im-checked': inviteData.consult_vsitorbtn_color == '5'}, data-class="theme5", data-value="5") + i.layui-icon.ukefu-im-check  + .ukefu-im-item.theme6(class={'ukefu-im-checked': inviteData.consult_vsitorbtn_color == '6'}, data-class="theme6", data-value="6") + i.layui-icon.ukefu-im-check  + .ukefu-webim-tl(style="clear:both;") 3、选择入口按钮位置 + .box-item + input#consult_vsitorbtn_position(type="hidden", name="consult_vsitorbtn_position", value=(consult_vsitorbtn_position ? consult_vsitorbtn_position : 'right,middle')) + .item-cnt.ukefu-im-position(style="display: block;") + a(href="javascript:void(0)", onclick="$('#ukefu-point-theme').attr('style' , 'left:10px;top:10px;position: absolute;margin-top:0px;');$('.ukefu-pos').removeClass('ukefu-pos-checked');$(this).children().first().addClass('ukefu-pos-checked');$('#consult_vsitorbtn_position').val('left,top');") + .ukefu-pos(class={'ukefu-pos-checked': inviteData.consult_vsitorbtn_position == 'left,top'}, style="left:-40px;top:0px;") 左上 + a(href="javascript:void(0)", onclick="$('#ukefu-point-theme').attr('style' , 'left:10px;top:70px;position: absolute;margin-top:0px;');$('.ukefu-pos').removeClass('ukefu-pos-checked');$(this).children().first().addClass('ukefu-pos-checked');$('#consult_vsitorbtn_position').val('left,middle');") + .ukefu-pos(class={'ukefu-pos-checked': inviteData.consult_vsitorbtn_position == 'left,middle'}, style="left:-40px;top:70px;") 左中 + a(href="javascript:void(0)", onclick="$('#ukefu-point-theme').attr('style' , 'left:10px;bottom:10px;position: absolute;margin-top:0px;');$('.ukefu-pos').removeClass('ukefu-pos-checked');$(this).children().first().addClass('ukefu-pos-checked');$('#consult_vsitorbtn_position').val('left,bottom');") + .ukefu-pos(class={'ukefu-pos-checked': inviteData.consult_vsitorbtn_position == 'left,bottom'}, style="left:-40px;bottom:0px;") 左下 + a(href="javascript:void(0)", onclick="$('#ukefu-point-theme').attr('style' , 'right:10px;top:10px;position: absolute;margin-top:0px;');$('.ukefu-pos').removeClass('ukefu-pos-checked');$(this).children().first().addClass('ukefu-pos-checked');$('#consult_vsitorbtn_position').val('right,top');") + .ukefu-pos(class={'ukefu-pos-checked': inviteData.consult_vsitorbtn_position == 'right,top'}, style="right:-40px;top:0px;") 右上 + a(href="javascript:void(0)", onclick="$('#ukefu-point-theme').attr('style' , 'right:10px;top:70px;position: absolute;margin-top:0px;');$('.ukefu-pos').removeClass('ukefu-pos-checked');$(this).children().first().addClass('ukefu-pos-checked');$('#consult_vsitorbtn_position').val('right,middle');") + .ukefu-pos(class={'ukefu-pos-checked': !inviteData.consult_vsitorbtn_position || inviteData.consult_vsitorbtn_position == 'right,middle'}, style="right:-40px;top:70px;") 右中 + a(href="javascript:void(0)", onclick="$('#ukefu-point-theme').attr('style' , 'right:10px;bottom:10px;position: absolute;margin-top:0px;');$('.ukefu-pos').removeClass('ukefu-pos-checked');$(this).children().first().addClass('ukefu-pos-checked');$('#consult_vsitorbtn_position').val('right,bottom');") + .ukefu-pos(class={'ukefu-pos-checked': inviteData.consult_vsitorbtn_position == 'right,bottom'}, style="right:-40px;bottom:0px;") 右下 + .ukefu-webim-prop + .ukefu-webim-tl(style="clear:both;") 4、入口按钮文本 + .box-item + .row + .col-lg-8 + p 用户访问接入网站的时候提示用户操作的文本内容 + p(style="color:#888888;font-size:13px;margin-top:10px;") 默认提示文本是:在线客服 + .col-lg-4 + input#consult_vsitorbtn_content.layui-input(type="text", name="consult_vsitorbtn_content", value=(inviteData.consult_vsitorbtn_content ? inviteData.consult_vsitorbtn_content : '在线客服'), autocomplete="off", onkeyup="$('#consult_content').text($(this).val())", onchange="$('#consult_content').text($(this).val())") + .ukefu-webim-prop + .ukefu-webim-tl(style="clear:both;") 5、延时显示 + .box-item + .row + .col-lg-8 + p 用户访问接入网站的时候提示用户的按钮弹出延时时间 + p(style="color:#888888;font-size:13px;margin-top:10px;") 如果不设置延时时间,则页面载入即显示入口按钮 + .col-lg-4 + select(name="consult_vsitorbtn_display") + option(value="0", selected=(!inviteData.consult_vsitorbtn_display || inviteData.consult_vsitorbtn_display == 0)) 无延时 + for i in [1,2,3,4,5,10] + option(value=i * 1000, selected=inviteData.consult_vsitorbtn_display == i * 1000) #{i}秒 + .col-md-4(style="padding-top:50px;") + #ukefu-point.ukefu-im-point(style="width: 227px;height: 200px;border-radius: 2px;padding: 70px 20px;") + - + var position = "right:10px;top:80px;"; + if (inviteData.consult_vsitorbtn_position == 'left,top') + position = "left:10px;top:10px;" + else if (inviteData.consult_vsitorbtn_position == 'left,middle') + position = "left:10px;top:80px;" + else if (inviteData.consult_vsitorbtn_position == 'left,bottom') + position = "left:10px;bottom:10px;" + else if (inviteData.consult_vsitorbtn_position == 'left,top') + position = "left:10px;top:10px;" + else if (inviteData.consult_vsitorbtn_position == 'right,top') + position = "right:10px;top:10px;" + else if (inviteData.consult_vsitorbtn_position == 'right,middle') + position = "right:10px;top:80px;" + else if (inviteData.consult_vsitorbtn_position == 'right,bottom') + position = "right:10px;bottom:10px;" + + #ukefu-point-theme.ukefu-theme-color(class="ukefu-point-theme" + (inviteData.consult_vsitorbtn_model ? inviteData.consult_vsitorbtn_model : '1') + " theme" + (inviteData.consult_vsitorbtn_color ? inviteData.consult_vsitorbtn_color : '1'), style="text-align:center;position: absolute;" + position) + .ukefu-im-point-text + i.layui-icon.chat-icon  + br + span#consult_content= (inviteData.consult_vsitorbtn_content ? inviteData.consult_vsitorbtn_content : '在线客服') + .box.default-box + .box-header + h3.box-title 对话框样式 + .box-body.ukefu-im-theme + .row(style="margin-right:0px;") + .col-md-8 + .ukefu-webim-tl 1、选择对话框颜色 + .box-item + .item-cnt.ukefu-im-dialog(style="display: block;") + input#consult_dialog_color(type="hidden", name="consult_dialog_color", value=(inviteData.consult_dialog_color ? inviteData.consult_dialog_color : '1')) + .ukefu-im-item.theme1(class={'ukefu-im-checked': !inviteData.consult_dialog_color || inviteData.consult_dialog_color == '1'}, data-class="theme1", data-value="1") + i.layui-icon.ukefu-im-check  + .ukefu-im-item.theme2(class={'ukefu-im-checked': inviteData.consult_dialog_color == '2'}, data-class="theme2", data-value="2") + i.layui-icon.ukefu-im-check  + .ukefu-im-item.theme3(class={'ukefu-im-checked': inviteData.consult_dialog_color == '3'}, data-class="theme3", data-value="3") + i.layui-icon.ukefu-im-check  + .ukefu-im-item.theme4(class={'ukefu-im-checked': inviteData.consult_dialog_color == '4'}, data-class="theme4", data-value="4") + i.layui-icon.ukefu-im-check  + .ukefu-im-item.theme5(class={'ukefu-im-checked': inviteData.consult_dialog_color == '5'}, data-class="theme5", data-value="5") + i.layui-icon.ukefu-im-check  + .ukefu-im-item.theme6(class={'ukefu-im-checked': inviteData.consult_dialog_color == '6'}, data-class="theme6", data-value="6") + i.layui-icon.ukefu-im-check  + .ukefu-webim-tl 2、自定义LOGO (建议尺寸:220*60) + .box-item(style="position: relative;padding-bottom: 40px") + - var dialog_logo=inviteData.consult_dialog_logo ? ('/res/image.html?id=' + inviteData.consult_dialog_logo) : '/images/logo2.png'; + span.ukefu-logo + img#webim_show(src=dialog_logo, style="height:40px;") + .layui-box.layui-upload-button(style="position:absolute;left: 300px;") + input#webimlogo.layui-upload-file(type="file", name="webimlogo", accept="image/gif, image/jpeg, image/png", lay-ext="jpg|png|gif", onchange="$('#logo_img').html($(this).val()); $('.webim_close').show();") + span.layui-upload-icon + i.layui-icon  + | 上传图片 + div(style="margin-top: 20px;position: relative") + span#logo_img(style="float: left") + i.layui-icon.webim_close(style="display: none;float: left;margin-top: -5px;cursor:pointer;", onclick=" $('#logo_img').html(''); $('#webim_show').attr('src','" + dialog_logo + "'); $('.webim_close').hide() ;clearWebimlogs()") ဆ + .ukefu-webim-tl 3、自定义客服图标 (建议尺寸:80*80) + .box-item(style="position: relative;padding-bottom: 40px") + - var dialog_headimg = inviteData.consult_dialog_headimg?('/res/image.html?id='+inviteData.consult_dialog_headimg):'/images/agent.png'; + span.ukefu-logo + img#agent_show(src=dialog_headimg, style="height:40px;") + .layui-box.layui-upload-button(style="position:absolute;left: 300px;") + input#agentheadimg.layui-upload-file(type="file", name="agentheadimg", accept="image/gif, image/jpeg, image/png", lay-ext="jpg|png|gif", onchange="$('#agent_img').html($(this).val()); $('.agent_close').show()") + span.layui-upload-icon + i.layui-icon  + | 上传图片 + div(style="margin-top: 20px;position: relative;") + span#agent_img(style="float: left") + i.layui-icon.agent_close(style="display: none;float: left;margin-top: -5px;cursor:pointer;", onclick=" $('#agent_img').html('');$('#agent_show').attr('src','" + dialog_headimg + "');clearAgentheadimg(); $('.agent_close').hide()") ဆ + .col-md-4 + #pv.ukefu-im-preview.ukefu-im-preview-dialog + .ukefu-im-preview-wrap(style="border:1px solid #EAEAEA") + - var color_theme="theme" + (inviteData.consult_dialog_color ? inviteData.consult_dialog_color : '1'); + .ukefu-im-preview-bar.ukefu-theme-color(class=color_theme, style="padding:5px;") + img(src=dialog_logo, style="height:22px;float:left;") + span(style="float:right;") + i.layui-icon(style="font-size:12px;color:#ffffff;") ဆ + .ukefu-im-preview-tip + .ukefu-im-preview-tip(style="width:70%;height:5px;") + .ukefu-im-preview-customer + i.layui-icon(style="color:#377FED;float:left;")  + .ukefu-im-preview-customer-message.ukefu-im-preview-customer-arrow + .ukefu-im-preview-user + img(src=dialog_headimg, style="height:20px;float:right;") + .ukefu-im-preview-user-message.ukefu-im-preview-user-arrow.ukefu-theme-color(class=color_theme, style="width:150px;") + .ukefu-im-preview-user(style="height:60px;") + img(src=dialog_headimg, style="height:20px;float:right;") + .ukefu-im-preview-user-message.ukefu-im-preview-user-arrow.ukefu-theme-color(class=color_theme, style="width:100px;height:50px;") + .ukefu-im-preview-hr + .ukefu-im-preview-submit + i.fa.fa-image(style="color:#dddddd;float:left;") + .ukefu-im-preview-submit + a.ukefu-im-theme-submit-btn.ukefu-theme-color(class=color_theme) 发送 + .row + .col-lg-3 + .col-lg-9 + .layui-form-item + .layui-input-block + button.layui-btn(lay-submit="", lay-filter="formDemo") 保存 + button.layui-btn.layui-btn-original(type="reset") 重置 + + + script(language="javascript"). + function clearWebimlogs() { + webimlogo.outerHTML = webimlogo.outerHTML; + } + function clearAgentheadimg() { + agentheadimg.outerHTML = agentheadimg.outerHTML; + } + layui.use('upload', function () { + var target = $(this).attr("data-target"); + }); + layui.use('form', function () { + var form = layui.form(); + form.render('select'); //刷新select选择框渲染 + }); + layui.use('element', function () { + var element = layui.element(); + }); + $(document) + .ready( + function () { + $('.ukefu-im-dialog .ukefu-im-item') + .click( + function () { + var theme = $(this).attr( + 'data-class'); + $('#pv .ukefu-theme-color') + .each( + function () { + $(this) + .removeClass( + "theme1 theme2 theme3 theme4 theme5 theme6") + .addClass( + theme); + }); + $('.ukefu-im-dialog .ukefu-im-item') + .removeClass( + 'ukefu-im-checked'); + $(this).addClass('ukefu-im-checked'); + $('#consult_dialog_color').val($(this).attr('data-value')); + }); + $('.ukefu-im-ping-color .ukefu-im-item') + .click( + function () { + var theme = $(this).attr( + 'data-class'); + $('#ukefu-point .ukefu-theme-color') + .each( + function () { + $(this) + .removeClass( + "theme1 theme2 theme3 theme4 theme5 theme6") + .addClass( + theme); + }); + $('.ukefu-im-ping-color .ukefu-im-item') + .removeClass( + 'ukefu-im-checked'); + $(this).addClass('ukefu-im-checked'); + $('#consult_vsitorbtn_color').val($(this).attr('data-value')); + }); + $('.ukefu-im-point') + .click( + function () { + $("#ukefu-point-theme") + .removeClass( + "ukefu-point-theme1 ukefu-point-theme2 ukefu-point-theme3 ukefu-point-theme9") + .addClass( + $(this) + .attr( + 'data-class')); + $('.ukefu-im-point').removeClass( + "ukefu-point-checked"); + $(this) + .addClass( + "ukefu-point-checked"); + $('#consult_vsitorbtn_model').val($(this).attr('data-value')); + }); + }); diff --git a/contact-center/app/src/main/resources/templates/admin/webim/invote.html b/contact-center/app/src/main/resources/templates/admin/webim/invote.html deleted file mode 100644 index 6e0fef39..00000000 --- a/contact-center/app/src/main/resources/templates/admin/webim/invote.html +++ /dev/null @@ -1,264 +0,0 @@ -
              -
              -
              -
              -
              -
              -
              - ${snsAccount.name!''} - 接入网站创建时间:${snsAccount.createtime!?string("yyyy-MM-dd HH:mm:ss")} -
              -
              ${snsAccount.name!''}
              -
              -
              -
              -
              -
              - -
              - -
              -
              -
              -
              -
              - <#if inviteData??> - - - <#if inviteData.ai??> - - <#else> - - - <#if inviteData.aifirst??> - - <#else> - - - - - - -
              -
              -
              -
              -
              -

              邀请框设置

              -
              -
              -
              -
              -
              -
              1、启用访客邀请功能
              -
              -
              -
              -

              访客自动弹出邀请框,可以设置邀请文字和邀请按钮

              -

              默认启用访客邀请功能

              -
              -
              - checked="checked"> -
              -
              -
              -
              -
              -
              2、邀请提示文字
              -
              -
              -
              - -
              -
              -
              -
              -
              -
              3、选择邀请框背景
              -
              - -
              -
              - -
              -
              - -
              -
              - -
              -
              - -
              -
              - -
              -
              - -
              -
              -
              -
              - -
              -
              4、显示“现在咨询”按钮
              -
              -
              -
              -

              启用访客邀请功能,在弹出的邀请框里显示“接受邀请”的按钮

              -

              默认提示文本是:现在咨询

              -
              -
              - -
              -
              -
              -
              - -
              -
              5、显示“稍后咨询”按钮
              -
              -
              -
              -

              启用访客邀请功能,在弹出的邀请框里显示“稍后咨询”的按钮”

              -

              默认提示文本是:稍后咨询

              -
              -
              - -
              -
              -
              -
              - -
              -
              6、延时弹出邀请框
              -
              -
              -
              -

              延时弹出访客邀请框

              -

              默认延时:5秒

              -
              -
              - -
              -
              -
              -
              - -
              -
              7、自定义访客邀请框背景图片 (建议尺寸:273*230)
              -
              - -
              - - 上传图片 -
              - -
              - - -
              - -
              -
              - - -
              -
              -
              -
              - - - -
              - ${inviteData.consult_invite_content!''} -
              -
              - - -
              - -
              -
              -
              -
              -
              -
              - -
              -
              -
              -
              -
              -
              -
              -
              - - -
              -
              -
              -
              -
              -
              -
              -
              - - - diff --git a/contact-center/app/src/main/resources/templates/admin/webim/invote.pug b/contact-center/app/src/main/resources/templates/admin/webim/invote.pug new file mode 100644 index 00000000..f08eca01 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/webim/invote.pug @@ -0,0 +1,147 @@ +extends /admin/include/layout.pug + +block content + include head + .layui-tab + .layui-tab-content + .layui-tab-item.layui-show + form.layui-form(method="post", key="set-mine", enctype="multipart/form-data", action="/admin/webim/invote/save.html") + include hidden + .row + .col-lg-12 + .ukefu-customer-div.setting-wrapper + .box.default-box + .box-header + h3.box-title 邀请框设置 + .box-body.ukefu-im-theme + .row + .col-lg-7 + .ukefu-webim-prop + .ukefu-webim-tl(style="clear:both;") 1、启用访客邀请功能 + .box-item + .row + .col-lg-8 + p 访客自动弹出邀请框,可以设置邀请文字和邀请按钮 + p(style="color:#888888;font-size:13px;margin-top:10px;") 默认启用访客邀请功能 + .col-lg-4(style="text-align:right;") + input(type="checkbox", title="启用", name="consult_invite_enable", value="1", checked=invitedata.consult_invite_enable) + + .ukefu-webim-prop + .ukefu-webim-tl(style="clear:both;") 2、邀请提示文字 + .box-item + .row + .col-lg-12 + textarea.layui-input(name="consult_invite_content", autocomplete="off", onkeyup="$('#ukefu-cousult-invite-content').text($(this).val())", resize="false", style="height:90px;line-height:22px;resize: none;")= inviteData.consult_invite_content ? inviteData.consult_invite_content : '欢迎来到本网站,请问有什么可以帮您?' + .ukefu-webim-prop + .ukefu-webim-tl(style="clear:both;") 3、选择邀请框背景 + .box-item + input#consult_invite_color(type="hidden", name="consult_invite_color", value=(inviteData.consult_invite_color ? inviteData.consult_invite_color : 1)) + .item-cnt.ukefu-im-ping-color(style="display: block;") + .ukefu-im-item.theme1(class={'ukefu-im-checked': !inviteData.consult_invite_color || inviteData.consult_invite_color == '1'}, data-class="theme1", data-value="1") + i.layui-icon.ukefu-im-check  + .ukefu-im-item.theme2(class={'ukefu-im-checked': inviteData.consult_invite_color == '2'}, data-class="theme2", data-value="2") + i.layui-icon.ukefu-im-check  + .ukefu-im-item.theme3(class={'ukefu-im-checked': inviteData.consult_invite_color == '3'}, data-class="theme3", data-value="3") + i.layui-icon.ukefu-im-check  + .ukefu-im-item.theme4(class={'ukefu-im-checked': inviteData.consult_invite_color == '4'}, data-class="theme4", data-value="4") + i.layui-icon.ukefu-im-check  + .ukefu-im-item.theme5(class={'ukefu-im-checked': inviteData.consult_invite_color == '5'}, data-class="theme5", data-value="5") + i.layui-icon.ukefu-im-check  + .ukefu-im-item.theme6(class={'ukefu-im-checked': inviteData.consult_invite_color == '6'}, data-class="theme6", data-value="6") + i.layui-icon.ukefu-im-check  + .ukefu-webim-prop + .ukefu-webim-tl(style="clear:both;") 4、显示“现在咨询”按钮 + .box-item + .row + .col-lg-8 + p 启用访客邀请功能,在弹出的邀请框里显示“接受邀请”的按钮 + p(style="color:#888888;font-size:13px;margin-top:10px;") 默认提示文本是:现在咨询 + .col-lg-4 + input.layui-input(type="text", name="consult_invite_accept", value=(inviteData.consult_invite_accept ? inviteData.consult_invite_accept : '现在咨询'), autocomplete="off", onkeyup="$('#consult_invite_accept').text($(this).val())", onchange="$('#consult_invite_accept').text($(this).val())") + .ukefu-webim-prop + .ukefu-webim-tl(style="clear:both;") 5、显示“稍后咨询”按钮 + .box-item + .row + .col-lg-8 + p 启用访客邀请功能,在弹出的邀请框里显示“稍后咨询”的按钮” + p(style="color:#888888;font-size:13px;margin-top:10px;") 默认提示文本是:稍后咨询 + .col-lg-4 + input#consult_invite_later.layui-input(type="text", name="consult_invite_later", value=(inviteData.consult_invite_later ? inviteData.consult_invite_later : '稍后再说'), autocomplete="off", onkeyup="$('#consult_invite_later').text($(this).val())", onchange="$('#consult_invite_later').text($(this).val())") + .ukefu-webim-prop + .ukefu-webim-tl(style="clear:both;") 6、延时弹出邀请框 + .box-item + .row + .col-lg-8 + p 延时弹出访客邀请框 + p(style="color:#888888;font-size:13px;margin-top:10px;") 默认延时:5秒 + .col-lg-4 + select(name="consult_invite_delay") + option(value="0", selected=(!inviteData.consult_invite_delay || inviteData.consult_invite_delay == 0)) 无延时 + for i in [1,2,3,4,5,10] + option(value=i * 1000, selected=inviteData.consult_invite_delay == i * 1000) #{i}秒 + + .ukefu-webim-prop + - var invite_bg = inviteData.consult_invite_bg?('/res/image.html?id=' + inviteData.consult_invite_bg):'/im/img/webwxgetmsgimg.jpg'; + .ukefu-webim-tl 7、自定义访客邀请框背景图片 (建议尺寸:273*230) + .box-item(style="position: relative;") + span.ukefu-logo + img#invite_show(src=invite_bg, style="height:175px;") + .layui-box.layui-upload-button(style="position:absolute;left: 290px;") + input#invoteupdata.layui-upload-file(type="file", name="invotebg", accept="image/gif, image/jpeg, image/png", lay-ext="jpg|png|gif", onchange="$('#invotebg').html($(this).val());$('.invite_close').show()") + span.layui-upload-icon + i.layui-icon  + | 上传图片 + div(style="display: inline-block;margin-left: 70px") + span#invotebg(style="float: left") + i.layui-icon.invite_close(style="display: none;float: left;margin-top: -5px;cursor:pointer;", onclick=" $('#invotebg').html('');$('#invite_show').attr('src','" + invite_bg + "'); $('.invite_close').hide(); clearInvoteupdata()") ဆ + .col-md-5 + #ukefu-point.ukefu-im-preview(style="height:183px;position: absolute;") + #ukefu-cousult-invite-dialog.ukefu-im-preview-bar.ukefu-cousult-invite-dialog.ukefu-theme-color(class="theme" + (inviteData.consult_invite_color ? inviteData.consult_invite_color : 1), style="padding:5px;height:160px;width:400px;background:url('" + invite_bg + "'') no-repeat") + span(style="float:right;") + i.layui-icon(style="font:size:12px;color:#ffffff;") ဆ + #ukefu-cousult-invite-content.ukefu-cousult-invite-content= inviteData.consult_invite_content + .ukefu-cousult-invite-btn + button#invite-btn.layui-btn.layui-btn-original(class="theme" + (inviteData.consult_invite_color ? inviteData.consult_invite_color : 1), style="border-color:#FFFFFF !important;color:#FFFFFF;")= inviteData.consult_invite_later ? inviteData.consult_invite_later : '稍后再说' + button.layui-btn.layui-btn-original= inviteData.consult_invite_accept ? inviteData.consult_invite_accept : '现在咨询' + .row + .col-lg-3 + .col-lg-9 + .layui-form-item + .layui-input-block + button.layui-btn(lay-submit="", lay-filter="formDemo") 保存 + button.layui-btn.layui-btn-original(type="reset") 重置 + script(language="javascript"). + function clearInvoteupdata() { + invoteupdata.outerHTML = invoteupdata.outerHTML; + } + layui.use('form', function () { + var form = layui.form(); + form.render('select'); //刷新select选择框渲染 + }); + $(document) + .ready( + function () { + $('.ukefu-im-ping-color .ukefu-im-item') + .click( + function () { + var theme = $(this).attr( + 'data-class'); + $('#ukefu-point .ukefu-theme-color , #invite-btn') + .each( + function () { + $(this) + .removeClass( + "theme1 theme2 theme3 theme4 theme5 theme6") + .addClass( + theme); + }); + $('.ukefu-im-ping-color .ukefu-im-item') + .removeClass( + 'ukefu-im-checked'); + $(this).addClass('ukefu-im-checked'); + $('#consult_invite_color').val($(this).attr('data-value')); + }); + }); + + + diff --git a/contact-center/app/src/main/resources/templates/admin/webim/profile.html b/contact-center/app/src/main/resources/templates/admin/webim/profile.html deleted file mode 100644 index 20fdec2f..00000000 --- a/contact-center/app/src/main/resources/templates/admin/webim/profile.html +++ /dev/null @@ -1,664 +0,0 @@ -
              -
              -
              -
              -
              -
              -
              - ${snsAccount.name!''} - 接入网站创建时间:${snsAccount.createtime!?string("yyyy-MM-dd HH:mm:ss")} -
              -
              ${snsAccount.name!''}
              -
              -
              -
              -
              -
              - -
              - -
              -
              -
              -
              -
              - <#if inviteData??> - - - <#if inviteData.ai??> - - <#else> - - - <#if inviteData.aifirst??> - - <#else> - - - - - - -
              -
              -
              -
              -
              -

              客服基本信息

              -
              -
              -
              -
              -
              -
              1、企业/网站名称
              -
              -
              -
              -

              信息提示区域显示的名称

              -

              默认显示信息 企业名称

              -
              -
              - -
              -
              -
              -
              -
              -
              2、企业地址信息
              -
              -
              -
              -

              信息提示区域显示的企业地址信息

              -

              默认提示文本是:空白

              -
              -
              - -
              -
              -
              -
              - -
              -
              3、联系电话
              -
              -
              -
              -

              信息提示区域显示的企业联系电话

              -

              默认提示文本是:空白

              -
              -
              - -
              -
              -
              -
              - -
              -
              4、联系邮件
              -
              -
              -
              -

              信息提示区域显示的企业联系邮箱地址

              -

              默认提示文本是:空白

              -
              -
              - -
              -
              -
              -
              - -
              -
              5、网站客服公告
              -
              -
              -
              -

              信息提示区域显示的客服公告信息

              -

              默认提示文本是:空白

              -
              -
              - -
              -
              -
              -
              - -
              -
              6、对话欢迎语
              -
              -
              -
              - -
              -
              -
              -
              - -
              -
              7、自定义形象图片 (建议尺寸:276*236)
              -
              - -
              - - 上传图片 -
              - -
              - - -
              - -
              -
              - -
              -
              8、启用访客留言
              -
              -
              -
              -

              坐席不在线或不在工作时间段内访客的留言功能

              -

              开启后,当前没有坐席在线或者不在工作时间段内访问将会弹出留言板

              -
              -
              - checked="checked"> -
              -
              -
              -
              -
              -
              -

              a、留言框弹出方式

              -

              -

              - checked> - checked> -
              -

              -
              -
              -
              -
              -

              b、选择留言内容字段

              -

              -

              - checked value="1"> - checked value="1"> - checked value="1"> - checked value="1"> - checked value="1"> -
              -

              -
              -
              -
              -
              - -
              style="display: none" > -
              9、启用技能组模式
              -
              -
              -
              -

              坐席分组功能,访客能够直接选择服务的技能组或坐席

              -

              开启后,运行访客直接发起和坐席对话,如果坐席达到最大访客限制,则访客进入排队队列

              -
              -
              - checked="checked"> -
              -
              -
              -
              -

              绑定单一技能组

              -

              开启后,该网站绑定到一个指定技能组

              -
              -
              - checked="checked"> -
              -
              - -
              -
              -
              -

              a、技能组

              -

              指定服务于该网站渠道的技能组

              -
              - -
              - -
              -
              -
              - -
              -
              -
              -

              a、坐席组窗口显示标题

              -

              在访客邀请按钮的坐席分组窗口上显示的标题

              -
              -
              -
              - -
              -
              -
              - -
              -
              -

              b、坐席组窗口底部显示内容

              -

              在访客邀请按钮的坐席分组窗口底部显示的文本内容

              -
              -
              -
              - -
              -
              -
              - -
              -
              -

              c、最多显示技能组数

              -

              在访客邀请按钮上显示的最大坐席分组数量

              -
              -
              -
              - -
              -
              -
              -
              -
              -

              d、是否显示技能组下的人工坐席

              -

              开启后,将会允许访客直接选择坐席

              -
              -
              - checked="checked"> -
              -
              -
              -
              -

              e、每个坐席分组下显示的最大坐席数

              -

              在访客邀请按钮的坐席分组下显示的最大坐席数量

              -
              -
              -
              - -
              -
              -
              -
              -
              -

              f、坐席组窗口提示信息

              -
              -
              -
              -
              - -
              -
              -
              -
              -

              g、配置地区的时候,只显示访客所在地区的技能组

              -

              默认不开启,开启后,访客端只显示当前地区内配置的技能组

              -
              -
              - checked="checked"> -
              -
              -
              -
              -

              h、未配置地区技能组的提示消息

              -
              -
              -
              -
              - -
              -
              -
              -
              -
              -
              -
              - -
              -
              10、启用咨询前信息录入
              -
              -
              -
              -

              启用咨询前用户录入个人信息

              -

              开启后会启用访客信息录入功能,访客需要填写姓名、电话、邮件、咨询原因等内容

              -
              -
              - checked="checked"> -
              -
              -
              -
              -
              -
              -

              a、输入访客姓名

              -

              默认的访客姓名是随机生成的,访客输入后,在坐席对话界面上将会显示访客输入的姓名

              -
              -
              -
              - checked="checked"> -
              -
              -
              -
              -
              -

              b、输入访客邮件地址

              -

              来访访客需要填写电子邮件信息后才能进入咨询

              -
              -
              -
              - checked="checked"> -
              -
              -
              -
              -
              -

              c、填写电话号码

              -

              来访访客需要填写电话号码后才能进入咨询

              -
              -
              -
              - checked="checked"> -
              -
              -
              - -
              -
              -

              d、填写咨询原因或者问题

              -

              来访访客需要填写咨询原因或者问题后才能进入咨询

              -
              -
              -
              - checked="checked"> -
              -
              -
              -
              -
              -

              e、咨询信息录入窗口填写提示信息

              -
              -
              -
              -
              - -
              -
              -
              -
              -

              f、使用Cookies临时存储用户信息

              -

              来访访客填写的用户信息临时存放在Cookies,默认有效期是3600秒,信息将会被加密后存储

              -
              -
              -
              - checked="checked"> -
              -
              -
              -
              -
              -
              -
              11、记录访客轨迹
              -
              -
              -
              -

              是否记录访客访问页面历史信息

              -

              开启后,访客访问页面的信息会被记录下来

              -
              -
              - checked="checked"> -
              -
              -
              -
              -
              -
              12、实时跟踪访客状态
              -
              -
              -
              -

              是否对访客进行实时跟踪

              -

              开启后,访客信息会被实时写入数据记录,系统开启实时交互模式

              -
              -
              - checked="checked"> -
              -
              -
              -
              - -
              -
              13、允许访客端输入的最大文本字数
              -
              -
              -
              -

              访客端文本字数输入限制

              -

              开启后,访客超过设定的字数后会被截断

              -
              -
              - -
              -
              -
              -
              -
              -
              14、启用访客端CTRL+Enter快捷键发送消息
              -
              -
              -
              -

              访客对话界面上启用CTRL+Enter快捷键发送消息

              -

              默认是Enter快捷键发送消息,启用此功能后,快捷键变为 CTRL+Enter

              -
              -
              - checked="checked"> -
              -
              -
              -
              -
              -
              15、白名单模式
              -
              -
              -
              -

              联系人访问才显示在线客服按钮

              -
              -
              - checked="checked"> -
              -
              -
              -
              -
              -
              -
              -
              - - - - -
              -
              -
              - ${inviteData.dialog_message!'欢迎您来咨询!欢迎使用春松客服!如需帮助请联系 info@chatopera.com'} -
              - -
              - -
              - -
              -
              -
              - -
              -
              - -
              - -
              -
              - -
              - -
              - -
              -
              - 发送 -
              -
              -
              -
              信息提示
              -
              - 名称: -
              -
              - 地址: -
              -
              - 电话: -
              -
              - 邮件: -
              -
              - -
              -
              - -
              -
              -
              -
              -
              -
              -
              - -
              -
              -
              -
              -
              -
              -
              -
              - - -
              -
              -
              -
              -
              -
              -
              -
              - - - diff --git a/contact-center/app/src/main/resources/templates/admin/webim/profile.pug b/contact-center/app/src/main/resources/templates/admin/webim/profile.pug new file mode 100644 index 00000000..42e66098 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/webim/profile.pug @@ -0,0 +1,408 @@ +extends /admin/include/layout.pug + +block content + include head + .layui-tab + .layui-tab-content + .layui-tab-item.layui-show + form.layui-form(method="post", key="set-mine", enctype="multipart/form-data", action="/admin/webim/profile/save.html") + include hidden + .row + .col-lg-12 + .ukefu-customer-div.setting-wrapper + .box.default-box + .box-header + h3.box-title 客服基本信息 + .box-body.ukefu-im-theme + .row + .col-lg-7 + .ukefu-webim-prop + .ukefu-webim-tl(style="clear:both;") 1、企业/网站名称 + .box-item + .row + .col-lg-8 + p 信息提示区域显示的名称 + p(style="color:#888888;font-size:13px;margin-top:10px;") 默认显示信息 企业名称 + .col-lg-4 + input.layui-input(type="text", name="dialog_name", value=(inviteData.dialog_name ? inviteData.dialog_name : '春松客服'), autocomplete="off", oninput="$('#dialog_name').text($(this).val())", onchange="$('#dialog_name').text($(this).val())") + .ukefu-webim-prop + .ukefu-webim-tl(style="clear:both;") 2、企业地址信息 + .box-item + .row + .col-lg-8 + p 信息提示区域显示的企业地址信息 + p(style="color:#888888;font-size:13px;margin-top:10px;") 默认提示文本是:空白 + .col-lg-4 + input.layui-input(type="text", name="dialog_address", value=inviteData.dialog_address, autocomplete="off", oninput="$('#dialog_address').text($(this).val())", onchange="$('#dialog_address').text($(this).val())") + .ukefu-webim-prop + .ukefu-webim-tl(style="clear:both;") 3、联系电话 + .box-item + .row + .col-lg-8 + p 信息提示区域显示的企业联系电话 + p(style="color:#888888;font-size:13px;margin-top:10px;") 默认提示文本是:空白 + .col-lg-4 + input.layui-input(type="text", name="dialog_phone", value=inviteData.dialog_phone, oninput="$('#dialog_phone').text($(this).val())", onchange="$('#dialog_phone').text($(this).val())") + .ukefu-webim-prop + .ukefu-webim-tl(style="clear:both;") 4、联系邮件 + .box-item + .row + .col-lg-8 + p 信息提示区域显示的企业联系邮箱地址 + p(style="color:#888888;font-size:13px;margin-top:10px;") 默认提示文本是:空白 + .col-lg-4 + input.layui-input(type="text", name="dialog_mail", value=inviteData.dialog_mail, autocomplete="off", oninput="$('#dialog_mail').text($(this).val())", onchange="$('#dialog_mail').text($(this).val())") + .ukefu-webim-prop + .ukefu-webim-tl(style="clear:both;") 5、网站客服公告 + .box-item + .row + .col-lg-8 + p 信息提示区域显示的客服公告信息 + p(style="color:#888888;font-size:13px;margin-top:10px;") 默认提示文本是:空白 + .col-lg-4 + input.layui-input(type="text", name="dialog_introduction", value=inviteData.dialog_introduction, autocomplete="off", oninput="$('#dialog_introduction').text($(this).val())", onchange="$('#dialog_introduction').text($(this).val())") + .ukefu-webim-prop + .ukefu-webim-tl(style="clear:both;") 6、对话欢迎语 + .box-item + .row + .col-lg-12 + textarea.layui-input(name="dialog_message", autocomplete="off", oninput="$('#dialog_message').text($(this).val())", style="height:60px;line-height:22px;")= inviteData.dialog_message ? inviteData.dialog_message : '欢迎使用春松客服!如需帮助请联系 info@chatopera.com' + .ukefu-webim-prop + .ukefu-webim-tl 7、自定义形象图片 (建议尺寸:276*236) + .box-item(style="position: relative;") + - var dialog_ad = inviteData.dialog_ad?('/res/image.html?id='+inviteData.dialog_ad):'/im/img/pic01.jpg' + span.ukefu-logo + img#agent_show(src=dialog_ad, style="height:130px;") + .layui-box.layui-upload-button(style="position:absolute;left: 290px;") + input#dialogad.layui-upload-file(type="file", name="dialogad", accept="image/gif, image/jpeg, image/png", lay-ext="jpg|png|gif", onchange="$('#dialog_ad').html($(this).val());$('.agent_close').show()") + span.layui-upload-icon + i.layui-icon  + | 上传图片 + div(style="margin-top: 20px;position: relative;") + span#dialog_ad(style="float: left") + i.layui-icon.agent_close(style="display: none;float: left;margin-top: -5px;cursor:pointer;", onclick=" $('#dialog_ad').html('');$('#agent_show').attr('src','" + dialog_ad + "');clearAgentheadimg(); $('.agent_close').hide()") ဆ + .ukefu-webim-prop + .ukefu-webim-tl(style="clear:both;") 8、启用访客留言 + .box-item + .row + .col-lg-8 + p 坐席不在线或不在工作时间段内访客的留言功能 + p(style="color:#888888;font-size:13px;margin-top:10px;") 开启后,当前没有坐席在线或者不在工作时间段内访问将会弹出留言板 + .col-lg-4(style="text-align:right;") + input#leavemessage(type="checkbox", title="启用", name="leavemessage", lay-filter="leavemessage", checked=inviteData.leavemessage == true) + #leavemessage_tip.box-item(style=(inviteData.leavemessage == false ? 'display:none;' : '')) + .row(style="margin-bottom:20px;") + .col-lg-8 + p a、留言框弹出方式 + p + .layui-input-block + input(type="radio", name="lvmopentype", value="access", title="访问时弹出", checked= inviteData.lvmopentype == 'access') + input(type="radio", name="lvmopentype", value="click", title="点击入口按钮后弹出", checked= inviteData.lvmopentype != 'access') + .row(style="margin-bottom:20px;") + .col-lg-12 + p b、选择留言内容字段 + p + .layui-input-block + input(type="checkbox", name="lvmname", lay-skin="primary", title="姓名",checked=inviteData.lvmname) + input(type="checkbox", name="lvmphone", lay-skin="primary", title="电话", checked=inviteData.lvmphone) + input(type="checkbox", name="lvmemail", lay-skin="primary", title="邮件", checked=inviteData.lvmemail) + input(type="checkbox", name="lvmaddress", lay-skin="primary", title="地址",checked=inviteData.lvmaddress) + input(type="checkbox", name="lvmqq", lay-skin="primary", title="QQ", checked=inviteData.lvmqq) + .ukefu-webim-prop(style=(!(user.superadmin || user.admin) ? 'display: none' : '')) + .ukefu-webim-tl(style="clear:both;") 9、启用技能组模式 + .box-item + .row + .col-lg-8 + p 坐席分组功能,访客能够直接选择服务的技能组或坐席 + p(style="color:#888888;font-size:13px;margin-top:10px;") 开启后,运行访客直接发起和坐席对话,如果坐席达到最大访客限制,则访客进入排队队列 + .col-lg-4(style="text-align:right;") + input(type="checkbox", title="启用", name="skill", lay-filter="skill",checked=inviteData.skill == true) + #skill.box-item(style="position: relative;" + (inviteData.skill == true ? '' : 'display:none;')) + .row(style="margin-bottom:20px;") + .col-lg-8 + p 绑定单一技能组 + p(style="color:#888888;font-size:13px;margin-top:10px;") 开启后,该网站绑定到一个指定技能组 + .col-lg-4(style="text-align:right;") + input(type="checkbox", title="启用", name="consult_skill_fixed", lay-filter="consult_skill_fixed", checked=inviteData.consult_skill_fixed == true) + #skill_fixed.box-item(style="position: relative;" + (inviteData.consult_skill_fixed == true ? '' : 'display:none;')) + .row(style="margin-bottom:20px;") + .col-lg-8 + p a、技能组 + p(style="color:#888888;font-size:13px;margin-top:10px;") 指定服务于该网站渠道的技能组 + .layui-input-block + select(name="consult_skill_fixed_id") + if skillGroups.empty() + option 请选择 + else + for skill in skillGroups + option(value=skill.id,selected=inviteData.consult_skill_fixed_id == skill.id)= skill.name + + #skill_group.box-item(style="position: relative;" + (inviteData.consult_skill_fixed == false ? '' : 'display:none;')) + .row(style="margin-bottom:20px;") + .col-lg-8 + p a、坐席组窗口显示标题 + p(style="color:#888888;font-size:13px;margin-top:10px;") 在访客邀请按钮的坐席分组窗口上显示的标题 + .col-lg-4 + .layui-input-block + input.layui-input(type="text", name="consult_skill_title", value=(inviteData.consult_skill_title ? inviteData.consult_skill_title : '春松客服'), autocomplete="off") + .row(style="margin-bottom:20px;") + .col-lg-8 + p b、坐席组窗口底部显示内容 + p(style="color:#888888;font-size:13px;margin-top:10px;") 在访客邀请按钮的坐席分组窗口底部显示的文本内容 + .col-lg-4 + .layui-input-block + input.layui-input(type="text", name="consult_skill_bottomtitle", value=(inviteData.consult_skill_bottomtitle ? inviteData.consult_skill_bottomtitle : '春松客服全渠道智能客服'), autocomplete="off") + .row(style="margin-bottom:20px;") + .col-lg-8 + p c、最多显示技能组数 + p(style="color:#888888;font-size:13px;margin-top:10px;") 在访客邀请按钮上显示的最大坐席分组数量 + .col-lg-4 + - + if (inviteData.consult_skill_numbers == 0) { + inviteData.consult_skill_numbers = 5 + } + .layui-input-block + select(name="consult_skill_numbers") + for i in pugHelper.range(1,15) + option(value=i,selected=inviteData.consult_skill_numbers == i)= i + + .row(style="margin-bottom:20px;") + .col-lg-8 + p d、是否显示技能组下的人工坐席 + p(style="color:#888888;font-size:13px;margin-top:10px;") 开启后,将会允许访客直接选择坐席 + .col-lg-4(style="text-align:right;") + input(type="checkbox", title="启用", name="consult_skill_agent", lay-filter="consult_skill_agent", checked=inviteData.consult_skill_agent == true) + .row(style="margin-bottom:20px;") + .col-lg-8 + p e、每个坐席分组下显示的最大坐席数 + p(style="color:#888888;font-size:13px;margin-top:10px;") 在访客邀请按钮的坐席分组下显示的最大坐席数量 + .col-lg-4 + .layui-input-block + select(name="consult_skill_maxagent") + - + if (invitedata.consult_skill_maxagent == 0) { + invitedata.consult_skill_maxagent = 5 + } + for i in pugHelper.range(1,15) + option(value=i,selected=inviteData.consult_skill_maxagent == i)= i + .row(style="margin-bottom:20px;") + .col-lg-12 + p f、坐席组窗口提示信息 + .row(style="margin-bottom:20px;") + .col-lg-12 + textarea.layui-input(name="consult_skill_msg", autocomplete="off", resize="false", style="height:90px;line-height:22px;resize: none;") + if inviteData.consult_skill_msg + | #{inviteData.consult_skill_msg} + else + | 工作时间 + br + | 08:30~17:30 + + .row(style="margin-bottom:20px;") + .col-lg-8 + p g、配置地区的时候,只显示访客所在地区的技能组 + p(style="color:#888888;font-size:13px;margin-top:10px;") 默认不开启,开启后,访客端只显示当前地区内配置的技能组 + .col-lg-4(style="text-align:right;") + input(type="checkbox", title="启用", name="onlyareaskill",checked = inviteData.onlyareaskill == true) + .row(style="margin-bottom:20px;") + .col-lg-12 + p h、未配置地区技能组的提示消息 + .row(style="margin-bottom:20px;") + .col-lg-12 + textarea.layui-input(name="areaskilltipmsg", autocomplete="off", resize="false", style="height:90px;line-height:22px;resize: none;")= inviteData.areaskilltipmsg ? inviteData.areaskilltipmsg : '您好,您所在的地区没有在线客服人员!' + .ukefu-webim-prop + .ukefu-webim-tl(style="clear:both;") 10、启用咨询前信息录入 + .box-item + .row + .col-lg-8 + p 启用咨询前用户录入个人信息 + p(style="color:#888888;font-size:13px;margin-top:10px;") 开启后会启用访客信息录入功能,访客需要填写姓名、电话、邮件、咨询原因等内容 + .col-lg-4(style="text-align:right;") + input(type="checkbox", title="启用", name="consult_info", lay-filter="consult_info", checked=inviteData.consult_info == true) + #consult_info.box-item(style="position: relative;" + (inviteData.consult_info == true ? "" : "display:none;")) + .row(style="margin-bottom:20px;") + .col-lg-8 + p a、输入访客姓名 + p(style="color:#888888;font-size:13px;margin-top:10px;") 默认的访客姓名是随机生成的,访客输入后,在坐席对话界面上将会显示访客输入的姓名 + .col-lg-4(style="text-align:right;") + .layui-input-block + input(type="checkbox", title="启用", name="consult_info_name", checked=inviteData.consult_info_name == true) + .row(style="margin-bottom:20px;") + .col-lg-8 + p b、输入访客邮件地址 + p(style="color:#888888;font-size:13px;margin-top:10px;") 来访访客需要填写电子邮件信息后才能进入咨询 + .col-lg-4(style="text-align:right;") + .layui-input-block + input(type="checkbox", title="启用", name="consult_info_email", checked=inviteData.consult_info_email == true) + .row(style="margin-bottom:20px;") + .col-lg-8 + p c、填写电话号码 + p(style="color:#888888;font-size:13px;margin-top:10px;") 来访访客需要填写电话号码后才能进入咨询 + .col-lg-4(style="text-align:right;") + .layui-input-block + input(type="checkbox", title="启用", name="consult_info_phone", checked = inviteData.consult_info_phone == true) + .row(style="margin-bottom:20px;") + .col-lg-8 + p d、填写咨询原因或者问题 + p(style="color:#888888;font-size:13px;margin-top:10px;") 来访访客需要填写咨询原因或者问题后才能进入咨询 + .col-lg-4(style="text-align:right;") + .layui-input-block + input(type="checkbox", title="启用", name="consult_info_resion", checked=inviteData.consult_info_resion == true) + .row(style="margin-bottom:20px;") + .col-lg-12 + p e、咨询信息录入窗口填写提示信息 + .row(style="margin-bottom:20px;") + .col-lg-12 + textarea.layui-input(name="consult_info_message", autocomplete="off", resize="false", style="height:90px;line-height:22px;resize: none;")= inviteData.consult_info_message ? inviteData.consult_info_message : '您好,请填写以下信息,方便我们更好的为您服务!' + .row(style="margin-bottom:20px;") + .col-lg-8 + p f、使用Cookies临时存储用户信息 + p(style="color:#888888;font-size:13px;margin-top:10px;") 来访访客填写的用户信息临时存放在Cookies,默认有效期是3600秒,信息将会被加密后存储 + .col-lg-4(style="text-align:right;") + .layui-input-block + input(type="checkbox", title="启用", name="consult_info_cookies", checked=inviteData.consult_info_cookies == true) + .ukefu-webim-prop + .ukefu-webim-tl(style="clear:both;") 11、记录访客轨迹 + .box-item + .row + .col-lg-8 + p 是否记录访客访问页面历史信息 + p(style="color:#888888;font-size:13px;margin-top:10px;") 开启后,访客访问页面的信息会被记录下来 + .col-lg-4(style="text-align:right;") + input#recordhis(type="checkbox", title="启用", name="recordhis",checked=inviteData.recordhis == true) + .ukefu-webim-prop + .ukefu-webim-tl(style="clear:both;") 12、实时跟踪访客状态 + .box-item + .row + .col-lg-8 + p 是否对访客进行实时跟踪 + p(style="color:#888888;font-size:13px;margin-top:10px;") 开启后,访客信息会被实时写入数据记录,系统开启实时交互模式 + .col-lg-4(style="text-align:right;") + input#traceuser(type="checkbox", title="启用", name="traceuser", checked=inviteData.traceuser == true) + .ukefu-webim-prop + .ukefu-webim-tl(style="clear:both;") 13、允许访客端输入的最大文本字数 + .box-item + .row + .col-lg-8 + p 访客端文本字数输入限制 + p(style="color:#888888;font-size:13px;margin-top:10px;") 开启后,访客超过设定的字数后会被截断 + .col-lg-4(style="text-align:right;") + input#maxwordsnum.layui-input(type="input", name="maxwordsnum", lay-verify="number", maxlength="5", value=inviteData.maxwordsnum) + .ukefu-webim-prop + .ukefu-webim-tl(style="clear:both;") 14、启用访客端CTRL+Enter快捷键发送消息 + .box-item + .row + .col-lg-8 + p 访客对话界面上启用CTRL+Enter快捷键发送消息 + p(style="color:#888888;font-size:13px;margin-top:10px;") 默认是Enter快捷键发送消息,启用此功能后,快捷键变为 CTRL+Enter + .col-lg-4(style="text-align:right;") + input#ctrlenter(type="checkbox", title="启用", name="ctrlenter",checked=inviteData.ctrlenter == true) + .ukefu-webim-prop + .ukefu-webim-tl(style="clear:both;") 15、白名单模式 + .box-item + .row + .col-lg-8 + p 联系人访问才显示在线客服按钮 + .col-lg-4(style="text-align:right;") + input#whitelist_mode(type="checkbox", title="启用", name="whitelist_mode",checked=inviteData.whitelist_mode == true) + .col-md-5 + #pv.ukefu-im-preview.ukefu-im-preview-dialog(style="width:380px;position: fixed;") + - + var invite_bg = inviteData.consult_invite_bg ? ('/res/image.html?id=' + inviteData.consult_invite_bg) : '/im/img/webwxgetmsgimg.jpg'; + var dialog_logo = inviteData.consult_dialog_logo ? ('/res/image.html?id=' + inviteData.consult_dialog_logo) : '/images/logo2.png'; + var dialog_headimg = inviteData.consult_dialog_headimg ? ('/res/image.html?id=' + inviteData.consult_dialog_headimg) : '/images/agent.png'; + var color_theme = "theme" + (inviteData.consult_dialog_color ? inviteData.consult_dialog_color : '1'); + + .ukefu-im-preview-bar.ukefu-theme-color(class=color_theme, style="padding:5px;") + img(src=dialog_logo, style="height:22px;float:left;") + span(style="float:right;") + i.layui-icon(style="font:size:12px;color:#ffffff;") ဆ + .ukefu-im-preview-wrap(style="border:1px solid #EAEAEA") + #dialog_message.ukefu-im-preview-tip(style="width:90%;height:5px;font-size:12px;height:32px;overflow:hidden;border-radius: 10px;padding: 2px 10px 2px 10px;")= inviteData.dialog_message ? inviteData.dialog_message : '欢迎您来咨询!欢迎使用春松客服!如需帮助请联系 info@chatopera.com' + .ukefu-im-preview-customer + i.layui-icon(style="color:#377FED;float:left;")  + .ukefu-im-preview-customer-message.ukefu-im-preview-customer-arrow + .ukefu-im-preview-user + img(src=dialog_headimg, style="height:20px;float:right;") + .ukefu-im-preview-user-message.ukefu-im-preview-user-arrow.ukefu-theme-color(class=color_theme, style="width:150px;") + .ukefu-im-preview-user(style="height:60px;") + img(src=dialog_headimg, style="height:20px;float:right;") + .ukefu-im-preview-user-message.ukefu-im-preview-user-arrow.ukefu-theme-color(class=color_theme, style="width:100px;height:50px;") + .ukefu-im-preview-hr + .ukefu-im-preview-submit + i.fa.fa-image(style="color:#dddddd;float:left;") + .ukefu-im-preview-submit + a.ukefu-im-theme-submit-btn.ukefu-theme-color(class=color_theme) 发送 + .ukefu-im-profile(style="width:130px;font-size:12px;") + .ukefu-profile-title(style="clear:both;") 信息提示 + .box-item(style="padding:5px;white-space: nowrap;text-overflow: ellipsis;") + | 名称: + label#dialog_name= inviteData.dialog_name ? inviteData.dialog_name : '春松客服' + .box-item(style="padding:5px;white-space: nowrap;text-overflow: ellipsis;") + | 地址: + label#dialog_address= inviteData.dialog_address ? inviteData.dialog_address : '北京' + .box-item(style="padding:5px;white-space: nowrap;text-overflow: ellipsis;") + | 电话: + label#dialog_phone= inviteData.dialog_phone ? inviteData.dialog_phone : '185-1935-7507' + .box-item(style="padding:5px;white-space: nowrap;text-overflow: ellipsis;") + | 邮件: + label#dialog_mail= inviteData.dialog_mail ? inviteData.dialog_mail : 'info@chatopera.com' + .box-item(style="padding:5px;text-indent: 25px;line-height:25px;") + label#dialog_introduction= inviteData.dialog_introduction ? inviteData.dialog_introduction : '客服公告信息,内容在控制台设置。' + .box-item(style="padding:5px;white-space: nowrap;text-overflow: ellipsis;text-align:center;border-top:1px solid #dedede;") + img(src=dialog_ad, style="height:100px;") + .row + .col-lg-3 + .col-lg-9 + .layui-form-item + .layui-input-block + button.layui-btn(lay-submit="", lay-filter="formDemo") 保存 + button.layui-btn.layui-btn-original(type="reset") 重置 + script(language="javascript"). + function clearAgentheadimg() { + dialogad.outerHTML = dialogad.outerHTML; + } + layui.use('form', function () { + var form = layui.form(); + form.render('select'); //刷新select选择框渲染 + form.on("checkbox(leavemessage)", function (data) { + if (data.elem.checked == true) { + $('#leavemessage_tip').show(); + } else { + $('#leavemessage_tip').hide(); + } + }); + form.on("checkbox(skill)", function (data) { + if (data.elem.checked == true) { + $('#skill').show(); + } else { + $('#skill').hide(); + } + }); + form.on("checkbox(consult_skill_fixed)", function (data) { + if (data.elem.checked == false) { + $('#skill_group').show(); + $('#skill_fixed').hide(); + } else { + $('#skill_fixed').show(); + $('#skill_group').hide(); + } + }); + form.on("checkbox(ai)", function (data) { + if (data.elem.checked == true) { + $('#ai').show(); + } else { + $('#ai').hide(); + } + }); + form.on("checkbox(consult_info)", function (data) { + if (data.elem.checked == true) { + $('#consult_info').show(); + } else { + $('#consult_info').hide(); + } + }); + }); + + + diff --git a/contact-center/app/src/main/resources/templates/admin/webim/textpoint.html b/contact-center/app/src/main/resources/templates/admin/webim/textpoint.html deleted file mode 100644 index 197c5e35..00000000 --- a/contact-center/app/src/main/resources/templates/admin/webim/textpoint.html +++ /dev/null @@ -1,3 +0,0 @@ - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/admin/webim/textpoint.pug b/contact-center/app/src/main/resources/templates/admin/webim/textpoint.pug new file mode 100644 index 00000000..e9b4d97c --- /dev/null +++ b/contact-center/app/src/main/resources/templates/admin/webim/textpoint.pug @@ -0,0 +1,2 @@ +script(language='javascript'). + alert(document.referrer); diff --git a/contact-center/app/src/main/resources/templates/apps/agent/agentusers.html b/contact-center/app/src/main/resources/templates/apps/agent/agentusers.html deleted file mode 100644 index 2792dd53..00000000 --- a/contact-center/app/src/main/resources/templates/apps/agent/agentusers.html +++ /dev/null @@ -1,83 +0,0 @@ - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/agent/agentusers.pug b/contact-center/app/src/main/resources/templates/apps/agent/agentusers.pug new file mode 100644 index 00000000..33cd6179 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/agent/agentusers.pug @@ -0,0 +1,71 @@ +.row + .col-lg-12 + h1.site-h1 + | 对话列表 + div(style='clefloat:right;') + .layui-btn-group + a(href="/agent/index.html?sort=lastmessage", style=(sort && sort == "lastmessage" ? "color:#ffffff !important" : "")) + button.layui-btn.layui-btn-primary.layui-btn-small(style=(sort && sort == "lastmessage" ? "color:#ffffff !important" : "background-color:#ffffff !important;color:#32c24d !important;")) + | 消息 + a(href="/agent/index.html?sort=logintime", style=(sort && sort == "logintime" ? "color:#ffffff !important" : "")) + button.layui-btn.layui-btn-primary.layui-btn-small(style=(sort && sort == "logintime" ? "color:#ffffff !important" : "background-color:#ffffff !important;color:#32c24d !important;")) + | 接入 + a(href="/agent/index.html?sort=default", style=(!sort || sort == "default" ? "color:#ffffff !important" : "")) + button.layui-btn.layui-btn-primary.layui-btn-small(style=(!sort || sort == "default" ? "color:#ffffff !important" : "background-color:#ffffff !important;color:#32c24d !important;")) + | 默认 + a(href='/agent/clean.html', data-toggle='tip', data-title='清理对话列表将会删除已结束对话,请确认是否清理?') + button.layui-btn.layui-btn-original.layui-btn-small(style='background-color:#ffffff !important;color:#32c24d !important;') + i.layui-icon(style='font-size:22px;color:red;')  + ul.dialog-list#chat_users + if agentUserList + for agentuser in agentUserList + li(class={ + 'clearfix': true, + 'chat-list-item': true, + 'active': (curagentuser.id == agentuser.id) + }, id='agentuser_' + agentuser.userid, remove-id=agentuser.id, data-id=agentuser.userid) + a(href='/agent/agentuser.html?id=' + agentuser.id + '&channel=' + agentuser.channel, data-toggle="load", data-target="#ukefu-chat-agent", onclick="$('.chat-list-item.active').removeClass('active');$(this).closest('li.chat-list-item').addClass('active');cleanTopMsgTip(this) ;$('#last_msg_#{agentuser.userid}').text(0).hide();") + img(src=(agentuser.headimgurl && agentuser.headimgurl != '' ? agentuser.headimgurl : '/images/im/user.png'), style="width:45px;height:45px;") + if agentuser.status && agentuser.status == 'end' + if agentuser.channel && agentuser.channel == "weixin" + i.kfont.ukefu-channel-icon-end(id="tip_icon_wenxin_#{agentuser.userid}") + |  + else if agentuser.channel && agentuser.channel == "webim" + i.kfont.ukefu-channel-icon-end(id="tip_icon_webim_#{agentuser.userid}") + |  + else if agentuser.channel && agentuser.channel == "skype" + i.csfont.ukefu-channel-icon-end(id="tip_icon_skype_#{agentuser.userid}") + |  + else if agentuser.channel && agentuser.channel == "messenger" + i.csfont.ukefu-channel-icon-end(id="tip_icon_messenger_#{agentuser.userid}") + |  + else if agentuser.channel && agentuser.channel == "phone" + img.ukefu-channel-image(src="/images/cde-ico-gray.png", id="tip_icon_phone_#{agentuser.userid}") + else + if agentuser.channel && agentuser.channel == "weixin" + i.kfont.ukefu-channel-icon(id="tip_icon_wenxin_#{agentuser.userid}") + |  + else if agentuser.channel && agentuser.channel == "webim" + i.kfont.ukefu-channel-icon(id="tip_icon_webim_#{agentuser.userid}") + |  + else if agentuser.channel && agentuser.channel == "skype" + i.csfont.ukefu-channel-icon(id="tip_icon_skype_#{agentuser.userid}") + |  + else if agentuser.channel && agentuser.channel == "messenger" + i.csfont.ukefu-channel-icon(id="tip_icon_messenger_#{agentuser.userid}") + |  + else if agentuser.channel && agentuser.channel == "phone" + img.ukefu-channel-image(src="/images/phone-ico.png", id="tip_icon_phone_#{agentuser.userid}") + .dialog-info + .address + span(style="width:90px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-wrap: break-word;word-break: break-all;") + | #{agentuser.username} + .news + | #{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', agentuser.servicetime)} + if agentuser.status && agentuser.status == 'end' + small.label.bg-gray.pull-right(id="tip_message_#{agentuser.userid}") 离开 + else + small.label.bg-green.pull-right(id="tip_message_#{agentuser.userid}") 在线 + .last-msg + small.ukefu-badge.bg-red(id="last_msg_#{agentuser.userid}",style="#{(agentuser.tokenum == 0 || (curagentuser && curagentuser.id == agentuser.id)) ? 'display:none' : ''}") + | #{agentuser.tokenum ? agentuser.tokenum : 0} diff --git a/contact-center/app/src/main/resources/templates/apps/agent/blacklistadd.html b/contact-center/app/src/main/resources/templates/apps/agent/blacklistadd.html deleted file mode 100644 index d77b7a27..00000000 --- a/contact-center/app/src/main/resources/templates/apps/agent/blacklistadd.html +++ /dev/null @@ -1,129 +0,0 @@ -
              -
              - - - - -
              -
              -

              黑名单信息

              -
              -
              -
              - -
              - 访客ID(${userid!''}) -
              -
              -
              - -
              - -
              -
              -
              -
              -
              -
              -

              扩展信息

              -
              -
              -
              - -
              - -
              -
              -
              -
              -
              -
              - -
              -
              - - -
              -
              -
              -
              - - - diff --git a/contact-center/app/src/main/resources/templates/apps/agent/blacklistadd.pug b/contact-center/app/src/main/resources/templates/apps/agent/blacklistadd.pug new file mode 100644 index 00000000..fcf3d606 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/agent/blacklistadd.pug @@ -0,0 +1,49 @@ +.uk-layui-form + form.layui-form(action='/agent/blacklist/save.html', method='post') + input(type='hidden', name='agentuserid', value=agentuserid) + input(type='hidden', name='agentserviceid', value=agentserviceid) + input(type='hidden', name='userid', value=userid) + .layui-collapse + .layui-colla-item + h2.layui-colla-title 黑名单信息 + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label.layui-form-label#cusname 拉黑方式: + .layui-input-inline(style='margin-top:9px;') + | 访客ID(#{userid}) + .layui-inline.uckefu-inline + label.layui-form-label#cusname 时长: + .layui-input-inline.ukefu-limit-height + select(name='controltime') + for i in pugHelper.range(1,24) + option(value=i) + | #{i}小时 + for i in pugHelper.range(1,30) + option(value=i) + | #{i}天 + for i in pugHelper.range(1,12) + option(value=i) + | #{i}月 + option(value='0') 永久 + .layui-colla-item + h2.layui-colla-title 扩展信息 + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label.layui-form-label 拉黑原因: + .layui-input-inline(style='width: 664px;') + textarea.layui-textarea(name='description', placeholder='拉黑原因', style='resize:none;', maxlength='255') + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 立即提交 + button.layui-btn.layui-btn-original(type='reset') 重置 +script. + layui.use('form', function () { + var form = layui.form(); + form.render(); //更新全部 + }); + layui.use('element', function () { + var element = layui.element(); + element.init(); + }); diff --git a/contact-center/app/src/main/resources/templates/apps/agent/calloutcontact/add.html b/contact-center/app/src/main/resources/templates/apps/agent/calloutcontact/add.html deleted file mode 100644 index a09a6841..00000000 --- a/contact-center/app/src/main/resources/templates/apps/agent/calloutcontact/add.html +++ /dev/null @@ -1,188 +0,0 @@ - -
              -
              -

              新建联系人

              -
              -
              - - -
              -
              -

              基本信息

              -
              -
              -
              - -
              - - -
              - *(您得到此联系人的时间) -
              -
              -
              -
              - -
              - <@select "com.dic.contacts.ckind" "ckind" '4028838b5af1047e015af140df150003'!'' "lay-ignore required lay-verify='required' "/> -
              - * -
              -
              -
              -
              -
              -

              联系人信息

              -
              -
              -
              - -
              - -
              - * -
              -
              -
              -
              - -
              -
              - - - -
              -
              -
              -
              -
              -
              - -
              - - -
              -
              -
              - -
              -
              - -
              - -
              -
              -
              -
              -
              - -
              - -
              -
              -
              - -
              -
              - -
              - <@select "com.dic.address.area" "province" mobileAddress.province "lay-ignore"/> -
              -
              -
              -
              - <@select "com.dic.address.area.city" "city" mobileAddress.city "lay-ignore"/> -
              -
              -
              -
              -
              - -
              - -
              -
              -
              - -
              -
              - -
              - -
              -
              -
              - -
              -
              - -
              - -
              -
              -
              -
              -
              -
              - -
              -
              - - -
              -
              -
              -
              - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/agent/calloutcontact/add.pug b/contact-center/app/src/main/resources/templates/apps/agent/calloutcontact/add.pug new file mode 100644 index 00000000..fc15d4f6 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/agent/calloutcontact/add.pug @@ -0,0 +1,146 @@ +//- + 原始 Freemarker 文件位置:https://gitlab.chatopera.com/chatopera/cskefu/blob/760e130e770a96a43e8f6f2c8a1eb0885c0bbf90/contact-center/app/src/main/resources/templates/apps/agent/calloutcontact/add.html + 该页面项目中暂时没有使用,此处是没有完全转化的 Pug 文件 + 如果提供这个页面,需要参考 Freemarker 原文件完成转化或参考实现 + + +// <#include "/public/macro.html"> +html + head + body + .uk-layui-form + .box-header(style='background-color: #f5f5f5;') + h1.site-h1(style='background-color:#FFFFFF;') 新建联系人 + form.layui-form(action='/agent/calloutcontact/save.html?agentuser=${curagentuser.id!\'\'}', method='post') + input(hidden, name='calloutcontact') + input(type='hidden', name='shares', value='all') + .layui-collapse + .layui-colla-item + h2.layui-colla-title 基本信息 + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label.layui-form-label 获得时间: + .layui-input-inline + input#getdate.layui-input(type='text', name='touchtime', readonly, lay-verify='date', autocomplete='off') + i.layui-icon(style='position: absolute;right: 3px;top: 6px;font-size: 25px;')  + span + font(color='red') * + b(style='font-size: 10px;') (您得到此联系人的时间) + .layui-form-item + .layui-inline + label.layui-form-label 类型: + .layui-input-inline + // <@select "com.dic.contacts.ckind" "ckind" '4028838b5af1047e015af140df150003'!'' "lay-ignore required lay-verify='required' "/> + span + font(color='red') * + .layui-colla-item + h2.layui-colla-title 联系人信息 + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label.layui-form-label#cusname 联系人名称: + .layui-input-inline + input.layui-input(type='text', name='name', required, lay-verify='required', autocomplete='off') + span + font(color='red') * + .layui-form-item + .layui-inline + label.layui-form-label 性别: + .layui-input-inline + .layui-input-block(style='width: 113%;') + input(type='radio', name='gender', value='1', title='男') + input(type='radio', name='gender', value='0', title='女') + input(type='radio', name='gender', value='-1', title='未知', checked) + .layui-form-item + .layui-inline + label.layui-form-label 生日: + .layui-input-inline + input#cusbirthday.layui-input(type='text', name='cusbirthday', autocomplete='off') + i.layui-icon(style='position: absolute;right: 3px;top: 6px;font-size: 25px;')  + .layui-form-item + .layui-inline + label.layui-form-label 联系电话: + .layui-input-inline + input.layui-input(type='text', name='phone', lay-verify='entphone', autocomplete='off', value='${statusEvent.discalled!\'\'}') + .layui-form-item + .layui-inline + label.layui-form-label 手机号: + .layui-input-inline + input.layui-input(type='text', name='mobileno', lay-verify='entphone', autocomplete='off', value='${statusEvent.discalled!\'\'}') + .layui-form-item + .layui-inline + label.layui-form-label 城市: + .layui-input-inline + // <@select "com.dic.address.area" "province" mobileAddress.province "lay-ignore"/> + .layui-inline + .layui-input-inline#contacts_city + // <@select "com.dic.address.area.city" "city" mobileAddress.city "lay-ignore"/><!– 二级字典,不存在的 CODE –> + .layui-form-item + .layui-inline + label.layui-form-label 电子邮件: + .layui-input-inline + input.layui-input(type='text', name='email', lay-verify='entemail', autocomplete='off') + .layui-form-item + .layui-inline + label.layui-form-label 联系人地址: + .layui-input-inline + input.layui-input(type='text', name='address', autocomplete='off', style='width: 236%;') + .layui-form-item + .layui-inline + label.layui-form-label 联系人说明: + .layui-input-inline(style='width: 174%;') + textarea.layui-textarea(name='memo', placeholder='请输入内容') + .layui-form-button(style='position: inherit;') + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 立即提交 + button.layui-btn.layui-btn-original(type='reset') 重置 + script(src='/js/moment.min.js') + script. + + //Demo + $('#province').change(function(){ + loadURL('/res/dic.html?id='+$(this).val()+"&name=city&attr=lay-ignore&style=width:85px;display:inline-block;" , '#contacts_city'); + }) + layui.use('form', function() { + var form = layui.form(); + form.render(); //更新全部 + form.verify({ + entphone: function(value){ + if(value!="" && !new RegExp(/^1[3456789]\d{9}$/).test(value)){ + return '请输入正确的电话号码'; + } + }, + entemail: function(value){ + if(value!="" && !new RegExp(/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/).test(value)){ + return '请输入正确的电子邮箱地址'; + } + } + }); + }); + layui.use('element', function(){ + var element = layui.element(); + }); + + $("#getdate").val(moment().format('YYYY-MM-DD')); + layui.use('laydate', function() { + var laydate = layui.laydate; + + var date = { + min : '1950-01-01 00:00:00', + max : laydate.now(), + istoday : false + }; + + document.getElementById('getdate').onclick = function() { + date.elem = this; + laydate(date); + } + + document.getElementById('cusbirthday').onclick = function() { + date.elem = this; + laydate(date); + } + + }); + diff --git a/contact-center/app/src/main/resources/templates/apps/agent/calloutcontact/edit.html b/contact-center/app/src/main/resources/templates/apps/agent/calloutcontact/edit.html deleted file mode 100644 index 57c92f88..00000000 --- a/contact-center/app/src/main/resources/templates/apps/agent/calloutcontact/edit.html +++ /dev/null @@ -1,260 +0,0 @@ - -
              -
              -

              编辑联系人

              -
              -
              - - -
              -
              -

              基本信息

              -
              -
              -
              - -
              - - - *(您得到此联系人的时间) -
              -
              -
              -
              -
              - -
              - <#if contacts.ckind?? && contacts.ckind != ''> - <@select "com.dic.contacts.ckind" "ckind" contacts.ckind!'' "lay-ignore required lay-verify='required' "/> - <#else> - <@select "com.dic.contacts.ckind" "ckind" "" "lay-ignore"/> - -
              - * -
              -
              -
              -
              -
              -

              联系人信息

              -
              -
              -
              - -
              - -
              - * -
              -
              -
              -
              - -
              -
              - checked> - checked> - checked> -
              -
              -
              -
              -
              -
              - -
              - - -
              -
              -
              - -
              -
              - -
              - -
              -
              -
              -
              -
              - -
              - -
              -
              -
              - -
              -
              - -
              - <@select "com.dic.address.area" "province" contacts.province "lay-ignore"/> -
              -
              -
              -
              - <@select contacts.city+".subdic" "city" contacts.city "lay-ignore"/> -
              -
              -
              -
              -
              - -
              - -
              -
              -
              - -
              -
              - -
              - -
              -
              -
              - -
              -
              - -
              - -
              -
              -
              - -
              -
              - - -
              -
              -
              - -
              -
              -
              - - -
              -
              -
              -
              -

              标签

              -
              -
              -
              - -
              -
              -
              -
              -
              -
              -
              -
              -
              -
              -
              -
              -
              -

              笔记

              -
              -
              - -
              - -
              -
              -
              -
              - -
              - -
              -
              -
              -
              -
              - -
              -
              -
              -
              -
              -
              -
              -
              - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/agent/calloutcontact/edit.pug b/contact-center/app/src/main/resources/templates/apps/agent/calloutcontact/edit.pug new file mode 100644 index 00000000..8f711315 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/agent/calloutcontact/edit.pug @@ -0,0 +1,198 @@ +//- + 原始 Freemarker 文件位置:https://gitlab.chatopera.com/chatopera/cskefu/blob/760e130e770a96a43e8f6f2c8a1eb0885c0bbf90/contact-center/app/src/main/resources/templates/apps/agent/calloutcontact/edit.html + 该页面项目中暂时没有使用,此处是没有完全转化的 Pug 文件 + 如果提供这个页面,需要参考 Freemarker 原文件完成转化或参考实现 + +// <#include "/public/macro.html"> +html + head + body + .uk-layui-form + .box-header(style='background-color: #f5f5f5;') + h1.site-h1(style='background-color:#FFFFFF;') 编辑联系人 + form.layui-form(action='/agent/calloutcontact/update.html', method='post') + input(type='hidden', name='id', value='${contacts.id!\'\'}') + input(type='hidden', name='shares', value='all') + .layui-collapse + .layui-colla-item + h2.layui-colla-title 基本信息 + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label.layui-form-label 获得时间: + .layui-input-inline + input#getdate.layui-input(type='text', name='touchtime', value='<#if contacts.touchtime??>${contacts.touchtime?string(\'yyyy-MM-dd\')}', readonly, lay-verify='date', autocomplete='off') + i.layui-icon(style='position: absolute;right: 3px;top: 6px;font-size: 25px;')  + span + font(color='red') * + b(style='font-size: 10px;') (您得到此联系人的时间) + .layui-form-item + .layui-inline + label.layui-form-label 类型: + .layui-input-inline + // <#if contacts.ckind?? && contacts.ckind != ''> + // <@select "com.dic.contacts.ckind" "ckind" contacts.ckind!'' "lay-ignore required lay-verify='required' "/> + // <#else> + // <@select "com.dic.contacts.ckind" "ckind" "" "lay-ignore"/> + // + span + font(color='red') * + .layui-colla-item + h2.layui-colla-title 联系人信息 + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label.layui-form-label#cusname 联系人名称: + .layui-input-inline + input.layui-input(type='text', name='name', value='${contacts.name!\'\'}', required, lay-verify='required', autocomplete='off') + span + font(color='red') * + .layui-form-item + .layui-inline + label.layui-form-label 性别: + .layui-input-inline + .layui-input-block(style='width: 113%;') + // checked> + // checked> + // checked> + .layui-form-item + .layui-inline + label.layui-form-label 生日: + .layui-input-inline + input#cusbirthday.layui-input(type='text', name='cusbirthday', value='${contacts.cusbirthday!\'\'}', autocomplete='off') + i.layui-icon(style='position: absolute;right: 3px;top: 6px;font-size: 25px;')  + .layui-form-item + .layui-inline + label.layui-form-label 联系电话: + .layui-input-inline + input.layui-input(type='text', name='phone', lay-verify='entphone', value='${contacts.phone!\'\'}', autocomplete='off') + .layui-form-item + .layui-inline + label.layui-form-label 手机号: + .layui-input-inline + input#getdate.layui-input(type='text', name='mobileno', lay-verify='entphone', value='${contacts.mobileno!\'\'}', autocomplete='off') + .layui-form-item + .layui-inline + label.layui-form-label 城市: + .layui-input-inline + // <@select "com.dic.address.area" "province" contacts.province "lay-ignore"/> + .layui-inline + .layui-input-inline#contacts_city + // <@select contacts.city+".subdic" "city" contacts.city "lay-ignore"/><!– 二级字典,不存在的 CODE –> + .layui-form-item + .layui-inline + label.layui-form-label 电子邮件: + .layui-input-inline + input.layui-input(type='text', name='email', lay-verify='entemail', value='${contacts.email!\'\'}', autocomplete='off') + .layui-form-item + .layui-inline + label.layui-form-label 联系人地址: + .layui-input-inline + input.layui-input(type='text', name='address', autocomplete='off', value='${contacts.address!\'\'}', style='width: 236%;') + .layui-form-item + .layui-inline + label.layui-form-label 联系人说明: + .layui-input-inline(style='width: 174%;') + textarea.layui-textarea(name='memo', placeholder='请输入内容') ${contacts.memo!''} + .layui-form-button(style='position: inherit;') + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 立即更新 + button.layui-btn.layui-btn-original(type='reset') 重置 + // 未选择标签style + style. + + .unselectedClass { + display: inline-block; + font-weight: 400; + color: #000000; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + border-radius: .25em; + background-color: #FFFFFF !important; + height: 22px; + line-height: 22px; + padding: 0 5px; + font-size: 14px; + border: solid 1px #CCCCCC; + } + + .box-body.ukefu-im-theme + .uk-layui-form + .layui-collapse + .layui-colla-item + h2.layui-colla-title 标签 + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label.layui-form-label(style='text-align: left;') 已有标签: + #contactTags.layui-input-inline(style='width: 100%;'). + + + .box-body.ukefu-im-theme + .uk-layui-form + .layui-collapse + .layui-colla-item + h2.layui-colla-title 笔记 + .layui-colla-content.layui-show + .layui-form-item + label.layui-form-label(style='text-align: left;') 笔记分类: + .layui-input-inline + select#notesCategory(name='notesCategory', lay-filter='category', required, lay-verify='required', style='display: inline') + option(value='callout') 外呼 + option(value='callin') 呼入 + option(value='webim') 网页 + .layui-form-item + .layui-inline + label.layui-form-label(style='text-align: left;') 内容: + .layui-input-inline(style='width: 174%;') + textarea#notesContent.layui-textarea(name='notes') + .layui-form-item + .layui-button-inline(style='float: left;') + button.layui-btn#notesAddBtn(lay-submit, lay-filter='notesbtn') 立即添加 + script. + + //Demo + $('#province').change(function(){ + loadURL('/res/dic.html?id='+$(this).val()+"&name=city&attr=lay-ignore&style=width:85px;display:inline-block;" , '#contacts_city'); + }) + layui.use('form', function() { + var form = layui.form(); + form.render(); //更新全部 + form.verify({ + entphone: function(value){ + if(value!="" && !new RegExp(/^1[3456789]\d{9}$/).test(value)){ + return '请输入正确的电话号码'; + } + }, + entemail: function(value){ + if(value!="" && !new RegExp(/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/).test(value)){ + return '请输入正确的电子邮箱地址'; + } + } + }); + }); + layui.use('element', function(){ + var element = layui.element(); + }); + layui.use('laydate', function() { + var laydate = layui.laydate; + + var date = { + min : '1950-01-01 00:00:00', + max : laydate.now(), + istoday : false + }; + + document.getElementById('getdate').onclick = function() { + date.elem = this; + laydate(date); + } + + document.getElementById('cusbirthday').onclick = function() { + date.elem = this; + laydate(date); + } + + }); + diff --git a/contact-center/app/src/main/resources/templates/apps/agent/channel/messenger.pug b/contact-center/app/src/main/resources/templates/apps/agent/channel/messenger.pug new file mode 100644 index 00000000..0d3b2cc0 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/agent/channel/messenger.pug @@ -0,0 +1,115 @@ +ul.info-list + li.ukefu-channel-tip + | 访问渠道: + i.csfont  + |   + span Messenger + li.ukefu-channel-tip + | 服务小结: + if summary + i.layui-icon  + | 已记录 + else + i.layui-icon  + | 未记录 + if snsAccount + li.ukefu-channel-tip + | 渠道名称:#{snsAccount.name} + + if onlineUser && onlineUser.source + li + | 首次访问来源: + span.tgreen + #{onlineUser.source} + if onlineUser && onlineUser.region + li + | 位置:#{curagentuser.region} + if serviceCount + li + | 访问次数:#{serviceCount ? serviceCount : 0}次 + if curagentuser.title && curagentuser.url + li + | 进入页面: + a(href="#{curagentuser.url}", target="_blank") + if curagentuser.title && size(curagentuser.title) > 15 + - var curagentuserTitle='#{curagentuser.title}' + curagentuserTitle.substr(0,15) + else + #{curagentuser.title} + li + | 访问轨迹: + a(href="/service/trace.html?sessionid=" + curagentuser.sessionid, title="查看访客轨迹", data-toggle="ajax", data-width="1050", style="margin-left:10px;") + i.kfont  + | 轨迹 + if onlineUser && onlineUser.betweentime + li + | 停留时间 + if onlineUser && onlineUser.betweentime + | #{pugHelper.padRight(onlineUser.betweentime / (1000 * 60 * 60), "00")} : #{pugHelper.padRight(onlineUser.betweentime / (1000 * 60 * 60) / (1000 * 60), "00")} : #{pugHelper.padRight(onlineUser.betweentime / (1000 * 60) / (1000), "00")} + if onlineUser && onlineUser.browser + li + | 访问浏览器: + | #{onlineUser.browser} + if onlineUser && onlineUser.opersystem + li + | 操作系统: + span.ukefu-online-user + if onlineUser.opersystem && onlineUser.opersystem == "windows" + i.kfont  + else if onlineUser.opersystem && onlineUser.opersystem == "linux" + i.kfont  + else if onlineUser.opersystem && onlineUser.opersystem == "mac" + i.kfont  + #{onlineUser.opersystem} + if onlineUser && onlineUser.mobile + li + | 访问终端: + span.ukefu-online-user + if onlineUser.mobile && onlineUser.mobile == "1" + i.kfont  + | 移动 + else + i.kfont  + | PC + li(style="position: relative;") + | 标签: + span#tags + if tagRelationList + for tagRelation in tagRelationList + if tags + for tag in tags + if tag.id == tagRelation.tagid + small.ukefu-access-label(id="tag_#{tag.id}", class="theme#{tag.color ? tag.color : '1'}") #{tag.tag} + .ukefu-tag-add + a#tag(href="javascript:void(0)") + i.layui-icon  + dl#taglist.ukefu-tag-list.layui-anim.layui-anim-upbit + if tags + for tag in tags + - var tagValue = 0 + if tagRelationList + for tagRelation in tagRelationList + if tag.id == tagRelation.tagid + - tagValue = 1 + if tagValue == 1 + dd.labeldd(style="background: red", onclick="switchbackground(this)") + a.tag-switch(href="javascript:void(0)", data-href="/agent/tagrelation.html?tagid=#{tag.id}&userid=#{curAgentService.userid}&dataid=#{onlineUser.id}", data-theme="theme#{tag.color ? tag.color : '1'}", data-id="#{tag.id}", data-name="#{tag.tag}") + | #{tag.tag} + i.layui-icon.layui-icon-close ဆ + - tagValue = 1 + else + dd.labeldd(onclick="switchbackground(this)") + a.tag-switch(href="javascript:void(0)", data-href="/agent/tagrelation.html?tagid=#{tag.id}&userid=#{curAgentService.userid}&dataid=#{onlineUser.id}", data-theme="theme#{tag.color ? tag.color : '1'}", data-id="#{tag.id}", data-name="#{tag.tag}") + | #{tag.tag} + i.layui-icon.layui-icon-close ဆ + - tagValue = 1 +script. + function switchbackground(ele) { + console.log(ele) + if (ele.style.background != "#32c24d") { + ele.style.background = "#32c24d"; + } else { + ele.style.background = "none"; + } + } + diff --git a/contact-center/app/src/main/resources/templates/apps/agent/channel/phone.html b/contact-center/app/src/main/resources/templates/apps/agent/channel/phone.html deleted file mode 100644 index d3a80a4e..00000000 --- a/contact-center/app/src/main/resources/templates/apps/agent/channel/phone.html +++ /dev/null @@ -1,116 +0,0 @@ -
                -
              • - 访问渠道: - 语音 -
              • - <#if pbxHost??> -
              • - 接入线路:${pbxHost.name!''}(${pbxHost.hostname!''}) -
              • - - -
              • - 主叫号码: - - <#if statusEvent??>${statusEvent.discaller!''} - -
              • -
              • - 被叫号码:<#if statusEvent??>${statusEvent.discalled!''} -
              • -
              • - 类型:<#if statusEvent??>${statusEvent.calltype!''} -
              • -
              • - 主叫方:<#if statusEvent??>${statusEvent.host!''} -
              • -
              • - IP地址:<#if statusEvent??>${statusEvent.ipaddr!''} -
              • -
              • - 拨打时间:<#if statusEvent??>${statusEvent.localdatetime!''} -
              • - <#if mobileAddress??> -
              • - 来电省份:${mobileAddress.province!''} -
              • -
              • - 来电城市:${mobileAddress.city!''} -
              • -
              • - 运营商:${mobileAddress.isp!''} -
              • - - -
              • - 来电类型: - <#if extensionList?? && extensionList?size gt 0> - 内线 - <#else> - 外线 - -
              • - <#list uKeFuDic["com.dic.callcenter.comment"] as comment> - <#if statusEvent.satisfaction?? && comment.code== statusEvent.satisfaction > -
              • - 满意度评价: ${comment.name} -
              • -
              • - <#if statusEvent.satisfdate??>评价时间:${statusEvent.satisfdate?string('yyyy-MM-dd HH:mm:ss')} -
              • - - -
              • - 满意度:<#if statusEvent.satisfaction==null>未评价 -
              • -
              • - 标签: - - <#if tagRelationList??> - <#list tagRelationList as tagRelation> - <#if tags??> - <#list tags as tag> - <#if tag.id == tagRelation.tagid> - ${tag.tag!''} - - - - - - -
                - -
                - <#if tags??> - <#list tags as tag> -
                ${tag.tag!''}
                - - -
                -
                -
              • -
              - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/agent/channel/phone.pug b/contact-center/app/src/main/resources/templates/apps/agent/channel/phone.pug new file mode 100644 index 00000000..5a9c7a01 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/agent/channel/phone.pug @@ -0,0 +1,119 @@ +//- + 原始 Freemarker 文件位置:https://gitlab.chatopera.com/chatopera/cskefu/blob/760e130e770a96a43e8f6f2c8a1eb0885c0bbf90/contact-center/app/src/main/resources/templates/apps/agent/channel/phone.html + 该页面项目中暂时没有使用,此处是没有完全转化的 Pug 文件 + 如果提供这个页面,需要参考 Freemarker 原文件完成转化或参考实现 + +html + head + body + ul.info-list + li.ukefu-channel-tip + | +访问渠道: + i.kfont(style='position: relative;')  + | +语音 + + // <#if pbxHost??> + //
            • + // 接入线路:${pbxHost.name!''}(${pbxHost.hostname!''}) + //
            • + // + li + | +主叫号码: + + span.tgreen + // <#if statusEvent??>${statusEvent.discaller!''} + li + // 被叫号码:<#if statusEvent??>${statusEvent.discalled!''} + li + // 类型:<#if statusEvent??>${statusEvent.calltype!''} + li + // 主叫方:<#if statusEvent??>${statusEvent.host!''} + li + // IP地址:<#if statusEvent??>${statusEvent.ipaddr!''} + li + // 拨打时间:<#if statusEvent??>${statusEvent.localdatetime!''} + // <#if mobileAddress??> + //
            • + // 来电省份:${mobileAddress.province!''} + //
            • + //
            • + // 来电城市:${mobileAddress.city!''} + //
            • + //
            • + // 运营商:${mobileAddress.isp!''} + //
            • + // + li + | +来电类型: + + // <#if extensionList?? && extensionList?size gt 0> + // 内线 + // <#else> + // 外线 + // + // <#list uKeFuDic["com.dic.callcenter.comment"] as comment> + // <#if statusEvent.satisfaction?? && comment.code== statusEvent.satisfaction > + //
            • + // 满意度评价: ${comment.name} + //
            • + //
            • + // <#if statusEvent.satisfdate??>评价时间:${statusEvent.satisfdate?string('yyyy-MM-dd HH:mm:ss')} + //
            • + // + // + li + // 满意度:<#if statusEvent.satisfaction==null>未评价 + li(style='position: relative;') + | +标签: + + span#tags + // <#if tagRelationList??> + // <#list tagRelationList as tagRelation> + // <#if tags??> + // <#list tags as tag> + // <#if tag.id == tagRelation.tagid> + // ${tag.tag!''} + // + // + // + // + // + .ukefu-tag-add + a#tag(href='javascript:void(0)') + i.layui-icon  + dl.ukefu-tag-list.layui-anim.layui-anim-upbit#taglist + // <#if tags??> + // <#list tags as tag> + //
              ${tag.tag!''}
              + // + // + script. + + layui.use('layer', function() { + layer = layui.layer; + $('#tag').click(function() { + $('#taglist').show(); + }) + $('.tag-switch').click( + function() { + if ($('#tag_' + $(this).data("id")).length > 0) { + $('#tag_' + $(this).data("id")).remove(); + } else { + $("#tags").append( + "" + + $(this).data("name") + ""); + } + loadURL($(this).data("href")); + }); + $("#taglist").hover(null, function() { + $(this).hide(); + }); + }); + diff --git a/contact-center/app/src/main/resources/templates/apps/agent/channel/skype.html b/contact-center/app/src/main/resources/templates/apps/agent/channel/skype.html deleted file mode 100644 index 07e50b06..00000000 --- a/contact-center/app/src/main/resources/templates/apps/agent/channel/skype.html +++ /dev/null @@ -1,160 +0,0 @@ -
                -
              • - 访问渠道: - Skype -
              • - -
              • - 服务小结: <#if summary??> - 已记录 - <#else> - 未记录 - -
              • - -
              • - 渠道名称:${snsAccount.name!''} -
              • -<#if onlineUser?? && onlineUser.source?? > -
              • - 首次访问来源: - - ${onlineUser.source!''} - -
              • - - -<#if onlineUser?? && onlineUser.region?? > -
              • - 位置:${curagentuser.region!''} -
              • - - -<#if serviceCount?? > -
              • - 访问次数:${serviceCount!0}次 -
              • - - -<#if curagentuser.title?? && curagentuser.url??> -
              • - 进入页面:<#if curagentuser.title?length gt 15>${curagentuser.title[0..15]}<#else>${curagentuser.title} -
              • - -
              • - 访问轨迹: - 轨迹 - -
              • - -<#if onlineUser?? && onlineUser.betweentime?? > -
              • - 停留时间: - <#if onlineUser?? && onlineUser.betweentime??> - ${(onlineUser.betweentime/(1000*60*60))?string('00')}:${((onlineUser.betweentime%(1000*60*60))/(1000*60))?string('00')}:${((onlineUser.betweentime%(1000*60))/(1000))?string('00')} - -
              • - - -<#if onlineUser?? && onlineUser.browser?? > -
              • - 访问浏览器: - ${onlineUser.browser!''} -
              • - - -<#if onlineUser?? && onlineUser.opersystem?? > -
              • - 操作系统: - - <#if onlineUser.opersystem?? && onlineUser.opersystem == "windows"> - - <#elseif onlineUser.opersystem?? && onlineUser.opersystem == "linux"> - - <#elseif onlineUser.opersystem?? && onlineUser.opersystem == "mac"> - - - ${onlineUser.opersystem!''} - -
              • - - -<#if onlineUser?? && onlineUser.mobile?? > -
              • - 访问终端: - - <#if onlineUser.mobile?? && onlineUser.mobile == "1"> - 移动 - <#else> - PC - - -
              • - - -
              • - 标签: - - <#if tagRelationList??> - <#list tagRelationList as tagRelation> - <#if tags??> - <#list tags as tag> - <#if tag.id == tagRelation.tagid> - ${tag.tag!''} - - - - - - -
                - -
                - <#if tags??> - <#list tags as tag> - - <#assign tagValue = 0> - - <#if tagRelationList??> - <#list tagRelationList as tagRelation> - <#if tag.id == tagRelation.tagid> - <#assign tagValue = 1> - - - - - -<#if tagValue == 1> -
                - ${tag.tag!''} - - -
                -<#assign tagValue = 1> -<#else> -
                - ${tag.tag!''} - - -
                -<#assign tagValue = 1> - - - - -
                -
                -
              • -
              - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/agent/channel/skype.pug b/contact-center/app/src/main/resources/templates/apps/agent/channel/skype.pug new file mode 100644 index 00000000..d40a908f --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/agent/channel/skype.pug @@ -0,0 +1,152 @@ +//- + 原始 Freemarker 文件位置:https://gitlab.chatopera.com/chatopera/cskefu/blob/760e130e770a96a43e8f6f2c8a1eb0885c0bbf90/contact-center/app/src/main/resources/templates/apps/agent/channel/skype.html + 该页面需要使用Skype插件,此处是没有完全转化的 Pug 文件 + 如果提供这个页面,需要参考 Freemarker 原文件完成转化或参考实现 +ul.info-list + li.ukefu-channel-tip + | +访问渠道: +i.csfont  +span Skype +li.ukefu-channel-tip + | +服务小结: + +// <#if summary??> +// 已记录 +// <#else> +// 未记录 +// +li.ukefu-channel-tip. + + 渠道名称:${snsAccount.name!''} + +// <#if onlineUser?? && onlineUser.source?? > +//
            • +// 首次访问来源: +// +// ${onlineUser.source!''} +// +//
            • +// +// <#if onlineUser?? && onlineUser.region?? > +//
            • +// 位置:${curagentuser.region!''} +//
            • +// +// <#if serviceCount?? > +//
            • +// 访问次数:${serviceCount!0}次 +//
            • +// +// <#if curagentuser.title?? && curagentuser.url??> +//
            • +// 进入页面:<#if curagentuser.title?length gt 15>${curagentuser.title[0..15]}<#else>${curagentuser.title} +//
            • +// +li + | +访问轨迹: +a(href='/service/trace.html?sessionid=${curagentuser.sessionid!\'\'}', title='查看访客轨迹', data-toggle='ajax', data-width='1050', style='margin-left:10px;') + i.kfont  + | 轨迹 + +// <#if onlineUser?? && onlineUser.betweentime?? > +//
            • +// 停留时间: +// <#if onlineUser?? && onlineUser.betweentime??> +// ${(onlineUser.betweentime/(1000*60*60))?string('00')}:${((onlineUser.betweentime%(1000*60*60))/(1000*60))?string('00')}:${((onlineUser.betweentime%(1000*60))/(1000))?string('00')} +// +//
            • +// +// <#if onlineUser?? && onlineUser.browser?? > +//
            • +// 访问浏览器: +// ${onlineUser.browser!''} +//
            • +// +// <#if onlineUser?? && onlineUser.opersystem?? > +//
            • +// 操作系统: +// +// <#if onlineUser.opersystem?? && onlineUser.opersystem == "windows"> +// +// <#elseif onlineUser.opersystem?? && onlineUser.opersystem == "linux"> +// +// <#elseif onlineUser.opersystem?? && onlineUser.opersystem == "mac"> +// +// +// ${onlineUser.opersystem!''} +// +//
            • +// +// <#if onlineUser?? && onlineUser.mobile?? > +//
            • +// 访问终端: +// +// <#if onlineUser.mobile?? && onlineUser.mobile == "1"> +// 移动 +// <#else> +// PC +// +// +//
            • +// +li(style='position: relative;') + | +标签: + +span#tags + // <#if tagRelationList??> + // <#list tagRelationList as tagRelation> + // <#if tags??> + // <#list tags as tag> + // <#if tag.id == tagRelation.tagid> + // ${tag.tag!''} + // + // + // + // + // +.ukefu-tag-add + a#tag(href='javascript:void(0)') + i.layui-icon  + dl.ukefu-tag-list.layui-anim.layui-anim-upbit#taglist + // <#if tags??> + // <#list tags as tag> + // <#assign tagValue = 0> + // <#if tagRelationList??> + // <#list tagRelationList as tagRelation> + // <#if tag.id == tagRelation.tagid> + // <#assign tagValue = 1> + // + // + // + // <#if tagValue == 1> + //
              + // ${tag.tag!''} + // + // + //
              + // <#assign tagValue = 1> + // <#else> + //
              + // ${tag.tag!''} + // + // + //
              + // <#assign tagValue = 1> + // + // + // +script. + + function switchbackground(ele) { + console.log(ele) + if (ele.style.background != "#32c24d") { + ele.style.background = "#32c24d"; + } else { + ele.style.background = "none"; + } + } + diff --git a/contact-center/app/src/main/resources/templates/apps/agent/channel/webim.html b/contact-center/app/src/main/resources/templates/apps/agent/channel/webim.html deleted file mode 100644 index 7c6e01d2..00000000 --- a/contact-center/app/src/main/resources/templates/apps/agent/channel/webim.html +++ /dev/null @@ -1,166 +0,0 @@ -
                -
              • - 访问渠道: - 在线客服 -
              • - -
              • - 服务小结: <#if summary??> - 已记录 - <#else> - 未记录 - -
              • - - <#if snsAccount??> -
              • - 渠道名称:${snsAccount.name!''} - <#if snsAccount?? && snsAccount.snstype == "webim" > - 接入网站:${snsAccount.name!''} - (${snsAccount.baseURL!''}) - -
              • - - <#if onlineUser?? && onlineUser.source?? > -
              • - 首次访问来源: - - ${onlineUser.source!''} - -
              • - - - <#if onlineUser?? && onlineUser.region?? > -
              • - 位置:${curagentuser.region!''} -
              • - - - <#if serviceCount?? > -
              • - 访问次数:${serviceCount!0}次 -
              • - - - <#if curagentuser.title?? && curagentuser.url??> -
              • - 进入页面:<#if curagentuser.title?length gt 15>${curagentuser.title[0..15]}<#else>${curagentuser.title} -
              • - -
              • - 访问轨迹: - 轨迹 - -
              • - - <#if onlineUser?? && onlineUser.betweentime?? > -
              • - 停留时间: - <#if onlineUser?? && onlineUser.betweentime??> - ${(onlineUser.betweentime/(1000*60*60))?string('00')}:${((onlineUser.betweentime%(1000*60*60))/(1000*60))?string('00')}:${((onlineUser.betweentime%(1000*60))/(1000))?string('00')} - -
              • - - - <#if onlineUser?? && onlineUser.browser?? > -
              • - 访问浏览器: - ${onlineUser.browser!''} -
              • - - - <#if onlineUser?? && onlineUser.opersystem?? > -
              • - 操作系统: - - <#if onlineUser.opersystem?? && onlineUser.opersystem == "windows"> - - <#elseif onlineUser.opersystem?? && onlineUser.opersystem == "linux"> - - <#elseif onlineUser.opersystem?? && onlineUser.opersystem == "mac"> - - - ${onlineUser.opersystem!''} - -
              • - - -<#if onlineUser?? && onlineUser.mobile?? > -
              • - 访问终端: - - <#if onlineUser.mobile?? && onlineUser.mobile == "1"> - 移动 - <#else> - PC - - -
              • - - -
              • - 标签: - - <#if tagRelationList??> - <#list tagRelationList as tagRelation> - <#if tags??> - <#list tags as tag> - <#if tag.id == tagRelation.tagid> - ${tag.tag!''} - - - - - - -
                - -
                - <#if tags??> - <#list tags as tag> - - <#assign tagValue = 0> - - <#if tagRelationList??> - <#list tagRelationList as tagRelation> - <#if tag.id == tagRelation.tagid> - <#assign tagValue = 1> - - - - - -<#if tagValue == 1> -
                - ${tag.tag!''} - - -
                -<#assign tagValue = 1> -<#else> -
                - ${tag.tag!''} - - -
                -<#assign tagValue = 1> - - - - -
                -
                -
              • -
              - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/agent/channel/webim.pug b/contact-center/app/src/main/resources/templates/apps/agent/channel/webim.pug new file mode 100644 index 00000000..fd02d061 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/agent/channel/webim.pug @@ -0,0 +1,116 @@ +ul.info-list + li.ukefu-channel-tip + | 访问渠道: + i.layui-icon  + span 在线客服 + li.ukefu-channel-tip + | 服务小结: + if summary + i.layui-icon  + | 已记录 + else + i.layui-icon  + | 未记录 + if snsAccount + li.ukefu-channel-tip + | 渠道名称:#{snsAccount.name} + if snsAccount && snsAccount.snstype == "webim" + | 接入网站:#{snsAccount.name}(#{snsAccount.baseURL}) + + if onlineUser && onlineUser.source + li + | 首次访问来源: + span.tgreen + #{onlineUser.source} + if onlineUser && onlineUser.region + li + | 位置:#{curagentuser.region} + if serviceCount + li + | 访问次数:#{serviceCount ? serviceCount : 0}次 + if curagentuser.title && curagentuser.url + li + | 进入页面: + a(href="#{curagentuser.url}", target="_blank") + if curagentuser.title && size(curagentuser.title) > 15 + - var curagentuserTitle='#{curagentuser.title}' + curagentuserTitle.substr(0,15) + else + #{curagentuser.title} + li + | 访问轨迹: + a(href="/service/trace.html?sessionid=" + curagentuser.sessionid, title="查看访客轨迹", data-toggle="ajax", data-width="1050", style="margin-left:10px;") + i.kfont  + | 轨迹 + if onlineUser && onlineUser.betweentime + li + | 停留时间 + if onlineUser && onlineUser.betweentime + | #{pugHelper.padRight(onlineUser.betweentime / (1000 * 60 * 60), "00")} : #{pugHelper.padRight(onlineUser.betweentime / (1000 * 60 * 60) / (1000 * 60), "00")} : #{pugHelper.padRight(onlineUser.betweentime / (1000 * 60) / (1000), "00")} + if onlineUser && onlineUser.browser + li + | 访问浏览器: + | #{onlineUser.browser} + if onlineUser && onlineUser.opersystem + li + | 操作系统: + span.ukefu-online-user + if onlineUser.opersystem && onlineUser.opersystem == "windows" + i.kfont  + else if onlineUser.opersystem && onlineUser.opersystem == "linux" + i.kfont  + else if onlineUser.opersystem && onlineUser.opersystem == "mac" + i.kfont  + #{onlineUser.opersystem} + if onlineUser && onlineUser.mobile + li + | 访问终端: + span.ukefu-online-user + if onlineUser.mobile && onlineUser.mobile == "1" + i.kfont  + | 移动 + else + i.kfont  + | PC + li(style="position: relative;") + | 标签: + span#tags + if tagRelationList + for tagRelation in tagRelationList + if tags + for tag in tags + if tag.id == tagRelation.tagid + small.ukefu-access-label(id="tag_#{tag.id}", class="theme#{tag.color ? tag.color : '1'}") #{tag.tag} + .ukefu-tag-add + a#tag(href="javascript:void(0)") + i.layui-icon  + dl#taglist.ukefu-tag-list.layui-anim.layui-anim-upbit + if tags + for tag in tags + - var tagValue = 0 + if tagRelationList + for tagRelation in tagRelationList + if tag.id == tagRelation.tagid + - tagValue = 1 + if tagValue == 1 + dd.labeldd(style="background: red", onclick="switchbackground(this)") + a.tag-switch(href="javascript:void(0)", data-href="/agent/tagrelation.html?tagid=#{tag.id}&userid=#{curAgentService.userid}&dataid=#{onlineUser.id}", data-theme="theme#{tag.color ? tag.color : '1'}", data-id="#{tag.id}", data-name="#{tag.tag}") + | #{tag.tag} + i.layui-icon.layui-icon-close ဆ + - tagValue = 1 + else + dd.labeldd(onclick="switchbackground(this)") + a.tag-switch(href="javascript:void(0)", data-href="/agent/tagrelation.html?tagid=#{tag.id}&userid=#{curAgentService.userid}&dataid=#{onlineUser.id}", data-theme="theme#{tag.color ? tag.color : '1'}", data-id="#{tag.id}", data-name="#{tag.tag}") + | #{tag.tag} + i.layui-icon.layui-icon-close ဆ + - tagValue = 1 +script. + function switchbackground(ele) { + console.log(ele) + if (ele.style.background != "#32c24d") { + ele.style.background = "#32c24d"; + } else { + ele.style.background = "none"; + } + } + diff --git a/contact-center/app/src/main/resources/templates/apps/agent/channel/weixin.html b/contact-center/app/src/main/resources/templates/apps/agent/channel/weixin.html deleted file mode 100644 index 8e17b08f..00000000 --- a/contact-center/app/src/main/resources/templates/apps/agent/channel/weixin.html +++ /dev/null @@ -1,70 +0,0 @@ -
              - -
              -
                -
              • - 访问渠道: - 微信 -
              • - -
              • - 服务小结: <#if summary??> - 已记录 - <#else> - 未记录 - -
              • - - <#if snsAccount??> -
              • - 公众号:${snsAccount.name} -
              • - - -
              • - 昵称: - - ${weiXinUser.nickname!''} - -
              • -
              • - 国家:${weiXinUser.country!''} -
              • -
              • - 位置:${weiXinUser.province!''} ${weiXinUser.city!''} -
              • -
              • - 访问次数:${serviceCount!0}次 -
              • -
              • - 停留时间: - <#if curAgentService.servicetime??>${curAgentService.servicetime?string("yyyy-MM-dd HH:mm:ss")} -
              • - -
              • - 标签: - - <#if tagRelationList??> - <#list tagRelationList as tagRelation> - <#if tags??> - <#list tags as tag> - <#if tag.id == tagRelation.tagid> - ${tag.tag!''} - - - - - - -
                - -
                - <#if tags??> - <#list tags as tag> -
                ${tag.tag!''}
                - - -
                -
                -
              • -
              \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/agent/contacts.html b/contact-center/app/src/main/resources/templates/apps/agent/contacts.html deleted file mode 100644 index 416520db..00000000 --- a/contact-center/app/src/main/resources/templates/apps/agent/contacts.html +++ /dev/null @@ -1,48 +0,0 @@ -<#if contacts??> -
                -
              • - 姓名:${contacts.name!''} -
              • -
              • - 性别: <#if contacts.gender?? && contacts.gender == '1'>男 - <#if contacts.gender?? && contacts.gender == '0'>女 - <#if contacts.gender?? && contacts.gender == '-1'>未知 -
              • -
              • - 生日:${contacts.cusbirthday!''} -
              • -
              • - 电话:${contacts.phone!''} -
              • -
              • - 手机:${contacts.mobileno!''} -
              • -
              • - 邮件:${contacts.email!''} -
              • -
              • - SkypeID: ${contacts.skypeid!''} -
              • -
              • - 地址:${contacts.address!''} -
              • -
              • - 类型:${uKeFuDic[contacts.ckind!''].name!''} -
              • - <#if contacts?? && contacts.touchtime??> -
              • - 获得时间:${contacts.touchtime?string('yyyy-MM-dd')} -
              • - -
              • - 备注:${contacts.memo!''} -
              • -
              -<#if models?seq_contains("workorders")> - - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/agent/contacts.pug b/contact-center/app/src/main/resources/templates/apps/agent/contacts.pug new file mode 100644 index 00000000..3ca21fa3 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/agent/contacts.pug @@ -0,0 +1,45 @@ +if contacts + ul.info-list + li.ukefu-channel-tip + | 姓名: + span.tgreen #{contacts.name} + li + | 性别: + if contacts.gender && contacts.gender == '1' + | 男 + if contacts.gender && contacts.gender == '0' + | 女 + if contacts.gender && contacts.gender == '-1' + | 未知 + li + | 生日:#{contacts.cusbirthday} + li + | 电话: + span.ukefu-phone-number #{contacts.phone} + li + | 手机: + span.ukefu-phone-number #{contacts.mobileno} + li + | 邮件:#{contacts.email} + + li + | SkypeID: #{contacts.skypeid} + + li + | 地址:#{contacts.address} + + li + | 类型:#{contacts.ckind ? uKeFuDic[contacts.ckind].name : ""} + + + if contacts && contacts.touchtime + li + | 获得时间:#{pugHelper.formatDate('yyyy-MM-dd', contacts.touchtime)} + li + | 备注:#{contacts.memo} + if models.contains("workorders") + script(language="javascript"). + $(document).ready(function(){ + // loadURL("/agent/workorders/list.html?contactsid=#{contacts.id}", "#workorders"); + }); + diff --git a/contact-center/app/src/main/resources/templates/apps/agent/index.html b/contact-center/app/src/main/resources/templates/apps/agent/index.html deleted file mode 100644 index 9bf2973c..00000000 --- a/contact-center/app/src/main/resources/templates/apps/agent/index.html +++ /dev/null @@ -1,217 +0,0 @@ - - - - - - - - - -<#if agentUserList?? && agentUserList?size gt 0> -
              -
              - <#include "/apps/agent/agentusers.html"/> -
              -
              - <#if curagentuser?? && curagentuser.channel == "phone"> -
              - <#include "/apps/agent/mainagentuser_callout.html"> -
              - <#elseif curagentuser?? && curagentuser.channel == "skype"> -
              - <#include "/apps/agent/mainagentuser_skype.html"> -
              - <#else> -
              - <#include "/apps/agent/mainagentuser.html"> -
              - -<#else> -
              -
              -
              -

              坐席对话

              -
              -
              -
              - -
              还没有分配记录
              -
              -
              -
              -
              - -<#if agentUserList?? && agentUserList?size gt 0> - - diff --git a/contact-center/app/src/main/resources/templates/apps/agent/index.pug b/contact-center/app/src/main/resources/templates/apps/agent/index.pug new file mode 100644 index 00000000..1fed6983 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/agent/index.pug @@ -0,0 +1,112 @@ +extends /apps/include/layout.pug + +block append head + link(rel="stylesheet", href="/js/ztree/zTreeStyle/zTreeStyle.css") + script(src="/js/ztree/jquery.ztree.all.min.js") + script(src="/js/utils.js") + script(src="/js/lodash-4.17.4.min.js") + script(src="/js/CSKeFu_Rest_Request.v1.js") + script. + cususerid = '#{user.id}'; + +block content + include templates/tpl.pug + if !agentUserList.empty() + .layui-side.layui-bg-black.layui-left-black + #agentusers.layui-side-scroll + include agentusers.pug + #ukefu-chat-agent.layui-body.ukefu-chat-agent + //if curagentuser.channel == "phone" + // include mainagentuser_callout.pug + //else if curagentuser.channel == "skype" + // include mainagentuser_skype.pug + //else + if curagentuser.channel == "messenger" + include mainagentuser_messenger.pug + else + include mainagentuser.pug + else + .layui-layout.layui-layout-content(style="height: 100%;") + .box.default-box(style="height: 100%;") + .box-header + h3.box-title 坐席对话 + .box-body.ukefu-im-theme + .ukefu-empty(style="background: none") + i.layui-icon  + div(style="") 还没有分配记录 + + if !agentUserList.empty() + script(language="javascript"). + $(document).ready(function () { + $(document).bind("keydown", "Ctrl+return", function (ev) { + sendMessage(); + return false; + }) + }); + function otherTopicSearch() { + console.log("otherTopicSearch") + loadURLWithTip("/agent/other/topic.html?q=" + encodeURIComponent($("#otherSearchQuery").val()), "#topiclist", null, false, true); + } + function otherTopicEnter() { + if (window.event.keyCode == 13) { + otherTopicSearch(); + } + } + function cleanTopMsgTip(tip) { + var lastMsgNum = $(tip).find('.last-msg').text(); + if (lastMsgNum) { + var num = Number.parseInt(lastMsgNum); + Proxy.cleanTopMsgTip(num) + } + } + /** + * 结束会话,RestAPI请求 + * @param agentUserId + * @param agentUserName + */ + function submitEndAgentUser(agentUserId, agentUserName) { + top.layer.confirm('请确认是否关闭和用户{0}的对话?'.format(agentUserName), { + title: "提示", + icon: 3 + }, + function (index, layero) { + top.layer.close(index); + restApiRequest({ + silent: true, + path: 'agentuser', + data: { + ops: 'end', + id: agentUserId + } + }).then(function (result) { + if (result.rc === 0) { + // 会话关闭成功 + top.layer.msg('会话已关闭', {icon: 1, time: 1000}) + // 进行显示调整! + if ($("#chat_users li").length > 1) { + $("li[remove-id=" + agentUserId + "]").remove(); + $("#chat_users li:first-child a").click(); + } else { + parent.$('#agentdesktop').click(); + } + } else if (result.rc === 1) { + top.layer.msg('不合法的请求参数!', {icon: 2, time: 3000}) + } else if (result.rc === 2) { + top.layer.msg('不合法的操作!', {icon: 2, time: 3000}) + } else if (result.rc === 3) { + top.layer.msg('没有权限执行该操作', {icon: 2, time: 3000}) + } else if (result.rc === 4) { + top.layer.msg('未找到该访客会话', {icon: 2, time: 3000}) + } + }, function (error) { + console.log("error", error); + // 服务器异常 + top.layer.msg('服务器抽风,请稍后再试!', {icon: 2, time: 3000}) + }) + }, + function (index, layro) { + top.layer.close(index); + // cancelled, do nothing + }) + } + diff --git a/contact-center/app/src/main/resources/templates/apps/agent/mainagentuser.html b/contact-center/app/src/main/resources/templates/apps/agent/mainagentuser.html deleted file mode 100644 index 20b99e35..00000000 --- a/contact-center/app/src/main/resources/templates/apps/agent/mainagentuser.html +++ /dev/null @@ -1,829 +0,0 @@ - - -
              -
              -

              -
              <#if curagentuser??>${curagentuser.username!''}<#if curagentuser.region??> ( ${curagentuser.region!''}
              - - <#else> - -

              -
              - <#if agentUserMessageList?? && agentUserMessageList.content??> - <#list agentUserMessageList.content?reverse as chatmessage> -
              -
              - -
              - - <#if (chatmessage.islabel == true??)><#else>စ - - - <#if chatmessage?? && chatmessage.calltype?? && chatmessage.calltype == '呼出'> - ${chatmessage.intervented?string(chatmessage.supervisorname,chatmessage.username)} - <#else> - ${chatmessage.username!''} - - - ${chatmessage.createtime?string('yyyy-MM-dd HH:mm:ss')} - - <#if (chatmessage.islabel == true??)><#else>စ - -
              -
              - -
              <#include "/apps/agent/media/message.html">
              -
              -
              -
              - -<#elseif curagentuser??> -<#if curagentuser.status?? && curagentuser.status == "end"> -
              - 用户“${curagentuser.username!''}”已经离开 -
              -<#else> -
              - 用户“${curagentuser.username!''}”开始对话 -
              - - -
              -
              -
              - -
              -
              - - - - -
              -
              -
              -
              -
              -
              -
              -
              -
                -
              • 访客
              • - <#if aisuggest?? && aisuggest == true> -
              • - 智能机器人 - -
              • - -
              • 历史
              • -
              • 搜索历史消息
              • - <#if models?seq_contains("workorders")> -
              • 工单
              • - - <#if sessionConfig?? && sessionConfig.otherquickplay?? && sessionConfig.otherquickplay == true> -
              • 知识库
              • - -
              -
              -
              -
              -
              -

              - 访问信息 -
              - -
              -

              -
              -
              - <#if curagentuser.channel?? && curagentuser.channel == "webim"> - <#include "/apps/agent/channel/webim.html"> - - <#if curagentuser.name??> -
                -
              • - 姓名: - - ${curagentuser.name!''} - -
              • - <#if curagentuser.phone??> -
              • - 电话: - - ${curagentuser.phone!''} - -
              • - - <#if curagentuser.email??> -
              • - 邮件: - - ${curagentuser.email!''} - -
              • - - <#if curagentuser.resion??> -
              • - 来访原因: - - ${curagentuser.resion!''} - -
              • - -
              - - <#if curAgentService?? && curAgentService.trans?? && curAgentService.trans> -
                -
              • - 转接: - - - -
              • - <#if curAgentService.transtime??> -
              • - 转接时间: - - ${curAgentService.transtime?string("yyyy-MM-dd HH:mm:ss")} - -
              • - - <#if curAgentService.transmemo??> -
              • - 转接附言: - - ${curAgentService.transmemo!''} - -
              • - -
              - -
              -
              -<#if models?seq_contains("contacts")> -
              -
              -

              - 联系人 -
              - -
              -

              -
              -
              - <#include "/apps/agent/contacts.html"> -
              -
              - -
              - -<#if aisuggest?? && aisuggest == true> -
              -
              -
              -

              - 知识库快捷 -

              -
              -
              -
                -
              • -
                - -
                未触发知识库查询
                -
                -
              • -
              -
              -
              -
              - - -
              -
              -
              -

              -
              -
              - -

              全部

              -
              -
              - -

              标注

              -
              -
              - - -

              -

              -
              - -
              -
              - -
              -

              请输入搜索内容

              -
              - - -
              -
                -
              -
              -
              -
              -<#if models?seq_contains("workorders")> -
              - <#if workOrdersList?? && workOrdersList?size gt 0> - <#include "/apps/agent/workorders.html"> - -
              - -<#if sessionConfig?? && sessionConfig.otherquickplay?? && sessionConfig.otherquickplay == true> -
              -
              -
              -

              - 知识列表 - -
              - - -
              -
              -

              -
              -
              - <#include "/apps/agent/othertopic.html"> -
              -
              -
              - -
              -
              - -
              -
              -
              - - diff --git a/contact-center/app/src/main/resources/templates/apps/agent/mainagentuser.pug b/contact-center/app/src/main/resources/templates/apps/agent/mainagentuser.pug new file mode 100644 index 00000000..bad4ce5c --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/agent/mainagentuser.pug @@ -0,0 +1,691 @@ +script(language='javascript'). + cursession = '#{curagentuser.userid}'; + var userid = '#{curagentuser.userid}', + agentserviceid = '#{curagentuser.agentserviceid}', + agentuserid = '#{curagentuser.id}', + masscuragentuser = '#{masscuragentuser}', + isAisuggest = '#{aisuggest}'; +.main-agentuser + .chat-agent + h1.site-h1 + if curagentuser + div(style="width:250px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-wrap: break-word;word-break: break-all;") + | #{curagentuser.username}(#{curagentuser.region}) + .ukefu-service-btn(style="float:right;") + a(href="/agent/summary.html?userid=" + curagentuser.userid + "&agentserviceid=" + curagentuser.agentserviceid + "&agentuserid=" + curagentuser.id + "&channel=" + curagentuser.channel, data-toggle="ajax", data-width="950", data-height="450", title="记录服务小结") + button.layui-btn.layui-btn-small + i.kfont  + | 服务小结 + a(href="/agent/transfer.html?userid=" + curagentuser.userid + "&agentserviceid=" + curagentuser.agentserviceid + "&agentuserid=" + curagentuser.id, data-toggle="ajax", data-width="750", data-height="550", title="选择转接对象") + button.layui-btn.layui-btn-small(style="margin:0 5px") + i.kfont  + | 转接坐席 + a(href="javascript:void(0)", onclick="submitEndAgentUser('#{curagentuser.id}','#{curagentuser.username}')") + button.layui-btn.layui-btn-small.layui-btn-danger + i.kfont  + | 结束对话 + #chat_msg_list.chat-message.chat_msg_list(style='position: relative') + if agentUserMessageList && agentUserMessageList.content + for chatmessage in pugHelper.reverse(agentUserMessageList.content) + .clearfix.chat-block(name=chatmessage.createtime) + div(class=(chatmessage.calltype && chatmessage.calltype == '呼出' ? 'chat-right' : 'chat-left')) + img.user-img(alt="", src=(chatmessage.calltype && chatmessage.calltype == '呼出' ? '/images/agent.png' : curagentuser.headimgurl && curagentuser.headimgurl != '' ? curagentuser.headimgurl : '/images/im/user.png'), style="width:45px;height:45px;") + .chat-message + span(class=(chatmessage.calltype && chatmessage.calltype == '呼出' ? 'rateright' : 'rateleft')) + i.layui-icon.iconclick(id=chatmessage.id, name=(chatmessage.islabel == true ? 'yeslabe' : 'nolabe'), style="font-size:30px;cursor:pointer;color: #{chatmessage.islabel == true ? '#46cad4' : '#aaaaaa'}") + | #{chatmessage.islabel == true ? '' : 'စ'} + span.user + if chatmessage && chatmessage.calltype && chatmessage.calltype == '呼出' + if chatmessage.intervented + | #{chatmessage.supervisorname} + else + | #{chatmessage.username} + else + | #{chatmessage.username} + span.time= pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', chatmessage.createtime) + span(class=(chatmessage.calltype && chatmessage.calltype == '呼出' ? 'rateleft' : 'rateright'), style="cursor: pointer; font-size: 30px") + i.layui-icon.iconclick(id=chatmessage.id, name=(chatmessage.islabel == true ? 'yeslabe' : 'nolabe'), style="cursor:pointer;font-size:30px;color: #{chatmessage.islabel == true ? '#46cad4' : '#aaaaaa'}") + | #{chatmessage.islabel == true ? '' : 'စ'} + div(class=(chatmessage.calltype && chatmessage.calltype == '呼出' ? 'chatting-right' : 'chatting-left')) + i.userarrow + .chat-content + include /apps/agent/media/message.pug + else if curagentuser + if curagentuser.status && curagentuser.status == "end" + #agentuser-curstatus.clearfix.chat-block.connect-end + span.connect-message 用户#{curagentuser.username}已经离开 + else + #agentuser-curstatus.clearfix.chat-block.connect-begin + span.connect-message 用户#{curagentuser.username}开始对话 + .chat-bottom + #agentAnswer(style='width: 50%;min-width:310px;height: 180px;border: 1px solid #eee;position: absolute;top: -180px;right:0px;background: #ffffff;display: none') + h1.site-h1(style='background-color:#EEEEEE;padding: 0px 10px') + | 知识库联想 + i.layui-icon(style='position: absolute;top: 0px;right: 5px;font-size:16px;z-index: 10', onclick='showOrHide(\'none\')') ဆ + div(style='width: calc(100% - 19px);height: 129px;position: absolute;top: 31px;overflow-y: scroll;padding: 10px 10px') + ul.info-list.ukefu-quick-reply#quickReplyAgentBox(style='width: 100%;height: auto'). + .row + .col-lg-12 + textarea#message(name='message') + button.send-btn(type='button', onclick='sendMessage()') + | 发送 + style. + .ke-container { + border: 0px solid #E0E0E0 !important; + } + script(language='javascript'). + var editor, layer; + 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: '满意度评价' + }); + $(document).ready(function () { + // KindEditor.ready(function(K) { + var K = KindEditor; + editor = K.create('#message', { + height: "160px", + themeType: 'simple', + width: "100%", + items: ['emoticons', 'image', 'insertfile', 'evaluation'], + resizeType: 0, + uploadJson: "/agent/image/upload.html?id=" + "#{curagentuser.id}", + allowFileManager: false, + newlineTag: "br", + fontsize: 16, + allowFileUpload: true, + allowInsertUpload: false, //增加的参数,上传图片后是否插入到当前区域 + allowImageRemote: false, + afterUpload: function (url) { + return false; + }, + afterCreate: function () { //设置编辑器创建后执行的回调函数 + var self = this; + if ('#{sessionConfig}' && '#{sessionConfig.agentctrlenter}' && '#{sessionConfig.agentctrlenter}' == true) { + //Ctrl+Enter提交表单 + K.ctrl(document, 13, function () { + self.sync(); + sendMessage(); + }); + K.ctrl(self.edit.doc, 13, function () { + self.sync(); + sendMessage(); + }); + } else { + var kindEditorIframe = $("iframe").contents().find("body"); + kindEditorIframe.keydown(function (event) { + if (event.keyCode == 13 && !event.ctrlKey) { + self.sync(); + sendMessage(); + return false; + } else if (event.keyCode == 13 && event.ctrlKey) { + editor.insertHtml('
              '); + } + }); + //Ctrl+Enter提交表单 + K.ctrl(document, 13, function () { + editor.insertHtml('
              '); + }); + K.ctrl(self.edit.doc, 13, function () { + editor.insertHtml('
              '); + }); + } + } + }); + // }); + KindEditor.options.cssData = "body {font - size: 15px; font-family:'Microsoft Yahei', 'Helvetica', 'Simsun', 'Arial';}"; + var agentEnterInput = $("iframe").contents().find("body"); + agentEnterInput.keyup(function (event) { + if (isAisuggest && isAisuggest == "true") { + debouncefun(); + } + }) + var debouncefun = _.debounce(agentQuickReply, 500) + + function agentQuickReply() { + restApiRequest({ + silent: true, + path: 'chatbot', + data: { + ops: 'faq', + snsaccountid: "#{curagentuser.appid}", + userId: "#{curagentuser.userid}", + textMessage: editor.html() + } + }).then(function (result) { + if (result.rc === 0) { + if (result.data.length > 0) { + $("#quickReplyAgentBox").html(""); + $.each(sortByKey(result.data, 'score'), function (j, n) { + var answerList = result.data[j].replies; + var answer; + for (var i = 0; i < answerList.length; i++) { + if (answerList[i].rtype == 'plain' && answerList[i].enabled == true) { + answer = answerList[i] + break; + } + } + if (answer) { + var li = '
            • \n' + + '
              问题:' + result.data[j].post + '
              \n' + + '
              \n' + + '

              答案:' + answer.content + '

              \n' + + ' \n' + + '
              \n' + + '
            • ' + $("#quickReplyAgentBox").append(li); + } + if (i > 4) { + return false; + } + }); + showOrHide('block') + } else { + showOrHide('none') + } + } else { + showOrHide('none') + } + }, function (error) { + console.log("error", error); + // 服务器异常 + top.layer.msg('服务器抽风,请稍后再试!', {icon: 2, time: 3000}) + }) + } + }); +.ukefu-chat-prop + .ukefu-prop-list + .layui-side-scroll + .layui-tab(style='margin-top:0px;') + ul.layui-tab-title + li.layui-this 访客 + if aisuggest && aisuggest == true + li#robot(onclick="$('#dot').css('display','none')") + span 智能机器人 + span#dot(style=" width: 7px;height: 7px;background: red;-moz-border-radius: 50%;-webkit-border-radius: 50%;border-radius: 50%;position: absolute;top: 5px;display: none") + li 历史 + li 搜索历史消息 + .layui-tab-content(style='padding: 5px 0px 0px;') + .layui-tab-item.layui-show + .box + .box-title + h1.site-h1(style='background-color:#EEEEEE;') + | 访问信息 + div(style='float:right;') + button.layui-btn.layui-btn-small.layui-btn-radius.layui-btn-danger(href='/agent/blacklist/add.html?userid=#{curagentuser.userid}&agentserviceid=#{curagentuser.agentserviceid}&agentuserid=#{curagentuser.id}×=#{serviceCount ? serviceCount : 0}&chattime=#{(onlineUser && onlineUser.betweentime ? onlineUser.betweentime : 0)}', data-toggle='ajax', data-title='拉黑访客', data-width='900') 拉黑访客 + .box-body(style='padding:0px 10px;position: relative;') + if curagentuser.channel && curagentuser.channel == "webim" + include /apps/agent/channel/webim.pug + //else if curagentuser.channel && curagentuser.channel == "skype" + // include /apps/agent/channel/skype.pug + if curagentuser.name + ul.info-list + li + | 姓名: + span.tgreen + = curagentuser.name + if curagentuser.phone + li + | 电话: + span.tgreen + = curagentuser.phone + if curagentuser.email + li + | 邮件: + span.tgreen + = curagentuser.email + if curagentuser.resion + li + | 来访原因: + span.tgreen + = curagentuser.resion + if curAgentService && curAgentService.trans && curAgentService.trans == true + ul.info-list + li + | 转接: + span.tgreen + i.layui-icon(style="color:#19a55d;")  + if curAgentService.transtime + li + | 转接时间: + span.tgreen + | #{pugHelper.formatDate('HH:mm:ss', curAgentService.transtime)} + if curAgentService.transmemo + li + | 转接附言: + span.tgreen + = curAgentService.transmemo + if models.contains("contacts") + .box + .box-title + h1.site-h1(style="background-color:#EEEEEE;") + | 联系人 + div(style="float:right;") + button.layui-btn.layui-btn-small.layui-btn-normal(href="/apps/contacts/embed/index.html?userid=#{curagentuser.userid}&agentserviceid=#{curagentuser.agentserviceid}&agentuserid=#{curagentuser.id}×=#{serviceCount ? serviceCount : 0}&chattime=#{(onlineUser && onlineUser.betweentime ? onlineUser.betweentime : 0)}", data-toggle="ajax", title="请选择联系人", data-width="950", data-height="500") 关联联系人 + #ukefu_contacts_info.box-body(style="padding:0px 10px;") + include /apps/agent/contacts.pug + if aisuggest && aisuggest == true + .layui-tab-item + .box + .box-title + h1.site-h1(style="background-color:#EEEEEE;") + | 知识库快捷 + .box-body(style="padding:0px 10px;") + ul#quickReplyBox.info-list.ukefu-quick-reply + li(style="list-style: none;background-image: url();padding: 50px 0 50px;") + .ukefu-empty(style="background: none") + i.layui-icon  + div(style="") 未触发知识库查询 + .layui-tab-item + .box + .box-title + h1.site-h1(style="background-color:#EEEEEE;") + | 历史记录 + .box-body(style="padding:0px 10px;") + ul.info-list.ukefu-quick-reply + if agentServiceList && !agentServiceList.empty() + for agentService in agentServiceList + li.ukefu-agentservice-list + a(href="/service/online/chatmsg.html?id=" + agentService.id + "&title=false", data-toggle="ajax", data-width="950", data-height="500", data-title="服务记录") + span.quick-reply(style="overflow: hidden;text-overflow: ellipsis;white-space:nowrap;max-width:48%;display: inline-block;", data-id="content_" + agentService.id, title=agentService.username)= agentService.username + .ukefu-agentservice-his(style="overflow: hidden;text-overflow: ellipsis;white-space:nowrap;max-width:48%;", title=agentService.agentusername) 坐席:#{agentService.agentusername} + div(style="color:#333;position: relative;") + | #{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', agentService.servicetime)} + .ukefu-agentservice-his + | 时长:#{pugHelper.padRight(agentService.sessiontimes / (1000 * 60 * 60), "00")}:#{pugHelper.padRight((agentService.sessiontimes % (1000 * 60 * 60)) / (1000 * 60), "00")}:#{pugHelper.padRight((agentService.sessiontimes % (1000 * 60)) / (1000), "00")} + else + li(style="list-style: none;background-image: url();padding: 50px 0 50px;") + .ukefu-empty(style="background: none") + i.layui-icon  + div(style="") 还没有咨询记录 + .layui-tab-item + .box + .box-title + h1.site-h1(style='background-color:#ffffff;') + div(style='width:60%;height:40px;margin:0 auto ;display: -webkit-flex;display: flex;-webkit-justify-content:space-between;justify-content: space-between;') + #all.unselected(style='margin-top: 5px;height:30px;') + i.layui-icon(style='cursor: pointer;font-size:18px; float: left;margin:0 2px;')  + p(style='line-height: 30px') 全部 + #searchlabel.unselected(style='margin-top: 5px;height:30px;') + i.layui-icon(style='cursor: pointer;font-size:18px; float: left;margin:0 2px;') စ + p(style='line-height: 30px') 标注 + .searchbox(style='width: 300px;height:30px;border-radius: 5px;background:#f2f3f5; margin: 0 auto 10px;clear: both;border: 1px solid rgb(210, 210, 210);overflow: hidden;') + i#search.csfont(style='cursor: pointer;float: left;margin:0 0 0 50px;font-size: 24px;color: #757575')  + input#searchconter(style='width: 150px;height: 30px;border: none;background:#f2f3f5;', type='text', name='title', required, lay-verify='required', placeholder=' 请输入搜索内容', autocomplete='off') + #searchSubmit(style='cursor:pointer') 搜索 + #nothing(style='margin-top: 150px') + div(style='width: 120px;height: 120px;margin: 0 auto') + i.csfont(style='font-size: 120px;color:#00a65a')  + p#nothingTxt(style='text-align: center;color: #7e8790') 请输入搜索内容 + // ${agentUserMessageNum!''} + .box-body(style='padding:0px 10px;margin-top: 20px') + ul.info-list.ukefu-quick-reply#searchlist. +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; + left: 45%; + } + + .chat-left .chat-message .rateright { + display: inline-block; + } + + .chat-left .chat-message .rateleft { + display: none; + } + + .chat-right .chat-message .rateright { + display: inline-block; + } + + .chat-right .chat-message .rateleft { + display: none; + } + + #numSearches { + text-align: left; + clear: both; + color: #7e8790; + margin-left: 10px; + } + + #numSearches span { + color: #000; + } + + #searchSubmit { + float: right; + width: 50px; + background: #25c571; + text-align: center; + color: #fff; + } + + .unselected { + margin-left: 10px; + width: 55px; + height: 30px; + float: left; + font-size: 16px; + text-align: center; + line-height: 30px; + color: #fff; + border-radius: 5px; + font-weight: 400; + } + + .unselected i, .unselected p { + color: #000; + } + + .selected i, .selected p { + color: #00a65a; + font-weight: bold; + } + + .nowrap { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + width: calc(100% - 40px); + } +script. + if (#{models.contains("chatbot")}) { + $(document).ready(function () { + if (isAisuggest && isAisuggest == "true") { + switchQuickReply(); + } + }) + } + chatScorllBottom('chat_msg_list'); + layui.use('element', function () { + var element = layui.element(); + }); + layui.use('layer', function () { + layer = layui.layer; + $('#tag').click(function () { + $('#taglist').show(); + }) + $('.tag-switch').click( + function () { + if ($('#tag_' + $(this).data("id")).length > 0) { + $('#tag_' + $(this).data("id")).remove(); + } else { + $("#tags").append( + "" + + $(this).data("name") + ""); + } + loadURL($(this).data("href")); + }); + $("#taglist").hover(null, function () { + $(this).hide(); + }); + $('.quick-reply').click(function () { + var target = $(this).data("id"); + if ($('#' + target).is(":hidden")) { + $('#' + target).show(); + } else { + $('#' + target).hide(); + } + }); + $('.quick-reply-content').click(function () { + if (editor != null) { + var quickReply = $(this).html(); + if (editor.count("text") == 0) { + editor.html(quickReply); + } else { + top.layer.confirm("您已经输入了内容,覆盖当前输入框中内容?", {icon: 3, title: '覆盖提示'}, function (index) { + top.layer.close(index); + editor.html(quickReply); + }); + } + } + }); + }); + + function sendMessage() { + editor.sync(); + var count = editor.count("text"); + if (count > 0) { + var message = document.getElementById('message').value; + top.WebIM.sendMessage(message, "#{user.id}", "#{curagentuser.appid}", "#{user.sessionid}", "#{orgi ? orgi : ''}", "#{curagentuser.userid}", "#{user.username}"); + } + editor.html(''); + showOrHide('none'); + }; + + // function chooseAnswer(data){ + // editor.html(data) + // } + function showOrHide(data) { + $("#agentAnswer").css("display", data) + } + + // 排序 + function sortByKey(array, key) { + return array.sort(function (a, b) { + var x = a[key]; + var y = b[key]; + return ((x < y) ? -1 : ((x > y) ? 1 : 0)); + }); + } + + function switchQuickReply() { + var hatContentHtml = $("#chat_msg_list .chat-block").last().find(".chatting-left .chat-content").html(); + if ($.trim(hatContentHtml)) { + restApiRequest({ + silent: true, + path: 'chatbot', + data: { + ops: 'faq', + snsaccountid: '#{curagentuser.appid}', + userId: "#{curagentuser.userid}", + textMessage: hatContentHtml + } + }).then(function (result) { + if (result.rc === 0) { + if (result.data.length > 0) { + $("#quickReplyBox").html(""); + $.each(sortByKey(result.data, 'score'), function (j, n) { + var answerList = result.data[j].replies; + var answer; + for (var i = 0; i < answerList.length; i++) { + if (answerList[i].rtype == 'plain' && answerList[i].enabled == true) { + answer = answerList[i] + break; + } + } + if (answer) { + var li = '
            • \n' + + '
              问题:' + result.data[j].post + '
              \n' + + '
              \n' + + '

              答案:' + answer.content + '

              \n' + + ' \n' + + '
              \n' + + '
            • ' + $("#quickReplyBox").append(li); + } + if (i > 4) { + return false; + } + }); + if (!$("#robot").hasClass('layui-this')) { + $("#dot").css("display", "inline-block") + } + } else { + $("#dot").css("display", "none") + $("#quickReplyBox").html('
            • \n' + + '
              \n' + + ' \n' + + '
              在知识库中未得到相关问题
              \n' + + '
              \n' + + '
            • '); + } + } + }, function (error) { + console.log("error", error); + // 服务器异常 + top.layer.msg('服务器抽风,请稍后再试!', {icon: 2, time: 3000}) + }) + } + } + $("#searchconter").keyup(function (event) { + if (event.keyCode == 13) { + $("#search").click(); + } + }); + + var current = 0; + + var pieces = 0; + + var searchSwitch = false; + $("#searchconter").focus(function () { + $(this).attr('placeholder', ' ') + $(".searchbox").css({"border": "1px solid #3b99fc", 'box-shadow': ' 0 0 3px 0 #3b99fc'}); + $("#search").css('margin-left', '20px'); + }); + + $("#searchconter").blur(function () { + $(this).attr('placeholder', ' 请输入搜索内容') + $(".searchbox").css({"border": "1px solid #d2d2d2", 'box-shadow': 'none'}); + $("#search").css('margin-left', '50px'); + }); + + $('#searchSubmit').click(function () { + $("#search").click(); + }) + + function search(conditionalParameter) { + $.ajax({ + url: '/agent/agentusersearch.html', + data: {'search': $('#searchconter').val(), 'id': '#{curagentuser.id}', 'condition': conditionalParameter}, + type: "post", + success: function (data) { + $('#searchlist').html(data); + var pieces = $('#numSearches').html() + if (pieces > 0) { + $('#nothing').css('display', 'none') + $('.chatblock').click(function () { + $.ajax({ + url: '/agent/agentusersearchdetails.html', + data: { + 'createtime': $(this).attr('name'), + 'id': '#{curagentuser.id}', + 'thisid': $(this).attr('id') + }, + type: "post", + success: function (data) { + $('.chat-block').remove(); + $('#chat_msg_list').prepend(data); + var element = document.getElementById("agentusersearchdetails"); + element.scrollIntoView(); + current = parseInt($('#numSearches').html()) - 11 + } + }); + }) + } else if (pieces == 0) { + $('#nothingTxt').html('无"' + $('#searchconter').val() + '"搜索结果') + $('#nothing').css('display', 'block') + } + } + }); + } + + // 点击全部 + $('#all').click(function () { + searchSwitch = false; + search('all') + $('#searchlabel .layui-icon').html('စ') + $("#searchlabel").removeClass('selected') + $("#all").addClass('selected') + }) + + //点击标注 + $('#searchlabel').click(function () { + searchSwitch = !searchSwitch; + if (searchSwitch) { + $('#searchlabel .layui-icon').html('') + $("#all").removeClass('selected') + $("#searchlabel").addClass('selected') + search('label') + } else { + $('#searchlabel .layui-icon').html('စ') + $("#searchlabel").removeClass('selected') + $("#all").addClass('selected') + search('all') + } + + }) + //点击搜索 + $('#search').click(function () { + if (searchSwitch) { + $('#searchlabel .layui-icon').html('') + $("#searchlabel").addClass('selected') + $("#all").removeClass('selected') + search('label') + } else { + $("#all").addClass('selected') + search('all') + } + }) + + layui.use('flow', function () { + var flow = layui.flow; + flow.load({ + elem: '#chat_msg_list' //流加载容器 + , scrollElem: '#chat_msg_list' //流加载容器 + , end: '没有更多了' + , isAuto: false + , done: function (page, next) { //执行下一页的回调 + //模拟数据插入 + current += 20; + setTimeout(function () { + var lis = []; + var pages = 0; + $.ajax({ + url: '/agent/agentuserpage.html', + data: {'current': current, 'id': '#{curagentuser.id}'}, + type: "post", + success: function (data) { + var element = document.getElementsByClassName("chat-block")[0]; + if (page != 1) { + element.scrollIntoView(); + } + lis = lis + data; + $('#chat_msg_list').prepend(data) + } + }); + //执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页 + //pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多 + pages = '#{agentUserMessageList.totalElements}' / 20 + next(lis.join(''), page < pages); //假设总页数为 10 + }, 500); + } + }); + }); + + $('#quickReplyAgentBox').on('click', '.chooseAnswer', function () { + editor.html($(this).data('title')) + }); + + $('#quickReplyBox').on('click', '.chooseAnswer', function () { + editor.html($(this).data('title')) + }); + diff --git a/contact-center/app/src/main/resources/templates/apps/agent/mainagentuser_callout.html b/contact-center/app/src/main/resources/templates/apps/agent/mainagentuser_callout.html deleted file mode 100644 index 85678a26..00000000 --- a/contact-center/app/src/main/resources/templates/apps/agent/mainagentuser_callout.html +++ /dev/null @@ -1,377 +0,0 @@ - - -
              -
              -

              - <#if curagentuser??>${curagentuser.username!''}(${curagentuser.region!''}) - - <#else> -   - -

              - <#if contacts?? && curagentuser??> - <#include "/apps/agent/calloutcontact/edit.html"> - <#else> - <#include "/apps/agent/calloutcontact/add.html"> - -
              -
              -<#if contacts?? && curagentuser??> - - -
              -
              -
              -
              -
              -

              往来历史

              -
              -
              -
              - - -
              -
              -
              -
              -
              -
              - - -<#else> -
              -
              -
              -
              -
                -
              • 访客
              • -
              • 历史
              • -
              -
              -
              -
              -
              -

              - 访问信息 -
              - -
              -

              -
              -
              - <#include "/apps/agent/channel/phone.html"> - <#if curagentuser.name??> -
                -
              • - 姓名: - - ${curagentuser.name!''} - -
              • - <#if curagentuser.phone??> -
              • - 电话: - - ${curagentuser.phone!''} - -
              • - - <#if curagentuser.email??> -
              • - 邮件: - - ${curagentuser.email!''} - -
              • - - <#if curagentuser.resion??> -
              • - 来访原因: - - ${curagentuser.resion!''} - -
              • - -
              - - <#if curAgentService?? && curAgentService.trans?? && curAgentService.trans> -
                -
              • - 转接: - - - -
              • - <#if curAgentService.transtime??> -
              • - 转接时间: - - ${curAgentService.transtime?string("yyyy-MM-dd HH:mm:ss")} - -
              • - - <#if curAgentService.transmemo??> -
              • - 转接附言: - - ${curAgentService.transmemo!''} - -
              • - - -
              - -
              -
              -
              - -
              -
              - -
              -
              -
              - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/agent/mainagentuser_callout.pug b/contact-center/app/src/main/resources/templates/apps/agent/mainagentuser_callout.pug new file mode 100644 index 00000000..656f9f2d --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/agent/mainagentuser_callout.pug @@ -0,0 +1,360 @@ +//- + 原始 Freemarker 文件位置:https://gitlab.chatopera.com/chatopera/cskefu/blob/760e130e770a96a43e8f6f2c8a1eb0885c0bbf90/contact-center/app/src/main/resources/templates/apps/agent/mainagentuser_callout.html + 该页面项目中暂时没有使用,此处是没有完全转化的 Pug 文件 + 如果提供这个页面,需要参考 Freemarker 原文件完成转化或参考实现 + +html + head + script(language='javascript'). + + cursession = "<#if curagentuser??>${curagentuser.userid!''}" ; + var userid = "${curagentuser.userid!''}" , agentserviceid = "${curagentuser.agentserviceid!''}" , agentuserid = "${curagentuser.id}"; + + body + .main-agentuser + .chat-agent-callout(style='height: 102%;') + h1.site-h1 + // <#if curagentuser??> + // ${curagentuser.username!''}(${curagentuser.region!''}) + // + // + // <#if contacts?? && curagentuser??> + // <#include "/apps/agent/calloutcontact/edit.html"> + // <#else> + // <#include "/apps/agent/calloutcontact/add.html"> + // + // <#if contacts?? && curagentuser??> + input#contactsId(hidden, value='${contacts.id!\'\'}') + input#creater(hidden, value='${contacts.creater!\'\'}') + .ukefu-chat-prop + .ukefu-prop-list + .layui-side-scroll + .layui-collapse + .layui-colla-item + h2.layui-colla-title 往来历史 + .layui-colla-content.layui-show + #timeline.timeline-container(type='text') + //
              + //
              + style. + + .card { + /* Add shadows to create the "card" effect */ + box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2); + transition: 0.3s; + margin-top: 5px; + } + + /* On mouse-over, add a deeper shadow */ + .card:hover { + box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2); + } + + /* Add some padding inside the card container */ + .container { + width: 100%; + word-break: break-all; + } + + script. + + function getNotesByContactId () { + // 获取数据 + var id = $('#contactsId').val(); + var payload = { + path: 'contacts/notes', + data: { ops: "fetch", contactid: id }, + }; + restApiRequest(payload).then(function (data) { + // remove a click exchange and set color to gray + // AUTH_ERROR + if(data.status && data.status === "AUTH_ERROR"){ + handleRestApiFail(data.status); + return; + } + + if(data.rc === 0){ + if(data.totalElements > 0) { + for(var item of data.data){ + $("#timeline").append('
              ' + + '
              ' + + '

              时间:' + item.updatetime + '

              ' + + '
              笔记者:' + item.creatername + '
              ' + + '
              事件类型:' + item.category + '
              ' + + '
              笔记:' + item.content + '
              ' + + '
              ' + + '
              '); + } + } + } else { + } + }, function (err) { + console.log(err) + }); + } + + // unselect tag + function unOrselectTag(id) { + var el = $("#tag_" + id); + var xid = el.attr("name"); + + if(xid){ + // unselected tag + var payload = { + path: 'contacts/tags', + data: { + ops: "remove", + xid: xid, + + }, + }; + restApiRequest(payload).then(function (data) { + if(data.status && data.status === "AUTH_ERROR"){ + handleRestApiFail(data.status); + return; + } + + if(data.rc === 0){ + console.log(data.data); + el.removeClass("ukefu-label").addClass("unselectedClass").attr("name", ""); + } else { + } + }, function (err) { + console.log(err) + }); + } else { + // select tag + var contactid = $('#contactsId').val(); + var payload = { + path: 'contacts/tags', + data: { + ops: "create", + contactid: contactid, + tagId: id, + }, + }; + + restApiRequest(payload).then(function (data) { + if(data.status && data.status === "AUTH_ERROR"){ + handleRestApiFail(data.status); + return; + } + + if(data.rc === 0){ + console.log(data.data); + el.removeClass("unselectedClass").addClass("ukefu-label").attr("name", data.data.id); + } else { + } + }, function (err) { + console.log(err) + }); + } + } + + // get tags + function getTags(){ + var id = $('#contactsId').val(); + var payload = { + path: 'contacts/tags', + data: { + ops: "fetch", + contactid: id, + }, + }; + restApiRequest(payload).then(function (data) { + if(data.status && data.status === "AUTH_ERROR"){ + handleRestApiFail(data.status); + return; + } + + if(data.rc === 0){ + var tagsData = data.data; + + for (var item of tagsData){ + if(item.tagged){ + $("#contactTags").append( + '' + item.name + '' + ); + } else { + $("#contactTags").append( + '' + item.name + '' + ); + } + } + } else { + } + }, function (err) { + console.log(err) + }); + } + + + layui.use('layer', function() { + layer = layui.layer; + + // get all notes by contact id. + getNotesByContactId(); + + // get tags + getTags() + + // add notes + $('#notesAddBtn').on('click', function(){ + var content = $('#notesContent').val() || ''; + if(!content) return; + + var id = $('#contactsId').val(); + var category = $("#notesCategory option:selected").text(); + + var payload = { + path: 'contacts/notes', + data: { + ops: "create", + contactid: id, + category: category, + content: content, + agentuser: '', + onlineuser: '' + }, + }; + restApiRequest(payload).then(function (data) { + if(data.status && data.status === "AUTH_ERROR"){ + handleRestApiFail(data.status); + return; + } + + if(data.rc === 0){ + var item = data.data; + // get all notes by contact id. + $("#timeline").prepend('
              ' + + '
              ' + + '

              时间:' + item.updatetime + '

              ' + + '
              笔记者:' + item.creatername + '
              ' + + '
              事件类型:' + category + '
              ' + + '
              笔记:' + content + '
              ' + + '
              ' + + '
              '); + } else { + } + }, function (err) { + console.log(err) + }); + }); + }); + + // <#else> + .ukefu-chat-prop + .ukefu-prop-list + .layui-side-scroll + .layui-tab(style='margin-top:0px;') + ul.layui-tab-title + li.layui-this 访客 + li 历史 + .layui-tab-content(style='padding: 5px 0px 0px;') + .layui-tab-item.layui-show + .box + .box-title + h1.site-h1(style='background-color:#EEEEEE;') + | +访问信息 + + div(style='float:right;') + button.layui-btn.layui-btn-small.layui-btn-radius.layui-btn-danger(href='/agent/blacklist/add.html?userid=${curagentuser.userid!\'\'}&agentserviceid=${curagentuser.agentserviceid!\'\'}&agentuserid=${curagentuser.id}×=${serviceCount!0}&chattime=<#if onlineUser?? && onlineUser.betweentime??>${onlineUser.betweentime}<#else>0', data-toggle='ajax', data-title='拉黑访客', data-width='900') 拉黑访客 + .box-body(style='padding:0px 10px;position: relative;') + // <#include "/apps/agent/channel/phone.html"> + // <#if curagentuser.name??> + //
                + //
              • + // 姓名: + // + // ${curagentuser.name!''} + // + //
              • + // <#if curagentuser.phone??> + //
              • + // 电话: + // + // ${curagentuser.phone!''} + // + //
              • + // + // <#if curagentuser.email??> + //
              • + // 邮件: + // + // ${curagentuser.email!''} + // + //
              • + // + // <#if curagentuser.resion??> + //
              • + // 来访原因: + // + // ${curagentuser.resion!''} + // + //
              • + // + //
              + // + // <#if curAgentService?? && curAgentService.trans?? && curAgentService.trans> + //
                + //
              • + // 转接: + // + // + // + //
              • + // <#if curAgentService.transtime??> + //
              • + // 转接时间: + // + // ${curAgentService.transtime?string("yyyy-MM-dd HH:mm:ss")} + // + //
              • + // + // <#if curAgentService.transmemo??> + //
              • + // 转接附言: + // + // ${curAgentService.transmemo!''} + // + //
              • + // + //
              + // + .layui-tab-item + .box + .box-title + h1.site-h1(style='background-color:#EEEEEE;'). + + 历史记录 + + .box-body(style='padding:0px 10px;') + ul.info-list.ukefu-quick-reply + // <#if agentServiceList?? && agentServiceList?size gt 0> + // <#list agentServiceList as agentService> + //
            • + // + // ${agentService.username!''} + //
              坐席:${agentService.agentusername!''}
              + //
              + // ${agentService.servicetime?string("yyyy-MM-dd HH:mm:ss")} + //
              时长:${(agentService.sessiontimes/(1000*60*60))?string('00')}:${((agentService.sessiontimes%(1000*60*60))/(1000*60))?string('00')}:${((agentService.sessiontimes%(1000*60))/(1000))?string('00')}
              + //
              + //
              + //
            • + // + // <#else> + //
            • + //
              + // + //
              还没有咨询记录
              + //
              + //
            • + // + // diff --git a/contact-center/app/src/main/resources/templates/apps/agent/mainagentuser_messenger.pug b/contact-center/app/src/main/resources/templates/apps/agent/mainagentuser_messenger.pug new file mode 100644 index 00000000..9388ca13 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/agent/mainagentuser_messenger.pug @@ -0,0 +1,694 @@ +script(language='javascript'). + cursession = '#{curagentuser.userid}'; + curHeadImgUrl = '!{curagentuser.headimgurl}'; + var userid = '#{curagentuser.userid}', + agentserviceid = '#{curagentuser.agentserviceid}', + agentuserid = '#{curagentuser.id}', + masscuragentuser = '#{masscuragentuser}', + isAisuggest = '#{aisuggest}'; +.main-agentuser + .chat-agent + h1.site-h1 + if curagentuser + div(style="width:250px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-wrap: break-word;word-break: break-all;") + | #{curagentuser.username} + .ukefu-service-btn(style="float:right;") + a(href="/agent/summary.html?userid=" + curagentuser.userid + "&agentserviceid=" + curagentuser.agentserviceid + "&agentuserid=" + curagentuser.id + "&channel=" + curagentuser.channel, data-toggle="ajax", data-width="950", data-height="450", title="记录服务小结") + button.layui-btn.layui-btn-small + i.kfont  + | 服务小结 + a(href="/agent/transfer.html?userid=" + curagentuser.userid + "&agentserviceid=" + curagentuser.agentserviceid + "&agentuserid=" + curagentuser.id, data-toggle="ajax", data-width="750", data-height="550", title="选择转接对象") + button.layui-btn.layui-btn-small(style="margin:0 5px") + i.kfont  + | 转接坐席 + a(href="javascript:void(0)", onclick="submitEndAgentUser('#{curagentuser.id}','#{curagentuser.username}')") + button.layui-btn.layui-btn-small.layui-btn-danger + i.kfont  + | 结束对话 + #chat_msg_list.chat-message.chat_msg_list(style='position: relative') + if agentUserMessageList && agentUserMessageList.content + for chatmessage in pugHelper.reverse(agentUserMessageList.content) + .clearfix.chat-block(name=chatmessage.createtime) + div(class=(chatmessage.calltype && chatmessage.calltype == '呼出' ? 'chat-right' : 'chat-left')) + img.user-img(alt="", src=(chatmessage.calltype && chatmessage.calltype == '呼出' ? '/images/agent.png' : curagentuser.headimgurl && curagentuser.headimgurl != '' ? curagentuser.headimgurl : '/images/im/user.png'), style="width:45px;height:45px;") + .chat-message + span(class=(chatmessage.calltype && chatmessage.calltype == '呼出' ? 'rateright' : 'rateleft')) + i.layui-icon.iconclick(id=chatmessage.id, name=(chatmessage.islabel == true ? 'yeslabe' : 'nolabe'), style="font-size:30px;cursor:pointer;color: #{chatmessage.islabel == true ? '#46cad4' : '#aaaaaa'}") + | #{chatmessage.islabel == true ? '' : 'စ'} + span.user + if chatmessage && chatmessage.calltype && chatmessage.calltype == '呼出' + if chatmessage.intervented + | #{chatmessage.supervisorname} + else + | #{chatmessage.username} + else + | #{chatmessage.username} + span.time= pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', chatmessage.createtime) + span(class=(chatmessage.calltype && chatmessage.calltype == '呼出' ? 'rateleft' : 'rateright'), style="cursor: pointer; font-size: 30px") + i.layui-icon.iconclick(id=chatmessage.id, name=(chatmessage.islabel == true ? 'yeslabe' : 'nolabe'), style="cursor:pointer;font-size:30px;color: #{chatmessage.islabel == true ? '#46cad4' : '#aaaaaa'}") + | #{chatmessage.islabel == true ? '' : 'စ'} + div(class=(chatmessage.calltype && chatmessage.calltype == '呼出' ? 'chatting-right' : 'chatting-left')) + i.userarrow + .chat-content + include /apps/agent/media/message.pug + else if curagentuser + if curagentuser.status && curagentuser.status == "end" + #agentuser-curstatus.clearfix.chat-block.connect-end + span.connect-message 用户#{curagentuser.username}已经离开 + else + #agentuser-curstatus.clearfix.chat-block.connect-begin + span.connect-message 用户#{curagentuser.username}开始对话 + .chat-bottom + #agentAnswer(style='width: 50%;min-width:310px;height: 180px;border: 1px solid #eee;position: absolute;top: -180px;right:0px;background: #ffffff;display: none') + h1.site-h1(style='background-color:#EEEEEE;padding: 0px 10px') + | 知识库联想 + i.layui-icon(style='position: absolute;top: 0px;right: 5px;font-size:16px;z-index: 10', onclick='showOrHide(\'none\')') ဆ + div(style='width: calc(100% - 19px);height: 129px;position: absolute;top: 31px;overflow-y: scroll;padding: 10px 10px') + ul.info-list.ukefu-quick-reply#quickReplyAgentBox(style='width: 100%;height: auto'). + .row + .col-lg-12 + textarea#message(name='message') + button.send-btn(type='button', onclick='sendMessage()') + | 发送 + style. + .ke-container { + border: 0px solid #E0E0E0 !important; + } + script(language='javascript'). + var editor, layer; + 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: '满意度评价' + }); + $(document).ready(function () { + // KindEditor.ready(function(K) { + var K = KindEditor; + editor = K.create('#message', { + height: "160px", + themeType: 'simple', + width: "100%", + items: ['emoticons', 'image', 'insertfile', 'evaluation'], + resizeType: 0, + uploadJson: "/agent/image/upload.html?id=" + "#{curagentuser.id}", + allowFileManager: false, + newlineTag: "br", + fontsize: 16, + allowFileUpload: true, + allowInsertUpload: false, //增加的参数,上传图片后是否插入到当前区域 + allowImageRemote: false, + afterUpload: function (url) { + return false; + }, + afterCreate: function () { //设置编辑器创建后执行的回调函数 + var self = this; + if ('#{sessionConfig}' && '#{sessionConfig.agentctrlenter}' && '#{sessionConfig.agentctrlenter}' == true) { + //Ctrl+Enter提交表单 + K.ctrl(document, 13, function () { + self.sync(); + sendMessage(); + }); + K.ctrl(self.edit.doc, 13, function () { + self.sync(); + sendMessage(); + }); + } else { + var kindEditorIframe = $("iframe").contents().find("body"); + kindEditorIframe.keydown(function (event) { + if (event.keyCode == 13 && !event.ctrlKey) { + self.sync(); + sendMessage(); + return false; + } else if (event.keyCode == 13 && event.ctrlKey) { + editor.insertHtml('
              '); + } + }); + //Ctrl+Enter提交表单 + K.ctrl(document, 13, function () { + editor.insertHtml('
              '); + }); + K.ctrl(self.edit.doc, 13, function () { + editor.insertHtml('
              '); + }); + } + } + }); + // }); + KindEditor.options.cssData = "body {font - size: 15px; font-family:'Microsoft Yahei', 'Helvetica', 'Simsun', 'Arial';}"; + var agentEnterInput = $("iframe").contents().find("body"); + agentEnterInput.keyup(function (event) { + if (isAisuggest && isAisuggest == "true") { + debouncefun(); + } + }) + var debouncefun = _.debounce(agentQuickReply, 500) + + function agentQuickReply() { + restApiRequest({ + silent: true, + path: 'chatbot', + data: { + ops: 'faq', + snsaccountid: "#{curagentuser.appid}", + userId: "#{curagentuser.userid}", + textMessage: editor.html() + } + }).then(function (result) { + if (result.rc === 0) { + if (result.data.length > 0) { + $("#quickReplyAgentBox").html(""); + $.each(sortByKey(result.data, 'score'), function (j, n) { + var answerList = result.data[j].replies; + var answer; + for (var i = 0; i < answerList.length; i++) { + if (answerList[i].rtype == 'plain' && answerList[i].enabled == true) { + answer = answerList[i] + break; + } + } + if (answer) { + var li = '
            • \n' + + '
              问题:' + result.data[j].post + '
              \n' + + '
              \n' + + '

              答案:' + answer.content + '

              \n' + + ' \n' + + '
              \n' + + '
            • ' + $("#quickReplyAgentBox").append(li); + } + if (i > 4) { + return false; + } + }); + showOrHide('block') + } else { + showOrHide('none') + } + } else { + showOrHide('none') + } + }, function (error) { + console.log("error", error); + // 服务器异常 + top.layer.msg('服务器抽风,请稍后再试!', {icon: 2, time: 3000}) + }) + } + }); +.ukefu-chat-prop + .ukefu-prop-list + .layui-side-scroll + .layui-tab(style='margin-top:0px;') + ul.layui-tab-title + li.layui-this 访客 + if aisuggest && aisuggest == true + li#robot(onclick="$('#dot').css('display','none')") + span 智能机器人 + span#dot(style=" width: 7px;height: 7px;background: red;-moz-border-radius: 50%;-webkit-border-radius: 50%;border-radius: 50%;position: absolute;top: 5px;display: none") + li 历史 + li 搜索历史消息 + .layui-tab-content(style='padding: 5px 0px 0px;') + .layui-tab-item.layui-show + .box + .box-title + h1.site-h1(style='background-color:#EEEEEE;') + | 访问信息 + div(style='float:right;') + button.layui-btn.layui-btn-small.layui-btn-radius.layui-btn-danger(href='/agent/blacklist/add.html?userid=#{curagentuser.userid}&agentserviceid=#{curagentuser.agentserviceid}&agentuserid=#{curagentuser.id}×=#{serviceCount ? serviceCount : 0}&chattime=#{(onlineUser && onlineUser.betweentime ? onlineUser.betweentime : 0)}', data-toggle='ajax', data-title='拉黑访客', data-width='900') 拉黑访客 + .box-body(style='padding:0px 10px;position: relative;') + if curagentuser.channel && curagentuser.channel == "webim" + include /apps/agent/channel/webim.pug + else if curagentuser.channel && curagentuser.channel == "messenger" + include /apps/agent/channel/messenger.pug + //else if curagentuser.channel && curagentuser.channel == "skype" + // include /apps/agent/channel/skype.pug + if curagentuser.name + ul.info-list + li + | 姓名: + span.tgreen + = curagentuser.name + if curagentuser.phone + li + | 电话: + span.tgreen + = curagentuser.phone + if curagentuser.email + li + | 邮件: + span.tgreen + = curagentuser.email + if curagentuser.resion + li + | 来访原因: + span.tgreen + = curagentuser.resion + if curAgentService && curAgentService.trans && curAgentService.trans == true + ul.info-list + li + | 转接: + span.tgreen + i.layui-icon(style="color:#19a55d;")  + if curAgentService.transtime + li + | 转接时间: + span.tgreen + | #{pugHelper.formatDate('HH:mm:ss', curAgentService.transtime)} + if curAgentService.transmemo + li + | 转接附言: + span.tgreen + = curAgentService.transmemo + if models.contains("contacts") + .box + .box-title + h1.site-h1(style="background-color:#EEEEEE;") + | 联系人 + div(style="float:right;") + button.layui-btn.layui-btn-small.layui-btn-normal(href="/apps/contacts/embed/index.html?userid=#{curagentuser.userid}&agentserviceid=#{curagentuser.agentserviceid}&agentuserid=#{curagentuser.id}×=#{(serviceCount ? serviceCount : 0)}&chattime=#{(onlineUser && onlineUser.betweentime ? onlineUser.betweentime : 0)}", data-toggle="ajax", title="请选择联系人", data-width="950", data-height="500") 关联联系人 + #ukefu_contacts_info.box-body(style="padding:0px 10px;") + include /apps/agent/contacts.pug + if aisuggest && aisuggest == true + .layui-tab-item + .box + .box-title + h1.site-h1(style="background-color:#EEEEEE;") + | 知识库快捷 + .box-body(style="padding:0px 10px;") + ul#quickReplyBox.info-list.ukefu-quick-reply + li(style="list-style: none;background-image: url();padding: 50px 0 50px;") + .ukefu-empty(style="background: none") + i.layui-icon  + div(style="") 未触发知识库查询 + .layui-tab-item + .box + .box-title + h1.site-h1(style="background-color:#EEEEEE;") + | 历史记录 + .box-body(style="padding:0px 10px;") + ul.info-list.ukefu-quick-reply + if agentServiceList && !agentServiceList.empty() + for agentService in agentServiceList + li.ukefu-agentservice-list + a(href="/service/online/chatmsg.html?id=" + agentService.id + "&title=false", data-toggle="ajax", data-width="950", data-height="500", data-title="服务记录") + span.quick-reply(style="overflow: hidden;text-overflow: ellipsis;white-space:nowrap;max-width:48%;display: inline-block;", data-id="content_" + agentService.id, title=agentService.username)= agentService.username + .ukefu-agentservice-his(style="overflow: hidden;text-overflow: ellipsis;white-space:nowrap;max-width:48%;", title=agentService.agentusername) 坐席:#{agentService.agentusername} + div(style="color:#333;position: relative;") + | #{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', agentService.servicetime)} + .ukefu-agentservice-his + | 时长:#{pugHelper.padRight(agentService.sessiontimes / (1000 * 60 * 60), "00")}:#{pugHelper.padRight((agentService.sessiontimes % (1000 * 60 * 60)) / (1000 * 60), "00")}:#{pugHelper.padRight((agentService.sessiontimes % (1000 * 60)) / (1000), "00")} + else + li(style="list-style: none;background-image: url();padding: 50px 0 50px;") + .ukefu-empty(style="background: none") + i.layui-icon  + div(style="") 还没有咨询记录 + .layui-tab-item + .box + .box-title + h1.site-h1(style='background-color:#ffffff;') + div(style='width:60%;height:40px;margin:0 auto ;display: -webkit-flex;display: flex;-webkit-justify-content:space-between;justify-content: space-between;') + #all.unselected(style='margin-top: 5px;height:30px;') + i.layui-icon(style='cursor: pointer;font-size:18px; float: left;margin:0 2px;')  + p(style='line-height: 30px') 全部 + #searchlabel.unselected(style='margin-top: 5px;height:30px;') + i.layui-icon(style='cursor: pointer;font-size:18px; float: left;margin:0 2px;') စ + p(style='line-height: 30px') 标注 + .searchbox(style='width: 300px;height:30px;border-radius: 5px;background:#f2f3f5; margin: 0 auto 10px;clear: both;border: 1px solid rgb(210, 210, 210);overflow: hidden;') + i#search.csfont(style='cursor: pointer;float: left;margin:0 0 0 50px;font-size: 24px;color: #757575')  + input#searchconter(style='width: 150px;height: 30px;border: none;background:#f2f3f5;', type='text', name='title', required, lay-verify='required', placeholder=' 请输入搜索内容', autocomplete='off') + #searchSubmit(style='cursor:pointer') 搜索 + #nothing(style='margin-top: 150px') + div(style='width: 120px;height: 120px;margin: 0 auto') + i.csfont(style='font-size: 120px;color:#00a65a')  + p#nothingTxt(style='text-align: center;color: #7e8790') 请输入搜索内容 + // ${agentUserMessageNum!''} + .box-body(style='padding:0px 10px;margin-top: 20px') + ul.info-list.ukefu-quick-reply#searchlist. +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; + left: 45%; + } + + .chat-left .chat-message .rateright { + display: inline-block; + } + + .chat-left .chat-message .rateleft { + display: none; + } + + .chat-right .chat-message .rateright { + display: inline-block; + } + + .chat-right .chat-message .rateleft { + display: none; + } + + #numSearches { + text-align: left; + clear: both; + color: #7e8790; + margin-left: 10px; + } + + #numSearches span { + color: #000; + } + + #searchSubmit { + float: right; + width: 50px; + background: #25c571; + text-align: center; + color: #fff; + } + + .unselected { + margin-left: 10px; + width: 55px; + height: 30px; + float: left; + font-size: 16px; + text-align: center; + line-height: 30px; + color: #fff; + border-radius: 5px; + font-weight: 400; + } + + .unselected i, .unselected p { + color: #000; + } + + .selected i, .selected p { + color: #00a65a; + font-weight: bold; + } + + .nowrap { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + width: calc(100% - 40px); + } +script. + if (#{models.contains("chatbot")}) { + $(document).ready(function () { + if (isAisuggest && isAisuggest == "true") { + switchQuickReply(); + } + }) + } + chatScorllBottom('chat_msg_list'); + layui.use('element', function () { + var element = layui.element(); + }); + layui.use('layer', function () { + layer = layui.layer; + $('#tag').click(function () { + $('#taglist').show(); + }) + $('.tag-switch').click( + function () { + if ($('#tag_' + $(this).data("id")).length > 0) { + $('#tag_' + $(this).data("id")).remove(); + } else { + $("#tags").append( + "" + + $(this).data("name") + ""); + } + loadURL($(this).data("href")); + }); + $("#taglist").hover(null, function () { + $(this).hide(); + }); + $('.quick-reply').click(function () { + var target = $(this).data("id"); + if ($('#' + target).is(":hidden")) { + $('#' + target).show(); + } else { + $('#' + target).hide(); + } + }); + $('.quick-reply-content').click(function () { + if (editor != null) { + var quickReply = $(this).html(); + if (editor.count("text") == 0) { + editor.html(quickReply); + } else { + top.layer.confirm("您已经输入了内容,覆盖当前输入框中内容?", {icon: 3, title: '覆盖提示'}, function (index) { + top.layer.close(index); + editor.html(quickReply); + }); + } + } + }); + }); + + function sendMessage() { + editor.sync(); + var count = editor.count("text"); + if (count > 0) { + var message = document.getElementById('message').value; + top.WebIM.sendMessage(message, "#{user.id}", "#{curagentuser.appid}", "#{user.sessionid}", "#{orgi ? orgi : ''}", "#{curagentuser.userid}", "#{user.username}"); + } + editor.html(''); + showOrHide('none'); + }; + + // function chooseAnswer(data){ + // editor.html(data) + // } + function showOrHide(data) { + $("#agentAnswer").css("display", data) + } + + // 排序 + function sortByKey(array, key) { + return array.sort(function (a, b) { + var x = a[key]; + var y = b[key]; + return ((x < y) ? -1 : ((x > y) ? 1 : 0)); + }); + } + + function switchQuickReply() { + var hatContentHtml = $("#chat_msg_list .chat-block").last().find(".chatting-left .chat-content").html(); + if ($.trim(hatContentHtml)) { + restApiRequest({ + silent: true, + path: 'chatbot', + data: { + ops: 'faq', + snsaccountid: '#{curagentuser.appid}', + userId: "#{curagentuser.userid}", + textMessage: hatContentHtml + } + }).then(function (result) { + if (result.rc === 0) { + if (result.data.length > 0) { + $("#quickReplyBox").html(""); + $.each(sortByKey(result.data, 'score'), function (j, n) { + var answerList = result.data[j].replies; + var answer; + for (var i = 0; i < answerList.length; i++) { + if (answerList[i].rtype == 'plain' && answerList[i].enabled == true) { + answer = answerList[i] + break; + } + } + if (answer) { + var li = '
            • \n' + + '
              问题:' + result.data[j].post + '
              \n' + + '
              \n' + + '

              答案:' + answer.content + '

              \n' + + ' \n' + + '
              \n' + + '
            • ' + $("#quickReplyBox").append(li); + } + if (i > 4) { + return false; + } + }); + if (!$("#robot").hasClass('layui-this')) { + $("#dot").css("display", "inline-block") + } + } else { + $("#dot").css("display", "none") + $("#quickReplyBox").html('
            • \n' + + '
              \n' + + ' \n' + + '
              在知识库中未得到相关问题
              \n' + + '
              \n' + + '
            • '); + } + } + }, function (error) { + console.log("error", error); + // 服务器异常 + top.layer.msg('服务器抽风,请稍后再试!', {icon: 2, time: 3000}) + }) + } + } + $("#searchconter").keyup(function (event) { + if (event.keyCode == 13) { + $("#search").click(); + } + }); + + var current = 0; + + var pieces = 0; + + var searchSwitch = false; + $("#searchconter").focus(function () { + $(this).attr('placeholder', ' ') + $(".searchbox").css({"border": "1px solid #3b99fc", 'box-shadow': ' 0 0 3px 0 #3b99fc'}); + $("#search").css('margin-left', '20px'); + }); + + $("#searchconter").blur(function () { + $(this).attr('placeholder', ' 请输入搜索内容') + $(".searchbox").css({"border": "1px solid #d2d2d2", 'box-shadow': 'none'}); + $("#search").css('margin-left', '50px'); + }); + + $('#searchSubmit').click(function () { + $("#search").click(); + }) + + function search(conditionalParameter) { + $.ajax({ + url: '/agent/agentusersearch.html', + data: {'search': $('#searchconter').val(), 'id': '#{curagentuser.id}', 'condition': conditionalParameter}, + type: "post", + success: function (data) { + $('#searchlist').html(data); + var pieces = $('#numSearches').html() + if (pieces > 0) { + $('#nothing').css('display', 'none') + $('.chatblock').click(function () { + $.ajax({ + url: '/agent/agentusersearchdetails.html', + data: { + 'createtime': $(this).attr('name'), + 'id': '#{curagentuser.id}', + 'thisid': $(this).attr('id') + }, + type: "post", + success: function (data) { + $('.chat-block').remove(); + $('#chat_msg_list').prepend(data); + var element = document.getElementById("agentusersearchdetails"); + element.scrollIntoView(); + current = parseInt($('#numSearches').html()) - 11 + } + }); + }) + } else if (pieces == 0) { + $('#nothingTxt').html('无"' + $('#searchconter').val() + '"搜索结果') + $('#nothing').css('display', 'block') + } + } + }); + } + + // 点击全部 + $('#all').click(function () { + searchSwitch = false; + search('all') + $('#searchlabel .layui-icon').html('စ') + $("#searchlabel").removeClass('selected') + $("#all").addClass('selected') + }) + + //点击标注 + $('#searchlabel').click(function () { + searchSwitch = !searchSwitch; + if (searchSwitch) { + $('#searchlabel .layui-icon').html('') + $("#all").removeClass('selected') + $("#searchlabel").addClass('selected') + search('label') + } else { + $('#searchlabel .layui-icon').html('စ') + $("#searchlabel").removeClass('selected') + $("#all").addClass('selected') + search('all') + } + + }) + //点击搜索 + $('#search').click(function () { + if (searchSwitch) { + $('#searchlabel .layui-icon').html('') + $("#searchlabel").addClass('selected') + $("#all").removeClass('selected') + search('label') + } else { + $("#all").addClass('selected') + search('all') + } + }) + + layui.use('flow', function () { + var flow = layui.flow; + flow.load({ + elem: '#chat_msg_list' //流加载容器 + , scrollElem: '#chat_msg_list' //流加载容器 + , end: '没有更多了' + , isAuto: false + , done: function (page, next) { //执行下一页的回调 + //模拟数据插入 + current += 20; + setTimeout(function () { + var lis = []; + var pages = 0; + $.ajax({ + url: '/agent/agentuserpage.html', + data: {'current': current, 'id': '#{curagentuser.id}'}, + type: "post", + success: function (data) { + var element = document.getElementsByClassName("chat-block")[0]; + if (page != 1) { + element.scrollIntoView(); + } + lis = lis + data; + $('#chat_msg_list').prepend(data) + } + }); + //执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页 + //pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多 + pages = '#{agentUserMessageList.totalElements}' / 20 + next(lis.join(''), page < pages); //假设总页数为 10 + }, 500); + } + }); + }); + + $('#quickReplyAgentBox').on('click', '.chooseAnswer', function () { + editor.html($(this).data('title')) + }); + + $('#quickReplyBox').on('click', '.chooseAnswer', function () { + editor.html($(this).data('title')) + }); + diff --git a/contact-center/app/src/main/resources/templates/apps/agent/mainagentuser_skype.html b/contact-center/app/src/main/resources/templates/apps/agent/mainagentuser_skype.html deleted file mode 100644 index 73805b9b..00000000 --- a/contact-center/app/src/main/resources/templates/apps/agent/mainagentuser_skype.html +++ /dev/null @@ -1,649 +0,0 @@ - - -
              -
              -

              -
              <#if curagentuser??>${curagentuser.username!''}<#if curagentuser.region??> ( ${curagentuser.region!''}
              - - <#else> - -

              -
              - <#if agentUserMessageList?? && agentUserMessageList.content??> - <#list agentUserMessageList.content?reverse as chatmessage> -
              -
              - -
              - - <#if (chatmessage.islabel == true??)><#else>စ - - - <#if chatmessage?? && chatmessage.calltype?? && chatmessage.calltype == '呼出'> - ${chatmessage.intervented?string(chatmessage.supervisorname,curagentuser.agentname)} - <#else> - ${curagentuser.username!''} - - - ${chatmessage.createtime?string('yyyy-MM-dd HH:mm:ss')} - - <#if (chatmessage.islabel == true??)><#else>စ - -
              -
              - -
              <#include "/apps/agent/media/message.html">
              -
              -
              -
              - -<#elseif curagentuser??> -<#if curagentuser.status?? && curagentuser.status == "end"> -
              - 用户“${curagentuser.username!''}”已经离开 -
              -<#else> -
              - 用户“${curagentuser.username!''}”开始对话 -
              - - -
              -
              -
              -
              -
              - - - - -
              -
              -
              -
              -
              -
              -
              -
              -
                -
              • 访客
              • -
              • 历史
              • -
              • 搜索历史消息
              • - <#if models?seq_contains("workorders")> -
              • 工单
              • - - <#if sessionConfig?? && sessionConfig.otherquickplay?? && sessionConfig.otherquickplay == true> -
              • 知识库
              • - -
              -
              -
              -
              -
              -

              - 访问信息 -
              - -
              -

              -
              -
              - <#if curagentuser.channel?? && curagentuser.channel == "webim"> - <#include "/apps/agent/channel/webim.html"> - <#elseif curagentuser.channel?? && curagentuser.channel == "weixin"> - <#include "/apps/agent/channel/weixin.html"> - <#elseif curagentuser.channel?? && curagentuser.channel == "skype"> - <#include "/apps/agent/channel/skype.html"> - - <#if curagentuser.name??> -
                -
              • - 姓名: - - ${curagentuser.name!''} - -
              • - <#if curagentuser.phone??> -
              • - 电话: - - ${curagentuser.phone!''} - -
              • - - <#if curagentuser.email??> -
              • - 邮件: - - ${curagentuser.email!''} - -
              • - - <#if curagentuser.resion??> -
              • - 来访原因: - - ${curagentuser.resion!''} - -
              • - -
              - - <#if curAgentService?? && curAgentService.trans?? && curAgentService.trans> -
                -
              • - 转接: - - - -
              • - <#if curAgentService.transtime??> -
              • - 转接时间: - - ${curAgentService.transtime?string("yyyy-MM-dd HH:mm:ss")} - -
              • - - <#if curAgentService.transmemo??> -
              • - 转接附言: - - ${curAgentService.transmemo!''} - -
              • - - -
              - -
              -
              -<#if models?seq_contains("contacts")> -
              -
              -

              - 联系人 -
              - -
              -

              -
              -
              - <#include "/apps/agent/contacts.html"> -
              -
              - -
              - - -
              -
              -
              -

              -
              -
              - -

              全部

              -
              -
              - -

              标注

              -
              -
              - - -

              -

              -
              - -
              -
              - -
              -

              请输入搜索内容

              -
              - - -
              -
                -
              -
              -
              -
              -<#if models?seq_contains("workorders")> -
              - <#if workOrdersList?? && workOrdersList?size gt 0> - <#include "/apps/agent/workorders.html"> - -
              - -<#if sessionConfig?? && sessionConfig.otherquickplay?? && sessionConfig.otherquickplay == true> -
              -
              -
              -

              - 知识列表 - -
              - - -
              -
              -

              -
              -
              - <#include "/apps/agent/othertopic.html"> -
              -
              -
              - -
              -
              - -
              -
              -
              - - diff --git a/contact-center/app/src/main/resources/templates/apps/agent/mainagentuser_skype.pug b/contact-center/app/src/main/resources/templates/apps/agent/mainagentuser_skype.pug new file mode 100644 index 00000000..3b09f1d5 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/agent/mainagentuser_skype.pug @@ -0,0 +1,640 @@ +//- + 原始 Freemarker 文件位置:https://gitlab.chatopera.com/chatopera/cskefu/blob/760e130e770a96a43e8f6f2c8a1eb0885c0bbf90/contact-center/app/src/main/resources/templates/apps/agent/mainagentuser_skype.html + 该页面需要使用Skype插件,此处是没有完全转化的 Pug 文件 + 如果提供这个页面,需要参考 Freemarker 原文件完成转化或参考实现 +script(language='javascript'). + cursession = "<#if curagentuser??>${curagentuser.userid!''}"; + var massMassageToAgent = null; + massMassageToAgent = "<#if massMassageToAgent??>${massMassageToAgent!''}"; + + var ids = "<#if ids??>${ids!''}"; + var userid = "${curagentuser.userid!''}", agentserviceid = "${curagentuser.agentserviceid!''}", + agentuserid = "${curagentuser.id}", masscuragentuser = "${masscuragentuser}"; + +body + .main-agentuser + .chat-agent + h1.site-h1 + // <#if curagentuser??> + //
              + // ${curagentuser.username!''}<#if curagentuser.region??> ( ${curagentuser.region!''}
              + // + // + #chat_msg_list.chat-message.chat_msg_list(style='position: relative') + // <#if agentUserMessageList?? && agentUserMessageList.content??> + // <#list agentUserMessageList.content?reverse as chatmessage> + //
              + //
              + // + //
              + // + // <#if (chatmessage.islabel == true??)><#else>စ + // + // + // <#if chatmessage?? && chatmessage.calltype?? && chatmessage.calltype == '呼出'> + // ${chatmessage.intervented?string(chatmessage.supervisorname,curagentuser.agentname)} + // <#else> + // ${curagentuser.username!''} + // + // + // ${chatmessage.createtime?string('yyyy-MM-dd HH:mm:ss')} + // + // <#if (chatmessage.islabel == true??)><#else>စ + // + //
              + //
              + // + //
              <#include "/apps/agent/media/message.html">
              + //
              + //
              + //
              + // + // <#elseif curagentuser??> + // <#if curagentuser.status?? && curagentuser.status == "end"> + //
              + // 用户“${curagentuser.username!''}”已经离开 + //
              + // <#else> + //
              + // 用户“${curagentuser.username!''}”开始对话 + //
              + // + // + .chat-bottom + .row + .col-lg-12 + textarea#message(name='message') + button.send-btn(type='button', onclick='sendMessage()'). + + 发送 + + style. + + .ke-container { + border: 0px solid #E0E0E0 !important; + } + + script(language='javascript'). + + var editor, layer; + $(document).ready(function () { + // KindEditor.ready(function(K) { + var K = KindEditor; + editor = K.create('#message', { + height: "160px", + themeType: 'simple', + width: "100%", + items: ['emoticons', 'image', 'insertfile'], + resizeType: 0, + uploadJson: "/agent/image/upload.html?id=${curagentuser.id!''}", + allowFileManager: false, + newlineTag: "br", + fontsize: 16, + allowFileUpload: true, + allowInsertUpload: false, //增加的参数,上传图片后是否插入到当前区域 + allowImageRemote: false, + afterUpload: function (url) { + return false; + }, + afterCreate: function () { //设置编辑器创建后执行的回调函数 + var self = this; + + <#if sessionConfig?? && sessionConfig.agentctrlenter?? && sessionConfig.agentctrlenter == true> + //Ctrl+Enter提交表单 + K.ctrl(document, 13, function() { + self.sync(); + sendMessage(); + }); + K.ctrl(self.edit.doc, 13, function() { + self.sync(); + sendMessage(); + }); + <#else> + var kindEditorIframe = $("iframe").contents().find("body"); + kindEditorIframe.keydown(function (event) { + if(event.keyCode==13 && !event.ctrlKey){ + self.sync(); + sendMessage(); + return false; + }else if(event.keyCode==13 && event.ctrlKey){ + editor.insertHtml('
              '); + } + }); + //Ctrl+Enter提交表单 + K.ctrl(document, 13, function() { + editor.insertHtml('
              '); + }); + K.ctrl(self.edit.doc, 13, function() { + editor.insertHtml('
              '); + }); + + <#if sessionConfig?? && sessionConfig.enablequick> + /** + var _self = this; + loadURL("/res/quickreply.html" , null , function(data){ + $(_self).suggest('@', { + data: eval(data), + mapkey: ['title', 'id'], + map: function (topic) { + console.log(topic); + return { + value: topic.text, + text: '

              ' + topic.text + '

              ' + } + } + }); + }); + **/ + + } + }); + // }); + KindEditor.options.cssData = "body {font - size: 15px; font-family:'Microsoft Yahei', 'Helvetica', 'Simsun', 'Arial';}"; + }); + + .ukefu-chat-prop + .ukefu-prop-list + .layui-side-scroll + .layui-tab(style='margin-top:0px;') + ul.layui-tab-title + li.layui-this 访客 + li 历史 + li 搜索历史消息 + // <#if models?seq_contains("workorders")> + //
            • 工单
            • + // + // <#if sessionConfig?? && sessionConfig.otherquickplay?? && sessionConfig.otherquickplay == true> + //
            • 知识库
            • + // + .layui-tab-content(style='padding: 5px 0px 0px;') + .layui-tab-item.layui-show + .box + .box-title + h1.site-h1(style='background-color:#EEEEEE;') + | +访问信息 + +div(style='float:right;') + button.layui-btn.layui-btn-small.layui-btn-radius.layui-btn-danger(href='/agent/blacklist/add.html?userid=${curagentuser.userid!\'\'}&agentserviceid=${curagentuser.agentserviceid!\'\'}&agentuserid=${curagentuser.id}×=${serviceCount!0}&chattime=<#if onlineUser?? && onlineUser.betweentime??>${onlineUser.betweentime}<#else>0', data-toggle='ajax', data-title='拉黑访客', data-width='900') 拉黑访客 +.box-body(style='padding:0px 10px;position: relative;') + // <#if curagentuser.channel?? && curagentuser.channel == "webim"> + // <#include "/apps/agent/channel/webim.html"> + // <#elseif curagentuser.channel?? && curagentuser.channel == "weixin"> + // <#include "/apps/agent/channel/weixin.html"> + // <#elseif curagentuser.channel?? && curagentuser.channel == "skype"> + // <#include "/apps/agent/channel/skype.html"> + // + // <#if curagentuser.name??> + //
                + //
              • + // 姓名: + // + // ${curagentuser.name!''} + // + //
              • + // <#if curagentuser.phone??> + //
              • + // 电话: + // + // ${curagentuser.phone!''} + // + //
              • + // + // <#if curagentuser.email??> + //
              • + // 邮件: + // + // ${curagentuser.email!''} + // + //
              • + // + // <#if curagentuser.resion??> + //
              • + // 来访原因: + // + // ${curagentuser.resion!''} + // + //
              • + // + //
              + // + // <#if curAgentService?? && curAgentService.trans?? && curAgentService.trans> + //
                + //
              • + // 转接: + // + // + // + //
              • + // <#if curAgentService.transtime??> + //
              • + // 转接时间: + // + // ${curAgentService.transtime?string("yyyy-MM-dd HH:mm:ss")} + // + //
              • + // + // <#if curAgentService.transmemo??> + //
              • + // 转接附言: + // + // ${curAgentService.transmemo!''} + // + //
              • + // + //
              + // +// <#if models?seq_contains("contacts")> +//
              +//
              +//

              +// 联系人 +//
              +// +//
              +//

              +//
              +//
              +// <#include "/apps/agent/contacts.html"> +//
              +//
              +// +.layui-tab-item + .box + .box-title + h1.site-h1(style='background-color:#EEEEEE;'). + + 历史记录 + + .box-body(style='padding:0px 10px;') + ul.info-list.ukefu-quick-reply + // <#if agentServiceList?? && agentServiceList?size gt 0> + // <#list agentServiceList as agentService> + //
            • + // + // ${agentService.username!''} + //
              坐席:${agentService.agentusername!''}
              + //
              + // ${agentService.servicetime?string("yyyy-MM-dd HH:mm:ss")} + //
              时长:${(agentService.sessiontimes/(1000*60*60))?string('00')}:${((agentService.sessiontimes%(1000*60*60))/(1000*60))?string('00')}:${((agentService.sessiontimes%(1000*60))/(1000))?string('00')}
              + //
              + //
              + //
            • + // + // <#else> + //
            • + //
              + // + //
              还没有咨询记录
              + //
              + //
            • + // +.layui-tab-item + .box + .box-title + h1.site-h1(style='background-color:#ffffff;') + div(style='width:60%;height:40px;margin:0 auto ;display: -webkit-flex;display: flex;-webkit-justify-content:space-between;justify-content: space-between;') + #all.unselected(style='margin-top: 5px;height:30px;') + i.layui-icon(style='cursor: pointer;font-size:18px; float: left;margin:0 2px;')  + p(style='line-height: 30px') 全部 + #searchlabel.unselected(style='margin-top: 5px;height:30px;') + i.layui-icon(style='cursor: pointer;font-size:18px; float: left;margin:0 2px;') စ + p(style='line-height: 30px') 标注 + .searchbox(style='width: 300px;height:30px;border-radius: 5px;background:#f2f3f5; margin: 0 auto 10px;clear: both;border: 1px solid rgb(210, 210, 210);overflow: hidden;') + i#search.csfont(style='cursor: pointer;float: left;margin:0 0 0 50px;font-size: 24px;color: #757575')  + input#searchconter(style='width: 150px;height: 30px;border: none;background:#f2f3f5;', type='text', name='title', required, lay-verify='required', placeholder=' 请输入搜索内容', autocomplete='off') + #searchSubmit(style='cursor:pointer') 搜索 + p#numSearches + #nothing(style='margin-top: 150px') + div(style='width: 120px;height: 120px;margin: 0 auto') + i.csfont(style='font-size: 120px;color:#00a65a')  + p#nothingTxt(style='text-align: center;color: #7e8790') 请输入搜索内容 + // ${agentUserMessageNum!''} + .box-body(style='padding:0px 10px;margin-top: 20px') + ul.info-list.ukefu-quick-reply#searchlist. + + +// <#if models?seq_contains("workorders")> +//
              +// <#if workOrdersList?? && workOrdersList?size gt 0> +// <#include "/apps/agent/workorders.html"> +// +//
              +// +// <#if sessionConfig?? && sessionConfig.otherquickplay?? && sessionConfig.otherquickplay == true> +//
              +//
              +//
              +//

              +// 知识列表 +// +//
              +// +// +//
              +//
              +//

              +//
              +//
              +// <#include "/apps/agent/othertopic.html"> +//
              +//
              +//
              +// +style. + + .layui-flow-more { + position: absolute; + top: 0; + left: 45%; + } + + .chat-left .chat-message .rateright { + display: inline-block; + } + + .chat-left .chat-message .rateleft { + display: none; + } + + .chat-right .chat-message .rateright { + display: inline-block; + } + + .chat-right .chat-message .rateleft { + display: none; + } + + #numSearches { + text-align: left; + clear: both; + color: #7e8790; + margin-left: 10px; + } + + #numSearches span { + color: #000; + } + + #searchSubmit { + float: right; + width: 50px; + background: #25c571; + text-align: center; + color: #fff; + } + + .unselected { + margin-left: 10px; + width: 55px; + height: 30px; + float: left; + font-size: 16px; + text-align: center; + line-height: 30px; + color: #fff; + border-radius: 5px; + font-weight: 400; + } + + .unselected i, .unselected p { + color: #000; + } + + .selected i, .selected p { + color: #00a65a; + font-weight: bold; + } + +script. + + $(document).ready(function () { + var test = window.location.search; + }) + document.getElementById('chat_msg_list').scrollTop = document.getElementById('chat_msg_list').scrollHeight; + layui.use('element', function () { + var element = layui.element(); + }); + layui.use('layer', function () { + layer = layui.layer; + $('#tag').click(function () { + $('#taglist').show(); + }) + $('.tag-switch').click( + function () { + if ($('#tag_' + $(this).data("id")).length > 0) { + $('#tag_' + $(this).data("id")).remove(); + } else { + $("#tags").append( + "" + + $(this).data("name") + ""); + } + loadURL($(this).data("href")); + }); + $("#taglist").hover(null, function () { + $(this).hide(); + }); + $('.quick-reply').click(function () { + var target = $(this).data("id"); + if ($('#' + target).is(":hidden")) { + $('#' + target).show(); + } else { + $('#' + target).hide(); + } + }); + $('.quick-reply-content').click(function () { + if (editor != null) { + var quickReply = $(this).html(); + if (editor.count("text") == 0) { + editor.html(quickReply); + } else { + top.layer.confirm("您已经输入了内容,覆盖当前输入框中内容?", {icon: 3, title: '覆盖提示'}, function (index) { + top.layer.close(index); + editor.html(quickReply); + }); + } + } + }); + }); + + if ("${massMassageToAgent}" != "") { + console.log("massMassageToAgent", "${massMassageToAgent}") + + const idslist = "${ids}".split(","); + + for (var i = 1; i < idslist.length; i++) { + console.log(i, "${massMassageToAgent}", idslist, idslist[i]) + + top.WebIM.sendMessage("${massMassageToAgent}", '${user.id!' + '}' , "${curagentuser.appid!''}" , "${user.sessionid!''}" , "${orgi!''}" , idslist[i] , "${user.username!''}" + ) + ; + + console.log(123) + + } + } + + function sendMessage() { + console.log("skype send message", '1${user.id!' + '}', "2${curagentuser.appid!''}", "3${user.sessionid!''}", "4${orgi!''}", "5<#if curagentuser??>${curagentuser.userid!''}", "6${user.username!''}" + ) + editor.sync(); + var count = editor.count("text"); + if (count > 0) { + var message = document.getElementById('message').value; + top.WebIM.sendMessage(message, '${user.id!' + '}' , "${curagentuser.appid!''}" , "${user.sessionid!''}" , "${orgi!''}" , "<#if curagentuser??>${curagentuser.userid!''}" , "${user.username!''}", "${curagentuser.id}" + ) + ; + + console.log(editor, count) + } + editor.html(''); + }; + + $(document).keyup(function (event) { + if (event.keyCode == 13) { + $("#search").click(); + } + }); + + var current = 0; + + var pieces = 0; + + var searchSwitch = false; + $("#searchconter").focus(function () { + $(this).attr('placeholder', ' ') + $(".searchbox").css({"border": "1px solid #3b99fc", 'box-shadow': ' 0 0 3px 0 #3b99fc'}); + $("#search").css('margin-left', '20px'); + }); + + $("#searchconter").blur(function () { + $(this).attr('placeholder', ' 请输入搜索内容') + $(".searchbox").css({"border": "1px solid #d2d2d2", 'box-shadow': 'none'}); + $("#search").css('margin-left', '50px'); + }); + + $('#searchSubmit').click(function () { + $("#search").click(); + }) + + function search(conditionalParameter) { + $.ajax({ + url: '/agent/agentusersearch.html', + data: {'search': $('#searchconter').val(), 'id': '${curagentuser.id}', 'condition': conditionalParameter}, + type: "post", + success: function (data) { + $('#searchlist').html(data); + pieces = $('#totalSearches').val() + $('#numSearches').html("" + pieces + "条相关记录"); + if (pieces > 0) { + $('#nothing').css('display', 'none') + $('.chatblock').click(function () { + $.ajax({ + url: '/agent/agentusersearchdetails.html', + data: { + 'createtime': $(this).attr('name'), + 'id': '${curagentuser.id}', + 'thisid': $(this).attr('id') + }, + type: "post", + success: function (data) { + $('.chat-block').remove(); + $('#chat_msg_list').prepend(data); + var element = document.getElementById("agentusersearchdetails"); + element.scrollIntoView(); + current = parseInt($('#totalElements').val()) - 11 + } + }); + }) + } else if (pieces == 0) { + $('#nothingTxt').html('无"' + $('#searchconter').val() + '"搜索结果') + $('#nothing').css('display', 'block') + } + } + }); + } + + // 点击全部 + $('#all').click(function () { + searchSwitch = false; + search('all') + $('#searchlabel .layui-icon').html('စ') + $("#searchlabel").removeClass('selected') + $("#all").addClass('selected') + }) + //点击标注 + $('#searchlabel').click(function () { + searchSwitch = !searchSwitch; + if (searchSwitch) { + $('#searchlabel .layui-icon').html('') + $("#all").removeClass('selected') + $("#searchlabel").addClass('selected') + search('label') + } else { + $('#searchlabel .layui-icon').html('စ') + $("#searchlabel").removeClass('selected') + $("#all").addClass('selected') + search('all') + } + + }) + //点击搜索 + $('#search').click(function () { + if (searchSwitch) { + $('#searchlabel .layui-icon').html('') + $("#searchlabel").addClass('selected') + $("#all").removeClass('selected') + search('label') + } else { + $("#all").addClass('selected') + search('all') + } + }) + + layui.use('flow', function () { + var flow = layui.flow; + flow.load({ + elem: '#chat_msg_list' //流加载容器 + , scrollElem: '#chat_msg_list' //流加载容器 + , end: '没有更多了' + , isAuto: false + , done: function (page, next) { //执行下一页的回调 + //模拟数据插入 + current += 20; + console.log(current); + setTimeout(function () { + var lis = []; + var pages = 0; + $.ajax({ + url: '/agent/agentuserpage.html', + data: {'current': current, 'id': '${curagentuser.id}'}, + type: "post", + success: function (data) { + var element = document.getElementsByClassName("chat-block")[0]; + if (page != 1) { + element.scrollIntoView(); + } + lis = lis + data; + $('#chat_msg_list').prepend(data) + } + }); + //执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页 + //pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多 + pages = '${agentUserMessageList.totalElements}' / 20 + next(lis.join(''), page < pages); //假设总页数为 10 + }, 500); + } + }); + + }); + diff --git a/contact-center/app/src/main/resources/templates/apps/agent/mainagentuserconter.html b/contact-center/app/src/main/resources/templates/apps/agent/mainagentuserconter.html deleted file mode 100644 index 7e93ad74..00000000 --- a/contact-center/app/src/main/resources/templates/apps/agent/mainagentuserconter.html +++ /dev/null @@ -1,76 +0,0 @@ -<#list agentUserMessageList as chatmessage> -
              -
              - -
              - - <#if (chatmessage.islabel == true??)><#else>စ - - - <#if chatmessage?? && chatmessage.calltype?? && chatmessage.calltype == '呼出'> - ${chatmessage.intervented?string(chatmessage.supervisorname,curagentuser.agentname)} - <#else> - ${curagentuser.username!''} - - - ${chatmessage.createtime?string('yyyy-MM-dd HH:mm:ss')} - - <#if (chatmessage.islabel == true??)><#else>စ - -
              -
              - -
              <#include "/apps/agent/media/message.html">
              -
              -
              - <#if agentUserMessageListnum??> - - - -
              - - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/agent/mainagentuserconter.pug b/contact-center/app/src/main/resources/templates/apps/agent/mainagentuserconter.pug new file mode 100644 index 00000000..40419c32 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/agent/mainagentuserconter.pug @@ -0,0 +1,65 @@ +for chatmessage in agentUserMessageList + .clearfix.chat-block(id=(chatmessage.id == agentusersearchdetails ? 'agentusersearchdetails' : ''),name=chatmessage.createtime) + div(class=(chatmessage.calltype && chatmessage.calltype == '呼出' ? 'chat-right' : 'chat-left')) + img.user-img(alt="", src=(chatmessage.calltype && chatmessage.calltype == '呼出' ? '/images/agent.png' : curagentuser.headimgurl && curagentuser.headimgurl != '' ? curagentuser.headimgurl : '/images/im/user.png'), style='width:45px;height:45px;') + .chat-message + span(class=(chatmessage.calltype && chatmessage.calltype == '呼出' ? 'rateright' : 'rateleft')) + i.layui-icon.iconclick(id=chatmessage.id, name=(chatmessage.islabel == true ? 'yeslabe' : 'nolabe'), style="font-size:30px;cursor:pointer;color: #{chatmessage.islabel == true ? '#46cad4' : '#aaaaaa'}") + | #{chatmessage.islabel == true ? '' : 'စ'} + span.user + if chatmessage && chatmessage.calltype && chatmessage.calltype == '呼出' + if chatmessage.intervented + | #{chatmessage.supervisorname} + else + | #{chatmessage.username} + else + | #{chatmessage.username} + span.time= pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', chatmessage.createtime) + span(class=(chatmessage.calltype && chatmessage.calltype == '呼出' ? 'rateleft' : 'rateright'), style="cursor: pointer; font-size: 30px") + i.layui-icon.iconclick(id=chatmessage.id, name=(chatmessage.islabel == true ? 'yeslabe' : 'nolabe'), style="cursor:pointer;font-size:30px;color: #{chatmessage.islabel == true ? '#46cad4' : '#aaaaaa'}") + | #{chatmessage.islabel == true ? '' : 'စ'} + div(class=(chatmessage.calltype && chatmessage.calltype == '呼出' ? 'chatting-right' : 'chatting-left')) + i.userarrow + .chat-content + include /apps/agent/media/message.pug + if agentUserMessageListnum + input#totalElements(type='hidden',value=agentUserMessageListnum) + +style. + .chat-left .chat-message .rateright { + display: inline-block; + } + + .chat-left .chat-message .rateleft { + display: none; + } + + .chat-right .chat-message .rateright { + display: inline-block; + } + + .chat-right .chat-message .rateleft { + display: none; + } + +script. + $('.iconclick').click(function () { + if ($(this).attr('name') == 'nolabe') { + $(this).html('') + $(this).css('color', '#46cad4') + $(this).attr('name', 'yeslabe') + } else { + $(this).html('စ') + $(this).css('color', '#aaaaaa') + $(this).attr('name', 'nolabe') + } + $.ajax({ + url: '/agent/agentuserLabel.html', + data: {'iconid': $(this).attr('id')}, + type: "get", + success: function () { + } + }); + + }); + diff --git a/contact-center/app/src/main/resources/templates/apps/agent/mainagentusersearch.html b/contact-center/app/src/main/resources/templates/apps/agent/mainagentusersearch.html deleted file mode 100644 index abec2757..00000000 --- a/contact-center/app/src/main/resources/templates/apps/agent/mainagentusersearch.html +++ /dev/null @@ -1,68 +0,0 @@ -<#list agentUserMessageList.content?reverse as chatmessage> -
              -
              - - - -
              - - <#if chatmessage?? && chatmessage.calltype?? && chatmessage.calltype == '呼出'> - ${chatmessage.intervented?string(chatmessage.supervisorname,chatmessage.username)} - <#else> - ${chatmessage.username!''} - - - ${chatmessage.createtime?string('yyyy-MM-dd HH:mm:ss')} - - <#if (chatmessage.islabel == true??)><#else>စ - -
              -
              - -
              <#include "/apps/agent/media/message.html">
              -
              -
              -
              - -<#if agentUserMessageList.totalElements??> - - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/agent/mainagentusersearch.pug b/contact-center/app/src/main/resources/templates/apps/agent/mainagentusersearch.pug new file mode 100644 index 00000000..f53d0005 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/agent/mainagentusersearch.pug @@ -0,0 +1,72 @@ +p + span#numSearches + | #{agentUserMessageList.totalElements} + | 条记录 + +for chatmessage in pugHelper.reverse(agentUserMessageList.content) + .clearfix.chatblock(id=chatmessage.id,name=pugHelper.formatDate("yyyy-MM-dd HH:mm:ss", chatmessage.createtime)) + .chat-left + // + .chat-message + span(class="user #{chatmessage.calltype && chatmessage.calltype == '呼出' ? 'ratemy' : 'rateyou'}") + if chatmessage && chatmessage.calltype && chatmessage.calltype == '呼出' + if chatmessage.intervented + | #{chatmessage.supervisorname} + else + | #{chatmessage.username} + else + | #{chatmessage.username} + span(class="time #{chatmessage.calltype && chatmessage.calltype == '呼出' ? 'ratemy' : 'rateyou'}") + | #{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', chatmessage.createtime)} + span.rateright + i.layui-icon.iconclick(id=chatmessage.id,name=(chatmessage.islabel == true ? "yeslabe" : "nolabe"),style="font-size: 15px; color: #{chatmessage.islabel == true ? '#46cad4' : '#aaaaaa'}") + | #{chatmessage.islabel == true ? '' : 'စ'} + .chatting + .chat-content + include /apps/agent/media/message.pug +style. + .chatblock { + padding: 10px 0; + } + + .chatblock:hover { + background: #f5f7fa; + } + + .chat-left .chat-message { + margin-left: 10px !important; + } + + .chatting { + padding-right: 5px; + padding-left: 10px; + float: left; + min-width: 25px; + word-break: break-all; + border: none; + margin-top: 5px; + } + + .chatting .chat-content { + color: #000; + font-size: 20px; + width: 280px; + overflow: hidden; + } + + .chat-content img { + border: 1px solid #ccc; + } + + .ratemy { + color: #7e8790 !important; + font-size: 18px; + } + + .rateyou { + color: #258dee !important; + font-size: 18px; + } + diff --git a/contact-center/app/src/main/resources/templates/apps/agent/media/message.html b/contact-center/app/src/main/resources/templates/apps/agent/media/message.html deleted file mode 100644 index 95740ff4..00000000 --- a/contact-center/app/src/main/resources/templates/apps/agent/media/message.html +++ /dev/null @@ -1,66 +0,0 @@ -<#if chatmessage.msgtype?? && chatmessage.msgtype == "image"> - - - -<#elseif chatmessage.msgtype?? && chatmessage.msgtype == "cooperation"> - - 系统发送了一个协作邀请 - -<#elseif chatmessage.msgtype?? && chatmessage.msgtype == "file"> - -<#elseif chatmessage.msgtype?? && chatmessage.msgtype == "location"> -
              ${chatmessage.message!''}
              - <#if systemConfig?? && systemConfig.mapkey?? && systemConfig.mapkey != ''> -
              - - -<#elseif chatmessage.msgtype?? && chatmessage.msgtype == "voice"> -

              - - - - - - - - ${chatmessage.duration!''}秒 - - - -

              - <#if chatmessage.expmsg??> -
              ${chatmessage.expmsg!''}
              - - -<#else> - ${(chatmessage.message!'')?no_esc} - <#if chatmessage.suggestmsg?? && chatmessage.suggestmsg!=""> - - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/agent/media/message.pug b/contact-center/app/src/main/resources/templates/apps/agent/media/message.pug new file mode 100644 index 00000000..3a64d989 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/agent/media/message.pug @@ -0,0 +1,57 @@ +if chatmessage.msgtype && chatmessage.msgtype == "image" + a(href="/agent/message/image.html?id=" + chatmessage.id, data-toggle="ajax", data-width="950", data-height="600", title="图片") + img.ukefu-media-image(src="!{chatmessage.message ? chatmessage.message : ''}", id="#{chatmessage.id}") +else if chatmessage.msgtype && chatmessage.msgtype == "cooperation" + a(href="/agent/message/image.html?t=review&id=" + chatmessage.message, data-toggle="ajax", data-width="950", data-height="600", title="图片") + | 系统发送了一个协作邀请 +else if chatmessage.msgtype && chatmessage.msgtype == "file" + .ukefu-message-file + .ukefu-file-icon + i.kfont  + .ukefu-file-desc + a(href=chatmessage.message, target="_blank") + div= chatmessage.filename + div #{chatmessage.filesize / 1024}kb +else if chatmessage.msgtype && chatmessage.msgtype == "location" + div #{chatmessage.message} + if systemConfig && systemConfig.mapkey && systemConfig.mapkey != '' + .ukefu-map(id="map_" + chatmessage.id) + script(type="text/javascript"). + var map = new BMap.Map("map_#{chatmessage.id}"); + // 创建地图实例 + var chatmessage_locy = '#{chatmessage.locy}' + var ggPoint = new BMap.Point(chatmessage_locy ? chatmessage_locy : '0', chatmessage_locy ? chatmessage_locy : '0'); // 创建点坐标 + MapUtil.convert(map, ggPoint, "#{chatmessage.message}", "#{chatmessage.scale ? chatmessage.scale : '15'}"); +else if chatmessage.msgtype && chatmessage.msgtype == "voice" + p.weixinAudio(id="voice_media_" + chatmessage.id, style="width:" + chatmessage.duration && chatmessage.duration != '' ? chatmessage.duration > 30 ? '300px' : 50 + (chatmessage.duration * 10) + 'px' : '50px') + audio#media(src=chatmessage.message, width="1", height="1", preload="") + span#audio_area.db.audio_area(title=chatmessage.expmsg) + span.audio_wrp.db + span.audio_play_area + i.icon_audio_default + i.icon_audio_playing + span.audio_length.tips_global + | #{chatmessage.duration}秒 + span#audio_progress.progress_bar(style="width: 0%;") + if chatmessage.expmsg + .ukefu-asr + | #{chatmessage.expmsg} + script(type="text/javascript"). + $('#voice_media_' + '#{chatmessage.id}').weixinAudio({ + autoplay: false + }); +else + | !{chatmessage.message} + if chatmessage.suggestmsg && chatmessage.suggestmsg != "" + ul.agent-info-list + for item in chatmessage.suggest + li.ukefu-suggest-item + a.suggestitem(href="javascript:void(0)") + | #{item.title} + + + + + + + diff --git a/contact-center/app/src/main/resources/templates/apps/agent/media/messageimage.html b/contact-center/app/src/main/resources/templates/apps/agent/media/messageimage.html deleted file mode 100644 index 7bda76b2..00000000 --- a/contact-center/app/src/main/resources/templates/apps/agent/media/messageimage.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - -
              -
              -
              - -
              -
              - 你的浏览器不支持 canvas 绘图 -
              -
              - -
              \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/agent/media/messageimage.pug b/contact-center/app/src/main/resources/templates/apps/agent/media/messageimage.pug new file mode 100644 index 00000000..2ca17b07 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/agent/media/messageimage.pug @@ -0,0 +1,56 @@ +link(rel='stylesheet', type='text/css', href='/js/scrawl/css/scrawl.css') +script(type='text/javascript', src='/js/scrawl/scrawl.js') +script(language='javascript'). + var msgid = "#{chatMessage.id}", fileid = "#{chatMessage.attachmentid}"; + var height; + var width; + $(document).ready(function () { + height = $('#ukefu-image-content')[0].offsetHeight; + width = $('#ukefu-image-content')[0].offsetWidth; + $('#ukefu-image-content')[0].width = width; + if('#{agentUser}' && !'#{t}'){ + top.layer.confirm( + "访客在线,是否邀请协作对话?", + { + btn: ['邀请', '不邀请'] //按钮 + }, + function (index) { + layer.close(index); + top.WebIM.sendTypeMessage("${chatMessage.id!''}", "${user.id!''}", "${agentUser.appid!''}", "${user.sessionid!''}", "${agentUser.orgi!''}", "<#if agentUser??>${agentUser.userid!''}", "${user.username!''}", "cooperation", "${chatMessage.attachmentid!''}"); + }, + function (index) { + layer.close(index); + } + ); + } + $("#ukefu_img_ctx").load(function () { + + console.log($('#ukefu-image-content')[0].offsetHeight); + new Canvas({ + canvasId: "canvas-borad", + width: width, + height: height + }); + var canvas = $("#canvas-borad")[0]; + if (canvas.getContext) { + //获取对应的CanvasRenderingContext2D对象(画笔) + var ctx = canvas.getContext("2d"); + + //创建新的图片对象 + var img = new Image(); + //指定图片的URL + img.src = "/res/image.html?id=${chatMessage.attachmentid!''}&cooperation=true&original=true"; + //浏览器加载图片完毕后再绘制图片 + img.onload = function () { + //以Canvas画布上的坐标(10,10)为起始点,绘制图像 + ctx.drawImage(img, 0, 0); + }; + } + }); + }); +.ukefu-preview-image.scrawl-main#scrawl-main + .ukefu-image-content.hot(style='max-width: none;width: 100%') + .ukefu-image-canvas#ukefu-image-content + img#ukefu_img_ctx(src=chatMessage.message) + .drawBoard + canvas#canvas-borad.brushBorad 你的浏览器不支持 canvas 绘图 diff --git a/contact-center/app/src/main/resources/templates/apps/agent/othertopic.html b/contact-center/app/src/main/resources/templates/apps/agent/othertopic.html deleted file mode 100644 index e3ae60aa..00000000 --- a/contact-center/app/src/main/resources/templates/apps/agent/othertopic.html +++ /dev/null @@ -1,32 +0,0 @@ -
                - <#if topicList?? && topicList?size gt 0> - <#list topicList as topic> -
              • - - ${topic.title!''} - -
              • - - <#else> -
              • -
                - -
                还没有外部知识内容
                -
                -
              • - -
              - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/agent/quicklist.html b/contact-center/app/src/main/resources/templates/apps/agent/quicklist.html deleted file mode 100644 index 8524e20a..00000000 --- a/contact-center/app/src/main/resources/templates/apps/agent/quicklist.html +++ /dev/null @@ -1,136 +0,0 @@ -
                - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/agent/quickreply/add.html b/contact-center/app/src/main/resources/templates/apps/agent/quickreply/add.html deleted file mode 100644 index 16c106eb..00000000 --- a/contact-center/app/src/main/resources/templates/apps/agent/quickreply/add.html +++ /dev/null @@ -1,101 +0,0 @@ -
                -
                -
                -
                - -
                - -
                -
                -
                -
                -
                - -
                - - - - -
                -
                -
                -
                - -
                -
                -
                -
                -
                - -
                -
                -
                -
                - - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/agent/quickreply/addtype.html b/contact-center/app/src/main/resources/templates/apps/agent/quickreply/addtype.html deleted file mode 100644 index a198120b..00000000 --- a/contact-center/app/src/main/resources/templates/apps/agent/quickreply/addtype.html +++ /dev/null @@ -1,141 +0,0 @@ -<#include "/public/macro.html"> -
                -
                -
                -
                -

                分类基本信息

                -
                -
                -
                - -
                - -
                - * -
                -
                - -
                - -
                -
                -
                -
                -
                -
                -

                扩展信息

                -
                -
                -
                - -
                - - - - -
                -
                -
                - - -
                -
                - -
                - -
                -
                -
                -
                -
                -
                - -
                -
                - - -
                -
                -
                -
                - - - diff --git a/contact-center/app/src/main/resources/templates/apps/agent/quickreply/edit.html b/contact-center/app/src/main/resources/templates/apps/agent/quickreply/edit.html deleted file mode 100644 index 2ae0bc4b..00000000 --- a/contact-center/app/src/main/resources/templates/apps/agent/quickreply/edit.html +++ /dev/null @@ -1,107 +0,0 @@ -
                -
                - -
                - -
                - -
                -
                -
                -
                - -
                - - - - -
                -
                -
                -
                - -
                - -
                -
                -
                -
                - - -
                -
                -
                -
                - - - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/agent/quickreply/edittype.html b/contact-center/app/src/main/resources/templates/apps/agent/quickreply/edittype.html deleted file mode 100644 index 1baec860..00000000 --- a/contact-center/app/src/main/resources/templates/apps/agent/quickreply/edittype.html +++ /dev/null @@ -1,142 +0,0 @@ -<#include "/public/macro.html"> -
                -
                - -
                -
                -

                分类基本信息

                -
                -
                -
                - -
                - -
                - * -
                -
                - -
                - -
                -
                -
                -
                -
                -
                -

                扩展信息

                -
                -
                -
                - -
                - - - - -
                -
                -
                - - -
                -
                - -
                - -
                -
                -
                -
                -
                -
                - -
                -
                - - -
                -
                -
                -
                - - - diff --git a/contact-center/app/src/main/resources/templates/apps/agent/quickreplycontent.html b/contact-center/app/src/main/resources/templates/apps/agent/quickreplycontent.html deleted file mode 100644 index 3d88ae9a..00000000 --- a/contact-center/app/src/main/resources/templates/apps/agent/quickreplycontent.html +++ /dev/null @@ -1 +0,0 @@ -<#if quickReply??>${(quickReply.content!'')?no_esc} \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/agent/summary.html b/contact-center/app/src/main/resources/templates/apps/agent/summary.html deleted file mode 100644 index 697b4985..00000000 --- a/contact-center/app/src/main/resources/templates/apps/agent/summary.html +++ /dev/null @@ -1,107 +0,0 @@ -<#include "/public/macro.html"> -
                -
                - <#if summary??> - - - - - -
                -
                - -
                - -
                -
                -
                - * -
                -
                -
                -
                - -
                -
                - checked> - checked> -
                -
                -
                -
                - -
                - <#if summary?? && summary.reservtype??> - <@select "com.dic.summary.reservtype" "reservtype" summary.reservtype!'' "lay-ignore" "width:120px;"/> - <#else> - <@select "com.dic.summary.reservtype" "reservtype" '' "lay-ignore" "width:120px;"/> - -
                -
                -
                - -
                - - -
                -
                -
                - -
                -
                - -
                - -
                -
                -
                - -
                -
                - - -
                -
                -
                -
                - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/agent/summary.pug b/contact-center/app/src/main/resources/templates/apps/agent/summary.pug new file mode 100644 index 00000000..1b6fb4ec --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/agent/summary.pug @@ -0,0 +1,82 @@ +include /mixins/dic.mixin.pug +.uk-layui-form + form.layui-form(action='/agent/summary/save.html', data-toggle='ajax-form', data-close='true', data-inner='#ukefu-chat-agent', method='post') + if summary + input(type="hidden", name="id", value=summary.id) + input(type='hidden', name='userid', value=userid) + input(type='hidden', name='agentserviceid', value=agentserviceid) + input(type='hidden', name='agentuserid', value=agentuserid) + input(type='hidden', name='channel', value=channel) + .layui-form-item + .layui-inline + label.layui-form-label#cusname 服务类型: + .layui-input-inline(style='width: 765px;') + select.tags(name='servicetype', multiple, required, lay-verify='required', lay-ignore, style='width:100%;') + if tags + for tag in tags + option(value=tag.id,selected=(summary && summary.servicetype && summary.servicetype.indexOf(tag.id) >= 0 ? 'selected' : false))= tag.tag + .layui-inline + font(color='red') * + .layui-form-item + .layui-inline + label.layui-form-label 是否预约: + .layui-input-inline(style='width:150px;') + .layui-input-block + input(type="radio", name="reservation", lay-filter="reservation", value="1", title="是",checked=(summary && summary.reservation ? 'checked' : false)) + input(type="radio", name="reservation", lay-filter="reservation", value="0", title="否",checked=(!(summary && summary.reservation) ? 'checked' : false)) + .layui-inline.ukefu_reservation(style=(summary && summary.reservation == true ? 'display:;' : 'display:none')) + label.layui-form-label(style='width: 80px;') 预约方式: + .layui-input-inline(style='width: 120px;') + if summary && summary.reservtype + +sysDicSelect('com.dic.summary.reservtype','reservtype',summary.reservtype,"lay-ignore width:120px;' ") + else + +sysDicSelect('com.dic.summary.reservtype','reservtype','',"lay-ignore width:120px;' ") + .layui-inline.ukefu_reservation(style=(summary && summary.reservation == true ? 'display:;' : 'display:none')) + label.layui-form-label(style='width: 80px;') 预约时间: + .layui-input-inline(style='width: 245px;') + input#reservtime.layui-input(type='text', name='reservtime', autocomplete='off', value=(summary && summary.reservtime ? pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', summary.reservtime) : '')) + i.layui-icon(style='position: absolute;right: 3px;top: 6px;font-size: 25px;')  + .layui-form-item + .layui-inline + label.layui-form-label 服务小结: + .layui-input-inline(style='width: 765px;') + textarea.layui-textarea(name="summary", placeholder="服务小结", style="resize:none;height:180px") + if summary + | #{summary.summary} + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 立即提交 + button.layui-btn.layui-btn-original(type='reset', onclick='layer.close(layer.index);') 关闭 +script. + layui.use('form', function () { + var form = layui.form(); + form.render(); //更新全部 + form.on("radio(reservation)", function (data) { + if (data.value == '1') { + $('.ukefu_reservation').show(); + } else { + $('.ukefu_reservation').hide(); + } + }); + }); + layui.use('element', function () { + var element = layui.element(); + }); + layui.use('laydate', function () { + var laydate = layui.laydate; + + var date = { + min: laydate.now(), + istime: true, + format: "YYYY-MM-DD hh:mm:ss", + istoday: false + }; + + document.getElementById('reservtime').onclick = function () { + date.elem = this; + laydate(date); + } + + }); + $(".tags").select2(); + diff --git a/contact-center/app/src/main/resources/templates/apps/agent/templates/begin_tpl.tpl b/contact-center/app/src/main/resources/templates/apps/agent/templates/begin_tpl.tpl new file mode 100644 index 00000000..9e308881 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/agent/templates/begin_tpl.tpl @@ -0,0 +1,3 @@ +
                + 用户“<%=data.username%>”开始对话 +
                \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/agent/templates/end_tpl.tpl b/contact-center/app/src/main/resources/templates/apps/agent/templates/end_tpl.tpl new file mode 100644 index 00000000..e3a91715 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/agent/templates/end_tpl.tpl @@ -0,0 +1,3 @@ +
                + 用户“<%=data.username%>”已经离开 +
                \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/agent/templates/message_tpl.tpl b/contact-center/app/src/main/resources/templates/apps/agent/templates/message_tpl.tpl new file mode 100644 index 00000000..35cb339b --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/agent/templates/message_tpl.tpl @@ -0,0 +1,85 @@ +
                id="writing"<%}%>> +
                + +
                + <% if(data.userid == data.cususerid) {%> + name="nolabe" style="cursor:pointer;font-size: 30px; color: #aaaaaa;">စ + <%=data.createtime%> + <% if(data.intervented && data.supervisorname){%><%=data.supervisorname%><%}else{%><%=data.username%><%}%> + name="nolabe" style="cursor:pointer;font-size: 30px; color: #aaaaaa;">စ + <% }else{%> + name="nolabe" style="cursor:pointer;font-size: 30px; color: #aaaaaa;">စ + <% if(data.intervented && data.supervisorname){%><%=data.supervisorname%><%}else{%><%=data.username%><%}%> + <%=data.createtime%> + name="nolabe" style="cursor:pointer;font-size: 30px; color: #aaaaaa;">စ + <%}%> +
                +
                + +
                + <% if(data.msgtype == 'image'){ %> + + <% }else if(data.msgtype == 'cooperation'){ %> + + 系统发送了一个协作邀请 + + <% }else if(data.msgtype == 'file'){ %> + + <% }else if(data.msgtype == 'location'){ %> +
                <%:=data.message%>
                +
                + - - -
                - - - -
                -
                -
                -
                -

                - 技能组 -

                -
                -
                -
                  - <#if skillGroups??> - <#list skillGroups as skill> - <#if user.affiliates?seq_contains(skill.id)> - <#assign agentNum = 0 > - <#if userList??><#list userList as agent><#if agent.skills[skill.id]??><#assign agentNum = agentNum + 1 > -
                • - - ${skill.name!''}(${agentNum!''}) -
                • - - - - - <#if skillGroups??> - <#list skillGroups as skill> - <#if !user.affiliates?seq_contains(skill.id)> - <#assign agentNum = 0 > - <#if userList??><#list userList as agent><#if agent.skills[skill.id]??><#assign agentNum = agentNum + 1 > -
                • - ${skill.name!''}(${agentNum!''}) -
                • - - - -
                -
                -
                -
                -
                -
                -
                - <#include "/apps/agent/transferagentlist.html"> -
                -
                -
                -
                -
                -
                -

                - 转接附言(最多不超过255个字符)

                -
                -
                -
                - -
                -
                -
                -
                -
                - -
                -
                - - -
                -
                -
                - - diff --git a/contact-center/app/src/main/resources/templates/apps/agent/transfer.pug b/contact-center/app/src/main/resources/templates/apps/agent/transfer.pug new file mode 100644 index 00000000..b0fc0234 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/agent/transfer.pug @@ -0,0 +1,134 @@ +script(src='/js/utils.js') +script(src='/js/CSKeFu_Rest_Request.v1.js') +form#selfTransAgentUserForm.layui-form(method='post') + input(type='hidden', name='userid', value=userid) + input(type='hidden', name='agentserviceid', value=agentserviceid) + input(type='hidden', name='agentuserid', value=agentuserid) + .row(style='height:295px;') + .col-lg-3 + .box + .box-title + h1.site-h1(style='background-color:#FFFFFF;margin:0px;padding:0 0 4px 20px;') + | 技能组 + .box-body(style='padding:0px 0px;position: relative;height:250px;overflow-y:auto;') + ul + if skillGroups + for skill in skillGroups + if (user.affiliates.contains(skill.id)) + - var agentNum = 0 + if userList + for agent in userList + if skill.id && agent.organs[skill.id] + - agentNum = agentNum + 1 + li.uk_role(title= skill.name + "(" + agentNum + ")", class=({'this': skill.id == currentorgan}), style="margin:0px;padding:7px 0 7px 20px;", onclick="$('.uk_role.this').removeClass('this');$(this).addClass('this');") + a(href="/agent/transfer/agent.html?organ=" + skill.id + "&agentid=" + agentno, data-toggle="load", data-target="#skillAgentList") + i.kfont(style="margin-top: 3px;float: left")  + span(style="max-width: 120px;text-overflow: ellipsis;white-space: nowrap; overflow: hidden;float: left;margin: 0 3px")= skill.name + | (#{agentNum}) + if skillGroups + for skill in skillGroups + if (!user.affiliates.contains(skill.id)) + - var agentNum = 0 + if userList + for agent in userList + if skill.id && agent.organs[skill.id] + - agentNum = agentNum + 1 + li.uk_role(title= skill.name + "(" + agentNum + ")", class=({'this': skill.id == currentorgan}), style="margin:0px;padding:7px 0 7px 20px;", onclick="$('.uk_role.this').removeClass('this');$(this).addClass('this');") + a(href="/agent/transfer/agent.html?organ=" + skill.id + "&agentid=" + agentno, data-toggle="load", data-target="#skillAgentList") + i.kfont(style="margin-top: 3px;float: left")  + span(style="max-width: 120px;text-overflow: ellipsis;white-space: nowrap; overflow: hidden;float: left;margin: 0 3px")= skill.name + | (#{agentNum}) + .col-lg-9(style='border-left:1px solid #dedede;') + .box + .box-body#skillAgentList(style='padding:0px 2px;position: relative;height:295px;overflow-y:auto;') + include /apps/agent/transferagentlist.pug + .row(style='margin-top:5px;') + .col-lg-12 + h1.site-h1(style='background-color:#EEEEEE;padding-left: 20px') 转接附言(最多不超过255个字符) + .layui-form-item(style='padding-left:10px;padding-top:5px;') + .layui-inline + .layui-input-inline(style='width: 720px;') + textarea.layui-textarea(name='memo', placeholder='请输入转接附言', style='resize:none;height:90px;min-height:90px;margin-left: 5px', maxlength='255') + if agentservice + | #{agentservice.transmemo} + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='contactsForm') 转接 + button.layui-btn.layui-btn-original(type='button', onclick='closeTransferOutDialogue()') 关闭 +script. + /** + * 转接访客坐席 + * @param agentUserId + * @param targetAgentno + * @param agentUserServiceId + * @param memo + */ + function submitTransAgentUserOutByAgent(agentUserId, targetAgentno, agentUserServiceId, memo) { + restApiRequest({ + silent: true, + path: 'agentuser', + data: { + ops: 'transout', + agentno: targetAgentno, + agentUserId: agentUserId, + agentServiceId: agentUserServiceId, + memo: memo + } + }).then(function (result) { + if (result.rc === 0) { + // 转接成功 + top.layer.msg('转接已完成', {icon: 1, time: 1000}) + closeTransferOutDialogue(); + // 进行显示调整! + if (multiMediaDialogWin.$("#chat_users li").length > 1) { + multiMediaDialogWin.$("li[remove-id=" + agentUserId + "]").remove(); + multiMediaDialogWin.$("#chat_users li:first-child a").click(); + } else { + $('#agentdesktop').click(); + } + } else if (result.rc === 1) { + top.layer.msg('不合法的请求参数', {icon: 2, time: 3000}) + } else if (result.rc === 2) { + top.layer.msg('不合法的操作', {icon: 2, time: 3000}) + } else if (result.rc === 3) { + top.layer.msg('您没有权限执行该操作', {icon: 2, time: 3000}) + } else if (result.rc === 4) { + top.layer.msg('该访客会话不存在', {icon: 2, time: 3000}) + } else if (result.rc === 5) { + top.layer.msg('参数不合法', {icon: 2, time: 3000}) + } + }, function (error) { + console.log("error", error); + // 服务器异常 + top.layer.msg('服务器抽风,请稍后再试!', {icon: 2, time: 3000}) + }) + } + + function closeTransferOutDialogue() { + layer.closeAll("page") + } + + $('.ukefu-agentstatus td:not(:last-child)').on("click", function () { + $('.ctxid').prop("checked", false); + if ($(this).parent().find("input").prop("checked")) { + $(this).parent().find("input").prop("checked", false); + } else { + $(this).parent().find("input").prop("checked", true); + } + }); + + layui.use('form', function () { + var form = layui.form(); + // form.render(); //更新全部 + form.on('submit(contactsForm)', function (data) { + console.log("contactForm", data.field) + // 验证数据的完整,以下为必填 + if (data.field["userid"] && data.field["agentuserid"] && data.field["agentserviceid"] && data.field["agentno"]) { + submitTransAgentUserOutByAgent(data.field["agentuserid"], data.field["agentno"], data.field["agentserviceid"], data.field["memo"]); + } else { + top.layer.msg('未选择合理的转接信息!', {icon: 2, time: 3000}); + } + return false; + }); + }) + diff --git a/contact-center/app/src/main/resources/templates/apps/agent/transferagentlist.html b/contact-center/app/src/main/resources/templates/apps/agent/transferagentlist.html deleted file mode 100644 index e59f4aa3..00000000 --- a/contact-center/app/src/main/resources/templates/apps/agent/transferagentlist.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - <#if userList?? && currentorgan??> - <#list userList as agent> - <#if agent.skills[currentorgan]??> - - - - - - - - - - - - -
                坐席登陆时间最大用户数服务用户数
                - - ${agent.username!''}(${agent.uname!''})<#if agent.agentStatus??>${agent.agentStatus.logindate?string('yyyy-MM-dd HH:mm:ss')} - <#if agent.agentStatus??>${agent.agentStatus.maxusers!0} - - <#if agent.agentStatus??>${agent.agentStatus.users!0} -
                - diff --git a/contact-center/app/src/main/resources/templates/apps/agent/transferagentlist.pug b/contact-center/app/src/main/resources/templates/apps/agent/transferagentlist.pug new file mode 100644 index 00000000..2937e9c0 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/agent/transferagentlist.pug @@ -0,0 +1,34 @@ +table.layui-table(lay-skin='line', style='table-layout: fixed; word-break: break-all;') + colgroup + col(width='3%') + col(width='20%') + col(width='20%') + col(width='15%') + col(width='15%') + thead + tr + th + th 坐席 + th 登陆时间 + th 最大用户数 + th 服务用户数 + tbody + if userList && currentorgan + for agent in userList + if agent.skills[currentorgan] + tr.ukefu-agentstatus + td(style="width:1px;padding:10px 0px 10px 10px;") + input.agentnoradio.ctxid(type="radio", name="agentno", value= agent.id, onclick="selectAgentnoWithRadioClick(this)", id="user_" + agent.id, style="display:block;") + td(title= agent.username + "(" + agent.uname + ")", style="text-overflow: ellipsis;white-space: nowrap;overflow: hidden;") #{agent.username}(#{agent.uname}) + td #{agent.agentStatus && agent.agentStatus.logindate ? pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', agent.agentStatus.logindate) : ""} + td #{agent.agentStatus.maxusers ? agent.agentStatus.maxusers : 0} + td #{agent.agentStatus.users ? agent.agentStatus.users : 0} + + script. + $(".agentnoradio").onclick = function (e) { + return false; + } + + function selectAgentnoWithRadioClick(radiovalue) { + radiovalue.parentNode.click(); + } \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/agent/upload.html b/contact-center/app/src/main/resources/templates/apps/agent/upload.html deleted file mode 100644 index fe520539..00000000 --- a/contact-center/app/src/main/resources/templates/apps/agent/upload.html +++ /dev/null @@ -1,8 +0,0 @@ -{ - "error" : ${upload.error!'1'} - <#if upload?? && upload.error?? && upload.error == '0'> - ,"url":"${upload.url!''}" - <#else> - ,"message":"${upload.message!''}" - -} \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/agent/workorders.html b/contact-center/app/src/main/resources/templates/apps/agent/workorders.html deleted file mode 100644 index 127f16c3..00000000 --- a/contact-center/app/src/main/resources/templates/apps/agent/workorders.html +++ /dev/null @@ -1,58 +0,0 @@ -
                -
                -

                - 工单 -
                - -
                -

                -
                -
                - -
                -
                - diff --git a/contact-center/app/src/main/resources/templates/apps/business/callcenter/configure/acl.html b/contact-center/app/src/main/resources/templates/apps/business/callcenter/configure/acl.html deleted file mode 100644 index fc213667..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/callcenter/configure/acl.html +++ /dev/null @@ -1,45 +0,0 @@ - -
                - - - - <#if aclList??> - <#list aclList as acl> - - ${(acl.strategy!'')?no_esc} - - - - - - - - - - - - - - - - - - - - - - -
                -
                diff --git a/contact-center/app/src/main/resources/templates/apps/business/callcenter/configure/callcenter.html b/contact-center/app/src/main/resources/templates/apps/business/callcenter/configure/callcenter.html deleted file mode 100644 index 3fc5f551..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/callcenter/configure/callcenter.html +++ /dev/null @@ -1,62 +0,0 @@ - -
                - - - - - - - - - <#if skillGroups??> - <#list skillGroups as skill> - - - - - - - - - - - - - - - - - - - - - - - - - <#if skillExtentionList??> - <#list skillExtentionList as skillExtention> - <#if skillExtention.extension?? && skillExtention.extension!=""> - - - - - - - - <#if skillExtentionList??> - <#list skillExtentionList as skillExtention> - <#if skillGroups??> - <#list skillGroups as skill> - <#if skill.id == skillExtention.skillid> - - - - - - - - - -
                -
                diff --git a/contact-center/app/src/main/resources/templates/apps/business/callcenter/configure/external.html b/contact-center/app/src/main/resources/templates/apps/business/callcenter/configure/external.html deleted file mode 100644 index 60bd03c1..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/callcenter/configure/external.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - - <#if sipTrunkList??> - <#list sipTrunkList as sipTrunk> - - ${sipTrunk.sipcontent!''} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/contact-center/app/src/main/resources/templates/apps/business/callcenter/configure/ivr.html b/contact-center/app/src/main/resources/templates/apps/business/callcenter/configure/ivr.html deleted file mode 100644 index 264a5f06..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/callcenter/configure/ivr.html +++ /dev/null @@ -1,71 +0,0 @@ - -
                - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                -
                diff --git a/contact-center/app/src/main/resources/templates/apps/business/callcenter/dialplan/index.html b/contact-center/app/src/main/resources/templates/apps/business/callcenter/dialplan/index.html deleted file mode 100644 index e1282dff..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/callcenter/dialplan/index.html +++ /dev/null @@ -1,83 +0,0 @@ - -
                - - - - - - - - - <#if routerList??> - <#list routerList as router> - - - ${(router.routercontent!'')?no_esc} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                -
                diff --git a/contact-center/app/src/main/resources/templates/apps/business/callcenter/extention/agent.html b/contact-center/app/src/main/resources/templates/apps/business/callcenter/extention/agent.html deleted file mode 100644 index 67914cfb..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/callcenter/extention/agent.html +++ /dev/null @@ -1 +0,0 @@ -${agent!''} \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/callcenter/extention/detail.html b/contact-center/app/src/main/resources/templates/apps/business/callcenter/extention/detail.html deleted file mode 100644 index 2cf24e7d..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/callcenter/extention/detail.html +++ /dev/null @@ -1,12 +0,0 @@ -{ - "id":"${extension.id!''}", - "extension":"${extension.extension!''}", - "hostid":"${extension.hostid!''}", - "callout":"<#if models?seq_contains("callout")>${extension.callout!''}", - "webrtc":"<#if extension.enablewebrtc?? && extension.enablewebrtc == true && pbxhost?? && pbxhost.enablewebrtc?? && pbxhost.enablewebrtc == true>true<#else>false", - "webrtchost":"<#if pbxhost??>${pbxhost.webrtcaddress!''}", - "webrtcport":"<#if pbxhost??>${pbxhost.webrtcport!''}", - "webrtcssl":"<#if pbxhost?? && pbxhost.webrtcssl == true>true<#else>false", - "orgi":"${extension.orgi!''}", - "userid":"${user.id!''}" -} diff --git a/contact-center/app/src/main/resources/templates/apps/business/callcenter/extention/index.html b/contact-center/app/src/main/resources/templates/apps/business/callcenter/extention/index.html deleted file mode 100644 index 64fea93a..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/callcenter/extention/index.html +++ /dev/null @@ -1,52 +0,0 @@ - -
                - - - - - - - - - - - - - - - <#if extensionList??> - <#list extensionList as extension> - - - - - - - - - - - - - - - - - - - - - - - - <#if extensionList??> - <#list extensionList as extension> - - - - - - - -
                -
                \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/callcenter/extention/ivr.html b/contact-center/app/src/main/resources/templates/apps/business/callcenter/extention/ivr.html deleted file mode 100644 index 07918927..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/callcenter/extention/ivr.html +++ /dev/null @@ -1,7 +0,0 @@ - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/callcenter/extention/siptrunk.html b/contact-center/app/src/main/resources/templates/apps/business/callcenter/extention/siptrunk.html deleted file mode 100644 index b7751e43..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/callcenter/extention/siptrunk.html +++ /dev/null @@ -1 +0,0 @@ -${siptrunk.name!''} \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/callcenter/notfound.html b/contact-center/app/src/main/resources/templates/apps/business/callcenter/notfound.html deleted file mode 100644 index 8734c174..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/callcenter/notfound.html +++ /dev/null @@ -1,6 +0,0 @@ - - -
                - -
                -
                \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/callcenter/template.html b/contact-center/app/src/main/resources/templates/apps/business/callcenter/template.html deleted file mode 100644 index 9da19b9c..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/callcenter/template.html +++ /dev/null @@ -1,2 +0,0 @@ -<#assign inlineTemplate = (template.templettext!'')?interpret> -<@inlineTemplate /> \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/contacts/add.html b/contact-center/app/src/main/resources/templates/apps/business/contacts/add.html deleted file mode 100644 index 103948de..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/contacts/add.html +++ /dev/null @@ -1,191 +0,0 @@ -<#include "/public/macro.html"> -
                -
                - -
                -
                -

                基本信息

                -
                -
                -
                - -
                - - -
                -
                -
                - *(必填项) (您得到此联系人的时间) -
                -
                - - -
                - <@select "com.dic.contacts.ckind" "ckind" ckind!'' "lay-ignore required lay-verify='required' "/> -
                -
                -
                -
                -
                -
                -

                联系人信息

                -
                -
                -
                - -
                - -
                -
                -
                - *(必填项) -
                -
                -
                -
                - -
                -
                - - - -
                -
                -
                -
                - -
                - - -
                -
                -
                - -
                -
                - -
                - -
                -
                - -
                - -
                - -
                -
                -
                - -
                -
                - -
                - <@select "com.dic.address.area" "province" "" "lay-ignore" "width:85px;"/> -
                -
                -
                -
                - <@select "com.dic.address.area.city" "city" "" "lay-ignore" "width:86px;"/> -
                -
                -
                - -
                - -
                -
                -
                -
                -
                - -
                - -
                -
                -
                - -
                -
                - -
                - -
                -
                -
                - -
                -
                - -
                - -
                -
                -
                -
                -
                -
                - -
                -
                - - -
                -
                -
                -
                - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/contacts/detail.html b/contact-center/app/src/main/resources/templates/apps/business/contacts/detail.html deleted file mode 100644 index 01e5f366..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/contacts/detail.html +++ /dev/null @@ -1,476 +0,0 @@ -
                -
                - <#include "/apps/business/contacts/include/left.html"> -
                -
                - -
                -
                -
                -

                - - - 联系人详情 - -

                -
                -
                -
                -
                -
                -
                -

                标签

                -
                -
                -
                - -
                -
                -
                -
                -
                -
                -
                -
                -
                -
                -
                -
                -
                -

                笔记

                -
                -
                - -
                - -
                -
                -
                -
                - -
                - -
                -
                -
                - -
                -
                -
                -
                -
                -
                -
                -
                -
                -
                -
                -

                往来历史

                -
                -
                -
                -
                -
                -
                -
                -
                -
                -
                -
                -
                - - -
                -
                -

                基本信息

                -
                -
                -
                - -
                - <#if contacts.touchtime??>${contacts.touchtime?string('yyyy-MM-dd')} -
                -
                -
                -
                -
                - -
                - ${uKeFuDic[contacts.ckind!''].name!''} -
                -
                -
                -
                -
                -
                -

                联系人信息

                -
                -
                -
                - -
                - ${contacts.name!''} -
                -
                -
                -
                -
                - -
                - <#if contacts.gender?? && contacts.gender == '1'>男 - <#if contacts.gender?? && contacts.gender == '0'>女 - <#if contacts.gender?? && contacts.gender == '-1'>未知 -
                -
                -
                -
                -
                - -
                - ${contacts.cusbirthday!''} -
                -
                -
                -
                -
                - -
                - ${contacts.phone!''} -
                -
                -
                -
                -
                - -
                - ${contacts.mobileno!''} -
                -
                -
                -
                -
                - -
                - ${contacts.skypeid!''} -
                -
                -
                -
                -
                - -
                - ${uKeFuDic[contacts.province!''].name!''} -
                -
                -
                -
                - ${uKeFuDic[contacts.city!''].name!''} -
                -
                -
                -
                -
                - -
                - ${contacts.email!''} -
                -
                -
                - <#if contacts.wlusername?? || contacts.wluid??> -
                -
                - -
                - ${contacts.wlusername!''} - (${contacts.wluid!''}) -
                -
                -
                - - <#if contacts.wlcompany_name?? || contacts.wlcid??> -
                -
                - -
                - ${contacts.wlcompany_name!''} - (${contacts.wlcid!''}) -
                -
                -
                - - <#if contacts.wlsystem_name?? || contacts.wlsid??> -
                -
                - -
                - ${contacts.wlsystem_name!''} - (${contacts.wlsid!''}) -
                -
                -
                - -
                -
                - -
                - -
                -
                -
                -
                -
                - -
                - -
                -
                -
                -
                -
                -
                -
                -
                -
                -
                -
                - -
                -
                - - - - diff --git a/contact-center/app/src/main/resources/templates/apps/business/contacts/edit.html b/contact-center/app/src/main/resources/templates/apps/business/contacts/edit.html deleted file mode 100644 index 112a8dfb..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/contacts/edit.html +++ /dev/null @@ -1,196 +0,0 @@ -<#include "/public/macro.html"> -
                -
                - - - - - - - - - -
                -
                -

                基本信息

                -
                -
                -
                - -
                - - -
                -
                -
                - *(必填项) (您得到此联系人的时间) -
                -
                - -
                - <#if contacts.ckind?? && contacts.ckind != ''> - <@select "com.dic.contacts.ckind" "ckind" contacts.ckind!'' "lay-ignore required lay-verify='required' "/> - <#else> - <@select "com.dic.contacts.ckind" "ckind" "" "lay-ignore"/> - -
                -
                -
                -
                -
                -
                -

                联系人信息

                -
                -
                -
                - -
                - -
                -
                -
                - *(必填项) -
                -
                -
                -
                - -
                -
                - checked> - checked> - checked> -
                -
                -
                -
                - -
                - - -
                -
                -
                - -
                -
                - -
                - -
                -
                -
                - -
                - -
                -
                -
                - -
                -
                - -
                - <@select "com.dic.address.area" "province" contacts.province "lay-ignore" "width:85px;"/> -
                -
                -
                -
                - <@select contacts.city+".subdic" "city" contacts.city "lay-ignore" "width:86px;"/> -
                -
                -
                - -
                - -
                -
                -
                -
                -
                - -
                - -
                -
                -
                - -
                -
                - -
                - -
                -
                -
                - -
                -
                - -
                - -
                -
                -
                -
                -
                -
                - -
                -
                - - -
                -
                -
                -
                - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/contacts/embed/add.html b/contact-center/app/src/main/resources/templates/apps/business/contacts/embed/add.html deleted file mode 100644 index c508663f..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/contacts/embed/add.html +++ /dev/null @@ -1,186 +0,0 @@ -<#include "/public/macro.html"> -
                -
                - - -
                -
                -

                基本信息

                -
                -
                -
                - -
                - - -
                -
                -
                - *(必填项) (您得到此联系人的时间) -
                -
                - -
                - <@select "com.dic.contacts.ckind" "ckind" "" "lay-ignore required lay-verify='required' "/> -
                -
                -
                -
                -
                -
                -

                联系人信息

                -
                -
                -
                - -
                - -
                -
                -
                - *(必填项) -
                -
                -
                -
                - -
                -
                - - - -
                -
                -
                -
                - -
                - - -
                -
                -
                - -
                -
                - -
                - -
                -
                -
                - -
                - -
                -
                -
                - -
                -
                - -
                - <@select "com.dic.address.area" "province" "" "lay-ignore" "width:85px;"/> -
                -
                -
                -
                - <@select "com.dic.address.area.city" "city" "" "lay-ignore" "width:86px;"/> -
                -
                -
                - -
                - -
                -
                -
                - -
                -
                - -
                - -
                -
                -
                - -
                -
                - -
                - -
                -
                -
                - -
                -
                - -
                - -
                -
                -
                -
                -
                -
                - -
                -
                - - -
                -
                -
                -
                - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/contacts/embed/edit.html b/contact-center/app/src/main/resources/templates/apps/business/contacts/embed/edit.html deleted file mode 100644 index d60b3743..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/contacts/embed/edit.html +++ /dev/null @@ -1,191 +0,0 @@ -<#include "/public/macro.html"> -
                -
                - - - -
                -
                -

                基本信息

                -
                -
                -
                - -
                - - -
                -
                -
                - *(必填项) (您得到此联系人的时间) -
                -
                - -
                - <#if contacts.ckind?? && contacts.ckind != ''> - <@select "com.dic.contacts.ckind" "ckind" contacts.ckind!'' "lay-ignore required lay-verify='required' "/> - <#else> - <@select "com.dic.contacts.ckind" "ckind" "" "lay-ignore"/> - -
                -
                -
                -
                -
                -
                -

                联系人信息

                -
                -
                -
                - -
                - -
                -
                -
                - *(必填项) -
                -
                -
                -
                - -
                -
                - - - -
                -
                -
                -
                - -
                - - -
                -
                -
                - -
                -
                - -
                - -
                -
                -
                - -
                - -
                -
                -
                - -
                -
                - -
                - <@select "com.dic.address.area" "province" contacts.province "lay-ignore" "width:85px;"/> -
                -
                -
                -
                - <@select contacts.city+".subdic" "city" contacts.city "lay-ignore" "width:86px;"/> -
                -
                -
                - -
                - -
                -
                -
                - -
                -
                - -
                - -
                -
                -
                - -
                -
                - -
                - -
                -
                -
                - -
                -
                - -
                - -
                -
                -
                -
                -
                -
                - -
                -
                - - -
                -
                -
                -
                - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/contacts/embed/index.html b/contact-center/app/src/main/resources/templates/apps/business/contacts/embed/index.html deleted file mode 100644 index 0fef9da0..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/contacts/embed/index.html +++ /dev/null @@ -1,171 +0,0 @@ -
                -
                -
                -

                - - -
                -
                - 全部联系人(${contactsList.totalElements}) -
                -
                -
                - -
                -
                -
                -
                -
                - - - -
                -
                -
                -
                - -
                -

                - - - - - - - - - - - - - - <#if contactsList?? && contactsList.content?? && contactsList.content?size gt 0> - <#list contactsList.content as contacts> - - - - - - - - - - - <#else> - - - - - -
                联系人姓名手机邮件性别类型操作
                - checked name="id" class="ctxid" value="${contacts.id!''}" id="contacts_${contacts.id}"> - <#if currentContacsId == contacts.id && currentAgentUserContactsId!''> - - - - - ${contacts.name!''} - - - ${contacts.mobileno!''} - - - ${contacts.email!''} - - <#if contacts.gender?? && contacts.gender == '1'>男 - <#if contacts.gender?? && contacts.gender == '0'>女 - <#if contacts.gender?? && contacts.gender == '-1'>未知 - - ${uKeFuDic[contacts.ckind!''].name!''} - - - - 编辑 - -
                -
                - -
                还没有联系人信息
                -
                -
                - -
                -
                -
                -
                -
                -
                -
                -
                - - -
                -
                - diff --git a/contact-center/app/src/main/resources/templates/apps/business/contacts/embed/pages.html b/contact-center/app/src/main/resources/templates/apps/business/contacts/embed/pages.html deleted file mode 100644 index 14b6c3a6..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/contacts/embed/pages.html +++ /dev/null @@ -1,32 +0,0 @@ -<#if contactsList?? && contactsList.content?? && contactsList.content?size gt 0> -<#list contactsList.content as contacts> - - - - - - ${contacts.name!''} - - - ${contacts.mobileno!''} - - - ${contacts.email!''} - - - <#if contacts.gender?? && contacts.gender == '1'>男 - <#if contacts.gender?? && contacts.gender == '0'>女 - <#if contacts.gender?? && contacts.gender == '-1'>未知 - - - ${uKeFuDic[contacts.ckind!''].name!''} - - - - - 编辑 - - - - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/contacts/imp.html b/contact-center/app/src/main/resources/templates/apps/business/contacts/imp.html deleted file mode 100644 index b557e0c0..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/contacts/imp.html +++ /dev/null @@ -1,81 +0,0 @@ -<#include "/public/macro.html"> -
                -
                - <#if ckind??> -
                -
                -

                选择导入的数据文件

                -
                -
                -
                - -
                -
                - - -
                -
                -
                -
                - *(必填项) (需要导入的联系人数据Excel文件) - - - 下载模板 - -
                -
                -
                -
                - -
                - -
                -
                -
                -
                -
                -
                -

                联系人信息导入说明,导入步骤:

                -
                -
                -
                - -
                上传联系人数据的Excel文件
                -
                -
                -
                -
                - -
                选择Excel里的列与系统联系人的字段对应关系
                -
                -
                -
                -
                - -
                开始导入联系人数据
                -
                -
                - -
                -
                -
                - 自动匹配联系人导入字段功能,无需下载模板,系统自动匹配,客户数据直接导入,使用更加方便、快捷、智能。 -
                -
                - -
                -
                - -
                -
                -
                -
                - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/contacts/include/left.html b/contact-center/app/src/main/resources/templates/apps/business/contacts/include/left.html deleted file mode 100644 index cf46b51d..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/contacts/include/left.html +++ /dev/null @@ -1,24 +0,0 @@ -
                  -
                • - <#if user?? && (user.roleAuthMap["A02_A01"]?? || user.admin) > - 联系人 - -
                  - <#if user?? && (user.roleAuthMap["A02_A01_A01"]?? || user.admin) > -
                  class="layui-this"> - 全部联系人 -
                  - - <#if user?? && (user.roleAuthMap["A02_A01_A02"]?? || user.admin) > - <#if uKeFuDic['com.dic.contacts.ckind']??> - <#list uKeFuDic['com.dic.contacts.ckind'] as dic> -
                  class="layui-this"> - ${dic.name!''} -
                  - - - -
                  - -
                • -
                diff --git a/contact-center/app/src/main/resources/templates/apps/business/contacts/index.html b/contact-center/app/src/main/resources/templates/apps/business/contacts/index.html deleted file mode 100644 index 5dbba22e..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/contacts/index.html +++ /dev/null @@ -1,307 +0,0 @@ -
                -
                - <#include "/apps/business/contacts/include/left.html"> -
                -
                - -
                -
                -
                -
                -

                - - -
                -
                - 全部联系人 -
                - -
                -
                - - <#if ckind??> - <#if ckind??> - -
                -
                -
                - - -
                -
                -
                -
                - <#if user?? && (user.roleAuthMap[ "A02_A01_A02_B05"]?? || user.admin)> - - - <#if user?? && (user.roleAuthMap[ "A02_A01_A02_B08"]?? || user.admin)> -
                - -
                - - <#if user?? && (user.roleAuthMap[ "A02_A01_A02_B09"]?? || user.admin)> -
                - - <#if currentOrgan?? && currentOrgan != null> - - -
                - -
                -

                - -
                - <#include "/apps/business/contacts/top.html"> -
                - - - - - - - - - - - - - - - - <#if contactsList?? && contactsList.content?? && contactsList.content?size gt 0> - <#list contactsList.content as contacts> - - - - - - - - - - - - - <#else> - - - - - -
                - - 联系人姓名手机邮件性别生日类型所有者操作
                - - -

                - ${contacts.name!''} -

                -
                - - ${contacts.mobileno!''} - - -

                - ${contacts.email!''} -

                -
                - <#if contacts.gender?? && contacts.gender=='1'>男 - <#if contacts.gender?? && contacts.gender=='0'>女 - <#if contacts.gender?? && contacts.gender=='-1'>未知 - - ${contacts.cusbirthday!''} - -

                - ${uKeFuDic[contacts.ckind!''].name!''} -

                -
                -

                - <#if contacts.user??>${contacts.user.username!''} -

                -
                - <#if approachable?? && approachable?seq_contains(contacts.id)> - - 聊天 - - <#else> - - 聊天 - - - - - 详情 - - <#if user?? && (user.roleAuthMap[ "A02_A01_A02_B06"]?? || user.admin)> - - 编辑 - - - <#if user?? && (user.roleAuthMap[ "A02_A01_A02_B07"]?? || user.admin)> - - 删除 - - -
                -
                - -
                还没有联系人信息
                -
                -
                - -
                -
                -
                -
                -
                -
                -
                - - - - - - diff --git a/contact-center/app/src/main/resources/templates/apps/business/contacts/mass.html b/contact-center/app/src/main/resources/templates/apps/business/contacts/mass.html deleted file mode 100644 index 54e9eb19..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/contacts/mass.html +++ /dev/null @@ -1,148 +0,0 @@ -<#include "/public/macro.html"> -
                -
                -
                  -
                • - - -
                • -
                • - - -
                • -
                • - - -
                • -
                - -
                -
                - - -
                - -
                -
                - -
                -
                - - - - -
                - 如果您已经设置Skype渠道,则在访客离线的情况下向其skype账号发送消息设置skpye渠道 -
                -
                - -
                -
                - -
                重置
                -
                -
                -
                -
                - - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/contacts/top.html b/contact-center/app/src/main/resources/templates/apps/business/contacts/top.html deleted file mode 100644 index 525359f8..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/contacts/top.html +++ /dev/null @@ -1,14 +0,0 @@ - diff --git a/contact-center/app/src/main/resources/templates/apps/business/customer/add.html b/contact-center/app/src/main/resources/templates/apps/business/customer/add.html deleted file mode 100644 index 271de0e2..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/customer/add.html +++ /dev/null @@ -1,274 +0,0 @@ -<#include "/public/macro.html"> -
                -
                - - -
                -
                -

                基本信息

                -
                -
                -
                - -
                - - -
                -
                -
                - *(必填项) (您得到此客户的时间) -
                -
                - -
                - - -
                -
                -
                -
                -
                -
                -

                企业信息

                -
                -
                -
                - -
                - -
                -
                -
                - *(必填项) -
                -
                - -
                -
                - -
                - -
                -
                -
                - -
                - -
                -
                -
                - -
                -
                - -
                - <@select "com.dic.address.area" "entcustomer.province" "" "lay-ignore" "width:85px;"/> -
                -
                -
                -
                - <@select "com.dic.address.area.city" "entcustomer.city" "" "lay-ignore" "width:86px;"/> -
                -
                -
                - -
                -
                - -
                - -
                -
                -
                - -
                -
                - -
                - <@select "com.dic.contacts.entype" "entcustomer.ekind" ekind!'' "lay-ignore"/> -
                -
                -
                - -
                - <@select "com.dic.contacts.elevel" "entcustomer.elevel" "" "lay-ignore"/> -
                -
                -
                - -
                -
                - -
                - <@select "com.dic.contacts.esource" "entcustomer.esource" "" "lay-ignore"/> -
                -
                -
                - -
                - <@select "com.dic.contacts.maturity" "entcustomer.maturity" "" "lay-ignore"/> -
                -
                -
                - -
                -
                - -
                - <@select "com.dic.contacts.industry" "entcustomer.industry" "" "lay-ignore"/> -
                -
                -
                - -
                - <@select "com.dic.contacts.validstatus" "entcustomer.validstatus" "" "lay-ignore"/> -
                -
                -
                - -
                -
                - -
                - -
                -
                -
                -
                -
                -
                -

                联系人信息(提示:创建企业信息后可在个人客户里添加更多联系人)

                -
                -
                -
                - -
                - -
                -
                -
                - -
                -
                - - -
                -
                -
                -
                - -
                -
                - -
                - - -
                -
                -
                - -
                -
                - -
                -
                -
                -
                - -
                -
                - -
                - -
                -
                -
                - -
                -
                - -
                -
                -
                -
                - -
                -
                - -
                - -
                -
                -
                -
                -
                -
                - -
                -
                - - -
                -
                -
                -
                - - diff --git a/contact-center/app/src/main/resources/templates/apps/business/customer/edit.html b/contact-center/app/src/main/resources/templates/apps/business/customer/edit.html deleted file mode 100644 index 4a283703..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/customer/edit.html +++ /dev/null @@ -1,200 +0,0 @@ -<#include "/public/macro.html"> -
                -
                - - - - -
                -
                -

                基本信息

                -
                -
                -
                - -
                - - -
                -
                -
                - *(必填项) (您得到此客户的时间) -
                -
                - -
                - checked> - checked> -
                -
                -
                -
                -
                -
                -

                企业信息

                -
                -
                -
                - -
                - -
                -
                -
                - *(必填项) -
                -
                - -
                -
                - -
                - -
                -
                -
                - -
                - -
                -
                -
                - -
                -
                - -
                - <@select "com.dic.address.area" "entcustomer.province" entCustomer.province!'' "lay-ignore" "width:85px;"/> -
                -
                -
                -
                - <@select entCustomer.city+".subdic" "entcustomer.city" entCustomer.city!'' "lay-ignore" "width:86px;"/> -
                -
                -
                - -
                -
                - -
                - -
                -
                -
                - -
                -
                - -
                - <@select "com.dic.contacts.entype" "entcustomer.ekind" entCustomer.ekind!'' "lay-ignore"/> -
                -
                -
                - -
                - <@select "com.dic.contacts.elevel" "entcustomer.elevel" entCustomer.elevel!'' "lay-ignore"/> -
                -
                -
                - -
                -
                - -
                - <@select "com.dic.contacts.esource" "entcustomer.esource" entCustomer.esource!'' "lay-ignore"/> -
                -
                -
                - -
                - <@select "com.dic.contacts.maturity" "entcustomer.maturity" entCustomer.maturity!'' "lay-ignore"/> -
                -
                -
                - -
                -
                - -
                - <@select "com.dic.contacts.industry" "entcustomer.industry" entCustomer.industry!'' "lay-ignore"/> -
                -
                -
                - -
                - <@select "com.dic.contacts.validstatus" "entcustomer.validstatus" entCustomer.validstatus!'' "lay-ignore"/> -
                -
                -
                - -
                -
                - -
                - -
                -
                -
                -
                -
                -
                - -
                -
                - - -
                -
                -
                -
                - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/customer/imp.html b/contact-center/app/src/main/resources/templates/apps/business/customer/imp.html deleted file mode 100644 index 6c3cec67..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/customer/imp.html +++ /dev/null @@ -1,83 +0,0 @@ -<#include "/public/macro.html"> -
                -
                - <#if ekind??> -
                -
                -

                选择导入的数据文件

                -
                -
                -
                - -
                -
                - - -
                -
                -
                -
                - *(必填项) (需要导入的客户数据Excel文件,可以是多个Sheet页) - - - 下载模板 - -
                -
                - -
                -
                - -
                - -
                -
                -
                -
                -
                -
                -

                客户信息导入说明,导入步骤:

                -
                -
                -
                - -
                上传客户数据的Excel文件(支持多Sheet页导入)
                -
                -
                -
                -
                - -
                选择Excel里的列与系统客户的字段对应关系
                -
                -
                -
                -
                - -
                开始导入客户数据
                -
                -
                - -
                -
                -
                - 自动匹配客户导入字段功能,无需下载模板,系统自动匹配,客户数据直接导入,使用更加方便、快捷、智能。 -
                -
                - -
                -
                - - -
                -
                -
                -
                - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/customer/include/left.html b/contact-center/app/src/main/resources/templates/apps/business/customer/include/left.html deleted file mode 100644 index 320cce24..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/customer/include/left.html +++ /dev/null @@ -1,23 +0,0 @@ -
                  -
                • - <#if user?? && (user.roleAuthMap["A03_A01"]?? || user.admin) > - 全部客户 - -
                  - <#if user?? && (user.roleAuthMap["A03_A01_A01"]?? || user.admin) > -
                  class="layui-this"> - 全部客户 -
                  - - <#if user?? && (user.roleAuthMap["A03_A01_A02"]?? || user.admin) > - <#if uKeFuDic['com.dic.contacts.entype']??> - <#list uKeFuDic['com.dic.contacts.entype'] as dic> -
                  class="layui-this"> - ${dic.name!''} -
                  - - - -
                  -
                • -
                diff --git a/contact-center/app/src/main/resources/templates/apps/business/customer/index.html b/contact-center/app/src/main/resources/templates/apps/business/customer/index.html deleted file mode 100644 index 50f23f2c..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/customer/index.html +++ /dev/null @@ -1,250 +0,0 @@ -
                -
                - <#include "/apps/business/customer/include/left.html"> -
                -
                -
                -
                -
                -
                -

                - - -
                -
                - 全部客户 -
                -
                -
                -
                - <#include "/apps/business/customer/top.html"> -
                -
                -
                - <#if ekind??> -
                -
                -
                - - -
                -
                -
                -
                - <#if user?? && (user.roleAuthMap["A03_A01_A02_B06"]?? || user.admin) > - - - <#if user?? && (user.roleAuthMap["A03_A01_A02_B09"]?? || user.admin) > -
                - -
                - - - - <#if user?? && (user.roleAuthMap["A03_A01_A02_B010"]?? || user.admin) > -
                - - <#if currentOrgan?? && currentOrgan != null> - - -
                - -
                -

                - - - - - - - - - - - - - - - - - <#if entCustomerList?? && entCustomerList.content?? && entCustomerList.content?size gt 0> - <#list entCustomerList.content as entCustomer> - - - - - - - - - - - - - - <#else> - - - - - -
                - - 客户名称类型所在城市客户状态行业成熟度获得时间所有者操作
                - - - ${entCustomer.name!''} - - ${uKeFuDic[entCustomer.ekind!''].name!''} - - <#if uKeFuDic[entCustomer.city!''].name != "市辖区" && uKeFuDic[entCustomer.city!''].name != "县"> - ${uKeFuDic[entCustomer.city!''].name!'' } - <#else> - ${uKeFuDic[entCustomer.province!''].name!'' } - - - - ${uKeFuDic[entCustomer.validstatus!''].name!''} - ${uKeFuDic[entCustomer.industry!''].name!''} - - ${uKeFuDic[entCustomer.maturity!''].name!''} - - <#if entCustomer.touchtime??> - ${entCustomer.touchtime?string('yyyy-MM-dd')} - - - <#if entCustomer.user??>${entCustomer.user.username!''} - - - <#if user?? && (user.roleAuthMap["A03_A01_A02_B07"]?? || user.admin) > - - - 编辑 - - - <#if user?? && (user.roleAuthMap["A03_A01_A02_B08"]?? || user.admin) > - - - 删除 - - -
                -
                - -
                还没有客户信息
                -
                -
                - -
                -
                -
                -
                -
                -
                -
                - - diff --git a/contact-center/app/src/main/resources/templates/apps/business/customer/top.html b/contact-center/app/src/main/resources/templates/apps/business/customer/top.html deleted file mode 100644 index 626f5424..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/customer/top.html +++ /dev/null @@ -1,18 +0,0 @@ - diff --git a/contact-center/app/src/main/resources/templates/apps/business/job/setting.html b/contact-center/app/src/main/resources/templates/apps/business/job/setting.html deleted file mode 100644 index 0641d276..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/job/setting.html +++ /dev/null @@ -1,208 +0,0 @@ - -
                -
                - -
                -
                - -
                - checked="checked" value="1" type="radio" title="自动"/> - checked="checked" value="0" type="radio" title="手动"/> -
                -
                -
                - -
                - - checked="checked" type="radio" title="每周"/> - checked="checked" type="radio" title="每月"/> -
                -
                -
                -
                -
                -
                - -
                - <#list taskinfo.datetypes as type><#if type=='0'>checked="checked" value="0" name="datetypes" type="checkbox" title="工作日"> - <#list taskinfo.datetypes as type><#if type=='1'>checked="checked" value="1" name="datetypes" type="checkbox" title="节日"> - <#list taskinfo.datetypes as type><#if type=='2'>checked="checked" value="2" name="datetypes" type="checkbox" title="假日"> -
                -
                -
                -
                -
                - -
                - value="${taskinfo.runSpace!''}"<#else>value="" type="text" class="layui-input"> -
                -
                -
                -
                -
                -
                -
                - -
                -
                - <#list taskinfo.runDates as days><#if days == '2' && taskinfo.runCycle == 'week'>checked="checked" title="周一"/> - <#list taskinfo.runDates as days><#if days == '3' && taskinfo.runCycle == 'week'>checked="checked" title="周二"/> - <#list taskinfo.runDates as days><#if days == '4' && taskinfo.runCycle == 'week'>checked="checked" title="周三"/> - <#list taskinfo.runDates as days><#if days == '5' && taskinfo.runCycle == 'week'>checked="checked" title="周四"/> - <#list taskinfo.runDates as days><#if days == '6' && taskinfo.runCycle == 'week'>checked="checked" title="周五"/> - <#list taskinfo.runDates as days><#if days == '7' && taskinfo.runCycle == 'week'>checked="checked" title="周六"/> - <#list taskinfo.runDates as days><#if days == '1' && taskinfo.runCycle == 'week'>checked="checked" title="周日"/> - -
                -
                - <#list 1..12 as a> - <#list taskinfo.runDates as days><#if days == a?string && taskinfo.runCycle == 'month'>checked="checked" title="${a}月"/> - -
                -
                - -
                -
                -
                -
                -
                -
                -
                -
                -
                - -
                - -
                -
                -
                - -
                -
                -
                - -
                -
                -
                -
                -
                - -
                - checked value="1" type="checkbox" title="在该日内重复"/> -
                -
                -
                -
                style="display:none" > -
                -
                - -
                - value="${taskinfo.repeatSpace!''}" type="text"> -
                -
                - 分钟 -
                -
                -
                - -
                - value="${taskinfo.repeatJustTime!''}" type="text"> -
                -
                - 小时 -
                -
                -
                -
                -
                -
                - - -
                -
                -
                -
                - diff --git a/contact-center/app/src/main/resources/templates/apps/business/kbs/add.html b/contact-center/app/src/main/resources/templates/apps/business/kbs/add.html deleted file mode 100644 index 3a6648a7..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/kbs/add.html +++ /dev/null @@ -1,227 +0,0 @@ -<#include "/public/macro.html"> -
                -
                -
                -
                -

                知识基本信息

                -
                -
                -
                - -
                - -
                - * -
                -
                -
                -
                - -
                - - - - -
                - * -
                -
                - -
                -
                - ${user.username!''}(${user.uname!''}) -
                -
                -
                -
                -
                -
                - -
                - - -
                -
                -
                - -
                - - -
                -
                -
                -
                -
                -
                -

                知识内容

                -
                -
                -
                - -
                - -
                -
                -
                -
                -
                -
                -

                扩展信息

                -
                -
                - -
                - -
                -
                -
                -
                - -
                - -
                - -
                -
                -
                -
                - -
                - -
                - -
                -
                -
                - -
                -
                - - 上传附件 -
                - - - - -
                -
                -
                -
                -
                - -
                -
                - - -
                -
                -
                -
                - - diff --git a/contact-center/app/src/main/resources/templates/apps/business/kbs/addtype.html b/contact-center/app/src/main/resources/templates/apps/business/kbs/addtype.html deleted file mode 100644 index 8dc4072d..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/kbs/addtype.html +++ /dev/null @@ -1,146 +0,0 @@ -<#include "/public/macro.html"> -
                -
                -
                -
                -

                分类基本信息

                -
                -
                -
                - -
                - -
                - * -
                -
                - -
                -
                - - -
                -
                -
                -
                -
                -
                -
                -

                扩展信息

                -
                -
                -
                - -
                - -
                -
                -
                - -
                - - - - -
                -
                -
                - - -
                -
                - -
                - -
                -
                -
                -
                -
                -
                - -
                -
                - - -
                -
                -
                -
                - - - diff --git a/contact-center/app/src/main/resources/templates/apps/business/kbs/index.html b/contact-center/app/src/main/resources/templates/apps/business/kbs/index.html deleted file mode 100644 index 7409442b..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/kbs/index.html +++ /dev/null @@ -1,508 +0,0 @@ -
                -
                -
                -

                - 知识贡献 -

                -
                - admin -
                -

                - ${user.username!''}(${user.uname!''}) -

                - <#if user.lastlogintime??> -
                - 登录时间:${user.lastlogintime?string("HH:mm:ss")} -
                - -
                -
                - -
                -
                -
                -
                - -
                -
                -
                -
                -
                -
                -
                -
                -

                - 知识地图 -

                -
                -
                -
                -
                -
                -
                  -
                • 所有知识
                • -
                • 个人知识
                • -
                • 部门知识
                • -
                • 收藏的知识
                • -
                -
                -
                - - -
                -
                -
                -
                - -
                -
                - -
                -
                -
                -
                -
                -

                - 最新知识(54) -

                -
                -
                - -
                -
                -
                -
                -

                - 最新知识(54) -

                -
                -
                -
                -
                -

                - 我收藏的知识(54) -

                -
                -
                -
                -
                -

                - 最新评论知识(24) -

                -
                -
                -
                -
                -
                -
                -
                -
                -
                -

                - 个人贡献榜 -

                -
                -
                -
                  -
                • - 访问渠道: - 在线客服 -
                • -
                • - 首次访问来源: - - 192.168.3.28 - -
                • -
                • - IP:192.168.3.28 -
                • -
                • - 位置:未知 -
                • -
                • - 访问次数:11次 -
                • -
                • - 停留时间: - 00:13:43 -
                • -
                • - 访问浏览器: - Chrome -
                • -
                • - 操作系统: - - - windows - -
                • -
                -
                -
                -
                -
                -

                - 部门贡献榜 -

                -
                -
                -
                  -
                • - 访问渠道: - 在线客服 -
                • -
                • - 首次访问来源: - - 192.168.3.28 - -
                • -
                • - IP:192.168.3.28 -
                • -
                • - 位置:未知 -
                • -
                • - 访问次数:11次 -
                • -
                • - 停留时间: - 00:13:43 -
                • -
                • - 访问浏览器: - Chrome -
                • -
                • - 操作系统: - - - windows - -
                • -
                • - 访问终端: - - PC - -
                • -
                -
                -
                -
                -
                -

                - 热点知识榜 -

                -
                -
                -
                  -
                • - 访问渠道: - 在线客服 -
                • -
                • - 首次访问来源: - - 192.168.3.28 - -
                • -
                • - IP:192.168.3.28 -
                • -
                • - 位置:未知 -
                • -
                • - 访问次数:11次 -
                • -
                • - 停留时间: - 00:13:43 -
                • -
                • - 访问浏览器: - Chrome -
                • -
                -
                -
                -
                -
                -
                -
                - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/kbs/list.html b/contact-center/app/src/main/resources/templates/apps/business/kbs/list.html deleted file mode 100644 index 8ce12cd5..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/kbs/list.html +++ /dev/null @@ -1,59 +0,0 @@ - - - -
                -
                -
                -

                - 知识分类 - - - -

                -
                -
                  -
                  -
                  -
                  -
                  -
                  - <#include "/apps/business/kbs/typelist.html"> -
                  - - diff --git a/contact-center/app/src/main/resources/templates/apps/business/kbs/typelist.html b/contact-center/app/src/main/resources/templates/apps/business/kbs/typelist.html deleted file mode 100644 index 46574ba6..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/kbs/typelist.html +++ /dev/null @@ -1,239 +0,0 @@ -
                  -
                  -

                  - 知识地图 - - - <#if kbsType??> - - - - -

                  -
                  -
                  -
                  -
                  -
                  -
                    -
                  • 所有知识
                  • -
                  • 个人知识
                  • -
                  • 部门知识
                  • -
                  • 收藏的知识
                  • -
                  -
                  -
                  - - -
                  -
                  -
                  -
                  -
                  -
                  - -
                  -
                  -
                  -
                  -
                  -

                  - <#if kbsType??>“${kbsType.name!''}” 分类知识(54) -

                  -
                  -
                  - -
                  -
                  \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/add.html b/contact-center/app/src/main/resources/templates/apps/business/report/add.html deleted file mode 100644 index 526ef799..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/add.html +++ /dev/null @@ -1,108 +0,0 @@ -
                  -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  -
                  -
                  - -
                  - - - - -
                  -
                  -
                  -
                  - -
                  -
                  -
                  -
                  -
                  - -
                  -
                  -
                  -
                  - - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/addtype.html b/contact-center/app/src/main/resources/templates/apps/business/report/addtype.html deleted file mode 100644 index f2faaaf4..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/addtype.html +++ /dev/null @@ -1,115 +0,0 @@ -<#include "/public/macro.html"> -
                  -
                  -
                  -
                  - -
                  - - -
                  - * -
                  -
                  - -
                  -
                  - -
                  - - - - -
                  -
                  -
                  - - -
                  -
                  - - -
                  -
                  -
                  -
                  - - - diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/cube/add.html b/contact-center/app/src/main/resources/templates/apps/business/report/cube/add.html deleted file mode 100644 index b2f981ac..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/cube/add.html +++ /dev/null @@ -1,91 +0,0 @@ -<#include "/public/macro.html"> -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - - - - -
                  -
                  -
                  - -
                  - <@select "com.dic.cube.modeltype" "modeltype" modeltype!'' "lay-ignore required lay-verify='required' " 'width:220px;'/> -
                  -
                  -
                  -
                  - - -
                  -
                  -
                  -
                  - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/cube/cubelevel/add.html b/contact-center/app/src/main/resources/templates/apps/business/report/cube/cubelevel/add.html deleted file mode 100644 index 638dba24..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/cube/cubelevel/add.html +++ /dev/null @@ -1,149 +0,0 @@ -<#include "/public/macro.html"> -
                  -
                  - - -
                  -
                  -
                  -
                  - -
                  - <#include "/apps/business/report/cube/cubelevel/fktableiddiv.html"> -
                  -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - - -
                  -
                  -
                  -
                  -
                  - -
                  - <@select "com.dic.cubelevel.type" "type" '' "lay-ignore"/> -
                  -
                  -
                  - -
                  -
                  - <@select "com.dic.cubelevel.leveltype" "leveltype" '' "lay-ignore"/> -
                  -
                  -
                  -
                  - -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  -
                  -
                  - -
                  -
                  - - -
                  -
                  -
                  -
                  - - - diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/cube/cubelevel/edit.html b/contact-center/app/src/main/resources/templates/apps/business/report/cube/cubelevel/edit.html deleted file mode 100644 index 7fddece9..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/cube/cubelevel/edit.html +++ /dev/null @@ -1,148 +0,0 @@ -<#include "/public/macro.html"> -
                  -
                  - - - -
                  -
                  -
                  -
                  - -
                  - <#include "/apps/business/report/cube/cubelevel/fktableiddiv.html"> -
                  -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - checked> - checked> -
                  -
                  -
                  -
                  -
                  - -
                  - <@select "com.dic.cubelevel.type" "type" cubeLevel.type!'' "lay-ignore"/> -
                  -
                  -
                  - -
                  - <@select "com.dic.cubelevel.leveltype" "leveltype" cubeLevel.leveltype!'' "lay-ignore"/> -
                  -
                  -
                  - -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  -
                  -
                  - -
                  -
                  - - -
                  -
                  -
                  -
                  - - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/cube/cubelevel/fktableiddiv.html b/contact-center/app/src/main/resources/templates/apps/business/report/cube/cubelevel/fktableiddiv.html deleted file mode 100644 index 477200bd..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/cube/cubelevel/fktableiddiv.html +++ /dev/null @@ -1,12 +0,0 @@ - -
                  - - -
                  \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/cube/cubemeasure/add.html b/contact-center/app/src/main/resources/templates/apps/business/report/cube/cubemeasure/add.html deleted file mode 100644 index 003e1a9d..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/cube/cubemeasure/add.html +++ /dev/null @@ -1,145 +0,0 @@ -<#include "/public/macro.html"> -
                  -
                  - - -
                  -
                  -
                  -
                  -
                  - <#include "/apps/business/report/cube/cubemeasure/fktableiddiv.html"> -
                  -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  -
                  -
                  - -
                  - - -
                  -
                  -
                  - -
                  - <@select "com.dic.cubemeasure.aggregator" "aggregator" '' "required lay-ignore"/> -
                  -
                  -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  -
                  -
                  - -
                  -
                  - - -
                  -
                  -
                  -
                  - - - - - - - diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/cube/cubemeasure/edit.html b/contact-center/app/src/main/resources/templates/apps/business/report/cube/cubemeasure/edit.html deleted file mode 100644 index cece3336..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/cube/cubemeasure/edit.html +++ /dev/null @@ -1,163 +0,0 @@ -<#include "/public/macro.html"> -
                  -
                  - - - -
                  -
                  -
                  -
                  - -
                  - <#include "/apps/business/report/cube/cubemeasure/fktableiddiv.html"> -
                  -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  -
                  -
                  - -
                  - checked> - checked> -
                  -
                  -
                  - -
                  - <@select "com.dic.cubemeasure.aggregator" "aggregator" cubemeasure.aggregator!'' "required lay-ignore"/> -
                  -
                  -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  -
                  -
                  - -
                  -
                  - - -
                  -
                  -
                  -
                  - - - - diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/cube/cubemeasure/fktableiddiv.html b/contact-center/app/src/main/resources/templates/apps/business/report/cube/cubemeasure/fktableiddiv.html deleted file mode 100644 index 32da6911..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/cube/cubemeasure/fktableiddiv.html +++ /dev/null @@ -1,11 +0,0 @@ - -
                  - -
                  \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/cube/cubemetadata/edit.html b/contact-center/app/src/main/resources/templates/apps/business/report/cube/cubemetadata/edit.html deleted file mode 100644 index 1e91a71e..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/cube/cubemetadata/edit.html +++ /dev/null @@ -1,57 +0,0 @@ -<#include "/public/macro.html"> -
                  -
                  - - -
                  -
                  - -
                  - ${cubeMetadata.tb.name!''} -
                  -
                  -
                  -
                  -
                  - -
                  - checked> - checked> -
                  -
                  -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  -
                  -
                  - - -
                  -
                  -
                  -
                  - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/cube/cubemetadata/imptb.html b/contact-center/app/src/main/resources/templates/apps/business/report/cube/cubemetadata/imptb.html deleted file mode 100644 index 695a63fc..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/cube/cubemetadata/imptb.html +++ /dev/null @@ -1,22 +0,0 @@ -
                  -
                  - -
                  -
                  - -
                  -
                  -
                  -
                  - - -
                  -
                  -
                  -
                  diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/cube/cubepublish.html b/contact-center/app/src/main/resources/templates/apps/business/report/cube/cubepublish.html deleted file mode 100644 index fc41b5f4..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/cube/cubepublish.html +++ /dev/null @@ -1,29 +0,0 @@ -<#include "/public/macro.html"> -
                  -
                  - -
                  -
                  - -
                  - - - -
                  -
                  -
                  -
                  -
                  - - -
                  -
                  -
                  -
                  - - diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/cube/detail.html b/contact-center/app/src/main/resources/templates/apps/business/report/cube/detail.html deleted file mode 100644 index 12847232..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/cube/detail.html +++ /dev/null @@ -1,309 +0,0 @@ - - -
                  -
                  -
                  -

                  - 元数据 - - - - - - - - - -

                  -
                  -
                    -
                    -
                    -
                    -
                    -
                    -
                    -
                    -

                    - 维度 - - - -

                    -
                    -
                      -
                    • -
                      - <#if dimensionList?? && dimensionList?size gt 0> - <#list dimensionList as dimension > -
                      class="layui-this"> - ${dimension.name!''} -
                      - - -
                      -
                    • -
                    -
                    -
                    -
                    -

                    - 指标 -

                    -
                    - -
                    -
                    -
                    -
                    -
                    -
                    - <#if dimensionId?? && !(dimensionId =='cubemeasure')> -
                    -

                    - 维度成员 - <#if cubeLevelList??>(${cubeLevelList?size}) -
                    - - - 返回 - - - - -
                    -

                    -
                    -
                    - - - - - - - - - - - - - - - - - - - <#if cubeLevelList?? && cubeLevelList?size gt 0> - <#list cubeLevelList as cubeLevel> - - - - - - - - - <#else> - - - - - -
                    - - 名称数据类型创建时间操作
                    - - - ${cubeLevel.name} - - ${uKeFuDic[cubeLevel.type!''].name!''} - ${cubeLevel.createtime?string("yyyy-MM-dd HH:mm:ss")} - - - 编辑 - - - - 删除 - -
                    -
                    - -
                    还没有维度成员
                    -
                    -
                    -
                    -
                    -
                    - <#elseif dimensionId?? && dimensionId =='cubemeasure'> -
                    -

                    - 指标 - <#if cubeMeasureList??>(${cubeMeasureList?size}) -
                    - - - 返回 - - -
                    -

                    -
                    -
                    - - - - - - - - - - - - - - - - - - - - <#if cubeMeasureList?? && cubeMeasureList?size gt 0> - <#list cubeMeasureList as cubeMeasure> - - - - - - - - - <#else> - - - - - -
                    - - 名称计算指标创建时间操作
                    - - - ${cubeMeasure.name} - - <#if cubeMeasure.calculatedmember> - - - ${cubeMeasure.createtime?string("yyyy-MM-dd HH:mm:ss")} - - - 编辑 - - - - 删除 - -
                    -
                    - -
                    还没有指标
                    -
                    -
                    -
                    -
                    -
                    - -
                    - -
                    \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/cube/dimension/add.html b/contact-center/app/src/main/resources/templates/apps/business/report/cube/dimension/add.html deleted file mode 100644 index c7c34b90..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/cube/dimension/add.html +++ /dev/null @@ -1,112 +0,0 @@ -<#include "/public/macro.html"> -
                    -
                    - -
                    -
                    -
                    -
                    -
                    - -
                    - -
                    -
                    -
                    -
                    -
                    - -
                    - <@select "com.dic.dimension.modeltype" "modeltype" modeltype!'' "lay-ignore"/> -
                    -
                    -
                    - -
                    - -
                    -
                    -
                    -
                    -
                    - -
                    - -
                    -
                    -
                    -
                    -
                    - -
                    - -
                    -
                    -
                    -
                    -
                    - -
                    - -
                    -
                    -
                    - -
                    -
                    - -
                    - -
                    -
                    -
                    - <#include "/apps/business/report/cube/dimension/fktableiddiv.html"> -
                    -
                    -
                    -
                    -
                    - -
                    -
                    - - -
                    -
                    -
                    -
                    - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/cube/dimension/edit.html b/contact-center/app/src/main/resources/templates/apps/business/report/cube/dimension/edit.html deleted file mode 100644 index 7f8660d0..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/cube/dimension/edit.html +++ /dev/null @@ -1,113 +0,0 @@ -<#include "/public/macro.html"> -
                    -
                    - - -
                    -
                    -

                    -
                    -
                    -
                    - -
                    - -
                    -
                    -
                    -
                    -
                    - -
                    - <@select "com.dic.dimension.modeltype" "modeltype" dimension.modeltype!'' "lay-ignore"/> -
                    -
                    -
                    - -
                    - -
                    -
                    -
                    -
                    -
                    - -
                    - -
                    -
                    -
                    -
                    -
                    - -
                    - -
                    -
                    -
                    -
                    -
                    - -
                    - -
                    -
                    -
                    - -
                    -
                    - -
                    - -
                    -
                    -
                    - <#include "/apps/business/report/cube/dimension/fktableiddiv.html"> -
                    -
                    -
                    -
                    -
                    - -
                    -
                    - - -
                    -
                    -
                    -
                    - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/cube/dimension/fktableiddiv.html b/contact-center/app/src/main/resources/templates/apps/business/report/cube/dimension/fktableiddiv.html deleted file mode 100644 index e43388ea..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/cube/dimension/fktableiddiv.html +++ /dev/null @@ -1,11 +0,0 @@ - -
                    - -
                    \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/cube/edit.html b/contact-center/app/src/main/resources/templates/apps/business/report/cube/edit.html deleted file mode 100644 index 50481d26..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/cube/edit.html +++ /dev/null @@ -1,92 +0,0 @@ -<#include "/public/macro.html"> -
                    -
                    - -
                    - -
                    - -
                    -
                    -
                    - -
                    - - - - -
                    -
                    -
                    - -
                    - <@select "com.dic.cube.modeltype" "modeltype" cube.modeltype!'' "lay-ignore required lay-verify='required' " 'width:220px;'/> -
                    -
                    -
                    -
                    - - -
                    -
                    -
                    -
                    - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/cube/include/left.html b/contact-center/app/src/main/resources/templates/apps/business/report/cube/include/left.html deleted file mode 100644 index e49fa70c..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/cube/include/left.html +++ /dev/null @@ -1,62 +0,0 @@ - - - -
                    -
                    -
                    -

                    - 模型分类 - - - -

                    -
                    -
                      -
                      -
                      -
                      -
                      - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/cube/include/leftforpb.html b/contact-center/app/src/main/resources/templates/apps/business/report/cube/include/leftforpb.html deleted file mode 100644 index 781ce963..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/cube/include/leftforpb.html +++ /dev/null @@ -1,49 +0,0 @@ - - - -
                      -
                      -
                      -

                      - 模型分类 -

                      -
                      -
                        -
                        -
                        -
                        -
                        - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/cube/index.html b/contact-center/app/src/main/resources/templates/apps/business/report/cube/index.html deleted file mode 100644 index b3e5958e..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/cube/index.html +++ /dev/null @@ -1,17 +0,0 @@ -
                        -
                        - <#include "/apps/business/report/cube/include/left.html"> -
                        -
                        -
                        - <#include "/apps/business/report/cube/list.html"> -
                        - diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/cube/list.html b/contact-center/app/src/main/resources/templates/apps/business/report/cube/list.html deleted file mode 100644 index 2c022dca..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/cube/list.html +++ /dev/null @@ -1,134 +0,0 @@ -
                        -
                        -
                        -

                        - -
                        -
                        - 全部模型 -
                        -
                        -
                        -
                        - <#if cubeType??> - - - - - -
                        -

                        - - - - - - - - - - - <#if cubeList?? && cubeList.content?? && cubeList.content?size gt 0> - <#list cubeList.content as cube> - - - - - - - - <#else> - - - - - -
                        - - 名称创建时间操作
                        - - - ${cube.name!''} - - ${cube.createtime!''} - - - - 编辑 - - - - 发布 - - - - 删除 - -
                        -
                        - -
                        还没有模型
                        -
                        -
                        - -
                        -
                        -
                        -
                        -
                        -
                        - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/cube/pbCubeIndex.html b/contact-center/app/src/main/resources/templates/apps/business/report/cube/pbCubeIndex.html deleted file mode 100644 index fbb669ce..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/cube/pbCubeIndex.html +++ /dev/null @@ -1,8 +0,0 @@ -
                        -
                        - <#include "/apps/business/report/cube/include/leftforpb.html"> -
                        -
                        -
                        - <#include "/apps/business/report/cube/pbcubelist.html"> -
                        diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/cube/pbcubelist.html b/contact-center/app/src/main/resources/templates/apps/business/report/cube/pbcubelist.html deleted file mode 100644 index a453ffca..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/cube/pbcubelist.html +++ /dev/null @@ -1,84 +0,0 @@ -
                        -
                        -
                        -

                        - -
                        -
                        - 已发布模型 -
                        -
                        -
                        -

                        - - - - - - - - - - - - <#if cubeList?? && cubeList.content?? && cubeList.content?size gt 0> - <#list cubeList.content as cube> - - - - - - - - - <#else> - - - - - -
                        - - 名称版本时间操作
                        - - - ${cube.name!''} - - ${cube.dataversion!''} - - ${cube.createtime!''} - - - - 删除 - -
                        -
                        - -
                        还没有模型
                        -
                        -
                        - -
                        -
                        -
                        -
                        -
                        -
                        - diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/cube/type/add.html b/contact-center/app/src/main/resources/templates/apps/business/report/cube/type/add.html deleted file mode 100644 index dee1fa5e..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/cube/type/add.html +++ /dev/null @@ -1,142 +0,0 @@ -<#include "/public/macro.html"> -
                        -
                        -
                        -
                        -

                        分类基本信息

                        -
                        -
                        -
                        - -
                        - - -
                        - * -
                        -
                        - -
                        - -
                        -
                        -
                        -
                        -
                        -
                        -

                        扩展信息

                        -
                        -
                        -
                        - -
                        - - - - -
                        -
                        -
                        - - -
                        -
                        - -
                        - -
                        -
                        -
                        -
                        -
                        -
                        - -
                        -
                        - - -
                        -
                        -
                        -
                        - - - diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/cube/type/edit.html b/contact-center/app/src/main/resources/templates/apps/business/report/cube/type/edit.html deleted file mode 100644 index ea6ed8a8..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/cube/type/edit.html +++ /dev/null @@ -1,142 +0,0 @@ -<#include "/public/macro.html"> -
                        -
                        - -
                        -
                        -

                        分类基本信息

                        -
                        -
                        -
                        - -
                        - -
                        - * -
                        -
                        - -
                        - -
                        -
                        -
                        -
                        -
                        -
                        -

                        扩展信息

                        -
                        -
                        -
                        - -
                        - - - - -
                        -
                        -
                        - - -
                        -
                        - -
                        - -
                        -
                        -
                        -
                        -
                        -
                        - -
                        -
                        - - -
                        -
                        -
                        -
                        - - - diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/design/add.html b/contact-center/app/src/main/resources/templates/apps/business/report/design/add.html deleted file mode 100644 index c4354809..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/design/add.html +++ /dev/null @@ -1,102 +0,0 @@ -<#include "/public/macro.html"> -
                        - - <#if dtype??> - - - - <#if t?? && t=='dim'> -
                        - -
                        - -
                        -
                        -
                        - -
                        - -
                        -
                        - <#elseif t?? && t=='measure'> -
                        - -
                        - -
                        -
                        - <#elseif t?? && t=='filter'> -
                        - -
                        - -
                        -
                        -
                        - -
                        - -
                        -
                        - -
                        -
                        - -
                        -
                        -
                        - - diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/design/cube/leftforpb.html b/contact-center/app/src/main/resources/templates/apps/business/report/design/cube/leftforpb.html deleted file mode 100644 index d5b884fe..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/design/cube/leftforpb.html +++ /dev/null @@ -1,49 +0,0 @@ - - - -
                        -
                        -
                        -

                        - 模型分类 -

                        -
                        -
                          -
                          -
                          -
                          -
                          - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/design/cube/pbCubeIndex.html b/contact-center/app/src/main/resources/templates/apps/business/report/design/cube/pbCubeIndex.html deleted file mode 100644 index 1c157ece..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/design/cube/pbCubeIndex.html +++ /dev/null @@ -1,33 +0,0 @@ -
                          -
                          - -
                          -
                          - <#include "/apps/business/report/design/cube/leftforpb.html"> -
                          -
                          -
                          - <#include "/apps/business/report/design/cube/pbcubelist.html"> -
                          -
                          -
                          - -
                          -
                          -
                          -
                          - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/design/cube/pbcubelist.html b/contact-center/app/src/main/resources/templates/apps/business/report/design/cube/pbcubelist.html deleted file mode 100644 index 953f9355..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/design/cube/pbcubelist.html +++ /dev/null @@ -1,77 +0,0 @@ -
                          -
                          -
                          -

                          -
                          - 已发布模型 -
                          -

                          - - - - - - - - - - - - <#if cubeList?? && cubeList.content?? && cubeList.content?size gt 0> - <#list cubeList.content as cube> - - - - - - - - - <#else> - - - - - -
                          - 名称类型版本时间
                          - - - ${cube.name!''} - - <#if cube.modeltype?? && cube.modeltype == 'cube'>立方体<#else>数据表 - - ${cube.dataversion!''} - - ${cube.createtime!''} -
                          -
                          - -
                          还没有模型
                          -
                          -
                          - -
                          -
                          -
                          -
                          -
                          -
                          - diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/design/element.html b/contact-center/app/src/main/resources/templates/apps/business/report/design/element.html deleted file mode 100644 index 0000d439..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/design/element.html +++ /dev/null @@ -1,27 +0,0 @@ -
                          -
                          -
                          ${element.name!'组件'}
                          - <#if true> -
                          - - 删除 - - - 设计 - -
                          - -
                          -
                          -
                          -
                          - -
                          -
                          -
                          -
                          - diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/design/elementajax.html b/contact-center/app/src/main/resources/templates/apps/business/report/design/elementajax.html deleted file mode 100644 index e70407b8..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/design/elementajax.html +++ /dev/null @@ -1,5 +0,0 @@ -
                          - -<#if eltemplet?? && eltemplet.templettext??> - <#assign inlineTemplate = eltemplet.templettext?interpret><@inlineTemplate /> - diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/design/elementnoajax.html b/contact-center/app/src/main/resources/templates/apps/business/report/design/elementnoajax.html deleted file mode 100644 index fbc76968..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/design/elementnoajax.html +++ /dev/null @@ -1,11 +0,0 @@ -
                          -
                          -
                          -
                          - - <#if eltemplet??> - <#assign inlineTemplate = eltemplet.templettext?interpret><@inlineTemplate /> - -
                          -
                          -
                          \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/design/filter.html b/contact-center/app/src/main/resources/templates/apps/business/report/design/filter.html deleted file mode 100644 index 7344cf63..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/design/filter.html +++ /dev/null @@ -1,26 +0,0 @@ -
                          -
                          -
                          ${filter.title!''}
                          -
                          - - 删除 - - - 编辑 - -
                          -
                          -
                          -
                          - <#if eltemplet?? && eltemplet.templettext??> - <#assign inlineTemplate = eltemplet.templettext?interpret><@inlineTemplate /> - -
                          -
                          -
                          - diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/design/filteredit.html b/contact-center/app/src/main/resources/templates/apps/business/report/design/filteredit.html deleted file mode 100644 index f86570db..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/design/filteredit.html +++ /dev/null @@ -1,222 +0,0 @@ -<#include "/public/macro.html"> -
                          -
                          -
                          -
                          - -
                          - -
                          -
                          -
                          - -
                          - <@select "com.dic.filter.modeltype" "modeltype" reportFilter.modeltype!'' "lay-verify=required lay-filter=modeltype " /> -
                          -
                          -
                          style="display:none;"> - -
                          - -
                          -
                          -
                          style="display:none;"> - -
                          - checked > - checked > -
                          -
                          -
                          style="display:none;"> - -
                          - -
                          -
                          -
                          - -
                          - <@select "com.dic.filter.valuefiltertype" "valuefiltertype" reportFilter.valuefiltertype!'' "required lay-verify=required lay-filter=valuefiltertype " /> -
                          -
                          -
                          - -
                          style="display:none;" > -
                          - -
                          -
                          ~
                          -
                          - -
                          -
                          -
                          style="display:none;"> - -
                          -
                          -
                          - -
                          - checked > - checked > -
                          -
                          -
                          style="display:none;"> - -
                          - -
                          -
                          -
                          style="display:none;"> - -
                          - <#include "/apps/business/report/design/modeldesign/fktableiddiv.html"/> -
                          -
                          -
                          -
                          -
                          - -
                          - -
                          -
                          -
                          - -
                          - <@select "com.dic.filter.convalue" "convalue" reportFilter.convalue!'' "required lay-verify=required lay-filter=convalue " /> -
                          -
                          -
                          style="display:none;"> - -
                          -
                          -
                          -
                          style="display:none;" > - -
                          - -
                          -
                          -
                          style="display:none;"> - -
                          - -
                          -
                          -
                          - -
                          - <@select "com.dic.filter.comparetype" "comparetype" reportFilter.comparetype!'' "required lay-verify=required " /> -
                          -
                          -
                          style="display:none"> - -
                          - -
                          -
                          -
                          -
                          - -
                          -
                          - -
                          -
                          -
                          - - diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/design/fktableid.html b/contact-center/app/src/main/resources/templates/apps/business/report/design/fktableid.html deleted file mode 100644 index 76f54a30..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/design/fktableid.html +++ /dev/null @@ -1,7 +0,0 @@ - - <#if fktableidList??> - <#list fktableidList as fktableid> - - - - diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/design/index.html b/contact-center/app/src/main/resources/templates/apps/business/report/design/index.html deleted file mode 100644 index 2d7d3f47..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/design/index.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - - - - ${report.name!''}-春松客服-全渠道智能客服 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                          -
                          -
                          - ${report.name!''} - <#if report.createtime??>创建于:${report.createtime?string('yyyy-MM-dd HH:mm:ss')} - -
                          -
                          -
                          -
                          -
                          -
                          -
                          - -
                          -
                          - 报表设计器 -
                          -
                          - 拖拽需要的图表到内容区域 -
                          -
                          -
                          -
                          -
                          -
                          -
                            -
                          • 报表组件
                          • -
                          • 过滤器
                          • -
                          -
                          -
                          -
                          -
                          - - 布局组件 - -
                          - <#if layoutList??> - <#list layoutList as layout> -
                          data-colspan="${layout.layoutcols}" data-title="${layout.name!''}" data-id="${layout.id!''}" data-templet="/apps/report/design/ltpl.html?template=${layout.id!''}&id=${report.id!''}"> -
                          - -
                          -
                          ${layout.name!''}
                          -
                          - - -
                          - -
                          -
                          - - 报表组件 - -
                          - <#if reportList??> - <#list reportList as rtpl> -
                          -
                          - -
                          -
                          ${rtpl.name!''}
                          -
                          - - -
                          -
                          -
                          -
                          -
                          - - 过滤器组件 - -
                          - <#if filterList??> - <#list filterList as ftpl> -
                          -
                          - -
                          -
                          ${ftpl.name!''}
                          -
                          - - -
                          -
                          -
                          -
                          -
                          -
                          -
                          -
                          -
                          -
                          -
                          -
                          -
                          - <#if reportFilters??> - <#list reportFilters as filter> - <#if filter.reportid == report.id> - <#assign eltemplet = filter.templet()> - <#include "/apps/business/report/design/filter.html"/> - - - -
                          -
                          style="display:none;"> - -
                          -
                          -
                          -
                          - <#if reportModels??> - <#list reportModels?reverse as model> - <#if model.parentid == report.id> - <#assign templet = model.templet()> - <#include "/apps/business/report/design/layout.html"/> - - - -
                          -
                          -
                          - - - - diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/design/layout.html b/contact-center/app/src/main/resources/templates/apps/business/report/design/layout.html deleted file mode 100644 index 1e3d2100..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/design/layout.html +++ /dev/null @@ -1,5 +0,0 @@ -<#if model??> -
                          - <#if templet??><#assign inlineTemplate = templet.templettext?interpret><@inlineTemplate /> -
                          - diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/design/modeldesign.html b/contact-center/app/src/main/resources/templates/apps/business/report/design/modeldesign.html deleted file mode 100644 index 95149e93..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/design/modeldesign.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - <#if systemConfig?? && systemConfig.title?? && systemConfig.title != ''>${systemConfig.title}<#else>春松客服-全渠道智能客服</#if> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                          -
                          -
                          - ${reportModel.name!''} - - - - <#if reportModel.createtime??>创建于:${reportModel.createtime?string('yyyy-MM-dd HH:mm:ss')} - -
                          -
                          - <#include "/apps/business/report/design/modeldesign/left.html"/> -
                          -
                          -
                          -
                          - <#if element??> - <#include "/apps/business/report/design/elementajax.html"/> - -
                          -
                          -
                          -
                          - <#include "/apps/business/report/design/modeldesign/right.html"/> -
                          -
                          -
                          -
                          -
                          - - - - diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/design/modeldesign/add.html b/contact-center/app/src/main/resources/templates/apps/business/report/design/modeldesign/add.html deleted file mode 100644 index c4354809..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/design/modeldesign/add.html +++ /dev/null @@ -1,102 +0,0 @@ -<#include "/public/macro.html"> - - - <#if dtype??> - - - - <#if t?? && t=='dim'> -
                          - -
                          - -
                          -
                          -
                          - -
                          - -
                          -
                          - <#elseif t?? && t=='measure'> -
                          - -
                          - -
                          -
                          - <#elseif t?? && t=='filter'> -
                          - -
                          - -
                          -
                          -
                          - -
                          - -
                          -
                          - -
                          -
                          - -
                          -
                          - - - diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/design/modeldesign/editmodelname.html b/contact-center/app/src/main/resources/templates/apps/business/report/design/modeldesign/editmodelname.html deleted file mode 100644 index 5e96fcef..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/design/modeldesign/editmodelname.html +++ /dev/null @@ -1,16 +0,0 @@ -
                          - -
                          - -
                          - -
                          -
                          -
                          -
                          - -
                          -
                          -
                          - diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/design/modeldesign/filter.html b/contact-center/app/src/main/resources/templates/apps/business/report/design/modeldesign/filter.html deleted file mode 100644 index bc9e370f..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/design/modeldesign/filter.html +++ /dev/null @@ -1,90 +0,0 @@ -<#if filter?? && filter.modeltype == 'text'> - <#if filter.valuefiltertype =='range'> -
                          -
                          - lay-verify=required > -
                          -
                          -
                          -
                          - lay-verify=required> -
                          -
                          - <#else> -
                          - lay-verify=required> -
                          - - -<#if filter?? && filter.modeltype == 'date'> - <#if filter.valuefiltertype =='range'> -
                          -
                          - -
                          -
                          -
                          -
                          - -
                          -
                          - - <#else> -
                          - -
                          - - - -<#if filter?? && filter.modeltype == 'sigsel'> - <#if filter.valuefiltertype =='range'> - <#else> -
                          - -
                          - - - diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/design/modeldesign/filteradd.html b/contact-center/app/src/main/resources/templates/apps/business/report/design/modeldesign/filteradd.html deleted file mode 100644 index f4420294..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/design/modeldesign/filteradd.html +++ /dev/null @@ -1,251 +0,0 @@ -<#include "/public/macro.html"> -
                          - - -
                          -
                          -
                          - -
                          -
                          ${table.tablename}
                          - -
                          -
                          -
                          - -
                          - -
                          -
                          -
                          - -
                          - -
                          -
                          -
                          - -
                          - -
                          -
                          -
                          - -
                          - <@select "com.dic.filter.modeltype" "modeltype" reportFilter.modeltype!'' "lay-verify=required lay-filter=modeltype " /> -
                          -
                          -
                          style="display:none;"> - -
                          - checked > - checked > -
                          -
                          -
                          style="display:none;"> - -
                          - -
                          -
                          -
                          - -
                          - <@select "com.dic.filter.valuefiltertype" "valuefiltertype" reportFilter.valuefiltertype!'' "required lay-verify=required lay-filter=valuefiltertype " /> -
                          -
                          -
                          - -
                          style="display:none;" > -
                          - -
                          -
                          ~
                          -
                          - -
                          -
                          -
                          style="display:none;"> - -
                          -
                          -
                          - -
                          - checked > - checked > -
                          -
                          -
                          style="display:none;"> - -
                          - -
                          -
                          -
                          style="display:none;"> - -
                          - <#include "/apps/business/report/design/modeldesign/fktableiddiv.html"/> -
                          -
                          -
                          -
                          -
                          - -
                          - -
                          -
                          -
                          - -
                          - -
                          -
                          -
                          - -
                          -
                          -
                          -
                          - -
                          - -
                          -
                          -
                          - -
                          - <@select "com.dic.filter.convalue" "convalue" reportFilter.convalue!'' "required lay-verify=required lay-filter=convalue " /> -
                          -
                          -
                          style="display:none;" > - -
                          - -
                          -
                          -
                          style="display:none;"> - -
                          - -
                          -
                          -
                          - -
                          - <@select "com.dic.filter.comparetype" "comparetype" reportFilter.comparetype!'' "required lay-verify=required " /> -
                          -
                          -
                          style="display:none"> - -
                          - -
                          -
                          -
                          -
                          - -
                          -
                          - -
                          -
                          -
                          - - diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/design/modeldesign/filteredit.html b/contact-center/app/src/main/resources/templates/apps/business/report/design/modeldesign/filteredit.html deleted file mode 100644 index 6f5d5bba..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/design/modeldesign/filteredit.html +++ /dev/null @@ -1,270 +0,0 @@ -<#include "/public/macro.html"> -
                          -
                          -
                          -
                          - -
                          -
                          ${table.tablename}
                          - -
                          -
                          -
                          - -
                          - -
                          -
                          -
                          - -
                          - -
                          -
                          -
                          - -
                          - -
                          -
                          -
                          - -
                          - <@select "com.dic.filter.modeltype" "modeltype" reportFilter.modeltype!'' "lay-verify=required lay-filter=modeltype " /> -
                          -
                          -
                          style="display:none;"> - -
                          - checked > - checked > -
                          -
                          -
                          style="display:none;"> - -
                          - -
                          -
                          -
                          - -
                          - <@select "com.dic.filter.valuefiltertype" "valuefiltertype" reportFilter.valuefiltertype!'' "required lay-verify=required lay-filter=valuefiltertype " /> -
                          -
                          -
                          - -
                          style="display:none;" > -
                          - -
                          -
                          ~
                          -
                          - -
                          -
                          -
                          style="display:none;"> - -
                          -
                          -
                          - -
                          - checked > - checked > -
                          -
                          -
                          style="display:none;"> - -
                          - -
                          -
                          -
                          style="display:none;"> - -
                          - <#include "/apps/business/report/design/modeldesign/fktableiddiv.html"/> -
                          -
                          -
                          -
                          -
                          - -
                          - -
                          -
                          -
                          - -
                          - -
                          -
                          -
                          - -
                          -
                          -
                          -
                          - -
                          - -
                          -
                          -
                          - -
                          - <@select "com.dic.filter.convalue" "convalue" reportFilter.convalue!'' "required lay-verify=required lay-filter=convalue " /> -
                          -
                          -
                          style="display:none;" > - -
                          - -
                          -
                          -
                          style="display:none;"> - -
                          - -
                          -
                          -
                          - -
                          - <@select "com.dic.filter.comparetype" "comparetype" reportFilter.comparetype!'' "required lay-verify=required " /> -
                          -
                          -
                          style="display:none"> - -
                          - -
                          -
                          -
                          -
                          - -
                          -
                          - -
                          -
                          -
                          - - - diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/design/modeldesign/filterlist.html b/contact-center/app/src/main/resources/templates/apps/business/report/design/modeldesign/filterlist.html deleted file mode 100644 index 4c495b41..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/design/modeldesign/filterlist.html +++ /dev/null @@ -1,38 +0,0 @@ -
                          -
                          -
                          - - 过滤器 - - - -
                          - <#if reportModel?? && reportModel.filters??> -
                            - <#list reportModel.filters as filter> -
                          • - -
                            - <#include "/apps/business/report/design/modeldesign/filter.html"/> -
                            -
                          • - -
                          - -
                          -
                          - -
                          -
                          - diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/design/modeldesign/fktableid.html b/contact-center/app/src/main/resources/templates/apps/business/report/design/modeldesign/fktableid.html deleted file mode 100644 index 76f54a30..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/design/modeldesign/fktableid.html +++ /dev/null @@ -1,7 +0,0 @@ - - <#if fktableidList??> - <#list fktableidList as fktableid> - - - - diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/design/modeldesign/fktableiddiv.html b/contact-center/app/src/main/resources/templates/apps/business/report/design/modeldesign/fktableiddiv.html deleted file mode 100644 index 0a6baa35..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/design/modeldesign/fktableiddiv.html +++ /dev/null @@ -1,15 +0,0 @@ - - - diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/design/modeldesign/left.html b/contact-center/app/src/main/resources/templates/apps/business/report/design/modeldesign/left.html deleted file mode 100644 index 8a092a4f..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/design/modeldesign/left.html +++ /dev/null @@ -1,187 +0,0 @@ -
                          -
                          - -
                          -
                          -
                          -
                            -
                          • 数据选项
                          • -
                          • 过滤器
                          • -
                          -
                          -
                          - <#if reportModel?? && reportModel.publishedcubeid??> - <#if eltemplet?? && eltemplet.name == '数据表'> -
                          -
                          - - 行维度 - - - -
                          - <#if reportModel?? && reportModel.properties??> -
                            - <#list reportModel.properties as property> -
                          • - ${property.dataname!''} - -
                          • - -
                          - -
                          - -
                          -
                          - - 列维度 - - - -
                          - <#if reportModel?? && reportModel.colproperties??> -
                            - <#list reportModel.colproperties as property> -
                          • - ${property.dataname!''} - -
                          • - -
                          - -
                          - <#else> -
                          -
                          - - 维度 - - - -
                          - <#if reportModel?? && reportModel.properties??> -
                            - <#list reportModel.properties as property> -
                          • - ${property.dataname!''} - -
                          • - -
                          - -
                          - - - -
                          -
                          - - 指标 - - - -
                          - <#if reportModel?? && reportModel.properties??> -
                            - <#list reportModel.measures as measure> -
                          • - ${measure.title!''} - - -
                          • - -
                          - -
                          - -
                          -
                          - <#if reportModel?? && reportModel.publishedcubeid??> - <#include "/apps/business/report/design/modeldesign/filterlist.html"/> - -
                          -
                          -
                          -
                          -
                          -
                          -
                          - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/design/modeldesign/measureedit.html b/contact-center/app/src/main/resources/templates/apps/business/report/design/modeldesign/measureedit.html deleted file mode 100644 index 8db938e1..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/design/modeldesign/measureedit.html +++ /dev/null @@ -1,15 +0,0 @@ -
                          - - -
                          - -
                          - -
                          -
                          -
                          -
                          - -
                          -
                          -
                          diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/design/modeldesign/right.html b/contact-center/app/src/main/resources/templates/apps/business/report/design/modeldesign/right.html deleted file mode 100644 index 014fb865..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/design/modeldesign/right.html +++ /dev/null @@ -1,155 +0,0 @@ -
                          -
                          图表设置
                          -
                          - -
                          - -
                          - -
                          -
                          -
                          - - 行列交换 - - checked> - -
                          -
                          -
                          - - 数据量 - - checked> - -
                          -
                          style="display:none" > - - checked > - - - checked > - - - checked > - - - checked> - - - checked> - - - checked> - -
                          -
                          -
                          -
                          - - 显示图例 - - checked> - -
                          -
                          style="display:none" > - - checked > - - - checked > - - - checked> - - - checked> - -
                          -
                          -
                          -
                          - - 显示数值 - - checked> - -
                          -
                          -
                          -
                          - - 数值格式化 - - - -
                          -
                          - -
                          -
                          - diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/design/template.html b/contact-center/app/src/main/resources/templates/apps/business/report/design/template.html deleted file mode 100644 index 25738d6b..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/design/template.html +++ /dev/null @@ -1,7 +0,0 @@ -<#if templet?? && templet.code?? && templet.code == "layout"> - <#include "layout.html"/> -<#elseif templet?? && templet.code?? && templet.code == "filter"> - <#include "filter.html"/> -<#elseif templet.templettype?? && templet.templettype == "report"> - <#include "layout.html"/> - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/edit.html b/contact-center/app/src/main/resources/templates/apps/business/report/edit.html deleted file mode 100644 index b47abc74..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/edit.html +++ /dev/null @@ -1,117 +0,0 @@ -
                          -
                          - -
                          -
                          - -
                          - -
                          -
                          -
                          -
                          -
                          - -
                          - -
                          -
                          -
                          -
                          -
                          - -
                          - - - - -
                          -
                          -
                          -
                          - -
                          -
                          -
                          -
                          -
                          - -
                          -
                          -
                          -
                          - - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/edittype.html b/contact-center/app/src/main/resources/templates/apps/business/report/edittype.html deleted file mode 100644 index 144cdfa8..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/edittype.html +++ /dev/null @@ -1,116 +0,0 @@ -<#include "/public/macro.html"> -
                          -
                          - -
                          -
                          - -
                          - - -
                          - * -
                          -
                          - -
                          -
                          - -
                          - - - - -
                          -
                          -
                          - - -
                          -
                          - - -
                          -
                          -
                          -
                          - - - diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/element.html b/contact-center/app/src/main/resources/templates/apps/business/report/element.html deleted file mode 100644 index e45f9c1b..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/element.html +++ /dev/null @@ -1,27 +0,0 @@ -
                          -
                          -
                          ${element.name!'组件'}
                          - <#if true> -
                          - - 删除 - - - 设计 - -
                          - -
                          -
                          -
                          -
                          - -
                          -
                          -
                          -
                          - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/imp.html b/contact-center/app/src/main/resources/templates/apps/business/report/imp.html deleted file mode 100644 index 51d7e57d..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/imp.html +++ /dev/null @@ -1,83 +0,0 @@ -<#include "/public/macro.html"> -
                          -
                          - <#if type??> -
                          -
                          -

                          选择导入的数据文件

                          -
                          -
                          -
                          - -
                          -
                          - - 上传快捷回复文件 -
                          -
                          -
                          -
                          - *(必填项) (需要导入的快捷回复数据Excel文件) - - - 下载模板 - -
                          -
                          - -
                          -
                          - -
                          - -
                          -
                          -
                          -
                          -
                          -
                          -

                          快捷回复数据导入说明,导入步骤:

                          -
                          -
                          -
                          - -
                          上传快捷回复数据的Excel文件
                          -
                          -
                          -
                          -
                          - -
                          选择Excel里的列与系统快捷回复的字段对应关系
                          -
                          -
                          -
                          -
                          - -
                          开始导入快捷回复数据
                          -
                          -
                          - -
                          -
                          -
                          - 自动匹配快捷回复导入字段功能,无需下载模板,系统自动匹配,知识数据直接导入,使用更加方便、快捷、智能。 -
                          -
                          - -
                          -
                          - - -
                          -
                          -
                          -
                          - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/index.html b/contact-center/app/src/main/resources/templates/apps/business/report/index.html deleted file mode 100644 index 98a5ded5..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/index.html +++ /dev/null @@ -1,308 +0,0 @@ - - - -
                          -
                          -
                          -

                          - 报表分类 - - - -

                          -
                          -
                            -
                            -
                            -
                            -
                            -
                            -
                            -
                            -

                            - <#if dataDic??> - ${dataDic.name!''} - <#else> - 报表列表 - - <#if reportList??>(${reportList.totalElements}) -
                            - <#if dataDic??> - - - - - <#if dataDic??> -
                            - -
                            - - -
                            -

                            -
                            -
                            - - - - - - - - - - - - - - - - - - - <#if reportList?? && reportList.content??> - <#list reportList.content as report> - - - - - - - - <#else> - - - - - -
                            - - 标题创建时间操作
                            - - - <#if report.name?? && report.name?length gt 100>${report.name[0..100]}...<#else>${report.name!''}(${report.code!''}) - ${report.createtime?string("yyyy-MM-dd HH:mm:ss")} - - - 编辑 - - - - 设计 - - - - 发布 - - - - 删除 - -
                            -
                            - -
                            还没有记录
                            -
                            -
                            -
                            -
                            -
                            -
                            -
                            -
                            -
                            -
                            - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/pbreportindex.html b/contact-center/app/src/main/resources/templates/apps/business/report/pbreportindex.html deleted file mode 100644 index 1135685a..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/pbreportindex.html +++ /dev/null @@ -1,116 +0,0 @@ - - - -
                            -
                            -
                            -

                            - 报表分类 -

                            -
                            -
                              -
                              -
                              -
                              -
                              -
                              - <#include "/apps/business/report/pbreportlist.html"> -
                              - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/pbreportlist.html b/contact-center/app/src/main/resources/templates/apps/business/report/pbreportlist.html deleted file mode 100644 index 1c2b2aea..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/pbreportlist.html +++ /dev/null @@ -1,92 +0,0 @@ -
                              -
                              -

                              - <#if dataDic??> - ${dataDic.name!''} - <#else> - 报表列表 - - <#if reportList??>(${reportList.totalElements}) -

                              -
                              -
                              - - - - - - - - - - - - - - - - - - - - <#if reportList?? && reportList.content??> - <#list reportList.content as report> - - - - - - - - - <#else> - - - - - -
                              - - 名称版本创建时间操作
                              - - - <#if report.name?? && report.name?length gt 100>${report.name[0..100]}...<#else>${report.name!''}(${report.code!''}) - - - ${report.dataversion!''} - ${report.createtime?string("yyyy-MM-dd HH:mm:ss")} - - - 删除 - -
                              -
                              - -
                              还没有记录
                              -
                              -
                              -
                              -
                              -
                              -
                              -
                              -
                              -
                              - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/replylist.html b/contact-center/app/src/main/resources/templates/apps/business/report/replylist.html deleted file mode 100644 index 8aae92cd..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/replylist.html +++ /dev/null @@ -1,233 +0,0 @@ -
                              -
                              -

                              - <#if quickType??> - ${quickType.name!''} - <#else> - 问答列表 - - <#if quickReplyList??>(${quickReplyList.totalElements}) -
                              - <#if quickType??> - - - - - <#if quickType??> -
                              - -
                              - - -
                              -

                              -
                              -
                              - - - - - - - - - - - - - - - - - - - - <#if quickReplyList?? && quickReplyList.content??> - <#list quickReplyList.content as quickReply> - - - - - - - - - <#else> - - - - - -
                              - - 标题内容创建时间操作
                              - - - <#if quickReply.title?? && quickReply.title?length gt 100>${quickReply.title[0..100]}...<#else>${quickReply.title!''} - <#if quickReply.content?? && quickReply.content?length gt 100>${quickReply.content[0..100]}...<#else>${quickReply.content!''}${quickReply.createtime?string("yyyy-MM-dd HH:mm:ss")} - - - 编辑 - - - - 删除 - -
                              -
                              - -
                              还没有快捷回复记录
                              -
                              -
                              -
                              -
                              -
                              -
                              -
                              -
                              -
                              - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/reportpublish.html b/contact-center/app/src/main/resources/templates/apps/business/report/reportpublish.html deleted file mode 100644 index 7c7e4841..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/reportpublish.html +++ /dev/null @@ -1,29 +0,0 @@ -<#include "/public/macro.html"> -
                              -
                              - -
                              -
                              - -
                              - - - -
                              -
                              -
                              -
                              -
                              - - -
                              -
                              -
                              -
                              - - diff --git a/contact-center/app/src/main/resources/templates/apps/business/report/view.html b/contact-center/app/src/main/resources/templates/apps/business/report/view.html deleted file mode 100644 index 66538c1c..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/report/view.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - ${report.name!''}-<#if systemConfig?? && systemConfig.title?? && systemConfig.title != ''>${systemConfig.title}<#else>春松客服-全渠道智能客服</#if> - - - - - - - - - - - - - - - - - - - - - - -
                              -
                              -
                              - ${report.name!''} - 创建于:${report.createtime?string('yyyy-MM-dd HH:mm:ss')} -
                              -
                              -
                              - <#if reportFilters?? && reportFilters?size gt 0> -
                              -
                              -
                              -
                              - <#if reportFilters??> - <#list reportFilters as filter> - <#if filter.reportid == report.id> - <#assign eltemplet = filter.templet()> - <#include "/apps/business/report/design/filter.html"/> - - - -
                              -
                              - -
                              -
                              -
                              -
                              - -
                              - <#if reportModels??> - <#list reportModels?reverse as model> - <#if model.parentid == report.id> - <#assign templet = model.templet()> - <#include "/apps/business/report/design/layout.html"/> - - - -
                              -
                              -
                              - - - - diff --git a/contact-center/app/src/main/resources/templates/apps/business/topic/add.html b/contact-center/app/src/main/resources/templates/apps/business/topic/add.html deleted file mode 100644 index ee78305b..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/topic/add.html +++ /dev/null @@ -1,134 +0,0 @@ -<#include "/public/macro.html"> -
                              -
                              - <#if type??> -
                              -
                              -

                              知识信息

                              -
                              -
                              -
                              - -
                              - - -
                              -
                              -
                              - -
                              -
                              -
                              -
                              - -
                              - - -
                              -
                              -
                              - -
                              - - -
                              -
                              -
                              - -
                              -
                              - -
                              - -
                              -
                              -
                              - -
                              -
                              - -
                              -
                              - - -
                              -
                              -
                              - -
                              -
                              -
                              -
                              -

                              知识内容

                              -
                              -
                              -
                              - -
                              - -
                              -
                              -
                              -
                              -
                              -
                              - -
                              -
                              - - -
                              -
                              -
                              -
                              - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/topic/addtype.html b/contact-center/app/src/main/resources/templates/apps/business/topic/addtype.html deleted file mode 100644 index 3cc173dc..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/topic/addtype.html +++ /dev/null @@ -1,100 +0,0 @@ -
                              -
                              -
                              - -
                              - -
                              -
                              -
                              -
                              - -
                              - - - - -
                              -
                              -
                              -
                              -
                              - - -
                              -
                              -
                              -
                              - - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/topic/area.html b/contact-center/app/src/main/resources/templates/apps/business/topic/area.html deleted file mode 100644 index 58568543..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/topic/area.html +++ /dev/null @@ -1,111 +0,0 @@ -
                              -
                              - - -
                              -
                              -
                              -
                                -
                                -
                                -
                                -
                                -
                                - - -
                                -
                                -
                                -
                                - - - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/topic/edit.html b/contact-center/app/src/main/resources/templates/apps/business/topic/edit.html deleted file mode 100644 index 36895a2a..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/topic/edit.html +++ /dev/null @@ -1,221 +0,0 @@ -<#include "/public/macro.html"> -
                                -
                                - -
                                -
                                -

                                知识信息

                                -
                                -
                                -
                                - -
                                - - -
                                -
                                -
                                - -
                                -
                                -
                                -
                                - -
                                - - -
                                -
                                -
                                - -
                                - - -
                                -
                                -
                                -
                                -
                                - -
                                - <#if topic.silimar?? && topic.silimar?size gt 0> - <#list topic.silimar as mlt> - - - <#else> - - -
                                -
                                -
                                -
                                -
                                - -
                                -
                                - checked> - checked> -
                                -
                                -
                                -
                                - -
                                - - - - -
                                -
                                -
                                -
                                -
                                -
                                -

                                知识内容

                                -
                                -
                                -
                                - -
                                - -
                                -
                                -
                                -
                                -
                                -
                                - -
                                -
                                - - -
                                -
                                -
                                -
                                - - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/topic/edittype.html b/contact-center/app/src/main/resources/templates/apps/business/topic/edittype.html deleted file mode 100644 index 6407c7ce..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/topic/edittype.html +++ /dev/null @@ -1,104 +0,0 @@ -
                                -
                                - -
                                - -
                                - -
                                -
                                -
                                -
                                - -
                                - - - - -
                                -
                                -
                                -
                                -
                                - - -
                                -
                                -
                                -
                                - - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/topic/imp.html b/contact-center/app/src/main/resources/templates/apps/business/topic/imp.html deleted file mode 100644 index 41e61507..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/topic/imp.html +++ /dev/null @@ -1,83 +0,0 @@ -<#include "/public/macro.html"> -
                                -
                                - <#if type??> -
                                -
                                -

                                选择导入的数据文件

                                -
                                -
                                -
                                - -
                                -
                                - - 上传知识库文件 -
                                -
                                -
                                -
                                - *(必填项) (需要导入的知识库数据Excel文件) - - - 下载模板 - -
                                -
                                - -
                                -
                                - -
                                - -
                                -
                                -
                                -
                                -
                                -
                                -

                                知识库数据导入说明,导入步骤:

                                -
                                -
                                -
                                - -
                                上传知识库数据的Excel文件
                                -
                                -
                                -
                                -
                                - -
                                选择Excel里的列与系统知识库的字段对应关系
                                -
                                -
                                -
                                -
                                - -
                                开始导入知识数据
                                -
                                -
                                - -
                                -
                                -
                                - 自动匹配知识导入字段功能,无需下载模板,系统自动匹配,知识数据直接导入,使用更加方便、快捷、智能。 -
                                -
                                - -
                                -
                                - - -
                                -
                                -
                                -
                                - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/topic/index.html b/contact-center/app/src/main/resources/templates/apps/business/topic/index.html deleted file mode 100644 index 69fe7a92..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/topic/index.html +++ /dev/null @@ -1,265 +0,0 @@ - - -
                                -
                                -
                                -
                                -

                                - 知识分类 - - - -

                                -
                                -
                                  -
                                  -
                                  -
                                  -
                                  -
                                  -
                                  -
                                  -
                                  -
                                  -

                                  - “<#if curtype??>${curtype.name!''}<#else>默认”<#if topicList??>(${topicList.totalElements!''}) -
                                  -
                                  - <#if curtype??> -
                                  -
                                  -
                                  - - -
                                  -
                                  -
                                  -
                                  - <#if curtype??> - - - - - <#if curtype??> - -
                                  - -
                                  - - - -
                                  -

                                  -
                                  -
                                  - - - - - - - - - - - - - - - - - - - - - - <#if topicList?? && topicList.content??> - <#list topicList.content as topic> - - - - - - - - - - - -
                                  标题有效期开始有效期结束热门操作
                                  - - - ${(topic.title!'')?no_esc} - <#if topic.begintime??>${topic.begintime?string('yyyy-MM-dd')}<#if topic.endtime??>${topic.endtime?string('yyyy-MM-dd')} - <#if topic.top> - - - - - - 编辑 - - - - 移除 - -
                                  -
                                  -
                                  -
                                  -
                                  -
                                  -
                                  -
                                  -
                                  -
                                  - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/view/include/left.html b/contact-center/app/src/main/resources/templates/apps/business/view/include/left.html deleted file mode 100644 index 1ed3d3ae..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/view/include/left.html +++ /dev/null @@ -1,20 +0,0 @@ -
                                    - <#if dataDicList??> - <#list dataDicList as dataDic> -
                                  • - ${dataDic.name!''} -
                                    - <#if reportList?? && reportList.content??> - <#list reportList.content as rpt> - <#if rpt.dicid == dataDic.id> -
                                    class="layui-this"> - ${rpt.name!''} -
                                    - - - -
                                    -
                                  • - - -
                                  \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/business/view/index.html b/contact-center/app/src/main/resources/templates/apps/business/view/index.html deleted file mode 100644 index dd40d2af..00000000 --- a/contact-center/app/src/main/resources/templates/apps/business/view/index.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - - - ${report.name!''}-<#if systemConfig?? && systemConfig.title?? && systemConfig.title != ''>${systemConfig.title}<#else>春松客服-全渠道智能客服</#if> - - - - - - - - - - - - - - - - - - - - - - - - - - - <#if report??> -
                                  -
                                  - <#include "/apps/business/view/include/left.html"> -
                                  -
                                  -
                                  -

                                  - - - - - <#if report??>${report.name!''} - -
                                  - <#if report??>创建时间:${report.createtime?string("yyyy-MM-dd HH:mm:ss")} -
                                  -

                                  - <#if reportFilters?? && reportFilters?size gt 0> -
                                  -
                                  -
                                  -
                                  - <#if reportFilters??> - <#list reportFilters as filter> - <#if filter.reportid == report.id> - <#assign eltemplet = filter.templet()> - <#include "/apps/business/report/design/filter.html"/> - - - -
                                  -
                                  - -
                                  -
                                  -
                                  -
                                  - -
                                  - <#if reportModels??> - <#list reportModels?reverse as model> - <#if model.parentid == report.id> - <#assign templet = model.templet()> - <#include "/apps/business/report/design/layout.html"/> - - - -
                                  -
                                  - <#else> -
                                  -
                                  -

                                  数据报表

                                  -
                                  -
                                  -
                                  - -
                                  还没有数据报表
                                  -
                                  -
                                  -
                                  - - - - diff --git a/contact-center/app/src/main/resources/templates/apps/cca/agentusers.html b/contact-center/app/src/main/resources/templates/apps/cca/agentusers.html deleted file mode 100644 index b9d0daa4..00000000 --- a/contact-center/app/src/main/resources/templates/apps/cca/agentusers.html +++ /dev/null @@ -1,141 +0,0 @@ - - - - - diff --git a/contact-center/app/src/main/resources/templates/apps/cca/agentusers.pug b/contact-center/app/src/main/resources/templates/apps/cca/agentusers.pug new file mode 100644 index 00000000..e779703d --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/cca/agentusers.pug @@ -0,0 +1,131 @@ +.row + .col-lg-12 + h1.site-h1 + | 对话列表 + form.layui-form#searchConversation(name='search', method='post') + .layui-form-item + .layui-inline(style='margin-right:0px;width: 100%') + select.ukefu-input(name='skill', lay-ignore, style='width: 90px;display: inline-block', onchange='renderAgentsByOrgan(this.value)') + option(value) 所有技能组 + if skillGroups + for tpskill in skillGroups + option(value=tpskill.id,selected=(skill && skill == tpskill.id?'selected':false)) + | #{tpskill.name} + label ~ + select#agent.ukefu-input(name='agentno', lay-ignore, style='width: 100px;display: inline-block') + option(value) 请选择技能组 + .layui-input-inline(style='float: right;width: auto;margin-right: 0px') + button.layui-btn.layui-btn-small.layui-btn-original(style='color:#ffffff;') + i.layui-icon  + ul.dialog-list#chat_users + if agentUserList + for agentuser in agentUserList + li(class={ + 'clearfix': true, + 'chat-list-item': true, + 'active': (curagentuser.id == agentuser.id) + }, id='agentuser_' + agentuser.userid, remove-id=agentuser.id, data-id=agentuser.userid) + a(href='/apps/cca/agentuser.html?id=' + agentuser.id + '&channel=' + agentuser.channel, data-toggle="load", data-target="#ukefu-chat-agent", onclick="$('.chat-list-item.active').removeClass('active');$(this).closest('li.chat-list-item').addClass('active');cleanTopMsgTip(this) ;$('#last_msg_#{agentuser.userid}').text(0).hide();") + img(src=(agentuser.headimgurl && agentuser.headimgurl != '' ? agentuser.headimgurl : '/images/im/user.png'), style="width:45px;height:45px;") + if agentuser.status && agentuser.status == 'end' + if agentuser.channel && agentuser.channel == "weixin" + i.kfont.ukefu-channel-icon-end(id="tip_icon_wenxin_#{agentuser.userid}") + |  + else if agentuser.channel && agentuser.channel == "webim" + i.kfont.ukefu-channel-icon-end(id="tip_icon_webim_#{agentuser.userid}") + |  + else if agentuser.channel && agentuser.channel == "skype" + i.csfont.ukefu-channel-icon-end(id="tip_icon_skype_#{agentuser.userid}") + |  + else if agentuser.channel && agentuser.channel == "messenger" + i.csfont.ukefu-channel-icon-end(id="tip_icon_messenger_#{agentuser.userid}") + |  + else if agentuser.channel && agentuser.channel == "phone" + img.ukefu-channel-image(src="/images/cde-ico-gray.png", id="tip_icon_phone_#{agentuser.userid}") + else + if agentuser.channel && agentuser.channel == "weixin" + i.kfont.ukefu-channel-icon(id="tip_icon_wenxin_#{agentuser.userid}") + |  + else if agentuser.channel && agentuser.channel == "webim" + i.kfont.ukefu-channel-icon(id="tip_icon_webim_#{agentuser.userid}") + |  + else if agentuser.channel && agentuser.channel == "skype" + i.csfont.ukefu-channel-icon(id="tip_icon_skype_#{agentuser.userid}") + |  + else if agentuser.channel && agentuser.channel == "messenger" + i.csfont.ukefu-channel-icon(id="tip_icon_messenger_#{agentuser.userid}") + |  + else if agentuser.channel && agentuser.channel == "phone" + img.ukefu-channel-image(src="/images/phone-ico.png", id="tip_icon_phone_#{agentuser.userid}") + .dialog-info + .address + span(style="width:90px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-wrap: break-word;word-break: break-all;") + | #{agentuser.username} + .news + | #{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', agentuser.servicetime)} + if agentuser.status && agentuser.status == 'end' + small.label.bg-gray.pull-right(id="tip_message_#{agentuser.userid}") 离开 + else + small.label.bg-green.pull-right(id="tip_message_#{agentuser.userid}") 在线 + .last-msg + small.ukefu-badge.bg-red(id="last_msg_#{agentuser.userid}",style="#{(agentuser.tokenum == 0 || (curagentuser && curagentuser.id == agentuser.id)) ? 'display:none' : ''}") + | #{agentuser.tokenum ? agentuser.tokenum : 0} +script(src='/js/CSKeFu_Rest_Request.v1.js') +script. + function renderAgentsByOrgan(organid) { + if (organid.length > 0) { + restApiRequest({ + silent: true, + path: 'user', + data: { + ops: 'findByOrgan', + organ: organid + } + }).then(function (result) { + if (result.rc == 0) { + $("#agent").html(''); + for (var i = 0; i < result.data.length; i++) { + $("#agent").prepend('') + } + ; + } + }, function (error) { + // 服务器异常 + top.layer.msg('服务器抽风,请稍后再试!', {icon: 2, offset: 'b', time: 3000}) + }) + } else { + $("#agent").html(""); + } + + } + + $(function () { + $('#searchConversation').on('submit', function (e) { + e.preventDefault(); //prevent form from submitting + var data = $("#searchConversation :input").serializeArray(); + console.log(data) + var params = {}; + for (var index = 0; index < data.length; index++) { + params[data[index]['name']] = data[index]["value"]; + } + $.ajax({ + url: '/apps/cca/query', + data: {skill: params["skill"], agentno: params["agentno"]}, + type: "post", + success: function (data) { + $("#chat_users").html(data); + if ($("#chat_users li").length > 0) { + if ($("#chat_users li:first-child").attr('id').substring(10) !== cursession) { + $("#chat_users li:first-child a").click(); + } else { + $("#chat_users li:first-child").addClass("active") + } + } else { + cursession = ""; + $("#ukefu-chat-agent").html("
                                  没有搜索结果
                                  \
                                  \
                                  "); + } + } + }); + }); + }); + diff --git a/contact-center/app/src/main/resources/templates/apps/cca/blacklistadd.html b/contact-center/app/src/main/resources/templates/apps/cca/blacklistadd.html deleted file mode 100644 index bdd846e2..00000000 --- a/contact-center/app/src/main/resources/templates/apps/cca/blacklistadd.html +++ /dev/null @@ -1,129 +0,0 @@ -
                                  -
                                  - - - - -
                                  -
                                  -

                                  黑名单信息

                                  -
                                  -
                                  -
                                  - -
                                  - 访客ID(${userid!''}) -
                                  -
                                  -
                                  - -
                                  - -
                                  -
                                  -
                                  -
                                  -
                                  -
                                  -

                                  扩展信息

                                  -
                                  -
                                  -
                                  - -
                                  - -
                                  -
                                  -
                                  -
                                  -
                                  -
                                  - -
                                  -
                                  - - -
                                  -
                                  -
                                  -
                                  - - - diff --git a/contact-center/app/src/main/resources/templates/apps/cca/calloutcontact/add.html b/contact-center/app/src/main/resources/templates/apps/cca/calloutcontact/add.html deleted file mode 100644 index a09a6841..00000000 --- a/contact-center/app/src/main/resources/templates/apps/cca/calloutcontact/add.html +++ /dev/null @@ -1,188 +0,0 @@ - -
                                  -
                                  -

                                  新建联系人

                                  -
                                  -
                                  - - -
                                  -
                                  -

                                  基本信息

                                  -
                                  -
                                  -
                                  - -
                                  - - -
                                  - *(您得到此联系人的时间) -
                                  -
                                  -
                                  -
                                  - -
                                  - <@select "com.dic.contacts.ckind" "ckind" '4028838b5af1047e015af140df150003'!'' "lay-ignore required lay-verify='required' "/> -
                                  - * -
                                  -
                                  -
                                  -
                                  -
                                  -

                                  联系人信息

                                  -
                                  -
                                  -
                                  - -
                                  - -
                                  - * -
                                  -
                                  -
                                  -
                                  - -
                                  -
                                  - - - -
                                  -
                                  -
                                  -
                                  -
                                  -
                                  - -
                                  - - -
                                  -
                                  -
                                  - -
                                  -
                                  - -
                                  - -
                                  -
                                  -
                                  -
                                  -
                                  - -
                                  - -
                                  -
                                  -
                                  - -
                                  -
                                  - -
                                  - <@select "com.dic.address.area" "province" mobileAddress.province "lay-ignore"/> -
                                  -
                                  -
                                  -
                                  - <@select "com.dic.address.area.city" "city" mobileAddress.city "lay-ignore"/> -
                                  -
                                  -
                                  -
                                  -
                                  - -
                                  - -
                                  -
                                  -
                                  - -
                                  -
                                  - -
                                  - -
                                  -
                                  -
                                  - -
                                  -
                                  - -
                                  - -
                                  -
                                  -
                                  -
                                  -
                                  -
                                  - -
                                  -
                                  - - -
                                  -
                                  -
                                  -
                                  - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/cca/calloutcontact/add.pug b/contact-center/app/src/main/resources/templates/apps/cca/calloutcontact/add.pug new file mode 100644 index 00000000..02c792bd --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/cca/calloutcontact/add.pug @@ -0,0 +1,144 @@ +//- + 原始 Freemarker 文件位置:https://gitlab.chatopera.com/chatopera/cskefu/blob/760e130e770a96a43e8f6f2c8a1eb0885c0bbf90/contact-center/app/src/main/resources/templates/apps/cca/calloutcontact/add.html + 该页面项目中暂时没有使用,此处是没有完全转化的 Pug 文件 + 如果提供这个页面,需要参考 Freemarker 原文件完成转化或参考实现 + +// <#include "/public/macro.html"> +html + head + body + .uk-layui-form + .box-header(style='background-color: #f5f5f5;') + h1.site-h1(style='background-color:#FFFFFF;') 新建联系人 + form.layui-form(action='/agent/calloutcontact/save.html?agentuser=${curagentuser.id!\'\'}', method='post') + input(hidden, name='calloutcontact') + input(type='hidden', name='shares', value='all') + .layui-collapse + .layui-colla-item + h2.layui-colla-title 基本信息 + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label.layui-form-label 获得时间: + .layui-input-inline + input#getdate.layui-input(type='text', name='touchtime', readonly, lay-verify='date', autocomplete='off') + i.layui-icon(style='position: absolute;right: 3px;top: 6px;font-size: 25px;')  + span + font(color='red') * + b(style='font-size: 10px;') (您得到此联系人的时间) + .layui-form-item + .layui-inline + label.layui-form-label 类型: + .layui-input-inline + // <@select "com.dic.contacts.ckind" "ckind" '4028838b5af1047e015af140df150003'!'' "lay-ignore required lay-verify='required' "/> + span + font(color='red') * + .layui-colla-item + h2.layui-colla-title 联系人信息 + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label.layui-form-label#cusname 联系人名称: + .layui-input-inline + input.layui-input(type='text', name='name', required, lay-verify='required', autocomplete='off') + span + font(color='red') * + .layui-form-item + .layui-inline + label.layui-form-label 性别: + .layui-input-inline + .layui-input-block(style='width: 113%;') + input(type='radio', name='gender', value='1', title='男') + input(type='radio', name='gender', value='0', title='女') + input(type='radio', name='gender', value='-1', title='未知', checked) + .layui-form-item + .layui-inline + label.layui-form-label 生日: + .layui-input-inline + input#cusbirthday.layui-input(type='text', name='cusbirthday', autocomplete='off') + i.layui-icon(style='position: absolute;right: 3px;top: 6px;font-size: 25px;')  + .layui-form-item + .layui-inline + label.layui-form-label 联系电话: + .layui-input-inline + input.layui-input(type='text', name='phone', lay-verify='entphone', autocomplete='off', value='${statusEvent.discalled!\'\'}') + .layui-form-item + .layui-inline + label.layui-form-label 手机号: + .layui-input-inline + input.layui-input(type='text', name='mobileno', lay-verify='entphone', autocomplete='off', value='${statusEvent.discalled!\'\'}') + .layui-form-item + .layui-inline + label.layui-form-label 城市: + .layui-input-inline + // <@select "com.dic.address.area" "province" mobileAddress.province "lay-ignore"/> + .layui-inline + .layui-input-inline#contacts_city + // <@select "com.dic.address.area.city" "city" mobileAddress.city "lay-ignore"/><!– 二级字典,不存在的 CODE –> + .layui-form-item + .layui-inline + label.layui-form-label 电子邮件: + .layui-input-inline + input.layui-input(type='text', name='email', lay-verify='entemail', autocomplete='off') + .layui-form-item + .layui-inline + label.layui-form-label 联系人地址: + .layui-input-inline + input.layui-input(type='text', name='address', autocomplete='off', style='width: 236%;') + .layui-form-item + .layui-inline + label.layui-form-label 联系人说明: + .layui-input-inline(style='width: 174%;') + textarea.layui-textarea(name='memo', placeholder='请输入内容') + .layui-form-button(style='position: inherit;') + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 立即提交 + button.layui-btn.layui-btn-original(type='reset') 重置 + script(src='/js/moment.min.js') + script. + + //Demo + $('#province').change(function(){ + loadURL('/res/dic.html?id='+$(this).val()+"&name=city&attr=lay-ignore&style=width:85px;display:inline-block;" , '#contacts_city'); + }) + layui.use('form', function() { + var form = layui.form(); + form.render(); //更新全部 + form.verify({ + entphone: function(value){ + if(value!="" && !new RegExp(/^1[3456789]\d{9}$/).test(value)){ + return '请输入正确的电话号码'; + } + }, + entemail: function(value){ + if(value!="" && !new RegExp(/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/).test(value)){ + return '请输入正确的电子邮箱地址'; + } + } + }); + }); + layui.use('element', function(){ + var element = layui.element(); + }); + + $("#getdate").val(moment().format('YYYY-MM-DD')); + layui.use('laydate', function() { + var laydate = layui.laydate; + + var date = { + min : '1950-01-01 00:00:00', + max : laydate.now(), + istoday : false + }; + + document.getElementById('getdate').onclick = function() { + date.elem = this; + laydate(date); + } + + document.getElementById('cusbirthday').onclick = function() { + date.elem = this; + laydate(date); + } + }); + diff --git a/contact-center/app/src/main/resources/templates/apps/cca/calloutcontact/edit.html b/contact-center/app/src/main/resources/templates/apps/cca/calloutcontact/edit.html deleted file mode 100644 index 57c92f88..00000000 --- a/contact-center/app/src/main/resources/templates/apps/cca/calloutcontact/edit.html +++ /dev/null @@ -1,260 +0,0 @@ - -
                                  -
                                  -

                                  编辑联系人

                                  -
                                  -
                                  - - -
                                  -
                                  -

                                  基本信息

                                  -
                                  -
                                  -
                                  - -
                                  - - - *(您得到此联系人的时间) -
                                  -
                                  -
                                  -
                                  -
                                  - -
                                  - <#if contacts.ckind?? && contacts.ckind != ''> - <@select "com.dic.contacts.ckind" "ckind" contacts.ckind!'' "lay-ignore required lay-verify='required' "/> - <#else> - <@select "com.dic.contacts.ckind" "ckind" "" "lay-ignore"/> - -
                                  - * -
                                  -
                                  -
                                  -
                                  -
                                  -

                                  联系人信息

                                  -
                                  -
                                  -
                                  - -
                                  - -
                                  - * -
                                  -
                                  -
                                  -
                                  - -
                                  -
                                  - checked> - checked> - checked> -
                                  -
                                  -
                                  -
                                  -
                                  -
                                  - -
                                  - - -
                                  -
                                  -
                                  - -
                                  -
                                  - -
                                  - -
                                  -
                                  -
                                  -
                                  -
                                  - -
                                  - -
                                  -
                                  -
                                  - -
                                  -
                                  - -
                                  - <@select "com.dic.address.area" "province" contacts.province "lay-ignore"/> -
                                  -
                                  -
                                  -
                                  - <@select contacts.city+".subdic" "city" contacts.city "lay-ignore"/> -
                                  -
                                  -
                                  -
                                  -
                                  - -
                                  - -
                                  -
                                  -
                                  - -
                                  -
                                  - -
                                  - -
                                  -
                                  -
                                  - -
                                  -
                                  - -
                                  - -
                                  -
                                  -
                                  - -
                                  -
                                  - - -
                                  -
                                  -
                                  - -
                                  -
                                  -
                                  - - -
                                  -
                                  -
                                  -
                                  -

                                  标签

                                  -
                                  -
                                  -
                                  - -
                                  -
                                  -
                                  -
                                  -
                                  -
                                  -
                                  -
                                  -
                                  -
                                  -
                                  -
                                  -
                                  -

                                  笔记

                                  -
                                  -
                                  - -
                                  - -
                                  -
                                  -
                                  -
                                  - -
                                  - -
                                  -
                                  -
                                  -
                                  -
                                  - -
                                  -
                                  -
                                  -
                                  -
                                  -
                                  -
                                  -
                                  - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/cca/calloutcontact/edit.pug b/contact-center/app/src/main/resources/templates/apps/cca/calloutcontact/edit.pug new file mode 100644 index 00000000..0cde1f68 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/cca/calloutcontact/edit.pug @@ -0,0 +1,198 @@ +//- + 原始 Freemarker 文件位置:https://gitlab.chatopera.com/chatopera/cskefu/blob/760e130e770a96a43e8f6f2c8a1eb0885c0bbf90/contact-center/app/src/main/resources/templates/apps/cca/calloutcontact/edit.html + 该页面项目中暂时没有使用,此处是没有完全转化的 Pug 文件 + 如果提供这个页面,需要参考 Freemarker 原文件完成转化或参考实现 + +// <#include "/public/macro.html"> +html + head + body + .uk-layui-form + .box-header(style='background-color: #f5f5f5;') + h1.site-h1(style='background-color:#FFFFFF;') 编辑联系人 + form.layui-form(action='/agent/calloutcontact/update.html', method='post') + input(type='hidden', name='id', value='${contacts.id!\'\'}') + input(type='hidden', name='shares', value='all') + .layui-collapse + .layui-colla-item + h2.layui-colla-title 基本信息 + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label.layui-form-label 获得时间: + .layui-input-inline + input#getdate.layui-input(type='text', name='touchtime', value='<#if contacts.touchtime??>${contacts.touchtime?string(\'yyyy-MM-dd\')}', readonly, lay-verify='date', autocomplete='off') + i.layui-icon(style='position: absolute;right: 3px;top: 6px;font-size: 25px;')  + span + font(color='red') * + b(style='font-size: 10px;') (您得到此联系人的时间) + .layui-form-item + .layui-inline + label.layui-form-label 类型: + .layui-input-inline + // <#if contacts.ckind?? && contacts.ckind != ''> + // <@select "com.dic.contacts.ckind" "ckind" contacts.ckind!'' "lay-ignore required lay-verify='required' "/> + // <#else> + // <@select "com.dic.contacts.ckind" "ckind" "" "lay-ignore"/> + // + span + font(color='red') * + .layui-colla-item + h2.layui-colla-title 联系人信息 + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label.layui-form-label#cusname 联系人名称: + .layui-input-inline + input.layui-input(type='text', name='name', value='${contacts.name!\'\'}', required, lay-verify='required', autocomplete='off') + span + font(color='red') * + .layui-form-item + .layui-inline + label.layui-form-label 性别: + .layui-input-inline + //
                                  + // checked> + // checked> + // checked> + .layui-form-item + .layui-inline + label.layui-form-label 生日: + .layui-input-inline + input#cusbirthday.layui-input(type='text', name='cusbirthday', value='${contacts.cusbirthday!\'\'}', autocomplete='off') + i.layui-icon(style='position: absolute;right: 3px;top: 6px;font-size: 25px;')  + .layui-form-item + .layui-inline + label.layui-form-label 联系电话: + .layui-input-inline + input.layui-input(type='text', name='phone', lay-verify='entphone', value='${contacts.phone!\'\'}', autocomplete='off') + .layui-form-item + .layui-inline + label.layui-form-label 手机号: + .layui-input-inline + input#getdate.layui-input(type='text', name='mobileno', lay-verify='entphone', value='${contacts.mobileno!\'\'}', autocomplete='off') + .layui-form-item + .layui-inline + label.layui-form-label 城市: + .layui-input-inline + // <@select "com.dic.address.area" "province" contacts.province "lay-ignore"/> + .layui-inline + .layui-input-inline#contacts_city + // <@select contacts.city+".subdic" "city" contacts.city "lay-ignore"/><!– 二级字典,不存在的 CODE –> + .layui-form-item + .layui-inline + label.layui-form-label 电子邮件: + .layui-input-inline + input.layui-input(type='text', name='email', lay-verify='entemail', value='${contacts.email!\'\'}', autocomplete='off') + .layui-form-item + .layui-inline + label.layui-form-label 联系人地址: + .layui-input-inline + input.layui-input(type='text', name='address', autocomplete='off', value='${contacts.address!\'\'}', style='width: 236%;') + .layui-form-item + .layui-inline + label.layui-form-label 联系人说明: + .layui-input-inline(style='width: 174%;') + textarea.layui-textarea(name='memo', placeholder='请输入内容') ${contacts.memo!''} + .layui-form-button(style='position: inherit;') + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 立即更新 + button.layui-btn.layui-btn-original(type='reset') 重置 + // 未选择标签style + style. + + .unselectedClass { + display: inline-block; + font-weight: 400; + color: #000000; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + border-radius: .25em; + background-color: #FFFFFF !important; + height: 22px; + line-height: 22px; + padding: 0 5px; + font-size: 14px; + border: solid 1px #CCCCCC; + } + + .box-body.ukefu-im-theme + .uk-layui-form + .layui-collapse + .layui-colla-item + h2.layui-colla-title 标签 + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label.layui-form-label(style='text-align: left;') 已有标签: + #contactTags.layui-input-inline(style='width: 100%;'). + + + .box-body.ukefu-im-theme + .uk-layui-form + .layui-collapse + .layui-colla-item + h2.layui-colla-title 笔记 + .layui-colla-content.layui-show + .layui-form-item + label.layui-form-label(style='text-align: left;') 笔记分类: + .layui-input-inline + select#notesCategory(name='notesCategory', lay-filter='category', required, lay-verify='required', style='display: inline') + option(value='callout') 外呼 + option(value='callin') 呼入 + option(value='webim') 网页 + .layui-form-item + .layui-inline + label.layui-form-label(style='text-align: left;') 内容: + .layui-input-inline(style='width: 174%;') + textarea#notesContent.layui-textarea(name='notes') + .layui-form-item + .layui-button-inline(style='float: left;') + button.layui-btn#notesAddBtn(lay-submit, lay-filter='notesbtn') 立即添加 + script. + + //Demo + $('#province').change(function(){ + loadURL('/res/dic.html?id='+$(this).val()+"&name=city&attr=lay-ignore&style=width:85px;display:inline-block;" , '#contacts_city'); + }) + layui.use('form', function() { + var form = layui.form(); + form.render(); //更新全部 + form.verify({ + entphone: function(value){ + if(value!="" && !new RegExp(/^1[3456789]\d{9}$/).test(value)){ + return '请输入正确的电话号码'; + } + }, + entemail: function(value){ + if(value!="" && !new RegExp(/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/).test(value)){ + return '请输入正确的电子邮箱地址'; + } + } + }); + }); + layui.use('element', function(){ + var element = layui.element(); + }); + layui.use('laydate', function() { + var laydate = layui.laydate; + + var date = { + min : '1950-01-01 00:00:00', + max : laydate.now(), + istoday : false + }; + + document.getElementById('getdate').onclick = function() { + date.elem = this; + laydate(date); + } + + document.getElementById('cusbirthday').onclick = function() { + date.elem = this; + laydate(date); + } + + }); + diff --git a/contact-center/app/src/main/resources/templates/apps/cca/channel/phone.html b/contact-center/app/src/main/resources/templates/apps/cca/channel/phone.html deleted file mode 100644 index d3a80a4e..00000000 --- a/contact-center/app/src/main/resources/templates/apps/cca/channel/phone.html +++ /dev/null @@ -1,116 +0,0 @@ -
                                    -
                                  • - 访问渠道: - 语音 -
                                  • - <#if pbxHost??> -
                                  • - 接入线路:${pbxHost.name!''}(${pbxHost.hostname!''}) -
                                  • - - -
                                  • - 主叫号码: - - <#if statusEvent??>${statusEvent.discaller!''} - -
                                  • -
                                  • - 被叫号码:<#if statusEvent??>${statusEvent.discalled!''} -
                                  • -
                                  • - 类型:<#if statusEvent??>${statusEvent.calltype!''} -
                                  • -
                                  • - 主叫方:<#if statusEvent??>${statusEvent.host!''} -
                                  • -
                                  • - IP地址:<#if statusEvent??>${statusEvent.ipaddr!''} -
                                  • -
                                  • - 拨打时间:<#if statusEvent??>${statusEvent.localdatetime!''} -
                                  • - <#if mobileAddress??> -
                                  • - 来电省份:${mobileAddress.province!''} -
                                  • -
                                  • - 来电城市:${mobileAddress.city!''} -
                                  • -
                                  • - 运营商:${mobileAddress.isp!''} -
                                  • - - -
                                  • - 来电类型: - <#if extensionList?? && extensionList?size gt 0> - 内线 - <#else> - 外线 - -
                                  • - <#list uKeFuDic["com.dic.callcenter.comment"] as comment> - <#if statusEvent.satisfaction?? && comment.code== statusEvent.satisfaction > -
                                  • - 满意度评价: ${comment.name} -
                                  • -
                                  • - <#if statusEvent.satisfdate??>评价时间:${statusEvent.satisfdate?string('yyyy-MM-dd HH:mm:ss')} -
                                  • - - -
                                  • - 满意度:<#if statusEvent.satisfaction==null>未评价 -
                                  • -
                                  • - 标签: - - <#if tagRelationList??> - <#list tagRelationList as tagRelation> - <#if tags??> - <#list tags as tag> - <#if tag.id == tagRelation.tagid> - ${tag.tag!''} - - - - - - -
                                    - -
                                    - <#if tags??> - <#list tags as tag> -
                                    ${tag.tag!''}
                                    - - -
                                    -
                                    -
                                  • -
                                  - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/cca/channel/phone.pug b/contact-center/app/src/main/resources/templates/apps/cca/channel/phone.pug new file mode 100644 index 00000000..d05ddb06 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/cca/channel/phone.pug @@ -0,0 +1,137 @@ +//- + 原始 Freemarker 文件位置:https://gitlab.chatopera.com/chatopera/cskefu/blob/760e130e770a96a43e8f6f2c8a1eb0885c0bbf90/contact-center/app/src/main/resources/templates/apps/cca/channel/phone.html + 该页面项目中暂时没有使用,此处是没有完全转化的 Pug 文件 + 如果提供这个页面,需要参考 Freemarker 原文件完成转化或参考实现 + +html + head + body + ul.info-list + li.ukefu-channel-tip + | +访问渠道: + i.kfont(style='position: relative;')  + | +语音 + + // <#if pbxHost??> + //
                                • + // 接入线路:${pbxHost.name!''}(${pbxHost.hostname!''}) + //
                                • + // + li + | +主叫号码: + + span.tgreen + // <#if statusEvent??>${statusEvent.discaller!''} + li + | +被叫号码: + + // <#if statusEvent??>${statusEvent.discalled!''} + li + | +类型: + + // <#if statusEvent??>${statusEvent.calltype!''} + li + | +主叫方: + + // <#if statusEvent??>${statusEvent.host!''} + li + | +IP地址: + + // <#if statusEvent??>${statusEvent.ipaddr!''} + li + | +拨打时间: + + // <#if statusEvent??>${statusEvent.localdatetime!''} + // <#if mobileAddress??> + //
                                • + // 来电省份:${mobileAddress.province!''} + //
                                • + //
                                • + // 来电城市:${mobileAddress.city!''} + //
                                • + //
                                • + // 运营商:${mobileAddress.isp!''} + //
                                • + // + li + | +来电类型: + + // <#if extensionList?? && extensionList?size gt 0> + // 内线 + // <#else> + // 外线 + // + // <#list uKeFuDic["com.dic.callcenter.comment"] as comment> + // <#if statusEvent.satisfaction?? && comment.code== statusEvent.satisfaction > + //
                                • + // 满意度评价: ${comment.name} + //
                                • + //
                                • + // <#if statusEvent.satisfdate??>评价时间:${statusEvent.satisfdate?string('yyyy-MM-dd HH:mm:ss')} + //
                                • + // + // + li + | +满意度: + + // <#if statusEvent.satisfaction==null>未评价 + li(style='position: relative;') + | +标签: + + span#tags + // <#if tagRelationList??> + // <#list tagRelationList as tagRelation> + // <#if tags??> + // <#list tags as tag> + // <#if tag.id == tagRelation.tagid> + // ${tag.tag!''} + // + // + // + // + // + .ukefu-tag-add + a#tag(href='javascript:void(0)') + i.layui-icon  + dl.ukefu-tag-list.layui-anim.layui-anim-upbit#taglist + // <#if tags??> + // <#list tags as tag> + //
                                  ${tag.tag!''}
                                  + // + // + script. + + layui.use('layer', function() { + layer = layui.layer; + $('#tag').click(function() { + $('#taglist').show(); + }) + $('.tag-switch').click( + function() { + if ($('#tag_' + $(this).data("id")).length > 0) { + $('#tag_' + $(this).data("id")).remove(); + } else { + $("#tags").append( + "" + + $(this).data("name") + ""); + } + loadURL($(this).data("href")); + }); + $("#taglist").hover(null, function() { + $(this).hide(); + }); + }); + diff --git a/contact-center/app/src/main/resources/templates/apps/cca/channel/webim.html b/contact-center/app/src/main/resources/templates/apps/cca/channel/webim.html deleted file mode 100644 index 0653bee1..00000000 --- a/contact-center/app/src/main/resources/templates/apps/cca/channel/webim.html +++ /dev/null @@ -1,139 +0,0 @@ -
                                    -
                                  • - 访问渠道: - 在线客服 -
                                  • - -
                                  • - 服务小结: <#if summary??> - 已记录 - <#else> - 未记录 - -
                                  • - - <#if snsAccount??> -
                                  • - 接入网站:${snsAccount.name!''}(${snsAccount.baseURL!''}) -
                                  • - -
                                  • - 首次访问来源: - - ${onlineUser.source!''} - -
                                  • -
                                  • - 位置:${curagentuser.region!''} -
                                  • -
                                  • - 访问次数:${serviceCount!0}次 -
                                  • - <#if curagentuser.title?? && curagentuser.url??> -
                                  • - 进入页面:<#if curagentuser.title?length gt 15>${curagentuser.title[0..15]}<#else>${curagentuser.title} -
                                  • - -
                                  • - 访问轨迹: - 轨迹 - -
                                  • -
                                  • - 停留时间: - <#if onlineUser?? && onlineUser.betweentime??> - ${(onlineUser.betweentime/(1000*60*60))?string('00')}:${((onlineUser.betweentime%(1000*60*60))/(1000*60))?string('00')}:${((onlineUser.betweentime%(1000*60))/(1000))?string('00')} - -
                                  • -
                                  • - 访问浏览器: - ${onlineUser.browser!''} -
                                  • -
                                  • - 操作系统: - - <#if onlineUser.opersystem?? && onlineUser.opersystem == "windows"> - - <#elseif onlineUser.opersystem?? && onlineUser.opersystem == "linux"> - - <#elseif onlineUser.opersystem?? && onlineUser.opersystem == "mac"> - - - ${onlineUser.opersystem!''} - -
                                  • -
                                  • - 访问终端: - - <#if onlineUser.mobile?? && onlineUser.mobile == "1"> - 移动 - <#else> - PC - - -
                                  • -
                                  • - 标签: - - <#if tagRelationList??> - <#list tagRelationList as tagRelation> - <#if tags??> - <#list tags as tag> - <#if tag.id == tagRelation.tagid> - ${tag.tag!''} - - - - - - -
                                    - -
                                    - <#if tags??> - <#list tags as tag> - - <#assign tagValue = 0> - - <#if tagRelationList??> - <#list tagRelationList as tagRelation> - <#if tag.id == tagRelation.tagid> - <#assign tagValue = 1> - - - - -<#if tagValue == 1> -
                                    - ${tag.tag!''} - - -
                                    -<#assign tagValue = 1> -<#else> -
                                    - ${tag.tag!''} - - -
                                    -<#assign tagValue = 1> - - - - -
                                    -
                                    -
                                  • -
                                  - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/cca/channel/weixin.html b/contact-center/app/src/main/resources/templates/apps/cca/channel/weixin.html deleted file mode 100644 index 8e17b08f..00000000 --- a/contact-center/app/src/main/resources/templates/apps/cca/channel/weixin.html +++ /dev/null @@ -1,70 +0,0 @@ -
                                  - -
                                  -
                                    -
                                  • - 访问渠道: - 微信 -
                                  • - -
                                  • - 服务小结: <#if summary??> - 已记录 - <#else> - 未记录 - -
                                  • - - <#if snsAccount??> -
                                  • - 公众号:${snsAccount.name} -
                                  • - - -
                                  • - 昵称: - - ${weiXinUser.nickname!''} - -
                                  • -
                                  • - 国家:${weiXinUser.country!''} -
                                  • -
                                  • - 位置:${weiXinUser.province!''} ${weiXinUser.city!''} -
                                  • -
                                  • - 访问次数:${serviceCount!0}次 -
                                  • -
                                  • - 停留时间: - <#if curAgentService.servicetime??>${curAgentService.servicetime?string("yyyy-MM-dd HH:mm:ss")} -
                                  • - -
                                  • - 标签: - - <#if tagRelationList??> - <#list tagRelationList as tagRelation> - <#if tags??> - <#list tags as tag> - <#if tag.id == tagRelation.tagid> - ${tag.tag!''} - - - - - - -
                                    - -
                                    - <#if tags??> - <#list tags as tag> -
                                    ${tag.tag!''}
                                    - - -
                                    -
                                    -
                                  • -
                                  \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/cca/chatusers.html b/contact-center/app/src/main/resources/templates/apps/cca/chatusers.html deleted file mode 100644 index aa86d8c4..00000000 --- a/contact-center/app/src/main/resources/templates/apps/cca/chatusers.html +++ /dev/null @@ -1,48 +0,0 @@ -<#if agentUserList??> -<#list agentUserList as agentuser> -
                                • - - <#if agentuser.status?? && agentuser.status == 'end'> - <#if agentuser.channel?? && agentuser.channel == "weixin"> - - <#elseif agentuser.channel?? && agentuser.channel == "webim"> - - <#elseif agentuser.channel?? && agentuser.channel == "skype"> - - <#elseif agentuser.channel?? && agentuser.channel == "phone"> - - - <#else> - <#if agentuser.channel?? && agentuser.channel == "weixin"> - - <#elseif agentuser.channel?? && agentuser.channel == "webim"> - - <#elseif agentuser.channel?? && agentuser.channel == "skype"> - - <#elseif agentuser.channel?? && agentuser.channel == "phone"> - - - -
                                  -
                                  - ${agentuser.username!''} -
                                  -
                                  - <#if agentUser.servicetime??>${agentuser.servicetime?string('yyyy-MM-dd HH:mm:ss')}<#else>${agentuser.servicetime?string('yyyy-MM-dd HH:mm:ss')} - <#if agentuser.status?? && agentuser.status == 'end'> - 离开 - <#else> - 在线 - - -
                                  -
                                  -
                                  - ${agentuser.tokenum!0} -
                                  -
                                  -
                                • - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/cca/chatusers.pug b/contact-center/app/src/main/resources/templates/apps/cca/chatusers.pug new file mode 100644 index 00000000..9b316b8a --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/cca/chatusers.pug @@ -0,0 +1,46 @@ +if agentUserList + for agentuser in agentUserList + li(class={ + 'clearfix': true, + 'chat-list-item': true, + 'active': (curagentuser.id == agentuser.id) + }, id='agentuser_' + agentuser.userid, remove-id=agentuser.id, data-id=agentuser.userid) + a(href='/apps/cca/agentuser.html?id=' + agentuser.id + '&channel=' + agentuser.channel, data-toggle="load", data-target="#ukefu-chat-agent", onclick="$('.chat-list-item.active').removeClass('active');$(this).closest('li.chat-list-item').addClass('active');Proxy.cleanTopMsgTip(1) ;$('#last_msg_#{agentuser.userid}').text(0).hide();") + img(src=(agentuser.headimgurl && agentuser.headimgurl != '' ? agentuser.headimgurl : '/images/im/user.png'), style="width:45px;height:45px;") + if agentuser.status && agentuser.status == 'end' + if agentuser.channel && agentuser.channel == "weixin" + i.kfont.ukefu-channel-icon-end(id="tip_icon_wenxin_#{agentuser.userid}") + |  + else if agentuser.channel && agentuser.channel == "webim" + i.kfont.ukefu-channel-icon-end(id="tip_icon_webim_#{agentuser.userid}") + |  + else if agentuser.channel && agentuser.channel == "skype" + i.csfont.ukefu-channel-icon-end(id="tip_icon_skype_#{agentuser.userid}") + |  + else if agentuser.channel && agentuser.channel == "phone" + img.ukefu-channel-image(src="/images/cde-ico-gray.png", id="tip_icon_phone_#{agentuser.userid}") + else + if agentuser.channel && agentuser.channel == "weixin" + i.kfont.ukefu-channel-icon(id="tip_icon_wenxin_#{agentuser.userid}") + |  + else if agentuser.channel && agentuser.channel == "webim" + i.kfont.ukefu-channel-icon(id="tip_icon_webim_#{agentuser.userid}") + |  + else if agentuser.channel && agentuser.channel == "skype" + i.csfont.ukefu-channel-icon(id="tip_icon_skype_#{agentuser.userid}") + |  + else if agentuser.channel && agentuser.channel == "phone" + img.ukefu-channel-image(src="/images/phone-ico.png", id="tip_icon_phone_#{agentuser.userid}") + .dialog-info + .address + span(style="width:90px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-wrap: break-word;word-break: break-all;") + | #{agentuser.username} + .news + | #{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', agentuser.servicetime)} + if agentuser.status && agentuser.status == 'end' + small.label.bg-gray.pull-right(id="tip_message_#{agentuser.userid}") 离开 + else + small.label.bg-green.pull-right(id="tip_message_#{agentuser.userid}") 在线 + .last-msg + small.ukefu-badge.bg-red(id="last_msg_#{agentuser.userid}",style="#{(agentuser.tokenum == 0 || (curagentuser && curagentuser.id == agentuser.id)) ? 'display:none' : ''}") + | #{agentuser.tokenum ? agentuser.tokenum : 0} diff --git a/contact-center/app/src/main/resources/templates/apps/cca/contacts.html b/contact-center/app/src/main/resources/templates/apps/cca/contacts.html deleted file mode 100644 index 380fee8a..00000000 --- a/contact-center/app/src/main/resources/templates/apps/cca/contacts.html +++ /dev/null @@ -1,48 +0,0 @@ -<#if contacts??> -
                                    -
                                  • - 姓名:${contacts.name!''} -
                                  • -
                                  • - 性别: <#if contacts.gender?? && contacts.gender == '1'>男 - <#if contacts.gender?? && contacts.gender == '0'>女 - <#if contacts.gender?? && contacts.gender == '-1'>未知 -
                                  • -
                                  • - 生日:${contacts.cusbirthday!''} -
                                  • -
                                  • - 电话:${contacts.phone!''} -
                                  • -
                                  • - 手机:${contacts.mobileno!''} -
                                  • -
                                  • - 邮件:${contacts.email!''} -
                                  • -
                                  • - skypename: ${contacts.skypeid!''} -
                                  • -
                                  • - 地址:${contacts.address!''} -
                                  • -
                                  • - 类型:${uKeFuDic[contacts.ckind!''].name!''} -
                                  • - <#if contacts?? && contacts.touchtime??> -
                                  • - 获得时间:${contacts.touchtime?string('yyyy-MM-dd')} -
                                  • - -
                                  • - 备注:${contacts.memo!''} -
                                  • -
                                  -<#if models?seq_contains("workorders")> - - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/cca/index.pug b/contact-center/app/src/main/resources/templates/apps/cca/index.pug new file mode 100644 index 00000000..b49f61c1 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/cca/index.pug @@ -0,0 +1,56 @@ +extends /apps/include/layout.pug + +block append head + link(rel='stylesheet', href='/js/ztree/zTreeStyle/zTreeStyle.css') + script(src='/js/ztree/jquery.ztree.all.min.js') + script(src='/js/lodash-4.17.4.min.js') + script(src='/js/CSKeFu_Rest_Request.v1.js') + script. + cususerid = '#{user.id}'; +// <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> +block content + include templates/tpl.pug + #ccaIndex(style='height: 100%') + if !agentUserList.empty() + .layui-side.layui-bg-black.layui-left-black.cskefu-cca-leftside(style="height:100%") + #agentuserscca.layui-side-scroll + include agentusers.pug + #ukefu-chat-agent.layui-body.ukefu-chat-agent + //if curagentuser.channel == "phone" + // include mainagentuser_callout.pug + //else if curagentuser.channel == "skype" + // include mainagentuser_skype.pug + //else + include mainagentuser.pug + else + .layui-layout.layui-layout-content(style='height: 100%;') + .box.default-box(style='height: 100%;') + .box-body.ukefu-im-theme + .ukefu-empty(style='background: none') + i.layui-icon  + div 还没有任何对话 + if !agentUserList.empty() + script(language="javascript"). + $(document).ready(function () { + $(document).bind("keydown", "Ctrl+return", function (ev) { + sendMessage(); + return false; + }) + }); + function otherTopicSearch() { + console.log("otherTopicSearch") + loadURLWithTip("/agent/other/topic.html?q=" + encodeURIComponent($("#otherSearchQuery").val()), "#topiclist", null, false, true); + } + function otherTopicEnter() { + if (window.event.keyCode == 13) { + otherTopicSearch(); + } + } + function cleanTopMsgTip(tip) { + var lastMsgNum = $(tip).find('.last-msg').text(); + if (lastMsgNum) { + var num = Number.parseInt(lastMsgNum); + Proxy.cleanTopMsgTip(num) + } + } + diff --git a/contact-center/app/src/main/resources/templates/apps/cca/mainagentuser.html b/contact-center/app/src/main/resources/templates/apps/cca/mainagentuser.html deleted file mode 100644 index 07a5b9bd..00000000 --- a/contact-center/app/src/main/resources/templates/apps/cca/mainagentuser.html +++ /dev/null @@ -1,811 +0,0 @@ - - -
                                  -
                                  -

                                  -
                                  <#if curagentuser??>${curagentuser.username!''}<#if curagentuser.region??> ( ${curagentuser.region!''}
                                  - - <#else> - -

                                  -
                                  - <#if agentUserMessageList?? && agentUserMessageList.content??> - <#list agentUserMessageList.content?reverse as chatmessage> -
                                  -
                                  - -
                                  - - <#if (chatmessage.islabel == true??)><#else>စ - - - <#if chatmessage?? && chatmessage.calltype?? && chatmessage.calltype == '呼出'> - ${chatmessage.intervented?string(chatmessage.supervisorname,chatmessage.username)} - <#else> - ${chatmessage.username!''} - - ${chatmessage.createtime?string('yyyy-MM-dd HH:mm:ss')} - - <#if (chatmessage.islabel == true??)><#else>စ - -
                                  -
                                  - -
                                  <#include "/apps/agent/media/message.html">
                                  -
                                  -
                                  -
                                  - -<#elseif curagentuser??> -<#if curagentuser.status?? && curagentuser.status == "end"> -
                                  - 用户“${curagentuser.username!''}”已经离开 -
                                  -<#else> -
                                  - 用户“${curagentuser.username!''}”开始对话 -
                                  - - -
                                  -
                                  -
                                  - -
                                  -
                                  - - - - -
                                  -
                                  -
                                  -
                                  -
                                  -
                                  -
                                  -
                                  -
                                    -
                                  • 访客
                                  • - <#if ccaAisuggest?? && ccaAisuggest == true> -
                                  • - 智能机器人 - -
                                  • - -
                                  • 历史
                                  • -
                                  • 搜索历史消息
                                  • - <#if models?seq_contains("workorders")> -
                                  • 工单
                                  • - - <#if sessionConfig?? && sessionConfig.otherquickplay?? && sessionConfig.otherquickplay == true> -
                                  • 知识库
                                  • - -
                                  -
                                  -
                                  -
                                  -
                                  -

                                  - 访问信息 -
                                  - <#if user?? && user.admin?? && user.admin == true> - - -
                                  -

                                  -
                                  -
                                  - <#if curagentuser.channel?? && curagentuser.channel == "webim"> - <#include "/apps/agent/channel/webim.html"> - <#elseif curagentuser.channel?? && curagentuser.channel == "weixin"> - <#include "/apps/agent/channel/weixin.html"> - <#elseif curagentuser.channel?? && curagentuser.channel == "skype"> - <#include "/apps/agent/channel/skype.html"> - - <#if curagentuser.name??> -
                                    -
                                  • - 姓名: - - ${curagentuser.name!''} - -
                                  • - <#if curagentuser.phone??> -
                                  • - 电话: - - ${curagentuser.phone!''} - -
                                  • - - <#if curagentuser.email??> -
                                  • - 邮件: - - ${curagentuser.email!''} - -
                                  • - - <#if curagentuser.resion??> -
                                  • - 来访原因: - - ${curagentuser.resion!''} - -
                                  • - -
                                  - - <#if curAgentService?? && curAgentService.trans?? && curAgentService.trans> -
                                    -
                                  • - 转接: - - - -
                                  • - <#if curAgentService.transtime??> -
                                  • - 转接时间: - - ${curAgentService.transtime?string("yyyy-MM-dd HH:mm:ss")} - -
                                  • - - <#if curAgentService.transmemo??> -
                                  • - 转接附言: - - ${curAgentService.transmemo!''} - -
                                  • - - -
                                  - -
                                  -
                                  -<#if models?seq_contains("contacts")> -
                                  -
                                  -

                                  - 联系人 -
                                  - -
                                  -

                                  -
                                  -
                                  - <#include "/apps/agent/contacts.html"> -
                                  -
                                  - -
                                  - -<#if ccaAisuggest?? && ccaAisuggest == true> -
                                  -
                                  -
                                  -

                                  - 知识库快捷 -

                                  -
                                  -
                                  -
                                    -
                                  • -
                                    - -
                                    未触发知识库查询
                                    -
                                    -
                                  • -
                                  -
                                  -
                                  -
                                  - - - -
                                  -
                                  -
                                  -

                                  -
                                  -
                                  - -

                                  全部

                                  -
                                  -
                                  - -

                                  标注

                                  -
                                  -
                                  - - -

                                  -

                                  -
                                  - -
                                  -
                                  - -
                                  -

                                  请输入搜索内容

                                  -
                                  - - -
                                  -
                                    -
                                  -
                                  -
                                  -
                                  -<#if models?seq_contains("workorders")> -
                                  - <#if workOrdersList?? && workOrdersList?size gt 0> - <#include "/apps/agent/workorders.html"> - -
                                  - -<#if sessionConfig?? && sessionConfig.otherquickplay?? && sessionConfig.otherquickplay == true> -
                                  -
                                  -
                                  -

                                  - 知识列表 - -
                                  - - -
                                  -
                                  -

                                  -
                                  -
                                  - <#include "/apps/agent/othertopic.html"> -
                                  -
                                  -
                                  - -
                                  -
                                  - -
                                  -
                                  -
                                  - - diff --git a/contact-center/app/src/main/resources/templates/apps/cca/mainagentuser.pug b/contact-center/app/src/main/resources/templates/apps/cca/mainagentuser.pug new file mode 100644 index 00000000..f29a6907 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/cca/mainagentuser.pug @@ -0,0 +1,690 @@ +script(language='javascript'). + cursession = '#{curagentuser.userid}'; + var userid = '#{curagentuser.userid}', + agentserviceid = '#{curagentuser.agentserviceid}', + agentuserid = '#{curagentuser.id}', + isCcaAisuggest = '#{ccaAisuggest}'; +.main-agentuser + .chat-agent + h1.site-h1 + if curagentuser + div(style="width:250px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-wrap: break-word;word-break: break-all;") + | #{curagentuser.username} #{curagentuser.channel != "messenger" ? "(" + curagentuser.region + ")" : ""} + .ukefu-service-btn(style="float:right;") + a(href="/apps/cca/transfer.html?userid=" + curagentuser.userid + "&agentserviceid=" + curagentuser.agentserviceid + "&agentuserid=" + curagentuser.id + "&agentnoid=" + curagentuser.agentno, data-toggle="ajax", data-width="750", data-height="550", title="选择转接对象") + button.layui-btn.layui-btn-small + i.kfont  + | 转接坐席 + #chat_msg_list_cca.chat-message.chat_msg_list(style='position: relative') + if agentUserMessageList && agentUserMessageList.content + for chatmessage in pugHelper.reverse(agentUserMessageList.content) + .clearfix.chat-block(name=chatmessage.createtime) + div(class=(chatmessage.calltype && chatmessage.calltype == '呼出' ? 'chat-right' : 'chat-left')) + img.user-img(alt="", src=(chatmessage.calltype && chatmessage.calltype == '呼出' ? '/images/agent.png' : curagentuser.headimgurl && curagentuser.headimgurl != '' ? curagentuser.headimgurl : '/images/im/user.png'), style="width:45px;height:45px;") + .chat-message + span(class=(chatmessage.calltype && chatmessage.calltype == '呼出' ? 'rateright' : 'rateleft')) + i.layui-icon.iconclick(id=chatmessage.id, name=(chatmessage.islabel == true ? 'yeslabe' : 'nolabe'), style="font-size:30px;cursor:pointer;color: #{chatmessage.islabel == true ? '#46cad4' : '#aaaaaa'}") + | #{chatmessage.islabel == true ? '' : 'စ'} + span.user + if chatmessage && chatmessage.calltype && chatmessage.calltype == '呼出' + if chatmessage.intervented + | #{chatmessage.supervisorname} + else + | #{chatmessage.username} + else + | #{chatmessage.username} + span.time= pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', chatmessage.createtime) + span(class=(chatmessage.calltype && chatmessage.calltype == '呼出' ? 'rateleft' : 'rateright'), style="cursor: pointer; font-size: 30px") + i.layui-icon.iconclick(id=chatmessage.id, name=(chatmessage.islabel == true ? 'yeslabe' : 'nolabe'), style="cursor:pointer;font-size:30px;color: #{chatmessage.islabel == true ? '#46cad4' : '#aaaaaa'}") + | #{chatmessage.islabel == true ? '' : 'စ'} + div(class=(chatmessage.calltype && chatmessage.calltype == '呼出' ? 'chatting-right' : 'chatting-left')) + i.userarrow + .chat-content + include /apps/agent/media/message.pug + else if curagentuser + if curagentuser.status && curagentuser.status == "end" + #agentuser-curstatus.clearfix.chat-block.connect-end + span.connect-message 用户#{curagentuser.username}已经离开 + else + #agentuser-curstatus.clearfix.chat-block.connect-begin + span.connect-message 用户#{curagentuser.username}开始对话 + .chat-bottom + #ccaAgentAnswer(style='width: 50%;min-width:310px;height: 180px;border: 1px solid #eee;position: absolute;top: -180px;right:0px;background: #ffffff;display: none') + h1.site-h1(style='background-color:#EEEEEE;padding: 0px 10px') + | 知识库联想 + i.layui-icon(style='position: absolute;top: 0px;right: 5px;font-size:16px;z-index: 10', onclick='showOrHide(\'none\')') ဆ + div(style='width: calc(100% - 19px);height: 129px;position: absolute;top: 31px;overflow-y: scroll;padding: 10px 10px') + ul.info-list.ukefu-quick-reply#ccaQuickReplyAgentBox(style='width: 100%;height: auto'). + .row + .col-lg-12 + textarea#message(name='message') + button.send-btn(type='button', onclick='sendInterventionEvent()') + | 发送 + style. + .ke-container { + border: 0px solid #E0E0E0 !important; + } + script(language='javascript'). + var editor, layer; + $(document).ready(function () { + // KindEditor.ready(function(K) { + var K = KindEditor; + editor = K.create('#message', { + height: "160px", + themeType: 'simple', + width: "100%", + items: ['emoticons', 'image', 'insertfile'], + resizeType: 0, + uploadJson: "/agent/image/upload.html?id=" + '#{curagentuser.id}', + allowFileManager: false, + newlineTag: "br", + fontsize: 16, + allowFileUpload: true, + allowInsertUpload: false, //增加的参数,上传图片后是否插入到当前区域 + allowImageRemote: false, + afterUpload: function (url) { + return false; + }, + afterCreate: function () { //设置编辑器创建后执行的回调函数 + var self = this; + + if ('#{sessionConfig}' && '#{sessionConfig.agentctrlenter}' && '#{sessionConfig.agentctrlenter}' == true) { + //Ctrl+Enter提交表单 + K.ctrl(document, 13, function () { + self.sync(); + sendInterventionEvent(); + }); + K.ctrl(self.edit.doc, 13, function () { + self.sync(); + sendInterventionEvent(); + }); + } else { + var kindEditorIframe = $("iframe").contents().find("body"); + kindEditorIframe.keydown(function (event) { + if (event.keyCode == 13 && !event.ctrlKey) { + self.sync(); + sendInterventionEvent(); + return false; + } else if (event.keyCode == 13 && event.ctrlKey) { + editor.insertHtml('
                                  '); + } + }); + //Ctrl+Enter提交表单 + K.ctrl(document, 13, function () { + editor.insertHtml('
                                  '); + }); + K.ctrl(self.edit.doc, 13, function () { + editor.insertHtml('
                                  '); + }); + } + if ('#{sessionConfig && sessionConfig.enablequick}') { + /** + var _self = this; + loadURL("/res/quickreply.html" , null , function(data){ + $(_self).suggest('@', { + data: eval(data), + mapkey: ['title', 'id'], + map: function (topic) { + console.log(topic); + return { + value: topic.text, + text: '

                                  ' + topic.text + '

                                  ' + } + } + }); + }); + **/ + } + } + }); + // }); + KindEditor.options.cssData = "body {font - size: 15px; font-family:'Microsoft Yahei', 'Helvetica', 'Simsun', 'Arial';}"; + var agentEnterInput = $("iframe").contents().find("body"); + agentEnterInput.keyup(function (event) { + if (isCcaAisuggest && isCcaAisuggest == "true") { + debouncefun(); + } + }) + var debouncefun = _.debounce(agentQuickReply, 500) + + function agentQuickReply() { + restApiRequest({ + silent: true, + path: 'chatbot', + data: { + ops: 'faq', + snsaccountid: "#{curagentuser.appid}", + userId: "#{curagentuser.userid}", + textMessage: editor.html() + } + }).then(function (result) { + if (result.rc === 0) { + if (result.data.length > 0) { + $("#ccaQuickReplyAgentBox").html(""); + $.each(sortByKey(result.data, 'score'), function (j, n) { + var answerList = result.data[j].replies; + var answer; + for (var i = 0; i < answerList.length; i++) { + if (answerList[i].rtype == 'plain' && answerList[i].enabled == true) { + answer = answerList[i] + break; + } + } + if (answer) { + var li = '
                                • \n' + + '
                                  问题:' + result.data[j].post + '
                                  \n' + + '
                                  \n' + + '

                                  答案:' + answer.content + '

                                  \n' + + ' \n' + + '
                                  \n' + + '
                                • ' + $("#ccaQuickReplyAgentBox").append(li); + } + if (i > 4) { + return false; + } + }); + showOrHide('block') + } else { + showOrHide('none') + } + } else { + showOrHide('none') + } + }, function (error) { + console.log("error", error); + // 服务器异常 + top.layer.msg('服务器抽风,请稍后再试!', {icon: 2, time: 3000}) + }) + } + }); +.ukefu-chat-prop + .ukefu-prop-list + .layui-side-scroll + .layui-tab(style='margin-top:0px;') + ul.layui-tab-title + li.layui-this 访客 + if ccaAisuggest && ccaAisuggest == true + li#robot(onclick="$('#dot').css('display','none')") + span 智能机器人 + span#dot(style=" width: 7px;height: 7px;background: red;-moz-border-radius: 50%;-webkit-border-radius: 50%;border-radius: 50%;position: absolute;top: 5px;display: none") + li 历史 + li 搜索历史消息 + .layui-tab-content(style='padding: 5px 0px 0px;') + .layui-tab-item.layui-show + .box + .box-title + h1.site-h1(style='background-color:#EEEEEE;') + | 访问信息 + div(style='float:right;') + if user && user.admin && user.admin == true + button.layui-btn.layui-btn-small.layui-btn-radius.layui-btn-danger(href='/agent/blacklist/add.html?userid=#{curagentuser.userid}&agentserviceid=#{curagentuser.agentserviceid}&agentuserid=#{curagentuser.id}×=#{serviceCount ? serviceCount : 0}&chattime=#{(onlineUser && onlineUser.betweentime ? onlineUser.betweentime : 0)}', data-toggle='ajax', data-title='拉黑访客', data-width='900') 拉黑访客 + + .box-body(style='padding:0px 10px;position: relative;') + if curagentuser.channel && curagentuser.channel == "webim" + include /apps/agent/channel/webim.pug + else if curagentuser.channel && curagentuser.channel == "messenger" + include /apps/agent/channel/messenger.pug + //else if curagentuser.channel && curagentuser.channel == "skype" + // include /apps/agent/channel/skype.pug + if curagentuser.name + ul.info-list + li + | 姓名: + span.tgreen + = curagentuser.name + if curagentuser.phone + li + | 电话: + span.tgreen + = curagentuser.phone + if curagentuser.email + li + | 邮件: + span.tgreen + = curagentuser.email + if curagentuser.resion + li + | 来访原因: + span.tgreen + = curagentuser.resion + if curAgentService && curAgentService.trans && curAgentService.trans == true + ul.info-list + li + | 转接: + span.tgreen + i.layui-icon(style="color:#19a55d;")  + if curAgentService.transtime + li + | 转接时间: + span.tgreen + | #{pugHelper.formatDate('HH:mm:ss', curAgentService.transtime)} + if curAgentService.transmemo + li + | 转接附言: + span.tgreen + = curAgentService.transmemo + if models.contains("contacts") + .box + .box-title + h1.site-h1(style="background-color:#EEEEEE;") + | 联系人 + div(style="float:right;") + button.layui-btn.layui-btn-small.layui-btn-normal(href="/apps/contacts/embed/index.html?userid=#{curagentuser.userid}&agentserviceid#{curagentuser.agentserviceid}&agentuserid=#{curagentuser.id}×=#{(serviceCount ? serviceCount : 0)}&chattime=#{(onlineUser && onlineUser.betweentime ? onlineUser.betweentime : 0)}", data-toggle="ajax", title="请选择联系人", data-width="950", data-height="500") 关联联系人 + #ukefu_contacts_info.box-body(style="padding:0px 10px;") + include /apps/agent/contacts.pug + if ccaAisuggest && ccaAisuggest == true + .layui-tab-item + .box + .box-title + h1.site-h1(style="background-color:#EEEEEE;") + | 知识库快捷 + .box-body(style="padding:0px 10px;") + ul#ccaQuickReplyBox.info-list.ukefu-quick-reply + li(style="list-style: none;background-image: url();padding: 50px 0 50px;") + .ukefu-empty(style="background: none") + i.layui-icon  + div(style="") 未触发知识库查询 + .layui-tab-item + .box + .box-title + h1.site-h1(style="background-color:#EEEEEE;") + | 历史记录 + .box-body(style="padding:0px 10px;") + ul.info-list.ukefu-quick-reply + if agentServiceList && !agentServiceList.empty() + for agentService in agentServiceList + li.ukefu-agentservice-list + a(href="/service/online/chatmsg.html?id=" + agentService.id + "&title=false", data-toggle="ajax", data-width="950", data-height="500", data-title="服务记录") + span.quick-reply(style="overflow: hidden;text-overflow: ellipsis;white-space:nowrap;max-width:48%;display: inline-block;", data-id="content_" + agentService.id, title=agentService.username)= agentService.username + .ukefu-agentservice-his(style="overflow: hidden;text-overflow: ellipsis;white-space:nowrap;max-width:48%;", title=agentService.agentusername) 坐席:#{agentService.agentusername} + div(style="color:#333;position: relative;") + | #{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', agentService.servicetime)} + .ukefu-agentservice-his + | 时长:#{pugHelper.padRight(agentService.sessiontimes / (1000 * 60 * 60), "00")}:#{pugHelper.padRight((agentService.sessiontimes % (1000 * 60 * 60)) / (1000 * 60), "00")}:#{pugHelper.padRight((agentService.sessiontimes % (1000 * 60)) / (1000), "00")} + else + li(style="list-style: none;background-image: url();padding: 50px 0 50px;") + .ukefu-empty(style="background: none") + i.layui-icon  + div(style="") 还没有咨询记录 + .layui-tab-item + .box + .box-title + h1.site-h1(style='background-color:#ffffff;') + div(style='width:60%;height:40px;margin:0 auto ;display: -webkit-flex;display: flex;-webkit-justify-content:space-between;justify-content: space-between;') + #all.unselected(style='margin-top: 5px;height:30px;') + i.layui-icon(style='cursor: pointer;font-size:18px; float: left;margin:0 2px;')  + p(style='line-height: 30px') 全部 + #searchlabel.unselected(style='margin-top: 5px;height:30px;') + i.layui-icon(style='cursor: pointer;font-size:18px; float: left;margin:0 2px;') စ + p(style='line-height: 30px') 标注 + .searchbox(style='width: 300px;height:30px;border-radius: 5px;background:#f2f3f5; margin: 0 auto 10px;clear: both;border: 1px solid rgb(210, 210, 210);overflow: hidden;') + i#search.csfont(style='cursor: pointer;float: left;margin:0 0 0 50px;font-size: 24px;color: #757575')  + input#searchconter(style='width: 150px;height: 30px;border: none;background:#f2f3f5;', type='text', name='title', required, lay-verify='required', placeholder=' 请输入搜索内容', autocomplete='off') + #searchSubmit(style='cursor:pointer') 搜索 + #nothing(style='margin-top: 150px') + div(style='width: 120px;height: 120px;margin: 0 auto') + i.csfont(style='font-size: 120px;color:#00a65a')  + p#nothingTxt(style='text-align: center;color: #7e8790') 请输入搜索内容 + // ${agentUserMessageNum!''} + .box-body(style='padding:0px 10px;margin-top: 20px') + ul.info-list.ukefu-quick-reply#searchlist. +style. + .layui-flow-more { + position: absolute; + top: 0; + left: 45%; + } + + .chat-left .chat-message .rateright { + display: inline-block; + } + + .chat-left .chat-message .rateleft { + display: none; + } + + .chat-right .chat-message .rateright { + display: inline-block; + } + + .chat-right .chat-message .rateleft { + display: none; + } + + #numSearches { + text-align: left; + clear: both; + color: #7e8790; + margin-left: 10px; + } + + #numSearches span { + color: #000; + } + + #searchSubmit { + float: right; + width: 50px; + background: #25c571; + text-align: center; + color: #fff; + } + + .unselected { + margin-left: 10px; + width: 55px; + height: 30px; + float: left; + font-size: 16px; + text-align: center; + line-height: 30px; + color: #fff; + border-radius: 5px; + font-weight: 400; + } + + .unselected i, .unselected p { + color: #000; + } + + .selected i, .selected p { + color: #00a65a; + font-weight: bold; + } + + .nowrap { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + width: calc(100% - 40px); + } + +script. + if (#{models.contains("chatbot")}) { + $(document).ready(function () { + if (isCcaAisuggest && isCcaAisuggest == "true") { + switchQuickReply(); + } + }) + } + + chatScorllBottom('chat_msg_list_cca'); + layui.use('element', function () { + var element = layui.element(); + }); + layui.use('layer', function () { + layer = layui.layer; + $('#tag').click(function () { + $('#taglist').show(); + }) + $('.tag-switch').click( + function () { + if ($('#tag_' + $(this).data("id")).length > 0) { + $('#tag_' + $(this).data("id")).remove(); + } else { + $("#tags").append( + "" + + $(this).data("name") + ""); + } + loadURL($(this).data("href")); + }); + $("#taglist").hover(null, function () { + $(this).hide(); + }); + $('.quick-reply').click(function () { + var target = $(this).data("id"); + if ($('#' + target).is(":hidden")) { + $('#' + target).show(); + } else { + $('#' + target).hide(); + } + }); + $('.quick-reply-content').click(function () { + if (editor != null) { + var quickReply = $(this).html(); + if (editor.count("text") == 0) { + editor.html(quickReply); + } else { + top.layer.confirm("您已经输入了内容,覆盖当前输入框中内容?", {icon: 3, title: '覆盖提示'}, function (index) { + top.layer.close(index); + editor.html(quickReply); + }); + } + } + }); + }); + + // 发送会话监控干预消息 + function sendInterventionEvent() { + editor.sync(); + var count = editor.count("text"); + if (count > 0) { + var message = document.getElementById('message').value; + top.WebIM.sendIntervention("#{user.id}", "#{curagentuser.id}", "#{user.sessionid}", "text", message); + } + editor.html(''); + showOrHide('none'); + }; + + function chooseAnswer(data) { + editor.html(data) + } + + function showOrHide(data) { + $("#ccaAgentAnswer").css("display", data) + } + + // 排序 + function sortByKey(array, key) { + return array.sort(function (a, b) { + var x = a[key]; + var y = b[key]; + return ((x < y) ? -1 : ((x > y) ? 1 : 0)); + }); + } + + function switchQuickReply() { + var hatContentHtml = $("#chat_msg_list_cca .chat-block").last().find(".chatting-left .chat-content").html(); + if ($.trim(hatContentHtml)) { + restApiRequest({ + silent: true, + path: 'chatbot', + data: { + ops: 'faq', snsaccountid: '#{curagentuser.appid}', + userId: "#{curagentuser.userid}", + textMessage: hatContentHtml + } + }).then(function (result) { + if (result.rc === 0) { + if (result.data.length > 0) { + $("#ccaQuickReplyBox").html(""); + $.each(sortByKey(result.data, 'score'), function (j, n) { + var answerList = result.data[j].replies; + var answer; + for (var i = 0; i < answerList.length; i++) { + if (answerList[i].rtype == 'plain' && answerList[i].enabled == true) { + answer = answerList[i] + break; + } + } + if (answer) { + var li = '
                                • \n' + + '
                                  问题:' + result.data[j].post + '
                                  \n' + + '
                                  \n' + + '

                                  答案:' + answer.content + '

                                  \n' + + ' \n' + + '
                                  \n' + + '
                                • ' + $("#ccaQuickReplyBox").append(li); + } + if (i > 4) { + return false; + } + }); + if (!$("#robot").hasClass('layui-this')) { + $("#dot").css("display", "inline-block") + } + } else { + $("#dot").css("display", "none") + $("#ccaQuickReplyBox").html('
                                • \n' + + '
                                  \n' + + ' \n' + + '
                                  在知识库中未得到相关问题
                                  \n' + + '
                                  \n' + + '
                                • '); + } + } + }, function (error) { + console.log("error", error); + // 服务器异常 + top.layer.msg('服务器抽风,请稍后再试!', {icon: 2, time: 3000}) + }) + } + } + + $("#searchconter").keyup(function (event) { + if (event.keyCode == 13) { + $("#search").click(); + } + }); + + var current = 0; + + var pieces = 0; + + var searchSwitch = false; + $("#searchconter").focus(function () { + $(this).attr('placeholder', ' ') + $(".searchbox").css({"border": "1px solid #3b99fc", 'box-shadow': ' 0 0 3px 0 #3b99fc'}); + $("#search").css('margin-left', '20px'); + }); + + $("#searchconter").blur(function () { + $(this).attr('placeholder', ' 请输入搜索内容') + $(".searchbox").css({"border": "1px solid #d2d2d2", 'box-shadow': 'none'}); + $("#search").css('margin-left', '50px'); + }); + + $('#searchSubmit').click(function () { + $("#search").click(); + }) + + function search(conditionalParameter) { + $.ajax({ + url: '/agent/agentusersearch.html', + data: {'search': $('#searchconter').val(), 'id': '#{curagentuser.id}', 'condition': conditionalParameter}, + type: "post", + success: function (data) { + $('#searchlist').html(data); + var pieces = $('#numSearches').html() + if (pieces > 0) { + $('#nothing').css('display', 'none') + $('.chatblock').click(function () { + $.ajax({ + url: '/agent/agentusersearchdetails.html', + data: { + 'createtime': $(this).attr('name'), + 'id': '#{curagentuser.id}', + 'thisid': $(this).attr('id') + }, + type: "post", + success: function (data) { + $('.chat-block').remove(); + $('#chat_msg_list_cca').prepend(data); + var element = document.getElementById("agentusersearchdetails"); + element.scrollIntoView(); + current = parseInt($('#numSearches').html()) - 11 + } + }); + }) + } else if (pieces == 0) { + $('#nothingTxt').html('无"' + $('#searchconter').val() + '"搜索结果') + $('#nothing').css('display', 'block') + } + } + }); + } + + // 点击全部 + $('#all').click(function () { + searchSwitch = false; + search('all') + $('#searchlabel .layui-icon').html('စ') + $("#searchlabel").removeClass('selected') + $("#all").addClass('selected') + }) + //点击标注 + $('#searchlabel').click(function () { + searchSwitch = !searchSwitch; + if (searchSwitch) { + $('#searchlabel .layui-icon').html('') + $("#all").removeClass('selected') + $("#searchlabel").addClass('selected') + search('label') + } else { + $('#searchlabel .layui-icon').html('စ') + $("#searchlabel").removeClass('selected') + $("#all").addClass('selected') + search('all') + } + + }) + //点击搜索 + $('#search').click(function () { + if (searchSwitch) { + $('#searchlabel .layui-icon').html('') + $("#searchlabel").addClass('selected') + $("#all").removeClass('selected') + search('label') + } else { + $("#all").addClass('selected') + search('all') + } + }) + + layui.use('flow', function () { + var flow = layui.flow; + flow.load({ + elem: '#chat_msg_list_cca' //流加载容器 + , scrollElem: '#chat_msg_list_cca' //流加载容器 + , end: '没有更多了' + , isAuto: false + , done: function (page, next) { //执行下一页的回调 + //模拟数据插入 + current += 20; + setTimeout(function () { + var lis = []; + var pages = 0; + $.ajax({ + url: '/agent/agentuserpage.html', + data: {'current': current, 'id': '#{curagentuser.id}'}, + type: "post", + success: function (data) { + var element = document.getElementsByClassName("chat-block")[0]; + if (page != 1) { + element.scrollIntoView(); + } + lis = lis + data; + $('#chat_msg_list_cca').prepend(data) + } + }); + //执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页 + //pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多 + pages = '#{agentUserMessageList.totalElements}' / 20 + next(lis.join(''), page < pages); //假设总页数为 10 + }, 500); + } + }); + + }); + $('#ccaQuickReplyAgentBox').on('click', '.chooseAnswer', function () { + editor.html($(this).data('title')) + }); + + $('#ccaQuickReplyBox').on('click', '.chooseAnswer', function () { + editor.html($(this).data('title')) + }); + diff --git a/contact-center/app/src/main/resources/templates/apps/cca/mainagentuser_callout.html b/contact-center/app/src/main/resources/templates/apps/cca/mainagentuser_callout.html deleted file mode 100644 index 83190d31..00000000 --- a/contact-center/app/src/main/resources/templates/apps/cca/mainagentuser_callout.html +++ /dev/null @@ -1,378 +0,0 @@ - - -
                                  -
                                  -

                                  - <#if curagentuser??>${curagentuser.username!''}(${curagentuser.region!''}) - - <#else> -   - -

                                  - <#if contacts?? && curagentuser??> - <#include "/apps/agent/calloutcontact/edit.html"> - <#else> - <#include "/apps/agent/calloutcontact/add.html"> - -
                                  -
                                  -<#if contacts?? && curagentuser??> - - -
                                  -
                                  -
                                  -
                                  -
                                  -

                                  往来历史

                                  -
                                  -
                                  -
                                  - - -
                                  -
                                  -
                                  -
                                  -
                                  -
                                  - - - -<#else> -
                                  -
                                  -
                                  -
                                  -
                                    -
                                  • 访客
                                  • -
                                  • 历史
                                  • -
                                  -
                                  -
                                  -
                                  -
                                  -

                                  - 访问信息 -
                                  - -
                                  -

                                  -
                                  -
                                  - <#include "/apps/agent/channel/phone.html"> - <#if curagentuser.name??> -
                                    -
                                  • - 姓名: - - ${curagentuser.name!''} - -
                                  • - <#if curagentuser.phone??> -
                                  • - 电话: - - ${curagentuser.phone!''} - -
                                  • - - <#if curagentuser.email??> -
                                  • - 邮件: - - ${curagentuser.email!''} - -
                                  • - - <#if curagentuser.resion??> -
                                  • - 来访原因: - - ${curagentuser.resion!''} - -
                                  • - -
                                  - - <#if curAgentService?? && curAgentService.trans?? && curAgentService.trans> -
                                    -
                                  • - 转接: - - - -
                                  • - <#if curAgentService.transtime??> -
                                  • - 转接时间: - - ${curAgentService.transtime?string("yyyy-MM-dd HH:mm:ss")} - -
                                  • - - <#if curAgentService.transmemo??> -
                                  • - 转接附言: - - ${curAgentService.transmemo!''} - -
                                  • - - -
                                  - -
                                  -
                                  -
                                  - -
                                  -
                                  - -
                                  -
                                  -
                                  - diff --git a/contact-center/app/src/main/resources/templates/apps/cca/mainagentuser_callout.pug b/contact-center/app/src/main/resources/templates/apps/cca/mainagentuser_callout.pug new file mode 100644 index 00000000..7eeccbb5 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/cca/mainagentuser_callout.pug @@ -0,0 +1,362 @@ +//- + 原始 Freemarker 文件位置:https://gitlab.chatopera.com/chatopera/cskefu/blob/760e130e770a96a43e8f6f2c8a1eb0885c0bbf90/contact-center/app/src/main/resources/templates/apps/cca/mainagentuser_callout.html + 该页面项目中暂时没有使用,此处是没有完全转化的 Pug 文件 + 如果提供这个页面,需要参考 Freemarker 原文件完成转化或参考实现 + +html + head + script(language='javascript'). + + cursession = "<#if curagentuser??>${curagentuser.userid!''}" ; + var userid = "${curagentuser.userid!''}" , agentserviceid = "${curagentuser.agentserviceid!''}" , agentuserid = "${curagentuser.id}"; + + body + .main-agentuser + .chat-agent-callout(style='height: 102%;') + h1.site-h1 + // <#if curagentuser??>${curagentuser.username!''}(${curagentuser.region!''}) + // + // + // <#if contacts?? && curagentuser??> + // <#include "/apps/agent/calloutcontact/edit.html"> + // <#else> + // <#include "/apps/agent/calloutcontact/add.html"> + // + // <#if contacts?? && curagentuser??> + input#contactsId(hidden, value='${contacts.id!\'\'}') + input#creater(hidden, value='${contacts.creater!\'\'}') + .ukefu-chat-prop + .ukefu-prop-list + .layui-side-scroll + .layui-collapse + .layui-colla-item + h2.layui-colla-title 往来历史 + .layui-colla-content.layui-show + #timeline.timeline-container(type='text'). + + + //
                                  + //
                                  + style. + + .card { + /* Add shadows to create the "card" effect */ + box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2); + transition: 0.3s; + margin-top: 5px; + } + + /* On mouse-over, add a deeper shadow */ + .card:hover { + box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2); + } + + /* Add some padding inside the card container */ + .container { + width: 100%; + word-break: break-all; + } + + script(src='/js/CSKeFu_Rest_Request.v1.js') + script. + + function getNotesByContactId () { + // 获取数据 + var id = $('#contactsId').val(); + var payload = { + path: 'contacts/notes', + data: { ops: "fetch", contactid: id }, + }; + restApiRequest(payload).then(function (data) { + // remove a click exchange and set color to gray + // AUTH_ERROR + if(data.status && data.status === "AUTH_ERROR"){ + handleRestApiFail(data.status); + return; + } + + if(data.rc === 0){ + if(data.totalElements > 0) { + for(var item of data.data){ + $("#timeline").append('
                                  ' + + '
                                  ' + + '

                                  时间:' + item.updatetime + '

                                  ' + + '
                                  笔记者:' + item.creatername + '
                                  ' + + '
                                  事件类型:' + item.category + '
                                  ' + + '
                                  笔记:' + item.content + '
                                  ' + + '
                                  ' + + '
                                  '); + } + } + } else { + } + }, function (err) { + console.log(err) + }); + } + + // unselect tag + function unOrselectTag(id) { + var el = $("#tag_" + id); + var xid = el.attr("name"); + + if(xid){ + // unselected tag + var payload = { + path: 'contacts/tags', + data: { + ops: "remove", + xid: xid, + + }, + }; + restApiRequest(payload).then(function (data) { + if(data.status && data.status === "AUTH_ERROR"){ + handleRestApiFail(data.status); + return; + } + + if(data.rc === 0){ + console.log(data.data); + el.removeClass("ukefu-label").addClass("unselectedClass").attr("name", ""); + } else { + } + }, function (err) { + console.log(err) + }); + } else { + // select tag + var contactid = $('#contactsId').val(); + var payload = { + path: 'contacts/tags', + data: { + ops: "create", + contactid: contactid, + tagId: id, + }, + }; + + restApiRequest(payload).then(function (data) { + if(data.status && data.status === "AUTH_ERROR"){ + handleRestApiFail(data.status); + return; + } + + if(data.rc === 0){ + console.log(data.data); + el.removeClass("unselectedClass").addClass("ukefu-label").attr("name", data.data.id); + } else { + } + }, function (err) { + console.log(err) + }); + } + } + + // get tags + function getTags(){ + var id = $('#contactsId').val(); + var payload = { + path: 'contacts/tags', + data: { + ops: "fetch", + contactid: id, + }, + }; + restApiRequest(payload).then(function (data) { + if(data.status && data.status === "AUTH_ERROR"){ + handleRestApiFail(data.status); + return; + } + + if(data.rc === 0){ + var tagsData = data.data; + + for (var item of tagsData){ + if(item.tagged){ + $("#contactTags").append( + '' + item.name + '' + ); + } else { + $("#contactTags").append( + '' + item.name + '' + ); + } + } + } else { + } + }, function (err) { + console.log(err) + }); + } + + + layui.use('layer', function() { + layer = layui.layer; + + // get all notes by contact id. + getNotesByContactId(); + + // get tags + getTags() + + // add notes + $('#notesAddBtn').on('click', function(){ + var content = $('#notesContent').val() || ''; + if(!content) return; + + var id = $('#contactsId').val(); + var category = $("#notesCategory option:selected").text(); + + var payload = { + path: 'contacts/notes', + data: { + ops: "create", + contactid: id, + category: category, + content: content, + agentuser: '', + onlineuser: '' + }, + }; + restApiRequest(payload).then(function (data) { + if(data.status && data.status === "AUTH_ERROR"){ + handleRestApiFail(data.status); + return; + } + + if(data.rc === 0){ + var item = data.data; + // get all notes by contact id. + $("#timeline").prepend('
                                  ' + + '
                                  ' + + '

                                  时间:' + item.updatetime + '

                                  ' + + '
                                  笔记者:' + item.creatername + '
                                  ' + + '
                                  事件类型:' + category + '
                                  ' + + '
                                  笔记:' + content + '
                                  ' + + '
                                  ' + + '
                                  '); + } else { + } + }, function (err) { + console.log(err) + }); + }); + }); + + // <#else> + .ukefu-chat-prop + .ukefu-prop-list + .layui-side-scroll + .layui-tab(style='margin-top:0px;') + ul.layui-tab-title + li.layui-this 访客 + li 历史 + .layui-tab-content(style='padding: 5px 0px 0px;') + .layui-tab-item.layui-show + .box + .box-title + h1.site-h1(style='background-color:#EEEEEE;') + | +访问信息 + + div(style='float:right;') + button.layui-btn.layui-btn-small.layui-btn-radius.layui-btn-danger(href='/agent/blacklist/add.html?userid=${curagentuser.userid!\'\'}&agentserviceid=${curagentuser.agentserviceid!\'\'}&agentuserid=${curagentuser.id}×=${serviceCount!0}&chattime=<#if onlineUser?? && onlineUser.betweentime??>${onlineUser.betweentime}<#else>0', data-toggle='ajax', data-title='拉黑访客', data-width='900') 拉黑访客 + .box-body(style='padding:0px 10px;position: relative;') + // <#include "/apps/agent/channel/phone.html"> + // <#if curagentuser.name??> + //
                                    + //
                                  • + // 姓名: + // + // ${curagentuser.name!''} + // + //
                                  • + // <#if curagentuser.phone??> + //
                                  • + // 电话: + // + // ${curagentuser.phone!''} + // + //
                                  • + // + // <#if curagentuser.email??> + //
                                  • + // 邮件: + // + // ${curagentuser.email!''} + // + //
                                  • + // + // <#if curagentuser.resion??> + //
                                  • + // 来访原因: + // + // ${curagentuser.resion!''} + // + //
                                  • + // + //
                                  + // + // <#if curAgentService?? && curAgentService.trans?? && curAgentService.trans> + //
                                    + //
                                  • + // 转接: + // + // + // + //
                                  • + // <#if curAgentService.transtime??> + //
                                  • + // 转接时间: + // + // ${curAgentService.transtime?string("yyyy-MM-dd HH:mm:ss")} + // + //
                                  • + // + // <#if curAgentService.transmemo??> + //
                                  • + // 转接附言: + // + // ${curAgentService.transmemo!''} + // + //
                                  • + // + //
                                  + // + .layui-tab-item + .box + .box-title + h1.site-h1(style='background-color:#EEEEEE;'). + + 历史记录 + + .box-body(style='padding:0px 10px;') + ul.info-list.ukefu-quick-reply + // <#if agentServiceList?? && agentServiceList?size gt 0> + // <#list agentServiceList as agentService> + //
                                • + // + // ${agentService.username!''} + //
                                  坐席:${agentService.agentusername!''}
                                  + //
                                  + // ${agentService.servicetime?string("yyyy-MM-dd HH:mm:ss")} + //
                                  时长:${(agentService.sessiontimes/(1000*60*60))?string('00')}:${((agentService.sessiontimes%(1000*60*60))/(1000*60))?string('00')}:${((agentService.sessiontimes%(1000*60))/(1000))?string('00')}
                                  + //
                                  + //
                                  + //
                                • + // + // <#else> + //
                                • + //
                                  + // + //
                                  还没有咨询记录
                                  + //
                                  + //
                                • + // + // diff --git a/contact-center/app/src/main/resources/templates/apps/cca/mainagentuserconter.html b/contact-center/app/src/main/resources/templates/apps/cca/mainagentuserconter.html deleted file mode 100644 index 31d42a6f..00000000 --- a/contact-center/app/src/main/resources/templates/apps/cca/mainagentuserconter.html +++ /dev/null @@ -1,76 +0,0 @@ -<#list agentUserMessageList as chatmessage> -
                                  -
                                  - -
                                  - - <#if (chatmessage.islabel == true??)><#else>စ - - - <#if chatmessage?? && chatmessage.calltype?? && chatmessage.calltype == '呼出'> - ${chatmessage.intervented?string(chatmessage.supervisorname,curagentuser.agentname)} - <#else> - ${curagentuser.username!''} - - - ${chatmessage.createtime?string('yyyy-MM-dd HH:mm:ss')} - - <#if (chatmessage.islabel == true??)><#else>စ - -
                                  -
                                  - -
                                  <#include "/apps/agent/media/message.html">
                                  -
                                  -
                                  - <#if agentUserMessageListnum??> - - - -
                                  - - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/cca/mainagentusersearch.html b/contact-center/app/src/main/resources/templates/apps/cca/mainagentusersearch.html deleted file mode 100644 index 421abf32..00000000 --- a/contact-center/app/src/main/resources/templates/apps/cca/mainagentusersearch.html +++ /dev/null @@ -1,68 +0,0 @@ -<#list agentUserMessageList.content?reverse as chatmessage> -
                                  -
                                  - - - -
                                  - - <#if chatmessage?? && chatmessage.calltype?? && chatmessage.calltype == '呼出'> - ${chatmessage.intervented?string(chatmessage.supervisorname,chatmessage.username)} - <#else> - ${chatmessage.username!''} - - - ${chatmessage.createtime?string('yyyy-MM-dd HH:mm:ss')} - - <#if (chatmessage.islabel == true??)><#else>စ - -
                                  -
                                  - -
                                  <#include "/apps/agent/media/message.html">
                                  -
                                  -
                                  -
                                  - -<#if agentUserMessageList.totalElements??> - - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/cca/media/message.html b/contact-center/app/src/main/resources/templates/apps/cca/media/message.html deleted file mode 100644 index 95740ff4..00000000 --- a/contact-center/app/src/main/resources/templates/apps/cca/media/message.html +++ /dev/null @@ -1,66 +0,0 @@ -<#if chatmessage.msgtype?? && chatmessage.msgtype == "image"> - - - -<#elseif chatmessage.msgtype?? && chatmessage.msgtype == "cooperation"> - - 系统发送了一个协作邀请 - -<#elseif chatmessage.msgtype?? && chatmessage.msgtype == "file"> - -<#elseif chatmessage.msgtype?? && chatmessage.msgtype == "location"> -
                                  ${chatmessage.message!''}
                                  - <#if systemConfig?? && systemConfig.mapkey?? && systemConfig.mapkey != ''> -
                                  - - -<#elseif chatmessage.msgtype?? && chatmessage.msgtype == "voice"> -

                                  - - - - - - - - ${chatmessage.duration!''}秒 - - - -

                                  - <#if chatmessage.expmsg??> -
                                  ${chatmessage.expmsg!''}
                                  - - -<#else> - ${(chatmessage.message!'')?no_esc} - <#if chatmessage.suggestmsg?? && chatmessage.suggestmsg!=""> - - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/cca/media/messageimage.html b/contact-center/app/src/main/resources/templates/apps/cca/media/messageimage.html deleted file mode 100644 index 7bda76b2..00000000 --- a/contact-center/app/src/main/resources/templates/apps/cca/media/messageimage.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - -
                                  -
                                  -
                                  - -
                                  -
                                  - 你的浏览器不支持 canvas 绘图 -
                                  -
                                  - -
                                  \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/cca/othertopic.html b/contact-center/app/src/main/resources/templates/apps/cca/othertopic.html deleted file mode 100644 index e3ae60aa..00000000 --- a/contact-center/app/src/main/resources/templates/apps/cca/othertopic.html +++ /dev/null @@ -1,32 +0,0 @@ -
                                    - <#if topicList?? && topicList?size gt 0> - <#list topicList as topic> -
                                  • - - ${topic.title!''} - -
                                  • - - <#else> -
                                  • -
                                    - -
                                    还没有外部知识内容
                                    -
                                    -
                                  • - -
                                  - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/cca/quicklist.html b/contact-center/app/src/main/resources/templates/apps/cca/quicklist.html deleted file mode 100644 index 862cc3bf..00000000 --- a/contact-center/app/src/main/resources/templates/apps/cca/quicklist.html +++ /dev/null @@ -1,146 +0,0 @@ - -
                                    - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/cca/quickreply/add.html b/contact-center/app/src/main/resources/templates/apps/cca/quickreply/add.html deleted file mode 100644 index 16c106eb..00000000 --- a/contact-center/app/src/main/resources/templates/apps/cca/quickreply/add.html +++ /dev/null @@ -1,101 +0,0 @@ -
                                    -
                                    -
                                    -
                                    - -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    - - - - -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    - - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/cca/quickreply/addtype.html b/contact-center/app/src/main/resources/templates/apps/cca/quickreply/addtype.html deleted file mode 100644 index a198120b..00000000 --- a/contact-center/app/src/main/resources/templates/apps/cca/quickreply/addtype.html +++ /dev/null @@ -1,141 +0,0 @@ -<#include "/public/macro.html"> -
                                    -
                                    -
                                    -
                                    -

                                    分类基本信息

                                    -
                                    -
                                    -
                                    - -
                                    - -
                                    - * -
                                    -
                                    - -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    扩展信息

                                    -
                                    -
                                    -
                                    - -
                                    - - - - -
                                    -
                                    -
                                    - - -
                                    -
                                    - -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    - - -
                                    -
                                    -
                                    -
                                    - - - diff --git a/contact-center/app/src/main/resources/templates/apps/cca/quickreply/edit.html b/contact-center/app/src/main/resources/templates/apps/cca/quickreply/edit.html deleted file mode 100644 index 2ae0bc4b..00000000 --- a/contact-center/app/src/main/resources/templates/apps/cca/quickreply/edit.html +++ /dev/null @@ -1,107 +0,0 @@ -
                                    -
                                    - -
                                    - -
                                    - -
                                    -
                                    -
                                    -
                                    - -
                                    - - - - -
                                    -
                                    -
                                    -
                                    - -
                                    - -
                                    -
                                    -
                                    -
                                    - - -
                                    -
                                    -
                                    -
                                    - - - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/cca/quickreply/edittype.html b/contact-center/app/src/main/resources/templates/apps/cca/quickreply/edittype.html deleted file mode 100644 index 1baec860..00000000 --- a/contact-center/app/src/main/resources/templates/apps/cca/quickreply/edittype.html +++ /dev/null @@ -1,142 +0,0 @@ -<#include "/public/macro.html"> -
                                    -
                                    - -
                                    -
                                    -

                                    分类基本信息

                                    -
                                    -
                                    -
                                    - -
                                    - -
                                    - * -
                                    -
                                    - -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    扩展信息

                                    -
                                    -
                                    -
                                    - -
                                    - - - - -
                                    -
                                    -
                                    - - -
                                    -
                                    - -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    - - -
                                    -
                                    -
                                    -
                                    - - - diff --git a/contact-center/app/src/main/resources/templates/apps/cca/quickreplycontent.html b/contact-center/app/src/main/resources/templates/apps/cca/quickreplycontent.html deleted file mode 100644 index 3d88ae9a..00000000 --- a/contact-center/app/src/main/resources/templates/apps/cca/quickreplycontent.html +++ /dev/null @@ -1 +0,0 @@ -<#if quickReply??>${(quickReply.content!'')?no_esc} \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/cca/searchbox.html b/contact-center/app/src/main/resources/templates/apps/cca/searchbox.html deleted file mode 100644 index f275aeed..00000000 --- a/contact-center/app/src/main/resources/templates/apps/cca/searchbox.html +++ /dev/null @@ -1,42 +0,0 @@ -
                                    - -
                                    -
                                    -
                                    -
                                    - -
                                    - -
                                    -
                                    -
                                    - -
                                    - -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    diff --git a/contact-center/app/src/main/resources/templates/apps/cca/summary.html b/contact-center/app/src/main/resources/templates/apps/cca/summary.html deleted file mode 100644 index 697b4985..00000000 --- a/contact-center/app/src/main/resources/templates/apps/cca/summary.html +++ /dev/null @@ -1,107 +0,0 @@ -<#include "/public/macro.html"> -
                                    -
                                    - <#if summary??> - - - - - -
                                    -
                                    - -
                                    - -
                                    -
                                    -
                                    - * -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    - checked> - checked> -
                                    -
                                    -
                                    -
                                    - -
                                    - <#if summary?? && summary.reservtype??> - <@select "com.dic.summary.reservtype" "reservtype" summary.reservtype!'' "lay-ignore" "width:120px;"/> - <#else> - <@select "com.dic.summary.reservtype" "reservtype" '' "lay-ignore" "width:120px;"/> - -
                                    -
                                    -
                                    - -
                                    - - -
                                    -
                                    -
                                    - -
                                    -
                                    - -
                                    - -
                                    -
                                    -
                                    - -
                                    -
                                    - - -
                                    -
                                    -
                                    -
                                    - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/cca/index.html b/contact-center/app/src/main/resources/templates/apps/cca/templates/message_tpl.tpl similarity index 62% rename from contact-center/app/src/main/resources/templates/apps/cca/index.html rename to contact-center/app/src/main/resources/templates/apps/cca/templates/message_tpl.tpl index 85c984f1..c2829301 100644 --- a/contact-center/app/src/main/resources/templates/apps/cca/index.html +++ b/contact-center/app/src/main/resources/templates/apps/cca/templates/message_tpl.tpl @@ -1,14 +1,8 @@ - - - - - - - - -
                                    - <#if agentUserList?? && agentUserList?size gt 0> -
                                    -
                                    - <#include "/apps/cca/agentusers.html"/> -
                                    -
                                    - <#if curagentuser?? && curagentuser.channel == "phone"> -
                                    - <#include "/apps/cca/mainagentuser_callout.html"> -
                                    - <#else> -
                                    - <#include "/apps/cca/mainagentuser.html"> -
                                    - -<#else> -
                                    -
                                    -
                                    -
                                    - -
                                    还没有任何对话
                                    +
                                    -
                                    -
                                    - -
                                    - -<#if agentUserList?? && agentUserList?size gt 0> - - +
                                    \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/cca/templates/tpl.pug b/contact-center/app/src/main/resources/templates/apps/cca/templates/tpl.pug new file mode 100644 index 00000000..baf5492a --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/cca/templates/tpl.pug @@ -0,0 +1,6 @@ +script#message_tpl(type="text/html") + include message_tpl.tpl +script#end_tpl(type="text/html") + include /apps/agent/templates/end_tpl.tpl +script#begin_tpl(type="text/html") + include /apps/agent/templates/begin_tpl.tpl diff --git a/contact-center/app/src/main/resources/templates/apps/cca/topicdetail.html b/contact-center/app/src/main/resources/templates/apps/cca/topicdetail.html deleted file mode 100644 index ff274caf..00000000 --- a/contact-center/app/src/main/resources/templates/apps/cca/topicdetail.html +++ /dev/null @@ -1 +0,0 @@ -<#if topic??>${(topic.content!'')?no_esc} \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/cca/transfer.html b/contact-center/app/src/main/resources/templates/apps/cca/transfer.html deleted file mode 100644 index 60702aa3..00000000 --- a/contact-center/app/src/main/resources/templates/apps/cca/transfer.html +++ /dev/null @@ -1,151 +0,0 @@ -
                                    - - - - -
                                    -
                                    -
                                    -
                                    -

                                    - 技能组 -

                                    -
                                    -
                                    -
                                      - <#if skillGroups??> - <#list skillGroups as skill> - <#if user.affiliates?seq_contains(skill.id)> - <#assign agentNum = 0 > - <#if userList??><#list userList as agent><#if agent.skills[skill.id]??><#assign agentNum = agentNum + 1 > -
                                    • - - ${skill.name!''}(${agentNum!''}) -
                                    • - - - - - <#if skillGroups??> - <#list skillGroups as skill> - <#if !user.affiliates?seq_contains(skill.id)> - <#assign agentNum = 0 > - <#if userList??><#list userList as agent><#if agent.skills[skill.id]??><#assign agentNum = agentNum + 1 > -
                                    • - ${skill.name!''}(${agentNum!''}) -
                                    • - - - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - <#include "/apps/cca/transferagentlist.html"> -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    - 转接附言(最多不超过255个字符)

                                    -
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    - - -
                                    -
                                    -
                                    - - diff --git a/contact-center/app/src/main/resources/templates/apps/cca/transfer.pug b/contact-center/app/src/main/resources/templates/apps/cca/transfer.pug new file mode 100644 index 00000000..bfaab0b1 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/cca/transfer.pug @@ -0,0 +1,129 @@ +form.layui-form#selfTransAgentUserFormcca(method='post') + input(type='hidden', name='userid', value=userid) + input(type='hidden', name='agentserviceid', value=agentserviceid) + input(type='hidden', name='agentuserid', value=agentuserid) + input(type='hidden', name='currentAgentnoid', value=agentnoid) + .row(style='height:295px;') + .col-lg-3 + .box + .box-title + h1.site-h1(style='background-color:#FFFFFF;margin:0px;padding:0 0 4px 20px;') + | 技能组 + .box-body(style='padding:0px 0px;position: relative;height:250px;overflow-y:auto;') + ul + if skillGroups + for skill in skillGroups + if (user.affiliates.contains(skill.id)) + - var agentNum = 0 + if userList + for agent in userList + if skill.id && agent.organs[skill.id] + - agentNum = agentNum + 1 + li.uk_role(title= skill.name + "(" + agentNum + ")", class=({'this': skill.id == currentorgan}), style="margin:0px;padding:7px 0 7px 20px;", onclick="$('.uk_role.this').removeClass('this');$(this).addClass('this');") + a(href="/apps/cca/transfer/agent.html?organ=" + skill.id + "&agentid=" + agentno, data-toggle="load", data-target="#skillAgentList") + i.kfont(style="margin-top: 3px;float: left")  + span(style="max-width: 120px;text-overflow: ellipsis;white-space: nowrap; overflow: hidden;float: left;margin: 0 3px")= skill.name + | (#{agentNum}) + if skillGroups + for skill in skillGroups + if (!user.affiliates.contains(skill.id)) + - var agentNum = 0 + if userList + for agent in userList + if skill.id && agent.organs[skill.id] + - agentNum = agentNum + 1 + li.uk_role(title= skill.name + "(" + agentNum + ")", class=({'this': skill.id == currentorgan}), style="margin:0px;padding:7px 0 7px 20px;", onclick="$('.uk_role.this').removeClass('this');$(this).addClass('this');") + a(href="/apps/cca/transfer/agent.html?organ=" + skill.id + "&agentid=" + agentno, data-toggle="load", data-target="#skillAgentList") + i.kfont(style="margin-top: 3px;float: left")  + span(style="max-width: 120px;text-overflow: ellipsis;white-space: nowrap; overflow: hidden;float: left;margin: 0 3px")= skill.name + | (#{agentNum}) + .col-lg-9(style='border-left:1px solid #dedede;') + .box + .box-body#skillAgentList(style='padding:0px 2px;position: relative;height:295px;overflow-y:auto;') + include /apps/agent/transferagentlist.pug + .row(style='margin-top:5px;') + .col-lg-12 + h1.site-h1(style='background-color:#EEEEEE;padding-left: 20px') 转接附言(最多不超过255个字符) + .layui-form-item(style='padding-left:10px;padding-top:5px;') + .layui-inline + .layui-input-inline(style='width: 720px;') + textarea.layui-textarea(name='memo', placeholder='请输入转接附言', style='resize:none;height:90px;min-height:90px;margin-left: 5px', maxlength='255') + if agentservice + | #{agentservice.transmemo} + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='contactsForm') 转接 + button.layui-btn.layui-btn-original(type='button', onclick='layer.close(top.layerwin);') 关闭 +script. + $('.ukefu-agentstatus td:not(:last-child)').on("click", function () { + $('.ctxid').prop("checked", false); + if ($(this).parent().find("input").prop("checked")) { + $(this).parent().find("input").prop("checked", false); + } else { + $(this).parent().find("input").prop("checked", true); + } + }); + /** + * 转接访客坐席 + * @param agentUserId + * @param targetAgentno + * @param agentUserServiceId + * @param memo + */ + function submitTransAgentUserOut(agentUserId, targetAgentno, agentUserServiceId, memo) { + restApiRequest({ + silent: true, + path: 'agentuser', + data: { + ops: 'transout', + agentno: targetAgentno, + agentUserId: agentUserId, + agentServiceId: agentUserServiceId, + memo: memo + } + }).then(function (result) { + if (result.status) { + // Token过期 + handleRestApiFail(result.status); + } else if (result.rc === 0) { + // 转接成功 + // 进行显示调整 + if ($('#customerChatAudit').length > 0 && customerChatAudit != null && customerChatAudit.$) { + customerChatAudit.$("li[remove-id=" + agentUserId + "] a").click(); + } + top.layer.msg('转接已完成', {icon: 1, time: 1000}) + } else if (result.rc === 1) { + top.layer.msg('不合法的请求参数', {icon: 2, time: 3000}) + } else if (result.rc === 2) { + top.layer.msg('不合法的操作', {icon: 2, time: 3000}) + } else if (result.rc === 3) { + top.layer.msg('您没有权限执行该操作', {icon: 2, time: 3000}) + } else if (result.rc === 4) { + top.layer.msg('该访客会话不存在', {icon: 2, time: 3000}) + } else if (result.rc === 5) { + top.layer.msg('参数不合法', {icon: 2, time: 3000}) + } + }, function (error) { + console.log("error", error); + // 服务器异常 + top.layer.msg('服务器抽风,请稍后再试!', {icon: 2, time: 3000}) + }) + } + + $(function () { + $('#selfTransAgentUserFormcca').on('submit', function (e) { + e.preventDefault(); //prevent form from submitting + var data = $("#selfTransAgentUserFormcca :input").serializeArray(); + var params = {}; + for (var index = 0; index < data.length; index++) { + params[data[index]['name']] = data[index]["value"]; + } + // 验证数据的完整,以下为必填 + if (params["userid"] && params["agentuserid"] && params["agentserviceid"] && params["agentno"]) { + submitTransAgentUserOut(params["agentuserid"], params["agentno"], params["agentserviceid"], params["memo"]); + } else { + top.layer.msg('未选择合理的转接信息!', {icon: 2, time: 3000}); + } + }); + }); + diff --git a/contact-center/app/src/main/resources/templates/apps/cca/transferagentlist.html b/contact-center/app/src/main/resources/templates/apps/cca/transferagentlist.html deleted file mode 100644 index 6e547cc8..00000000 --- a/contact-center/app/src/main/resources/templates/apps/cca/transferagentlist.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - <#if userList?? && currentorgan??> - <#list userList as agent> - <#if agent.skills[currentorgan]??> - - - - - - - - - - - - -
                                    坐席登陆时间最大用户数服务用户数
                                    - - ${agent.username!''}(${agent.uname!''})<#if agent.agentStatus??>${agent.agentStatus.logindate?string('yyyy-MM-dd HH:mm:ss')} - <#if agent.agentStatus??>${agent.agentStatus.maxusers!0} - - <#if agent.agentStatus??>${agent.agentStatus.users!0} -
                                    - diff --git a/contact-center/app/src/main/resources/templates/apps/cca/upload.html b/contact-center/app/src/main/resources/templates/apps/cca/upload.html deleted file mode 100644 index fe520539..00000000 --- a/contact-center/app/src/main/resources/templates/apps/cca/upload.html +++ /dev/null @@ -1,8 +0,0 @@ -{ - "error" : ${upload.error!'1'} - <#if upload?? && upload.error?? && upload.error == '0'> - ,"url":"${upload.url!''}" - <#else> - ,"message":"${upload.message!''}" - -} \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/cca/workorders.html b/contact-center/app/src/main/resources/templates/apps/cca/workorders.html deleted file mode 100644 index 127f16c3..00000000 --- a/contact-center/app/src/main/resources/templates/apps/cca/workorders.html +++ /dev/null @@ -1,58 +0,0 @@ -
                                    -
                                    -

                                    - 工单 -
                                    - -
                                    -

                                    -
                                    -
                                    - -
                                    -
                                    - diff --git a/contact-center/app/src/main/resources/templates/apps/contacts/add.pug b/contact-center/app/src/main/resources/templates/apps/contacts/add.pug new file mode 100644 index 00000000..407ec2f4 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/contacts/add.pug @@ -0,0 +1,139 @@ +include /mixins/dic.mixin.pug + +.uk-layui-form + form.layui-form(action='/apps/contacts/save.html', method='post') + input(type='hidden', name='shares', value='all') + .layui-collapse + .layui-colla-item + h2.layui-colla-title 基本信息 + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label.layui-form-label 获得时间: + .layui-input-inline + input#getdate.layui-input(type='text', name='touchtime', readonly, lay-verify='date', autocomplete='off') + i.layui-icon(style='position: absolute;right: 3px;top: 6px;font-size: 25px;')  + .layui-inline + font(color='red') *(必填项) + | (您得到此联系人的时间) + .layui-inline + label.layui-form-label(style='width:60px;line-height: 35px;') 类型: + .layui-input-inline(style='width:218px;margin-right:0px;padding-top:9px;') + +sysDicSelect('com.dic.contacts.ckind', 'ckind', ckind, { + 'lay-ignore': true, + 'required': true, + 'lay-verify': 'required' + }) + .layui-colla-item + h2.layui-colla-title 联系人信息 + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label.layui-form-label#cusname 联系人名称: + .layui-input-inline + input.layui-input(type='text', name='name', required, lay-verify='required', autocomplete='off') + .layui-inline + font(color='red') *(必填项) + .layui-form-item + .layui-inline + label.layui-form-label 性别: + .layui-input-inline + .layui-input-block(style='width:220px;') + input(type='radio', name='gender', value='1', title='男') + input(type='radio', name='gender', value='0', title='女') + input(type='radio', name='gender', value='-1', title='未知', checked) + .layui-inline.uckefu-inline + label.layui-form-label 生日: + .layui-input-inline + input#cusbirthday.layui-input(type='text', name='cusbirthday', autocomplete='off') + i.layui-icon(style='position: absolute;right: 3px;top: 6px;font-size: 25px;')  + .layui-form-item + .layui-inline + label.layui-form-label 联系电话: + .layui-input-inline + input.layui-input(type='text', name='phone', autocomplete='off') + .layui-inline.uckefu-inline + label.layui-form-label 手机号: + .layui-input-inline + input.layui-input(type='text', name='mobileno', autocomplete='off') + .layui-form-item + .layui-inline + label.layui-form-label 城市: + .layui-input-inline(style='width: 80px;') + +sysDicSelect("com.dic.address.area", "province", "", {'lay-ignore': true}, "width:85px;") + .layui-inline + .layui-input-inline#contacts_city(style='width: 80px;') + +sysDicSelect("com.dic.address.city", "city", "", {'lay-ignore': true}, "width:86px;") + .layui-inline.uckefu-inline + label.layui-form-label 电子邮件: + .layui-input-inline(style='margin-left:5px;') + input.layui-input(type='text', name='email', lay-verify='entemail', autocomplete='off') + .layui-form-item + .layui-inline + label.layui-form-label#contacts_skypeid(style='widht:80px;') Skype ID: + .layui-input-inline + input#skypeid.layui-input(type='text', name='skypeid', lay-verify='skypeid', autocomplete='off') + .layui-form-item + .layui-inline + label.layui-form-label 联系人地址: + .layui-input-inline(style='width: 664px;') + input.layui-input(type='text', name='address', autocomplete='off') + .layui-form-item + .layui-inline + label.layui-form-label 联系人说明: + .layui-input-inline(style='width: 664px;') + textarea.layui-textarea(name='memo', placeholder='请输入内容', style='resize:none;') + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 立即提交 + button.layui-btn.layui-btn-original(type='reset') 重置 + + script(src='/js/moment.min.js') + script. + $('#province').change(function () { + loadURL('/res/dic.html?id=' + $(this).val() + "&name=city&attr=lay-ignore&style=width:85px;", '#city'); + }) + + layui.use('form', function () { + var form = layui.form(); + form.render(); //更新全部 + form.verify({ + entemail: function (value) { + if (value != "" && !new RegExp(/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/).test(value)) { + return '请输入正确的电子邮箱地址'; + } + }, + required: function (value) { + if (value.length > 100) { + return '联系人名称不能超过100'; + } + } + }); + }); + + layui.use('element', function () { + var element = layui.element(); + }); + + $("#getdate").val(moment().format('YYYY-MM-DD')); + + layui.use('laydate', function () { + var laydate = layui.laydate; + + var date = { + min: '1950-01-01 00:00:00', + max: laydate.now(), + istoday: false + }; + + document.getElementById('getdate').onclick = function () { + date.elem = this; + laydate(date); + } + + document.getElementById('cusbirthday').onclick = function () { + date.elem = this; + laydate(date); + } + }); + diff --git a/contact-center/app/src/main/resources/templates/apps/contacts/detail.pug b/contact-center/app/src/main/resources/templates/apps/contacts/detail.pug new file mode 100644 index 00000000..6616ea39 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/contacts/detail.pug @@ -0,0 +1,371 @@ +extends /apps/include/layout.pug +block content + .layui-side.layui-bg-black + .layui-side-scroll + include /apps/contacts/include/left.pug + .layui-body + .layui-side-scroll + .box-header + h1.site-h1(style='background-color:#FFFFFF;') + span.ukefu-bt + i.layui-icon.ukewo-btn(style='font-size:20px;text-align: center;')  + | 联系人详情 + .row + .col-lg-6(style='padding-right: 10px;') + .box-body.ukefu-im-theme + .uk-layui-form + .layui-collapse + .layui-colla-item + h2.layui-colla-title 标签 + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label.layui-form-label(style='text-align: left;') 已有标签: + #contactTags.layui-input-inline(style='width: 100%;'). + .box-body.ukefu-im-theme + .uk-layui-form + .layui-collapse + .layui-colla-item + h2.layui-colla-title 笔记 + .layui-colla-content.layui-show + .layui-form-item + label.layui-form-label 笔记分类: + .layui-input-inline + select#notesCategory(name='notesCategory', lay-filter='category', required, lay-verify='required', style='display: inline') + option(value='webim') 网页 + option(value='callout') 外呼 + option(value='callin') 呼入 + .layui-form-item + .layui-inline + label.layui-form-label 内容: + .layui-input-inline + textarea#notesContent.layui-textarea(name='notes') + .layui-button-block + button.layui-btn#notesAddBtn(lay-submit, lay-filter='notesbtn') 立即添加 + .box-body.ukefu-im-theme + .uk-layui-form + .layui-collapse + .layui-colla-item + h2.layui-colla-title 往来历史 + .layui-colla-content.layui-show + #timeline.timeline-container(type='text', style='height: 617px; overflow-y: auto;'). + .col-lg-6 + .box-body.ukefu-im-theme + .uk-layui-form + input#contactsId(hidden, value= (contacts.id)) + input#creater(hidden, value= (contacts.creater)) + .layui-collapse#basic + .layui-colla-item + h2.layui-colla-title 基本信息 + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label.layui-form-label 获得时间: + .layui-input-inline(style='line-height: 2.5em;') #{pugHelper.formatDate('yyyy-MM-dd', contacts.touchtime)} + .layui-form-item + .layui-inline + label.layui-form-label 类型: + .layui-input-inline(style='line-height: 2.5em;') #{contacts.ckind ? uKeFuDic[contacts.ckind].name : ""} + .layui-colla-item + h2.layui-colla-title 联系人信息 + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label.layui-form-label#cusname 联系人名称: + .layui-input-inline(style='line-height: 2.5em;') #{contacts.name} + .layui-form-item + .layui-inline + label.layui-form-label 性别: + .layui-input-inline(style='line-height: 2.5em;') + if contacts.gender == '1' + | 男 + if contacts.gender == '0' + | 女 + if contacts.gender == '-1' + | 未知 + .layui-form-item + .layui-inline + label.layui-form-label 生日: + .layui-input-inline(style='line-height: 2.5em;') #{contacts.cusbirthday} + .layui-form-item + .layui-inline + label.layui-form-label 联系电话: + .layui-input-inline(style='line-height: 2.5em;') #{contacts.phone} + .layui-form-item + .layui-inline + label.layui-form-label 手机号: + .layui-input-inline(style='line-height: 2.5em;') #{contacts.mobileno} + .layui-form-item + .layui-inline + label.layui-form-label skype账号: + .layui-input-inline(style='line-height: 2.5em') #{contacts.skypeid} + .layui-form-item + .layui-inline + label.layui-form-label 城市: + .layui-input-inline(style='width:80px;line-height: 2.5em;') #{contacts.province ? uKeFuDic[contacts.province].name : ""} + .layui-inline + .layui-input-inline#contacts_city(style='width:80px; line-height: 2.5em;') #{contacts.city ? uKeFuDic[contacts.city].name : ""} + .layui-form-item + .layui-inline + label.layui-form-label 电子邮件: + .layui-input-inline(style='margin-left:5px;line-height: 2.5em;') #{contacts.email} + if contacts.wlusername || contacts.wluid + .layui-form-item + .layui-inline + label.layui-form-label 用户名(id): + .layui-input-inline(style="margin-left:5px;line-height: 2.5em;") #{contacts.wlusername} + span "(" + #{contacts.wluid} + ")" + if contacts.wlcompany_name || contacts.wlcid + .layui-form-item + .layui-inline + label.layui-form-label 公司名称(id): + .layui-input-inline(style="margin-left:5px;line-height: 2.5em;") #{contacts.wlcompany_name} + span "(" + #{contacts.wlcid} + ")" + if contacts.wlcompany_name || contacts.wlcid + .layui-form-item + .layui-inline + label.layui-form-label 子系统名称(id): + .layui-input-inline(style="margin-left:5px;line-height: 2.5em;") #{contacts.wlsystem_name} + span "(" + #{contacts.wlcid} + ")" + .layui-form-item + .layui-inline + label.layui-form-label 联系人地址: + .layui-input-inline(style='width: 159%;') + input.layui-input(type='text', name='address', readonly, value= contacts.address, style='width: 425px;') + .layui-form-item + .layui-inline + label.layui-form-label 联系人说明: + .layui-input-inline(style='width: 149%;') + textarea.layui-textarea(name='memo', readonly, style='width: 425px;') #{contacts.memo} + script(src='/js/CSKeFu_Rest_Request.v1.js') + style. + .unselectedClass { + display: inline-block; + font-weight: 400; + color: #000000; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + border-radius: .25em; + background-color: #FFFFFF !important; + height: 22px; + line-height: 22px; + padding: 0 5px; + font-size: 14px; + border: solid 1px #CCCCCC; + } + + .card { + /* Add shadows to create the "card" effect */ + box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2); + transition: 0.3s; + margin-top: 5px; + } + + /* On mouse-over, add a deeper shadow */ + .card:hover { + box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2); + } + + /* Add some padding inside the card container */ + .container { + width: 100%; + word-break: break-all; + } + + #basic .layui-form-label{ + width: 115px; + } + #basic .layui-input-inline{ + width: 270px; + } + + script. + function getNotesByContactId () { + // 获取数据 + var id = $('#contactsId').val(); + var payload = { + path: 'contacts/notes', + data: { ops: "fetch", contactid: id }, + silent: true + }; + restApiRequest(payload).then(function (data) { + // remove a click exchange and set color to gray + // AUTH_ERROR + if(data.status && data.status === "AUTH_ERROR"){ + handleRestApiFail(data.status); + return; + } + + if(data.rc === 0){ + if(data.totalElements > 0) { + for(var item of data.data){ + $("#timeline").append('
                                    ' + + '
                                    ' + + '

                                    时间:' + item.updatetime + '

                                    ' + + '
                                    笔记者:' + item.creatername + '
                                    ' + + '
                                    事件类型:' + item.category + '
                                    ' + + '
                                    笔记:' + item.content + '
                                    ' + + '
                                    ' + + '
                                    '); + } + } + } else { + } + }, function (err) { + console.log(err) + }); + } + + // unselect tag + function unOrselectTag(id) { + var el = $("#tag_" + id); + var xid = el.attr("name"); + + if(xid){ + // unselected tag + var payload = { + path: 'contacts/tags', + data: { + ops: "remove", + xid: xid, + + }, + silent: true + }; + restApiRequest(payload).then(function (data) { + if(data.status && data.status === "AUTH_ERROR"){ + handleRestApiFail(data.status); + return; + } + + if(data.rc === 0){ + console.log(data.data); + el.removeClass("ukefu-label").addClass("unselectedClass").attr("name", ""); + } else { + } + }, function (err) { + console.log(err) + }); + } else { + // select tag + var contactid = $('#contactsId').val(); + var payload = { + path: 'contacts/tags', + data: { + ops: "create", + contactid: contactid, + tagId: id, + }, + silent: true + }; + + restApiRequest(payload).then(function (data) { + if(data.status && data.status === "AUTH_ERROR"){ + handleRestApiFail(data.status); + return; + } + + if(data.rc === 0){ + console.log(data.data); + el.removeClass("unselectedClass").addClass("ukefu-label").attr("name", data.data.id); + } else { + } + }, function (err) { + console.log(err) + }); + } + } + + // get tags + function getTags(){ + var id = $('#contactsId').val(); + var payload = { + path: 'contacts/tags', + data: { + ops: "fetch", + contactid: id, + }, + silent: true + }; + restApiRequest(payload).then(function (data) { + if(data.status && data.status === "AUTH_ERROR"){ + handleRestApiFail(data.status); + return; + } + + if(data.rc === 0){ + var tagsData = data.data; + + for (var item of tagsData){ + if(item.tagged){ + $("#contactTags").append( + '' + item.name + '' + ); + } else { + $("#contactTags").append( + '' + item.name + '' + ); + } + } + } else { + } + }, function (err) { + console.log(err) + }); + } + + layui.use('layer', function() { + layer = layui.layer; + + // get all notes by contact id. + getNotesByContactId(); + + // get tags + getTags() + + // add notes + $('#notesAddBtn').on('click', function(){ + var content = $('#notesContent').val() || ''; + if(!content) return; + + var id = $('#contactsId').val(); + var category = $("#notesCategory option:selected").text(); + + var payload = { + path: 'contacts/notes', + data: { + ops: "create", + contactid: id, + category: category, + content: content, + agentuser: '', + onlineuser: '' + }, + silent: true + }; + restApiRequest(payload).then(function (data) { + if(data.status && data.status === "AUTH_ERROR"){ + handleRestApiFail(data.status); + return; + } + + if(data.rc === 0){ + $('#notesContent').val('').change(); + var item = data.data; + // get all notes by contact id. + $("#timeline").prepend('
                                    ' + + '
                                    ' + + '

                                    时间:' + item.updatetime + '

                                    ' + + '
                                    笔记者:' + item.creatername + '
                                    ' + + '
                                    事件类型:' + category + '
                                    ' + + '
                                    笔记:' + content + '
                                    ' + + '
                                    ' + + '
                                    '); + } else { + } + }, function (err) { + console.log(err) + }); + }); + }); \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/contacts/edit.pug b/contact-center/app/src/main/resources/templates/apps/contacts/edit.pug new file mode 100644 index 00000000..cd676069 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/contacts/edit.pug @@ -0,0 +1,147 @@ +include /mixins/dic.mixin.pug + +.uk-layui-form + form.layui-form(action='/apps/contacts/update.html', method='post') + input(type='hidden', name='id', value=contacts.id) + input(type='hidden', name='ckindId', value=ckindId) + input(type='hidden', name='wluid', value=contacts.wluid) + input(type='hidden', name='wlusername', value=contacts.wlusername) + input(type='hidden', name='wlcid', value=contacts.wlcid) + input(type='hidden', name='wlcompany_name', value=contacts.wlcompany_name) + input(type='hidden', name='wlsid', value=contacts.wlsid) + input(type='hidden', name='wlsystem_name', value=contacts.wlsystem_name) + input(type='hidden', name='shares', value='all') + .layui-collapse + .layui-colla-item + h2.layui-colla-title 基本信息 + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label.layui-form-label 获得时间: + .layui-input-inline + input#getdate.layui-input(type='text', name='touchtime', value=(contacts.touchtime ? pugHelper.formatDate('yyyy-MM-dd', contacts.touchtime) : ""), readonly, lay-verify='date', autocomplete='off') + i.layui-icon(style='position: absolute;right: 3px;top: 6px;font-size: 25px;')  + .layui-inline + font(color='red') *(必填项) + | (您得到此联系人的时间) + .layui-inline + label.layui-form-label(style='width:60px;line-height: 35px;') 类型: + .layui-input-inline(style='width:218px;margin-right:0px;padding-top:9px;') + if contacts.ckind && contacts.ckind != '' + +sysDicSelect('com.dic.contacts.ckind', 'ckind', contacts.ckind, { + 'lay-ignore': true, + 'required': required, + 'lay-verify': 'required' + }) + else + +sysDicSelect('com.dic.contacts.ckind', 'ckind', '', {'lay-ignore': true}) + .layui-colla-item + h2.layui-colla-title 联系人信息 + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label.layui-form-label#cusname 联系人名称: + .layui-input-inline + input.layui-input(type='text', name='name', value= contacts.name, required, lay-verify='required', autocomplete='off') + .layui-inline + font(color='red') *(必填项) + .layui-form-item + .layui-inline + label.layui-form-label 性别: + .layui-input-inline + .layui-input-block(style='width:220px;') + input(type="radio", name="gender", value="1", title="男", checked= (contacts && contacts.gender == '1')) + input(type="radio", name="gender", value="0", title="女", checked= (contacts && contacts.gender == '0')) + input(type="radio", name="gender", value="-1", title="未知", checked= (contacts.gender != '1' && contacts.gender != '0')) + .layui-inline.uckefu-inline + label.layui-form-label 生日: + .layui-input-inline + input#cusbirthday.layui-input(type='text', name='cusbirthday', value=contacts.cusbirthday, autocomplete='off') + i.layui-icon(style='position: absolute;right: 3px;top: 6px;font-size: 25px;')  + .layui-form-item + .layui-inline + label.layui-form-label 联系电话: + .layui-input-inline + input.layui-input(type='text', name='phone', value= contacts.phone, autocomplete='off') + .layui-inline.uckefu-inline + label.layui-form-label 手机号: + .layui-input-inline + input.layui-input(type='text', name='mobileno', value= contacts.mobileno, autocomplete='off') + .layui-form-item + .layui-inline + label.layui-form-label 城市: + .layui-input-inline(style='width: 80px;') + +sysDicSelect("com.dic.address.area", "province", contacts.province, {'lay-ignore': true}, "width:85px;") + .layui-inline + .layui-input-inline#contacts_city(style='width: 80px;') + +sysDicSelect(contacts.city + '.subdic', "city",contacts.city, {'lay-ignore': true}, "width:86px;") + .layui-inline.uckefu-inline + label.layui-form-label 电子邮件: + .layui-input-inline(style='margin-left:5px;') + input.layui-input(type='text', name='email', lay-verify='entemail', value= contacts.email, autocomplete='off') + .layui-form-item + .layui-inline + label.layui-form-label#contacts_skypeid(style='widht:80px;') skypeID: + .layui-input-inline + input.layui-input(type='text', name='skypeid', lay-verify='skypeid', autocomplete, value= contacts.skypeid) + .layui-form-item + .layui-inline + label.layui-form-label 联系人地址: + .layui-input-inline(style='width: 664px;') + input.layui-input(type='text', name='address', autocomplete='off', value= contacts.address) + .layui-form-item + .layui-inline + label.layui-form-label 联系人说明: + .layui-input-inline(style='width: 664px;') + textarea.layui-textarea(name='memo', placeholder='请输入内容', style='resize:none;') #{contacts.memo} + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 立即提交 + button.layui-btn.layui-btn-original(type='reset') 重置 +script. + //Demo + $('#province').change(function () { + loadURL('/res/dic.html?id=' + $(this).val() + "&name=city&attr=lay-ignore&style=width:85px;", '#city'); + }) + + layui.use('form', function () { + var form = layui.form(); + form.render(); //更新全部 + form.verify({ + entemail: function (value) { + if (value != "" && !new RegExp(/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/).test(value)) { + return '请输入正确的电子邮箱地址'; + } + }, + required: function (value) { + if (value.length > 100) { + return '联系人名称不能超过100'; + } + } + }); + }); + + layui.use('element', function () { + var element = layui.element(); + }); + + layui.use('laydate', function () { + var laydate = layui.laydate; + + var date = { + min: '1950-01-01 00:00:00', + max: laydate.now(), + istoday: false + }; + + document.getElementById('getdate').onclick = function () { + date.elem = this; + laydate(date); + } + + document.getElementById('cusbirthday').onclick = function () { + date.elem = this; + laydate(date); + } + }); + diff --git a/contact-center/app/src/main/resources/templates/apps/contacts/embed/add.pug b/contact-center/app/src/main/resources/templates/apps/contacts/embed/add.pug new file mode 100644 index 00000000..e76adc47 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/contacts/embed/add.pug @@ -0,0 +1,134 @@ +include /mixins/dic.mixin.pug +.uk-layui-form + form.layui-form(action='/apps/contacts/embed/save.html', data-toggle='ajax-form', data-close='false', data-target='#mainajaxwin', method='post') + input(type='hidden', name='agentserviceid', value=agentserviceid) + input(type='hidden', name='shares', value='all') + .layui-collapse + .layui-colla-item + h2.layui-colla-title 基本信息 + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label.layui-form-label 获得时间: + .layui-input-inline + input#getdate.layui-input(type='text', name='touchtime', readonly, lay-verify='date', autocomplete='off') + i.layui-icon(style='position: absolute;right: 3px;top: 6px;font-size: 25px;')  + .layui-inline + font(color='red') *(必填项) + | (您得到此联系人的时间) + .layui-inline + label.layui-form-label(style='width:60px;line-height: 35px;') 类型: + .layui-input-inline(style='width:218px;margin-right:0px;padding-top:9px;') + +sysDicSelect('com.dic.contacts.ckind', 'ckind', '', { + 'lay-ignore': true, + 'required': true, + 'lay-verify': 'required' + }) + .layui-colla-item + h2.layui-colla-title 联系人信息 + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label.layui-form-label#cusname 联系人名称: + .layui-input-inline + input.layui-input(type='text', name='name', required, lay-verify='required', autocomplete='off') + .layui-inline + font(color='red') *(必填项) + .layui-form-item + .layui-inline + label.layui-form-label 性别: + .layui-input-inline + .layui-input-block(style='width:220px;') + input(type='radio', name='gender', value='1', title='男') + input(type='radio', name='gender', value='0', title='女') + input(type='radio', name='gender', value='-1', title='未知', checked) + .layui-inline.uckefu-inline + label.layui-form-label 生日: + .layui-input-inline + input#cusbirthday.layui-input(type='text', name='cusbirthday', autocomplete='off') + i.layui-icon(style='position: absolute;right: 3px;top: 6px;font-size: 25px;')  + .layui-form-item + .layui-inline + label.layui-form-label 联系电话: + .layui-input-inline + input.layui-input(type='text', name='phone', autocomplete='off') + .layui-inline.uckefu-inline + label.layui-form-label 手机号: + .layui-input-inline + input.layui-input(type='text', name='mobileno', autocomplete='off') + .layui-form-item + .layui-inline + label.layui-form-label 城市: + .layui-input-inline(style='width: 80px;') + +sysDicSelect("com.dic.address.area", "province", "", {'lay-ignore': true}, "width:85px;") + .layui-inline + .layui-input-inline#contacts_city(style='width: 80px;') + +sysDicSelect("com.dic.address.city", "city", "", {'lay-ignore': true}, "width:86px;") + .layui-inline.uckefu-inline + label.layui-form-label 电子邮件: + .layui-input-inline(style='margin-left:5px;') + input.layui-input(type='text', name='email', lay-verify='entemail', autocomplete='off') + .layui-form-item + .layui-inline + label.layui-form-label#contacts_skypeid(style='widht:80px;') Skype ID: + .layui-input-inline + input#skypeid.layui-input(type='text', name='skypeid', lay-verify='skypeid', autocomplete='off') + .layui-form-item + .layui-inline + label.layui-form-label 联系人地址: + .layui-input-inline(style='width: 664px;') + input.layui-input(type='text', name='address', autocomplete='off') + .layui-form-item + .layui-inline + label.layui-form-label 联系人说明: + .layui-input-inline(style='width: 664px;') + textarea.layui-textarea(name='memo', placeholder='请输入内容', style='resize:none;') + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 立即提交 + button.layui-btn.layui-btn-original(type='reset', href='/apps/contacts/embed/index.html?agentserviceid=#{agentserviceid}', data-toggle='load', data-target='#mainajaxwin') 返回 +script. + //Demo + $('#province').change(function () { + loadURL('/res/dic.html?id=' + $(this).val() + "&name=city&attr=lay-ignore&style=width:85px;", '#city'); + }) + layui.use('form', function () { + var form = layui.form(); + form.render(); //更新全部 + form.verify({ + entemail: function (value) { + if (value != "" && !new RegExp(/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/).test(value)) { + return '请输入正确的电子邮箱地址'; + } + }, + required: function (value) { + if (value.length > 100) { + return '联系人名称不能超过100'; + } + } + }); + }); + layui.use('element', function () { + var element = layui.element(); + }); + layui.use('laydate', function () { + var laydate = layui.laydate; + + var date = { + min: '1950-01-01 00:00:00', + max: laydate.now(), + istoday: false + }; + + document.getElementById('getdate').onclick = function () { + date.elem = this; + laydate(date); + } + + document.getElementById('cusbirthday').onclick = function () { + date.elem = this; + laydate(date); + } + + }); + diff --git a/contact-center/app/src/main/resources/templates/apps/contacts/embed/edit.pug b/contact-center/app/src/main/resources/templates/apps/contacts/embed/edit.pug new file mode 100644 index 00000000..1e687656 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/contacts/embed/edit.pug @@ -0,0 +1,136 @@ +include /mixins/dic.mixin.pug +.uk-layui-form + form.layui-form(action='/apps/contacts/embed/update.html', data-toggle="ajax-form" data-close="false" data-target="#mainajaxwin" method="post") + input(type='hidden', name='id', value=contacts.id) + input(type='hidden', name='agentserviceid', value=agentserviceid) + input(type='hidden', name='shares', value='all') + .layui-collapse + .layui-colla-item + h2.layui-colla-title 基本信息 + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label.layui-form-label 获得时间: + .layui-input-inline + input#getdate.layui-input(type='text', name='touchtime', value=(contacts.touchtime ? pugHelper.formatDate('yyyy-MM-dd', contacts.touchtime) : ""), readonly, lay-verify='date', autocomplete='off') + i.layui-icon(style='position: absolute;right: 3px;top: 6px;font-size: 25px;')  + .layui-inline + font(color='red') *(必填项) + | (您得到此联系人的时间) + .layui-inline + label.layui-form-label(style='width:60px;line-height: 35px;') 类型: + .layui-input-inline(style='width:218px;margin-right:0px;padding-top:9px;') + if contacts.ckind && contacts.ckind != '' + +sysDicSelect('com.dic.contacts.ckind', 'ckind', contacts.ckind, "lay-ignore required lay-verify='required'") + else + +sysDicSelect('com.dic.contacts.ckind', 'ckind', '', "lay-ignore") + .layui-colla-item + h2.layui-colla-title 联系人信息 + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label.layui-form-label#cusname 联系人名称: + .layui-input-inline + input.layui-input(type='text', name='name', value= contacts.name, required, lay-verify='required', autocomplete='off') + .layui-inline + font(color='red') *(必填项) + .layui-form-item + .layui-inline + label.layui-form-label 性别: + .layui-input-inline + .layui-input-block(style='width:220px;') + input(type='radio', name='gender', value='1', title='男') + input(type='radio', name='gender', value='0', title='女') + input(type='radio', name='gender', value='-1', title='未知', checked) + .layui-inline.uckefu-inline + label.layui-form-label 生日: + .layui-input-inline + input#cusbirthday.layui-input(type='text', name='cusbirthday', value=contacts.cusbirthday, autocomplete='off') + i.layui-icon(style='position: absolute;right: 3px;top: 6px;font-size: 25px;')  + .layui-form-item + .layui-inline + label.layui-form-label 联系电话: + .layui-input-inline + input.layui-input(type='text', name='phone', value= contacts.phone, autocomplete='off') + .layui-inline.uckefu-inline + label.layui-form-label 手机号: + .layui-input-inline + input.layui-input(type='text', name='mobileno', value= contacts.mobileno, autocomplete='off') + .layui-form-item + .layui-inline + label.layui-form-label 城市: + .layui-input-inline(style='width: 80px;') + +sysDicSelect("com.dic.address.area", "province", contacts.province, {'lay-ignore': true}, "width:85px;") + .layui-inline + .layui-input-inline#contacts_city(style='width: 80px;') + +sysDicSelect(contacts.city + '.subdic', "city",contacts.city, {'lay-ignore': true}, "width:86px;") + .layui-inline.uckefu-inline + label.layui-form-label 电子邮件: + .layui-input-inline(style='margin-left:5px;') + input.layui-input(type='text', name='email', lay-verify='entemail', value= contacts.email, autocomplete='off') + .layui-form-item + .layui-inline + label.layui-form-label#contacts_skypeid(style='widht:80px;') skypeID: + .layui-input-inline + input.layui-input(type='text', name='skypeid', lay-verify='skypeid', autocomplete, value= contacts.skypeid) + .layui-form-item + .layui-inline + label.layui-form-label 联系人地址: + .layui-input-inline(style='width: 664px;') + input.layui-input(type='text', name='address', autocomplete='off', value= contacts.address) + .layui-form-item + .layui-inline + label.layui-form-label 联系人说明: + .layui-input-inline(style='width: 664px;') + textarea.layui-textarea(name='memo', placeholder='请输入内容', style='resize:none;') #{contacts.memo} + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 立即提交 + button.layui-btn.layui-btn-original(type='reset',href="/apps/contacts/embed/index.html?agentserviceid=#{agentserviceid}" data-toggle="load" data-target="#mainajaxwin") 返回 +script. + //Demo + $('#province').change(function () { + loadURL('/res/dic.html?id=' + $(this).val() + "&name=city&attr=lay-ignore&style=width:85px;", '#city'); + }) + + layui.use('form', function () { + var form = layui.form(); + form.render(); //更新全部 + form.verify({ + entemail: function (value) { + if (value != "" && !new RegExp(/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/).test(value)) { + return '请输入正确的电子邮箱地址'; + } + }, + required: function (value) { + if (value.length > 100) { + return '联系人名称不能超过100'; + } + } + }); + }); + + layui.use('element', function () { + var element = layui.element(); + }); + + layui.use('laydate', function () { + var laydate = layui.laydate; + + var date = { + min: '1950-01-01 00:00:00', + max: laydate.now(), + istoday: false + }; + + document.getElementById('getdate').onclick = function () { + date.elem = this; + laydate(date); + } + + document.getElementById('cusbirthday').onclick = function () { + date.elem = this; + laydate(date); + } + }); + diff --git a/contact-center/app/src/main/resources/templates/apps/contacts/embed/index.pug b/contact-center/app/src/main/resources/templates/apps/contacts/embed/index.pug new file mode 100644 index 00000000..03ddd0e5 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/contacts/embed/index.pug @@ -0,0 +1,134 @@ +.ukefu-contacts-embed + .row + .col-lg-12 + h1.site-h1.ukefu-tab(style='border-top:1px solid #e6e6e6;height:26px;') + span.ukefu-bt + i.layui-icon.ukewo-btn(style='font-size:20px;')  + .ukefu-bt-text + .ukefu-bt-text-title 全部联系人(#{contactsList.totalElements}) + .ukefu-bt-text-content(style='position: absolute;right: 5px;top: 0px;') + form.layui-form(name='contactsSearch', action='/apps/contacts/embed/index.html', data-toggle='ajax-form', data-close='false', data-target='#mainajaxwin', style='float: left;') + .layui-form-item + .layui-inline + .layui-input-inline(style='width: 220px') + input.layui-input(type='text', name='q', value=q, style='height: 30px;line-height: 30px;margin-top: 4px;border: 1px solid #32c24d;', placeholder='请输入联系人姓名或电话', autocomplete='off') + i.layui-icon(style='position: absolute;cursor: pointer;right: 3px;top: 4px;font-size: 20px;color:#32c24d;')  + //i.layui-icon(onclick="$('#contactsFormSubmit')".click(), style='position: absolute;cursor: pointer;right: 3px;top: 4px;font-size: 20px;color:#32c24d;')  + //button(type="submit" id="contactsFormSubmit") + .layui-btn-group + a.layui-btn.layui-btn-small(href='/apps/contacts/embed/add.html?agentserviceid=#{agentserviceid}', title='新建联系人', data-toggle='load', data-target='#mainajaxwin') + i.layui-icon  + | 新建联系人 + table.layui-table(lay-skin='line', style='table-layout: fixed;word-break: break-all;') + thead + tr.design-sortable-tr + th(width='20px') + th(width='30%') 联系人姓名 + th(width='140px') 手机 + th 邮件 + th(width='50px') 性别 + th 类型 + th(width='70px') 操作 + tbody + if contactsList && contactsList.content && contactsList.content.size() > 0 + for contacts in contactsList.content + tr.tdHasContorllor.design-dropable-td.ukefu-contacts + td(style="width:1px;padding:10px 0px 10px 10px;") + input(type="checkbox",checked=(currentContacsId == contacts.id ? 'checked' : false),name="id" class="ctxid" value=contacts.id, id="contacts_#{contacts.id}") + if currentContacsId == contacts.id && currentAgentUserContactsId + input#currentContacsId(type="text", value=currentAgentUserContactsId, style="display: none") + td(title=contacts.name,style="text-overflow: ellipsis;white-space: nowrap;overflow: hidden;") + | #{contacts.name} + td + span.ukefu-phone-number + | #{contacts.mobileno} + td + | #{contacts.email} + td + if contacts.gender && contacts.gender == '1' + | 男 + if contacts.gender && contacts.gender == '0' + | 女 + if contacts.gender && contacts.gender == '-1' + | 未知 + td + | #{uKeFuDic[contacts.ckind].name} + td(style="white-space:nowrap;width:1%;" nowrap="nowrap") + a(href="/apps/contacts/embed/edit.pug?id="+contacts.id+"&agentserviceid="+agentserviceid,data-toggle="load" data-target="#mainajaxwin") + i.layui-icon  编辑 + else + tr + td(colspan="8" style="height:400px;") + .ukefu-empty(style="background: none") + i.layui-icon  + p= '还没有联系人信息' + .row(style='padding:5px;') + .col-lg-12#page(style='text-align:center;') +.layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='contactsForm') 立即提交 + button.layui-btn.layui-btn-original(type='reset', onclick='layer.close(top.layerwin);') 关闭 +script. + $("input:checkbox").click(function () { + if (!$(this).is(':checked')) { + setTimeout(function () { + $("input[type='checkbox']").prop("checked", false); + }, 0) + + } + }); + + layui.use('form', function () { + var form = layui.form(); + form.on('submit(contactsForm)', function (data) { + var targetIFrame = eval(iframe); + var selectedContactId = $("input:checked.ctxid").val(); + if (selectedContactId) { + targetIFrame.Proxy.execLinkContactsFunction(selectedContactId); + } else { + var currentAgentUserContactsId = $("#currentContacsId").val(); + targetIFrame.Proxy.execCancelContactsFunction(currentAgentUserContactsId); + } + + layer.closeAll("page"); + return false; + }); + }); + + layui.use('layer', function () { + var layer = layui.layer; + var msg = '#{msg}'; + if (msg && msg == 'new_contacts_success') + layer.msg('联系人添加成功', {icon: 1, time: 1500}) + else if (msg && msg == 'new_contacts_fail') + layer.msg('联系人添加失败,因为存在相同skypeid', {icon: 2, time: 1500}) + else if (msg && msg == 'edit_contacts_success') + layer.msg('联系人编辑成功', {icon: 1, time: 1500}) + else if (msg && msg == 'edit_contacts_fail') + layer.msg('联系人编辑失败,因为存在相同Skype ID', {icon: 2, time: 1500}) + }); + + layui.use(['laypage'], function () { + var laypage = layui.laypage; + + laypage({ + cont: 'page', + pages: '#{contactsList ? contactsList.totalPages : 0}', //总页数 + curr: '#{contactsList ? contactsList.number + 1 : 0}', + groups: 5 //连续显示分页数 + , jump: function (data, first) { + if (!first) { + loadURL("/apps/contacts/embed/index.html?#{q?'q=q&':''}p=" + data.curr, "#mainajaxwin"); + } + } + }); + }); + $('.ukefu-contacts td:not(:last-child)').on("click", function () { + $('.ctxid').prop("checked", false); + if ($(this).parent().find("input").prop("checked")) { + $(this).parent().find("input").prop("checked", false); + } else { + $(this).parent().find("input").prop("checked", true); + } + }); + diff --git a/contact-center/app/src/main/resources/templates/apps/contacts/embed/pages.pug b/contact-center/app/src/main/resources/templates/apps/contacts/embed/pages.pug new file mode 100644 index 00000000..8f91b5fb --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/contacts/embed/pages.pug @@ -0,0 +1,23 @@ +if contactsList && contactsList.content && contactsList.content.size() > 0 + for contacts in contactsList.content + tr.tdHasContorllor.design-dropable-td.ukefu-contacts + td(style="width:1px;padding:10px 0px 10px 10px;") + input(type="checkbox",name="id" class="ctxid" value=contacts.id, id="contacts_#{contacts.id}") + td.first_td_head + | #{contacts.name} + td + | #{contacts.mobileno} + td + | #{contacts.email} + td + if contacts.gender && contacts.gender == '1' + | 男 + if contacts.gender && contacts.gender == '0' + | 女 + if contacts.gender && contacts.gender == '-1' + | 未知 + td + | #{uKeFuDic[contacts.ckind].name} + td(style="white-space:nowrap;width:1%;" nowrap="nowrap") + a(href="/apps/contacts/embed/edit.pug?id=" + (contacts.id ? contacts.id : ""), data-toggle="ajax" data-width="950" data-height="600" data-title="编辑联系人信息") + i.layui-icon  编辑 diff --git a/contact-center/app/src/main/resources/templates/apps/contacts/imp.pug b/contact-center/app/src/main/resources/templates/apps/contacts/imp.pug new file mode 100644 index 00000000..c8fefddb --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/contacts/imp.pug @@ -0,0 +1,56 @@ +// <#include "/public/macro.html"> +.uk-layui-form + form.layui-form(action='/apps/contacts/impsave.html', enctype='multipart/form-data', method='post') + if ckind + input(type="hidden" name="ckind" value= ckind) + .layui-collapse + .layui-colla-item + h2.layui-colla-title 选择导入的数据文件 + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label.layui-form-label 数据文件: + .layui-input-inline + .layui-box.layui-upload-button(style='width: 100%;') + input.layui-upload-file(type='file', name='cusfile', required, lay-verify='required', accept='application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', lay-ext='jpg|png|gif', onchange='$(\'#cus_file\').html($(this).val());') + span.layui-upload-icon + i.layui-icon  + .layui-inline + font(color='red') *(必填项) + | (需要导入的联系人数据Excel文件) + a(href='/res/template.html?filename=contacts_template.xlsx', target='_blank', style='margin-left:20px;') + i.layui-icon  + | 下载模板 + .layui-form-item(style='height:40px;line-height:40px;') + .layui-inline + label.layui-form-label + .layui-input-inline#cus_file(style='width:500px;'). + .layui-colla-item + h2.layui-colla-title 联系人信息导入说明,导入步骤: + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label.layui-form-label#cusname 第一步: + .layui-input-inline(style='width:auto;padding-top:9px;') 上传联系人数据的Excel文件 + .layui-form-item + .layui-inline + label.layui-form-label#cusname 第二步: + .layui-input-inline(style='width:auto;padding-top:9px;') 选择Excel里的列与系统联系人的字段对应关系 + .layui-form-item + .layui-inline + label.layui-form-label#cusname 第三步: + .layui-input-inline(style='width:auto;padding-top:9px;') 开始导入联系人数据 + .ukefu-imp-tips. + 自动匹配联系人导入字段功能,无需下载模板,系统自动匹配,客户数据直接导入,使用更加方便、快捷、智能。 + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 立即导入 +script. + layui.use('upload', function(){ + var target = $(this).attr("data-target"); + }); + layui.use('form', function(){ + var form = layui.form(); + form.render(); + }); + diff --git a/contact-center/app/src/main/resources/templates/apps/contacts/include/left.pug b/contact-center/app/src/main/resources/templates/apps/contacts/include/left.pug new file mode 100644 index 00000000..20f5120b --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/contacts/include/left.pug @@ -0,0 +1,13 @@ +ul.layui-nav.layui-nav-tree(lay-filter='setting') + li.layui-nav-item.layui-nav-itemed + if user.roleAuthMap["A02_A01"] || user.admin + a.layui-nav-title(href="javascript:;") 联系人 + dl.layui-nav-child + if user.roleAuthMap["A02_A01_A01"] || user.admin + dd(class={'layui-this': !ckind}) + a(href="/apps/contacts/index.html") 全部联系人 + if user.roleAuthMap["A02_A01_A02"] || user.admin + if uKeFuDic['com.dic.contacts.ckind'] + for dic in uKeFuDic['com.dic.contacts.ckind'] + dd(class={'layui-this': ckind && ckind == dic.id}) + a(href="/apps/contacts/" + (subtype ? subtype : "index") + ".html?ckind=" + dic.id)= dic.name \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/contacts/index.pug b/contact-center/app/src/main/resources/templates/apps/contacts/index.pug new file mode 100644 index 00000000..1557f8c5 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/contacts/index.pug @@ -0,0 +1,249 @@ +extends /apps/include/layout.pug +include /mixins/client.mixin.pug + +block content + .layui-side.layui-bg-black + .layui-side-scroll + include /apps/contacts/include/left.pug + .layui-body + .layui-side-scroll + .row + .col-lg-12 + h1.site-h1.ukefu-tab(style='border-top:1px solid #e6e6e6;height:26px;') + span.ukefu-bt + i.layui-icon.ukewo-btn(style='font-size:20px;')  + .ukefu-bt-text + .ukefu-bt-text-title 全部联系人 + .ukefu-bt-text-content(style='position: absolute;right: 5px;top: 0px;') + form.layui-form(name='search', action='/apps/contacts/' + (subtype) + '.html', method='get', style='float: left;') + if ckind + input(type='hidden' name='ckind' value= ckind) + input(type='hidden' name='saveStatus' value= saveStatus) + .layui-form-item + .layui-inline + .layui-input-inline(style='width: 218px;') + input#q.layui-input(type='text', name='q', value= q, style='height: 30px;line-height: 30px;margin-top: 4px;border: 1px solid #32c24d;', placeholder='请输入联系人姓名或电话', autocomplete='off') + i.layui-icon(onclick='search.submit()', style='position: absolute;cursor: pointer;right: 3px;top: 4px;font-size: 20px;color:#32c24d;')  + if user.roleAuthMap["A02_A01_A02_B05"] || user.admin + .layui-btn-group(style="margin-right: 5px !important;") + a(class="layui-btn layui-btn-small", href="/apps/contacts/add.html?ckind=" + (ckind ? '?ckind=' + ckind : ''), title="新建联系人", data-toggle="ajax", data-width="950", data-height="600") + i.layui-icon  + | 新建联系人 + if user.roleAuthMap["A02_A01_A02_B08"] || user.admin + .layui-btn-group.ukefu-btn-group(style="margin-right: 5px !important;") + button(class="layui-btn layui-btn-small", href="/apps/contacts/imp.pug" + (ckind ? '?ckind=' + ckind : ''), title="导入联系人", data-toggle="ajax", data-width="950", data-height="600") + i.kfont  + | 导入 + if user.roleAuthMap["A02_A01_A02_B09"] || user.admin + .layui-btn-group.ukefu-btn-group + button(class="layui-btn layui-btn-small dropdown-menu" + (!currentOrgan ? noexport : "")) + i.kfont  + | 导出 + i.layui-icon  + if currentOrgan + ul.ukefu-dropdown-menu.layui-anim.layui-anim-upbit + li + a(href="javascript:void(0)" id="batexp" title="导出联系人" target="_blank") + i.kfont  + | 导出选中结果 + li + a(href="/apps/contacts/expsearch.html?1=1&q=" + (q ? q : "") + "&ckind=" + (ckind ? ckind : "") + "&subtype=" + (subtype ? subtype : ""), title="导出联系人" target="_blank") + i.kfont  + | 导出当前搜索结果 + li + a(href="/apps/contacts/expsearch.html?ckind=" + (ckind ? ckind : ""), title="导出联系人" target="_blank") + i.kfont  + | 导出全部数据 + .ukefu-tab-title(style='margin-top: 10px; margin-left: 22px') + include /apps/contacts/top.pug + table.layui-table(lay-skin='line', style='table-layout: fixed') + thead + tr.design-sortable-tr + th(style="width: 10px;") + input#all(type='checkbox', onclick='$(\'.ids\').prop(\'checked\' , $(this).prop(\'checked\'));') + th 联系人姓名 + th 手机 + th 邮件 + th(width='30px') 性别 + th 生日 + th 类型 + th 所有者 + th(width='120px') 操作 + tbody(style='table-layout: fixed; word-break: break-all;') + if contactsList.content && contactsList.content.size() > 0 + for contacts in contactsList.content + tr.tdHasContorllor.design-dropable-td + td(style="width:1%;") + input(type="checkbox" class="ids" name="ids" value=contacts.id) + td(title=contacts.name) + a(href="/apps/contacts/detail.pug?id=" + contacts.id)= contacts.name + td + span.ukefu-phone-number= contacts.mobileno + td(title= contacts.email) + p= contacts.email + td + if (contacts.gender && contacts.gender == '1') + span= '男' + if (contacts.gender && contacts.gender == '0') + span= '女' + if (contacts.gender && contacts.gender == '-1') + span= '未知' + td #{contacts.cusbirthday} + td #{contacts.ckind && uKeFuDic[contacts.ckind] ? uKeFuDic[contacts.ckind].name : ""} + td #{contacts.user ? contacts.user.username : ""} + td + if approachable.contains(contacts.id) + a(href="#", onclick="openDialogWinByContactid('" + contacts.id + "')") + i.layui-icon  + | 聊天 + else + a.disabled(href="#", onclick="unreachableDialogWinByContactid('" + contacts.id + "')") + i.layui-icon  + | 聊天 + a(href="/apps/contacts/detail.pug?id=" + (contacts.id ? contacts.id : ""), style="margin-left:10px;") + i.layui-icon  + | 详情 + if (user.roleAuthMap["A02_A01_A02_B06"] || user.admin) + a(href="/apps/contacts/edit.pug?id=" + (contacts.id ? contacts.id : "") + "&ckind=" + (ckind ? ckind : ""), data-toggle="ajax" data-width="950" data-height="600" data-title="编辑联系人信息") + i.layui-icon  + | 编辑 + if (user.roleAuthMap["A02_A01_A02_B07"] || user.admin) + a(href="/apps/contacts/delete.pug?id=" + (contacts.id ? contacts.id : "") + "&ckind=" + (ckind ? ckind : ""), style="margin-left:10px;" data-toggle="tip" data-title="请确认是否删除联系人?") + i.layui-icon(style="color:red;") ဆ + | 删除 + else + tr + td(colspan="8" style="height:400px;") + .ukefu-empty(style="background: none") + i.layui-icon  + p= '还没有联系人信息' + .row(style='padding:5px;') + .col-lg-12#page(style='text-align:center;') + + style. + .noexport { + background: grey !important; + } + + script(src='/js/CSKeFu_Rest_Request.v1.js') + script. + $(document).ready(function () { + $('#batexp').click(function () { + var ids = ""; + var num = 0; + $('.ids').each(function () { + if ($(this).prop("checked")) { + if (ids != "") { + ids += "&"; + } + ids += "ids=" + $(this).val(); + num++; + } + }); + if (num > 0) { + $('#batexp').attr('href', '/apps/contacts/expids.html?' + ids); + } else { + top.layer.alert("请先选择需要导出的联系人信息"); + $('#batexp').attr("href", "javascript:void(0)"); + } + }); + }); + layui.use(['laypage', 'layer'], function () { + var laypage = layui.laypage, + layer = layui.layer; + laypage({ + cont: 'page', + pages: #{contactsList ? contactsList.totalPages : 0}, //总页数 + curr: #{contactsList ? contactsList.number + 1 : 0}, + groups: 5, //连续显示分页数 + jump: function (data, first) { + if (!first) { + location.href = "/apps/contacts/#{subtype ? subtype : 'index'}.html?ckind=#{ckind}&p=" + data.curr + "&q=" + $("#q").val(); + } + } + }); + + layui.use('layer', function () { + var layer = layui.layer; + var msg = '#{msg}'; + + if (msg && msg == 'new_contacts_success') + layer.msg('联系人添加成功', {icon: 1, time: 1500}) + else if (msg && msg == 'new_contacts_fail') + layer.msg('联系人添加失败,因为存在相同skypeid', {icon: 2, time: 1500}) + else if (msg && msg == 'edit_contacts_success') + layer.msg('联系人编辑成功', {icon: 1, time: 1500}) + else if (msg && msg == 'edit_contacts_fail') + layer.msg('联系人编辑失败,因为存在相同Skype ID', {icon: 2, time: 1500}) + }); + }); + + function unreachableDialogWinByContactid(id) { + layer.msg('该联系人正在被其它客服服务或没有可触达的联系方式!', {icon: 2, time: 3000}) + } + + function openDialogWinByContactid(id) { + var multiMediaDialogWin = parent.$('#multiMediaDialogWin'); + restApiRequest({ + path: 'contacts', + data: { + ops: "approach", + contactsid: id + }, + silent: true + }).then(function (data) { + if (data.rc == 0) { + // 返回可用的触达渠道列表 data.data + if (multiMediaDialogWin.length > 0) { + multiMediaDialogWin.load(function () { + parent.layui.element().tabChange('ukefutab', 'multiMediaDialogWin'); + }).attr('src', '/agent/proactive.html?contactid=' + id + '&channels=' + data.data); + } else { + // 使用API调用,由SocketIO传达弹屏通知,跳转到该访客页面 + restApiRequest({ + path: 'contacts', + silent: true, + data: { + ops: 'proactive', + channels: data.data, + contactid: id + } + }).then(function (result) { + if (result.rc == 0) { + // 操作成功,等待弹屏 + } else { + // 操作未成功,进行提示 + top.layer.msg('未能成功发起会话,请稍后再试!', {icon: 2, time: 3000}) + } + }, handleRestApiFail); + } + } else if (data.status) { + handleRestApiFail(data.status, data.data); + } else { + layer.msg('该联系人没有触达的方式', {icon: 2, time: 1500}) + } + }); + } + + style. + .design-sortable-tr { + text-align: center; + } + + .design-sortable-tr th { + /*设置表格文字左右和上下居中对齐*/ + vertical-align: middle; + text-align: left; + /*设置表格文字在一行显示*/ + text-overflow: ellipsis; + word-break: keep-all; + white-space: nowrap; + } + + .design-dropable-td td p { + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; + } + diff --git a/contact-center/app/src/main/resources/templates/apps/contacts/top.pug b/contact-center/app/src/main/resources/templates/apps/contacts/top.pug new file mode 100644 index 00000000..6c781d80 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/contacts/top.pug @@ -0,0 +1,13 @@ +ul.tab-title + if user.roleAuthMap["A02_A01_A02_B01"] || user.admin + li(class={'layui-this': subtype == 'index'}) + a(href="/apps/contacts/index.html" + (ckind ? '?ckind=' + (ckind) : ""))= "全部联系人" + (subtype == 'index' ? "(" + (contactsList ? contactsList.totalElements : 0) + ")" : "") + if user.roleAuthMap["A02_A01_A02_B02"] || user.admin + li(class={'layui-this': subtype == 'today'}) + a(href="/apps/contacts/today.html" + (ckind ? '?ckind=' + (ckind) : ""))= "今日新增" + (subtype == 'today' ? "(" + (contactsList ? contactsList.totalElements : 0) + ")" : "") + if user.roleAuthMap["A02_A01_A02_B03"] || user.admin + li(class={'layui-this': subtype == 'week'}) + a(href="/apps/contacts/week.html" + (ckind ? '?ckind=' + (ckind) : ""))= "本周新增" + (subtype == 'week' ? "(" + (contactsList ? contactsList.totalElements : 0) + ")" : "") + if user.roleAuthMap["A02_A01_A02_B04"] || user.admin + li(class={'layui-this': subtype == 'creater'}) + a(href="/apps/contacts/creater.html" + (ckind ? '?ckind=' + (ckind) : ""))= "我的联系人" + (subtype == 'creater' ? "(" + (contactsList ? contactsList.totalElements : 0) + ")" : "") \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/customer/add.pug b/contact-center/app/src/main/resources/templates/apps/customer/add.pug new file mode 100644 index 00000000..ae99974c --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/customer/add.pug @@ -0,0 +1,183 @@ +include /mixins/dic.mixin.pug + +.uk-layui-form + form.layui-form(action="/apps/customer/save.html", method="post") + input(type="hidden", name="entcustomer.shares", value="all") + input(type="hidden", name="contacts.shares", value="all") + .layui-collapse + .layui-colla-item + h2.layui-colla-title 基本信息 + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label.layui-form-label 获得时间: + .layui-input-inline + input#getdate.layui-input(type="text", name="entcustomer.touchtime", readonly="readOnly", lay-verify="date", autocomplete="off") + i.layui-icon(style="position: absolute;right: 3px;top: 6px;font-size: 25px;")  + .layui-inline + font(color="red") *(必填项) + | (您得到此客户的时间) + .layui-inline + label.layui-form-label(style="width:60px") 类型: + .layui-input-inline(style="width:218px;margin-right:0px;padding-top:9px;") + input(type="radio", name="entcustomer.etype", value="enterprise", title="企业客户", checked="", lay-filter="etype") + input(type="radio", name="entcustomer.etype", value="personal", title="个人客户", lay-filter="etype") + .layui-colla-item + h2.layui-colla-title 企业信息 + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label#cusname.layui-form-label 客户名称: + .layui-input-inline + input.layui-input(type="text", name="entcustomer.name", required="", lay-verify="customer_username", autocomplete="off") + .layui-inline + font(color="red") *(必填项) + .layui-form-item + .layui-inline + label.layui-form-label 联系电话: + .layui-input-inline + input.layui-input(type="text", name="entcustomer.phone", autocomplete="off") + .layui-inline.uckefu-inline + label.layui-form-label 电子邮件: + .layui-input-inline + input.layui-input(type="text", name="entcustomer.email", lay-verify="entemail", autocomplete="off") + .layui-form-item + .layui-inline + label.layui-form-label 城市: + .layui-input-inline(style="width:80px;") + +sysDicSelect('com.dic.address.area','entcustomer.province','',{'lay-ignore': true},'width:85px;') + .layui-inline + #city.layui-input-inline(style="width:80px;") + +sysDicSelect('com.dic.address.city','entcustomer.city','',{'lay-ignore': true},'width:86px;') + .layui-form-item + .layui-inline + label.layui-form-label 客户地址: + .layui-input-inline(style="width: 664px;") + input.layui-input(type="text", name="entcustomer.address", autocomplete="off") + .layui-form-item + .layui-inline + label.layui-form-label 客户类型: + .layui-input-inline + +sysDicSelect('com.dic.contacts.entype','entcustomer.ekind',ekind,{'lay-ignore': true}) + .layui-inline.uckefu-inline + label.layui-form-label 客户级别: + .layui-input-inline + +sysDicSelect('com.dic.contacts.elevel','entcustomer.elevel','',{'lay-ignore': true}) + .layui-form-item + .layui-inline + label.layui-form-label 客户来源: + .layui-input-inline + +sysDicSelect('com.dic.contacts.esource','entcustomer.esource','',{'lay-ignore': true}) + .layui-inline.uckefu-inline + label.layui-form-label 成熟度: + .layui-input-inline + +sysDicSelect('com.dic.contacts.maturity','entcustomer.maturity','',{'lay-ignore': true}) + .layui-form-item + .layui-inline + label.layui-form-label 行业: + .layui-input-inline + +sysDicSelect('com.dic.contacts.industry','entcustomer.industry','',{'lay-ignore': true}) + .layui-inline.uckefu-inline + label.layui-form-label 客户状态: + .layui-input-inline + +sysDicSelect('com.dic.contacts.validstatus','entcustomer.validstatus','',{'lay-ignore': true}) + .layui-form-item + .layui-inline + label.layui-form-label 客户说明: + .layui-input-inline(style="width: 664px;") + textarea.layui-textarea(name="entcustomer.description", placeholder="请输入内容", style="resize:none;") + #contacts_info.layui-colla-item + h2.layui-colla-title + | 联系人信息 + font(color="red") (提示:创建企业信息后可在个人客户里添加更多联系人) + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label.layui-form-label 姓名: + .layui-input-inline + input.layui-input(type="text", name="contacts.name", autocomplete="off", lay-verify="customer_username") + .layui-inline.uckefu-inline + label.layui-form-label 性别: + .layui-input-inline(style="width:auto;") + .layui-input-block + input(type="radio", name="contacts.gender", value="男", title="男") + input(type="radio", name="contacts.gender", value="女", title="女", checked="") + .layui-form-item + .layui-inline + label.layui-form-label 生日: + .layui-input-inline + input#birthday.layui-input(type="text", name="contacts.cusbirthday", autocomplete="off") + i.layui-icon(style="position: absolute;right: 3px;top: 6px;font-size: 25px;")  + .layui-inline.uckefu-inline + label.layui-form-label 座机电话: + .layui-input-inline(style="width:auto;") + .layui-input-block + input.layui-input(type="text", name="contacts.phone", autocomplete="off") + .layui-form-item + .layui-inline + label.layui-form-label 电子邮件: + .layui-input-inline + input.layui-input(type="text", name="contacts.email", autocomplete="off", lay-verify="entemail") + .layui-inline.uckefu-inline + label.layui-form-label 手机号: + .layui-input-inline(style="width:auto;") + .layui-input-block + input.layui-input(type="text", name="contacts.mobile", autocomplete="off") + .layui-form-item + .layui-inline + label.layui-form-label 联系人地址: + .layui-input-inline(style="width: 660px;") + input.layui-input(type="text", name="contacts.address", autocomplete="off") + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit="", lay-filter="formDemo") 立即提交 + button.layui-btn.layui-btn-original(type="reset") 重置 +script. + //Demo + layui.use('form', function () { + var form = layui.form(); + form.render(); //更新全部 + form.verify({ + entemail: function (value) { + if (value != "" && !new RegExp(/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/).test(value)) { + return '请输入正确的电子邮箱地址'; + } + }, + customer_username: function (value) { + if (value.length > 100) { + return "用户姓名不能超过100字"; + } + } + }); + form.on("radio(etype)", function (data) { + if (data.value == "enterprise") { + $('#contacts_info').show(); + $('#cusname').text("客户名称:"); + } else { + $('#contacts_info').hide(); + $('#cusname').text("客户姓名:"); + } + }); + }); + layui.use('element', function () { + var element = layui.element(); + }); + layui.use('laydate', function () { + var laydate = layui.laydate; + var date = { + min: '1950-01-01 00:00:00', + max: laydate.now(), + istoday: false + }; + document.getElementById('getdate').onclick = function () { + date.elem = this; + laydate(date); + } + document.getElementById('birthday').onclick = function () { + date.elem = this; + laydate(date); + } + }); + $('#entcustomer_province').change(function () { + loadURL('/res/dic.html?id=' + $(this).val() + "&name=entcustomer.city&attr=lay-ignore&style=width:85px;", '#entcustomer_city'); + }) diff --git a/contact-center/app/src/main/resources/templates/apps/customer/edit.pug b/contact-center/app/src/main/resources/templates/apps/customer/edit.pug new file mode 100644 index 00000000..4e6ed394 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/customer/edit.pug @@ -0,0 +1,137 @@ +include /mixins/dic.mixin.pug + +.uk-layui-form + form.layui-form(action="/apps/customer/update.html", method="post") + input(type="hidden", name="entcustomer.id", value=entCustomer.id) + input(type="hidden", name="ekindId", value=ekindId) + input(type="hidden", name="entcustomer.shares", value="all") + input(type="hidden", name="contacts.shares", value="all") + .layui-collapse + .layui-colla-item + h2.layui-colla-title 基本信息 + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label.layui-form-label 获得时间: + .layui-input-inline + input#getdate.layui-input(type="text", name="entcustomer.touchtime", readonly="readOnly", lay-verify="date", autocomplete="off", value=(entCustomer.touchtime ? pugHelper.formatDate('yyyy-MM-dd', entCustomer.touchtime) : '')) + i.layui-icon(style="position: absolute;right: 3px;top: 6px;font-size: 25px;")  + .layui-inline + font(color="red") *(必填项) + | (您得到此客户的时间) + .layui-inline + label.layui-form-label(style="width:60px") 类型: + .layui-input-inline(style="width:218px;margin-right:0px;padding-top:9px;") + input(type="radio", name="entcustomer.etype", value="enterprise", title="企业客户", lay-filter="etype", checked= entcustomer.etype = 'enterprise') + input(type="radio", name="entcustomer.etype", value="personal", title="个人客户", lay-filter="etype", checked= entcustomer.etype = 'personal') + .layui-colla-item + h2.layui-colla-title 企业信息 + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label#cusname.layui-form-label 客户名称: + .layui-input-inline + input.layui-input(type="text", name="entcustomer.name", required="", lay-verify="customer_username", autocomplete="off", value=entCustomer.name) + .layui-inline + font(color="red") *(必填项) + .layui-form-item + .layui-inline + label.layui-form-label 联系电话: + .layui-input-inline + input.layui-input(type="text", name="entcustomer.phone", autocomplete="off", value=entCustomer.phone) + .layui-inline.uckefu-inline + label.layui-form-label 电子邮件: + .layui-input-inline + input.layui-input(type="text", name="entcustomer.email", lay-verify="entemail", autocomplete="off", value=entCustomer.email) + .layui-form-item + .layui-inline + label.layui-form-label 省份: + .layui-input-inline(style="width:80px;") + +sysDicSelect('com.dic.address.area','entcustomer.province',entCustomer.province,{'lay-ignore': true},'width:85px;') + .layui-inline + #city.layui-input-inline(style="width:80px;") + +sysDicSelect(entCustomer.city + '.subdic','entcustomer.city',entCustomer.city,{'lay-ignore': true},'width:86px;') + .layui-form-item + .layui-inline + label.layui-form-label 客户地址: + .layui-input-inline(style="width: 664px;") + input.layui-input(type="text", name="entcustomer.address", autocomplete="off", value=entCustomer.address) + .layui-form-item + .layui-inline + label.layui-form-label 客户类型: + .layui-input-inline + +sysDicSelect('com.dic.contacts.entype','entcustomer.ekind',entCustomer.ekind,{'lay-ignore': true}) + .layui-inline.uckefu-inline + label.layui-form-label 客户级别: + .layui-input-inline + +sysDicSelect('com.dic.contacts.elevel','entcustomer.elevel',entCustomer.elevel,{'lay-ignore': true}) + .layui-form-item + .layui-inline + label.layui-form-label 客户来源: + .layui-input-inline + +sysDicSelect('com.dic.contacts.esource','entcustomer.esource',entCustomer.esource,{'lay-ignore': true}) + .layui-inline.uckefu-inline + label.layui-form-label 成熟度: + .layui-input-inline + +sysDicSelect('com.dic.contacts.maturity','entcustomer.maturity',entCustomer.maturity,{'lay-ignore': true}) + .layui-form-item + .layui-inline + label.layui-form-label 行业: + .layui-input-inline + +sysDicSelect('com.dic.contacts.industry','entcustomer.industry',entCustomer.industry,{'lay-ignore': true}) + .layui-inline.uckefu-inline + label.layui-form-label 客户状态: + .layui-input-inline + +sysDicSelect('com.dic.contacts.validstatus','entcustomer.validstatus',entCustomer.validstatus,{'lay-ignore': true}) + .layui-form-item + .layui-inline + label.layui-form-label 客户说明: + .layui-input-inline(style="width: 664px;") + textarea.layui-textarea(name="entcustomer.description", placeholder="请输入内容", style="resize:none;")= entCustomer.description + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit="", lay-filter="formDemo") 立即提交 + button.layui-btn.layui-btn-original(type="reset") 重置 +script. + //Demo + $('#entcustomer_province').change(function () { + loadURL('/res/dic.html?id=' + $(this).val() + "&name=entcustomer.city&attr=lay-ignore&style=width:85px;", '#entcustomer_city'); + }) + layui.use('form', function () { + var form = layui.form(); + form.render(); //更新全部 + form.verify({ + entemail: function (value) { + if (value != "" && !new RegExp(/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/).test(value)) { + return '请输入正确的电子邮箱地址'; + } + }, + customer_username: function (value) { + if (value.length > 100) { + return "用户姓名不能超过100字"; + } + } + }); + form.on("radio(etype)", function (data) { + if (data.value == "enterprise") { + $('#cusname').text("客户名称:"); + } else { + $('#cusname').text("客户姓名:"); + } + }); + }); + layui.use('element', function () { + var element = layui.element(); + }); + layui.use('laydate', function () { + var laydate = layui.laydate; + var date = { + min: '2010-01-01 00:00:00', + max: laydate.now(), + istoday: false + }; + document.getElementById('getdate').onclick = function () { + date.elem = this; + laydate(date); + } + }); diff --git a/contact-center/app/src/main/resources/templates/apps/customer/imp.pug b/contact-center/app/src/main/resources/templates/apps/customer/imp.pug new file mode 100644 index 00000000..4b1b0d47 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/customer/imp.pug @@ -0,0 +1,55 @@ +include /mixins/dic.mixin.pug + +.uk-layui-form + form.layui-form(action="/apps/customer/impsave.html", enctype="multipart/form-data", method="post") + .layui-collapse + .layui-colla-item + h2.layui-colla-title 选择导入的数据文件 + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label.layui-form-label 数据文件: + .layui-input-inline + .layui-box.layui-upload-button(style="width: 100%;") + input.layui-upload-file(type="file", name="cusfile", required="", lay-verify="required", accept="application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", lay-ext="jpg|png|gif", onchange="$('#cus_file').html($(this).val());") + span.layui-upload-icon + i.layui-icon  + .layui-inline + font(color="red") *(必填项) + | (需要导入的客户数据Excel文件,可以是多个Sheet页) + a(href="/res/template.html?filename=customer_template.xls", target="_blank", style="margin-left:20px;") + i.layui-icon  + | 下载模板 + .layui-form-item(style="height:40px;line-height:40px;") + .layui-inline + label.layui-form-label + #cus_file.layui-input-inline(style="width:500px;") + .layui-colla-item + h2.layui-colla-title 客户信息导入说明,导入步骤: + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label#cusname1.layui-form-label 第一步: + .layui-input-inline(style="width:auto;padding-top:9px;") 上传客户数据的Excel文件(支持多Sheet页导入) + .layui-form-item + .layui-inline + label#cusname2.layui-form-label 第二步: + .layui-input-inline(style="width:auto;padding-top:9px;") 选择Excel里的列与系统客户的字段对应关系 + .layui-form-item + .layui-inline + label#cusname3.layui-form-label 第三步: + .layui-input-inline(style="width:auto;padding-top:9px;") 开始导入客户数据 + .ukefu-imp-tips + | 自动匹配客户导入字段功能,无需下载模板,系统自动匹配,客户数据直接导入,使用更加方便、快捷、智能。 + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit="", lay-filter="formDemo") 立即导入 + button.layui-btn.layui-btn-original(type="reset") 重置 +script. + layui.use('upload', function () { + var target = $(this).attr("data-target"); + }); + layui.use('form', function () { + var form = layui.form(); + form.render(); + }); diff --git a/contact-center/app/src/main/resources/templates/apps/customer/include/left.pug b/contact-center/app/src/main/resources/templates/apps/customer/include/left.pug new file mode 100644 index 00000000..39847743 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/customer/include/left.pug @@ -0,0 +1,12 @@ +ul.layui-nav.layui-nav-tree(lay-filter="setting") + li.layui-nav-item.layui-nav-itemed + if user.roleAuthMap["A03_A01"] || user.admin + a.layui-nav-title(href="javascript:;") 全部客户 + dl.layui-nav-child + if user.roleAuthMap["A03_A01_A01"] || user.admin + dd(class={'layui-this': !ekind}) + a(href="/apps/customer/index.html") 全部客户 + if user.roleAuthMap["A03_A01_A02"] || user.admin + for dic in uKeFuDic['com.dic.contacts.entype'] + dd(class={'layui-this': ekind && ekind == dic.id}) + a(href="/apps/customer/" + (subtype ? subtype : 'index') + ".html?ekind=" + dic.id + (q ? '&q=' + q : ''))= dic.name diff --git a/contact-center/app/src/main/resources/templates/apps/customer/index.pug b/contact-center/app/src/main/resources/templates/apps/customer/index.pug new file mode 100644 index 00000000..c23c1e80 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/customer/index.pug @@ -0,0 +1,169 @@ +extends /apps/include/layout.pug + +include /mixins/client.mixin.pug + +block content + .layui-side.layui-bg-black + .layui-side-scroll + include include/left.pug + + .layui-body + .layui-side-scroll + .row + .col-lg-12 + h1.site-h1.ukefu-tab(style="border-top:1px solid #e6e6e6;height:26px;") + span.ukefu-bt + i.layui-icon.ukewo-btn(style="font-size:20px;")  + .ukefu-bt-text + .ukefu-bt-text-title + | 全部客户 + .ukefu-tab-title(style="margin-top: 26px") + include top + .ukefu-bt-text-content(style="position: absolute;right: 5px;top: 0px;padding-right:10px;") + form.layui-form(name="search", action="/apps/customer/" + subtype + ".html", method="get", style="float: left;") + if ekind + input(type="hidden", name="ekind", value=ekind) + .layui-form-item + .layui-inline + .layui-input-inline(style="width: 218px") + input.layui-input(type="text", name="q", value=q, style="height: 30px;line-height: 30px;margin-top: 4px;border: 1px solid #32c24d;", placeholder="请输入联系人姓名或电话", autocomplete="off") + i.layui-icon(onclick="search.submit()", style="position: absolute;cursor: pointer;right: 3px;top: 4px;font-size: 20px;color:#32c24d;")  + if user.roleAuthMap["A03_A01_A02_B06"] || user.admin + .layui-btn-group.ukefu-btn-group(style="margin-right: 5px !important;") + a.layui-btn.layui-btn-small(href="/apps/customer/add.html" + (ekind ? "?ekind=" + ekind : ""), title="新建客户", data-toggle="ajax", data-width="950", data-height="600") + i.layui-icon  + | 新建客户 + if user.roleAuthMap["A03_A01_A02_B09"] || user.admin + .layui-btn-group.ukefu-btn-group(style="margin-right: 5px !important;") + button.layui-btn.layui-btn-small(href="/apps/customer/imp.html" + (ekind ? "?ekind=" + ekind : ""), title="导入客户", data-toggle="ajax", data-width="950", data-height="600") + i.kfont  + | 导入 + if user.roleAuthMap["A03_A01_A02_B010"] || user.admin + .layui-btn-group.ukefu-btn-group + button.layui-btn.layui-btn-small.dropdown-menu(class={noexport: !currentOrgan}) + i.kfont  + | 导出 + i.layui-icon  + if currentOrgan + ul.ukefu-dropdown-menu.layui-anim.layui-anim-upbit + li + a#batexp(href="javascript:void(0)", title="导出客户", target="_blank") + i.kfont  + | 导出选中结果 + li + a(href="/apps/customer/expsearch.html?1=1" + (q ? "&q=" + q : "") + (ekind ? "&ekind=" + ekind : "") + "&subtype=" + subtype, title="导出客户", target="_blank") + i.kfont  + | 导出当前搜索结果 + li + a(href="/apps/customer/expall.html" + (ekind ? "?ekind=" + ekind : ""), title="导出客户", target="_blank") + i.kfont  + | 导出全部数据 + + table.layui-table(lay-skin="line", style="margin-top: 26px") + thead + tr.design-sortable-tr + th + input#all(type="checkbox", onclick="$('.ids').prop('checked' , $(this).prop('checked'));") + th 客户名称 + th 类型 + th 所在城市 + th 客户状态 + th 行业 + th 成熟度 + th 获得时间 + th 所有者 + th 操作 + tbody(style="table-layout: fixed; word-break: break-all;") + if entCustomerList.content.empty() + tr + td(colspan="20", style="height:400px;") + .ukefu-empty(style="background: none") + i.layui-icon  + div(style="") 还没有客户信息 + else + for entCustomer in entCustomerList.content + .tdHasContorllor.design-dropable-td + tr.tdHasContorllor.design-dropable-td + td(style="width:1%;") + input.ids(type="checkbox", name="ids", value=entCustomer.id) + td.first_td_head(style="width: 90px")= entCustomer.name + td= uKeFuDic[entCustomer.ekind].name + td= uKeFuDic[entCustomer.city].name != '市辖区' && uKeFuDic[entCustomer.city].name != "县" ? uKeFuDic[entCustomer.city].name : uKeFuDic[entCustomer.province].name + td= uKeFuDic[entCustomer.validstatus].name + td= uKeFuDic[entCustomer.industry].name + td= uKeFuDic[entCustomer.maturity].name + td + if entCustomer.touchtime + | #{pugHelper.formatDate('yyyy-MM-dd', entCustomer.touchtime)} + td + if entCustomer.user + | #{entCustomer.user.username} + td(style="white-space:nowrap;width:1%;", nowrap="nowrap") + a(href="/apps/customer/edit.html?id=" + entCustomer.id + "&ekind=" + ekind, data-toggle="ajax", data-width="950", data-height="600", data-title="编辑用户信息") + i.layui-icon  + | 编辑 + a(href="/apps/customer/delete.html?id=" + entCustomer.id + "&ekind=" + ekind, style="margin-left:10px;", data-toggle="tip", data-title="请确认是否删除记录?") + i.layui-icon(style="color:red;") ဆ + | 删除 + + .row(style="padding:5px;") + #page.col-lg-12(style="text-align:center;") + + style. + .noexport { + background: grey !important; + } + script. + $(document).ready(function () { + layui.use('layer', function () { + var layer = layui.layer; + var msg = '#{msg}' + if (msg == 'new_entcustomer_success') + layer.msg('客户新建成功', {icon: 1, time: 1000}) + else if (msg == 'edit_entcustomer_success') + layer.msg('客户编辑成功', {icon: 1, time: 1000}) + else if (msg == 'mobile_exist') + layer.msg('手机存在,请重新填写', {icon: 2, time: 3000}) + else if (msg == 'sip_account_exist') + layer.msg('SIP账号已经存在,请重新填写', {icon: 2, time: 3000}) + + }); + $('#batexp').click(function () { + var ids = ""; + var num = 0; + $('.ids').each(function () { + if ($(this).prop("checked")) { + if (ids != "") { + ids += "&"; + } + ids += "ids=" + $(this).val(); + num++; + } + }); + if (num > 0) { + $('#batexp').attr('href', '/apps/customer/expids.html?' + ids); + } else { + top.layer.alert("请先选择需要导出的客户信息"); + $('#batexp').attr("href", "javascript:void(0)"); + } + }); + }); + layui.use('form', function () { + var form = layui.form(); + }); + layui.use(['laypage', 'layer'], function () { + var laypage = layui.laypage + , layer = layui.layer; + laypage({ + cont: 'page' + , pages: #{entCustomerList.totalPages} //总页数 + , curr: #{entCustomerList.number + 1} + , groups: 5 //连续显示分页数 + , jump: function (data, first) { + if (!first) { + location.href = "/apps/customer/#{subtype ? subtype : 'index'}.html?p=" + data.curr + "&ekind=#{ekind}"; + } + } + }); + }); + diff --git a/contact-center/app/src/main/resources/templates/apps/customer/top.pug b/contact-center/app/src/main/resources/templates/apps/customer/top.pug new file mode 100644 index 00000000..cd8b8869 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/customer/top.pug @@ -0,0 +1,31 @@ +ul.tab-title + if user.roleAuthMap["A03_A01_A02_B01"] || user.admin + li(class={'layui-this': subtype == 'index'}) + a(href="/apps/customer/index.html" + (ekind ? "?ekind=" + ekind : "")) 全部客户 + if subtype == "index" + | (#{entCustomerList.totalElements}) + if user.roleAuthMap["A03_A01_A02_B02"] || user.admin + li(class={'layui-this': subtype == 'today'}) + a(href="/apps/customer/today.html" + (ekind ? "?ekind=" + ekind : "")) 今日新增 + if subtype == "today" + | (#{entCustomerList.totalElements}) + if user.roleAuthMap["A03_A01_A02_B03"] || user.admin + li(class={'layui-this': subtype == 'week'}) + a(href="/apps/customer/week.html" + (ekind ? "?ekind=" + ekind : "")) 本周新增 + if subtype == "week" + | (#{entCustomerList.totalElements}) + if user.roleAuthMap["A03_A01_A02_B04"] || user.admin + li(class={'layui-this': subtype == 'enterprise'}) + a(href="/apps/customer/enterprise.html" + (ekind ? "?ekind=" + ekind : "")) 企业客户 + if subtype == "enterprise" + | (#{entCustomerList.totalElements}) + if user.roleAuthMap["A03_A01_A02_B05"] || user.admin + li(class={'layui-this': subtype == 'personal'}) + a(href="/apps/customer/personal.html" + (ekind ? "?ekind=" + ekind : "")) 个人客户 + if subtype == "personal" + | (#{entCustomerList.totalElements}) + li(class={'layui-this': subtype == 'creater'}) + a(href="/apps/customer/creater.html" + (ekind ? "?ekind=" + ekind : "")) 我的客户 + if subtype == "creater" + | (#{entCustomerList.totalElements}) + diff --git a/contact-center/app/src/main/resources/templates/apps/desktop/include/left.html b/contact-center/app/src/main/resources/templates/apps/desktop/include/left.html deleted file mode 100644 index c4882e2f..00000000 --- a/contact-center/app/src/main/resources/templates/apps/desktop/include/left.html +++ /dev/null @@ -1,130 +0,0 @@ -
                                    -
                                    -

                                    - 工作绩效(${.now?string('yyyy-MM-dd')}) -

                                    -
                                    - admin -
                                    -

                                    - ${user.username!''}(${user.uname!''}) - - <#if user?? && user.roleList??> - <#list user.roleList as role> - ${role.name!''} - - - -

                                    - <#if user.lastlogintime??> -
                                    - 登录时间:${user.lastlogintime?string("HH:mm:ss")} -
                                    - -
                                    -
                                    - - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                      -
                                    • - -
                                    -
                                    -
                                    -
                                      - - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    diff --git a/contact-center/app/src/main/resources/templates/apps/desktop/include/left.pug b/contact-center/app/src/main/resources/templates/apps/desktop/include/left.pug new file mode 100644 index 00000000..385646c1 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/desktop/include/left.pug @@ -0,0 +1,49 @@ +.row + .col-lg-12 + h1.site-h1 + | 工作绩效(#{pugHelper.formatDate('yyyy-MM-dd', now)}) + .box.ukefu-console(style="padding-top:0px !important;") + img(src="/images/agent.png", alt="admin") + .ukefu-user-index + h1(style="width:120px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-wrap: break-word;\ + word-break: break-all;") + | #{user.username}(#{user.uname}) + span(style="color:#c00;") + if user && user.roleList + for role in user.roleList + #{role.name} + if user.lastlogintime + .ukefu-join-time.ukefu-text-muted 登录时间:#{pugHelper.formatDate('HH:mm:ss', user.lastlogintime)} + .box.ukefu-console + .ukefu-relation + span.ukefu-relation-item(lay-event="") + | 会话 + a.measure(href="/service/current/index.html") #{agentUserCount} + span.ukefu-relation-item(lay-event="") + | 邀请 + a#agentInviteTotalTimes.measure(href="/apps/onlineuser.html") #{inviteResult.users + inviteResult.inviteusers + inviteResult.refuseusers} + span.ukefu-relation-item(lay-event="") + | 拒绝 + a.measure( href="/apps/onlineuser.html", style=(inviteResult.refuseusers > 0 ? "color:red !important;" : "")) #{inviteResult.refuseusers} + .box.ukefu-console + .ukefu-relation + span.ukefu-relation-item(lay-event="", style="width:20%;") + | 已接待 + a.measure(href="/service/history/index.html") #{agentServicesCount} + span.ukefu-relation-item(style="width:55%;") + | 平均会话时长 + a.measure(href="/service/history/index.html") + if agentServicesAvg + | #{pugHelper.padRight(agentServicesAvg / (1000 * 60 * 60), "00")}:#{pugHelper.padRight((agentServicesAvg % (1000 * 60 * 60)) / (1000 * 60), "00")}:#{pugHelper.padRight((agentServicesAvg % (1000 * 60)) / (1000), "00")} + else + | 00:00:00 + +.row + .col-lg-12(style="padding:5px;border-top: 5px solid #e6e6e6;") + .layui-tab.layui-tab-brief.ukefu-webim-tab(lay-filter="docDemoTabBrief") + ul.layui-tab-title + li.layui-this + i.layui-icon  + .layui-tab-content + .layui-tab-item.layui-show + ul.ukewo-btn-group diff --git a/contact-center/app/src/main/resources/templates/apps/desktop/index.html b/contact-center/app/src/main/resources/templates/apps/desktop/index.html deleted file mode 100644 index 9234e1c8..00000000 --- a/contact-center/app/src/main/resources/templates/apps/desktop/index.html +++ /dev/null @@ -1,179 +0,0 @@ - - - -
                                    -
                                    - <#include "/apps/desktop/include/left.html"> -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    -

                                    - 当前在线用户列表<#if onlineUserList??>(${onlineUserList.totalElements}) -

                                    - - - - - - - - - - - - - - - - - <#if onlineUserList?? && onlineUserList.content?? && onlineUserList.content?size gt 0> - <#list onlineUserList.content as onlineuser> - - - - - - - - - - - - - - - <#else> - - - - - -
                                    用户名终端操作系统浏览器访问时间停留时间地域邀请拒绝操作
                                    - ${onlineuser.username!''} - <#if onlineuser.contacts??>(${onlineuser.contacts.name!''}) - - <#if onlineuser.mobile?? && onlineuser.mobile == "1"> - - <#else> - - - - <#if onlineuser.opersystem?? && onlineuser.opersystem == "windows"> - - <#elseif onlineuser.opersystem?? && onlineuser.opersystem == "linux"> - - <#elseif onlineuser.opersystem?? && onlineuser.opersystem == "mac"> - - - ${onlineuser.browser!''}<#if onlineuser.createtime??>${onlineuser.createtime?string('yyyy-MM-dd HH:mm:ss')} - ${(onlineuser.betweentime/(1000*60*60))?string('00')}:${((onlineuser.betweentime%(1000*60*60))/(1000*60))?string('00')}:${((onlineuser.betweentime%(1000*60))/(1000))?string('00')} - ${onlineuser.region!''}${onlineuser.invitetimes!0}${onlineuser.refusetimes!0} - <#if onlineuser.invitestatus?? && onlineuser.invitestatus == 'invite'> - 已邀请 - <#elseif onlineuser.invitestatus?? && onlineuser.invitestatus == 'inserv'> - 对话中 - <#elseif onlineuser.invitestatus?? && onlineuser.invitestatus == 'refuse'> - 再次邀请 - <#else> - 邀请 - - 轨迹 -
                                    -
                                    - -
                                    还没有在线访客记录
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - - diff --git a/contact-center/app/src/main/resources/templates/apps/desktop/index.pug b/contact-center/app/src/main/resources/templates/apps/desktop/index.pug new file mode 100644 index 00000000..3d85ced3 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/desktop/index.pug @@ -0,0 +1,128 @@ +extends /apps/include/layout.pug + +include /mixins/client.mixin.pug + +block append head + script(src="/js/CSKeFu_Rest_Request.v1.js") + script(src="/js/CSKeFu_Agent_Invite.v1.js") + script. + layui.use(['laypage', 'layer'], function () { + var laypage = layui.laypage, layer = layui.layer; + + laypage({ + cont: 'page', + pages: #{onlineUserList ? onlineUserList.totalPages : 0}, + curr: #{onlineUserList ? onlineUserList.number + 1 : 0}, + groups: 5, + jump: function (data, first) { + if (!first) { + location.href = "/apps/onlineuser.html?p=" + data.curr; + } + } + }); + var msg = '#{msg}'; + if (msg == 'username_exist') + layer.msg('用户名存在,请重新填写', {icon: 2, time: 3000}) + else if (msg == 'email_exist') + layer.msg('邮件存在,请重新填写', {icon: 2, time: 3000}) + else if (msg == 'mobile_exist') + layer.msg('手机存在,请重新填写', {icon: 2, time: 3000}) + }); + +block content + .layui-side.layui-bg-black.layui-left-black + .layui-side-scroll + include include/left + .layui-body + .layui-side-scroll + .row + .col-lg-12(style="position: relative;") + div(style="position: absolute; right: 0; z-index: 10; padding: 7px;") + i.layui-icon(style="font-size: 20px; cursor:pointer;", onclick="location.reload()") ဂ + h1.site-h1 + | 在线客服业务概况 + .row + .col-lg-3 + .ukefu-measure + a.ukefu-bt(href="/apps/onlineuser.html") + i.layui-icon.ukewo-btn.ukefu-measure-btn  + .ukefu-bt-text + .ukefu-bt-text-title(style="font-weight:400;font-size:19px;") #{webIMInvite.inviteusers}/#{webIMInvite.refuseusers} + .ukefu-bt-text-content(style="") 访客:已邀请/已拒绝 + .col-lg-3 + .ukefu-measure + a.ukefu-bt(href="/service/agent/index.html") + i.kfont.icon-iconfontagent.ukewo-btn.ukefu-measure-btn.ukefu-bg-color-yellow + .ukefu-bt-text + #agentReportAgents.ukefu-bt-text-title(style="font-weight:400;font-size:19px;") #{agentReport.agents}/#{agents} + .ukefu-bt-text-content(style="") 坐席:在线/全部 + .col-lg-3 + .ukefu-measure + a.ukefu-bt(href="/service/quene/index.html") + i.layui-icon.ukewo-btn.ukefu-measure-btn.ukefu-bg-color-pink  + .ukefu-bt-text + .ukefu-bt-text-title(style="font-weight:400;font-size:19px;") #{agentReport.users}/#{agentReport.inquene} + .ukefu-bt-text-content(style="") 会话:服务/排队 + .col-lg-3 + .ukefu-measure + a.ukefu-bt(href="/apps/onlineuser.html") + i.layui-icon.ukewo-btn.ukefu-measure-btn.ukefu-bg-color-green  + .ukefu-bt-text + .ukefu-bt-text-title(style="font-weight:400;font-size:19px;") #{webIMReport.ipnums}/#{webIMReport.pvnums} + .ukefu-bt-text-content(style="") 统计:IP/PV + .row + .col-lg-12 + h1.site-h1(style="border-top:1px solid #e6e6e6;margin-top:15px;") + | 当前在线用户列表 #{onlineUserList ? onlineUserList.totalElements : ''} + table.layui-table(lay-skin="line", style="word-wrap:break-word; word-break:break-all;table-layout: fixed") + thead + tr.design-sortable-tr + th 用户名 + th 终端 + th 操作系统 + th 浏览器 + th 访问时间 + th 停留时间 + th 地域 + th 邀请 + th 拒绝 + th(width="100px") 操作 + tbody + if onlineUserList && onlineUserList.content && !onlineUserList.content.isEmpty() + tr.tdHasContorllor.design-dropable-td + for onlineuser in onlineUserList.content + td.first_td_head + a(href="/service/online/index.html?userid=" + onlineuser.userid) + | #{onlineuser.username} + if onlineuser.contacts + | (#{onlineuser.contacts.name}) + td.ukefu-online-client + +device(onlineuser.mobile) + td.ukefu-online-client + +opersystem(onlineuser.opersystem) + td= onlineuser.browser + td= pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', onlineuser.createtime) + td.minSize #{pugHelper.padRight(onlineuser.betweentime / (1000 * 60 * 60), '00')}:#{pugHelper.padRight((onlineuser.betweentime % (1000 * 60 * 60)) / (1000 * 60), "00")}:#{pugHelper.padRight((onlineuser.betweentime % (1000 * 60)) / (1000), "00")} + td= onlineuser.region + td(id="it-" + onlineuser.id)= onlineuser.invitetimes + td(id="rt-" + onlineuser.id)= onlineuser.refusetimes + td(style="white-space: nowrap") + if onlineuser.invitestatus == 'invite' + small.layui-btn.layui-btn-mini.layui-btn-warm(title="访客已邀请") 已邀请 + else if onlineuser.invitestatus == 'inserv' + small.layui-btn.layui-btn-mini(title="对话中") 对话中 + else if onlineuser.invitestatus == 'refuse' + a.layui-btn.layui-btn-mini.layui-btn-danger(href="javascript:;", name="#{onlineuser.id}", title="访客已拒绝邀请", onclick="sendInvitationToOnlineUser('#{onlineuser.id}', false)") 再次邀请 + else + a.layui-btn.layui-btn-mini.layui-btn-normal(href="javascript:;", name="#{onlineuser.id}", title="邀请访客", onclick="sendInvitationToOnlineUser('#{onlineuser.id}', true)") 邀请 + a.layui-btn.layui-btn-mini.layui-btn-normal(href="/service/trace.html?sessionid=#{onlineuser.sessionid}&userid=#{onlineuser.id}", title="查看访客轨迹", data-toggle="ajax", data-width="1050") 轨迹 + + else + td(colspan="10", style="height:400px;") + .ukefu-empty(style="background: none;") + i.layui-icon  + div(style="") 还没有在线访客记录 + + + .row(style="padding:5px;") + #page.col-lg-12(style="text-align:center;") diff --git a/contact-center/app/src/main/resources/templates/apps/desktop/onlineuser.html b/contact-center/app/src/main/resources/templates/apps/desktop/onlineuser.html deleted file mode 100644 index 0390ffb5..00000000 --- a/contact-center/app/src/main/resources/templates/apps/desktop/onlineuser.html +++ /dev/null @@ -1,123 +0,0 @@ - - - -
                                    -
                                    - <#include "/apps/desktop/include/left.html"> -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    - - -
                                    -
                                    - 当前在线用户列表<#if onlineUserList??>(${onlineUserList.totalElements}) -
                                    -
                                    - 在线的访客详细信息 -
                                    -
                                    -
                                    - -

                                    - - - - - - - - - - - - - - - - <#if onlineUserList?? && onlineUserList.content?? && onlineUserList.content?size gt 0> - <#list onlineUserList.content as onlineuser> - - - - - - - - - - - - - - <#else> - - - - - -
                                    用户名终端操作系统浏览器访问时间停留时间地域邀请次数操作
                                    - ${onlineuser.username!''} - <#if onlineuser.contacts??>(${onlineuser.contacts.name!''}) - - <#if onlineuser.mobile?? && onlineuser.mobile == "1"> - - <#else> - - - - <#if onlineuser.opersystem?? && onlineuser.opersystem == "windows"> - - <#elseif onlineuser.opersystem?? && onlineuser.opersystem == "linux"> - - <#elseif onlineuser.opersystem?? && onlineuser.opersystem == "mac"> - - - ${onlineuser.browser!''}<#if onlineuser.createtime??>${onlineuser.createtime?string('yyyy-MM-dd HH:mm:ss')} - ${(onlineuser.betweentime/(1000*60*60))?string('00')}:${((onlineuser.betweentime%(1000*60*60))/(1000*60))?string('00')}:${((onlineuser.betweentime%(1000*60))/(1000))?string('00')} - ${onlineuser.region!''}${onlineuser.invitetimes!''} - <#if onlineuser.invitestatus?? && onlineuser.invitestatus == 'invite'> - - <#elseif onlineuser.invitestatus?? && onlineuser.invitestatus == 'inserv'> - - <#elseif onlineuser.invitestatus?? && onlineuser.invitestatus == 'refuse'> - 再次邀请 - <#else> - 邀请 - - 轨迹 -
                                    -
                                    - -
                                    还没有在线访客记录
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - diff --git a/contact-center/app/src/main/resources/templates/apps/desktop/onlineuser.pug b/contact-center/app/src/main/resources/templates/apps/desktop/onlineuser.pug new file mode 100644 index 00000000..14df495b --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/desktop/onlineuser.pug @@ -0,0 +1,90 @@ +extends /apps/include/layout.pug + +include /mixins/client.mixin.pug + +block append head + script(src="/js/CSKeFu_Rest_Request.v1.js") + script(src="/js/CSKeFu_Agent_Invite.v1.js") + +block content + .layui-side.layui-bg-black.layui-left-black + .layui-side-scroll + include include/left + .layui-body + .layui-side-scroll + .row + .col-lg-12 + h1.site-h1(style="border-top:1px solid #e6e6e6;height:50px;") + span.ukefu-bt + i.layui-icon.ukewo-btn(style="font-size:28px;")  + .ukefu-bt-text + .ukefu-bt-text-title(style="") + | 当前在线用户列表 + .ukefu-bt-text-content(style="margin-top: 0px;line-height: 20px;") + | 在线的访客详细信息 + table.layui-table(lay-skin="line", style="table-layout: fixed; word-break: break-all") + thead + tr.design-sortable-tr + th(width="15%") 用户名 + th 终端 + th 操作系统 + th 浏览器 + th 访问时间 + th 停留时间 + th 地域 + th 邀请次数 + th(width="110px") 操作 + tbody + if onlineUserList && onlineUserList.content && !onlineUserList.content.empty() + for onlineuser in onlineUserList.content + tr.tdHasContorllor.design-dropable-td + td(title=onlineuser.username + (onlineuser.contacts ? `(${onlineuser.contacts.name})` : ""), style="text-overflow: ellipsis;white-space: nowrap;overflow: hidden") + a(href="/service/online/index.html?userid=" + onlineuser.userid)= onlineuser.username + td.ukefu-online-client + +device(onlineuser.mobile) + td.ukefu-online-client + +opersystem(onlineuser.opersystem) + td= onlineuser.browser + td= pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', onlineuser.createtime) + td.minSize #{pugHelper.padRight(onlineuser.betweentime / (1000 * 60 * 60), '00')}:#{pugHelper.padRight((onlineuser.betweentime % (1000 * 60 * 60)) / (1000 * 60), "00")}:#{pugHelper.padRight((onlineuser.betweentime % (1000 * 60)) / (1000), "00")} + td= onlineuser.region + td= onlineuser.invitetimes + td + if onlineuser.invitestatus == 'invite' + small.layui-btn.layui-btn-mini.layui-btn-warm(title="访客已邀请") 已邀请 + else if onlineuser.invitestatus == 'inserv' + small.layui-btn.layui-btn-mini(title="对话中") 对话中 + else if onlineuser.invitestatus == 'refuse' + a.layui-btn.layui-btn-mini.layui-btn-danger(href="javascript:;", name="#{onlineuser.id}", title="访客已拒绝邀请", onclick="sendInvitationToOnlineUser('#{onlineuser.id}', false)") 再次邀请 + else + a.layui-btn.layui-btn-mini.layui-btn-normal(href="javascript:;", name="#{onlineuser.id}", title="邀请访客", onclick="sendInvitationToOnlineUser('#{onlineuser.id}', true)") 邀请 + a.layui-btn.layui-btn-mini.layui-btn-normal(href="/service/trace.html?sessionid=#{onlineuser.sessionid}&userid=#{onlineuser.id}", title="查看访客轨迹", data-toggle="ajax", data-width="1050") 轨迹 + else + tr + td(colspan="9", style="height:400px;") + .ukefu-empty(style="background: none") + i.layui-icon  + div(style="") 还没有在线访客记录 + + .row(style="padding:5px;") + #page.col-lg-12(style="text-align:center;") + + script. + layui.use(['laypage', 'layer'], function () { + var laypage = layui.laypage, layer = layui.layer; + + laypage({ + cont: 'page', + pages: #{onlineUserList ? onlineUserList.totalPages : 0}, //总页数 + curr: #{onlineUserList ? onlineUserList.number + 1 : 0}, + groups: 5, //连续显示分页数 + jump: function (data, first) { + if (!first) { + location.href = "/apps/onlineuser.html?p=" + data.curr; + } + } + }); + }); + + + diff --git a/contact-center/app/src/main/resources/templates/apps/desktop/profile.html b/contact-center/app/src/main/resources/templates/apps/desktop/profile.html deleted file mode 100644 index 6386db8a..00000000 --- a/contact-center/app/src/main/resources/templates/apps/desktop/profile.html +++ /dev/null @@ -1,74 +0,0 @@ -
                                    -
                                    ${index!''}<#else>target="maincontent" > - - <#if index?? > -
                                    - -
                                    - ${userData.username!''} -
                                    -
                                    用户登录的账号
                                    -
                                    -
                                    - -
                                    - -
                                    -
                                    -
                                    - -
                                    - -
                                    -
                                    -
                                    - -
                                    - -
                                    -
                                    - -
                                    -
                                    -
                                    - -
                                    - -
                                    -
                                    - - - - - - - - - -
                                    -
                                    - - -
                                    -
                                    -
                                    -
                                    - - diff --git a/contact-center/app/src/main/resources/templates/apps/desktop/profile.pug b/contact-center/app/src/main/resources/templates/apps/desktop/profile.pug new file mode 100644 index 00000000..73ccdb09 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/desktop/profile.pug @@ -0,0 +1,48 @@ +.uk-layui-form + form.layui-form.uk-form(action="/apps/profile/save.html", target="maincontent") + input(type="hidden", name="id", value=userData.id) + if index + input(type="hidden", name="index", value=index) + .layui-form-item + label.layui-form-label 用户名: + .layui-input-inline= userData.username + .layui-form-mid.layui-word-aux 用户登录的账号 + .layui-form-item + label.layui-form-label 姓名: + .layui-input-inline + input.layui-input(type="text", name="uname", value=userData.uname, required="", lay-verify="required", placeholder="请输入用户姓名", autocomplete="off") + .layui-form-item + label.layui-form-label 电子邮件: + .layui-input-inline + input.layui-input(type="email", name="email", value=userData.email, lay-verify="required email", placeholder="请输入电子邮件地址", autocomplete="off") + .layui-form-item + label.layui-form-label 密码: + .layui-input-inline + input#password.layui-input(type="password", name="password", placeholder="请输入登录密码", lay-verify="pass", autocomplete="off") + .layui-form-mid.layui-word-aux(style="margin-top:5px") + input#repassword.layui-input(type="password", name="repassword", lay-verify="repass", placeholder="请再次输入密码", autocomplete="off") + .layui-form-item + label.layui-form-label 手机号: + .layui-input-inline + input.layui-input(type="mobile", name="mobile", value=userData.mobile, placeholder="请输入手机号码", autocomplete="off") + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit="", lay-filter="profile") 立即提交 + button.layui-btn.layui-btn-original(type="reset") 重置 + +script. + layui.use('form', function () { + var form = layui.form(); + form.on('submit(*)', function (data) { + layerhelper.close('mainajaxwin'); + return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。 + }); + form.render(); //更新全部 + form.verify({ + repass: function (value) { + if (value != $('#password').val()) { + return '两次输入的密码不一致,请确认'; + } + } + }); + }); diff --git a/contact-center/app/src/main/resources/templates/apps/entim/chat.html b/contact-center/app/src/main/resources/templates/apps/entim/chat.html deleted file mode 100644 index 51905f41..00000000 --- a/contact-center/app/src/main/resources/templates/apps/entim/chat.html +++ /dev/null @@ -1,317 +0,0 @@ -
                                    -
                                    -
                                    - - <#include "/apps/entim/more.html"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                                    -
                                    - -
                                    -
                                    0/200
                                    -
                                    Ctrl + Enter
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    用户信息

                                    -
                                    -
                                    -
                                      -
                                    • -

                                      姓名:${entimuser.uname!''}

                                      -
                                    • - <#if organ??> -
                                    • -

                                      部门:${organ.name!''}

                                      -
                                    • - -
                                    • -

                                      邮件:${entimuser.email!''}

                                      -
                                    • -
                                    • -

                                      电话:${entimuser.mobile!''}

                                      -
                                    • -
                                    • -

                                      部门: - <#if organs?? > - <#list organs as organ> - ${organ.name!''}  - - -

                                      -
                                    • -
                                    -
                                    -
                                    - -

                                    欢迎使用春松客服企业聊天

                                    -

                                    QQ群:春松客服开源社区

                                    -

                                    详情请咨询:春松客服

                                    -
                                    -
                                    -
                                    -
                                    - - - diff --git a/contact-center/app/src/main/resources/templates/apps/entim/chat.pug b/contact-center/app/src/main/resources/templates/apps/entim/chat.pug new file mode 100644 index 00000000..5ce4ac20 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/entim/chat.pug @@ -0,0 +1,320 @@ +extends /apps/entim/include/payout.pug + +block content + #containter.clearfix(style='margin-right:200px;') + .content-left + .chat-above#above + .clearfix.message.connect-message + span#connect-message(style='background-color:#FFFFFF;color:#4665d4;') + a(href='javascript:getMoreMessage()', style='color:#4665d4;') + i.layui-icon  + | 查看更多消息 + include /apps/entim/more.pug + + // <#if chatMessageList?? && chatMessageList.content> + // <#list chatMessageList.content?reverse as chatMessage> + // <#if chatMessage.calltype == "呼出"> + //
                                    + //
                                    + // + //
                                    + // + // + //
                                    + //
                                    + // + //
                                    ${(chatMessage.message!'')?no_esc}
                                    + //
                                    + //
                                    + //
                                    + // <#else> + //
                                    + //
                                    + // + //
                                    + // + // + //
                                    + //
                                    + // + //
                                    ${(chatMessage.message!'')?no_esc}
                                    + //
                                    + //
                                    + //
                                    + // + // + // + .chat-bottom#bottom + textarea#message(name='content', style='visibility:hidden;') + .btn-push.clearfix + #surplus(style='float:left;height:24px;line-height:34px;margin: 5px 20px 10px 5px;') 0/200 + div(style='display: inline-block;position: absolute;right: 110px;bottom: 14px;') Ctrl + Enter + button.send-btn.active.special.clearfix#sent(type='button', onclick='sendMessage()', style='background-color:#32c24d;font-weight: 200;padding:5px;') + | 发送 + .content-rig + .content-head + p 用户信息 + .content-list + ul + li + p + | 姓名:#{entimuser.uname} + if organ + li + p + | 部门:#{organ.name} + li + p + | 邮件:#{entimuser.email} + li + p + | 电话:#{entimuser.mobile} + li + p + | 部门: + if organs + for organ in organs + organ.name   + .content-bottom + span#welcome-message + p 欢迎使用春松客服企业聊天 + p + | QQ群: + a(target='_blank', href='//shang.qq.com/wpa/qunwpa?idkey=ef3061d99653e2f43619ddcefbf76ac2399196d89fd589501e19ae64423a5a31') + img(border='0', src='//pub.idqqimg.com/wpa/images/group.png', alt='春松客服开源社区', title='春松客服开源社区') + p + | 详情请咨询: + a(href='https://www.chatopera.com', target='_blank', style='color:#32c24d;') 春松客服 + style. + .ukefu-media-image { + max-height: 150px; + max-width: 200px; + cursor: pointer; + } + script(type='text/javascript'). + var editor, words; + KindEditor.ready(function (K) { + editor = K.create('textarea[name="content"]', { + autoHeightMode: false, + width: "100%", + resizeType: 0, + themeType: 'simple', + fontsize: 14, + newlineTag: "br", + filterMode: true, + items: ['emoticons', 'image', 'insertfile'], + uploadJson: '/ent/im/image/upload.html?userid=#{entimuser.id}', + filePostName: 'imgFile', + allowImageRemote: false, + allowFileUpload: true, + allowInsertUpload: false, + afterChange: function () { + var count = this.count(); + + words = this.count("text"); + var pattern = '字数:' + words + '字'; + document.getElementById('surplus').innerHTML = "字符: " + count + " ,文字:" + pattern; //输入显示 + //////// + }, + afterCreate: function () { //设置编辑器创建后执行的回调函数 + var self = this; + //Ctrl+Enter提交表单 + K.ctrl(document, 13, function () { + self.sync(); + sendMessage(); + }); + K.ctrl(self.edit.doc, 13, function () { + self.sync(); + sendMessage(); + }); + } + }); + }); + KindEditor.options.cssData = "body { font-size: 15px; font-family:'Microsoft Yahei', 'Helvetica', 'Simsun', 'Arial';}"; + var R3Ajax = { + ajax: function (opt) { + var xhr = this.createXhrObject(); + xhr.onreadystatechange = function () { + if (xhr.readyState != 4) return; + (xhr.status === 200 ? + opt.success(xhr.responseText, xhr.responseXML) : + opt.error(xhr.responseText, xhr.status)); + } + xhr.open(opt.type, opt.url, true); + if (opt.type !== 'post') + opt.data = null; + else + xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); + opt.data = this.parseQuery(opt.data); + xhr.send(opt.data); + }, + post: function (url, success, data) { + var popt = { + url: url, + type: 'post', + data: data, + success: success, + error: function (data) { + } + } + this.ajax(popt); + }, + get: function (url, success) { + var gopt = { + url: url, + type: 'get', + success: success, + error: function () { + } + } + this.ajax(gopt); + }, + createXhrObject: function () { + var methods = [ + function () { + return new XMLHttpRequest(); + }, + function () { + return new ActiveXObject('Msxml2.XMLHTTP'); + }, + function () { + return new ActiveXObject('Microsoft.XMLHTTP'); + } + ]; + for (var i = 0; len = methods.length, i < len; i++) { + try { + methods[i](); + } catch (e) { + continue; + } + this.createXhrObject = methods[i]; + return methods[i](); + } + throw new Error('Could not create an XHR object.'); + }, + parseQuery: function (json) { + if (typeof json == 'object') { + var str = ''; + for (var i in json) { + str += "&" + i + "=" + encodeURIComponent(json[i]); + } + return str.length == 0 ? str : str.substring(1); + } else { + return json; + } + } + }; + Date.prototype.format = function (fmt) { + var o = { + "M+": this.getMonth() + 1, //月份 + "d+": this.getDate(), //日 + "h+": this.getHours(), //小时 + "m+": this.getMinutes(), //分 + "s+": this.getSeconds(), //秒 + "q+": Math.floor((this.getMonth() + 3) / 3), //季度 + "S": this.getMilliseconds() //毫秒 + }; + if (/(y+)/.test(fmt)) { + fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length)); + } + for (var k in o) { + if (new RegExp("(" + k + ")").test(fmt)) { + fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); + } + } + return fmt; + } + var R3Helper = { + resize: function () { + var height = document.body.offsetHeight; + document.getElementById('above').style.height = (height - 194 - 50) + "px"; + } + } + script. + layui.use('element', function () { + var $ = layui.jquery + , element = layui.element(); //Tab的切换功能,切换事件监听等,需要依赖element模块 + }); + var hostname = location.hostname; + var socket = io.connect(location.protocol + "//" + top.hostname + ":" + top.port + "/im/ent?userid="+'#{user.id}'+"&orgi="+'#{user.orgi}'+"&contextid="+'#{contextid}', { + transports: ['websocket'], + upgrade: false + }); + socket.on('message', function (data) { + if (data.contextid != "#{entimuser.id}") { + return; + } + + console.log('message', data); + data.createtime = formatDate(data.createtime); + var chat = document.getElementsByClassName('chatting-left').innerText; + chat = data.message; + + if (data.msgtype == 'image') { + chat = ""; + } else if (data.msgtype == 'file') { + chat = ""; + } + + if (data.calltype == "呼出") { + output('
                                    ' + chat + '
                                    ' , "chat-block" + ) + ; + } else if (data.calltype == "呼入") { + output('
                                    ' + chat + '
                                    ' , "chat-block" + ) + ; + } + }); + socket.on('status', function (data) { + if (data.contextid == '#{entimuser.id}') { + if (data.message == 'online') { + top.$('#chat_#{entimuser.id}').removeClass('offline').removeClass('online').addClass('online').attr('title', '在线'); + } else if (data.message == 'offline') { + top.$('#chat_#{entimuser.id}').removeClass('online').removeClass('offline').addClass('offline').attr('title', '离线'); + } + } + }) + function sendMessage() { + editor.sync(); + var count = editor.count("text"); + if (count > 0) { + var message = document.getElementById('message').value; + if (message != "") { + socket.emit('message', { + userid: "#{user.id}", + type: "message", + session: "#{user.id}", + touser: "#{entimuser.id}", + contextid: "#{user.id}", + orgi: "#{user.orgi}", + message: message + }); + } + editor.html(''); + } + } + function output(message, clazz) { + if (clazz == "message connect-message") { + var messages = document.getElementsByClassName("connect-message"); + for (inx = 0; inx < messages.length;) { + document.getElementById('above').removeChild(messages[inx]); + inx++; + } + } + var element = ("
                                    " + " " + message + "
                                    "); + document.getElementById('above').innerHTML = (document.getElementById('above').innerHTML + element); + document.getElementById('above').scrollTop = document.getElementById('above').scrollHeight; + } + document.getElementById('above').scrollTop = document.getElementById('above').scrollHeight; + if('#{online && online == true}'){ + top.$('#chat_#{entimuser.id}').removeClass('offline').addClass('online').attr('title' , '在线'); + } + + function getMoreMessage() { + var firstCreateTime = $('.time').first().text(); + R3Ajax.get("/ent/im/chat/more.html?userid=#{entimuser.id}&createtime=" + firstCreateTime, function (html) { + $('.connect-message').after(html); + }); + } + diff --git a/contact-center/app/src/main/resources/templates/apps/entim/expand.html b/contact-center/app/src/main/resources/templates/apps/entim/expand.html deleted file mode 100644 index f7503d42..00000000 --- a/contact-center/app/src/main/resources/templates/apps/entim/expand.html +++ /dev/null @@ -1,10 +0,0 @@ -
                                    -
                                    - -
                                    -
                                    - diff --git a/contact-center/app/src/main/resources/templates/apps/entim/expand.pug b/contact-center/app/src/main/resources/templates/apps/entim/expand.pug new file mode 100644 index 00000000..219371bd --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/entim/expand.pug @@ -0,0 +1,10 @@ +extends /apps/entim/include/payout.pug + +block content + .ukefu-entim-point.ukefu-entim-msgbox(style='cursor: pointer;', onclick='top.closeentim();', title='展开') + .expand(style='width: 100%;height: 100%;') + i.layui-icon + style. + .expand:hover { + background: rgba(0, 0, 0, 0.2); + } diff --git a/contact-center/app/src/main/resources/templates/apps/entim/group/grouplist.html b/contact-center/app/src/main/resources/templates/apps/entim/group/grouplist.html deleted file mode 100644 index 1e28256e..00000000 --- a/contact-center/app/src/main/resources/templates/apps/entim/group/grouplist.html +++ /dev/null @@ -1,58 +0,0 @@ -
                                      -
                                    • -
                                      - - 我创建的群 - <#assign curgroup = 0 > - <#if groupList??> - <#list groupList as imgroup> - <#assign curgroup = curgroup+1 > - - - ( ${curgroup} ) -
                                      - -
                                    • -
                                    • -
                                      - - 我加入的群 - <#assign curgroup = 0 > - <#if joinGroupList??> - <#list joinGroupList as imGroup> - <#if imGroup.imgroup?? && user.id != imGroup.creater> - <#assign curgroup = curgroup+1 > - - - - ( ${curgroup} ) -
                                      - -
                                    • -
                                    \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/entim/group/grouplist.pug b/contact-center/app/src/main/resources/templates/apps/entim/group/grouplist.pug new file mode 100644 index 00000000..efa479ca --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/entim/group/grouplist.pug @@ -0,0 +1,43 @@ +ul + li.ukefu-entim-organ-open + h5.ukefu-entim-organ(lay-filter='spread', lay-type='true') + i.layui-icon  + span 我创建的群 + - var curgroup = 0 + if groupList + for imgroup in groupList + - curgroup = curgroup+1 + em + | ( + cite.layim-count= curgroup + | ) + ul.ukefu-user-list.ukefu-group + if groupList + for imgroup in groupList + li(id="group_#{imgroup.id}") + a(href="javascript:void(0)", onclick="openchat('/ent/im/group.html?id=#{imgroup.id}', '/images/imgroup.png' , '#{imgroup.name}' , '#{imgroup.id}' , '创建时间:#{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', imgroup.createtime)}');") + img(src="/images/imgroup.png") + span= imgroup.name + .ukefu-session-tip(class="cont_#{imgroup.id}") + li.ukefu-entim-organ-open + h5.ukefu-entim-organ(lay-filter='spread', lay-type='true') + i.layui-icon  + span 我加入的群 + - var curgroup = 0 + if joinGroupList + for imGroup in joinGroupList + if imGroup.imgroup && user.id != imGroup.creater + - curgroup = curgroup+1 + em + | ( + cite.layim-count= curgroup + | ) + ul.ukefu-user-list.ukefu-group + if joinGroupList + for imGroup in joinGroupList + if imGroup.imgroup && user.id != imGroup.creater + li(id="group_#{imGroup.imgroup.id}") + a(href="javascript:void(0)", onclick="openchat('/ent/im/group.html?id=#{imGroup.imgroup.id}', '/images/imgroup.png' , '#{imGroup.imgroup.name}' , '#{imGroup.imgroup.id}' , '创建时间:#{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', imGroup.imgroup.createtime)}');") + img(src="/images/imgroup.png") + span= imGroup.imgroup.name + .ukefu-session-tip(class="cont_#{imGroup.imgroup.id}") diff --git a/contact-center/app/src/main/resources/templates/apps/entim/group/index.html b/contact-center/app/src/main/resources/templates/apps/entim/group/index.html deleted file mode 100644 index ad4d765a..00000000 --- a/contact-center/app/src/main/resources/templates/apps/entim/group/index.html +++ /dev/null @@ -1,325 +0,0 @@ -
                                    -
                                    -
                                    - - <#include "/apps/entim/group/more.html"> -
                                    -
                                    - -
                                    -
                                    0/200
                                    -
                                    Ctrl + Enter
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    群公告

                                    -
                                    -
                                    - <#include "/apps/entim/group/tipmsg.html"> -
                                    -
                                    -

                                    群应用

                                    -
                                    -
                                    - -
                                    -
                                    -

                                    群成员(${imGroupUserList?size})

                                    -
                                    -
                                    - -
                                    -
                                    -
                                    - - - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/entim/group/index.pug b/contact-center/app/src/main/resources/templates/apps/entim/group/index.pug new file mode 100644 index 00000000..c1c0b43e --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/entim/group/index.pug @@ -0,0 +1,320 @@ +extends /apps/entim/include/payout.pug + +block content + #containter.clearfix(style='margin-right:200px;') + .content-left + .chat-above#above + .clearfix.message.connect-message + span#connect-message(style='background-color:#FFFFFF;color:#4665d4;') + a(href='javascript:getMoreMessage()', style='color:#4665d4;') + i.layui-icon  + | 查看更多消息 + include /apps/entim/group/more.pug + .chat-bottom#bottom + textarea#message(name='content', style='visibility:hidden;') + .btn-push.clearfix + #surplus(style='float:left;height:24px;line-height:34px;margin: 5px 20px 10px 5px;') 0/200 + div(style='display: inline-block;position: absolute;right: 110px;bottom: 14px;') Ctrl + Enter + button.send-btn.active.special.clearfix#sent(type='button', onclick='sendMessage()', style='background-color:#32c24d;font-weight: 200;padding:5px;') + | 发送 + .content-rig + .content-head + p 群公告 + .content-list.ukefu-group-tipmsg#group-tipmessage + include /apps/entim/group/tipmsg.pug + .content-head + p 群应用 + .content-list(style='margin-top: 0px;') + ul.ukefu-group-apps + li.ukefu-group-app + a(href='/ent/im/group/user.html?id=#{imGroup.id}') + .ukefu-group-app-icon + i.layui-icon  + .ukefu-group-app-name 成员 + if user.id == imGroup.creater + li.ukefu-group-app + a(href="javascript:void(0)", onclick="group()") + .ukefu-group-app-icon + i.layui-icon  + .ukefu-group-app-name 公告 + .content-head + p 群成员(#{imGroupUserList.size()}) + .content-list(style='margin-top: 0px; height: calc(100% - 295px);overflow-y: auto;') + ul.ukefu-user-list.ukefu-group(style='display:block;') + if imGroupUserList + for imGroupUser in imGroupUserList + li(id="gruop_user_#{imGroupUser.user.id}") + a(href="javascript:void(0)", onclick="isOpenchat('#{imGroupUser.user.id}','#{imGroupUser.user.uname}','#{imGroupUser.user.lastlogintime}')") + img(src="/images/user-pc.png") + span= imGroupUser.user.uname + if imGroupUser.admin || imGroupUser.user.id == user.id + .admin + if imGroup.creater == imGroupUser.user.id + img(src="/images/creater.png", title="创建人") + else if imGroupUser.admin == true + img(src="/images/admin.png", title="系统管理员") + style. + .ukefu-media-image { + max-height: 150px; + max-width: 200px; + cursor: pointer; + } + script(type='text/javascript'). + var editor, words; + KindEditor.ready(function (K) { + editor = K.create('textarea[name="content"]', { + autoHeightMode: false, + width: "100%", + resizeType: 0, + themeType: 'simple', + fontsize: 14, + newlineTag: "br", + filterMode: true, + items: ['emoticons', 'image', 'insertfile'], + uploadJson: '/ent/im/image/upload.html?userid=#{user.id}&group=#{contextid}', + filePostName: 'imgFile', + allowImageRemote: false, + allowFileUpload: true, + allowInsertUpload: false, + afterChange: function () { + var count = this.count(); + + words = this.count("text"); + var pattern = '字数:' + words + '字'; + document.getElementById('surplus').innerHTML = "字符: " + count + " ,文字:" + pattern; //输入显示 + //////// + }, + afterCreate: function () { //设置编辑器创建后执行的回调函数 + var self = this; + //Ctrl+Enter提交表单 + K.ctrl(document, 13, function () { + self.sync(); + sendMessage(); + }); + K.ctrl(self.edit.doc, 13, function () { + self.sync(); + sendMessage(); + }); + } + }); + }); + KindEditor.options.cssData = "body { font-size: 15px; font-family:'Microsoft Yahei', 'Helvetica', 'Simsun', 'Arial';}"; + var R3Ajax = { + ajax: function (opt) { + var xhr = this.createXhrObject(); + xhr.onreadystatechange = function () { + if (xhr.readyState != 4) return; + (xhr.status === 200 ? + opt.success(xhr.responseText, xhr.responseXML) : + opt.error(xhr.responseText, xhr.status)); + } + xhr.open(opt.type, opt.url, true); + if (opt.type !== 'post') + opt.data = null; + else + xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); + opt.data = this.parseQuery(opt.data); + xhr.send(opt.data); + }, + post: function (url, success, data) { + var popt = { + url: url, + type: 'post', + data: data, + success: success, + error: function (data) { + } + } + this.ajax(popt); + }, + get: function (url, success) { + var gopt = { + url: url, + type: 'get', + success: success, + error: function () { + } + } + this.ajax(gopt); + }, + createXhrObject: function () { + var methods = [ + function () { + return new XMLHttpRequest(); + }, + function () { + return new ActiveXObject('Msxml2.XMLHTTP'); + }, + function () { + return new ActiveXObject('Microsoft.XMLHTTP'); + } + ]; + for (var i = 0; len = methods.length, i < len; i++) { + try { + methods[i](); + } catch (e) { + continue; + } + this.createXhrObject = methods[i]; + return methods[i](); + } + throw new Error('Could not create an XHR object.'); + }, + parseQuery: function (json) { + if (typeof json == 'object') { + var str = ''; + for (var i in json) { + str += "&" + i + "=" + encodeURIComponent(json[i]); + } + return str.length == 0 ? str : str.substring(1); + } else { + return json; + } + } + }; + Date.prototype.format = function (fmt) { + var o = { + "M+": this.getMonth() + 1, //月份 + "d+": this.getDate(), //日 + "h+": this.getHours(), //小时 + "m+": this.getMinutes(), //分 + "s+": this.getSeconds(), //秒 + "q+": Math.floor((this.getMonth() + 3) / 3), //季度 + "S": this.getMilliseconds() //毫秒 + }; + if (/(y+)/.test(fmt)) { + fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length)); + } + for (var k in o) { + if (new RegExp("(" + k + ")").test(fmt)) { + fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); + } + } + return fmt; + } + var R3Helper = { + resize: function () { + var height = document.body.offsetHeight; + document.getElementById('above').style.height = (height - 194 - 50) + "px"; + } + } + function isOpenchat(id, uname, lastlogintime) { + if (id != '#{user.id}') { + openchat('/ent/im/chat.html?userid=' + id, '/images/user-pc.png', uname, user.id, '最近登陆:' + lastlogintime) + } + } + function openchat(url, img, name, id, text) { + top.layer.open({ + type: 2, + id: id, + title: ["
                                    " + name + "

                                    " + text + "

                                    ", "height:55px"], + closeBtn: 1, //不显示关闭按钮 + shade: false, + area: ['700px', '520px'], + maxmin: true, + anim: 2, + shade: 0, + content: url + }); + top.$('#' + id).next().find("a.layui-layer-maxmin").click(); + } + + script. + layui.use('element', function () { + var $ = layui.jquery + , element = layui.element(); //Tab的切换功能,切换事件监听等,需要依赖element模块 + }); + var hostname = location.hostname; + var socket = io.connect(location.protocol + "//" + top.hostname + ":" + top.port + "/im/ent?userid=#{user.id}&orgi=#{user.orgi}&contextid=#{contextid}&group=#{contextid}", { + transports: ['websocket'], + upgrade: false + }); + + socket.on('message', function (data) { + data.createtime = formatDate(data.createtime); + var chat = document.getElementsByClassName('chatting-left').innerText; + chat = data.message; + + if (data.msgtype == 'image') { + chat = ""; + } else if (data.msgtype == 'file') { + chat = ""; + } + + var user = data.username; + if (data.userid == "#{user.id}") { + output('
                                    ' + chat + '
                                    ', "chat-block"); + } else { + output('
                                    ' + chat + '
                                    ', "chat-block"); + } + }); + function sendMessage() { + editor.sync(); + var count = editor.count("text"); + if (count > 0) { + var message = document.getElementById('message').value; + if (message != "") { + socket.emit('message', { + userid: "#{user.id}", + type: "message", + username: "#{user.uname}", + session: "#{user.id}", + touser: "#{contextid}", + contextid: "#{contextid}", + orgi: "#{user.orgi}", + model: "entim", + chatype: "group", + message: message + }); + } + } + editor.html(''); + } + function output(message, clazz) { + if (clazz == "message connect-message") { + var messages = document.getElementsByClassName("connect-message"); + for (inx = 0; inx < messages.length;) { + document.getElementById('above').removeChild(messages[inx]); + inx++; + } + } + var element = ("
                                    " + " " + message + "
                                    "); + document.getElementById('above').innerHTML = (document.getElementById('above').innerHTML + element); + document.getElementById('above').scrollTop = document.getElementById('above').scrollHeight; + } + document.getElementById('above').scrollTop = document.getElementById('above').scrollHeight; + top.$('#chat_#{imGroup.id}').removeClass('offline').addClass('online').attr('title', '在线'); + function group() { + layer.open({ + title: '公告', + type: 1 + , + id: 'tipmsg' + , + content: '
                                    ' + , + btn: ['保存', '关闭'] + , + shade: 0 //不显示遮罩 + , + yes: function () { + loadURL('/ent/im/group/tipmsg.html?id=#{imGroup.id}&tipmsg=' + encodeURIComponent($('#tipmsgcontent').val()), '#group-tipmessage' + ) + ; + layer.closeAll(); + } + }); + } + + function getMoreMessage() { + let firstCreateTime = $('.time').first().text(); + R3Ajax.get("/ent/im/group/more.html?id=#{contextid}&createtime=" + firstCreateTime, function (html) { + $('.connect-message').after(html); + }); + } + style. + #group-tipmessage { + overflow-y: auto; + word-break: break-all; + text-indent: 0px; + } \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/entim/group/more.html b/contact-center/app/src/main/resources/templates/apps/entim/group/more.html deleted file mode 100644 index 7c20a350..00000000 --- a/contact-center/app/src/main/resources/templates/apps/entim/group/more.html +++ /dev/null @@ -1,69 +0,0 @@ -<#if chatMessageList?? && chatMessageList.content> -<#list chatMessageList.content?reverse as chatMessage> - <#if chatMessage.userid?? && chatMessage.userid == user.id> -
                                    -
                                    - -
                                    - - -
                                    -
                                    - -
                                    - <#if chatMessage.msgtype?? && chatMessage.msgtype == "image"> - - <#elseif chatMessage.msgtype?? && chatMessage.msgtype == "file"> - - <#else> - ${(chatMessage.message!'')?no_esc} - -
                                    -
                                    -
                                    -
                                    - <#else> -
                                    -
                                    - -
                                    - - -
                                    -
                                    - -
                                    - <#if chatMessage.msgtype?? && chatMessage.msgtype == "image"> - - <#elseif chatMessage.msgtype?? && chatMessage.msgtype == "file"> - - <#else> - ${(chatMessage.message!'')?no_esc} - -
                                    -
                                    -
                                    -
                                    - - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/entim/group/more.pug b/contact-center/app/src/main/resources/templates/apps/entim/group/more.pug new file mode 100644 index 00000000..40b05bb9 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/entim/group/more.pug @@ -0,0 +1,48 @@ +if chatMessageList && chatMessageList.content + for chatMessage in pugHelper.reverse(chatMessageList.content) + if chatMessage.userid && chatMessage.userid == user.id + .clearfix.chat-block + .chat-right + img.user-img(src='/im/img/user.png', alt) + .chat-message + label.time= pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', chatMessage.createtime) + label.user= user.uname + .chatting-right + i.arrow + .chat-content + if chatMessage.msgtype && chatMessage.msgtype == "image" + a(href="!{chatMessage.message}&original=true", target="_blank") + img.ukefu-media-image(src="!{chatMessage.message}") + else if chatMessage.msgtype && chatMessage.msgtype == "file" + .ukefu-message-file + .ukefu-file-icon + img(src="/im/img/file.png") + .ukefu-file-desc + a(href="#{chatMessage.message}", target="_blank") + div= chatMessage.filename + div #{chatMessage.filesize / 1024}kb + else + | !{chatMessage.message} + else + .clearfix.chat-block + .chat-left + img.user-img(src='/im/img/user.png', alt) + .chat-message + label.user= chatMessage.username + label.time= pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', chatMessage.createtime) + .chatting-left + i.arrow + .chat-content + if chatMessage.msgtype && chatMessage.msgtype == "image" + a(href="!{chatMessage.message}&original=true", target="_blank") + img.ukefu-media-image(src="!{chatMessage.message}") + else if chatMessage.msgtype && chatMessage.msgtype == "file" + .ukefu-message-file + .ukefu-file-icon + img(src="/im/img/file.png") + .ukefu-file-desc + a(href=chatMessage.message, target="_blank") + div= chatMessage.filename + div #{chatMessage.filesize / 1024}kb + else + | !{chatMessage.message} diff --git a/contact-center/app/src/main/resources/templates/apps/entim/group/tipmsg.html b/contact-center/app/src/main/resources/templates/apps/entim/group/tipmsg.html deleted file mode 100644 index 4b2ef171..00000000 --- a/contact-center/app/src/main/resources/templates/apps/entim/group/tipmsg.html +++ /dev/null @@ -1,8 +0,0 @@ -<#if imGroup.tipmessage??> - ${imGroup.tipmessage} -<#else> -
                                    - -

                                    暂时没有新通知

                                    -
                                    - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/entim/group/tipmsg.pug b/contact-center/app/src/main/resources/templates/apps/entim/group/tipmsg.pug new file mode 100644 index 00000000..8b0d1c3c --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/entim/group/tipmsg.pug @@ -0,0 +1,6 @@ +if imGroup.tipmessage + | #{imGroup.tipmessage} +else + .ukefu-group-empty + img(src='/images/empty.png') + p 暂时没有新通知 \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/entim/group/user.html b/contact-center/app/src/main/resources/templates/apps/entim/group/user.html deleted file mode 100644 index 2f10446b..00000000 --- a/contact-center/app/src/main/resources/templates/apps/entim/group/user.html +++ /dev/null @@ -1,94 +0,0 @@ -
                                    -
                                    -
                                    - -
                                    -
                                    - ${imGroup.name!''} -
                                    -
                                    - 发消息 - <#if user.id = imGroup.creater> - 解散群 - -
                                    -
                                    -
                                    -
                                    -
                                      -
                                    • 群成员
                                    • -
                                    -
                                    -
                                    -
                                    -
                                      - <#if organList??> - <#list organList as organ> -
                                    • -
                                      - - ${organ.name!''} - <#assign curusers = 0 > - <#if userList??> - <#list userList as entimuser> - <#if entimuser.organs?? && entimuser.id != user.id && entimuser.organs[organ.id]??> - <#assign curusers = curusers+1 > - - - - ( ${curusers} ) -
                                      -
                                        - <#if userList??> - <#list userList as entimuser> - <#if entimuser.organs?? && entimuser.id != user.id && entimuser.organs[organ.id]??> -
                                      • - - ${entimuser.uname!''} -

                                        最近登陆:${entimuser.lastlogintime?string('yyyy-MM-dd HH:mm:ss')}

                                        - <#if user.id = imGroup.creater> -
                                        - <#assign useringroup = false > - <#if imGroupUserList??><#list imGroupUserList as imGroupUser><#if imGroupUser.user?? && imGroupUser.user.id == entimuser.id><#assign useringroup = true ><#break/> - checked="checked"> -
                                        - -
                                      • - - - -
                                      -
                                    • - - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/entim/group/user.pug b/contact-center/app/src/main/resources/templates/apps/entim/group/user.pug new file mode 100644 index 00000000..81250b3b --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/entim/group/user.pug @@ -0,0 +1,76 @@ +extends /apps/entim/include/payout.pug + +block content + #containter.clearfix + .group-left + .group-icon + img(src='/images/imgroup.png') + .group-name + | #{imGroup.name} + .group-btn + a.layui-btn.layui-btn-normal.layui-btn-small(href='/ent/im/group.html?id=#{imGroup.id}') 发消息 + if user.id = imGroup.creater + a.layui-btn.layui-btn-danger.layui-btn-small(data-toggle="tip", data-title="解散动作无法恢复,请确认是否解散该群?", href="/ent/im/rmgroup.html?id=#{imGroup.id}") 解散群 + .group-rig + .layui-tab.layui-tab-brief(style='margin:0px;height: 100%') + ul.layui-tab-title + li.layui-this 群成员 + .layui-tab-content(style='height: calc(100% - 60px)') + .layui-tab-item.layui-show(style='height: 100%;width: 100%;overflow-y: auto') + form.layui-form + ul + if organList + for organ in organList + li.ukefu-entim-organ-open + h5.ukefu-entim-organ(lay-filter="spread", lay-type="true") + i.layui-icon  + span= organ.name + - var curusers = 0 + if userList + for entimuser in userList + if entimuser.organs && entimuser.id != user.id && entimuser.organs[organ.id] + - curusers = curusers+1 + em + cite.layim-count + | (#{curusers}) + ul.ukefu-user-list + if userList + for entimuser in userList + if entimuser.organs && entimuser.id != user.id && entimuser.organs[organ.id] + li(id="user_#{entimuser.id}") + img(src="/images/user-pc.png") + span= entimuser.uname + p + | 最近登陆:#{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', entimuser.lastlogintime)} + if user.id = imGroup.creater + .ukefu-group-join + - var useringroup = false + if imGroupUserList + for imGroupUser in imGroupUserList + if imGroupUser.user && imGroupUser.user.id == entimuser.id + - useringroup = true + input(type="checkbox", name="user", title="加入", value="#{entimuser.id}", lay-filter="save", checked=useringroup == true) + script. + layui.use('element', function () { + var element = layui.element(); + }); + layui.use('form', function () { + var form = layui.form(); + form.on("checkbox(save)", function (data) { + if (data.elem.checked) { + loadURL('/ent/im/group/seluser.html?id=#{imGroup.id}&user=' + data.value) + } else { + loadURL('/ent/im/group/rmuser.html?id=#{imGroup.id}&user=' + data.value) + } + }); + }); + $('.ukefu-entim-organ').click(function () { + if ($(this).parent().hasClass('ukefu-entim-organ-open')) { + $(this).parent().removeClass('ukefu-entim-organ-open'); + $(this).children().first().html(''); + } else { + $(this).parent().addClass('ukefu-entim-organ-open') + $(this).children().first().html(''); + } + }); + diff --git a/contact-center/app/src/main/resources/templates/apps/entim/include/payout.pug b/contact-center/app/src/main/resources/templates/apps/entim/include/payout.pug new file mode 100644 index 00000000..8606b7d9 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/entim/include/payout.pug @@ -0,0 +1,17 @@ +doctype html +html(lang="en") + head + meta(charset='utf-8') + title 在线咨询 + link(rel="stylesheet", href="/css/layui.css") + link#skin(rel="stylesheet", type="text/css", href="/css/entim.css") + link(rel="stylesheet", type="text/css", href="/im/js/kindeditor/themes/default/default.css") + script(type="text/javascript", src="/im/js/kindeditor/kindeditor-min.js") + script(type="text/javascript", src="/im/js/kindeditor/lang/zh-CN.js") + script(src="/js/jquery-1.10.2.min.js") + script(src="/layui.js") + script(src="/im/js/socket.io.js") + script(src="/js/cskefu.js") + body(style="overflow:hidden;background-size: contain;") + .large + block content \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/entim/index.html b/contact-center/app/src/main/resources/templates/apps/entim/index.html deleted file mode 100644 index 6f045513..00000000 --- a/contact-center/app/src/main/resources/templates/apps/entim/index.html +++ /dev/null @@ -1,230 +0,0 @@ - - -
                                    -
                                    -
                                      -
                                    • -
                                    • -
                                    • -
                                    -
                                    -
                                    -
                                      - <#if organList??> - <#list organList as organ> -
                                    • -
                                      - - ${organ.name!''} - <#assign curusers = 0 > - <#if userList??> - <#list userList as entimuser> - <#if entimuser.organs?? && entimuser.id != user.id && entimuser.organs[organ.id]??> - <#assign curusers = curusers+1 > - - - - ( ${curusers} ) -
                                      - -
                                    • - - -
                                    -
                                    -
                                    - <#include "/apps/entim/group/grouplist.html"> -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    - - diff --git a/contact-center/app/src/main/resources/templates/apps/entim/index.pug b/contact-center/app/src/main/resources/templates/apps/entim/index.pug new file mode 100644 index 00000000..26076ae1 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/entim/index.pug @@ -0,0 +1,222 @@ +extends /apps/entim/include/payout.pug + +block content + style. + * { + margin: 0; + padding: 0; + -webkit-touch-callout: none; /* iOS Safari */ + -webkit-user-select: none; /* Chrome/Safari/Opera */ + -khtml-user-select: none; /* Konqueror */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* Internet Explorer/Edge */ + user-select: none; /* Non-prefixed version, currently not supported by any browser */ + } + #header + .ukefu-entim-info + .ukefu-entim-user + | #{user.uname} + span.ukefu-entim-status.online(title='在线') + i.layui-icon  + .ukefu-entim-desc + input.ukefu-entim-remark(placeholder='编辑签名', value='用心沟通,成就客户') + .ukefu-entim-close + a(href='javascript:void(0)', onclick='top.closeentim()') + i.layui-icon ဆ + #containter.clearfix + .layui-tab.layui-tab-brief + ul.layui-tab-title.ukefu-entim-type + li.layui-this + i.layui-icon  + li + i.layui-icon  + li + i.layui-icon  + .layui-tab-content(style='height:350px;overflow-y:auto;padding: 0px 10px;') + .layui-tab-item.layui-show + ul#frends + if organList + for organ in organList + li.ukefu-entim-organ-open + h5.ukefu-entim-organ(lay-filter="spread" lay-type="true") + i.layui-icon  + span= organ.name + - var curusers = 0 + if userList + for entimuser in userList + if entimuser.organs && entimuser.id != user.id && entimuser.organs[organ.id] + - curusers = curusers+1 + em + | ( + cite.layim-count= curusers + | ) + + ul.ukefu-user-list + if userList + for entimuser in userList + if entimuser.organs && entimuser.id != user.id && entimuser.organs[organ.id] + li(id="user_#{entimuser.id}") + a(href="javascript:void(0)", onclick="openchat('/ent/im/chat.html?userid=#{entimuser.id}' , '/images/user-pc.png' , '#{entimuser.uname}' , '#{entimuser.id}' , '最近登陆:#{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', entimuser.lastlogintime)}');") + img(src="/images/user-pc.png") + span= entimuser.uname + p + | 最近登陆:#{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', entimuser.lastlogintime)} + - var newmsg = 0 + if recentUserList + for recentUser in recentUserList + if recentUser.user.id == entimuser.id + - newmsg = recentUser.newmsg + div(class="ukefu-session-tip cont_#{entimuser.id}", data-newmsg=newmsg, style="#{newmsg > 0 ? 'display:block' : ''}") + .layui-tab-item#imgroup + include /apps/entim/group/grouplist.pug + .layui-tab-item + ul.ukefu-user-list(style='display:block;') + if recentUserList + for recentUser in recentUserList + li(id="recentuser_#{recentUser.id}") + a(href="javascript:void(0)", onclick="openchat('/ent/im/chat.html?userid=#{recentUser.user.id}' , '/images/user-pc.png' , '#{recentUser.user.uname}' , '#{recentUser.user.id}' , '最近登陆:#{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', recentUser.user.lastlogintime)}');") + img(src="/images/user-pc.png") + span= recentUser.user.uname + p + if recentUser.lastmsg + | !{recentUser.lastmsg} + else + | 最近登陆:#{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', recentUser.user.lastlogintime)} + .ukefu-session-tip(class="cont_#{recentUser.user.id}", data-newmsg=recentUser.newmsg, style="#{recentUser.newmsg > 0 ? 'display:block' : ''}")= recentUser.newmsg + #footer + ul.ukefu-entim-tool + li.layui-icon(title='搜索', onclick='search();')  + li.layui-icon.ukefu-entim-msgbox(title='消息盒子') + - var newmsg = 0 + if recentUserList + for recentUser in recentUserList + - newmsg = recentUser.newmsg + newmsg + |  + span.layui-anim.layer-anim-05.animated#msgbox(data-newmsg=newmsg, style="#{newmsg == 0 ? 'display:none' : ''}")= newmsg + if user && (user.roleAuthMap["A14_A01"] || user.admin) + li.layui-icon(title="新建", onclick="newGroup()") + |  + li.layui-icon(title='更换背景', onclick='skin()')  + //
                                  • + script. + layui.use('element', function () { + var $ = layui.jquery + , element = layui.element(); //Tab的切换功能,切换事件监听等,需要依赖element模块 + }); + function newGroup() { + layer.prompt({ + title: '新建一个群', + offset: 'b', + formType: 0 + }, function (text, index) { + layer.close(index); + loadURL('/ent/im/group/save.html?name=' + encodeURIComponent(text), '#imgroup') + }) + }; + + function about() { + layer.open({ + title: '关于', + btn: '关闭', + shade: 0, + content: '

                                    欢迎使用春松客服企业聊天

                                    QQ群:春松客服开源社区

                                    详情请咨询:春松客服

                                    ' + }); + } + function search() { + layer.open({ + title: '查询用户', + type: 1 + , + id: 'search' + , + offset: 'b' //具体配置参考:offset参数项 + , + content: '
                                    ' + , + btn: '关闭' + , + shade: 0 //不显示遮罩 + , + yes: function () { + layer.closeAll(); + } + , + end: function () { + $("#frends li").show(); + } + }); + $('#frend_search').on('input', function () { + $('#frends li').addClass("ukefu-entim-organ-open"); + if ($.trim($(this).val()) != "") { + $("#frends li").hide().filter(":contains('" + $(this).val() + "')").show(); + } else { + $("#frends li").show(); + } + }) + } + function skin() { + layer.open({ + title: '选择风格', + type: 2 + , id: 'selskin' + , content: '/ent/im/skin.html' + , btn: '关闭' + , shade: 0 //不显示遮罩 + }); + } + function openchat(url, img, name, id, text) { + top.layer.open({ + type: 2, + id: id, + title: ["
                                    " + name + "

                                    " + text + "

                                    ", "height:55px"], + closeBtn: 1, //不显示关闭按钮 + shade: false, + area: ['700px', '520px'], + maxmin: true, + anim: 2, + shade: 0, + content: url + }); + top.$('#' + id).next().find("a.layui-layer-maxmin").click(); + if ($('#msgbox').data("msgbox") - $('.cont_' + id).data("newmsg") > 0) { + $('#msgbox').data("newmsg", $('#msgbox').data("msgbox") - $('.cont_' + id).data("newmsg")); + } else { + $('#msgbox').data("newmsg", 0).hide(); + } + $('.cont_' + id).data("newmsg", 0).hide(); + } + $('.ukefu-entim-organ').click(function () { + if ($(this).parent().hasClass('ukefu-entim-organ-open')) { + $(this).parent().removeClass('ukefu-entim-organ-open'); + $(this).children().first().html(''); + } else { + $(this).parent().addClass('ukefu-entim-organ-open') + $(this).children().first().html(''); + } + }); + var socket = io.connect(location.protocol + "//" + top.hostname + ":" + top.port + "/im/ent?userid=#{user.id}&orgi=#{user.orgi}"); + socket.on('connect', function () { + //service.sendRequestMessage(); + //output(''+ new Date().format("yyyy-MM-dd hh:mm:ss") + ' 开始沟通' +'' , 'message callOutConnect-message'); + }) + socket.on('message', function (data) { + if (top.$('#dialog_' + data.contextid).length == 0) { + var user; + if ($('.cont_' + data.contextid).length > 0) { + user = $('.cont_' + data.contextid)[0]; + } + if ($(user).data('newmsg')) { + $('.cont_' + data.contextid).data('newmsg', $(user).data('newmsg') + 1).text($(user).data('newmsg')); + } else { + $('.cont_' + data.contextid).data('newmsg', 1).text($(user).data('newmsg')); + } + $('.cont_' + data.contextid).show(); + $('#msgbox').data("newmsg", $('#msgbox').data("newmsg") + 1).text($('#msgbox').data("newmsg")).show(); + } + }); + socket.on('status', function (data) { + + }) + socket.on('disconnect', function () { + }); + diff --git a/contact-center/app/src/main/resources/templates/apps/entim/more.html b/contact-center/app/src/main/resources/templates/apps/entim/more.html deleted file mode 100644 index 0f54ff33..00000000 --- a/contact-center/app/src/main/resources/templates/apps/entim/more.html +++ /dev/null @@ -1,69 +0,0 @@ -<#if chatMessageList?? && chatMessageList.content> -<#list chatMessageList.content?reverse as chatMessage> - <#if chatMessage.calltype == "呼出"> -
                                    -
                                    - -
                                    - - -
                                    -
                                    - -
                                    - <#if chatMessage.msgtype?? && chatMessage.msgtype == "image"> - - <#elseif chatMessage.msgtype?? && chatMessage.msgtype == "file"> - - <#else> - ${(chatMessage.message!'')?no_esc} - -
                                    -
                                    -
                                    -
                                    - <#else> -
                                    -
                                    - -
                                    - - -
                                    -
                                    - -
                                    - <#if chatMessage.msgtype?? && chatMessage.msgtype == "image"> - - <#elseif chatMessage.msgtype?? && chatMessage.msgtype == "file"> - - <#else> - ${(chatMessage.message!'')?no_esc} - -
                                    -
                                    -
                                    -
                                    - - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/entim/more.pug b/contact-center/app/src/main/resources/templates/apps/entim/more.pug new file mode 100644 index 00000000..d01af726 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/entim/more.pug @@ -0,0 +1,48 @@ +if chatMessageList && chatMessageList.content + for chatMessage in pugHelper.reverse(chatMessageList.content) + if chatMessage.calltype == "呼出" + .clearfix.chat-block + .chat-right + img.user-img(src='/im/img/user.png', alt) + .chat-message + label.time= pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', chatMessage.createtime) + label.user= user.uname + .chatting-right + i.arrow + .chat-content + if chatMessage.msgtype && chatMessage.msgtype == "image" + a(href="!{chatMessage.message}&original=true", target="_blank") + img.ukefu-media-image(src="!{chatMessage.message}") + else if chatMessage.msgtype && chatMessage.msgtype == "file" + .ukefu-message-file + .ukefu-file-icon + img(src="/im/img/file.png") + .ukefu-file-desc + a(href="#{chatMessage.message}", target="_blank") + div= chatMessage.filename + div #{chatMessage.filesize / 1024}kb + else + | !{chatMessage.message} + else + .clearfix.chat-block + .chat-left + img.user-img(src='/im/img/user.png', alt) + .chat-message + label.user= entimuser.uname + label.time= pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', chatMessage.createtime) + .chatting-left + i.arrow + .chat-content + if chatMessage.msgtype && chatMessage.msgtype == "image" + a(href="!{chatMessage.message}&original=true", target="_blank") + img.ukefu-media-image(src="!{chatMessage.message}") + else if chatMessage.msgtype && chatMessage.msgtype == "file" + .ukefu-message-file + .ukefu-file-icon + img(src="/im/img/file.png") + .ukefu-file-desc + a(href=chatMessage.message, target="_blank") + div= chatMessage.filename + div #{chatMessage.filesize / 1024}kb + else + | !{chatMessage.message} diff --git a/contact-center/app/src/main/resources/templates/apps/entim/point.html b/contact-center/app/src/main/resources/templates/apps/entim/point.html deleted file mode 100644 index 148da7d1..00000000 --- a/contact-center/app/src/main/resources/templates/apps/entim/point.html +++ /dev/null @@ -1,37 +0,0 @@ -
                                    - - <#assign newmsg = 0> - <#if recentUserList??> - <#list recentUserList as recentUser> - <#assign newmsg = recentUser.newmsg + newmsg> - - - ${newmsg} - 企业聊天 -
                                    - -
                                    -
                                    - - diff --git a/contact-center/app/src/main/resources/templates/apps/entim/point.pug b/contact-center/app/src/main/resources/templates/apps/entim/point.pug new file mode 100644 index 00000000..a1adf533 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/entim/point.pug @@ -0,0 +1,35 @@ +extends /apps/entim/include/payout.pug + +block content + .ukefu-entim-point.ukefu-entim-msgbox(style='cursor: pointer;', onclick='top.closeentim();') + i.layui-icon  + - var newmsg = 0 + if recentUserList + for recentUser in recentUserList + - newmsg = recentUser.newmsg + newmsg + span.layui-anim.layer-anim-05.animated#msgbox(data-newmsg='#{newmsg}', style='#{newmsg == 0?"display:none":""};top: 15px;background-color: red;left: 0px;') #{newmsg} + | 企业聊天 + .putAway#putAway(title='收起', style='width:30px; height: 100%;float: right') + i.layui-icon  + style. + .putAway:hover { + background: rgba(0, 0, 0, 0.2); + } + + script. + var hostname = location.hostname; + var socket = io.connect(location.protocol + "//" + top.hostname + ":" + top.port + "/im/ent?userid=#{user.id}&orgi=#{user.orgi}"); + socket.on('connect', function () { + }) + socket.on('message', function (data) { + $('#msgbox').data("newmsg", $('#msgbox').data("newmsg") + 1).text($('#msgbox').data("newmsg")).show(); + }); + + socket.on('disconnect', function () { + }); + $("#putAway").click(function (e) { + top.isImIndex = true; + top.closeentim(); + e.stopPropagation(); + }) + diff --git a/contact-center/app/src/main/resources/templates/apps/entim/skin.html b/contact-center/app/src/main/resources/templates/apps/entim/skin.html deleted file mode 100644 index e5bbb030..00000000 --- a/contact-center/app/src/main/resources/templates/apps/entim/skin.html +++ /dev/null @@ -1,27 +0,0 @@ -
                                    -
                                      -
                                    • -
                                    • -
                                    • -
                                    • -
                                    • -
                                    • -
                                    • -
                                    • -
                                    • -
                                    • -
                                    • - 默认 -
                                    • -
                                    -
                                    - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/entim/skin.pug b/contact-center/app/src/main/resources/templates/apps/entim/skin.pug new file mode 100644 index 00000000..b3d6cbda --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/entim/skin.pug @@ -0,0 +1,27 @@ +extends /apps/entim/include/payout.pug + +block content + #ukefu-entim-skin.layui-layer-content + ul.ukefu-entim-skin + li + img(src='/images/skin/1.jpg', data-color='#333333') + li + img(src='/images/skin/2.jpg', data-color='#ffffff') + li + img(src='/images/skin/3.jpg', data-color='#333333') + li + img(src='/images/skin/4.jpg', data-color='#ffffff') + li + img(src='/images/skin/5.jpg', data-color='#ffffff') + li#defaultSkin(data-color='#333333') + cite 默认 + script. + $('#ukefu-entim-skin img').on("click", function () { + parent.$("body").css('background-image', "url(" + $(this).attr('src') + ")").css('color', $(this).data("color")); + parent.$("body a").css('color', $(this).data("color")); + }); + $('#defaultSkin').on("click", function () { + parent.$("body").css('background-image', '').css('color', $(this).data("color")); + parent.$("body a").css('color', $(this).data("color")); + }); + diff --git a/contact-center/app/src/main/resources/templates/apps/im/chatbot/index.html b/contact-center/app/src/main/resources/templates/apps/im/chatbot/index.html deleted file mode 100644 index 493dc1bb..00000000 --- a/contact-center/app/src/main/resources/templates/apps/im/chatbot/index.html +++ /dev/null @@ -1,722 +0,0 @@ - - - - - - - - - 在线咨询 - - - - - - - - - - - - - - - - - -
                                    -
                                    - -
                                    -
                                    - <#if welcomeAd> -
                                    - - <#if welcomeAd.adtype =="image"> - - <#else> - - - -
                                    - -
                                    - ${(inviteData.dialog_message!'欢迎您来咨询!欢迎使用春松客服!如需帮助请联系 info@chatopera.com')?no_esc}
                                    - <#if chatMessageList?? && chatMessageList.content??> - <#list chatMessageList.content?reverse as chatMessage> - <#if chatMessage.userid?? && userid?? && chatMessage.calltype?? && chatMessage.calltype = "呼入"> -
                                    -
                                    - -
                                    - - -
                                    -
                                    - -
                                    <#include "/apps/im/media/message.html">
                                    -
                                    -
                                    -
                                    - <#else> -
                                    -
                                    - -
                                    - - -
                                    -
                                    - -
                                    <#include "/apps/im/media/message.html">
                                    -
                                    -
                                    -
                                    - - - -
                                    -
                                    - -
                                    -
                                    0/200
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    信息提示

                                    -
                                    -
                                      - <#if inviteData.dialog_name?? && inviteData.dialog_name != ""> -
                                    • -

                                      名称:${inviteData.dialog_name!''}

                                      -
                                    • - - <#if inviteData.dialog_address?? && inviteData.dialog_address != ""> -
                                    • -

                                      地址:${inviteData.dialog_address!''}

                                      -
                                    • - - <#if inviteData.dialog_phone?? && inviteData.dialog_phone != ""> -
                                    • -

                                      电话:${inviteData.dialog_phone!''}

                                      -
                                    • - -<#if inviteData.dialog_mail?? && inviteData.dialog_mail != ""> -
                                    • -

                                      邮件:${inviteData.dialog_mail!''}

                                      -
                                    • - -<#if inviteData.dialog_mail?? && inviteData.dialog_introduction != ""> -
                                    • -

                                      ${(inviteData.dialog_introduction!'')?no_esc}

                                      -
                                    • - -
                                    -
                                    -
                                    - <#if imageAd> - <#if imageAd.adtype =="image"> - - <#else> - - -<#elseif inviteData.dialog_ad??> - - -
                                    -
                                    -
                                    - -
                                    -<#if sessionConfig?? && sessionConfig.satisfaction?? && sessionConfig.satisfaction> - - - - - - - diff --git a/contact-center/app/src/main/resources/templates/apps/im/chatbot/index.pug b/contact-center/app/src/main/resources/templates/apps/im/chatbot/index.pug new file mode 100644 index 00000000..167395ac --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/im/chatbot/index.pug @@ -0,0 +1,714 @@ +doctype html +html + head + meta(charset='utf-8') + meta(http-equiv='X-UA-Compatible', content='IE=edge') + meta(http-equiv='Cache-Control', content='no-siteapp') + meta(name='viewport', content='width=device-width,maximum-scale=1,initial-scale=1,initial-scale=1,user-scalable=no') + meta(name='apple-mobile-web-app-capable', content='yes') + title 在线咨询 + link(rel='shortcut icon', type='image/x-icon', href='/images/favicon.ico?t=1489039620156') + link(rel='stylesheet', type='text/css', href='/im/css/ukefu.css') + link#skin(rel='stylesheet', type='text/css', href='/im/css/default/ukefu.css') + // kindeditor + link(rel='stylesheet', type='text/css', href='/im/js/kindeditor/themes/default/default.css') + script(src='/js/jquery-1.10.2.min.js') + script(type='text/javascript', src='/im/js/kindeditor/kindeditor.js') + script(type='text/javascript', src='/im/js/kindeditor/lang/zh-CN.js') + script(src='/im/js/socket.io.js') + script(src='/im/js/dayjs.min.js') + script(type='text/javascript'). + var editor, words; + var newmessage = [], ring = []; + newmessage['mp3'] = '/images/message.mp3'; + ring['mp3'] = '/images/ring.mp3'; + KindEditor.ready(function (K) { + editor = K.create('textarea[name="content"]', { + autoHeightMode: false, + width: "100%", + resizeType: 0, + themeType: 'simple', + fontsize: 16, + newlineTag: "br", + uploadJson: "/im/image/upload.html?userid=#{userid}", + allowFileManager: false, + allowInsertUpload: false, //增加的参数,上传图片后是否插入到当前区域 + allowImageRemote: false, + filterMode: true, + + items: ['emoticons', 'cut'], + htmlTags: { + img: ['src', 'width', 'height', 'border', 'alt', 'title', 'align', '.width', '.height', '.border'], + br: [] + }, + afterChange: function () { + var count = this.count() + + var limitNum = #{ inviteData.maxwordsnum > 0 ? inviteData.maxwordsnum : 300}; //设定限制字数 + var pattern = '还可以输入' + limitNum + '字'; + var strValue = this.html(); + if (count > limitNum) { + pattern = ('字数超过限制,请适当删除部分内容'); + //超过字数限制自动截取 + strValue = strValue.substring(0, limitNum); + editor.html(strValue); + } else { + //计算剩余字数 + var result = limitNum - this.count(); + pattern = '还可以输入' + result + '字'; + if (result < 20) { + document.getElementById('surplus').style.color = "red"; + } else { + document.getElementById('surplus').style.color = "#000000"; + } + } + if (this.count("text") == 0) { + strValue = ""; + } + // ignore writting in Chatbot Service + // if(words != this.count("text")){ + // socket.emit('message', { + // appid : "${appid!''}", + // userid:"${userid!''}", + // type:"writing", + // session:"${sessionid!''}", + // orgi:"${orgi!''}", + // message : strValue + // }); + // } + words = this.count("text"); + + document.getElementById('surplus').innerHTML = count + "/" + limitNum + " , " + pattern; //输入显示 + }, + afterCreate: function () { //设置编辑器创建后执行的回调函数 + var self = this; + if (#{inviteData.ctrlenter == true}) { + //Ctrl+Enter提交表单 + K.ctrl(document, 13, function () { + self.sync(); + sendMessage(); + }); + K.ctrl(self.edit.doc, 13, function () { + self.sync(); + sendMessage(); + }); + } else { + var kindEditorIframe = $("iframe").contents().find("body"); + kindEditorIframe.keydown(function (event) { + if (event.keyCode == 13 && !event.ctrlKey) { + self.sync(); + sendMessage(); + return false; + } else if (event.keyCode == 13 && event.ctrlKey) { + editor.insertHtml('
                                    '); + } + }); + //Ctrl+Enter提交表单 + K.ctrl(document, 13, function () { + editor.insertHtml('
                                    '); + }); + K.ctrl(self.edit.doc, 13, function () { + editor.insertHtml('
                                    '); + }); + } + } + }); + }); + + KindEditor.options.cssData = "body { font-size: 15px; font-family:'Microsoft Yahei', 'Helvetica', 'Simsun', 'Arial';}"; + var R3Ajax = { + ajax: function (opt) { + var xhr = this.createXhrObject(); + xhr.onreadystatechange = function () { + if (xhr.readyState != 4) return; + (xhr.status === 200 ? + opt.success(xhr.responseText, xhr.responseXML) : + opt.error(xhr.responseText, xhr.status)); + } + xhr.open(opt.type, opt.url, true); + if (opt.type !== 'post') + opt.data = null; + else + xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); + opt.data = this.parseQuery(opt.data); + xhr.send(opt.data); + }, + post: function (url, success, data) { + var popt = { + url: url, + type: 'post', + data: data, + success: success, + error: function (data) { + } + } + this.ajax(popt); + }, + get: function (url, success) { + var gopt = { + url: url, + type: 'get', + success: success, + error: function () { + } + } + this.ajax(gopt); + }, + createXhrObject: function () { + var methods = [ + function () { + return new XMLHttpRequest(); + }, + function () { + return new ActiveXObject('Msxml2.XMLHTTP'); + }, + function () { + return new ActiveXObject('Microsoft.XMLHTTP'); + } + ]; + for (var i = 0; len = methods.length, i < len; i++) { + try { + methods[i](); + } catch (e) { + continue; + } + this.createXhrObject = methods[i]; + return methods[i](); + } + throw new Error('Could not create an XHR object.'); + }, + parseQuery: function (json) { + if (typeof json == 'object') { + var str = ''; + for (var i in json) { + str += "&" + i + "=" + encodeURIComponent(json[i]); + } + return str.length == 0 ? str : str.substring(1); + } else { + return json; + } + }, + audioplayer: function (id, file, loop) { + var audioplayer = document.getElementById(id); + if (audioplayer != null) { + document.body.removeChild(audioplayer); + } + + if (typeof (file) != 'undefined') { + if (navigator.userAgent.indexOf("MSIE") > 0) { // IE + var player = document.createElement('bgsound'); + player.id = id; + player.src = file['mp3']; + player.setAttribute('autostart', 'true'); + if (loop) { + player.setAttribute('loop', 'infinite'); + } + document.body.appendChild(player); + + } else { // Other FF Chome Safari Opera + var player = document.createElement('audio'); + player.id = id; + player.setAttribute('autoplay', 'autoplay'); + if (loop) { + player.setAttribute('loop', 'loop'); + } + document.body.appendChild(player); + + var mp3 = document.createElement('source'); + mp3.src = file['mp3']; + mp3.type = 'audio/mpeg'; + player.appendChild(mp3); + } + } + } + }; + Date.prototype.format = function (fmt) { + var o = { + "M+": this.getMonth() + 1, //月份 + "d+": this.getDate(), //日 + "h+": this.getHours(), //小时 + "m+": this.getMinutes(), //分 + "s+": this.getSeconds(), //秒 + "q+": Math.floor((this.getMonth() + 3) / 3), //季度 + "S": this.getMilliseconds() //毫秒 + }; + if (/(y+)/.test(fmt)) { + fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length)); + } + for (var k in o) { + if (new RegExp("(" + k + ")").test(fmt)) { + fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); + } + } + return fmt; + } + var R3Helper = { + resize: function () { + var height = document.body.offsetHeight; + document.getElementById('above').style.height = (height - 194 - 50) + "px"; + } + } + + + function submitForm(form) { + R3Ajax.post("/im/satis.html?orgi=#{orgi}", function () { + document.getElementById("diaShade").style.display = "none"; + document.getElementById("dialogWrap").style.display = "none"; + alert("服务评价已提交,请关闭浏览器!"); + isAgentEnds = false; + }, "id=" + form.id.value + "&satislevel=" + document.getElementById("satislevel_input").value + "&satiscomment=" + encodeURIComponent(document.getElementById("comment_input").value)); + return false; + } + + window.onbeforeunload = function () { + } + + // kindeditor + style. + .msg-btn { + border: #4598ee 1px solid; + padding: 5px; + margin: 5px; + min-width: 125px; + text-align: center; + display: inline-block; + background-color: #e6f2ff; + cursor: default; + } + + .msg-list { + color: #4598ee + } + + .msg-card { + display: inline-block; + color: #000000; + } + + .msg-crad-right { + position: relative; + left: 10px; + width: 210px; + height: 80px; + overflow: hidden; + text-overflow: ellipsis; + } + + .card-box { + cursor: default; + width: 300px; + height: 82px; + padding: 6px; + } + + body.ukefu-point-text(style='overflow:hidden;') + - var dialog_headimg= inviteData.consult_dialog_headimg ? '/res/image.html?id=' + inviteData.consult_dialog_headimg : '/images/agent.png' + .large.ukefu-im-theme(class=(type == 'text' ? 'ukefu-theme-border-' + inviteData.consult_dialog_color : '')) + #containter.clearfix + #header(class='theme' + inviteData.consult_dialog_color) + - var dialog_logo=inviteData.consult_dialog_logo?'/res/image.html?id='+inviteData.consult_dialog_logo:'/images/logo.png' + img(src=dialog_logo, style='height:30px;padding:10px;') + .ukefu-func-tab + ul + if models.contains("chatbot") && inviteData.ai && aiid + if !exchange || exchange == "true" + li + a(href="/im/index.html?appid=" + appid + "&orgi=" + orgi + (aiid ? "&aiid=" + aiid : "") + "&ai=false" + (client ? "&client=" + client : '') + (type ? "&type=text" : "") + (skill ? "&skill=" + skill : '') + (agent ? "&agent=" + agent : '') + (title ? "&title=" + title : '') + (url ? "&url=" + url : '') + (traceid ? "&traceid=" + traceid : '') + "&userid=" + userid + "&sessionid=" + sessionid + "&t=" + pugHelper.currentTimeMillis()) 人工坐席 + li.cur + a(href="javascript:void(0)") 智能客服 + else + li.cur + a(href="javascript:void(0)") 智能客服 + .content-left + .chat-above#above + if welcomeAd + .clearfix.message.welcome + span#welcome-message + if welcomeAd.adtype == "image" + a(href=welcomeAd.url, title=welcomeAd.tiptext, target="_blank") + img(src=welcomeAd.imgurl, style="max-width:420px;max-height:178px;margin:0px;vertical-align: middle;") + else + div(style="padding:0px 5px 10px 5px;border-bottom:1px solid #dedede;") + a#point_ad_text(href=welcomeAd.url, title=welcomeAd.tiptext, target="_blank")= welcomeAd.content + + .clearfix.message.welcome + span#welcome-message= inviteData.dialog_message ? inviteData.dialog_message : '欢迎您来咨询!欢迎使用春松客服!如需帮助请联系 info@chatopera.com' + + for chatMessage in pugHelper.reverse(chatMessageList.content) + if chatMessage.userid && userid && chatMessage.calltype && chatMessage.calltype == "呼入" + .clearfix.chat-block + .chat-right + img.user-img(src="/im/img/user.png", alt="") + .chat-message + label.time= pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', chatMessage.createtime) + label.user= chatMessage.username + .chatting-right + i.arrow(class="arrow" + inviteData.consult_dialog_color) + .chat-content(class="theme" + inviteData.consult_dialog_color) + include ../media/message + else + .clearfix.chat-block + .chat-left + img.user-img(src=dialog_headimg , alt="") + .chat-message + label.user + if chatMessage.chatype == 'aireply' + | #{inviteData.ainame ? inviteData.ainame : '小松'} + else + | #{chatMessage.username} + + label.time= pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', chatMessage.createtime) + .chatting-left + i.arrow + .chat-content + include ../media/message + .chat-bottom#bottom + textarea#message(name='content', style='visibility:hidden;') + .btn-push.clearfix + #surplus(style='float:left;height:34px;line-height:34px;margin: 10px 20px 10px 5px;') 0/200 + button.send-btn.active.special.clearfix#sent(type='button', onclick='sendMessage()') 发送 + + .content-rig + .content-list(style='padding-top:50px;') + .content-head + p 信息提示 + ul + if inviteData.dialog_name != "" + li + p= '名称:' + inviteData.dialog_name + if inviteData.dialog_address != "" + li + p= '地址:' + inviteData.dialog_address + if inviteData.dialog_phone != "" + li + p= '电话:' + inviteData.dialog_phone + if inviteData.dialog_mail != "" + li + p= '邮件:' + inviteData.dialog_mail + if inviteData.dialog_introduction != "" + li + p(style="text-indent:25px;line-height:25px;")= inviteData.dialog_introduction + + .content-pic(style='width:100%;height:192px;') + if imageAd + if imageAd.adtype == "image" + a(href=imageAd.url, title=imageAd.tiptext, target="_blank") + img(src=imageAd.imgurl, style="max-width:100%;max-height:190px;margin:0px;vertical-align: middle;") + else + div(style="padding:0px 5px 10px 5px;border-bottom:1px solid #dedede;") + a#point_ad_text(href=imageAd.url, title=imageAd.tiptext, target="_blank")= imageAd.content + else if inviteData.dialog_ad + img(src="/res/image.html?id=" + inviteData.dialog_ad, style="height:190px;width:100%;") + + #footer + //- 调查问卷弹框 + if sessionConfig.satisfaction + .diaShade#diaShade(style='display: none') + .dialogWrap#dialogWrap(style='display: none;') + .dialogCon + form#commentContent(onsubmit='return submitForm(this)') + input#agentserviceid(type='hidden', name='id') + h2.diaHeader.clearfix + span 评价 + hr + p.title 您是否对此次服务满意? + //- 评价 + p(style='margin-top:20px; height: 20px') + span(style='float:left;') 评价: + span(style='position: relative;top: 0px;left: 13px;') + - var defaultvalue = '' + for comment in commentList + input(type="radio", ,checked=comment_index == 0, name="satislevel", value=comment.code, id="dic_" + comment.id, onclick="document.getElementById('satislevel_input').value = this.value") + label.radio(for="dic_" + comment.id)= comment.name + if defaultvalue == "" + - defaultvalue = comment.code + input#satislevel_input(type="hidden", name="t", value=defaultvalue) + + //- 意见 + p(style='margin-top:20px;') + span(style='float:left;') 意见: + span(style='position: relative;top: 0px;left: 10px;') + input#comment_input(type='hidden', name='t') + for item in commentItemList + div(style="margin-left:55px;margin-bottom:20px;") + input(type="radio", name="comment", id="item_" + item.id, value=item.id, contentname=item.name, onclick="selectOther(this.getAttribute('contentname'),this.value)") + label.radio(for="item_" + item.id, style="margin-right: 0px")= item.name + p + //- 按钮 + p.submitBtnWrap(style='margin-top: 0px') + input.btn.submitBtn#submitBtn(type='submit', value='提 交') + + script. + var service_end = false; + R3Helper.resize(); + // 调查问卷 + var diaShade = document.getElementById('diaShade'); + var dialogWrap = document.getElementById('dialogWrap'); + function popup(para) { + diaShade.style.display = para; + dialogWrap.style.display = para; + } + + function chatScorllBottom(box) { + var imgdefereds = []; //定义一个操作数组 + $('#' + box + ' .ukefu-media-image').each(function () { //遍历所有图片,将图片 + var dfd = $.Deferred(); //定义一个将要完成某个操作的对象 + $(this).bind('load', function () { + dfd.resolve(); //图片加载完成后,表示操作成功 + }); + if (this.complete) { //如果图片加载状态为完成,那么也标识操作成功 + setTimeout(function () { + dfd.resolve(); + }, 1000); + } + imgdefereds.push(dfd); //将所有操作对象放入数组中 + }) + $.when.apply(null, imgdefereds).done(function () { //注册所有操作完成后的执行方法 + document.getElementById(box).scrollTop = document.getElementById(box).scrollHeight + }); + } + + if (#{!welcomeAd}) { + chatScorllBottom('above'); + } + // 参数连接 + var hostname = location.hostname; + var protocol = window.location.protocol.replace(/:/g, ''); + var username = encodeURIComponent("#{username}"); + var socket = io(protocol + '://' + hostname + ':#{port}/im/chatbot?userid=#{userid}&orgi=#{orgi}&session=#{sessionid}&appid=#{appid}&osname=!{osname}&browser=!{browser}!{skill ? "&skill=" + skill : ""}!{username ? "&nickname='+username+'" : ""}!{agent ? "&agent=" + agent : ""}!{title ? "&title=" + title : ""}!{traceid ? "&url=" + url : ""}!{traceid ? "&traceid=" + traceid : ""}!{aiid ? "&aiid=" + aiid : ""}', {transports: ['websocket', 'polling']}); + + socket.on('connect', function () { + if ('#{contacts.name}') { + socket.emit('new', { + name: "#{contacts.name}", + phone: "#{contacts.phone}", + email: "#{contacts.email}", + memo: "#{contacts.memo}", + orgi: "#{inviteData.orgi}", + appid: "#{appid}" + }); + } + }) + socket.on("agentstatus", function (data) { + document.getElementById('connect-message').innerHTML = data.message; + }) + socket.on("status", function (data) { + if (#{!!welcomeAd}) + output('' + data.message + '', 'message connect-message', false); + else + output('' + data.message + '', 'message connect-message', true); + + if (data.messageType == "end") { + service_end = true; + editor.readonly(); + // 因为满意度问卷在访客切换机器人坐席时也会弹出,但是服务并未结束,目前先去掉END事件时弹出满意度 + // TODO 优化方案见 https://gitlab.chatopera.com/chatopera/cosinee/issues/744 + // <#if sessionConfig?? && sessionConfig.satisfaction?? && sessionConfig.satisfaction> + // document.getElementById("diaShade").style.display = "block"; + // document.getElementById("dialogWrap").style.display = "block"; + // isAgentEnds = true; + // + } + + if (document.getElementById("agentserviceid")) { + document.getElementById("agentserviceid").value = data.agentserviceid; + } + }) + + socket.on('message', function (data) { + var chat = document.getElementsByClassName('chatting-left').innerText; + data.createtime = dayjs(data.createtime).format('YYYY-MM-DD HH:mm:ss'); + chat = data.message; + if (data.msgtype == "image") { + chat = ""; + } else if (data.msgtype == "file") { + chat = ""; + } + if (data.calltype == "呼入") { + output('
                                    ' + chat + '
                                    ', "chat-block", true,data.msgtype + ) + ; + } else if (data.calltype == "呼出") { + if (data.expmsg) { + showExtmsg(data.username, data.createtime, data.message, data.expmsg); + } else { + output('
                                    ' + chat + '
                                    ', "chat-block", true,data.msgtype); + } + R3Ajax.audioplayer('audioplane', newmessage, false); // 播放 + } + }); + + socket.on('disconnect', function () { + output('连接坐席失败,在线咨询服务不可用', 'message connect-message'); + }); + + socket.on('satisfaction', function () { + if ('#{sessionConfig.satisfaction}') { + document.getElementById("diaShade").style.display = "block"; + document.getElementById("dialogWrap").style.display = "block"; + } + }); + + function createButton(message, data) { + var element = $('

                                    ' + message + '

                                    ') + var list = element.find('.button-box'); + for (let i = 0; i < data.length; i++) { + var item = data[i]; + var allowClick = true; + var btn = $('
                                    ' + item.label + '
                                    '); + var regClick = function (key) { + btn.click(function () { + if (allowClick) { + allowClick = false; + socket.emit('message', { + appid: "${appid!''}", + userid: "${userid!''}", + type: "message", + session: "${sessionid!''}", + orgi: "${orgi!''}", + message: key + }); + } + }); + } + regClick(item.text); + list.append(btn); + } + + return element; + } + + function createQList(message, data) { + var element = $('

                                    ' + message + '

                                    ') + var list = element.find('.button-box'); + for (let i = 0; i < data.length; i++) { + var item = data[i]; + var btn = $('
                                    ' + item.label + '
                                    '); + var regClick = function (key) { + btn.click(function () { + socket.emit('message', { + appid: "${appid!''}", + userid: "${userid!''}", + type: "message", + session: "${sessionid!''}", + orgi: "${orgi!''}", + message: key + }); + }); + } + regClick(item.text); + list.append(btn); + } + + return element; + } + + function createCard(message, data) { + let item = data[0]; + + let html = '

                                    ' + item.title + '

                                    ' + item.summary + '

                                    ' + + var element = $(html); + element.click(function () { + window.open(item.hyperlink); + }) + + return element; + } + + function showExtmsg(username, createtime, message, json) { + var expmsg = JSON.parse(json); + + var type = expmsg[0].type; + var content; + if (type == 'button') { + content = createButton(message, expmsg); + } else if (type == 'qlist') { + content = createQList(message, expmsg); + } else if (type == 'card') { + content = createCard(message, expmsg); + } + + var box = $('
                                    '); + + box.find('.chat-content').append(content); + + output(box, 'chat-block') + } + + function sendDisconnect() { + socket.disconnect(); + } + function sendMessage() { + editor.sync(); + var count = editor.count("text"); + if (count > 0 && service_end == false) { + var message = document.getElementById('message').value; + if (message != "") { + socket.emit('message', { + appid: "#{appid}", + userid: "#{userid}", + type: "message", + session: "#{sessionid}", + orgi: "#{orgi}", + message: message + }); + } + } else if (service_end == true) { + alert("坐席已断开和您的对话"); + } + editor.html(''); + } + function output(message, clazz, scroll, msgType) { + if (clazz == "message connect-message") { + var messages = document.getElementsByClassName("connect-message"); + for (inx = 0; inx < messages.length;) { + document.getElementById('above').removeChild(messages[inx]); + inx++; + } + } + var element = $("
                                    "); + element.append(message); + $('#above').append(element); + if (scroll == null || scroll == true) { + if (msgType && msgType == "image") { + chatScorllBottom("above") + } else { + document.getElementById("above").scrollTop = document.getElementById("above").scrollHeight + } + } + } + function update(id, message) { + document.getElementById(id).innerHTML = message; + } + + var message = { + // text:data.message, + // picture:function(){ + + // } + // file:function(){ + + // } + // lang:function(){ + + // } + // goods:function(){ + + // } + // POI:function(){ + + // } + + } + // 回车事件 + document.onkeyup = function (e) { + if (!e) e = window.event; + if ((e.keyCode || e.which) == 13) { + document.getElementById('sent').click(); + } + } + window.onresize = function () { + R3Helper.resize(); + }; + diff --git a/contact-center/app/src/main/resources/templates/apps/im/chatbot/mobile.html b/contact-center/app/src/main/resources/templates/apps/im/chatbot/mobile.html deleted file mode 100644 index e3b8dfdf..00000000 --- a/contact-center/app/src/main/resources/templates/apps/im/chatbot/mobile.html +++ /dev/null @@ -1,568 +0,0 @@ - - - - - - - - 智能客服 - - - - - - - - - - - - - - - - - - - - - - - - -
                                    -
                                    - ${(inviteData.dialog_message!'欢迎您来咨询!欢迎使用春松客服!如需帮助请联系 info@chatopera.com')?no_esc} -
                                    - <#if chatMessageList?? && chatMessageList.content??> - <#list chatMessageList.content?reverse as chatMessage> - <#if chatMessage.userid?? && userid?? && chatMessage.calltype?? && chatMessage.calltype = "呼入"> -
                                    -
                                    - -
                                    - -
                                    -
                                    - -
                                    <#include - "/apps/im/media/message.html">
                                    -
                                    -
                                    -
                                    - <#else> -
                                    -
                                    - -
                                    - -
                                    -
                                    - -
                                    <#include "/apps/im/media/message.html">
                                    -
                                    -
                                    -
                                    - -
                                    - -
                                    - - - - - - - -
                                    - - -
                                    - - -
                                    -
                                    - - - - diff --git a/contact-center/app/src/main/resources/templates/apps/im/chatbot/mobile.pug b/contact-center/app/src/main/resources/templates/apps/im/chatbot/mobile.pug new file mode 100644 index 00000000..454b0711 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/im/chatbot/mobile.pug @@ -0,0 +1,553 @@ +doctype html +html + head + meta(charset='utf-8') + meta(http-equiv='Cache-Control', content='no-siteapp') + meta(name='viewport', content='width=device-width,maximum-scale=1,initial-scale=1,initial-scale=1,user-scalable=no') + meta(name='apple-mobile-web-app-capable', content='yes') + title 智能客服 + link(rel='shortcut icon', type='image/x-icon', href='/images/favicon.ico?t=1489039620156') + link(rel='stylesheet', type='text/css', href='/im/css/ukefu.css') + link#skin(rel='stylesheet', type='text/css', href='/im/css/default/ukefu.css') + // kindeditor + link(rel='stylesheet', type='text/css', href='/im/js/kindeditor/themes/default/default.css') + script(type='text/javascript', src='/js/jquery-1.10.2.min.js') + script(src='/js/jquery.form.js') + script(type='text/javascript', src='/im/js/kindeditor/kindeditor.js') + script(type='text/javascript', src='/im/js/kindeditor/lang/zh-CN.js') + style. + * { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-tap-highlight-color: transparent; + outline: none; + } + + *:not(input,textarea) { + -webkit-touch-callout: none; + } + + #above:after { + content: ""; + height: 100px; + display: block; + } + script(src='/im/js/socket.io.js') + script(src='/im/js/dayjs.min.js') + script(type='text/javascript'). + var editor, words, textheight, wordinx = 0; + + /** + * 文本框根据输入内容自适应高度 + * @param {HTMLElement} 输入框元素 + * @param {Number} 设置光标与输入框保持的距离(默认0) + * @param {Number} 设置最大高度(可选) + */ + var autoTextarea = function (elem, extra, maxHeight) { + extra = extra || 0; + var isFirefox = !!document.getBoxObjectFor || 'mozInnerScreenX' in window, + isOpera = !!window.opera && !!window.opera.toString().indexOf('Opera'), + addEvent = function (type, callback) { + elem.addEventListener ? + elem.addEventListener(type, callback, false) : + elem.attachEvent('on' + type, callback); + }, + getStyle = elem.currentStyle ? function (name) { + var val = elem.currentStyle[name]; + + if (name === 'height' && val.search(/px/i) !== 1) { + var rect = elem.getBoundingClientRect(); + return rect.bottom - rect.top - + parseFloat(getStyle('paddingTop')) - + parseFloat(getStyle('paddingBottom')) + 'px'; + } + ; + + return val; + } : function (name) { + return getComputedStyle(elem, null)[name]; + }, + minHeight = parseFloat(getStyle('height')); + + + elem.style.resize = 'none'; + + var textchange = function () { + changeTextArea(0); + } + + var change = function () { + changeTextArea(0); + wordinx = getPositionForTextArea(document.getElementById('message')); + }; + + addEvent('propertychange', textchange); + addEvent('input', textchange); + addEvent('focus', function () { + changeTextArea(0); + }); + change(); + }; + //多行文本框 + function getPositionForTextArea(ctrl) { + var CaretPos = 0; + if (document.selection) { // IE Support + ctrl.focus(); + var Sel = document.selection.createRange(); + var Sel2 = Sel.duplicate(); + Sel2.moveToElementText(ctrl); + var CaretPos = -1; + while (Sel2.inRange(Sel)) { + Sel2.moveStart('character'); + CaretPos++; + } + } else if (ctrl.selectionStart || ctrl.selectionStart == '0') { // Firefox support + CaretPos = ctrl.selectionStart; + } + return (CaretPos); + } + + function openFaceDialog() { + if (document.getElementById("faceindex").style.display == "none") { + document.getElementById("faceindex").style.display = "block"; + document.getElementById("bottom").style.height = $('#message').height() + 20 + document.getElementById("faceindex").offsetHeight + "px"; + document.getElementById("above").style.height = "calc(100% - " + ($('#bottom').height()) + "px)" + } else { + closeFaceDialog(0); + } + return false; + } + + function closeFaceDialog(height) { + document.getElementById("faceindex").style.display = "none"; + document.getElementById("bottom").style.height = $('#message').height() + height + "px"; + document.getElementById("above").style.height = "calc(100% - " + ($('#message').height()) + "px)"; + } + + function changeTextArea(height) { + if (document.getElementById("faceindex").style.display == "none") { + $('#bottom').height($('#message').height() + height); + document.getElementById("above").style.height = "calc(100% - " + ($('#message').height()) + "px)" + } else { + $('#bottom').height($('#message').height() + $('#faceindex').height()); + document.getElementById("above").style.height = "calc(100% - " + ($('#message').height()) + "px)" + } + } + function insertImg(obj) { + if (wordinx >= 0) { + var text = $('#message').val(); + var value = text.substring(0, wordinx) + "[" + obj + "]" + text.substring(wordinx, text.length); + $('#message').val(value); + wordinx = wordinx + 2 + obj.length; + } + } + $(document).ready(function () { + window.addEventListener('resize', function () { + if (document.activeElement.tagName === 'INPUT' || document.activeElement.tagName === 'TEXTAREA') { + window.setTimeout(function () { + document.activeElement.scrollIntoViewIfNeeded() + }, 0) + } + }); + // 在输入框获取焦点, 键盘弹起后, 真的是一行代码 + + $(document).on('submit.form.data-api', '[data-toggle="ajax-form"]', function (e) { + var formValue = $(e.target); + $(this).ajaxSubmit({ + url: formValue.attr("action"), + success: function (data) { + + }, + error: function (xhr, type, s) { + //notification("",false); //结束 + } + }); + return false; + }); + }); + + style. + .msg-btn { + border: #4598ee 1px solid; + padding: 5px; + margin: 5px; + min-width: 125px; + text-align: center; + display: inline-block; + background-color: #e6f2ff; + cursor: default; + } + + .msg-list { + color: #4598ee + } + + .msg-card { + display: inline-block; + color: #000000; + } + + .msg-crad-right { + position: relative; + left: 10px; + width: 170px; + height: 60px; + overflow: hidden; + text-overflow: ellipsis; + } + + .card-box { + cursor: default; + width: 250px; + height: 72px; + padding: 6px; + line-height: 20px; + } + + // kindeditor + body.ukefu-im-theme.ukefu-point-text(style='width:100%;overflow:hidden;height:100%;max-height:100%;position: fixed;/* 或者scroll */-webkit-overflow-scrolling: touch;/* 解决ios滑动不流畅问题 */') + - var dialog_headimg= inviteData.consult_dialog_headimg ? '/res/image.html?id=' + inviteData.consult_dialog_headimg : '/images/agent.png' + #header(class="theme" + inviteData.consult_dialog_color) + img(src=(inviteData.consult_dialog_logo ? '/res/image.html?id=' + inviteData.consult_dialog_logo : '/images/logo.png'), style='height:50px;padding:10px;') + .ukefu-func-tab + ul + if models.contains("chatbot") && inviteData.ai && inviteData.ai == true && aiid + if !exchange || exchange == "true" + li + a(href="/im/index.html?appid=" + appid + "&orgi=" + orgi + (aiid ? '&aiid=' + aiid : '') + "&ai=false" + (client ? '&client=' + client : '') + (type ? '&type=' + type : '') + (skill ? '&skill=' + skill : '') + (agent ? '&agent=' + agent : '') + "&userid=" + userid + "&sessionid=" + sessionid + "&t=" + pugHelper.currentTimeMillis()) 人工客服 + li.cur + a(href="javascript:void(0)") 智能坐席 + else + li.cur + a(href="javascript:void(0)") 智能坐席 + #cooperation.ukefu-cooperation(style='display:none;z-index: 100;background-color: #ffffff;position: fixed;left: 0px;width: 100%;top: 0px;top:0px;height: 100%;') + .ukefu-image-canvas#ukefu-image-content(style='margin-top:2px;') + img#ukefu_img_ctx(style='max-width: 100%;max-height: 100%;') + .drawBoard(style='position: absolute;left: 0;top: 0;margin-top:2px;z-index: 998;') + canvas#canvas-borad.brushBorad 你的浏览器不支持 canvas 绘图 + div(style='position: absolute;bottom: 10px;width: 100%;text-align: center;z-index:10000') + button#offcoop-btn(style='border-color:#009688 !important;color:#FFFFFF;display: inline-block;height: 38px;line-height: 38px;padding: 0 18px;background-color: #009688;color: #fff;white-space: nowrap;text-align: center;font-size: 14px;margin-right:10px;border: none;border-radius: 2px;cursor: pointer;opacity: .9;filter: alpha(opacity=90);background-color: #377FED !important;border:1px solid #FFFFFF;', onclick='offCoop();') 退出协作 + .chat-above#above + .clearfix.message.welcome + span#welcome-message= inviteData.dialog_message ? inviteData.dialog_message : '欢迎您来咨询!欢迎使用春松客服!如需帮助请联系 info@chatopera.com' + for chatMessage in pugHelper.reverse(chatMessageList.content) + if chatMessage.userid && userid && chatMessage.calltype && chatMessage.calltype == "呼入" + .clearfix.chat-block + .chat-right + img.user-img(src="/im/img/user.png", alt="") + .chat-message + label.time= pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', chatMessage.createtime) + label.user #{chatMessage.username} + .chatting-right + i.arrow(class="arrow" + inviteData.consult_dialog_color) + .chat-content(class="theme" + inviteData.consult_dialog_color) + include ../media/message + else + .clearfix.chat-block + .chat-left + img.user-img(src=dialog_headimg, alt="") + .chat-message + label.user= chatMessage.username + label.time= pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', chatMessage.createtime) + .chatting-left + i.arrow + .chat-content + include ../media/message + .mobile-chat-bottom#bottom + textarea#message(name='content', maxlength=(inviteData.maxwordsnum > 0 ? inviteData.maxwordsnum : 300)) + .btn-push.clearfix + img#facedialog(onclick='return openFaceDialog()', src='/im/img/face.png', style='width:32px;height:32px;') + a(href='javascript:void(0)', onclick='sendMessage();return false;') + img(src='/im/img/send.png', style='width:32px;height:32px;') + #faceindex(style='display:none;height:200px;position: absolute;bottom: 0px;width:100%;overflow-x:auto;') + table.ke-table(cellpadding='0', cellspacing='0', border='0', style='min-width:100%;') + tbody + for row in pugHelper.range(0,4) + tr + for col in pugHelper.range(0,20) + - var emoid=row * 20 + col; + td.ke-cell + span.ke-img + img(src="/im/js/kindeditor/plugins/emoticons/images/" + emoid + ".png", border="0", alt="", onclick="insertImg('" + emoid + "')") + + script. + var service_end = false; + // 调查问卷 + var diaShade = document.getElementById('diaShade'); + var dialogWrap = document.getElementById('dialogWrap'); + function popup(para) { + diaShade.style.display = para; + dialogWrap.style.display = para; + } + + function chatScorllBottom(box) { + var imgdefereds = []; //定义一个操作数组 + $('#' + box + ' .ukefu-media-image').each(function () { //遍历所有图片,将图片 + var dfd = $.Deferred(); //定义一个将要完成某个操作的对象 + $(this).bind('load', function () { + dfd.resolve(); //图片加载完成后,表示操作成功 + }); + if (this.complete) { //如果图片加载状态为完成,那么也标识操作成功 + setTimeout(function () { + dfd.resolve(); + }, 1000); + } + imgdefereds.push(dfd); //将所有操作对象放入数组中 + }) + $.when.apply(null, imgdefereds).done(function () { //注册所有操作完成后的执行方法 + document.getElementById(box).scrollTop = document.getElementById(box).scrollHeight + }); + } + + chatScorllBottom('above') + // 参数连接 + // 参数连接 + var hostname = location.hostname; + var protocol = window.location.protocol.replace(/:/g, ''); + var username = encodeURIComponent("#{username}"); + var socket = io(protocol + '://' + hostname + ':#{port}/im/chatbot?userid=#{userid}&orgi=#{orgi}&session=#{sessionid}&appid=#{appid}&osname=!{osname}&browser=!{browser}!{skill ? "&skill=" + skill : ""}!{username ? "&nickname='+username+'" : ""}!{agent ? "&agent=" + agent : ""}!{title ? "&title=" + title : ""}!{traceid ? "&url=" + url : ""}!{traceid ? "&traceid=" + traceid : ""}!{aiid ? "&aiid=" + aiid : ""}', {transports: ['websocket', 'polling']}); + socket.on('connect', function () { + //service.sendRequestMessage(); + //output(''+ new Date().format("yyyy-MM-dd hh:mm:ss") + ' 开始沟通' +'' , 'message callOutConnect-message'); + }) + socket.on("agentstatus", function (data) { + document.getElementById('connect-message').innerHTML = data.message; + }) + socket.on("status", function (data) { + output('' + data.message + '', 'message connect-message'); + if (data.messageType == "end") { + service_end = true; + //editor.readonly(); + } + if (document.getElementById("agentserviceid")) { + document.getElementById("agentserviceid").value = data.agentserviceid; + } + }) + socket.on('message', function (data) { + var chat = document.getElementsByClassName('chatting-left').innerText; + data.createtime = dayjs(data.createtime).format('YYYY-MM-DD HH:mm:ss'); + chat = data.message; + if (data.msgtype == "image") { + chat = ""; + } else if (data.msgtype == "cooperation") { + chat = "您收到一个协作邀请,点击进入协作"; + } else if (data.msgtype == "action") { + //检查访客是否在协作页面上,如果在协作页面上,就开始执行重绘,否则不做处理 + drawCanvasImage(data.attachmentid); + } + if (data.calltype == "呼入") { + output('
                                    ' + chat + '
                                    ', "chat-block", data.msgtype); + } else if (data.calltype == "呼出") { + if (data.expmsg) { + showExtmsg(data.username, data.createtime, data.message, data.expmsg); + } else { + output('
                                    ' + chat + '
                                    ', "chat-block", data.msgtype); + } + } + }); + + function showExtmsg(username, createtime, message, json) { + var expmsg = JSON.parse(json); + + var type = expmsg[0].type; + var content; + if (type == 'button') { + content = createButton(message, expmsg); + } else if (type == 'qlist') { + content = createQList(message, expmsg); + } else if (type == 'card') { + content = createCard(message, expmsg); + } + + var box = $('
                                    '); + + box.find('.chat-content').append(content); + + output(box, 'chat-block') + } + + function createButton(message, data) { + var element = $('

                                    ' + message + '

                                    ') + var list = element.find('.button-box'); + for (let i = 0; i < data.length; i++) { + var item = data[i]; + var allowClick = true; + var btn = $('
                                    ' + item.label + '
                                    '); + var regClick = function (key) { + btn.click(function () { + if (allowClick) { + allowClick = false; + socket.emit('message', { + appid: "#{appid}", + userid: "#{userid}", + type: "message", + session: "#{sessionid}", + orgi: "#{orgi}", + message: key + }); + } + }); + } + regClick(item.text); + list.append(btn); + } + + return element; + } + + function createQList(message, data) { + var element = $('

                                    ' + message + '

                                    ') + var list = element.find('.button-box'); + for (let i = 0; i < data.length; i++) { + var item = data[i]; + var btn = $('
                                    ' + item.label + '
                                    '); + var regClick = function (key) { + btn.click(function () { + socket.emit('message', { + appid: "${appid!''}", + userid: "${userid!''}", + type: "message", + session: "${sessionid!''}", + orgi: "${orgi!''}", + message: key + }); + }); + } + regClick(item.text); + list.append(btn); + } + + return element; + } + + function createCard(message, data) { + let item = data[0]; + + let html = '

                                    ' + item.title + '

                                    ' + item.summary + '

                                    ' + + var element = $(html); + element.click(function () { + window.open(item.hyperlink); + }) + + return element; + } + + socket.on('disconnect', function () { + output('连接坐席失败,在线咨询服务不可用', 'message connect-message'); + }); + function sendDisconnect() { + socket.disconnect(); + } + function acceptInvite(msgid, fileid) { + document.getElementById("cooperation").style.display = "block"; + document.getElementById("ukefu_img_ctx").src = "/res/image.html?id=" + fileid + "&cooperation=true&original=true"; + + $("#ukefu_img_ctx").load(function () { + var height = document.getElementById("ukefu-image-content").offsetHeight; + var width = document.getElementById("ukefu-image-content").offsetWidth; + var canvas = document.getElementById("canvas-borad"); + if (canvas.getContext) { + canvas.width = width; + canvas.height = height; + + drawCanvasImage(fileid); + } + + }); + } + function drawCanvasImage(fileid) { + var canvas = document.getElementById("canvas-borad"); + + if (canvas.getContext && document.getElementById("cooperation").style.display == "block") { + var ctx = canvas.getContext("2d"); + + //创建新的图片对象 + var img = new Image(); + //指定图片的URL + img.src = "/res/image.html?id=" + fileid + "&cooperation=true&original=true"; + //浏览器加载图片完毕后再绘制图片 + img.onload = function () { + ctx.clearRect(0, 0, canvas.width, canvas.height); + //以Canvas画布上的坐标(10,10)为起始点,绘制图像 + ctx.drawImage(img, 0, 0, canvas.width, canvas.height); + }; + } + } + function offCoop() { + document.getElementById("cooperation").style.display = "none"; + } + function sendMessage() { + var count = document.getElementById('message').value.length; + if (count > 0 && service_end == false) { + var message = $("#message").val(); + sendMessageText(message); + $("#message").val(""); + wordinx = 0; + } else if (service_end == true) { + alert("服务器已断开和您的对话"); + } + closeFaceDialog(0); + } + function sendMessageText(message) { + if (message != "") { + socket.emit('message', { + appid: "#{appid}", + userid: "#{userid}", + username: "#{username}", + channel: "webim", + type: "message", + contextid: "#{sessionid}", + orgi: "#{orgi}", + message: message + }); + } + } + function output(message, clazz, msgType) { + if (clazz == "message connect-message") { + var messages = document.getElementsByClassName("connect-message"); + for (inx = 0; inx < messages.length;) { + document.getElementById('above').removeChild(messages[inx]); + inx++; + } + } + var element = $("
                                    "); + element.append(message); + $('#above').append(element); + if (msgType && msgType == "image") { + chatScorllBottom("above") + } else { + document.getElementById("above").scrollTop = document.getElementById("above").scrollHeight + } + //$("#welcome-message").html(document.getElementById('above').scrollHeight); + } + function update(id, message) { + document.getElementById(id).innerHTML = message; + } + autoTextarea(document.getElementById("message"));// 调用 + $('#message').click(function () { + wordinx = getPositionForTextArea(document.getElementById('message')); + closeFaceDialog(0); + }); + + var message = { + // text:data.message, + // picture:function(){ + + // } + // file:function(){ + + // } + // lang:function(){ + + // } + // goods:function(){ + + // } + // POI:function(){ + + // } + + } + diff --git a/contact-center/app/src/main/resources/templates/apps/im/collecting.html b/contact-center/app/src/main/resources/templates/apps/im/collecting.html deleted file mode 100644 index 78d26161..00000000 --- a/contact-center/app/src/main/resources/templates/apps/im/collecting.html +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - 信息录入 - - - - - - - -
                                    -
                                    -
                                    - -
                                    - <#if inviteData?? && inviteData.consult_info_message??>${(inviteData.consult_info_message!'')?no_esc} -
                                    -
                                    - - <#if inviteData?? && inviteData.consult_info_name == true> -
                                    - -
                                    - -
                                    -
                                    - - <#if inviteData?? && inviteData.consult_info_phone == true> -
                                    - -
                                    - -
                                    -
                                    - - <#if inviteData?? && inviteData.consult_info_email == true> -
                                    - -
                                    - -
                                    -
                                    - - <#if inviteData?? && inviteData.consult_info_resion == true> -
                                    - -
                                    - -
                                    -
                                    - -

                                    -

                                    - -
                                    -
                                    -
                                    - - - diff --git a/contact-center/app/src/main/resources/templates/apps/im/collecting.pug b/contact-center/app/src/main/resources/templates/apps/im/collecting.pug new file mode 100644 index 00000000..8bafe29f --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/im/collecting.pug @@ -0,0 +1,54 @@ +doctype html +html + head + meta(charset='utf-8') + meta(http-equiv='X-UA-Compatible', content='IE=edge') + meta(http-equiv='Cache-Control', content='no-siteapp') + meta(name='viewport', content='width=device-width,maximum-scale=1,initial-scale=1,initial-scale=1,user-scalable=no') + meta(name='apple-mobile-web-app-capable', content='yes') + title 信息录入 + link(rel='shortcut icon', type='image/x-icon', href='/images/favicon.ico?t=1489039620156') + link(rel='stylesheet', type='text/css', href='/im/css/ukefu.css') + link(rel='stylesheet', type='text/css', href='/im/css/layui.css') + link#skin(rel='stylesheet', type='text/css', href='/im/css/default/ukefu.css') + body(style='overflow:hidden;',class={'ukefu-point-text': type == 'text'}) + - var action=(schema?schema:'http')+'://'+hostname+(cskefuport!=80?cskefuport:'')+'/im/index.html?userid='+userid+'&ai=false&appid='+appid+'&aiid='+aiid+'&orgi='+inviteData.orgi+'&client='+client+'&type=text'+(skill?'&skill='+skill:'')+(agent?'&agent='+agent:'')+(sessionid?'&sessionid='+sessionid:'') + form(action=action, method='post') + .large.ukefu-im-theme(class=(type = 'text' ? 'ukefu-theme-border-' + inviteData.consult_dialog_color : '')) + #containter.clearfix + #header(class='theme' + inviteData.consult_dialog_color) + - var dialog_logo=inviteData.consult_dialog_logo?'/res/image.html?id='+inviteData.consult_dialog_logo:'/images/logo.png' + img(src=dialog_logo, style='height:30px;padding:10px;') + .ukef-leavemsg-tip(style='width: 100%;max-width: 550px') + if inviteData.consult_info_message + | #{inviteData.consult_info_message} + .leaveCon(style='width: 100%;max-width: 550px') + if inviteData.consult_info_name == true + div(class="layui-form-item ukefu-form-item") + label(class="layui-form-label ukefu-form-label", style="width:100%;text-align:left;") + | 您的姓名: + font(color="red") *(必填项) + div(class="layui-input-block", style="margin-left: 15px;") + input(type="text", name="name", class="layui-input", required="required", maxlength="50") + if inviteData.consult_info_phone == true + div(class="layui-form-item ukefu-form-item") + label(class="layui-form-label ukefu-form-label", style="width:100%;text-align:left;") + | 您的电话 + font(color="red") *(必填项) + div(class="layui-input-block", style="margin-left: 15px;") + input(type="text", class="layui-input", name="phone", required="required", maxlength="30") + if inviteData.consult_info_email == true + div(class="layui-form-item ukefu-form-item") + label(class="layui-form-label ukefu-form-label", style="width:100%;text-align:left;") + | 您的邮箱: + font(color="red") *(必填项) + div(class="layui-input-block", style="margin-left: 15px;") + input(type="text", class="layui-input", name="email", maxlength="100") + if inviteData.consult_info_resion == true + div(class="layui-form-item ukefu-form-item") + label(class="layui-form-label ukefu-form-label", style="width:100%;text-align:left;") + | 您需要咨询的问题: + div(class="layui-input-block", style="margin-left: 15px;") + textarea(class="layui-textarea", style="position: relative; overflow: hidden;", name="memo", maxlength="240") + p(class="submitBtnWrap") + input(type="submit", class="btn submitBtn theme" + inviteData.consult_dialog_color, value="开始咨询") diff --git a/contact-center/app/src/main/resources/templates/apps/im/point.html b/contact-center/app/src/main/resources/templates/apps/im/fingerprint.js similarity index 55% rename from contact-center/app/src/main/resources/templates/apps/im/point.html rename to contact-center/app/src/main/resources/templates/apps/im/fingerprint.js index 31ce145b..14304712 100644 --- a/contact-center/app/src/main/resources/templates/apps/im/point.html +++ b/contact-center/app/src/main/resources/templates/apps/im/fingerprint.js @@ -1,506 +1 @@ -var data = {}; -<#if inviteData??> -!function(e,t,n){"use strict";"undefined"!=typeof window&&"function"==typeof define&&define.amd?define(n):"undefined"!=typeof module&&module.exports?module.exports=n():t.exports?t.exports=n():t.Fingerprint2=n()}(0,this,function(){"use strict";function d(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]+t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]+t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]+t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]+t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}function g(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]*t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]*t[3],n[1]+=n[2]>>>16,n[2]&=65535,n[2]+=e[3]*t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]*t[3],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[2]*t[2],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[3]*t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}function f(e,t){return 32===(t%=64)?[e[1],e[0]]:t<32?[e[0]<>>32-t,e[1]<>>32-t]:(t-=32,[e[1]<>>32-t,e[0]<>>32-t])}function h(e,t){return 0===(t%=64)?e:t<32?[e[0]<>>32-t,e[1]<>>1]),e=g(e,[4283543511,3981806797]),e=m(e,[0,e[0]>>>1]),e=g(e,[3301882366,444984403]),e=m(e,[0,e[0]>>>1])}function l(e,t){t=t||0;for(var n=(e=e||"").length%16,a=e.length-n,r=[0,t],i=[0,t],o=[0,0],l=[0,0],s=[2277735313,289559509],c=[1291169091,658871167],u=0;u>>0).toString(16)).slice(-8)+("00000000"+(r[1]>>>0).toString(16)).slice(-8)+("00000000"+(i[0]>>>0).toString(16)).slice(-8)+("00000000"+(i[1]>>>0).toString(16)).slice(-8)}function c(e,t){if(Array.prototype.forEach&&e.forEach===Array.prototype.forEach)e.forEach(t);else if(e.length===+e.length)for(var n=0,a=e.length;nt.name?1:e.name=n.components.length)a(r.data);else{var t=n.components[i];if(n.excludes[t.key])o(!1);else{if(!e&&t.pauseBefore)return i-=1,void setTimeout(function(){o(!0)},1);try{t.getData(function(e){r.addPreprocessedComponent(t.key,e),o(!1)},n)}catch(e){r.addPreprocessedComponent(t.key,String(e)),o(!1)}}}};o(!1)},a.getPromise=function(n){return new Promise(function(e,t){a.get(n,e)})},a.getV18=function(i,o){return null==o&&(o=i,i={}),a.get(i,function(e){for(var t=[],n=0;n= 200 && status < 300 ){ -options.success && options.success(xhr.responseText,xhr.responseXML); -}else{ -options.fail && options.fail(status); -} -} -}; -if (options.type == 'GET'){ -xhr.open("GET",options.url + '?' + params ,options.async); -xhr.send(null) -}else if (options.type == 'POST'){ - -xhr.open('POST',options.url,options.async); - -xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded'); - - -xhr.send(params); -} -} - -function getParams(data) { -var arr = []; -for (var param in data){ -arr.push(encodeURIComponent(param) + '=' +encodeURIComponent(data[param])); -} -arr.push(('randomNumber=' + Math.random()).replace('.')); -return arr.join('&'); -} - -var protocol = "${schema!''}" - -document.cookie="" - -function chatoperaInit(info) { -ajax({ -url: -protocol + "://${hostname!''}<#if port?? && port != 80>:${port!''}/im/chatoperainit.html?sessionid=${sessionid!''}", -type: "POST", -data: { -<#if inviteData.whitelist_mode == true > -whitelist_mode: ${inviteData.whitelist_mode}, -<#else> -whitelist_mode: false, - -userid: cskefuOnlineUserId, -uid: info.uid, -username: info.username, -cid: info.cid, -company_name: info.company_name, -sid: info.sid, -system_name: info.system_name -}, -dataType: "json", -contentType: "application/json", -async: false, -success: function(res) { -<#if inviteData.whitelist_mode == true > -if(res == 'usc'){ -document.getElementById("ukefu-point").style.display = "block" ; -} - -} -}); -} - - -<#assign style = 'text-align:center;height: 150px;border-radius: 30px;width: 40px;margin: 0px 5px 0 0; float:left ; word-wrap: break-word;overflow: hidden;font-size:15px;color:#FFFFFF;text-align: center;padding-top: 15px;border: 1px solid #DCDCDC;background-color:#008df3;'> -<#if inviteData.consult_vsitorbtn_model?? && inviteData.consult_vsitorbtn_model == "2"> -<#assign style = 'height: 70px;border-radius: 3px; width: 70px;margin: 40px auto;word-wrap:break-word;overflow:hidden;font-size: 22px;color:#FFFFFF;text-align:center;padding-top:10px;border: 1px solid #DCDCDC;background-color:#dddddd;'> -<#elseif inviteData.consult_vsitorbtn_model?? && inviteData.consult_vsitorbtn_model == "3"> -<#assign style = 'height: 70px;border-radius: 70px; width: 70px;margin: 40px auto;word-wrap:break-word;overflow:hidden;font-size: 22px;color:#FFFFFF;text-align:center;padding-top:5px;border: 1px solid #DCDCDC;background-color:#dddddd;'> - - -<#assign text = 'width:25px;'> -<#if inviteData.consult_vsitorbtn_model?? && inviteData.consult_vsitorbtn_model == "2"> -<#assign text = 'width:100%;'> -<#elseif inviteData.consult_vsitorbtn_model?? && inviteData.consult_vsitorbtn_model == "3"> -<#assign text = 'width:100%;'> - - -<#assign theme = 'background-color: #377FED !important;border-color: #377FED !important;'> -<#if inviteData.consult_vsitorbtn_color?? && inviteData.consult_vsitorbtn_color == "2"> -<#assign theme = 'background-color: #67CAFF !important;'> -<#elseif inviteData.consult_vsitorbtn_color?? && inviteData.consult_vsitorbtn_color == "3"> -<#assign theme = 'background-color: #8E8E8E !important;'> -<#elseif inviteData.consult_vsitorbtn_color?? && inviteData.consult_vsitorbtn_color == "4"> -<#assign theme = 'background-color: #32c24d !important;'> -<#elseif inviteData.consult_vsitorbtn_color?? && inviteData.consult_vsitorbtn_color == "5"> -<#assign theme = 'background-color: #E45DB3 !important;'> -<#elseif inviteData.consult_vsitorbtn_color?? && inviteData.consult_vsitorbtn_color == "6"> -<#assign theme = 'background-color: #FF626F !important;'> - - -<#assign position = "right:10px;top:40%;"> -<#if inviteData.consult_vsitorbtn_position?? && inviteData.consult_vsitorbtn_position == "right,top"> -<#assign position = "right:10px;top:10px;"> -<#elseif inviteData.consult_vsitorbtn_position?? && inviteData.consult_vsitorbtn_position == "right,bottom"> -<#assign position = "right:10px;bottom:10px;"> -<#elseif inviteData.consult_vsitorbtn_position?? && inviteData.consult_vsitorbtn_position == "right,middle"> -<#assign position = "right:10px;top:40%;"> -<#elseif inviteData.consult_vsitorbtn_position?? && inviteData.consult_vsitorbtn_position == "left,top"> -<#assign position = "left:10px;top:10px;"> -<#elseif inviteData.consult_vsitorbtn_position?? && inviteData.consult_vsitorbtn_position == "left,middle"> -<#assign position = "left:10px;top:40%;"> -<#elseif inviteData.consult_vsitorbtn_position?? && inviteData.consult_vsitorbtn_position == "left,bottom"> -<#assign position = "left:10px;bottom:10px;"> - - -<#assign invitetheme = 'background-color: #377FED !important;'> -<#if inviteData.consult_invite_color?? && inviteData.consult_invite_color == "2"> -<#assign invitetheme = 'background-color: #67CAFF !important;'> -<#elseif inviteData.consult_invite_color?? && inviteData.consult_invite_color == "3"> -<#assign invitetheme = 'background-color: #8E8E8E !important;'> -<#elseif inviteData.consult_invite_color?? && inviteData.consult_invite_color == "4"> -<#assign invitetheme = 'background-color: #32c24d !important;'> -<#elseif inviteData.consult_invite_color?? && inviteData.consult_invite_color == "5"> -<#assign invitetheme = 'background-color: #E45DB3 !important;'> -<#elseif inviteData.consult_invite_color?? && inviteData.consult_invite_color == "6"> -<#assign invitetheme = 'background-color: #FF626F !important;'> - -var signal = 0 ; -function append(parent, text) { -if (typeof text === 'string') { -var temp = document.createElement('div'); -temp.innerHTML = text; -parent.appendChild(temp); -} -else { -parent.appendChild(text); -} -} -function closerefresh(){ -location.reload(); -} - -var cskefu = { -service: {agentno: null}, -time : new Date().getTime(), -in: protocol + "://${hostname!''}<#if port?? && port != 80>:${port!''}/im/${appid!''}/userlist.html?appid=${appid!''}<#if aiid??>&aiid=${aiid}&orgi=${orgi!''}&client=${client}" , -url: protocol + "://${hostname!''}<#if port?? && port != 80>:${port!''}/im/online?appid=${appid!''}&orgi=${orgi!''}<#if aiid??>&aiid=${aiid}&client=${client}" , -chat: protocol + "://${hostname!''}<#if port?? && port != 80>:${port!''}/im/index.html?&appid=${appid!''}<#if aiid??>&aiid=${aiid}&orgi=${orgi!''}&client=${client}" , -refuse: protocol + "://${hostname!''}<#if port?? && port != 80>:${port!''}/im/refuse.html?appid=${appid!''}<#if aiid??>&aiid=${aiid}&orgi=${orgi!''}&client=${client}", -config: function(d){ -data = d ; -if(d.id != null && d.id != ''){ -cskefuOnlineUserId = d.id ; -} -} , -ajax:function(url , success , error) { -var xhr = false; -signal = signal + 1 ; -try { -xhr = new ActiveXObject("Msxml2.XMLHTTP"); // ie msxml3.0+(IE7.0及以上) -} catch (e) { -try{ -xhr = new ActiveXObject("Microsoft.XMLHTTP"); //ie msxml2.6(IE5/6) -}catch (e2) { -xhr = false; -} -} -if (!xhr && typeof XMLHttpRequest != 'undefined') {// Firefox, Opera 8.0+, Safari -xhr = new XMLHttpRequest(); -} -xhr.onreadystatechange = function (data) { -if (xhr.readyState == 4) { -var status = xhr.status; -if (status >= 200 && status < 300) { -var event = xhr.responseText; -if(event && event.indexOf('invite') >= 0){ -var agentno = event.substring(event.lastIndexOf(":") + 1).trim(); -cskefu.service.agentno = agentno; -cskefu.writeinvite(); -}else if(event && event.indexOf('refuse') >= 0){ -cskefu.refuseInvite() ; -}else if(event && event.indexOf('accept') >= 0){ -cskefu.acceptInvite(); -} -if(success){ -success(event); -} -} else { -// -if(error){ -error(); -} -} -xhr.abort(); -signal = signal - 1 ; -} -} -xhr.open("GET", url , true); - -try{ -xhr.send(null); -}catch(e){} -}, -ping : function(){ -var url = cskefu.url ; -if(data){ -if(data.id){ -url = url + "&id="+data.id ; -} -if(data.name){ -url = url + "&name="+encodeURIComponent(data.name); -} -if(data.email){ -url = url + "&email="+encodeURIComponent(data.email); -} -if(data.phone){ -url = url + "&phone="+encodeURIComponent(data.phone); -} -url = url + "&title="+encodeURIComponent(document.title); -<#if traceid??> -url = url+"&traceid=${traceid}" - -url = url+"&url="+encodeURIComponent(location.href) -} -cskefu.ajax(url + "&userid="+cskefuOnlineUserId+"&sessionid=${sessionid!''}&sign="+cskefuOnlineUserId+"&t="+new Date().getTime() , function(){cskefu.ping();}); -}, -writepoint:function(){ - -var skillHtml = "<#if inviteData?? && inviteData.skill == true && inviteData.consult_skill_fixed == false>
                                    " + - "
                                    :${port!''}/images/logo-icon.png' style='height:20px;vertical-align: middle;'/> <#if inviteData.consult_skill_title??>${inviteData.consult_skill_title!''}
                                    "+ -"
                                    "+ - <#if pointAd??> - <#if pointAd.adtype =="image"> - ":${port!''}${pointAd.imgurl!''}' style='max-width:140px;max-height:90px;margin:0 5px;vertical-align: middle;'/>"+ -<#else> -""+ - -<#else> -":${port!''}/images/title.jpg' style='width:140px;margin:0 5px;vertical-align: middle;'/>"+ - -"
                                    <#if inviteData?? && inviteData.skill == true && inviteData.consult_skill_fixed == false && inviteData.consult_skill_msg??>${(inviteData.consult_skill_msg!'')?no_esc}
                                    "+ - -<#if skillGroups?? && skillGroups?size gt 0> -<#list skillGroups as skill> -<#if inviteData.consult_skill_numbers == 0 || skill_index lt inviteData.consult_skill_numbers > -<#assign skillNum = 0 > -<#list agentList as agent> -<#if agent.skills?? && agent.skills[skill.id]??> -<#assign skillNum = skillNum+1 > - - -""+ -<#if inviteData.consult_skill_agent?? && inviteData.consult_skill_agent == true> -""+ - - - -<#elseif inviteData.onlyareaskill && inviteData.areaskilltipmsg??> -"
                                    ${(inviteData.areaskilltipmsg!'')?no_esc}
                                    "+ - - -"
                                    "+ - -"
                                    <#if inviteData.consult_skill_bottomtitle??>${inviteData.consult_skill_bottomtitle!''}
                                    "+ -"
                                    " ; - -append(document.body, ''); -append(document.body, ""); - -<#if inviteData?? && inviteData.skill == true && inviteData.consult_skill_fixed == false> -document.getElementById("ukefu-im-point-text").onclick=function(){ -if(document.getElementById("ichatContent").style.display == "none"){ -document.getElementById("ichatContent").style.display = 'block'; -}else{ -document.getElementById("ichatContent").style.display = 'none'; -} -} -<#else> -document.getElementById("ukefu-point").onclick=function(){ -cskefu.openChatDialog(); -} - -var inviteDialog = document.getElementById('ukefu-invite-dialog'); -<#if phone?? && mobile == true> -inviteDialog.style.bottom = 0 ; -<#else> -var height = document.documentElement.clientHeight ; -var width = document.documentElement.clientWidth ; -var top = (50 - 92*100/height)+"%"; -var left = (50 - 210*100/width)+"%" ; - -inviteDialog.style.top = top ; -inviteDialog.style.left = left ; - -<#if inviteAd??> -var inviteAdHtml = -<#if inviteAd.adtype =="image"> -":${port!''}${inviteAd.imgurl!''}' style='max-width:420px;max-height:178px;margin:0px;vertical-align: middle;'/>" -<#else> -"" - -var inviteBody = document.getElementById('ukefu_consult_body'); -if(inviteBody){ -inviteBody.innerHTML = inviteAdHtml ; -} - -; -}, -openChatDialog:function(){ -cskefu.openChatDialogWithURL(cskefu.chat); -}, -openChatDialogWithURL:function(url){ -url = url + "&userid="+cskefuOnlineUserId+"&sessionid=${sessionid!''}" -if(data){ -if(data.id){ -url = url + "&id="+data.id ; -} -if(data.name){ -url = url + "&name="+encodeURIComponent(data.name); -} -if(data.email){ -url = url + "&email="+encodeURIComponent(data.email); -} -if(data.phone){ -url = url + "&phone="+encodeURIComponent(data.phone); -} -} - -<#if inviteData?? && inviteData.skill == true && inviteData.consult_skill_fixed == true> -url = url + "&skill=${inviteData.consult_skill_fixed_id}"; - - -url = url + "&title="+encodeURIComponent(document.title); -<#if traceid??> -url = url+"&traceid=${traceid}" - -url = url+"&url="+encodeURIComponent(location.href) ; -try{ -window.open(url+"&t="+new Date().getTime(), "ukefu-chat", "height=600, width=850, top="+ (window.screen.availHeight - 30 - 600) /2+", left="+(window.screen.availWidth - 10 - 750)/2+",toolbar=no, menubar=no, scrollbars=no, resizable=no, directories=no,location=no, status=no"); -}catch(e){} -return false; -}, -display:function(){ -cskefu.writepoint(); -<#if !(inviteData.consult_vsitorbtn_display??) || (inviteData.consult_vsitorbtn_display?? && inviteData.consult_vsitorbtn_display == 0)> - -<#if inviteData?? && inviteData.consult_vsitorbtn_model != '9' && inviteData.whitelist_mode == false> -document.getElementById("ukefu-point").style.display = "block" ; - - -<#if inviteData.consult_invite_enable> -<#if inviteData.consult_invite_delay?? && inviteData.consult_invite_delay == 0> -cskefu.writeinvite() ; -<#else> -setTimeout(function(){ -cskefu.writeinvite() ; -} , ${inviteData.consult_invite_delay}); - - -<#else> -setTimeout(function(){ -document.getElementById("ukefu-point").style.display = "block" ; -<#if inviteData.consult_invite_enable> -<#if inviteData.consult_invite_delay?? && inviteData.consult_invite_delay == 0> -cskefu.writeinvite() ; -<#else> -setTimeout(function(){ -cskefu.writeinvite() ; -} , ${inviteData.consult_invite_delay}); - - -}, ${inviteData.consult_vsitorbtn_display}); //延时显示 访客入口 - -}, -writeinvite:function(){ -document.getElementById('ukefu-invite-dialog').style.display = "block" ; -}, -refuseInvite:function(){ -document.getElementById('ukefu-invite-dialog').style.display = "none" ; -cskefu.ajax(cskefu.refuse + "&userid="+cskefuOnlineUserId+"&sessionid=${sessionid!''}&t="+new Date().getTime()); -}, -acceptInvite:function(){ -document.getElementById('ukefu-invite-dialog').style.display = "none" ; -}, -check:function(){ -var checkTimes = 0 ; -setInterval(function(){ -if(signal <= 0){ -checkTimes++ ; -}else{ -checkTimes = 0 ; -} -if(checkTimes >= 3){ //检查当前的 Keep-Alive是否存活,检查3次都处于未存活状态,则启动 -// -signal = 0 ; -checkTimes = 0 ; -cskefu.ping(); -console.log("春松客服客户端信息校对"); -} -},5000) ; -} - -} - -// 邀请聊天 -function openInviteChatDialog(){ -var url = cskefu.chat + "&agent=" + cskefu.service.agentno + "&isInvite=true"; -return cskefu.openChatDialogWithURL(url); -} - -// 技能组或坐席聊天 -function openAgentChatDialog(url){ -return cskefu.openChatDialogWithURL(url); -} - -<#if webimexist == true > -Fingerprint2.get({extraComponents: [<#if channelVisitorSeparate?? && channelVisitorSeparate == true>{key: "cskefuAppId", getData: function(done, options){done("${appid!''}")}}, -{ -key: "rndId", -getData(done, options){ -var rnd = ''; -if(localStorage){ -rnd = localStorage.finger; -if(!rnd){ -rnd = Math.random(); -localStorage.finger = rnd; -} -} - -done(rnd); -} -} -]}, function(components){ -var glue = components.map(function (component) { return component.value }) -cskefuOnlineUserId = Fingerprint2.x64hash128(glue.join(''), 31); -cskefu.ajax(cskefu.in+"&userid="+cskefuOnlineUserId+"&t="+new Date().getTime() , function(data){ -if(data == "in"){}else{ -cskefu.display(); -cskefu.ping(); -cskefu.check(); -} -}); -}); - - -var onlineAddress = protocol + "://${hostname!''}<#if port?? && port != 80 && port != 443>:${port!''}"; -var newscript = document.createElement('script'); -newscript.setAttribute('src',onlineAddress+'/im/js/html2canvas.js'); -var head = document.getElementsByTagName('head')[0]; -head.appendChild(newscript); - -window.addEventListener( -'message', -function(event) { -if(event.origin === onlineAddress && event.data === "screenshots" ){ - -html2canvas(document.body).then(function(canvas) { -var dataurl = canvas.toDataURL('image/png'); -event.source.postMessage(dataurl, '*'); -}); - -} -}, -false -); - - - - +!function(e,t,n){"use strict";"undefined"!=typeof window&&"function"==typeof define&&define.amd?define(n):"undefined"!=typeof module&&module.exports?module.exports=n():t.exports?t.exports=n():t.Fingerprint2=n()}(0,this,function(){"use strict";function d(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]+t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]+t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]+t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]+t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}function g(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]*t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]*t[3],n[1]+=n[2]>>>16,n[2]&=65535,n[2]+=e[3]*t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]*t[3],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[2]*t[2],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[3]*t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}function f(e,t){return 32===(t%=64)?[e[1],e[0]]:t<32?[e[0]<>>32-t,e[1]<>>32-t]:(t-=32,[e[1]<>>32-t,e[0]<>>32-t])}function h(e,t){return 0===(t%=64)?e:t<32?[e[0]<>>32-t,e[1]<>>1]),e=g(e,[4283543511,3981806797]),e=m(e,[0,e[0]>>>1]),e=g(e,[3301882366,444984403]),e=m(e,[0,e[0]>>>1])}function l(e,t){t=t||0;for(var n=(e=e||"").length%16,a=e.length-n,r=[0,t],i=[0,t],o=[0,0],l=[0,0],s=[2277735313,289559509],c=[1291169091,658871167],u=0;u>>0).toString(16)).slice(-8)+("00000000"+(r[1]>>>0).toString(16)).slice(-8)+("00000000"+(i[0]>>>0).toString(16)).slice(-8)+("00000000"+(i[1]>>>0).toString(16)).slice(-8)}function c(e,t){if(Array.prototype.forEach&&e.forEach===Array.prototype.forEach)e.forEach(t);else if(e.length===+e.length)for(var n=0,a=e.length;nt.name?1:e.name=n.components.length)a(r.data);else{var t=n.components[i];if(n.excludes[t.key])o(!1);else{if(!e&&t.pauseBefore)return i-=1,void setTimeout(function(){o(!0)},1);try{t.getData(function(e){r.addPreprocessedComponent(t.key,e),o(!1)},n)}catch(e){r.addPreprocessedComponent(t.key,String(e)),o(!1)}}}};o(!1)},a.getPromise=function(n){return new Promise(function(e,t){a.get(n,e)})},a.getV18=function(i,o){return null==o&&(o=i,i={}),a.get(i,function(e){for(var t=[],n=0;n - - - - - - - - 在线咨询 - - - - - - - - - - - - - - - - - - -
                                    -
                                    - -
                                    -
                                    - <#if welcomeAd> -
                                    - - <#if welcomeAd.adtype =="image"> - - <#else> - - - -
                                    - -
                                    - ${(inviteData.dialog_message!'欢迎您来咨询!欢迎使用春松客服!如需帮助请联系 info@chatopera.com')?no_esc}
                                    - <#if chatMessageList?? && chatMessageList.content??> - <#list chatMessageList.content?reverse as chatMessage> - <#if chatMessage.userid?? && userid?? && chatMessage.calltype?? && chatMessage.calltype = "呼入"> -
                                    -
                                    - -
                                    - - -
                                    -
                                    - -
                                    <#include "/apps/im/media/message.html">
                                    -
                                    -
                                    -
                                    - <#else> -
                                    -
                                    - -
                                    - - -
                                    -
                                    - -
                                    <#include "/apps/im/media/message.html">
                                    -
                                    -
                                    -
                                    - - - -
                                    -
                                    - -
                                    -
                                    0/200
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    信息提示

                                    -
                                    -
                                      - <#if inviteData.dialog_name?? && inviteData.dialog_name != ""> -
                                    • -

                                      名称:${inviteData.dialog_name!''}

                                      -
                                    • - - <#if inviteData.dialog_address?? && inviteData.dialog_address != ""> -
                                    • -

                                      地址:${inviteData.dialog_address!''}

                                      -
                                    • - - <#if inviteData.dialog_phone?? && inviteData.dialog_phone != ""> -
                                    • -

                                      电话:${inviteData.dialog_phone!''}

                                      -
                                    • - - <#if inviteData.dialog_mail?? && inviteData.dialog_mail != ""> -
                                    • -

                                      邮件:${inviteData.dialog_mail!''}

                                      -
                                    • - - <#if inviteData.dialog_mail?? && inviteData.dialog_introduction != ""> -
                                    • -

                                      ${(inviteData.dialog_introduction!'')?no_esc}

                                      -
                                    • - -
                                    -
                                    -
                                    - <#if imageAd> - <#if imageAd.adtype =="image"> - - <#else> - - - <#elseif inviteData.dialog_ad??> - - -
                                    -
                                    -
                                    - -
                                    -<#if sessionConfig?? && sessionConfig.satisfaction?? && sessionConfig.satisfaction> - - - - - - - diff --git a/contact-center/app/src/main/resources/templates/apps/im/index.pug b/contact-center/app/src/main/resources/templates/apps/im/index.pug new file mode 100644 index 00000000..25cc7ba5 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/im/index.pug @@ -0,0 +1,713 @@ +doctype html +html + head + meta(charset='utf-8') + meta(http-equiv='X-UA-Compatible', content='IE=edge') + meta(http-equiv='Cache-Control', content='no-siteapp') + meta(name='viewport', content='width=device-width,maximum-scale=1,initial-scale=1,initial-scale=1,user-scalable=no') + meta(name='apple-mobile-web-app-capable', content='yes') + title 在线咨询 + link(rel='shortcut icon', type='image/x-icon', href='/images/favicon.ico?t=1489039620156') + link(rel='stylesheet', type='text/css', href='/im/css/ukefu.css') + link#skin(rel='stylesheet', type='text/css', href='/im/css/default/ukefu.css') + // kindeditor + link(rel='stylesheet', type='text/css', href='/im/js/kindeditor/themes/default/default.css') + script(src='/js/jquery-1.10.2.min.js') + script(type='text/javascript', src='/im/js/kindeditor/kindeditor.js') + script(type='text/javascript', src='/im/js/kindeditor/lang/zh-CN.js') + script(type='text/javascript', src='/im/js/html2canvas.js') + script(src='/im/js/socket.io.js') + script(src='/im/js/dayjs.min.js') + script(type='text/javascript'). + var editor, words; + var isAgentEnds = false; + var newmessage = [], ring = []; + newmessage['mp3'] = '/images/message.mp3'; + ring['mp3'] = '/images/ring.mp3'; + KindEditor.lang({ + html2canvas: '截图', + evaluation: '满意度评价' + }); + KindEditor.ready(function (K) { + var items = ['emoticons', 'image', 'insertfile', 'html2canvas', 'evaluation']; + if (window.opener == null) { + items = ['emoticons', 'image', 'insertfile', 'evaluation']; + } + + editor = K.create('textarea[name="content"]', { + autoHeightMode: false, + width: "100%", + resizeType: 0, + themeType: 'simple', + fontsize: 16, + newlineTag: "br", + uploadJson: "/im/image/upload.html?userid=#{userid}", + allowFileManager: false, + allowInsertUpload: false, //增加的参数,上传图片后是否插入到当前区域 + allowImageRemote: false, + filterMode: true, + + items: items, + // items: ['emoticons', 'image', 'html2canvas'], //w4l客户需求,访客不允许上传文件 + htmlTags: { + img: ['src', 'width', 'height', 'border', 'alt', 'title', 'align', '.width', '.height', '.border'], + br: [] + }, + afterChange: function () { + + var message = document.getElementById('message').value; + var imgReg = /|\/>)/gi; + var imgnumber = 0; + if (this.text().match(imgReg)) { + imgnumber = this.text().match(imgReg).length * 50; + } + + var count = this.count() - imgnumber; + + var limitNum = #{ inviteData.maxwordsnum > 0 ? inviteData.maxwordsnum : 300}; //设定限制字数 + var pattern = '还可以输入' + (limitNum - imgnumber) + '字'; + var strValue = this.html(); + if (count > limitNum) { + // pattern = ('字数超过限制,请适当删除部分内容'); + pattern = '还可以输入' + (limitNum - count) + '字'; + console.log(count) + //超过字数限制自动截取 + strValue = strValue.substring(0, limitNum + imgnumber); + editor.html(strValue); + } else { + //计算剩余字数 + var result = limitNum - count; + pattern = '还可以输入' + result + '字'; + if (result < 20) { + document.getElementById('surplus').style.color = "red"; + } else { + document.getElementById('surplus').style.color = "#000000"; + } + } + if (this.count("text") == 0) { + strValue = ""; + } + if (words != this.count("text")) { + socket.emit('message', { + appid: "#{appid}", + userid: "#{userid}", + type: "writing", + session: "#{sessionid}", + orgi: "#{orgi}", + message: strValue + }); + } + words = this.count("text"); + + document.getElementById('surplus').innerHTML = count + "/" + limitNum + " , " + pattern; //输入显示 + }, + afterCreate: function () { //设置编辑器创建后执行的回调函数 + var self = this; + if (#{inviteData.ctrlenter == true}) { + //Ctrl+Enter提交表单 + K.ctrl(document, 13, function () { + self.sync(); + sendMessage(); + }); + K.ctrl(self.edit.doc, 13, function () { + self.sync(); + sendMessage(); + }); + } else { + var kindEditorIframe = $("iframe").contents().find("body"); + kindEditorIframe.keydown(function (event) { + if (event.keyCode == 13 && !event.ctrlKey) { + self.sync(); + sendMessage(); + return false; + } else if (event.keyCode == 13 && event.ctrlKey) { + editor.insertHtml('
                                    '); + } + }); + //Ctrl+Enter提交表单 + K.ctrl(document, 13, function () { + editor.insertHtml('
                                    '); + }); + K.ctrl(self.edit.doc, 13, function () { + editor.insertHtml('
                                    '); + }); + } + } + }); + }); + + function dataURLtoFile(dataurl, filename) { + console.log(dataurl, filename) + + var arr = dataurl.split(',') + if (dataurl != "") { + + var mime = arr[0].match(/:(.*?);/)[1] + var bstr = atob(arr[1]), n = bstr.length, u8arr = new Uint8Array(n); + while (n--) { + u8arr[n] = bstr.charCodeAt(n); + } + return new File([u8arr], filename, {type: mime}); + } + }; + + KindEditor.plugin('evaluation', function (K) { + var editor = this, name = 'evaluation'; + editor.clickToolbar(name, function () { + $("#diaShade").css("display", "block"); + $("#dialogWrap").css("display", "block"); + }); + }); + + KindEditor.plugin('html2canvas', function (K) { + var editor = this, name = 'html2canvas'; + editor.clickToolbar(name, function () { + if (window.opener != null) { + window.opener.postMessage('screenshots', "*"); + } else { + alert('无法截图,请打开页面') + } + }); + }); + KindEditor.options.cssData = "body { font-size: 15px; font-family:'Microsoft Yahei', 'Helvetica', 'Simsun', 'Arial';}"; + var R3Ajax = { + ajax: function (opt) { + var xhr = this.createXhrObject(); + xhr.onreadystatechange = function () { + if (xhr.readyState != 4) return; + (xhr.status === 200 ? + opt.success(xhr.responseText, xhr.responseXML) : + opt.error(xhr.responseText, xhr.status)); + } + xhr.open(opt.type, opt.url, true); + if (opt.type !== 'post') + opt.data = null; + else + xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); + opt.data = this.parseQuery(opt.data); + xhr.send(opt.data); + }, + post: function (url, success, data) { + var popt = { + url: url, + type: 'post', + data: data, + success: success, + error: function (data) { + } + } + this.ajax(popt); + }, + get: function (url, success) { + var gopt = { + url: url, + type: 'get', + success: success, + error: function () { + } + } + this.ajax(gopt); + }, + createXhrObject: function () { + var methods = [ + function () { + return new XMLHttpRequest(); + }, + function () { + return new ActiveXObject('Msxml2.XMLHTTP'); + }, + function () { + return new ActiveXObject('Microsoft.XMLHTTP'); + } + ]; + for (var i = 0; len = methods.length, i < len; i++) { + try { + methods[i](); + } catch (e) { + continue; + } + this.createXhrObject = methods[i]; + return methods[i](); + } + throw new Error('Could not create an XHR object.'); + }, + parseQuery: function (json) { + if (typeof json == 'object') { + var str = ''; + for (var i in json) { + str += "&" + i + "=" + encodeURIComponent(json[i]); + } + return str.length == 0 ? str : str.substring(1); + } else { + return json; + } + }, + audioplayer: function (id, file, loop) { + var audioplayer = document.getElementById(id); + if (audioplayer != null) { + document.body.removeChild(audioplayer); + } + + if (typeof (file) != 'undefined') { + if (navigator.userAgent.indexOf("MSIE") > 0) { // IE + var player = document.createElement('bgsound'); + player.id = id; + player.src = file['mp3']; + player.setAttribute('autostart', 'true'); + if (loop) { + player.setAttribute('loop', 'infinite'); + } + document.body.appendChild(player); + + } else { // Other FF Chome Safari Opera + var player = document.createElement('audio'); + player.id = id; + player.setAttribute('autoplay', 'autoplay'); + if (loop) { + player.setAttribute('loop', 'loop'); + } + document.body.appendChild(player); + + var mp3 = document.createElement('source'); + mp3.src = file['mp3']; + mp3.type = 'audio/mpeg'; + player.appendChild(mp3); + } + } + } + }; + Date.prototype.format = function (fmt) { + var o = { + "M+": this.getMonth() + 1, //月份 + "d+": this.getDate(), //日 + "h+": this.getHours(), //小时 + "m+": this.getMinutes(), //分 + "s+": this.getSeconds(), //秒 + "q+": Math.floor((this.getMonth() + 3) / 3), //季度 + "S": this.getMilliseconds() //毫秒 + }; + if (/(y+)/.test(fmt)) { + fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length)); + } + for (var k in o) { + if (new RegExp("(" + k + ")").test(fmt)) { + fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); + } + } + return fmt; + } + var R3Helper = { + resize: function () { + var height = document.body.offsetHeight; + document.getElementById('above').style.height = (height - 194 - 50) + "px"; + } + } + + + function submitForm(form) { + var satisComment = ""; + var otherVal = document.getElementById('othertxt').value; + var comInputVal = document.getElementById("comment_input").value; + if (otherVal.length > 0) { + satisComment = otherVal; + } else { + satisComment = comInputVal; + } + R3Ajax.post("/im/satis.html?orgi=#{orgi}", function () { + document.getElementById("diaShade").style.display = "none"; + document.getElementById("dialogWrap").style.display = "none"; + if (isAgentEnds) { + alert("服务评价已提交,请关闭浏览器!"); + isAgentEnds = false; + + service_end = true; + } + alert("服务评价已提交"); + }, "id=" + form.id.value + "&satislevel=" + document.getElementById("satislevel_input").value + "&satiscomment=" + encodeURIComponent(satisComment)); + return false; + } + + window.addEventListener( + 'message', + function (event) { + if (typeof event.data != 'string') { + return; + } + + var file = dataURLtoFile(event.data, 'image.png'); + console.log(file) + var form = new FormData(); + form.append('imgFile', file); + $.ajax({ + type: 'POST', + url: "/im/image/upload.html?userid=#{userid}", + data: form, + processData: false, + contentType: false + }).done(function (data) { + console.log("发送数据"); + }); + } + , false) + + // kindeditor + style. + .ke-icon-html2canvas { + background-image: url(img/cutimage.png); + background-position: 0px 0px; + width: 16px; + height: 16px; + } + + .ke-icon-evaluation { + background-image: url(img/evaluationa.png); + background-position: 0px 0px; + width: 20px; + height: 16px; + } + + body.ukefu-point-text(style='overflow:hidden;') + - var dialog_headimg= inviteData.consult_dialog_headimg ? '/res/image.html?id=' + inviteData.consult_dialog_headimg : '/images/agent.png' + .large.ukefu-im-theme(class=(type == 'text' ? 'ukefu-theme-border-' + inviteData.consult_dialog_color : '')) + #containter.clearfix + #header(class='theme' + inviteData.consult_dialog_color) + - var dialog_logo=inviteData.consult_dialog_logo?'/res/image.html?id='+inviteData.consult_dialog_logo:'/images/logo.png' + img(src=dialog_logo, style='height:30px;padding:10px;') + .ukefu-func-tab + ul + if models.contains("chatbot") && inviteData.ai && aiid + if exchange == "true" + li + a(href="/im/index.html?appid=" + appid + "&orgi=" + orgi + (aiid ? "&aiid=" + aiid : "") + "&ai=true" + (client ? "&client=" + client : '') + (type ? "&type=text" : "") + (skill ? "&skill=" + skill : '') + (agent ? "&agent=" + agent : '') + (title ? "&title=" + title : '') + (url ? "&url=" + url : '') + (traceid ? "&traceid=" + traceid : '') + "&userid=" + userid + "&sessionid=" + sessionid + "&t=" + pugHelper.currentTimeMillis()) 智能客服 + li.cur + a(href="javascript:void(0)") 人工坐席 + else + li.cur + a(href="javascript:void(0)") 人工坐席 + .content-left + .chat-above#above + if welcomeAd + .clearfix.message.welcome + span#welcome-message + if welcomeAd.adtype == "image" + a(href=welcomeAd.url, title=welcomeAd.tiptext, target="_blank") + img(src=welcomeAd.imgurl, style="max-width:420px;max-height:178px;margin:0px;vertical-align: middle;") + else + div(style="padding:0px 5px 10px 5px;border-bottom:1px solid #dedede;") + a#point_ad_text(href=welcomeAd.url, title=welcomeAd.tiptext, target="_blank")= welcomeAd.content + + .clearfix.message.welcome + span#welcome-message= inviteData.dialog_message ? inviteData.dialog_message : '欢迎您来咨询!欢迎使用春松客服!如需帮助请联系 info@chatopera.com' + + if chatMessageList && chatMessageList.content + for chatMessage in pugHelper.reverse(chatMessageList.content) + if chatMessage.userid && userid && chatMessage.calltype && chatMessage.calltype == "呼入" + .clearfix.chat-block + .chat-right + img.user-img(src="/im/img/user.png", alt="") + .chat-message + label.time= pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', chatMessage.createtime) + label.user= chatMessage.username + .chatting-right + i.arrow(class="arrow" + inviteData.consult_dialog_color) + .chat-content(class="theme" + inviteData.consult_dialog_color) + include media/message + else + .clearfix.chat-block + .chat-left + img.user-img(src=dialog_headimg , alt="") + .chat-message + label.user + if chatMessage.chatype == 'aireply' + | #{inviteData.ainame ? inviteData.ainame : '小松'} + else + | #{chatMessage.username} + + label.time= pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', chatMessage.createtime) + .chatting-left + i.arrow + .chat-content + include media/message + .chat-bottom#bottom + textarea#message(name='content', style='visibility:hidden;') + .btn-push.clearfix + #surplus(style='float:left;height:34px;line-height:34px;margin: 10px 20px 10px 5px;') 0/200 + button.send-btn.active.special.clearfix#sent(type='button', onclick='sendMessage()') 发送 + + .content-rig + .content-list(style='padding-top:50px;') + .content-head + p 信息提示 + ul + if inviteData.dialog_name != "" + li + p= '名称:' + inviteData.dialog_name + if inviteData.dialog_address != "" + li + p= '地址:' + inviteData.dialog_address + if inviteData.dialog_phone != "" + li + p= '电话:' + inviteData.dialog_phone + if inviteData.dialog_mail != "" + li + p= '邮件:' + inviteData.dialog_mail + if inviteData.dialog_introduction != "" + li + p(style="text-indent:25px;line-height:25px;")= inviteData.dialog_introduction + + .content-pic(style='width:100%;height:192px;') + if imageAd + if imageAd.adtype == "image" + a(href=imageAd.url, title=imageAd.tiptext, target="_blank") + img(src=imageAd.imgurl, style="max-width:100%;max-height:190px;margin:0px;vertical-align: middle;") + else + div(style="padding:0px 5px 10px 5px;border-bottom:1px solid #dedede;") + a#point_ad_text(href=imageAd.url, title=imageAd.tiptext, target="_blank")= imageAd.content + else if inviteData.dialog_ad + img(src="/res/image.html?id=" + inviteData.dialog_ad, style="height:190px;width:100%;") + + #footer + //- 调查问卷弹框 + if sessionConfig.satisfaction + .diaShade#diaShade(style='display: none') + .dialogWrap#dialogWrap(style='display: none;max-height: 440px;height: auto;margin-left: -300px;top:15%') + .dialogCon + form#commentContent(onsubmit='return submitForm(this)') + input#agentserviceid(type='hidden', name='id') + h2.diaHeader.clearfix + span 评价 + hr + p.title 您是否对此次服务满意? + //- 评价 + p(style='margin-top:20px; height: 20px') + span(style='float:left;') 评价: + span(style='position: relative;top: 0px;left: 13px;') + - var defaultvalue = '' + for comment in commentList + input(type="radio", ,checked=comment_index == 0, name="satislevel", value=comment.code, id="dic_" + comment.id, onclick="document.getElementById('satislevel_input').value = this.value") + label.radio(for="dic_" + comment.id)= comment.name + if defaultvalue == "" + - defaultvalue = comment.code + input#satislevel_input(type="hidden", name="t", value=defaultvalue) + + //- 意见 + p(style='margin-top:20px;') + span(style='float:left;') 意见: + span(style='position: relative;top: 0px;left: 10px;') + input#comment_input(type='hidden', name='t') + div(style='width: 430px;height: auto;margin-left:55px;margin-bottom: 15px') + for item in commentItemList + div(style="margin-bottom:15px;width: 188px") + input(type="radio", name="comment", id="item_" + item.id, value=item.id, contentname=item.name, onclick="selectOther(this.getAttribute('contentname'),this.value)") + label.radio(for="item_" + item.id, style="margin-right: 0px")= item.name + textarea#othertxt.layui-textarea(name='comment', placeholder='请输入意见(最大长度为200个字符)', style='resize:none;display: none;height: 56px; width:360px;margin-left: 55px;background: #f7f7f7;border-color: #ccc;font-size: 14px;outline: none;padding-left: 10px;border-radius: 2px;', maxlength='200') + p + //- 按钮 + p.submitBtnWrap(style='margin-top: 0px') + input.btn.submitBtn#submitBtn(type='submit', value='提 交') + + script. + function chatScorllBottom(box) { + var imgdefereds = []; //定义一个操作数组 + $('#' + box + ' .ukefu-media-image').each(function () { //遍历所有图片,将图片 + var dfd = $.Deferred(); //定义一个将要完成某个操作的对象 + $(this).bind('load', function () { + dfd.resolve(); //图片加载完成后,表示操作成功 + }); + if (this.complete) { //如果图片加载状态为完成,那么也标识操作成功 + setTimeout(function () { + dfd.resolve(); + }, 1000); + } + imgdefereds.push(dfd); //将所有操作对象放入数组中 + }) + $.when.apply(null, imgdefereds).done(function () { //注册所有操作完成后的执行方法 + document.getElementById(box).scrollTop = document.getElementById(box).scrollHeight + }); + } + + function selectOther(name, value) { + var otherTxt = document.getElementById('othertxt'); + if (name == "其他") { + otherTxt.style.display = "block" + } else { + otherTxt.style.display = "none"; + } + document.getElementById("comment_input").value = value; + } + var service_end = false; + R3Helper.resize(); + // 调查问卷 + var diaShade = document.getElementById('diaShade'); + var dialogWrap = document.getElementById('dialogWrap'); + function popup(para) { + diaShade.style.display = para; + dialogWrap.style.display = para; + } + + if (#{!welcomeAd}) { + chatScorllBottom("above"); + } + // 参数连接 + var hostname = location.hostname; + var protocol = window.location.protocol.replace(/:/g, ''); + var username = encodeURIComponent("#{username}"); + var socket = io(protocol + '://' + hostname + ':#{port}/im/user?userid=#{userid}&orgi=#{orgi}&session=#{sessionid}&appid=#{appid}&osname=!{osname}&browser=!{browser}!{skill ? "&skill=" + skill : ""}!{username ? "&nickname='+username+'" : ""}!{agent ? "&agent=" + agent : ""}!{title ? "&title=" + title : ""}!{traceid ? "&url=" + url : ""}!{traceid ? "&traceid=" + traceid : ""}!{isInvite ? "&isInvite=" + isInvite : ""}', {transports: ['websocket', 'polling']}); + + console.log('connect debug', protocol, hostname); + + socket.on('connect', function () { + console.log("on connect ..."); + if ('#{contacts.name}') { + socket.emit('new', { + name: "#{contacts.name}", + phone: "#{contacts.phone}", + email: "#{contacts.email}", + memo: "#{contacts.memo}", + orgi: "#{inviteData.orgi}", + appid: "#{appid}" + }); + } + }) + socket.on("agentstatus", function (data) { + document.getElementById('connect-message').innerHTML = data.message; + }) + socket.on("status", function (data) { + if (#{!!welcomeAd}) + output('' + data.message + '', 'message connect-message', false); + else + output('' + data.message + '', 'message connect-message', true); + + console.log("[status] data", data); + + if (data.messageType == "end") { + service_end = true; + editor.readonly(); + // 因为满意度问卷在访客切换机器人坐席时也会弹出,但是服务并未结束,目前先去掉END事件时弹出满意度 + // TODO 优化方案见 https://gitlab.chatopera.com/chatopera/cosinee/issues/744 + // <#if sessionConfig?? && sessionConfig.satisfaction?? && sessionConfig.satisfaction> + // document.getElementById("diaShade").style.display = "block"; + // document.getElementById("dialogWrap").style.display = "block"; + // isAgentEnds = true; + // + } else if (data.messageType == "text") { + service_end = false; + editor.readonly(false); + } else if (data.messageType == "message" && !data.noagent) { + // 服务恢复 + service_end = false; + editor.readonly(false); + } + + if (document.getElementById("agentserviceid")) { + document.getElementById("agentserviceid").value = data.agentserviceid; + } + }) + socket.on('message', function (data) { + console.log("on message", data); + var chat = document.getElementsByClassName('chatting-left').innerText; + data.createtime = dayjs(data.createtime).format('YYYY-MM-DD HH:mm:ss'); + chat = data.message; + if (data.msgtype == "image") { + chat = ""; + } else if (data.msgtype == "file") { + chat = ""; + } + if (data.calltype == "呼入") { + output('
                                    ' + chat + '
                                    ', "chat-block", true, data.msgtype); + } else if (data.calltype == "呼出") { + output('
                                    ' + chat + '
                                    ', "chat-block", true, data.msgtype); + R3Ajax.audioplayer('audioplane', newmessage, false); // 播放 + } + }); + + socket.on('disconnect', function () { + output('连接坐席失败,在线咨询服务不可用', 'message connect-message'); + editor.readonly(); + }); + + socket.on('satisfaction', function () { + if ('#{sessionConfig.satisfaction}') { + document.getElementById("diaShade").style.display = "block"; + document.getElementById("dialogWrap").style.display = "block"; + } + }); + + function sendDisconnect() { + socket.disconnect(); + } + function sendMessage() { + editor.sync(); + editor.afterChange(); + var count = editor.count("text"); + if (count > 0 && service_end == false) { + var message = document.getElementById('message').value; + console.log(message); + if (message != "") { + socket.emit('message', { + appid: "#{appid}", + userid: "#{userid}", + type: "message", + session: "#{sessionid}", + orgi: "#{orgi}", + message: message + }); + } + } else if (service_end == true) { + alert("坐席已断开和您的对话"); + } + editor.html(''); + } + function output(message, clazz, scroll, msgType) { + if (clazz == "message connect-message") { + var messages = document.getElementsByClassName("connect-message"); + for (inx = 0; inx < messages.length;) { + document.getElementById('above').removeChild(messages[inx]); + inx++; + } + } + var element = ("
                                    " + " " + message + "
                                    "); + document.getElementById('above').innerHTML = (document.getElementById('above').innerHTML + element); + if (scroll == null || scroll == true) { + if (msgType && msgType == "image") { + chatScorllBottom("above") + } else { + document.getElementById("above").scrollTop = document.getElementById("above").scrollHeight + } + document.getElementById('above').scrollTop = document.getElementById('above').scrollHeight; + } + } + function update(id, message) { + document.getElementById(id).innerHTML = message; + } + + var message = { + // text:data.message, + // picture:function(){ + + // } + // file:function(){ + + // } + // lang:function(){ + + // } + // goods:function(){ + + // } + // POI:function(){ + + // } + + } + // 回车事件 + document.onkeyup = function (e) { + if (!e) e = window.event; + if ((e.keyCode || e.which) == 13) { + document.getElementById('sent').click(); + } + } + window.onresize = function () { + R3Helper.resize(); + }; + diff --git a/contact-center/app/src/main/resources/templates/apps/im/leavemsg.html b/contact-center/app/src/main/resources/templates/apps/im/leavemsg.html deleted file mode 100644 index f8faaab4..00000000 --- a/contact-center/app/src/main/resources/templates/apps/im/leavemsg.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - 在线咨询 - - - - - - -
                                    - <#if skill??> - - -
                                    -
                                    - -
                                    - <#if inviteData?? && inviteData.leavemessage> - <#if sessionConfig?? && sessionConfig.hourcheck> - <#if isInWorkingHours> - <#if sessionConfig?? && sessionConfig.noagentmsg??>${(sessionConfig.noagentmsg!'')?no_esc} - <#else> - <#if sessionConfig?? && sessionConfig.notinwhmsg??>${(sessionConfig.notinwhmsg!'')?no_esc} - - <#else> - <#if sessionConfig?? && sessionConfig.noagentmsg??>${(sessionConfig.noagentmsg!'')?no_esc} - - -
                                    -
                                    - - <#if inviteData?? && inviteData.lvmname> -

                                    - 您的姓名:* - - -

                                    - - <#if inviteData?? && inviteData.lvmphone> -

                                    - 您的电话:* - - -

                                    - - <#if inviteData?? && inviteData.lvmemail> -

                                    - 您的邮箱: - - -

                                    - - <#if inviteData?? && inviteData.lvmaddress> -

                                    - 您的地址: - - -

                                    - - <#if inviteData?? && inviteData.lvmqq> -

                                    - 您的QQ: - - -

                                    - -

                                    - 留言内容: - -

                                    -

                                    -

                                    - -
                                    -
                                    -
                                    - - - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/im/leavemsg.pug b/contact-center/app/src/main/resources/templates/apps/im/leavemsg.pug new file mode 100644 index 00000000..59d24798 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/im/leavemsg.pug @@ -0,0 +1,71 @@ +doctype html +html + head + meta(charset='utf-8') + meta(http-equiv='X-UA-Compatible', content='IE=edge') + meta(http-equiv='Cache-Control', content='no-siteapp') + meta(name='viewport', content='width=device-width,maximum-scale=1,initial-scale=1,initial-scale=1,user-scalable=no') + meta(name='apple-mobile-web-app-capable', content='yes') + title 在线咨询 + link(rel='shortcut icon', type='image/x-icon', href='/images/favicon.ico?t=1489039620156') + link(rel='stylesheet', type='text/css', href='/im/css/ukefu.css') + link#skin(rel='stylesheet', type='text/css', href='/im/css/default/ukefu.css') + body(class={'ukefu-point-text': type == 'text'},style='overflow:hidden;') + form(action='/im/leavemsg/save.html?appid=' + appid, method='post') + if skill + input(type="hidden", name="skillId", value=skill) + .large.ukefu-im-theme(class="ukefu-theme-border-" + (type = 'text' ? inviteData.consult_dialog_color : '')) + #containter.clearfix + - var dialog_logo=inviteData.consult_dialog_logo?'/res/image.html?id='+inviteData.consult_dialog_logo:'/images/logo.png' + #header(class='theme' + inviteData.consult_dialog_color) + img(src=dialog_logo, style='height:30px;padding:10px;') + .ukef-leavemsg-tip(style='padding-left: 15px') + if inviteData.leavemessage + if sessionConfig.hourcheck + if isInWorkingHours + | #{sessionConfig.noagentmsg} + else + | #{sessionConfig.notinwhmsg} + else + | #{sessionConfig.noagentmsg} + .leaveCon + form + if inviteData.lvmname + p + span + | 您的姓名: + b * + input(type="text", name="name", class="txt01 txt02", required="required", maxlength="50") + if inviteData.lvmphone + p + span + | 您的电话: + b * + input(type="text", class="txt01 txt02", name="mobile", required="required", maxlength="30") + if inviteData.lvmemail + p + span 您的邮箱: + input(type="text", class="txt01 txt02", name="email", maxlength="100") + if inviteData.lvmaddress + p + span 您的地址: + input(type="text", class="txt01 txt02", name="address", maxlength="50") + if nviteData.lvmqq + p + span 您的QQ: + input(type="text", class="txt01 txt02", name="qq", maxlength="30") + p + span 留言内容: + textarea(class="txt01 txt03", style="position: relative; overflow: hidden;", name="content", maxlength="240") + p(class="submitBtnWrap") + input(type="submit", class="btn submitBtn theme" + inviteData.consult_dialog_color, value="提 交") + style. + .leaveCon { + width: 100%; + max-width: 550px; + padding: 0 15px; + } + + .leaveCon .txt01 { + width: calc(100% - 130px); + } diff --git a/contact-center/app/src/main/resources/templates/apps/im/leavemsgsave.html b/contact-center/app/src/main/resources/templates/apps/im/leavemsgsave.html deleted file mode 100644 index 7fa42cae..00000000 --- a/contact-center/app/src/main/resources/templates/apps/im/leavemsgsave.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - 在线咨询 - - - - - - - - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/im/leavemsgsave.pug b/contact-center/app/src/main/resources/templates/apps/im/leavemsgsave.pug new file mode 100644 index 00000000..07d7c1c0 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/im/leavemsgsave.pug @@ -0,0 +1,17 @@ +doctype html +html + head + meta(charset='utf-8') + meta(http-equiv='X-UA-Compatible', content='IE=edge') + meta(http-equiv='Cache-Control', content='no-siteapp') + meta(name='viewport', content='width=device-width,maximum-scale=1,initial-scale=1,initial-scale=1,user-scalable=no') + meta(name='apple-mobile-web-app-capable', content='yes') + title 在线咨询 + link(rel='shortcut icon', type='image/x-icon', href='/images/favicon.ico?t=1489039620156') + link(rel='stylesheet', type='text/css', href='/im/css/ukefu.css') + link#skin(rel='stylesheet', type='text/css', href='/im/css/default/ukefu.css') + body(style='overflow:hidden;',class={'ukefu-point-text': type == 'text'}) + script(language='javascript'). + alert("留言已记录,感谢!"); + window.close(); + diff --git a/contact-center/app/src/main/resources/templates/apps/im/loader.js b/contact-center/app/src/main/resources/templates/apps/im/loader.js new file mode 100644 index 00000000..2f1066f5 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/im/loader.js @@ -0,0 +1,41 @@ +function chatoperaLoad(url) { + function injectLoader(node) { + var newScript = document.createElement("SCRIPT"); + newScript.innerHTML = node.innerHTML; + document.getElementsByTagName("HEAD").item(0).appendChild(newScript) + } + + function append(parent, text) { + if (typeof text === 'string') { + var temp = document.createElement('div'); + temp.id = "chatoperaInject"; + temp.innerHTML = text; + + var nodes = temp.getElementsByTagName("script"); + injectLoader(nodes[0]); + injectLoader(nodes[1]); + + parent.appendChild(temp); + } else { + parent.appendChild(text); + } + } + + var xhr; + if (window.XMLHttpRequest) { + xhr = new XMLHttpRequest(); + } else { + xhr = new ActiveXObject('Microsoft.XMLHTTP'); + } + xhr.onreadystatechange = function () { + if (xhr.readyState == 4) { + var status = xhr.status; + if (status >= 200 && status < 300) { + append(document.body, xhr.responseText); + } + } + }; + + xhr.open('GET', url); + xhr.send(null); +} diff --git a/contact-center/app/src/main/resources/templates/apps/im/loader.pug b/contact-center/app/src/main/resources/templates/apps/im/loader.pug new file mode 100644 index 00000000..1ca01947 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/im/loader.pug @@ -0,0 +1,5 @@ +include loader.js + +- var baseUrl = (schema?schema:'http')+'://' + hostname + ':' + port + +| chatoperaLoad('!{baseUrl + "/im/point/" + appid + ".html"}') \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/im/media/message.html b/contact-center/app/src/main/resources/templates/apps/im/media/message.html deleted file mode 100644 index 688d62cc..00000000 --- a/contact-center/app/src/main/resources/templates/apps/im/media/message.html +++ /dev/null @@ -1,30 +0,0 @@ -<#if chatMessage.msgtype?? && chatMessage.msgtype == "image"> - -<#elseif chatMessage.msgtype?? && chatMessage.msgtype == "cooperation"> - 您收到一个协作邀请,点击进入协作 -<#elseif chatMessage.msgtype?? && chatMessage.msgtype == "file"> - -<#else> - ${(chatMessage.message!'')?no_esc} - <#if chatMessage.suggestmsg?? && chatMessage.suggestmsg!=""> - - - diff --git a/contact-center/app/src/main/resources/templates/apps/im/media/message.pug b/contact-center/app/src/main/resources/templates/apps/im/media/message.pug new file mode 100644 index 00000000..d9e5b0d3 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/im/media/message.pug @@ -0,0 +1,20 @@ +if chatMessage.msgtype == "image" + a(href=chatMessage.message + "&original=true", target="_blank") + img.ukefu-media-image(src=chatMessage.message) +else if chatMessage.msgtype == "cooperation" + a(href="javascript:void(0)", onclick='acceptInvite("' + chatMessage.message + '","' + chatMessage.attachmentid + '"') 您收到一个协作邀请,点击进入协作 +else if chatMessage.msgtype == "file" + .ukefu-message-file + .ukefu-file-icon + img(src="/im/img/file.png") + .ukefu-file-desc + a(href=chatMessage.message, target="_blank") + div= chatMessage.filename + div #{chatMessage.filesize / 1024}Kb +else + | !{chatMessage.message} + if chatMessage.suggestmsg && chatMessage.suggestmsg != "" + .info-list + for item in chatMessage.suggest + li.ukefu-suggest-item + a.suggestitem(href="javascript:void(0)", onclick="sendMessageTextWithID('" + item.title + "','" + item.id + "')")= item.title diff --git a/contact-center/app/src/main/resources/templates/apps/im/mobile.html b/contact-center/app/src/main/resources/templates/apps/im/mobile.html deleted file mode 100644 index aa70605b..00000000 --- a/contact-center/app/src/main/resources/templates/apps/im/mobile.html +++ /dev/null @@ -1,651 +0,0 @@ - - - - - - - - 智能客服 - - - - - - - - - - - - - - - - - - - n - - - -
                                    - <#if welcomeAd> -
                                    - - <#if welcomeAd.adtype =="image"> -
                                    - -
                                    - <#else> - - -
                                    -
                                    - -
                                    - ${(inviteData.dialog_message!'欢迎您来咨询!欢迎使用春松客服!如需帮助请联系 info@chatopera.com')?no_esc} -
                                    - <#if chatMessageList?? && chatMessageList.content??> - <#list chatMessageList.content?reverse as chatMessage> - <#if chatMessage.userid?? && userid?? && chatMessage.calltype?? && chatMessage.calltype = "呼入"> -
                                    -
                                    - -
                                    - -
                                    -
                                    - -
                                    <#include - "/apps/im/media/message.html">
                                    -
                                    -
                                    -
                                    - <#else> -
                                    -
                                    - -
                                    - - -
                                    -
                                    - -
                                    <#include "/apps/im/media/message.html">
                                    -
                                    -
                                    -
                                    - -
                                    - -
                                    -
                                    - - - - -
                                    - - -
                                    - - -
                                    - -
                                    -
                                    -<#if sessionConfig?? && sessionConfig.satisfaction?? && sessionConfig.satisfaction> - - - - - - diff --git a/contact-center/app/src/main/resources/templates/apps/im/mobile.pug b/contact-center/app/src/main/resources/templates/apps/im/mobile.pug new file mode 100644 index 00000000..2d588c1c --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/im/mobile.pug @@ -0,0 +1,627 @@ +doctype html +html + head + meta(charset='utf-8') + meta(http-equiv='Cache-Control', content='no-siteapp') + meta(name='viewport', content='width=device-width,maximum-scale=1,initial-scale=1,initial-scale=1,user-scalable=no') + meta(name='apple-mobile-web-app-capable', content='yes') + title 智能客服 + link(rel='shortcut icon', type='image/x-icon', href='/images/favicon.ico?t=1489039620156') + link(rel='stylesheet', type='text/css', href='/im/css/ukefu.css') + link#skin(rel='stylesheet', type='text/css', href='/im/css/default/ukefu.css') + // kindeditor + link(rel='stylesheet', type='text/css', href='/im/js/kindeditor/themes/default/default.css') + script(type='text/javascript', src='/js/jquery-1.10.2.min.js') + script(src='/js/jquery.form.js') + script(type='text/javascript', src='/im/js/kindeditor/kindeditor.js') + script(type='text/javascript', src='/im/js/kindeditor/lang/zh-CN.js') + style. + * { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-tap-highlight-color: transparent; + outline: none; + } + + *:not(input,textarea) { + -webkit-touch-callout: none; + } + + #above:after { + content: ""; + height: 100px; + display: block; + } + + script(src='/im/js/socket.io.js') + script(src='/im/js/dayjs.min.js') + script(type='text/javascript'). + var editor, words, textheight, wordinx = 0; + + /** + * 文本框根据输入内容自适应高度 + * @param {HTMLElement} 输入框元素 + * @param {Number} 设置光标与输入框保持的距离(默认0) + * @param {Number} 设置最大高度(可选) + */ + var autoTextarea = function (elem, extra, maxHeight) { + extra = extra || 0; + var isFirefox = !!document.getBoxObjectFor || 'mozInnerScreenX' in window, + isOpera = !!window.opera && !!window.opera.toString().indexOf('Opera'), + addEvent = function (type, callback) { + elem.addEventListener ? + elem.addEventListener(type, callback, false) : + elem.attachEvent('on' + type, callback); + }, + getStyle = elem.currentStyle ? function (name) { + var val = elem.currentStyle[name]; + + if (name === 'height' && val.search(/px/i) !== 1) { + var rect = elem.getBoundingClientRect(); + return rect.bottom - rect.top - + parseFloat(getStyle('paddingTop')) - + parseFloat(getStyle('paddingBottom')) + 'px'; + } + ; + + return val; + } : function (name) { + return getComputedStyle(elem, null)[name]; + }, + minHeight = parseFloat(getStyle('height')); + + + elem.style.resize = 'none'; + + var textchange = function () { + changeTextArea(0); + } + + var change = function () { + changeTextArea(0); + wordinx = getPositionForTextArea(document.getElementById('message')); + }; + + addEvent('propertychange', textchange); + addEvent('input', textchange); + addEvent('focus', function () { + changeTextArea(0); + }); + change(); + }; + //多行文本框 + function getPositionForTextArea(ctrl) { + var CaretPos = 0; + if (document.selection) { // IE Support + ctrl.focus(); + var Sel = document.selection.createRange(); + var Sel2 = Sel.duplicate(); + Sel2.moveToElementText(ctrl); + var CaretPos = -1; + while (Sel2.inRange(Sel)) { + Sel2.moveStart('character'); + CaretPos++; + } + } else if (ctrl.selectionStart || ctrl.selectionStart == '0') { // Firefox support + CaretPos = ctrl.selectionStart; + } + return (CaretPos); + } + + function openFaceDialog() { + if (document.getElementById("faceindex").style.display == "none") { + document.getElementById("faceindex").style.display = "block"; + document.getElementById("bottom").style.height = $('#message').height() + 20 + document.getElementById("faceindex").offsetHeight + "px"; + document.getElementById("above").style.height = "calc(100% - " + ($('#bottom').height()) + "px)" + } else { + closeFaceDialog(0); + } + return false; + } + + function closeFaceDialog(height) { + document.getElementById("faceindex").style.display = "none"; + document.getElementById("bottom").style.height = $('#message').height() + height + "px"; + document.getElementById("above").style.height = "calc(100% - " + ($('#message').height()) + "px)"; + } + + function changeTextArea(height) { + if (document.getElementById("faceindex").style.display == "none") { + $('#bottom').height($('#message').height() + height); + document.getElementById("above").style.height = "calc(100% - " + ($('#message').height()) + "px)" + } else { + $('#bottom').height($('#message').height() + $('#faceindex').height()); + document.getElementById("above").style.height = "calc(100% - " + ($('#message').height()) + "px)" + } + } + function insertImg(obj) { + if (wordinx >= 0) { + var text = $('#message').val(); + var value = text.substring(0, wordinx) + "[" + obj + "]" + text.substring(wordinx, text.length); + $('#message').val(value); + wordinx = wordinx + 2 + obj.length; + } + } + $(document).ready(function () { + window.addEventListener('resize', function () { + if (document.activeElement.tagName === 'INPUT' || document.activeElement.tagName === 'TEXTAREA') { + window.setTimeout(function () { + document.activeElement.scrollIntoViewIfNeeded() + }, 0) + } + }); + // 在输入框获取焦点, 键盘弹起后, 真的是一行代码 + + $(document).on('submit.form.data-api', '[data-toggle="ajax-form"]', function (e) { + var formValue = $(e.target); + $(this).ajaxSubmit({ + url: formValue.attr("action"), + success: function (data) { + + }, + error: function (xhr, type, s) { + //notification("",false); //结束 + } + }); + return false; + }); + }); + + // kindeditor + body.ukefu-im-theme.ukefu-point-text(style='width:100%;overflow:hidden;height:100%;max-height:100%;position: fixed;/* 或者scroll */-webkit-overflow-scrolling: touch;/* 解决ios滑动不流畅问题 */') + - var dialog_headimg= inviteData.consult_dialog_headimg ? '/res/image.html?id=' + inviteData.consult_dialog_headimg : '/images/agent.png' + #header(class="theme" + inviteData.consult_dialog_color) + img(src=(inviteData.consult_dialog_logo ? '/res/image.html?id=' + inviteData.consult_dialog_logo : '/images/logo.png'), style='height:50px;padding:10px;') + .ukefu-func-tab + ul + if models.contains("chatbot") && inviteData.ai && inviteData.ai == true && aiid + li + a(href="/im/index.html?appid=" + appid + "&orgi=" + orgi + (aiid ? '&aiid=' + aiid : '') + "&ai=true" + (client ? '&client=' + client : '') + (type ? '&type=' + type : '') + (skill ? '&skill=' + skill : '') + (agent ? '&agent=' + agent : '') + "&userid=" + userid + "&sessionid=" + sessionid + "&t=" + pugHelper.currentTimeMillis()) 智能客服 + li.cur + a(href="javascript:void(0)") 人工坐席 + else + li.cur + a(href="javascript:void(0)") 人工坐席 + #cooperation.ukefu-cooperation(style='display:none;z-index: 100;background-color: #ffffff;position: fixed;left: 0px;width: 100%;top: 0px;top:0px;height: 100%;') + .ukefu-image-canvas#ukefu-image-content(style='margin-top:2px;') + img#ukefu_img_ctx(style='max-width: 100%;max-height: 100%;') + .drawBoard(style='position: absolute;left: 0;top: 0;margin-top:2px;z-index: 998;') + canvas#canvas-borad.brushBorad 你的浏览器不支持 canvas 绘图 + div(style='position: absolute;bottom: 10px;width: 100%;text-align: center;z-index:10000') + button#offcoop-btn(style='border-color:#009688 !important;color:#FFFFFF;display: inline-block;height: 38px;line-height: 38px;padding: 0 18px;background-color: #009688;color: #fff;white-space: nowrap;text-align: center;font-size: 14px;margin-right:10px;border: none;border-radius: 2px;cursor: pointer;opacity: .9;filter: alpha(opacity=90);background-color: #377FED !important;border:1px solid #FFFFFF;', onclick='offCoop();') 退出协作 + .chat-above#above + if welcomeAd + .clearfix.message.welcome + span#welcome-messa + if welcomeAd.adtype == "image" + div(style="text-align: center") + a(href=welcomeAd.url, title=welcomeAd.tiptext, target="_blank") + img(src=welcomeAd.imgurl, style="max-width:420px;max-height:178px;margin:0px;vertical-align: middle;") + else + div(style="padding:0px 5px 10px 5px;border-bottom:1px solid #dedede;") + a#point_ad_text(href=welcomeAd.url, title=welcomeAd.tiptext, target="_blank")= welcomeAd.content + .clearfix.message.welcome + span#welcome-message= inviteData.dialog_message ? inviteData.dialog_message : '欢迎您来咨询!欢迎使用春松客服!如需帮助请联系 info@chatopera.com' + for chatMessage in pugHelper.reverse(chatMessageList.content) + if chatMessage.userid && userid && chatMessage.calltype && chatMessage.calltype == "呼入" + .clearfix.chat-block + .chat-right + img.user-img(src="/im/img/user.png", alt="") + .chat-message + label.time= pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', chatMessage.createtime) + label.user #{chatMessage.username} + .chatting-right + i.arrow(class="arrow" + inviteData.consult_dialog_color) + .chat-content(class="theme" + inviteData.consult_dialog_color) + include media/message + else + .clearfix.chat-block + .chat-left + img.user-img(src=dialog_headimg, alt="") + .chat-message + label.user= chatMessage.chatype && chatMessage.chatype == 'aireply' ? (inviteData.ainame ? inviteData.ainame : '小松') : chatMessage.username + label.time= pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', chatMessage.createtime) + .chatting-left + i.arrow + .chat-content + include media/message + .mobile-chat-bottom#bottom + form#imgForm(action='/im/image/upload.html?userid=' + userid + '&appid=' + appid + '&username=' + username + '&orgi=' + orgi, data-toggle='ajax-form', enctype='multipart/form-data') + a.imgFile(href='javascript:;', onclick='closeFaceDialog(0)') + img.chat-type(src='/im/img/img.png', style='width:32px;height:32px;') + input#imgFile(type='file', name='imgFile', accept='image/*', onchange='$(\'#imgForm\').submit();$(this).val(\'\');') + img#evaluation(onclick='popup(\'block\')', src='/im/img/evaluationm.png', style='width:32px;height:32px; margin-left: 40px;margin-top: 5px;') + textarea#message(name='content', maxlength=(inviteData.maxwordsnum > 0 ? inviteData.maxwordsnum : 300)) + .btn-push.clearfix + img#facedialog(onclick='return openFaceDialog()', src='/im/img/face.png', style='width:32px;height:32px;') + a(href='javascript:void(0)', onclick='sendMessage();return false;') + img(src='/im/img/send.png', style='width:32px;height:32px;') + #faceindex(style='display:none;height:200px;position: absolute;bottom: 0px;width:100%;overflow-x:auto;') + table.ke-table(cellpadding='0', cellspacing='0', border='0', style='min-width:100%;') + tbody + for row in pugHelper.range(0,4) + tr + for col in pugHelper.range(0,20) + - var emoid=row * 20 + col; + td.ke-cell + span.ke-img + img(src="/im/js/kindeditor/plugins/emoticons/images/" + emoid + ".png", border="0", alt="", onclick="insertImg('" + emoid + "')") + + //- 调查问卷弹框 + if sessionConfig.satisfaction + .dialogWrap#dialogWrap(style='display: none;height: auto;margin:0px;top:0;left: 0;border:none;width: 100%;height: 100%;background-color:#fff;overflow: auto') + .dialogCon + form#commentContent(onsubmit='return submitForm(this)') + input#agentserviceid(type='hidden', name='id') + div(style='width: 100%;height: 100%;overflow:auto;') + h2.diaHeader.clearfix(style='width: 90%;margin: 0 auto;') + span 评价 + hr(style='width: 100%;') + p.title(style='width: 90%;margin: 10px auto 0;') 您是否对此次服务满意? + // 评价 + div(style='width: 90%;margin: 20px auto') + span(style='font-weight: 600;font-size: 16px;') 评价: + span(style='position: relative;top: 10px') + div(style='width: 100%;height: auto;margin-bottom: 15px') + - var defaultvalue = ""; + for comment in commentList + - defaultvalue = comment.code; + div(style="margin-bottom:15px;width: 188px") + input(type="radio",checked=comment_index == 0, name="satislevel", value=comment.code, id="dic_" + comment.id, onclick="document.getElementById('satislevel_input').value = this.value") + label.radio(for="dic_" + comment.id)= comment.name + input#satislevel_input(type="hidden", name="t", value=defaultvalue) + + div(style='width: 90%;margin: 20px auto') + span(style='font-weight: 600;font-size: 16px;') 意见: + input#comment_input(type='hidden', name='t') + span(style='position: relative;top: 10px') + div(style='width: 100%;height: auto;margin-bottom: 15px') + for item in commentItemList + div(style="margin-bottom:15px;width: 188px") + input(type="radio", name="comment", id="item_" + item.id, value=item.id, contentname=item.name, onclick="selectOther(this.getAttribute('contentname'),this.value)") + label.radio(for="item_" + item.id, style="margin-right: 0px")= item.name + textarea#othertxt.layui-textarea(name="comment", placeholder="请输入意见(最大长度为200个字符)", style="resize:none;display: none;height: 85px; width:100%;background: #f7f7f7;border-color: #ccc;font-size: 14px;outline: none;padding-left: 10px;border-radius: 2px;", maxlength="200") + div(style='width: 100%;height: 85px') + // 按钮 + p.submitBtnWrap(style='background:#fff;position: fixed;bottom: 0px;left:0px;width: 100%;height:100px;padding-right: 0px;margin-bottom: 0px;z-index: 10') + input.btn.submitBtn#submitBtn(type='submit', style='width: 85% !important;display: block;margin: 0 auto;', value='提 交') + script. + var service_end = false; + // 调查问卷 + var dialogWrap = document.getElementById('dialogWrap'); + function popup(para) { + dialogWrap.style.display = para; + } + function chatScorllBottom(box) { + var imgdefereds = []; //定义一个操作数组 + $('#' + box + ' .ukefu-media-image').each(function () { //遍历所有图片,将图片 + var dfd = $.Deferred(); //定义一个将要完成某个操作的对象 + $(this).bind('load', function () { + dfd.resolve(); //图片加载完成后,表示操作成功 + }); + if (this.complete) { //如果图片加载状态为完成,那么也标识操作成功 + setTimeout(function () { + dfd.resolve(); + }, 1000); + } + imgdefereds.push(dfd); //将所有操作对象放入数组中 + }) + $.when.apply(null, imgdefereds).done(function () { //注册所有操作完成后的执行方法 + document.getElementById(box).scrollTop = document.getElementById(box).scrollHeight + }); + } + + chatScorllBottom("above"); + function selectOther(name, value) { + var otherTxt = document.getElementById('othertxt'); + if (name == "其他") { + otherTxt.style.display = "block" + } else { + otherTxt.style.display = "none"; + } + document.getElementById("comment_input").value = value; + } + + var R3Ajax = { + ajax: function (opt) { + var xhr = this.createXhrObject(); + xhr.onreadystatechange = function () { + if (xhr.readyState != 4) return; + (xhr.status === 200 ? + opt.success(xhr.responseText, xhr.responseXML) : + opt.error(xhr.responseText, xhr.status)); + } + xhr.open(opt.type, opt.url, true); + if (opt.type !== 'post') + opt.data = null; + else + xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); + opt.data = this.parseQuery(opt.data); + xhr.send(opt.data); + }, + post: function (url, success, data) { + var popt = { + url: url, + type: 'post', + data: data, + success: success, + error: function (data) { + } + } + this.ajax(popt); + }, + get: function (url, success) { + var gopt = { + url: url, + type: 'get', + success: success, + error: function () { + } + } + this.ajax(gopt); + }, + createXhrObject: function () { + var methods = [ + function () { + return new XMLHttpRequest(); + }, + function () { + return new ActiveXObject('Msxml2.XMLHTTP'); + }, + function () { + return new ActiveXObject('Microsoft.XMLHTTP'); + } + ]; + for (var i = 0; len = methods.length, i < len; i++) { + try { + methods[i](); + } catch (e) { + continue; + } + this.createXhrObject = methods[i]; + return methods[i](); + } + throw new Error('Could not create an XHR object.'); + }, + parseQuery: function (json) { + if (typeof json == 'object') { + var str = ''; + for (var i in json) { + str += "&" + i + "=" + encodeURIComponent(json[i]); + } + return str.length == 0 ? str : str.substring(1); + } else { + return json; + } + }, + audioplayer: function (id, file, loop) { + var audioplayer = document.getElementById(id); + if (audioplayer != null) { + document.body.removeChild(audioplayer); + } + + if (typeof (file) != 'undefined') { + if (navigator.userAgent.indexOf("MSIE") > 0) { // IE + var player = document.createElement('bgsound'); + player.id = id; + player.src = file['mp3']; + player.setAttribute('autostart', 'true'); + if (loop) { + player.setAttribute('loop', 'infinite'); + } + document.body.appendChild(player); + + } else { // Other FF Chome Safari Opera + var player = document.createElement('audio'); + player.id = id; + player.setAttribute('autoplay', 'autoplay'); + if (loop) { + player.setAttribute('loop', 'loop'); + } + document.body.appendChild(player); + + var mp3 = document.createElement('source'); + mp3.src = file['mp3']; + mp3.type = 'audio/mpeg'; + player.appendChild(mp3); + } + } + } + }; + + function submitForm(form) { + var satisComment = ""; + var otherVal = document.getElementById('othertxt').value; + var comInputVal = document.getElementById("comment_input").value; + if (otherVal.length > 0) { + satisComment = otherVal; + } else { + satisComment = comInputVal; + } + R3Ajax.post("/im/satis.html?orgi=#{orgi}", function () { + document.getElementById("dialogWrap").style.display = "none"; + alert("服务评价已提交"); + }, "id=" + form.id.value + "&satislevel=" + document.getElementById("satislevel_input").value + "&satiscomment=" + encodeURIComponent(satisComment)); + return false; + } + + // 参数连接 + // 参数连接 + var hostname = location.hostname; + var protocol = window.location.protocol.replace(/:/g, ''); + var username = encodeURIComponent("#{username}"); + var socket = io(protocol + '://' + hostname + ':#{port}/im/user?userid=#{userid}&orgi=#{orgi}&session=#{sessionid}&appid=#{appid}&osname=!{osname}&browser=!{browser}!{skill ? "&skill=" + skill : ""}!{username ? "&nickname='+username+'" : ""}!{agent ? "&agent=" + agent : ""}!{title ? "&title=" + title : ""}!{traceid ? "&url=" + url : ""}!{traceid ? "&traceid=" + traceid : ""}!{isInvite ? "&isInvite=" + isInvite : ""}', {transports: ['websocket', 'polling']}); + socket.on('connect', function () { + if ('#{contacts.name}') { + socket.emit('new', { + name: "#{contacts.name}", + phone: "#{contacts.phone}", + email: "#{contacts.email}", + memo: "#{contacts.memo}", + orgi: "#{inviteData.orgi}", + appid: "#{appid}" + }); + } + //service.sendRequestMessage(); + //output(''+ new Date().format("yyyy-MM-dd hh:mm:ss") + ' 开始沟通' +'' , 'message callOutConnect-message'); + }) + socket.on("agentstatus", function (data) { + document.getElementById('connect-message').innerHTML = data.message; + }) + socket.on("status", function (data) { + output('' + data.message + '', 'message connect-message'); + if (data.messageType == "end") { + service_end = true; + //editor.readonly(); + } else { + service_end = false; + } + if (document.getElementById("agentserviceid")) { + document.getElementById("agentserviceid").value = data.agentserviceid; + } + }) + socket.on('message', function (data) { + var chat = document.getElementsByClassName('chatting-left').innerText; + data.createtime = dayjs(data.createtime).format('YYYY-MM-DD HH:mm:ss'); + chat = data.message; + if (data.msgtype == "image") { + chat = ""; + } else if (data.msgtype == "file") { + chat = ""; + } else if (data.msgtype == "cooperation") { + chat = "您收到一个协作邀请,点击进入协作"; + } else if (data.msgtype == "action") { + //检查访客是否在协作页面上,如果在协作页面上,就开始执行重绘,否则不做处理 + drawCanvasImage(data.attachmentid); + } + if (data.calltype == "呼入") { + output('
                                    ' + chat + '
                                    ', "chat-block", data.msgtype); + } else if (data.calltype == "呼出") { + output('
                                    ' + chat + '
                                    ', "chat-block", data.msgtype); + } + }); + + socket.on('satisfaction', function () { + if ('#{sessionConfig.satisfaction}') + popup('block'); + }); + + socket.on('disconnect', function () { + output('连接坐席失败,在线咨询服务不可用', 'message connect-message'); + }); + function sendDisconnect() { + socket.disconnect(); + } + function acceptInvite(msgid, fileid) { + document.getElementById("cooperation").style.display = "block"; + document.getElementById("ukefu_img_ctx").src = "/res/image.html?id=" + fileid + "&cooperation=true&original=true"; + + $("#ukefu_img_ctx").load(function () { + var height = document.getElementById("ukefu-image-content").offsetHeight; + var width = document.getElementById("ukefu-image-content").offsetWidth; + var canvas = document.getElementById("canvas-borad"); + if (canvas.getContext) { + canvas.width = width; + canvas.height = height; + + drawCanvasImage(fileid); + } + + }); + } + function drawCanvasImage(fileid) { + var canvas = document.getElementById("canvas-borad"); + + if (canvas.getContext && document.getElementById("cooperation").style.display == "block") { + var ctx = canvas.getContext("2d"); + + //创建新的图片对象 + var img = new Image(); + //指定图片的URL + img.src = "/res/image.html?id=" + fileid + "&cooperation=true&original=true"; + //浏览器加载图片完毕后再绘制图片 + img.onload = function () { + ctx.clearRect(0, 0, canvas.width, canvas.height); + //以Canvas画布上的坐标(10,10)为起始点,绘制图像 + ctx.drawImage(img, 0, 0, canvas.width, canvas.height); + }; + } + } + function offCoop() { + document.getElementById("cooperation").style.display = "none"; + } + function sendMessage() { + var count = document.getElementById('message').value.length; + if (count > 0 && service_end == false) { + var message = $("#message").val(); + sendMessageText(message); + $("#message").val(""); + wordinx = 0; + } else if (service_end == true) { + alert("服务器已断开和您的对话"); + } + closeFaceDialog(0); + } + function sendMessageText(message) { + if (message != "") { + socket.emit('message', { + appid: "#{appid}", + userid: "#{userid}", + username: "#{username}", + channel: "webim", + type: "message", + contextid: "#{sessionid}", + orgi: "#{orgi}", + message: message + }); + } + } + function output(message, clazz, msgType) { + if (clazz == "message connect-message") { + var messages = document.getElementsByClassName("connect-message"); + for (inx = 0; inx < messages.length;) { + document.getElementById('above').removeChild(messages[inx]); + inx++; + } + } + var element = ("
                                    " + " " + message + "
                                    "); + document.getElementById('above').innerHTML = (document + .getElementById('above').innerHTML + element); + + if (msgType && msgType == "image") { + chatScorllBottom("above") + } else { + document.getElementById("above").scrollTop = document.getElementById("above").scrollHeight + } + //$("#welcome-message").html(document.getElementById('above').scrollHeight); + } + function update(id, message) { + document.getElementById(id).innerHTML = message; + } + autoTextarea(document.getElementById("message"));// 调用 + $('#message').click(function () { + wordinx = getPositionForTextArea(document.getElementById('message')); + closeFaceDialog(0); + }); + + var message = { + // text:data.message, + // picture:function(){ + + // } + // file:function(){ + + // } + // lang:function(){ + + // } + // goods:function(){ + + // } + // POI:function(){ + + // } + + } + diff --git a/contact-center/app/src/main/resources/templates/apps/im/point.pug b/contact-center/app/src/main/resources/templates/apps/im/point.pug new file mode 100644 index 00000000..2f94cd49 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/im/point.pug @@ -0,0 +1,504 @@ +- var baseUrl = (schema?schema:'http')+'://' + hostname + ':' + port + +- var style = 'text-align:center;height: 150px;border-radius: 30px;width: 40px;margin: 0px 5px 0 0; float:left ; word-wrap: break-word;overflow: hidden;font-size:15px;color:#FFFFFF;text-align: center;padding-top: 15px;border: 1px solid #DCDCDC;background-color:#008df3;'; +if inviteData.consult_vsitorbtn_model == "2" + - style = 'height: 70px;border-radius: 3px; width: 70px;margin: 40px auto;word-wrap:break-word;overflow:hidden;font-size: 22px;color:#FFFFFF;text-align:center;padding-top:10px;border: 1px solid #DCDCDC;background-color:#dddddd;' +else if inviteData.consult_vsitorbtn_model == "3" + - style = 'height: 70px;border-radius: 70px; width: 70px;margin: 40px auto;word-wrap:break-word;overflow:hidden;font-size: 22px;color:#FFFFFF;text-align:center;padding-top:5px;border: 1px solid #DCDCDC;background-color:#dddddd;' + +- var text = 'width:25px;' +if inviteData.consult_vsitorbtn_model == "2" + - text = 'width:100%;' +else if inviteData.consult_vsitorbtn_model == "3" + - text = 'width:100%;' + +- var theme = 'background-color: #377FED !important;border-color: #377FED !important;' +if inviteData.consult_vsitorbtn_color == "2" + - theme = 'background-color: #67CAFF !important;' +else if inviteData.consult_vsitorbtn_color == "3" + - theme = 'background-color: #8E8E8E !important;' +else if inviteData.consult_vsitorbtn_color == "4" + - theme = 'background-color: #32c24d !important;' +else if inviteData.consult_vsitorbtn_color == "5" + - theme = 'background-color: #E45DB3 !important;' +else if inviteData.consult_vsitorbtn_color == "6" + - theme = 'background-color: #FF626F !important;' + +- var position = "right:10px;top:40%;" +if inviteData.consult_vsitorbtn_position == "right,top" + - position = "right:10px;top:10px;" +else if inviteData.consult_vsitorbtn_position == "right,bottom" + - position = "right:10px;bottom:10px;" +else if inviteData.consult_vsitorbtn_position == "right,middle" + - position = "right:10px;top:40%;" +else if inviteData.consult_vsitorbtn_position == "left,top" + - position = "left:10px;top:10px;" +else if inviteData.consult_vsitorbtn_position == "left,middle" + - position = "left:10px;top:40%;" +else if inviteData.consult_vsitorbtn_position == "left,bottom" + -sition = "left:10px;bottom:10px;" + +- var invitetheme = 'background-color: #377FED !important;' +if inviteData.consult_invite_color == "2" + - invitetheme = 'background-color: #67CAFF !important;' +else if inviteData.consult_invite_color == "3" + - invitetheme = 'background-color: #8E8E8E !important;' +else if inviteData.consult_invite_color == "4" + - invitetheme = 'background-color: #32c24d !important;' +else if inviteData.consult_invite_color == "5" + - invitetheme = 'background-color: #E45DB3 !important;' +else if inviteData.consult_invite_color == "6" + - invitetheme = 'background-color: #FF626F !important;' + +#ukefu-point.ukefu-im-point(style='display:none;z-index:100000;font-family:14px \\5FAE\\8F6F\\96C5\\9ED1,Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif;position: fixed;' + position + (inviteData.skill == true && inviteData.consult_skill_fixed == false ? 'cursor:default;' : 'cursor: pointer;')) + #ukefu-point-theme.ukefu-theme-color.theme1(class="ukefu-point-theme" + (inviteData.consult_vsitorbtn_model ? inviteData.consult_vsitorbtn_model : '1'), style=style + theme) + #ukefu-im-point-text.ukefu-im-point-text(style='cursor: pointer;' + text + ';line-height: 23px;font-size: 15px;text-align: center;margin: 0 auto;') + i(style="width:24px;height:24px;display: inline-block;font: normal normal normal 14px/1 FontAwesome;font-size: inherit;text-rendering: auto;-webkit-font-smoothing: antialiased;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAB60lEQVRIS7WV4TVsQRCEqyJABkSACBABLwJE8IjAigARIAMieCsCREAGjwja+eb03TO7O9ddrPm1Z29PV3dXdY31y8eL5I+ILUmbktYz/lXSs+2nofu9ABFBsjNJB5JWJT3MJNuR9CbpTtK5bUDnThMgIkaZnKSXtkkydyIC8BNJgI1sn88GzQFExI2kXUlHtsdDI+B7RBDPvUfbf+o7UwCZnHnv2qb9hU9EMEYKAuS4uzgByHapYqtvnkNoyRvE030Zaw0AScz7cijRZ9+Tv33b2xOAlOGjpLWvjmYWLEf1X9I2Mi4dRMRRtgVZ5WTgtaRX26cVmUj3lMtVzEPdeUTARVFfB4AsIbYG4Pe/0qbdxXERSaL7UapnKiYLIW5MTG8HGYjG6aAQlqNE+1RXVBYRUzH5H0SzF5MO2NqXJXHQ5dpAjbWKQL2jrSWo6MA2+zQlU2bOKOBi0MRaRVRq3OtcYHaT2YFDSQR8CSSTQ/itbXgpp+VFgCDbi5Z59ej+L6RKuqqTNwEqvWMbK2li97XxpSXwPhRTlPSOq7Zc99MHJxeQdt+6HcklYhdICmfonWKaZwgAh8RC8HmSXUjCjtcXtZQhAKrHGqiQUTynpTRfr1YLQwBomcq7HekdxbdG9JOF65XpMpLWOT4AygTtGd0Q7EsAAAAASUVORK5CYII=);") + br + | #{inviteData.consult_vsitorbtn_content ? inviteData.consult_vsitorbtn_content : '在线客服'} + if inviteData.skill == true && inviteData.consult_skill_fixed == false + #ichatContent.ichat-content.ichat-float-left(style='width:152px;display: block;font-size:14px;' + theme + ';box-shadow: 0 0 10px #DDDDDD;border: 1px solid #DDDDDD;overflow: hidden;text-align: left;') + .ichat-title.ichat-cursor(style='color: #FFFFFF;font-weight:400;font-size: 14px;font-weight: 400;height: 28px;line-height: 28px;overflow: hidden;padding: 0 5px;background-repeat: repeat-x;') + img(src=baseUrl + '/images/logo-icon.png',style='height:20px;vertical-align: middle;') + | #{inviteData.consult_skill_title} + #ichatItem0.ichat-list(style='background: none repeat scroll 0 0 #FFFFFF;overflow-x: hidden;overflow-y: auto;padding: 5px 0;margin: 0;') + if pointAd + if pointAd.adtype == "image" + a(href=pointAd.url, title=pointAd.tiptext, target="_blank") + img(src=baseUrl + pointAd.imgurl, style='max-width:140px;max-height:90px;margin:0 5px;vertical-align: middle;') + else + div(style="padding:0px 5px 10px 5px;border-bottom:1px solid #dedede;") + a#point_ad_text(href=pointAd.url, title=pointAd.tiptext, target="_blank")= pointAd.content + else + img(src=baseUrl + '/images/title.jpg', style='width:140px;margin:0 5px;vertical-align: middle;') + div(style="padding:10px 5px;text-align:center;color:#555;")= inviteData.skill == true && inviteData.consult_skill_fixed == false && inviteData.consult_skill_msg ? inviteData.consult_skill_msg : '' + if skillGroups + for skill in skillGroups + - var skillNum = 0 + for agent in agentList + - skillNum = skillNum + 1 + | #{skillNum} + if inviteData.consult_skill_agent && inviteData.consult_skill_agent == true + ul(class="ichat-list-ul", style="border: 0 none;list-style: none outside none;margin: 0;padding: 0;width: 150px;") + if agentList + - var agentNum = 0 + for agent in agentList + if agent.organ && agent.organ == skill.id && agentNum < inviteData.consult_skill_maxagent + - agentNum = agentNum + 1 + li(style="height: 23px;list-style: none outside none;margin-left: 6px;overflow: hidden;padding: 2px;") + a(href=baseUrl + '/im/text/' + appid + '.html?skill=' + skill.id + '&agent=' + agent.id + '&orgi=' + orgi, onclick='return openAgentChatDialog(this.href)', style='color: #777; text-decoration: none;') + img(src=baseUrl + '/images/creater.png', style='vertical-align: middle;') + | #{agent.uname} + else if inviteData.onlyareaskill && inviteData.areaskilltipmsg + div(style="padding:10px 5px;text-align:center;color:#555;border-top:1px solid #dedede;")= inviteData.areaskilltipmsg + div(class="ichat-title ichat-cursor", style="color: #FFFFFF;font-weight:400;font-size: 14px;font-weight: 400;height: 28px;line-height: 28px;overflow: hidden;padding: 0 5px;background-repeat: repeat-x;text-align:right;")= inviteData.consult_skill_bottomtitle + +#ukefu-invite-dialog.ukefu-im-preview(style="z-index: 2147483648;display:none;height:177px;position: fixed;z-index:10000;border-radius: 2px;padding: 0px;overflow: hidden;margin: 0px;" + invitetheme) + #ukefu-cousult-invite-dialog.ukefu-im-preview-bar.ukefu-cousult-invite-dialog.ukefu-theme-color.theme1(style="padding:0px;height:100%;width:100%;background-size: cover;background:url(" + baseUrl + '/res/image.html?id=' + inviteData.consult_invite_bg + ') no-repeat') + a(href="javascript:void(0)", onclick="cskefu.refuseInvite();") + span(style="float: right;width: 20px;height: 20px;color: #ffffff;font-size: 20px;") × + #ukefu_consult_body.ukefu-consult-body(style='width:100%;height:100%;') + #ukefu-cousult-invite-content(class="ukefu-cousult-invite-content", style="color: #FFFFFF;width: 70%;height: 70px;line-height: 35px;font-size: 13pt;font-weight: 200;word-wrap: break-word;word-break: break-all;position: absolute;top: 30px;left: 25%;")= inviteData.consult_invite_content ? inviteData.consult_invite_content : '欢迎来到本网站,请问有什么可以帮您?' + .ukefu-cousult-invite-btn(style='position: absolute;bottom: 0px;right: 0px;margin: 0px 10px 10px 0px;') + button#invite-btn.theme1(style='border-color:#FFFFFF !important;color:#FFFFFF;display: inline-block;height: 38px;line-height: 38px;padding: 0 18px;background-color: #009688;color: #fff;white-space: nowrap;text-align: center;font-size: 14px;margin-right:10px;border: none;border-radius: 2px;cursor: pointer;opacity: .9;filter: alpha(opacity=90);border:1px solid #FFFFFF;' + invitetheme, onclick='cskefu.refuseInvite();')= inviteData.consult_invite_later ? inviteData.consult_invite_later : '稍后再说' + button(class="", style="display: inline-block;height: 38px;line-height: 38px;padding: 0 18px;background-color: #009688;color: #fff;white-space: nowrap;text-align: center;font-size: 14px;border: none;border-radius: 2px;cursor: pointer;opacity: .9;filter: alpha(opacity=90);background-color:#FFFFFF;color:#333333;", onclick="openInviteChatDialog();")= inviteData.consult_invite_accept ? inviteData.consult_invite_accept : '现在咨询' + +script(type='text/javascript') + include fingerprint.js + include qs.min.js + +script(type='text/javascript'). + var genUrl = function (subPath, query) { + return '!{baseUrl}/im/' + subPath + '?' + Qs.stringify(query); + }; + + var data = {}; + var cskefuOnlineUserId; + + function ajax(options) { + options = options || {}; + options.type = (options.type || "GET").toUpperCase(); + options.dataType = options.dataType || 'json'; + options.async = options.async || true; + var params = getParams(options.data); + var xhr; + if (window.XMLHttpRequest) { + xhr = new XMLHttpRequest(); + } else { + xhr = new ActiveXObject('Microsoft.XMLHTTP') + } + xhr.onreadystatechange = function () { + if (xhr.readyState == 4) { + var status = xhr.status; + if (status >= 200 && status < 300) { + options.success && options.success(xhr.responseText, xhr.responseXML); + } else { + options.fail && options.fail(status); + } + } + }; + if (options.type == 'GET') { + xhr.open("GET", options.url + '?' + params, options.async); + xhr.send(null) + } else if (options.type == 'POST') { + xhr.open('POST', options.url, options.async); + xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); + xhr.send(params); + } + } + + function getParams(data) { + var arr = []; + for (var param in data) { + arr.push(encodeURIComponent(param) + '=' + encodeURIComponent(data[param])); + } + arr.push(('randomNumber=' + Math.random()).replace('.')); + return arr.join('&'); + } + + var protocol = "#{schema}" + + document.cookie = "" + + var signal = 0; + function append(parent, text) { + if (typeof text === 'string') { + var temp = document.createElement('div'); + temp.innerHTML = text; + parent.appendChild(temp); + } else { + parent.appendChild(text); + } + } + function closerefresh() { + location.reload(); + } + + var appid = '#{appid}'; + var orgi = '#{orgi}'; + var client = '#{client}'; + + var cskefu = { + service: {agentno: null}, + time: new Date().getTime(), + in: genUrl(appid + '/userlist.html', { + appid: appid, + aiid: '#{aiid}', + orgi: orgi, + client: client, + }), + url: genUrl('online', { + appid: appid, + orgi: orgi, + client: client, + aiid: '#{aiid}', + }), + chat: genUrl('index.html', { + appid: appid, + orgi: orgi, + client: client, + aiid: '#{aiid}', + }), + refuse: genUrl('refuse.html', { + appid: appid, + orgi: orgi, + client: client, + aiid: '#{aiid}', + }), + config: function (d) { + data = d; + if (d.id != null && d.id != '') { + cskefuOnlineUserId = d.id; + } + }, + ajax: function (url, success, error) { + var xhr = false; + signal = signal + 1; + try { + xhr = new ActiveXObject("Msxml2.XMLHTTP"); // ie msxml3.0+(IE7.0及以上) + } catch (e) { + try { + xhr = new ActiveXObject("Microsoft.XMLHTTP"); //ie msxml2.6(IE5/6) + } catch (e2) { + xhr = false; + } + } + if (!xhr && typeof XMLHttpRequest != 'undefined') {// Firefox, Opera 8.0+, Safari + xhr = new XMLHttpRequest(); + } + xhr.onreadystatechange = function (data) { + if (xhr.readyState == 4) { + var status = xhr.status; + if (status >= 200 && status < 300) { + var event = xhr.responseText; + if (event && event.indexOf('invite') >= 0) { + var agentno = event.substring(event.lastIndexOf(":") + 1).trim(); + cskefu.service.agentno = agentno; + cskefu.writeinvite(); + } else if (event && event.indexOf('refuse') >= 0) { + cskefu.refuseInvite(); + } else if (event && event.indexOf('accept') >= 0) { + cskefu.acceptInvite(); + } + if (success) { + success(event); + } + } else { + // + if (error) { + error(); + } + } + xhr.abort(); + signal = signal - 1; + } + } + xhr.open("GET", url, true); + + try { + xhr.send(null); + } catch (e) { + } + }, + ping: function () { + var url = cskefu.url; + if (data) { + if (data.id) { + url = url + "&id=" + data.id; + } + if (data.name) { + url = url + "&name=" + encodeURIComponent(data.name); + } + if (data.email) { + url = url + "&email=" + encodeURIComponent(data.email); + } + if (data.phone) { + url = url + "&phone=" + encodeURIComponent(data.phone); + } + url = url + "&title=" + encodeURIComponent(document.title); + if ('traceid') { + url = url + "&traceid=#{traceid}" + } + + url = url + "&url=" + encodeURIComponent(location.href) + } + cskefu.ajax(url + "&userid=" + cskefuOnlineUserId + "&sessionid=#{sessionid}&sign=" + cskefuOnlineUserId + "&t=" + new Date().getTime(), function () { + cskefu.ping(); + }); + }, + writepoint: function () { + var ukefuInviteDialog = document.getElementById("ukefu-invite-dialog"); + if (#{phone == true}) { + ukefuInviteDialog.style.bottom = "0px" + ukefuInviteDialog.style.width = "100%" + } else { + var height = document.documentElement.clientHeight; + var width = document.documentElement.clientWidth; + var top = (50 - 92 * 100 / height) + "%"; + var left = (50 - 210 * 100 / width) + "%"; + + ukefuInviteDialog.style.top = top + ukefuInviteDialog.style.width = "420px" + ukefuInviteDialog.style.left = left + } + + if (#{inviteData.skill == true && inviteData.consult_skill_fixed == false}) { + document.getElementById("ukefu-im-point-text").onclick = function () { + if (document.getElementById("ichatContent").style.display == "none") { + document.getElementById("ichatContent").style.display = 'block'; + } else { + document.getElementById("ichatContent").style.display = 'none'; + } + } + } else { + document.getElementById("ukefu-point").onclick = function () { + cskefu.openChatDialog(); + } + } + var inviteDialog = document.getElementById('ukefu-invite-dialog'); + if (#{phone && mobile == true}) + inviteDialog.style.bottom = 0; + else { + var height = document.documentElement.clientHeight; + var width = document.documentElement.clientWidth; + var top = (50 - 92 * 100 / height) + "%"; + var left = (50 - 210 * 100 / width) + "%"; + + inviteDialog.style.top = top; + inviteDialog.style.left = left; + } + + if (#{!!inviteAd}) { + var inviteAdHtml = "!{inviteAd.adtype == "image" ? "" : ""}"; + + var inviteBody = document.getElementById('ukefu_consult_body'); + if (inviteBody) { + inviteBody.innerHTML = inviteAdHtml; + } + } + }, + openChatDialog: function () { + cskefu.openChatDialogWithURL(cskefu.chat); + }, + openChatDialogWithURL: function (url) { + url = url + "&userid=" + cskefuOnlineUserId + "&sessionid=#{sessionid}" + if (data) { + if (data.id) { + url = url + "&id=" + data.id; + } + if (data.name) { + url = url + "&name=" + encodeURIComponent(data.name); + } + if (data.email) { + url = url + "&email=" + encodeURIComponent(data.email); + } + if (data.phone) { + url = url + "&phone=" + encodeURIComponent(data.phone); + } + } + + if (#{inviteData.skill == true && inviteData.consult_skill_fixed == true}) + url = url + "&skill=#{inviteData.consult_skill_fixed_id}"; + + url = url + "&title=" + encodeURIComponent(document.title); + if (#{!!traceid}) + url = url + "&traceid=#{traceid}" + + url = url + "&url=" + encodeURIComponent(location.href); + try { + window.open(url + "&t=" + new Date().getTime(), "ukefu-chat", "height=600, width=850, top=" + (window.screen.availHeight - 30 - 600) / 2 + ", left=" + (window.screen.availWidth - 10 - 750) / 2 + ",toolbar=no, menubar=no, scrollbars=no, resizable=no, directories=no,location=no, status=no"); + } catch (e) { + } + return false; + }, + display: function () { + cskefu.writepoint(); + if (#{!(inviteData.consult_vsitorbtn_display) || (inviteData.consult_vsitorbtn_display && inviteData.consult_vsitorbtn_display == 0)}) { + + if (#{inviteData && inviteData.consult_vsitorbtn_model != '9' && inviteData.whitelist_mode == false}) { + document.getElementById("ukefu-point").style.display = "block"; + } + + if (#{inviteData.consult_invite_enable}) { + if (#{inviteData.consult_invite_delay && inviteData.consult_invite_delay == 0}) { + cskefu.writeinvite(); + } else { + setTimeout(function () { + cskefu.writeinvite(); + }, !{inviteData.consult_invite_delay}); + } + } else { + setTimeout(function () { + document.getElementById("ukefu-point").style.display = "block"; + if (#{inviteData.consult_invite_enable}) { + if (#{inviteData.consult_invite_delay && inviteData.consult_invite_delay == 0}) { + cskefu.writeinvite(); + } else { + setTimeout(function () { + cskefu.writeinvite(); + }, #{inviteData.consult_invite_delay}); + } + } + }, #{inviteData.consult_vsitorbtn_display}); //延时显示 访客入口 + } + } + }, + writeinvite: function () { + document.getElementById('ukefu-invite-dialog').style.display = "block"; + } + , + refuseInvite: function () { + document.getElementById('ukefu-invite-dialog').style.display = "none"; + cskefu.ajax(cskefu.refuse + "&userid=" + cskefuOnlineUserId + "&sessionid=#{sessionid}&t=" + new Date().getTime()); + } + , + acceptInvite: function () { + document.getElementById('ukefu-invite-dialog').style.display = "none"; + } + , + check: function () { + var checkTimes = 0; + setInterval(function () { + if (signal <= 0) { + checkTimes++; + } else { + checkTimes = 0; + } + if (checkTimes >= 3) { //检查当前的 Keep-Alive是否存活,检查3次都处于未存活状态,则启动 + // + signal = 0; + checkTimes = 0; + cskefu.ping(); + console.log("春松客服客户端信息校对"); + } + }, 5000); + } + + } + + // 邀请聊天 + function openInviteChatDialog() { + var url = cskefu.chat + "&agent=" + cskefu.service.agentno + "&isInvite=true"; + return cskefu.openChatDialogWithURL(url); + } + + // 技能组或坐席聊天 + function openAgentChatDialog(url) { + return cskefu.openChatDialogWithURL(url); + } + + if (#{webimexist == true}) { + Fingerprint2.get({ + extraComponents: [ + { + key: "cskefuAppId", + getData: function (done, options) { + done("#{appid}") + } + }, + { + key: "rndId", + getData(done, options) { + var rnd = ''; + if (localStorage) { + rnd = localStorage.finger; + if (!rnd) { + rnd = Math.random(); + localStorage.finger = rnd; + } + } + + done(rnd); + } + } + ] + }, function (components) { + var glue = components.map(function (component) { + return component.value + }) + cskefuOnlineUserId = Fingerprint2.x64hash128(glue.join(''), 31); + cskefu.ajax(cskefu.in + "&userid=" + cskefuOnlineUserId + "&t=" + new Date().getTime(), function (data) { + if (data == "in") { + } else { + cskefu.display(); + cskefu.ping(); + cskefu.check(); + } + }); + }); + } + + + + + + + + + + + + + + + diff --git a/contact-center/app/src/main/resources/templates/apps/im/qs.min.js b/contact-center/app/src/main/resources/templates/apps/im/qs.min.js new file mode 100644 index 00000000..f08e6914 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/im/qs.min.js @@ -0,0 +1 @@ +!function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Qs=e()}(function(){return function i(a,l,c){function s(t,e){if(!l[t]){if(!a[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(f)return f(t,!0);var o=new Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o}var n=l[t]={exports:{}};a[t][0].call(n.exports,function(e){return s(a[t][1][e]||e)},n,n.exports,i,a,l,c)}return l[t].exports}for(var f="function"==typeof require&&require,e=0;e>6]+s[128|63&a]:a<55296||57344<=a?n+=s[224|a>>12]+s[128|a>>6&63]+s[128|63&a]:(i+=1,a=65536+((1023&a)<<10|1023&o.charCodeAt(i)),n+=s[240|a>>18]+s[128|a>>12&63]+s[128|a>>6&63]+s[128|63&a])}return n},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(f(e)){for(var r=[],o=0;o - var data ; - var config = {} ; - <#if inviteData??> - !function(e,t,n){"use strict";"undefined"!=typeof window&&"function"==typeof define&&define.amd?define(n):"undefined"!=typeof module&&module.exports?module.exports=n():t.exports?t.exports=n():t.Fingerprint2=n()}(0,this,function(){"use strict";function d(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]+t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]+t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]+t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]+t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}function g(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]*t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]*t[3],n[1]+=n[2]>>>16,n[2]&=65535,n[2]+=e[3]*t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]*t[3],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[2]*t[2],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[3]*t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}function f(e,t){return 32===(t%=64)?[e[1],e[0]]:t<32?[e[0]<>>32-t,e[1]<>>32-t]:(t-=32,[e[1]<>>32-t,e[0]<>>32-t])}function h(e,t){return 0===(t%=64)?e:t<32?[e[0]<>>32-t,e[1]<>>1]),e=g(e,[4283543511,3981806797]),e=m(e,[0,e[0]>>>1]),e=g(e,[3301882366,444984403]),e=m(e,[0,e[0]>>>1])}function l(e,t){t=t||0;for(var n=(e=e||"").length%16,a=e.length-n,r=[0,t],i=[0,t],o=[0,0],l=[0,0],s=[2277735313,289559509],c=[1291169091,658871167],u=0;u>>0).toString(16)).slice(-8)+("00000000"+(r[1]>>>0).toString(16)).slice(-8)+("00000000"+(i[0]>>>0).toString(16)).slice(-8)+("00000000"+(i[1]>>>0).toString(16)).slice(-8)}function c(e,t){if(Array.prototype.forEach&&e.forEach===Array.prototype.forEach)e.forEach(t);else if(e.length===+e.length)for(var n=0,a=e.length;nt.name?1:e.name=n.components.length)a(r.data);else{var t=n.components[i];if(n.excludes[t.key])o(!1);else{if(!e&&t.pauseBefore)return i-=1,void setTimeout(function(){o(!0)},1);try{t.getData(function(e){r.addPreprocessedComponent(t.key,e),o(!1)},n)}catch(e){r.addPreprocessedComponent(t.key,String(e)),o(!1)}}}};o(!1)},a.getPromise=function(n){return new Promise(function(e,t){a.get(n,e)})},a.getV18=function(i,o){return null==o&&(o=i,i={}),a.get(i,function(e){for(var t=[],n=0;n&id=${id}<#if aiid??>&aiid=${aiid}<#if exchange??>&exchange=${exchange}<#if name??>&name=${name}<#if email??>&email=${email}<#if phone??>&phone=${phone}&orgi=${orgi!''}&client=${client}&type=text<#if skill??>&skill=${skill}<#if agent??>&agent=${agent}" , - config : function(d){ - data = d ; - if(d.id != null && d.id != ''){ - cskefuOnlineUserId = d.id ; - } - }, - openChatDialog:function(){ - var url = ukefu.chat ; - if(data){ - if(data.id){ - url = url + "&id="+data.id ; - } - if(data.name){ - url = url + "&name="+encodeURIComponent(data.name); - } - if(data.email){ - url = url + "&email="+encodeURIComponent(data.email); - } - if(data.phone){ - url = url + "&phone="+encodeURIComponent(data.phone); - } - } - window.location.replace(url+"&t="+new Date().getTime()); - } - } - Fingerprint2.get({extraComponents: [<#if channelVisitorSeparate?? && channelVisitorSeparate == true>{key: "cskefuAppId", getData: function(done, options){done("${appid!''}")}}, - { - key: "rndId", - getData(done, options){ - var rnd = ''; - if(localStorage){ - rnd = localStorage.finger; - if(!rnd){ - rnd = Math.random(); - localStorage.finger = rnd; - } - } - - done(rnd); - } - } - ]}, function(components){ - var glue = components.map(function (component) { return component.value }) - cskefuOnlineUserId = Fingerprint2.x64hash128(glue.join(''), 31) - ukefu.chat = ukefu.chat + "<#if userid??>&userid=${userid}<#else>&userid="+cskefuOnlineUserId+"&sessionid=${sessionid!''}<#if ai??>&ai=${ai}<#if title??>&title=${title?url}<#if traceid??>&url=${url?url}<#if traceid??>&traceid=${traceid}"; - ukefu.openChatDialog(); - }); - - diff --git a/contact-center/app/src/main/resources/templates/apps/im/text.pug b/contact-center/app/src/main/resources/templates/apps/im/text.pug new file mode 100644 index 00000000..0cca88cf --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/im/text.pug @@ -0,0 +1,65 @@ +script(language='javascript'). + var data ; + var config = {} ; + +if inviteData + script(language='javascript') + include fingerprint.js + + script(language='javascript'). + var cskefuOnlineUserId; + var ukefu = { + time: new Date().getTime(), + chat: "/im/index.html?appid=#{appid}!{id?'&id='+id:''}!{aiid?'&aiid='+aiid:''}!{exchange?'&exchange='+exchange:''}!{name?'&name='+name:''}!{email?'&email='+email:''}!{phone?'&phone='+phone:''}&orgi=#{orgi}&client=#{client}&type=text!{skill?'&skill='+skill:''}!{agent?'&agent='+agent:''}", + config: function (d) { + data = d; + if (d.id != null && d.id != '') { + cskefuOnlineUserId = d.id; + } + }, + openChatDialog: function () { + var url = ukefu.chat; + if (data) { + if (data.id) { + url = url + "&id=" + data.id; + } + if (data.name) { + url = url + "&name=" + encodeURIComponent(data.name); + } + if (data.email) { + url = url + "&email=" + encodeURIComponent(data.email); + } + if (data.phone) { + url = url + "&phone=" + encodeURIComponent(data.phone); + } + } + window.location.replace(url + "&t=" + new Date().getTime()); + } + } + Fingerprint2.get({extraComponents: [!{ channelVisitorSeparate == true?'{key: "cskefuAppId", getData: function(done, options){done("'+appid+'")}},':''} + { + key: "rndId", + getData(done, options) + { + var rnd = ''; + if (localStorage) { + rnd = localStorage.finger; + if (!rnd) { + rnd = Math.random(); + localStorage.finger = rnd; + } + } + + done(rnd); + } + } + ]}, function (components) { + var glue = components.map(function (component) { + return component.value + }) + cskefuOnlineUserId = Fingerprint2.x64hash128(glue.join(''), 31) + var userid = '#{userid}'; + ukefu.chat = ukefu.chat + "&userid="+ (userid || cskefuOnlineUserId) + "&sessionid=#{sessionid}!{ai?'&ai='+ai:''}!{title?'&title='+title:''}!{traceid?'&url='+url:''}!{traceid?'&traceid='+traceid:''}"; + ukefu.openChatDialog(); + }); + \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/im/upload.html b/contact-center/app/src/main/resources/templates/apps/im/upload.html deleted file mode 100644 index fe520539..00000000 --- a/contact-center/app/src/main/resources/templates/apps/im/upload.html +++ /dev/null @@ -1,8 +0,0 @@ -{ - "error" : ${upload.error!'1'} - <#if upload?? && upload.error?? && upload.error == '0'> - ,"url":"${upload.url!''}" - <#else> - ,"message":"${upload.message!''}" - -} \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/include/layout.pug b/contact-center/app/src/main/resources/templates/apps/include/layout.pug new file mode 100644 index 00000000..19d005e9 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/include/layout.pug @@ -0,0 +1,51 @@ +doctype html +html(xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3") + head + block head + meta(charset="utf-8") + meta(http-equiv="X-UA-Compatible" content="IE=edge") + meta(http-equiv="Cache-Control" content="no-siteapp") + meta(name="viewport" content="width=device-width, maximum-scale=1.0, initial-scale=1.0,initial-scale=1.0,user-scalable=no") + meta(name="apple-mobile-web-app-capable" content="yes") + title 春松客服-全渠道智能客服 + link(rel="shortcut icon" type="image/x-icon" href="/images/favicon.ico?t=1487250759056") + link(rel="stylesheet" href="/js/select/css/select2.min.css") + link(rel="stylesheet" type="text/css" href="/js/kindeditor/themes/default/default.css") + link(rel="stylesheet" href="/css/flexboxgrid.min.css") + link(rel="stylesheet" href="/css/layui.css") + link(rel="stylesheet" href="/res/css.html") + link(rel="stylesheet" href="/css/flexboxgrid.min.css") + script(src="/js/jquery-1.10.2.min.js") + script(src="/js/jquery.form.js") + script(src="/js/jquery.hotkeys.min.js") + script(src="/js/jquery.cookie.min.js") + script(src="/js/select/js/select2.min.js") + script(src="/js/select/js/i18n/zh-CN.js") + script(src="/layui.js") + script(src="/js/cskefu.js") + script(type="text/javascript" src="/js/kindeditor/kindeditor.js") + script(type="text/javascript" src="/js/kindeditor/lang/zh-CN.js") + script(type="text/javascript" src="/js/kindeditor-suggest.js") + link(rel="stylesheet" type="text/css" href="/css/kindeditor-suggest.css") + script(src="/js/template.js") + script(src="/js/data-set.min.js") + if infoacq + script(src="/js/UKeFu-InfoAcq.js") + if systemConfig && systemConfig.callcenter && systemConfig.callout + script(src="/js/UKeFu-CallOut.js") + script(src="/js/weixinAudio.js") + if systemConfig && systemConfig.mapkey && systemConfig.mapkey != '' + script(src="http://api.map.baidu.com/api?v=2.0&ak=" + systemConfig.mapkey) + script(src="/js/echarts.common.min.js") + script(language="javascript" src="/js/theme/wonderland.js") + + body + .layui-layout.layui-layout-content + block content + script. + layui.use('element', function () { + var element = layui.element(); //导航的hover效果、二级菜单等功能,需要依赖element模块 + //监听导航点击 + element.on('nav(layui)', function (elem) { + }); + }); diff --git a/contact-center/app/src/main/resources/templates/apps/index.html b/contact-center/app/src/main/resources/templates/apps/index.html deleted file mode 100644 index 0eddf6e6..00000000 --- a/contact-center/app/src/main/resources/templates/apps/index.html +++ /dev/null @@ -1,512 +0,0 @@ - - - - - - - - -<#if systemConfig?? && systemConfig.title?? && systemConfig.title != ''>${systemConfig.title}<#else>春松客服-全渠道智能客服</#if> - - - - - - - - - - - - - - - - - - - - - - - - - - -<#if models?seq_contains("callout")> - - - -<#if models?seq_contains("callcenter")> - - - - - - - -<#if systemConfig?? && systemConfig.mapkey?? && systemConfig.mapkey!=''> - - - -<#if infoacq?? && infoacq == "true"> - - -<#if systemConfig?? && systemConfig.callcenter && systemConfig.callout> - - - - - - - - - - - - - -
                                    -
                                    -
                                    - - -
                                    -
                                    -
                                    -
                                    -
                                      - -
                                    • -
                                      - -
                                      - - - -
                                      - <#if user?? && user.agent == true> - <#if user?? && (user.roleAuthMap["A01"]?? || user.admin) > -
                                      - - -
                                      - - - - <#if models?seq_contains("contacts")> - <#if user?? && (user.roleAuthMap["A02"]?? || user.admin)> -
                                      - - - -
                                      - - <#if user?? && (user.roleAuthMap["A03"]?? || user.admin)> -
                                      - - - -
                                      - - - - <#if models?seq_contains("workorders")> - <#if user?? && (user.roleAuthMap["A04"]?? || user.admin)> -
                                      - - - -
                                      - - - - - - <#if models?seq_contains("cca")> - <#if user?? && (user.roleAuthMap["A13_A01"]?? || user.admin) > -
                                      - - - -
                                      - - - - <#if models?seq_contains("xiaoe")> - <#if user?? && (user.roleAuthMap["A09_A02_A01"]?? || user.admin) > - - - - - - - <#if currentOrgan?? && user?? &&( user.roleAuthMap["A06"]?? || user.admin)> -
                                      - - -
                                      - - - <#if currentOrgan?? && user?? &&( user.roleAuthMap["A08"]?? || user.admin) > -
                                      - - -
                                      - - - - - - - - - - - - - - - - <#if models?seq_contains("sample")> -
                                      - - - -
                                      - - - - - - - - - - -
                                      -
                                    • - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - <#if user?? && user.agent == true> - <#include "/public/agentstatus.html"/> - -
                                    - <#if models?seq_contains("callcenter")> -
                                    - <#include "/admin/channel/callcenter/softphone.html"> -
                                    - -
                                    -
                                      -
                                    • 首页
                                    • -
                                    - -
                                    -
                                    - -
                                    -
                                    -
                                    - -
                                    -
                                    - - - - - diff --git a/contact-center/app/src/main/resources/templates/apps/index.pug b/contact-center/app/src/main/resources/templates/apps/index.pug new file mode 100644 index 00000000..b02e05c9 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/index.pug @@ -0,0 +1,352 @@ +doctype html +html(xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3") + head + meta(charset="utf-8") + meta(http-equiv="X-UA-Compatible" content="IE=edge,chrome=1") + meta(http-equiv="Cache-Control" content="no-siteapp") + meta(name="viewport" content="width=device-width, maximum-scale=1.0, initial-scale=1.0,initial-scale=1.0,user-scalable=no") + meta(name="apple-mobile-web-app-capable" content="yes") + title= systemConfig.title ? systemConfig.title : '春松客服 | 全渠道智能客服_联络中心' + if systemConfig && systemConfig.favlogo + link(rel="shortcut icon" type="image/x-icon" href='/res/image.html?id=' + systemConfig.favlogo) + else + link(rel="shortcut icon" type="image/x-icon" href='/images/favicon.ico') + link(rel="stylesheet" href="/css/flexboxgrid.min.css") + link(rel="stylesheet" type="text/css" href="/css/darktooltip.css") + link(rel="stylesheet" href="css/layui.css") + link(rel="stylesheet" href="/js/ztree/zTreeStyle/zTreeStyle.css") + link(rel="stylesheet" href="/js/select/css/select2.min.css") + link(rel="stylesheet" href="/res/css.html") + link(rel="stylesheet" type="text/css" href="/js/kindeditor/themes/default/default.css") + script(src="/js/jquery-1.10.2.min.js") + script(src="/js/jquery.form.js") + script(src="/js/select/js/select2.min.js") + script(src="/js/moment.min.js") + script(src="/js/moment-timezone.js") + script(src="/js/moment-timezone-with-data.js") + script(src="/layui.js") + //- #894 和原生Map行为不一致 + //- + script(src="/js/cskefu.js") + script(src="/im/js/socket.io.js") + script(src="/js/CSKeFu_IM.v1.js") + script(src="/js/CSKeFu_Rest_Request.v1.js") + script(src="/js/CSKeFu_Agent_State.v1.js") + script(src="/js/CSKeFu_Admin.v1.js") + script(src="/js/ace/ace.js" type="text/javascript" charset="utf-8") + script(src="/js/ace/theme-chrome.js" type="text/javascript" charset="utf-8") + script(src="/js/weixinAudio.js") + if systemConfig.mapkey + script(type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=" + systemConfig.mapkey) + style. + .ztree li span { + display: inline-block !important; + white-space: pre-wrap; + width: 90px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + script(src="/js/ztree/jquery.ztree.all.min.js") + script(type="text/javascript" src="/js/kindeditor/kindeditor.js") + script(type="text/javascript" src="/js/kindeditor/lang/zh-CN.js") + script(type="text/javascript" src="/js/jquery.darktooltip.js") + script(language="javascript"). + var hostname = "#{hostname}", adminuser = "#{user.admin ? true : false}", + schema = "#{schema || 'http'}", port = "#{webimport}", userid = "#{user.id}", + session = "#{sessionid}", orgi = "#{orgi}"; + var layinx, layerhelper; + var isImIndex = false; + $(document).ready(function () { + layui.use('layer', function () { + layerhelper = layer; + var msg = '#{msg}'; + if (msg == "security") + layer.msg('您访问的资源需要安全验证,请确认您有系统管理员权限!', {icon: 2, time: 3000}) + else if (msg == 't0') + layer.msg('当前坐席就绪或对话未结束,不能切换#{systemConfig.namealias}', {icon: 2, time: 3000}) + else if (msg == 't1') + layer.msg('当前用户坐席就绪或对话未结束,不能切换为非坐席', {icon: 2, time: 3000}) + + if ('#{models.contains("entim")}') { + var imDialogHelper = { + open: function () { + layinx = layer.open({ + type: 2, + title: false, + closeBtn: 0, //不显示关闭按钮 + shade: [0], + area: ["120px", "50px"], + offset: "rb", //右下角弹出 + anim: 2, + shade: 0, + content: "/ent/im/point.html", + end: function () { + if (isImIndex == true) { + layinx = layer.open({ + type: 2, + title: false, + closeBtn: 0, //不显示关闭按钮 + shade: [0], + area: ["30px", "50px"], + offset: "rb", //右下角弹出 + anim: 2, + shade: 0, + content: "/ent/im/expand.html", + end: function () { //此处用于演示 + imDialogHelper.open(); + isImIndex = false; + } + }) + isImIndex = false; + } else { + layinx = layer.open({ + type: 2, + title: false, + closeBtn: 0, //不显示关闭按钮 + shade: [0], + area: ["260px", "520px"], + offset: "rb", //右下角弹出 + anim: 2, + shade: 0, + content: ["/ent/im/index.html", "no"], //iframe的url,no代表不显示滚动条 + end: function () { //此处用于演示 + imDialogHelper.open(); + } + }); + } + } + }); + } + } + imDialogHelper.open(); + } + }); + $(".ukefu-left-menu").darkTooltip({ + gravity: "west" + }); + }); + function closeentim() { + if (layerhelper) { + layerhelper.close(layinx); + } + } + if ('#{tongjiBaiduSiteKey}') { + var _hmt = _hmt || []; + (function () { + var hm = document.createElement("script"); + hm.src = "https://hm.baidu.com/hm.js?#{tongjiBaiduSiteKey}"; + var s = document.getElementsByTagName("script")[0]; + s.parentNode.insertBefore(hm, s); + })(); + } + body(οnunlοad="CloseOpen(event)") + .layui-layout.layui-layout-admin + .layui-header.header.header-ukefu + .layui-main + a.logo(href="/") + if systemConfig && systemConfig.consolelogo + img(src='/res/image.html?id=' + systemConfig.consolelogo) + else + img(src='images/logo.png') + ul.layui-nav + li.layui-nav-item.layui-this + a.iframe_btn(href="javascript:void(0)" onclick="return false;" data-title="首页" data-href="/apps/content.html" data-id="maincontent" data-type="tabChange") + i.kfont(style="position: relative;")  + | 首页 + li.layui-nav-item(style="position: relative;") + #ukefu-last-msg.ukefu-last-msg(data-num="0") + small#msgnum.ukefu-msg-tip.bg-red 0 + a#agentdesktop.iframe_btn(href="javascript:void(0)" onclick="return false;" data-title="坐席工作台" data-href="/agent/index.html" data-id="multiMediaDialogWin" data-type="tabAdd") + i.kfont.icon-iconfontagent(style="position: relative;") + | 坐席 + li.layui-nav-item + a.iframe_btn(href="javascript:void(0)" onclick="return false;" data-title="系统管理" data-href="/admin/content.html" data-id="admin" data-type="tabAdd") + i.layui-icon(style="position: relative;")  + | 系统 + if organList && currentOrgan + li.layui-nav-item + a(href="javascript:void(0)") + i.csfont(style="position: relative;float:left;")  + span(style="display: inline-block;max-width: 90px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;float: left")= currentOrgan.name + dl.layui-nav-child + dd + div(style=" background: white;") + ul#homeOrganTree.ztree(style="width: 240px;max-height: 800px;overflow-y: auto;") + li.layui-nav-item + a(href="javascript:void(0)") + i.layui-icon(style="position: relative;float:left;")  + span(style="display: inline-block;max-width: 90px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;float: left")= user.uname + dl.layui-nav-child + dd + a(href="/apps/profile.html" data-toggle="ajax" data-width="750" data-title="修改资料") 个人资料 + dd + a(href="javascript:void(0)" onclick="showSystemBuildInfo()") 关于产品 + dd + a(href="javascript:void(0)" onclick="quitSystem()") 退出系统 + .layui-side.layui-bg-black + .layui-side-scroll + ul.layui-nav.layui-nav-tree.site-ukefu-nav + li.layui-nav-item.layui-nav-itemed + dl.layui-nav-child + dd.ukefu-left-menu + a.iframe_btn(href="javascript:void(0)" onclick="return false;" data-title="首页" data-href="/apps/content.html" data-id="maincontent" data-type="tabChange") + i.kfont(style="top: 1px;")  + if user && user.agent == true + if user && (user.roleAuthMap["A01"] || user.admin) + dd.ukefu-left-menu(data-tooltip="坐席工作台") + a#agentdeskleft.iframe_btn(href="javascript:void(0)" onclick="return false;" data-title="坐席对话" data-href="/agent/index.html" data-id="multiMediaDialogWin" data-type="tabAdd") + i.layui-icon(style="top: 3px;")  + if models.contains("contacts") + if user && (user.roleAuthMap["A02"] || user.admin) + dd.ukefu-left-menu(data-tooltip="全部联系人") + a.iframe_btn(href="javascript:void(0)" data-title="全部联系人" onclick="return false;" data-href="/apps/contacts/index.html" data-id="contactsMainContentWin" data-type="tabAdd") + i.layui-icon(style="position: relative;")  + if user && (user.roleAuthMap["A03"] || user.admin) + dd.ukefu-left-menu(data-tooltip="全部客户") + a.iframe_btn(href="javascript:void(0)" data-title="全部客户" onclick="return false;" data-href="/apps/customer/index.html" data-id="customersMainContentWin" data-type="tabAdd") + i.kfont(style="position: relative;")  + if models.contains("workorders") + if user && (user.roleAuthMap["A04"] || user.admin) + dd.ukefu-left-menu(data-tooltip="工单管理") + a.iframe_btn(href="javascript:void(0)" data-title="工单管理" data-href="<#if systemConfig?? && systemConfig.workorders>/apps/workordersthree/index.html<#else>/apps/workorders/index.html" data-id="maincontent" data-type="tabChange") + i.kfont(style="position: relative;")  + if models.contains("cca") + if user && (user.roleAuthMap["A13_A01"] || user.admin) + dd.ukefu-left-menu(data-tooltip="会话监控") + a#customerchatsaudit.iframe_btn(href="javascript:void(0)" onclick="return false;" data-title="会话监控" data-href="/apps/cca/index.html" data-id="customerChatAudit" data-type="tabAdd") + i.csfont(style="position: relative;")  + if currentOrgan && user && (user.roleAuthMap["A06"] || user.admin) + dd.ukefu-left-menu(data-tooltip="客服设置") + a.iframe_btn(href="javascript:void(0)" data-title="客服设置" data-href="/setting/agent/index.html" data-id="maincontent" data-type="tabChange") + i.layui-icon(style="position: relative;")  + if currentOrgan && user && (user.roleAuthMap["A08"] || user.admin) + dd.ukefu-left-menu(data-tooltip="会话历史") + a.iframe_btn(href="javascript:void(0)" data-title="会话历史" data-href="/service/history/index.html" data-id="maincontent" data-type="tabChange") + i.kfont(style="position: relative;")  + if models.contains("messenger") && currentOrgan && user && (user.roleAuthMap["A08"] || user.admin) + dd.ukefu-left-menu(data-tooltip="营销中心") + a.iframe_btn(href="javascript:void(0)" data-title="营销中心" data-href="/apps/messenger/otn/index.html" data-id="maincontent" data-type="tabChange") + i.csfont(style="position: relative;")  + + .layui-body + .layui-tab.product-tab(lay-filter="ukefutab" lay-allowclose="true") + div(style="padding-bottom: 5px") + .ukefu-switch(style="position:relative;margin-left: 10px") + if user && user.agent == true + include /public/agentstatus + //- TODU 呼叫中心代码引入 + //- if models.contain("callcenter") + //- div(style="float: right") + //- include /admin/channel/callcenter/softphone + ul.layui-tab-title + li.layui-this.ukefu-home(lay-id="maincontent") + i.kfont(style="position: relative;")  + | 首页 + .layui-tab-content.product-content.ukefu-tab + .layui-tab-item.layui-show(style="height:100%;") + if vt + iframe#maincontent(frameborder="0" src='/apps/tenant/index.html' name="maincontent" width="100%" height="100%") + else + iframe#maincontent(frameborder="0" src='/apps/content.html' name="maincontent" width="100%" height="100%") + script. + var setting = { + data: { + simpleData: { + enable: true + } + }, + callback: { + onClick: onClick + } + }; + function onClick(e, treeId, treeNode) { + if (treeNode.topic) { + $.post('/setorgan', {organ: treeNode.id}).success(function () { + location.href = '/'; + }) + } else if (treeNode.id == "0") { + // location.href = "/admin/organ/index.html"; + } else if (treeNode.area) { + // $('#areaadd').attr("href", "/admin/organ/add.html?area=" + treeNode.id); + } + } + var zNodes = !{pugHelper.toJSON(organList)}; + $.each(zNodes, function (i, o) { + o.pId = o.parent; + o.open = true; + o.topic = true; + o.icon = "/images/dept.png" + }) + + $(document).ready(function () { + var ztree = $.fn.zTree.init($("#homeOrganTree"), setting, zNodes); + if ('#{organData}') { + var node = ztree.getNodeByParam('id', '#{organData.id}');//获取id为1的点 + ztree.selectNode(node);//选择点 + } + }); + // 展示系统构建信息 + function showSystemBuildInfo() { + layer.confirm('

                                    春松客服®

                                    Release: #{appVersionNumber} 文档中心
                                    Build: #{appBuildDate}.#{appVersionAbbrev}
                                    Copyright (2018-2020) 北京华夏春松科技有限公司
                                    Business License applied to #{appCustomerEntity}
                                    购买春松客服企业版或服务', + {icon: -1, title: '关于产品', btn: ["关闭"]}, function (index, layero) { + //do something + layer.close(index); + }); + } + + // 登出系统 + // https://gitlab.chatopera.com/chatopera/cosinee.w4l/issues/291 + function quitSystem() { + // 当坐席从就绪状态,切换到非就绪状态前,请求接口查看当前坐席服务到客户数。 + checkAgentStatusData().then(handleAgentStatusData) + .then(function (data) { + if (data.length == 0) { + // 执行登出 + window.location.href = "/logout.html"; + } else { + // 弹出对话框提示 + layer.alert("您有正在服务中的访客" + data.length + "人!结束全部会话,或转接后可登出。", {title: "提示", icon: 2}); + } + }, function (error) { + // 执行登出 + window.location.href = "/logout.html"; + }); + } + // 获取时间差 + var timeDifference = #{timeDifference}; + var skills = '#{skills}'.split(','); + layui.use('element', function () { + var $ = layui.jquery, element = layui.element(); //Tab的切换功能,切换事件监听等,需要依赖element模块 + //触发事件 + $(".layui-tab").on("click", function (e) { + if ($(e.target).is(".layui-tab-close")) { + var win = $(e.target).parent().attr("lay-id"); + if (win == "outboundCallConsole" && uKeFuSoftPhone) { + uKeFuSoftPhone.cancleoutbound(); + } + } + }) + $('.iframe_btn').on('click', function () { + var type = $(this).data('type'); + if (type == "tabAdd") { + active.tabAdd($(this).data('href'), $(this).data('title'), $(this).data('id')); + } else if (type == "tabChange") { + active.tabChange($(this).data('href'), $(this).data('title'), $(this).data('id')); + } + }); + }); + console.log("新的转机和闪闪星斗/正在缀满没有遮拦的天空\\n春松客服,开源的智能客服系统 https://github.com/chatopera/cosin") + if webrtc + script. + // 呼叫中心连接信息 + top.CSKEFU_WEBRTC = { + "ip": "#{webrtc.callCenterWebrtcIP}", + "port": "#{webrtc.callCenterWebRtcPort}", + "extension": "#{webrtc.callCenterExtensionNum}", + "password": "#{webrtc.callCenterExtensionPassword}", + "error": "#{webrtc.callCenterError}" + } + // TODO 打印前端中WebRTC链接信息,调试结束后删除打印日志 + // https://gitlab.chatopera.com/chatopera/cosinee/issues/926 + console.log("top.CSKEFU_WEBRTC", top.CSKEFU_WEBRTC); diff --git a/contact-center/app/src/main/resources/templates/apps/marketing/left.pug b/contact-center/app/src/main/resources/templates/apps/marketing/left.pug new file mode 100644 index 00000000..a8344851 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/marketing/left.pug @@ -0,0 +1,7 @@ +ul.layui-nav.layui-nav-tree(lay-filter='demo') + li.layui-nav-item.layui-nav-itemed + a.layui-nav-title(href='javascript:;') 营销中心 + dl.layui-nav-child + if user.roleAuthMap["B02_B01"] || user.superadmin + dd(class='layui-this') + a(href='/apps/messenger/otn/index.html') Messenger OTN diff --git a/contact-center/app/src/main/resources/templates/apps/message/ping.html b/contact-center/app/src/main/resources/templates/apps/message/ping.html deleted file mode 100644 index 5ebac394..00000000 --- a/contact-center/app/src/main/resources/templates/apps/message/ping.html +++ /dev/null @@ -1 +0,0 @@ -24242 \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/message/ping.pug b/contact-center/app/src/main/resources/templates/apps/message/ping.pug new file mode 100644 index 00000000..4cb65ea4 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/message/ping.pug @@ -0,0 +1 @@ +| 24242 \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/quality/include/left.html b/contact-center/app/src/main/resources/templates/apps/quality/include/left.html deleted file mode 100644 index 0aa9e3a3..00000000 --- a/contact-center/app/src/main/resources/templates/apps/quality/include/left.html +++ /dev/null @@ -1,22 +0,0 @@ - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/quality/index.html b/contact-center/app/src/main/resources/templates/apps/quality/index.html deleted file mode 100644 index b72a0151..00000000 --- a/contact-center/app/src/main/resources/templates/apps/quality/index.html +++ /dev/null @@ -1,406 +0,0 @@ -<#include "/public/macro.html"> -
                                    -
                                    - <#include "/apps/quality/include/left.html"> -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    - 对话质检设置 -

                                    -
                                    - <#if sessionConfig??> - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    1、请选择对话质检方式
                                    -
                                    -
                                    -
                                    - checked="checked"> - checked="checked"> -
                                    -
                                    - <#if sessionConfig?? && sessionConfig.qualityscore?? && sessionConfig.qualityscore == 'score'>当前总分:<#else>能扣的总分: - 100 -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    - 2、请设置对话质检项 -

                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - <#if qualityList?? && qualityList?size gt 0> - <#list qualityList as quality> -
                                    -
                                    -
                                    -
                                    - 指标项名称 -
                                    -
                                    - -
                                    -
                                    - -
                                    -
                                    - checked="checked" lay-skin="primary"> -
                                    -
                                    - <#if sessionConfig?? && sessionConfig.qualityscore?? && sessionConfig.qualityscore == 'score'>满分值<#else>最多扣分 -
                                    -
                                    - -
                                    -
                                    - -
                                    display:none;"> -
                                    - 指标项说明 -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    - - <#else> -
                                    -
                                    -
                                    -
                                    - 指标项名称 -
                                    -
                                    - -
                                    -
                                    - -
                                    -
                                    - -
                                    -
                                    - <#if sessionConfig?? && sessionConfig.qualityscore?? && sessionConfig.qualityscore == 'score'>满分值<#else>最多扣分 -
                                    -
                                    - -
                                    -
                                    - - -
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - 指标项名称 -
                                    -
                                    - -
                                    -
                                    - -
                                    -
                                    - -
                                    -
                                    - <#if sessionConfig?? && sessionConfig.qualityscore?? && sessionConfig.qualityscore == 'score'>满分值<#else>最多扣分 -
                                    -
                                    - -
                                    -
                                    - - -
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - 指标项名称 -
                                    -
                                    - -
                                    -
                                    - -
                                    -
                                    - -
                                    -
                                    - <#if sessionConfig?? && sessionConfig.qualityscore?? && sessionConfig.qualityscore == 'score'>满分值<#else>最多扣分 -
                                    -
                                    - -
                                    -
                                    - - -
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    - -
                                    -
                                    - -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    - 3、禁忌项 -

                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - <#if tagList?? && tagList?size gt 0> - <#list tagList as tag> -
                                    -
                                    -
                                    -
                                    - 禁忌项 -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    - - <#else> -
                                    -
                                    -
                                    -
                                    - 禁忌项 -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    - -
                                    -
                                    - -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - - - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/service/agent/index.html b/contact-center/app/src/main/resources/templates/apps/service/agent/index.html deleted file mode 100644 index de59f747..00000000 --- a/contact-center/app/src/main/resources/templates/apps/service/agent/index.html +++ /dev/null @@ -1,70 +0,0 @@ -
                                    -
                                    - <#include "/apps/service/include/left.html"> -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    - 在线坐席<#if agentStatusList??>(${agentStatusList?size}) -

                                    - - - - - - - - - - - - - <#if agentStatusList??> - <#list agentStatusList as agentStatus> - - - - - - - - - - - - <#else> - - - - - -
                                    用户名技能组接入用户数最大用户数在线时间操作
                                    - - ${agentStatus.username!''} - - - ${agentStatus.skillname!''} - - ${agentStatus.users!''} - - ${agentStatus.maxusers!''} - <#if agentStatus.logindate??>${agentStatus.logindate?string('yyyy-MM-dd HH:mm:ss')} - <#if agentStatus.agentno != user.id && user.admin> - - 强制离线 - - -
                                    -
                                    - -
                                    当前没有在线坐席
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    diff --git a/contact-center/app/src/main/resources/templates/apps/service/agent/index.pug b/contact-center/app/src/main/resources/templates/apps/service/agent/index.pug new file mode 100644 index 00000000..ff76b189 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/service/agent/index.pug @@ -0,0 +1,41 @@ +extends /apps/include/layout.pug + +block content + .layui-side.layui-bg-black + .layui-side-scroll + include /apps/service/include/left.pug + .layui-body + .layui-side-scroll + .row + .col-lg-12 + h1.site-h1(style='border-top:1px solid #e6e6e6;') + | 在线坐席 #{agentStatusList ? "( " + agentStatusList.size() + ")": "(0)"} + table.layui-table(lay-skin='line') + thead + tr.design-sortable-tr + th 用户名 + th 技能组 + th 接入用户数 + th 最大用户数 + th 在线时间 + th 操作 + tbody(style='table-layout: fixed; word-break: break-all;') + if agentStatusList.size() > 0 + for agentStatus in agentStatusList + tr.tdHasContorllor.design-dropable-td + td.first_td_head(style="width: 150px") + a(href="javascript:void(0)") #{agentStatus.username} + td(style="width: 150px") #{agentStatus.skillname} + td #{agentStatus.users} + td #{agentStatus.maxusers} + td #{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', agentStatus.logindate)} + td + if agentStatus.agentno != user.id && user.admin + a(href="/service/agent/offline.html?id=" + agentStatus.id, data-toggle="tip", title="强制使登陆坐席离线,离线后,坐席不再分配访客,请确认是否操作?") + i.layui-icon ဆ 强制离线 + else + tr + td(colspan="6" style="height:400px;") + .ukefu-empty(style="background: none") + i.layui-icon  + div(style="") 当前没有在线坐席 \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/service/comment/index.html b/contact-center/app/src/main/resources/templates/apps/service/comment/index.html deleted file mode 100644 index 51606395..00000000 --- a/contact-center/app/src/main/resources/templates/apps/service/comment/index.html +++ /dev/null @@ -1,94 +0,0 @@ -
                                    -
                                    - <#include "/apps/service/include/left.html"> -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    - 满意度评价<#if serviceList??>(${serviceList.totalElements}) -

                                    - - - - - - - - - - - - - - <#if serviceList?? && serviceList.content?? && serviceList.content?size gt 0> - <#list serviceList.content as agentService> - - - - - - - - - - - <#else> - - - - - -
                                    用户名接入渠道服务坐席咨询时间评价时间评价回复意见
                                    - - ${agentService.username!''} - - - ${agentService.channel!''} - - ${agentService.agentusername!''} - - <#if agentService.servicetime??> - ${agentService.servicetime?string('yyyy-MM-dd HH:mm:ss')} - - ${agentService.satistime?string("yyyy-MM-dd HH:mm:ss")} - <#list uKeFuDic['com.dic.webim.comment'] as comment> - <#if agentService.satislevel?? && comment.code == agentService.satislevel>${comment.name!''} - - - <#if uKeFuDic[agentService.satiscomment!'']??>${uKeFuDic[agentService.satiscomment!''].name!''}<#else>${agentService.satiscomment!''} - -
                                    -
                                    - -
                                    还没有满意度评价
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - diff --git a/contact-center/app/src/main/resources/templates/apps/service/comment/index.pug b/contact-center/app/src/main/resources/templates/apps/service/comment/index.pug new file mode 100644 index 00000000..5f9aaee9 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/service/comment/index.pug @@ -0,0 +1,64 @@ +extends /apps/include/layout.pug + +block content + .layui-side.layui-bg-black + .layui-side-scroll + include /apps/service/include/left.pug + .layui-body + .layui-side-scroll + .row + .col-lg-12 + h1.site-h1(style='border-top:1px solid #e6e6e6;') + | 满意度评价 #{serviceList && serviceList.totalElements ? "( " + serviceList.totalElements + ")": "(0)"} + table.layui-table(lay-skin='line', style='table-layout: fixed; word-break: break-all;') + thead + tr.design-sortable-tr + th 用户名 + th(width='60px') 接入渠道 + th 服务坐席 + th 咨询时间 + th 评价时间 + th(width='70px') 评价 + th 回复意见 + tbody + if serviceList.content.size() > 0 + for agentService in serviceList.content + tr.tdHasContorllor.design-dropable-td + td.first_td_head(title= agentService.username, style="text-overflow: ellipsis;white-space: nowrap;overflow: hidden;") + a(href="/service/online/index.html?userid=" + agentService.userid + "&agentservice=" + agentService.id) #{agentService.username} + td #{agentService.channel} + td(title= agentService.agentusername, style="text-overflow: ellipsis;white-space: nowrap;overflow: hidden;") #{agentService.agentusername} + td #{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', agentService.servicetime)} + td #{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', agentService.satistime)} + td + for comment in uKeFuDic['com.dic.webim.comment'] + if agentService.satislevel && comment.code == agentService.satislevel + | #{comment.name} + td #{agentService.satiscomment && uKeFuDic[agentService.satiscomment] ? uKeFuDic[agentService.satiscomment].name : agentService.satiscomment} + else + tr + td(colspan="7" style="height:400px;") + .ukefu-empty(style="background: none") + i.layui-icon  + div() 还没有满意度评价 + .row(style='padding:5px;') + .col-lg-12#page(style='text-align:center;') + + script. + layui.use(['laypage', 'layer'], function(){ + var laypage = layui.laypage + ,layer = layui.layer; + + laypage({ + cont: 'page' + ,pages: #{serviceList ? serviceList.totalPages : 0} //总页数 + ,curr: #{serviceList ? serviceList.number + 1 : 0} + ,groups: 5 //连续显示分页数 + ,jump:function(data , first){ + if(!first){ + location.href = "/service/comment/index.html?p="+data.curr; + } + } + }); + }); + diff --git a/contact-center/app/src/main/resources/templates/apps/service/current/index.html b/contact-center/app/src/main/resources/templates/apps/service/current/index.html deleted file mode 100644 index 55b759c4..00000000 --- a/contact-center/app/src/main/resources/templates/apps/service/current/index.html +++ /dev/null @@ -1,121 +0,0 @@ -
                                    -
                                    - <#include "/apps/service/include/left.html"> -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    - 当前对话<#if agentServiceList??>(${agentServiceList.totalElements}) -

                                    - - - - - - - - - - - - - - - <#if agentServiceList?? && agentServiceList.content?? && agentServiceList.content?size gt 0> - <#list agentServiceList.content as agentService> - - - - - - - - - - - - <#else> - - - - - -
                                    用户名接入渠道状态服务坐席服务时间等待时长地域操作
                                    - - ${agentService.username!''} - - - ${agentService.channel!''} - - <#if agentService.status?? && agentService.status == 'end'>已结束<#elseif agentService.status?? && agentService.status == 'inservice'>服务中 - - ${agentService.agentusername!''} - - <#if agentService.servicetime??> - ${agentService.servicetime?string('yyyy-MM-dd HH:mm:ss')} - - - ${(agentService.waittingtime/(1000*60*60))?string('00')}:${((agentService.waittingtime%(1000*60*60))/(1000*60))?string('00')}:${((agentService.waittingtime%(1000*60))/(1000))?string('00')} - ${agentService.region!''} - - - 转接 - - - <#if agentService.channel?? && agentService.channel != 'skype' && !(agentService.agent??) > - - - 邀请 - - - - - 关闭 - - - 轨迹 - -
                                    -
                                    - -
                                    当前没有进行中的对话
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - - diff --git a/contact-center/app/src/main/resources/templates/apps/service/current/index.pug b/contact-center/app/src/main/resources/templates/apps/service/current/index.pug new file mode 100644 index 00000000..f3d1d056 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/service/current/index.pug @@ -0,0 +1,84 @@ +extends /apps/include/layout.pug +include /mixins/client.mixin.pug +block content + .layui-side.layui-bg-black + .layui-side-scroll + include /apps/service/include/left.pug + .layui-body + .layui-side-scroll + .row + .col-lg-12 + h1.site-h1(style='border-top:1px solid #e6e6e6;') 当前对话 #{agentServiceList.totalElements ?"(" + agentServiceList.totalElements + ")" : "(0)"} + table.layui-table(lay-skin='line', style='table-layout: fixed') + thead + tr.design-sortable-tr + th 用户名 + th(width='60px') 接入渠道 + th(width='50px') 状态 + th 服务坐席 + th 服务时间 + th 等待时长 + th 地域 + th.operating 操作 + tbody(style='table-layout: fixed; word-break: break-all;') + if agentServiceList.content.size() > 0 + for agentService in agentServiceList.content + tr.tdHasContorllor.design-dropable-td(title= agentService.username) + td.first_td_head(style="text-overflow: ellipsis;white-space: nowrap;overflow: hidden;") + a(href="/service/online/index.html?userid=" + agentService.userid + "&agentservice=" + agentService.id) #{agentService.username} + td #{agentService.channel} + if agentService.status == 'inservice' + td 服务中 + if agentService.status == 'end' + td 已结束 + td(style="text-overflow: ellipsis;white-space: nowrap;overflow: hidden;" title= agentService.agentusername) #{agentService.agentusername} + td #{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', agentService.servicetime)} + td #{pugHelper.padRight(agentService.waittingtime / (1000*60*60), "00")}:#{pugHelper.padRight(agentService.waittingtime % (1000*60*60) / (1000*60), "00")}:#{pugHelper.padRight(agentService.waittingtime % (1000*60) / 1000, "00")} + td #{agentService.region} + td(style="white-space:nowrap") + a(href="/service/current/trans.html?id=" + agentService.id, data-toggle="ajax", data-title="转接坐席", data-width="750", data-height="550") + i.kfont  + | 转接 + if !agentService.agent && agentService.channel != 'skype' + a.isInvite(href="/service/current/invite.html?id=" + agentService.id, style="margin-left:10px;") + i.kfont  + | 邀请 + a(href="/service/current/end.html?id=" + agentService.id, data-toggle="tip", data-title="关闭对话将会强制中断坐席和访客的对话,请确认是否关闭?", style="margin-left:10px;") + i.kfont  + | 关闭 + a(href="/service/trace.html?sessionid=" + agentService.sessionid, title="查看访客轨迹", data-toggle="ajax", data-width="1050", style="margin-left:10px;") + i.kfont  + | 轨迹 + else + tr + td(colspan="8" style="height:400px;") + .ukefu-empty(style="background: none") + i.layui-icon  + div(style="") 当前没有进行中的对话 + .row(style='padding:5px;') + .col-lg-12#page(style='text-align:center;') + script. + layui.use(['laypage', 'layer'], function(){ + var laypage = layui.laypage + ,layer = layui.layer; + + laypage({ + cont: 'page' + , pages: #{agentServiceList ? agentServiceList.totalPages : 0} //总页数 + , curr: #{agentServiceList ? agentServiceList.number + 1 : 0} + ,groups: 5 //连续显示分页数 + ,jump:function(data , first){ + if(!first){ + location.href = "/service/current/index.html?p="+data.curr ; + } + } + }); + }); + + $(function(){ + if($(".isInvite").length>0){ + $(".operating").css('width','230px') + }else{ + $(".operating").css('width','175px') + } + }); \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/service/current/transfer.html b/contact-center/app/src/main/resources/templates/apps/service/current/transfer.html deleted file mode 100644 index af9122fe..00000000 --- a/contact-center/app/src/main/resources/templates/apps/service/current/transfer.html +++ /dev/null @@ -1,102 +0,0 @@ -
                                    - - - - -
                                    -
                                    -
                                    -
                                    -

                                    - 技能组 -

                                    -
                                    -
                                    -
                                      - <#if skillGroups??> - <#list skillGroups as skill> - <#if skill.id == user.organ> - <#assign agentNum = 0 > - <#if userList??><#list userList as agent><#if agent.organs[skill.id]??><#assign agentNum = agentNum + 1 > -
                                    • - ${skill.name!''}(${agentNum!''}) -
                                    • - - - - - <#if skillGroups??> - <#list skillGroups as skill> - <#if skill.id != user.organ> - <#assign agentNum = 0 > - <#if userList??><#list userList as agent><#if agent.organs[skill.id]??><#assign agentNum = agentNum + 1 > -
                                    • - ${skill.name!''}(${agentNum!''}) -
                                    • - - - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - <#include "/apps/agent/transferagentlist.html"> -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    - 转接附言(最多不超过255个字符)

                                    -
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    - - -
                                    -
                                    -
                                    - - diff --git a/contact-center/app/src/main/resources/templates/apps/service/current/transfer.pug b/contact-center/app/src/main/resources/templates/apps/service/current/transfer.pug new file mode 100644 index 00000000..e7d0ee7b --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/service/current/transfer.pug @@ -0,0 +1,78 @@ +include /mixins/client.mixin.pug +form.layui-form(action='/service/transfer/save.html', method='post') + input(type='hidden', name='id', value=agentserviceid) + input(type='hidden', name='userid', value=userid) + input(type='hidden', name='agentserviceid', value=agentserviceid) + input(type='hidden', name='agentuserid', value=agentuserid) + .row(style='height:295px;') + .col-lg-3 + .box + .box-title + h1.site-h1(style='background-color:#FFFFFF;margin:0px;padding:0 0 4px 20px;') 技能组 + .box-body(style='padding:0px 0px;position: relative;height:250px;overflow-y:auto;') + ul + if skillGroups + for skill in skillGroups + if skill.id == user.organ + - var agentNum = 0 + if userList + for agent in userList + if skill.id && agent.organs[skill.id] + - agentNum = agentNum + 1 + li.uk_role(title= skill.name + "(" + agentNum + ")", class=({'this': skill.id == currentorgan}), style="margin:0px;padding:7px 0 7px 20px;", onclick="$('.uk_role.this').removeClass('this');$(this).addClass('this');") + a(href="/agent/transfer/agent.html?organ=" + skill.id + "&agentid=" + agentservice.agentno, data-toggle="load", data-target="#skillAgentList") + i.kfont(style="margin-top: 3px;float: left")  + span(style="max-width: 120px;text-overflow: ellipsis;white-space: nowrap; overflow: hidden;float: left;margin: 0 3px") #{skill.name} + |(#{agentNum}) + + if skill.id != user.organ + - var agentNum = 0 + if userList + for agent in userList + if skill.id && agent.organs[skill.id] + - agentNum = agentNum + 1 + li.uk_role(title= skill.name + "(" + agentNum + ")", class=({'this': skill.id == currentorgan}), style="margin:0px;padding:7px 0 7px 20px;", onclick="$('.uk_role.this').removeClass('this');$(this).addClass('this');") + a(href="/agent/transfer/agent.html?organ=" + skill.id + "&agentid=" + agentservice.agentno, data-toggle="load", data-target="#skillAgentList") + i.kfont(style="margin-top: 3px;float: left")  + span(style="max-width: 120px;text-overflow: ellipsis;white-space: nowrap; overflow: hidden;float: left;margin: 0 3px") #{skill.name} + |(#{agentNum}) + .col-lg-9(style='border-left:1px solid #dedede;') + .box + .box-body#skillAgentList(style='padding:0px 2px;position: relative;height:295px;overflow-y:auto;') + include /apps/agent/transferagentlist.pug + .row(style='margin-top:5px;') + .col-lg-12 + h1.site-h1(style='background-color:#EEEEEE;padding-left: 20px') 转接附言(最多不超过255个字符) + .layui-form-item(style='padding-left:10px;padding-top:5px;') + .layui-inline + .layui-input-inline(style='width: 720px;') + textarea.layui-textarea(name='memo', placeholder='请输入转接附言', style='resize:none;height:90px;min-height:90px;margin-left: 5px', maxlength='255') #{agentservice.transmemo} + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='contactsForm') 转接 + button.layui-btn.layui-btn-original(type='button', onclick='closedPage()') 关闭 + + script. + function closedPage(){ + layer.closeAll("page") + } + + $('.ukefu-agentstatus td:not(:last-child)').on("click" , function(){ + $('.ctxid').prop("checked" , false); + if($(this).parent().find("input").prop("checked")){ + $(this).parent().find("input").prop("checked" , false); + }else{ + $(this).parent().find("input").prop("checked" , true); + } + }); + + layui.use('form', function(){ + var form = layui.form(); + //监听提交 + form.on('submit(contactsForm)', function(data){ + if(!data.field.agentno){ + layer.msg("请选择坐席"); + return false + } + }); + }); diff --git a/contact-center/app/src/main/resources/templates/apps/service/history/index.html b/contact-center/app/src/main/resources/templates/apps/service/history/index.html deleted file mode 100644 index ed4bc158..00000000 --- a/contact-center/app/src/main/resources/templates/apps/service/history/index.html +++ /dev/null @@ -1,265 +0,0 @@ -
                                    -
                                    - <#include "/apps/service/include/left.html"> -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    - 历史会话<#if agentServiceList??>(${agentServiceList.totalElements}) -

                                    - - - - - - - - - - - - - - - - - - <#if agentServiceList?? && agentServiceList.content?? && agentServiceList.content?size gt 0> - <#list agentServiceList.content as agentService> - - - - - - - - - - - - - <#else> - - - - - -
                                    用户名接入渠道服务坐席咨询时间服务时间等待时长服务时长地域
                                    - - ${agentService.username!''} - - - ${agentService.channel!''} - - ${agentService.agentusername!''} - <#if agentService.logindate??>${agentService.logindate?string('yyyy-MM-dd HH:mm:ss')} - <#if agentService.servicetime??> - ${agentService.servicetime?string('yyyy-MM-dd HH:mm:ss')} - - - ${(agentService.waittingtime/(1000*60*60))?string('00')}:${((agentService.waittingtime%(1000*60*60))/(1000*60))?string('00')}:${((agentService.waittingtime%(1000*60))/(1000))?string('00')} - - ${(agentService.sessiontimes/(1000*60*60))?string('00')}:${((agentService.sessiontimes%(1000*60*60))/(1000*60))?string('00')}:${((agentService.sessiontimes%(1000*60))/(1000))?string('00')} - ${agentService.region!''}
                                    -
                                    - -
                                    还没有历史会话
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - diff --git a/contact-center/app/src/main/resources/templates/apps/service/history/index.pug b/contact-center/app/src/main/resources/templates/apps/service/history/index.pug new file mode 100644 index 00000000..ef8d65d6 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/service/history/index.pug @@ -0,0 +1,197 @@ +extends /apps/include/layout.pug +block content + .layui-side.layui-bg-black + .layui-side-scroll + include /apps/service/include/left.pug + .layui-body + .layui-side-scroll + .row + .col-lg-12 + h1.site-h1(style='border-top:1px solid #e6e6e6;') 历史会话 + | #{agentServiceList.totalElements ? "(" + agentServiceList.totalElements + ")" : "(0)"} + span + form.layui-form#search(name='search', action='/service/history/index.html', method='get', style='float: left;margin-right:5px') + .layui-form-item(style='width: 700px;padding-left: 5px') + .layui-inline + .layui-input-inline(style='width: auto;margin-right:0px;') + label.layui-form-label(style='width:80px; padding-left: 0px;text-align: left') 用户名: + .layui-input-inline(style='width: auto;margin-right:0px;') + input.layui-input.ukefu-input(type='text', name='username', placeholder='请输入用户名', autocomplete='off', value=username) + .layui-inline + .layui-input-inline(style='width: auto;margin-right:0px;') + .layui-input-inline(style='width: auto;margin-right:0px;') + label.layui-form-label(style='width: auto;') 时间: + select.layui-input.ukefu-input(name='servicetimetype', lay-ignore) + option(value='logindate') 咨询时间 + if servicetimetype == "servicetime" + option(value='servicetime', selected) 服务时间 + else + option(value='servicetime') 服务时间 + label.layui-form-label(style='width: auto;') = + .layui-input-inline(style='width: auto;margin-right:0px;') + input.layui-input.ukefu-input#begin(type='text', name='begin', value= begin, placeholder='开始时间') + label.layui-form-label(style='width: auto;') ~ + .layui-input-inline(style='width: auto;margin-right:0px;') + input.layui-input.ukefu-input#end(type='text', name='end', value=end, placeholder='结束时间') + .layui-inline + .layui-input-inline(style='width: auto;margin-right:0px;') + label.layui-form-label(style='width:80px; padding-left: 0px;text-align: left') 接入渠道: + .layui-input-inline(style='width: auto;margin-right:0px;') + input.layui-input.ukefu-input(type='text', name='channel', placeholder='请输入接入渠道', autocomplete='off', value= channel) + .layui-inline(style='margin-right:105px;') + .layui-input-inline(style='width: auto;margin-right:0px;') + label.layui-form-label(style='width: auto;') 分类: + .layui-input-inline(style='width: auto;margin-right:0px;') + select#servicetype.layui-input.ukefu-input(name='servicetype', onchange="deptorservice(this.value)", lay-ignore) + option(value) 请选择分类 + if servicetype == "agentno" + option(value="agentno" selected= (true ? 'selected' : false)) 服务坐席 + option(value="skill") 技能组 + else if servicetype == "skill" + option(value="agentno") 服务坐席 + option(value="skill" selected= (true ? 'selected' : false)) 技能组 + else + option(value="agentno") 服务坐席 + option(value="skill") 技能组 + label= ' ~ ' + select#allocation.layui-input.ukefu-input(name='allocation', lay-ignore) + option(value) 请先选择分类 + if servicetype == "agentno" + if userlist + for user in userlist + if allocation + option(value= user.id, selected= (allocation == user.id && 'selected' ? 'selected' : false)) #{user.uname} + else + option(value= user.id) #{user.uname} + else if servicetype == "skill" + if deptlist + for dept in deptlist + if allocation + option(value= dept.id, selected= (allocation == dept.id && 'selected' ? 'selected' : false)) #{dept.name} + else + option(value= dept.id) #{dept.name} + .layui-inline(style='margin-right:0px;') + .layui-input-inline(style='width: auto;margin-right:0px;') + .layui-input-inline(style='width: auto;margin-right:0px;') + button.layui-btn.layui-btn-small.layui-btn-original(style='color:#ffffff;') + i.layui-icon  + table.layui-table(lay-skin='line', style='table-layout: fixed') + thead + tr.design-sortable-tr + th(width='11%') 用户名 + th(width='10%') 接入渠道 + th(width='14.5%') 服务坐席 + th(width='13.5%') 咨询时间 + th(width='13.5%') 服务时间 + th(width='13.5%') 等待时长 + th(width='13.5%') 服务时长 + th 地域 + tbody(style='table-layout: fixed; word-break: break-all;') + if agentServiceList.content.size() > 0 + for agentService in agentServiceList.content + tr.tdHasContorllor.design-dropable-td + td.first_td_head(title= agentService.username, style="text-overflow: ellipsis;white-space: nowrap;overflow: hidden;") + a(href="/service/online/index.html?userid=" + agentService.userid + "&agentservice=" + agentService.id) #{agentService.username} + td #{agentService.channel} + td(title= agentService.agentusername, style="text-overflow: ellipsis;white-space: nowrap;overflow: hidden;") #{agentService.agentusername} + td #{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', agentService.logindate)} + td #{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', agentService.servicetime)} + td #{pugHelper.padRight(agentService.waittingtime / (1000 * 60 * 60), "00")}:#{pugHelper.padRight(agentService.waittingtime % (1000 * 60 * 60) / (1000 * 60), "00")}:#{pugHelper.padRight(agentService.waittingtime % (1000 * 60) / 1000, "00")} + td #{pugHelper.padRight(agentService.sessiontimes / (1000 * 60 * 60), '00')}:#{pugHelper.padRight(agentService.sessiontimes % (1000 * 60 * 60) / (1000 * 60), "00")}:#{pugHelper.padRight(agentService.sessiontimes % (1000 * 60) / 1000, "00")} + td #{agentService.region} + else + tr + td(colspan="8" style="height:400px;") + .ukefu-empty(style="background: none") + i.layui-icon  + div(style="") "还没有历史会话" + .row(style='padding:5px;') + .col-lg-12#page(style='text-align:center;') + + script. + layui.use('form', function () { + var form = layui.form(); + form.render(); //更新全部 + }); + var searchData = $("#search :input").serializeArray() + var searchCondition = ""; + $.each(searchData, function () { + searchCondition += '&' + this.name + '=' + this.value + }); + layui.use(['laypage', 'layer'], function () { + var laypage = layui.laypage + , layer = layui.layer; + laypage({ + cont: 'page' + , pages: #{agentServiceList ? agentServiceList.totalPages : 0} //总页数 + , curr: #{agentServiceList ? agentServiceList.number + 1 : 0} + , groups: 5 //连续显示分页数 + , jump: function (data, first) { + if (!first) { + location.href = "/service/history/index.html?p=" + data.curr + searchCondition; + } + } + }); + }); + + layui.use('laydate', function () { + var laydate = layui.laydate; + }); + function getNowFormatDate() { + var date = new Date(); + var seperator = "-"; + var year = date.getFullYear(); + var month = date.getMonth() + 1; + var strDate = date.getDate(); + if (month >= 1 && month <= 9) { + month = "0" + month; + } + if (strDate >= 0 && strDate <= 9) { + strDate = "0" + strDate; + } + var currentdate = year + seperator + month + seperator + strDate; + return currentdate; + } + var start = { + format: 'YYYY-MM-DD', + max: getNowFormatDate(),//默认最大值为当前日期 + istoday: true, + choose: function (datas) { + end.min = datas; //开始日选好后,重置结束日的最小日期 + } + }; + var end = { + format: 'YYYY-MM-DD', + max: getNowFormatDate(),//默认最大值为当前日期 + istoday: true, + choose: function (datas) { + start.max = datas; //结束日选好后,重置开始日的最大日期 + } + }; + document.getElementById('begin').onclick = function () { + start.elem = this; + laydate(start); + }; + document.getElementById('end').onclick = function () { + end.elem = this; + laydate(end); + }; + + function deptorservice(data) { + $('#allocation').html(""); + if (data == "agentno") { + var userlist = !{pugHelper.toJSON(userlist)}; + $("#allocation").append(""); + $("#allocation").append($.map(userlist, function (user) { + return ''; + })); + } else if (data == "skill") { + var deptlist = !{pugHelper.toJSON(deptlist)}; + $("#allocation").append(""); + $("#allocation").append($.map(deptlist, function (dept) { + return ''; + })); + } else { + $("#allocation").append(""); + } + } \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/service/include/left.html b/contact-center/app/src/main/resources/templates/apps/service/include/left.html deleted file mode 100644 index fca14c80..00000000 --- a/contact-center/app/src/main/resources/templates/apps/service/include/left.html +++ /dev/null @@ -1,113 +0,0 @@ -
                                      -<#if user?? && (user.roleAuthMap["A08_A01"]?? || user.admin) > -
                                    • - 会话信息 -
                                      - <#if user?? && (user.roleAuthMap["A08_A01_A01"]?? || user.admin) > -
                                      class="layui-this"> - 历史会话 -
                                      - - <#if user?? && (user.roleAuthMap["A08_A01_A02"]?? || user.admin) > -
                                      class="layui-this"> - 当前会话 -
                                      - - <#if user?? && (user.roleAuthMap["A08_A01_A03"]?? || user.admin) > -
                                      class="layui-this"> - 排队队列 -
                                      - - <#if user?? && (user.roleAuthMap["A08_A01_A04"]?? || user.admin) > -
                                      class="layui-this"> - 访客留言 -
                                      - -
                                      - -
                                    • - -<#if user?? && (user.roleAuthMap["A08_A02"]?? || user.admin) > -
                                    • - 统计功能 -
                                      - <#if user?? && (user.roleAuthMap["A08_A02_A01"]?? || user.admin) > -
                                      class="layui-this"> - 满意度统计 -
                                      - - <#if user?? && (user.roleAuthMap["A08_A02_A02"]?? || user.admin) > -
                                      class="layui-this"> - 客服坐席 -
                                      - -
                                      -
                                    • - -<#if user?? && (user.roleAuthMap["A08_A03"]?? || user.admin) > -
                                    • - 服务小结 -
                                      - <#if user?? && (user.roleAuthMap["A08_A03_A01"]?? || user.admin) > -
                                      class="layui-this"> - 多媒体客服 -
                                      - - <#if user?? && (user.roleAuthMap["A08_A03_A02"]?? || user.admin) > -
                                      class="layui-this"> - 已处理多媒体客服 -
                                      - - <#if user?? && (user.roleAuthMap["A08_A03_A03"]?? || user.admin) > - <#if models?seq_contains("callcenter")> -
                                      class="layui-this"> - 呼叫中心 -
                                      - - - - <#if models?seq_contains("callcenter")> - <#if user?? && (user.roleAuthMap["A08_A03_A04"]?? || user.admin) > -
                                      class="layui-this"> - 已处理呼叫中心 -
                                      - - - -
                                      -
                                    • - -<#if user?? && (user.roleAuthMap["A08_A01_A05"]?? || user.admin) > -
                                    • - 满意度评价 -
                                      -
                                      class="layui-this"> - 在线客服 -
                                      - <#if models?seq_contains("callcenter")> -
                                      class="layui-this"> - 语音通话 -
                                      - -
                                      -
                                    • - -<#if user?? && (user.roleAuthMap["A08_A04"]?? || user.admin) > -
                                    • - 坐席信息 -
                                      - <#if user?? && (user.roleAuthMap["A08_A04_A01"]?? || user.admin) > -
                                      class="layui-this"> - - 在线坐席 -
                                      - - <#if user?? && (user.roleAuthMap["A08_A04_A02"]?? || user.admin) > -
                                      class="layui-this"> - 全部坐席 -
                                      - -
                                      -
                                    • - -
                                    diff --git a/contact-center/app/src/main/resources/templates/apps/service/include/left.pug b/contact-center/app/src/main/resources/templates/apps/service/include/left.pug new file mode 100644 index 00000000..94986c2a --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/service/include/left.pug @@ -0,0 +1,64 @@ +ul.layui-nav.layui-nav-tree(lay-filter='setting') + if user.roleAuthMap["A08_A01"] || user.admin + li.layui-nav-item.layui-nav-itemed + a.layui-nav-title(href="javascript:;") 会话信息 + dl.layui-nav-child + if user.roleAuthMap["A08_A01_A01"] || user.admin + dd(class={'layui-this': subtype == 'history'}) + a(href="/service/history/index.pug") 历史会话 + if user.roleAuthMap["A08_A01_A02"] || user.admin + dd(class={'layui-this': subtype == 'current'}) + a(href="/service/current/index.pug") 当前会话 + if user.roleAuthMap["A08_A01_A03"] || user.admin + dd(class={'layui-this': subtype == 'filter'}) + a(href="/service/quene/index.pug") 排队队列 + if user.roleAuthMap["A08_A01_A04"] || user.admin + dd(class={'layui-this': subtype == 'leavemsg'}) + a(href="/service/leavemsg/index.pug") 访客留言 + if user.roleAuthMap["A08_A02"] || user.admin + li.layui-nav-item.layui-nav-itemed + a.layui-nav-title(href="javascript:;") 统计功能 + dl.layui-nav-child + if user.roleAuthMap["A08_A02_A01"] || user.admin + dd(class={'layui-this': subtype == 'statcoment'}) + a(href="/service/stats/coment.pug") 满意度统计 + if user.roleAuthMap["A08_A02_A02"] || user.admin + dd(class={'layui-this': subtype == 'statagent'}) + a(href="/service/stats/agent.pug") 客服坐席 + if user.roleAuthMap["A08_A03"] || user.admin + li.layui-nav-item.layui-nav-itemed + a.layui-nav-title(href="javascript:;") 服务小结 + dl.layui-nav-child + if user.roleAuthMap["A08_A03_A01"] || user.admin + dd(class={'layui-this': subtype == 'agentsummary'}) + a(href="/apps/agent/summary/index.pug") 多媒体客服 + if user.roleAuthMap["A08_A03_A02"] || user.admin + dd(class={'layui-this': subtype == 'processed'}) + a(href="/apps/agent/processed/index.pug") 已处理多媒体客服 + if user.roleAuthMap["A08_A03_A03"] || user.admin + if models.contains("callcenter") + dd(class={'layui-this': subtype == 'summary'}) + a(href="/apps/callcenter/summary/index.html") 呼叫中心 + if models.contains("callcenter") + if user.roleAuthMap["A08_A03_A04"] || user.admin + dd(class={'layui-this': subtype == 'callcenterprocessed'}) + a(href="/apps/callcenter/processed/index.html") 已处理呼叫中心 + if user.roleAuthMap["A08_A01_A05"] || user.admin + li.layui-nav-item.layui-nav-itemed + a.layui-nav-title(href="javascript:;") 满意度评价 + dl.layui-nav-child + dd(class={'layui-this': subtype == 'comment'}) + a(href="/service/comment/index.html") 在线客服 + if models.contains("callcenter") + dd(class={'layui-this': subtype == 'callentercomment'}) + a(href="/apps/callcenter/comment/index.html") 语音通话 + if user.roleAuthMap["A08_A04"] || user.admin + li.layui-nav-item.layui-nav-itemed + a.layui-nav-title(href="javascript:;") 坐席信息 + dl.layui-nav-child + if user.roleAuthMap["A08_A04_A01"] || user.admin + dd(class={'layui-this': subtype == 'onlineagent'}) + a(href="/service/agent/index.html") 在线坐席 + if user.roleAuthMap["A08_A04_A02"] || user.admin + dd(class={'layui-this': subtype == 'userlist'}) + a(href="/service/user/index.html") 全部坐席 diff --git a/contact-center/app/src/main/resources/templates/apps/service/leavemsg/index.html b/contact-center/app/src/main/resources/templates/apps/service/leavemsg/index.html deleted file mode 100644 index 3de543a9..00000000 --- a/contact-center/app/src/main/resources/templates/apps/service/leavemsg/index.html +++ /dev/null @@ -1,112 +0,0 @@ -
                                    -
                                    - <#include "/apps/service/include/left.html"> -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    - 访客留言<#if leaveMsgList??>(${leaveMsgList.totalElements}) -

                                    - - - - - - - - - - - - - - - - - - <#if leaveMsgList?? && leaveMsgList.content??> - <#list leaveMsgList.content as leaveMsg> - - - - - - - - - - - - - - - <#else> - - - - - -
                                    渠道名称姓名电话邮件地址QQ内容技能组留言时间操作
                                    -

                                    - - <#if leaveMsg.channel.snstype == "webim"> - 网站 - <#elseif leaveMsg.channel.snstype == "phone"> - 电话 - <#elseif leaveMsg.channel.snstype == "skype"> - Skype - <#else> - 未知 - - -

                                    -

                                    ${leaveMsg.channel.name!''}

                                    ${leaveMsg.name!''}

                                    ${leaveMsg.mobile!''}

                                    ${leaveMsg.email!''}

                                    ${leaveMsg.address!''}

                                    ${leaveMsg.qq!''}

                                    ${leaveMsg.content!''}

                                    ${leaveMsg.skill!''}

                                    <#if leaveMsg.createtime??>${leaveMsg.createtime?string('yyyy-MM-dd HH:mm:ss')} - - 删除 - -
                                    -
                                    - -
                                    当前没有在线坐席
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - - - - diff --git a/contact-center/app/src/main/resources/templates/apps/service/leavemsg/index.pug b/contact-center/app/src/main/resources/templates/apps/service/leavemsg/index.pug new file mode 100644 index 00000000..3516065f --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/service/leavemsg/index.pug @@ -0,0 +1,96 @@ +extends /apps/include/layout.pug +block content + .layui-side.layui-bg-black + .layui-side-scroll + include /apps/service/include/left.pug + .layui-body + .layui-side-scroll + .row + .col-lg-12 + h1.site-h1(style='border-top:1px solid #e6e6e6;') 访客留言 #{leaveMsgList.totalElements ? "(" + leaveMsgList.totalElements + ")" : "(0)"} + table.layui-table.overflow(lay-skin='line', style='table-layout: fixed; word-break: break-all;') + thead + tr.design-sortable-tr + th 渠道 + th 名称 + th 姓名 + th 电话 + th 邮件 + th 地址 + th QQ + th(width='20%') 内容 + th 技能组 + th(width='80px') 留言时间 + th 操作 + tbody + if leaveMsgList.content.size() > 0 + for leaveMsg in leaveMsgList.content + tr.tdHasContorllor.design-dropable-td + td.first_td_head(title=leaveMsg.channel.snstype, valign="top") + p + a(href="javascript:void(0)") + if leaveMsg.channel.snstype == "webim" + | 网站 + else if leaveMsg.channel.snstype == "phone" + | 电话 + else if leaveMsg.channel.snstype == "skype" + | Skype + else + | 未知 + td(title= leaveMsg.channel.name, valign="top") + p #{leaveMsg.channel.name} + td(title= leaveMsg.name, valign="top") + p #{leaveMsg.name} + td(title= leaveMsg.mobile, valign="top") + p #{leaveMsg.mobile} + td(title= leaveMsg.email, valign="top") + p #{leaveMsg.email} + td(title= leaveMsg.address, valign="top") + p #{leaveMsg.address} + td(title= leaveMsg.qq, valign="top") + p #{leaveMsg.qq} + td(title= leaveMsg.content, valign="top") + p #{leaveMsg.content} + td(title= leaveMsg.skill, valign="top") + p #{leaveMsg.skill} + td(valign="top") #{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', leaveMsg.createtime)} + td(valign="top") + a(href="/service/leavemsg/delete.html?id=" + leaveMsg.id, data-toggle="tip", title="删除留言不可恢复,请确认是否删除留言?") + i.layui-icon ဆ + | 删除 + else + tr + td(colspan="8" style="height:400px;") + .ukefu-empty(style="background: none") + i.layui-icon  + div(style="") 当前没有在线坐席 + + .row(style='padding:5px;') + .col-lg-12#page(style='text-align:center;') + + style. + .overflow td p{ + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 3; + overflow: hidden; + } + + script. + layui.use(['laypage', 'layer'], function(){ + var laypage = layui.laypage + ,layer = layui.layer; + + laypage({ + cont: 'page' + , pages: #{leaveMsgList ? leaveMsgList.totalPages : 0} //总页数 + , curr: #{leaveMsgList ? leaveMsgList.number + 1 : 0} + ,groups: 5 //连续显示分页数 + ,jump:function(data , first){ + if(!first){ + location.href = "/service/leavemsg/index.pug?p="+data.curr ; + } + } + }); + }); + diff --git a/contact-center/app/src/main/resources/templates/apps/service/online/chatmsg.html b/contact-center/app/src/main/resources/templates/apps/service/online/chatmsg.html deleted file mode 100644 index 9fb00ca2..00000000 --- a/contact-center/app/src/main/resources/templates/apps/service/online/chatmsg.html +++ /dev/null @@ -1,89 +0,0 @@ - -
                                    - <#if title??> - <#else> -

                                    -
                                      -
                                    • 对话内容
                                    • - <#if summary??> -
                                    • 服务小结
                                    • - -
                                    -

                                    - -
                                    - <#if agentUserMessageList?? && agentUserMessageList.content??> - <#list agentUserMessageList.content?reverse as chatmessage> -
                                    -
                                    - -
                                    - ${chatmessage.username!''} - ${chatmessage.createtime!''} -
                                    -
                                    - -
                                    <#include "/apps/agent/media/message.html">
                                    -
                                    -
                                    -
                                    - - <#elseif curagentuser??> - <#if curagentuser.status?? && curagentuser.status == "end"> -
                                    - 用户“${curagentuser.username!''}”已经离开 -
                                    - <#else> -
                                    - 用户“${curagentuser.username!''}”开始对话 -
                                    - - -
                                    - <#if summary??> - - -
                                    - diff --git a/contact-center/app/src/main/resources/templates/apps/service/online/chatmsg.pug b/contact-center/app/src/main/resources/templates/apps/service/online/chatmsg.pug new file mode 100644 index 00000000..cd34f28f --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/service/online/chatmsg.pug @@ -0,0 +1,74 @@ +.ukefu-chat-history + h1.site-h1(style="padding-bottom:0px;margin-bottom:0px;border-bottom:0px;") + ul.layui-tab-title + li#chat_his.layui-this 对话内容 + if summary + li#summary + | 服务小结 + #chat_msg_list.chat-message.chat_msg_list + if agentUserMessageList && agentUserMessageList.content + for chatmessage in pugHelper.reverse(agentUserMessageList.content) + .clearfix.chat-block + div(class=(chatmessage.userid && chatmessage.userid == user.id || chatmessage.calltype && chatmessage.calltype == '呼出' ? 'chat-right' : 'chat-left')) + img.user-img(alt="", src=(chatmessage.calltype && chatmessage.calltype == '呼出' ? '/images/agent.png' : curagentuser.headimgurl && curagentuser.headimgurl != '' ? curagentuser.headimgurl : '/images/im/user.png'), style="width:45px;height:45px;") + .chat-message + span.user= chatmessage.username + span.time + | #{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', chatmessage.createtime)} + div(class=(chatmessage.userid && chatmessage.userid == user.id || chatmessage.calltype && chatmessage.calltype == '呼出' ? 'chatting-right' : 'chatting-left')) + i.userarrow + .chat-content + include /apps/agent/media/message.pug + else if curagentuser + if curagentuser.status && curagentuser.status == "end" + #agentuser-curstatus.clearfix.chat-block.connect-end + span.connect-message 用户“#{curagentuser.username}”已经离开 + else + #agentuser-curstatus.clearfix.chat-block.connect-begin + span.connect-message 用户“#{curagentuser.username}”开始对话 + if summary + #summary_content.box(style="display:none;") + .box-body(style="padding:0px 10px;position: relative;padding-top:20px;") + ul.info-list + li 记录时间:#{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', summary.createtime)} + if summary.username + li 姓名:#{summary.username} + if summary.phone + li 电话:#{summary.phone} + if summary.email + li 邮件:#{summary.email} + if summary.resion + li 来访原因:#{summary.resion} + li + | 服务类型: + if summary.servicetype + for st in summary.servicetype.split(",") + if summaryTags + for tag in summaryTags + if st == tag.id + if st_index > 0 + | "," + #{tag.tag} + li + | 是否预约: + if summary.reservation + i.layui-icon(style="color:#19a55d;")  + li 预约方式:#{uKeFuDic[summary.reservtype].name} + li 预约时间:#{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', summary.reservtime)} + li + | 当前状态: + if summary.status && summary.status == "1" + i.layui-icon(style="color:#19a55d;")  + | 已处理 + else + | 未处理 + li 服务小结:#{summary.summary} +script(language='javascript'). + $('#chat_his').click(function () { + $('#summary_content').hide(); + $('#chat_msg_list').show(); + }) + $('#summary').click(function () { + $('#chat_msg_list').hide(); + $('#summary_content').show(); + }) + diff --git a/contact-center/app/src/main/resources/templates/apps/service/online/contacts.html b/contact-center/app/src/main/resources/templates/apps/service/online/contacts.html deleted file mode 100644 index a68359dd..00000000 --- a/contact-center/app/src/main/resources/templates/apps/service/online/contacts.html +++ /dev/null @@ -1,46 +0,0 @@ -<#if contacts??> -
                                      -
                                    • - 姓名:${contacts.name!''} -
                                    • -
                                    • - 性别: <#if contacts.gender?? && contacts.gender == '1'>男 - <#if contacts.gender?? && contacts.gender == '0'>女 - <#if contacts.gender?? && contacts.gender == '-1'>未知 -
                                    • -
                                    • - 生日:${contacts.cusbirthday!''} -
                                    • -
                                    • - 电话:${contacts.phone!''} -
                                    • -
                                    • - 手机:${contacts.mobile!''} -
                                    • -
                                    • - 邮件:${contacts.email!''} -
                                    • - -
                                    • - 地址:${contacts.address!''} -
                                    • -
                                    • - 类型:${uKeFuDic[contacts.ckind!''].name!''} -
                                    • - <#if contacts?? && contacts.touchtime??> -
                                    • - 获得时间:${contacts.touchtime?string('yyyy-MM-dd')} -
                                    • - -
                                    • - 备注:${contacts.memo!''} -
                                    • -
                                    -<#if models?seq_contains("workorders")> - - - diff --git a/contact-center/app/src/main/resources/templates/apps/service/online/contacts.pug b/contact-center/app/src/main/resources/templates/apps/service/online/contacts.pug new file mode 100644 index 00000000..89eff33e --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/service/online/contacts.pug @@ -0,0 +1,22 @@ +if contacts + ul.info-list + li.ukefu-channel-tip + | 姓名: + span.tgreen #{contacts.name} + li + | 性别: + if contacts.gender && contacts.gender == '1' + | 男 + if contacts.gender && contacts.gender == '0' + | 女 + if contacts.gender && contacts.gender == '-1' + | 未知 + li 生日:#{contacts.cusbirthday} + li 电话:#{contacts.phone} + li 手机:#{contacts.mobile} + li 邮件:#{contacts.email} + li 地址:#{contacts.address} + li 类型:#{uKeFuDic[contacts.ckind].name} + if contacts && contacts.touchtime + li 获得时间:#{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', contacts.touchtime)} + li 备注:#{contacts.memo} diff --git a/contact-center/app/src/main/resources/templates/apps/service/online/index.html b/contact-center/app/src/main/resources/templates/apps/service/online/index.html deleted file mode 100644 index 82bbe3e9..00000000 --- a/contact-center/app/src/main/resources/templates/apps/service/online/index.html +++ /dev/null @@ -1,288 +0,0 @@ - - - -
                                    -
                                    -
                                    -
                                    -

                                    - 访客视图 -

                                    -
                                    - -
                                    -

                                    - ${agentUser.username!''} - <#if contacts??>(${contacts.name!''}) -

                                    -
                                    - <#if agentUser?? && agentUser.createtime??>${agentUser.createtime?string("yyyy-MM-dd HH:mm:ss")} -
                                    -
                                    -
                                    - - -
                                    -
                                    -

                                    - 访问信息 - -

                                    -
                                    -
                                    - <#if agentUser.channel?? && agentUser.channel == "webim"> - <#include "/apps/agent/channel/webim.html"> - <#elseif agentUser.channel?? && agentUser.channel == "weixin"> - <#include "/apps/agent/channel/weixin.html"> - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    - -
                                    - -
                                    - ${agentUser.username!''}<#if onlineUser??>(${onlineUser.region!''})<#elseif weiXinUser??>(${weiXinUser.country} ${weiXinUser.province!''} ${weiXinUser.city!''}) -
                                    -
                                    - 访客视图-访客访问记录,访客咨询记录 -
                                    -
                                    -
                                    - -

                                    -
                                    -
                                    -
                                    -
                                      -
                                    • 咨询记录
                                    • -
                                    • 访问记录
                                    • - <#if contacts??> -
                                    • 联系人
                                    • - -
                                    -
                                    -
                                    - - - - - - - - - - - - - - <#if agentServiceList?? && agentServiceList?size gt 0> - <#list agentServiceList as agentService> - - - - - - - - - - - - - <#else> - - - - - -
                                    用户名接入渠道服务坐席访问时间咨询时间咨询时长状态
                                    - - ${agentService.username!''} - - - ${agentService.channel!''} - - ${agentService.agentusername!''} - title="${agentService.logindate?string('yyyy-MM-dd HH:mm:ss')}"> - <#if agentService.logindate??>${agentService.logindate?string('yyyy-MM-dd HH:mm:ss')} - title="${agentService.servicetime?string('yyyy-MM-dd HH:mm:ss')}"> - <#if agentService.servicetime??> - ${agentService.servicetime?string('yyyy-MM-dd HH:mm:ss')} - - - ${(agentService.sessiontimes/(1000*60*60))?string('00')}:${((agentService.sessiontimes%(1000*60*60))/(1000*60))?string('00')}:${((agentService.sessiontimes%(1000*60))/(1000))?string('00')} - - <#if agentService.status?? && agentService.status == 'inservice'> - 对话中 - <#else> - 已结束 - -
                                    -
                                    - -
                                    还没有历史会话
                                    -
                                    -
                                    -
                                    -
                                    - - - - - - - - - - - - - <#if onlineUserHistList?? && onlineUserHistList?size gt 0> - <#list onlineUserHistList as onlineuser> - - - - - - - - - - <#else> - - - - - -
                                    终端/操作系统/浏览器访问时间停留时间地域邀请拒绝
                                    - <#if onlineuser.mobile?? && onlineuser.mobile == "1"> - - <#else> - - - - <#if onlineuser.opersystem?? && onlineuser.opersystem == "windows"> - - <#elseif onlineuser.opersystem?? && onlineuser.opersystem == "linux"> - - <#elseif onlineuser.opersystem?? && onlineuser.opersystem == "mac"> - - - - ${onlineuser.browser!''} - <#if onlineuser.createtime??>${onlineuser.createtime?string('yyyy-MM-dd HH:mm:ss')} - ${(onlineuser.betweentime/(1000*60*60))?string('00')}:${((onlineuser.betweentime%(1000*60*60))/(1000*60))?string('00')}:${((onlineuser.betweentime%(1000*60))/(1000))?string('00')} - ${onlineuser.region!''}${onlineuser.invitetimes!''}${onlineuser.refusetimes!''}
                                    -
                                    - -
                                    还没有在线访客记录
                                    -
                                    -
                                    -
                                    -
                                    -

                                    - 联系人详细信息 -

                                    -
                                    - <#include "/apps/service/online/contacts.html"> -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - <#include "/apps/service/online/chatmsg.html"> -
                                    -
                                    -
                                    -
                                    - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/service/online/index.pug b/contact-center/app/src/main/resources/templates/apps/service/online/index.pug new file mode 100644 index 00000000..a27d66f6 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/service/online/index.pug @@ -0,0 +1,208 @@ +extends /apps/include/layout.pug +block content + style. + .beyond-hiding td { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + + .beyond-hiding th, .beyond-hiding td { + width: 70px; + padding: 9px 5px; + cursor: default; + } + + .layui-side.layui-bg-black + .layui-side-scroll + .row + .col-lg-12 + h1.site-h1 访客视图 + .box.ukefu-console(style='padding-top:0px !important;') + span.user-webim-icon + i.layui-icon.ukewo-btn(style='font-size:40px;')  + .ukefu-user-index + h1(title=agentUser.username + (contacts ? '(' + contacts.name + ')' : '') + , style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;overflow: hidden;") + | #{agentUser.username} + if contacts + | (#{contacts.name}) + .ukefu-join-time.ukefu-text-muted(title='访问时间') + if agentUser && agentUser.createtime + | #{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', agentUser.createtime)} + .box.ukefu-console + .ukefu-relation + span.ukefu-relation-item(lay-event, style='width:20%;') + | 咨询 + a.measure(href='/service/history/index.html') + if agentServiceList + | #{agentServiceList.size()} + span.ukefu-relation-item(lay-event) + | 邀请 + a.measure(href='/apps/onlineuser.html') + | #{inviteResult.users + inviteResult.inviteusers + inviteResult.refuseusers} + span.ukefu-relation-item(lay-event) + | 拒绝 + a.measure(href='/apps/onlineuser.html', style='color:red !important;')= inviteResult.refuseusers + .box.ukefu-console + .ukefu-relation + span.ukefu-relation-item(style='width:55%;') + | 平均会话时长 + a.measure(href='/service/history/index.html') + if agentServicesAvg + | #{pugHelper.padRight(agentServicesAvg / (1000 * 60 * 60), "00")}:#{pugHelper.padRight(agentServicesAvg / (1000 * 60 * 60) / (1000 * 60), "00")}:#{pugHelper.padRight(agentServicesAvg / (1000 * 60) / 1000, "00")} + else + | 00:00:00 + .box + .box-title + h1.site-h1(style='background-color:#EEEEEE;') + | 访问信息 + .box-body(style='padding:0px 10px;position: relative;') + if agentUser.channel && agentUser.channel == "webim" + include /apps/agent/channel/webim.pug + .layui-body.ukefu-chat-agent#ukefu-chat-agent + .main-agentuser(style='overflow-y:auto;') + .box + .box-title + h1.site-h1(style='border-top:1px solid #e6e6e6;height:50px;') + span.ukefu-bt + .ukefu-bt-text(style='width: 99%;padding-left: 0px;') + i.layui-icon.ukewo-btn(style='font-size:28px;margin-right: 10px')  + .ukefu-bt-text-title(title=agentUser.username + (onlineUser ? '(' + onlineUser.region + ')' : weiXinUser ? '(' + weiXinUser.country + weiXinUser.province + weiXinUser.city + ')' : ''), style='text-overflow: ellipsis;white-space: nowrap;overflow: hidden;') + | #{agentUser.username} + if onlineUser + | (#{onlineUser.region}) + .ukefu-bt-text-content(style='margin-top: 0px;line-height: 20px;') 访客视图-访客访问记录,访客咨询记录 + .box-body + .layui-tab + ul.layui-tab-title + li.layui-this 咨询记录 + li 访问记录 + if contacts + li 联系人 + .layui-tab-content + .layui-tab-item.layui-show + table.layui-table.beyond-hiding(lay-skin='line', style='word-wrap:break-word; word-break:break-all;table-layout: fixed') + thead + tr.design-sortable-tr + th 用户名 + th 接入渠道 + th 服务坐席 + th 访问时间 + th 咨询时间 + th 咨询时长 + th 状态 + tbody + if agentServiceList && agentServiceList.size() > 0 + for agentService in agentServiceList + tr(class=({ + "tdHasContorllor": true, + "design-dropable-td": true, + "ukefu-agentservice-list": true, + "ukefu-current-agentservice": curAgentService && curAgentService.id == agentService.id + })) + td(title=agentService.username) + a(href="/service/online/chatmsg.html?id=#{agentService.id}", data-toggle="load", data-target="#onlinecontent") + | #{agentService.username} + td(title=agentService.channel)= agentService.channel + td(title=agentService.agentusername)= agentService.agentusername + td(title="#{agentService.logindate ? (pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', agentService.logindate)) : ''}") + if agentService.logindate + | #{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', agentService.logindate)} + td(title="#{agentService.servicetime ? (pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', agentService.servicetime)) : ''}") + if agentService.servicetime + | #{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', agentService.servicetime)} + td.minSize + | #{pugHelper.padRight(agentService.sessiontimes / (1000 * 60 * 60), "00")}:#{pugHelper.padRight(agentService.sessiontimes / (1000 * 60 * 60) / (1000 * 60), "00")}:#{pugHelper.padRight(agentService.sessiontimes / (1000 * 60) / (1000), "00")} + td.minSize + if agentService.status && agentService.status == 'inservice' + small.ukefu-label.theme1(title="对话中") 对话中 + else + small.ukefu-label.theme1(title="访客已邀请") 已结束 + else + tr + td(colspan="7", style="height:400px;") + .ukefu-empty(style="background: none") + i.layui-icon  + div(style="") 还没有历史会话 + .layui-tab-item + table.layui-table(lay-skin='line') + thead + tr.design-sortable-tr + th(width='22%') 终端/操作系统/浏览器 + th(width='20%') 访问时间 + th 停留时间 + th 地域 + th 邀请 + th 拒绝 + tbody + if onlineUserHistList && onlineUserHistList.size() > 0 + for onlineuser in onlineUserHistList + tr.tdHasContorllor.design-dropable-td + td.ukefu-online-client + if onlineuser.mobile && onlineuser.mobile == "1" + i.kfont  + else + i.kfont  + if onlineuser.opersystem && onlineuser.opersystem == "windows" + i.kfont  + else if onlineuser.opersystem && onlineuser.opersystem == "linux" + i.kfont  + else if onlineuser.opersystem && onlineuser.opersystem == "mac" + i.kfont  + | #{onlineuser.browser} + td + if onlineuser.createtime + #{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', onlineuser.createtime)} + td.minSize + | #{pugHelper.padRight(onlineuser.betweentime / (1000 * 60 * 60), "00")}:#{pugHelper.padRight(onlineuser.betweentime / (1000 * 60 * 60) / (1000 * 60), "00")}:#{pugHelper.padRight(onlineuser.betweentime / (1000 * 60) / (1000), "00")} + td= onlineuser.region + td= onlineuser.invitetimes + td= onlineuser.refusetimes + else + tr + td(colspan="7", style="height:400px;") + .ukefu-empty(style="background: none") + i.layui-icon  + div(style="") 还没有在线访客记录 + .layui-tab-item + h1.site-h1 联系人详细信息 + .box.ukefu-console(style='padding-top:0px !important;') + include /apps/service/online/contacts.pug + .ukefu-chat-prop + .ukefu-prop-list + .layui-side-scroll#onlinecontent + include /apps/service/online/chatmsg.pug + script. + $('#tag').click(function () { + $('#taglist').show(); + }) + $('.tag-switch').click( + function () { + if ($('#tag_' + $(this).data("id")).length > 0) { + $('#tag_' + $(this).data("id")).remove(); + } else { + $("#tags").append( + "" + + $(this).data("name") + ""); + } + loadURL($(this).data("href")); + }); + $("#taglist").hover(null, function () { + $(this).hide(); + }); + $('.ukefu-agentservice-list').on("click", function () { + $('.ukefu-agentservice-list').removeClass("ukefu-current-agentservice"); + $(this).addClass("ukefu-current-agentservice"); + }); + $('.quick-reply').click(function () { + var target = $(this).data("id"); + if ($('#' + target).is(":hidden")) { + $('#' + target).show(); + } else { + $('#' + target).hide(); + } + }); + diff --git a/contact-center/app/src/main/resources/templates/apps/service/online/trace.html b/contact-center/app/src/main/resources/templates/apps/service/online/trace.html deleted file mode 100644 index bcc52cf3..00000000 --- a/contact-center/app/src/main/resources/templates/apps/service/online/trace.html +++ /dev/null @@ -1,64 +0,0 @@ -
                                    -
                                    -
                                    - - - - - - - - - - - - - <#if traceHisList?? && traceHisList.content?? && traceHisList.content?size gt 0> - <#list traceHisList.content as traceHis> - - - - - - - - - - - <#else> - - - - - -
                                    用户名终端/系统/浏览器访问时间离开时间地域标题
                                    - ${traceHis.username!''} - - <#if traceHis.mobile?? && traceHis.mobile == "1"> - - <#else> - - - <#if traceHis.ostype?? && traceHis.ostype == "windows"> - - <#elseif traceHis.ostype?? && traceHis.ostype == "linux"> - - <#elseif traceHis.ostype?? && traceHis.ostype == "mac"> - - - ${traceHis.browser!''} - <#if traceHis.createtime??>${traceHis.createtime?string('yyyy-MM-dd HH:mm:ss')}<#if traceHis.updatetime??>${traceHis.updatetime?string('yyyy-MM-dd HH:mm:ss')}${traceHis.country!''} - <#if traceHis.title?? && traceHis.title?length gt 15>${traceHis.title[0..15]}...<#else>${traceHis.title!''}
                                    -
                                    - -
                                    没有访问轨迹信息
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    diff --git a/contact-center/app/src/main/resources/templates/apps/service/online/trace.pug b/contact-center/app/src/main/resources/templates/apps/service/online/trace.pug new file mode 100644 index 00000000..99fd859b --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/service/online/trace.pug @@ -0,0 +1,39 @@ +include /mixins/client.mixin.pug + +.uk-layui-form + .box + .box-body + table.layui-table(lay-skin="line") + thead + tr.design-sortable-tr + th 用户名 + th 终端/系统/浏览器 + th 访问时间 + th 离开时间 + th 地域 + th 标题 + tbody + if traceHisList && traceHisList.content && !traceHisList.content.empty() + for traceHis in traceHisList.content + tr.tdHasContorllor.design-dropable-td + td.first_td_head= traceHis.username + td.ukefu-online-client + +device(traceHis.mobile) + | + +opersystem(traceHis.ostype) + | #{traceHis.browser} + td= pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', traceHis.createtime) + td= pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', traceHis.updatetime) + td= traceHis.country + td + a(href=traceHis.url, target="_blank", title=traceHis.title)= traceHis.title + + else + tr + td(colspan="20", style="height:400px;") + .ukefu-empty(style="background: none") + i.layui-icon  + div 没有访问轨迹信息 + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit="", lay-filter="formDemo", onclick="layer.close(layerwin);") 关闭 diff --git a/contact-center/app/src/main/resources/templates/apps/service/processed/index.html b/contact-center/app/src/main/resources/templates/apps/service/processed/index.html deleted file mode 100644 index f3fd66d3..00000000 --- a/contact-center/app/src/main/resources/templates/apps/service/processed/index.html +++ /dev/null @@ -1,246 +0,0 @@ -<#include "/public/macro.html"> -
                                    -
                                    - <#include "/apps/service/include/left.html"> -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    - 服务小结列表<#if summaryList??>(${summaryList.totalElements}) - -
                                    - - -
                                    -
                                    -

                                    - - - - - - - - - - - - - - - - - <#if summaryList?? && summaryList.content??> - <#list summaryList.content as summary> - - - - - - - - - - - - - - - -
                                    - - 访客服务坐席渠道服务时间服务类型是否预约预约方式预约时间操作
                                    - - - - ${summary.username!''} - - - ${summary.agentusername!''} - - ${summary.channel!''} - - ${summary.createtime?string('yyyy-MM-dd HH:mm:ss')} - - <#if summary.servicetype??> - <#list summary.servicetype?split(",") as st> - <#if tags??> - <#list tags as tag> - <#if st == tag.id> - <#if st_index gt 0>,${tag.tag!''} - - - - - - - - <#if summary.reservation> - - - - ${uKeFuDic[summary.reservtype!''].name!''} - - ${summary.reservtime!''} - - - - 再次处理 - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - - diff --git a/contact-center/app/src/main/resources/templates/apps/service/processed/index.pug b/contact-center/app/src/main/resources/templates/apps/service/processed/index.pug new file mode 100644 index 00000000..0cf9c2ad --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/service/processed/index.pug @@ -0,0 +1,183 @@ +extends /apps/include/layout.pug +include /mixins/client.mixin.pug + +block content + .layui-side.layui-bg-black + .layui-side-scroll + include /apps/service/include/left.pug + .layui-body + .layui-side-scroll + .row + .col-lg-12 + h1.site-h1(style='border-top:1px solid #e6e6e6;') + | 服务小结列表 #{summaryList && summaryList.totalElements ? "( " + summaryList.totalElements + ")": "(0)"} + span(style='float:right;') + .ukefu-bt-text-content(style='position: absolute;right: 5px;top: 0px;') + form.layui-form#search(name='search', action='/apps/agent/processed/index.html', method='get', style='float: left;margin-right:5px;') + .layui-form-item + .layui-inline(style='margin-right:5px;') + .layui-input-inline(style='width: auto;margin-right:0px;') + label.layui-form-label(style='width: auto;') 服务时间: + .layui-input-inline(style='width: auto;margin-right:0px;') + input#begin.layui-input.ukefu-input(name='begin', placeholder='开始时间', value= begin) + label.layui-form-label(style='width: auto;') ~ + .layui-input-inline(style='width: auto;margin-right:0px;') + input#end.layui-input.ukefu-input(name='end', placeholder='结束时间', value= end) + .layui-inline(style='margin-right:0px;') + .layui-input-inline(style='width: auto;margin-right:0px;') + .layui-input-inline(style='width: auto;margin-right:0px;') + button.layui-btn.layui-btn-small.layui-btn-original(style='color:#ffffff;') + i.layui-icon  + .layui-btn-group.ukefu-btn-group(style='margin-top:2px;') + button.layui-btn.layui-btn-small.dropdown-menu + i.kfont  + | 导出 + i.layui-icon  + ul.ukefu-dropdown-menu.layui-anim.layui-anim-upbit + li + a#batexp(href='javascript:void(0)', title='导出联系人', target='_blank') + i.kfont  + | 导出选中结果 + li + a(href='/apps/agent/processed/expsearch.html?1=1' + '&begin=' + begin + '&end=' + end + '&subtype=' + subtype, title='导出联系人', target='_blank') + i.kfont  + | 导出当前搜索结果 + li + a(href='/apps/agent/processed/expall.html', title='导出联系人', target='_blank') + i.kfont  + | 导出全部数据 + table.layui-table(lay-skin='line', style='table-layout: fixed;word-break: break-all;') + thead + tr.design-sortable-tr + th(width='10px') + input#all(type='checkbox', onclick='$(\'.ids\').prop(\'checked\' , $(this).prop(\'checked\'));') + th 访客 + th 服务坐席 + th 渠道 + th(style='min-width: 80px') 服务时间 + th 服务类型 + th 是否预约 + th 预约方式 + th(style='min-width: 80px') 预约时间 + th 操作 + tbody + if summaryList.content.size() + for summary in summaryList.content + tr.tdHasContorllor.design-dropable-td + td(style="width:1%;") + input(type="checkbox" class="ids" name="ids" value= summary.id) + td.ukefu-online-client(title= summary.username, style="text-overflow: ellipsis;white-space: nowrap;overflow: hidden;") + a(href="/service/online/index.html?userid=" + summary.userid + "&agentservice=" + summary.agentserviceid + "&id=" + summary.id) #{summary.username} + td(title= summary.agentusername, style="text-overflow: ellipsis;white-space: nowrap;overflow: hidden;") #{summary.agentusername} + td #{summary.channel} + td.minSize(style="width: 78px") #{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', summary.createtime)} + td + if summary.servicetype + for st,index in summary.servicetype.split(",") + if tags + for tag in tags + if st == tag.id + if index > 0 + | , + | #{tag.tag} + td + if summary.reservation + i.layui-icon(style="color:#19a55d;")  + td.minSize #{summary.reservtype ? uKeFuDic[summary.reservtype].name : ""} + td.minSize #{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', summary.reservtime)} + td.minSize + a(href="/apps/agent/processed/process.pug?id=" + summary.id, data-toggle="ajax", data-width="950", data-height="450", title="服务小结处理") + i.layui-icon  再次处理 + .row(style='padding:5px;') + .col-lg-12#page(style='text-align:center;') + script. + $(document).ready(function(){ + $('#batexp').click(function(){ + var ids = ""; + var num = 0 ; + $('.ids').each(function(){ + if($(this).prop("checked")){ + if(ids!=""){ + ids += "&" ; + } + ids += "ids=" + $(this).val(); + num++; + } + }); + if(num>0){ + $('#batexp').attr('href' , '/apps/agent/processed/expids.html?'+ids) ; + }else{ + top.layer.alert("请先选择需要导出的服务小结"); + $('#batexp').attr("href" , "javascript:void(0)"); + } + }); + + }); + var searchData = $("#search :input").serializeArray() + var searchCondition = ""; + $.each(searchData, function() { + searchCondition += '&'+this.name+'='+this.value + }); + layui.use(['laypage', 'layer'], function(){ + var laypage = layui.laypage + ,layer = layui.layer; + var laydate = layui.laydate; + laypage({ + cont: 'page' + ,pages: #{summaryList ? summaryList.totalPages : 0} //总页数 + ,curr: #{summaryList ? summaryList.number + 1 : 0} + ,groups: 5 //连续显示分页数 + ,jump:function(data , first){ + if(!first){ + location.href = "/apps/agent/processed/index.html?p="+data.curr + searchCondition; + } + } + }); + }); + + layui.use('laydate', function() { + var laydate = layui.laydate; + }); + + function getNowFormatDate() { + var date = new Date(); + var seperator = "-"; + var year = date.getFullYear(); + var month = date.getMonth() + 1; + var strDate = date.getDate(); + if (month >= 1 && month <= 9) { + month = "0" + month; + } + if (strDate >= 0 && strDate <= 9) { + strDate = "0" + strDate; + } + var currentdate = year + seperator + month + seperator + strDate; + return currentdate; + } + + var start = { + format: 'YYYY-MM-DD', + max:getNowFormatDate(),//默认最大值为当前日期 + istoday: true, + choose: function (datas) { + end.min = datas; //开始日选好后,重置结束日的最小日期 + } + }; + + var end = { + format: 'YYYY-MM-DD', + max:getNowFormatDate(),//默认最大值为当前日期 + istoday: true, + choose: function (datas) { + start.max = datas; //结束日选好后,重置开始日的最大日期 + } + }; + + document.getElementById('begin').onclick = function () { + start.elem = this; + laydate(start); + }; + document.getElementById('end').onclick = function () { + end.elem = this; + laydate(end); + }; \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/service/processed/process.html b/contact-center/app/src/main/resources/templates/apps/service/processed/process.html deleted file mode 100644 index 168703b6..00000000 --- a/contact-center/app/src/main/resources/templates/apps/service/processed/process.html +++ /dev/null @@ -1,205 +0,0 @@ -<#include "/public/macro.html"> -
                                    -
                                    - -
                                    - <#if contacts??> -
                                    -

                                    联系人信息

                                    -
                                    -
                                    -
                                    - -
                                    - ${contacts.name!''} -
                                    -
                                    -
                                    - -
                                    - ${contacts.email!''} -
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    - <#if contacts.gender?? && contacts.gender == "1">男 - <#if contacts.gender?? && contacts.gender == "0">女 - <#if contacts.gender?? && contacts.gender == "-1">未知 -
                                    -
                                    -
                                    -
                                    - -
                                    - ${contacts.cusbirthday!''} -
                                    -
                                    -
                                    - -
                                    -
                                    - -
                                    - ${contacts.phone!''} -
                                    -
                                    -
                                    - -
                                    - ${contacts.mobile!''} -
                                    -
                                    -
                                    - <#if contacts.address?? && contacts.address != ""> -
                                    -
                                    - -
                                    - ${contacts.address!''} -
                                    -
                                    -
                                    - -
                                    -
                                    - -
                                    -

                                    服务小结

                                    -
                                    -
                                    -
                                    - -
                                    - ${summary.username!''} -
                                    -
                                    - <#if summary.phone??> -
                                    - -
                                    - ${summary.phone!''} -
                                    -
                                    - -
                                    -
                                    -
                                    - -
                                    -
                                    - ${summary.createtime?string('yyyy-MM-dd HH:mm:ss')} -
                                    -
                                    -
                                    - <#if summary.email??> -
                                    - -
                                    -
                                    - ${summary.email!''} -
                                    -
                                    -
                                    - -
                                    -
                                    - <#if summary.resion??> -
                                    - -
                                    - ${summary.resion!''} -
                                    -
                                    - -
                                    -
                                    -
                                    - -
                                    - <#if summary.servicetype??> - <#list summary.servicetype?split(",") as st> - <#if summaryTags??> - <#list summaryTags as tag> - <#if st == tag.id> - <#if st_index gt 0>,${tag.tag!''} - - - - - -
                                    -
                                    -
                                    - -
                                    -
                                    - <#if summary.reservation> - - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    - ${uKeFuDic[summary.reservtype!''].name!''} -
                                    -
                                    -
                                    - -
                                    -
                                    - ${summary.reservtime!''} -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    - ${summary.summary!''} -
                                    -
                                    -
                                    -
                                  • - -
                                  • -
                                    -
                                    -
                                    -

                                    备注

                                    -
                                    -
                                    -
                                    - -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    - - -
                                    -
                                    -
                                    -
                                    - - diff --git a/contact-center/app/src/main/resources/templates/apps/service/processed/process.pug b/contact-center/app/src/main/resources/templates/apps/service/processed/process.pug new file mode 100644 index 00000000..429b03bb --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/service/processed/process.pug @@ -0,0 +1,115 @@ +.uk-layui-form + form.layui-form(action='/apps/agent/processed/save.html', method='post') + input(type='hidden', name='id', value= summary.id) + .layui-collapse + if contacts + .layui-colla-item + h2.layui-colla-title 联系人信息 + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label.layui-form-label(id="cusname") 联系人名称: + .layui-input-inline(style="padding:9px 0;") #{contacts.name} + .layui-inline.uckefu-inline + label.layui-form-label 电子邮件: + .layui-input-inline(style="padding:9px 0;") #{contacts.email} + .layui-form-item + .layui-inline + label.layui-form-label 性别: + .layui-input-inline + .layui-input-block(style="padding: 9px 0;") + if contacts.gender && contacts.gender == '1' + | 男 + if contacts.gender && contacts.gender == '0' + | 女 + if contacts.gender && contacts.gender == '-1' + | 未知 + .layui-inline.uckefu-inline + label.layui-form-label 生日: + .layui-input-inline(style="padding:9px 0;") #{contacts.cusbirthday} + .layui-form-item + .layui-inline + label.layui-form-label 联系电话: + .layui-input-inline(style="padding: 9px 0;") #{contacts.phone} + .layui-inline.uckefu-inline + label.layui-form-label 手机号: + .layui-input-inline(style="padding:9px 0;") #{contacts.mobile} + .layui-form-item + .layui-inline + label.layui-form-label 联系人地址: + .layui-input-inline(style="width: 664px;padding:9px 0;" ) #{contacts.address} + .layui-colla-item + h2.layui-colla-title 服务小结 + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label.layui-form-label#cusname 姓名: + .layui-input-inline(style='padding:9px 0;') #{summary.username} + if summary.phone + .layui-inline.uckefu-inline + label.layui-form-label 电话: + .layui-input-inline(style="padding:9px 0;") #{summary.phone} + .layui-form-item + .layui-inline + label.layui-form-label 记录时间: + .layui-input-inline + .layui-input-block(style='padding:9px 0;') #{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', summary.createtime)} + if summary.email + .layui-inline.uckefu-inline + label.layui-form-label 邮件: + .layui-input-inline + .layui-input-block(style="padding:9px 0;") #{summary.email} + .layui-form-item + if summary.resion + .layui-inline.uckefu-inline + label(layui-form-label) 来访原因: + .layui-input-inline(style="padding:9px 0;") #{summary.resion} + .layui-form-item + .layui-inline + label.layui-form-label 服务类型: + .layui-input-inline(style='padding:9px 0;') + if summary.servicetype + for st,index in summary.servicetype.split(",") + if summaryTags + for tag in summaryTags + if st == tag.id + if index > 0 + | , + | #{tag.tag} + .layui-inline.uckefu-inline + label.layui-form-label 是否预约: + .layui-input-inline + .layui-input-block(style='padding:9px 0;') + if summary.reservation + i.layui-icon(style="color:#19a55d;")  + .layui-form-item + .layui-inline + label.layui-form-label 预约方式: + .layui-input-inline(style='padding:9px 0;') #{summary.reservtype ? uKeFuDic[summary.reservtype].name : ""} + .layui-inline.uckefu-inline + label.layui-form-label 预约时间: + .layui-input-inline + .layui-input-block(style='padding:9px 0;') #{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', summary.reservtime)} + .layui-form-item + .layui-inline + label.layui-form-label 服务小结: + .layui-input-inline(style='padding:9px 0;width:640px;') #{summary.summary} + li. + .layui-colla-item + h2.layui-colla-title 备注 + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label.layui-form-label 处理备注: + .layui-input-inline(style='width: 664px;') + textarea.layui-textarea(name='processmemo', placeholder='请输入处理备注', style='resize:none;') #{summary.processmemo} + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 再次处理 + button.layui-btn.layui-btn-original(type='reset') 重置 + + script. + layui.use('element', function(){ + var element = layui.element(); + element.init(); + }); \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/service/quene/index.html b/contact-center/app/src/main/resources/templates/apps/service/quene/index.html deleted file mode 100644 index 6bc03332..00000000 --- a/contact-center/app/src/main/resources/templates/apps/service/quene/index.html +++ /dev/null @@ -1,98 +0,0 @@ -
                                    -
                                    - <#include "/apps/service/include/left.html"> -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    - 排队队列<#if agentUserList??>(${agentUserList.totalElements}) -

                                    - - - - - - - - - - - - - - <#if agentUserList?? && agentUserList.content?? && agentUserList.content?size gt 0> - <#list agentUserList.content as agentUser> - - - - - - - - - - - - <#else> - - - - - -
                                    用户名接入渠道技能组地域接入时间等待时长操作
                                    - - ${agentUser.username!''} - - - ${agentUser.channel!''} - ${agentUser.skillname!''}${agentUser.region!''}<#if agentUser.createtime??>${agentUser.createtime?string('yyyy-MM-dd HH:mm:ss')} - ${(agentUser.waittingtime/(1000*60*60))?string('00')}:${((agentUser.waittingtime%(1000*60*60))/(1000*60))?string('00')}:${((agentUser.waittingtime%(1000*60))/(1000))?string('00')} - - - - 转队列 - - - - 邀请对话 - - - 轨迹 - -
                                    -
                                    - -
                                    当前没有排队访客
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - - - diff --git a/contact-center/app/src/main/resources/templates/apps/service/quene/index.pug b/contact-center/app/src/main/resources/templates/apps/service/quene/index.pug new file mode 100644 index 00000000..f27d3cdd --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/service/quene/index.pug @@ -0,0 +1,68 @@ +extends /apps/include/layout.pug +include /mixins/client.mixin.pug +block content + .layui-side.layui-bg-black + .layui-side-scroll + include /apps/service/include/left.pug + .layui-body + .layui-side-scroll + .row + .col-lg-12 + h1.site-h1(style='border-top:1px solid #e6e6e6;') 排队队列 #{agentUserList.totalElements ? "(" + agentUserList.totalElements + ")" : "(0)"} + table.layui-table(lay-skin='line') + thead + tr.design-sortable-tr + th 用户名 + th 接入渠道 + th 技能组 + th 地域 + th 接入时间 + th 等待时长 + th(style='width:1%', nowrap) 操作 + tbody + if agentUserList.content.size() > 0 + for agentUser in agentUserList.content + tr.tdHasContorllor.design-dropable-td + td.first_td_head + a(href="/service/online/index.html?userid=" + agentUser.userid + "&channel=" + agentUser.channel) #{agentUser.username} + td #{agentUser.channel} + td #{agentUser.skillname} + td #{agentUser.region} + td #{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', agentUser.createtime)} + td #{pugHelper.padRight(agentUser.waittingtime / (1000*60*60), "00")}:#{pugHelper.padRight(agentUser.waittingtime % (1000*60*60) / (1000*60), "00")}:#{pugHelper.padRight(agentUser.waittingtime % (1000*60) / 1000, "00")} + td(style="width:1%" nowrap="nowrap") + a(href="/service/quene/transfer.html?id=" + agentUser.id + "&skillid=" + agentUser.skill, data-toggle="ajax", data-width="550", data-height="350", title="转队列") + i.kfont  + | 转队列 + a(href="/service/quene/invite.html?id=" + agentUser.id, data-toggle="tip", data-title="邀请对话会加入到您的对话列表中,请确认是否开始对话?", style="margin-left:10px;") + i.kfont  + | 邀请对话 + a(href="/service/trace.html?id=" + agentUser.sessionid, title="查看访客轨迹", data-toggle="ajax", data-width="1050", style="margin-left:10px;") + i.kfont  + | 轨迹 + else + tr + td(colspan="20" style="height:400px;") + .ukefu-empty(style="background: none") + i.layui-icon  + div(style="") 当前没有排队访客 + .row(style='padding:5px;') + .col-lg-12#page(style='text-align:center;') + script. + layui.use(['laypage', 'layer'], function(){ + var laypage = layui.laypage + ,layer = layui.layer; + + laypage({ + cont: 'page' + , pages: #{agentUserList ? agentUserList.totalPages : 0} //总页数 + , curr: #{agentUserList ? agentUserList.number + 1 : 0} + ,groups: 5 //连续显示分页数 + ,jump:function(data , first){ + if(!first){ + location.href = "/service/quene/index.html?p="+data.curr ; + } + } + }); + }); + diff --git a/contact-center/app/src/main/resources/templates/apps/service/quene/transfer.html b/contact-center/app/src/main/resources/templates/apps/service/quene/transfer.html deleted file mode 100644 index 3dc459be..00000000 --- a/contact-center/app/src/main/resources/templates/apps/service/quene/transfer.html +++ /dev/null @@ -1,52 +0,0 @@ -
                                    - -
                                    -
                                    -
                                    -
                                    -

                                    - 请选择技能组 -

                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    - - -
                                    -
                                    -
                                    -
                                    - - diff --git a/contact-center/app/src/main/resources/templates/apps/service/quene/transfer.pug b/contact-center/app/src/main/resources/templates/apps/service/quene/transfer.pug new file mode 100644 index 00000000..ddd86195 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/service/quene/transfer.pug @@ -0,0 +1,37 @@ +form.layui-form(action='/service/quene/transfer/save.html', method='post') + input(type='hidden', name='id', value='#{id}') + .row(style='height:295px;') + .col-lg-12 + .box + .box-title + h1.site-h1(style='background-color:#FFFFFF;margin:0px;padding:0 0 4px 20px;') 请选择技能组 + .box-body(style='padding:0px 0px;position: relative;height:250px;overflow-y:auto;') + select.ukefu-form-multiple(multiple, name='skillid') + if skillGroups + for skill in skillGroups + - var agentNum = 0 + if userList + for agent in userList + if skill.id && agent.organs[skill.id] + - agentNum = agentNum + 1 + option.uk_role(title= skill.name + "(" + agentNum + ")", class=({'this': skill.id == skillid}), style="margin:0px;padding:7px 0 7px 20px;color: #32c24d" value= skill.id) + span(style="max-width: 120px;text-overflow: ellipsis;white-space: nowrap; overflow: hidden;float: left;margin: 0 3px") #{skill.name} + | (#{agentNum}) + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='contactsForm') 转接 + button.layui-btn.layui-btn-original(type='button', onclick='closedPage()') 关闭 + script. + function closedPage(){ + layer.closeAll("page") + } + layui.use('form', function(){ + var form = layui.form(); + //监听提交 + form.on('submit(contactsForm)', function(data){ + if(!data.field.skillid){ + layer.msg("请选择技能组"); + return false + } + }); + }); \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/service/stats/coment.html b/contact-center/app/src/main/resources/templates/apps/service/stats/coment.html deleted file mode 100644 index f12ebd96..00000000 --- a/contact-center/app/src/main/resources/templates/apps/service/stats/coment.html +++ /dev/null @@ -1,175 +0,0 @@ - -
                                    -
                                    - <#include "/apps/service/include/left.html"> -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    - 满意度统计 -

                                    - -
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    - -
                                    - -
                                    - -
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    - <#include "/apps/service/stats/report.html"> -
                                    -
                                    -
                                    -
                                    - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/service/stats/coment.pug b/contact-center/app/src/main/resources/templates/apps/service/stats/coment.pug new file mode 100644 index 00000000..03c0e4d8 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/service/stats/coment.pug @@ -0,0 +1,154 @@ +extends /apps/include/layout.pug +include /mixins/client.mixin.pug + +block append head + style. + .ukefu-report{ + position: absolute; + margin-top: 10px; + width: auto; + } + .ukefu-report td{ + max-width:150px; + min-width:50px; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + } + +block content + .layui-side.layui-bg-black + .layui-side-scroll + include /apps/service/include/left.pug + .layui-body + .layui-side-scroll + .row + .col-lg-12 + h1.site-h1(style='border-top:1px solid #e6e6e6;') 满意度统计 + span + .ukefu-bt-text-content + form.layui-form(name='search', action='/service/stats/coment.html', method='get', style='float: left;margin-right:5px;') + .layui-form-item + .layui-inline(style='margin-right:0px;') + .layui-input-inline(style='width: auto;margin-right:0px;') + label.layui-form-label(style='width: auto;') 技能组: + .layui-input-inline(style='width: auto;margin-right:0px;') + select.ukefu-input#skill(name='skill', lay-ignore, onchange='renderAgentsByOrgan(this.value)') + option(value) 请选择技能组 + if skillGroups + for tpskill in skillGroups + option(value= tpskill.id, selected= (skill == tpskill.id ? "selected": false)) #{tpskill.name} + //<#if skillGroups??> + //<#list skillGroups as tpskill> + // + // + // + .layui-inline(style='margin-right:0px;') + .layui-input-inline(style='width: auto;margin-right:0px;') + label.layui-form-label(style='width: auto;') 坐席:#{agentskill} + .layui-input-inline(style='width: auto;margin-right:0px;') + select.ukefu-input#agent(name='agent', lay-ignore) + option(value) 请选择坐席 + if agentList + for useragent in agentList + option(value= useragent.id, selected= (agent == useragent.id ? "selected": false)) #{useragent.uname} + //<#if agentList??> + //<#list agentList as useragent> + // + // + // + .layui-inline(style='margin-right:5px;') + .layui-input-inline(style='width: auto;margin-right:0px;') + label.layui-form-label(style='width: auto;') 日期范围: + .layui-input-inline(style='width: auto;margin-right:0px;') + input.layui-input.ukefu-input#start_time(type='text', name='begin', value= begin, placeholder='开始时间') + label.layui-form-label(style='width: auto;') ~ + .layui-input-inline(style='width: auto;margin-right:0px;') + input.layui-input.ukefu-input#end_time(type='text', name='end', value= end, placeholder='结束时间') + .layui-inline(style='margin-right:0px;') + .layui-input-inline(style='width: auto;margin-right:0px;') + .layui-input-inline(style='width: auto;margin-right:0px;') + button.layui-btn.layui-btn-small.layui-btn-original(style='color:#ffffff;') + i.layui-icon  + .layui-btn-group.ukefu-btn-group(style='margin-top:2px;') + a(href='/service/stats/coment/exp.html?t=' + pugHelper.currentTimeMillis() + '&skill=' + skill + '&agent=' + agent + '&begin=' + begin + '&end=' + end) + button.layui-btn.layui-btn-small.dropdown-menu + i.kfont  + | 导出 + include /apps/service/stats/report.pug + + script(src='/js/CSKeFu_Rest_Request.v1.js') + script. + //Demo + layui.use('form', function(){ + var form = layui.form(); + form.render(); //更新全部 + }); + layui.use('laydate', function() { + var laydate = layui.laydate; + }); + + function getNowFormatDate() { + var date = new Date(); + var seperator = "-"; + var year = date.getFullYear(); + var month = date.getMonth() + 1; + var strDate = date.getDate(); + if (month >= 1 && month <= 9) { + month = "0" + month; + } + if (strDate >= 0 && strDate <= 9) { + strDate = "0" + strDate; + } + var currentdate = year + seperator + month + seperator + strDate; + return currentdate; + } + + var start = { + istime: true, + format: 'YYYY-MM-DD', + max:getNowFormatDate(),//默认最大值为当前日期 + istoday: true, + choose: function (datas) { + end.min = datas; //开始日选好后,重置结束日的最小日期 + } + }; + + var end = { + istime: true, + format: 'YYYY-MM-DD', + max:getNowFormatDate(),//默认最大值为当前日期 + istoday: true, + choose: function (datas) { + start.max = datas; //结束日选好后,重置开始日的最大日期 + } + }; + + document.getElementById('start_time').onclick = function () { + start.elem = this; + laydate(start); + }; + document.getElementById('end_time').onclick = function () { + end.elem = this; + laydate(end); + }; + function renderAgentsByOrgan(organid){ + restApiRequest({ + silent: true, + path: 'user', + data: { + ops: 'findByOrgan', + organ: organid + } + }).then(function(result){ + if(result.rc == 0){ + $("#agent").html(''); + for (var i=0 ; i' + result.data[i].uname + '') + }; + } + }, function(error){ + // 服务器异常 + top.layer.msg('服务器抽风,请稍后再试!', {icon: 2, offset: 'b', time: 3000}) + }) + } \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/service/stats/consult.html b/contact-center/app/src/main/resources/templates/apps/service/stats/consult.html deleted file mode 100644 index ca87d132..00000000 --- a/contact-center/app/src/main/resources/templates/apps/service/stats/consult.html +++ /dev/null @@ -1,174 +0,0 @@ - -
                                    -
                                    - <#include "/apps/service/include/left.html"> -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    - 客服坐席 - -
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    - -
                                    - -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    -

                                    - <#include "/apps/service/stats/report.html"> -
                                    -
                                    -
                                    -
                                    - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/service/stats/consult.pug b/contact-center/app/src/main/resources/templates/apps/service/stats/consult.pug new file mode 100644 index 00000000..994658a7 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/service/stats/consult.pug @@ -0,0 +1,156 @@ +extends /apps/include/layout.pug +include /mixins/client.mixin.pug + +block append head + style. + .ukefu-report{ + position: absolute; + margin-top: 10px; + width: auto; + } + .ukefu-report td{ + max-width:150px; + min-width:50px; + } + .layui-form-label{ + padding-left: 0px; + } + +block content + .layui-side.layui-bg-black + .layui-side-scroll + include /apps/service/include/left.pug + .layui-body + .layui-side-scroll + .row + .col-lg-12 + h1.site-h1(style='border-top:1px solid #e6e6e6;') + | 客服坐席 + span + .ukefu-bt-text-content + form.layui-form(name='search', action='/service/stats/agent.html', method='get', style='float: left;margin-right:5px;') + .layui-form-item + .layui-inline(style='margin-right:0px;') + .layui-input-inline(style='width: auto') + label.layui-form-label(style='width: auto;') 技能组: + .layui-input-inline(style='width: auto;margin-right:0px;') + select.ukefu-input#skill(name='skill', lay-ignore, onchange='renderAgentsByOrgan(this.value)') + option(value) 请选择技能组 + if skillGroups + for tpskill in skillGroups + option(value= tpskill.id, selected =(skill == tpskill.id ? "selected" : false)) #{tpskill.name} + //<#if skillGroups??> + //<#list skillGroups as tpskill> + // + // + // + .layui-inline(style='margin-right:0px;') + .layui-input-inline(style='width: auto;margin-right:0px;') + label.layui-form-label(style='width: auto;') 坐席: + .layui-input-inline(style='width: auto;margin-right:0px;') + select.ukefu-input#agent(name='agent', lay-ignore) + option(value) 请选择坐席 + if agentList + for useragent in agentList + option(value= useragent.id, selected= (agent == useragent.id ? "selected" : false)) #{useragent.uname} + //<#if agentList??> + //<#list agentList as useragent> + // + // + // + .layui-inline(style='margin-left:10px;') + .layui-input-inline(style='width: auto;margin-right:0px;') + label.layui-form-label(style='width: auto;') 日期范围: + .layui-input-inline(style='width: auto;margin-right:0px;') + input#start_time.layui-input.ukefu-input(name='begin', placeholder='开始日期', value= begin) + label.layui-form-label(style='width: auto;') ~ + .layui-input-inline(style='width: auto;margin-right:0px;') + input#end_time.layui-input.ukefu-input(name='end', placeholder='结束日期', value= end) + .layui-inline(style='margin-right:0px;') + .layui-input-inline(style='width: auto;margin-right:0px;') + .layui-input-inline(style='width: auto;margin-right:0px;') + button.layui-btn.layui-btn-small.layui-btn-original(type='submit', style='color:#ffffff;') + i.layui-icon  + .layui-btn-group.ukefu-btn-group(style='margin-top:2px;') + a(href='/service/stats/agent/exp.html?t=' + pugHelper.currentTimeMillis() + '&skill=' + skill + '&agent=' + agent + '&begin=' + begin + '&end=' + end) + button.layui-btn.layui-btn-small.dropdown-menu + i.kfont  + | 导出 + include /apps/service/stats/report.pug + + script(src='/js/CSKeFu_Rest_Request.v1.js') + script. + //Demo + layui.use('form', function(){ + var form = layui.form(); + form.render(); //更新全部 + }); + layui.use('laydate', function() { + var laydate = layui.laydate; + }); + + function getNowFormatDate() { + var date = new Date(); + var seperator = "-"; + var year = date.getFullYear(); + var month = date.getMonth() + 1; + var strDate = date.getDate(); + if (month >= 1 && month <= 9) { + month = "0" + month; + } + if (strDate >= 0 && strDate <= 9) { + strDate = "0" + strDate; + } + var currentdate = year + seperator + month + seperator + strDate; + return currentdate; + } + + var start = { + istime: true, + format: 'YYYY-MM-DD', + max:getNowFormatDate(),//默认最大值为当前日期 + istoday: true, + choose: function (datas) { + end.min = datas; //开始日选好后,重置结束日的最小日期 + } + }; + + var end = { + istime: true, + format: 'YYYY-MM-DD', + max:getNowFormatDate(),//默认最大值为当前日期 + istoday: true, + choose: function (datas) { + start.max = datas; //结束日选好后,重置开始日的最大日期 + } + }; + + document.getElementById('start_time').onclick = function () { + start.elem = this; + laydate(start); + }; + document.getElementById('end_time').onclick = function () { + end.elem = this; + laydate(end); + }; + + function renderAgentsByOrgan(organid){ + restApiRequest({ + silent: true, + path: 'user', + data: { + ops: 'findByOrgan', + organ: organid + } + }).then(function(result){ + if(result.rc == 0){ + $("#agent").html(''); + for (var i=0 ; i' + result.data[i].uname + '') + }; + } + }, function(error){ + // 服务器异常 + top.layer.msg('服务器抽风,请稍后再试!', {icon: 2, offset: 'b', time: 3000}) + }) + } \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/service/stats/report.html b/contact-center/app/src/main/resources/templates/apps/service/stats/report.html deleted file mode 100644 index db040b4c..00000000 --- a/contact-center/app/src/main/resources/templates/apps/service/stats/report.html +++ /dev/null @@ -1,64 +0,0 @@ - - - <#if reportData?? && reportData.col?? && reportData.col.title??> - <#list reportData.col.title as tlist> - - <#if reportData.col.title?size gt 1 && tlist_index==0 && reportData.row.title?size gt 0> - - - <#if (tlist_index+1)==reportData.col.title?size && reportData.row?? && reportData.row.firstTitle??> - <#list reportData.row.firstTitle as first> - - - - <#if tlist??> - <#list tlist as tl> - - - - - - - - - <#if reportData?? && reportData.data??> - <#list reportData.data as values> - - <#if reportData.row?? && reportData.row.title?? && reportData.row.title?size gt 0> - <#list reportData.row.title as tl> - <#assign rows=0> - <#list tl as title> - <#if title??> - <#if rows==values_index && title.name !="TOTAL_TEMP"> - <#if title.leveltype !="newrow_extend_sum"> - - - <#if title.valueData??> - <#list title.valueData as value> - <#if value.merge==false> - - - - - - <#assign rows=rows + title.rowspan> - - - - <#else> - <#list values as value> - - - - - - - -
                                    ${first.rename!first.name!''} - <#if first.description??> - - rowspan="${reportData.col.title?size}"colspan="${tl.colspan}" > ${tl.rename!tl.name!""} -
                                    colspan="${title.colspan}"> - ${title.formatName!''}data-cellmerge="${value.cellmergeid}"> - ${value.valueStyle!value.foramatValue!''} - ${value.valueStyle!value.foramatValue!''}
                                    \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/service/stats/report.pug b/contact-center/app/src/main/resources/templates/apps/service/stats/report.pug new file mode 100644 index 00000000..1bdf8f99 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/service/stats/report.pug @@ -0,0 +1,39 @@ +table.layui-table.ukefu-report + thead + if reportData.col.title.size() > 0 + for tlist in reportData.col.title + tr.sortableTr + if reportData.col.title.size() > 1 && tlist_index == 0 && reportData.row.title.size() > 0 + td.s_blue(align="center", colspan= reportData.row.title.size(), rowspan= reportData.col.title.size() - 1) + if (tlist_index + 1) == reportData.col.title.size() && reportData.row.firstTitle + for first in reportData.row.firstTitle + td(align="center", data-title= "#{first.name ? first.name : url}", data-flag="dim") #{first.rename ? first.rename : first.name} + if first.description + img(style="cursor: pointer;", onclick="showHelpMsg(this)", title="维度描述", width="10", height="10", src="/assets/images/help.png") + textarea(style="display: none") #{first.description} + if tlist + for tl in tlist + td(align="center", rowspan= (tl.leveltype && tl.leveltype == "newcol" ? reportData.col.title.size() : "0"), colspan= tl.colspan) #{tl.rename ? tl.rename : tl.name} + tbody + if reportData.data.size() > 0 + for values,index in reportData.data + tr.rowcell + if reportData.row.title.size() > 0 + for tl in reportData.row.title + - var rows = 0 + for title in tl + if title + if rows == index && title.name != "TOTAL_TEMP" + if title.leveltype != "newrow_extend_sum" + td.blue_k(title= title.formatName, style="text-overflow: ellipsis; white-space: nowrap; overflow: hidden;", nowrap="nowrap", align="center", class=({"total": title.total == true}), rowspan= title.rowspan, colspan= (title.colspan > 1 ? title.colspan : 0)) #{title.formatName} + if title.valueData + for value in title.valueData + if value.merge == false + td.measure(rowspan=value.rowspan, colspan=value.colspan align="center" class=value.vtclass, nowrap="nowrap", data-cellmerge=value.cellmergeid) #{value.valueStyle ? value.valueStyle : value.foramatValue} + - rows=rows + title.rowspan + else + for value in values + td.row(style=({ + "text-align": "right", + "background-color": (value.valueType && value.valueType == 'total' ? "#c5daed" : "") + })) #{value.valueStyle ? value.valueStyle : value.foramatValue} uuuuu \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/service/summary/index.html b/contact-center/app/src/main/resources/templates/apps/service/summary/index.html deleted file mode 100644 index 31949a18..00000000 --- a/contact-center/app/src/main/resources/templates/apps/service/summary/index.html +++ /dev/null @@ -1,242 +0,0 @@ -<#include "/public/macro.html"> -
                                    -
                                    - <#include "/apps/service/include/left.html"> -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    - 服务小结列表<#if summaryList??>(${summaryList.totalElements}) - -
                                    - - -
                                    -
                                    -

                                    - - - - - - - - - - - - - - - - - <#if summaryList?? && summaryList.content??> - <#list summaryList.content as summary> - - - - - - - - - - - - - - - -
                                    - - 访客服务坐席渠道服务时间服务类型是否预约预约方式预约时间操作
                                    - - - - ${summary.username!''} - - - ${summary.agentusername!''} - - ${summary.channel!''} - - ${summary.createtime?string('yyyy-MM-dd HH:mm:ss')} - - <#if summary.servicetype??> - <#list summary.servicetype?split(",") as st> - <#if tags??> - <#list tags as tag> - <#if st == tag.id> - <#if st_index gt 0>,${tag.tag!''} - - - - - - - - <#if summary.reservation> - - - - ${uKeFuDic[summary.reservtype!''].name!''} - - ${summary.reservtime!''} - - - - 处理 - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - - diff --git a/contact-center/app/src/main/resources/templates/apps/service/summary/index.pug b/contact-center/app/src/main/resources/templates/apps/service/summary/index.pug new file mode 100644 index 00000000..c20ccf0d --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/service/summary/index.pug @@ -0,0 +1,182 @@ +extends /apps/include/layout.pug +include /mixins/client.mixin.pug + +block content + .layui-side.layui-bg-black + .layui-side-scroll + include /apps/service/include/left.pug + .layui-body + .layui-side-scroll + .row + .col-lg-12 + h1.site-h1(style='border-top:1px solid #e6e6e6;') + | 服务小结列表 #{summaryList.totalElements ?"(" + summaryList.totalElements + ")" : "(0)"} + span(style='float:right;') + .ukefu-bt-text-content(style='position: absolute;right: 5px;top: 0px;') + form.layui-form#search(name='search', action='/apps/agent/summary/index.html', method='get', style='float: left;margin-right:5px;') + .layui-form-item + .layui-inline(style='margin-right:5px;') + .layui-input-inline(style='width: auto;margin-right:0px;') + label.layui-form-label(style='width: auto;') 服务时间: + .layui-input-inline(style='width: auto;margin-right:0px;') + input#begin.layui-input.ukefu-input(name='begin', placeholder='开始时间', value= begin) + label.layui-form-label(style='width: auto;') ~ + .layui-input-inline(style='width: auto;margin-right:0px;') + input#end.layui-input.ukefu-input(name='end', placeholder='结束时间', value= end) + .layui-inline(style='margin-right:0px;') + .layui-input-inline(style='width: auto;margin-right:0px;') + .layui-input-inline(style='width: auto;margin-right:0px;') + button.layui-btn.layui-btn-small.layui-btn-original(style='color:#ffffff;') + i.layui-icon  + .layui-btn-group.ukefu-btn-group(style='margin-top:2px;') + button.layui-btn.layui-btn-small.dropdown-menu + i.kfont  + | 导出 + + i.layui-icon  + ul.ukefu-dropdown-menu.layui-anim.layui-anim-upbit + li + a#batexp(href='javascript:void(0)', title='导出联系人', target='_blank') + i.kfont  + | 导出选中结果 + li + a(href='/apps/agent/summary/expsearch.html?1=1&begin=' + begin + '&end=' + end + '&subtype=' + subtype, title='导出联系人', target='_blank') + i.kfont  + | 导出当前搜索结果 + li + a(href='/apps/agent/summary/expall.html', title='导出联系人', target='_blank') + i.kfont  + | 导出全部数据 + table.layui-table(lay-skin='line', style='table-layout: fixed;') + thead + tr.design-sortable-tr + th(width='10px') + input#all(type='checkbox', onclick='$(\'.ids\').prop(\'checked\' , $(this).prop(\'checked\'));') + th 访客 + th 服务坐席 + th 渠道 + th(style='min-width: 80px') 服务时间 + th 服务类型 + th 是否预约 + th 预约方式 + th(style='min-width: 80px') 预约时间 + th 操作 + tbody(style='table-layout: fixed; word-break: break-all;') + if summaryList && summaryList.content + for summary in summaryList.content + tr.tdHasContorllor.design-dropable-td + td(style="width:1%;") + input(type="checkbox" class="ids" name="ids" value= summary.id) + td.ukefu-online-client(title= summary.username, style="text-overflow: ellipsis;white-space: nowrap;overflow: hidden;") + a(href="/service/online/index.html?userid=" + summary.userid + "&agentservice=" + summary.agentserviceid + "&id=" + summary.id) #{summary.username} + td(title= summary.agentusername, style="text-overflow: ellipsis;white-space: nowrap;overflow: hidden;") #{summary.agentusername} + td #{summary.channel} + td #{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', summary.createtime)} + td + if summary.servicetype + for st,index in summary.servicetype.split(",") + if tags + for tag in tags + if st == tag.id + if index > 0 + | , + | #{tag.tag} + td + if summary.reservation + i.layui-icon(style="color:#19a55d;")  + td.minSize #{summary.reservtype ? uKeFuDic[summary.reservtype].name : ""} + td.minSize #{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', summary.reservtime)} + td.minSize + a(href="/apps/agent/summary/process.pug?id=" + summary.id, data-toggle="ajax", data-width="950", data-height="450", title="服务小结处理") + i.layui-icon  处理 + .row(style='padding:5px;') + .col-lg-12#page(style='text-align:center;') + + script. + $(document).ready(function(){ + $('#batexp').click(function(){ + var ids = ""; + var num = 0 ; + $('.ids').each(function(){ + if($(this).prop("checked")){ + if(ids!=""){ + ids += "&" ; + } + ids += "ids=" + $(this).val(); + num++; + } + }); + if(num>0){ + $('#batexp').attr('href' , '/apps/agent/summary/expids.html?'+ids) ; + }else{ + top.layer.alert("请先选择需要导出的服务小结"); + $('#batexp').attr("href" , "javascript:void(0)"); + } + }); + }); + var searchData = $("#search :input").serializeArray() + var searchCondition = ""; + $.each(searchData, function() { + searchCondition += '&'+this.name+'='+this.value + }); + + layui.use(['laypage', 'layer'], function(){ + var laypage = layui.laypage + ,layer = layui.layer; + var laydate = layui.laydate; + laypage({ + cont: 'page' + , pages: #{summaryList ? summaryList.totalPages : 0} //总页数 + , curr: #{summaryList ? summaryList.number + 1 : 0} + ,groups: 5 //连续显示分页数 + ,jump:function(data , first){ + if(!first){ + location.href = "/apps/agent/summary/index.html?p="+data.curr+searchCondition; + } + } + }); + }); + + layui.use('laydate', function() { + var laydate = layui.laydate; + }); + function getNowFormatDate() { + var date = new Date(); + var seperator = "-"; + var year = date.getFullYear(); + var month = date.getMonth() + 1; + var strDate = date.getDate(); + if (month >= 1 && month <= 9) { + month = "0" + month; + } + if (strDate >= 0 && strDate <= 9) { + strDate = "0" + strDate; + } + var currentdate = year + seperator + month + seperator + strDate; + return currentdate; + } + var start = { + format: 'YYYY-MM-DD', + max:getNowFormatDate(),//默认最大值为当前日期 + istoday: true, + choose: function (datas) { + end.min = datas; //开始日选好后,重置结束日的最小日期 + } + }; + var end = { + format: 'YYYY-MM-DD', + max:getNowFormatDate(),//默认最大值为当前日期 + istoday: true, + choose: function (datas) { + start.max = datas; //结束日选好后,重置开始日的最大日期 + } + }; + document.getElementById('begin').onclick = function () { + start.elem = this; + laydate(start); + }; + document.getElementById('end').onclick = function () { + end.elem = this; + laydate(end); + }; + diff --git a/contact-center/app/src/main/resources/templates/apps/service/summary/process.html b/contact-center/app/src/main/resources/templates/apps/service/summary/process.html deleted file mode 100644 index 15cd3505..00000000 --- a/contact-center/app/src/main/resources/templates/apps/service/summary/process.html +++ /dev/null @@ -1,205 +0,0 @@ -<#include "/public/macro.html"> -
                                    -
                                    - -
                                    - <#if contacts??> -
                                    -

                                    联系人信息

                                    -
                                    -
                                    -
                                    - -
                                    - ${contacts.name!''} -
                                    -
                                    -
                                    - -
                                    - ${contacts.email!''} -
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    - <#if contacts.gender?? && contacts.gender == "1">男 - <#if contacts.gender?? && contacts.gender == "0">女 - <#if contacts.gender?? && contacts.gender == "-1">未知 -
                                    -
                                    -
                                    -
                                    - -
                                    - ${contacts.cusbirthday!''} -
                                    -
                                    -
                                    - -
                                    -
                                    - -
                                    - ${contacts.phone!''} -
                                    -
                                    -
                                    - -
                                    - ${contacts.mobile!''} -
                                    -
                                    -
                                    - <#if contacts.address?? && contacts.address != ""> -
                                    -
                                    - -
                                    - ${contacts.address!''} -
                                    -
                                    -
                                    - -
                                    -
                                    - -
                                    -

                                    服务小结

                                    -
                                    -
                                    -
                                    - -
                                    - ${summary.username!''} -
                                    -
                                    - <#if summary.phone??> -
                                    - -
                                    - ${summary.phone!''} -
                                    -
                                    - -
                                    -
                                    -
                                    - -
                                    -
                                    - ${summary.createtime?string('yyyy-MM-dd HH:mm:ss')} -
                                    -
                                    -
                                    - <#if summary.email??> -
                                    - -
                                    -
                                    - ${summary.email!''} -
                                    -
                                    -
                                    - -
                                    -
                                    - <#if summary.resion??> -
                                    - -
                                    - ${summary.resion!''} -
                                    -
                                    - -
                                    -
                                    -
                                    - -
                                    - <#if summary.servicetype??> - <#list summary.servicetype?split(",") as st> - <#if summaryTags??> - <#list summaryTags as tag> - <#if st == tag.id> - <#if st_index gt 0>,${tag.tag!''} - - - - - -
                                    -
                                    -
                                    - -
                                    -
                                    - <#if summary.reservation> - - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    - ${uKeFuDic[summary.reservtype!''].name!''} -
                                    -
                                    -
                                    - -
                                    -
                                    - ${summary.reservtime!''} -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    - ${summary.summary!''} -
                                    -
                                    -
                                    -
                                  • - -
                                  • -
                                    -
                                    -
                                    -

                                    备注

                                    -
                                    -
                                    -
                                    - -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    - - -
                                    -
                                    -
                                    -
                                    - - diff --git a/contact-center/app/src/main/resources/templates/apps/service/summary/process.pug b/contact-center/app/src/main/resources/templates/apps/service/summary/process.pug new file mode 100644 index 00000000..22f6a60b --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/service/summary/process.pug @@ -0,0 +1,131 @@ +.uk-layui-form + form.layui-form(action='/apps/agent/summary/save.html', method='post') + input(type='hidden', name='id', value=summary.id) + .layui-collapse + if contacts + .layui-colla-item + h2.layui-colla-title 联系人信息 + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label.layui-form-label#cusname 联系人名称: + .layui-input-inline(style='padding:9px 0;') + | #{contacts.name} + .layui-inline.uckefu-inline + label.layui-form-label 电子邮件: + .layui-input-inline(style='padding:9px 0;') + | #{contacts.email} + .layui-form-item + .layui-inline + label.layui-form-label 性别: + .layui-input-inline + .layui-input-block(style='padding:9px 0;') + if contacts.gender && contacts.gender == '1' + | 男 + if contacts.gender && contacts.gender == '0' + | 女 + if contacts.gender && contacts.gender == '-1' + | 未知 + .layui-inline.uckefu-inline + label.layui-form-label 生日: + .layui-input-inline(style='padding:9px 0;') + | #{contacts.cusbirthday} + .layui-form-item + .layui-inline + label.layui-form-label 联系电话: + .layui-input-inline(style='padding:9px 0;') + | #{contacts.phone} + .layui-inline.uckefu-inline + label.layui-form-label 手机号: + .layui-input-inline(style='padding:9px 0;') + | #{contacts.mobile} + if contacts.address && contacts.address != "" + .layui-form-item + .layui-inline + label.layui-form-label 联系人地址: + .layui-input-inline(style="width: 664px;padding:9px 0;") + | #{contacts.address} + .layui-colla-item + h2.layui-colla-title 服务小结 + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label.layui-form-label#cusname 姓名: + .layui-input-inline(style='padding:9px 0;') + | #{summary.username} + if summary.phone + .layui-inline.uckefu-inline + label.layui-form-label 电话: + .layui-input-inline(style='padding:9px 0;') + | #{summary.phone} + .layui-form-item + .layui-inline + label.layui-form-label 记录时间: + .layui-input-inline + .layui-input-block(style='padding:9px 0;') + | #{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', summary.createtime)} + if summary.email + .layui-inline.uckefu-inline + label.layui-form-label 邮件: + .layui-input-inline + .layui-input-block(style="padding:9px 0;") + | #{summary.email} + .layui-form-item + if summary.resion + .layui-inline.uckefu-inline + label.layui-form-label 来访原因: + .layui-input-inline(style="padding:9px 0;") + | #{summary.resion} + .layui-form-item + .layui-inline + label.layui-form-label 服务类型: + .layui-input-inline(style='padding:9px 0;') + if summary.servicetype + for st,index in summary.servicetype.split(",") + if summaryTags + for tag in summaryTags + if st == tag.id + if index > 0 + | , + | #{tag.tag} + .layui-inline.uckefu-inline + label.layui-form-label 是否预约: + .layui-input-inline + .layui-input-block(style='padding:9px 0;') + if summary.reservation + i.layui-icon(style="color:#19a55d;")  + .layui-form-item + .layui-inline + label.layui-form-label 预约方式: + .layui-input-inline(style='padding:9px 0;') + | #{uKeFuDic[summary.reservtype].name} + .layui-inline.uckefu-inline + label.layui-form-label 预约时间: + .layui-input-inline + .layui-input-block(style='padding:9px 0;') + | #{pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', summary.reservtime)} + + .layui-form-item + .layui-inline + label.layui-form-label 服务小结: + .layui-input-inline(style='padding:9px 0;width:640px;') + | #{summary.summary} + li. + .layui-colla-item + h2.layui-colla-title 备注 + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label.layui-form-label 处理备注: + .layui-input-inline(style='width: 664px;') + textarea.layui-textarea(name='processmemo', placeholder='请输入处理备注', style='resize:none;') + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 标记为已处理 + button.layui-btn.layui-btn-original(type='reset') 重置 +script. + layui.use('element', function () { + var element = layui.element(); + element.init(); + }); + diff --git a/contact-center/app/src/main/resources/templates/apps/service/summary/processed.html b/contact-center/app/src/main/resources/templates/apps/service/summary/processed.html deleted file mode 100644 index 62060117..00000000 --- a/contact-center/app/src/main/resources/templates/apps/service/summary/processed.html +++ /dev/null @@ -1,201 +0,0 @@ -<#include "/public/macro.html"> -
                                    -
                                    - <#include "/apps/service/include/left.html"> -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    - 已处理服务小结列表<#if summaryList??>(${summaryList.totalElements}) - -
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    - -
                                    - -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    - -
                                    -
                                    - -
                                    -
                                    -

                                    - - - - - - - - - - - - - - - - <#if summaryList?? && summaryList.content??> - <#list summaryList.content as summary> - - - - - - - - - - - - - - -
                                    - - 主叫号码被叫号码拨打时间服务类型是否预约预约方式预约时间操作
                                    - - - - ${summary.ani!''} - - - ${summary.called!''} - - ${summary.createtime?string('yyyy-MM-dd HH:mm:ss')} - - <#if tags??> - <#list tags as tag> - <#if summary.servicetype?? && summary.servicetype?index_of(tag.id) gte 0> - ${tag.tag!''} - - - - - <#if summary.reservation> - - - - ${uKeFuDic[summary.reservtype!''].name!''} - - ${summary.reservtime!''} - - - - 再次处理 - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - - diff --git a/contact-center/app/src/main/resources/templates/apps/service/user/index.html b/contact-center/app/src/main/resources/templates/apps/service/user/index.html deleted file mode 100644 index 4f160892..00000000 --- a/contact-center/app/src/main/resources/templates/apps/service/user/index.html +++ /dev/null @@ -1,93 +0,0 @@ -
                                    -
                                    - <#include "/apps/service/include/left.html"> -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    - 全部坐席<#if userList??>(${userList.totalElements!''}) -

                                    -
                                    -
                                    - - - - - - - - - - - - - - - - - - - - - - - <#if userList?? && userList.content??> - <#list userList.content as user> - - - - - - - - - - - -
                                    用户姓名电子邮件手机在线注册时间
                                    - - -
                                    - ${user.username!''} -
                                    - ${user.updatetime!''} -
                                    -
                                    -
                                    - -
                                    ${user.uname!''}${user.email!''}${user.mobile!''} - <#if onlines[user.id]?? && onlines[user.id]> - - - ${user.createtime!''}
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/service/user/index.pug b/contact-center/app/src/main/resources/templates/apps/service/user/index.pug new file mode 100644 index 00000000..9f10e8ac --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/service/user/index.pug @@ -0,0 +1,67 @@ +extends /apps/include/layout.pug + +block content + .layui-side.layui-bg-black + .layui-side-scroll + include /apps/service/include/left.pug + .layui-body + .layui-side-scroll + .row + .col-lg-12 + h1.site-h1(style='background-color:#FFFFFF;') 全部坐席 #{userList && userList.totalElements ? "( " + userList.totalElements + ")": "(0)"} + .row(style='padding:5px;') + .col-lg-12 + table.layui-table(lay-skin='line') + colgroup + col(width='20%') + col(width='15%') + col(width='25%') + col(width='15%') + col(width='10%') + col(width='15%') + col(width='1%') + col + thead + tr + th 用户 + th 姓名 + th 电子邮件 + th 手机 + th 在线 + th 注册时间 + tbody + if userList.content.size() > 0 + for user in userList.content + tr + td + a(href="") + i.layui-icon.headimg  + div(style="margin-left:50px;margin-top:0px;") #{user.username} + div(style="color:#aaaaaa;font-size:12px;")= pugHelper.formatDate("yyyy-MM-dd HH:mm:ss", user.updatetime) + td #{user.uname} + td #{user.email} + td #{user.mobile} + td + if onlines[user.id] && onlines[user.id] + i.layui-icon(style="color:#19a55d;")  + td= pugHelper.formatDate("yyyy-MM-dd HH:mm:ss", user.createtime) + .row(style='padding:5px;') + .col-lg-12#page(style='text-align:center;') + + script. + layui.use(['laypage', 'layer'], function(){ + var laypage = layui.laypage + ,layer = layui.layer; + + laypage({ + cont: 'page' + ,pages: #{userList ? userList.totalPages : 0} //总页数 + ,curr: #{userList ? userList.number + 1 : 0} + ,groups: 5 //连续显示分页数 + ,jump:function(data , first){ + if(!first){ + location.href = "/service/user/index.html?p=" + data.curr; + } + } + }); + }); \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/setting/agent/acd.html b/contact-center/app/src/main/resources/templates/apps/setting/agent/acd.html deleted file mode 100644 index df87c10c..00000000 --- a/contact-center/app/src/main/resources/templates/apps/setting/agent/acd.html +++ /dev/null @@ -1,119 +0,0 @@ -
                                    -
                                    -
                                    - <#include "/apps/setting/include/left.html"/>
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    - ACD策略(坐席分配策略)<#if userList??>(${userList.totalElements!''}) - - - -

                                    -
                                    -
                                    - - - - - - - - - - - - - - - - - - - - - - - - <#if userList?? && userList.content??> - <#list userList.content as user> - - - - - - - - - - - <#else> - - - - - -
                                    用户姓名电子邮件手机坐席注册时间操作
                                    - - -
                                    - ${user.username!''} -
                                    - 系统管理员 -
                                    -
                                    -
                                    - -
                                    ${user.uname!''}${user.email!''}${user.mobile!''} - <#if user.agent> - - - ${user.createtime!''} - - - 编辑 - - - - 删除 - -
                                    -
                                    - -
                                    还没有ACD策略
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/setting/agent/acd.pug b/contact-center/app/src/main/resources/templates/apps/setting/agent/acd.pug new file mode 100644 index 00000000..464d26c8 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/setting/agent/acd.pug @@ -0,0 +1,108 @@ +//- + 原始 Freemarker 文件位置:https://gitlab.chatopera.com/chatopera/cskefu/blob/760e130e770a96a43e8f6f2c8a1eb0885c0bbf90/contact-center/app/src/main/resources/templates/apps/setting/agent/acd.html + 该页面在 /apps/setting/include/left.pug 中被注释掉,此处是没有完全转化的 Pug 文件 + 如果提供这个页面,需要参考 Freemarker 原文件完成转化或参考实现 +extends /apps/include/layout.pug +block content + .layui-side.layui-bg-black + .layui-side-scroll + include /apps/setting/include/left.pug + .layui-body + .layui-side-scroll + .row + .col-lg-12 + h1.site-h1(style='background-color:#FFFFFF;') + | ACD策略(坐席分配策略) + // <#if userList??>(${userList.totalElements!''}) + span(style='float:right;') + button.layui-btn.layui-btn-small.green(href='/admin/user/add.html', data-toggle='ajax', data-width='750', data-title='创建新用户'). + 添加策略 + + .row(style='padding:5px;') + .col-lg-12 + table.layui-table(lay-skin='line') + colgroup + col(width='20%') + col(width='15%') + col(width='25%') + col(width='15%') + col(width='10%') + col(width='15%') + col(width='1%') + col + thead + tr + th 用户 + th 姓名 + th 电子邮件 + th 手机 + th 坐席 + th 注册时间 + th(style='white-space:nowrap;', nowrap) 操作 + tbody + // <#if userList?? && userList.content??> + // <#list userList.content as user> + // + // + // + // + //
                                    + // ${user.username!''} + //
                                    + // 系统管理员 + //
                                    + //
                                    + //
                                    + // + // + // ${user.uname!''} + // ${user.email!''} + // ${user.mobile!''} + // + // <#if user.agent> + // + // + // + // ${user.createtime!''} + // + // + // + // 编辑 + // + // + // + // 删除 + // + // + // + // + // <#else> + // + // + //
                                    + // + //
                                    还没有ACD策略
                                    + //
                                    + // + // + // + .row(style='padding:5px;') + .col-lg-12#page(style='text-align:center;') +script. + layui.use(['laypage', 'layer'], function(){ + var laypage = layui.laypage + ,layer = layui.layer; + + laypage({ + cont: 'page' + // ,pages: <#if userList??>${userList.totalPages}<#else>0 //总页数 + // ,curr:<#if userList??>${userList.number+1}<#else>0 + ,groups: 5 //连续显示分页数 + ,jump:function(data , first){ + if(!first){ + location.href = "/admin/user/index.html?p="+data.curr ; + } + } + }); + }); + diff --git a/contact-center/app/src/main/resources/templates/apps/setting/agent/adadd.html b/contact-center/app/src/main/resources/templates/apps/setting/agent/adadd.html deleted file mode 100644 index 1c78ffc0..00000000 --- a/contact-center/app/src/main/resources/templates/apps/setting/agent/adadd.html +++ /dev/null @@ -1,130 +0,0 @@ -
                                    -
                                    - -
                                    -
                                    -

                                    基本信息

                                    -
                                    -
                                    -
                                    - -
                                    - -
                                    - * -
                                    -
                                    - -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    扩展信息

                                    -
                                    -
                                    -
                                    - -
                                    - - -
                                    -
                                    -
                                    - -
                                    - -
                                    -
                                    -
                                    - -
                                    -
                                    - -
                                    - -
                                    -
                                    -
                                    - -
                                    -
                                    - -
                                    - -
                                    -
                                    -
                                    - - -
                                    -
                                    -
                                    - -
                                    -
                                    - - -
                                    -
                                    -
                                    -
                                    - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/setting/agent/adadd.pug b/contact-center/app/src/main/resources/templates/apps/setting/agent/adadd.pug new file mode 100644 index 00000000..88459a07 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/setting/agent/adadd.pug @@ -0,0 +1,91 @@ +.uk-layui-form + form.layui-form(action='/setting/adv/save.html', method='post', enctype='multipart/form-data') + input(type='hidden', name='adpos', value=adpos) + .layui-collapse + .layui-colla-item + h2.layui-colla-title 基本信息 + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label#name.layui-form-label 广告名称: + .layui-input-inline + input.layui-input(type='text', name='name', required, lay-verify='required', autocomplete='off', maxlength='100') + font(color='red') * + .layui-inline.uckefu-inline + label#weight.layui-form-label 权重: + .layui-input-inline.ukefu-limit-height + select(name='weight') + - var opt = 1 + while opt <= 100 + option(value=opt)= opt + - opt++ + .layui-colla-item + h2.layui-colla-title 扩展信息 + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label.layui-form-label 广告类型: + .layui-input-inline.ukefu-limit-height(style='position: relative;padding-top:7px;') + input(type='radio', name='adtype', value='image', lay-filter='image', title='图片') + input(type='radio', name='adtype', value='text', lay-filter='text', title='文本', checked) + .layui-inline.uckefu-inline + label#tooltip.layui-form-label 提示文本: + .layui-input-inline.ukefu-limit-height + input.layui-input(type='text', name='tiptext', required, lay-verify='required', autocomplete='off', maxlength='100') + .layui-form-item + .layui-inline + label.layui-form-label 跳转地址: + .layui-input-inline.ukefu-limit-height(style='position: relative;padding-top:7px;width:664px;') + input.layui-input(type='text', name='url', required, lay-verify='required', autocomplete='off', maxlength='100') + .layui-form-item#text + .layui-inline + label.layui-form-label 文本内容: + .layui-input-inline(style='width: 664px;') + textarea.layui-textarea(name='content', placeholder='请输入广告文本内容(支持HTML)', style='resize:none;', maxlength='180') + .layui-form-item#image(style='display:none;') + .layui-inline + label.layui-form-label 广告图片: + .layui-input-inline(style='width: 670px;') + input#imgtarget.layui-input(type='text', name='imgtarget', readonly, autocomplete='off', maxlength='100', onclick='$(\'#files\').click()', style='width:537px;float:left;margin-right:10px;') + .layui-box.layui-upload-button(style='float:left;') + input#files.layui-upload-file(type='file', name='imgfile', accept='image/*', onchange='$(\'#imgtarget\').val($(this).val())') + span.layui-upload-icon + i.layui-icon  + span 上传附件 + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 立即提交 + button.layui-btn.layui-btn-original(type='reset') 重置 +script. + layui.use('form', function() { + var form = layui.form(); + form.render(); //更新全部 + form.on("radio(image)" , function(data){ + if(data.elem.checked){ + $('#text').hide(); + $('#image').show(); + } + }); + form.on("radio(text)" , function(data){ + if(data.elem.checked){ + $('#image').hide(); + $('#text').show(); + } + }); + + //监听提交 + form.on('submit(formDemo)', function(data){ + if(data.field.content.length>180){ + layer.msg("文本内容过长,最大长度为180个字符"); + return false + } + }); + }); + layui.use('upload', function(){ + var target = $(this).attr("data-target"); + }); + layui.use('element', function(){ + var element = layui.element(); + element.init(); + }); + diff --git a/contact-center/app/src/main/resources/templates/apps/setting/agent/adedit.html b/contact-center/app/src/main/resources/templates/apps/setting/agent/adedit.html deleted file mode 100644 index 36260703..00000000 --- a/contact-center/app/src/main/resources/templates/apps/setting/agent/adedit.html +++ /dev/null @@ -1,132 +0,0 @@ -
                                    -
                                    - - -
                                    -
                                    -

                                    基本信息

                                    -
                                    -
                                    -
                                    - -
                                    - -
                                    - * -
                                    -
                                    - -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    扩展信息

                                    -
                                    -
                                    -
                                    - -
                                    - checked="checked"> - checked="checked"> -
                                    -
                                    -
                                    - -
                                    - -
                                    -
                                    -
                                    - -
                                    -
                                    - -
                                    - -
                                    -
                                    -
                                    - -
                                    style="display:none"> -
                                    - -
                                    - -
                                    -
                                    -
                                    - -
                                    style="display:none"> -
                                    - -
                                    - -
                                    - 上传附件 -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    - - -
                                    -
                                    -
                                    -
                                    - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/setting/agent/adedit.pug b/contact-center/app/src/main/resources/templates/apps/setting/agent/adedit.pug new file mode 100644 index 00000000..7bebbe94 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/setting/agent/adedit.pug @@ -0,0 +1,94 @@ +.uk-layui-form + form.layui-form(action='/setting/adv/update.html', method='post', enctype='multipart/form-data') + input(type='hidden', name='adpos', value=adpos) + input(type='hidden', name='id', value=ad.id) + .layui-collapse + .layui-colla-item + h2.layui-colla-title 基本信息 + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label.layui-form-label#name 广告名称: + .layui-input-inline + input.layui-input(type='text', name='name', value=ad.name, required, lay-verify='required', autocomplete='off', maxlength='100') + font(color='red') * + .layui-inline.uckefu-inline + label.layui-form-label#weight 权重: + .layui-input-inline.ukefu-limit-height + select(name='weight') + - var opt = 1 + while opt <= 100 + option(value=opt, selected= ad.weight == opt && 'selected')= opt + - opt++ + .layui-colla-item + h2.layui-colla-title 扩展信息 + .layui-colla-content.layui-show + .layui-form-item + .layui-inline + label.layui-form-label 广告类型: + .layui-input-inline.ukefu-limit-height(style='position: relative;padding-top:7px;') + input(type="radio", name="adtype", value="image", lay-filter="image", title="图片", checked = ad.adtype == "image" && "checked") + input(type="radio" name="adtype" value="text" lay-filter="text" title="文本", checked = ad.adtype == "text" && "checked" ) + .layui-inline.uckefu-inline + label.layui-form-label#cusname 提示文本: + .layui-input-inline.ukefu-limit-height + input.layui-input(type='text', name='tiptext', required, lay-verify='required', value=ad.tiptext, autocomplete='off', maxlength='100') + .layui-form-item + .layui-inline + label.layui-form-label 跳转地址: + .layui-input-inline.ukefu-limit-height(style='position: relative;padding-top:7px;width:664px;') + input.layui-input(type='text', name='url', required, lay-verify='required', value=ad.url, autocomplete='off', maxlength='100') + //- just two types: image or text + .layui-form-item#text(style='display:' + (ad.adtype == "text" ? 'block;' : 'none;')) + .layui-inline + label.layui-form-label 文本内容: + .layui-input-inline(style='width: 664px;') + textarea.layui-textarea(name='content', placeholder='请输入广告文本内容(支持HTML)', style='resize:none;', maxlength='180') !{ad.content} + + .layui-form-item#image(style='display:' + (ad.adtype == "image" ? 'block;' : 'none;')) + .layui-inline + label.layui-form-label 广告图片: + .layui-input-inline(style='width: 670px;') + input#imgtarget.layui-input(type='text', name='imgtarget', value=ad.imgurl, readonly, autocomplete='off', maxlength='100', onclick='$(\'#files\').click()', style='width:537px;float:left;margin-right:10px;') + .layui-box.layui-upload-button(style='float:left;') + input#files.layui-upload-file(type='file', name='imgfile', accept='image/*', onchange='$(\'#imgtarget\').val($(this).val())') + span.layui-upload-icon + i.layui-icon  + span 上传附件 + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 立即提交 + button.layui-btn.layui-btn-original(type='reset') 重置 +script. + layui.use('form', function () { + var form = layui.form(); + form.render(); //更新全部 + form.on("radio(image)", function (data) { + if (data.elem.checked) { + $('#text').hide(); + $('#image').show(); + } + }); + form.on("radio(text)", function (data) { + if (data.elem.checked) { + $('#image').hide(); + $('#text').show(); + } + }); + + //监听提交 + form.on('submit(formDemo)', function (data) { + if (data.field.content.length > 180) { + layer.msg("文本内容过长,最大长度为180个字符"); + return false + } + }); + }); + layui.use('upload', function () { + var target = $(this).attr("data-target"); + }); + layui.use('element', function () { + var element = layui.element(); + element.init(); + }); + diff --git a/contact-center/app/src/main/resources/templates/apps/setting/agent/adv.html b/contact-center/app/src/main/resources/templates/apps/setting/agent/adv.html deleted file mode 100644 index 54dae233..00000000 --- a/contact-center/app/src/main/resources/templates/apps/setting/agent/adv.html +++ /dev/null @@ -1,88 +0,0 @@ -
                                    -
                                    -
                                    - <#include "/apps/setting/include/left.html"/>
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    - ${advType.name!''} 广告位<#if adTypeList??>(${adTypeList?size}) ${advType.description!''} - - - -

                                    -
                                    -
                                    - - - - - - - - - - - - - - - - - - - - - - <#if adTypeList??> - <#list adTypeList as ad> - - - - - - - - - - - <#else> - - - - - -
                                    广告名称类型权重内容创建时间操作
                                    - ${ad.name!''} - - <#if ad.adtype?? && ad.adtype == "image">图片 - <#if ad.adtype?? && ad.adtype == "text">文本 - ${ad.weight} - <#if ad.adtype?? && ad.adtype == "image"> - <#if ad.adtype?? && ad.adtype == "text">${(ad.content!'')?no_esc} - ${ad.createtime?string('yyyy-MM-dd HH:mm:ss')} - - - 编辑 - - - - 删除 - -
                                    -
                                    - -
                                    还没有标签记录
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    diff --git a/contact-center/app/src/main/resources/templates/apps/setting/agent/adv.pug b/contact-center/app/src/main/resources/templates/apps/setting/agent/adv.pug new file mode 100644 index 00000000..b650d57d --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/setting/agent/adv.pug @@ -0,0 +1,58 @@ +extends /apps/include/layout.pug +block content + .layui-side.layui-bg-black + .layui-side-scroll + include /apps/setting/include/left.pug + .layui-body + .layui-side-scroll + .row + .col-lg-12 + h1.site-h1(style='background-color:#FFFFFF;') #{advType.name} 广告位 (#{size(adTypeList)}) #{advType.description} + span(style='float:right;') + button.layui-btn.layui-btn-small.green(href='/setting/adv/add.html?adpos=' + advType.id, data-toggle='ajax', data-width='950', data-height='500', data-title='添加广告' + advType.description) 添加广告 + .row(style='padding:5px;') + .col-lg-12 + table.layui-table(lay-skin='line') + colgroup + col(width='20%') + col(width='10%') + col(width='10%') + col(width='54%') + col(width='5%') + col(width='1%') + col + thead + tr + th 广告名称 + th 类型 + th 权重 + th 内容 + th(style='white-space:nowrap;', nowrap) 创建时间 + th(style='white-space:nowrap;', nowrap) 操作 + tbody + if size(adTypeList) > 0 + for ad in adTypeList + tr + td: a(title=ad.tiptext, href=ad.url, target="_blank")= ad.name + if ad.adtype == "image" + td 图片 + else if ad.adtype == "text" + td 文本 + td= ad.weight + if ad.adtype == "image" + td: img(src=ad.imgurl, class="ukefu-media-image" data-type="preview" style="max-width:100px;max-height:50px;") + else if ad.adtype == "text" + td= ad.content + td(style="white-space:nowrap;" nowrap="nowrap")= pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', ad.createtime) + td(style="white-space:nowrap;" nowrap="nowrap") + a(href='/setting/adv/edit.html?id=' + ad.id + '&adpos=' + ad.adpos, data-toggle="ajax", data-width="950", data-height="500", data-title="编辑广告") + i(class="layui-icon")  + span 编辑 + a(href='/setting/adv/delete.html?id=' + ad.id + '&adpos=' + ad.adpos, style="margin-left:10px;", data-toggle="tip", data-title="请确认是否删除广告?") + i(class="layui-icon") ဆ + span 删除 + else + tr: td(colspan="20" style="height:400px;") + .ukefu-empty(style="background: none") + i.layui-icon  + div(style="") 还没有标签记录 \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/setting/agent/blacklist.html b/contact-center/app/src/main/resources/templates/apps/setting/agent/blacklist.html deleted file mode 100644 index 8cccddfe..00000000 --- a/contact-center/app/src/main/resources/templates/apps/setting/agent/blacklist.html +++ /dev/null @@ -1,93 +0,0 @@ -
                                    -
                                    -
                                    - <#include "/apps/setting/include/left.html"/>
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    - 黑名单列表<#if blackList??>(${blackList.totalElements!''}) -

                                    -
                                    -
                                    - - - - - - - - - - - - - - - <#if blackList?? && blackList.content??> - <#list blackList.content as black> - - - - - - - - - - - - - - <#else> - - - - - -
                                    来源用户标识客服拉黑时间结束时间最后一次对话时长备注操作
                                    - ${black.channel!''} - ${black.agentuser!''}(${black.userid!''})${black.agentusername!''}${black.createtime?string("yyyy-MM-dd HH:mm:ss")}<#if black.endtime??>${black.endtime?string("yyyy-MM-dd HH:mm:ss")}<#else>永久 - ${(black.chattime/(1000*60*60))?string('00')}:${((black.chattime%(1000*60*60))/(1000*60))?string('00')}:${((black.chattime%(1000*60))/(1000))?string('00')} - ${black.description!''} - - - 删除 - -
                                    -
                                    - -
                                    还没有黑名单记录
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/setting/agent/blacklist.pug b/contact-center/app/src/main/resources/templates/apps/setting/agent/blacklist.pug new file mode 100644 index 00000000..3fbbe552 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/setting/agent/blacklist.pug @@ -0,0 +1,63 @@ +extends /apps/include/layout.pug +block content + .layui-side.layui-bg-black + .layui-side-scroll + include /apps/setting/include/left.pug + .layui-body + .layui-side-scroll + .row + .col-lg-12 + h1.site-h1(style='background-color:#FFFFFF;')= "黑名单列表(" + blackList.getTotalElements() + ")" + .row(style='padding:5px;') + .col-lg-12 + table.layui-table(lay-skin='line') + thead + tr + th 来源 + th 用户标识 + th 客服 + th 拉黑时间 + th 结束时间 + th 最后一次对话时长 + th 备注 + th(style='white-space:nowrap;', nowrap) 操作 + tbody + if size(blackList.content) > 0 + for black in blackList.content + tr + td= black.channel + td= black.agentuser + '' + black.userid + ')' + td= black.agentusername + td= pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', black.createtime) + td= black.endtime ? pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', black.endtime) : '永久' + td= pugHelper.padRight(black.chattime / (1000 * 60 * 60), '00') + ':' + pugHelper.padRight((black.chattime % (1000 * 60 * 60)) / (1000 * 60), '00') + ':' + pugHelper.padRight((black.chattime % (1000 * 60)) / 1000, '00') + td= black.description + td(style="white-space:nowrap;", nowrap="nowrap") + a(href='/setting/blacklist/delete.html?id=' + black.id, style="margin-left:10px;" data-toggle="tip" data-title="请确认是否删除记录?") + i.layui-icon(style="color:red;") ဆ + | 删除 + else + tr: td(colspan="20", style="height:400px;") + .ukefu-empty(style="background: none") + i.layui-icon  + div 还没有黑名单记录 + .row(style='padding:5px;') + .col-lg-12#page(style='text-align:center;') + script. + layui.use(['laypage', 'layer'], function () { + var laypage = layui.laypage + , layer = layui.layer; + + laypage({ + cont: 'page' + , pages: #{blackList.totalPages} //总页数 + , curr: #{blackList.number + 1} + , groups: 5 //连续显示分页数 + , jump: function (data, first) { + if (!first) { + location.href = "/admin/blacklist.html?p=" + data.curr; + } + } + }); + }); + diff --git a/contact-center/app/src/main/resources/templates/apps/setting/agent/index.html b/contact-center/app/src/main/resources/templates/apps/setting/agent/index.html deleted file mode 100644 index adaa66e4..00000000 --- a/contact-center/app/src/main/resources/templates/apps/setting/agent/index.html +++ /dev/null @@ -1,512 +0,0 @@ -
                                    -
                                    -
                                    - <#include "/apps/setting/include/left.html"/>
                                    -
                                    -
                                    -
                                    -
                                    - - <#if sessionConfig??> -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    对话设置

                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    人工坐席接入欢迎消息(非WEBIM渠道适用)
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    无坐席在线提示消息
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    坐席忙时提示消息(排队位置请使用{num}替换)
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    人工坐席分配成功提示消息(坐席使用{agent}替换)
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    坐席服务结束提示消息
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    坐席分配策略
                                    -
                                    -
                                    -
                                    -

                                    新客户接入人工坐席的分配策略

                                    -

                                    空闲坐席优先:新客户接入人工坐席的时候,优先分配给对话数量最少的坐席

                                    -

                                    坐席平均分配:按照坐席轮流分配给未达到最大对话数量的坐席

                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    坐席同时服务最多访客数
                                    -
                                    -
                                    -
                                    -

                                    为坐席分配的同时服务访客数量的最大限制

                                    -

                                    分配过多用户会导致客户满意度降低

                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    坐席批量分配最大访客数
                                    -
                                    -
                                    -
                                    -

                                    单次分配访客的最大数量

                                    -

                                    为避免坐席就绪的时候突然涌入大量的咨询客户,设置此参数

                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    历史服务坐席优先分配
                                    -
                                    -
                                    -
                                    -

                                    启用此功能后,客户接入坐席的时候,会优先分配一起通话过的坐席进行分配

                                    -

                                    如果分配的坐席已达到最大服务用户数,则进入等待队列

                                    -
                                    -
                                    - checked="checked"> -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    客户超时提醒
                                    -
                                    -
                                    -
                                    -

                                    客户与坐席对话的超时提醒功能

                                    -

                                    开启后,用户在指定时间内没有响应时,系统会发送提示消息

                                    -
                                    -
                                    - checked="checked"> -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    超时时长(秒)

                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    -

                                    超时提示消息

                                    -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    - - -
                                    -
                                    客户超时提醒后再次超时
                                    -
                                    -
                                    -
                                    -

                                    客户与坐席对话超时后再次超时后出策略

                                    -

                                    开启后,用户在指定时间内没有响应时,系统会在2分钟后自动结束对话,

                                    -
                                    -
                                    - checked="checked"> -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    提醒后再次超时时长(秒)

                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    -

                                    提醒后再次超时后断开的提示消息

                                    -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    坐席回复超时
                                    -
                                    -
                                    -
                                    -

                                    坐席回复客户消息的超时自动回复功能

                                    -

                                    开启后,坐席在指定时间内没有回复消息时,系统会自动回复用户消息

                                    -
                                    -
                                    - checked="checked"> -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    超时时长(秒)

                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    -

                                    超时提示消息

                                    -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    启用工作时间段设置
                                    -
                                    -
                                    -
                                    -

                                    非工作时间段提醒功能

                                    -

                                    开启后,当前时间不在工作时间段内访问将会提示

                                    -
                                    -
                                    - checked="checked"> -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    a、设置工作时间段

                                    -

                                    只有设置工作时间段之后,留言功能才生效

                                    -
                                    -
                                    -
                                    -
                                    -
                                    - <#if sessionConfig.workinghours??> - <#list sessionConfig.workinghours?split(',') as wh> - - ${wh} - - - - - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    - : -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    - ~ -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    - : -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    b、设置非工作时间段的提示信息

                                    -

                                    在微信渠道下使用或直接打开对话窗口的情况下使用

                                    -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    排队超时设置
                                    -
                                    -
                                    -
                                    -

                                    访客的最大排队等待时长

                                    -

                                    排队时间超过设置的时间后,自动断开访客链接

                                    -
                                    -
                                    - checked="checked"> -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    排队超时时长(秒)

                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    -

                                    发送超时提醒消息的系统昵称

                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    -

                                    排队超时后断开访客服务请求的提示消息

                                    -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - - diff --git a/contact-center/app/src/main/resources/templates/apps/setting/agent/index.pug b/contact-center/app/src/main/resources/templates/apps/setting/agent/index.pug new file mode 100644 index 00000000..9764d9db --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/setting/agent/index.pug @@ -0,0 +1,322 @@ +extends /apps/include/layout.pug +block content + .layui-side.layui-bg-black + .layui-side-scroll + include /apps/setting/include/left.pug + .layui-body + .layui-side-scroll + form.layui-form(method='post', key='set-mine' enctype='multipart/form-data' action='/setting/agent/sessionconfig/save.html') + input(type='hidden' name='satisfaction' value='1') + if sessionConfig + input(type='hidden', name='id', value= sessionConfig.id) + .row + .col-lg-12 + .ukefu-customer-div.setting-wrapper + .box.default-box + .box-header: h3.box-title 对话设置 + .box-body.ukefu-im-theme + .row: .col-lg-8 + .ukefu-webim-prop 人工坐席接入欢迎消息(非WEBIM渠道适用) + .ukefu-webim-tl(style="clear:both;") + .box-item: .row: .col-lg-12 + textarea(name="sessionmsg" id="sessionmsg" autocomplete="off" class="layui-input" resize="false" style="height:90px;line-height:22px;resize: none;")= sessionConfig.sessionmsg ? sessionConfig.sessionmsg : "欢迎您来咨询!欢迎使用春松客服!如需帮助请联系 info@chatopera.com" + + .ukefu-webim-prop 无坐席在线提示消息 + .ukefu-webim-tl(style="clear:both;") + .box-item: .row: .col-lg-12 + textarea(name="noagentmsg" id="noagentmsg" autocomplete="off" class="layui-input" resize="false" style="height:90px;line-height:22px;resize: none;")= sessionConfig.noagentmsg ? sessionConfig.noagentmsg : "您好,当前无人工坐席在线。" + + .ukefu-webim-prop 坐席忙时提示消息(排队位置请使用{num}替换) + .ukefu-webim-tl(style="clear:both;") + .box-item: .row: .col-lg-12 + textarea(name="agentbusymsg" id="agentbusymsg" autocomplete="off" class="layui-input" resize="false" style="height:90px;line-height:22px;resize: none;")= sessionConfig.agentbusymsg ? sessionConfig.agentbusymsg : "坐席全忙,已进入等待队列,在您之前,还有 {num} 位等待用户。" + + .ukefu-webim-prop 人工坐席分配成功提示消息(坐席使用{agent}替换) + .ukefu-webim-tl(style="clear:both;") + .box-item: .row: .col-lg-12 + textarea(name="successmsg" id="successmsg" autocomplete="off" class="layui-input" resize="false" style="height:90px;line-height:22px;resize: none;")= sessionConfig.successmsg ? sessionConfig.successmsg : "坐席分配成功,{agent}为您服务。" + + .ukefu-webim-prop 坐席服务结束提示消息 + .ukefu-webim-tl(style="clear:both;") + .box-item: .row: .col-lg-12 + textarea(name="finessmsg" id="finessmsg" autocomplete="off" class="layui-input" resize="false" style="height:90px;line-height:22px;resize: none;")= sessionConfig.finessmsg ? sessionConfig.finessmsg : "坐席已断开和您的对话" + + .ukefu-webim-prop 坐席分配策略 + .ukefu-webim-tl(style="clear:both;") + .box-item: .row + .col-lg-8 + p 新客户接入人工坐席的分配策略 + p(style="color:#888888;font-size:13px;margin-top:10px;") 空闲坐席优先:新客户接入人工坐席的时候,优先分配给对话数量最少的坐席 + p(style="color:#888888;font-size:13px;margin-top:10px;") 坐席平均分配:按照坐席轮流分配给未达到最大对话数量的坐席 + .col-lg-4: select(name="distribution") + option(value='0', selected= ((!sessionConfig.distribution) || sessionConfig.distribution == '0') && "selected") 空闲坐席优先 + option(value='1', selected= sessionConfig && sessionConfig.distribution == '1' && "selected") 坐席平均分配 + + .ukefu-webim-prop 坐席同时服务最多访客数 + .ukefu-webim-tl(style="clear:both;") + .box-item: .row + .col-lg-8 + p 为坐席分配的同时服务访客数量的最大限制 + p(style="color:#888888;font-size:13px;margin-top:10px;") 分配过多用户会导致客户满意度降低 + .col-lg-4: select(name="maxuser") + option(value="1", selected= sessionConfig.maxuser == 1 && "selected") 1 + option(value="2", selected= sessionConfig.maxuser == 2 && "selected") 2 + option(value="3", selected= sessionConfig.maxuser == 3 && "selected") 3 + option(value="4", selected= sessionConfig.maxuser == 4 && "selected") 4 + option(value="5", selected= sessionConfig.maxuser == 5 && "selected") 5 + option(value="10", selected= (!sessionConfig.maxuser || sessionConfig.maxuser == 10) && "selected") 10 + option(value="15", selected= sessionConfig.maxuser == 15 && "selected") 15 + option(value="20", selected= sessionConfig.maxuser == 20 && "selected") 20 + option(value="30", selected= sessionConfig.maxuser == 30 && "selected") 30 + option(value="999", selected= sessionConfig.maxuser == 999 && "selected") 无限制 + + .ukefu-webim-prop 坐席批量分配最大访客数 + .ukefu-webim-tl(style="clear:both;") + .box-item: .row + .col-lg-8 + p 单次分配访客的最大数量 + p(style="color:#888888;font-size:13px;margin-top:10px;") 为避免坐席就绪的时候突然涌入大量的咨询客户,设置此参数 + .col-lg-4: select(name="initmaxuser") + option(value="1", selected= sessionConfig.initmaxuser == 1 && "selected") 1 + option(value="2", selected= sessionConfig.initmaxuser == 2 && "selected") 2 + option(value="3", selected= sessionConfig.initmaxuser == 3 && "selected") 3 + option(value="4", selected= sessionConfig.initmaxuser == 4 && "selected") 4 + option(value="5", selected= (!sessionConfig.initmaxuser || sessionConfig.initmaxuser == 5) && "selected") 5 + option(value="10", selected= sessionConfig.initmaxuser == 10 && "selected") 10 + option(value="15", selected= sessionConfig.initmaxuser == 15 && "selected") 15 + option(value="20", selected= sessionConfig.initmaxuser == 20 && "selected") 20 + option(value="30", selected= sessionConfig.initmaxuser == 30 && "selected") 30 + option(value="999", selected= sessionConfig.initmaxuser == 999 && "selected") 无限制 + + + .ukefu-webim-prop 历史服务坐席优先分配 + .ukefu-webim-tl(style="clear:both;") + .box-item: .row + .col-lg-8 + p 启用此功能后,客户接入坐席的时候,会优先分配一起通话过的坐席进行分配 + p(style="color:#888888;font-size:13px;margin-top:10px;") 如果分配的坐席已达到最大服务用户数,则进入等待队列 + .col-lg-4(style="text-align:right;"): input(type="checkbox" id="lastagent" name="lastagent" title="启用" checked= sessionConfig.lastagent == true && "checked") + + .ukefu-webim-prop 客户超时提醒 + .ukefu-webim-tl(style="clear:both;") + .box-item: .row + .col-lg-8 + p 客户与坐席对话的超时提醒功能 + p(style="color:#888888;font-size:13px;margin-top:10px;") + .col-lg-4(style="text-align:right;"): input(type="checkbox" title="启用" name="sessiontimeout" id="sessiontimeout" lay-filter="timeout" checked= sessionConfig.sessiontimeout == true && "checked") + + #timeout_tip.box-item(style= 'display:' + (sessionConfig.sessiontimeout ? "block;" : "none;")) + .row + .col-lg-8: p 超时时长(秒) + .col-lg-4(style="text-align:right;"): input(type="text", name="timeout", id="timeout" lay-verify="number", value=(sessionConfig.timeout > 0 ? sessionConfig.timeout.toString() : '120'), autocomplete="off", class="layui-input", style="width:80px;display:inline;") + .row + .col-lg-8: p 超时提示消息 + .row(style="margin-top:10px;") + .col-lg-12: textarea(name="timeoutmsg" id="timeoutmsg" autocomplete="off" class="layui-input" resize="false" style="height:90px;line-height:22px;resize: none;")= sessionConfig.timeoutmsg ? sessionConfig.timeoutmsg : "您好,您已经很长时间没有发送消息了,您是否还在线?" + + + .ukefu-webim-prop 客户超时提醒后再次超时 + .ukefu-webim-tl(style="clear:both;") + .box-item: .row + .col-lg-8 + p 客户与坐席对话超时后再次超时后出策略 + p(style="color:#888888;font-size:13px;margin-top:10px;") 开启后,用户在指定时间内没有响应时,系统会在2分钟后自动结束对话 + .col-lg-4(style="text-align:right;") + input(type="checkbox", title="启用", id="resessiontimeout", name="resessiontimeout", lay-filter="retimeout", checked= (sessionConfig.resessiontimeout == true) && "checked") + #re_timeout_tip.box-item(style="display:" + (sessionConfig.resessiontimeout ? "display;" : "none;")) + .row + .col-lg-8: p 提醒后再次超时时长(秒) + .col-lg-4(style="text-align:right;") + input(type="text" name="retimeout", lay-verify="number", id="retimeout", value=(sessionConfig.retimeout > 0 ? sessionConfig.retimeout : '120'), autocomplete="off", class="layui-input", style="width:80px;display:inline;") + .row + .col-lg-8: p 提醒后再次超时后断开的提示消息 + .row(style="margin-top:10px;") + .col-lg-12: textarea(name="retimeoutmsg" id="retimeoutmsg" autocomplete="off" class="layui-input" resize="false" style="height:90px;line-height:22px;resize: none;")= sessionConfig.retimeoutmsg ? sessionConfig.retimeoutmsg : "您好,欢迎下次咨询,再见?" + + .ukefu-webim-prop 坐席回复超时 + .ukefu-webim-tl(style="clear:both;") + .box-item: .row + .col-lg-8 + p 坐席回复客户消息的超时自动回复功能 + p(style="color:#888888;font-size:13px;margin-top:10px;") 开启后,坐席在指定时间内没有回复消息时,系统会自动回复用户消息 + .col-lg-4(style="text-align:right;"): input(type="checkbox" title="启用" name="agentreplaytimeout" id="agentreplaytimeout" lay-filter="agentreplaytimeout" checked= sessionConfig.agentreplaytimeout == true && "checked") + + #agentreplay.box-item(style="display:" + (sessionConfig.agentreplaytimeout ? "display;" : "none;")) + .row + .col-lg-8: p 超时时长(秒) + .col-lg-4(style="text-align:right;"): input(type="text", name="agenttimeout", lay-verify="number", id="agenttimeout", value=(sessionConfig.agenttimeout > 0 ? sessionConfig.agenttimeout : '120'), autocomplete="off" class="layui-input", style="width:80px;display:inline;") + .row + .col-lg-8: p 超时提示消息 + .row(style="margin-top:10px;") + .col-lg-12: textarea(name="agenttimeoutmsg" id="agenttimeoutmsg" autocomplete="off" class="layui-input" resize="false" style="height:90px;line-height:22px;resize: none;")= sessionConfig.agenttimeoutmsg ? sessionConfig.agenttimeoutmsg : "欢迎咨询,我正在为您查询资料" + + + .ukefu-webim-prop 启用工作时间段设置 + .ukefu-webim-tl(style="clear:both;") + .box-item: .row + .col-lg-8 + p 非工作时间段提醒功能 + p(style="color:#888888;font-size:13px;margin-top:10px;") 开启后,当前时间不在工作时间段内访问将会提示 + .col-lg-4(style="text-align:right;"): input(type="checkbox", title="启用", name="hourcheck", id="hourcheck", lay-filter="hourcheck", checked= sessionConfig.hourcheck && "checked") + #hourcheck_tip.box-item(style="display:" + (sessionConfig.hourcheck ? "block;" : "none;")) + .row(style="margin-bottom:20px;") + .col-lg-12 + p a、设置工作时间段 + p(style="color:#888888;font-size:13px;margin-top:10px;") 只有设置工作时间段之后,留言功能才生效 + + .row(style="margin-bottom:20px;") + .col-lg-12 + #workhours + if sessionConfig.workinghours + - var workinghours = sessionConfig.workinghours.split(',') + for wh in workinghours + small(id="wh_" + wh.replace('[:~]{1,}', ''), class="ukefu-timerange layui-btn layui-btn-normal") + | #{wh} + i.layui-icon ဆ + input(type='hidden' name='workinghours' value=wh) + + .row(style="margin-bottom:20px;") + .col-lg-12 + .layui-inline: .layui-input-inline(style="width: 70px;") + select#wh_start_h + - var hours = 0 + while hours < 24 + - var hourVal = pugHelper.padRight(hours.toString(), '00') + option(value=hourVal, selected= hours == 8 && "selected")= hourVal + - hours++ + + .layui-inline: .layui-input-inline(style="width: 3px;") : + .layui-inline: .layui-input-inline(style="width: 70px;") + select#wh_start_m + - var mins = 0 + while mins < 60 + - var minsVal = pugHelper.padRight(mins.toString(), '00') + option(value=minsVal, selected = mins == 30 && 'selected')= minsVal + - mins++ + .layui-inline: .layui-input-inline(style="width: 20px;") ~ + .layui-inline: .layui-input-inline(style="width: 70px;") + select#wh_end_h + - var hours = 0 + while hours < 24 + - var hourVal = pugHelper.padRight(hours.toString(), '00') + option(value=hourVal, selected= hours == 8 && "selected")= hourVal + - hours++ + + .layui-inline: .layui-input-inline(style="width: 3px;") : + .layui-inline: .layui-input-inline(style="width: 70px;") + select#wh_end_m + - var mins = 0 + while mins < 60 + - var minsVal = pugHelper.padRight(mins.toString(), '00') + option(value=minsVal, selected = mins == 30 && 'selected')= minsVal + - mins++ + .layui-inline.layui-input-inline(style="width: 70px;") + button#wh_time_range(class="layui-btn layui-btn-original" type="button"): i.layui-icon  + + .row(style="margin-bottom:20px;") + .col-lg-12 + p b、设置非工作时间段的提示信息 + p(style="color:#888888;font-size:13px;margin-top:10px;") 在微信渠道下使用或直接打开对话窗口的情况下使用 + + .row: .col-lg-12 + textarea(name="notinwhmsg" autocomplete="off" class="layui-input" resize="false" style="height:90px;line-height:22px;resize: none;")= sessionConfig.notinwhmsg ? sessionConfig.notinwhmsg : "您好,当前非工作时间段。" + + .ukefu-webim-prop 排队超时设置 + .ukefu-webim-tl(style="clear:both;") + .box-item: .row + .col-lg-8 + p 访客的最大排队等待时长 + p(style="color:#888888;font-size:13px;margin-top:10px;") 排队时间超过设置的时间后,自动断开访客链接 + .col-lg-4(style="text-align:right;"): input(type="checkbox", title="启用", name="quene", id="quene", lay-filter="quene", checked= sessionConfig.quene && "checked") + #quene_tip.box-item(style="display:" + (sessionConfig.quene ? "block;" : "none;")) + .row + .col-lg-8: p 排队超时时长(秒) + .col-lg-4(style="text-align:right;") + input(type="text", name="quenetimeout", id="quenetimeout", lay-verify="number", value=(sessionConfig.quenetimeout > 0 ? sessionConfig.quenetimeout : "120"), autocomplete="off", class="layui-input", style="display:inline;") + .row(style="margin-top:10px;") + .col-lg-8: p 发送超时提醒消息的系统昵称 + .col-lg-4(style="text-align:right;") + input(type="text", name="servicename", id="servicename", value=(sessionConfig.servicename ? sessionConfig.servicename : "系统客服"), autocomplete="off" class="layui-input" style="display:inline;") + .row + .col-lg-8: p 排队超时后断开访客服务请求的提示消息 + .row(style="margin-top:10px;") + .col-lg-12: textarea(name="quenetimeoutmsg" id="quenetimeoutmsg" autocomplete="off" class="layui-input" resize="false" style="height:90px;line-height:22px;resize: none;")= sessionConfig.quenetimeoutms ? sessionConfig.quenetimeoutms : "感谢您的咨询,再见!" + .row + .col-lg-3 + .col-lg-9 + .layui-form-item + .layui-input-block + button.layui-btn(lay-submit lay-filter='formDemo') 保存 + button.layui-btn.layui-btn-original(type='reset') 重置 + script(language='javascript'). + layui.use('form', function () { + var form = layui.form(); + form.render('select'); // 刷新 select 选择框渲染 + form.on("checkbox(timeout)", function (data) { + if (data.elem.checked == true) { + $('#timeout_tip').show(); + } else { + $('#timeout_tip').hide(); + } + }); + form.on("checkbox(hourcheck)", function (data) { + if (data.elem.checked == true) { + $('#hourcheck_tip').show(); + } else { + $('#hourcheck_tip').hide(); + } + }); + form.on("checkbox(retimeout)", function (data) { + if (data.elem.checked == true) { + $('#re_timeout_tip').show(); + } else { + $('#re_timeout_tip').hide(); + } + }); + form.on("checkbox(agentreplaytimeout)", function (data) { + if (data.elem.checked == true) { + $('#agentreplay').show(); + } else { + $('#agentreplay').hide(); + } + }); + form.on("checkbox(servicetimeoutlimit)", function (data) { + if (data.elem.checked == true) { + + $('#timeout_limit').show(); + } else { + + $('#timeout_limit').hide(); + } + }); + form.on("checkbox(quene)", function (data) { + if (data.elem.checked == true) { + $('#quene_tip').show(); + } else { + + $('#quene_tip').hide(); + } + }); + form.on("checkbox(otherquickplay)", function (data) { + if (data.elem.checked == true) { + $('#otherquickplay_op').show(); + } else { + + $('#otherquickplay_op').hide(); + } + }); + }); + $('#wh_time_range').on("click", function () { + var timerange = $("#wh_start_h").val() + ":" + $("#wh_start_m").val() + "~" + $("#wh_end_h").val() + ":" + $("#wh_end_m").val(); + var id = "wh_" + $("#wh_start_h").val() + $("#wh_start_m").val() + $("#wh_end_h").val() + $("#wh_end_m").val(); + if ($("#" + id).length == 0) { + $('#workhours').append("" + timerange + " "); + } + }); + $(document).on("click", ".ukefu-timerange", function () { + var target = $(this); + var index = top.layer.confirm("请确认是否移除时间段?", {icon: 3, title: '提示'}, function (text, cindex) { + top.layer.close(index); + $(target).remove(); + }); + }); \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/setting/agent/tag.html b/contact-center/app/src/main/resources/templates/apps/setting/agent/tag.html deleted file mode 100644 index c80676e7..00000000 --- a/contact-center/app/src/main/resources/templates/apps/setting/agent/tag.html +++ /dev/null @@ -1,100 +0,0 @@ -
                                    -
                                    -
                                    - <#include "/apps/setting/include/left.html"/>
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    - ${tagType.name!''}标签<#if userList??>(${userList.totalElements!''}) - - - -

                                    -
                                    -
                                    - - - - - - - - - - - - - - - - - - - - <#if tagList?? && tagList.content?? && tagList.content?size gt 0> - <#list tagList.content as tag> - - - - - - - - - <#else> - - - - - -
                                    标签创建时间使用次数颜色操作
                                    - ${tag.tag!''} - ${tag.createtime?string('yyyy-MM-dd HH:mm:ss')}${tag.times!'0'}<#if tag.color??>
                                    ${tag.tag!''}
                                    - - - 编辑 - - - - 删除 - -
                                    -
                                    - -
                                    还没有标签记录
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/setting/agent/tag.pug b/contact-center/app/src/main/resources/templates/apps/setting/agent/tag.pug new file mode 100644 index 00000000..8701d49b --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/setting/agent/tag.pug @@ -0,0 +1,74 @@ +extends /apps/include/layout.pug +block content + .layui-side.layui-bg-black + .layui-side-scroll + include /apps/setting/include/left.pug + .layui-body + .layui-side-scroll + .row + .col-lg-12 + h1.site-h1(style='background-color:#FFFFFF;') + | #{tagType.name} 标签 (#{tagList.totalElements}) + span(style='float:right;') + button.layui-btn.layui-btn-small.green(href='/setting/tag/add.html?tagtype=' + tagType.code, data-toggle='ajax', data-width='650', data-height='270', data-title='添加标签') 添加标签 + .row(style='padding:5px;') + .col-lg-12 + table.layui-table(lay-skin='line') + colgroup + col(width='20%') + col(width='20%') + col(width='20%') + col(width='20%') + col(width='1%') + col + thead + tr + th 标签 + th 创建时间 + th 使用次数 + th 颜色 + th(style='white-space:nowrap;', nowrap) 操作 + tbody + if tagList.totalElements > 0 + for tag in tagList.content + tr + td: a(href="javascript:void(0)")= tag.tag + td= pugHelper.formatDate('yyyy-MM-dd HH:mm:ss', tag.createtime) + td= tag.times + if tag.color + td: div.ukefu-im-theme: div.ukefu-tag(class='theme' + tag.color,style="color:#ffffff;" )= tag.tag + else + td + td(style="white-space:nowrap;" nowrap="nowrap") + a(href='/setting/tag/edit.html?id=' + tag.id + '&tagtype=' + tagType.code, data-toggle="ajax", data-width="650", data-height="270", data-title="编辑标签") + i(class="layui-icon")  + span 编辑 + a(href="/setting/tag/delete.html?id=" + tag.id + "&tagtype=" + tagType.code, style="margin-left:10px;", data-toggle="tip", data-title="请确认是否删除标签?") + i(class="layui-icon") ဆ + span 删除 + else + td(colspan="20", style="height:400px;") + div(class="ukefu-empty", style="background: none") + i(class="layui-icon")  + div(style="") 还没有标签记录 + .row(style='padding:5px;') + .col-lg-12#page(style='text-align:center;') +script. + layui.use(['laypage', 'layer'], function () { + var laypage = layui.laypage + , layer = layui.layer; + + laypage({ + cont: 'page' + , pages: #{tagList.totalPages} //总页数 + , curr: #{tagList.number + 1} + , groups: 5 //连续显示分页数 + , jump: function (data, first) { + if (!first) { + location.href = "/setting/tag.html?p=" + data.curr; + } + } + }) + ; + }); + diff --git a/contact-center/app/src/main/resources/templates/apps/setting/agent/tagadd.html b/contact-center/app/src/main/resources/templates/apps/setting/agent/tagadd.html deleted file mode 100644 index ba67b58a..00000000 --- a/contact-center/app/src/main/resources/templates/apps/setting/agent/tagadd.html +++ /dev/null @@ -1,79 +0,0 @@ -
                                    -
                                    - -
                                    - -
                                    - -
                                    -
                                    -
                                    - -
                                    -
                                    - -
                                    - -
                                    -
                                    - -
                                    -
                                    - -
                                    -
                                    - -
                                    -
                                    - -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - - -
                                    -
                                    -
                                    -
                                    - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/setting/agent/tagadd.pug b/contact-center/app/src/main/resources/templates/apps/setting/agent/tagadd.pug new file mode 100644 index 00000000..87f27bb4 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/setting/agent/tagadd.pug @@ -0,0 +1,54 @@ +.uk-layui-form + form.layui-form.uk-form(method='post', action='/setting/tag/save.html') + input(type='hidden', name='tagtype', value=tagtype) + .layui-form-item + label.layui-form-label 标签: + .layui-input-inline + input.layui-input(type='text', name='tag', required, value=tag.tag, lay-verify='required', placeholder='请输入标签', autocomplete='off') + .layui-form-item(style='margin-top:20px;') + label.layui-form-label 背景颜色: + .layui-input-inline.ukefu-im-theme(style='width: 350px;') + .item-cnt.ukefu-im-ping-color(style='display: block;') + input#color(type='hidden', name='color') + .ukefu-im-item.theme1(data-class="theme1", data-value="1") + i.layui-icon.ukefu-im-check  + .ukefu-im-item.theme2(data-class="theme2", data-value="2") + i.layui-icon.ukefu-im-check  + .ukefu-im-item.theme3(data-class="theme3", data-value="3") + i.layui-icon.ukefu-im-check  + .ukefu-im-item.theme4(data-class="theme4", data-value="4") + i.layui-icon.ukefu-im-check  + .ukefu-im-item.theme5(data-class="theme5", data-value="5") + i.layui-icon.ukefu-im-check  + .ukefu-im-item.theme6(data-class="theme6", data-value="6") + i.layui-icon.ukefu-im-check  + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 立即提交 + button.layui-btn.layui-btn-original(type='reset') 重置 +script. + layui.use('form', function () { + var form = layui.form(); + form.render(); //更新全部 + form.verify({ + repass: function (value) { + if (value != $('#password').val()) { + return '两次输入的密码不一致,请确认'; + } + } + }); + }); + $(document).ready(function () { + $('.ukefu-im-ping-color .ukefu-im-item') + .click( + function () { + var theme = $(this).attr( + 'data-class'); + $('.ukefu-im-ping-color .ukefu-im-item') + .removeClass( + 'ukefu-im-checked'); + $(this).addClass('ukefu-im-checked'); + $('#color').val($(this).attr('data-value')); + }); + }); + diff --git a/contact-center/app/src/main/resources/templates/apps/setting/agent/tagedit.html b/contact-center/app/src/main/resources/templates/apps/setting/agent/tagedit.html deleted file mode 100644 index f4b9d2db..00000000 --- a/contact-center/app/src/main/resources/templates/apps/setting/agent/tagedit.html +++ /dev/null @@ -1,91 +0,0 @@ -
                                    -
                                    - - - -
                                    - -
                                    - -
                                    -
                                    -
                                    - -
                                    -
                                    - -
                                    - -
                                    -
                                    - -
                                    -
                                    - -
                                    -
                                    - -
                                    -
                                    - -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - - -
                                    -
                                    -
                                    -
                                    - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/setting/agent/tagedit.pug b/contact-center/app/src/main/resources/templates/apps/setting/agent/tagedit.pug new file mode 100644 index 00000000..1b55ea20 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/setting/agent/tagedit.pug @@ -0,0 +1,65 @@ +.uk-layui-form + form.layui-form.uk-form(method='post', action='/setting/tag/update.html') + input(type='hidden', name='id', value=tag.id) + input(type='hidden', name='tagtype', value=tagtype) + input#initialColor(type='hidden', value=tag.color) + .layui-form-item + label.layui-form-label 标签: + .layui-input-inline + input.layui-input(type='text', name='tag', required, value=tag.tag, lay-verify='required', placeholder='请输入标签', autocomplete='off') + .layui-form-item(style='margin-top:20px;') + label.layui-form-label 背景颜色: + .layui-input-inline.ukefu-im-theme(style='width: 350px;') + .item-cnt.ukefu-im-ping-color(style='display: block;') + input#color(type='hidden', name='color', value=tag.color) + .ukefu-im-item.theme1(data-class="theme1", data-value="1", class= (tag.color == 1 ? "ukefu-im-checked" : "")) + i.layui-icon.ukefu-im-check  + .ukefu-im-item.theme2(data-class="theme2", data-value="2", class= (tag.color == 2 ? "ukefu-im-checked" : "")) + i.layui-icon.ukefu-im-check  + .ukefu-im-item.theme3(data-class="theme3", data-value="3", class= (tag.color == 3 ? "ukefu-im-checked" : "")) + i.layui-icon.ukefu-im-check  + .ukefu-im-item.theme4(data-class="theme4", data-value="4", class= (tag.color == 4 ? "ukefu-im-checked" : "")) + i.layui-icon.ukefu-im-check  + .ukefu-im-item.theme5(data-class="theme5", data-value="5", class= (tag.color == 5 ? "ukefu-im-checked" : "")) + i.layui-icon.ukefu-im-check  + .ukefu-im-item.theme6(data-class="theme6", data-value="6", class= (tag.color == 6 ? "ukefu-im-checked" : "")) + i.layui-icon.ukefu-im-check  + .layui-form-button + .layui-button-block + button.layui-btn(lay-submit, lay-filter='formDemo') 立即提交 + button.layui-btn.layui-btn-original#reset(type='reset') 重置 +script. + layui.use('form', function () { + var form = layui.form(); + form.render(); //更新全部 + form.verify({ + repass: function (value) { + if (value != $('#password').val()) { + return '两次输入的密码不一致,请确认'; + } + } + }); + }); + $(document).ready(function () { + $('.ukefu-im-ping-color .ukefu-im-item') + .click( + function () { + var theme = $(this).attr( + 'data-class'); + $('.ukefu-im-ping-color .ukefu-im-item') + .removeClass( + 'ukefu-im-checked'); + $(this).addClass('ukefu-im-checked'); + $('#color').val($(this).attr('data-value')); + }); + }); + + $("#reset").click(function () { + var num = $("#initialColor").val() + $('.ukefu-im-ping-color .ukefu-im-item') + .removeClass( + 'ukefu-im-checked'); + $(".theme" + num).addClass('ukefu-im-checked'); + $('#color').val(num) + }) + diff --git a/contact-center/app/src/main/resources/templates/apps/setting/include/left.html b/contact-center/app/src/main/resources/templates/apps/setting/include/left.html deleted file mode 100644 index 677edc52..00000000 --- a/contact-center/app/src/main/resources/templates/apps/setting/include/left.html +++ /dev/null @@ -1,53 +0,0 @@ -
                                      -<#if user?? && (user.roleAuthMap["A06_A01"]?? || user.admin) > -
                                    • - 客服设置 -
                                      - <#if user?? && (user.roleAuthMap["A06_A01_A01"]?? || user.admin) > -
                                      class="layui-this"> - - 对话设置 -
                                      - - <#if user?? && (user.roleAuthMap["A06_A01_A02"]?? || user.admin) > -
                                      class="layui-this"> - 黑名单 -
                                      - - -
                                      -
                                    • - -<#if user?? && (user.roleAuthMap["A06_A02"]?? || user.admin) > -
                                    • - 广告位管理 -
                                      - <#if advTypeList??> - <#list advTypeList as advDic> -
                                      class="layui-this"> - ${advDic.name!''} -
                                      - - -
                                      -
                                    • - -<#if user?? && (user.roleAuthMap["A06_A03"]?? || user.admin) > -
                                    • - 标签管理 -
                                      - <#if tagTypeList??> - <#list tagTypeList as tagTypeDic> -
                                      class="layui-this"> - ${tagTypeDic.name!''} -
                                      - - -
                                      -
                                    • - -
                                    diff --git a/contact-center/app/src/main/resources/templates/apps/setting/include/left.pug b/contact-center/app/src/main/resources/templates/apps/setting/include/left.pug new file mode 100644 index 00000000..520aae3d --- /dev/null +++ b/contact-center/app/src/main/resources/templates/apps/setting/include/left.pug @@ -0,0 +1,27 @@ +html + head + body + ul.layui-nav.layui-nav-tree(lay-filter='setting') + if user.roleAuthMap["A06_A01"] || user.admin + li.layui-nav-item.layui-nav-itemed + a.layui-nav-title(href='javascript:;') 客服设置 + dl.layui-nav-child + if user.roleAuthMap["A06_A01_A01"] || user.admin + dd(class={'layui-this': subtype == 'sessionconfig'}): a(href='/setting/agent/index.html') 对话设置 + if user.roleAuthMap["A06_A01_A02"] || user.admin + dd(class={'layui-this': subtype == 'blacklist'}): a(href='/setting/blacklist.html') 黑名单 + //- dd(class={'layui-this': subtype == 'acd'}): a(href='/setting/acd.html') ACD策略 + if user.roleAuthMap["A06_A02"] || user.admin + li.layui-nav-item.layui-nav-itemed + a.layui-nav-title(href='javascript:;') 广告位管理 + dl.layui-nav-child + if advTypeList + for advDic in advTypeList + dd(class={'layui-this': advDic.id == advType.id}): a(href='/setting/adv.html?adpos=' + advDic.id)= advDic.name + if user.roleAuthMap["A06_A03"] || user.admin + li.layui-nav-item.layui-nav-itemed + a.layui-nav-title(href='javascript:;') 标签管理 + dl.layui-nav-child + for tagTypeDic in tagTypeList + dd(class={'layui-this': tagType.code == tagTypeDic.code}) + a(href='/setting/tag.html?code=' + tagTypeDic.code)= tagTypeDic.name \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/setting/quickreply/add.html b/contact-center/app/src/main/resources/templates/apps/setting/quickreply/add.html deleted file mode 100644 index caf98389..00000000 --- a/contact-center/app/src/main/resources/templates/apps/setting/quickreply/add.html +++ /dev/null @@ -1,101 +0,0 @@ -
                                    -
                                    -
                                    -
                                    - -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    - - - - -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    -
                                    - - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/setting/quickreply/addtype.html b/contact-center/app/src/main/resources/templates/apps/setting/quickreply/addtype.html deleted file mode 100644 index dabb5a2a..00000000 --- a/contact-center/app/src/main/resources/templates/apps/setting/quickreply/addtype.html +++ /dev/null @@ -1,142 +0,0 @@ -<#include "/public/macro.html"> -
                                    -
                                    -
                                    -
                                    -

                                    分类基本信息

                                    -
                                    -
                                    -
                                    - -
                                    - - -
                                    - * -
                                    -
                                    - -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    扩展信息

                                    -
                                    -
                                    -
                                    - -
                                    - - - - -
                                    -
                                    -
                                    - - -
                                    -
                                    - -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    - - -
                                    -
                                    -
                                    -
                                    - - - diff --git a/contact-center/app/src/main/resources/templates/apps/setting/quickreply/edit.html b/contact-center/app/src/main/resources/templates/apps/setting/quickreply/edit.html deleted file mode 100644 index 52076443..00000000 --- a/contact-center/app/src/main/resources/templates/apps/setting/quickreply/edit.html +++ /dev/null @@ -1,107 +0,0 @@ -
                                    -
                                    - -
                                    - -
                                    - -
                                    -
                                    -
                                    -
                                    - -
                                    - - - - -
                                    -
                                    -
                                    -
                                    - -
                                    - -
                                    -
                                    -
                                    -
                                    - - -
                                    -
                                    -
                                    -
                                    - - - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/setting/quickreply/edittype.html b/contact-center/app/src/main/resources/templates/apps/setting/quickreply/edittype.html deleted file mode 100644 index b7c1e943..00000000 --- a/contact-center/app/src/main/resources/templates/apps/setting/quickreply/edittype.html +++ /dev/null @@ -1,142 +0,0 @@ -<#include "/public/macro.html"> -
                                    -
                                    - -
                                    -
                                    -

                                    分类基本信息

                                    -
                                    -
                                    -
                                    - -
                                    - -
                                    - * -
                                    -
                                    - -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    扩展信息

                                    -
                                    -
                                    -
                                    - -
                                    - - - - -
                                    -
                                    -
                                    - - -
                                    -
                                    - -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    -
                                    - - -
                                    -
                                    -
                                    -
                                    - - - diff --git a/contact-center/app/src/main/resources/templates/apps/setting/quickreply/imp.html b/contact-center/app/src/main/resources/templates/apps/setting/quickreply/imp.html deleted file mode 100644 index 51d7e57d..00000000 --- a/contact-center/app/src/main/resources/templates/apps/setting/quickreply/imp.html +++ /dev/null @@ -1,83 +0,0 @@ -<#include "/public/macro.html"> -
                                    -
                                    - <#if type??> -
                                    -
                                    -

                                    选择导入的数据文件

                                    -
                                    -
                                    -
                                    - -
                                    -
                                    - - 上传快捷回复文件 -
                                    -
                                    -
                                    -
                                    - *(必填项) (需要导入的快捷回复数据Excel文件) - - - 下载模板 - -
                                    -
                                    - -
                                    -
                                    - -
                                    - -
                                    -
                                    -
                                    -
                                    -
                                    -
                                    -

                                    快捷回复数据导入说明,导入步骤:

                                    -
                                    -
                                    -
                                    - -
                                    上传快捷回复数据的Excel文件
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    选择Excel里的列与系统快捷回复的字段对应关系
                                    -
                                    -
                                    -
                                    -
                                    - -
                                    开始导入快捷回复数据
                                    -
                                    -
                                    - -
                                    -
                                    -
                                    - 自动匹配快捷回复导入字段功能,无需下载模板,系统自动匹配,知识数据直接导入,使用更加方便、快捷、智能。 -
                                    -
                                    - -
                                    -
                                    - - -
                                    -
                                    -
                                    -
                                    - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/setting/quickreply/index.html b/contact-center/app/src/main/resources/templates/apps/setting/quickreply/index.html deleted file mode 100644 index adca2d59..00000000 --- a/contact-center/app/src/main/resources/templates/apps/setting/quickreply/index.html +++ /dev/null @@ -1,64 +0,0 @@ - - - -
                                    -
                                    -
                                    -

                                    - 问答分类 - - - -

                                    -
                                    -
                                      -
                                      -
                                      -
                                      -
                                      -
                                      - <#include "/apps/setting/quickreply/replylist.html"> -
                                      - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/apps/setting/quickreply/replylist.html b/contact-center/app/src/main/resources/templates/apps/setting/quickreply/replylist.html deleted file mode 100644 index d458f1e4..00000000 --- a/contact-center/app/src/main/resources/templates/apps/setting/quickreply/replylist.html +++ /dev/null @@ -1,233 +0,0 @@ -
                                      -
                                      -

                                      - <#if quickType??> - ${quickType.name!''} - <#else> - 问答列表 - - <#if quickReplyList??>(${quickReplyList.totalElements}) -
                                      - <#if quickType??> - - - - - <#if quickType??> -
                                      - -
                                      - - -
                                      -

                                      -
                                      -
                                      - - - - - - - - - - - - - - - - - - - - <#if quickReplyList?? && quickReplyList.content??> - <#list quickReplyList.content as quickReply> - - - - - - - - - <#else> - - - - - -
                                      - - 标题内容创建时间操作
                                      - - - <#if quickReply.title?? && quickReply.title?length gt 100>${quickReply.title[0..100]}...<#else>${quickReply.title!''} - <#if quickReply.content?? && quickReply.content?length gt 100>${quickReply.content[0..100]}...<#else>${quickReply.content!''}${quickReply.createtime?string("yyyy-MM-dd HH:mm:ss")} - - - 编辑 - - - - 删除 - -
                                      -
                                      - -
                                      还没有快捷回复记录
                                      -
                                      -
                                      -
                                      -
                                      -
                                      -
                                      -
                                      -
                                      -
                                      - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/login.html b/contact-center/app/src/main/resources/templates/login.html deleted file mode 100644 index ec853ac3..00000000 --- a/contact-center/app/src/main/resources/templates/login.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - -<#if systemConfig?? && systemConfig.title?? && systemConfig.title != ''>${systemConfig.title}<#else>春松客服-全渠道智能客服</#if> - - - - - - - - - - <#if adsLoginBanner??> -

                                      商务洽谈:(+86)136-9149-0568; 售后技术支持:(+86)158-0121-3126; 云服务发票等:info@chatopera.com *本提示仅出现于演示环境

                                      - - - - - diff --git a/contact-center/app/src/main/resources/templates/login.pug b/contact-center/app/src/main/resources/templates/login.pug new file mode 100644 index 00000000..94fba1c3 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/login.pug @@ -0,0 +1,81 @@ +doctype html +html + head + meta(charset="utf-8") + meta(http-equiv="X-UA-Compatible" content="IE=edge") + meta(http-equiv="Cache-Control" content="no-siteapp") + meta(name="viewport" content="width=device-width, maximum-scale=1.0, initial-scale=1.0,initial-scale=1.0,user-scalable=no") + meta(name="apple-mobile-web-app-capable" content="yes") + title= systemConfig.title ? systemConfig.title : '春松客服 | 全渠道智能客服_联络中心' + if systemConfig.favlogo + link(rel="shortcut icon" type="image/x-icon" href='/res/image.html?id=' + systemConfig.favlogo) + else + link(rel="shortcut icon" type="image/x-icon" href='/images/favicon.ico') + link(rel="stylesheet" href="/css/layui.css") + link(rel="stylesheet" href="/css/login.css") + link(rel="stylesheet" href="/css/flexboxgrid.min.css") + script(src="/layui.js") + script(language="javascript"). + if ((window.frameElement && window.frameElement.id || '') != "") { + top.location.href = "/login.html"; + } + layui.use('layer', function () { + var layer = layui.layer; + var msg = '#{msg}'; + if (msg == '0') + layer.msg('用户名或密码错误,请重新填写', {icon: 2, time: 3000}) + else if (msg == '1') + layer.msg('用户注册成功,请通过用户名和密码登陆', {icon: 2, time: 3000}) + else if (msg == '2') + layer.msg('您的账号已经在其它浏览器登录,请确认是您本人的操作,保证安全。', {icon: 4, offset: 't', time: 0}) + }); + layui.use('form', function () { + var form = layui.form(); + }); + function preLogin() { + localStorage.uid = document.getElementById("username").value; + } + window.onload = function () { + var uid = localStorage.uid; + if (uid) { + document.getElementById("username").value = uid; + } + } + if ('#{tongjiBaiduSiteKey}') { + var _hmt = _hmt || []; + (function () { + var hm = document.createElement("script"); + hm.src = "https://hm.baidu.com/hm.js?#{tongjiBaiduSiteKey}"; + var s = document.getElementsByTagName("script")[0]; + s.parentNode.insertBefore(hm, s); + })(); + } + body.login + .login-box + .login-logo + a + if systemConfig && systemConfig.loginlogo + img(src='/res/image.html?id=' + systemConfig.loginlogo style="height:60px;width:220px;") + else + img(src="images/logo2.png" style="height:60px;width:220px;") + .login-box-body + p.login-box-msg 账号密码登陆 + form#loginForm.layui-form(action="/login.html" method="post") + .form-group.has-feedback + span.layui-icon.form-control-feedback  + input#username.form-control.required(name="username" autofocus="" required="" lay-verify="required" value="" placeholder="用户名") + .form-group.has-feedback(style="margin-bottom:10px;") + span.kfont.form-control-feedback  + input#password.form-control.required(type="password" name="password" required="" lay-verify="required" value="" placeholder="密码") + .row(style="margin-bottom:20px;padding:0 20px;") + .col-md-6 + .row(style="margin-bottom:20px;padding:0 20px;") + .col-xs-12 + button.btn.btn-block.btn-primary.btn-lg(onclick="preLogin()") 立即登录 + if show + .col-xs-12 + p.btm-text + | 还没有账号? + a(href="/register.html") 注册新账号 + + diff --git a/contact-center/app/src/main/resources/templates/mixins/client.mixin.pug b/contact-center/app/src/main/resources/templates/mixins/client.mixin.pug new file mode 100644 index 00000000..dab19d22 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/mixins/client.mixin.pug @@ -0,0 +1,13 @@ +mixin opersystem(name) + if name == "windows" + i.kfont  + else if name == "linux" + i.kfont  + else if name == "mac" + i.kfont  + +mixin device(mobile) + if onlineuser.mobile == "1" + i.kfont  + else + i.kfont  \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/mixins/dic.mixin.pug b/contact-center/app/src/main/resources/templates/mixins/dic.mixin.pug new file mode 100644 index 00000000..0f3290da --- /dev/null +++ b/contact-center/app/src/main/resources/templates/mixins/dic.mixin.pug @@ -0,0 +1,26 @@ +mixin dicSelect(dicList, name, value, attr, style) + - + attr.style = style; + var id = name.replace('.', '_') + input(type="hidden", name=name + ".text", id=id + "_text") + select(id=id, name=name, onChange="$('#" + id + "_text').val($(this).find('option:selected').text())")&attributes(attr) + option(value="") 请选择... + if dicList + for dic in dicList + option(value=(dic.discode ? dic.code : dic.id), selected=dic.id == value || dic.code == value)= dic.name + +//- 系统词典Select +mixin sysDicSelect(code, name, value, attr, style) + +dicSelect(uKeFuDic[code],name,value,attr,style) + +mixin subSelect(macroSysDicList, name, value, attr, style) + - + style = style ? style : ''; + var id = name.replace('.', '_') + input(type="hidden", name=name + ".text", id=id + "_text") + select(id=id, name=name, onChange="$('#" + id + "_text').val($(this).find('option:selected').text())", style=style)&attributes(attr) + option(value="") 请选择... + if macroSysDicList + for dic in macroSysDicList + option(value=(dic.discode ? dic.code : dic.id), selected=dic.id == value || dic.code == value)= dic.name + diff --git a/contact-center/app/src/main/resources/templates/public/agent.html b/contact-center/app/src/main/resources/templates/public/agent.html deleted file mode 100644 index 587fe0bb..00000000 --- a/contact-center/app/src/main/resources/templates/public/agent.html +++ /dev/null @@ -1,6 +0,0 @@ -[ -<#if owneruserList?? ><#list owneruserList as owneruser><#if owneruser_index gt 0>,{ - "id" : "${owneruser.id!''}" , - "text":"${owneruser.username!''}" - } -] \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/public/agentstatus.html b/contact-center/app/src/main/resources/templates/public/agentstatus.html deleted file mode 100644 index f55599f9..00000000 --- a/contact-center/app/src/main/resources/templates/public/agentstatus.html +++ /dev/null @@ -1,79 +0,0 @@ -
                                      服务中的人数:${agentStatusReport.users!''}人,当前排队人数:${agentStatusReport.inquene!''}人,在线坐席数:${agentStatusReport.agents!''}人,坐席忙:${agentStatusReport.busy!0}人
                                      -
                                      - -
                                      - - - -
                                      - -
                                      - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/public/agentstatus.pug b/contact-center/app/src/main/resources/templates/public/agentstatus.pug new file mode 100644 index 00000000..fec03e6e --- /dev/null +++ b/contact-center/app/src/main/resources/templates/public/agentstatus.pug @@ -0,0 +1,69 @@ +#agents_status.agent-title + | 服务中的人数:#{agentStatusReport.users}人,当前排队人数:#{agentStatusReport.inquene}人,在线坐席数:#{agentStatusReport.agents}人,坐席忙:#{agentStatusReport.busy}人 +#agentstatus.layui-unselect.layui-form-switch.checkStatus.lay-filter(class={ + 'layui-form-onswitch': agentStatus.status == 'ready', + 'layui-form-offswitch': agentStatus.status == 'notready' +}) + i.checkStatusI +a.iframe_btn(href="javascript:void(0)" onclick="return false;" data-title="首页" data-href="/apps/content.html" data-id="maincontent" data-type="tabChange" style="display: none;") + i.kfont(style="position: relative;")  + | 首页 +#agentstatus_busy.layui-unselect.layui-form-switch.layui-form-onswitch-notbusy(style=agentStatus ? '' : 'display:none',class={'layui-form-onswitch-busy': agentStatus.busy}) + i +script. + $('#agentstatus').on("click", function () { + if ($(this).hasClass('layui-form-onswitch')) { // 从就绪到非就绪 + checkAgentStatusData().then(function (data) { + return handleAgentStatusData(data); + }).then(function (data) { + if (data.length > 0) { + // 还有服务中的访客 + layer.confirm('您有正在服务中的访客' + data.length + '人,转为非就绪状态将不可邀请访客,不会分配新访客。', { + btn: ['切换', '取消'], icon: 4, title: '提示', + cancel: function (index, layero) { + //点击关闭按钮 + } + }, function (index, layero) { + // 不分配 + setAgentAsNotReady(); + layer.close(index); + }, function (index) { + layer.close(index); + }); + } else { + // 没有服务中的访客直接切换状态 + // 切换坐席状态为未就绪 + setAgentAsNotReady(); + } + }); + } else { // 从非就绪到就绪 + setAgentAsReady(); + } + }); + // 请求并将坐席置为就绪状态 + function setAgentAsReady() { + $("#agentstatus").addClass("layui-form-onswitch"); + sessionStorage.setItem(agentstatus, "ready") + loadURL("/agent/ready.html", null, function () { + $('#agentstatus_busy').show(); + }); + } + // 请求并将坐席置为非就绪状态 + function setAgentAsNotReady() { + $('#agentstatus').removeClass("layui-form-onswitch"); + sessionStorage.setItem(agentstatus, "notready"); + loadURL("/agent/notready.html", null, function () { + $('#agentstatus_busy').removeClass("layui-form-onswitch-busy").hide(); + }); + } + $('#agentstatus_busy').on("click", function () { + if ($(this).hasClass('layui-form-onswitch-busy')) { + $(this).removeClass("layui-form-onswitch-busy"); + $(this).addClass("layui-form-onswitch-notbusy"); + loadURL("/agent/notbusy.html") + } else { + $(this).removeClass("layui-form-onswitch-notbusy"); + $(this).addClass("layui-form-onswitch-busy"); + loadURL("/agent/busy.html"); + } + }); diff --git a/contact-center/app/src/main/resources/templates/public/agentstatustext.html b/contact-center/app/src/main/resources/templates/public/agentstatustext.html deleted file mode 100644 index 29b5774c..00000000 --- a/contact-center/app/src/main/resources/templates/public/agentstatustext.html +++ /dev/null @@ -1 +0,0 @@ -服务中的人数:${agentStatusReport.users!''}人,当前排队人数:${agentStatusReport.inquene!''}人,在线坐席数:${agentStatusReport.agents!''}人,坐席忙:${agentStatusReport.busy!0}人 \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/public/agentstatustext.pug b/contact-center/app/src/main/resources/templates/public/agentstatustext.pug new file mode 100644 index 00000000..b1e1b658 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/public/agentstatustext.pug @@ -0,0 +1 @@ +| 服务中的人数:#{agentStatusReport.users}人,当前排队人数:#{agentStatusReport.inquene}人,在线坐席数:#{agentStatusReport.agents}人,坐席忙:#{agentStatusReport.busy}人 diff --git a/contact-center/app/src/main/resources/templates/public/clearcookie.html b/contact-center/app/src/main/resources/templates/public/clearcookie.html deleted file mode 100644 index cdfca1f4..00000000 --- a/contact-center/app/src/main/resources/templates/public/clearcookie.html +++ /dev/null @@ -1,14 +0,0 @@ -Cookie信息与加密KEY不符,请清除浏览器缓存。 - -

                                      Chrome 清除特定网站的 cookie

                                      -在计算机上打开 Chrome。
                                      -1. 依次点击右上角的“更多”图标 更多 然后 设置,进入 "chrome://settings/"。
                                      -2. 点击底部的高级。
                                      -3. 在“隐私设置和安全性”下方,点击内容设置。
                                      -4. 进入"网站设置",在"权限"中选择"Cookie"右侧的展开按钮。
                                      -5. 在右上角搜索相应网站的名称。
                                      -6. 点击该网站右侧的“移除”图标 移除。
                                      - -

                                      其它浏览器

                                      - -Firefox diff --git a/contact-center/app/src/main/resources/templates/public/clearcookie.pug b/contact-center/app/src/main/resources/templates/public/clearcookie.pug new file mode 100644 index 00000000..164aa6f1 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/public/clearcookie.pug @@ -0,0 +1,29 @@ +html + head + body + | Cookie信息与加密KEY不符,请清除浏览器缓存。 + + h1 Chrome 清除特定网站的 cookie + | +在计算机上打开 Chrome。 + br + | +1. 依次点击右上角的“更多”图标 更多 然后 设置,进入 "chrome://settings/"。 + br + | +2. 点击底部的高级。 + br + | +3. 在“隐私设置和安全性”下方,点击内容设置。 + br + | +4. 进入"网站设置",在"权限"中选择"Cookie"右侧的展开按钮。 + br + | +5. 在右上角搜索相应网站的名称。 + br + | +6. 点击该网站右侧的“移除”图标 移除。 + br + h1 其它浏览器 + a(href='https://zh.wikihow.com/%E6%B8%85%E7%90%86%E7%81%AB%E7%8B%90%E6%B5%8F%E8%A7%88%E5%99%A8%E4%B8%AD%E7%9A%84Cookies', target='_blank') Firefox diff --git a/contact-center/app/src/main/resources/templates/public/contacts.html b/contact-center/app/src/main/resources/templates/public/contacts.html deleted file mode 100644 index 029d6906..00000000 --- a/contact-center/app/src/main/resources/templates/public/contacts.html +++ /dev/null @@ -1,6 +0,0 @@ -[ -<#if contactsList?? && contactsList.content??><#list contactsList.content as contact><#if contact_index gt 0>,{ - "id" : "${contact.id!''}" , - "text":"${contact.name!''}" - } -] \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/public/error.html b/contact-center/app/src/main/resources/templates/public/error.pug similarity index 100% rename from contact-center/app/src/main/resources/templates/public/error.html rename to contact-center/app/src/main/resources/templates/public/error.pug diff --git a/contact-center/app/src/main/resources/templates/public/macro.html b/contact-center/app/src/main/resources/templates/public/macro.html deleted file mode 100644 index 62c6b027..00000000 --- a/contact-center/app/src/main/resources/templates/public/macro.html +++ /dev/null @@ -1,42 +0,0 @@ -<#macro select code name value attr style> - - - - -<#macro select2 code name value attr style defaultname> - - - -<#macro subselect macroSysDicList name value attr style> - - - - -<#macro checkbox sysDicList name value style> - <#list sysDicList as macroSysDic> - checked="checked"> - - - -<#macro checkbox sysDicList name value style> - <#list sysDicList as macroSysDic> - checked="checked"> - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/public/organ.html b/contact-center/app/src/main/resources/templates/public/organ.html deleted file mode 100644 index 39f66cde..00000000 --- a/contact-center/app/src/main/resources/templates/public/organ.html +++ /dev/null @@ -1,93 +0,0 @@ -
                                      -
                                      -
                                      -
                                      -
                                      - - - - - - - - <#if organList??> - <#list organList as organ> - - - - - - - -
                                      - checked="checked" value="${organ.id!''}" style="margin-top:0px;"> - - ${organ.name!''} -
                                      -
                                      -
                                      -
                                      -
                                      - - - - - - - - - - - - - - - <#if usersList??> - <#list usersList as user> - - - - - - - - -
                                      用户姓名
                                      - checked="checked" data-name="${user.username!''}" value="${user.id!''}" lay-filter="ids" lay-skin="primary" name="id" value="${organ.id!''}" style="margin-top:0px;"> - ${user.username!''}${user.uname!''}
                                      -
                                      -
                                      -
                                      -
                                      - - -
                                      -
                                      -
                                      - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/public/organ.pug b/contact-center/app/src/main/resources/templates/public/organ.pug new file mode 100644 index 00000000..0483502b --- /dev/null +++ b/contact-center/app/src/main/resources/templates/public/organ.pug @@ -0,0 +1,63 @@ +div(class="uk-layui-form") + div(class="row", style="height:100%;") + div(class="col-lg-3", style="height:100%;border-right:8px solid #F2F2F2;") + div(class="layui-form-item") + div(class="layui-input-inline", style="width:100%;margin-left:0px;margin-top:0px;") + table(class="layui-table", lay-skin="line") + colgroup + col(width="1%") + col(width="30%") + col + tbody + for organ in organList + tr + td(class="ukefu-checkbox") + input(class="id", type="checkbox", data-name=organ.name, name="id", value=organ.id, style="margin-top:0px;",checked=ids.contains(organ.id)) + td(style="margin-left:0px;")= organ.name + div(class="col-lg-9") + table(class="layui-table", lay-skin="line") + colgroup + col(width="1%") + col(width="15%") + col(width="15%") + thead + tr + th + th(style="padding:9px 5px 5px 5px;") 用户 + th 姓名 + tbody + for user in usersList + tr + td(class="ukefu-checkbox", style="padding:9px 5px 5px 15px;") + input(type="checkbox", class="id", id="user_"+user.id, checked=ids.contains(user.id), value=user.id, lay-filter="ids", lay-skin="primary", name="id", value=organ.id, style="margin-top:0px;") + td(style="padding:9px 5px 5px 5px;")= user.username + td= user.uname + div(class="layui-form-button") + div(class="layui-button-block") + button(class="layui-btn", lay-submit="", lay-filter="selUserOrgan") 立即提交 + button(type="reset", class="layui-btn layui-btn-primary") 重置 +script. + //Demo + layui.use('form', function(){ + var form = layui.form(); + form.on('submit(selUserOrgan)', function(data){ + var targetIFrame = eval(iframe); + var keys = "" , names = "" ; + $(".id").each(function(){ + if($(this).prop("checked")){ + if(keys != ""){ + keys = keys+"," ; + } + keys = keys+$(this).val(); + if(names != ""){ + names = names+"," ; + } + names = names+$(this).data("name"); + } + }); + targetIFrame.Proxy.updateFormData("#dialogEditor" , names) ; + targetIFrame.Proxy.updateFormData("#dialogEditorValue" , keys) ; + top.layer.closeAll(); + return false ; + }); + }); diff --git a/contact-center/app/src/main/resources/templates/public/quickreply.html b/contact-center/app/src/main/resources/templates/public/quickreply.html deleted file mode 100644 index bbb52cce..00000000 --- a/contact-center/app/src/main/resources/templates/public/quickreply.html +++ /dev/null @@ -1,6 +0,0 @@ -[ -<#if quickReplyList??><#list quickReplyList as quickreply><#if quickreply_index gt 0>,{ - "id" : "${quickreply.id!''}" , - "text":"${quickreply.title!''}" - } -] \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/public/secfield.html b/contact-center/app/src/main/resources/templates/public/secfield.html deleted file mode 100644 index 1a0d4317..00000000 --- a/contact-center/app/src/main/resources/templates/public/secfield.html +++ /dev/null @@ -1,29 +0,0 @@ -<#macro secfield value type> - <#if type?? && type == "01"> - <#if value?? && value?length gt 4> - <#if value?length%2 == 0> - ${value?substring(0 , (value?length / 2)?floor - 2)}****${value?substring((value?length / 2)?ceiling + 2)} - <#else> - ${value?substring(0 , (value?length / 2)?floor - 2)}****${value?substring((value?length / 2)?ceiling + 1)} - - <#else> - <#list 0..value?length as size>* - - <#elseif type?? && type == "02"> - <#if value?? && value?length gt 4> - ****${value?substring(4)} - <#else> - <#list 0..value?length as size>* - - <#elseif type?? && type == "03"> - <#if value?? && value?length gt 4> - ${value?substring(0,value?length - 4)}**** - <#else> - <#list 0..value?length as size>* - - <#elseif type?? && type == "04"> - <#list 0..value?length as size>* - <#else> - ${value!''} - - \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/public/select.html b/contact-center/app/src/main/resources/templates/public/select.html deleted file mode 100644 index 6b0b584f..00000000 --- a/contact-center/app/src/main/resources/templates/public/select.html +++ /dev/null @@ -1,2 +0,0 @@ -<#include "/public/macro.html"> -<@subselect sysDicList name "" attr style/> \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/public/select.pug b/contact-center/app/src/main/resources/templates/public/select.pug new file mode 100644 index 00000000..6a827aeb --- /dev/null +++ b/contact-center/app/src/main/resources/templates/public/select.pug @@ -0,0 +1,3 @@ +include /mixins/dic.mixin.pug + ++subSelect(sysDicList, name,"", attr, style) \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/public/success.html b/contact-center/app/src/main/resources/templates/public/success.html deleted file mode 100644 index aff28375..00000000 --- a/contact-center/app/src/main/resources/templates/public/success.html +++ /dev/null @@ -1 +0,0 @@ -${data!''} \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/public/success.pug b/contact-center/app/src/main/resources/templates/public/success.pug new file mode 100644 index 00000000..0d74697b --- /dev/null +++ b/contact-center/app/src/main/resources/templates/public/success.pug @@ -0,0 +1 @@ +| #{data} \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/public/upload.html b/contact-center/app/src/main/resources/templates/public/upload.html deleted file mode 100644 index fe520539..00000000 --- a/contact-center/app/src/main/resources/templates/public/upload.html +++ /dev/null @@ -1,8 +0,0 @@ -{ - "error" : ${upload.error!'1'} - <#if upload?? && upload.error?? && upload.error == '0'> - ,"url":"${upload.url!''}" - <#else> - ,"message":"${upload.message!''}" - -} \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/public/users.html b/contact-center/app/src/main/resources/templates/public/users.html deleted file mode 100644 index 2ea8e3da..00000000 --- a/contact-center/app/src/main/resources/templates/public/users.html +++ /dev/null @@ -1,6 +0,0 @@ -[ -<#if usersList?? && usersList.content??><#list usersList.content as users><#if users_index gt 0>,{ - "id" : "${users.id!''}" , - "text":"${users.username!''}(${users.uname!''})" - } -] \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/register.html b/contact-center/app/src/main/resources/templates/register.html deleted file mode 100644 index 7e5d50b5..00000000 --- a/contact-center/app/src/main/resources/templates/register.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - - -<#if systemConfig?? && systemConfig.title?? && systemConfig.title != ''>${systemConfig.title}<#else>春松客服-全渠道智能客服</#if> - - - - - - - - - - - - diff --git a/contact-center/app/src/main/resources/templates/register.pug b/contact-center/app/src/main/resources/templates/register.pug new file mode 100644 index 00000000..da16d13b --- /dev/null +++ b/contact-center/app/src/main/resources/templates/register.pug @@ -0,0 +1,78 @@ +doctype html +html + head + meta(charset='utf-8') + meta(http-equiv='X-UA-Compatible', content='IE=edge') + meta(http-equiv='Cache-Control', content='no-siteapp') + meta(name='viewport', content='width=device-width,maximum-scale=1,initial-scale=1,initial-scale=1,user-scalable=no') + meta(name='apple-mobile-web-app-capable', content='yes') + title=systemConfig && systemConfig.title && systemConfig.title != '' ? systemConfig.title : '春松客服 | 全渠道智能客服_联络中心' + if systemConfig.favlogo + link(rel="shortcut icon" type="image/x-icon" href='/res/image.html?id=' + systemConfig.favlogo) + else + link(rel="shortcut icon" type="image/x-icon" href='/images/favicon.ico') + link(rel='stylesheet', href='/css/layui.css') + link(rel='stylesheet', href='/css/login.css') + script(src='/layui.js') + script(src='/js/jquery-1.10.2.min.js') + body.login + .login-box + .login-logo + a + if systemConfig && systemConfig.loginlogo && systemConfig.loginlogo != '' + img(src='/res/image.html?id=' + systemConfig.loginlogo style="height:60px;width:220px;") + else + img(src="images/logo2.png" style="height:60px;width:220px;") + // /.login-logo + .login-box-body + p.login-box-msg 注册账号 + form#loginForm.layui-form(action='/addAdmin.html', method='post') + .form-group.has-feedback(style='margin-bottom:10px;') + span.kfont.form-control-feedback  + input#username.form-control.required(name='username', autofocus, required, lay-verify='required', placeholder='用户名') + .form-group.has-feedback(style='margin-bottom:10px;') + span.layui-icon.form-control-feedback  + input#mobile.form-control.required(name='mobile', autofocus, required, lay-verify='required', placeholder='手机') + .form-group.has-feedback(style='margin-bottom:10px;') + span.kfont.form-control-feedback  + input.form-control(type='email', name='email', required, lay-verify='required email', placeholder='邮件地址', autocomplete='off') + .form-group.has-feedback(style='margin-bottom:10px;') + span.kfont.form-control-feedback  + input#password.form-control.required(type='password', name='password', required, lay-verify='required|pass', autocomplete='new-password', placeholder='密码') + .row(style='margin-bottom:20px;padding:0 20px;') + .col-md-6 + .row(style='margin-bottom:20px;') + // /.col + .col-xs-12 + button.btn.btn-block.btn-primary.btn-lg(lay-submit, lay-filter='formDemo') 注册 + // /.col + .col-xs-12 + p.btm-text + a(href='/login.html') 已有账号请登录 + // /.login-box-body + script(language='javascript'). + if ((window.frameElement && window.frameElement.id || '') != "") { + top.location.href = "/register.html"; + } + layui.use('layer', function () { + var layer = layui.layer; + var msg = '#{msg}'; + if (msg == 'username_exist') + layer.msg('用户名存在,请重新填写', {icon: 2}) + else if (msg == 'email_exist') + layer.msg('邮件存在,请重新填写', {icon: 2}) + else if (msg == 'mobile_exist') + layer.msg('手机存在,请重新填写', {icon: 2}) + }); + layui.use('form', function () { + var form = layui.form(); + form.render(); //更新全部 + form.verify({ + pass: function (value, item) { //value:表单的值、item:表单的DOM对象 + if (value && !(/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{6,18}$/.test(value))) { + return '密码由6到18位数字和字母组成'; + } + } + }); + }); + diff --git a/contact-center/app/src/main/resources/templates/resource/css/system.html b/contact-center/app/src/main/resources/templates/resource/css/system.html deleted file mode 100644 index ec466134..00000000 --- a/contact-center/app/src/main/resources/templates/resource/css/system.html +++ /dev/null @@ -1,518 +0,0 @@ - -@font-face {font-family: "kfont"; - src: url('../fonts/kfont/iconfont.eot?t=1530410958255'); /* IE9*/ - src: url('../fonts/kfont/iconfont.eot?t=1530410958255#iefix') format('embedded-opentype'), /* IE6-IE8 */ - url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAALZoAAsAAAABHNwAAQAAAAAAA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P2ANwsdMWlz6VesqurdzlQesZW2CIpQi/kh2+ozj7b4IS/k3migJrGOcpFEnDiNuE+MqKm84zMxYLIEtOvLztIUkVDKky510giQC3fVae8QqhmsWyUxx57Wtlg2cRAxbxQRZKP0lFncTqBkUNBDXA/sMoCB36Q/BNQuSjG2Qz2beFWX1hoGe04NhyWOU+2uWx6LqIpOrbQpqEExjl03zGlVXnPMrjutz22WIs8eWbWl8nmfBD24i4vxbUmAiM6RI5druCGn80oqTxNUzNOuTxdCzUItCmH5THmhto1xUhVxq+pse/ru2ML3yZqR3l8IgqdUGVk1ISPIINBq3+7dDb2h+cLaKnE3laktFi0Rz/HUWH0RB3aVYqTnmHDmdzrjdJx10tCnKnpOq4pxukmks16S8i3BxwtGun6eMpkNeWonqSAz5sVKXap5SIbKlLVDqfyIi5Yh2NPJ7NGTy3FvUwtvRKvKWS6UJBZu5Qa3u82EUXNDcJ81TErrZGkXeydp3Y+12keHa6Ju2/ivl/PMDImL9Km76VrboiBii9Vhvz6dvha1cGdrlXLls6IitbZokPvHBYv6NMnk1Cf1/o583TqtFtTXzoU56DaOkWorERMR3UpMt4RxTcHMsJPmr61LKCa6nLRJzK3+qtMwH385AZx95bkuP2vZH4qIMq7s2huLlA9T1j2l0wuMymFUR1D4Ba79QTkr+nt2bSaTVlVDr3vizOn+ZNNjgqZQ5yJnlXTctllLT5fva+W6Xn5lazMz/wE3yYUCAA==') format('woff'), - url('../fonts/kfont/iconfont.ttf?t=1530410958255') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/ - url('../fonts/kfont/iconfont.svg?t=1530410958255#kfont') format('svg'); /* iOS 4.1- */ -} - -.kfont { - font-family:"kfont" !important; - font-size:16px; - font-style:normal; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.icon-home:before { content: "\e717"; } - -.icon-icon2:before { content: "\e603"; } - -.icon-weixin:before { content: "\e631"; } - -.icon-user:before { content: "\e642"; } - -.icon-mac:before { content: "\e6be"; } - -.icon-zhi01:before { content: "\e62a"; } - -.icon-iconfonttime:before { content: "\e63b"; } - -.icon-user1:before { content: "\e60b"; } - -.icon-attachment:before { content: "\e617"; } - -.icon-linux:before { content: "\e726"; } - -.icon-windows:before { content: "\e801"; } - -.icon-ringpause:before { content: "\e64b"; } - -.icon-ai:before { content: "\e65f"; } - -.icon-msnui-logo-mac:before { content: "\e701"; } - -.icon-attachment1:before { content: "\e61b"; } - -.icon-import:before { content: "\e609"; } - -.icon-icon:before { content: "\e604"; } - -.icon-weixin1:before { content: "\e64d"; } - -.icon-tel1:before { content: "\e613"; } - -.icon-tel:before { content: "\e619"; } - -.icon-phone:before { content: "\e637"; } - -.icon-export:before { content: "\e62c"; } - -.icon-shoujianxiang:before { content: "\e634"; } - -.icon-iconfontagent:before { content: "\e620"; } - -.icon-delete:before { content: "\e675"; } - -.icon-phone1:before { content: "\e64a"; } - -.icon-iconfontupgrade:before { content: "\e635"; } - -.icon-password:before { content: "\e687"; } - -.icon-import1:before { content: "\e641"; } - -.icon-chat:before { content: "\e610"; } - -.icon-demo25:before { content: "\e61c"; } - -.icon-renzheng:before { content: "\e7e5"; } - -.icon-license:before { content: "\e658"; } - -.icon-password1:before { content: "\e618"; } - -.icon-loginiconphone:before { content: "\e61f"; } - -.icon-phone2:before { content: "\e629"; } - -.icon-servergisfuwupingtai:before { content: "\e7fa"; } - -.icon-vip:before { content: "\e71a"; } - -.icon-user-copy:before { content: "\e600"; } - -.icon-baobiao:before { content: "\e64e"; } - -.icon-workflow1:before { content: "\e636"; } - -.icon-poseidonworkflow:before { content: "\e664"; } - -.icon-thumbsup:before { content: "\e661"; } - -.icon-discharge_summary:before { content: "\e757"; } - -.icon-logout:before { content: "\e622"; } - -.icon-yewug:before { content: "\e6c6"; } - -.icon-workflowmonitoring:before { content: "\e638"; } - -.icon-zhishiguanli:before { content: "\e704"; } - -.icon-words2:before { content: "\e614"; } - -.icon-orders:before { content: "\e606"; } - -.icon-iconknowledge:before { content: "\e807"; } - -.icon-yulan:before { content: "\e63c"; } - -.icon-end-copy:before { content: "\e60e"; } - -.icon-import2:before { content: "\e654"; } - -.icon-import3:before { content: "\e65a"; } - -.icon-iconfontivr:before { content: "\e66f"; } - -.icon-history:before { content: "\e659"; } - -.icon-fav_active:before { content: "\e623"; } - -.icon-checkboxmultiplemarkedoutline:before { content: "\e72f"; } - -.icon-daiban-copy:before { content: "\e660"; } - -.icon-history1:before { content: "\e60a"; } - -.icon-iconfontfav-copy:before { content: "\e608"; } - -.icon-weibiaoti201:before { content: "\e6b7"; } - -.icon-knowledge:before { content: "\e628"; } - -.icon-import4:before { content: "\e89a"; } - -.icon-yulan1:before { content: "\e852"; } - -.icon-workflow:before { content: "\e632"; } - -.icon-agentblacklist:before { content: "\e8a7"; } - -.icon-time:before { content: "\e682"; } - -.icon-time2:before { content: "\e683"; } - -.icon-gongyongivr:before { content: "\e7a2"; } - -.icon-shoujianxiangbiaoqianlan:before { content: "\e62b"; } - -.icon-yiguanzhu:before { content: "\e624"; } - -.icon-pc:before { content: "\e601"; } - -.icon-phone3:before { content: "\e695"; } - -.icon-work:before { content: "\e607"; } - -.icon-off:before { content: "\e611"; } - -.icon-time1:before { content: "\e6ce"; } - -.icon-phone4:before { content: "\e647"; } - -.icon-callin:before { content: "\e625"; } - -.icon-summaryline:before { content: "\e65c"; } - -.icon-off1:before { content: "\e7e2"; } - -.icon-baobiao1:before { content: "\e64f"; } - -.icon-baobiao2:before { content: "\e651"; } - -.icon-export1:before { content: "\e605"; } - -.icon-off2:before { content: "\e621"; } - -.icon-history2:before { content: "\e690"; } - -.icon-words:before { content: "\e61d"; } - -.icon-90:before { content: "\e60d"; } - -.icon-node_end:before { content: "\e61a"; } - -.icon-shoujianxiangweixuanzhong:before { content: "\e602"; } - -.icon-tag:before { content: "\e63f"; } - -.icon-baobiaofenxi-copy:before { content: "\e652"; } - -.icon-customer:before { content: "\e650"; } - -.icon-dianhuahuiyi:before { content: "\e753"; } - -.icon-daochu:before { content: "\e672"; } - -.icon-userrole:before { content: "\e90b"; } - -.icon-zhishi:before { content: "\e615"; } - -.icon-userrole1:before { content: "\e7d0"; } - -.icon-iddenglu:before { content: "\e64c"; } - -.icon-yinzhangshenpitongguo:before { content: "\e6a4"; } - -.icon-yinzhangshenpijujue:before { content: "\e6a5"; } - -.icon-30offlineoval:before { content: "\e689"; } - -.icon-show_summary_img:before { content: "\e7c8"; } - -.icon-zhishiku:before { content: "\e630"; } - -.icon-ai1:before { content: "\e676"; } - -.icon-knowledge1:before { content: "\e62d"; } - -.icon-14guaduan-1:before { content: "\e67e"; } - -.icon-zhishi1:before { content: "\e616"; } - -.icon-plus-preview:before { content: "\e722"; } - -.icon-call_transfer:before { content: "\e663"; } - -.icon-priority:before { content: "\e82d"; } - -.icon-baobiaobiaoweiguanli:before { content: "\e653"; } - -.icon-zhishifenlei:before { content: "\e66c"; } - -.icon-hang-up:before { content: "\e626"; } - -.icon-AI:before { content: "\e66e"; } - -.icon-m-quick-quotation:before { content: "\e63d"; } - -.icon-ai2:before { content: "\e6ab"; } - -.icon-yulan2:before { content: "\e649"; } - -.icon-zaixianjieda:before { content: "\e698"; } - -.icon-view:before { content: "\e684"; } - -.icon-Import:before { content: "\e65b"; } - -.icon-transfer:before { content: "\e7be"; } - -.icon-history3:before { content: "\e7eb"; } - -.icon-import5:before { content: "\e60c"; } - -.icon-zhishi2:before { content: "\e699"; } - -.icon-icon-test:before { content: "\e67b"; } - -.icon-shenpitongguo:before { content: "\e66a"; } - -.icon-export2:before { content: "\e612"; } - -.icon-ziyuan:before { content: "\e63e"; } - -.icon-shenpi_tongguo:before { content: "\e697"; } - -.icon-shenpi_yijujue:before { content: "\e69a"; } - -.icon-Summary_today:before { content: "\e60f"; } - -.icon-yulan3:before { content: "\e6a9"; } - -.icon-icon_Dial_down:before { content: "\e679"; } - -.icon-baobiao3:before { content: "\e6d6"; } - -.icon-icon_knowledge:before { content: "\e655"; } - -.icon-shenpituihui:before { content: "\e639"; } - -.icon-attachment2:before { content: "\e61e"; } - -.icon-Call:before { content: "\e670"; } - -.icon-lailiaopinzhijianyan:before { content: "\e644"; } - -.icon-wenjian:before { content: "\e67c"; } - -.icon-uicon_ai:before { content: "\e63a"; } - -.icon-equipment_01:before { content: "\e71c"; } - -.icon-yewu:before { content: "\e640"; } - -.icon-yewu1:before { content: "\e645"; } - -.icon-icon_unknown_filled:before { content: "\e678"; } - -.icon-icon_unknown_wirefra:before { content: "\e67a"; } - -.icon-Ourknowledge:before { content: "\e643"; } - -.icon-user-unknown:before { content: "\e62e"; } - -.icon-ic_knowledge_border_:before { content: "\e62f"; } - -.icon-ic_knowledge_px:before { content: "\e633"; } - -.icon-shenpi-:before { content: "\e627"; } - -.icon-ERP_xqcaigou:before { content: "\e65d"; } - -.icon-shenpijujue:before { content: "\e674"; } - -.icon-yewu2:before { content: "\e646"; } - -.icon-yewu-copy:before { content: "\e648"; } - -.icon-yewu3:before { content: "\e662"; } - -.icon-yewu4:before { content: "\e904"; } - -.icon-time3:before { content: "\e735"; } - -body,html{ - height:100%; - color: #444; -} -body { - line-height: 24px; - font: 15px \5FAE\8F6F\96C5\9ED1,Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif; -} -body *{ - outline:none; - font-family: \5FAE\8F6F\96C5\9ED1,Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif !important; -} - -a{ - ${systemConfig.color!'color:#0096C4;'} -} - -a.disabled{ - color: grey!important; - cursor: default; - - &:hover { - text-decoration: none; - } -} - -.layui-layout-admin .header-ukefu{border-bottom-color: #009688; ${systemConfig.backgroundColor!'background-color: #32c24d;'}} -.header-ukefu{ - height:50px; - line-height:50px; -} -.layui-layout-admin .layui-side{ - top:50px; -} -.layui-layout-admin .layui-body{ - top:50px; - bottom:0px; -} - -.layui-layout-content .layui-bg-black{ - background-color: #FFFFFF !important; - width:270px; - height:100%; - color:#000000; -} -.layui-layout-content .layui-body{ - left: 280px; - padding: 0px 0px 0px 0px; - height:100%; - background-color:#FFFFFF; - -} -.layui-layout-content .layui-side-scroll{ - width:270px; -} -.layui-tab-title .layui-this:after{ - height:31px; -} -.layui-tab-title li{ - line-height: 30px; -} -.layui-tab-title{ - height:30px; - padding-left: 5px; -} -.layui-layout-content .layui-nav-tree{ - width: 100%; -} -.layui-nav-tree .layui-nav-item a{ - height:40px; - line-height:40px; -} -.layui-layout-content .layui-nav{ - background-color:#FFFFFF; -} -.layui-layout-content .layui-nav-itemed>a, .layui-nav-tree .layui-nav-title a, .layui-nav-tree .layui-nav-title a:hover { - background-color: #f5f5f5 !important; - color: #000!important; - font-weight:600; -} -.layui-layout-content .layui-nav-tree .layui-nav-child, .layui-nav-tree .layui-nav-child a:hover { - background: 0 0 !important; - color: #000; -} -.layui-layout-content .layui-nav-tree .layui-nav-child a { - height: 40px; - line-height: 40px; - color: #000; -} -.layui-layout-content .layui-nav-tree .layui-nav-item a:hover { - background-color: ${systemConfig.styleColor!'#32c24d'}; - color:#FFFFFF; -} -.layui-layout-content .layui-nav .layui-nav-item a{ - color:#000000; -} -.layui-layout-content .layui-nav .layui-nav-item .layui-this a{ - color:#FFFFFF; -} -.layui-layout-content .layui-nav-tree .layui-nav-child dd.layui-this, .layui-nav-tree .layui-this, .layui-nav-tree .layui-this>a, .layui-nav-tree .layui-this>a:hover { - ${systemConfig.bgColor!'background-color:#32c24d;'} - color: #fff; -} -.layui-layout-content .layui-nav-tree .layui-nav-item .layui-nav-title{ - background-color:#f5f5f5; - font-weight:bold; - height:40px; - line-height:40px; - border-bottom: 1px solid #EEEEEE; -} -.layui-layout-content .layui-nav-tree .layui-default { - background-color: ${systemConfig.styleColor!'#32c24d'}; - color: #FFFFFF; -} -.layui-layout-content .layui-nav-tree .layui-this .layui-nav-default{ - color:#FFFFFF; - -} -.layui-layout-content .box{ - padding:0px; -} -.layui-layout-content .box .box-title{ - padding:0px; - font-size:15px; - font-weight:400; -} -.layui-layout-content .box .box-body{ - padding-top:0px; -} -.layui-layout-content .box .box-item{ - padding:10px 5px 10px 5px; - -} -.layui-form-label { - padding: 9px 5px 5px 8px; -} -.layui-input-block{ - padding: 9px 15px 5px 0px; - margin-left: 0px; - min-height:20px; -} -.layui-form-item { - margin-bottom: 5px; -} -.layui-layout-content .layui-body .layui-side-scroll{ - width:100%; -} - -.layui-layout-content .layui-nav-tree .layui-nav-child, .layui-nav-tree .layui-nav-child a:hover { - color: #ffffff; -} -.box.default-box { - background-color: rgb(255, 255, 255); - margin-bottom: 0px; - border-top: none; - border-radius: 4px; -} -.box.default-box .box-header { - color: rgb(34, 45, 50); - background-color: rgb(245, 245, 245); - height: 40px; - line-height: 40px; - padding: 0px 5px; - border-bottom: 1px solid rgb(238, 238, 238); -} - -@font-face {font-family: "csfont"; -src: url('../fonts/csfont/iconfont.eot?t=1571210612143'); /* IE9*/ -src: url('../fonts/csfont/iconfont.eot?t=1571210612143#iefix') format('embedded-opentype'), /* IE6-IE8 */ -url('../fonts/csfont/iconfont.woff?t=1571210612143') format('woff'), /* chrome, firefox */ -url('../fonts/csfont/iconfont.ttf?t=1571210612143') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/ -url('../fonts/csfont/iconfont.svg?t=1571210612143#csfont') format('svg'); /* iOS 4.1- */ -} - -.csfont { -font-family:"csfont" !important; -font-size:16px; -font-style:normal; --webkit-font-smoothing: antialiased; --moz-osx-font-smoothing: grayscale; -} \ No newline at end of file diff --git a/contact-center/app/src/main/resources/templates/resource/css/system.pug b/contact-center/app/src/main/resources/templates/resource/css/system.pug new file mode 100644 index 00000000..5eac63b9 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/resource/css/system.pug @@ -0,0 +1,527 @@ +| @font-face {font-family: "kfont"; +| src: url('../fonts/kfont/iconfont.eot?t=1530410958255'); /* IE9*/ +| src: url('../fonts/kfont/iconfont.eot?t=1530410958255#iefix') format('embedded-opentype'), /* IE6-IE8 */ +| url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAALZoAAsAAAABHNwAAQ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anKSKpxxP2ANwsdMWlz6VesqurdzlQesZW2CIpQi/kh2+ozj7b4IS/k3migJrGOcpFEnDiNuE+MqKm84zMxYLIEtOvLztIUkVDKky510giQC3fVae8QqhmsWyUxx57Wtlg2cRAxbxQRZKP0lFncTqBkUNBDXA/sMoCB36Q/BNQuSjG2Qz2beFWX1hoGe04NhyWOU+2uWx6LqIpOrbQpqEExjl03zGlVXnPMrjutz22WIs8eWbWl8nmfBD24i4vxbUmAiM6RI5druCGn80oqTxNUzNOuTxdCzUItCmH5THmhto1xUhVxq+pse/ru2ML3yZqR3l8IgqdUGVk1ISPIINBq3+7dDb2h+cLaKnE3laktFi0Rz/HUWH0RB3aVYqTnmHDmdzrjdJx10tCnKnpOq4pxukmks16S8i3BxwtGun6eMpkNeWonqSAz5sVKXap5SIbKlLVDqfyIi5Yh2NPJ7NGTy3FvUwtvRKvKWS6UJBZu5Qa3u82EUXNDcJ81TErrZGkXeydp3Y+12keHa6Ju2/ivl/PMDImL9Km76VrboiBii9Vhvz6dvha1cGdrlXLls6IitbZokPvHBYv6NMnk1Cf1/o583TqtFtTXzoU56DaOkWorERMR3UpMt4RxTcHMsJPmr61LKCa6nLRJzK3+qtMwH385AZx95bkuP2vZH4qIMq7s2huLlA9T1j2l0wuMymFUR1D4Ba79QTkr+nt2bSaTVlVDr3vizOn+ZNNjgqZQ5yJnlXTctllLT5fva+W6Xn5lazMz/wE3yYUCAA==') format('woff'), +| url('../fonts/kfont/iconfont.ttf?t=1530410958255') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/ +| url('../fonts/kfont/iconfont.svg?t=1530410958255#kfont') format('svg'); /* iOS 4.1- */ +| } +| +| .kfont { +| font-family:"kfont" !important; +| font-size:16px; +| font-style:normal; +| -webkit - font - smoothing: antialiased; +| -moz - osx - font - smoothing: grayscale; +| } +| +| .icon-home:before { content: "\e717"; } +| +| .icon-icon2:before { content: "\e603"; } +| +| .icon-weixin:before { content: "\e631"; } +| +| .icon-user:before { content: "\e642"; } +| +| .icon-mac:before { content: "\e6be"; } +| +| .icon-zhi01:before { content: "\e62a"; } +| +| .icon-iconfonttime:before { content: "\e63b"; } +| +| .icon-user1:before { content: "\e60b"; } +| +| .icon-attachment:before { content: "\e617"; } +| +| .icon-linux:before { content: "\e726"; } +| +| .icon-windows:before { content: "\e801"; } +| +| .icon-ringpause:before { content: "\e64b"; } +| +| .icon-ai:before { content: "\e65f"; } +| +| .icon-msnui-logo-mac:before { content: "\e701"; } +| +| .icon-attachment1:before { content: "\e61b"; } +| +| .icon-import:before { content: "\e609"; } +| +| .icon-icon:before { content: "\e604"; } +| +| .icon-weixin1:before { content: "\e64d"; } +| +| .icon-tel1:before { content: "\e613"; } +| +| .icon-tel:before { content: "\e619"; } +| +| .icon-phone:before { content: "\e637"; } +| +| .icon-export:before { content: "\e62c"; } +| +| .icon-shoujianxiang:before { content: "\e634"; } +| +| .icon-iconfontagent:before { content: "\e620"; } +| +| .icon-delete:before { content: "\e675"; } +| +| .icon-phone1:before { content: "\e64a"; } +| +| .icon-iconfontupgrade:before { content: "\e635"; } +| +| .icon-password:before { content: "\e687"; } +| +| .icon-import1:before { content: "\e641"; } +| +| .icon-chat:before { content: "\e610"; } +| +| .icon-demo25:before { content: "\e61c"; } +| +| .icon-renzheng:before { content: "\e7e5"; } +| +| .icon-license:before { content: "\e658"; } +| +| .icon-password1:before { content: "\e618"; } +| +| .icon-loginiconphone:before { content: "\e61f"; } +| +| .icon-phone2:before { content: "\e629"; } +| +| .icon-servergisfuwupingtai:before { content: "\e7fa"; } +| +| .icon-vip:before { content: "\e71a"; } +| +| .icon-user-copy:before { content: "\e600"; } +| +| .icon-baobiao:before { content: "\e64e"; } +| +| .icon-workflow1:before { content: "\e636"; } +| +| .icon-poseidonworkflow:before { content: "\e664"; } +| +| .icon-thumbsup:before { content: "\e661"; } +| +| .icon-discharge_summary:before { content: "\e757"; } +| +| .icon-logout:before { content: "\e622"; } +| +| .icon-yewug:before { content: "\e6c6"; } +| +| .icon-workflowmonitoring:before { content: "\e638"; } +| +| .icon-zhishiguanli:before { content: "\e704"; } +| +| .icon-words2:before { content: "\e614"; } +| +| .icon-orders:before { content: "\e606"; } +| +| .icon-iconknowledge:before { content: "\e807"; } +| +| .icon-yulan:before { content: "\e63c"; } +| +| .icon-end-copy:before { content: "\e60e"; } +| +| .icon-import2:before { content: "\e654"; } +| +| .icon-import3:before { content: "\e65a"; } +| +| .icon-iconfontivr:before { content: "\e66f"; } +| +| .icon-history:before { content: "\e659"; } +| +| .icon-fav_active:before { content: "\e623"; } +| +| .icon-checkboxmultiplemarkedoutline:before { content: "\e72f"; } +| +| .icon-daiban-copy:before { content: "\e660"; } +| +| .icon-history1:before { content: "\e60a"; } +| +| .icon-iconfontfav-copy:before { content: "\e608"; } +| +| .icon-weibiaoti201:before { content: "\e6b7"; } +| +| .icon-knowledge:before { content: "\e628"; } +| +| .icon-import4:before { content: "\e89a"; } +| +| .icon-yulan1:before { content: "\e852"; } +| +| .icon-workflow:before { content: "\e632"; } +| +| .icon-agentblacklist:before { content: "\e8a7"; } +| +| .icon-time:before { content: "\e682"; } +| +| .icon-time2:before { content: "\e683"; } +| +| .icon-gongyongivr:before { content: "\e7a2"; } +| +| .icon-shoujianxiangbiaoqianlan:before { content: "\e62b"; } +| +| .icon-yiguanzhu:before { content: "\e624"; } +| +| .icon-pc:before { content: "\e601"; } +| +| .icon-phone3:before { content: "\e695"; } +| +| .icon-work:before { content: "\e607"; } +| +| .icon-off:before { content: "\e611"; } +| +| .icon-time1:before { content: "\e6ce"; } +| +| .icon-phone4:before { content: "\e647"; } +| +| .icon-callin:before { content: "\e625"; } +| +| .icon-summaryline:before { content: "\e65c"; } +| +| .icon-off1:before { content: "\e7e2"; } +| +| .icon-baobiao1:before { content: "\e64f"; } +| +| .icon-baobiao2:before { content: "\e651"; } +| +| .icon-export1:before { content: "\e605"; } +| +| .icon-off2:before { content: "\e621"; } +| +| .icon-history2:before { content: "\e690"; } +| +| .icon-words:before { content: "\e61d"; } +| +| .icon-90:before { content: "\e60d"; } +| +| .icon-node_end:before { content: "\e61a"; } +| +| .icon-shoujianxiangweixuanzhong:before { content: "\e602"; } +| +| .icon-tag:before { content: "\e63f"; } +| +| .icon-baobiaofenxi-copy:before { content: "\e652"; } +| +| .icon-customer:before { content: "\e650"; } +| +| .icon-dianhuahuiyi:before { content: "\e753"; } +| +| .icon-daochu:before { content: "\e672"; } +| +| .icon-userrole:before { content: "\e90b"; } +| +| .icon-zhishi:before { content: "\e615"; } +| +| .icon-userrole1:before { content: "\e7d0"; } +| +| .icon-iddenglu:before { content: "\e64c"; } +| +| .icon-yinzhangshenpitongguo:before { content: "\e6a4"; } +| +| .icon-yinzhangshenpijujue:before { content: "\e6a5"; } +| +| .icon-30offlineoval:before { content: "\e689"; } +| +| .icon-show_summary_img:before { content: "\e7c8"; } +| +| .icon-zhishiku:before { content: "\e630"; } +| +| .icon-ai1:before { content: "\e676"; } +| +| .icon-knowledge1:before { content: "\e62d"; } +| +| .icon-14guaduan-1:before { content: "\e67e"; } +| +| .icon-zhishi1:before { content: "\e616"; } +| +| .icon-plus-preview:before { content: "\e722"; } +| +| .icon-call_transfer:before { content: "\e663"; } +| +| .icon-priority:before { content: "\e82d"; } +| +| .icon-baobiaobiaoweiguanli:before { content: "\e653"; } +| +| .icon-zhishifenlei:before { content: "\e66c"; } +| +| .icon-hang-up:before { content: "\e626"; } +| +| .icon-AI:before { content: "\e66e"; } +| +| .icon-m-quick-quotation:before { content: "\e63d"; } +| +| .icon-ai2:before { content: "\e6ab"; } +| +| .icon-yulan2:before { content: "\e649"; } +| +| .icon-zaixianjieda:before { content: "\e698"; } +| +| .icon-view:before { content: "\e684"; } +| +| .icon-Import:before { content: "\e65b"; } +| +| .icon-transfer:before { content: "\e7be"; } +| +| .icon-history3:before { content: "\e7eb"; } +| +| .icon-import5:before { content: "\e60c"; } +| +| .icon-zhishi2:before { content: "\e699"; } +| +| .icon-icon-test:before { content: "\e67b"; } +| +| .icon-shenpitongguo:before { content: "\e66a"; } +| +| .icon-export2:before { content: "\e612"; } +| +| .icon-ziyuan:before { content: "\e63e"; } +| +| .icon-shenpi_tongguo:before { content: "\e697"; } +| +| .icon-shenpi_yijujue:before { content: "\e69a"; } +| +| .icon-Summary_today:before { content: "\e60f"; } +| +| .icon-yulan3:before { content: "\e6a9"; } +| +| .icon-icon_Dial_down:before { content: "\e679"; } +| +| .icon-baobiao3:before { content: "\e6d6"; } +| +| .icon-icon_knowledge:before { content: "\e655"; } +| +| .icon-shenpituihui:before { content: "\e639"; } +| +| .icon-attachment2:before { content: "\e61e"; } +| +| .icon-Call:before { content: "\e670"; } +| +| .icon-lailiaopinzhijianyan:before { content: "\e644"; } +| +| .icon-wenjian:before { content: "\e67c"; } +| +| .icon-uicon_ai:before { content: "\e63a"; } +| +| .icon-equipment_01:before { content: "\e71c"; } +| +| .icon-yewu:before { content: "\e640"; } +| +| .icon-yewu1:before { content: "\e645"; } +| +| .icon-icon_unknown_filled:before { content: "\e678"; } +| +| .icon-icon_unknown_wirefra:before { content: "\e67a"; } +| +| .icon-Ourknowledge:before { content: "\e643"; } +| +| .icon-user-unknown:before { content: "\e62e"; } +| +| .icon-ic_knowledge_border_:before { content: "\e62f"; } +| +| .icon-ic_knowledge_px:before { content: "\e633"; } +| +| .icon-shenpi-:before { content: "\e627"; } +| +| .icon-ERP_xqcaigou:before { content: "\e65d"; } +| +| .icon-shenpijujue:before { content: "\e674"; } +| +| .icon-yewu2:before { content: "\e646"; } +| +| .icon-yewu-copy:before { content: "\e648"; } +| +| .icon-yewu3:before { content: "\e662"; } +| +| .icon-yewu4:before { content: "\e904"; } +| +| .icon-time3:before { content: "\e735"; } +| +| body,html{ +| height:100%; +| color: #444; +| } +| body { +| line-height: 24px; +| font: 15px \5FAE\8F6F\96C5\9ED1,Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif; +| } +| body *{ +| outline:none; +| font-family: \5FAE\8F6F\96C5\9ED1,Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif !important; +| } +| +| a.disabled{ +| color: grey!important; +| cursor: default; +| +| &:hover { +| text-decoration: none; +| } +| } +| +| .header-ukefu{ +| height:50px; +| line-height:50px; +| } +| .layui-layout-admin .layui-side{ +| top:50px; +| } +| .layui-layout-admin .layui-body{ +| top:50px; +| bottom:0px; +| } +| +| .layui-layout-content .layui-bg-black{ +| background-color: #FFFFFF !important; +| width:270px; +| height:100%; +| color:#000000; +| } +| .layui-layout-content .layui-body{ +| left: 280px; +| padding: 0px 0px 0px 0px; +| height:100%; +| background-color:#FFFFFF; +| +| } +| .layui-layout-content .layui-side-scroll{ +| width:270px; +| } +| .layui-tab-title .layui-this:after{ +| height:31px; +| } +| .layui-tab-title li{ +| line-height: 30px; +| } +| .layui-tab-title{ +| height:30px; +| padding-left: 5px; +| } +| .layui-layout-content .layui-nav-tree{ +| width: 100%; +| } +| .layui-nav-tree .layui-nav-item a{ +| height:40px; +| line-height:40px; +| } +| .layui-layout-content .layui-nav{ +| background-color:#FFFFFF; +| } +| .layui-layout-content .layui-nav-itemed>a, .layui-nav-tree .layui-nav-title a, .layui-nav-tree .layui-nav-title a:hover { +| background-color: #f5f5f5 !important; +| color: #000!important; +| font-weight:600; +| } +| .layui-layout-content .layui-nav-tree .layui-nav-child, .layui-nav-tree .layui-nav-child a:hover { +| background: 0 0 !important; +| color: #000; +| } +| .layui-layout-content .layui-nav-tree .layui-nav-child a { +| height: 40px; +| line-height: 40px; +| color: #000; +| } +| +| .layui-layout-content .layui-nav .layui-nav-item a{ +| color:#000000; +| } +| .layui-layout-content .layui-nav .layui-nav-item .layui-this a{ +| color:#FFFFFF; +| } +| +| .layui-layout-content .layui-nav-tree .layui-nav-item .layui-nav-title{ +| background-color:#f5f5f5; +| font-weight:bold; +| height:40px; +| line-height:40px; +| border-bottom: 1px solid #EEEEEE; +| } +| +| .layui-layout-content .layui-nav-tree .layui-this .layui-nav-default{ +| color:#FFFFFF; +| +| } +| .layui-layout-content .box{ +| padding:0px; +| } +| .layui-layout-content .box .box-title{ +| padding:0px; +| font-size:15px; +| font-weight:400; +| } +| .layui-layout-content .box .box-body{ +| padding-top:0px; +| } +| .layui-layout-content .box .box-item{ +| padding:10px 5px 10px 5px; +| +| } +| .layui-form-label { +| padding: 9px 5px 5px 8px; +| } +| .layui-input-block{ +| padding: 9px 15px 5px 0px; +| margin-left: 0px; +| min-height:20px; +| } +| .layui-form-item { +| margin-bottom: 5px; +| } +| .layui-layout-content .layui-body .layui-side-scroll{ +| width:100%; +| } +| +| .layui-layout-content .layui-nav-tree .layui-nav-child, .layui-nav-tree .layui-nav-child a:hover { +| color: #ffffff; +| } +| .box.default-box { +| background-color: rgb(255, 255, 255); +| margin-bottom: 0px; +| border-top: none; +| border-radius: 4px; +| } +| .box.default-box .box-header { +| color: rgb(34, 45, 50); +| background-color: rgb(245, 245, 245); +| height: 40px; +| line-height: 40px; +| padding: 0px 5px; +| border-bottom: 1px solid rgb(238, 238, 238); +| } +| +| @font-face {font-family: "csfont"; +| src: url('../fonts/csfont/iconfont.eot?t=1571210612143'); /* IE9*/ +| src: url('../fonts/csfont/iconfont.eot?t=1571210612143#iefix') format('embedded-opentype'), /* IE6-IE8 */ +| url('../fonts/csfont/iconfont.woff?t=1571210612143') format('woff'), /* chrome, firefox */ +| url('../fonts/csfont/iconfont.ttf?t=1571210612143') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/ +| url('../fonts/csfont/iconfont.svg?t=1571210612143#csfont') format('svg'); /* iOS 4.1- */ +| } +| +| .csfont { +| font-family:"csfont" !important; +| font-size:16px; +| font-style:normal; +| -webkit - font - smoothing: antialiased; +| -moz - osx - font - smoothing: grayscale; +| } +| +| a { +| !{systemConfig.color?systemConfig.color:'color:#0096C4;'} +| } +| +| .layui-layout-admin .header-ukefu { +| border-bottom-color: #009688; +| !{systemConfig.backgroundColor?systemConfig.backgroundColor:'background-color: #32c24d;'} +| } +| +| .layui-layout-content .layui-nav-tree .layui-nav-item a:hover { +| background-color: !{systemConfig.styleColor?systemConfig.styleColor:'#32c24d'}; +| color:#FFFFFF; +| } +| +| .layui-layout-content .layui-nav-tree .layui-nav-child dd.layui-this, .layui-nav-tree .layui-this, .layui-nav-tree .layui-this>a, .layui-nav-tree .layui-this>a:hover { +| !{systemConfig.bgColor?systemConfig.bgColor:'background-color:#32c24d;'} +| color: #fff; +| } +| +| .layui-layout-content .layui-nav-tree .layui-default { +| background-color: !{systemConfig.styleColor?systemConfig.styleColor:'#32c24d'}; +| color: #FFFFFF; +| } diff --git a/contact-center/app/src/main/resources/templates/resource/css/ukefu.html b/contact-center/app/src/main/resources/templates/resource/css/ukefu.css similarity index 87% rename from contact-center/app/src/main/resources/templates/resource/css/ukefu.html rename to contact-center/app/src/main/resources/templates/resource/css/ukefu.css index 41448481..6c4b5f06 100644 --- a/contact-center/app/src/main/resources/templates/resource/css/ukefu.html +++ b/contact-center/app/src/main/resources/templates/resource/css/ukefu.css @@ -1,14 +1,10 @@ -<#include "/resource/css/system.html"/> - .select2-container{ z-index:10000000000; } .layui-input, .layui-select, .layui-textarea{ border-color:#cccccc; } -.layui-laypage .layui-laypage-curr .layui-laypage-em{ - background-color:${systemConfig.styleColor!'#32c24d'}; -} + .layui-nav-tree, .layui-side-scroll{ width: 50px; } @@ -18,12 +14,7 @@ .layui-tab-title li{ font-size:15px; } -.layui-colla-title{ - height:37px; - line-height:37px; - color:${systemConfig.styleColor!'#32c24d'}; - font-size:15px; -} + .ke-dialog{ z-index:1000000000 !important; } @@ -39,10 +30,7 @@ .ukefu-home i.layui-icon{ display:none; } -.layui-form-select dl dd.layui-this { - background-color: ${systemConfig.styleColor!'#32c24d'}; - color: #fff; -} + ::-webkit-scrollbar-thumb { border-radius: 0; background-color: rgba(0,0,0,.1); @@ -56,7 +44,6 @@ .site-tree{width: 220px; min-height: 900px; padding: 5px 0 20px;} .site-content{width: 899px; min-height: 900px; padding: 20px 0 10px 20px;} -.header{height: 50px; border-bottom: 0px solid #404553; background-color: ${systemConfig.styleColor!'#32c24d'}; color: #fff;font-weight:200;} .logo{position: absolute; left: 0; top: 10px;font-size:20px;color:#FFFFFF;} .logo img{height: 34px;} @@ -66,10 +53,7 @@ .layui-header a:hover { color:#FFFFFF; } -.layui-btn{ - ${systemConfig.bgColor!'background-color: #32c24d;'} - color:#ffffff !important; -} + .layui-btn-primary { border: 1px solid #C9C9C9; background-color: #fff; @@ -122,7 +106,7 @@ color: #555; .header-ukefu .layui-nav{top: 0;} .header-ukefu .layui-nav .layui-nav-item{margin: 0 10px; line-height: 48px;} .header-ukefu .layui-nav .layui-nav-item a{color: #ffffff;} -.header-ukefu .layui-nav .layui-this{${systemConfig.bgColor!'background-color: #19a55d;'}} + .header-ukefu .layui-nav .layui-nav-item a:hover, .header-ukefu .layui-nav .layui-this a{color: #fff;} .header-ukefu .layui-nav .layui-this:after, @@ -418,13 +402,7 @@ body .site-ukefu-nav .layui-nav-item{line-height: 40px} .layui-tab{ margin-top:5px; } -.layui-tab-title li{ - color:${systemConfig.styleColor!'#32c24d'}; -} -.product-tab .layui-tab-title .layui-this{ - color:${systemConfig.styleColor!'#32c24d'}; - background-color: #E6E6E6; -} + .layui-layout-content{ height:100%; } @@ -437,11 +415,7 @@ body .site-ukefu-nav .layui-nav-item{line-height: 40px} font-size: 20px; float:left; } -.layui-btn.green { - background: ${systemConfig.styleColor!'#32c24d'}; - border-color: ${systemConfig.styleColor!'#32c24d'}; - color: #fff; -} + .row{ margin-left:0px !important; margin-right:0px !important; @@ -706,9 +680,7 @@ body .site-ukefu-nav .layui-nav-item{line-height: 40px} .theme3 { background-color: #8E8E8E !important; } -.theme4 { - background-color: ${systemConfig.styleColor!'#32c24d'} !important; -} + .theme5 { background-color: #E45DB3 !important; } @@ -729,9 +701,7 @@ body .site-ukefu-nav .layui-nav-item{line-height: 40px} .ukefu-im-theme .ukefu-im-preview-user-icon.theme3 { color: #8E8E8E !important; } -.ukefu-im-theme .ukefu-im-preview-user-icon.theme4 { - color: ${systemConfig.styleColor!'#32c24d'} !important; -} + .ukefu-im-theme .ukefu-im-preview-user-icon.theme5 { color: #E45DB3 !important; } @@ -748,9 +718,7 @@ body .site-ukefu-nav .layui-nav-item{line-height: 40px} .ukefu-im-theme .ukefu-im-preview-user-message.theme3:after { background-color: #8E8E8E !important; } -.ukefu-im-theme .ukefu-im-preview-user-message.theme4:after { - background-color: ${systemConfig.styleColor!'#32c24d'} !important; -} + .ukefu-im-theme .ukefu-im-preview-user-message.theme5:after { background-color: #E45DB3 !important; } @@ -935,10 +903,7 @@ body .site-ukefu-nav .layui-nav-item{line-height: 40px} .ukefu-im-theme .ukefu-im-checked .ukefu-im-check { display: table !important; } -.ukefu-im-point .ok{ - background-color:${systemConfig.styleColor!'#32c24d'}; - color:#FFFFFF; -} + .ok .layui-icon{ position: absolute; line-height:20px; @@ -949,13 +914,6 @@ body .site-ukefu-nav .layui-nav-item{line-height: 40px} .ukefu-webim-prop:hover{ background-color:#eff4f5 ; } -.ukefu-green{ - background-color:${systemConfig.styleColor!'#32c24d'} !important; -} -.ukefu-font{ - color:${systemConfig.styleColor!'#32c24d'} !important; -} - .layui-header .layui-nav .layui-nav-more { content: ''; @@ -1000,12 +958,7 @@ body .site-ukefu-nav .layui-nav-item{line-height: 40px} font-weight: 500; margin-top: 0px; } -.layui-layout-content .layui-left-black a{ - color: ${systemConfig.styleColor!'#32c24d'} !important; -} -.layui-layout-content .layui-left-black a:hover { - color: ${systemConfig.styleColor!'#32c24d'} !important; -} + .ukewo-btn{ font-size: 28px; height: 26px; @@ -1055,9 +1008,7 @@ body .site-ukefu-nav .layui-nav-item{line-height: 40px} .ukefu-bg-color-pink{ background-color:#F186B4; } -.ukefu-bg-color-green{ - background-color:${systemConfig.styleColor!'#32c24d'}; -} + .ukefu-bt .ukefu-bt-text { float: left; text-align: left; @@ -1522,9 +1473,6 @@ ul.dialog-list li .dialog-info .news .badge { height:100%; } -.bg-green { - background-color: ${systemConfig.styleColor!'#32c24d'}; -} .bg-red { background-color: #dd4b39; } @@ -1579,10 +1527,7 @@ ul.dialog-list li .dialog-info .news .badge { float: left; min-width: 25px; } -.ukefu-online-client{ - color:${systemConfig.styleColor!'#32c24d'}; - font-size:20px; -} + .box .box-body .info-list { list-style: none; padding: 0; @@ -1600,9 +1545,7 @@ ul.dialog-list li .dialog-info .news .badge { .ukefu-customer-div .box .box-body{ padding:10px; } -.ukefu-online-user{ - color:${systemConfig.styleColor!'#32c24d'}; -} + .ukefu-online-user i{ font-size:12px; } @@ -1615,18 +1558,11 @@ ul.dialog-list li .dialog-info .news .badge { background-color: #eff4f5; position: relative; } -.uk_organ .uk_organ_skill{ - position: absolute; - right: 0px; - top: 5px; - color:${systemConfig.styleColor!'#32c24d'}; -} + .offline{ color:#aaaaaa; } -.online{ - color:${systemConfig.styleColor!'#32c24d'}; -} + .ukefu-webim-prop{ padding-left: 10px; } @@ -1717,20 +1653,7 @@ ul.dialog-list li .dialog-info .news .badge { padding:10px; margin-bottom:20px; } -.ukefu-label { - display: inline-block; - font-weight: 400; - color: #fff; - text-align: center; - white-space: nowrap; - vertical-align: baseline; - border-radius: .25em; - background-color:${systemConfig.styleColor!'#32c24d'}; - height: 22px; - line-height: 22px; - padding: 0 5px; - font-size: 14px; -} + .ukefu-label i{ font-size: 14px; } @@ -1756,13 +1679,7 @@ ul.dialog-list li .dialog-info .news .badge { .ukefu-access-label:not(:last-child){ margin-right:6px; } -.ukefu-tag-add{ - float:right; - color: ${systemConfig.styleColor!'#32c24d'}; - font-size:20px; - font-weight:600; - position: relative; -} + .ukefu-tag-list{ position: absolute; right: 20px; @@ -1798,14 +1715,7 @@ ul.dialog-list li .dialog-info .news .badge { #tags .ukefu-access-label{ margin-bottom:5px; } -.ukefu-quick-reply li{ - line-height: 26px; - overflow: hidden; - list-style: decimal-leading-zero inside; - color: ${systemConfig.styleColor!'#32c24d'} !important; - font-style: normal; - margin-bottom: 5px; -} + .ukefu-quick-reply li span , .quick-reply-content{ cursor: pointer; } @@ -1906,13 +1816,7 @@ ul.dialog-list li .dialog-info .news .badge { .ukefu-tab-title{ margin-left: 38px; } -.ukefu-tab-title .layui-tab-title{ - border-bottom: 1px solid ${systemConfig.styleColor!'#32c24d'}; -} -.ukefu-tab-title .layui-tab-title .layui-this::after{ - border: 1px solid ${systemConfig.styleColor!'#32c24d'}; - border-bottom-color: #f5f5f5; -} + .ukefu-tab { border-bottom: 0px solid #eee; } @@ -1977,9 +1881,6 @@ select{ padding: 0 10px; cursor: pointer; } -.ukefu-tab-title .tab-title { - border-bottom: 1px solid ${systemConfig.styleColor!'#32c24d'}; -} .ukefu-tab-title .tab-title .layui-this:after { position: absolute; @@ -1999,21 +1900,14 @@ select{ .ukefu-tab-title .tab-title .layui-this { color: #000; } -.ukefu-tab-title .tab-title .layui-this::after { - border-top: 1px solid ${systemConfig.styleColor!'#32c24d'}; - border-left: 1px solid ${systemConfig.styleColor!'#32c24d'}; - border-right: 1px solid ${systemConfig.styleColor!'#32c24d'}; - border-bottom-color: #f5f5f5; -} + .ukefu-tab-title .tab-title .layui-this:after { height: 31px; } .ukefu-tab-title .tab-title li { line-height: 30px; } -.ukefu-tab-title .tab-title li { - color: ${systemConfig.styleColor!'#32c24d'}; -} + .ukefu-tab-title .tab-title li { font-size: 15px; } @@ -2096,11 +1990,7 @@ select{ .ukefu-weixin-text-last{ float: right; } -.ukefu-weixin-text-today{ - font-size: 24px; - padding:10px 10px 10px 0px; - color:${systemConfig.styleColor!'#32c24d'}; -} + .ukefu-imr-tree{ width:320px; } @@ -2123,10 +2013,7 @@ select{ .ztree li a.curSelectedNode{ height:24px; } -.ztree li a:hover { - text-decoration: none; - color:${systemConfig.styleColor!'#32c24d'}; -} + .ztree li span.button{ margin-top: 4px; vertical-align: top !important; @@ -2134,9 +2021,7 @@ select{ .ztree li span.button.imr_ico_open{margin-right:2px; background: url(/images/imr.png) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle} .ztree li span.button.imr_ico_close{margin-right:2px; background: url(/images/imr.png) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle} .ztree li span.button.imr_ico_docu{margin-right:2px; background: url(/images/imr.png) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle} -.ukefu-channel-tip{ - color:${systemConfig.styleColor!'#32c24d'} !important; -} + .ukefu-user-headimg{ position: absolute; right: 5px; @@ -2149,14 +2034,7 @@ select{ .chat-list-item img{ border-radius: 50%; } -.ukefu-channel-icon{ - position: absolute; - left: 40px; - top: 35px; - z-index:10000; - color: ${systemConfig.styleColor!'#32c24d'} !important; - font-size:20px; -} + .ukefu-channel-icon-end{ position: absolute; left: 40px; @@ -2235,18 +2113,11 @@ select{ .select2-dropdown{ border-color:#cccccc; } -.select2-container--default .select2-selection--multiple .select2-selection__choice{ - background-color: ${systemConfig.styleColor!'#32c24d'}; - border: 1px solid #cccccc; - color:#FFFFFF; - line-height:24px; -} + .select2-container--default .select2-selection--multiple .select2-selection__choice__remove{ color:#FFFFFF; } -.select2-container--default .select2-results__option--highlighted[aria-selected]{ - background-color: ${systemConfig.styleColor!'#32c24d'}; -} + .select2-container--default .select2-selection--single .select2-selection__rendered{ height: 38px; line-height: 36px; @@ -2258,13 +2129,7 @@ select{ padding-bottom:5px; padding-top:5px; } -.ukefu-workorders-number{ - position: absolute; - left: 5px; - top:10px; - color:${systemConfig.styleColor!'#32c24d'}; - font-size:14px; -} + .ukefu-workorders-number i{ font-size:20px; } @@ -2377,15 +2242,10 @@ select{ .ui-step-6 li { width: 20%; } /** The default style (榛樿椋庢牸) **/ /* Done */ -.step-done .ui-step-cont-number { background-color: ${systemConfig.styleColor!'#32c24d;'}; } -.step-done .ui-step-cont-text { color: ${systemConfig.styleColor!'#32c24d;'} } -.step-done .ui-step-line { background-color: ${systemConfig.styleColor!'#32c24d;'} } + /* Active */ -.step-active .ui-step-cont-number { ${systemConfig.bgColor!'background-color: #32c24d;'} } -.step-active .ui-step-cont-text { - color: ${systemConfig.styleColor!'#32c24d;'}; - font-weight: bold; -} + + .step-active .ui-step-line { background-color: #e0e0e0; } @@ -2424,8 +2284,7 @@ select{ .ui-step-red .step-active .ui-step-cont-text { color: #f66; } .ui-step-red .step-active .ui-step-line { background-color: #e0e0e0; } -.ukefu-system-theme1{background-color:${systemConfig.styleColor!'#32c24d'};} -.ukefu-system-theme1 li{color:${systemConfig.styleColor!'#32c24d'};} + .ukefu-system-theme2{background-color: #373d41;} .ukefu-system-theme1 li{color:#333333;} @@ -2904,20 +2763,6 @@ select{ .logo{position: absolute; left: 0; top: 0px;font-size:20px;color:#FFFFFF;} .logo img{height: 34px;} - -.ukefu-softphone{ - position: absolute; - top: 0px; - height: 50px; - right:0px; - border-radius: 50px; - <#if user?? && user.admin> - width: 740px; - <#else> - width: 690px; - - padding: 0px 5px 0px 20px; -} .ukefu-softphone{ -moz-user-select: none; /*火狐*/ -webkit-user-select: none; /*webkit浏览�?*/ @@ -3167,19 +3012,6 @@ select{ top:2px; color:#333; } -.ukefu-kbs-btn{ - position: absolute; - cursor: pointer; - right: 20px; - top: 0px; - padding: 3px 0px 3px 8px; - height: 32px; - width: 33px; - font-size: 25px; - line-height:38px; - color:#FFFFFF; - ${systemConfig.bgColor!'background-color:#32c24d;'} -} .box .box-body .search li { font-size: 14px; @@ -3193,10 +3025,7 @@ select{ top:0px; left:0px; } -.box .box-body .search li .fav i{ - font-size:20px; - ${systemConfig.color!'color:#0096C4;'} -} + .ukefu-kbs-search-title{ color:#32c24d } @@ -3218,18 +3047,7 @@ select{ display: inline-block; margin-right:10px; } -.ukef-kmmap-current{ - display: inline-block; - font-size: 14px; - font-weight: 400; - line-height: 14px; - text-shadow: rgba(0, 0, 0, 0.247059) 0px -1px 0px; - white-space: nowrap; - vertical-align: baseline; - ${systemConfig.bgColor!'background-color: #32c24d;'} - padding: 4px 5px 4px 5px; - border-radius: 3px; -} + .ukef-kmmap-current a{ color:#ffffff; } @@ -3310,14 +3128,7 @@ select{ .ukefu-workflow-status .back{ font-size: 50px; } -.ukefu-workflow-status .turn{ - font-size: 50px; - ${systemConfig.color!'color:#0096C4;'} -} -.ukefu-workflow-status .agree{ - font-size: 50px; - ${systemConfig.color!'color:#0096C4;'} -} + .ukefu-ztree{ position: absolute; z-index: 10000; @@ -3352,16 +3163,7 @@ select{ .ukefu-message-file .ukefu-file-icon{ line-height:60px; } -.ukefu-message-file .ukefu-file-icon i{ - font-size:34px; - margin:5px 3px 8px 0px; - ${systemConfig.color!'color:#0096C4;'} -} -.ukefu-message-file .ukefu-file-desc{ - margin-left:0px; - float:left; - ${systemConfig.color!'color:#0096C4;'} -} + .ukefu-message-file a{ color:#32c24d !important; } @@ -3781,25 +3583,7 @@ select{ padding: 10px 10px 10px; } -.ukewo-card-3 .ukewo-card-4 { - overflow: hidden; - text-overflow: ellipsis; - word-break: break-all; - white-space: nowrap; - color: rgba(0,0,0,.85); - margin-top: 4px; - margin-bottom: 0; - font-size: 30px; - line-height: 38px; - height: 38px; - color:${systemConfig.styleColor!'#32c24d'}; -} -.ukewo-card-5{ - margin-left: 8px; - color: rgba(0,0,0,.85); - line-height: 38px; - color:${systemConfig.styleColor!'#32c24d'}; -} + .ukewo-card{ padding: 0px; margin-top: 0px; @@ -3831,22 +3615,6 @@ select{ width:120px; } - - -.uk-div-monitor .agent_ch .agent_no{ - overflow: hidden; - text-overflow: ellipsis; - word-break: break-all; - white-space: nowrap; - color: rgba(0,0,0,.85); - margin-top: 4px; - margin-bottom: 0; - font-size: 30px; - line-height: 38px; - height: 38px; - color:${systemConfig.styleColor!'#32c24d'}; -} - .ukefu-empty-1{ margin:0 auto; font-size:20px; diff --git a/contact-center/app/src/main/resources/templates/resource/css/ukefu.pug b/contact-center/app/src/main/resources/templates/resource/css/ukefu.pug new file mode 100644 index 00000000..6dab6462 --- /dev/null +++ b/contact-center/app/src/main/resources/templates/resource/css/ukefu.pug @@ -0,0 +1,329 @@ +- var styleColor = systemConfig.styleColor ? systemConfig.styleColor : '#32c24d' +- var bgColor = systemConfig.bgColor ? systemConfig.bgColor : 'background-color: #32c24d;' +- var color = systemConfig.color ? systemConfig.color : 'color:#0096C4;' + +| .layui-laypage .layui-laypage-curr .layui-laypage-em{ +| background-color: !{styleColor}; +| } +| +| .layui-colla-title{ +| height:37px; +| line-height:37px; +| color:!{styleColor}; +| font-size:15px; +| } +| +| .layui-form-select dl dd.layui-this { +| background-color: !{styleColor}; +| color: #fff; +| } +| +| .layui-btn{ +| !{bgColor} +| color:#ffffff !important; +| } +| +| .layui-btn-original { +| border: 1px solid #C9C9C9; +| background-color: #fff!important; +| color: #555!important; +| } +| +| .header-ukefu .layui-nav .layui-this{ +| !{systemConfig.bgColor?systemConfig.bgColor:'background-color: #19a55d;'} +| } +| +| .layui-tab-title li{ +| color:!{styleColor}; +| } +| +| .product-tab .layui-tab-title .layui-this{ +| color:!{styleColor}; +| background-color: #E6E6E6; +| } +| +| .header{ +| height: 50px; +| border-bottom: +| 0px solid #404553; +| background-color: !{styleColor}; +| color: #fff;font-weight:200; +| } +| +| .uk-div-monitor .agent_ch .agent_no{ +| overflow: hidden; +| text-overflow: ellipsis; +| word-break: break-all; +| white-space: nowrap; +| color: rgba(0,0,0,.85); +| margin-top: 4px; +| margin-bottom: 0; +| font-size: 30px; +| line-height: 38px; +| height: 38px; +| color:!{styleColor}; +| } +| +| .ukefu-channel-icon{ +| position: absolute; +| left: 40px; +| top: 35px; +| z-index:10000; +| color: !{styleColor} !important; +| font-size:20px; +| } +| +| .ztree li a:hover { +| text-decoration: none; +| color:!{styleColor}; +| } +| +| .ukefu-weixin-text-today{ +| font-size: 24px; +| padding:10px 10px 10px 0px; +| color:!{styleColor}; +| } +| +| .ukefu-tab-title .tab-title .layui-this::after { +| border-top: 1px solid !{styleColor}; +| border-left: 1px solid !{styleColor}; +| border-right: 1px solid !{styleColor}; +| border-bottom-color: #f5f5f5; +| } +| +| .ukefu-tab-title .tab-title li { +| color: !{styleColor}; +| } +| +| .ukefu-channel-tip{ +| color:!{styleColor} !important; +| } +| +| .select2-container--default .select2-selection--multiple .select2-selection__choice{ +| background-color: !{styleColor}; +| border: 1px solid #cccccc; +| color:#FFFFFF; +| line-height:24px; +| } +| +| .ukefu-tab-title .tab-title { +| border-bottom: 1px solid !{styleColor}; +| } +| +| .select2-container--default .select2-results__option--highlighted[aria-selected]{ +| background-color: !{styleColor}; +| } +| +| .ukefu-workorders-number{ +| position: absolute; +| left: 5px; +| top:10px; +| color:!{styleColor}; +| font-size:14px; +| } +| +| .step-done .ui-step-cont-number { background-color: !{styleColor}; } +| .step-done .ui-step-cont-text { color: !{styleColor} } +| .step-done .ui-step-line { background-color: !{styleColor} } +| +| .step-active .ui-step-cont-number { !{bgColor} } +| +| .step-active .ui-step-cont-text { +| color: !{styleColor}; +| font-weight: bold; +| } +| +| .ukefu-system-theme1{background-color:!{styleColor};} +| .ukefu-system-theme1 li{color:!{styleColor};} +| +| .ukefu-kbs-btn{ +| position: absolute; +| cursor: pointer; +| right: 20px; +| top: 0px; +| padding: 3px 0px 3px 8px; +| height: 32px; +| width: 33px; +| font-size: 25px; +| line-height:38px; +| color:#FFFFFF; +| !{bgColor} +| } +| +| .box .box-body .search li .fav i{ +| font-size:20px; +| !{color} +| } +| +| .ukef-kmmap-current{ +| display: inline-block; +| font-size: 14px; +| font-weight: 400; +| line-height: 14px; +| text-shadow: rgba(0, 0, 0, 0.247059) 0px -1px 0px; +| white-space: nowrap; +| vertical-align: baseline; +| !{bgColor} +| padding: 4px 5px 4px 5px; +| border-radius: 3px; +| } +| +| .ukefu-workflow-status .turn{ +| font-size: 50px; +| !{color} +| } +| +| .ukefu-workflow-status .agree{ +| font-size: 50px; +| !{color} +| } +| +| .ukefu-message-file .ukefu-file-icon i{ +| font-size:34px; +| margin:5px 3px 8px 0px; +| !{color} +| } +| +| .ukefu-message-file .ukefu-file-desc{ +| margin-left:0px; +| float:left; +| !{color} +| } +| +| .ukewo-card-3 .ukewo-card-4 { +| overflow: hidden; +| text-overflow: ellipsis; +| word-break: break-all; +| white-space: nowrap; +| color: rgba(0,0,0,.85); +| margin-top: 4px; +| margin-bottom: 0; +| font-size: 30px; +| line-height: 38px; +| height: 38px; +| color:!{styleColor}; +| } +| .ukewo-card-5{ +| margin-left: 8px; +| color: rgba(0,0,0,.85); +| line-height: 38px; +| color:!{styleColor}; +| } +| +| .layui-btn.green { +| background: !{styleColor}; +| border-color: !{styleColor}; +| color: #fff; +| } +| +| .theme4 { +| background-color: !{styleColor} !important; +| } +| +| .ukefu-im-theme .ukefu-im-preview-user-icon.theme4 { +| color: !{styleColor} !important; +| } +| +| .ukefu-im-point .ok{ +| background-color:!{styleColor}; +| color:#FFFFFF; +| } +| +| .ukefu-green{ +| background-color:!{styleColor} !important; +| } +| .ukefu-font{ +| color:!{styleColor} !important; +| } +| +| .layui-layout-content .layui-left-black a{ +| color: !{styleColor} !important; +| } +| .layui-layout-content .layui-left-black a:hover { +| color: !{styleColor} !important; +| } +| +| .ukefu-bg-color-green{ +| background-color:!{styleColor}; +| } +| +| .bg-green { +| background-color: !{styleColor}; +| } +| +| .ukefu-online-client{ +| color:!{styleColor}; +| font-size:20px; +| } +| +| .uk_organ .uk_organ_skill{ +| position: absolute; +| right: 0px; +| top: 5px; +| color:!{styleColor}; +| } +| +| .online{ +| color:!{styleColor}; +| } +| +| .ukefu-label { +| display: inline-block; +| font-weight: 400; +| color: #fff; +| text-align: center; +| white-space: nowrap; +| vertical-align: baseline; +| border-radius: .25em; +| background-color:!{styleColor}; +| height: 22px; +| line-height: 22px; +| padding: 0 5px; +| font-size: 14px; +| } +| +| .ukefu-tag-add{ +| float:right; +| color: !{styleColor}; +| font-size:20px; +| font-weight:600; +| position: relative; +| } +| +| .ukefu-quick-reply li{ +| line-height: 26px; +| overflow: hidden; +| list-style: decimal-leading-zero inside; +| color: !{styleColor} !important; +| font-style: normal; +| margin-bottom: 5px; +| } +| +| .ukefu-tab-title .layui-tab-title{ +| border-bottom: 1px solid !{styleColor}; +| } +| .ukefu-tab-title .layui-tab-title .layui-this::after{ +| border: 1px solid !{styleColor}; +| border-bottom-color: #f5f5f5; +| } +| +| .ukefu-im-theme .ukefu-im-preview-user-message.theme4:after { +| background-color: !{styleColor} !important; +| } +| +| .ukefu-online-user{ +| color:!{styleColor}; +| } +| +| .ukefu-softphone{ +| position: absolute; +| top: 0px; +| height: 50px; +| right:0px; +| border-radius: 50px; +| width: #{user.admin?'740px':'690px'}; +| padding: 0px 5px 0px 20px; +| } + +include system.pug +include ukefu.css \ No newline at end of file diff --git a/contact-center/config/sql/cosinee-MySQL-slim.sql b/contact-center/config/sql/cosinee-MySQL-slim.sql index b7b5c472..bd77b9c0 100644 --- a/contact-center/config/sql/cosinee-MySQL-slim.sql +++ b/contact-center/config/sql/cosinee-MySQL-slim.sql @@ -762,6 +762,53 @@ CREATE TABLE `uk_ai_snsaccount` ( PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='AI列表'; +DROP TABLE IF EXISTS `cs_fb_messenger`; +CREATE TABLE `cs_fb_messenger` ( + `id` varchar(32) NOT NULL, + `page_id` varchar(100) NOT NULL, + `token` varchar(300) NOT NULL, + `verify_token` varchar(100) NOT NULL, + `name` varchar(100) NOT NULL, + `status` varchar(100) NOT NULL, + `organ` varchar(32) NOT NULL, + `aiid` varchar(32) DEFAULT NULL, + `ai` tinyint(4) DEFAULT '0' COMMENT '启用AI', + `aisuggest` tinyint(4) DEFAULT '0' COMMENT '启用智能建议', + `config` VARCHAR(1000) NULL DEFAULT NULL COMMENT '文案配置', + `createtime` datetime NOT NULL, + `updatetime` datetime NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='FB渠道'; + +DROP TABLE IF EXISTS `cs_fb_otn`; +CREATE TABLE `cs_fb_otn` ( + `id` VARCHAR(32) NOT NULL, + `name` VARCHAR(100) NOT NULL, + `page_id` VARCHAR(100) NOT NULL, + `pre_sub_message` VARCHAR(500) NULL DEFAULT NULL, + `sub_message` VARCHAR(500) NOT NULL, + `success_message` VARCHAR(500) NULL DEFAULT NULL, + `otn_message` VARCHAR(1000) NOT NULL, + `status` VARCHAR(50) NOT NULL, + `createtime` DATETIME NOT NULL, + `updatetime` DATETIME NOT NULL, + `sendtime` DATETIME NULL DEFAULT NULL, + `sub_num` INT(11) NOT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='FB OTN'; + +DROP TABLE IF EXISTS `cs_fb_otn_follow`; +CREATE TABLE `cs_fb_otn_follow` ( + `id` VARCHAR(32) NOT NULL, + `page_id` VARCHAR(32) NOT NULL, + `otn_id` VARCHAR(32) NOT NULL, + `user_id` VARCHAR(300) NOT NULL, + `otn_token` VARCHAR(300) NOT NULL, + `createtime` DATETIME NOT NULL, + `updatetime` DATETIME NOT NULL, + `sendtime` DATETIME NULL DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='FB OTN 订阅'; + -- ---------------------------- -- Table structure for uk_area_type -- ---------------------------- @@ -2260,89 +2307,6 @@ CREATE TABLE `uk_jobdetailproduct` ( PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='活动产品表'; --- ---------------------------- --- Table structure for uk_kbs_expert --- ---------------------------- -DROP TABLE IF EXISTS `uk_kbs_expert`; -CREATE TABLE `uk_kbs_expert` ( - `id` varchar(32) NOT NULL COMMENT '主键ID', - `user_id` varchar(32) DEFAULT NULL COMMENT '用户ID', - `kbstype` varchar(32) DEFAULT NULL COMMENT '知识库分类', - `creater` varchar(32) DEFAULT NULL COMMENT '创建人', - `createtime` datetime DEFAULT NULL COMMENT '创建时间', - `orgi` varchar(32) DEFAULT NULL COMMENT '租户ID', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='知识库'; - --- ---------------------------- --- Table structure for uk_kbs_topic --- ---------------------------- -DROP TABLE IF EXISTS `uk_kbs_topic`; -CREATE TABLE `uk_kbs_topic` ( - `id` varchar(32) NOT NULL COMMENT '主键ID', - `sessionid` varchar(32) DEFAULT NULL COMMENT '会话ID', - `title` varchar(255) DEFAULT NULL COMMENT '主题', - `content` text COMMENT '知识库内容', - `keyword` text COMMENT '关键词', - `summary` text COMMENT '摘要', - `anonymous` tinyint(4) DEFAULT NULL COMMENT '允许匿名访问', - `begintime` datetime DEFAULT NULL COMMENT '有效期开始时间', - `endtime` datetime DEFAULT NULL COMMENT '有效期结束时间', - `top` tinyint(4) DEFAULT NULL COMMENT '是否置顶', - `essence` tinyint(4) DEFAULT NULL COMMENT '精华', - `accept` tinyint(4) DEFAULT NULL COMMENT '允许评论', - `finish` tinyint(4) DEFAULT NULL COMMENT '已结束', - `answers` int(11) DEFAULT NULL COMMENT '回答数量', - `sviews` int(11) DEFAULT NULL COMMENT '预览次数', - `followers` int(11) DEFAULT NULL COMMENT '关注人数', - `collections` int(11) DEFAULT NULL COMMENT '引用次数', - `comments` int(11) DEFAULT NULL COMMENT '回复数', - `mobile` tinyint(4) DEFAULT NULL COMMENT '移动端支持', - `status` varchar(32) DEFAULT NULL COMMENT '状态', - `tptype` varchar(32) DEFAULT NULL COMMENT '分类ID', - `cate` varchar(32) DEFAULT NULL COMMENT '分类ID', - `username` varchar(32) DEFAULT NULL COMMENT '用户名', - `orgi` varchar(32) DEFAULT NULL COMMENT '租户ID', - `creater` varchar(32) DEFAULT NULL COMMENT '创建人', - `createtime` datetime DEFAULT NULL COMMENT '创建时间', - `updatetime` datetime DEFAULT NULL COMMENT '修改时间', - `memo` varchar(32) DEFAULT NULL COMMENT '备注', - `price` int(11) DEFAULT NULL COMMENT '权重', - `organ` varchar(32) DEFAULT NULL COMMENT '组织机构', - `sms` varchar(255) DEFAULT NULL COMMENT '短信模板', - `tts` varchar(255) DEFAULT NULL COMMENT 'TTS模板', - `email` text COMMENT '邮件模板', - `weixin` text COMMENT '微信回复模板', - `tags` text COMMENT '标签', - `attachment` text COMMENT '附件', - `approval` tinyint(4) DEFAULT NULL COMMENT '是否审批通过' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='知识库内容表'; - --- ---------------------------- --- Table structure for uk_kbs_type --- ---------------------------- -DROP TABLE IF EXISTS `uk_kbs_type`; -CREATE TABLE `uk_kbs_type` ( - `ID` varchar(32) NOT NULL COMMENT '主键ID', - `NAME` varchar(50) DEFAULT NULL COMMENT '名称', - `CODE` varchar(50) DEFAULT NULL COMMENT '代码', - `CREATETIME` datetime DEFAULT NULL COMMENT '创建时间', - `CREATER` varchar(32) DEFAULT NULL COMMENT '创建人', - `UPDATETIME` datetime DEFAULT NULL COMMENT '更新时间', - `ORGI` varchar(32) DEFAULT NULL COMMENT '租户ID', - `USERNAME` varchar(50) DEFAULT NULL COMMENT '创建人姓名', - `PARENTID` varchar(32) DEFAULT NULL COMMENT '知识库分类上级ID', - `APPROVAL` tinyint(4) DEFAULT NULL COMMENT '是否启用审批', - `BPMID` varchar(32) DEFAULT NULL COMMENT '审批流程ID', - `PC` varchar(32) DEFAULT NULL COMMENT '负责人', - `INX` int(11) DEFAULT NULL COMMENT '分类排序序号', - `STARTDATE` datetime DEFAULT NULL COMMENT '有效期开始时间', - `ENDDATE` datetime DEFAULT NULL COMMENT '有效期结束时间', - `ENABLE` tinyint(4) DEFAULT NULL COMMENT '分类状态', - `DESCRIPTION` varchar(255) DEFAULT NULL COMMENT '分类描述', - `BPM` tinyint(4) DEFAULT NULL COMMENT '是否需要流程审批', - PRIMARY KEY (`ID`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='知识分类表'; -- ---------------------------- -- Table structure for uk_leavemsg @@ -2521,6 +2485,7 @@ CREATE TABLE `uk_onlineuser` ( `channel` varchar(32) DEFAULT NULL COMMENT '渠道', `appid` varchar(32) DEFAULT NULL COMMENT 'SNSID', `contactsid` varchar(32) DEFAULT NULL COMMENT '联系人ID', + `headimgurl` varchar(300) DEFAULT NULL COMMENT '访客头像', PRIMARY KEY (`id`) USING BTREE, KEY `onlineuser_userid` (`userid`) USING BTREE, KEY `onlineuser_orgi` (`orgi`) USING BTREE @@ -2923,45 +2888,6 @@ CREATE TABLE `uk_que_survey_question` ( PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='问卷调查-问题表'; --- ---------------------------- --- Table structure for uk_quick_type --- ---------------------------- -DROP TABLE IF EXISTS `uk_quick_type`; -CREATE TABLE `uk_quick_type` ( - `ID` varchar(32) NOT NULL COMMENT '主键ID', - `NAME` varchar(50) DEFAULT NULL COMMENT '名称', - `CODE` varchar(50) DEFAULT NULL COMMENT '代码', - `CREATETIME` datetime DEFAULT NULL COMMENT '创建时间', - `CREATER` varchar(32) DEFAULT NULL COMMENT '创建人', - `UPDATETIME` datetime DEFAULT NULL COMMENT '更新时间', - `ORGI` varchar(32) DEFAULT NULL COMMENT '租户ID', - `USERNAME` varchar(50) DEFAULT NULL COMMENT '用户名', - `PARENTID` varchar(32) DEFAULT NULL COMMENT '知识库分类上级ID', - `INX` int(11) DEFAULT NULL COMMENT '分类排序序号', - `STARTDATE` datetime DEFAULT NULL COMMENT '有效期开始时间', - `ENDDATE` datetime DEFAULT NULL COMMENT '有效期结束时间', - `ENABLE` tinyint(4) DEFAULT NULL COMMENT '分类状态', - `DESCRIPTION` varchar(255) DEFAULT NULL COMMENT '分类描述', - `QUICKTYPE` varchar(32) DEFAULT NULL COMMENT '类型(公共/个人)', - PRIMARY KEY (`ID`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='质检项分类'; - --- ---------------------------- --- Table structure for uk_quickreply --- ---------------------------- -DROP TABLE IF EXISTS `uk_quickreply`; -CREATE TABLE `uk_quickreply` ( - `id` varchar(32) NOT NULL DEFAULT '' COMMENT '主键ID', - `title` varchar(255) DEFAULT NULL COMMENT '标题', - `content` text COMMENT '内容', - `type` varchar(10) DEFAULT NULL COMMENT '类型', - `creater` varchar(32) DEFAULT NULL COMMENT '创建人', - `createtime` datetime DEFAULT NULL COMMENT '创建时间', - `cate` varchar(32) DEFAULT NULL COMMENT '分类', - `orgi` varchar(32) DEFAULT NULL COMMENT '租户ID', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='快捷回复表'; - -- ---------------------------- -- Table structure for uk_recentuser -- ---------------------------- @@ -7148,9 +7074,7 @@ INSERT INTO `uk_sysdic` VALUES ('402881ef612b1f5b01612cc529b20540', '全部客 INSERT INTO `uk_sysdic` VALUES ('402881ef612b1f5b01612cc551ac0541', '工单管理', 'pub', 'A04', NULL, 'auth', '402888815d2fe37f015d2fe75cc80002', NULL, NULL, '', NULL, NULL, '297e8c7b455798280145579c73e501c1', '2018-01-25 18:03:04', NULL, 0, 0, '402888815d2fe37f015d2fe75cc80002', 0, 0, '/apps/workorders/index.html', 'webim', '1', NULL, 'left'); INSERT INTO `uk_sysdic` VALUES ('402881ef612b1f5b01612cc580cc0542', '业务流程', 'pub', 'A05', NULL, 'auth', '402888815d2fe37f015d2fe75cc80002', NULL, NULL, '', NULL, NULL, '297e8c7b455798280145579c73e501c1', '2018-01-25 18:03:16', NULL, 0, 0, '402888815d2fe37f015d2fe75cc80002', 0, 0, '/apps/bpm/index.html', 'webim', '1', NULL, 'left'); INSERT INTO `uk_sysdic` VALUES ('402881ef612b1f5b01612cc5a2040543', '客服设置', 'pub', 'A06', NULL, 'auth', '402888815d2fe37f015d2fe75cc80002', NULL, NULL, '', NULL, NULL, '297e8c7b455798280145579c73e501c1', '2018-01-25 18:03:25', NULL, 0, 0, '402888815d2fe37f015d2fe75cc80002', 0, 0, '/setting/agent/index.html', 'webim', '1', NULL, 'left'); -INSERT INTO `uk_sysdic` VALUES ('402881ef612b1f5b01612cc5bd810544', '快捷回复', 'pub', 'A07', NULL, 'auth', '402888815d2fe37f015d2fe75cc80002', NULL, NULL, '', NULL, NULL, '297e8c7b455798280145579c73e501c1', '2018-01-25 18:03:32', NULL, 0, 0, '402888815d2fe37f015d2fe75cc80002', 0, 0, '/setting/quickreply/index.html', 'webim', '1', NULL, 'left'); INSERT INTO `uk_sysdic` VALUES ('402881ef612b1f5b01612cc5d9710545', '会话历史', 'pub', 'A08', NULL, 'auth', '402888815d2fe37f015d2fe75cc80002', NULL, NULL, '', NULL, NULL, '297e8c7b455798280145579c73e501c1', '2018-01-25 18:03:39', NULL, 0, 0, '402888815d2fe37f015d2fe75cc80002', 0, 0, '/service/history/index.html', 'webim', '1', NULL, 'left'); -INSERT INTO `uk_sysdic` VALUES ('402881ef612b1f5b01612cc602450546', '智能机器人', 'pub', 'A09', NULL, 'auth', '402888815d2fe37f015d2fe75cc80002', NULL, NULL, '', NULL, NULL, '297e8c7b455798280145579c73e501c1', '2018-01-25 18:03:49', NULL, 0, 0, '402888815d2fe37f015d2fe75cc80002', 0, 0, '/apps/xiaoe/index.html', 'webim', '1', NULL, 'left'); INSERT INTO `uk_sysdic` VALUES ('402881ef612b1f5b01612cc626f90547', '语音渠道', 'pub', 'A10', NULL, 'auth', '402888815d2fe37f015d2fe75cc80002', NULL, NULL, '', NULL, NULL, '297e8c7b455798280145579c73e501c1', '2018-01-25 18:03:59', NULL, 0, 0, '402888815d2fe37f015d2fe75cc80002', 0, 0, '/apps/callcenter/service/index.html', 'webim', '1', NULL, 'left'); INSERT INTO `uk_sysdic` VALUES ('402881ef612b1f5b01612cc78f570548', '联系人', 'pub', 'A02_A01', NULL, 'auth', '402881ef612b1f5b01612cc4ffb1053f', NULL, NULL, '�', NULL, NULL, '297e8c7b455798280145579c73e501c1', '2018-01-25 18:05:31', NULL, 0, 0, '402888815d2fe37f015d2fe75cc80002', 0, 0, 'javascript:;', 'webim', '2', NULL, 'left'); INSERT INTO `uk_sysdic` VALUES ('402881ef612b1f5b01612cc817fb0549', '全部联系人', 'pub', 'A02_A01_A01', NULL, 'auth', '402881ef612b1f5b01612cc78f570548', NULL, NULL, '�', NULL, NULL, '297e8c7b455798280145579c73e501c1', '2018-01-25 18:06:06', NULL, 0, 0, '402888815d2fe37f015d2fe75cc80002', 0, 0, '/apps/contacts/index.html', 'webim', '3', NULL, 'left'); @@ -7223,7 +7147,6 @@ INSERT INTO `uk_sysdic` VALUES ('402881fb61e49a9a0161e4ace76a039b', '比较', 'p INSERT INTO `uk_sysdic` VALUES ('402881fb61e49a9a0161e4ace777039c', '范围', 'pub', 'range', 'cskefu', 'layui-icon', '402881fb61e49a9a0161e4a96f900394', '', NULL, '', '', NULL, '4028cac3614cd2f901614cf8be1f0324', '2018-03-02 11:06:32', '2018-03-02 11:06:32', 0, 2, '402881fb61e49a9a0161e4a96f900394', 0, 1, NULL, NULL, NULL, NULL, NULL); INSERT INTO `uk_sysdic` VALUES ('402881fb61e49a9a0161e4ad727d039d', '相等(IN)', 'pub', 'equal', 'cskefu', 'layui-icon', '402881fb61e49a9a0161e4a9b6f80395', '', NULL, '', '', NULL, '4028cac3614cd2f901614cf8be1f0324', '2018-03-02 11:07:07', '2018-03-02 11:07:07', 0, 1, '402881fb61e49a9a0161e4a9b6f80395', 0, 1, NULL, NULL, NULL, NULL, NULL); INSERT INTO `uk_sysdic` VALUES ('402881fb61e49a9a0161e4ade5d6039e', '不等(NOT IN)', 'pub', 'not', 'cskefu', 'layui-icon', '402881fb61e49a9a0161e4a9b6f80395', '', NULL, '', '', NULL, '4028cac3614cd2f901614cf8be1f0324', '2018-03-02 11:07:37', NULL, 1, 0, '402881fb61e49a9a0161e4a9b6f80395', 0, 1, NULL, NULL, NULL, NULL, NULL); -INSERT INTO `uk_sysdic` VALUES ('402881fb621cfbce01621d07bade03cd', '快捷回复分类', 'pub', 'quicktypedata', 'cskefu', 'layui-icon', '402888815e097729015e0999f26e0002', '', NULL, '', '', NULL, '4028cac3614cd2f901614cf8be1f0324', '2018-03-13 09:44:28', NULL, 1, 0, '402888815e097729015e0999f26e0002', 0, 0, NULL, NULL, NULL, NULL, NULL); INSERT INTO `uk_sysdic` VALUES ('402881fb621cfbce01621d1b9eb003cf', '单位性质', 'pub', 'com.dic.customer.etype', 'cskefu', 'data', '0', '', NULL, NULL, NULL, NULL, '4028cac3614cd2f901614cf8be1f0324', '2018-03-13 10:06:12', NULL, 1, 0, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL); INSERT INTO `uk_sysdic` VALUES ('402881fb621cfbce01621d1c25c703d0', '企业客户', 'pub', 'enterprise', 'cskefu', 'layui-icon', '402881fb621cfbce01621d1b9eb003cf', '', NULL, '', '', NULL, '4028cac3614cd2f901614cf8be1f0324', '2018-03-13 10:06:46', '2018-03-13 10:06:46', 0, 1, '402881fb621cfbce01621d1b9eb003cf', 0, 1, NULL, NULL, NULL, NULL, NULL); INSERT INTO `uk_sysdic` VALUES ('402881fb621cfbce01621d1c25d603d1', '个人客户', 'pub', 'personal', 'cskefu', 'layui-icon', '402881fb621cfbce01621d1b9eb003cf', '', NULL, '', '', NULL, '4028cac3614cd2f901614cf8be1f0324', '2018-03-13 10:06:46', '2018-03-13 10:06:46', 0, 2, '402881fb621cfbce01621d1b9eb003cf', 0, 1, NULL, NULL, NULL, NULL, NULL); @@ -7694,8 +7617,6 @@ INSERT INTO `uk_sysdic` VALUES ('4028838b5b565caf015b56689012000f', '紧急', 'p INSERT INTO `uk_sysdic` VALUES ('4028838b5b565caf015b566d11d80010', '标签类型', 'pub', 'com.dic.tag.type', NULL, 'data', '0', '', NULL, NULL, NULL, NULL, '297e8c7b455798280145579c73e501c1', '2017-04-10 13:54:00', NULL, 1, 0, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL); INSERT INTO `uk_sysdic` VALUES ('4028838b5b565caf015b566de3180011', '联系人', 'pub', 'user', 'cskefu', 'layui-icon', '4028838b5b565caf015b566d11d80010', '', NULL, '', '', NULL, '297e8c7b455798280145579c73e501c1', '2017-04-10 13:54:53', '2017-04-10 13:54:53', 0, 1, '4028838b5b565caf015b566d11d80010', 0, 0, NULL, NULL, NULL, NULL, NULL); INSERT INTO `uk_sysdic` VALUES ('4028838b5b565caf015b566de32a0012', '工单', 'pub', 'workorders', 'cskefu', 'layui-icon', '4028838b5b565caf015b566d11d80010', '', NULL, '', '', NULL, '297e8c7b455798280145579c73e501c1', '2017-04-10 13:54:53', '2017-04-10 13:54:53', 0, 2, '4028838b5b565caf015b566d11d80010', 0, 0, NULL, NULL, NULL, NULL, NULL); -INSERT INTO `uk_sysdic` VALUES ('402888815c2e2f66015c2f07827e0002', '智能机器人输入条件', 'pub', 'com.dic.xiaoe.input', NULL, 'data', '0', '', NULL, NULL, NULL, NULL, '297e8c7b455798280145579c73e501c1', '2017-05-22 15:20:40', NULL, 1, 0, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL); -INSERT INTO `uk_sysdic` VALUES ('402888815c2e2f66015c2f07c6190003', '智能机器人输出条件', 'pub', 'com.dic.xiaoe.output', NULL, 'data', '0', '', NULL, NULL, NULL, NULL, '297e8c7b455798280145579c73e501c1', '2017-05-22 15:20:57', NULL, 1, 0, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL); INSERT INTO `uk_sysdic` VALUES ('402888815c2e2f66015c2f083d010004', '姓名', 'pub', '01', 'cskefu', NULL, '402888815c2e2f66015c2f07827e0002', NULL, NULL, NULL, NULL, NULL, '297e8c7b455798280145579c73e501c1', '2017-05-22 15:21:28', '2017-05-22 15:21:28', 0, 1, '402888815c2e2f66015c2f07827e0002', 0, 0, NULL, NULL, NULL, NULL, NULL); INSERT INTO `uk_sysdic` VALUES ('402888815c2e2f66015c2f083d180005', '性别', 'pub', '02', 'cskefu', NULL, '402888815c2e2f66015c2f07827e0002', NULL, NULL, NULL, NULL, NULL, '297e8c7b455798280145579c73e501c1', '2017-05-22 15:21:28', '2017-05-22 15:21:28', 0, 2, '402888815c2e2f66015c2f07827e0002', 0, 0, NULL, NULL, NULL, NULL, NULL); INSERT INTO `uk_sysdic` VALUES ('402888815c2e2f66015c2f083d250006', '年龄', 'pub', '03', 'cskefu', NULL, '402888815c2e2f66015c2f07827e0002', NULL, NULL, NULL, NULL, NULL, '297e8c7b455798280145579c73e501c1', '2017-05-22 15:21:28', '2017-05-22 15:21:28', 0, 3, '402888815c2e2f66015c2f07827e0002', 0, 0, NULL, NULL, NULL, NULL, NULL); @@ -8085,6 +8006,7 @@ CREATE TABLE `uk_tabletask` ( PRIMARY KEY (`ID`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='元数据信息表'; + INSERT INTO `uk_tabletask` (`ID`, `NAME`, `SECURE`, `TASKSTATUS`, `TABLEDIRID`, `DBID`, `CODE`, `GROUPID`, `CREATER`, `CREATERNAME`, `TASKTYPE`, `TASKNAME`, `TASKPLAN`, `CONFIGURE`, `SECURECONF`, `USERID`, `PREVIEWTEMPLET`, `LISTBLOCKTEMPLET`, `TABLENAME`, `TABLETYPE`, `STARTINDEX`, `UPDATETIME`, `UPDATETIMENUMBER`, `DATASQL`, `DATABASETASK`, `DRIVERPLUGIN`, `ORGI`, `WORKFLOW`, `FROMDB`, `tabtype`, `pid`, `secmenuid`, `reportid`, `eventname`, `tltemplet`, `timeline`, `tbversion`, `LASTUPDATE`, `CREATETIME`) VALUES ('2c9480886e91d9e5016e91f528ab018d', 'uk_contacts', NULL, NULL, '0', NULL, NULL, NULL, '2c9480886e91d9e5016e91db8df10017', 'xianli', NULL, 'uk_contacts', NULL, NULL, NULL, NULL, NULL, NULL, 'uk_contacts', '1', 0, '2019-11-22 15:13:13', 0, NULL, NULL, NULL, 'cskefu', 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, NULL, '2019-11-22 15:13:13'), @@ -8568,10 +8490,10 @@ CREATE TABLE `uk_wxmpevent` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='微信事件记录'; -- ---------------------------- --- Table structure for uk_xiaoe_config +-- Table structure for cs_chatbot_config -- ---------------------------- -DROP TABLE IF EXISTS `uk_xiaoe_config`; -CREATE TABLE `uk_xiaoe_config` ( +DROP TABLE IF EXISTS `cs_chatbot_config`; +CREATE TABLE `cs_chatbot_config` ( `id` varchar(32) NOT NULL COMMENT '主键ID', `orgi` varchar(32) DEFAULT NULL COMMENT '租户ID', `creater` varchar(32) DEFAULT NULL COMMENT '创建人', @@ -8617,199 +8539,4 @@ CREATE TABLE `uk_xiaoe_config` ( PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='机器人配置'; --- ---------------------------- --- Table structure for uk_xiaoe_kbs_type --- ---------------------------- -DROP TABLE IF EXISTS `uk_xiaoe_kbs_type`; -CREATE TABLE `uk_xiaoe_kbs_type` ( - `ID` varchar(32) NOT NULL COMMENT '主键ID', - `NAME` varchar(50) DEFAULT NULL COMMENT '名称', - `CODE` varchar(50) DEFAULT NULL COMMENT '代码', - `CREATETIME` datetime DEFAULT NULL COMMENT '创建时间', - `CREATER` varchar(32) DEFAULT NULL COMMENT '创建人', - `UPDATETIME` datetime DEFAULT NULL COMMENT '更新时间', - `ORGI` varchar(32) DEFAULT NULL COMMENT '租户ID', - `USERNAME` varchar(50) DEFAULT NULL COMMENT '用户名', - `area` text COMMENT '区域', - `parentid` varchar(32) DEFAULT '0' COMMENT '上级ID', - `typeid` varchar(32) DEFAULT NULL COMMENT '类型ID', - PRIMARY KEY (`ID`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='知识库分类'; - --- ---------------------------- --- Table structure for uk_xiaoe_scene --- ---------------------------- -DROP TABLE IF EXISTS `uk_xiaoe_scene`; -CREATE TABLE `uk_xiaoe_scene` ( - `id` varchar(32) NOT NULL COMMENT '主键ID', - `sessionid` varchar(32) DEFAULT NULL COMMENT '会话ID', - `title` varchar(255) DEFAULT NULL COMMENT '标题', - `content` text COMMENT '内容', - `keyword` varchar(100) DEFAULT NULL COMMENT '关键词', - `summary` varchar(255) DEFAULT NULL COMMENT '摘要', - `anonymous` tinyint(4) DEFAULT NULL COMMENT '匿名访问', - `begintime` datetime DEFAULT NULL COMMENT '有效期开始时间', - `endtime` datetime DEFAULT NULL COMMENT '有效期结束时间', - `top` tinyint(4) DEFAULT NULL COMMENT '置顶', - `essence` tinyint(4) DEFAULT NULL COMMENT '启用场景', - `accept` tinyint(4) DEFAULT NULL COMMENT '启用', - `finish` tinyint(4) DEFAULT NULL COMMENT '是否结束', - `answers` int(11) DEFAULT NULL COMMENT '回答数量', - `sviews` int(11) DEFAULT NULL, - `followers` int(11) DEFAULT NULL COMMENT '关注数量', - `collections` int(11) DEFAULT NULL COMMENT '回复数量', - `comments` int(11) DEFAULT NULL COMMENT '评论数量', - `mobile` tinyint(4) DEFAULT NULL COMMENT '移动端', - `status` varchar(32) DEFAULT NULL COMMENT '状态', - `tptype` varchar(32) DEFAULT NULL COMMENT '类型', - `cate` varchar(32) DEFAULT NULL COMMENT '分类', - `username` varchar(32) DEFAULT NULL COMMENT '用户名', - `orgi` varchar(32) DEFAULT NULL COMMENT '租户ID', - `creater` varchar(32) DEFAULT NULL COMMENT '创建人', - `createtime` datetime DEFAULT NULL COMMENT '创建时间', - `updatetime` datetime DEFAULT NULL COMMENT '修改时间', - `memo` varchar(32) DEFAULT NULL COMMENT '备注', - `price` int(11) DEFAULT NULL COMMENT '价格', - `organ` varchar(32) DEFAULT NULL COMMENT '部门', - `replaytype` varchar(32) DEFAULT NULL COMMENT '回复类型', - `allowask` tinyint(4) DEFAULT NULL COMMENT '允许提问', - `inputcon` varchar(255) DEFAULT NULL COMMENT '输入条件', - `outputcon` varchar(255) DEFAULT NULL COMMENT '输出条件', - `userinput` text COMMENT '用户输入', - `aireply` text COMMENT 'AI回复内容(首条)', - `frommobile` tinyint(4) DEFAULT '0' COMMENT '移动端接入', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='机器人场景'; - --- ---------------------------- --- Table structure for uk_xiaoe_scene_type --- ---------------------------- -DROP TABLE IF EXISTS `uk_xiaoe_scene_type`; -CREATE TABLE `uk_xiaoe_scene_type` ( - `ID` varchar(32) NOT NULL COMMENT '主键ID', - `NAME` varchar(50) DEFAULT NULL COMMENT '名称', - `CODE` varchar(50) DEFAULT NULL COMMENT '代码', - `CREATETIME` datetime DEFAULT NULL COMMENT '创建时间', - `CREATER` varchar(32) DEFAULT NULL COMMENT '创建人', - `UPDATETIME` datetime DEFAULT NULL COMMENT '更新时间', - `ORGI` varchar(32) DEFAULT NULL COMMENT '租户ID', - `USERNAME` varchar(50) DEFAULT NULL COMMENT '用户名', - `area` text COMMENT '区域', - `parentid` varchar(32) DEFAULT '0' COMMENT '父级ID', - `typeid` varchar(32) DEFAULT NULL COMMENT '类型ID', - PRIMARY KEY (`ID`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='机器人场景类型'; - --- ---------------------------- --- Table structure for uk_xiaoe_sceneitem --- ---------------------------- -DROP TABLE IF EXISTS `uk_xiaoe_sceneitem`; -CREATE TABLE `uk_xiaoe_sceneitem` ( - `id` varchar(32) NOT NULL COMMENT '主键ID', - `content` varchar(255) DEFAULT NULL COMMENT '回复内容', - `orgi` varchar(32) DEFAULT NULL COMMENT '租户ID', - `creater` varchar(32) DEFAULT NULL COMMENT '创建人', - `createtime` datetime DEFAULT NULL COMMENT '创建时间', - `updatetime` datetime DEFAULT NULL COMMENT '更新时间', - `sceneid` varchar(32) DEFAULT NULL COMMENT '场景ID', - `inx` int(11) DEFAULT NULL COMMENT '序号', - `itemtype` varchar(32) DEFAULT NULL COMMENT '类型', - `replaytype` varchar(32) DEFAULT NULL COMMENT '回复类型', - `allowask` tinyint(4) DEFAULT NULL COMMENT '允许主动提问', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='机器人场景子项'; - --- ---------------------------- --- Table structure for uk_xiaoe_topic --- ---------------------------- -DROP TABLE IF EXISTS `uk_xiaoe_topic`; -CREATE TABLE `uk_xiaoe_topic` ( - `id` varchar(32) NOT NULL COMMENT '主键ID', - `sessionid` varchar(32) DEFAULT NULL COMMENT '会话ID', - `title` varchar(255) DEFAULT NULL COMMENT '主题', - `content` text COMMENT '知识库内容', - `keyword` varchar(100) DEFAULT NULL COMMENT '关键词', - `summary` varchar(255) DEFAULT NULL COMMENT '摘要', - `anonymous` tinyint(4) DEFAULT NULL COMMENT '允许匿名访问', - `begintime` datetime DEFAULT NULL COMMENT '有效期开始时间', - `endtime` datetime DEFAULT NULL COMMENT '有效期结束时间', - `top` tinyint(4) DEFAULT NULL COMMENT '是否置顶', - `essence` tinyint(4) DEFAULT NULL COMMENT '精华', - `accept` tinyint(4) DEFAULT NULL COMMENT '允许评论', - `finish` tinyint(4) DEFAULT NULL COMMENT '已结束', - `answers` int(11) DEFAULT NULL COMMENT '回答数量', - `sviews` varchar(32) DEFAULT NULL, - `followers` int(11) DEFAULT NULL COMMENT '关注人数', - `collections` int(11) DEFAULT NULL COMMENT '引用次数', - `comments` int(11) DEFAULT NULL COMMENT '回复数', - `mobile` tinyint(4) DEFAULT NULL COMMENT '移动端支持', - `status` varchar(32) DEFAULT NULL COMMENT '状态', - `tptype` varchar(32) DEFAULT NULL COMMENT '分类', - `cate` varchar(32) DEFAULT NULL COMMENT '分类ID', - `username` varchar(32) DEFAULT NULL COMMENT '用户名', - `orgi` varchar(32) DEFAULT NULL COMMENT '租户ID', - `creater` varchar(32) DEFAULT NULL COMMENT '创建人', - `createtime` datetime DEFAULT NULL COMMENT '创建时间', - `updatetime` datetime DEFAULT NULL COMMENT '修改时间', - `memo` varchar(32) DEFAULT NULL COMMENT '备注', - `price` int(11) DEFAULT NULL COMMENT '权重', - `organ` varchar(32) DEFAULT NULL COMMENT '组织机构', - `sms` varchar(255) DEFAULT NULL COMMENT '短信模板', - `tts` varchar(255) DEFAULT NULL COMMENT 'TTS模板', - `email` text COMMENT '邮件模板', - `weixin` text COMMENT '微信回复模板', - `silimar` text COMMENT '类似问题', - `aiid` varchar(32) DEFAULT NULL COMMENT '机器人ID', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='知识库'; - --- ---------------------------- --- Table structure for uk_xiaoe_topic_item --- ---------------------------- -DROP TABLE IF EXISTS `uk_xiaoe_topic_item`; -CREATE TABLE `uk_xiaoe_topic_item` ( - `id` varchar(32) NOT NULL DEFAULT '' COMMENT 'ID', - `topicid` varchar(255) DEFAULT NULL COMMENT '知识id', - `title` varchar(255) DEFAULT NULL COMMENT '问题', - `orgi` varchar(255) DEFAULT NULL COMMENT '产品id', - `creater` varchar(255) DEFAULT NULL COMMENT '创建人', - `createtime` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='知识库类似问题'; - --- ---------------------------- --- Table structure for uk_xiaoe_words --- ---------------------------- -DROP TABLE IF EXISTS `uk_xiaoe_words`; -CREATE TABLE `uk_xiaoe_words` ( - `ID` varchar(32) NOT NULL COMMENT '主键ID', - `KEYWORD` varchar(50) DEFAULT NULL COMMENT '关键词', - `CONTENT` text COMMENT '内容', - `CREATETIME` datetime DEFAULT NULL COMMENT '创建时间', - `CREATER` varchar(32) DEFAULT NULL COMMENT '创建人', - `UPDATETIME` datetime DEFAULT NULL COMMENT '更新时间', - `ORGI` varchar(32) DEFAULT NULL COMMENT '租户ID', - `USERNAME` varchar(50) DEFAULT NULL COMMENT '用户名', - `SUPERORDINATE` varchar(50) DEFAULT NULL COMMENT '上位词', - `PARTOFSPEECH` varchar(50) DEFAULT NULL COMMENT '词性', - `CATE` varchar(32) DEFAULT NULL COMMENT '分类', - PRIMARY KEY (`ID`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='关键词'; - --- ---------------------------- --- Table structure for uk_xiaoe_words_type --- ---------------------------- -DROP TABLE IF EXISTS `uk_xiaoe_words_type`; -CREATE TABLE `uk_xiaoe_words_type` ( - `ID` varchar(32) NOT NULL COMMENT '主键ID', - `NAME` varchar(50) DEFAULT NULL COMMENT '分类名称', - `CODE` varchar(50) DEFAULT NULL COMMENT '分类代码', - `CREATETIME` datetime DEFAULT NULL COMMENT '创建时间', - `CREATER` varchar(32) DEFAULT NULL COMMENT '创建人ID', - `UPDATETIME` datetime DEFAULT NULL COMMENT '更新时间', - `ORGI` varchar(32) DEFAULT NULL COMMENT '租户ID', - `USERNAME` varchar(50) DEFAULT NULL COMMENT '用户名', - PRIMARY KEY (`ID`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='词库类型'; - SET FOREIGN_KEY_CHECKS = 1; diff --git a/contact-center/config/sql/upgrade/006.rename_table_as_cs_chatbot_config.sql b/contact-center/config/sql/upgrade/006.rename_table_as_cs_chatbot_config.sql new file mode 100644 index 00000000..342530e9 --- /dev/null +++ b/contact-center/config/sql/upgrade/006.rename_table_as_cs_chatbot_config.sql @@ -0,0 +1,22 @@ +USE `cosinee`; +-- ----------------- +-- prepare variables +-- ----------------- + +SET @dbname = DATABASE ( ); +SET @tablename = "uk_xiaoe_config"; +SET @targettablename = "cs_chatbot_config"; + +SELECT Count(*) +INTO @exists +FROM information_schema.tables +WHERE table_schema = @dbname + AND table_name = @tablename; + +SET @query = If(@exists>0, + CONCAT("RENAME TABLE ", @tablename, " TO ", @targettablename), + 'SELECT \'nothing to rename\' status'); + +PREPARE stmt FROM @query; + +EXECUTE stmt; \ No newline at end of file diff --git a/contact-center/root/pom.xml b/contact-center/root/pom.xml index 1d1fb961..66ad294e 100644 --- a/contact-center/root/pom.xml +++ b/contact-center/root/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.chatopera.cc cc-root - 6.0.0-SNAPSHOT + 6.1.0-SNAPSHOT pom cc-root 春松客服:多渠道智能客服系统 @@ -53,11 +53,14 @@ spring-boot-starter-tomcat provided + + - org.freemarker - freemarker - 2.3.29 + de.neuland-bfi + spring-pug4j + 2.0.0-alpha-2 + mysql mysql-connector-java @@ -136,11 +139,14 @@ commons-codec 1.10 + + - commons-lang - commons-lang - 2.6 + org.apache.commons + commons-lang3 + 3.11 + org.springframework.boot spring-boot-starter-thymeleaf diff --git a/docker-compose.yml b/docker-compose.yml index af0aa14e..c2be1cdb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -28,7 +28,6 @@ services: - SERVER_LOG_PATH=/logs - SERVER_LOG_LEVEL=${LOG_LEVEL:-WARN} - WEB_UPLOAD_PATH=/data - - SPRING_FREEMARKER_CACHE=true - SPRING_DATA_ELASTICSEARCH_PROPERTIES_PATH_DATA=/data - UK_IM_SERVER_PORT=8036 - UK_IM_SERVER_HOST=localhost @@ -48,7 +47,6 @@ services: - CSKEFU_MODULE_CONTACTS=true - CSKEFU_MODULE_CHATBOT=true - SKYPE_CHANNEL_CRM=${SKYPE_CHANNEL_CRM:-placeholder} - - BOT_PROVIDER=${BOT_PROVIDER:-https://bot.chatopera.com} - BOT_THRESHOLD_FAQ_BEST_REPLY=${BOT_THRESHOLD_FAQ_BEST_REPLY:-0.9} - BOT_THRESHOLD_FAQ_SUGG_REPLY=${BOT_THRESHOLD_FAQ_SUGG_REPLY:-0.3} - CSKEFU_SETTINGS_WEBIM_VISITOR_SEPARATE=true diff --git a/public/plugins/chatbot/classes/ApiChatbotController.java b/public/plugins/chatbot/classes/ApiChatbotController.java index 495c0c3d..5a222e0e 100644 --- a/public/plugins/chatbot/classes/ApiChatbotController.java +++ b/public/plugins/chatbot/classes/ApiChatbotController.java @@ -21,14 +21,8 @@ import com.chatopera.cc.basic.Constants; import com.chatopera.cc.basic.MainUtils; import com.chatopera.cc.controller.Handler; import com.chatopera.cc.controller.api.request.RestUtils; -import com.chatopera.cc.model.Chatbot; -import com.chatopera.cc.model.CousultInvite; -import com.chatopera.cc.model.SNSAccount; -import com.chatopera.cc.model.User; -import com.chatopera.cc.persistence.repository.ChatbotRepository; -import com.chatopera.cc.persistence.repository.ConsultInviteRepository; -import com.chatopera.cc.persistence.repository.SNSAccountRepository; -import com.chatopera.cc.persistence.repository.UserRepository; +import com.chatopera.cc.model.*; +import com.chatopera.cc.persistence.repository.*; import com.chatopera.cc.proxy.OnlineUserProxy; import com.chatopera.cc.util.Menu; import com.chatopera.cc.util.SystemEnvHelper; @@ -76,10 +70,13 @@ public class ApiChatbotController extends Handler { @Autowired private UserRepository userRes; + @Autowired + private FbMessengerRepository fbMessengerRepository; + @Autowired private ConsultInviteRepository consultInviteRes; - private final static String botServiecProvider = SystemEnvHelper.getenv( + private final static String botServiceProvider = SystemEnvHelper.getenv( ChatbotConstants.BOT_PROVIDER, ChatbotConstants.DEFAULT_BOT_PROVIDER); /** @@ -161,7 +158,7 @@ public class ApiChatbotController extends Handler { return resp; } - List records = snsAccountRes.findBySnstypeAndOrgi(Constants.CHANNEL_TYPE_WEBIM, orgi); + List records = snsAccountRes.findBySnstypeAndOrgi(j.get("snstype").getAsString(), orgi); JsonArray ja = new JsonArray(); for (SNSAccount r : records) { @@ -170,7 +167,7 @@ public class ApiChatbotController extends Handler { o.addProperty("id", r.getId()); o.addProperty("snsid", r.getSnsid()); o.addProperty("snsType", r.getSnstype()); - o.addProperty("snsurl", r.getBaseURL()); + o.addProperty("snsurl", isWebIMChannelBySnsType(j) ? r.getBaseURL() : r.getName()); ja.add(o); } } @@ -205,18 +202,23 @@ public class ApiChatbotController extends Handler { try { com.chatopera.bot.sdk.Chatbot bot = new com.chatopera.bot.sdk.Chatbot( - c.getClientId(), c.getSecret(), botServiecProvider); - Response result = bot.command("GET", "/"); - - if (result.getRc() == 0) { + c.getClientId(), c.getSecret(), botServiceProvider); + if (bot.exists()) { c.setEnabled(isEnabled); chatbotRes.save(c); - // 更新访客网站配置 - CousultInvite invite = OnlineUserProxy.consult(c.getSnsAccountIdentifier(), c.getOrgi()); - invite.setAi(isEnabled); - consultInviteRes.save(invite); - OnlineUserProxy.cacheConsult(invite); + if (c.getChannel().equals(Constants.CHANNEL_TYPE_WEBIM)) { + // 更新访客网站配置 + CousultInvite invite = OnlineUserProxy.consult(c.getSnsAccountIdentifier(), c.getOrgi()); + invite.setAi(isEnabled); + consultInviteRes.save(invite); + OnlineUserProxy.cacheConsult(invite); + } else if (c.getChannel().equals(Constants.CHANNEL_TYPE_MESSENGER)) { + FbMessenger fbMessenger = fbMessengerRepository.findOneByPageId(c.getSnsAccountIdentifier()); + fbMessenger.setAi(isEnabled); + fbMessengerRepository.save(fbMessenger); + } + resp.addProperty(RestUtils.RESP_KEY_RC, RestUtils.RESP_RC_SUCC); resp.addProperty(RestUtils.RESP_KEY_DATA, "完成。"); @@ -261,11 +263,17 @@ public class ApiChatbotController extends Handler { c.setAisuggest(isEnabled); chatbotRes.save(c); - // 更新访客网站配置 - CousultInvite invite = OnlineUserProxy.consult(c.getSnsAccountIdentifier(), c.getOrgi()); - invite.setAisuggest(isEnabled); - consultInviteRes.save(invite); - OnlineUserProxy.cacheConsult(invite); + if (c.getChannel().equals(Constants.CHANNEL_TYPE_WEBIM)) { + // 更新访客网站配置 + CousultInvite invite = OnlineUserProxy.consult(c.getSnsAccountIdentifier(), c.getOrgi()); + invite.setAisuggest(isEnabled); + consultInviteRes.save(invite); + OnlineUserProxy.cacheConsult(invite); + } else if (c.getChannel().equals(Constants.CHANNEL_TYPE_MESSENGER)) { + FbMessenger fbMessenger = fbMessengerRepository.findOneByPageId(c.getSnsAccountIdentifier()); + fbMessenger.setAisuggest(isEnabled); + fbMessengerRepository.save(fbMessenger); + } resp.addProperty(RestUtils.RESP_KEY_RC, RestUtils.RESP_RC_SUCC); resp.addProperty(RestUtils.RESP_KEY_DATA, "完成。"); @@ -318,21 +326,26 @@ public class ApiChatbotController extends Handler { if (j.has("workmode") && Constants.CHATBOT_VALID_WORKMODELS.contains(j.get("workmode").getAsString())) { c.setWorkmode(j.get("workmode").getAsString()); - invite.setAifirst(!StringUtils.equals(Constants.CHATBOT_HUMAN_FIRST, c.getWorkmode())); + if (isWebIMChannelBySnsType(j)) { + invite.setAifirst(!StringUtils.equals(Constants.CHATBOT_HUMAN_FIRST, c.getWorkmode())); + } } if (j.has("enabled")) { boolean enabled = j.get("enabled").getAsBoolean(); c.setEnabled(enabled); - invite.setAi(enabled); + if (isWebIMChannelBySnsType(j)) { + invite.setAi(enabled); + } } try { + logger.info("[update] BOT_PROVIDER {}", botServiceProvider); com.chatopera.bot.sdk.Chatbot bot = new com.chatopera.bot.sdk.Chatbot( - c.getClientId(), c.getSecret(), botServiecProvider); + c.getClientId(), c.getSecret(), botServiceProvider); Response result = bot.command("GET", "/"); - logger.info("[update] bot details response {}", result.toJSON().toString()); + logger.info("[update] bot details response", result.toJSON().toString()); if (result.getRc() == 0) { resp.addProperty(RestUtils.RESP_KEY_RC, RestUtils.RESP_RC_SUCC); @@ -344,9 +357,12 @@ public class ApiChatbotController extends Handler { c.setDescription(botDetails.getString("description")); c.setFallback(botDetails.getString("fallback")); c.setWelcome(botDetails.getString("welcome")); - invite.setAisuccesstip(botDetails.getString("welcome")); + if (isWebIMChannelBySnsType(j)) { + invite.setAisuccesstip(botDetails.getString("welcome")); + invite.setAiname(c.getName()); + } c.setName(botDetails.getString("name")); - invite.setAiname(c.getName()); + } else { resp.addProperty(RestUtils.RESP_KEY_RC, RestUtils.RESP_RC_FAIL_6); resp.addProperty( @@ -370,9 +386,10 @@ public class ApiChatbotController extends Handler { c.setUpdatetime(new Date()); chatbotRes.save(c); - consultInviteRes.save(invite); - OnlineUserProxy.cacheConsult(invite); - + if (isWebIMChannelBySnsType(j)) { + consultInviteRes.save(invite); + OnlineUserProxy.cacheConsult(invite); + } return resp; } @@ -464,18 +481,25 @@ public class ApiChatbotController extends Handler { return resp; } - // 更新访客网站配置 - CousultInvite invite = OnlineUserProxy.consult(c.getSnsAccountIdentifier(), c.getOrgi()); - if (invite != null) { - invite.setAi(false); - invite.setAiname(null); - invite.setAisuccesstip(null); - invite.setAifirst(false); - invite.setAiid(null); - invite.setAisuggest(false); - consultInviteRes.save(invite); - OnlineUserProxy.cacheConsult(invite); + if (c.getChannel().equals(Constants.CHANNEL_TYPE_WEBIM)) { + // 更新访客网站配置 + CousultInvite invite = OnlineUserProxy.consult(c.getSnsAccountIdentifier(), c.getOrgi()); + if (invite != null) { + invite.setAi(false); + invite.setAiname(null); + invite.setAisuccesstip(null); + invite.setAifirst(false); + invite.setAiid(null); + invite.setAisuggest(false); + consultInviteRes.save(invite); + OnlineUserProxy.cacheConsult(invite); + } + } else if (c.getChannel().equals(Constants.CHANNEL_TYPE_MESSENGER)) { + FbMessenger fbMessenger = fbMessengerRepository.findOneByPageId(c.getSnsAccountIdentifier()); + fbMessenger.setAiid(null); + fbMessengerRepository.save(fbMessenger); } + chatbotRes.delete(c); resp.addProperty(RestUtils.RESP_KEY_RC, RestUtils.RESP_RC_SUCC); resp.addProperty(RestUtils.RESP_KEY_DATA, "删除成功。"); @@ -528,7 +552,7 @@ public class ApiChatbotController extends Handler { } else { snsid = j.get("snsid").getAsString(); // #TODO 仅支持webim - if (!snsAccountRes.existsBySnsidAndSnstypeAndOrgi(snsid, Constants.CHANNEL_TYPE_WEBIM, orgi)) { + if (!snsAccountRes.existsBySnsidAndSnstypeAndOrgi(snsid, j.get("snstype").getAsString(), orgi)) { resp.addProperty(RestUtils.RESP_KEY_RC, RestUtils.RESP_RC_FAIL_3); resp.addProperty(RestUtils.RESP_KEY_ERROR, "不合法的参数,不存在【snsid】对应的网站渠道。"); return resp; @@ -548,9 +572,8 @@ public class ApiChatbotController extends Handler { } try { - logger.info("[create] bot with url {}", botServiecProvider); - com.chatopera.bot.sdk.Chatbot bot = new com.chatopera.bot.sdk.Chatbot(clientId, secret, botServiecProvider); - + logger.info("[create] bot with url {}", botServiceProvider); + com.chatopera.bot.sdk.Chatbot bot = new com.chatopera.bot.sdk.Chatbot(clientId, secret, botServiceProvider); Response result = bot.command("GET", "/"); logger.info("[create] bot details response {}", result.toJSON().toString()); @@ -561,7 +584,7 @@ public class ApiChatbotController extends Handler { c.setId(MainUtils.getUUID()); c.setClientId(clientId); c.setSecret(secret); - c.setBaseUrl(botServiecProvider); + c.setBaseUrl(botServiceProvider); c.setDescription(botDetails.getString("description")); c.setFallback(botDetails.getString("fallback")); c.setPrimaryLanguage(botDetails.getString("primaryLanguage")); @@ -569,7 +592,7 @@ public class ApiChatbotController extends Handler { c.setWelcome(botDetails.getString("welcome")); c.setCreater(creater); c.setOrgi(orgi); - c.setChannel(Constants.CHANNEL_TYPE_WEBIM); + c.setChannel(j.get("snstype").getAsString()); c.setSnsAccountIdentifier(snsid); Date dt = new Date(); c.setCreatetime(dt); @@ -581,14 +604,22 @@ public class ApiChatbotController extends Handler { c.setEnabled(enabled); // 更新访客网站配置 - CousultInvite invite = OnlineUserProxy.consult(c.getSnsAccountIdentifier(), c.getOrgi()); - invite.setAi(enabled); - invite.setAifirst(StringUtils.equals(Constants.CHATBOT_CHATBOT_FIRST, workmode)); - invite.setAiid(c.getId()); - invite.setAiname(c.getName()); - invite.setAisuccesstip(c.getWelcome()); - consultInviteRes.save(invite); - OnlineUserProxy.cacheConsult(invite); + if (isWebIMChannelBySnsType(j)) { + CousultInvite invite = OnlineUserProxy.consult(c.getSnsAccountIdentifier(), c.getOrgi()); + invite.setAi(enabled); + invite.setAifirst(StringUtils.equals(Constants.CHATBOT_CHATBOT_FIRST, workmode)); + invite.setAiid(c.getId()); + invite.setAiname(c.getName()); + invite.setAisuccesstip(c.getWelcome()); + consultInviteRes.save(invite); + OnlineUserProxy.cacheConsult(invite); + } else if (j.get("snstype").getAsString().equals(Constants.CHANNEL_TYPE_MESSENGER)) { + FbMessenger fbMessenger = fbMessengerRepository.findOneByPageId(c.getSnsAccountIdentifier()); + fbMessenger.setAi(enabled); + fbMessenger.setAiid(c.getId()); + fbMessengerRepository.save(fbMessenger); + } + chatbotRes.save(c); JsonObject data = new JsonObject(); @@ -640,7 +671,7 @@ public class ApiChatbotController extends Handler { try { com.chatopera.bot.sdk.Chatbot bot = new com.chatopera.bot.sdk.Chatbot( - c.getClientId(), c.getSecret(), botServiecProvider); + c.getClientId(), c.getSecret(), botServiceProvider); JSONObject result = bot.faq( userId, @@ -670,4 +701,14 @@ public class ApiChatbotController extends Handler { } return resp; } + + /** + * 判断一个渠道是不是网页聊天 + * + * @param p + * @return + */ + private boolean isWebIMChannelBySnsType(final JsonObject p) { + return StringUtils.equals(p.get("snstype").getAsString(), Constants.CHANNEL_TYPE_WEBIM); + } } diff --git a/public/plugins/chatbot/classes/ChatbotComposer.java b/public/plugins/chatbot/classes/ChatbotComposer.java new file mode 100644 index 00000000..1be59dcc --- /dev/null +++ b/public/plugins/chatbot/classes/ChatbotComposer.java @@ -0,0 +1,59 @@ +package com.chatopera.cc.plugins.chatbot; + +import com.chatopera.cc.basic.Constants; +import com.chatopera.cc.basic.plugins.PluginRegistry; +import com.chatopera.cc.socketio.message.ChatMessage; +import com.chatopera.compose4j.Composer; +import com.chatopera.compose4j.Middleware; +import com.chatopera.compose4j.exception.Compose4jRuntimeException; +import org.springframework.beans.BeansException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; +import org.springframework.context.annotation.Configuration; +import org.springframework.stereotype.Component; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.annotation.PostConstruct; + +@Component +public class ChatbotComposer implements ApplicationContextAware { + private final static Logger logger = LoggerFactory.getLogger( + ChatbotComposer.class); + + private static ApplicationContext applicationContext; + + private Composer composer; + + @Autowired + private PluginRegistry pluginRegistry; + + @Override + public void setApplicationContext(ApplicationContext ac) throws BeansException { + applicationContext = ac; + } + + @PostConstruct + public void postConstruct() { + applicationContext.getBeansWithAnnotation(Configuration.class); + composer = new Composer<>(); + + pluginRegistry.getPlugin(Constants.CSKEFU_MODULE_MESSENGER).ifPresent(p -> { + composer.use((Middleware) applicationContext.getBean( + p.getPluginId() + PluginRegistry.PLUGIN_CHATBOT_MESSAGER_SUFFIX)); + }); + + } + + public void handle(ChatMessage resp) { + ChatbotContext ctx = new ChatbotContext(); + ctx.setResp(resp); + + try { + composer.handle(ctx); + } catch (Compose4jRuntimeException e) { + logger.info("[chatbot send] error", e); + } + } +} diff --git a/public/plugins/chatbot/classes/ChatbotContext.java b/public/plugins/chatbot/classes/ChatbotContext.java new file mode 100644 index 00000000..d916622c --- /dev/null +++ b/public/plugins/chatbot/classes/ChatbotContext.java @@ -0,0 +1,16 @@ +package com.chatopera.cc.plugins.chatbot; + +import com.chatopera.cc.socketio.message.ChatMessage; +import com.chatopera.compose4j.AbstractContext; + +public class ChatbotContext extends AbstractContext { + private ChatMessage resp; + + public ChatMessage getResp() { + return resp; + } + + public void setResp(ChatMessage resp) { + this.resp = resp; + } +} diff --git a/public/plugins/chatbot/classes/ChatbotController.java b/public/plugins/chatbot/classes/ChatbotController.java index 73583acf..d06991a4 100644 --- a/public/plugins/chatbot/classes/ChatbotController.java +++ b/public/plugins/chatbot/classes/ChatbotController.java @@ -40,7 +40,7 @@ import javax.validation.Valid; import java.util.List; @Controller -@RequestMapping(value = "/apps/chatbot") +@RequestMapping(value = "/admin/system/chatbot") public class ChatbotController extends Handler { private final static Logger logger = LoggerFactory.getLogger(ChatbotController.class); @@ -57,7 +57,7 @@ public class ChatbotController extends Handler { @Autowired private SNSAccountRepository snsAccountRepository; - private final static String botServiecProvider = SystemEnvHelper.getenv( + private final static String botServiceProvider = SystemEnvHelper.getenv( ChatbotConstants.BOT_PROVIDER, ChatbotConstants.DEFAULT_BOT_PROVIDER); @@ -66,7 +66,7 @@ public class ChatbotController extends Handler { public ModelAndView index(ModelMap map, HttpServletRequest request, @Valid final String chatbotid) throws CSKefuException { logger.info("[index] chatbot id {}", chatbotid); - ModelAndView view = request(super.createAppsTempletResponse("/apps/chatbot/index")); + ModelAndView view = request(super.createView("/admin/system/chatbot/index")); List chatbots = chatbotRes.findByOrgi(super.getOrgi(request)); Chatbot currentbot = null; @@ -98,7 +98,7 @@ public class ChatbotController extends Handler { } } - view.addObject("botServiecProvider", botServiecProvider); + view.addObject("botServiceProvider", botServiceProvider); // 增加当前bot的更多信息 if (currentbot != null) { @@ -129,17 +129,18 @@ public class ChatbotController extends Handler { public ModelAndView eidt(ModelMap map, HttpServletRequest request, @Valid String id) { User curruser = super.getUser(request); - ModelAndView view = request(super.createAppsTempletResponse("/apps/chatbot/edit")); + ModelAndView view = request(super.createView("/admin/system/chatbot/edit")); if (id != null) { Chatbot c = chatbotRes.findOne(id); SNSAccount snsAccount = snsAccountRes.findBySnsidAndOrgi(c.getSnsAccountIdentifier(), curruser.getOrgi()); - view.addObject("snsurl", snsAccount.getBaseURL()); + view.addObject("snsurl", snsAccount.getSnstype() == "webim" ? snsAccount.getBaseURL() : snsAccount.getName()); view.addObject("bot", c); + view.addObject("snstype", snsAccount.getSnstype()); } view.addObject("id", id); - view.addObject("botServiecProvider", botServiecProvider); + view.addObject("botServiceProvider", botServiceProvider); return view; } diff --git a/public/plugins/chatbot/classes/ChatbotEventHandler.java b/public/plugins/chatbot/classes/ChatbotEventHandler.java index e174f56d..cdc6490c 100644 --- a/public/plugins/chatbot/classes/ChatbotEventHandler.java +++ b/public/plugins/chatbot/classes/ChatbotEventHandler.java @@ -32,7 +32,6 @@ import com.chatopera.cc.socketio.message.Message; import com.chatopera.cc.socketio.util.IMServiceUtils; import com.chatopera.cc.util.IP; import com.chatopera.cc.util.IPTools; -import com.chatopera.cc.util.SystemEnvHelper; import com.corundumstudio.socketio.AckRequest; import com.corundumstudio.socketio.SocketIOClient; import com.corundumstudio.socketio.SocketIOServer; @@ -58,9 +57,6 @@ public class ChatbotEventHandler { private static ChatbotRepository chatbotRes; private static ChatbotProxy chatbotProxy; - private final static String botServiecProvider = SystemEnvHelper.getenv( - ChatbotConstants.BOT_PROVIDER, ChatbotConstants.DEFAULT_BOT_PROVIDER); - @Autowired public ChatbotEventHandler(SocketIOServer server) { this.server = server; @@ -112,14 +108,13 @@ public class ChatbotEventHandler { if (invite != null) { Chatbot chatbot = getChatbotRes().findOne(invite.getAiid()); com.chatopera.bot.sdk.Chatbot bot = new com.chatopera.bot.sdk.Chatbot( - chatbot.getClientId(), chatbot.getSecret(), botServiecProvider); - + chatbot.getClientId(), chatbot.getSecret(), chatbot.getBaseUrl()); Response result = bot.command("GET", "/"); // 发送欢迎语 if (result.getRc() == 0) { - ChatMessage welcome = new ChatMessage(); JSONObject details = (JSONObject) result.getData(); + ChatMessage welcome = new ChatMessage(); String welcomeTextMessage = details.getString("welcome"); if (StringUtils.isNotBlank(welcomeTextMessage)) { welcome.setCalltype(MainContext.CallType.OUT.toString()); @@ -379,5 +374,4 @@ public class ChatbotEventHandler { return chatbotRes; } - } diff --git a/public/plugins/chatbot/classes/ChatbotEventSubscription.java b/public/plugins/chatbot/classes/ChatbotEventSubscription.java index d82f07eb..1952c297 100644 --- a/public/plugins/chatbot/classes/ChatbotEventSubscription.java +++ b/public/plugins/chatbot/classes/ChatbotEventSubscription.java @@ -23,10 +23,12 @@ import com.chatopera.cc.cache.Cache; import com.chatopera.cc.controller.api.request.RestUtils; import com.chatopera.cc.model.Chatbot; import com.chatopera.cc.persistence.repository.AgentUserRepository; +import com.chatopera.cc.persistence.repository.ChatMessageRepository; import com.chatopera.cc.persistence.repository.ChatbotRepository; import com.chatopera.cc.socketio.message.ChatMessage; import com.chatopera.cc.util.SerializeUtil; import com.chatopera.cc.util.SystemEnvHelper; +import org.apache.commons.lang.StringUtils; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; @@ -54,8 +56,11 @@ public class ChatbotEventSubscription { @Autowired private ChatbotRepository chatbotRes; + @Autowired + private ChatMessageRepository chatMessageRes; + // 机器人服务提供地址 - private final static String botServiecProvider = SystemEnvHelper.getenv( + private final static String botServiceProvider = SystemEnvHelper.getenv( ChatbotConstants.BOT_PROVIDER, ChatbotConstants.DEFAULT_BOT_PROVIDER); // FAQ最佳回复阀值 @@ -68,6 +73,9 @@ public class ChatbotEventSubscription { @Autowired private ChatbotProxy chatbotProxy; + @Autowired + private ChatbotComposer chatbotComposer; + /** * 接收发送消息给聊天机器人的请求 * @@ -91,12 +99,12 @@ public class ChatbotEventSubscription { .findOne(request.getAiid()); logger.info( - "[chat] chat request baseUrl {}, chatbot {}, fromUserId {}, textMessage {}", botServiecProvider, + "[chat] chat request baseUrl {}, chatbot {}, fromUserId {}, textMessage {}", botServiceProvider, c.getName(), request.getUserid(), request.getMessage()); // Get response from Conversational Engine. com.chatopera.bot.sdk.Chatbot bot = new com.chatopera.bot.sdk.Chatbot( - c.getClientId(), c.getSecret(), botServiecProvider); + c.getClientId(), c.getSecret(), botServiceProvider); JSONObject result = bot.conversation( request.getUserid(), request.getMessage(), faqBestReplyThreshold, faqSuggReplyThreshold); @@ -107,58 +115,160 @@ public class ChatbotEventSubscription { // reply JSONObject data = result.getJSONObject("data"); if (data.has("logic_is_fallback")) { - ChatMessage resp = new ChatMessage(); - resp.setCalltype(MainContext.CallType.OUT.toString()); - resp.setAppid(resp.getAppid()); - resp.setOrgi(request.getOrgi()); - resp.setAiid(request.getAiid()); + ChatMessage resp = creatChatMessage(request, c); resp.setMessage(data.getString("string")); - - if (data.getBoolean("logic_is_fallback")) { - // 兜底回复,检查FAQ - JSONArray faqReplies = data.getJSONArray("faq"); - JSONArray suggs = new JSONArray(); - for (int i = 0; i < faqReplies.length(); i++) { - JSONObject sugg = new JSONObject(); - JSONObject faqReply = faqReplies.getJSONObject(i); - sugg.put("label", Integer.toString(i + 1) + ". " + faqReply.getString("post")); - sugg.put("text", faqReply.getString("post")); - sugg.put("type", "qlist"); - suggs.put(sugg); + ChatMessage respHelp = new ChatMessage(); + JSONArray respParams = new JSONArray(); + if (!StringUtils.equals(MainContext.ChannelType.WEBIM.toString(), c.getChannel())) { + if (data.getBoolean("logic_is_fallback")) { + if (StringUtils.equals(Constants.CHATBOT_CHATBOT_FIRST, c.getWorkmode())) { + JSONArray faqReplies = data.getJSONArray("faq"); + JSONObject message = new JSONObject(); + JSONObject attachment = new JSONObject(); + attachment.put("type", "template"); + JSONObject payload = new JSONObject(); + payload.put("template_type", "button"); + JSONArray buttons = new JSONArray(); + if (faqReplies.length() > 0) { + int cycles = faqReplies.length() > 3 ? 3 : faqReplies.length(); + payload.put("text", "${suggestQuestion}"); + for (int i = 0; i < cycles; i++) { + JSONObject button = new JSONObject(); + JSONObject faqReply = faqReplies.getJSONObject(i); + button.put("type", "postback"); + button.put("title", faqReply.getString("post")); + button.put("payload", "FAQ_LIST"); + buttons.put(button); + } + } else { + payload.put("text", data.getString("string")); + JSONObject button = new JSONObject(); + button.put("type", "postback"); + button.put("title", "${transferManualService}"); + button.put("payload", "TRANSFER_LABOR"); + buttons.put(button); + } + payload.put("buttons", buttons); + attachment.put("payload", payload); + message.put("attachment", attachment); + resp.setExpmsg(message.toString()); + } + } else if (StringUtils.equals(Constants.PROVIDER_FAQ, data.getJSONObject("service").get("provider").toString())) { + respHelp = creatChatMessage(request, c); + JSONObject message = new JSONObject(); + JSONObject attachment = new JSONObject(); + attachment.put("type", "template"); + JSONObject payload = new JSONObject(); + payload.put("template_type", "button"); + payload.put("text", "${evaluationAsk}"); + JSONArray buttons = new JSONArray(); + JSONObject buttonYes = new JSONObject(); + buttonYes.put("type", "postback"); + buttonYes.put("title", "${evaluationYes}"); + buttonYes.put("payload", "__chatbot_help_positive"); + buttons.put(buttonYes); + JSONObject buttonNo = new JSONObject(); + buttonNo.put("type", "postback"); + buttonNo.put("title", "${evaluationNo}"); + buttonNo.put("payload", "__chatbot_help_negative"); + buttons.put(buttonNo); + payload.put("buttons", buttons); + attachment.put("payload", payload); + message.put("attachment", attachment); + respHelp.setExpmsg(message.toString()); + } else if (data.has("params")) { + Object obj = data.get("params"); + if (obj instanceof JSONObject) { + resp.setExpmsg(obj.toString()); + } else { + JSONArray params = data.getJSONArray("params"); + for (int i = 0; i < params.length(); i++) { + respParams.put(params.get(i)); + } + } } - if (suggs.length() > 0) { - // TODO set help message on View Page - resp.setMessage("为您找到如下信息:"); - resp.setExpmsg(suggs.toString()); + } else { + if (data.getBoolean("logic_is_fallback")) { + // 兜底回复,检查FAQ + JSONArray faqReplies = data.getJSONArray("faq"); + JSONArray suggs = new JSONArray(); + for (int i = 0; i < faqReplies.length(); i++) { + JSONObject sugg = new JSONObject(); + JSONObject faqReply = faqReplies.getJSONObject(i); + sugg.put("label", Integer.toString(i + 1) + ". " + faqReply.getString("post")); + sugg.put("text", faqReply.getString("post")); + sugg.put("type", "qlist"); + suggs.put(sugg); + } + if (suggs.length() > 0) { + // TODO set help message on View Page + resp.setMessage("为您找到如下信息:"); + resp.setExpmsg(suggs.toString()); + } + } else if (data.has("params")) { + resp.setExpmsg(data.get("params").toString()); } - } else if (data.has("params")) { - resp.setExpmsg(data.get("params").toString()); } - resp.setTouser(request.getUserid()); - resp.setAgentserviceid(request.getAgentserviceid()); - resp.setMsgtype(request.getMsgtype()); - resp.setUserid(request.getUserid()); - resp.setType(request.getType()); - resp.setChannel(request.getChannel()); - - resp.setContextid(request.getContextid()); - resp.setSessionid(request.getSessionid()); - resp.setUsession(request.getUsession()); - resp.setUsername(c.getName()); - resp.setUpdatetime(System.currentTimeMillis()); - // 更新聊天机器人累计值 updateAgentUserWithRespData(request.getUserid(), request.getOrgi(), data); // 保存并发送 - chatbotProxy.saveAndPublish(resp); + + if (MainContext.ChannelType.WEBIM.toString().equals(resp.getChannel())) { + chatbotProxy.saveAndPublish(resp); + } else { + chatMessageRes.save(resp); + if (respParams.length() > 0) { + for (int i = 0; i < respParams.length(); i++) { + ChatMessage respParam = creatChatMessage(request, c); + respParam.setExpmsg(respParams.get(i).toString()); + chatMessageRes.save(respParam); + chatbotComposer.handle(respParam); + } + } else { + chatbotComposer.handle(resp); + } + if (respHelp != null) { + chatbotComposer.handle(respHelp); + } + } } - } else { - logger.warn("[chat] can not get expected response {}", result.toString()); } + } else { + logger.warn("[chat] can not get expected response {}", result.toString()); } } + + /** + * 创建chatMessage并设置固定值 + * + * @param request + * @param c + * @return + */ + private ChatMessage creatChatMessage(ChatMessage request, Chatbot c) { + ChatMessage resp = new ChatMessage(); + resp.setCalltype(MainContext.CallType.OUT.toString()); + resp.setAppid(request.getAppid()); + resp.setOrgi(request.getOrgi()); + resp.setAiid(request.getAiid()); + resp.setTouser(request.getUserid()); + resp.setAgentserviceid(request.getAgentserviceid()); + resp.setMsgtype(request.getMsgtype()); + resp.setUserid(request.getUserid()); + resp.setType(request.getType()); + resp.setChannel(request.getChannel()); + resp.setContextid(request.getContextid()); + resp.setSessionid(request.getSessionid()); + resp.setUsession(request.getUsession()); + resp.setUsername(c.getName()); + resp.setUpdatetime(System.currentTimeMillis()); + + return resp; + + } + /** * 根据聊天机器人返回数据更新agentUser * diff --git a/public/plugins/chatbot/classes/ChatbotProxy.java b/public/plugins/chatbot/classes/ChatbotProxy.java index 4b6df4fc..8cc41661 100644 --- a/public/plugins/chatbot/classes/ChatbotProxy.java +++ b/public/plugins/chatbot/classes/ChatbotProxy.java @@ -37,7 +37,7 @@ import org.springframework.stereotype.Component; public class ChatbotProxy { private final static Logger logger = LoggerFactory.getLogger(ChatbotProxy.class); - private final static String botServiecProvider = SystemEnvHelper.getenv( + private final static String botServiceProvider = SystemEnvHelper.getenv( ChatbotConstants.BOT_PROVIDER, ChatbotConstants.DEFAULT_BOT_PROVIDER); @Autowired diff --git a/public/plugins/chatbot/scripts/install.sh b/public/plugins/chatbot/scripts/install.sh index 0de18ff1..a68728b4 100755 --- a/public/plugins/chatbot/scripts/install.sh +++ b/public/plugins/chatbot/scripts/install.sh @@ -1,7 +1,7 @@ #! /bin/bash ########################################### # Install Plugin -# Copyright (2019) 北京华夏春松科技有限公司 +# Copyright (2019-2020) 北京华夏春松科技有限公司 ########################################### # constants @@ -11,7 +11,7 @@ export MSYS=winsymlinks:nativestrict baseDir=$(cd `dirname "$0"`;pwd) rootDir=$(cd -P $baseDir/..;pwd) upperDir=$(cd -P $rootDir/..;pwd) -COSINEE_BASEDIR=$(cd -P $upperDir/../..;pwd) +CSKEFU_ROOT=$(cd -P $upperDir/../..;pwd) pluginName=$(basename $rootDir) # functions @@ -21,8 +21,8 @@ pluginName=$(basename $rootDir) cd $rootDir/.. echo "[plugins] path" `pwd` -if [ -d $COSINEE_BASEDIR ]; then - PLUGINS_DIR=$COSINEE_BASEDIR/contact-center/app/src/main/java/com/chatopera/cc/plugins +if [ -d $CSKEFU_ROOT ]; then + PLUGINS_DIR=$CSKEFU_ROOT/contact-center/app/src/main/java/com/chatopera/cc/plugins echo "[plugin] link" $rootDir "as" $pluginName "..." if [ ! -d $PLUGINS_DIR ]; then mkdir -p $PLUGINS_DIR @@ -40,7 +40,7 @@ if [ -d $COSINEE_BASEDIR ]; then # Install channel views if [ -d $rootDir/views/channel/$pluginName ]; then echo "[plugin] unlink views for channel" - VIEW_ADMIN_CHANNEL=$COSINEE_BASEDIR/contact-center/app/src/main/resources/templates/admin/channel + VIEW_ADMIN_CHANNEL=$CSKEFU_ROOT/contact-center/app/src/main/resources/templates/admin/channel if [ -d $VIEW_ADMIN_CHANNEL/$pluginName ]; then rm -rf $VIEW_ADMIN_CHANNEL/$pluginName @@ -48,12 +48,14 @@ if [ -d $COSINEE_BASEDIR ]; then cd $VIEW_ADMIN_CHANNEL ln -s $rootDir/views/channel/$pluginName . + else + echo "[plugin] channel views not present" fi # Install apps view if [ -d $rootDir/views/apps/$pluginName ]; then echo "[plugin] unlink views for apps" - VIEW_ADMIN_APPS=$COSINEE_BASEDIR/contact-center/app/src/main/resources/templates/apps + VIEW_ADMIN_APPS=$CSKEFU_ROOT/contact-center/app/src/main/resources/templates/apps if [ -d $VIEW_ADMIN_APPS/$pluginName ]; then rm -rf $VIEW_ADMIN_APPS/$pluginName @@ -61,8 +63,27 @@ if [ -d $COSINEE_BASEDIR ]; then cd $VIEW_ADMIN_APPS ln -s $rootDir/views/apps/$pluginName . + else + echo "[plugin] apps views not present" fi + # Install admin/system view + if [ -d $rootDir/views/system/$pluginName ]; then + echo "[plugin] unlink views for system" + VIEW_ADMIN_SYSTEM=$CSKEFU_ROOT/contact-center/app/src/main/resources/templates/admin/system + + if [ -d $VIEW_ADMIN_SYSTEM/$pluginName ]; then + rm -rf $VIEW_ADMIN_SYSTEM/$pluginName + fi + + cd $VIEW_ADMIN_SYSTEM + ln -s $rootDir/views/system/$pluginName . + echo "[note] remember to ignore src/main/resources/templates/admin/system/chatbot in contact-center/app/.gitignore" + else + echo "[plugin] system views not present" + fi + + echo "[plugin] install done." else echo "[error] not found cosinee dir." diff --git a/public/plugins/chatbot/views/apps/chatbot/edit.html b/public/plugins/chatbot/views/apps/chatbot/edit.html deleted file mode 100644 index f769216c..00000000 --- a/public/plugins/chatbot/views/apps/chatbot/edit.html +++ /dev/null @@ -1,134 +0,0 @@ - - - -
                                      -
                                      -
                                      -
                                      - -
                                      - -
                                      - <#if id!=null> - - <#else> - - -
                                      -
                                      智能机器人服务的渠道标识
                                      -
                                      -
                                      - -
                                      - -
                                      -
                                      智能机器人ClientId,还没有?现在去创建!
                                      -
                                      -
                                      - -
                                      - -
                                      -
                                      智能机器人Secret
                                      -
                                      -
                                      - -
                                      - -
                                      -
                                      来自访客的会话默认以什么方式接待
                                      -
                                      -
                                      -
                                      - -
                                      -
                                      -
                                      -
                                      -
                                      -
                                      - \ No newline at end of file diff --git a/public/plugins/chatbot/views/apps/chatbot/include/left.html b/public/plugins/chatbot/views/apps/chatbot/include/left.html deleted file mode 100644 index a136e65b..00000000 --- a/public/plugins/chatbot/views/apps/chatbot/include/left.html +++ /dev/null @@ -1,25 +0,0 @@ - - -

                                      - 列表 -

                                      - -<#if chatbots??> -
                                        -
                                      • -
                                        - <#list chatbots as chatbot> -
                                        class="layui-this"> - ${chatbot.name} -
                                        - -
                                        -
                                      • -
                                      -<#else> -
                                      - -
                                      还没有集成智能机器人
                                      -
                                      - - diff --git a/public/plugins/chatbot/views/apps/chatbot/index.html b/public/plugins/chatbot/views/apps/chatbot/index.html deleted file mode 100644 index a5b2013a..00000000 --- a/public/plugins/chatbot/views/apps/chatbot/index.html +++ /dev/null @@ -1,315 +0,0 @@ -
                                      -
                                      - <#include "/apps/chatbot/include/left.html"> -
                                      -
                                      - -
                                      - <#if currentbotid??> -
                                      -
                                      -

                                      - -
                                      -
                                      - 智能机器人 -
                                      -
                                      -
                                      - -
                                      -
                                      - - - - - -
                                      -
                                      -

                                      -
                                      -
                                      - - -
                                      -
                                      -
                                      -

                                      智能机器人用于在访客端实现机器人客服,具体使用参考文档中心《春松客服机器人客服》。 -

                                      -
                                      -
                                      -
                                      - - -
                                      -
                                      -
                                      - 智能客服 -
                                      -
                                      -

                                      在开启状态下,在访客端可以看到智能客服对话窗口并与机器人客服对话。

                                      -
                                      -
                                      -
                                      -
                                      - checked> -
                                      -
                                      -
                                      -
                                      - 知识库建议 -
                                      -
                                      -

                                      知识库建议包括知识库联想知识库快捷知识库联想:当坐席与访客进行对话过程中,坐席输入消息时是否得到机器人的建议回复;知识库快捷:当坐席与访客进行对话过程中,坐席收到访客的消息时是否得到机器人的建议回复。

                                      -
                                      -
                                      -
                                      -
                                      - checked> -
                                      -
                                      -
                                      -
                                      -
                                      -
                                      -
                                      - - -
                                      -
                                      -
                                      - 绑定 -
                                      -
                                      -

                                      以下信息为春松客服使用该智能机器人集成的信息,去设置

                                      -
                                      - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                                      渠道 - <#if currentbot.channel == "webim"> - 网站 - <#elseif currentbot.channel == "skype"> - Skype - <#elseif currentbot.channel == "callout"> - 外呼 - <#else> - 未知渠道类型 - -

                                      访客接入的方式

                                      渠道名称${snsAccountName!""}

                                      限定了智能机器人出现的渠道标识。

                                      创建人${creatorname!"未知"}

                                      创建人初次设定了智能机器人。

                                      工作模式 - ${currentbot.workmode} -

                                      工作模式有"机器人优先","人工坐席优先"和"仅机器人客服"三种,这决定了访客连线后默认对接的方式。

                                      -
                                      -
                                      -
                                      -
                                      - - -
                                      -
                                      -
                                      - 配置 -
                                      -
                                      -

                                      进入Chatopera云服务设置以下信息及知识库、多轮对话、意图识别、使用情况分析和对话历史等信息。

                                      -
                                      - - - - - - - - - - - - - - - - - - - - - - - -
                                      描述${currentbot.description}

                                      智能机器人的描述,侧重于业务,访客不会看到该信息。

                                      欢迎语${currentbot.welcome}

                                      与访客建立连接后,智能机器人发送的打招呼信息。

                                      兜底回复${currentbot.fallback}

                                      当智能机器人不清楚如何回复时的回复。

                                      -
                                      -
                                      -
                                      -
                                      - <#else> -
                                      -
                                      -

                                      - -
                                      -
                                      - 智能机器人 -
                                      -
                                      -
                                      - -
                                      -
                                      - - - -
                                      -
                                      -

                                      -
                                      -
                                      -
                                      -
                                      - 还没有智能机器人,现在去创建! -
                                      -
                                      - -
                                      - \ No newline at end of file diff --git a/public/plugins/chatbot/views/system/chatbot/edit.pug b/public/plugins/chatbot/views/system/chatbot/edit.pug new file mode 100644 index 00000000..d13988ac --- /dev/null +++ b/public/plugins/chatbot/views/system/chatbot/edit.pug @@ -0,0 +1,155 @@ +extends /apps/include/layout.pug + +block append head + script(src='/js/utils.js') + script(src='/js/CSKeFu_Rest_Request.v1.js') + style. + #create { + margin: 10px; + border-top: 1px solid #EEEEEE; + padding-top: 5px; + } + + .uk-form .layui-form-label { + line-height: 38px; + width: 150px; + } + + .uk-form .layui-form-mid { + line-height: 38px; + width: 240px; + padding: 5px 0; + } + + .selectChannelBox .layui-form-select .layui-input { + border: none; + text-align: right; + } + + .selectChannelBox .layui-form-select dl dd { + text-align: right; + } +block content + .uk-layui-form + form.layui-form.uk-form + input#id(type='hidden', name='id', value='#{id}') + #create + .layui-form-item + if id + input(type='hidden', name='snstype', value='#{snstype}') + label.layui-form-label #{snstype == 'webim' ? '网站渠道' : snstype == 'messenger' ? 'Messenger渠道' : ''} + else + .layui-input-inline.selectChannelBox(style="width: 150px;margin-left: 15px;margin-right: 5px;") + select#snstype(name="snstype", lay-filter="snstype", lay-verify="required") + option(value="webim" selected) 网站渠道 + option(value="messenger") Messenger渠道 + .layui-input-inline + if id + input(type="text" name="snsurl" required lay-verify="required" value="#{snsurl}" autocomplete="off" class="layui-input" disabled) + else + select(id="snsid" name="snsid" lay-verify="required") + option + .layui-form-mid.layui-word-aux 智能机器人服务的渠道标识 + .layui-form-item + label.layui-form-label ClientId + .layui-input-inline + input.layui-input(type='text', name='clientId', required, lay-verify='required', placeholder='请输入ClientId', autocomplete='off', value='#{bot.clientId}') + .layui-form-mid.layui-word-aux + | 智能机器人ClientId,还没有? + a(href='#{botServiceProvider}/dashboard', target='_blank') 现在去创建! + .layui-form-item + label.layui-form-label Secret + .layui-input-inline + input.layui-input(type='password', name='secret', required, lay-verify='required', placeholder='请输入Secret', autocomplete='off', value='#{bot.secret}') + .layui-form-mid.layui-word-aux 智能机器人Secret + .layui-form-item + label.layui-form-label 工作模式 + .layui-input-inline + select(name='workmode', lay-verify='required') + option(selected=(bot.workmode == "机器人客服优先" ? 'selected' : false) ) 机器人客服优先 + option(selected=(bot.workmode == "人工客服优先" ? 'selected' : false) ) 人工客服优先 + option(selected=(bot.workmode == "仅机器人客服" ? 'selected' : false) ) 仅机器人客服 + .layui-form-mid.layui-word-aux 来自访客的会话默认以什么方式接待 + .layui-form-button(style="left:0") + .layui-button-block + button.layui-btn(lay-submit, lay-filter='save') 保存 + + script. + // 保存成功,刷新页面 + function submitChatbotSucc(bot) { + if (bot.rc != 0) { + submitChatbotFail(bot); + } else { + parent.location.href = "/admin/system/chatbot/index.html?chatbotid=" + bot.data.id; + } + } + + // 保存失败 + function submitChatbotFail(err) { + layer.confirm(err.data || err.error, { + btn: ['关闭'], + icon: 2, + title: '提示' + }, function (popup, layero) { + layer.close(popup) + }, function (popup) { + // 取消方法 + }); + } + + + layui.use(['form'], function () { + var form = layui.form(); + form.on('submit(save)', function (data) { + var field = data.field; + if (field.id) { + field.ops = 'update'; + restApiRequest({ + silent: true, + path: "chatbot", + data: field + }).then(submitChatbotSucc, submitChatbotFail); + } else { + field.ops = 'create'; + restApiRequest({ + path: "chatbot", + data: field + }).then(submitChatbotSucc, submitChatbotFail); + } + return false; + }); + + function getChannel(type) { + if (!$('#id').val()) { + restApiRequest({ + path: "chatbot", + silent: true, + data: { + ops: "vacant", + snstype: type + } + }).then(function (data) { + if (data.rc == 0) { + if (data.data.length > 0) { + var options = $.map(data.data, function (r) { + return ''; + }); + $('#snsid').html(options); + } else { + $('#snsid').html(''); + } + + form.render('select'); + } + }, function (error) { + console.log("error", error); + }) + } + } + + getChannel('webim') + form.on('select(snstype)', function (data) { + getChannel(data.value) + }); + }) + diff --git a/public/plugins/chatbot/views/system/chatbot/include/left.pug b/public/plugins/chatbot/views/system/chatbot/include/left.pug new file mode 100644 index 00000000..298f855d --- /dev/null +++ b/public/plugins/chatbot/views/system/chatbot/include/left.pug @@ -0,0 +1,16 @@ +script(src='/js/utils.js') +script(src='/js/CSKeFu_Rest_Request.v1.js') +h1.site-h1(style='border-top:1px solid #e6e6e6;') + | 列表 + +if size(chatbots) > 0 + ul.layui-nav.layui-nav-tree(lay-filter='chatbots-nav-tree') + li.layui-nav-item.layui-nav-itemed + dl.layui-nav-child + for chatbot in chatbots + dd(style="text-align: center;border-bottom:thin solid #F5F5F5; list-style: none;", class=(chatbot.id == currentbotid?"layui-this":"") ) + a(href="/admin/system/chatbot/index.html?chatbotid=" + chatbot.id)= chatbot.name +else + .ukefu-empty(style='background: none') + i.layui-icon  + div 还没有集成智能机器人 diff --git a/public/plugins/chatbot/views/system/chatbot/index.pug b/public/plugins/chatbot/views/system/chatbot/index.pug new file mode 100644 index 00000000..afe30449 --- /dev/null +++ b/public/plugins/chatbot/views/system/chatbot/index.pug @@ -0,0 +1,283 @@ +extends /apps/include/layout.pug + +block content + .layui-side.layui-bg-black + .layui-side-scroll + include /admin/system/chatbot/include/left.pug + .layui-body + if currentbotid + .row + .col-lg-12 + h1.site-h1.ukefu-tab(style='border-top:1px solid #e6e6e6;height:26px;') + span.ukefu-bt + .ukefu-bt-text + .ukefu-bt-text-title + | 智能机器人 + // 按钮组件 + .ukefu-bt-text-content(style='position: absolute;right: 5px;top: 0px;') + .layui-btn-group.ukefu-btn-group + button.layui-btn.layui-btn-small(onclick="showChatbotEditDialogue('#{currentbotid}')") + i.layui-icon  + | 绑定 + + button.layui-btn.layui-btn-small(onclick="openChatbotBotPlatform('#{currentbot.clientId}')") + i.layui-icon  + | 配置 + + button.layui-btn.layui-btn-small(onclick='showChatbotCreateDialogue()') + i.layui-icon  + | 新建 + + button.layui-btn.layui-btn-danger.layui-btn-small(onclick='showChatbotDeleteDialogue()') + i.layui-icon  + | 删除 + + button.layui-btn.layui-btn-normal.layui-btn-small(onclick='openChatbotIntegrationInfoCenter()') + i.layui-icon  + | 文档中心 + + // 提示 + .row(style='padding-left:5px;') + .row + blockquote.layui-elem-quote + p + | 智能机器人用于在访客端实现机器人客服,具体使用参考文档中心 + a(href='https://docs.chatopera.com/products/cskefu/work-chatbot.html', target='_blank') 《春松客服机器人客服》 + | 。 + + // 工作状态 + .row(style='padding:5px;') + .col-lg-12 + fieldset.layui-elem-field.layui-field-title + legend 智能客服 + .layui-field-box + blockquote.layui-elem-quote.layui-quote-nm + p + | 在开启状态下,在访客端可以看到 + b 智能客服 + | 对话窗口并与机器人客服对话。 + form.layui-form(action) + .layui-form-item + .layui-input-block + input(type="checkbox" lay-filter="bot-workstatus" name="switch" lay-skin="switch" lay-text="启用|禁用", checked=(currentbot.enabled ? 'checked' : false)) + legend 知识库建议 + .layui-field-box + blockquote.layui-elem-quote.layui-quote-nm + p + | 知识库建议包括 + b 知识库联想 + | 和 + b 知识库快捷 + | 。 + b 知识库联想 + | :当坐席与访客进行对话过程中,坐席输入消息时是否得到机器人的建议回复; + b 知识库快捷 + | :当坐席与访客进行对话过程中,坐席收到访客的消息时是否得到机器人的建议回复。 + form.layui-form(action) + .layui-form-item + .layui-input-block + input(type="checkbox" lay-filter="bot-aisuggest" name="bot-aisuggest" lay-skin="switch" lay-text="启用|禁用" , checked=(currentbot.aisuggest ? 'checked' : false)) + // 绑定 + .row(style='padding-left:5px;') + .col-lg-12 + fieldset.layui-elem-field.layui-field-title + legend 绑定 + .layui-field-box + blockquote.layui-elem-quote.layui-quote-nm + p + | 以下信息为春松客服使用该智能机器人集成的信息,去 + a(href='javascript:void(0)', onclick="showChatbotEditDialogue('#{currentbotid}')") 设置 + | 。 + table.layui-table(lay-even, lay-skin='nob') + colgroup + col(width='150') + col(width='200') + col(width='400') + tbody + tr + td 渠道 + td + if currentbot.channel == "webim" + | 网站 + else if currentbot.channel == "skype" + | Skype + else if currentbot.channel == "callout" + | 外呼 + else + | 未知渠道类型 + td + p(style='color: #9C9C9C') 访客接入的方式 + tr + td 渠道名称 + td= snsAccountName + td + p(style='color: #9C9C9C') 限定了智能机器人出现的渠道标识。 + tr + td 创建人 + td= creatorname ? creatorname : "未知" + td + p(style='color: #9C9C9C') 创建人初次设定了智能机器人。 + tr + td 工作模式 + td= currentbot.workmode + td + p(style='color: #9C9C9C') 工作模式有"机器人优先","人工坐席优先"和"仅机器人客服"三种,这决定了访客连线后默认对接的方式。 + // 配置 + .row(style='padding:5px;') + .col-lg-12 + fieldset.layui-elem-field.layui-field-title + legend 配置 + .layui-field-box + blockquote.layui-elem-quote.layui-quote-nm + p + a(href='javascript:void(0)', onclick="openChatbotBotPlatform('#{currentbot.clientId}')") 进入Chatopera云服务 + | 设置以下信息及知识库、多轮对话、意图识别、使用情况分析和对话历史等信息。 + table.layui-table(lay-even, lay-skin='nob') + colgroup + col(width='150') + col(width='200') + col(width='300') + tbody + tr + td 描述 + td= currentbot.description + td + p(style='color: #9C9C9C') 智能机器人的描述,侧重于业务,访客不会看到该信息。 + tr + td 欢迎语 + td= currentbot.welcome + td + p(style='color: #9C9C9C') 与访客建立连接后,智能机器人发送的打招呼信息。 + tr + td 兜底回复 + td= currentbot.fallback + td + p(style='color: #9C9C9C') 当智能机器人不清楚如何回复时的回复。 + else + .row + .col-lg-12 + h1.site-h1.ukefu-tab(style='border-top:1px solid #e6e6e6;height:26px;') + span.ukefu-bt + .ukefu-bt-text + .ukefu-bt-text-title 智能机器人 + + // 按钮组件 + .ukefu-bt-text-content(style='position: absolute;right: 5px;top: 0px;') + .layui-btn-group.ukefu-btn-group + button.layui-btn.layui-btn-small(onclick='showChatbotCreateDialogue()') + i.layui-icon  + span 新建 + + button.layui-btn.layui-btn-small(onclick='openChatbotBotPlatform()') + i.csfont  + span 登录Chatopera云服务 + + button.layui-btn.layui-btn-normal.layui-btn-small(onclick='openChatbotIntegrationInfoCenter()') + i.layui-icon  + span 文档中心 + + .row(style='padding:5px;') + .col-lg-12 + | 还没有智能机器人, + a(href='javascript:void(0)', onclick='showChatbotCreateDialogue()') 现在去创建! + script. + // 打开文档中心 + function openChatbotIntegrationInfoCenter() { + window.open("https://docs.chatopera.com/products/cskefu/work-chatbot/index.html", "_blank"); + } + + // 展示编辑机器人的窗口 + function showChatbotEditDialogue(chatbotid) { + console.log("showChatbotEditDialogue", chatbotid); + layer.open({ + title: '编辑智能机器人', + type: 2, + area: ['700px', '450px'], + content: 'edit.html?id=' + chatbotid + }) + } + + // 展示创建机器人的对话框 + function showChatbotCreateDialogue() { + layer.open({ + title: '集成智能机器人', + type: 2, + area: ['700px', '450px'], + content: 'edit.html' + }) + } + + // 删除机器人 + function showChatbotDeleteDialogue() { + var lindex = layer.confirm('请确认是否删除?', { + btn: ['确认', '取消'] + }, function () { + return restApiRequest({ + path: "chatbot", + data: { + ops: 'delete', + id: '#{currentbotid}' + } + }).then(function (result) { + // 刷新页面 + layer.close(lindex); + setTimeout(function () { + location.href = "/admin/system/chatbot/index.html"; + }, 300); + }, function (reason) { + // TODO 提示错误 + console.log("[ChatbotDelete] error: ", reason); + layer.close(lindex); + }); + }, function () { + layer.close(lindex); + }); + + } + + // 打开机器人管理地址 + function openChatbotBotPlatform(chatbotid) { + var botMgrUrl = "#{botServiceProvider}"; + if (chatbotid) { + botMgrUrl = "#{botServiceProvider}/dashboard/clients/" + chatbotid + "/control-center"; + } + + window.open(botMgrUrl, "_blank"); + } + + // 设置机器人工作状态 + function setChatbotWorkstatus(id, workstatus) { + restApiRequest({ + path: "chatbot", + silent: true, + data: { + ops: workstatus ? "enable" : "disable", + id: id + } + }); + } + + function setChatbotAiSuggest(id, aisuggest) { + restApiRequest({ + path: "chatbot", + silent: true, + data: { + ops: aisuggest ? "enableAiSuggest" : "disableAiSuggest", + id: id + } + }); + } + + layui.use(['form'], function () { + var form = layui.form(); + form.render(); + + form.on('switch(bot-workstatus)', function (data) { + setChatbotWorkstatus('#{currentbotid}', data.elem.checked); + }); + + form.on('switch(bot-aisuggest)', function (data) { + setChatbotAiSuggest('#{currentbotid}', data.elem.checked); + }); + }); +