`
vortexchoo
  • 浏览: 66065 次
  • 性别: Icon_minigender_1
  • 来自: 西安
社区版块
存档分类
最新评论

SC(smart Client)组件编写笔记

 
阅读更多

-------------------------------------------------------------------------------------------------------------------------------

isc.ClassFactory.defineClass("processView4SC", "IButton");

isc.processView4SC.addProperties({
    height:"30", width:"60",
    rowSpan:"*", endRow:true, startRow:true,
    autoDestroy:true,
    // this is going to be an editable data item
    shouldSaveValue:false,
    window:null,
    processTabSet:null,
    img:null,
    vlayout0:null,
    vlayout1:null,
    vlayout2:null,
    vlayout3:null,
    hlayout0:null,
    listGrid0:null,
    listGrid1:null,
    process_DS:null,
    workitem_DS:null,
    arg0:"",
    arg1:"",
    ID:"",
    button:null,
    label_finish:null,
    label_running:null,
    label_undo:null,
    pid:"",
    // Implement 'createCanvas' to build a ListGrid from which the user may
    // select items.
    create: function () {
        return this.button;
    },
    fix:function(){   
        this.img = isc.Img.create({
            ID:"viewer",
            width:780,
            height:360
        });
        this.process_DS=isc.DataSource.create({
            ID:"process",
            dataFormat:"xml",
            dataURL:"/SCProcessViewer/view/queryProcess.do?processInsId="+this.pid,
            recordXPath:"//processInfo", //<processInfo></processInfo> 
             fields:{
                 process_ins_id:{
                 name:"process_ins_id",
                 type:"text"
                 },
                 process_ins_name:{
                 name:"process_ins_name",
                 type:"text"
                 },
                 start_time:{
                 name:"start_time",
                 type:"text"
                 },
                 end_time:{
                 name:"end_time",
                 type:"text"
                 },
                 starter:{
                 name:"starter",
                 type:"text"
                 },
                 description:{
                 name:"description",
                 type:"text"
                 }
             },
             operationBindings:[
                                {operationType:"fetch",
                                 dataURL:"/SCProcessViewer/view/queryProcess.do?processInsId="+this.pid
                                 },
                                {operationType:"add",
                                 dataURL:""
                                 },
                                {operationType:"update",
                                 dataURL:""
                                 },
                                {operationType:"remove",
                                 dataURL:""
                                 }
                            ]
        });
        this.workitem_DS=isc.DataSource.create({
            ID:"workItem",
            dataFormat:"xml",
            dataURL:"/SCProcessViewer/view/queryWorkItem.do?processInsId="+this.pid,
            recordXPath:"//workItemInfo", //<workItemInfo></workItemInfo> 
             fields:{
                 workitem_id:{
                 name:"workitem_id",
                 type:"text"
                 },
                 process_ins_name:{
                 name:"process_ins_name",
                 type:"text"
                 },
                 start_time:{
                 name:"start_time",
                 type:"text"
                 },
                 ids:{
                 name:"ids",
                 type:"text"
                 },
                 description:{
                 name:"description",
                 type:"text"
                 }
                 },
                 operationBindings:[
                                    {operationType:"fetch",
                                     dataURL:"/SCProcessViewer/view/queryWorkItem.do?processInsId="+this.pid
                                     },
                                    {operationType:"add",
                                     dataURL:""
                                     },
                                    {operationType:"update",
                                     dataURL:""
                                     },
                                    {operationType:"remove",
                                     dataURL:""
                                     }
                                ]
        });
        this.listGrid0=isc.ListGrid.create({
            ID:"processInfo",
            dataSource:"process",
            autoDraw:false,
            fields:[
            {
            align:"center",
            name:"process_ins_name",
            title:"流程名称"
            },
            {
            align:"center",
            name:"process_ins_id",
            title:"流程编号"
            },
            {
            align:"center",
            name:"start_time",
            title:"流程开始时间"
            },
            {
            align:"center",
            name:"end_time",
            title:"流程结束时间"
            },
            {
            align:"center",
            name:"starter",
            title:"流程启动人"
            },
            {
            align:"center",
            name:"description",
            title:"描述"
            }
            ]
        });
       
       
        this.listGrid1=isc.ListGrid.create({
            ID:"workitemInfo",
            dataSource:"workItem",
            autoDraw:false,
            fields:[
            {
            align:"center",
            name:"workitem_id",
            title:"工作项编号"
            },
            {
            align:"center",
            name:"activity_ins_name",
            title:"当前节点名称"
            },
            {
            align:"center",
            name:"start_time",
            title:"活动开始时间"
            },
            {
            align:"center",
            name:"ids",
            title:"流程参与人"
            },
            {
            align:"center",
            name:"description",
            title:"描述"
            }
            ]
        });
        this.vlayout0=isc.VLayout.create({
            ID:"processVLayout0",
            autoDraw:false,
            members:[
            this.img
            ]
            });
        this.label_finish=isc.Label.create({
            height: 25,
            width:90,
            backgroundColor: "#76EF5E",
            align: "center",
            valign: "center",
            wrap: false,
            showEdges: false,
            showShadow: false,
            contents: "<font size='2' color='yellow'>完成状态</font>"
            });
        this.label_running=isc.Label.create({
            height: 25,
            width:90,
            backgroundColor: "#C53712",
            align: "center",
            valign: "center",
            wrap: false,
            showEdges: false,
            showShadow: false,
            contents: "<font size='2' color='yellow'>运行状态</font>"
            });
        this.label_undo=isc.Label.create({
            height: 25,
            width:90,
            backgroundColor: "#375C90",
            align: "center",
            valign: "center",
            wrap: false,
            showEdges: false,
            showShadow: false,
            contents: "<font size='2' color='yellow'>未执行状态</font>"
            });
        this.vlayout3=isc.VLayout.create({
            ID:"labelVLayout",
            autoDraw:false,
            members:[
                     this.label_finish,
                     this.label_running,
                     this.label_undo
            ]
            });
        this.hlayout0=isc.HLayout.create({
            ID:"processHLayout0",
            autoDraw:false,
            members:[
            this.vlayout0,
            this.vlayout3
            ]
            });
        this.vlayout1=isc.VLayout.create({
            ID:"processVLayout1",
            autoDraw:false,
            members:[
            this.hlayout0,
            this.listGrid0
            ]
            });
        this.vlayout2=isc.VLayout.create({
            ID:"processVLayout2",
            autoDraw:false,
            members:[
            this.listGrid1
            ]
            });
        this.processTabSet = isc.TabSet.create({
            ID:"processTabSet",
            autoDraw:false,
            tabs:[
            {
                title:"流程图查看",
                pane:this.vlayout1,
                ID:"Tab0",
                click:
                function(){
                }
            },
            {
                title:"流程流向查看",
                pane:this.vlayout2,
                ID:"Tab2",
                click:
                function(){
                }
                }
            ],
            destroyPanes:false
            });
            this.window= isc.Window.create({
                ID:"processViewWindow",
                autoDraw:false,
                items:[
                   this.processTabSet 
                ],
                title:"流程明细查看",
                width:900,
                height:480,
                autoCenter:true,
                showShadow:false,
                isModal:true,
                showMinimizeButton:false
                });
            this.button=isc.IButton.create({
                ID:"viewButton",
                autoDraw:false,
                title:"查看",
                click:
                function(){
                    this.showProcessView(this.arg0, this.arg1);
                }
                });
    },
    showProcessView:function(processInsId,loginName){
        this.arg0 = processInsId;
        this.arg1 = loginName;
        this.pid = processInsId;
        this.fix();
        this.img.setSrc("/monitor/MonitorServerlet?pinsId="+this.arg0+"&name="+this.arg1);
        this.listGrid0.fetchData();
        this.listGrid1.fetchData();
        this.window.show();
    },
    setProcessInsId:function(porcessInsId){
        this.arg0 = porcessInsId;
    },
    setLoginName:function(loginName){
        this.arg1 = loginName;
    }
});

分享到:
评论

相关推荐

    基于Smart组件的工业机器人码垛仿真设计.pdf

    文章指出,利用RobotStudio的Smart组件构建动态输送链等关键组件,能够模拟实际的工业生产过程,包括动态输送链SC_InFeeder的构建。该链由Source、Conveyor、Sink等元素组成,通过这些元素的设置,可以在仿真中创建...

    工业机器人离线编程ABB创建SC输送链Smart组件PPT学习教案.pptx

    【工业机器人离线编程ABB创建SC输送链Smart组件】是RobotStudio软件中的一项高级功能,主要用于模拟和设计工业生产中的自动化流程。Smart组件是ABB机器人离线编程中的一个重要概念,它能够实现高度仿真的动态效果,...

    SmartClient for PHP-开源

    SmartClient for PHP旨在帮助使用“ SmartClient Ajax Ria System”PHP程序员,使他们能够更快地编写SC代码,并确保即使新的SmartClient版本出炉,您的应用程序也能正常工作。

    电信设备-具有防误插识别信息的SC连接器组件及其SC插头.zip

    本话题将详细探讨"具有防误插识别信息的SC连接器组件及其SC插头"这一技术领域。 首先,SC连接器组件的设计目标是确保信号传输的稳定性和可靠性。其主要组成部分包括插芯、套筒、法兰盘以及锁紧机构。插芯是连接器...

    监控程序 SERVER V625_SC_Client

    "SERVER V625_SC_Client" 是一款专为服务器监控设计的软件,可能包含了客户端组件,允许管理员远程监控和管理服务器性能。 这款监控程序可能具备以下功能: 1. **系统资源监控**:监控CPU使用率、内存占用、磁盘...

    PCSC.rar_PCSC_pc/sc_smartcard_smartcard API

    标题中的"PCSC.rar_PCSC_pc/sc_smartcard_smartcard API" 指的是与PC/SC(Personal Computer/Smart Card)相关的智能卡API,这是一个在Windows操作系统中用于开发与智能卡交互的应用程序编程接口。PC/SC是智能卡技术...

    SC.ZIP_Smartcard reader_pc/sc_pcsc_drv.h_smartcard_visual c

    标题中的"SC.ZIP_Smartcard reader_pc/sc_pcsc_drv.h_smartcard_visual c"表明这是一个与智能卡读卡器相关的编程资源,特别是针对Windows平台的PC/SC(Personal Computer/Smartcard)框架。PC/SC是一种标准,允许...

    sc_client_control_interface_tcp_vcpp

    "sc_client_control_interface_tcp_vcpp" 是一个基于TCP协议的客户端控制接口的VC++开发示例,由Samlight官方提供,适用于那些希望进行二次开发的程序员。这个示例旨在帮助开发者理解和实现如何通过TCP连接与服务器...

    sc-client:成为ServiceComb服务中心的客户端

    NewClient ( sc. Options { Addrs : [] string { "127.0.0.1:30100" }, }) 声明并注册微服务 var ms = new (discovery. MicroService ) var m = make ( map [ string ] string ) m [ "abc" ] = "abc" m [ ...

    PCSC.zip_PC SC_PCSC api_c++ pcsc_pc/sc_smartcard API

    标题中的“PCSC.zip_PC SC_PCSC api_c++ pcsc_pc/sc_smartcard API”表明这是一个关于使用C++编程语言实现PC/SC(个人计算机/智能卡)API的资源包。PC/SC是一个开放的标准,主要用于在Windows操作系统上与智能卡进行...

    RBAC-SC: Role-based access control using smart contract中文翻译

    RBAC-SC:基于智能合约的基于角色的访问控制 本文提出了一种基于智能合约的基于角色的访问控制(RBAC-SC),它利用以太坊的智能合约技术实现角色的跨组织利用。RBAC-SC 使用智能合约和区块链技术,是一种多功能的...

    PC/SC 设备指令通讯工具 APDU发送工具

    标题中的“PC/SC 设备指令通讯工具 APDU发送工具”指的是一个专门用于与符合PC/SC(个人计算/智能卡)框架的读卡器进行通信的软件工具。该工具的核心功能是发送APDU(应用协议数据单元)命令,这是智能卡与读卡器...

    SC5654芯片YoC适配组件

    SC5654芯片与YoC的适配组件是一个关键的技术话题,特别是在当前的物联网(IoT)和嵌入式系统领域。这篇文章将深入探讨SC5654芯片的特性和YoC操作系统如何进行适配,以及这个适配组件的重要性和实现细节。 首先,SC...

    SmartCard 编程实例。 VS2008编译通过

    这个框架基于PC/SC工作小组制定的标准,提供了统一的API,使得开发者可以跨不同硬件平台编写SmartCard应用。 在"PCSC_VC例程"这个压缩包中,很可能包含了使用Visual Studio 2008(VS2008)和C++语言编写的PC/SC接口...

    smart_sc4236.rar

    【标题】"smart_sc4236.rar"指的是一个压缩包文件,其核心内容是针对SmartSens CS4236传感器的配置文件。SmartSens是一家知名的半导体公司,主要专注于高性能CMOS图像传感器的研发与制造。CS4236可能是他们推出的一...

    SMART200 模拟量 库文件

    标题中的“SMART200 模拟量 库文件”指的是西门子SMART 200系列PLC(可编程逻辑控制器)中的模拟量处理库。这个库文件专门用于处理和转换模拟量信号,帮助用户在200 SMART PLC程序中更方便地进行模拟量的读取和控制...

    如何用2SC2539替换2SC1971

    3. **兼容性检查**:确保所有其他组件与2SC2539兼容。 通过上述详细的分析和指导,我们可以看到,在合适的条件下,使用2SC2539替换2SC1971是可行且有效的。当然,每个具体的项目都可能存在差异,因此在实际操作过程...

    基于C#的SamLight二次开发DEMO,sc_client_control_interface_tcp_csharp.zip

    如出现错误:未能解析目标框架“.NETFramework,Version=v3.5,Profile=Client”的 mscorlib。如果未安装目标框架或框架名字对象的格式不正确,则会出现此情况。则删除引用中带感叹号的项,重新编译。

    PC/SC 协议文档

    PC/SC(Personal Computer/Smart Card)协议是个人计算机与智能卡交互的一套标准,由PC/SC工作组在2010年4月发布的新版本,旨在提供一种统一的接口,使不同厂商的智能卡读卡器与计算机系统能够无缝配合,实现跨平台...

    MDOS_SC_User_Manual_CHS_V3.0.pdf

    截止目前MDOS Smart Client用户手册在全网都搜不到相关说明,为此我从微软官网下载“MDOS_SC_User_Manual_CHS_V3.0.pdf”供有需求的同学参考! 未找到这份中文版PDF前,我一边安装一边做一份PPT操作说明文档,包含...

Global site tag (gtag.js) - Google Analytics