involvment.jsp 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023
  1. <%@ page language="java" contentType="text/html;charset=utf-8" pageEncoding="UTF-8"%>
  2. <%@include file="/pages/includes/taglibs.jsp"%>
  3. <head>
  4. <script src="/resource/js/blockUI.js" type="text/javascript"></script>
  5. <script src="/resource/js/ks/ks-core.js" type="text/javascript"></script>
  6. <script src="/resource/js/ks/ks-validation.js" type="text/javascript"></script>
  7. <script src="<%=request.getContextPath()%>/resource/js/datePicker/WdatePicker.js" type="text/javascript"></script>
  8. <%-- <script type="text/javascript" src="<%=request.getContextPath() %>/resource/js/jquery-1.8.3.js"></script> --%>
  9. <style type="text/css">
  10. .overlay {
  11. position:absolute;
  12. opacity:0.07 !important;
  13. filter:alpha(opacity=7);
  14. cursor:wait;
  15. }
  16. div.field{ margin: 2px; padding-left: 10px; display: inline; float: left; min-width: 85px; }
  17. div.field input[type='radio'], div.field input[type='checkbox'], select, div.field label{ cursor: pointer; vertical-align:middle; }
  18. div.field input[type='radio']{ margin-top: 0px; }
  19. #f2 th{ text-align: center; width: 100px; }
  20. .clear{ clear: both; }
  21. #showInvlPanel th, showInvlPanel td{ text-align: center; }
  22. </style>
  23. <script type="text/javascript">
  24. var msgDialog, msg;
  25. // function thisPage(){
  26. // msgDialog.blockUI();
  27. // $("#f1").attr("action", "index.action").attr("validate", false).submit();
  28. // }
  29. // //全选
  30. // function selectAll(t) {
  31. // $("input[name='ids']").prop("checked", t.checked);
  32. // }
  33. /* -------------列表用 -----------*/
  34. // 更新停机原因
  35. function updateStopReason(){
  36. $.ajax({
  37. type: 'POST',
  38. url: "updateStopReason.action",
  39. data: $("#stopReasonDIv").serialize(),
  40. success: function(data){
  41. $("#f1").attr("action", "index.action").attr("validate", false).submit();
  42. },
  43. dataType: "json"
  44. });
  45. }
  46. //编辑受累原因
  47. function showStopReason(id,stopReason){
  48. $("#u_id").val(id);
  49. $("#u_stopReason").val(stopReason);
  50. $("#stopReasonPanel").blockUI();
  51. }
  52. // 查询
  53. function doQuery() {
  54. // $("#showMsg").blockUI();
  55. $("#f1").attr("action", "index.action").submit();
  56. }
  57. function selGoPage(dp) {
  58. $("#showMsg").blockUI();
  59. var selDate = dp.cal.getNewDateStr();
  60. $("#repDate").val(selDate);
  61. $("#f1").attr("action", "index.action").attr("validate", false).submit();
  62. }
  63. function goPage(days) {
  64. $("#showMsg").blockUI();
  65. var d = $("#repDate").val();
  66. $("#repDate").val(addDate(d, days));
  67. $("#f1").attr("action", "index.action").attr("validate", false).submit();
  68. }
  69. function addDate(date, days) {
  70. var d = new Date(date);
  71. d.setDate(d.getDate() + days);
  72. var month = d.getMonth() + 1;
  73. if(month < 10) {
  74. month = "0" + month;
  75. }
  76. var day = d.getDate();
  77. if(day < 10) {
  78. day = "0" + day;
  79. }
  80. return d.getFullYear() + '-' + month + '-' + day;
  81. }
  82. //添加受累
  83. function addInvl() {
  84. var station = $("#qStationId option:selected");
  85. if(station.val() != null && station.val() != "" && station.val().length > 0) {
  86. $("#addSpeed").hide();
  87. $("#addText").hide();
  88. $("#lossGenStation_tr").hide();
  89. $("#saveBtn").show();
  90. $("#editBtn").hide();
  91. $("#editDate").val($("#nowDate").val());
  92. $("#editDateLast").val($("#nowDateLast").val());
  93. $("#powerStationName").val(station.text());
  94. $("#powerStationId").val(station.val());
  95. $("#addInvlForm").blockUI();
  96. $("#addInvlForm .query-panel-header-text").html("新增受累");
  97. } else {
  98. alert("请选择风场!");
  99. }
  100. }
  101. // 导出数据
  102. function doExport(){
  103. $("#f1").attr("action", "./invl_export.action").submit();
  104. }
  105. //删除受累
  106. function delInvl(id) {
  107. msg.html("删除受累......");
  108. msgDialog.blockUI();
  109. if(confirm("删除受累?")) {
  110. $.post("./del.action", {id: id}, function(data){
  111. data = $.parseJSON(data);
  112. if(data.code == 111) {
  113. $("#f1").attr("action", "index.action").submit();
  114. } else {
  115. alert("删除受累失败!");
  116. msgDialog.unblockUI();
  117. return false;
  118. }
  119. });
  120. } else {
  121. msgDialog.unblockUI();
  122. }
  123. }
  124. //编辑受累
  125. function editInvl(invlId,lossGen,avgSpeed){
  126. $("#addInvlForm").blockUI();
  127. $("#addSpeed").show();
  128. $("#addText").show();
  129. $("#lossGenStation_tr").show();
  130. $("#saveBtn").hide();
  131. $("#editBtn").show();
  132. var station = $("#qStationId option:selected");
  133. $("#powerStationName").val(station.text());
  134. $("#powerStationId").val(station.val());
  135. $("#editInvlId").val(invlId);
  136. $("#lossGenStation").val(lossGen);
  137. $("#lossAvgSpeed").val(avgSpeed);
  138. $("#addInvlForm .query-panel-header-text").html("编辑受累");
  139. $.getJSON("getInvlEq.action", {id: invlId}, function(data) {
  140. if(data.code == "111") {
  141. var map = data.data;
  142. $.each(map.eqs, function(i, eq) {
  143. //期次
  144. $("#f2 input[name='repInvl.projectIds'][data_pid='"+ eq.projectId +"']").prop("checked", true);
  145. //线路
  146. $("#f2 input[name='repInvl.lineIds'][data_lid='"+ eq.lineId +"']").prop("checked", true);
  147. //风机
  148. $("#f2 input[name='repInvl.eqIds'][data_eid='"+ eq.equipmentId +"']").prop("checked", true);
  149. });
  150. //开始时间 beginTime
  151. $("#beginInvl").val(map.invl.beginTime);
  152. //结束时间 endTime
  153. $("#endInvl").val(map.invl.endTime);
  154. $("#editDate").val($("#nowDate").val());
  155. $("#editDateLast").val($("#nowDateLast").val());
  156. //停机类型 stopType
  157. if(map.invl.stopType=="计划"){
  158. $("#stopTypeJH").prop("checked",true);
  159. }else if(map.invl.stopType=="非计划"){
  160. $("#stopTypeFJH").prop("checked",true);
  161. }
  162. //停机原因 stopReason
  163. $("#stopReason").val(map.invl.stopReason);
  164. var type ;
  165. if(map.invl.type=="场外"){
  166. type="invl_out";
  167. }else if(map.invl.type=="场内"){
  168. type="invl_in";
  169. }
  170. $("#f2 input[name='repInvl.type'][data_type='"+type +"']").prop("checked",true);
  171. //var xb = $("#reasonType_xb");
  172. if(type == "invl_in") {
  173. $.getJSON("dic.action", {dicTypeId: "invl_in"}, function(data) {
  174. if(data.code == 111) {
  175. var rt = $("#reasonType");
  176. rt.html("");
  177. var html;
  178. $.each(data.data, function(i, e) {
  179. html = "";
  180. html += "<div class=\"field\">";
  181. html += "<label for=\"reasonType_"+ i +"\">";
  182. html += "<input type=\"radio\" class=\"required\" id=\"reasonType_"+ i +"\" name=\"repInvl.reasonType\" value=\""+ e +"\" />"+ e;
  183. html += "</label></div>";
  184. rt.append(html);
  185. });
  186. }
  187. //xb.show();
  188. $("#f2 input[name='repInvl.reasonType'][value='"+map.invl.reasonType +"']").prop("checked",true);
  189. });
  190. } else if(type == "invl_out") {
  191. $.getJSON("dic.action", {dicTypeId: "invl_out"}, function(data) {
  192. if(data.code == 111) {
  193. var rt = $("#reasonType");
  194. rt.html("");
  195. var html;
  196. $.each(data.data, function(i, e) {
  197. html = "";
  198. html += "<div class=\"field\">";
  199. html += "<label for=\"reasonType_"+ i +"\">";
  200. html += "<input type=\"radio\" class=\"required\" id=\"reasonType_"+ i +"\" name=\"repInvl.reasonType\" value=\""+ e +"\" />"+ e;
  201. html += "</label></div>";
  202. rt.append(html);
  203. });
  204. }
  205. $("#reasonType input[type='radio']").prop("checked", false);
  206. // $("#reasonType_xb input[type='radio']").prop("checked", false);
  207. // xb.hide();
  208. $("#f2 input[name='repInvl.reasonType'][value='"+map.invl.reasonType +"']").prop("checked",true);
  209. });
  210. } else {
  211. alert("无法获取受累类型");
  212. return false;
  213. }
  214. } else {
  215. alert(data.msg);
  216. }
  217. });
  218. }
  219. //完成受累
  220. function completeInvl(invlId, type, begin,staId,staName) {
  221. $("#completePanel").blockUI();
  222. $("#cpPSName").val(staName);
  223. $("#cpPSId").val(staId);
  224. $("#cpInvlId").val(invlId);
  225. $("#cpReasonType").val(type);
  226. $("#cpBegin").val(begin);
  227. if(type=="场内"){
  228. $("#domLoss").hide();
  229. $("#textLoss").hide();
  230. }else if(type="场外"){
  231. $("#domLoss").show();
  232. $("#textLoss").show();
  233. }
  234. }
  235. //显示受累风机
  236. function showInvlEq(invlId,staId,staName) {
  237. $("#showInvlPanel").blockUI();
  238. $("#showBegin").empty();
  239. $("#showEnd").empty();
  240. $("#showEqCount").empty();
  241. $("#showEqList").empty();
  242. //var station = $("#qStationId option:selected");
  243. $("#showPSName").val(staName);
  244. $.getJSON("getInvlEq.action", {id: invlId}, function(data) {
  245. if(data.code == "111") {
  246. var map = data.data;
  247. $("#showBegin").html(map.begin);
  248. $("#showEnd").html(map.end);
  249. $("#showEqCount").html(map.eqCount + " 台");
  250. var box = $("#showEqList");
  251. var lossGen = 0;
  252. $.each(map.eqs, function(i, eq) {
  253. var html = "<div class='field'><label title='风机【"+ eq.equipmentCode +"】损失电量【"+ eq.lossGen.toFixed(2) +" kWh】'>"+
  254. eq.equipmentCode + "【<font style='color: red;'>"+ eq.lossGen.toFixed(2) +"</font> kWh】</label></div>";
  255. box.append(html);
  256. lossGen += eq.lossGen;
  257. });
  258. $("#showLossGen").html("<font style='color: red;'>" + lossGen.toFixed(2) + "</font> kWh ");
  259. } else {
  260. alert(data.msg);
  261. }
  262. });
  263. }
  264. /*---------新增受累------- */
  265. $(function(){
  266. //消息框
  267. msgDialog = $("#showMsg");
  268. msg = $("#showMsgContent");
  269. //点选期次
  270. $("#f2 input[name='repInvl.projectIds']").click(function() {
  271. var pid = $(this).attr("data_pid");
  272. var ck = $(this).prop("checked");
  273. //线路
  274. $("#f2 input[name='repInvl.lineIds'][data_pid='"+ pid +"']").prop("checked", ck);
  275. //风机
  276. $("#f2 input[name='repInvl.eqIds'][data_pid='"+ pid +"']").prop("checked", ck);
  277. });
  278. //点选线路
  279. $("#f2 input[name='repInvl.lineIds']").click(function() {
  280. var t = $(this);
  281. var lid = t.attr("data_lid");
  282. //风机
  283. $("#f2 input[name='repInvl.eqIds'][data_lid='"+ lid +"']").prop("checked", t.prop("checked"));
  284. //期次
  285. var pid = t.attr("data_pid");
  286. var pids = $("#f2 input[name='repInvl.lineIds'][data_pid='"+ pid +"']:checked");
  287. if(pids.length > 0) {
  288. $("#proj_" + pid).prop("checked", true);
  289. } else {
  290. $("#proj_" + pid).prop("checked", false);
  291. }
  292. });
  293. //点选风机
  294. $("#f2 input[name='repInvl.eqIds']").click(function() {
  295. var t = $(this);
  296. var lid = t.attr("data_lid");
  297. var pid = t.attr("data_pid");
  298. //线路
  299. var lids = $("#f2 input[name='repInvl.eqIds'][data_pid='"+ pid +"'][data_lid='"+ lid +"']:checked");
  300. if(lids.length > 0) {
  301. $("#line_" + lid).prop("checked", true);
  302. $("#proj_" + pid).prop("checked", true);
  303. } else {
  304. $("#line_" + lid).prop("checked", false);
  305. //判断line的数量
  306. $("#proj_" + pid).prop("checked", false);
  307. }
  308. });
  309. //受累类型
  310. $("#typeIn, #typeOut").click(function() {
  311. var type = $(this).attr("data_type");
  312. //var xb = $("#reasonType_xb");
  313. if(type == "invl_in") {
  314. $.getJSON("dic.action", {dicTypeId: "invl_in"}, function(data) {
  315. invlReason(data);
  316. // xb.show();
  317. });
  318. $("#lossGenStation_tr").hide();
  319. } else if(type == "invl_out") {
  320. $.getJSON("dic.action", {dicTypeId: "invl_out"}, function(data) {
  321. invlReason(data);
  322. $("#reasonType input[type='radio']").prop("checked", false);
  323. //$("#reasonType_xb input[type='radio']").prop("checked", false);
  324. //xb.hide();
  325. });
  326. } else {
  327. alert("无法获取受累类型");
  328. return false;
  329. }
  330. });
  331. //受累原因
  332. function invlReason(data) {
  333. if(data.code == 111) {
  334. var rt = $("#reasonType");
  335. rt.html("");
  336. var html;
  337. $.each(data.data, function(i, e) {
  338. html = "";
  339. html += "<div class=\"field\">";
  340. html += "<input type=\"radio\" class=\"required\" id=\"reasonType_"+ i +"\" name=\"repInvl.reasonType\" value=\""+ i +"\" />";
  341. html += "<label for=\"reasonType_"+ i +"\">"+ e +"</label>";
  342. html += "</div>";
  343. rt.append(html);
  344. });
  345. }
  346. }
  347. });
  348. //确认1
  349. function btnEdit() {
  350. if(editValid() == true) {
  351. $("#f2").attr("action", "./edit.action").submit();
  352. }
  353. }
  354. //确认2
  355. function btnSave() {
  356. if(addValid() == true) {
  357. $("#saveBtn").attr('disabled',"true");
  358. $("#f2").attr("action", "./save.action").submit();
  359. }
  360. }
  361. /*--------受累完成--------------*/
  362. // 保存
  363. function completeSave() {
  364. if(completeValid() == true) {
  365. $("#invlCompleteForm").attr("action", "./completeSave.action").submit();
  366. }
  367. }
  368. //取消
  369. function btnCancel(){
  370. clearForm("f2");
  371. $("#addInvlForm").unblockUI();
  372. }
  373. //清空表单
  374. function clearForm(formId) {
  375. $(":input", "#"+ formId).not(":button, :submit, :reset, :hidden").val("").removeAttr('checked').removeAttr('selected');
  376. }
  377. function checkTime(){
  378. if($("#endInvl").val()!=null){
  379. $().blockUI();
  380. }
  381. }
  382. //表单验证
  383. function addValid() {
  384. if(checkEq() && begin() && type() && reasonType() && stopType() && stopReason()) {
  385. return true;
  386. }
  387. return false;
  388. }
  389. //表单验证
  390. function editValid() {
  391. if(checkEq() && begin() &&lossGenStation() && type() && reasonType() && stopType() && stopReason() && speed()) {
  392. return true;
  393. }
  394. return false;
  395. }
  396. function completeValid(){
  397. if(stop()) {
  398. return true;
  399. }
  400. return false;
  401. }
  402. //========= 受累完成验证 begin ============
  403. // 开始时间 cpBegin
  404. // 结束时间 cpEnd
  405. // 平均风速 cpSpeed
  406. // 损失电量 cpLossGen
  407. //========= 受累完成验证 end ============
  408. //========= 受累添加验证 begin ============
  409. //风机
  410. function checkEq() {
  411. if($("input[name='repInvl.eqIds']:checked").length > 0) {
  412. return true;
  413. }
  414. showValidMsg("请选择受累风机", $("input[name='repInvl.eqIds']")[0]);
  415. return false;
  416. }
  417. //开始时间
  418. function begin() {
  419. if($("#beginInvl").val() != "") {
  420. return true;
  421. }
  422. showValidMsg("请填写开始时间",$("#beginInvl"));
  423. return false;
  424. }
  425. //受累类型
  426. function type() {
  427. if($("input[name='repInvl.type']:checked").length == 1) {
  428. return true;
  429. }
  430. showValidMsg("请填选择受累类型", $("input[name='repInvl.type']")[0]);
  431. return false;
  432. }
  433. //损失电量
  434. function lossGenStation() {
  435. if($("#typeOut").prop("checked") == true && $("#lossGenStation").val() != "") {
  436. return true;
  437. } else if($("#typeIn").prop("checked") == true) {
  438. return true;
  439. }else if($("#lossGenStation").val() != ""){
  440. return true;
  441. }
  442. return false;
  443. }
  444. //受累原因
  445. function reasonType() {
  446. if($("input[name='repInvl.reasonType']:checked").length == 1) {
  447. return true;
  448. }
  449. showValidMsg("请填选择受累原因", $("input[name='repInvl.reasonType']")[0]);
  450. return false;
  451. }
  452. //停机类型
  453. function stopType() {
  454. if($("input[name='repInvl.stopType']:checked").length == 1) {
  455. return true;
  456. }
  457. showValidMsg("请填选择停机类型", $("input[name='repInvl.stopType']")[0]);
  458. return false;
  459. }
  460. //停机原因
  461. function stopReason() {
  462. if($("#stopReason").val() != "") {
  463. return true;
  464. }
  465. showValidMsg("请填写停机原因", $("#stopReason"));
  466. return false;
  467. }
  468. //平均风速
  469. function speed(msg, focus) {
  470. if($("#lossAvgSpeed").val() != "") {
  471. return true;
  472. }
  473. showValidMsg("请填写平均风速", $("#cpSpeed"));
  474. return false;
  475. }
  476. //显示错误信息
  477. function showValidMsg(msg, focus) {
  478. if(focus != null && focus != undefined && focus != "undefined" && focus != "" ) {
  479. focus.focus();
  480. }
  481. msg = "验证失败:" + msg;
  482. $("#err_container").text(msg).show().delay(3000).fadeOut(300);
  483. }
  484. /* ----------------- */
  485. //结束时间
  486. function stop() {
  487. if($("#cpEnd").val() != ""){
  488. return true;
  489. }
  490. showOverValidMsg("请填写结束时间",$("#cpEnd"));
  491. return false;
  492. }
  493. //显示错误信息2
  494. function showOverValidMsg(msg, focus) {
  495. if(focus != null && focus != undefined && focus != "undefined" && focus != "" ) {
  496. focus.focus();
  497. }
  498. msg = "验证失败:" + msg;
  499. $("#cp_err_container").text(msg).show().delay(3000).fadeOut(300);
  500. }
  501. </script>
  502. </head>
  503. <body>
  504. <s:form method="post" id="f1" >
  505. <fieldset id="fst" style="width: 1980px" >
  506. <legend class="item_Name">查询条件</legend>
  507. <table class="dataform" >
  508. <tr>
  509. <td align="left" >
  510. <span style="margin-right: 15px;">
  511. 选择风场:
  512. <s:select id="qStationId" list="stations" listKey="id" name="powerStationId" listValue="name" headerKey="" headerValue="请选择" onchange="doQuery()"></s:select>
  513. </span>
  514. <span>
  515. <input id="nowDate" name="nowDate" type="hidden" value='<s:date name="nowDate" format="yyyy-MM-dd HH:mm:ss"/>'/>
  516. <input id="nowDateLast" name="nowDateLast" type="hidden" value='<s:date name="nowDateLast" format="yyyy-MM-dd HH:mm:ss"/>'/>
  517. 选择日期:
  518. <a href="#" onclick="javascript:goPage(-1);">前一天</a>
  519. &nbsp;&nbsp;
  520. <input type="text" class="Wdate" id="repDate" name="repDate" value='<s:date name="repDate" format="yyyy-MM-dd"/>'
  521. onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',isShowWeek:true,readOnly:true,onpicked:selGoPage})" title="选择时间" style="width: 100px;" />
  522. &nbsp;&nbsp;
  523. <a href="#" onclick="javascript:goPage(1);">后一天</a>
  524. </span>
  525. <span style="margin-right: 15px;">
  526. &nbsp;&nbsp;
  527. 选择类型:
  528. <s:select id="type" list="#{'':'请选择', '场内':'场内','场外':'场外'}" name="type" onchange="doQuery()"/>
  529. </span>
  530. <span style="margin-right: 15px;">
  531. &nbsp;&nbsp;
  532. 选择停机类型:
  533. <s:select id="stopType" list="#{'':'请选择', '计划':'计划','非计划':'非计划'}" name="stopType" onchange="doQuery()"/>
  534. </span>
  535. <a href="#" onclick="javascript:addInvl();">新增受累</a>
  536. </td>
  537. <!-- <td width="10%"></td> -->
  538. <!-- <td width="23%"></td> -->
  539. </tr>
  540. </table>
  541. </fieldset>
  542. <br/>
  543. <div id="tb1" style="height: 80px;width: 2008px" style="overflow-x:scroll;overflow-y:scroll">
  544. <table border="1" cellspacing="0" cellpadding="0" style="border-collapse: collapse; border-color:graytext;width: 100%">
  545. <thead>
  546. <tr>
  547. <th style="text-align: center; font-weight: bolder; font-size: 14px; width:30px;">序号</th>
  548. <th style="text-align: center; font-weight: bolder; font-size: 14px; width:80px;">操作</th>
  549. <th style="text-align: center; font-weight: bolder; font-size: 14px; width:80px;">状态</th>
  550. <th style="text-align: center; font-weight: bolder; font-size: 14px; width:80px;">风场</th>
  551. <th style="text-align: center; font-weight: bolder; font-size: 14px; width:80px;">受累期次</th>
  552. <th style="text-align: center; font-weight: bolder; font-size: 14px; width:80px;">受累线路</th>
  553. <th style="text-align: center; font-weight: bolder; font-size: 14px; width:80px;">风机</th>
  554. <th style="text-align: center; font-weight: bolder; font-size: 14px; width:80px;">类型</th>
  555. <th style="text-align: center; font-weight: bolder; font-size: 14px; width:80px;">受累原因</th>
  556. <th style="text-align: center; font-weight: bolder; font-size: 14px; width:80px;">停机类型</th>
  557. <th style="text-align: center; font-weight: bolder; font-size: 14px; width:80px;">停机原因</th>
  558. <th style="text-align: center; font-weight: bolder; font-size: 14px; width:80px;">实际开始时间<br>(h)</th>
  559. <th style="text-align: center; font-weight: bolder; font-size: 14px; width:80px;">当天开始时间<br>(h)</th>
  560. <th style="text-align: center; font-weight: bolder; font-size: 14px; width:80px;">当天结束时间<br>(h)</th>
  561. <th style="text-align: center; font-weight: bolder; font-size: 14px; width:80px;">持续时间<br>(h)</th>
  562. <th style="text-align: center; font-weight: bolder; font-size: 14px; width:80px;">平均风速<br>(m/s)</th>
  563. <th style="text-align: center; font-weight: bolder; font-size: 14px; width:80px;">损失电量<br>(kWh)</th>
  564. </tr>
  565. </thead>
  566. <tbody>
  567. <s:iterator value="listInvl" var="var" status="index">
  568. <tr>
  569. <td style="text-align: center; width:40px;">${index.index+1}</td>
  570. <%-- <td class="ui-state-default ui-th-column ui-th-ltr" style="text-align: center; width:300px;">${index.index+1}</td> --%>
  571. <td style="text-align: center; width:80px;">
  572. <s:if test="%{!isFengChang}">
  573. <a href="javascript:void(0);" onclick="javascript:delInvl('${id}');">删除</a>
  574. </s:if>
  575. <%-- <s:if test="endTime == null"> --%>
  576. <%-- <a href="javascript:void(0);" onclick="javascript:completeInvl('${id}', '${type}', '<s:date name="beginTime" format="yyyy-MM-dd HH:mm:ss"/>','${powerStationId}','${var.powerStationName}');">受累完成</a> --%>
  577. <%-- </s:if> --%>
  578. </td>
  579. <td style="text-align: center; width:80px;">
  580. <s:if test="endTime != null"><span style="font-size: 12px;">已完结</span></s:if>
  581. <s:else>
  582. <a href="javascript:void(0);" onclick="javascript:completeInvl('${id}', '${type}', '<s:date name="beginTime" format="yyyy-MM-dd HH:mm:ss"/>','${powerStationId}','${var.powerStationName}');">受累完成</a>
  583. </s:else>
  584. </td>
  585. <td style="text-align: center; width:120px;">${var.powerStationName}</td>
  586. <td style="text-align: center; width:120px;">${var.showProjectName}</td>
  587. <td style="text-align: center; width:120px;">${var.showLineName}</td>
  588. <td style="text-align: center; width:80px;">
  589. <a href="javascript:void(0);" onclick="javascript:showInvlEq('${var.id}','${powerStationId}','${var.powerStationName}');">受累风机</a>
  590. </td>
  591. <td style="text-align: center; width:120px;">${var.type}</td>
  592. <td style="text-align: center; width:120px;">
  593. <label title="受累编号:${id}">${var.reasonType}</label>
  594. </td>
  595. <td style="text-align: center; width:120px;">${var.stopType}</td>
  596. <td style="text-align: center; width:120px;">${var.stopReason}
  597. <%-- <a href="javascript:void(0);" onclick="javascript:showStopReason('${var.id}', '${var.stopReason}');">${var.stopReason}</a> --%>
  598. </td>
  599. <td style="text-align: center; width:120px;"><s:date name="startBeginTime" format="yyyy-MM-dd HH:mm:ss"/></td>
  600. <td style="text-align: center; width:120px;"><s:date name="beginTime" format="yyyy-MM-dd HH:mm:ss"/></td>
  601. <td style="text-align: center; width:120px;"><s:date name="endTime" format="yyyy-MM-dd HH:mm:ss"/></td>
  602. <td style="text-align: center; width:120px;">${var.duration}</td>
  603. <td style="text-align: center; width:120px;">${var.avgSpeed}</td>
  604. <td style="text-align: center; width:120px;">${var.lossGen}</td>
  605. </tr>
  606. </s:iterator>
  607. </tbody>
  608. </table>
  609. </div>
  610. </s:form>
  611. <s:form method="post" id="f2" action="">
  612. <div id="addInvlForm" class="blockCss" style="display:none" >
  613. <legend class="item_Name">新增受累</legend>
  614. <table border="1" cellspacing="0" cellpadding="0">
  615. <tr>
  616. <th>
  617. 风电场:
  618. </th>
  619. <td colspan="3">
  620. <input id="editDate" type="hidden" name="editDate" value='<s:date name="editDate" format="yyyy-MM-dd HH:mm:ss"/>'/>
  621. <input id="editDateLast" type="hidden" name="editDateLast" value='<s:date name="editDateLast" format="yyyy-MM-dd HH:mm:ss"/>'/>
  622. <input type="text" id="powerStationName" name="repInvl.powerStationName" readonly="readonly" style="border: 0px;" />
  623. <input type="hidden" id="editInvlId" name="repInvl.id" />
  624. <input type="hidden" id="powerStationId" name="repInvl.powerStationId" />
  625. </td>
  626. </tr>
  627. <tr>
  628. <th>
  629. 期&nbsp;&nbsp;次:
  630. </th>
  631. <td colspan="3">
  632. <s:iterator value="projects" var="proj">
  633. <div class="field">
  634. <label for="proj_${proj.id}">
  635. <input type="checkbox" class="required" id="proj_${proj.id}" name="repInvl.projectIds"
  636. data_pid="${proj.id}" value="${proj.id}|${proj.name}" />${proj.name}
  637. </label>
  638. </div>
  639. </s:iterator>
  640. </td>
  641. </tr>
  642. <tr>
  643. <th>
  644. 线&nbsp;&nbsp;路:
  645. </th>
  646. <td colspan="3">
  647. <s:iterator value="lines" var="l">
  648. <div class="field">
  649. <label for="line_${l.id}">
  650. <input type="checkbox" class="required" id="line_${l.id}" name="repInvl.lineIds"
  651. data_pid="${l.projectid}" data_lid="${l.id}" value="${l.id}|${l.name}" />${l.name}
  652. </label>
  653. </div>
  654. </s:iterator>
  655. </td>
  656. </tr>
  657. <tr>
  658. <th>
  659. 风&nbsp;&nbsp;机:
  660. </th>
  661. <td colspan="3">
  662. <s:iterator value="equipments" var="e">
  663. <div class="field">
  664. <label for="e_${e.id}" title="${e.id}">
  665. <input type="checkbox" class="required" id="e_${e.id}" name="repInvl.eqIds"
  666. data_pid="${e.projectid}" data_lid="${e.lineid}" data_eid="${e.id}" value="${e.id}" />${e.code}
  667. </label>
  668. </div>
  669. </s:iterator>
  670. </td>
  671. </tr>
  672. <tr>
  673. <th>
  674. 开始时间:
  675. </th>
  676. <td>
  677. <input type="text" class="Wdate" id="beginInvl" name="repInvl.beginTime" value=""
  678. onFocus="WdatePicker({startDate:'%y-%M-%d 00:00:00',alwaysUseStartDate:true,dateFmt:'yyyy-MM-dd HH:mm:ss',readOnly:true,minDate:'#F{$dp.$D(\'editDate\')}',maxDate:'#F{$dp.$D(\'editDateLast\'||\'endInvl\')}'})"
  679. title="选择时间" />
  680. </td>
  681. <th>
  682. 结束时间:
  683. </th>
  684. <td>
  685. <input type="text" class="Wdate" id="endInvl" name="repInvl.endTime" value=""
  686. onFocus="WdatePicker({startDate:'%y-%M-%d 00:00:00',alwaysUseStartDate:true,dateFmt:'yyyy-MM-dd HH:mm:ss',readOnly:true,minDate:'#F{$dp.$D(\'editDate\'||\'beginInvl\')}',maxDate:'#F{$dp.$D(\'editDateLast\')}'})"
  687. title="选择时间"/>
  688. </td>
  689. </tr>
  690. <tr>
  691. <th>
  692. 类&nbsp;&nbsp;型:
  693. </th>
  694. <td>
  695. <div class="field">
  696. <label for="typeIn"><input type="radio" id="typeIn" name="repInvl.type" value="场内" data_type="invl_in" />场内</label>
  697. </div>
  698. <div class="field">
  699. <label for="typeOut"><input type="radio" id="typeOut" name="repInvl.type" value="场外" data_type="invl_out" />场外</label>
  700. </div>
  701. </td>
  702. <th id="addSpeed">
  703. 平均风速(m/s):
  704. </th>
  705. <td id="addText">
  706. <input type="text" id="lossAvgSpeed" name="repInvl.avgSpeed" value="${stationSpeed}" title="平均风速" style="height: 20px;" />
  707. </td>
  708. </tr>
  709. <tr id="lossGenStation_tr" style="display: none;">
  710. <th>
  711. 损失电量(kWh):
  712. </th>
  713. <td colspan="3">
  714. <input type="text" id="lossGenStation" name="repInvl.lossGenStation" value="" title="损失电量" style="height: 20px;" />
  715. </td>
  716. </tr>
  717. <tr>
  718. <th>
  719. 受累原因:
  720. </th>
  721. <td colspan="3">
  722. <div id="reasonType"></div>
  723. <div class="clear" ></div>
  724. <!-- <div id="reasonType_xb" style="display: none;"> -->
  725. <!-- 场内受累箱变 -->
  726. <%-- <s:iterator value="powerStation.equipments" var="e"> --%>
  727. <!-- <div class="field"> -->
  728. <%-- <label for="xb_${e.id}" title="${e.id}"> --%>
  729. <%-- <input type="radio" class="required" id="xb_${e.id}" name="repInvl.reasonType" value="xb${e.id}" />${e.code} 箱变 --%>
  730. <!-- </label> -->
  731. <!-- </div> -->
  732. <%-- </s:iterator> --%>
  733. <!-- </div> -->
  734. </td>
  735. </tr>
  736. <tr>
  737. <th>
  738. 停机类型:
  739. </th>
  740. <td colspan="3">
  741. <div class="field">
  742. <label for="stopTypeJH"><input type="radio" id="stopTypeJH" name="repInvl.stopType" value="计划" />计划</label>
  743. </div>
  744. <div class="field">
  745. <label for="stopTypeFJH"><input type="radio" id="stopTypeFJH" name="repInvl.stopType" value="非计划" />非计划</label>
  746. </div>
  747. </td>
  748. </tr>
  749. <tr>
  750. <th>
  751. 停机原因:
  752. </th>
  753. <td colspan="3">
  754. <textarea rows="3" cols="30" style="width:99%;" id="stopReason" name="repInvl.stopReason"></textarea>
  755. </td>
  756. </tr>
  757. <tr>
  758. <td colspan="4" style="text-align: center; height: 50px;">
  759. <div id="err_container" style="color: red; display: none;"></div>
  760. </td>
  761. </tr>
  762. <tr>
  763. <td colspan="4" style="text-align: center;">
  764. <button type="button" id="saveBtn" class="x-btn-text" onclick="btnSave();">确 认</button>
  765. <button type="button" id="editBtn" class="x-btn-text" onclick="btnEdit();">确 认</button>&nbsp;&nbsp;
  766. <button type="button" class="x-btn-text" onclick="btnCancel();">取 消</button>
  767. </td>
  768. </tr>
  769. </table>
  770. </div>
  771. </s:form>
  772. <s:form method="post" id="invlEqForm" action="">
  773. <div id="showInvlPanel" class="blockCss" style="display:none">
  774. <legend class="item_Name">受累风机</legend>
  775. <table class="dataform" border="1" cellspacing="0" cellpadding="0" >
  776. <thead>
  777. <tr>
  778. <th>
  779. 风电场:
  780. </th>
  781. <td colspan="3">
  782. <input type="text" id="showPSName" name="showPSName" readonly="readonly" style="border: 0px;" />
  783. </td>
  784. </tr>
  785. </thead>
  786. <tbody>
  787. <tr>
  788. <th>开始时间:</th>
  789. <td id="showBegin"></td>
  790. <th>结束时间:</th>
  791. <td id="showEnd"></td>
  792. </tr>
  793. <tr>
  794. <th width="20%">受累风机(台):</th>
  795. <td width="30%" id="showEqCount"></td>
  796. <th width="20%">损失电量(kWh):</th>
  797. <td width="30%" id="showLossGen"></td>
  798. </tr>
  799. <tr>
  800. <th>受累风机列表:</th>
  801. <td colspan="3" id="showEqList"></td>
  802. </tr>
  803. </tbody>
  804. <tfoot>
  805. <tr>
  806. <td colspan="4" style="text-align: center;">
  807. <button type="button" class="x-btn-text" onclick="javascript:$('#showInvlPanel').unblockUI();">关 闭</button>
  808. </td>
  809. </tr>
  810. </tfoot>
  811. </table>
  812. </div>
  813. </s:form>
  814. <s:form method="post" id="invlCompleteForm" action="">
  815. <div id="completePanel" class="blockCss" style="display:none" >
  816. <legend class="item_Name">受累完成</legend>
  817. <table class="dataform" border="1" cellspacing="0" cellpadding="0">
  818. <thead>
  819. <tr>
  820. <th width="20%">
  821. 风电场:
  822. </th>
  823. <td width="30%">
  824. <input type="text" id="cpPSName" name="repInvlDto.cpPSName" readonly="readonly" style="border: 0px;" />
  825. <input type="hidden" id="cpPSId" name="repInvlDto.cpPSId" readonly="readonly" style="border: 0px;" value="${repInvl.powerStationId }"/>
  826. <input type="hidden" id="cpInvlId" name="repInvlDto.cpInvlId" readonly="readonly" style="border: 0px;" value="${id}"/>
  827. </td>
  828. <th width="20%">
  829. 受累类型:
  830. </th>
  831. <td width="30%">
  832. <input type="text" id="cpReasonType" name="repInvlDto.cpReasonType" readonly="readonly" style="border: 0px;" />
  833. </td>
  834. </tr>
  835. </thead>
  836. <tbody>
  837. <tr>
  838. <th>开始时间:</th>
  839. <td>
  840. <input type="text" id="cpBegin" name="repInvlDto.begin" value="" readonly="readonly" style="border: 0px;" />
  841. </td>
  842. <th>结束时间:</th>
  843. <td>
  844. <input type="text" class="Wdate" id="cpEnd" name="repInvlDto.end" value=""
  845. onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowWeek:true,readOnly:true,minDate:'#F{$dp.$D(\'cpBegin\')}',maxDate:'%y-%M-%d'})"
  846. title="选择时间" />
  847. </td>
  848. </tr>
  849. <tr>
  850. <td colspan="4" style="text-align: center; height: 50px;">
  851. <div id="cp_err_container" style="color: red; display: none;"></div>
  852. </td>
  853. </tr>
  854. </tbody>
  855. <tfoot>
  856. <tr>
  857. <td colspan="4" style="text-align: center;">
  858. <button type="button" class="x-btn-text" onclick="completeSave();">保 存</button>&nbsp;&nbsp;
  859. <button type="button" class="x-btn-text" onclick="javascript:clearForm('invlCompleteForm'); $('#completePanel').unblockUI();">关 闭</button>
  860. </td>
  861. </tr>
  862. </tfoot>
  863. </table>
  864. </div>
  865. <!-- </gyee:panel> -->
  866. </s:form>
  867. <s:form method="post" id="stopReasonDIv" action="">
  868. <div id="stopReasonPanel" class="blockCss" style="display:none" >
  869. <legend class="item_Name">停机原因</legend>
  870. <table class="dataform" border="1" cellspacing="0" cellpadding="0" >
  871. <tbody>
  872. <tr>
  873. <td>
  874. <input type="hidden" id="u_id" name="repInvl.id">
  875. <textarea rows="5" cols="" style="width:100%;" id="u_stopReason" name="repInvl.stopReason"></textarea>
  876. </td>
  877. </tr>
  878. </tbody>
  879. <tfoot>
  880. <tr>
  881. <td colspan="4" style="text-align: center;">
  882. <button type="button" class="x-btn-text" onclick="updateStopReason();">保 存</button>&nbsp;&nbsp;
  883. <button type="button" class="x-btn-text" onclick="javascript:$('#stopReasonPanel').unblockUI();">关 闭</button>
  884. </td>
  885. </tr>
  886. </tfoot>
  887. </table>
  888. </div>
  889. </s:form>
  890. <div id='showMsg' class="warp wait_box" style="display:none"><div class="wait_img"><img src="../../resource/images/panel/wait.gif" /></div>
  891. <div id="showMsgContent" class="wait_word">数据正在处理,请稍后......</div>
  892. </div>
  893. <style type="text/css">
  894. div.blockCss {
  895. padding: 20px;
  896. }
  897. .blockCss table{
  898. background-color: white;
  899. border-collapse: collapse;
  900. border-color:graytext;
  901. width: 100%;
  902. }
  903. .blockCss legend{
  904. background-color: white;
  905. padding-bottom: 10px;
  906. }
  907. a{ /* 统一设置所以样式 */
  908. font-family:Arial;
  909. font-size:12px;
  910. text-align:center;
  911. margin:3px;
  912. }
  913. a:link,a:visited{ /* 超链接正常状态、被访问过的样式 */
  914. color:#000000;
  915. padding:4px 10px 4px 10px;
  916. background-color:#f1f1f1;
  917. text-decoration:none;
  918. border-top:1px solid #EEEEEE; /* 边框实现阴影效果 */
  919. border-left:1px solid #EEEEEE;
  920. border-bottom:1px solid #717171;
  921. border-right:1px solid #717171;
  922. }
  923. a:hover{ /* 鼠标指针经过时的超链接 */
  924. color:#821818; /* 改变文字颜色 */
  925. padding:5px 8px 3px 12px; /* 改变文字位置 */
  926. background-color:#e2c4c9; /* 改变背景色 */
  927. border-top:1px solid #717171; /* 边框变换,实现“按下去”的效果 */
  928. border-left:1px solid #717171;
  929. border-bottom:1px solid #EEEEEE;
  930. border-right:1px solid #EEEEEE;
  931. }
  932. fieldset legend {
  933. color:#302A2A;
  934. font: bold 16px/2 Verdana, Geneva, sans-serif;
  935. font-weight: bold;
  936. text-align: left;
  937. text-shadow: 2px 2px 2px rgb(88, 126, 156);
  938. }
  939. fieldset legend {
  940. color:#302A2A;
  941. font: bold 16px/2 Verdana, Geneva, sans-serif;
  942. font-weight: bold;
  943. text-align: left;
  944. text-shadow: 2px 2px 2px rgb(88, 126, 156);
  945. }
  946. </style>
  947. </body>