ComplianceServer/oldcode/WEB/Views/WeiXin/MyIllegalRecord/RecodeIllegal.cshtml

179 lines
8.9 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@using WX.CRM.WebHelper;
@{
ViewBag.Title = "我的违规记录";
Layout = "~/Views/Shared/_Index_Layout2.cshtml";
}
<div class="mvctool">
@Html.ToolButton("btnQuery", "icon-search", "查询", true)
@Html.Action("ToolBar", "Control", ViewBag.ToolBar as ToolBar)
</div>
<div class="bas_datagrid">
<div id="tb" style="padding:5px;height:auto" class="grid_toolbar">
<ul class="toolBar_ul">
<li>
类型:
<select name="slt_ntype" id="slt_ntype" onchange="ChangeSlt()">
<option value="1">微信记录违规</option>
<option value="2" selected="selected">录音违规</option>
<option value="3">企业微信</option>
</select>
</li>
<li>违规提交时间:@Html.WdatePickerText("txt_stime", new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).ToString("yyyy-MM-dd"))~@Html.WdatePickerText("txt_etime", DateTime.Now.ToString("yyyy-MM-dd"))</li>
</ul>
</div>
@Html.Raw(ViewBag.gridTable)
</div>
<div id="recordPlayerWin"></div>
<script>
$(function () {
$('#tablist').tablegrid({
url: '/WeiXin/MyIllegalRecord/RecodeGetHtmlList',
height: $(window).height() - 110,
loadNow: true
});
$("#btnQuery").click(function () {//搜索按钮点击事件
$('#tablist').tablegrid("Search");
});
$(window).resize(function () {//自动适应大小
$('#tablist').tablegrid('resize', {
height: $(window).height() - 110
});
});
});
function frameReturnByClose() {
$("#modalwindow").window('close');
}
function frameReturnByReload(flag) {
$("#tablist").tablegrid("Load");
}
function frameReturnByMes(mes) {
$.messageBox5s('提示', mes);
}
function ChangeSlt() {
if ($("#slt_ntype").val() == "1") {
window.location.href = "/WeiXin/MyIllegalRecord/MesageIllegal?urlTitle=" + encodeURI("我的违规记录--微信违规");
}
else if ($("#slt_ntype").val() == "2") {
window.location.href = "/WeiXin/MyIllegalRecord/RecodeIllegal?urlTitle=" + encodeURI("我的违规记录--录音违规");
}
else if ($("#slt_ntype").val() == "3") {
window.location.href = "/WeiXin/MyIllegalRecord/QWllegal?urlTitle=" + encodeURI("我的违规记录--企业微信违规");
}
}
</script>
@*ToolBar事件处理*@
<script type="text/javascript">
function GetIframeHtml(src) {
return "<iframe width='100%' height='98%' scrolling='no' frameborder='0'' src='" + src + "'></iframe>";
}
function PalyRecord(url, objDiv, ctiver) {
$('#recordPlayerWin').window({
title: '播放录音', width: 330, height: 180, iconCls: 'icon-add', shadow: true,
modal: true,
closed: true,
minimizable: false,
maximizable: false,
collapsible: false,
onBeforeClose: function () { //当面板关闭之前触发的事件
//document.getElementById("Player").stop();
}
}).window('open');
if (ctiver == "@(((int)WX.CRM.Model.Enum.CTI_VER.深海捷固定坐席).ToString())"
|| ctiver == "@(((int)WX.CRM.Model.Enum.CTI_VER.艾讯).ToString())"
|| ctiver == "@(((int)WX.CRM.Model.Enum.CTI_VER.艾讯new).ToString())"
) {
var isChrome = window.navigator.userAgent.indexOf("Chrome") !== -1
if (isChrome) {
$('#recordPlayerWin').html("<video controls=\"\" src=\"" + url + "\" style=\"width:300px; height:50px;\" autoplay=\"autoplay\" />");
}
else {
$('#recordPlayerWin').html('<object id="Player" width="300" height="50" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject"hspace="5"><param name="AutoRewind" value="1"><param name="FileName" value="' + url + '"><param name="ShowControls" value="1"><param name="ShowPositionControls" value="0"><param name="ShowAudioControls" value="1"><param name="ShowTracker" value="1"><param name="ShowDisplay" value="0"><param name="ShowStatusBar" value="0"><param name="ShowGotoBar" value="0"><param name="ShowCaptioning" value="0"><param name="AutoStart" value="1"><param name="Volume" value="5000"><param name="AnimationAtStart" value="0"><param name="TransparentAtStart" value="0"><param name="AllowChangeDisplaySize" value="0"><param name="AllowScan" value="0"><param name="EnableContextMenu" value="0"><param name="ClickToPlay" value="1"> </object>');
}
}
else {
$.ajax({
url: url + "&jsoncallback=?",
success: function (recordurl) {
$('#recordPlayerWin').html('<object id="Player" width="300" height="50" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject"hspace="5"><param name="AutoRewind" value="1"><param name="FileName" value="' + recordurl + '"><param name="ShowControls" value="1"><param name="ShowPositionControls" value="0"><param name="ShowAudioControls" value="1"><param name="ShowTracker" value="1"><param name="ShowDisplay" value="0"><param name="ShowStatusBar" value="0"><param name="ShowGotoBar" value="0"><param name="ShowCaptioning" value="0"><param name="AutoStart" value="1"><param name="Volume" value="5000"><param name="AnimationAtStart" value="0"><param name="TransparentAtStart" value="0"><param name="AllowChangeDisplaySize" value="0"><param name="AllowScan" value="0"><param name="EnableContextMenu" value="0"><param name="ClickToPlay" value="1"> </object>');
},
error: function () {
$.messager.alert("错误", "获取录音地址出错!", "error");
},
dataType: 'json'
});
}
}
function StopRecord(objDiv) {
try {
//document.getElementById("Player").stop();
} catch (e) {
}
$('#' + objDiv).hide();
$('#' + objDiv).html('');
}
function getExt(importUrl) {
var d = /\.[^\.]+$/.exec(importUrl);
return d;
}
//录音下载(在新窗口打开,不能另存,直接打开播放)
function CallRecord_Download1() {
var row = $('#tablist').tablegrid('getSelected');
if (row != null) {
var r = $("#tablist .tr_onclick #hidRecordUrl");
var url = r.val();
window.open(url);
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
}
//录音下载(通过action可以完美另存为)
function CallRecord_Download2() {
var row = $('#tablist').tablegrid('getSelected');
if (row != null) {
var r = $("#tablist .tr_onclick #hidRecordUrl");
var url = r.val();
var FILENAME = row.PKID + getExt(url);
var urlPost = "/CSVR/CallRecord/CallRecordDownload";
var data = "url=" + url + "&filename=" + FILENAME;
var method = null;
filedown(urlPost, data, method);
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
}
function CallRecord_Download() {
var row = $('#tablist').tablegrid('getSelected');
if (row != null) {
var r = $("#tablist .tr_onclick #hidRecordUrl");
var url = r.val();
var FILENAME = row.PKID + getExt(url);
var isChrome = window.navigator.userAgent.indexOf("Chrome") !== -1
if (isChrome)
filedown2(url, FILENAME);
else
window.open(url);
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
}
function filedown(urlPost, data, method) {
if (urlPost && data) {
// data 是 string 或者 array/object
data = typeof data == 'string' ? data : jQuery.param(data);
var inputs = '';
jQuery.each(data.split('&'), function () {
var pair = this.split('=');
inputs += '<input type="hidden" name="' + pair[0] + '" value="' + pair[1] + '"/>';
});
jQuery('<form action="' + urlPost + '" method="' + (method || 'post') + '">' + inputs + '</form>').appendTo('body').submit().remove();
}
}
function filedown2(url, filename) {
//alert(url); alert(filename);
var contentType = 'application/octet-stream';
var a = document.createElement('a');
a.href = url;
a.download = filename;
a.click();
}
</script>