From 8b0596eb87f7958b9ba2028781fa7dcf8e01dd85 Mon Sep 17 00:00:00 2001 From: xiaosuonian <913474402@qq.com> Date: Wed, 8 Jan 2025 16:29:44 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=BE=85=E5=8A=9E=E5=A4=84?= =?UTF-8?q?=E7=90=86=E5=90=8E=EF=BC=8C=E7=A7=BB=E5=8A=A8=E7=AB=AF=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=85=B3=E9=97=AD=20--xiefeng?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/java/shkd/todotask/closeTaskPagePlugin.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/main/java/shkd/todotask/closeTaskPagePlugin.java b/main/java/shkd/todotask/closeTaskPagePlugin.java index d9d7eeb..5435766 100644 --- a/main/java/shkd/todotask/closeTaskPagePlugin.java +++ b/main/java/shkd/todotask/closeTaskPagePlugin.java @@ -1,5 +1,6 @@ package shkd.todotask; +import com.alibaba.fastjson.JSON; import kd.bos.form.FormShowParameter; import kd.bos.logging.Log; import kd.bos.logging.LogFactory; @@ -22,10 +23,10 @@ public class closeTaskPagePlugin implements IApprovalSubPlugin { FormView view = (FormView) customParams.get("formView"); FormShowParameter parameter = view.getFormShowParameter(); logger.info("获取view对象成功"); - HashMap map = new HashMap<>(); if (parameter.getCustomParams().containsKey("apptype")) { String apptype = parameter.getCustomParam("apptype"); if ("zhiyuan".equals(apptype)) { + if (isPCShow){ try { view.close(); }catch (Exception e) { @@ -33,6 +34,13 @@ public class closeTaskPagePlugin implements IApprovalSubPlugin { throw new RuntimeException(e); } flag = true; + }else { + HashMap map = new HashMap<>(); + map.put("method", "closeWebView"); + String mapString = JSON.toJSONString(map); + logger.info("准备发送指令" + mapString); + view.executeClientCommand("callAPPApi", map); + } } } return flag;