|
@@ -97,12 +97,20 @@
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="ibox float-e-margins">
|
|
<div class="ibox float-e-margins">
|
|
|
- <div class="ibox-title">
|
|
|
|
|
- <h5>会话监控</h5>
|
|
|
|
|
|
|
+ <input style="display:none;" type="text" value="1" id="type">
|
|
|
|
|
+ <div style="display: flex;">
|
|
|
|
|
+ <div class="ibox-title" style="width: 100px; cursor:pointer;" id="current1" onclick="current(1)">
|
|
|
|
|
+ <h5>当前会话</h5>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="ibox-title" id="current2" style="width: 100px; cursor:pointer; background: #eee" onclick="current(2)">
|
|
|
|
|
+ <h5>在线客服</h5>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="ibox-title" style="width: calc(100% - 200px); background: #eee;">
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="ibox-content">
|
|
<div class="ibox-content">
|
|
|
<!--搜索框开始-->
|
|
<!--搜索框开始-->
|
|
|
- <form id='commentForm' role="form" method="post" class="form-inline">
|
|
|
|
|
|
|
+ <form id="realTimeForm" role="form" method="post" class="form-inline">
|
|
|
<div class="content clearfix m-b">
|
|
<div class="content clearfix m-b">
|
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
|
<label>分组名称:</label>
|
|
<label>分组名称:</label>
|
|
@@ -132,9 +140,9 @@
|
|
|
</div>
|
|
</div>
|
|
|
</form>
|
|
</form>
|
|
|
<!--搜索框结束-->
|
|
<!--搜索框结束-->
|
|
|
- <div class="example-wrap">
|
|
|
|
|
|
|
+ <div id="realTimeTable" class="example-wrap">
|
|
|
<div class="example">
|
|
<div class="example">
|
|
|
- <table id="cusTable" class="table table-hover table-striped">
|
|
|
|
|
|
|
+ <table class="table table-hover table-striped">
|
|
|
<thead>
|
|
<thead>
|
|
|
<tr>
|
|
<tr>
|
|
|
<th>会话ID</th>
|
|
<th>会话ID</th>
|
|
@@ -155,6 +163,67 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<!-- End Example Pagination -->
|
|
<!-- End Example Pagination -->
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <!--搜索框开始-->
|
|
|
|
|
+ <form id='commentForm' style="display: none" role="form" method="get" class="form-inline">
|
|
|
|
|
+ <div class="content clearfix m-b">
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>分组名称:</label>
|
|
|
|
|
+ <div class="input-group col-sm-4 layui-form" style="width: 120px;">
|
|
|
|
|
+ <input type="hidden" name="type1" id="type1"/>
|
|
|
|
|
+ <select lay-verify="required" lay-filter="group">
|
|
|
|
|
+ <option value="">全部客服组</option>
|
|
|
|
|
+ {if !empty($groups)}
|
|
|
|
|
+ {foreach name="groups" item="vo"}
|
|
|
|
|
+ <option value="{$vo['id']}">{$vo['name']}</option>
|
|
|
|
|
+ {/foreach}
|
|
|
|
|
+ {/if}
|
|
|
|
|
+ </select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group" style="margin-left: 40px">
|
|
|
|
|
+ <label>报警状态:</label>
|
|
|
|
|
+ <div class="input-group col-sm-4 layui-form" style="width: 120px;">
|
|
|
|
|
+ <input type="hidden" name="type2" id="type2"/>
|
|
|
|
|
+ <select lay-verify="required" lay-filter="alarm">
|
|
|
|
|
+ <option value="">所有状态</option>
|
|
|
|
|
+ <option value="1">在线状态</option>
|
|
|
|
|
+ <option value="2">休息状态</option>
|
|
|
|
|
+ <option value="3">隐身状态</option>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <lable> </lable>
|
|
|
|
|
+ <button class="btn btn-primary" type="button" style="margin-top:5px" id="search"><strong>搜
|
|
|
|
|
+ 索</strong>
|
|
|
|
|
+ </button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </form>
|
|
|
|
|
+ <!--搜索框结束-->
|
|
|
|
|
+ <div id="commentTable" style="display: none" class="example-wrap">
|
|
|
|
|
+ <div class="example">
|
|
|
|
|
+ <table id="cusTable">
|
|
|
|
|
+ <thead>
|
|
|
|
|
+ <th data-field="uidname">客服</th>
|
|
|
|
|
+ <th data-field="hhl">会话量</th>
|
|
|
|
|
+ <th data-field="jdl">接待量</th>
|
|
|
|
|
+ <th data-field="pjhysc">平均会话时长</th>
|
|
|
|
|
+ <th data-field="cpl">参评率</th>
|
|
|
|
|
+ <th data-field="mydl">满意度率</th>
|
|
|
|
|
+ <th data-field="pjxysc">平均响应时长</th>
|
|
|
|
|
+ <th data-field="jrxxsc">今日休息时长</th>
|
|
|
|
|
+ <th data-field="fxx">发消息</th>
|
|
|
|
|
+ </thead>
|
|
|
|
|
+ </table>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- End Example Pagination -->
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -175,7 +244,25 @@
|
|
|
<script src="__JS__/layui/layui.js"></script>
|
|
<script src="__JS__/layui/layui.js"></script>
|
|
|
<script src="__JS__/jquery.form.js"></script>
|
|
<script src="__JS__/jquery.form.js"></script>
|
|
|
<script type="text/javascript">
|
|
<script type="text/javascript">
|
|
|
-
|
|
|
|
|
|
|
+ function current(id) {
|
|
|
|
|
+ $("#type").val(id);
|
|
|
|
|
+ if (id == 1) {
|
|
|
|
|
+ $("#current1").css("background","#fff");
|
|
|
|
|
+ $("#current2").css("background","#eee");
|
|
|
|
|
+ $("#realTimeForm").css("display","block");
|
|
|
|
|
+ $("#realTimeTable").css("display","block");
|
|
|
|
|
+ $("#commentForm").css("display","none");
|
|
|
|
|
+ $("#commentTable").css("display","none");
|
|
|
|
|
+ } else if (id == 2) {
|
|
|
|
|
+ $("#current2").css({"background":"#fff"});
|
|
|
|
|
+ $("#current1").css({"background":"#eee"});
|
|
|
|
|
+ $("#realTimeForm").css({"display":"none"});
|
|
|
|
|
+ $("#realTimeTable").css({"display":"none"});
|
|
|
|
|
+ $("#commentForm").css({"display":"block"});
|
|
|
|
|
+ $("#commentTable").css({"display":"block"});
|
|
|
|
|
+ }
|
|
|
|
|
+ initTable()
|
|
|
|
|
+ }
|
|
|
layui.use(['form', 'upload'], function(){
|
|
layui.use(['form', 'upload'], function(){
|
|
|
var form = layui.form;
|
|
var form = layui.form;
|
|
|
|
|
|
|
@@ -189,7 +276,50 @@
|
|
|
onSearch()
|
|
onSearch()
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
|
|
+ function initTable() {
|
|
|
|
|
+ //先销毁表格
|
|
|
|
|
+ $('#cusTable').bootstrapTable('destroy');
|
|
|
|
|
+ //初始化表格,动态从服务器加载数据
|
|
|
|
|
+ $("#cusTable").bootstrapTable({
|
|
|
|
|
+ method: "get", //使用get请求到服务器获取数据
|
|
|
|
|
+ url: "{:url('kfonitoring/kfjiankong')}", //获取数据的地址
|
|
|
|
|
+ striped: true, //表格显示条纹
|
|
|
|
|
+ pagination: true, //启动分页
|
|
|
|
|
+ pageSize: 50, //每页显示的记录数
|
|
|
|
|
+ pageNumber: 1, //当前第几页
|
|
|
|
|
+ pageList: [5, 10, 15, 20, 25], //记录数可选列表
|
|
|
|
|
+ sidePagination: "server", //表示服务端请求
|
|
|
|
|
+ paginationFirstText: "首页",
|
|
|
|
|
+ paginationPreText: "上一页",
|
|
|
|
|
+ paginationNextText: "下一页",
|
|
|
|
|
+ paginationLastText: "尾页",
|
|
|
|
|
+ queryParamsType: "undefined",
|
|
|
|
|
+ queryParams: function queryParams(params) { //设置查询参数
|
|
|
|
|
+ var param = {
|
|
|
|
|
+ pageNumber: params.pageNumber,
|
|
|
|
|
+ pageSize: params.pageSize,
|
|
|
|
|
+ searchText: $('#type1').val() + ',' + $('#type2').val() + ',' + $('#type3').val()
|
|
|
|
|
+ };
|
|
|
|
|
+ return param;
|
|
|
|
|
+ },
|
|
|
|
|
+ onLoadSuccess: function (res) { //加载成功时执行
|
|
|
|
|
+ if (111 == res.code) {
|
|
|
|
|
+ window.location.reload();
|
|
|
|
|
+ }
|
|
|
|
|
+ layer.msg("加载成功", {time: 1000});
|
|
|
|
|
+ },
|
|
|
|
|
+ onLoadError: function () { //加载失败时执行
|
|
|
|
|
+ layer.msg("加载数据失败");
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ $(document).ready(function () {
|
|
|
|
|
+ //调用函数,初始化表格
|
|
|
|
|
+ initTable();
|
|
|
|
|
|
|
|
|
|
+ //当点击查询按钮的时候执行
|
|
|
|
|
+ $("#search").bind("click", initTable);
|
|
|
|
|
+ });
|
|
|
</script>
|
|
</script>
|
|
|
<!--webSocket-->
|
|
<!--webSocket-->
|
|
|
<script>
|
|
<script>
|