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

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

[已解决] 如何用脚本对对应的控件值调整属性?

[复制链接]
lillian828 发表于 2023-1-31 19:25:16 | 显示全部楼层 |阅读模式
【myApps/OBPM版本号】:v5.0- sp 1
【浏览器类型】:Chrome/其他
【联系方式-QQ】:请留下您的QQ号码
【联系电话】:    请留下您的联系电话,以便技术同事更好解决您的问题
【问题描述】:


Q:
如何用脚本对对应的控件值调整属性?
4.png


A:
这种是在表单源代码写样式

有点类似这种吧 ,具体操控控件的还没有示例

(function(){
    var doc=getCurrentDocument();
    var btn1=doc.getStateLabel();  
println("btn1"+btn1);
    var btn2=doc.getItemValueAsString("SchedulingMode");
println("SchedulingMode:"+btn2)
 
&#160; &#160; var html ="<script type=\"text/javascript\">";
&#160; &#160; html += "$(document).ready(function(){";
&#160; &#160;
&#160; &#160;if("车队".equals(btn2)){
&#160; &#160; &#160; &#160; if("总派车调度".equals(btn1)){
&#160; &#160; &#160; &#160; &#160; println("22222")
&#160; &#160; &#160; &#160; &#160; &#160; html+="jQuery(\".info\").css(\"display\",\"\");";
&#160; &#160; &#160; &#160; &#160; &#160; html+="jQuery(\".carteam\").css(\"display\",\"\");"; &#160; &#160; &#160; &#160; &#160; &#160;
&#160; &#160; &#160; &#160; &#160; &#160; html+="jQuery(\".car\").css(\"display\",\"none\");";
&#160; &#160; &#160; &#160; &#160; &#160; html+="jQuery(\".hotel\").css(\"display\",\"none\");";
&#160; &#160; &#160; &#160; &#160; &#160; html+="jQuery(\".people\").css(\"display\",\"none\");";
&#160; &#160; &#160; &#160; }
&#160; &#160; }

&#160; &#160; html+= "});";
&#160; &#160; html+=" </script>";
&#160; &#160; return html;
})();

4.png

本版积分规则

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

GMT+8, 2026-8-12 07:27

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

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