searchconfig.html 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="renderer" content="webkit|ie-comp|ie-stand">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
  8. <meta http-equiv="Cache-Control" content="no-siteapp" />
  9. <!--[if lt IE 9]>
  10. <script type="text/javascript" src="${ctx}/assets/lib/html5.js"></script>
  11. <script type="text/javascript" src="${ctx}/assets/lib/respond.min.js"></script>
  12. <script type="text/javascript" src="${ctx}/assets/lib/PIE_IE678.js"></script>
  13. <![endif]-->
  14. <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui/css/H-ui.min.css" />
  15. <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui.admin/css/H-ui.admin.css" />
  16. <link rel="stylesheet" type="text/css" href="${ctx}/assets/lib/Hui-iconfont/1.0.7/iconfont.css" />
  17. <link rel="stylesheet" type="text/css" href="${ctx}/assets/lib/icheck/icheck.css" />
  18. <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui.admin/skin/default/skin.css" id="skin" />
  19. <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui.admin/css/style.css" />
  20. <script type="text/ecmascript" src="${ctx}/assets/lib/jquery/1.9.1/jquery.js"></script>
  21. <script type="text/javascript" src="${ctx}/assets/static/h-ui/js/H-ui.js"></script>
  22. <link rel="stylesheet" type="text/css" media="screen" href="${ctx}/assets/lib/jqueryui/jquery-ui.css" />
  23. <script type="text/ecmascript" src="${ctx}/assets/lib/jqueryui/jquery-ui.js"></script>
  24. <script type="text/javascript" src="${ctx}/assets/js/base.js"></script>
  25. <link rel="stylesheet" href="${ctx}/assets/lib/zTree/v3/css/zTreeStyle/zTreeStyle.css" type="text/css">
  26. <script type="text/javascript" src="${ctx}/assets/lib/zTree/v3/js/jquery.ztree.all-3.5.min.js"></script>
  27. <script type="text/javascript" src="${ctx}/assets/lib/layer/3.0.3/layer.js"></script>
  28. <!--[if IE 6]>
  29. <script type="text/javascript" src="${ctx}/assets/lib/DD_belatedPNG_0.0.8a-min.js" ></script>
  30. <script>DD_belatedPNG.fix('*');</script>
  31. <![endif]-->
  32. <style type="text/css">
  33. ul.ztree {
  34. margin-top: 10px;
  35. border: 1px solid #617775;
  36. background: #f0f6e4;
  37. width: 220px;
  38. height: 360px;
  39. overflow-y: scroll;
  40. overflow-x: auto;
  41. }
  42. </style>
  43. <script type="text/javascript">
  44. var setting = {
  45. check: {
  46. enable: true,
  47. chkStyle: "radio",
  48. radioType: "all"
  49. },
  50. view: {
  51. dblClickExpand: false
  52. },
  53. data: {
  54. key: {
  55. name:"sitename",
  56. title:"站点树"
  57. },
  58. simpleData: {
  59. idKey:"siteid",
  60. pIdKey:"parentid",
  61. enable:true,
  62. rootPId:"0"
  63. }
  64. },
  65. callback: {
  66. onClick: onClick,
  67. onCheck: onCheck
  68. }
  69. };
  70. var zNodes =${sites};
  71. function onClick(e, treeId, treeNode) {
  72. var zTree = $.fn.zTree.getZTreeObj("treeDemo");
  73. zTree.checkNode(treeNode, !treeNode.checked, null, true);
  74. return false;
  75. }
  76. function onCheck(e, treeId, treeNode) {
  77. var zTree = $.fn.zTree.getZTreeObj("treeDemo"),
  78. nodes = zTree.getCheckedNodes(true),
  79. v = "";
  80. siteID="";
  81. for (var i=0, l=nodes.length; i<l; i++) {
  82. v += nodes[i].sitename + ",";
  83. siteID += nodes[i].siteid + ",";
  84. }
  85. if (v.length > 0 ) v = v.substring(0, v.length-1);
  86. if (siteID.length > 0 ) siteID = siteID.substring(0, siteID.length-1);
  87. $("#citySel").attr("value", v);
  88. $("#siteID").val(siteID);
  89. }
  90. function showMenu() {
  91. var cityObj = $("#citySel");
  92. var cityOffset = $("#citySel").offset();
  93. $("#menuContent").slideDown("fast");
  94. $("body").bind("mousedown", onBodyDown);
  95. }
  96. function hideMenu() {
  97. $("#menuContent").fadeOut("fast");
  98. $("body").unbind("mousedown", onBodyDown);
  99. }
  100. function onBodyDown(event) {
  101. if (!(event.target.id == "menuBtn" || event.target.id == "citySel" || event.target.id == "menuContent" || $(event.target).parents("#menuContent").length>0)) {
  102. hideMenu();
  103. }
  104. }
  105. $(function(){
  106. $.Huitab("#tab-system .tabBar span","#tab-system .tabCon","current","click","0");
  107. $("#searchopen option[value='${config.open!}']").attr("selected", true);
  108. $("#savesearch").click(function(){
  109. var formData=$("#form2").serialize();
  110. $.post("${ctx}/myconsole/cmssearch/save",formData,function(data){
  111. layer.msg(data);
  112. })
  113. })
  114. $.fn.zTree.init($("#treeDemo"), setting, zNodes);
  115. $("#runsearch").click(function(data){
  116. var index = layer.load(1, {
  117. shade: [0.1,'#fff'] //0.1透明度的白色背景
  118. });
  119. var formData=$("#form1").serialize();
  120. $.post("${ctx}/myconsole/cmssearch/run",formData,function(data){
  121. layer.closeAll('loading');
  122. layer.msg(data);
  123. })
  124. })
  125. })
  126. </script>
  127. <title>我的桌面</title>
  128. </head>
  129. <body>
  130. <div class="page-container">
  131. <div class="form form-horizontal" id="form-article" method="post">
  132. <div id="tab-system" class="HuiTab">
  133. <div class="tabBar cl"><span>手动建索引</span><span>检索设置</span></div>
  134. <div class="tabCon">
  135. <form name="form1" id="form1">
  136. <div class="row cl">
  137. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>选择站点:</label>
  138. <div class="formControls col-xs-8 col-sm-9">
  139. <div class="zTreeDemoBackground left">
  140. <ul class="list">
  141. <input id="citySel" type="text" readonly value="" style="width:120px;"/>
  142. <input name="siteID" id="siteID" type="hidden" value="">
  143. &nbsp;<a id="menuBtn" href="#" onclick="showMenu(); return false;">选择</a>
  144. </ul>
  145. </div>
  146. <div id="menuContent" class="menuContent" style="display:none; position: absolute;z-index:999">
  147. <ul id="treeDemo" class="ztree" style="margin-top:0; width:180px; height: 300px;"></ul>
  148. </div>
  149. </div>
  150. </div>
  151. <div class="row cl">
  152. <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
  153. <button id="runsearch" class="btn btn-primary radius" type="button"><i class="Hui-iconfont">&#xe632;</i>执行</button>
  154. </div>
  155. </div>
  156. </form>
  157. </div>
  158. <div class="tabCon">
  159. <form name="form2" id="form2">
  160. <div class="row cl">
  161. <label class="form-label col-xs-4 col-sm-2">是否开启自动建索引:</label>
  162. <div class="formControls col-xs-8 col-sm-9">
  163. <select class="select" name="search.open" id="searchopen">
  164. <option value="true">是</option>
  165. <option value="false">否</option>
  166. </select>
  167. </div>
  168. </div>
  169. <div class="row cl">
  170. <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
  171. <button id="savesearch" class="btn btn-primary radius" type="button"><i class="Hui-iconfont">&#xe632;</i> 保存</button>
  172. <button onClick="layer_close();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
  173. </div>
  174. </div>
  175. </form>
  176. </div>
  177. </div>
  178. </div>
  179. </div>
  180. <footer class="footer mt-20">
  181. <div class="container">
  182. <p></p>
  183. </div>
  184. </footer>
  185. </body>
  186. </html>