2603c2115feca3d243935c0c903bd4686f5c3538.svn-base 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  1. <%@page language="java" 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. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>日常应急装备</title>
  7. <%@include file="../../../../include1.jsp" %>
  8. <!--数据表格end-->
  9. <style>
  10. .stepContainer{
  11. padding:5px 0 5px 0px;
  12. }
  13. .stepTable{
  14. border:0;
  15. margin:0 auto!important;
  16. }
  17. .stepTable td{
  18. border:0;
  19. }
  20. .setp_icon{
  21. width:100px;
  22. text-align:center;
  23. }
  24. .setp_arrow{
  25. width:100px;
  26. text-align:center;
  27. }
  28. .setp_text{
  29. text-align:center;
  30. font-size:14px;
  31. font-weight:bold;
  32. }
  33. </style>
  34. <!--引用资源文件,JS CSS-->
  35. <script type="text/javascript" src="<%=path%>/scripts/freamwork/com/sinosoft/common/searchUtil.js"></script>
  36. <link href="<%=path%>/scripts/freamwork/com/sinosoft/common/searchUtil.css" rel="stylesheet" type="text/css"/>
  37. <script type="text/javascript" src="<%=path%>/scripts/jquery/plugins/jquery.extension.util.js"></script>
  38. <script type="text/javascript" src="<%=path%>/scripts/freamwork/com/sinosoft/common/common.js"></script>
  39. <script type="text/javascript" src="<%=path%>/scripts/freamwork/com/sinosoft/common/utils/utils.js"></script>
  40. <script type="text/javascript" src="<%=path%>/scripts/freamwork/com/sinosoft/common/frameWork/frameWork.js"></script>
  41. <script type="text/javascript" src="<%=path%>/scripts/freamwork/com/sinosoft/common/utils/Request.js"></script>
  42. <script type="text/javascript" src="<%=path%>/scripts/freamwork/com/sinosoft/system/invoking/invoking.js"></script>
  43. <script type="text/javascript" src="<%=path%>/scripts/business/am/resource/equipment/equip.js"></script>
  44. <script type="text/javascript">
  45. var equipId = "";
  46. var equipName = "";
  47. var CorpArea = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids();
  48. var realName = top.com.sinosoft.lz.system.user.LoginInfo.getReal_name();//取得用户真实名字
  49. var realName_ID = top.com.sinosoft.lz.system.user.LoginInfo.getUser_id();
  50. var deptId = top.com.sinosoft.lz.system.user.LoginInfo.getDeptids();//部门id
  51. var parentId = top.com.sinosoft.lz.system.user.LoginInfo.getParent_ids();//父部门id
  52. //预警范围下拉框的初始化
  53. //var deptUrl = $.pathname() + '/ws/dept/DeptService/getDepartTree';
  54. var userDeptId_inner = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids();
  55. var setting;
  56. var loadCorp = "";
  57. var g;
  58. var setloadtype_in=["deptId", userDeptId_inner,"type","","loadCorp",loadCorp];
  59. //复选框全选
  60. /* $(function(){
  61. //var deptUrl = $.pathname() + '/ws/dept/DeptService/getDepartTree';
  62. //预警级别--常量表获取
  63. $('#CURRENT_EW_LEVEL_365').initCanstSelect('BM_WarningState');
  64. //预警性质--常量表获取
  65. $('#EARLY_WARNING_PROPERTY_365').initCanstSelect('BM_PROPERTY');
  66. //预警范围,发布单位下拉框
  67. var parentId = top.com.sinosoft.lz.system.user.LoginInfo.getParent_ids();
  68. var deptUrl = $.pathname() + '/ws/dept/DeptService/getDepartTree';
  69. $.post(deptUrl,{id:parentId,name:''},function(data){
  70. $("#EARLY_WARNING_AREA_ID_365").data("data",data);
  71. $("#EARLY_WARNING_AREA_ID_365").render();
  72. $("#RELEASE_UNIT_365").data("data",data);
  73. $("#RELEASE_UNIT_365").render();
  74. }, "json");
  75. }); */
  76. $(function(){
  77. //根据json生成综合查询筛选条件ul-li列表
  78. //createConditionsDom(conditionData);
  79. //ul-li列表点击事件
  80. $(".condiTitle").unbind("click",bindSelectOne);
  81. $(".item").unbind("click").bind("click",bindSelectOne);
  82. //输入框绑定事件
  83. $(".Textinput").bind("change",inputChange);
  84. $(".item").unbind("click").bind("click",bindSelectOne);
  85. var deptUrl = $.pathname() + '/ws/dept/DeptService/getDepartTree';
  86. $.post(deptUrl,{id:parentId,name:''},function(data){
  87. $("#UNITE_NAME_279").data("data",data);
  88. $("#UNITE_NAME_279").render();
  89. /* $("#UNITE_ID_279").data("data",data);
  90. $("#UNITE_ID_279").render(); */
  91. }, "json");
  92. getChildInfo(conditionData);
  93. function getChildInfo(conditionData){//-----------------------------------------查询里面的单位
  94. var url = $.pathname() + '/ws/PlanHuiZong/ContingencyPlanHuiZong/getChidInfo1/';
  95. var params = {
  96. id : deptId,
  97. unitId : CorpArea,
  98. parentID : parentId
  99. };
  100. $.ajax({
  101. url : url,
  102. type : 'post',
  103. data : params,
  104. dataType : 'json',
  105. success : function(data){
  106. conditionData2 = JSON.stringify(data);
  107. conditionData2 = conditionData2.replace(/\\\"/g,"\"");
  108. conditionData2 = conditionData2.replace(/\"{/g,"{");
  109. conditionData2 = conditionData2.replace(/}\"/g,"}");
  110. var test = eval("("+conditionData2+")");
  111. if(conditionData2!='{"list":[{"name":"查询部门","className":"UNITS","list":[]}]}'){
  112. test.dept.list[0].name="所属单位";
  113. test.dept.list[0].className = "UNITE_ID";
  114. test.dept.list[0].equalType = "equal";
  115. //test.dept.list[0].selectType = "selectOnly";
  116. //test.dept.list[0].list.splice(0,1,{"key":"本部门","value":deptId});
  117. var parentName = test.parent.list[0].list[0].key;
  118. conditionData.list.push(test.dept.list[0]);
  119. }
  120. createConditionsDom(conditionData);
  121. },error : function(e){
  122. top.Dialog.alert("系统错误!")
  123. }
  124. });
  125. }
  126. });
  127. var conditionData = {"list":[
  128. {"name":"装备状态","className":"EQUIP_STATE","list":[{"key":"全部","value":"value"},{"key":"未调拨","value":"0"},{"key":"已调拨","value":"1"}]}
  129. ]};
  130. $(function(){
  131. /* 初始化页面布局 */
  132. var layout = $("#layout1").layout({
  133. leftWidth : 250,
  134. space : 10,
  135. onEndResize : function() {
  136. g.resetWidth();
  137. }
  138. });
  139. setting = {
  140. view : {
  141. selectedMulti : false
  142. },async : {
  143. enable : true,
  144. dataType : 'JSON',
  145. dataName : 'treeNodes',
  146. aysnc : false,
  147. //url : getAsyncUrl,
  148. url : getAsyncUrl1,
  149. autoParam : [ "id", "name", "orgLevel" ],
  150. otherParam : setloadtype_in
  151. },callback: {
  152. onClick:zTreeSelect,
  153. onAsyncSuccess:checkAndSetHeight,//changeFormat.js
  154. onExpand:checkAndSetHeight
  155. }
  156. };
  157. $.fn.zTree.init($("#treeDept-gzfw"), setting);
  158. $(".l-layout-left").css("top","10px");
  159. $(".l-layout-center").css("top","10px");
  160. });
  161. var isAdd = false;
  162. /* function getAsyncUrl(treeId, treeNode) {//包含本部等部门
  163. return isAdd ? $.pathname() + "/ws/OrganizationsService/OrganizationsService/addOrgInfoById?targetOrg=" + targetOrg
  164. //: $.pathname() + "/ws/OrganizationsService/OrganizationsService/loadSysOrgInfo2";//不包含上级单位
  165. : $.pathname() + "/ws/OrganizationsService/OrganizationsService/loadSysOrgInfo20";//包含上级单位
  166. }; */
  167. function getAsyncUrl1(treeId, treeNode) {//只包含下级单位,本级单位,上级单位
  168. //return $.pathname() + "/ws/OrganizationsService/OrganizationsService/getUnitTree";//包含上级单位
  169. return $.pathname() + "/ws/OrganizationsService/OrganizationsService/getEquipTree";//大类,小类,装备
  170. };
  171. var zTree,node,tab;
  172. var zTreeCompId = "";
  173. var zTreeINS_UNITS = "";
  174. var condition = "";
  175. //点击树节点page/system/department/UserInfoEdit.jsp
  176. function zTreeSelect(event,treeId,treeNode) {
  177. equipId = treeNode.id;
  178. equipName = treeNode.name;
  179. //init(treeNode.id);
  180. zTreeCompId = treeNode.id;
  181. zTreeINS_UNITS=treeNode.orgLevel;
  182. var getUser_id = top.com.sinosoft.lz.system.user.LoginInfo.getUser_id()+"";
  183. var CorpArea = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids();
  184. var personId = top.com.sinosoft.lz.system.user.LoginInfo.getUser_id();
  185. var i = equipId.split("-").length;
  186. /*
  187. if(i == 1 && equipId !="yingjiEquip"){
  188. condition = params.condition+ " ECM_AM_EQUIPPROPERTY_EQUIPVALUE.IS_DEL = '0' and "+//未删除
  189. " ECM_AM_EQUIPPROPERTY_EQUIPVALUE.BIGTYPE_ID='"+equipId+"' ";
  190. }else if(i == 2){
  191. condition = " ECM_AM_EQUIPPROPERTY_EQUIPVALUE.IS_DEL = '0' and "+//未删除
  192. " ECM_AM_EQUIPPROPERTY_EQUIPVALUE.SMALLTYPE_ID='"+equipId+"' ";
  193. }else if(i == 3){
  194. condition = " ECM_AM_EQUIPPROPERTY_EQUIPVALUE.IS_DEL = '0' and "+//未删除
  195. " ECM_AM_EQUIPPROPERTY_EQUIPVALUE.EQUIPTYPE_ID='"+equipId+"' ";
  196. }else if(equipId =="yingjiEquip"){
  197. condition = " ECM_AM_EQUIPPROPERTY_EQUIPVALUE.IS_DEL = '0' ";
  198. } */
  199. var $comp_id = $("#selectConditions").find(".UNITE_ID");
  200. if(equipId =="yingjiEquip"){
  201. //判断是否有用单位做查询条件
  202. if(!!$comp_id.prop("outerHTML")){
  203. //params为equip.js中search方法赋值的全局变量
  204. condition =params.condition+ " and ECM_AM_EQUIPPROPERTY_EQUIPVALUE.IS_DEL = '0' ";
  205. }else{
  206. condition = " ECM_AM_EQUIPPROPERTY_EQUIPVALUE.IS_DEL = '0' and ECM_AM_EQUIPPROPERTY_EQUIPVALUE.UNITE_ID IN (SELECT DEPT_ID FROM SYS_DEPARTMENT WHERE DEPT_PATH LIKE '%"+CorpArea+"%' AND DEPT_TYPE = '1') ";
  207. }
  208. }else{
  209. //判断是否有用单位做查询条件
  210. if(!!$comp_id.prop("outerHTML")){
  211. condition = params.condition+ " and "+//未删除
  212. " (ECM_AM_EQUIPPROPERTY_EQUIPVALUE.BIGTYPE_ID='"+equipId+"' or ECM_AM_EQUIPPROPERTY_EQUIPVALUE.SMALLTYPE_ID='"+equipId+"' or ECM_AM_EQUIPPROPERTY_EQUIPVALUE.EQUIPTYPE_ID='"+equipId+"')";
  213. }else{
  214. condition = " (ECM_AM_EQUIPPROPERTY_EQUIPVALUE.BIGTYPE_ID='"+equipId+"' or ECM_AM_EQUIPPROPERTY_EQUIPVALUE.SMALLTYPE_ID='"+equipId+"' or ECM_AM_EQUIPPROPERTY_EQUIPVALUE.EQUIPTYPE_ID='"+equipId+"') and ECM_AM_EQUIPPROPERTY_EQUIPVALUE.UNITE_ID IN (SELECT DEPT_ID FROM SYS_DEPARTMENT WHERE DEPT_PATH LIKE '%"+CorpArea+"%' AND DEPT_TYPE = '1') ";
  215. }
  216. }
  217. condition00 = condition + " ";
  218. /* if(true){
  219. if(CorpArea == treeNode.id){//本单位
  220. }else{//上级或下级单位
  221. condition = " ECM_AM_EQUIPPROPERTY_EQUIPVALUE.IS_DEL = 0 and "+//未删除
  222. " ECM_EM_PUBLISH_ALERT_NOTICE.IS_SEND=5 and "+//已发布
  223. " ECM_EM_PUBLISH_ALERT_NOTICE.IS_ALERT=0 and "+//预警
  224. " ECM_EM_PUBLISH_ALERT_NOTICE.RELEASE_UNIT='"+treeNode.id+"'";//发布单位为treeNode.id
  225. }
  226. }else{
  227. //condition = "IS_DEL='0' and (PLAN_STAT='1' or PLAN_STAT1='1' or REMARK1='"+ getUser_id +"') and UNITS='"+treeNode.id+"'";
  228. } */
  229. g.setOptions({//重置加载列表的参数
  230. params : {
  231. "listId" : "279",
  232. "condition" : condition00,
  233. direction:"DESC",
  234. sort: " ECM_AM_EQUIPPROPERTY_EQUIPVALUE.UPDATEDATE "//,
  235. //sublist:" left join ECM_EM_TREATED_HUMAN ",
  236. //subCondition:" on ECM_EM_PUBLISH_ALERT_NOTICE.FD_OBJECTID=ECM_EM_TREATED_HUMAN.BUSINESS_ID "
  237. }
  238. });
  239. g.rend();
  240. }
  241. </script>
  242. </head>
  243. <body>
  244. <div id="layout1">
  245. <!-- 左边的单位树end -->
  246. <div position="left" id="hztitle" style="margin-right:10px; ">
  247. <ul id="treeDept-gzfw" class="ztree"></ul>
  248. </div>
  249. <!-- 左边的单位树end -->
  250. <div class="plan_detail" id="plan_detail" position="center">
  251. <!-- 右上--》高级查询start -->
  252. <div class="box2" panelTitle="" id="searchPanel" statusType="none" style="margin:10px 0">
  253. <fieldset>
  254. <form id="queryForm" method="post">
  255. <table id="table" style="width:100%;">
  256. <tr>
  257. <td width="80%">
  258. <input class="validate[length[0,16]]" type="text" name="EQUIPTYPE_NAME_279" id="EQUIPTYPE_NAME_279" watermark="装备名称" clearable="true" width="300px"/>&nbsp;&nbsp;
  259. <a id="searchButt"><img src="/nwyj/scripts/qui/libs/icons/toolbar_icons/search_tem.png" alt="" /></a>
  260. <!-- <button id='searchButt' type="button"><span class="icon_find">查询</span></button> -->
  261. </td>
  262. <td width="20%" align="right"><a href="javascript:;"><span class="more_hide" id="more">综合查询&nbsp;</span></a></td><!-- <span id="more" class="icon_more">&nbsp;</span> -->
  263. </tr>
  264. </table>
  265. <div id="moreDiv" style="display: none;">
  266. <!-- 可选条件,改div作为容器,需保留 -->
  267. <div class="conditions" id="conditions">
  268. <!-- <ul>
  269. <li class="condiTitle">单位名称:</li>
  270. <li><input class="Textinput" id="EARLY_WARNING_ID_365" name="EARLY_WARNING_ID" style="width:194px" type="text"/></li>
  271. </ul> -->
  272. </div>
  273. </div>
  274. </form>
  275. </fieldset>
  276. </div>
  277. <!-- 右上--》高级查询end -->
  278. <!-- 右下--》数据列表start -->
  279. <div class="padding_right5">
  280. <div id="dataGrid"></div>
  281. </div>
  282. <!-- 右下--》数据列表end -->
  283. </div>
  284. </div>
  285. <!-- <form id="alertResponseNumForm" method="post" style="display: none;">
  286. <input name="classid" value="368" type="hidden"/>
  287. <input type="hidden" id="COMPANY_ID_368" name="COMPANY_ID_368"/>
  288. <input type="hidden" id="YEAR_368" name="YEAR_368"/>
  289. <input type="hidden" id="NUM_368" name="NUM_368"/>
  290. <input type="hidden" id="IS_ADJUST_368" name="IS_ADJUST_368" value="F"/>
  291. <input type="hidden" id="IS_ALERT_368" name="IS_ALERT_368" value="0"/>
  292. <input type="hidden" id="PLAN_TYPE_ID_368" name="PLAN_TYPE_ID_368" value="-1"/>
  293. </form> -->
  294. </body>
  295. </html>