天翎MyApps技术社区 - 低代码平台 | 流程管理系统 | BPM软件

 找回密码
 注册成为天翎用户
查看: 2295|回复: 0

[视图-其他视图] 根据选择的树形视图的节点目录,点击添加类别,表单中获取选中节点的值.

[复制链接]
andy1 发表于 2016-7-12 14:44:28 | 显示全部楼层 |阅读模式
175105e78m70bwizzf7he0.jpg
//获取所选节点ID,并将放在新建按钮的执行前脚本中
(function(){
var treeid = getParameter("treedocid");
var request = $WEB.getParamsTable().getHttpRequest();
if(treeid!=null&&treeid!=""){
request.getSession().setAttribute("treeid",treeid)
}
return "";
})()

//本级节点编号的值中,如果为空,则从session传过来的值中获取
(function(){
        var treeid = getParameter("treedocid");
        var nodeid=getItemValueAsString("本级节点编号");
        if(nodeid==""||nodeid==null){
                var request = $WEB.getParamsTable().getHttpRequest();
                var docid = request.getSession().getAttribute("treeid");
                var process=getDocProcess(getApplication());
                var doc = process.doView(docid);
                 nodeid=doc.getItemValueAsString("本级节点编号");
               
        }
        return nodeid;
})()

本版积分规则

QQ|手机版|天翎MyApps技术社区 ( 粤ICP备11093750号 )

GMT+8, 2026-8-12 14:13

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表