parent
fa80a2d684
commit
8b0596eb87
|
@ -1,5 +1,6 @@
|
||||||
package shkd.todotask;
|
package shkd.todotask;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
import kd.bos.form.FormShowParameter;
|
import kd.bos.form.FormShowParameter;
|
||||||
import kd.bos.logging.Log;
|
import kd.bos.logging.Log;
|
||||||
import kd.bos.logging.LogFactory;
|
import kd.bos.logging.LogFactory;
|
||||||
|
@ -22,10 +23,10 @@ public class closeTaskPagePlugin implements IApprovalSubPlugin {
|
||||||
FormView view = (FormView) customParams.get("formView");
|
FormView view = (FormView) customParams.get("formView");
|
||||||
FormShowParameter parameter = view.getFormShowParameter();
|
FormShowParameter parameter = view.getFormShowParameter();
|
||||||
logger.info("获取view对象成功");
|
logger.info("获取view对象成功");
|
||||||
HashMap<String,Object> map = new HashMap<>();
|
|
||||||
if (parameter.getCustomParams().containsKey("apptype")) {
|
if (parameter.getCustomParams().containsKey("apptype")) {
|
||||||
String apptype = parameter.getCustomParam("apptype");
|
String apptype = parameter.getCustomParam("apptype");
|
||||||
if ("zhiyuan".equals(apptype)) {
|
if ("zhiyuan".equals(apptype)) {
|
||||||
|
if (isPCShow){
|
||||||
try {
|
try {
|
||||||
view.close();
|
view.close();
|
||||||
}catch (Exception e) {
|
}catch (Exception e) {
|
||||||
|
@ -33,6 +34,13 @@ public class closeTaskPagePlugin implements IApprovalSubPlugin {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
flag = true;
|
flag = true;
|
||||||
|
}else {
|
||||||
|
HashMap<String,Object> map = new HashMap<>();
|
||||||
|
map.put("method", "closeWebView");
|
||||||
|
String mapString = JSON.toJSONString(map);
|
||||||
|
logger.info("准备发送指令" + mapString);
|
||||||
|
view.executeClientCommand("callAPPApi", map);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return flag;
|
return flag;
|
||||||
|
|
Loading…
Reference in New Issue