7399d8a333a842ae7bc65caf19347cfe15a6dd38.svn-base 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633
  1. /* var pageCount = 0 ; */
  2. var vu ;
  3. var pos = {afterX:-1,afterY:-1,nowX:0,nowY:0};
  4. var timer ;
  5. $(function(){
  6. vu = new VideoUtil();
  7. vu.set_inter(setInterval(function(){
  8. var timer = vu.get_timer() + 1 ;
  9. vu.set_timer(timer);
  10. }, 1000));
  11. $(document).mousemove(function(e){
  12. showcoords(event,this);
  13. });
  14. var bw = $(window).height() - 30;
  15. $("#main_tab").css({width:"100%",height:bw+"px"});
  16. $("#side_bar").css({width:"100%",height:bw+"px"});
  17. $(window).resize(function(){
  18. var bw = $(window).height() - 30;
  19. $("#main_tab").css({width:"100%",height:bw+"px"});
  20. $("#side_bar").css({width:"100%",height:bw+"px"});
  21. $(".video_count").each(function(i){
  22. var id = $(this).attr("id");
  23. var w = $(this).width();
  24. var h = $(this).height();
  25. CKobject.getObjectById("ck_" + id ).width = w ;
  26. CKobject.getObjectById("ck_" + id ).height = h ;
  27. });
  28. });
  29. vu.countList( vu.nextPage,"\".np\"");
  30. /*jQuery(function($) {
  31. $('div.mousewheel_example')
  32. .bind('mousewheel', function(event, delta) {
  33. var dir = delta > 0 ? 'Up' : 'Down',
  34. vel = Math.abs(delta);
  35. $(this).text(dir + ' at a velocity of ' + vel);
  36. return false;
  37. });
  38. }); */
  39. waterMark();
  40. });
  41. $(function(){
  42. $("body").mouseover(function(){
  43. $(".search_emer_video").show();
  44. });
  45. $("body").mouseout(function(){
  46. $(".search_emer_video").hide();
  47. });
  48. $(".search_emer_video").click(function(){
  49. if($(".rsc").is(":hidden")){
  50. $("td").eq(0).animate({width:"70%"},1000);
  51. $("td").eq(1).fadeIn(1000);
  52. }else{
  53. $("td").eq(0).animate({width:"100%"},1000);
  54. $("td").eq(1).fadeOut(1000);
  55. }
  56. });
  57. });
  58. /* 视频工具栏展示 */
  59. $(".bar").live("click",function(){
  60. if($(this).hasClass("bar_hide")){
  61. var id = $(this).attr("id");
  62. $(this).next().empty();
  63. $(this).removeClass("bar_hide");
  64. $(this).next().slideDown(600);
  65. var bw = $(this).next().next().width();
  66. var bl = $(this).width();
  67. var ost = $(this).offset().top;
  68. var osl = $(this).offset().left;
  69. $(this).next().width(bw-bl);
  70. $(this).next().css({top:ost,left:osl+bl});
  71. /*$(this).next().append("<button class=\"btn open\" id=\"btn_oc_des\">打开/关闭描述</button>" +
  72. "<button class=\"btn open\" id=\"btn_pg_des\">暂停/继续描述</button>" +
  73. "<button class=\"btn open\" id=\"btn_oc_adju\">打开/关闭调整</button>" +
  74. "<button class=\"btn open\" id=\"btn_oc_video\">添加/关闭视频</button>");*/
  75. /* $(this).next().append("<button class=\"btn open\" id=\"btn_oc_des\">打开/关闭描述</button>" +
  76. "<button class=\"btn open\" id=\"btn_oc_adju\">打开/关闭调整</button>" +
  77. "<button class=\"btn open\" id=\"btn_oc_video\">添加/关闭视频</button>");*/
  78. $(this).next().append("<button class=\"btn open\" id=\"btn_oc_des\">打开/关闭描述</button>" +
  79. "<button class=\"btn open\" id=\"btn_oc_adju\">打开/关闭调整</button>" );
  80. var interval = setInterval(function(){
  81. if(vu.get_timer() >= 10){
  82. $("#"+id).addClass("bar_hide") ;
  83. $("#"+id).next().slideUp(600) ;
  84. vu.set_timer(0) ;
  85. clearInterval(vu.get_interval());
  86. }
  87. },10000);
  88. vu.set_interval(interval);
  89. };
  90. // <div class=\"bar\"></div>
  91. // <div class=\"bar_count\"></div>
  92. // <div id=\"one_v\" class=\"four_coun coun_top coun_left fib ao_four await_orders video_count\"></div>" +
  93. });
  94. /* 监听鼠标是否移动 */
  95. function showcoords(e,obj){
  96. var event = window.event || e;
  97. if(pos.nowX==e.clientX && pos.nowY == e.clientY){
  98. // no move
  99. }else{
  100. // move
  101. pos.afterX = pos.nowX ;
  102. pos.afterY = pos.nowY ;
  103. pos.nowX = event.clientX;
  104. pos.nowY = event.clientY;
  105. vu.set_timer(0);
  106. }
  107. };
  108. /* 鼠标离开工具条事件绑定 */
  109. $(".bar_count").live("mouseleave",function(){
  110. var id = $(this).attr("id");
  111. clearInterval(vu.get_interval());
  112. var ml_timer = setTimeout(function(){
  113. $("#"+id).prev().addClass("bar_hide");
  114. $("#"+id).slideUp(600);
  115. },3000);
  116. vu.set_ml_timer(ml_timer);
  117. });
  118. /* 鼠标移入工具条事件绑定 */
  119. $(".bar_count").live("mouseover",function(){
  120. clearInterval(vu.get_ml_timer());
  121. });
  122. /* 点击搜索框清空水印 */
  123. $("#svp").mousedown(function(){
  124. if($("#svp").find("watermark")){
  125. $(this).removeClass("watermark");
  126. $(this).val("");
  127. }
  128. });
  129. /* 搜索框焦点失去 */
  130. $("#svp").focusout(function(){
  131. if($("#svp").val()==""){
  132. waterMark() ;
  133. }
  134. });
  135. /* 搜索框得到焦点 */
  136. $("#svp").keydown(function(event){
  137. if(event.keyCode==13){
  138. var params = $("#svp").val() == "输入部门、上传人进行查询" ? "" : $("#svp").val() ;
  139. if(!params == ""){
  140. $("#searbut").addClass("key_search");
  141. }
  142. vu.sbcList(vu.nextPage, "\".np\"", params);
  143. };
  144. });
  145. /* 搜索框显示水印 */
  146. function waterMark(){
  147. $("#svp").addClass("watermark");
  148. $("#svp").val("输入部门、上传人进行查询");
  149. }
  150. /* 点击搜索框清除水印 */
  151. function downClearWM(){
  152. }
  153. /* 侧边描述信息隐藏/显示条 */
  154. $(".rc").on({
  155. "mouseenter":function(){
  156. if($(".rsc").is(":hidden")){
  157. clearTimeout(timer);
  158. setTimeout(function(){
  159. $("td").eq(0).animate({width:"70%"},1000);
  160. $("td").eq(1).fadeIn(1000);
  161. },500);
  162. }
  163. },
  164. "mouseleave":function(){
  165. clearTimeout(timer);
  166. }
  167. });
  168. /* 下一页 */
  169. function nextPage(){
  170. vu.nextPage("\".np\"");
  171. };
  172. /*$(".np").on("click",function(){
  173. vu.nextPage("\".np\"");
  174. });*/
  175. /* 上一页 */
  176. function lastPage(){
  177. vu.lastPage("\".lp\"");
  178. };
  179. /*$(".lp").on({"click":function(){
  180. vu.lastPage("\".lp\"");
  181. }});*/
  182. /* 侧面关闭按钮 */
  183. $(".close").on({
  184. "click":function(){
  185. $("td").eq(0).animate({width:"100%"},1000);
  186. $("td").eq(1).fadeOut(1000);
  187. }
  188. });
  189. /* 打开关闭描述按钮绑定事件 */
  190. $("#btn_oc_des").live("click",function(){
  191. timer = 0 ;
  192. var id = $(this).parent().next().attr("id");
  193. if($(this).parent().prev().hasClass("one_open")){
  194. $(this).parent().prev().removeClass("one_open");
  195. $(this).parent().prev().addClass("one_close");
  196. CKobject.getObjectById("ck_" + id).marqueeClose();
  197. }else{
  198. $(this).parent().prev().removeClass("one_close");
  199. $(this).parent().prev().addClass("one_open");
  200. CKobject.getObjectById("ck_" + id).marqueeLoad(true);
  201. }
  202. });
  203. /* 暂停继续按钮绑定事件 */
  204. /*$("#btn_pg_des").live("click",function(){
  205. timer = 0 ;
  206. var id = $(this).parent().next().attr("id");
  207. if($(this).parent().prev().hasClass("two_open")){
  208. $(this).parent().prev().removeClass("two_open");
  209. $(this).parent().prev().addClass("two_close");
  210. CKobject.getObjectById("ck_" + id).frontAdPause();
  211. }else{
  212. $(this).parent().prev().removeClass("two_close");
  213. $(this).parent().prev().addClass("two_open");
  214. CKobject.getObjectById("ck_" + id).frontAdPause(false);
  215. }
  216. });*/
  217. /* 打开关闭调整按钮绑定事件 */
  218. $("#btn_oc_adju").live("click",function(){
  219. timer = 0 ;
  220. var id = $(this).parent().next().attr("id");
  221. if($(this).parent().prev().hasClass("three_open")){
  222. $(this).parent().prev().removeClass("three_open");
  223. $(this).parent().prev().addClass("three_close");
  224. CKobject.getObjectById('ck_'+id).plugin('adjustment.swf',true);
  225. }else{
  226. $(this).parent().prev().removeClass("three_close");
  227. $(this).parent().prev().addClass("three_open");
  228. CKobject.getObjectById('ck_'+id).plugin('adjustment.swf',false);
  229. }
  230. });
  231. /* 打开关闭视频按钮绑定事件 */
  232. $("#btn_oc_video").live("click",function(){
  233. timer = 0 ;
  234. if($(this).parent().prev().hasClass("four_open")){
  235. $(this).parent().prev().removeClass("four_open");
  236. $(this).parent().prev().addClass("four_close");
  237. }else{
  238. $(this).parent().prev().removeClass("four_close");
  239. $(this).parent().prev().addClass("four_open");
  240. }
  241. });
  242. VideoUtil = function(){
  243. var _this=this;
  244. var pageCount = 0 ;
  245. var pageNum = 0 ;
  246. var pageList = 0 ;
  247. var screen = 1 ;
  248. var screen_class = "ao_one" ; /* 当前布局样式 */
  249. var load_flag = true ;
  250. var replace_class = {"x":"await_orders","y":"other_await"}; /* 下一个替换样式组 */
  251. var interval = "" ;
  252. var inter = "" ;
  253. var timer = 0 ;
  254. var ml_timer = "" ;
  255. /* 重置 */
  256. this.resetPageNo = function(){
  257. pageCount = 0 ;
  258. pageNum = 0 ;
  259. pageList = 0 ;
  260. screen = 1 ;
  261. screen_class = "ao_one" ; /* 当前布局样式 */
  262. load_flag = true ;
  263. replace_class = {"x":"await_orders","y":"other_await"}; /* 下一个替换样式组 */
  264. /*$(".np").removeAttr("disabled");
  265. $(".lp").attr("disabled","false");*/
  266. };
  267. /* 跟据条件查询总页数 */
  268. this.sbcList = function(fn,fnp,param){
  269. var params = {listNum:5,condition:param};
  270. var url = "/nwyj/ws/cockpit/CockpitService/searchByCondition";
  271. $.post(url,params,function(data){
  272. _this.resetPageNo();
  273. pageCount = data["countPage"];
  274. pageList = data["countList"];
  275. /*$(".lp").attr("disabled","false");*/
  276. $(".lp").empty();
  277. $(".lp").append("<span class='locked_gray'>上一页</span>");
  278. if(pageCount==1) {
  279. /*$(".np").attr("disabled","false");*/
  280. $(".np").empty();
  281. $(".np").append("<span class='locked_gray'>下一页</span>");
  282. }
  283. _this.splitScreen();
  284. if(fn!=""||fn!=null) fn(fnp);
  285. },"json");
  286. };
  287. /* 跟据每页显示的条数查询出总页数有多少 */
  288. this.countList = function(fn,param){
  289. var params = {listNum:5};
  290. var url = "/nwyj/ws/cockpit/CockpitService/pageCountByVideo";
  291. $.post(url,params,function(data){
  292. pageCount = data["countPage"];
  293. pageList = data["countList"];
  294. /*$(".lp").attr("disabled","false");*/
  295. if(pageCount==1) {
  296. /* $(".np").attr("disabled","false"); */
  297. $(".np").empty();
  298. $(".np").append("<span class='locked_gray'>下一页</span>");
  299. }
  300. _this.splitScreen();
  301. if(fn!=""||fn!=null) fn(param);
  302. });
  303. };
  304. /* 得到屏幕数 */
  305. this.getScreen = function(){
  306. return screen;
  307. };
  308. /* 得到要替换样式 */
  309. this.get_replace_class = function(){
  310. return replace_class ;
  311. };
  312. /* 设置要替换样式 */
  313. this.set_replace_class = function(name){
  314. replace_class = name ;
  315. };
  316. this.get_interval = function(){
  317. return interval ;
  318. };
  319. this.set_interval = function(iv){
  320. interval = iv ;
  321. };
  322. this.get_inter = function(){
  323. return inter ;
  324. };
  325. this.set_inter = function(inte){
  326. inter = inte ;
  327. };
  328. this.get_timer = function(){
  329. return timer ;
  330. };
  331. this.set_timer = function(time){
  332. timer = time ;
  333. };
  334. this.get_ml_timer = function(){
  335. return ml_timer ;
  336. };
  337. this.set_ml_timer = function(mt){
  338. ml_timer = mt ;
  339. };
  340. /* 分屏 */
  341. this.splitScreen = function(){
  342. $("#video_box").empty();
  343. if(pageList<=1){ /* 1屏 */
  344. screen = 1 ;
  345. screen_class = "ao_one";
  346. $("#video_box").append("<div id=\"one_b\" class=\"bar bar_hide one_open two_open three_open four_open\"></div><div id=\"bc_one\" class=\"bar_count\"></div><div id=\"one_v\" class=\"ao_one fib await_orders video_count\"></div>");
  347. } else if(pageList==2){ /* 2屏 */
  348. screen = 2 ;
  349. screen_class = "ao_two";
  350. $("#video_box").append("<div id=\"one_b\" class=\"bar bar_hide one_open two_open three_open four_open\"></div><div id=\"bc_one\" class=\"bar_count\"></div><div id=\"one_v\" class=\"two_coun coun_left fib ao_two await_orders video_count\"></div>" +
  351. "<div id=\"two_b\" class=\"bar bar_hide one_open two_open three_open four_open\"></div><div id=\"bc_two\" class=\"bar_count\"></div><div id=\"two_v\" class=\"two_coun coun_right fib ao_two await_orders ao_two video_count\"></div>");
  352. } else if(pageList==3){ /* 3屏 */
  353. screen = 3 ;
  354. screen_class = "ao_three";
  355. $("#video_box").append("<div id=\"one_b\" class=\"bar bar_hide one_open two_open three_open four_open\"></div><div id=\"bc_one\" class=\"bar_count\"></div><div id=\"one_v\" class=\"three_coun_b coun_top ao_three await_orders video_count\"></div>" +
  356. "<div id=\"two_b\" class=\"bar bar_hide one_open two_open three_open four_open\"></div><div id=\"bc_two\" class=\"bar_count\"></div><div id=\"two_v\" class=\"three_coun_l coun_bottom coun_left fib ao_three await_orders video_count\"></div>" +
  357. "<div id=\"three_b\" class=\"bar bar_hide one_open two_open three_open four_open\"></div><div id=\"bc_three\" class=\"bar_count\"></div><div id=\"three_v\" class=\"three_coun_l coun_bottom coun_right fib ao_three await_orders video_count\"></div>") ;
  358. } else{ /* 4屏 */
  359. screen = 4 ;
  360. screen_class = "ao_four";
  361. $("#video_box").append("<div id=\"one_b\" class=\"bar bar_hide one_open two_open three_open four_open\"></div><div id=\"bc_one\" class=\"bar_count\"></div><div id=\"one_v\" class=\"four_coun coun_top coun_left fib ao_four await_orders video_count\"></div>" +
  362. "<div id=\"two_b\" class=\"bar bar_hide one_open two_open three_open four_open\"></div><div id=\"bc_two\" class=\"bar_count\"></div><div id=\"two_v\" class=\"four_coun coun_top fib ao_four await_orders video_count\"></div>" +
  363. "<div id=\"three_b\" class=\"bar bar_hide one_open two_open three_open four_open\"></div><div id=\"bc_three\" class=\"bar_count\"></div><div id=\"three_v\" class=\"four_coun coun_bottom coun_left fib ao_four await_orders video_count\"></div>" +
  364. "<div id=\"four_b\" class=\"bar bar_hide one_open two_open three_open four_open\"></div><div id=\"bc_four\" class=\"bar_count\"></div><div id=\"four_v\" class=\"four_coun coun_bottom fib ao_four await_orders video_count\"></div>");
  365. }
  366. };
  367. /* 得到屏幕布局样式名 */
  368. this.get_screen_class = function(){
  369. return screen_class;
  370. };
  371. /* 执行下一页操作 */
  372. this.nextPage = function(nc){
  373. pageNum++ ;
  374. if(pageNum == 2){
  375. $(".lp").empty();
  376. $(".lp").append("<a href=\"#\" onclick='lastPage()'>上一页</a>");
  377. }
  378. if(pageNum >= pageCount) {
  379. /* $(".np").attr("disabled","false"); */
  380. $(".np").empty();
  381. $(".np").append("<span class='locked_gray'>下一页</span>");
  382. pageNum = pageCount;
  383. }else{
  384. $(".np").empty();
  385. $(".np").append("<a href=\"#\" onclick='nextPage()'>下一页</a>");
  386. };
  387. if(pageNum > 1) $(".lp").removeAttr("disabled");
  388. _this.showList(nc);
  389. };
  390. /* 执行上一页操作 */
  391. this.lastPage = function(nc){
  392. pageNum-- ;
  393. if(pageNum==pageCount-1){
  394. $(".np").empty();
  395. $(".np").append("<a href=\"#\" onclick='nextPage()'>下一页</a>");
  396. }
  397. if(pageNum == 1) {
  398. /* $(".lp").attr("disabled","false"); */
  399. $(".lp").empty();
  400. $(".lp").append("<span class='locked_gray'>上一页</span>");
  401. pageNum = 1 ;
  402. /* return; */
  403. }
  404. /* if(pageNum < pageCount) {
  405. $(".np").removeAttr("disabled");
  406. } */
  407. _this.showList(nc);
  408. };
  409. /* 显示当前页面列表项 */
  410. this.showList = function(nc){
  411. var condition = $("#svp").val() == "输入部门、上传人进行查询" ? "" : $("#svp").val() ;
  412. var params = {begin:pageNum * 5 - 4, end:pageNum * 5,condition:condition};
  413. var url = "/nwyj/ws/cockpit/CockpitService/queryVideo" ;
  414. $.post(url,params,function(data){
  415. if(data){
  416. $("#tbv").empty();
  417. for(var key in data){
  418. /*$("#tbv").append("<tr><td class=\"fgx\"><table cellpadding=\"4\" class=\"mpy\"><tr>" +
  419. "<td><a href=\"#\" onclick=\"ckplay('" + data[key]["name"] + "." + data[key]["fileext"] + "','" + data[key]["description"] + "')\" class=\"mpy\" ><img src=\"/nwyj/images/cockpit/char/new_notice.png\" width=\"60\" /></a></td>" +
  420. "<td><span class=\"tit\">部门:</span><span>" + data[key]["dept_name"] + "</span><br><span class=\"tit\">上传人:</span><span>" + data[key]["oper_name"] +
  421. "</span><br><span class=\"tit\">上传时间:</span><span>" + data[key]["oper_time"] + "</span><br><span class=\"tit\">描述:</span><span>" + data[key]["description"] + "<span></td>" +
  422. "</tr></table></td></tr>") ;*/
  423. $("#tbv").append("<tr><td class=\"fgx\"><table cellpadding=\"4\" class=\"mpy\"><tr>" +
  424. "<td><a href=\"#\" onclick=\"ckplay('" + data[key]["name"] + "." + data[key]["fileext"] + "','" + data[key]["description"] + "')\" class=\"mpy\" ><img src=\"/nwyj/images/cockpit/char/new_notice.png\" width=\"60\" /></a></td>" +
  425. "<td><span class=\"tit\">部门:</span><span>" + data[key]["dept_name"] + "</span><br><span class=\"tit\">上传人:</span><span>" + data[key]["oper_name"] +
  426. "</span><br><span class=\"tit\">上传时间:</span><span>" + data[key]["oper_time"] + "</span></td>" +
  427. "</tr></table></td></tr>") ;
  428. }
  429. if(load_flag){
  430. _this.load_ckplay(data);
  431. load_flag = false;
  432. }
  433. _this.ck_play();
  434. // if($("#searbut").hasClass("key_search")){
  435. // $("#searbut").removeClass("key_search");
  436. $("#tbv").html(function(i,oldHTML){
  437. var key = $("#svp").val() == "输入部门、上传人进行查询" ? "" : $("#svp").val() ;
  438. var exp = "/" + key + "/g" ;
  439. exp = exp.replace(/\/\//g,"\/");
  440. var ke = eval(exp);
  441. var temp = "<span class = 'keyword'>" + key + "</span>" ;
  442. return oldHTML.replace(ke,temp);
  443. });
  444. // }
  445. }else{
  446. $("#tbv").empty().append("<div class=\"nores\">没有查到相关视频,请更换关键字重新查询。</div>");
  447. if(pageCount!=1){ pageCount = pageCount - 1; }
  448. }
  449. });
  450. };
  451. this.ck_play = function(){
  452. // CKobject.getObjectById('ckplayer_a1').videoPlay();
  453. };
  454. /* 视频初始化 */
  455. this.load_ckplay = function(data){
  456. var div_id = "";
  457. var name = "";
  458. for(var i = 0 ; i < screen ; i++){
  459. div_id = $("."+screen_class).eq(i).attr("id");
  460. name = data[i]["name"] + "." + data[i]["fileext"] ;
  461. _this.init_ckplay(name, div_id,data[i]["description"]);
  462. }
  463. };
  464. /* 初始化加载视频 */
  465. this.init_ckplay = function(name, div_id, description){
  466. var host = window.location.host;
  467. var flashvars={
  468. f:"http://" + host + "/nwyj/upload/"+name,
  469. c:0,
  470. p:'0',
  471. loaded:'loadedHandler'
  472. };
  473. // alert(flashvars.f)
  474. var hei = $("#"+div_id).height();
  475. CKobject.embed('/nwyj/page/cockpit/ckplayer/ckplayer.swf',div_id,"ck_" + div_id,'100%',hei,false,flashvars);
  476. setTimeout(function(){
  477. _this.add_description("ck_" + div_id, description);
  478. },5000);
  479. };
  480. /* 得到下一个等待id */
  481. this.next_await = function(){
  482. var await_id = $("."+replace_class["x"]).eq(0).attr("id");
  483. if(await_id==undefined){
  484. var temp = replace_class["x"];
  485. replace_class["x"] = replace_class["y"];
  486. replace_class["y"] = temp;
  487. await_id = $("."+replace_class["x"]).eq(0).attr("id");
  488. }
  489. $("#"+await_id).removeClass(replace_class["x"]);
  490. $("#"+await_id).addClass(replace_class["y"]);
  491. return await_id;
  492. };
  493. /* 添加描述信息 */
  494. this.add_description = function(ck_id, description){
  495. CKobject.getObjectById(ck_id).marqueeLoad(true);
  496. CKobject.getObjectById(ck_id).marqueeLoad(true,'{font color=\'#FFDD00\'}' + description + ',{/font}');
  497. };
  498. };
  499. //VideoUtil类结束
  500. /* 点击视频 */
  501. function ckplay(name,description){
  502. var await_id = vu.next_await();
  503. var host = window.location.host;
  504. var flashvars={
  505. f: "http://" + host + '/nwyj/upload/' + name,
  506. c:0,
  507. p:'1',
  508. e:'5',
  509. loaded:'loadedHandler'
  510. };
  511. var hei = $("#"+await_id).height();
  512. $(".video_count").height(hei);
  513. // alert(flashvars.f)
  514. CKobject.embed('/nwyj/page/cockpit/ckplayer/ckplayer.swf',await_id,"ck_" + await_id,'100%',hei,false,flashvars);
  515. setTimeout(function(){
  516. vu.add_description("ck_" + await_id, description);
  517. },5000);
  518. };
  519. $("#searbut").on("click",function(){
  520. // vu.resetPageNo();
  521. var params = $("#svp").val() == "输入部门、上传人进行查询" ? "" : $("#svp").val() ;
  522. if(!params == ""){
  523. $(this).addClass("key_search");
  524. }
  525. vu.sbcList(vu.nextPage, "\".np\"", params);
  526. });