check.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660
  1. function initCheck() {
  2. addBreadMenu("/view/mytask/check.html", "视频稽查");
  3. $('#ex1').slider({ tooltip: 'hide' });
  4. $("#ex1").on("slideStop", function (slideEvt) {
  5. setVideoProcess(slideEvt.value);
  6. });
  7. $("#tabcontent").css("height", ($("#video_content").height() - 80) + "px");
  8. event = document.createEvent('MessageEvent');
  9. var origin = window.location.protocol + '//' + window.location.host;
  10. event.initMessageEvent('setvideoposition', true, true, getVideoPosition(null), origin, 1234, window, null);
  11. document.dispatchEvent(event);
  12. // 仅选择日期
  13. $("#start-time").datetimepicker({
  14. language: "zh-CN",
  15. weekStart: 1,
  16. todayBtn: 1,
  17. autoclose: 1,
  18. todayHighlight: 1,
  19. startView: 2,
  20. minView: 2,
  21. forceParse: 0,
  22. format: "yyyy-mm-dd"
  23. });
  24. // 仅选择日期
  25. $("#end-time").datetimepicker({
  26. language: "zh-CN",
  27. weekStart: 1,
  28. todayBtn: 1,
  29. autoclose: 1,
  30. todayHighlight: 1,
  31. startView: 2,
  32. minView: 2,
  33. forceParse: 0,
  34. format: "yyyy-mm-dd"
  35. });
  36. if ($.checkTask) {
  37. initCheckAppealBtns();
  38. setFeSelect("#fsList", $.checkTask.checked_dept);
  39. // $("#fsList").on("change",function(){
  40. // $.checkTask.checked_dept = this.value;
  41. // })
  42. $("#lane").val($.checkTask.checked_location);
  43. // setLaneSelect("#lane", $.checkTask.checked_location);
  44. get_common_service('user/getUserById/' + $.checkTask.checked_person, null, function (data) {
  45. changePersonContent(data);
  46. })
  47. //查询评分情况
  48. queryCheckScores();
  49. //查询录像播放列表
  50. var videos = $.checkTask.video_id.split(',');
  51. if (videos[0]) {
  52. curVideo = videos[0];
  53. queryVideoList();
  54. } else {
  55. callFunc("showvideoview", "false");
  56. layer.msg('该处暂无视屏!', {
  57. time: 2000, //20s后自动关闭
  58. });
  59. callFunc("stop", "");
  60. }
  61. }
  62. $("select#video_list").change(function () {
  63. playVideo($(this).val());
  64. });
  65. }
  66. function setfastorslow(type, speed) {
  67. if (type == 0) {
  68. $("#fast_info").html("");
  69. $("#slow_info").html("");
  70. if ($("#full_fast_info")) {
  71. $("#full_fast_info").html("");
  72. $("#full_slow_info").html("");
  73. }
  74. }
  75. if (type == 1) {
  76. $("#fast_info").html(speed + "x");
  77. $("#slow_info").html("");
  78. if ($("#full_fast_info")) {
  79. $("#full_fast_info").html(speed + "x");
  80. $("#full_slow_info").html("");
  81. }
  82. }
  83. if (type == 2) {
  84. $("#slow_info").html(speed + "x");
  85. $("#fast_info").html("");
  86. if ($("#full_fast_info")) {
  87. $("#full_fast_info").html("");
  88. $("#full_slow_info").html(speed + "x");
  89. }
  90. }
  91. }
  92. function normalscreen() {
  93. if (layer_full) {
  94. layer.close(layer_full)
  95. }
  96. }
  97. var layer_full = null;
  98. function fullscreen() {
  99. var height = window.innerWidth * 0.8 * 1 / 2.0 + 90
  100. var contenthtml = ' <div class="tab-content" id="full_tabcontent" style="height:400px;text-align: center;background:black;">' +
  101. ' <p style="padding-top:180px;font-size:20px">加载中...</p>' +
  102. ' <!--<i class="icon icon-spin icon-spinner icon-5x" style="margin-top:100px"></i>-->' +
  103. ' </div>' +
  104. ' <div class="row" class="col-md-12" style="padding:5px 10px 5px 10px;text-align:center;margin:0px">' +
  105. ' <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"' +
  106. ' />' +
  107. ' </div>' +
  108. ' <div class="row" style="padding:0px 5px 0px 5px;text-align:center;margin:0px">' +
  109. ' <select class="form-control" id="full_video_list" style="width:200px;float:left;display:none;"></select>' +
  110. ' <div class="btn-group" style="float:right;">' +
  111. ' <button type="button" class="btn btn-info" onclick="doAction(\'start\')"><i class="icon icon-play-circle icon-2x"></i></button>' +
  112. ' <button type="button" class="btn btn-info" onclick="doAction(\'stop\')"><i class="icon icon-pause icon-2x"></i></button>' +
  113. ' <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>' +
  114. ' <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>' +
  115. ' <button type="button" class="btn btn-success" onclick="doAction(\'screenshot\')"><i class="icon icon-camera icon-2x"></i></button>' +
  116. ' </div>' +
  117. ' </div>';
  118. layer_full = layer.open({
  119. area: ['80%', height + "px"],
  120. type: 1,
  121. title: false,
  122. anim: -1,
  123. closeBtn: 0,
  124. shadeClose: false,
  125. content: "<div id='layer_content' >" + contenthtml + "</div>",
  126. success: function (layero, index) {
  127. $('#full_ex1').slider({ tooltip: 'hide' });
  128. $("#full_ex1").on("slideStop", function (slideEvt) {
  129. setVideoProcess(slideEvt.value);
  130. });
  131. $("#full_ex1").val($("#ex1").value)
  132. $("#full_ex1").slider({ step: 5, min: 0, max: maxVV });
  133. $("#full_fast_info").html($("#fast_info").html());
  134. $("#full_slow_info").html($("#slow_info").html());
  135. $("#full_tabcontent").css("height", (height - 90) + "px");
  136. $("#full_tabcontent").css("width", "100%");
  137. setTimeout(function () {
  138. callFunc("setvideoposition", getVideoPosition($("#full_tabcontent")))
  139. }, 800)
  140. }
  141. });
  142. }
  143. function initInfo() {
  144. }
  145. function initCheckAppealBtns() {
  146. if ($.checkTask.appeal) {
  147. $("#btn_appeal_task").show();
  148. $("#btn_task").hide();
  149. $("#appeal_div").show();
  150. $("#appeal_time").html($.checkTask.appeal.appeal_time);
  151. $("#appeal_reason").html($.checkTask.appeal.appeal_reason);
  152. $("#appeal_file_list").html(genAppeaFiles($.checkTask.appeal.file_src));
  153. layer.open({
  154. type: 1,
  155. title: "申诉详情",
  156. closeBtn: 1,
  157. shade: false,
  158. shadeClose: true,
  159. offset: 'rb',
  160. content: $('#appeal_div'), //捕获的元素,注意:最好该指定的元素要存放在body最外层,否则可能被其它的相对元素所影响
  161. yes: function (index) {
  162. layer.close(index);
  163. }
  164. });
  165. } else {
  166. $("#appeal_div").hide();
  167. $("#btn_appeal_task").hide();
  168. $("#btn_task").show();
  169. }
  170. }
  171. // 使用data参数更新数据:
  172. function queryCheckScores() {
  173. //$('#score_datatable').score_datatable("");
  174. console.log("任务id:" + $.checkTask.id);
  175. var data = {
  176. "task_id": $.checkTask.id
  177. }
  178. // alert("ff");
  179. var cols = [
  180. { width: 80, text: '序号', type: 'number', flex: true, colClass: 'text-center', field: 'num' },
  181. { width: 160, text: '评分记录', type: 'string', flex: true, sort: 'down', field: 'content' },
  182. { width: 80, text: '分数', type: 'string', flex: true, colClass: '', field: 'check_item_score' },
  183. // {width: 80, text: '图片', type: 'imagedd', flex: true, colClass: '',field: 'pics'},
  184. {
  185. width: 160, text: '操作', type: 'string', flex: true, field: 'id',
  186. oper: [
  187. { func: 'showEditCheckScore', text: '修改', icon_class: 'icon-edit' },
  188. { func: 'deleteCheckScore', text: '删除', icon_class: 'icon-remove-circle' }
  189. ]
  190. }
  191. ];
  192. // var pager = {
  193. // page_size:10
  194. // }
  195. $('#score_datatable').mytable({
  196. 'cols': cols,
  197. 'url': "/score/getScoreList/",
  198. 'param': data
  199. }
  200. );
  201. }
  202. function showEditCheckScore(id) {
  203. // deleteItem4Common(id,"/score/delete/",queryCheckScores);
  204. var rowData = getItemByIdFromArr(id, $('#score_datatable').mytable('getTableData'));
  205. // scoreDetailLayer = showPopup4Common('修改考核项',null,['600px','500px'],'#score-detail-div');
  206. // var rowData=getItemByIdFromArr(id,$('#score_datatable').mytable('getTableData'));
  207. showPics(rowData.pics);
  208. // $("#scoreContent").val(rowData.content);
  209. $("#saveEditBtn").show();
  210. editScoreId = id;
  211. }
  212. var editScoreId;
  213. function saveEdit() {
  214. if (editScoreId) {
  215. var imgArr = $("#img_container .pic-class");
  216. var picsStr = "";
  217. if (imgArr && imgArr.length > 0) {
  218. for (var i = 0; i < imgArr.length; i++) {
  219. picsStr += imgArr[i].src + ","
  220. }
  221. picsStr = picsStr.substr(0, picsStr.length - 1);
  222. }
  223. var param = {
  224. 'id': editScoreId,
  225. 'pics': picsStr
  226. };
  227. editScoreId = null;
  228. $("#saveEditBtn").hide();
  229. no_return_common_service("/score/update", param, function (data) {
  230. if (scoreLayer) layer.close(scoreLayer);
  231. //查询评分情况
  232. queryCheckScores();
  233. layer.msg(data, {
  234. time: 2000//20s后自动关闭
  235. });
  236. });
  237. }
  238. }
  239. function deleteCheckScore(id) {
  240. deleteItem4Common(id, "/score/delete/", queryCheckScores, 'r');
  241. }
  242. function setVideoList(videos) {
  243. var videoArr;
  244. if (videos) {
  245. videoArr = videos.split("|");
  246. var selectStr = "";
  247. for (var i in videoArr) {
  248. if (i == 0)
  249. selectStr += '<option value="' + videoArr[i] + '" selected="selected">视频' + (videoArr[i] + 1) + '</option>'
  250. else
  251. selectStr += '<option value="' + videoArr[i] + '">视频' + (videoArr[i] + 1) + '</option>';
  252. }
  253. }
  254. $('#video_list').html(selectStr);
  255. }
  256. function addPic(pic) {
  257. if (pic) {
  258. var i = 0;
  259. // var imgArr = $("#img_container .pic-class");
  260. // if(imgArr && imgArr.length>0) i = imgArr.length;
  261. if (pic.startWith("http"))
  262. pic = pic.replace(base_image_server_url, "/");
  263. var picStr = genPicstr(pic);
  264. $('#img_container').append(picStr);
  265. $('a.lightbox-toggle').lightbox();
  266. }
  267. }
  268. function showPics(pics, divId) {
  269. var picStr = '';
  270. if (!divId) divId = '#img_container';
  271. $(divId).html(picStr);
  272. if (pics) {
  273. var picArr = pics.split(',');
  274. for (var i in picArr) {
  275. var pic = genPicstr(picArr[i]);
  276. picStr += pic;
  277. }
  278. $(divId).html(picStr);
  279. $('a.lightbox-toggle').lightbox();
  280. }
  281. }
  282. function genPicstr(imgSrc) {
  283. var src = imgSrc;
  284. if (!src.startWith("http"))
  285. src = base_image_server_url + src;
  286. var pic = '<div class="img_item" style="width:100px;height:90px;float:left;">'
  287. + '<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>'
  288. + '<a class="card lightbox-toggle" data-group="image-group-1" data-lightbox-group="example-3" href="' + src + '" style="position:absolute">'
  289. + '<img class="pic-class img-thumbnail" path="' + imgSrc + '" style="width:100px;height:70px;" src="' + src + '" alt="">'
  290. + '</a>'
  291. + '</div>';
  292. if (ISCLIENT) {
  293. pic = '<div class="img_item" style="width:100px;height:90px;float:left;">'
  294. + '<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>'
  295. + '<a class="card" onclick="showClientImg(\'' + src + '\')" href="javascript:void(0)" style="position:absolute">'
  296. + '<img class="pic-class img-thumbnail" path="' + imgSrc + '" style="width:100px;height:70px;" src="' + src + '" alt="">'
  297. + '</a>'
  298. + '</div>';
  299. }
  300. return pic;
  301. }
  302. function removeImg(this1) {
  303. $(this1).parent('.img_item').remove();
  304. }
  305. function clearAllImg() {
  306. $('#img_container').empty();
  307. }
  308. var changePersonLayer;
  309. function showChangeUser() {
  310. var param = {
  311. 'organid': $.checkTask.checked_dept
  312. };
  313. post_common_service("/user/getUserList/", param, function (data) {
  314. changePersonLayer = showPopup4Common('更改人员', null, ['550px', '600px'], null, 'r');
  315. $("#user_container").empty();
  316. var userStr = "";
  317. for (var i in data) {
  318. var name = data[i].truename;
  319. if (data[i].workno) name = name + " " + data[i].workno.substr(data[i].workno.length - 3);
  320. var pic = "../../images/body-bg.png";
  321. if (data[i].pic) pic = base_image_server_url + data[i].pic;
  322. str = '<div style="width:90px;float:left;margin:5px;">'
  323. + '<a class="card" href="javascript:void(0)" onclick="showBigImg(\'' + pic + '\')">'
  324. + '<img src="' + pic + '" alt="" style="height:100px;width:90px;">'
  325. + '<div class="card-heading"><strong>' + name + '</strong></div>'
  326. + '<div class="card-actions">'
  327. + '<button type="button" class="btn btn-mini btn-danger" onclick="changePerson(\'' + data[i].id + '\')">选择</button>'
  328. + '</div>'
  329. + '</a>'
  330. + '</div>';
  331. userStr += str;
  332. }
  333. $("#user_container").html(userStr);
  334. })
  335. }
  336. function changePerson(id) {
  337. // $('#checked_person').html(id);
  338. var param = {
  339. "id": $.checkTask.id,
  340. "checked_person": id,
  341. }
  342. no_return_common_service("task/update/", param, function (data) {
  343. get_common_service('user/getUserById/' + id, null, function (data) {
  344. changePersonContent(data);
  345. })
  346. layer.close(changePersonLayer);
  347. }, function (error) {
  348. alert(error);
  349. });
  350. }
  351. function showBigImg(src) {
  352. $('#userBigImg').attr("src", src);
  353. layer.open({
  354. offset: 'r',
  355. type: 1,
  356. title: false,
  357. closeBtn: 1,
  358. area: '450px',
  359. skin: 'layui-layer-nobg', //没有背景色
  360. shadeClose: true,
  361. shade: 0,
  362. content: $('#userBigImg')
  363. });
  364. }
  365. function resetUserImgInfo() {
  366. $("#user_img_container").empty();
  367. var str = '<a id="person_img" href="../../images/img4.jpg" class="lightbox-toggle">'
  368. + '<img src="../../images/img4.jpg" class="img-thumbnail" style="width:50px;height:50px;margin-top:-10px;"></a>'
  369. + '<label id="checked_person"></label>';
  370. $("#user_img_container").html(str);
  371. }
  372. function changePersonContent(data) {
  373. resetUserImgInfo();
  374. var name = data.truename;
  375. if (data.workno) name = data.workno + " " + data.truename;
  376. $("#checked_person").html(name);
  377. var imgSrc = base_image_server_url + data.pic;
  378. $("#person_img > img").attr("src", imgSrc);
  379. if (ISCLIENT) {
  380. $("#person_img").attr("href", "javascript:void(0)");
  381. $("#person_img").removeClass("lightbox-toggle");
  382. $("#person_img").click(function () {
  383. showClientImg(imgSrc);
  384. });
  385. $("#person_img > img").attr("src", imgSrc);
  386. return;
  387. } else {
  388. $("#person_img").attr("href", imgSrc);
  389. $('a.lightbox-toggle').lightbox();
  390. }
  391. }
  392. var scoreLayer;
  393. function showScore() {
  394. scoreLayer = showPopup4Common('选择考核项', null, ['400px', '500px'], '#items-div', 'r');
  395. buildTree();
  396. }
  397. function buildTree() {
  398. var zTreeObj;
  399. var zNodes = [];
  400. check_item_tree = $.fn.zTree.init($("#items_tree"), {}, zNodes);
  401. getCheckItems();
  402. }
  403. function getCheckItems() {
  404. function zTreeOnRename(event, treeId, treeNode, isCancel) {
  405. alert(treeNode.tId + ", " + treeNode.name);
  406. }
  407. function zTreeOnRemove(event, treeId, treeNode) {
  408. alert(treeNode.tId + ", " + treeNode.name);
  409. }
  410. var setting = {
  411. data: {
  412. simpleData: {
  413. enable: true,
  414. idKey: "id",
  415. pIdKey: "pId",
  416. rootPId: null
  417. }
  418. },
  419. view: { //表示tree的显示状态
  420. selectMulti: false //表示禁止多选
  421. },
  422. check: { //表示tree的节点在点击时的相关设置
  423. enable: false, //是否显示radio/checkbox
  424. chkStyle: "checkbox", //值为checkbox或者radio表示
  425. checkboxType: { p: "", s: "" }, //表示父子节点的联动效果
  426. radioType: "level" //设置tree的分组
  427. },
  428. callback: {
  429. onDblClick: zTreeOnClick
  430. },
  431. edit: {
  432. enable: true,
  433. drag: {
  434. autoExpandTrigger: true,
  435. isMove: true,
  436. prev: false,
  437. next: true,
  438. inner: true,
  439. autoOpenTime: 0
  440. },
  441. showRenameBtn: false,
  442. showRemoveBtn: false
  443. }
  444. };
  445. get_common_service('checkItem/getAll', null, function (data) {
  446. zdata = [];
  447. for (var i = 0; i < data.length; i++) {
  448. var m = data[i];
  449. zdata.push(genNode(m));
  450. }
  451. menu_tree = $.fn.zTree.init($("#items_tree"), setting, zdata)
  452. }, function (error) {
  453. });
  454. }
  455. function addobj(data) {
  456. var zdata = [];
  457. if (typeof (data.subCheckItem) != "undefinde" && data.subCheckItem != null &&
  458. data.subCheckItem.length > 0) {
  459. for (var i = 0; i < data.subCheckItem.length; i++) {
  460. var m = data.subCheckItem[i];
  461. zdata.push(genNode(m));
  462. }
  463. return zdata;
  464. } else {
  465. return [];
  466. }
  467. }
  468. function genNode(m) {
  469. var zdataItem = {};
  470. zdataItem["id"] = m.id;
  471. zdataItem["value"] = m.name;
  472. zdataItem["pId"] = m.parent_id;
  473. zdataItem["score"] = m.score;
  474. zdataItem["icon"] = "";
  475. zdataItem["name"] = m.name;
  476. //zdataItem["content"] = m.name;
  477. if (m.score) zdataItem["name"] = m.name + '(' + m.score + ')';
  478. zdataItem["open"] = true;
  479. zdataItem["children"] = addobj(m);
  480. return zdataItem;
  481. }
  482. function zTreeOnClick(event, treeId, treeNode) {
  483. //alert(treeNode.name);
  484. var imgArr = $("#img_container .pic-class");
  485. var picsStr = "";
  486. if (imgArr && imgArr.length > 0) {
  487. for (var i = 0; i < imgArr.length; i++) {
  488. picsStr += $(imgArr[i]).attr("path") + ","
  489. }
  490. picsStr = picsStr.substr(0, picsStr.length - 1);
  491. }
  492. var param = {
  493. 'task_id': $.checkTask.id,
  494. 'pics': picsStr,
  495. 'name': treeNode.value,
  496. 'check_item_score': treeNode.score,
  497. 'content': treeNode.value,
  498. 'check_item_id': treeNode.id,
  499. 'checkman': treeNode.id,
  500. 'checked_person': $.checkTask.checked_person,
  501. 'checked_dept': $.checkTask.checked_dept
  502. };
  503. no_return_common_service("/score/add", param, function (data) {
  504. if (scoreLayer) layer.close(scoreLayer);
  505. clearAllImg();
  506. //查询评分情况
  507. queryCheckScores();
  508. layer.msg(data, {
  509. time: 2000//20s后自动关闭
  510. });
  511. });
  512. }
  513. function submitCheck() {
  514. var param = {
  515. "id": $.checkTask.id,
  516. "check_status": 4
  517. }
  518. no_return_common_service("/task/taskEnd/", param, function (data) {
  519. layer.msg("提交成功", {
  520. time: 2000//20s后自动关闭
  521. });
  522. changePage("/view/mytask/task_list.html?status=2");
  523. });
  524. }
  525. function showPre(id) {
  526. // $('#myModal').modal({name:"dd"});
  527. //预览提交把任务状态改为待提交
  528. no_return_common_service('/task/update', { "id": $.checkTask.id, "check_status": 3 })
  529. changePage("/view/mytask/taskDetail.html");
  530. }
  531. function showInvalid() {
  532. invalidLayer = showPopup4Common('申请无效', function () {
  533. saveValidReason();
  534. }, ['400px', '500px'], '#invalid_div', 'r');
  535. }
  536. function submitCheck4Appeal() {
  537. var param = {
  538. "id": $.checkTask.id,
  539. "check_status": 14
  540. }
  541. no_return_common_service("/task/taskEnd/", param, function (data) {
  542. layer.msg("提交成功", {
  543. time: 2000//20s后自动关闭
  544. });
  545. changePage("/view/mytask/task_list.html?status=2");
  546. });
  547. }
  548. function showPre4Appeal(id) {
  549. // $('#myModal').modal({name:"dd"});
  550. //预览提交把任务状态改为待提交
  551. no_return_common_service('/task/update', { "id": $.checkTask.id, "check_status": 13 })
  552. changePage("/view/mytask/taskDetail.html");
  553. }
  554. function saveValidReason() {
  555. var param = {
  556. "task_id": $.checkTask.id,
  557. "apply_reason": $("#apply_reason").val()
  558. }
  559. no_return_common_service("/checkApply/add/", param, function (data) {
  560. layer.msg("申请提交成功", {
  561. time: 2000//20s后自动关闭
  562. });
  563. changePage("/view/mytask/task_list.html?status=2");
  564. });
  565. }
  566. function score(score) {
  567. alert("扣分:" + score);
  568. $('#scoreWin').modal('toggle');
  569. }
  570. function refuseApply() {
  571. alert("拒绝申请");
  572. $('#refuseApplyWin').modal('toggle');
  573. }
  574. function agreeApply() {
  575. alert("同意申请");
  576. }
  577. function getVideoPosition(obj) {
  578. if (obj == null) obj = $('#tabcontent');
  579. var X = obj.offset().top;
  580. var Y = obj.offset().left;
  581. var width = obj.width();
  582. var height = obj.height();
  583. return parseInt(Y) + "|" + parseInt(X) + "|" + parseInt(width) + "|" + parseInt(height);
  584. }
  585. function initUpLoad() {
  586. var uploader = WebUploader.create({
  587. // swf文件路径
  588. swf: 'lib/webuploader/js/Uploader.swf',
  589. // 文件接收服务端。
  590. server: base_image_server_url + '/filesSrver/' + FILE_UPLOAD,
  591. // 选择文件的按钮。可选。
  592. // 内部根据当前运行是创建,可能是input元素,也可能是flash.
  593. pick: '#picker',
  594. // 不压缩image, 默认如果是jpeg,文件上传前会压缩一把再上传!
  595. resize: false
  596. });
  597. }