<?php
define('includeth',true);
include_once('inc/user_module_v2/dothing_config.php');//系统参数导入
include_once($auth_file);//系统参数导入
include_once($js_file);//系统参数导入
include_once("../../inc/control.php");
include_once("../../inc/communal.class.php");
$com = new Communal();
?>
<html>
<head>
<title>flow</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="themes/gray/easyui.css" />
<link rel="stylesheet" type="text/css" href="themes/icon.css" />
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/jquery.easyui.min.js"></script>
</head>
<body class="bodycolor" topmargin="5" >
<?php
$FLOW_ID=$_GET['FLOW_ID'];
//显示当前步骤是哪一步
if($_GET['step_id']!=""){
$current_stepId=$_GET['step_id'];
}
if($_GET['code']!=""){
$current_code=1;
}
$query="select * from ehr.flow_info where FLOW_ID=$FLOW_ID";
$result=data_list($connection,$query);
$val=mysql_fetch_array($result);
//echo $val['MENU_ID']."<br/>"; //菜单ID
//echo $val['MODULE_ID']."<br/>"; //流程操作模块ID
//echo $val['STEP_ID']."<br/>"; //步骤ID
//echo $val['STEP_NAME']."<br/>"; //步骤名称
//echo $val['SCHEDULING_NAME']."<br/>"; //调度名称
//echo $val['OPERAND_IDENTIFICATION']."<br/>"; //操作标识
//echo $val['PASS_NEXT_STEP']."<br/>"; //下一步步骤值
//echo $val['ROLLBACK_NEXT_STEP']."<br/><br/><br/>"; //上一步步骤值
$stepId=explode(",",substr($val['STEP_ID'],0,-1));
$new_flow=$com -> getFlow($val['MENU_ID'],$val['MODULE_ID'],$stepId[0]); //获取当前流程
$menuName=iconv("gb2312","utf-8",$com -> getMenuModule($val['MENU_ID']));
/*流程图xml*/
$flow_xml="<?xml version='1.0' encoding='UTF-8'?>";
$flow_xml.="<WebFlow>";
$flowId=$val['MENU_ID'].";".$val['MODULE_ID']; //所属流程ID
echo "<input type='hidden' id='menu_module_id' value='$flowId'>"; //记录流程ID传值到javascript
echo "<input type='hidden' id='current_code' value='$current_code'>"; //记录表示查看流程图
$flow_xml.="<FlowConfig><BaseProperties current_stepId='$current_stepId' current_code='$current_code' flowId='$flowId' flowText='$menuName'/><VMLProperties stepTextColor='green' stepStrokeColor='green' stepShadowColor='#b3b3b3' stepFocusedStrokeColor='yellow' isStepShadow='T' actionStrokeColor='green' actionTextColor='' actionFocusedStrokeColor='yellow' sStepTextColor='green' sStepStrokeColor='green' stepColor1='green' stepColor2='white' isStep3D='true' step3DDepth='20'/><FlowProperties flowMode='' startTime='' endTime='' ifMonitor='' runMode='' noteMode='' activeForm='' autoExe=''/></FlowConfig>";
$flow_xml.="<Steps>";
$stepId=explode(",",substr($val['STEP_ID'],0,-1)); //步骤ID
$stepName=explode(",",substr($val['STEP_NAME'],0,-1)); //步骤名称
$schedulingName=explode(",",substr($val['SCHEDULING_NAME'],0,-1)); //调度名称
$operandIdentification=explode(",",substr($val['OPERAND_IDENTIFICATION'],0,-1)); //操作标识
$belongModuleId=explode(",",substr($val['BELONG_MODULE_ID'],0,-1)); //所属模块
$passNextStep=explode(",",substr($val['PASS_NEXT_STEP'],0,-1)); //下一步步骤
$operandIdentification=explode(",",substr($val['OPERAND_IDENTIFICATION'],0,-1)); //操作标识
//新建流程ID
$last_id=count($stepId)-1;
$last_step_id=$stepId[$last_id]+1;
$add_step_id="flow".$last_step_id;
echo "<input type='hidden' id='add_step_id' value='$add_step_id'>"; //新建流程ID传值到javascript
for($i=0;$i<count($stepName);$i++){
$x=200+$i*250; //横坐标
$y=200+$i*150; //竖坐标
$id_name="flow".$stepId[$i];
$text_name=iconv("gb2312","utf-8",$stepName[$i]);
$scheduling_name=iconv("gb2312","utf-8",$schedulingName[$i]);
$operand_identification=$operandIdentification[$i];
$belong_module_name=iconv("gb2312","utf-8",$com -> getMenuModule($belongModuleId[$i]));
$flow_xml.="<Step><BaseProperties id='$id_name' text='$text_name' stepType='NormalStep' schedulingName='$scheduling_name' operandIdentification='$operand_identification' belongModuleName='$belong_module_name'/><VMLProperties width='200' height='200' x='$x' y='$y' textWeight='' strokeWeight='' isFocused='' zIndex=''/><FlowProperties/></Step>";
}
$flow_xml.="<Step><BaseProperties id='begin' text='开始' stepType='BeginStep'/><VMLProperties width='170' height='180' x='25' y='25' textWeight='' strokeWeight='' zIndex=''/><FlowProperties/></Step>";
$flow_xml.="<Step><BaseProperties id='end' text='结束' stepType='EndStep'/><VMLProperties width='170' height='180' x='1608px' y='1484px' textWeight='' strokeWeight='' zIndex='40'/><FlowProperties/></Step>";
$flow_xml.="</Steps>";
$flow_xml.="<Actions>";
$start_to="flow".$stepId[0]; //初始流程
$flow_xml.="<Action><BaseProperties id='action0' text='开始' actionType='PolyLine' from='begin' to='$start_to'/><VMLProperties startArrow='' endArrow='classic' strokeWeight='' isFocused='' zIndex='39'/><FlowProperties/></Action>";
$n=1;
for($j=0;$j<count($stepId);$j++){
$id="action".$n;
$text_name=iconv("gb2312","utf-8",$schedulingName[$j]);
$new_flow=$com -> getFlow($val['MENU_ID'],$val['MODULE_ID'],$stepId[$j]); //获取当前流程
$form_name="flow".$stepId[$j];
$to_name="flow".$new_flow[4];
//结束流程
if($operandIdentification[$j]=="end"){
if($new_flow[5]!="-1"){
$to_roll_name="flow".$new_flow[5];
$flow_xml.="<Action><BaseProperties id='$id' text='$text_name' actionType='PolyLine' from='$form_name' to='$to_roll_name'/><VMLProperties startArrow='' endArrow='classic' strokeWeight='' isFocused='' zIndex='39'/><FlowProperties/></Action>";
$n++;
$id="action".$n;
$flow_xml.="<Action><BaseProperties id='$id' text='完成' actionType='PolyLine' from='$form_name' to='end'/><VMLProperties startArrow='' endArrow='classic' strokeWeight='' isFocused='' zIndex='40'/><FlowProperties/></Action>";
}else{
$flow_xml.="<Action><BaseProperties id='$id' text='完成' actionType='PolyLine' from='$form_name' to='end'/><VMLProperties startArrow='' endArrow='classic' strokeWeight='' isFocused='' zIndex='40'/><FlowProperties/></Action>";
}
}else{
//执行与回退流程
if($new_flow[5]!="-1"){
$flow_xml.="<Action><BaseProperties id='$id' text='$text_name' actionType='PolyLine' from='$form_name' to='$to_name'/><VMLProperties startArrow='' endArrow='classic' strokeWeight='' isFocused='' zIndex='39'/><FlowProperties/></Action>";
$n++;
$id="action".$n;
$to_roll_name="flow".$new_flow[5];
$flow_xml.="<Action><BaseProperties id='$id' text='$text_name' actionType='PolyLine' from='$form_name' to='$to_roll_name'/><VMLProperties startArrow='' endArrow='classic' strokeWeight='' isFocused='' zIndex='39'/><FlowProperties/></Action>";
}else{
$flow_xml.="<Action><BaseProperties id='$id' text='$text_name' actionType='PolyLine' from='$form_name' to='$to_name'/><VMLProperties startArrow='' endArrow='classic' strokeWeight='' isFocused='' zIndex='39'/><FlowProperties/></Action>";
}
}
$n++;
}
$flow_xml.="</Actions>";
$flow_xml.="</WebFlow>";
//生成流程图xml文件
$file_flow = fopen("flows/fly.xml","w");
fwrite($file_flow,$flow_xml);
/*列表xml*/
$menu_name=iconv("gb2312","utf-8",$com -> getMenuModule($val['MENU_ID']));
$new_name="新流程";
$list_xml.="<?xml version='1.0' encoding='utf-8'?>";
$list_xml.="<config><Selects>";
$list_xml.="<select id='flowList'><option value='fly.xml' text='$menu_name' /></select>"; //<option value='newflow.xml' text='$new_name'/>
$list_xml.="</Selects></config>";
//生成列表xml文件
$file_list = fopen("
没有合适的资源?快使用搜索试试~ 我知道了~
php+js实现流程图
共62个文件
gif:13个
js:12个
xml:10个
4星 · 超过85%的资源 需积分: 13 48 下载量 97 浏览量
2013-11-11
12:03:39
上传
评论 4
收藏 174KB RAR 举报
温馨提示
php+js实现流程图 可拖动可右击存入数据库 里面没数据库文件 需自己调整
资源推荐
资源详情
资源评论
收起资源包目录
flow.rar (62个子文件)
jquery.ui.flow.js 4KB
index.html 3KB
wz_jsgraphics.js 23KB
images
right_sword.png 210B
up_sword.png 215B
down_sword.png 207B
left_sword.png 224B
jquery.js 94KB
flow
webflow.html 8KB
update_step.php 2KB
inc
shiftlang.js 2KB
webflow.js 29KB
images
editflow.gif 149B
messages.jpg 889B
newflow.gif 243B
saveflow.gif 1KB
delflow.gif 582B
jquery-1.8.0.js 254KB
function.js 9KB
contextMenu
images
opensub.gif 56B
refresh_vml.gif 182B
add_obj.gif 117B
sendmsg.gif 87B
edit_obj.gif 222B
save.gif 81B
Thumbs.db 52KB
del_obj.gif 162B
add_step.gif 222B
add_action.gif 870B
context.js 5KB
contextmenu.xsl 4KB
webTab
webTab.js 1KB
tab.png 1KB
tab.hover.png 1KB
Thumbs.db 7KB
tab.active.png 1KB
webtab.css 1KB
webflow1.js 24KB
kill.js 99B
movestep.js 4KB
style.css 1KB
flow.php 8KB
flows
fly.xml 3KB
newflow.xml 1KB
备份 fly.xml 4KB
delete_action.php 1KB
_actiondialog.html 12KB
webflow_see.html 8KB
add_action.php 2KB
langs
main_zh.xml 151B
stepdialog_zh.xml 1KB
备份 main_zh.xml 565B
actiondialog_zh.xml 1KB
备份 actiondialog_zh.xml 1KB
flowdialog_zh.xml 4KB
备份 stepdialog_zh.xml 1KB
_rights.html 733B
_stepdialog.html 13KB
webflow_only.html 5KB
delete_step.php 2KB
add_step.php 955B
_flowdialog.html 23KB
共 62 条
- 1
资源评论
- edwinpy2020-05-22收藏学习,有时间再看
- 听雨跳舞2016-12-16很有用的资料,对学习有帮助,谢谢
- slowlyunderstand2017-06-13垃圾软件,真是不好
- ruibty2019-04-25感觉还行,只是感觉用着不是特别顺手.
- guo5645797042018-08-09还好吧!可以学习一下
zcb520zyy89
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功