addChk.jsp 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352
  1. <%@ page language="java" pageEncoding="UTF-8" isELIgnored="false" %>
  2. <%@ taglib uri="/ssTag" prefix="ss"%>
  3. <%pageContext.setAttribute("wdpageinformation","{'hastab':'0'}");%>
  4. <%-- 对象增加审核页 --%>
  5. <!DOCTYPE html>
  6. <html>
  7. <head>
  8. <meta http-equiv="pragma" content="no-cache">
  9. <meta http-equiv="cache-control" content="no-cache">
  10. <meta http-equiv="expires" content="0">
  11. <script>window.loginStatus="${empty sessionScope['wd.yh']?'0':'1'}"</script>
  12. <ss:skin file='main.css'/>
  13. <script type="text/javascript" src="/ss/jquery/jquery.js"></script>
  14. <script type="text/javascript" src="/ss/artdialog/artDialogUtil.js"></script>
  15. <script type="text/javascript" src="/ss/js/base.js"></script>
  16. <script> if(!window.wd) var wd={}; if(!wd.display) wd.display={}; wd.display.wdDialogId="addChk"; if(!wd.app) wd.app={}; wd.app.name='pms';</script>
  17. <script type="text/javascript" src="/ss/js/masklayer.js"></script>
  18. <script type="text/javascript" src="/ss/js/wdDialogInit.js"></script>
  19. <script type="text/javascript" src="/ss/js/common.js"></script>
  20. <script type="text/javascript" src="/ss/js/display.js"></script>
  21. <script type="text/javascript" src="/ss/js/edit.js"></script>
  22. <script type="text/javascript" src="/ss/nicescroll/jquery.nicescroll.js"></script>
  23. <script type="text/javascript" src="/ss/nicescroll/jquery.nicescroll.iframehelper.min.js"></script>
  24. <link rel="stylesheet" type="text/css" href="/ss/window/theme/dhtmlxwindows.css">
  25. <link rel="stylesheet" type="text/css" href="/ss/window/theme/dhx_blue/dhtmlxwindows_dhx_blue.css">
  26. <script type="text/javascript" src="/ss/window/dhtmlxcommon.js"></script>
  27. <script type="text/javascript" src="/ss/window/dhtmlxwindows.js"></script>
  28. <script type="text/javascript" src="/ss/window/dhtmlxcontainer.js"></script>
  29. <script type="text/javascript" src="/ss/js/common.js"></script>
  30. <script type="text/javascript" src="/ss/js/display.js"></script>
  31. <script type="text/javascript" src="/ss/datePicker/WdatePicker.js"></script>
  32. <script type="text/javascript" src="/ss/js/edit.js"></script>
  33. <meta http-equiv="X-UA-Compatible"content="IE=9; IE=8; IE=7; IE=EDGE" />
  34. <script src="/js/load.js"></script> <%-- ="/newUI/ss/js/base.js"。Lin(新UI) --%>
  35. <script type="text/javascript" src="/js/display.js"></script>
  36. </head>
  37. <body style="overflow:hidden !important;">
  38. <%
  39. pageContext.setAttribute("dataType","bdplay");
  40. %>
  41. <script>
  42. function addWdDragHeight(selecter,param,top){
  43. console.log(selecter);
  44. console.log(param);
  45. var aa="";
  46. if(param.minHeight){
  47. aa+="min:"+param.minHeight+",";
  48. }
  49. if(param.maxHeight){
  50. aa+="max:"+param.maxHeight+",";
  51. }
  52. if(top){
  53. aa+="top:"+top+",";
  54. }
  55. if(param&&aa){
  56. aa=aa.substr(0,aa.length-1)
  57. document.querySelector(selecter).setAttribute("ssDragh",aa); // ("wdDragHeight",。Lin
  58. }
  59. }
  60. </script>
  61. <%-- 改为 <data@ss name="info"/>。Lin
  62. <tab@ss name="info"/> --%>
  63. <ss:data name='info'/>
  64. <div id="app" style="overflow: hidden;">
  65. <div class="verify-container">
  66. <div class="left-side">
  67. <form method="post" id="myForm">
  68. <div :style="{ height: contentHeight + 'px' }" style="box-sizing: border-box; overflow:hidden;padding:20px">
  69. <!-- <div ssDragh='{max:490,min:50,lvl:2,pct:60}' > -->
  70. <iframe style="border: 1px solid #d2d2d2;box-sizing: border-box;height: 100%;" width="100%" height="100%" frameborder="0"
  71. src="<ss:serv name='${info.service}' dest='${info.dest}' parm='${info.param}'/>">
  72. </iframe>
  73. <!-- </div> -->
  74. <!-- <div ssDragh='{max:490,min:50,lvl:2,pct:40}'> -->
  75. <!-- </div> -->
  76. </div>
  77. <%-- <div class="action-bar-1">
  78. <div class="action-list">
  79. <span><ss-common-icon class="common-icon-common-words"></ss-common-icon></span>
  80. <!-- <span><ss-common-icon class="common-icon-handwriting"></ss-common-icon></span> -->
  81. <span><ss-common-icon class="common-icon-paper-clip"></ss-common-icon></span>
  82. <!-- <span><ss-common-icon class="common-icon-smile"></ss-common-icon></span> -->
  83. </div>
  84. <div class="input-area">
  85. <input name="shsm" placeholder="请输入批示意见" />
  86. </div>
  87. </div> --%>
  88. <div class="" style="width: 100%;height:65px;border-top: 1px solid rgb(210, 210, 210);">
  89. <input type='hidden' name='ynrid' value='' />
  90. <div id='ynrEdit' data-shid="${shid}" style="height: 63px;"></div>
  91. <script type="text/javascript" charset="utf-8" src="/ss/js/edit.js"></script>
  92. <ss:inper />
  93. <ss:equal val="${empty inputter.encode_ynrid}" val2="false">
  94. <input type="hidden" name="ynr_WATCHURL" value='ss.display.showComponent({show:["ssDialog"],url:"<ss:serv parm='{"wdConfirmationCaptchaService":"0","id":"ssVal{id}"}' dest='convInp'/>",title:"转换",width:1024,height:350});' />
  95. </ss:equal>
  96. <script>
  97. document.querySelector('form').addEventListener('submit', function(){
  98. if(typeof saveEditor != 'undefined' && saveEditor instanceof Function)
  99. saveEditor('ynrEdit');
  100. });
  101. HTMLFormElement.prototype.subfun = HTMLFormElement.prototype.submit;
  102. HTMLFormElement.prototype.submit = function(){
  103. if(typeof saveEditor != 'undefined' && saveEditor instanceof Function)
  104. saveEditor('ynrEdit');
  105. this.subfun();
  106. };
  107. function addCyy() {
  108. wd.display.showComponent({show:["wdDialog"],url:"<ss:serv name='p_gryy_zj' parm='{"wdConfirmationCaptchaService":"0"}' dest='gryyInp'/>",title:"录入常用语",width:571,height:105,minHeight:54,maxHeight:158});
  109. }
  110. function fjidfjEdit(){
  111. var fjName='fjid';var fjid=document.getElementsByName('fjid')[0].value;
  112. if(fjid==null||fjid==''){
  113. $.ajax({type:'post',url:'<ss:serv name='makeAttCms' parm='{"wdConfirmationCaptchaService":"0"}'/>',async:false,data:{name:'fjid',ssNrObjName:'sh',ssNrObjId:'${shid}'},success:function(_fjid){fjid=_fjid;document.getElementsByName('fjid')[0].value=fjid;}});
  114. };
  115. var str='&nrid=T-'+fjid+'&objectId='+fjid+'&objectName='+fjName+'&callback='+(window['fjidCallbackName']||'');
  116. wd.display.showComponent({show: ['wdDialog'],url:'<ss:serv name='regCms' parm='{"wdConfirmationCaptchaService":"0"}' dest='cmsHome'/>'+str,title: '编辑',width: 900,high: 664});
  117. }
  118. var inputterfjJson={"fj":{"key":"fjid","value":"","name":null,"jlztm":null}};
  119. </script>
  120. </div>
  121. <div class="bottom-div" style="border: none; display:flex;flex-direction: column;position: absolute;">
  122. <div class="bottom-div-button" style="width: 100%;display:flex;justify-content: flex-end; gap:10px;padding-bottom: 10px;padding-top: 10px;">
  123. <ss-bottom-button
  124. class="bottom-button-reject"
  125. text="退回"
  126. @click="onReject"
  127. icon-class="bottom-div-back"
  128. ></ss-bottom-button>
  129. <ss-bottom-button
  130. text="同意"
  131. @click="onSubmit"
  132. icon-class="bottom-div-save"
  133. ></ss-bottom-button>
  134. </div>
  135. </div>
  136. <div class="bottom-div" style="display: none;">
  137. <%-- <div class="bottom-up-div">
  138. <div class="bottom-up-div-left" style="width: 16%;display: inline-block;height: 100%;line-height: 99px;font-size: 16px;text-align: right;padding-right: 16px;box-sizing: border-box;">
  139. 审核意见
  140. </div>
  141. <div class="bottom-up-div-left-right" style="width: 84%;display: inline-block;float: right;height: 100%;">
  142. <input type='hidden' name='ynrid' value='' />
  143. <div id='ynrEdit' data-shid="${shid}" style="height: 63px;">
  144. </div>
  145. <script type="text/javascript" charset="utf-8" src="/ss/js/edit.js"></script>
  146. <ss:inper /><ss:equal val="${empty inputter.encode_ynrid}" val2="false"><input type="hidden" name="ynr_WATCHURL" value='wd.display.showComponent({show:["wdDialog"],url:"<ss:serv parm='{"wdConfirmationCaptchaService":"0","id":"wdVal{id}"}' dest='convInp'/>",title:"转换",width:1024,height:350});' /></ss:equal><script>wd.edit.initInputter("ynr",${inputter.ynrid},${inputter.encode_shid},${inputter.encode_ynrid});document.querySelector('form').addEventListener('submit', function(){if(typeof saveEditor != 'undefined' && saveEditor instanceof Function) saveEditor('ynrEdit');});HTMLFormElement.prototype.subfun = HTMLFormElement.prototype.submit;HTMLFormElement.prototype.submit = function(){if(typeof saveEditor != 'undefined' && saveEditor instanceof Function) saveEditor('ynrEdit');this.subfun();};function addCyy() {wd.display.showComponent({show:["wdDialog"],url:"<ss:serv name='p_gryy_zj' parm='{"wdConfirmationCaptchaService":"0"}' dest='gryyInp'/>",title:"录入常用语",width:571,height:105,minHeight:54,maxHeight:158});}</script><script type="text/javascript" charset="utf-8" >
  147. function fjidfjEdit(){var fjName='fjid';var fjid=document.getElementsByName('fjid')[0].value;if(fjid==null||fjid==''){$.ajax({type:'post',url:'<ss:serv name='makeAttCms' parm='{"wdConfirmationCaptchaService":"0"}'/>',async:false,data:{name:'fjid',ssNrObjName:'sh',ssNrObjId:'${shid}'},success:function(_fjid){fjid=_fjid;document.getElementsByName('fjid')[0].value=fjid;}});};var str='&nrid=T-'+fjid+'&objectId='+fjid+'&objectName='+fjName+'&callback='+(window['fjidCallbackName']||'');wd.display.showComponent({show: ['wdDialog'],url:'<ss:serv name='regCms' parm='{"wdConfirmationCaptchaService":"0"}' dest='cmsHome'/>'+str,title: '编辑',width: 900,high: 664});}
  148. </script>
  149. <script type="text/javascript" charset="utf-8" >
  150. var inputterfjJson={"fj":{"key":"fjid","value":"","name":null,"jlztm":null}};
  151. </script>
  152. </div>
  153. </div> --%>
  154. <div class="bottom-down-div" style="display: none;">
  155. <%-- 改为 <data@ss name="agrAdd"/>。Lin
  156. <tab@ss name="agr"/>
  157. <tab@ss name="rej"/> --%>
  158. <ss:data name='agrAdd'/>
  159. <ss:data name='rejAdd'/>
  160. <ss:equal val='${empty agrAdd}' val2='false'> <%-- ="${empty agr}"。Lin --%>
  161. <input type="submit" value="同意" id="agree" class="bottom-button"
  162. <%-- 再去掉 wd.display.changeFormAction(,改用 <varServ.ss subm="true"。Lin
  163. 去掉 sfty:"1" 参数,不用了 -- ${agr.service} 里的服务,最终是 "ss.agrTask"
  164. 原 name="${agr.service}" dest="${agr.dest}"
  165. onclick='wd.display.changeFormAction("<ss:serv name='${agr.service}' dest='${agr.dest}' parm='{shid:"${shid}",sfty:"1"}'/>",this);'/> --%>
  166. onclick='wd.display.changeFormAction("<ss:serv name='${agrAdd.service}' dest='${agrAdd.dest}' parm='{shid:"${shid}"}'/>",this);'/>
  167. </ss:equal>
  168. <ss:equal val='${empty rejAdd}' val2='false'> <%-- val="${empty rej}"。Lin --%>
  169. <input type="submit" value="退回" id="reject" class="bottom-button"
  170. <%-- 再去掉 wd.display.changeFormAction(,改用 <varServ.ss subm="true"。Lin
  171. 去掉 sfty:"0" 参数,不用了 -- ${agr.service} 里的服务,最终是 "ss.rejTask"
  172. 原 name="${rej.service}" dest="${rej.dest}"
  173. onclick='wd.display.changeFormAction("<ss:serv name='${rej.service}' dest='${rej.dest}' parm='{shid:"${shid}",sfty:"0"}'/>",this);'/> --%>
  174. onclick='wd.display.changeFormAction("<ss:serv name='${rejAdd.service}' dest='${rejAdd.dest}' parm='{shid:"${shid}"}'/>",this);'/>
  175. </ss:equal>
  176. <%--
  177. <input type="submit" value="同意" class="bottom-button" onclick="@service{submit:true,name:'check',dest:'sys_info',param:{shid:'${shid}',sfty:'1'}}@"/>
  178. <input type="submit" class="bottom-button" value="退回" onclick="@service{submit:true,name:'check',dest:'sys_info',param:{shid:'${shid}',sfty:'0'}}@"/>
  179. --%>
  180. <input type="button" onclick="wd.display.closeDialog();" class="bottom-button" value="关闭"/>
  181. </div>
  182. </div>
  183. </form>
  184. </div>
  185. <div class="right-side" :class="{'expanded': isRightExpanded, 'pinned': isRightPinned}">
  186. <div class="btn-toggle" @click="toggleRightSide" :style="{'top': (contentHeight - 20) + 'px'}">
  187. <ss-icon
  188. :name="isRightExpanded ? 'arrow-double-right' : 'arrow-double-left'"
  189. type="common"
  190. size="12px">
  191. </ss-icon>
  192. </div>
  193. <div class="right-side-content">
  194. <iframe width="100%" height="100%" frameborder="0"
  195. src="<ss:serv name='selSh' parm='{"wdConfirmationCaptchaService":"0","sqid":"${sqid}"}' dest='shList'/>">
  196. </iframe>
  197. </div>
  198. </div>
  199. </div>
  200. </div>
  201. </div>
  202. <input name='wdComponentID' type='hidden' value='addChk'/></form>
  203. <script type="text/javascript">var wdRecordValue='${wdRecordValue}';</script>
  204. <script type="text/javascript" src="/ss/js/wdRecord.js"></script>
  205. <script type="text/javascript">(function(){wdRecord("addChk");})();</script>
  206. <script type="text/javascript" src="/ss/js/wdFitHeight.js"></script>
  207. <script type="text/javascript">initWdFitHeight(166)</script>
  208. <script type="text/javascript">initWdFitHeightFunction=function(){initWdFitHeight(166);};</script>
  209. <script type="text/javascript" src="/ss/js/wdDragHeight.js"></script>
  210. <script type="text/javascript">initWdDragHeight(166)</script>
  211. <ss:equal val="${empty resizeComponent}" val2="false">
  212. <script>{var iframe=wd.display.getFrameOfWindow();
  213. if(iframe&&iframe.contentWindow==window)
  214. wd.display.resizeComponent(${resizeComponent.width}, ${resizeComponent.height}, ${empty resizeComponent.minHeight?'null':resizeComponent.minHeight}, ${empty resizeComponent.maxHeight?'null':resizeComponent.maxHeight});}</script>
  215. </ss:equal>
  216. <ss:help/>
  217. </body>
  218. <script type="text/javascript">
  219. try{wd.display.showMsgPopup('${msg}');
  220. }catch(err){console.error(err);}
  221. </script>
  222. <ss:equal val="${empty wdclosewindowparam}" val2="false">
  223. <script type="text/javascript">
  224. try{wd.display.setCloseWindowParam('${wdclosewindowparam}');
  225. }catch(err){console.error(err);}
  226. </script>
  227. </ss:equal>
  228. </html>
  229. <script type="text/javascript">
  230. tokenCleanser("<ss:serv name='ss.clearPageToken'/>", {tokenList:"<%= pageContext.getAttribute(ss.page.PageC.PAGE_tokenList)%>"});
  231. </script>
  232. <script type="module">
  233. SS.ready(function() {
  234. wd.edit.initInputter("ynr",${inputter.ynrid},${inputter.encode_shid},${inputter.encode_ynrid});
  235. const ynrEditContent = $('#ynrEdit').html();
  236. // console.log("ynrEditContent",ynrEditContent)
  237. // 调用组件中的初始化方法
  238. window.SS.dom.initializeFormApp({
  239. el: '#app',
  240. data() {
  241. return{
  242. contentHeight: 0,
  243. isRightExpanded: false,
  244. isRightPinned: false, // 是否常驻展开
  245. expandTimer: null, // 用于延迟展开/收缩的计时器
  246. rightSideIcon: 'arrow-double-left' // 默认图标
  247. }
  248. },
  249. methods: {
  250. onSubmit() {
  251. $("#agree").click();
  252. },
  253. onReject() {
  254. $("#reject").click();
  255. },
  256. onDialogClose() {
  257. wd.display.closeDialog();
  258. },
  259. // 处理右侧边栏展开/收缩
  260. toggleRightSide() {
  261. if (this.isRightPinned) {
  262. // 如果当前是常驻状态,点击则取消常驻并收起
  263. this.isRightPinned = false;
  264. this.isRightExpanded = false;
  265. } else {
  266. // 如果当前不是常驻状态,点击则切换常驻状态
  267. this.isRightPinned = !this.isRightPinned;
  268. this.isRightExpanded = this.isRightPinned;
  269. }
  270. // 更新图标
  271. this.rightSideIcon = this.isRightExpanded ? 'arrow-double-right' : 'arrow-double-left';
  272. },
  273. // 鼠标进入右侧边栏
  274. onRightSideEnter() {
  275. if (!this.isRightPinned) {
  276. // 清除之前的计时器
  277. if (this.expandTimer) clearTimeout(this.expandTimer);
  278. // 设置延迟展开
  279. this.expandTimer = setTimeout(() => {
  280. this.isRightExpanded = true;
  281. this.rightSideIcon = 'arrow-double-right';
  282. }, 200);
  283. }
  284. },
  285. // 鼠标离开右侧边栏
  286. onRightSideLeave() {
  287. if (!this.isRightPinned) {
  288. // 清除之前的计时器
  289. if (this.expandTimer) clearTimeout(this.expandTimer);
  290. // 设置延迟收缩
  291. this.expandTimer = setTimeout(() => {
  292. this.isRightExpanded = false;
  293. this.rightSideIcon = 'arrow-double-left';
  294. }, 300);
  295. }
  296. }
  297. },
  298. mounted() {
  299. $('#ynrEdit').html(ynrEditContent);
  300. this.contentHeight = window.innerHeight - 170;
  301. // 4. 确保所有脚本加载完成后再初始化nr0310
  302. setTimeout(() => {
  303. console.log("window.nr0310",window.nr0310);
  304. if(window.nr0310 && window.nr0310.init) {
  305. const img = $('#ynrEdit').find("img")[0];
  306. if(img) {
  307. console.log("img",img);
  308. // 等待img加载完成后再初始化
  309. if(img.complete) {
  310. nr0310.init(img);
  311. } else {
  312. img.onload = function() {
  313. nr0310.init(img);
  314. }
  315. }
  316. }
  317. }
  318. }, 10000);
  319. // 添加右侧边栏交互事件
  320. const rightSide = document.querySelector('.right-side');
  321. rightSide.addEventListener('mouseenter', this.onRightSideEnter);
  322. rightSide.addEventListener('mouseleave', this.onRightSideLeave);
  323. // 箭头点击切换常驻状态
  324. rightSide.addEventListener('click', (e) => {
  325. // 只有点击箭头区域才触发
  326. if (e.offsetX < 10) {
  327. this.toggleRightSide();
  328. }
  329. });
  330. }
  331. });
  332. });
  333. </script>