|
|
@@ -0,0 +1,488 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html>
|
|
|
+<head>
|
|
|
+ <meta charset="utf-8">
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
+ <title>后台首页</title>
|
|
|
+ <link rel="shortcut icon" href="favicon.ico">
|
|
|
+ <link href="https://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
|
|
|
+ <link href="https://cdn.staticfile.org/font-awesome/4.4.0/css/font-awesome.css?v=4.4.0" rel="stylesheet">
|
|
|
+ <link href="https://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
|
|
|
+ <link href="__CSS__/bootstrap.min.css?v=3.3.6" rel="stylesheet">
|
|
|
+ <link href="__CSS__/font-awesome.min.css?v=4.4.0" rel="stylesheet">
|
|
|
+ <link href="__CSS__/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
|
|
|
+ <link href="__CSS__/animate.min.css" rel="stylesheet">
|
|
|
+ <link href="__CSS__/style.min.css?v=4.1.0" rel="stylesheet">
|
|
|
+ <link href="__JS__/layui/css/myLayui.css" rel="stylesheet">
|
|
|
+</head>
|
|
|
+<body class="gray-bg">
|
|
|
+<div class="wrapper wrapper-content">
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-sm-2">
|
|
|
+ <div class="ibox float-e-margins">
|
|
|
+ <div class="ibox-title" style="display: flex; justify-content: center;">
|
|
|
+ <!--<span class="label label-primary pull-right">今天</span>-->
|
|
|
+ <h3>敏感词报警</h3>
|
|
|
+ </div>
|
|
|
+ <div class="ibox-content" style="text-align: center">
|
|
|
+ <h1 class="no-margins"><span id="allSensitive">0</span><span style="font-size: 14px; margin-left: 10px">次</span></h1>
|
|
|
+ <small></small>
|
|
|
+ </div>
|
|
|
+ <div class="ibox-content" style="font-size: 12px; padding: 5px 20px 5px; height: 45px;">
|
|
|
+ <div style="display: flex">
|
|
|
+ <div style="width: 80px; text-align: right;">访客次数</div>
|
|
|
+ <div style="margin-left: 20px; text-align: right;" id="userSensitive">0</div>
|
|
|
+ </div>
|
|
|
+ <div style="display: flex">
|
|
|
+ <div style="width: 80px; text-align: right;">客服次数</div>
|
|
|
+ <div style="margin-left: 20px; text-align: right;" id="serverSensitive">0</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-sm-2">
|
|
|
+ <div class="ibox float-e-margins">
|
|
|
+ <div class="ibox-title" style="display: flex; justify-content: center;">
|
|
|
+ <!--<span class="label label-primary pull-right">今天</span>-->
|
|
|
+ <h3>平均响应超时</h3>
|
|
|
+ </div>
|
|
|
+ <div class="ibox-content" style="text-align: center">
|
|
|
+ <h1 class="no-margins"><span id="csdTime">0</span><span style="font-size: 14px; margin-left: 10px">秒</span></h1>
|
|
|
+ <small></small>
|
|
|
+ </div>
|
|
|
+ <div class="ibox-content" style="font-size: 12px; padding: 5px 20px 5px; height: 45px; line-height: 3;">
|
|
|
+ <div style="display: flex">
|
|
|
+ <div style="width: 80px; text-align: right;">响应超时次数</div>
|
|
|
+ <div style="margin-left: 20px; text-align: right;" id="csdNumber">0</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-sm-2">
|
|
|
+ <div class="ibox float-e-margins">
|
|
|
+ <div class="ibox-title" style="display: flex; justify-content: center;">
|
|
|
+ <!--<span class="label label-primary pull-right">今天</span>-->
|
|
|
+ <h3>平均会话超时</h3>
|
|
|
+ </div>
|
|
|
+ <div class="ibox-content" style="text-align: center">
|
|
|
+ <h1 class="no-margins"><span id="overtimeTime">0</span><span style="font-size: 14px; margin-left: 10px">秒</span></h1>
|
|
|
+ <small></small>
|
|
|
+ </div>
|
|
|
+ <div class="ibox-content" style="font-size: 12px; padding: 5px 20px 5px; height: 45px; line-height: 3;">
|
|
|
+ <div style="display: flex">
|
|
|
+ <div style="width: 80px; text-align: right;">会话超时次数</div>
|
|
|
+ <div style="margin-left: 20px; text-align: right;" id="overtimeNumber">0</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-sm-2">
|
|
|
+ <div class="ibox float-e-margins">
|
|
|
+ <div class="ibox-title" style="display: flex; justify-content: center;">
|
|
|
+ <!--<span class="label label-primary pull-right">今天</span>-->
|
|
|
+ <h3>满意度报警</h3>
|
|
|
+ </div>
|
|
|
+ <div class="ibox-content" style="text-align: center">
|
|
|
+ <h1 class="no-margins"><span id="evaluateCount1">0</span><span style="font-size: 14px; margin-left: 10px">次</span></h1>
|
|
|
+ <small></small>
|
|
|
+ </div>
|
|
|
+ <div class="ibox-content" style="font-size: 12px; padding: 5px 20px 5px; height: 45px; line-height: 3;">
|
|
|
+ <div style="display: flex">
|
|
|
+ <div style="width: 80px; text-align: right;">不满意次数</div>
|
|
|
+ <div style="margin-left: 20px; text-align: right;" id="evaluateCount2">0</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="ibox float-e-margins">
|
|
|
+ <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 class="ibox-content">
|
|
|
+ <!--搜索框开始-->
|
|
|
+ <form id="realTimeForm" role="form" method="post" 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" id="group_id"/>
|
|
|
+ <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" id="alarm_id"/>
|
|
|
+ <select lay-verify="required" lay-filter="alarm">
|
|
|
+ <option value="">所有会话</option>
|
|
|
+ <option value="1">正常会话</option>
|
|
|
+ <option value="2">报警会话</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ <!--搜索框结束-->
|
|
|
+ <div id="realTimeTable" class="example-wrap">
|
|
|
+ <div class="example">
|
|
|
+ <table class="table table-hover table-striped">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th>会话ID</th>
|
|
|
+ <th>访客进线时间</th>
|
|
|
+ <th>接待客服</th>
|
|
|
+ <th>访客名</th>
|
|
|
+ <th>会话开始时间</th>
|
|
|
+ <th>报警次数</th>
|
|
|
+ <th>操作</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody id="table">
|
|
|
+ <tr>
|
|
|
+ <td colspan="999" style="text-align: center">暂无数据</td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 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>
|
|
|
+
|
|
|
+<script src="https://cdn.staticfile.org/jquery/2.1.4/jquery.min.js"></script>
|
|
|
+<script src="https://cdn.bootcss.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
|
|
|
+<script src="/static/admin/js/plugins/echarts/echarts.min.js"></script>
|
|
|
+<script src="/static/customer/js/md5.js"></script>
|
|
|
+<script src="__JS__/jquery.min.js?v=2.1.4"></script>
|
|
|
+<script src="__JS__/bootstrap.min.js?v=3.3.6"></script>
|
|
|
+<script src="__JS__/content.min.js?v=1.0.0"></script>
|
|
|
+<script src="__JS__/plugins/bootstrap-table/bootstrap-table.min.js"></script>
|
|
|
+<script src="__JS__/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
|
|
|
+<script src="__JS__/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
|
|
|
+<script src="__JS__/plugins/layer/layer.min.js"></script>
|
|
|
+<script src="__JS__/plugins/validate/jquery.validate.min.js"></script>
|
|
|
+<script src="__JS__/plugins/validate/messages_zh.min.js"></script>
|
|
|
+<script src="__JS__/layui/layui.js"></script>
|
|
|
+<script src="__JS__/jquery.form.js"></script>
|
|
|
+<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(){
|
|
|
+ var form = layui.form;
|
|
|
+
|
|
|
+ form.on('select(group)', function(value){
|
|
|
+ $("#group_id").val(value.value);
|
|
|
+ onSearch()
|
|
|
+ });
|
|
|
+
|
|
|
+ form.on('select(alarm)', function(value){
|
|
|
+ $("#alarm_id").val(value.value);
|
|
|
+ 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>
|
|
|
+<!--webSocket-->
|
|
|
+<script>
|
|
|
+ let config = {
|
|
|
+ socket: '{$socket}',
|
|
|
+ token: '{$token}',
|
|
|
+ };
|
|
|
+ let myData = [];
|
|
|
+ let date = new Date(new Date().setHours(0, 0, 0, 0)) / 1000;
|
|
|
+ let getLocation = window.location.href;
|
|
|
+ let host = getLocation.split('/admin')[0];
|
|
|
+ let apiToken = hex_md5('customer-service'+date+host);
|
|
|
+ let socket = new WebSocket('ws://' + config.socket+'?apiToken=' + apiToken);
|
|
|
+ socket.onopen = function(res) {
|
|
|
+ console.log('握手成功');
|
|
|
+ // 登录
|
|
|
+ let login_data = JSON.stringify({
|
|
|
+ type: 'adminInit',
|
|
|
+ token: config.token
|
|
|
+ });
|
|
|
+ socket.send(login_data);
|
|
|
+ };
|
|
|
+ socket.onmessage = function(res) {
|
|
|
+ var data = eval("("+res.data+")");
|
|
|
+ switch(data['message_type']){
|
|
|
+ // 服务端ping客户端
|
|
|
+ case 'monitor':
|
|
|
+ myData = data.data.cvtList;
|
|
|
+ putMonitor(data.data);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ };
|
|
|
+ /**
|
|
|
+ * 时间戳转化为年 月 日 时 分 秒
|
|
|
+ * time: 传入时间戳
|
|
|
+ * format:返回格式,支持自定义,但参数必须与formateArr里保持一致
|
|
|
+ */
|
|
|
+ function customFormatDateTime(timeStamp,custom,isDtae) {
|
|
|
+ var date = new Date();
|
|
|
+ date.setTime(timeStamp * 1000);
|
|
|
+ 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();
|
|
|
+ var second = date.getSeconds();
|
|
|
+ minute = minute < 10 ? ('0' + minute) : minute;
|
|
|
+ second = second < 10 ? ('0' + second) : second;
|
|
|
+ if (isDtae == 0){
|
|
|
+ return y + custom + m //+'student';
|
|
|
+ }else if (isDtae ==1){
|
|
|
+ return y + custom + m + custom + d;
|
|
|
+ } else if (isDtae ==2) {
|
|
|
+ return h + ':' + minute;
|
|
|
+ } else {
|
|
|
+ return y + '-' + m + '-' + d + '-' + h + ':' + minute + ':' + second;
|
|
|
+ }
|
|
|
+ };
|
|
|
+ function onSearch() {
|
|
|
+ let table = "";
|
|
|
+ let cvtList = searchData();
|
|
|
+ for(key in cvtList){
|
|
|
+ let start_time = cvtList[key].start_time;
|
|
|
+ let intime = cvtList[key].intime
|
|
|
+ if (key != "length") {
|
|
|
+ table += "<tr>" +
|
|
|
+ "<td>"+cvtList[key].servicelog_id+"</td>" +
|
|
|
+ "<td>"+customFormatDateTime(intime,'',2)+"</td>" +
|
|
|
+ "<td>"+cvtList[key].server_name+"</td>" +
|
|
|
+ "<td>"+cvtList[key].user_name+"</td>" +
|
|
|
+ "<td>"+customFormatDateTime(start_time,'',2)+"</td>" +
|
|
|
+ "<td>"+cvtList[key].allCount+"</td>" +
|
|
|
+ "<td>" +
|
|
|
+ "<a href='/admin/system/detail/id/"+cvtList[key].servicelog_id+".html'>" +
|
|
|
+ "<button type='button' class='btn btn-primary btn-sm'>" +
|
|
|
+ "<i class='fa fa-paste'></i> 详情" +
|
|
|
+ "</button>" +
|
|
|
+ "</a>" +
|
|
|
+ "</td>" +
|
|
|
+ "</tr>"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (table) {
|
|
|
+ $("#table").html(table);
|
|
|
+ } else {
|
|
|
+ $("#table").html("<tr>" +
|
|
|
+ "<td colspan='6' style='text-align: center'>暂无数据</td>" +
|
|
|
+ "</tr>");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ function searchData() {
|
|
|
+ let group_id = $("#group_id").val();
|
|
|
+ let alarm_id = $("#alarm_id").val();
|
|
|
+ let newData = [];
|
|
|
+ if (group_id && alarm_id) {
|
|
|
+ if (alarm_id == 1) {
|
|
|
+ for (keys in myData) {
|
|
|
+ if (group_id == myData[key].group_id && !myData[key].allCount) {
|
|
|
+ newData.push(myData[key])
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (alarm_id == 2) {
|
|
|
+ for (keys in myData) {
|
|
|
+ if (group_id == myData[key].group_id && myData[key].allCount) {
|
|
|
+ newData.push(myData[key])
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if(group_id) {
|
|
|
+ for (keys in myData) {
|
|
|
+ if (group_id == myData[key].group_id) {
|
|
|
+ newData.push(myData[key])
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if(alarm_id) {
|
|
|
+ if (alarm_id == 1) {
|
|
|
+ for (keys in myData) {
|
|
|
+ if (!myData[key].allCount) {
|
|
|
+ newData.push(myData[key])
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (alarm_id == 2) {
|
|
|
+ for (keys in myData) {
|
|
|
+ if (myData[key].allCount) {
|
|
|
+ newData.push(myData[key])
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ newData = myData
|
|
|
+ }
|
|
|
+ return newData;
|
|
|
+ }
|
|
|
+ // 渲染
|
|
|
+ function putMonitor(data) {
|
|
|
+ $("#allSensitive").html(data.userSensitive + data.serverSensitive);
|
|
|
+ $("#userSensitive").html(data.userSensitive);
|
|
|
+ $("#serverSensitive").html(data.serverSensitive);
|
|
|
+ $("#csdNumber").html(data.csdNumber);
|
|
|
+ $("#overtimeNumber").html(data.overtimeNumber);
|
|
|
+ $("#evaluateCount1").html(data.evaluateCount);
|
|
|
+ $("#evaluateCount2").html(data.evaluateCount);
|
|
|
+ // 响应超时.
|
|
|
+ let n = data.csdTime.length;
|
|
|
+ let csdTime = 0;
|
|
|
+ for(keys in data.csdTime){
|
|
|
+ csdTime += data.csdTime[keys]
|
|
|
+ }
|
|
|
+ csdTime = csdTime ? Math.ceil(csdTime/n) : 0;
|
|
|
+ $("#csdTime").html(csdTime);
|
|
|
+ // 会话超时.
|
|
|
+ let m = data.overtimeTime.length;
|
|
|
+ let overtimeTime = 0;
|
|
|
+ for(keys in data.overtimeTime){
|
|
|
+ overtimeTime += data.overtimeTime[keys]
|
|
|
+ }
|
|
|
+ overtimeTime = overtimeTime ? Math.ceil(overtimeTime/m) : 0;
|
|
|
+ $("#overtimeTime").html(overtimeTime);
|
|
|
+ onSearch();
|
|
|
+ }
|
|
|
+</script>
|
|
|
+</body>
|
|
|
+</html>
|