From f5c0aafc8f049d37fc31aea90fc5e39be9c20629 Mon Sep 17 00:00:00 2001 From: sunliang <593170460@qq.com> Date: Thu, 4 Jul 2024 17:36:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=82=B9=E5=87=BB=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E8=B7=B3=E8=BD=AC=E5=B7=A5=E8=89=BA=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=EF=BC=8C=E5=8E=BB=E6=8E=89=E5=B7=A5=E8=89=BA?= =?UTF-8?q?=E5=8D=A1=E9=9A=90=E8=97=8F=E6=97=B6=E7=94=9F=E6=88=90=E7=9A=84?= =?UTF-8?q?=E8=8A=82=E7=82=B9=E6=A0=87=E9=A2=98=EF=BC=8C=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E5=B7=A5=E8=89=BA=E5=8D=A1=E6=97=B6=E5=BC=95?= =?UTF-8?q?=E7=94=A8=E5=86=B6=E9=87=91=E8=A7=84=E8=8C=83=E6=88=90=E5=8A=9F?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CCFlow/CCFlow/DataUser/JSLibData/CCFormRef.js | 130 +++++++++++++++++- CCFlow/CCFlow/WF/CCForm/ChapterFrm.htm | 11 +- CCFlow/CCFlow/WF/CCForm/MapExt2021.js | 22 +++ CCFlow/CCFlow/WF/WorkOpt/PrintDoc.htm | 14 +- CCFlow/Components/BP.WF/Dev2Interface.cs | 24 ++-- .../BP.WF/HttpHandler/WF_WorkOpt.cs | 12 +- CCFlow/Components/BP.WF/WF/ShiftWork.cs | 16 +-- CCFlow/Components/BP.WF/WF/WorkFlow.cs | 12 +- CCFlow/Components/BP.WF/WF/WorkNode.cs | 20 +-- CCFlow/Components/BP.WF/WF/WorkUnSend.cs | 8 +- 10 files changed, 220 insertions(+), 49 deletions(-) diff --git a/CCFlow/CCFlow/DataUser/JSLibData/CCFormRef.js b/CCFlow/CCFlow/DataUser/JSLibData/CCFormRef.js index 64147131..d1734657 100644 --- a/CCFlow/CCFlow/DataUser/JSLibData/CCFormRef.js +++ b/CCFlow/CCFlow/DataUser/JSLibData/CCFormRef.js @@ -216,14 +216,12 @@ function GongCheng() { //TB_BeiZhu var W = document.body.clientWidth - 150; //WinOpenIt('https://craft.dayesteel.com.cn:9001/AProcessCard/RoutingPaths'); - OpenBootStrapModal('https://craft.dayesteel.com.cn:9001/AProcessCard/RoutingPaths', "eudlgframe", "工艺路线", W, 600, "icon-edit", false); + OpenModal('https://craft.dayesteel.com.cn:9001/AProcessCard/RoutingPaths', "GCdlgframe", "工艺路线", W, 600, "icon-edit", false); window.addEventListener('message', function (e) { if (e.data) { - //document.getElementById('TB_BeiZhu').innerHTML(e.data); - document.getElementById('TB_PROCESS_ROUTE').innerHTML(e.data); + document.getElementById('TB_PROCESS_ROUTE').value = e.data; } }) - // alert("11"); } function WinOpenIt(url) { @@ -235,4 +233,126 @@ function WinOpenIt(url) { InitHomeCount(); } }, 1); -} \ No newline at end of file +} + +function OpenModal(url, iframeId, dlgTitle, dlgWidth, dlgHeight, dlgIcon, showBtns, okBtnFunc, okBtnFuncArgs, dlgClosedFunc, divId, closeBtnColor, showCloseBtn) { + ///使用EasyUiDialog打开一个页面 + ///页面链接 + ///嵌套url页面的iframe的id,在okBtnFunc中,可以通过document.getElementById('eudlgframe').contentWindow获取该页面,然后直接调用该页面的方法,比如获取选中值 + ///Dialog标题 + ///Dialog宽度 + ///Dialog高度 + ///Dialog图标,必须是一个样式class + ///Dialog下方是否显示“确定”“取消”按钮,如果显示,则后面的okBtnFunc参数要填写 + ///点击“确定”按钮调用的方法 + ///okBtnFunc方法使用的参数 + ///窗体关闭调用的方法(注意:此方法中不能再调用dialog中页面的内容) + ///是否显示关闭按钮 + + var dlg = $('#bootStrapdlg'); + var isTheFirst; + if (divId != null && divId != "") + dlg = $('#' + divId); + + if (dlg.length == 0) { + isTheFirst = true; + var divDom = $(""); + //divDom.attr("id", "bootStrapdlg"); + if (divId != null && divId != "") + divDom.attr("id", divId); + else + divDom.attr("id", "bootStrapdlg"); + $(document.body).append(divDom); + + if (divId != null && divId != "") + dlg = $('#' + divId); + else + dlg = $('#bootStrapdlg'); + } + + if (dlg.length == 1) { + dlg.children().remove(); + dlg.empty(); + dlg.html(""); + } + + var modalDialog = $(""); + modalDialog.width(dlgWidth).height(dlgHeight); + //容器 + var modalContent = $(""); + modalDialog.append(modalContent); + //标题 + var modalHead = $(""); + if (showCloseBtn == null) + showCloseBtn = true; + //关闭按钮 + if (showCloseBtn == true) + var btnClose = $(""); + if (closeBtnColor && closeBtnColor != "") + btnClose = $(""); + + //标题 + var titleHead = $(""); + + titleHead.text(dlgTitle); + modalHead.append(btnClose); + modalHead.append(titleHead); + + //添加标题块 + modalContent.append(modalHead); + + //body块 + var modalBody = $(""); + var iframeWidth = dlgWidth - 45; + + var iFrame = $(""); + iFrame.attr("id", iframeId); + iFrame.attr("name", iframeId); + iFrame.attr("src", url); + iFrame.attr("src", url); + iFrame.css("width", iframeWidth + "px").css("height", dlgHeight + "px").css("border", "0px"); + + modalBody.append(iFrame); + //添加内容块 + modalContent.append(modalBody); + //结束 + dlg.append(modalDialog); + + if (showBtns && okBtnFunc) { + var modalFooter = $(""); + var footerClose = $(""); + footerClose.click(function () { + dlg.modal('hide'); + + }); + var footerOK = $(""); + footerOK.click(function () { + if (okBtnFunc(okBtnFuncArgs) == false) { + return; + } + dlg.modal('hide'); + }); + + //添加确定和关闭按钮 + modalFooter.append(footerOK); + modalFooter.append(footerClose); + + + //添加底层脚本 + modalContent.append(modalFooter); + } + //关闭事件 + dlg.off('hide.bs.modal'); + dlg.on('hide.bs.modal', function () { + /*防止缓存,切换页面不能显示问题*/ + dlg.remove(); + // 关闭时清空edit状态为add + dlg.find("iframe").attr('src', ''); + if (dlgClosedFunc) { + dlgClosedFunc(); + } + }); + + dlg.modal().show(); + return "bootStrapdlg"; +} diff --git a/CCFlow/CCFlow/WF/CCForm/ChapterFrm.htm b/CCFlow/CCFlow/WF/CCForm/ChapterFrm.htm index aff5aacb..735a4620 100644 --- a/CCFlow/CCFlow/WF/CCForm/ChapterFrm.htm +++ b/CCFlow/CCFlow/WF/CCForm/ChapterFrm.htm @@ -40,7 +40,14 @@ + + + + + + +