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;