var flowNo = null; var nodeID = null; var token = null; var userNo = null; $(function () { return; //if (window.screenLeft == 0 && window.document.body.clientWidth == window.screen.width) { // alert("full"); //} //alert(window.opener); //alert(window.parent); if ($("#Guide") == null || $("#Guide").length == 0) return; if (GetQueryString("IsShowHideGuide") != "1" && GetCurrFuncID() == "Frm") return; flowNo = GetQueryString("FK_Flow"); if (flowNo == null || flowNo == undefined || flowNo == "") flowNo = GetQueryString("FlowNo"); if (flowNo == null || flowNo == undefined || flowNo == "") return; token = GetQueryString("Token"); if(token==null || token==undefined || token=="null" ||token=="") token = GetQueryString("Token"); var webUser = new WebUser(); userNo = GetQueryString("UserNo"); if (userNo == null) { userNo = webUser.No; token = webUser.Token; } if (userNo != webUser.No) { //访问后台,获得一个工作ID. var handler = new HttpHandler("BP.WF.HttpHandler.WF_Admin_TestingContainer"); handler.AddPara("Token", token); handler.AddPara("UserNo", userNo); var data = handler.DoMethodReturnString("Default_LetAdminerLogin"); if (data.indexOf('err@token失效') >= 0) { alert(data); } // alert("userNo:" + userNo + " - webUser:" + webUser.No + " data:" + data); Reload(); return; } nodeID = GetNodeID(); var Guide = $("#Guide"); var str = ''; str = "" str += "
" /* flowNo = GetQueryString("FlowNo"); if (flowNo == null) flowNo = GetQueryString("FK_Flow");*/ var dbs = GetDBDtl(); var currFuncID = GetCurrFuncID(); //当前的功能ID. // console.log(dbs.length) for (i = 0; i < dbs.length; i++) { var node = dbs[i]; if (node.No == currFuncID) str += "
(" + (i + 1) + ")" + node.Name + "
"; else str += "
(" + (i + 1) + ")" + node.Name + "
"; } /* str += '
' str += '
'; str += '
';*/ str += '
'; Guide.html(str); resizeWindow(); return; }); function GetCurrFuncID() { //确定当前的功能ID. var url = window.location.href; if (url.indexOf('TestFlow2020') > 1) return "TestingContainer"; if (url.indexOf('CCBPMDesigner') > 1) return "Flow"; if (url.indexOf('FormDesigner') > 1) return "Frm"; if (url.indexOf('NodeFrm') > 1) return "Frm"; if (url.indexOf('GuideAccepter') > 1) return "Accepter"; alert("没有判断funid"); } function resizeWindow() { return; if (window.screen) {//判断浏览器是否支持window.screen判断浏览器是否支持screen var myw = screen.availWidth; //定义一个myw,接受到当前全屏的宽 var myh = screen.availHeight; //定义一个myw,接受到当前全屏的高 window.moveTo(0, 0); //把window放在左上脚 window.resizeTo(myw, myh); //把当前窗体的长宽跳转为myw和myh } } function GetNodeID() { flowNo = GetQueryString("FK_Flow"); if (flowNo == null) flowNo = GetQueryString("FlowNo"); if (flowNo == null) return; nodeID = GetQueryString("FK_Node"); if (nodeID == null || "undefined" == nodeID || undefined == nodeID) nodeID = GetQueryString("NodeID"); if (nodeID == null || "undefined" == nodeID || undefined == nodeID) nodeID = parseInt(flowNo + "01"); return nodeID; } function GetDBDtl() { var json = [ { "No": "Flow", "Name": "流程", "ICON": " icon-Track" }, { "No": "Frm", "Name": "表单", "ICON": " icon-biaoge" }, { "No": "Accepter", "Name": "接受人", "ICON": " icon-Shift" }, { "No": "TestingContainer", "Name": "测试运行", "ICON": " icon-Send" } ]; return json; } function GetUrl(funcID) { currFuncID = funcID; if (funcID == "Accepter") return Accepter(); if (funcID == "Flow") return Flow(); if (funcID == "Frm") return Frm(); if (funcID == "TestingContainer") return TestingContainer(); if (funcID == "Accepter") return Accepter(); } function ShowHidden() { $('.Guide').hide(); $('.iconBtn').show(); } function HiddenShow() { $('.Guide').show(); $('.iconBtn').hide(); } function Frm() { var flow = new Entity("BP.WF.Flow", flowNo); var flowDevModel = flow.GetPara("FlowDevModel") || flow.FlowDevModel; //设计模式. if (flowDevModel == undefined || flowDevModel == null) flowDevModel = 0; flowDevModel = parseInt(flowDevModel); // 极简表单. if (flowDevModel == FlowDevModel.JiJian) { var nodeID = parseInt(flowNo + "01"); var url = basePath + "/WF/Admin/FoolFormDesigner/Designer.htm?1=1"; url += "&FlowNo=" + GetFlowNo(); url += "&FK_Flow=" + GetFlowNo(); url += "&FK_Node=" + GetQueryString("NodeID"); url += "&UserNo=" + GetQueryString("UserNo"); url += "&Token=" + GetQueryString("Token"); url += "&FK_MapData=ND" + nodeID; url += "&IsShowHideGuide=1"; //window.location.href = filterXSS(url); OpenLayuiDialog(filterXSS(url), "设计表单ND" + nodeID, window.innerWidth * 0.9); return; } //绑定单个表单. if (flowDevModel == FlowDevModel.RefOneFrmTree) { var frmID = flow.FrmUrl; var nodeID = parseInt(flowNo + "01"); var url = basePath + "/WF/Admin/FoolFormDesigner/Designer.htm?FrmID=" + frmID + "&FK_Flow=" + flowNo + "&FK_MapData=" + frmID + "&FK_Node=" + nodeID; url += "&IsShowHideGuide=1"; //window.location.href = filterXSS(url); OpenLayuiDialog(filterXSS(url), "设计表单ND" + nodeID, window.innerWidth * 0.9); return; //if (pageFrom == "") { // window.parent.addTab(nodeID, "设计表单" + nodeID, url); //} else { // window.top.vm.openTab("设计表单" + nodeID, url); //} } //自定义表单. if (flowDevModel == FlowDevModel.SDKFrm || flowDevModel == FlowDevModel.SelfFrm) { var flow = new Entity("BP.WF.Flow", flowNo); var url = flow.FrmUrl; alert("是自定义表单流程,请用对应的编辑器编辑:" + url); return; url = promptGener('请输入url', url); if (url == null || url == undefined) return; flow.FrmUrl = url; flow.Update(); WinOpen(url); return; } var url = basePath + "/WF/Admin/BatchSetting/GuideNodeFrm.htm?FK_Flow=" + flowNo + "&FK_Node=" + nodeID + "&UserNo=" + userNo + "&Token=" + GetQueryString("Token"); url += "&IsShowHideGuide=1"; window.location.href = filterXSS(url); return; } function GetFlowNo() { var no = GetQueryString("FlowNo"); if (no == undefined || no == null) no = GetQueryString("FK_Flow"); return no; } function Flow() { var url = basePath + "/WF/Admin/CCBPMDesigner/Designer.htm?1=1"; url += "&FlowNo=" + GetFlowNo(); url += "&FK_Flow=" + GetFlowNo(); url += "&FK_Node=" + GetQueryString("NodeID"); url += "&UserNo=" + GetQueryString("UserNo"); url += "&Token=" + GetQueryString("Token"); window.location.href = filterXSS(url); } function Accepter() { var url = basePath + "/WF/Admin/BatchSetting/GuideAccepter.htm?1=1"; url += "&FlowNo=" + GetFlowNo(); url += "&FK_Flow=" + GetFlowNo(); url += "&FK_Node=" + GetQueryString("nodeID"); url += "&UserNo=" + GetQueryString("UserNo"); url += "&Token=" + GetQueryString("Token"); window.location.href = filterXSS(url); } /** * 测试运行. * */ function TestingContainer() { var flowNo = GetQueryString("FK_Flow"); var url = basePath + "/WF/Admin/TestingContainer/TestFlow2020.htm?1=1"; url += "&FlowNo=" + GetFlowNo(); url += "&FK_Flow=" + GetFlowNo(); url += "&FK_Node=" + GetQueryString("nodeID"); url += "&UserNo=" + GetQueryString("UserNo"); url += "&Token=" + GetQueryString("Token"); /* window.location.href = filterXSS(url);*/ var W = window.innerWidth / 2; OpenLayuiDialog(url, "", W, 70, "auto"); } //流程设计模式. if (typeof FlowDevModel == "undefined") { var FlowDevModel = {} /// /// 专业模式 /// FlowDevModel.Prefessional = 0, /// /// 极简模式 /// FlowDevModel.JiJian = 1, /// /// 累加模式 /// FlowDevModel.FoolTruck = 2, /// /// 绑定单表单 /// FlowDevModel.RefOneFrmTree = 3, /// /// 绑定多表单 /// FlowDevModel.FrmTree = 4, /// /// SDK表单 /// FlowDevModel.SDKFrm = 5, /// /// 嵌入式表单 /// FlowDevModel.SelfFrm = 6, /// /// 物联网流程 /// FlowDevModel.InternetOfThings = 7, /// /// 决策树流程 /// FlowDevModel.Tree = 8 }