122 lines
4.6 KiB
HTML
122 lines
4.6 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
<title>历史评价 - 客服列表</title>
|
|
</head>
|
|
<link rel="stylesheet" href="/static/admin/js/layui/css/layui.css" media="all">
|
|
<link href="__CSS__/bootstrap.min.css?v=3.3.6" rel="stylesheet">
|
|
<link href="__CSS__/animate.min.css" rel="stylesheet">
|
|
<link href="__CSS__/style.min.css?v=4.1.0" rel="stylesheet">
|
|
<style>
|
|
.search_box {
|
|
overflow: hidden;
|
|
margin-top: 15px;
|
|
margin-left: 15px;
|
|
}
|
|
|
|
.margin_right_sm {
|
|
margin-right: 10px;
|
|
}
|
|
</style>
|
|
|
|
<body class="gray-bg">
|
|
|
|
<div class="wrapper wrapper-content animated fadeInRight">
|
|
<div class="ibox-title">
|
|
<h5>会话记录</h5>
|
|
</div>
|
|
<div class="ibox-content">
|
|
<div class="search_box">
|
|
<!--搜索框开始-->
|
|
<form id='commentForm' role="form" method="post" class="form-inline pull-right">
|
|
<div class="content clearfix m-b">
|
|
<div class="form-group margin_right_sm">
|
|
<label>客服名称:</label>
|
|
<input type="text" class="form-control" id="user_name" name="user_name">
|
|
</div>
|
|
<div class="form-group">
|
|
<button class="btn btn-primary" type="button" data-type="reload" id="search">
|
|
<strong>搜 索</strong>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<table id="kfList" lay-filter="test" class="layui-hide"></table>
|
|
</div>
|
|
</div>
|
|
<script src="/static/admin/js/layui/layui.js"></script>
|
|
<script src="/static/common/tools.js"></script>
|
|
<script>
|
|
|
|
layui.use('table', function () {
|
|
let table = layui.table;
|
|
|
|
//第一个实例
|
|
table.render({
|
|
elem: '#kfList'
|
|
, url: '{:url("rate/getKfList")}' //数据接口
|
|
, where: {}
|
|
, page: true //开启分页
|
|
, limits: [20, 30, 40, 50]
|
|
, cols: [[ //表头
|
|
{ field: 'kf_id', title: '客服ID', minWidth: 90, sort: true, align: 'center', fixed: 'left' }
|
|
, { field: 'user_name', title: '客服名称', minWidth: 80, sort: true, align: 'center' }
|
|
, { field: 'rank_num', title: '评价次数', minWidth: 190, sort: true, align: 'center' }
|
|
, {
|
|
field: 'rank_num', title: '评价星级', minWidth: 160, sort: true, align: 'center',
|
|
templet: function (d) {
|
|
if (d.rank_num) {
|
|
let rate = '';
|
|
for (let i = 0; i < d.rank_num; i++) {
|
|
rate += '<i class="layui-icon layui-icon-rate-solid" style=" color: #ffa900"></i>';
|
|
}
|
|
return rate;
|
|
}
|
|
return '--';
|
|
}
|
|
}
|
|
, {
|
|
field: '', title: '操作', minWidth: 80, align: 'center',
|
|
templet: function (d) {
|
|
let url = 'javascript:void(0)';
|
|
if (d.rank_num) {
|
|
url = '/admin/rate/getRateList?kf_id=' + d.kf_id;
|
|
}
|
|
return '<a href="' + url + '" title="点击进入评价列表">详情</a>';
|
|
}
|
|
}
|
|
]]
|
|
, id: 'kfList'
|
|
});
|
|
|
|
var $ = layui.$, active = {
|
|
reload: function () {
|
|
let user_name = $('#user_name').val();
|
|
|
|
//执行重载
|
|
table.reload('kfList', {
|
|
page: {
|
|
curr: 1 //重新从第 1 页开始
|
|
}
|
|
, where: {
|
|
user_name: user_name
|
|
}
|
|
});
|
|
}
|
|
};
|
|
|
|
$('#search').on('click', function () {
|
|
var type = $(this).data('type');
|
|
active[type] ? active[type].call(this) : '';
|
|
});
|
|
});
|
|
|
|
</script>
|
|
</body>
|
|
|
|
</html> |