objPlay.ss.jsp 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <html>
  2. <head>
  3. <%
  4. String f= (String)request.getAttribute("shid");
  5. if(f!=null&&f.length()>0){
  6. request.setAttribute("hasAuthorize",true);
  7. }
  8. pageContext.setAttribute("dataType","play");
  9. %>
  10. <equal.ss val="${hasAuthorize}" val2="true">
  11. </equal.ss>
  12. <equal.ss val="${ydsq_sh_ck}" val2="1">
  13. <style>
  14. .authorize{display:none;}
  15. </style>
  16. <script>setTimeout(function(){$(".authorize").remove();},500);</script>
  17. </equal.ss>
  18. <style>
  19. #iframe{
  20. height: 100% !important;
  21. }
  22. </style>
  23. </head>
  24. <body>
  25. <%-- 改为 <data@ss name="info"/>。Lin
  26. <tab@ss name="info"/> --%>
  27. <data.ss name="info"/>
  28. <iframe width="100%" height="100%" param='${info.param}' frameborder="0" id="iframe"
  29. src="<varServ.ss name='${info.service}' dest='${info.dest}' parm='${info.param}'/>">
  30. </iframe>
  31. <!-- <div class='bottom-div'>
  32. <div class="bottom-down-div border-top">
  33. <input type="button" value="关闭" onclick="wd.display.closeDialog();" class="bottom-button">
  34. </div>
  35. <div> -->
  36. <script>
  37. function authorize(){
  38. <equal.ss val="${hasAuthorize}" val2="true">
  39. <%-- 再改为 WebC.REQ_objName、WebC.REQ_objId,避免与数据表里的 对象名、对象ID 字段重名。用到再确认。Lin
  40. eval('<serv@ss dlg="true" name="dxsq_djlsq" dest="djlsq" parm="{fromWdService:&quot;${wdService}&quot;,dxm:&quot;${dxm}&quot;,dxid:&quot;${dxid}&quot;}"/>') --%>
  41. eval('<serv.ss dlg="true" name="dxsq_djlsq" dest="rowAuth" parm="{fromWdService:&quot;${wdService}&quot;,ssObjName:&quot;${ssObjName}&quot;,ssObjId:&quot;${ssObjId}&quot;}"/>')
  42. <%-- //'@service{name:"djlsq",dest:"djlsq",show:"wdDialog",param:{fromWdService:"${wdService}",dxm:"${dxm}",dxid:"${dxid}"}}@' 应该用错注释了吧?Lin --%>
  43. </equal.ss>
  44. }
  45. function agree(){
  46. var wdDialogId=wd.display.getwdDialogId();
  47. var mark=wd.topWindow.mark[wdDialogId];
  48. var param=[]
  49. for(var key in mark){
  50. var obj={}
  51. if(mark[key].type=="childObject"){
  52. if(mark[key].checked==mark[key].checkStatue){
  53. continue;
  54. }
  55. }
  56. obj.type=mark[key].type;
  57. obj.checked=mark[key].checked;
  58. obj.object=mark[key].object;
  59. obj.id=mark[key].id;
  60. param.push(obj)
  61. }
  62. var submitFunction=function(){
  63. <equal.ss val="${empty shid}" val2="false"> <%-- 改 equal:val1="true" val2="${not empty shid}"。Lin --%>
  64. <%-- 去掉 check < wd.completeTask < wd.core.service.BpmService.completeTask() + sfty:"1",直接用 ss.agrTask。Lin
  65. $.post("@service{name:'check',dest:'sys_info',param:{shid:"${shid}",sfty:'1'}}@", --%>
  66. $.post("<serv.ss name='ss.agrTask' dest='info' parm='{shid:"${shid}"}'/>",
  67. function(data){
  68. wd.display.refreshOpener();
  69. wd.display.closeDialog();
  70. })
  71. </equal.ss>
  72. <equal.ss val="${empty shid}" val2="true"> <%-- 改 equal:val1="false" val2="${not empty shid}"。Lin --%>
  73. //wd.display.refreshOpener();
  74. wd.display.closeDialog();
  75. </equal.ss>
  76. }
  77. if(param.length>0){
  78. /* 再改,规范命名。Lin
  79. * 去掉 ?wdApplication=,不支持多个应用 -- 服务名可以写 ss.xxx
  80. * &wdService= 改为 ssServ
  81. $.post("/service?wdApplication=wd&wdService=updateObjectState",{'objectList':JSON.stringify(param)},function(data){
  82. */ $.post("/service?ssServ=updateObjectState",{'objectList':JSON.stringify(param)},function(data){
  83. console.log(data);
  84. wd.topWindow.mark[wdDialogId]={};
  85. submitFunction();
  86. })
  87. }else{
  88. alert("归档失败");
  89. //submitFunction();
  90. }
  91. }
  92. //${info}
  93. </script>
  94. <script>
  95. function addWdFitHeight(selecter,param){
  96. console.log(selecter);
  97. console.log(param);
  98. var aa="";
  99. if(param.minHeight){
  100. aa+="min:"+param.minHeight+",";
  101. }
  102. if(param.maxHeight){
  103. aa+="max:"+param.maxHeight+",";
  104. }
  105. if(param&&aa){
  106. aa=aa.substr(0,aa.length-1)
  107. document.querySelector(selecter).setAttribute("ssFith",aa); // ("wdFitHeight",。Lin
  108. }
  109. }
  110. </script>
  111. <script>
  112. var tabHeight={minHeight:${info.minHeight},maxHeight:${info.maxHeight}};
  113. addWdFitHeight("iframe",tabHeight);
  114. </script>
  115. <%-- 改为 <data@ss name="prt"/>。Lin
  116. <tab@ss name="print" enable="viewobject.funcMap.play.print"/> --%>
  117. <data.ss name="prt"/>
  118. <%-- 去掉,改为 <jsp@ss file="/ss/prtIcon.jsp"/>。Lin
  119. <equal@ss val="${empty prt}" val2="false">
  120. <script>
  121. (function(){
  122. try{
  123. var wdDialogId=wd.display.getwdDialogId();
  124. var win=wd.topWindow.dhxWins.window(wdDialogId);
  125. console.log(win.button("wdPrint"));
  126. win.button("wdPrint").show();
  127. win.button("wdPrint").onclick=function(){
  128. <varServ@ss dlg="true" name="${prt.service}" dest="${prt.dest}" parm="${prt.param}" title="${prt.title}" width="${prt.width}" height="${prt.height}" minHeight="${prt.minHeight}" maxHeight="${prt.maxHeight}"/>
  129. }
  130. }catch(e){
  131. console.log(e);
  132. }
  133. })()
  134. </script>
  135. </equal@ss>
  136. --%>
  137. <jsp.ss file="/ss/prtIcon.jsp"/>
  138. </body>
  139. </html>