xj qian
2025-04-01 7d477acdfefaf7b016f49107f344a70fc7e994de
update
已修改1个文件
91 ■■■■■ 文件已修改
jrj/xframe/vbusiness/vframe/frame.vframe.vbusiness.hpp 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jrj/xframe/vbusiness/vframe/frame.vframe.vbusiness.hpp
@@ -412,8 +412,12 @@
        int  nlen = nlist.length();
        KXMLDOMElement ele;
        auto elenode = anode.GetElement();
        xstring nodeName = elenode.tagName();
        xstring tools =L"<vbox class=''>";
        if (scene ==L"list") tools +=L"<xspace height='12'/>";
        if (nodeName == L"hbox")tools = L"<hbox class=''>";
        for (index = 0; index < nlen; index++)
        {
@@ -432,10 +436,20 @@
            xstring tool;
            if (src !=L"")
                tool =(xstring)L"<xtoolbutton src='" + src +L"'  caption='" + label +L"' name='action:" + name +L"' height='23' style='background-color:none #ceecce  none #ffffff'/>";
            if (nodeName == L"hbox")
            {
                if (src != L"")
                    tool = (xstring)L"<xtoolbutton src='" + src + L"'  caption='" + label + L"' name='action:" + name + L"' width='70'  style='font-family:思源黑体 CN Bold;font-size:8pt'/>";
                else
                    tool = (xstring)L"<xtoolbutton image='" + image + L"'  caption='" + label + L"' name='action:" + name + L"' width='70'  style='font-family:思源黑体 CN Bold;font-size:8pt'/>";
            }
            else
                tool =(xstring)L"<xtoolbutton image='" + image +L"'  caption='" + label +L"' name='action:" + name +L"' height='23'  style='background-color:none #ceecce none #ffffff'/>";
            {
                if (src != L"")
                    tool = (xstring)L"<xtoolbutton src='" + src + L"'  caption='" + label + L"' name='action:" + name + L"' height='23' style='background-color:none #ceecce  none #ffffff'/>";
                else
                    tool = (xstring)L"<xtoolbutton image='" + image + L"'  caption='" + label + L"' name='action:" + name + L"' height='23'  style='background-color:none #ceecce none #ffffff'/>";
            }
            tools += tool;
        }
        if (agent)
@@ -449,7 +463,76 @@
                tools += tmp;
            }
        }
        tools +=L"</vbox>";
        if (nodeName == L"hbox")
            tools += L"</hbox>";
        else
            tools +=L"</vbox>";
        SetAgentNode(anode, tools);
        return 1;
    }
    virtual int SetAgent1(xstring scene, xstring EntityID)
    {
        xstring xfNodeAgentArea = L"agentarea";
        xnode anode = GetAgentNode(xfNodeAgentArea);
        KXMLDOMElement xframeElement = GetElement();
        KXMLDOMNode agent = xframeElement.selectSingleNode(L"agent/" + xfNodeAgentArea + L"[1]/*");
        KXMLDOMDocument x;
        xaserverarg arg;
        arg.AddArg(L"scene", scene, L"xs:string");
        arg.AddArg(L"EntityID", EntityID, L"xs:string");
        arg.AddArg(L"TaskID", GetTaskID(), L"xs:string");
        arg.AddArg(L"EntityName", GetEntityName(1), L"xs:string");
        xurl::get(GetServerUrl(), (xstring)L"/workflow/query/datarole/" + GetEntityName(1), arg.GetString(), x);
        //if(x.GetXmlDoc().selectSingleNode("datarole/rightes/right"))
        SetObjectInfo(x.documentElement());
        xstring sNodes;
        sNodes = (xstring)L"datarole/actions/action[contains(@scene,'" + scene + L"')]";
        KXMLDOMNodeList nlist = x.selectNodes(sNodes);
        int  index;
        int  nlen = nlist.length();
        KXMLDOMElement ele;
        xstring tools = L"<vbox class=''>";
        if (scene == L"list") tools += L"<xspace height='12'/>";
        for (index = 0; index < nlen; index++)
        {
            ele = nlist.item(index);
            xstring name = ele.selectSingleNode(L"@id").text();//.getAttribute("id");
            xstring label = ele.selectSingleNode(L"@caption").text();//ele.getAttribute("caption");
            xstring image;
            xstring src = L"";
            if (ele.selectSingleNode(L"@image"))
                image = ele.selectSingleNode(L"@image").text();
            else
                image = L"0 22";
            if (ele.selectSingleNode(L"@src"))
                src = ele.selectSingleNode(L"@src").text();
            xstring tool;
            if (src != L"")
                tool = (xstring)L"<xtoolbutton src='" + src + L"'  caption='" + label + L"' name='action:" + name + L"' height='23' style='background-color:none #ceecce  none #ffffff'/>";
            else
                tool = (xstring)L"<xtoolbutton image='" + image + L"'  caption='" + label + L"' name='action:" + name + L"' height='23'  style='background-color:none #ceecce none #ffffff'/>";
            tools += tool;
        }
        if (agent)
        {
            nlist = agent.selectNodes(L".//xtoolbutton");
            nlen = nlist.length();
            for (index = 0; index < nlen; index++)
            {
                ele = nlist.item(index);
                xstring tmp = ele.xml();
                tools += tmp;
            }
        }
        tools += L"</vbox>";
        SetAgentNode(anode, tools);
        return 1;