63bdae1c7af2003c03bdfa8b742353c6ac7fbb45.svn-base 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564
  1. <%@page language="java" import="java.util.*" pageEncoding="utf-8"%>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <title>广东电网公司应急指挥系统</title>
  6. <link rel="Shortcut Icon" href="/nwyj/images/favicon.png"/>
  7. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  8. <%@include file="../../include.jsp"%>
  9. <script type="text/javascript" src="/nwyj/scripts/freamwork/com/sinosoft/system/user/LoginInfo.js"></script>
  10. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/nav/pageNumber.js"></script>
  11. <style>
  12. #keep_div{
  13. width:100%;
  14. height:105px;
  15. background:white;
  16. position:fixed;
  17. z-index:9999;
  18. }
  19. #move_div{
  20. position:absolute;
  21. margin-top:100px;
  22. width:100%;
  23. }
  24. .input_cont{
  25. margin-top:20px;
  26. text-align:left;
  27. width: 100%;
  28. }
  29. #back{
  30. position:absolute;
  31. top :10px;
  32. left:20px;
  33. height:40px;
  34. width:167px;
  35. }
  36. .search_input{
  37. position:absolute;
  38. top :14px;
  39. left:197px;
  40. padding-left:21px;
  41. background-color:#f8f8f8;
  42. height: 34px;
  43. width: 544px;
  44. font-size: 18px!important;
  45. }
  46. .search_img{
  47. position:absolute;
  48. top :14px;
  49. left:765px;
  50. height: 38px;
  51. line-height:38px;
  52. text-decoration:none;
  53. display:inline-block;
  54. text-align:center;
  55. width: 100px;
  56. background-color: #3388ff;
  57. }
  58. .search{
  59. color:#ffffff;
  60. font-family:宋体;
  61. font-size:14px;
  62. }
  63. .backdiv{
  64. margin-top:58px;
  65. height:40px;
  66. line-height:45px;
  67. background:#ebebeb;
  68. }
  69. .rightshow{
  70. margin-left:197px;
  71. }
  72. .moreSearch{
  73. height:350px;
  74. width:80%;
  75. border: 1px solid #cdcaca;
  76. border-bottom: 4px solid #cdcaca;
  77. background:white;
  78. display:none;
  79. /* box-shadow: 0 0 10px #000; */
  80. }
  81. #searchLevel{
  82. top:20px;
  83. margin-left:30px;
  84. }
  85. #listStyle{
  86. top:40px;
  87. margin-left:30px;
  88. }
  89. #searchTime{
  90. top:60px;
  91. margin-left:30px;
  92. }
  93. #searchArea{
  94. top:60px;
  95. margin-left:30px;
  96. /* border:1px solid red; */
  97. width: 700px;
  98. height: 200px;
  99. }
  100. #searchTree{
  101. /* border:1px solid #7a7a7a; */
  102. width: 500px;
  103. height: 200px;
  104. float:left;
  105. }
  106. .numshow{
  107. margin-top:10px;
  108. margin-left:197px;
  109. color:#999999;
  110. font-family:宋体;
  111. font-size:12px;
  112. width:423px;
  113. }
  114. .bottomshow{
  115. margin-left:197px;
  116. }
  117. #ul li{
  118. display:none;
  119. display:inline-block;
  120. font-family:宋体;
  121. font-size:14px;
  122. cursor:hand;
  123. cursor:pointer;
  124. width:60px;
  125. height:40px;
  126. fontWeight:"normal";
  127. text-decoration:"none";
  128. text-align:center;
  129. color:#666666;
  130. }
  131. .outdiv{
  132. margin-top:10px;
  133. }
  134. #tableContent div{
  135. margin-left:197px;
  136. margin-bottom:20px;
  137. }
  138. p{
  139. margin-top:0px;
  140. margin-bottom:0px;
  141. }
  142. .pageNumber{
  143. /* clear:both; */
  144. margin-top:24px;
  145. margin-left:197px;
  146. }
  147. .tabFocus{
  148. border-bottom:4px blue solid;
  149. font-weight:bold;
  150. }
  151. </style>
  152. <script type="text/javascript">
  153. // 搜索内容
  154. var name ="<%=new String(java.net.URLDecoder.decode(request.getParameter("name")).getBytes("ISO-8859-1"),"utf-8")%>";
  155. var logname = "<%=new String(java.net.URLDecoder.decode(request.getParameter("loginName")).getBytes("ISO-8859-1"),"utf-8")%>";
  156. // 分类 all 全部 file 文件 team 队伍 equip 装备 goods 物资 app 更多
  157. var type='all';
  158. $(function(){
  159. $("html").css("overflow-y","auto");
  160. $("#search_img_inputt").on("keyup",function(event){
  161. var e = event||window.event;
  162. if(e&&e.keyCode == "13"){
  163. name=$("#search_img_inputt").val();
  164. var seaData={};
  165. if(type=='app'){
  166. var level=$("input:radio[name=level]").filter("[checked]").val();
  167. var sort=$("input:radio[name=sort]").filter("[checked]").val();
  168. var startTime=$("#startTime").val();
  169. var endTime=$("#endTime").val();
  170. var selectTree=$("#selectTree4-2").attr("relValue");
  171. seaData={name:name,index:'0',type:type,level:level,sort:sort,startTime:startTime,endTime:endTime,selectTree:selectTree,logname:logname};
  172. }else{
  173. seaData={name:name,index:'0',type:type,logname:logname};
  174. }
  175. $.ajax({
  176. url : $.pathname() + '/ws/sys/constantService/sysSearch/',
  177. type : 'post',
  178. timeout : 15000,
  179. data : seaData,
  180. dataType : 'json',
  181. async:false,
  182. success : function(data){
  183. initContent(data);
  184. $(".pageNumber").attr("page",0);
  185. $(".pageNumber").render();
  186. },
  187. error : function(e){
  188. $.messager.alert('访问服务失败!', '访问服务失败!', 'error');
  189. }
  190. });
  191. }
  192. });
  193. $.ajax({
  194. url : $.pathname() + '/ws/sys/constantService/sysSearch/',
  195. type : 'post',
  196. timeout : 15000,
  197. data : {name:name,index:'0',type:type,logname:logname},
  198. dataType : 'json',
  199. async:false,
  200. success : function(data){
  201. initContent(data);
  202. $(".pageNumber").render();
  203. },
  204. error : function(e){
  205. $.messager.alert('访问服务失败!', '访问服务失败!', 'error');
  206. }
  207. });
  208. $(".pageNumber").bind("pageChange",function(e,index){
  209. var first=index*10;
  210. var seaData={};
  211. if(type=='app'){
  212. var level=$("input:radio[name=level]").filter("[checked]").val();
  213. var sort=$("input:radio[name=sort]").filter("[checked]").val();
  214. var startTime=$("#startTime").val();
  215. var endTime=$("#endTime").val();
  216. var selectTree=$("#selectTree4-2").attr("relValue");
  217. seaData={name:name,index:first,type:type,level:level,sort:sort,startTime:startTime,endTime:endTime,selectTree:selectTree,logname:logname};
  218. }else{
  219. seaData={name:name,index:first,type:type,logname:logname};
  220. }
  221. $.ajax({
  222. url : $.pathname() + '/ws/sys/constantService/sysSearch/',
  223. type : 'post',
  224. timeout : 15000,
  225. data : seaData,
  226. dataType : 'json',
  227. async:false,
  228. success : function(data){
  229. initContent(data);
  230. },
  231. error : function(e){
  232. $.messager.alert('访问服务失败!', '访问服务失败!', 'error');
  233. }
  234. });
  235. });
  236. $("#ul li").each(function(index){
  237. $(this).click(function(){
  238. $("#ul li.tabFocus").removeClass("tabFocus").css("color","#666666");
  239. $(this).addClass("tabFocus").css("color","blue");
  240. var t=$(this).html();
  241. if(t=='全部'){
  242. type='all';
  243. }else if(t=='文件'){
  244. type='file';
  245. }else if(t=='队伍'){
  246. type='team';
  247. }else if(t=='装备'){
  248. type='equip';
  249. }else if(t=='物资'){
  250. type='goods';
  251. }else if(t=='更多&gt;&gt;'){
  252. type='app';
  253. $(".moreSearch").toggle();
  254. }
  255. if(type!='app'){
  256. $.ajax({
  257. url : $.pathname() + '/ws/sys/constantService/sysSearch/',
  258. type : 'post',
  259. timeout : 15000,
  260. data : {name:name,index:'0',type:type,logname:logname},
  261. dataType : 'json',
  262. async:false,
  263. success : function(data){
  264. initContent(data);
  265. $(".pageNumber").attr("page",0);
  266. $(".pageNumber").render();
  267. },
  268. error : function(e){
  269. $.messager.alert('访问服务失败!', '访问服务失败!', 'error');
  270. }
  271. });
  272. }
  273. });
  274. });
  275. $("body:eq(0)").bind("click" ,function (event){
  276. var e = event || window.event;
  277. var elem = e.srcElement || e.target;
  278. var type=$(".moreSearch").css("display");
  279. if(elem.id !="moreli"){
  280. if(type=='block'){
  281. var outSide=true;
  282. while(elem){
  283. var name=$(elem).attr("class");
  284. if(name =='moreSearch'){
  285. outSide=false;
  286. }
  287. elem=elem.parentNode;
  288. }
  289. if(outSide){
  290. $(".moreSearch").css('display','none');
  291. }
  292. }
  293. }
  294. });
  295. $.post($.pathname() + '/ws/rolebutton/RoleService/getSearchTree',{},function(result){
  296. $("#selectTree4-2").data("data",result);
  297. //刷新树形下拉框
  298. $("#selectTree4-2").render();
  299. },"json");
  300. });
  301. //跳转详细页面
  302. function hello(a){
  303. var length=a.length-1;
  304. var fd_id=a.substring(0,length);
  305. var type=a.substr(length);
  306. var local='';
  307. switch(type){
  308. case 'a' : local = "/nwyj/page/business/am/resource/team/teaminfo-outhistory.jsp?"+fd_id ; break;
  309. case 'b' : local = "/nwyj/page/business/am/resource/ledger/generator-car-infohitory.jsp?"+fd_id ; break;
  310. case 'c' : local = "/nwyj/page/business/am/resource/ledger/generator-infohistory.jsp?"+fd_id ; break;
  311. case 'd' : local = "/nwyj/page/business/am/fileManager/governmentDoc/governmentDocViewhistory.jsp?fd_id="+fd_id ; break;
  312. case 'e' : local = "/nwyj/page/business/am/fileManager/document/document_viewhistory.jsp?"+fd_id ; break;
  313. case 'f' : local = "/nwyj/page/business/am/fileManager/standard/standard_viewhistory.jsp?"+fd_id ; break;
  314. case 'g' : local = "/nwyj/page/business/am/fileManager/laws/laws_viewhistory.jsp?"+fd_id ; break;
  315. case 'h' : local = "/nwyj/page/business/am/resource/resources/external_resources-infohistory.jsp?"+fd_id ; break;
  316. }
  317. /* alert(fd_id);
  318. alert(type);
  319. alert(local); */
  320. /* var diag = new top.Dialog();// 定义一个窗口对象
  321. diag.Title = "查看详细";// 窗口标题
  322. diag.URL =local;// 窗口对应的页面
  323. diag.Height = 520;
  324. diag.Width = 1000;
  325. diag.ShowOkButton=false;// 不显示确认按钮
  326. diag.ShowCancelButton=false;// 不显示取消按钮
  327. diag.ButtonAlign="center";// 按钮居中
  328. diag.CancelEvent = function(){
  329. diag.close();
  330. diag=null;
  331. };
  332. diag.show();// 显示窗口 */
  333. window.open(local);
  334. }
  335. function initContent(json){
  336. location.href="#firstAnchor";
  337. $("#tableContent").empty();
  338. var total=json.total;
  339. $("#numberSpan").html(total);
  340. $(".pageNumber").attr("total",json.total);
  341. $(".pageNumber").attr("pageSize",10);
  342. var last=Math.floor(total/10);
  343. if(last == '0' ){
  344. last=total;
  345. }else {
  346. last=10;
  347. }
  348. for(var i=0;i<last;i=i+1){
  349. var nn=json.rows[i].FD_OBJECTID;
  350. var title=json.rows[i].NAME;
  351. var one=json.rows[i].ONE;
  352. var two=json.rows[i].TWO;
  353. var three=json.rows[i].THREE;
  354. //var reg=/()/;
  355. title=title.replace(new RegExp(name),"<font color=red>"+name+"</font>");
  356. one=one.replace(new RegExp(';'),"<font color=red>;</font>");
  357. two=two.replace(new RegExp(';'),"<font color=red>;</font>");
  358. two=two.replace(new RegExp(name),"<font color=red>"+name+"</font>");
  359. $div=$('<div></div>');
  360. $title1=$('<a>'+title+'</a>');
  361. $title1.css('fontFamily','宋体');
  362. $title1.css('fontSize','16px');
  363. $title1.css('color','#0a0c71');
  364. $title1.attr('href',"javascript:hello('"+nn+"')");
  365. $("#tableContent").append($div);
  366. $div.append($title1)
  367. $p1=$('<p>'+one+'</p>');
  368. $p2=$('<p>'+two+'</p>');
  369. $p3=$('<p>'+three+'</p>');
  370. $p3.css('fontFamily','宋体');
  371. $p3.css('fontSize','12px');
  372. $p3.css('color','#25671d');
  373. $div.append($p1);
  374. $div.append($p2);
  375. $div.append($p3);
  376. }
  377. if(total == '0'){
  378. $("#tableContent").empty();
  379. $div=$('<div>无搜索结果!</div>');
  380. $div.css('fontFamily','宋体');
  381. $div.css('fontSize','16px');
  382. $div.css('color','#a90f0f');
  383. $("#tableContent").append($div);
  384. }
  385. }
  386. function searchData1(){
  387. var seaData={};
  388. if(type=='app'){
  389. var level=$("input:radio[name=level]").filter("[checked]").val();
  390. var sort=$("input:radio[name=sort]").filter("[checked]").val();
  391. var startTime=$("#startTime").val();
  392. var endTime=$("#endTime").val();
  393. var selectTree=$("#selectTree4-2").attr("relValue");
  394. seaData={name:name,index:'0',type:type,level:level,sort:sort,startTime:startTime,endTime:endTime,selectTree:selectTree,logname:logname};
  395. }else{
  396. seaData={name:name,index:'0',type:type,logname:logname};
  397. }
  398. name=$("#search_img_inputt").val();
  399. $.ajax({
  400. url : $.pathname() + '/ws/sys/constantService/sysSearch/',
  401. type : 'post',
  402. timeout : 15000,
  403. data : seaData,
  404. dataType : 'json',
  405. async:false,
  406. success : function(data){
  407. initContent(data);
  408. $(".pageNumber").attr("page",0);
  409. $(".pageNumber").render();
  410. },
  411. error : function(e){
  412. $.messager.alert('访问服务失败!', '访问服务失败!', 'error');
  413. }
  414. });
  415. }
  416. function change(obj){
  417. //obj.style.background = "red";
  418. obj.style.fontWeight="bold";
  419. //obj.style.textDecoration="underline";
  420. //obj.style.paddingBottom="2px";
  421. //obj.style.borderBotttom="4px";
  422. obj.style.color="blue";
  423. obj.style.border ="solid red 3px";
  424. obj.style.borderBotttom ="4px solid #fff ";
  425. //alert(obj.innerHTML);
  426. var o =$(obj);
  427. o.addClass("selectedLi");
  428. //o.s
  429. }
  430. </script>
  431. </head>
  432. <body>
  433. <a name="firstAnchor"></a>
  434. <div id="keep_div">
  435. <div class="input_cont" >
  436. <a href="javascript:;">
  437. <img id="back" align="left" alt="返回" src="/nwyj/images/temp/logo_03.png" onclick="javascript:window.location.href='SysSearch.jsp';" />
  438. </a>
  439. <input watermark="搜索应用/文件/队伍/装备/物资" type="text" class="search_input" id="search_img_inputt">
  440. <a href="javascript:searchData1();" class="search_img" ><font class="search">搜索一下</font></a>
  441. </div>
  442. <div class="backdiv">
  443. <div class="rightshow">
  444. <ul id="ul">
  445. <li >全部</li>
  446. <li >文件</li>
  447. <li >队伍</li>
  448. <li >装备</li>
  449. <li >物资</li>
  450. <li id="moreli">更多>></li>
  451. </ul>
  452. <div class="moreSearch">
  453. <div id="searchLevel">
  454. 搜索级别 &nbsp;&nbsp;&nbsp;&nbsp;
  455. <input type="radio" id="allLevel" name="level" value="allFIle" /><label for="allLevel" class="hand">全文</label>
  456. <input type="radio" id="titleLevel" name="level" value="searchTitle" /><label for="titleLevel" class="hand">标题</label>
  457. </div>
  458. <div id="listStyle">
  459. 排序方式 &nbsp;&nbsp;&nbsp;&nbsp;
  460. <input type="radio" id="relativeSort" name="sort" value="relativeSort" /><label for="relativeSort" class="hand">相关度</label>
  461. <input type="radio" id="timeSort" name="sort" value="timeSort" /><label for="timeSort" class="hand">发帖时间</label>
  462. </div>
  463. <div id="searchTime">
  464. 搜索时间 &nbsp;&nbsp;&nbsp;&nbsp;
  465. <input type="text" id="startTime" style="width:100px;" class="date"/> &nbsp; 至 &nbsp;
  466. <input type="text" id="endTime" style="width:100px;" class="date"/>
  467. </div>
  468. <div id="searchArea">
  469. <div style="float:left">搜索版块 &nbsp;&nbsp;&nbsp;&nbsp;</div>
  470. <div id="searchTree">
  471. <div selWidth="500" boxWidth="500" boxHeight="170" class="selectTree" id="selectTree4-2" keepDefaultStyle="true"></div>
  472. </div>
  473. </div>
  474. </div>
  475. </div>
  476. </div>
  477. </div>
  478. <div id="move_div">
  479. <div class="numshow">
  480. <span>为您找到相关结果<span id="numberSpan">0</span>个</span>
  481. <hr style="border:0;background-color:#d9e3ec;height:1px">
  482. </div>
  483. <div class="outdiv">
  484. <div id="tableContent"></div>
  485. </div>
  486. <div>
  487. <div class="pageNumber" total="0" showSelect="false" showInput="true"></div>
  488. <div style="width:100%;height:20px"></div>
  489. </body>
  490. </html>