analysistaskindex.jsp 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424
  1. <%@ page language="java" contentType="text/html;charset=utf-8"%>
  2. <%@include file="/pages/includes/taglibs.jsp"%>
  3. <head>
  4. <script type="text/javascript"
  5. src="<%=request.getContextPath()%>/resource/js/jquery-1.8.3.js">
  6. </script>
  7. <script
  8. src="<%=request.getContextPath()%>/resource/js/highcharts/highcharts.js"
  9. type="text/javascript">
  10. </script>
  11. <script
  12. src="<%=request.getContextPath()%>/resource/js/highcharts/themes/grid.js"
  13. type="text/javascript">
  14. </script>
  15. <script type="text/ecmascript"
  16. src="<%=request.getContextPath()%>/resource/plugin/jqgrid/js/jquery.jqGrid.min.js">
  17. </script>
  18. <script type="text/ecmascript"
  19. src="<%=request.getContextPath()%>/resource/js/system/jqdatagrid.js">
  20. </script>
  21. <script type="text/ecmascript"
  22. src="<%=request.getContextPath()%>/resource/js/system/jqdatatreegrid.js">
  23. </script>
  24. <script
  25. src="<%=request.getContextPath()%>/resource/js/datePicker/WdatePicker.js"
  26. type="text/javascript">
  27. </script>
  28. <link rel="stylesheet" type="text/css"
  29. href="<%=request.getContextPath()%>/resource/plugin/jqueryui/css/custom-theme/jquery-ui-1.9.2.custom.css" />
  30. <link rel="stylesheet" type="text/css" media="screen"
  31. href="<%=request.getContextPath()%>/resource/plugin/jqgrid/css/ui.jqgrid.css" />
  32. <link rel="stylesheet"
  33. href="<%=request.getContextPath()%>/resource/css/ztree/zTreeStyle.css"
  34. type="text/css">
  35. <script
  36. src="<%=request.getContextPath()%>/resource/js/ztree/jquery.ztree.all.min.js"
  37. type="text/javascript">
  38. </script>
  39. <style type="text/css">
  40. .normal {
  41. border-right-style: solid;
  42. border-bottom-style: solid;
  43. border-left-style: solid;
  44. border-top-style: solid;
  45. border-top-color: #ffffff;
  46. border-left-color: #f1f1f1;
  47. border-right-color: #f1f1f1;
  48. border-bottom-color: #f1f1f1;
  49. border-width: 1px;
  50. width: 100px;
  51. height: 28px;
  52. float: left;
  53. margin-top: -1px;
  54. cursor: pointer;
  55. text-align: center;
  56. line-height: 28px;
  57. overflow: hidden;
  58. font-weight: bold;
  59. font-size: 12px;
  60. font-family: tahoma, arial, verdana, sans-serif;
  61. }
  62. .disable {
  63. border-right-style: solid;
  64. border-bottom-style: solid;
  65. border-left-style: solid;
  66. border-top-style: solid;
  67. border-top-color: #f1f1f1;
  68. border-left-color: #f1f1f1;
  69. border-right-color: #f1f1f1;
  70. border-bottom-color: #f1f1f1;
  71. border-width: 1px;
  72. width: 100px;
  73. height: 25px;
  74. float: left;
  75. margin-top: -1px;
  76. cursor: pointer;
  77. text-align: center;
  78. background-color: #e1e1e1;
  79. line-height: 25px;
  80. overflow: hidden;
  81. font-weight: bold;
  82. font-size: 12px;
  83. font-family: tahoma, arial, verdana, sans-serif;
  84. }
  85. .panelcontainer {
  86. width: 100%;
  87. height: 70px;
  88. border-style: solid;
  89. border-color: #f1f1f1;
  90. border-width: 1px;
  91. }
  92. .panelquery {
  93. width: 100%;
  94. height: 25px;
  95. background-color: #f1f1f1;
  96. line-height: 25px;
  97. }
  98. .panelquerytext {
  99. margin-left: 3px;
  100. font-weight: bold;
  101. font-size: 12px;
  102. font-family: tahoma, arial, verdana, sans-serif;
  103. }
  104. .querycondcontainer {
  105. line-height: 39px;
  106. padding: 3px;
  107. float: left;
  108. font-size: 12px;
  109. }
  110. </style>
  111. <script type="text/javascript">
  112. function displaybuttons1(cellvalue, options, rawObject) {
  113. var detail = "<input type='button' value='详情' onclick=showJqGrid1('"
  114. + rawObject.id + "')>";
  115. return "&nbsp;&nbsp;&nbsp;\t" + detail;
  116. };
  117. function displaybuttons2(cellvalue, options, rawObject) {
  118. var detail = "<input type='button' value='详情' onclick=showJqGrid2('"
  119. + rawObject.id + "')>";
  120. return "&nbsp;&nbsp;&nbsp;\t" + detail;
  121. };
  122. function showJqGrid() {
  123. var windpowerstationid = $("#windpowerstationid").val();
  124. var beginDate = $("#beginDate").val();
  125. var endDate = $("#endDate").val();
  126. var id = 'gridTable';
  127. var url = "<%=request.getContextPath()%>/analysistask/analysistasklist.action?windpowerstationid="
  128. + windpowerstationid
  129. + "&beginDate="
  130. + beginDate
  131. + "&endDate="
  132. + endDate;
  133. var datatype = 'json';
  134. var colNames = [ '工程', '风机', '任务时间', '操作' ];
  135. var colModel = [
  136. {
  137. name : 'projectid',
  138. index : 'projectid',
  139. width : 300,
  140. align : 'center'
  141. }, {
  142. name : 'windturbineid',
  143. index : 'windturbineid',
  144. width : 300,
  145. align : 'center'
  146. }, {
  147. name : 'tasktime',
  148. index : 'tasktime',
  149. width : 300,
  150. align : 'center'
  151. }, {
  152. name : 'tasktime',
  153. index : 'tasktime',
  154. width : 300,
  155. align : 'center',
  156. formatter : displaybuttons1
  157. } ];
  158. var caption = '风机故障诊断任务';
  159. var sortname = 'tasktime';
  160. var gridPagerID = 'gridPager';
  161. var sortorder = 'desc';
  162. var height = 'auto';
  163. var width = 'auto';
  164. var rownumbers = true;
  165. var multiselect = false;
  166. myJqGrid(id, url, datatype, colNames, colModel, caption, sortname,
  167. gridPagerID, sortorder, height, width, multiselect, rownumbers);
  168. }
  169. function showJqGrid1(acid) {
  170. $("#back1").css("display", "");
  171. $("#back2").css("display", "none");
  172. $("#task").css("display", "none");
  173. $("#taskconclusion").css("display", "");
  174. $("#taskdetail").css("display", "none");
  175. var id = 'gridTable1';
  176. var url = "<%=request.getContextPath()%>/analysistask/analysisConclusionlist.action?acid=" + acid;
  177. var datatype = 'json';
  178. var colNames = [ '风机', '型号', '评分', '操作' ];
  179. var colModel = [
  180. {
  181. name : 'windturbineid',
  182. index : 'windturbineid',
  183. width : 300,
  184. align : 'center'
  185. }, {
  186. name : 'modelid',
  187. index : 'modelid',
  188. width : 300,
  189. align : 'center'
  190. }, {
  191. name : 'score',
  192. index : 'score',
  193. width : 300,
  194. align : 'center'
  195. }, {
  196. name : 'score',
  197. index : 'score',
  198. width : 200,
  199. align : 'center',
  200. formatter : displaybuttons2
  201. } ];
  202. var caption = '风机监控诊断结论';
  203. var sortname = 'score';
  204. var gridPagerID = 'gridPager1';
  205. var sortorder = 'desc';
  206. var height = 'auto';
  207. var width = 'auto';
  208. var rownumbers = true;
  209. var multiselect = false;
  210. myJqGrid(id, url, datatype, colNames, colModel, caption, sortname,
  211. gridPagerID, sortorder, height, width, multiselect, rownumbers);
  212. }
  213. function showJqGrid2(acid) {
  214. $("#back1").css("display", "none");
  215. $("#back2").css("display", "");
  216. $("#task").css("display", "none");
  217. $("#taskconclusion").css("display", "none");
  218. $("#taskdetail").css("display", "");
  219. var id = 'gridTable2';
  220. var url = "<%=request.getContextPath() %>/analysistask/analysistaskDetaillist.action?acid="+acid;
  221. var datatype = 'json';
  222. var colNames = [ '部件名称','评分'];
  223. var colModel = [
  224. { name: 'unitnmae', index: 'unitnmae', width: 500, align: 'left'},
  225. { name: 'factvalue', index: 'factvalue', width: 500, align: 'center'}
  226. ];
  227. var caption = '风机故障诊断结论明细';
  228. var sortname = 'unitnmae';
  229. var gridPagerID ='gridPager2';
  230. var sortorder='desc';
  231. var height='auto';
  232. var width='auto';
  233. var rownumbers=false;
  234. var multiselect=false;
  235. myJqTreeGrid(id, url, datatype, colNames, colModel, caption, sortname, gridPagerID,sortorder,height,width,
  236. multiselect,rownumbers);
  237. }
  238. function back1() {
  239. $("#task").css("display", "");
  240. $("#taskconclusion").css("display", "none");
  241. $("#taskdetail").css("display", "none");
  242. $("#back1").css("display", "none");
  243. $("#back2").css("display", "none");
  244. }
  245. function back2() {
  246. $("#task").css("display", "none");
  247. $("#taskconclusion").css("display", "");
  248. $("#taskdetail").css("display", "none");
  249. $("#back1").css("display", "");
  250. $("#back2").css("display", "none");
  251. }
  252. function queryApData() {
  253. $("#gridTable").jqGrid('GridUnload');
  254. $("#gridTable1").jqGrid('GridUnload');
  255. $("#gridTable2").jqGrid('GridUnload');
  256. $("#task").css("display", "");
  257. $("#taskconclusion").css("display", "none");
  258. $("#taskdetail").css("display", "none");
  259. $("#back1").css("display", "none");
  260. $("#back2").css("display", "none");
  261. showJqGrid();
  262. }
  263. function saveApData() {
  264. $("#f1").attr("action", "../analysistask/saveAnalysistaskpjindex.action").submit();
  265. }
  266. function initial() {
  267. $("#windpowerstationid").val("麻黄山风电场");
  268. showJqGrid();
  269. }
  270. $(document).ready(function() {
  271. initial();
  272. });
  273. </script>
  274. </head>
  275. <body>
  276. <form action="" method="post" id="f1" style="width: 1620px;">
  277. <div class="panelcontainer" style="width: 1620px;">
  278. <div class="panelquery">
  279. <span class="panelquerytext">风机故障诊断历史查询</span>
  280. </div>
  281. <div id="modelpanel" class="querycondcontainer">
  282. 风场:
  283. <s:select list="wps" cssStyle="width:100px" listKey="id"
  284. listValue="name" id="windpowerstationid" name="windpowerstationid" headerKey=""
  285. headerValue="请选择"></s:select>
  286. </div>
  287. <div class="querycondcontainer" id="begindiv" >
  288. 开始时间:
  289. <input type="text" style="width: 150px;" class="Wdate"
  290. onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowWeek:true,readOnly:true})"
  291. id="beginDate" name="beginDate" />
  292. </div>
  293. <div class="querycondcontainer" id="enddiv" >
  294. 结束时间:
  295. <input type="text" style="width: 150px;" class="Wdate"
  296. onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowWeek:true,readOnly:true})"
  297. id="endDate" name="endDate" />
  298. </div>
  299. <div
  300. style="float: left; line-height: 39px; margin-left: 20px; width: 200px;">
  301. <input type="button" value="查询" onClick="queryApData()" />
  302. </div>
  303. <div id="back1"
  304. style="float: left; line-height: 39px; margin-left: 20px; width: 200px;display: none">
  305. <input type="button" value="返回" onClick="back1()" />
  306. </div>
  307. <div id="back2"
  308. style="float: left; line-height: 39px; margin-left: 20px; width: 200px;display: none">
  309. <input type="button" value="返回" onClick="back2()" />
  310. </div>
  311. </div>
  312. <div id="task">
  313. <table id='gridTable'>
  314. </table>
  315. <div id='gridPager'></div>
  316. </div>
  317. <div id="taskconclusion" style="display: none">
  318. <table id='gridTable1'>
  319. </table>
  320. <div id='gridPager1'></div>
  321. </div>
  322. <div id="taskdetail" style="display: none">
  323. <table id='gridTable2'>
  324. </table>
  325. <div id='gridPager2'></div>
  326. </div>
  327. </form>
  328. </body>