79 lines
3.6 KiB
Plaintext
79 lines
3.6 KiB
Plaintext
@using System.Collections.Generic
|
||
@using System.Web.UI.WebControls
|
||
@using WX.CRM.WebHelper;
|
||
@{
|
||
ViewBag.Title = "录音查询";
|
||
Layout = "~/Views/Shared/_Index_Layout2.cshtml";
|
||
}
|
||
<script src="~/Scripts/op/tablegrid.sort.js"></script>
|
||
<link href="~/Content/main.css" rel="stylesheet" />
|
||
<div>
|
||
@if (ViewBag.isBC)
|
||
{
|
||
<div class="mvctool">
|
||
@Html.ToolButton("btnQuery", "icon-search", "查询", true)
|
||
@Html.ToolButton("btnReport", "icon-group", "统计", true)
|
||
<input type="checkbox" id="cbrefresh" />自动刷新(10秒)
|
||
</div>
|
||
<div class="bas_datagrid">
|
||
<div id="tb" style="padding:5px;height:auto" class="grid_toolbar">
|
||
<ul class="toolBar_ul">
|
||
<li>@Html.Action("UserComBoxByRole", "Control", new { onLoadSucced = "onLoadSucced()", controlName = "nb1", roleCodes = ViewBag.roleCodes, saledeptid = ViewBag.saleDeptId, salegroupid = ViewBag.userGroupId, iseid = "0", inneruserid = "", currentRight = ViewBag.currentRight })</li>
|
||
<li>分机号:<input type="text" id="txtfjh" name="txtfjh" style="width:60px;" /></li>
|
||
</ul>
|
||
</div>
|
||
@Html.Raw(ViewBag.gridTable)
|
||
</div>
|
||
<script type="text/javascript">
|
||
//获取datagrid头部及字段
|
||
function getDataGridHeader() {
|
||
var columns = $('#tablist').tablegrid("getHead");
|
||
return columns;
|
||
}
|
||
function GetIframeHtml(src) {
|
||
return "<iframe width='100%' height='98%' scrolling='no' frameborder='0'' src='" + src + "'></iframe>";
|
||
}
|
||
function onLoadSucced() {
|
||
$('#tablist').tablegrid("Search");
|
||
}
|
||
$(function () {
|
||
$('#tablist').tablegrid({
|
||
url: '/CallRecord/Get_AgentMonitorListHtml?v3',
|
||
height: $(window).height() - 110,
|
||
loadNow: false,
|
||
data: GetControlValue,
|
||
onLoadError: function () {
|
||
$.messager.alert("警告", "数据加载失败!", "error");
|
||
}
|
||
});
|
||
function GetControlValue() {
|
||
return { saleDeptId: $("#nb1_uc_org_depts").val(), groupId: $("#nb1_uc_org_groups").val(), userId: $("#nb1_uc_org_ids").val(), fjh: $("#txtfjh").val() };
|
||
}
|
||
$("#btnQuery").click(function () {
|
||
$('#tablist').tablegrid("Search");
|
||
});
|
||
$("#btnReport").click(function () {
|
||
parent.ChildAddTab("监控统计", "/CallRecord/AgentMonitorReport", "");
|
||
});
|
||
$(window).resize(function () {//自动适应大小
|
||
$('#tablist').tablegrid('resize', {
|
||
height: $(window).height() - 110
|
||
});
|
||
});
|
||
$("#cbrefresh").bind("click", refleshagentlist);
|
||
function refleshagentlist() {
|
||
if ($("#cbrefresh").attr("checked") == "checked") {
|
||
//console.log("cbrefresh:" + $("#cbrefresh").attr("checked"));
|
||
$('#tablist').tablegrid("Load");
|
||
window.setTimeout(refleshagentlist, 10 * 1000);
|
||
}
|
||
}
|
||
});
|
||
</script>
|
||
}
|
||
else
|
||
{
|
||
<script type="text/javascript" src="@(ViewBag.CtiInterface.Replace("/api/","/app/"))?action=agentmonitor&username=singhead&extension=@(ViewBag.strFJH)&height=500"></script>
|
||
}
|
||
</div>
|