|
|
@@ -1,17 +1,21 @@
|
|
|
function initCheck() {
|
|
|
addBreadMenu("/view/mytask/check.html", "视频稽查");
|
|
|
- $('#ex1').slider({tooltip: 'hide'});
|
|
|
- $("#ex1").on("slideStop", function(slideEvt) {
|
|
|
+
|
|
|
setVideoProcess(slideEvt.value);
|
|
|
});
|
|
|
|
|
|
+
|
|
|
+ $("#tabcontent").css("height", ($("#video_content").height() - 80) + "px");
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
event = document.createEvent('MessageEvent');
|
|
|
var origin = window.location.protocol + '//' + window.location.host;
|
|
|
- event.initMessageEvent('setvideoposition', true, true, getVideoPosition(), origin, 1234, window, null);
|
|
|
+ event.initMessageEvent('setvideoposition', true, true, getVideoPosition(null), origin, 1234, window, null);
|
|
|
document.dispatchEvent(event);
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
// 仅选择日期
|
|
|
$("#start-time").datetimepicker({
|
|
|
@@ -51,28 +55,121 @@ function initCheck() {
|
|
|
//查询评分情况
|
|
|
queryCheckScores();
|
|
|
//查询录像播放列表
|
|
|
- var videos = $.checkTask.video_id.split(',');
|
|
|
- if(videos[0]){
|
|
|
- curVideo = videos[0];
|
|
|
+ var videos = $.checkTask.video_id.split(',');
|
|
|
+ if (videos[0]) {
|
|
|
+ curVideo = videos[0];
|
|
|
queryVideoList();
|
|
|
- }else{
|
|
|
- callFunc("showvideoview", "false");
|
|
|
+ } else {
|
|
|
+ callFunc("showvideoview", "false");
|
|
|
layer.msg('该处暂无视屏!', {
|
|
|
- time: 2000, //20s后自动关闭
|
|
|
+ time: 2000, //20s后自动关闭
|
|
|
});
|
|
|
- callFunc("stop", "");
|
|
|
- }
|
|
|
+ callFunc("stop", "");
|
|
|
+ }
|
|
|
}
|
|
|
- $("select#video_list").change(function(){
|
|
|
+ $("select#video_list").change(function () {
|
|
|
playVideo($(this).val());
|
|
|
});
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+function setfastorslow(type, speed) {
|
|
|
+ if (type == 0) {
|
|
|
+ $("#fast_info").html("");
|
|
|
+ $("#slow_info").html("");
|
|
|
+ if ($("#full_fast_info")) {
|
|
|
+ $("#full_fast_info").html("");
|
|
|
+ $("#full_slow_info").html("");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (type == 1) {
|
|
|
+ $("#fast_info").html(speed + "x");
|
|
|
+ $("#slow_info").html("");
|
|
|
+ if ($("#full_fast_info")) {
|
|
|
+ $("#full_fast_info").html(speed + "x");
|
|
|
+ $("#full_slow_info").html("");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (type == 2) {
|
|
|
+ $("#slow_info").html(speed + "x");
|
|
|
+ $("#fast_info").html("");
|
|
|
+ if ($("#full_fast_info")) {
|
|
|
+ $("#full_fast_info").html("");
|
|
|
+ $("#full_slow_info").html(speed + "x");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+function normalscreen() {
|
|
|
+ if (layer_full) {
|
|
|
+ layer.close(layer_full)
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+var layer_full = null;
|
|
|
+
|
|
|
+function fullscreen() {
|
|
|
+ var height = window.innerWidth * 0.8 * 1 / 2.0 + 90
|
|
|
+
|
|
|
+ var contenthtml = ' <div class="tab-content" id="full_tabcontent" style="height:400px;text-align: center;background:black;">' +
|
|
|
+ ' <p style="padding-top:180px;font-size:20px">加载中...</p>' +
|
|
|
+ ' <!--<i class="icon icon-spin icon-spinner icon-5x" style="margin-top:100px"></i>-->' +
|
|
|
+ ' </div>' +
|
|
|
+ ' <div class="row" class="col-md-12" style="padding:5px 10px 5px 10px;text-align:center;margin:0px">' +
|
|
|
+ ' <input id="full_ex1" class="col-md-12" type="text" data-slider-min="0" data-slider-max="100" data-slider-step="1" data-slider-value="0"' +
|
|
|
+ ' />' +
|
|
|
+ ' </div>' +
|
|
|
+ ' <div class="row" style="padding:0px 5px 0px 5px;text-align:center;margin:0px">' +
|
|
|
+ ' <select class="form-control" id="full_video_list" style="width:200px;float:left;display:none;"></select>' +
|
|
|
+ ' <div class="btn-group" style="float:right;">' +
|
|
|
+ ' <button type="button" class="btn btn-info" onclick="doAction(\'start\')"><i class="icon icon-play-circle icon-2x"></i></button>' +
|
|
|
+ ' <button type="button" class="btn btn-info" onclick="doAction(\'stop\')"><i class="icon icon-pause icon-2x"></i></button>' +
|
|
|
+ ' <button type="button" class="btn btn-info" onclick="doAction(\'fast\')"><i class="icon icon-forward icon-2x"></i><span id=\"full_fast_info\"></span></button>' +
|
|
|
+ ' <button type="button" class="btn btn-info" onclick="doAction(\'slow\')"><span id=\"full_slow_info\"></span><i class="icon icon-backward icon-2x"></i></button>' +
|
|
|
+ ' <button type="button" class="btn btn-success" onclick="doAction(\'screenshot\')"><i class="icon icon-camera icon-2x"></i></button>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </div>';
|
|
|
+
|
|
|
+
|
|
|
+ layer_full = layer.open({
|
|
|
+ area: ['80%', height + "px"],
|
|
|
+ type: 1,
|
|
|
+ title: false,
|
|
|
+ anim: -1,
|
|
|
+ closeBtn: 0,
|
|
|
+ shadeClose: false,
|
|
|
+ content: "<div id='layer_content' >" + contenthtml + "</div>",
|
|
|
+ success: function (layero, index) {
|
|
|
+
|
|
|
+ $('#full_ex1').slider({ tooltip: 'hide' });
|
|
|
+ $("#full_ex1").on("slideStop", function (slideEvt) {
|
|
|
+ setVideoProcess(slideEvt.value);
|
|
|
+ });
|
|
|
+ $("#full_ex1").val($("#ex1").value)
|
|
|
+ $("#full_ex1").slider({ step: 5, min: 0, max: maxVV });
|
|
|
+
|
|
|
+
|
|
|
+ $("#full_fast_info").html($("#fast_info").html());
|
|
|
+ $("#full_slow_info").html($("#slow_info").html());
|
|
|
+
|
|
|
+
|
|
|
+ $("#full_tabcontent").css("height", (height - 90) + "px");
|
|
|
+ $("#full_tabcontent").css("width", "100%");
|
|
|
+ setTimeout(function () {
|
|
|
+ callFunc("setvideoposition", getVideoPosition($("#full_tabcontent")))
|
|
|
+ }, 800)
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
}
|
|
|
|
|
|
function initInfo() {
|
|
|
|
|
|
}
|
|
|
-function initCheckAppealBtns(){
|
|
|
- if($.checkTask.appeal) {
|
|
|
+function initCheckAppealBtns() {
|
|
|
+ if ($.checkTask.appeal) {
|
|
|
$("#btn_appeal_task").show();
|
|
|
$("#btn_task").hide();
|
|
|
$("#appeal_div").show();
|
|
|
@@ -86,13 +183,13 @@ function initCheckAppealBtns(){
|
|
|
closeBtn: 1,
|
|
|
shade: false,
|
|
|
shadeClose: true,
|
|
|
- offset:'rb',
|
|
|
+ offset: 'rb',
|
|
|
content: $('#appeal_div'), //捕获的元素,注意:最好该指定的元素要存放在body最外层,否则可能被其它的相对元素所影响
|
|
|
- yes: function(index){
|
|
|
+ yes: function (index) {
|
|
|
layer.close(index);
|
|
|
}
|
|
|
});
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
$("#appeal_div").hide();
|
|
|
$("#btn_appeal_task").hide();
|
|
|
$("#btn_task").show();
|
|
|
@@ -101,7 +198,7 @@ function initCheckAppealBtns(){
|
|
|
// 使用data参数更新数据:
|
|
|
function queryCheckScores() {
|
|
|
//$('#score_datatable').score_datatable("");
|
|
|
- console.log("任务id:"+$.checkTask.id);
|
|
|
+ console.log("任务id:" + $.checkTask.id);
|
|
|
var data = {
|
|
|
"task_id": $.checkTask.id
|
|
|
}
|
|
|
@@ -141,8 +238,8 @@ function showEditCheckScore(id) {
|
|
|
editScoreId = id;
|
|
|
}
|
|
|
var editScoreId;
|
|
|
-function saveEdit(){
|
|
|
- if(editScoreId) {
|
|
|
+function saveEdit() {
|
|
|
+ if (editScoreId) {
|
|
|
var imgArr = $("#img_container .pic-class");
|
|
|
var picsStr = "";
|
|
|
if (imgArr && imgArr.length > 0) {
|
|
|
@@ -154,7 +251,7 @@ function saveEdit(){
|
|
|
var param = {
|
|
|
'id': editScoreId,
|
|
|
'pics': picsStr
|
|
|
- };
|
|
|
+ };
|
|
|
editScoreId = null;
|
|
|
$("#saveEditBtn").hide();
|
|
|
no_return_common_service("/score/update", param, function (data) {
|
|
|
@@ -172,16 +269,16 @@ function deleteCheckScore(id) {
|
|
|
deleteItem4Common(id, "/score/delete/", queryCheckScores, 'r');
|
|
|
}
|
|
|
|
|
|
-function setVideoList(videos){
|
|
|
+function setVideoList(videos) {
|
|
|
var videoArr;
|
|
|
- if(videos){
|
|
|
+ if (videos) {
|
|
|
videoArr = videos.split("|");
|
|
|
- var selectStr="";
|
|
|
- for(var i in videoArr){
|
|
|
- if(i==0)
|
|
|
- selectStr += '<option value="'+videoArr[i]+'" selected="selected">视频'+(videoArr[i]+1)+'</option>'
|
|
|
+ var selectStr = "";
|
|
|
+ for (var i in videoArr) {
|
|
|
+ if (i == 0)
|
|
|
+ selectStr += '<option value="' + videoArr[i] + '" selected="selected">视频' + (videoArr[i] + 1) + '</option>'
|
|
|
else
|
|
|
- selectStr += '<option value="'+videoArr[i]+'">视频'+(videoArr[i]+1)+'</option>';
|
|
|
+ selectStr += '<option value="' + videoArr[i] + '">视频' + (videoArr[i] + 1) + '</option>';
|
|
|
}
|
|
|
}
|
|
|
$('#video_list').html(selectStr);
|
|
|
@@ -189,13 +286,13 @@ function setVideoList(videos){
|
|
|
|
|
|
function addPic(pic) {
|
|
|
if (pic) {
|
|
|
- var i=0;
|
|
|
+ var i = 0;
|
|
|
// var imgArr = $("#img_container .pic-class");
|
|
|
// if(imgArr && imgArr.length>0) i = imgArr.length;
|
|
|
-
|
|
|
- if(pic.startWith("http"))
|
|
|
- pic= pic.replace(base_image_server_url,"/");
|
|
|
-
|
|
|
+
|
|
|
+ if (pic.startWith("http"))
|
|
|
+ pic = pic.replace(base_image_server_url, "/");
|
|
|
+
|
|
|
var picStr = genPicstr(pic);
|
|
|
$('#img_container').append(picStr);
|
|
|
$('a.lightbox-toggle').lightbox();
|
|
|
@@ -213,27 +310,27 @@ function showPics(pics, divId) {
|
|
|
picStr += pic;
|
|
|
}
|
|
|
$(divId).html(picStr);
|
|
|
- $('a.lightbox-toggle').lightbox();
|
|
|
+ $('a.lightbox-toggle').lightbox();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-function genPicstr(imgSrc){
|
|
|
+function genPicstr(imgSrc) {
|
|
|
var src = imgSrc;
|
|
|
- if(!src.startWith("http"))
|
|
|
- src= base_image_server_url+src;
|
|
|
+ if (!src.startWith("http"))
|
|
|
+ src = base_image_server_url + src;
|
|
|
var pic = '<div class="img_item" style="width:100px;height:90px;float:left;">'
|
|
|
- + '<a href="javascript:void(0)" onclick="removeImg(this)" style="float:right;position:relative;z-index:100;"><span class="label label-danger"><i class="icon icon-remove-circle"></i> 删除</span></a>'
|
|
|
- + '<a class="card lightbox-toggle" data-group="image-group-1" data-lightbox-group="example-3" href="' + src + '" style="position:absolute">'
|
|
|
- + '<img class="pic-class img-thumbnail" path="'+imgSrc+'" style="width:100px;height:70px;" src="' + src + '" alt="">'
|
|
|
- + '</a>'
|
|
|
- + '</div>';
|
|
|
- if(ISCLIENT) {
|
|
|
+ + '<a href="javascript:void(0)" onclick="removeImg(this)" style="float:right;position:relative;z-index:100;"><span class="label label-danger"><i class="icon icon-remove-circle"></i> 删除</span></a>'
|
|
|
+ + '<a class="card lightbox-toggle" data-group="image-group-1" data-lightbox-group="example-3" href="' + src + '" style="position:absolute">'
|
|
|
+ + '<img class="pic-class img-thumbnail" path="' + imgSrc + '" style="width:100px;height:70px;" src="' + src + '" alt="">'
|
|
|
+ + '</a>'
|
|
|
+ + '</div>';
|
|
|
+ if (ISCLIENT) {
|
|
|
pic = '<div class="img_item" style="width:100px;height:90px;float:left;">'
|
|
|
- + '<a href="javascript:void(0)" onclick="removeImg(this)" style="float:right;position:relative;z-index:100;"><span class="label label-danger"><i class="icon icon-remove-circle"></i> 删除</span></a>'
|
|
|
- + '<a class="card" onclick="showClientImg(\''+src +'\')" href="javascript:void(0)" style="position:absolute">'
|
|
|
- + '<img class="pic-class img-thumbnail" path="'+imgSrc+'" style="width:100px;height:70px;" src="' + src + '" alt="">'
|
|
|
- + '</a>'
|
|
|
- + '</div>';
|
|
|
+ + '<a href="javascript:void(0)" onclick="removeImg(this)" style="float:right;position:relative;z-index:100;"><span class="label label-danger"><i class="icon icon-remove-circle"></i> 删除</span></a>'
|
|
|
+ + '<a class="card" onclick="showClientImg(\'' + src + '\')" href="javascript:void(0)" style="position:absolute">'
|
|
|
+ + '<img class="pic-class img-thumbnail" path="' + imgSrc + '" style="width:100px;height:70px;" src="' + src + '" alt="">'
|
|
|
+ + '</a>'
|
|
|
+ + '</div>';
|
|
|
}
|
|
|
return pic;
|
|
|
}
|
|
|
@@ -250,23 +347,23 @@ function showChangeUser() {
|
|
|
var param = {
|
|
|
'organid': $.checkTask.checked_dept
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
post_common_service("/user/getUserList/", param, function (data) {
|
|
|
- changePersonLayer = showPopup4Common('更改人员', null, ['550px','600px'],null,'r');
|
|
|
+ changePersonLayer = showPopup4Common('更改人员', null, ['550px', '600px'], null, 'r');
|
|
|
$("#user_container").empty();
|
|
|
var userStr = "";
|
|
|
for (var i in data) {
|
|
|
var name = data[i].truename;
|
|
|
- if (data[i].workno) name = name+" "+data[i].workno.substr(data[i].workno.length-3);
|
|
|
+ if (data[i].workno) name = name + " " + data[i].workno.substr(data[i].workno.length - 3);
|
|
|
var pic = "../../images/body-bg.png";
|
|
|
- if (data[i].pic) pic = base_image_server_url+data[i].pic;
|
|
|
+ if (data[i].pic) pic = base_image_server_url + data[i].pic;
|
|
|
str = '<div style="width:90px;float:left;margin:5px;">'
|
|
|
- + '<a class="card" href="javascript:void(0)" onclick="showBigImg(\'' + pic+ '\')">'
|
|
|
+ + '<a class="card" href="javascript:void(0)" onclick="showBigImg(\'' + pic + '\')">'
|
|
|
+ '<img src="' + pic + '" alt="" style="height:100px;width:90px;">'
|
|
|
+ '<div class="card-heading"><strong>' + name + '</strong></div>'
|
|
|
+ '<div class="card-actions">'
|
|
|
- + '<button type="button" class="btn btn-mini btn-danger" onclick="changePerson(\'' + data[i].id + '\')">选择</button>'
|
|
|
- + '</div>'
|
|
|
+ + '<button type="button" class="btn btn-mini btn-danger" onclick="changePerson(\'' + data[i].id + '\')">选择</button>'
|
|
|
+ + '</div>'
|
|
|
+ '</a>'
|
|
|
+ '</div>';
|
|
|
userStr += str;
|
|
|
@@ -277,23 +374,24 @@ function showChangeUser() {
|
|
|
|
|
|
function changePerson(id) {
|
|
|
// $('#checked_person').html(id);
|
|
|
- var param = {"id": $.checkTask.id,
|
|
|
- "checked_person": id,
|
|
|
- }
|
|
|
- no_return_common_service("task/update/", param, function(data) {
|
|
|
+ var param = {
|
|
|
+ "id": $.checkTask.id,
|
|
|
+ "checked_person": id,
|
|
|
+ }
|
|
|
+ no_return_common_service("task/update/", param, function (data) {
|
|
|
get_common_service('user/getUserById/' + id, null, function (data) {
|
|
|
- changePersonContent(data);
|
|
|
- })
|
|
|
- layer.close(changePersonLayer);
|
|
|
- }, function(error) {
|
|
|
+ changePersonContent(data);
|
|
|
+ })
|
|
|
+ layer.close(changePersonLayer);
|
|
|
+ }, function (error) {
|
|
|
alert(error);
|
|
|
- });
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
-function showBigImg(src){
|
|
|
- $('#userBigImg').attr("src",src);
|
|
|
+function showBigImg(src) {
|
|
|
+ $('#userBigImg').attr("src", src);
|
|
|
layer.open({
|
|
|
- offset:'r',
|
|
|
+ offset: 'r',
|
|
|
type: 1,
|
|
|
title: false,
|
|
|
closeBtn: 1,
|
|
|
@@ -307,8 +405,8 @@ function showBigImg(src){
|
|
|
function resetUserImgInfo() {
|
|
|
$("#user_img_container").empty();
|
|
|
var str = '<a id="person_img" href="../../images/img4.jpg" class="lightbox-toggle">'
|
|
|
- +'<img src="../../images/img4.jpg" class="img-thumbnail" style="width:50px;height:50px;margin-top:-10px;"></a>'
|
|
|
- + '<label id="checked_person"></label>';
|
|
|
+ + '<img src="../../images/img4.jpg" class="img-thumbnail" style="width:50px;height:50px;margin-top:-10px;"></a>'
|
|
|
+ + '<label id="checked_person"></label>';
|
|
|
$("#user_img_container").html(str);
|
|
|
}
|
|
|
function changePersonContent(data) {
|
|
|
@@ -316,24 +414,24 @@ function changePersonContent(data) {
|
|
|
var name = data.truename;
|
|
|
if (data.workno) name = data.workno + " " + data.truename;
|
|
|
$("#checked_person").html(name);
|
|
|
- var imgSrc = base_image_server_url+data.pic;
|
|
|
+ var imgSrc = base_image_server_url + data.pic;
|
|
|
$("#person_img > img").attr("src", imgSrc);
|
|
|
- if(ISCLIENT) {
|
|
|
+ if (ISCLIENT) {
|
|
|
$("#person_img").attr("href", "javascript:void(0)");
|
|
|
$("#person_img").removeClass("lightbox-toggle");
|
|
|
- $("#person_img").click(function(){
|
|
|
+ $("#person_img").click(function () {
|
|
|
showClientImg(imgSrc);
|
|
|
});
|
|
|
$("#person_img > img").attr("src", imgSrc);
|
|
|
return;
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
$("#person_img").attr("href", imgSrc);
|
|
|
$('a.lightbox-toggle').lightbox();
|
|
|
}
|
|
|
}
|
|
|
var scoreLayer;
|
|
|
function showScore() {
|
|
|
- scoreLayer = showPopup4Common('选择考核项', null, ['400px', '500px'], '#items-div','r');
|
|
|
+ scoreLayer = showPopup4Common('选择考核项', null, ['400px', '500px'], '#items-div', 'r');
|
|
|
buildTree();
|
|
|
}
|
|
|
function buildTree() {
|
|
|
@@ -441,7 +539,7 @@ function zTreeOnClick(event, treeId, treeNode) {
|
|
|
'task_id': $.checkTask.id,
|
|
|
'pics': picsStr,
|
|
|
'name': treeNode.value,
|
|
|
- 'check_item_score':treeNode.score,
|
|
|
+ 'check_item_score': treeNode.score,
|
|
|
'content': treeNode.value,
|
|
|
'check_item_id': treeNode.id,
|
|
|
'checkman': treeNode.id,
|
|
|
@@ -481,7 +579,7 @@ function showPre(id) {
|
|
|
function showInvalid() {
|
|
|
invalidLayer = showPopup4Common('申请无效', function () {
|
|
|
saveValidReason();
|
|
|
- }, ['400px', '500px'], '#invalid_div','r');
|
|
|
+ }, ['400px', '500px'], '#invalid_div', 'r');
|
|
|
|
|
|
}
|
|
|
function submitCheck4Appeal() {
|
|
|
@@ -532,14 +630,15 @@ function agreeApply() {
|
|
|
}
|
|
|
|
|
|
|
|
|
-function getVideoPosition() {
|
|
|
- var X = $('#tabcontent').offset().top;
|
|
|
- var Y = $('#tabcontent').offset().left;
|
|
|
- var width = $('#tabcontent').width();
|
|
|
- var height = $('#tabcontent').height();
|
|
|
+function getVideoPosition(obj) {
|
|
|
+ if (obj == null) obj = $('#tabcontent');
|
|
|
+ var X = obj.offset().top;
|
|
|
+ var Y = obj.offset().left;
|
|
|
+ var width = obj.width();
|
|
|
+ var height = obj.height();
|
|
|
return parseInt(Y) + "|" + parseInt(X) + "|" + parseInt(width) + "|" + parseInt(height);
|
|
|
}
|
|
|
-function initUpLoad(){
|
|
|
+function initUpLoad() {
|
|
|
|
|
|
var uploader = WebUploader.create({
|
|
|
|
|
|
@@ -547,7 +646,7 @@ function initUpLoad(){
|
|
|
swf: 'lib/webuploader/js/Uploader.swf',
|
|
|
|
|
|
// 文件接收服务端。
|
|
|
- server: base_image_server_url+'/filesSrver/'+FILE_UPLOAD,
|
|
|
+ server: base_image_server_url + '/filesSrver/' + FILE_UPLOAD,
|
|
|
|
|
|
// 选择文件的按钮。可选。
|
|
|
// 内部根据当前运行是创建,可能是input元素,也可能是flash.
|