You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

152 lines
6.1 KiB
Plaintext

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8" />
<title>流程发起测试</title>
<link href="../../DataUser/Style/ccbpm.css" rel="stylesheet" type="text/css" />
<script src="../Scripts/easyUI145/jquery.min.js" type="text/javascript"></script>
<script src="../Scripts/easyUI145/jquery.easyui.min.js" type="text/javascript"></script>
<script src="../Scripts/CommonUnite.js" type="text/javascript"></script>
<script src="../Scripts/EasyUIUtility.js" type="text/javascript"></script>
<script src="../Scripts/QueryString.js" type="text/javascript"></script>
<script src="../Scripts/config.js" type="text/javascript"></script>
<script src="../Comm/Gener.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
var fk_flow = GetQueryString('FK_Flow');
var fk_node = GetQueryString('FK_Node');
//页面启动函数.
$(function () {
$("#Msg").html("<img src=../Img/loading.gif />&nbsp;正在加载可以<font color=red>发起该流程</font>的人员列表, 请稍后......");
InitPage();
$("#Msg").html("");
});
//初始化数据.
function InitPage() {
var doType = GetQueryString("DoType");
if (doType == "" || doType == null)
doType = "TestFlow_Init";
var fk_flow = GetQueryString("FK_Flow");
var webUser = new WebUser();
if (webUser.No != "admin") {
var url = "TestCase.htm?FK_Flow=" + fk_flow;
SetHref(url);
return;
}
var handler = new HttpHandler("BP.WF.HttpHandler.WF_Admin");
handler.AddUrlData(); //增加url.传递过来的参数.
handler.AddPara("MyParaKey","ParaVal"); //增加自定义参数.。
var plant = handler.DoMethodReturnString("TestFlow_GetRunOnPlant");
var urlHost = "";
if (plant == "jeesite") {
urlHost = getContextPath() + "/a/logout";
//$("#Table1").attr("caption", "&nbsp;&nbsp;演示所有用户的密码为:admin, <a href='/js/a/logout'> 点击这里登录前台. </a>");
document.getElementById("Table1").caption.innerHTML = "演示所有用户的密码为:admin, <a href='/js/a/logout'> 点击这里登录前台. </a> - <font color=red><a href=\"javascript:alert('运行流程之前不检查可能会导致字段没有创建的错误');\" >提示</font>";
//$("#demoPass").html("&nbsp;&nbsp;");
}
handler.AddUrlData();
var data = handler.DoMethodReturnString(doType);
if (data.indexOf('err@') == 0) {
if (data.indexOf('访问规则') > 0) {
document.getElementById("Info").innerHTML = "<font color=red>" + data + '</font>';
return;
}
if (data.indexOf('管理员') > 0) {
SetHref('./CCBPMDesigner/Login.htm');
return;
}
document.getElementById("Info").innerHTML = "<font color=red>" + data + '</font>';
return;
}
if (data.indexOf('url@') == 0) {
var url = data.replace('url@', '');
SetHref(url);
return;
}
data = JSON.parse(data);
//增加处理.
for (var i = 0; i < data.length; i++) {
var newRow = "";
var emp = data[i];
newRow = "<tr ><td class=Idx>" + i + "</td>";
newRow += "<td>" + emp.No + "</td>";
if (emp.No == "admin")
newRow += "<td><font color=red><b>" + emp.Name + "</b>-推荐使用</font></td>";
else
newRow += "<td>" + emp.Name + "</td>";
var url = "<a target='_blank' href='" + urlHost + "?DoType=TestFlow_ReturnToUser&DoWhat=ACE&UserNo=" + encodeURIComponent(emp.No) + "&FK_Flow=" + fk_flow + "' ><img src='./../Img/ie.gif' border=0 />AppACE</a>";
url = "<a target='_blank' href='" + urlHost + "?DoType=TestFlow_ReturnToUser&DoWhat=StartClassic&UserNo=" + encodeURIComponent(emp.No) + "&FK_Flow=" + fk_flow + "' ><img src='./../Img/ie.gif' border=0 />经典</a>";
if (emp.No == "admin")
newRow += "<td><font color=green><b>" + url + "</b></font></td>";
else
newRow += "<td>" + url + "</td>";
url = "<a target='_blank' href='?DoType=TestFlow_ReturnToUser&DoWhat=StartClassic&UserNo=" + encodeURIComponent(emp.No) + "&FK_Flow=" + fk_flow + "&IsMobile=1' ><img src='./../Img/ie.gif' border=0 />手机模式</a>";
// newRow += "<td>" + url + "</td>";
newRow += "<td>无</td>";
newRow += "<td>" + emp.FK_DeptText + "</td>";
newRow += "</tr>";
$("#Table1 tr:last").after(newRow);
}
}
function ToParaTest() {
var url = "TestCase.htm?FK_Flow=" + GetQueryString("FK_Flow");
SetHref(url);
return;
}
</script>
</head>
<body onkeypress="Esc()">
<table id="Table1" class="Table" cellpadding="0" cellspacing="0" border="0" style="width: 90%; padding:10px; margin:10px;">
<caption>流程发起测试,能够发起该流程的人员列表.(<font color=red><a href="javascript:alert('运行流程之前不检查可能会导致字段没有创建的错误');">提示</a></font>) - <a href="javascript:ToParaTest();">参数测试</a></caption>
<tr>
<th> 序 </th>
<th> 可登录用户编号</th>
<th> 名称</th>
<!-- <th> ACE模式</th>-->
<th> 经典模式</th>
<th> 手机模式</th>
<th> 所在部门</th>
</tr>
</table>
<center>
<div id="Info"></div>
<div id="Msg"></div>
</center>
</body>
</html>