objPlay.ss.jsp 4.6 KB

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