123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- <!DOCTYPE html>
- <html>
- <head>
- <title>应急图片</title>
-
- <meta name="keywords" content="keyword1,keyword2,keyword3">
- <meta name="description" content="this is my page">
- <meta name="content-type" content="text/html; charset=UTF-8">
- <script type="text/javascript" src="/nwyj/page/cockpit/context.js"></script>
- <!--框架必需start-->
- <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/jquery.js"></script>
- <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/language/cn.js"></script>
- <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/main.js"></script>
- <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/framework.js"></script>
- <link href="/nwyj/scripts/qui/libs/css/import_basic.css" rel="stylesheet" type="text/css"/>
- <link rel="stylesheet" type="text/css" id="skin" prePath="/nwyj/scripts/qui/" scrollerY="false"/>
- <link rel="stylesheet" type="text/css" id="customSkin"/>
- <!--框架必需end-->
- <!--树组件start-->
- <link rel="stylesheet" type="text/css" href="/nwyj/scripts/qui/libs/js/tree/ztree/ztree.css" />
- <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/tree/ztree/ztree.js"></script>
- <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/form/selectTree.js"></script>
- <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/form/listerTree.js"></script>
- <!--树组件end-->
- <script type="text/javascript" src="/nwyj/page/cockpit/webgis/util.js"></script>
- <link rel="stylesheet" type="text/css" href="/nwyj/page/cockpit/chartPage.css">
-
- <link rel="stylesheet" type="text/css" href="/nwyj/css/cockpit/charTitle.css">
- <link rel="stylesheet" type="text/css" href="/nwyj/css/cockpit/scence_picture.css">
- </head>
- <body>
- <div id="content">
- <div id="head" class="jsc_chartitle">应急图片</div>
- <div id="main_content"></div>
- <div id="choose_content">
- <h2>单位:</h2>
- <div id="compTree" class="selectTree _left_margin" selWidth="280" asyncMode="true" ></div></br>
- <h2 class="_center"><span class="_query_command">查询</span></h2>
- </div>
- </div>
- <script type="text/javascript">
- //图表用参数
- // dept_id//user_id//user_name//dept_name
- var urlParams=resolveUrl();
- var comId= urlParams["dept_id"] ;
- //查询条件配置参数
- var deptUrl=path+"ws/orgInDeptService/OrgInDeptService/getDeptRootById";
-
- function init(){
- // 添加额外属性主要用于最初的初始节点
- $("#compTree").attr('params', '{"deptId":"'+urlParams["dept_id"]+'"}');
- // 异步加载请求地址
- $("#compTree").attr('url', deptUrl);
- $.post(deptUrl, {"id" : urlParams["dept_id"]}, function(data) {$("#compTree").data("data", data);$("#compTree").render();}, "json");
- $("._query_command").on("click",query);
-
- }
- function query(){
- comId=$("#compTree").data("selectedNode").id;
- loadImg($("#main_content"),comId,createImgList);
- }
-
-
-
-
- $(function(){
- init()
- loadImg($("#main_content"),comId,createImgList);
- });
- function loadImg($con,conId,fn){
- $.post(path+"ws/NewServiceImpl/NewService/getImgVedio",{"compId" : conId,"type":25},function(result){
- if(result.state=="FAILURE") throw new Error("查询失败");
- $con.empty();
- if(result.rows.length>0){
- fn($con,result.rows);
- }else{
- $con.append("<p class='_error'>目前该机构尚未上传现场照片</p>");
- }
- },"json")
- }
- function createImgList($con,dateArr){
- var imgIndex=0;
- $ul=$("<ul></ul>");
- for(var item in dateArr){
- $li=$("<li class='_li1'><div><img class='_img' src='"+http_path+"upload/"+dateArr[item]["NAME"]+"."+dateArr[item]["FILEEXT"]+"'/></div></li>");
- $li.on("click",function(){
- var temUrl=$(this).find("img").attr("src")
- window.open(http_path+"page/cockpit/otherpage/main_scene_pictures.html"+window.location.search+"&&imgUrl="+encodeURI(temUrl)+"&&index="+$(this).data("data"),"");});
- $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>"+
- "<br/><div class='_img_text_div'><span>描述::</span><span class='_img_text_Text' >"+dateArr[item]["DESCRIPTION"]+"</span></div></div>");
- $ul.append($li);
- $ul.find("li").last().data("data",imgIndex);
- imgIndex++;
- }
- $con.append($ul);
- setCol();
- adaptHeight($("#main_content"), $(window).height());
- }
- $(window).resize(function(){
- setCol();
- adaptHeight($("#main_content"), $(window).height());
-
- });
-
- function setCol(){
- if($(window).width()>960){
- $("#main_content").find("li[class^='_li']").each(function(){
- $(this).attr("class","");
- $(this).addClass("_li3");
- });
-
- }else if($(window).width()>600){
- $("#main_content").find("li[class^='_li']").each(function(){
- $(this).attr("class","");
- $(this).addClass("_li2");
- });
- }else{
- $("#main_content").find("li[class^='_li']").each(function(){
- $(this).attr("class","");
- $(this).addClass("_li1");
- });
- }
- }
- </script>
- </body>
- </html>
|