From 5613ac44114ab908b44cb7c05b9b1afaf7c6e01b Mon Sep 17 00:00:00 2001 From: weizhiqiang <598748873@qq.com> Date: Tue, 2 Jul 2024 20:40:06 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=A1=A8=E5=8D=95=E5=B8=83=E5=B1=80?= =?UTF-8?q?=E6=89=93=E5=BC=80=E5=B8=83=E5=B1=80=E6=96=B9=E5=BC=8F=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../template/js/operate/writeOperate.js | 4 +-- .../lib/layui/customer/skyeye/dsFormUtil.js | 35 ++++++++++++++----- 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/base-server/src/main/resources/template/js/operate/writeOperate.js b/base-server/src/main/resources/template/js/operate/writeOperate.js index 3b2b9bd32..ed967e6fd 100644 --- a/base-server/src/main/resources/template/js/operate/writeOperate.js +++ b/base-server/src/main/resources/template/js/operate/writeOperate.js @@ -92,7 +92,7 @@ layui.config({ $("#openPageName").val(operateOpenPage.name); var type = operateOpenPage.type ? "1" : "2"; $("input:radio[name=type][value=" + type + "]").attr("checked", true); - skyeyeClassEnumUtil.showEnumDataListByClassName("pageOpenType", 'radio', "openType", operateOpenPage.openType, form); + skyeyeClassEnumUtil.showEnumDataListByClassName("pageOpenType", 'radio', "openType", json.bean.openType, form); if (type == 1) { $('#typeChangeBox').html(commonHtml['customPageUrl']); $("#pageUrl").val(operateOpenPage.pageUrl); @@ -223,10 +223,10 @@ layui.config({ name: $("#openPageName").val(), type: type == 1 ? true : false, pageUrl: type == 1 ? $("#pageUrl").val() : dsFormUtil.dsFormChooseMation.id, - openType: dataShowType.getData('openType'), params: pageParams }; params.operateOpenPage = JSON.stringify(operateOpenPage); + params.openType = dataShowType.getData('openType'); } AjaxPostUtil.request({url: reqBasePath + "writeOperate", params: params, type: 'json', method: 'POST', callback: function (json) { diff --git a/web/src/main/resources/template/assets/lib/layui/customer/skyeye/dsFormUtil.js b/web/src/main/resources/template/assets/lib/layui/customer/skyeye/dsFormUtil.js index ba79caa44..18c74a141 100644 --- a/web/src/main/resources/template/assets/lib/layui/customer/skyeye/dsFormUtil.js +++ b/web/src/main/resources/template/assets/lib/layui/customer/skyeye/dsFormUtil.js @@ -773,15 +773,32 @@ var dsFormUtil = { url += `&objectId=${objectId}`; url += `&objectKey=${objectKey}`; } - _openNewWindows({ - url: url, - title: operateOpenPage.name, - pageId: 'page' + operate.id, - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); - dsFormTableUtil.loadTable(); - }}); + if (operate.openType == 1) { + // 正常打开 + _openNewWindows({ + url: url, + title: operateOpenPage.name, + pageId: 'page' + operate.id, + area: ['90vw', '90vh'], + callBack: function (refreshCode) { + winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); + dsFormTableUtil.loadTable(); + }}); + } else if (operate.openType == 2) { + // 父页面打开 + parent._openNewWindows({ + url: url, + title: operateOpenPage.name, + pageId: 'page' + operate.id, + area: ['90vw', '90vh'], + callBack: function (refreshCode) { + winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); + dsFormTableUtil.loadTable(); + }}); + } else if (operate.openType == 3) { + // 新窗口打开 + window.open(sysMainMation.homePagePath + url, '_blank'); + } } else if (operate.eventType == 'ajax') { // 发送请求 var businessApi = operate.businessApi; -- GitLab