<div class="layui-side layui-bg-black">
	<div class="layui-side-scroll">
		<#include "/apps/service/include/left.html">
	</div>
</div>
<div class="layui-body">
	<div class="layui-side-scroll">
		<div class="row">
			<div class="col-lg-12">
				<h1 class="site-h1" style="border-top:1px solid #e6e6e6;">
					排队队列<#if agentUserList??>（${agentUserList.totalElements}）</#if>
				</h1>
				<table class="layui-table" lay-skin="line">
					<thead>
						<tr class="design-sortable-tr">
							<th>用户名</th>
							<th>接入渠道</th>
							<th>技能组</th>
							<th>地域</th>
							<th>接入时间</th>
							<th>等待时长</th>
							<th style="width:1%" nowrap="nowrap">操作</th>
						</tr>
					</thead>
					<tbody>
						<#if agentUserList?? && agentUserList.content?? && agentUserList.content?size gt 0>
						<#list agentUserList.content as agentUser>
						<tr class="tdHasContorllor design-dropable-td">
							<td class=" first_td_head">
								<a href="/service/online/index.html?userid=${agentUser.userid!''}&channel=${agentUser.channel!''}">
								${agentUser.username!''}
								</a>
							</td>
							<td>
								${agentUser.channel!''}
							</td>
							<td>${agentUser.skillname!''}</td>
							<td>${agentUser.region!''}</td>
							<td><#if agentUser.createtime??>${agentUser.createtime?string('yyyy-MM-dd HH:mm:ss')}</#if></td>
							<td>
								${(agentUser.waittingtime/(1000*60*60))?string('00')}:${((agentUser.waittingtime%(1000*60*60))/(1000*60))?string('00')}:${((agentUser.waittingtime%(1000*60))/(1000))?string('00')}
							</td>
							<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 class="kfont">&#xe62c;</i>
									转队列
								</a>
								<a href="/service/quene/invite.html?id=${agentUser.id!''}" data-toggle="tip" data-title="邀请对话会加入到您的对话列表中，请确认是否开始对话？" style="margin-left:10px;">
									<i class="kfont">&#xe609;</i>
									邀请对话
								</a>
								<a href="/service/trace.html?sessionid=${agentUser.sessionid!''}" title="查看访客轨迹" data-toggle="ajax" data-width="1050" style="margin-left:10px;">
									<i class="kfont">&#xe638;</i>轨迹
								</a>
							</td>
							
						</tr>
						</#list>
						<#else>
							<tr>
								<td colspan="20" style="height:400px;">
									<div class="ukefu-empty" style="background: none">
										<i class="layui-icon">&#xe63a;</i>
										<div style="">当前没有排队访客</div>
									</div>
								</td>
							</tr>
						</#if>
					</tbody>
				</table>

			</div>
		</div>
		<div class="row" style="padding:5px;">
			<div class="col-lg-12" id="page" style="text-align:center;"></div>
		</div>
	</div>
</div>

<script>
	layui.use(['laypage', 'layer'], function(){
		  var laypage = layui.laypage
		  ,layer = layui.layer;
		  
		  laypage({
				cont: 'page'
				,pages: <#if agentUserList??>${agentUserList.totalPages}<#else>0</#if> //总页数
				,curr:<#if agentUserList??>${agentUserList.number+1}<#else>0</#if>
				,groups: 5 //连续显示分页数
				,jump:function(data , first){
					if(!first){
						location.href = "/service/quene/index.html?p="+data.curr ;
					}
				}
		   });
		});
</script>

