首页 > 其他分享 >氚云前端代码对控件赋值

氚云前端代码对控件赋值

时间:2023-05-30 11:56:52浏览次数:112  
标签:控件 false string data 前端 ZBI var SetVisible 赋值

一、

先说表单子表,进行自动排序

    var parent = this;

  //先将对象也就是子表,进行绑定改变事件
        this.D000685F044da22ee9b54a669386935b72c2b7a0.BindChange( "Set", function( data ) {
            debugger;
            //var i = 1;

            debugger;
        //第一次获取第一行数据,一般新增的时候默认有第一行
       //之后的数据每次新增都会进行这个事件,然后获取data来取新增行的id var responseData = data[ 0 ]; // 当前行
       //获取行数GetRowsCount() var rowsCount = parent.D000685F044da22ee9b54a669386935b72c2b7a0.GetRowsCount();//获取子表总行数
       //获取行id对行进行赋值依据行id进行修改 var currentRowId = responseData.ObjectId; //获取行ID parent.D000685F044da22ee9b54a669386935b72c2b7a0.UpdateRow( currentRowId, { "D000685F044da22ee9b54a669386935b72c2b7a0.seqence": rowsCount }); });

二、

场景,一个表单需要多个部门进行同时操作,单互相不能看到操作数据内容。解决方法,进行子流程,表单与主表单相同,对表单内容进行人员判断,来划分表单权限。

进行身份信息传值(前后端)

后端

  if(actionName == "GetCurrentLoginUser")
        {
            //       string ActivityCode=this.Request.ActivityCode ;fpv1z6maokr2askcyqgl3d940.i_d153103sbw6oiwqre65h03dtqtgksx317
            string objectidi = this.Request.BizObject["ObjectId"] + string.Empty;
      // 查询表单数据 string fqr = "SELECT * FROM i_D153103Swog8nponsxz1mzbrzfzoctrk1 where ObjectId='" + objectidi + "'"; System.Data.DataTable fqrlc = this.Engine.Query.QueryTable(fqr, null); string dept = ""; if(fqrlc.Rows.Count > 0) {
          //获取创建人 dept = fqrlc.Rows[0]["CreatedBy"].ToString(); }
      //业务部门验证 string yewu = this.Request.BizObject["F0000171"] + string.Empty; string yewin = ""; if(yewu != "") { yewin = "true"; } // if(yewin=="true") { // this.Request.v // } //bbdfbb8c-69a9-4572-a068-1f00b254cfd4 工程部 //3ac7c1fc-bba1-4051-8b04-684b28cedabf 招投标 //8d03182c-0177-4fdf-be67-207bddc53747 计采部 //6a37c7fd-ae2c-424b-bc8d-fc03914ce2ba 技术部
      //进行数据传值到前端
response.ReturnData = new Dictionary<string, object>();//默认response.ReturnData值为null,所以此处需要初始化 response.ReturnData.Add("User", dept);//将当前登录用户的用户Id响应回前端 response.ReturnData.Add("YWin", yewin);// // response.ReturnData.Add("ActivityCode",ActivityCode );//将当前审批节点响应回前端 }

前端,进行判断,来隐藏表单控件内容

 debugger;
             var parent = this;
             var enviroment = $.SmartForm.ResponseContext;
             if( !enviroment.IsCreateMode ) {
                 //PostForm请求后端,actionName为"GetCurrentLoginUser"
                 var result = "";
                 var UserId = "";
                 var UserName = "";
                 var UnitId = "";
                 var ZBI = "";
                 var ActivityCode = $.SmartForm.ResponseContext.ActivityCode;
          //前端PostForm请求后端,后端返回前端的数据组 $.SmartForm.PostForm( "GetCurrentLoginUser", {}, function( data ) { if( data.Errors && data.Errors.length ) { $.IShowError( "错误", JSON.stringify( data.Errors ) );//将后端添加到Errors集合里的异常信息弹出 } else { result = data.ReturnData; ZBI = result[ "User" ]; UnitId = result[ "YWin" ]; } }, function( error ) { $.IShowError( "错误", JSON.stringify( error ) );//将后端未知异常弹出 }, false ); if( UnitId == "true" ) { //计采 this.D153103Fo1rhupuxnhwha22swcf2em293.SetVisible( false ); this.F0000176.SetVisible( false ); this.F0000009.SetVisible( false ); this.F0000087.SetVisible( false ); this.F0000010.SetVisible( false ); this.F0000088.SetVisible( false ); //招投标 this.D153103Fcj35dyg66ppz9et0yhwsumot1.SetVisible( false ); this.F0000175.SetVisible( false ); this.F0000020.SetVisible( false ); this.F0000090.SetVisible( false ); //技术部 this.D153103Fx1mip81ntz2xyxmmpzcqg5m85.SetVisible( false ); this.F0000174.SetVisible( false ); this.F0000046.SetVisible( false ); this.F0000098.SetVisible( false ); //工程 this.D153103Fxeqy6ar7ycgi1ogv8tl0qt557.SetVisible( false ); this.F0000177.SetVisible( false ); this.F0000057.SetVisible( false ); this.F0000100.SetVisible( false ); } //bbdfbb8c-69a9-4572-a068-1f00b254cfd4 工程部a9f1ade6-1c31-41f4-b6e2-cdf283babef4 //3ac7c1fc-bba1-4051-8b04-684b28cedabf 招投标 //8d03182c-0177-4fdf-be67-207bddc53747 计采部e897a0b6-863f-418f-8732-e74568421e3e //6a37c7fd-ae2c-424b-bc8d-fc03914ce2ba 技术部 //工程 if( ZBI == "a9f1ade6-1c31-41f4-b6e2-cdf283babef4" ) { //计采 this.D153103Fo1rhupuxnhwha22swcf2em293.SetVisible( false ); this.F0000176.SetVisible( false ); this.F0000009.SetVisible( false ); this.F0000087.SetVisible( false ); this.F0000010.SetVisible( false ); this.F0000088.SetVisible( false ); //招投标 this.D153103Fcj35dyg66ppz9et0yhwsumot1.SetVisible( false ); this.F0000175.SetVisible( false ); this.F0000020.SetVisible( false ); this.F0000090.SetVisible( false ); //技术部 this.D153103Fx1mip81ntz2xyxmmpzcqg5m85.SetVisible( false ); this.F0000174.SetVisible( false ); this.F0000046.SetVisible( false ); this.F0000098.SetVisible( false ); //业务 this.D153103Frwdov8xcowd1m45qsf1b5e344.SetVisible( false ); this.F0000030.SetVisible( false ); this.F0000173.SetVisible( false ); this.F0000094.SetVisible( false ); this.F0000031.SetVisible( false ); this.F0000092.SetVisible( false ); this.F0000127.SetVisible( false ); this.F0000128.SetVisible( false ); this.F0000153.SetVisible( false ); this.F0000154.SetVisible( false ); this.F0000129.SetVisible( false ); this.F0000148.SetVisible( false ); this.F0000130.SetVisible( false ); this.F0000131.SetVisible( false ); this.F0000156.SetVisible( false ); this.F0000157.SetVisible( false ); this.F0000132.SetVisible( false ); this.F0000133.SetVisible( false ); this.F0000158.SetVisible( false ); this.F0000159.SetVisible( false ); } //招投 if( ZBI == "3ac7c1fc-bba1-4051-8b04-684b28cedabf" ) { //计采 this.D153103Fo1rhupuxnhwha22swcf2em293.SetVisible( false ); this.F0000176.SetVisible( false ); this.F0000009.SetVisible( false ); this.F0000087.SetVisible( false ); this.F0000010.SetVisible( false ); this.F0000088.SetVisible( false ); //技术部 this.D153103Fx1mip81ntz2xyxmmpzcqg5m85.SetVisible( false ); this.F0000174.SetVisible( false ); this.F0000046.SetVisible( false ); this.F0000098.SetVisible( false ); //工程 this.D153103Fxeqy6ar7ycgi1ogv8tl0qt557.SetVisible( false ); this.F0000177.SetVisible( false ); this.F0000057.SetVisible( false ); this.F0000100.SetVisible( false ); //业务 this.D153103Frwdov8xcowd1m45qsf1b5e344.SetVisible( false ); this.F0000173.SetVisible( false ); this.F0000030.SetVisible( false ); this.F0000094.SetVisible( false ); this.F0000031.SetVisible( false ); this.F0000092.SetVisible( false ); this.F0000127.SetVisible( false ); this.F0000128.SetVisible( false ); this.F0000153.SetVisible( false ); this.F0000154.SetVisible( false ); this.F0000129.SetVisible( false ); this.F0000148.SetVisible( false ); this.F0000130.SetVisible( false ); this.F0000131.SetVisible( false ); this.F0000156.SetVisible( false ); this.F0000157.SetVisible( false ); this.F0000132.SetVisible( false ); this.F0000133.SetVisible( false ); this.F0000158.SetVisible( false ); this.F0000159.SetVisible( false ); } //计采 if( ZBI == "8d03182c-0177-4fdf-be67-207bddc53747" || ZBI == "c9c00bd6-e81e-40b7-894b-8b5b004878ec" || ZBI=="e897a0b6-863f-418f-8732-e74568421e3e") { //招投标 this.D153103Fcj35dyg66ppz9et0yhwsumot1.SetVisible( false ); this.F0000175.SetVisible( false ); this.F0000020.SetVisible( false ); this.F0000090.SetVisible( false ); //技术部 this.D153103Fx1mip81ntz2xyxmmpzcqg5m85.SetVisible( false ); this.F0000174.SetVisible( false ); this.F0000046.SetVisible( false ); this.F0000098.SetVisible( false ); //工程 this.D153103Fxeqy6ar7ycgi1ogv8tl0qt557.SetVisible( false ); this.F0000177.SetVisible( false ); this.F0000057.SetVisible( false ); this.F0000100.SetVisible( false ); //业务 this.D153103Frwdov8xcowd1m45qsf1b5e344.SetVisible( false ); this.F0000173.SetVisible( false ); this.F0000030.SetVisible( false ); this.F0000094.SetVisible( false ); this.F0000031.SetVisible( false ); this.F0000092.SetVisible( false ); this.F0000127.SetVisible( false ); this.F0000128.SetVisible( false ); this.F0000153.SetVisible( false ); this.F0000154.SetVisible( false ); this.F0000129.SetVisible( false ); this.F0000148.SetVisible( false ); this.F0000130.SetVisible( false ); this.F0000131.SetVisible( false ); this.F0000156.SetVisible( false ); this.F0000157.SetVisible( false ); this.F0000132.SetVisible( false ); this.F0000133.SetVisible( false ); this.F0000158.SetVisible( false ); this.F0000159.SetVisible( false ); } //技术 if( ZBI == "6a37c7fd-ae2c-424b-bc8d-fc03914ce2ba" ) { //计采 this.D153103Fo1rhupuxnhwha22swcf2em293.SetVisible( false ); this.F0000176.SetVisible( false ); this.F0000009.SetVisible( false ); this.F0000087.SetVisible( false ); this.F0000010.SetVisible( false ); this.F0000088.SetVisible( false ); //招投标 this.D153103Fcj35dyg66ppz9et0yhwsumot1.SetVisible( false ); this.F0000175.SetVisible( false ); this.F0000020.SetVisible( false ); this.F0000090.SetVisible( false ); //工程 this.D153103Fxeqy6ar7ycgi1ogv8tl0qt557.SetVisible( false ); this.F0000177.SetVisible( false ); this.F0000057.SetVisible( false ); this.F0000100.SetVisible( false ); //业务 this.D153103Frwdov8xcowd1m45qsf1b5e344.SetVisible( false ); this.F0000173.SetVisible( false ); this.F0000030.SetVisible( false ); this.F0000094.SetVisible( false ); this.F0000031.SetVisible( false ); this.F0000092.SetVisible( false ); this.F0000127.SetVisible( false ); this.F0000128.SetVisible( false ); this.F0000153.SetVisible( false ); this.F0000154.SetVisible( false ); this.F0000129.SetVisible( false ); this.F0000148.SetVisible( false ); this.F0000130.SetVisible( false ); this.F0000131.SetVisible( false ); this.F0000156.SetVisible( false ); this.F0000157.SetVisible( false ); this.F0000132.SetVisible( false ); this.F0000133.SetVisible( false ); this.F0000158.SetVisible( false ); this.F0000159.SetVisible( false ); } }

 

标签:控件,false,string,data,前端,ZBI,var,SetVisible,赋值
From: https://www.cnblogs.com/H-Yan/p/17442853.html

相关文章

  • L1频段卫星导航射频前端低噪声放大器芯片 AT2659/AT2659S
    AT2659是一款具有高增益、低噪声系数的低噪声放大器(LNA)芯片,支持L1频段多模式全球卫星定位,可以应用于GPS、北斗二代、伽利略、Glonass等GNSS导航接收机中。芯片采用先进的SiGe工艺制造,采用1.5mmX1mm×0.78mm的6pinDFN封装。主要特点-支持北斗、GPS、GALILEO、GLONASS......
  • 前端返回时直接关闭页面
    任务场景是,企业微信环境下,通过鉴权页面跳转到目标页面,但是目标页面返回总是跳回到鉴权页面,然后又直接跳到目标页面了,导致页面关闭异常。提供解决方式:监听页面返回事件,在手动关闭页面。前端用的环境是vue。//挂载时mounted(){history.pushState(null,null,document.URL......
  • vue前端的avue-crud操作
     1、在js中获取某个字段的属性,或设置字段的值:constcolumn=this.findObject(this.option.column,"parentId");column.disabled=true;//设置为禁用此字段column.value='1';//设置parentId字段的value值console.log("column属性:",co......
  • ProgressBar控件(进度条)
    基础知识参阅官方文档:ProgressBar控件概述-WindowsForms.NETFramework|MicrosoftLearnC#ProgressBar的简单使用-Riku君-博客园(cnblogs.com)......
  • 前端开发如何更好的避免样式冲突?级联层(CSS@layer)
    作者:vivo互联网前端团队-ZhangJiqi本文主要讲述了CSS中的级联层(CSS@layer),讨论了级联以及级联层的创建、嵌套、排序和浏览器支持情况。级联层可以用于避免样式冲突,提高代码可读性和可维护性。一、什么是级联层(CascadeLayers)?1.1级联层的官方定义我们参看Cascadingand......
  • 2023-05-30 前端h5页面如何实现调起微信支付功能(该回答来自chatgpt,实际效果未测试)
    前端H5页面调起微信支付功能需要结合微信JS-SDK和后端接口实现。以下是基本步骤和示例代码:1.获取微信公众号的appid和secret在微信公众平台上创建一个公众号,获取其对应的appid和secret。2.引入微信JS-SDK将微信JS-SDK的链接放入HTML文件的头部,例如:<scriptsrc="https://res.......
  • Wpf基础入门——控件介绍
    本篇文章学习于:刘铁猛老师《深入浅出WPF》控件到底是什么?WPF中是数据驱动UI,数据是核心、是主动的;UI从属于数据并表达数据、是被动的。Control是数据和行为的载体,而无需具有固定的形象。控件的派生关系如下:WPF的内容模型各类内容模型详解我们把符合某类内容模型的UI元......
  • 细说ActiveX控件
    ActiveX技术介绍ActiveX技术起源于1996年,当时微软推出了一种名为“OLEControlExtension”(OCX)的技术,用于在Windows操作系统中实现可重用的软件组件。后来,微软将OCX技术扩展为“ActiveXControl”,并将其作为InternetExplorer浏览器的核心技术之一,用于在Web页面中嵌入可重用的软......
  • 推荐一款轻量级 eBPF 前端工具 ply
    1Overviewply是eBPF的front-end前端工具之一,专为embeddedLinuxsystems开发,采用C语言编写,只需libc和内核支持BPF就可以运行,不需要外部kernel模块,不需要LLVM,不需要python。ply由瑞典工程师TobiasWaldekranz开发,其项目主页是PLYLight-weightDynamicTra......
  • 前端开发中解决客户电脑没有想要的字体解决办法
    前言前端开发中,字体是很重要的一部分。特别是针对一些演示大屏页面做开发时,字体更为重要。然而,当客户电脑没有安装你想要的字体时,页面可能会达不到预期效果。那么该怎么办呢?解决方案:以下是一些常用的解决办法使用WebFontsWebFonts可以使你的网站在任何浏览器上都能展示你......