80a563ea610c6b3418c0382669baa9eca33152e1.svn-base 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>应急图片</title>
  5. <meta name="keywords" content="keyword1,keyword2,keyword3">
  6. <meta name="description" content="this is my page">
  7. <meta name="content-type" content="text/html; charset=UTF-8">
  8. <script type="text/javascript" src="/nwyj/page/cockpit/context.js"></script>
  9. <!--框架必需start-->
  10. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/jquery.js"></script>
  11. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/language/cn.js"></script>
  12. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/main.js"></script>
  13. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/framework.js"></script>
  14. <link href="/nwyj/scripts/qui/libs/css/import_basic.css" rel="stylesheet" type="text/css"/>
  15. <link rel="stylesheet" type="text/css" id="skin" prePath="/nwyj/scripts/qui/" scrollerY="false"/>
  16. <link rel="stylesheet" type="text/css" id="customSkin"/>
  17. <!--框架必需end-->
  18. <!--树组件start-->
  19. <link rel="stylesheet" type="text/css" href="/nwyj/scripts/qui/libs/js/tree/ztree/ztree.css" />
  20. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/tree/ztree/ztree.js"></script>
  21. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/form/selectTree.js"></script>
  22. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/form/listerTree.js"></script>
  23. <!--树组件end-->
  24. <script type="text/javascript" src="/nwyj/page/cockpit/webgis/util.js"></script>
  25. <link rel="stylesheet" type="text/css" href="/nwyj/page/cockpit/chartPage.css">
  26. <link rel="stylesheet" type="text/css" href="/nwyj/css/cockpit/charTitle.css">
  27. <link rel="stylesheet" type="text/css" href="/nwyj/css/cockpit/scence_picture.css">
  28. </head>
  29. <body>
  30. <div id="content">
  31. <div id="head" class="jsc_chartitle">应急图片</div>
  32. <div id="main_content"></div>
  33. <div id="choose_content">
  34. <h2>单位:</h2>
  35. <div id="compTree" class="selectTree _left_margin" selWidth="280" asyncMode="true" ></div></br>
  36. <h2 class="_center"><span class="_query_command">查询</span></h2>
  37. </div>
  38. </div>
  39. <script type="text/javascript">
  40. //图表用参数
  41. // dept_id//user_id//user_name//dept_name
  42. var urlParams=resolveUrl();
  43. var comId= urlParams["dept_id"] ;
  44. //查询条件配置参数
  45. var deptUrl=path+"ws/orgInDeptService/OrgInDeptService/getDeptRootById";
  46. function init(){
  47. // 添加额外属性主要用于最初的初始节点
  48. $("#compTree").attr('params', '{"deptId":"'+urlParams["dept_id"]+'"}');
  49. // 异步加载请求地址
  50. $("#compTree").attr('url', deptUrl);
  51. $.post(deptUrl, {"id" : urlParams["dept_id"]}, function(data) {$("#compTree").data("data", data);$("#compTree").render();}, "json");
  52. $("._query_command").on("click",query);
  53. }
  54. function query(){
  55. comId=$("#compTree").data("selectedNode").id;
  56. loadImg($("#main_content"),comId,createImgList);
  57. }
  58. $(function(){
  59. init()
  60. loadImg($("#main_content"),comId,createImgList);
  61. });
  62. function loadImg($con,conId,fn){
  63. $.post(path+"ws/NewServiceImpl/NewService/getImgVedio",{"compId" : conId,"type":25},function(result){
  64. if(result.state=="FAILURE") throw new Error("查询失败");
  65. $con.empty();
  66. if(result.rows.length>0){
  67. fn($con,result.rows);
  68. }else{
  69. $con.append("<p class='_error'>目前该机构尚未上传现场照片</p>");
  70. }
  71. },"json")
  72. }
  73. function createImgList($con,dateArr){
  74. var imgIndex=0;
  75. $ul=$("<ul></ul>");
  76. for(var item in dateArr){
  77. $li=$("<li class='_li1'><div><img class='_img' src='"+http_path+"upload/"+dateArr[item]["NAME"]+"."+dateArr[item]["FILEEXT"]+"'/></div></li>");
  78. $li.on("click",function(){
  79. var temUrl=$(this).find("img").attr("src")
  80. window.open(http_path+"page/cockpit/otherpage/main_scene_pictures.html"+window.location.search+"&&imgUrl="+encodeURI(temUrl)+"&&index="+$(this).data("data"),"");});
  81. $li.append("<div class='_img_text'><div class='_img_text_div'><span class=''>单位:</span><span class='_img_text_Text _text1'>"+dateArr[item]["DEPTNAME"]+"</span></div><div class='_img_text_div _text2'><span class=''>上传人:</span><span class='_img_text_Text'>"+dateArr[item]["OPERNAME"]+"</span></div><br/><div class='_img_text_div _text3'><span class=''>上传时间:</span><span class='_img_text_Text'>"+dateArr[item]["UPDATEDATE"]+"</span></div>"+
  82. "<br/><div class='_img_text_div'><span>描述::</span><span class='_img_text_Text' >"+dateArr[item]["DESCRIPTION"]+"</span></div></div>");
  83. $ul.append($li);
  84. $ul.find("li").last().data("data",imgIndex);
  85. imgIndex++;
  86. }
  87. $con.append($ul);
  88. setCol();
  89. adaptHeight($("#main_content"), $(window).height());
  90. }
  91. $(window).resize(function(){
  92. setCol();
  93. adaptHeight($("#main_content"), $(window).height());
  94. });
  95. function setCol(){
  96. if($(window).width()>960){
  97. $("#main_content").find("li[class^='_li']").each(function(){
  98. $(this).attr("class","");
  99. $(this).addClass("_li3");
  100. });
  101. }else if($(window).width()>600){
  102. $("#main_content").find("li[class^='_li']").each(function(){
  103. $(this).attr("class","");
  104. $(this).addClass("_li2");
  105. });
  106. }else{
  107. $("#main_content").find("li[class^='_li']").each(function(){
  108. $(this).attr("class","");
  109. $(this).addClass("_li1");
  110. });
  111. }
  112. }
  113. </script>
  114. </body>
  115. </html>