From 7d477acdfefaf7b016f49107f344a70fc7e994de Mon Sep 17 00:00:00 2001
From: xj qian <qianxj15@sina.com>
Date: 星期二, 01 四月 2025 09:59:13 +0800
Subject: [PATCH] update

---
 jrj/xframe/vbusiness/vframe/frame.vframe.vbusiness.hpp |   91 +++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 87 insertions(+), 4 deletions(-)

diff --git a/jrj/xframe/vbusiness/vframe/frame.vframe.vbusiness.hpp b/jrj/xframe/vbusiness/vframe/frame.vframe.vbusiness.hpp
index 76b8051..f131170 100644
--- a/jrj/xframe/vbusiness/vframe/frame.vframe.vbusiness.hpp
+++ b/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;

--
Gitblit v1.9.3