⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 designer.ascx

📁 ASP.NET+VML开发的工作流图软件
💻 ASCX
📖 第 1 页 / 共 2 页
字号:
								var tempPosX=xmlDoc.createElement('PosX');
								tempPosX.text=AllRect[j].parentElement.style.left;
								tempElement.appendChild(tempPosX);
								//PosY
								var tempPosY=xmlDoc.createElement('PosY');
								tempPosY.text=AllRect[j].parentElement.style.top;
								tempElement.appendChild(tempPosY);
						}
					}
					else
					{
						//对单个的项增加XML数据
					}
				}
				//去掉前导的;号
				//去掉前导,号
				if(AfterDeparts.length>0)
				{
					AfterDeparts=AfterDeparts.substring(1);
				}
				if(DepartsDays.length>0)
				{
					DepartsDays=DepartsDays.substring(1);
				}
				
		//最终返回数据
		return xmlDoc.xml;
	}

//取得所有的后置部门
	function GetAfterDepartments(WorkFlowItemID)
	{
	//结束点就出去吧,不用求了。
		if(WorkFlowItemID=='-1') return "";
				var allLine = document.body.all.item('ConnectLine');
				var i;
				var preWorkFlowItems='';
				
				if (allLine!=null)
				{
					var count=allLine.length;
					if (count)
					{
						for (i=count-1; i>=0; i--)
						{
						//去除为0的节点
							if(allLine[i].BeginShape==WorkFlowItemID && allLine[i].EndShape!='-1')
							preWorkFlowItems=preWorkFlowItems+","+allLine[i].EndShape;
						}
					}
					else
					{
							if(allLine.BeginShpae==WorkFlowItemID && allLine.EndShape!='-1')
							preWorkFlowItems=preWorkFlowItems+","+allLine.EndShape;
					}
					//去掉前导,号
					//if(preWorkFlowItems.length>0)
					//{
					//	preWorkFlowItems=preWorkFlowItems.substring(1);
					//}
					return preWorkFlowItems;
				} 
	}
	//取得一个节点的前置节点
	function GetPreWorkFlowItems(WorkFlowItemID)
		{
			var allLine = document.body.all.item('ConnectLine');
			var i;
			var preWorkFlowItems='';
			
			if (allLine!=null)
			{
				var count=allLine.length;
				if (count)
				{
					for (i=count-1; i>=0; i--)
					{
					//去除为0的节点
						if(allLine[i].EndShape==WorkFlowItemID )
						preWorkFlowItems=preWorkFlowItems+","+allLine[i].BeginShape;
					}
				}
				else
				{
						if(allLine.EndShape==WorkFlowItemID )
						preWorkFlowItems=preWorkFlowItems+","+allLine.BeginShape;
				}
				//去掉前导,号
				if(preWorkFlowItems.length>0)
				{
					preWorkFlowItems=preWorkFlowItems.substring(1);
				}
				return preWorkFlowItems;
			}
	}


	//将WorkFlowItem的ID变化时,同时更新关系
	function UpdateRel(odlItemID,NewItemID)
	{
		var allLine = document.body.all.item('ConnectLine');
			var i;
			
			if (allLine!=null)
			{
				var count=allLine.length;
				if (count)
				{
					for (i=count-1; i>=0; i--)
					{
						if(allLine[i].BeginShape==odlItemID)
						allLine[i].BeginShape=NewItemID;
						if( allLine[i].EndShape==odlItemID)
						allLine[i].EndShape=NewItemID;
					}
				}
				else
				{
						if(allLine.BeginShape==odlItemID)
						allLine.BeginShape=NewItemID;
						if( allLine.EndShape==odlItemID)
						allLine.EndShape=NewItemID;
				}
			}
	}

	//删除节点同时删除关系
	function DeleteRelLine(WorkFlowItem)
	{

		if(!window.confirm('确定要删除吗?'))return;
		//若是线段的话
		if(WorkFlowItem.className=="NormalLine")
		{
			WorkFlowItem.outerHTML='';
			return;
		}
		//记录节点的ID
		var tempitemid=WorkFlowItem.id;
		//清除整个组
		WorkFlowItem.parentElement.outerHTML='';

		var allLine = document.body.all.item('ConnectLine');
				var i;
				
				if (allLine!=null)
				{
					var count=allLine.length;
					if (count)
					{
						for (i=count-1; i>=0; i--)
						{
							if(allLine[i].BeginShape==tempitemid||allLine[i].EndShape==tempitemid)
							allLine[i].outerHTML='';
						}
					}
					else
					{
							if(allLine.BeginShape==tempitemid|| allLine.EndShape==tempitemid)
							allLine.outerHTML='';
					}
				}
	}

	//保存数据
	function btnSave_onclick() 
	{
		try
		{
		var tempdata=CreateXmlData();
			window.alert(tempdata);
			document.all.item('Designer1_XMLData').value=tempdata;
		}
		catch(e)
		{
			window.alert('流程不能保存,有未指定部门');
		}
	}

//-->
</script>
<style>A { COLOR: white; TEXT-DECORATION: none }
	A:hover { COLOR: yellow; TEXT-DECORATION: underline }
	TD { FONT-SIZE: 12px }
	.bon1 { BORDER-RIGHT: #eeeeee 1px solid; BORDER-TOP: gray 1px solid; BORDER-LEFT: gray 1px solid; WIDTH: 54px; COLOR: yellow; BORDER-BOTTOM: #eeeeee 1px solid; BACKGROUND-COLOR: #619ce7 }
	.bon2 { BORDER-RIGHT: gray 1px solid; BORDER-TOP: #eeeeee 1px solid; BORDER-LEFT: #eeeeee 1px solid; WIDTH: 54px; COLOR: white; BORDER-BOTTOM: gray 1px solid; BACKGROUND-COLOR: gray }
</style>
<span id="WorkFlowItemMenu" style="DISPLAY: none; Z-INDEX: 102; POSITION: absolute; BACKGROUND-COLOR: olive"> <!--弹出菜单--><input class="bon2" onclick='WorkFlowItemMenu.style.display="none";SelectDepartment(thisobj);'
		type="button" value="设置属性" id="SelDep"><br>
	<input class="bon2" id="shanchu" onclick='WorkFlowItemMenu.style.display="none";DeleteRelLine(thisobj)'
		type="button" value="删除"><!--删除需要将节点间关系一并删除-->
	<hr style="WIDTH: 50px" color="white" SIZE="0">
	<input class="bon2" onclick='WorkFlowItemMenu.style.display="none"' type="button" value="取消">
</span>
<TABLE id="Table1" height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0">
	<TR>
		<TD vAlign="top" noWrap align="left" width="85%" height="100%"><div class="WorkFlowMap" id="Chart" style="BORDER-RIGHT: silver 1px solid; BORDER-TOP: silver 1px solid; Z-INDEX: 101; LEFT: 0px; BORDER-LEFT: silver 1px solid; WIDTH: 100%; BORDER-BOTTOM: silver 1px solid; POSITION: absolute; TOP: 0px; HEIGHT: 95.25%"><v:group id="WorkFlowGroup" style="WIDTH: 200px; POSITION: absolute; HEIGHT: 200px; v-text-anchor: middle-center"
					coordsize="2000,2000"><v:polyline id="line1" style="Z-INDEX: 2000; POSITION: absolute" points="0,0,100,100"> <!--钢笔可视化--><v:stroke dashstyle="shortDash" />
					</v:polyline>
					<asp:xml id="WorkflowDisplay" runat="server" TransformSource="WorkFlow.xslt"></asp:xml>
				</v:group></div>
		</TD>
		<TD noWrap valign="top" align="center" height="100%" width="15%">
			<DIV style="BORDER-RIGHT: olive 1px solid; BORDER-TOP: olive 1px solid; LEFT: 614px; BORDER-LEFT: olive 1px solid; WIDTH: 90%; BORDER-BOTTOM: olive 1px solid; TOP: 100px; HEIGHT: 100%"
				ms_positioning="FlowLayout" id="ToolsKit"><FONT face="宋体">
					<P><BR>
						<BR>
				</FONT><FONT face="宋体"><INPUT language="javascript" id="btnCreate" style="BORDER-RIGHT: gray 1px solid; BORDER-TOP: gray 1px solid; BORDER-LEFT: gray 1px solid; BORDER-BOTTOM: gray 1px solid"
						type="button" value="新建流程图" name="btnCreate" runat="server"><BR>
				</FONT><INPUT style="BORDER-RIGHT: gray 1px solid; BORDER-TOP: gray 1px solid; BORDER-LEFT: gray 1px solid; BORDER-BOTTOM: gray 1px solid"
					type="button" value="添加流程节点" id="btnADD" language="javascript" onclick="return btnADD_onclick()"><FONT face="宋体"><BR>
				</FONT><INPUT language="javascript" id="btnSave" style="BORDER-RIGHT: gray 1px solid; BORDER-TOP: gray 1px solid; BORDER-LEFT: gray 1px solid; BORDER-BOTTOM: gray 1px solid"
					onclick="btnSave_onclick();" type="button" value="保存流程数据" runat="server"><FONT face="宋体"><BR>
				</FONT>
				<asp:TextBox id="FlowBaseID" runat="server"></asp:TextBox><FONT face="宋体"><BR>
				</FONT>
				<asp:Button id="btnLoadFlow" runat="server" Text="Button"></asp:Button></P></DIV>
		</TD>
	</TR>
</TABLE>
<INPUT id="XMLData" type="hidden" name="XMLData" runat="server"> 
<!--保存FlowBaseID-->
<INPUT id="FlowBase" type="hidden" name="FlowBase" runat="server">

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -