///
///
function GenerDoc(menu) {
return menu;
}
//属性.
function AttrFrm(enName, title, pkVal) {
var url = "../Comm/En.htm?EnName=" + enName + "&No=" + pkVal;
title = "";
OpenLayuiDialog(url, title, 5000, 0, null, false);
return;
}
//打开设计表单.
function GoToFrmDesigner(frmID) {
var url = "../Admin/FoolFormDesigner/GoToFrmDesigner.htm?FK_MapData=" + frmID;
addTab(url, "设计:" + frmID);
return;
}
// 增加lab.
function addTab(url, title) {
window.top.vm.openTab(title, url, true);
}
new Vue({
el: '#flow',
data: {
flowNodes: [],
expandAll: false,
loadingDialog: false
},
watch: {
expandAll(val) {
this.expandMenus(val)
}
},
methods: {
expandMenus: function (status) {
for (var i = 0; i < this.flowNodes.length; i++) {
this.flowNodes[i].open = status
this.flowNodes[i].children.forEach(function (item) {
item.open = status
})
}
},
expandAssignMenu: function () {
var sysNo = GetQueryString('SystemNo')
var moduleNo = GetQueryString('ModuleNo')
if (!sysNo) return
for (var i = 0; i < this.flowNodes.length; i++) {
var system = this.flowNodes[i]
if (system.No === sysNo) {
system.open = true
if (!moduleNo) {
system.children.forEach(function (item) {
item.open = true
})
} else {
for (var j = 0; j < system.children.length; j++) {
var module = system.children[j]
if (module.No === moduleNo) {
module.open = true
}
}
}
}
}
},
bindMenu: function () {
var _this = this
layui.use('dropdown', function () {
var dropdown = layui.dropdown
var systemNodeItems = [
{ title: ' 新建系统', id: "NewSystem" },
{ title: ' 系统属性', id: "SystemAttr" },
{ title: ' 新建模块', id: "NewModule" },
{ title: ' 导出模板', id: "Exp" },
{ title: ' 删除系统', id: "DeleteNode" }
]
var systemFunc = function (data, oThis) {
var no = $(this.elem)[0].dataset.sysno;
var name = "";// $(this.elem)[0].dataset.sysname;
switch (data.id) {
case 'NewSystem':
_this.NewSystem();
break;
case 'NewModule':
_this.NewModule(no);
break;
case 'Exp':
_this.Exp(no);
break;
case 'DeleteNode':
_this.DeleteNode(no, 'BP.CCFast.CCMenu.MySystem');
break;
case 'SystemAttr':
_this.Edit(no, name, 'BP.CCFast.CCMenu.MySystem', no);
break;
}
// _this.topNodeOption(data.id, $(this.elem)[0].dataset.no, $(this.elem)[0].dataset.name, $(this.elem)[0].dataset.idx)
}
var systemOptions = [{
elem: '.item-top-dp',
trigger: 'contextmenu',
data: systemNodeItems,
click: systemFunc
}, {
elem: '.t-btn',
trigger: 'click',
data: systemNodeItems,
click: systemFunc
}]
dropdown.render(systemOptions[0]);
dropdown.render(systemOptions[1]);
var moduleNodeItems = [
{ title: ' 新建菜单', id: "NewMenu", },
{ title: ' 新建模块', id: "NewModule", },
{ title: ' 模块属性', id: "ModuleAttr", },
{ title: ' 删除模块', id: "DeleteModule", }
]
var moduleFunc = function (data, oThis) {
//获得不了当前选择的行的主键了.
var moduleNo = $(this.elem)[0].dataset.moduleno;
switch (data.id) {
case 'NewModule': //新建模块.
var en = new Entity("BP.CCFast.CCMenu.Module", moduleNo);
var systemNo = en.SystemNo;
_this.NewModule(systemNo);
break
case 'NewMenu':
_this.NewMenu(moduleNo);
break;
case 'ModuleAttr':
_this.Edit(moduleNo, "模块", 'BP.CCFast.CCMenu.Module');
// _this.ModuleAttr(mmoduleNo); //模块属性.
break;
case 'DeleteModule':
_this.DeleteNode(moduleNo, 'BP.CCFast.CCMenu.Module');
break;
}
}
var moduleOptions = [{
elem: '.item-module-dp',
trigger: 'contextmenu',
data: moduleNodeItems,
click: moduleFunc
}, {
elem: '.module-btn',
trigger: 'click',
data: moduleNodeItems,
click: moduleFunc
}]
dropdown.render(moduleOptions[0]);
dropdown.render(moduleOptions[1]);
var menuFunc = function (data, oThis) {
var menuNo = $(this.elem)[0].dataset.menuno;
var menuName = $(this.elem)[0].dataset.menuname;
var moduleNo = $(this.elem)[0].dataset.moduleno
//todo:如何获得菜单的模块编号?
// var moduleNo = $(this.elem)[0].dataset.ModuleNo;
switch (data.id) {
case 'MenuAttr':
var menu = new Entity("BP.CCFast.CCMenu.Menu", menuNo);
var modeule = new Entity("BP.CCFast.CCMenu.Module", menu.ModuleNo);
_this.Edit(menuNo, menuName, 'BP.CCFast.CCMenu.Menu', modeule.SystemNo);
// _this.
//alert("目录属性");
break;
case 'CopyLink':
_this.CopyLink(menuNo);
break;
case 'NewMenu':
var en = new Entity("BP.CCFast.CCMenu.Menu", menuNo);
_this.NewMenu(en.ModuleNo);
//_this.NewMenu(moduleNo);
break;
case 'DeleteNode':
_this.DeleteNode(menuNo, 'BP.CCFast.CCMenu.Menu');
break;
}
}
var menuNodeItems = [
{ title: ' 新建菜单', id: "NewMenu", Icon: "icon-plus" },
{ title: ' 菜单属性', id: "MenuAttr", Icon: "icon-options" },
{ title: ' 复制菜单', id: "CopyLink", Icon: "icon-magnifier-add" },
{ title: ' 删除菜单', id: "DeleteNode", Icon: "icon-close" }
]
var menuOptions = [{
elem: '.item-menu-dp',
trigger: 'contextmenu',
data: menuNodeItems,
click: menuFunc
}, {
elem: '.menu-btn',
trigger: 'click',
data: menuNodeItems,
click: menuFunc
}]
dropdown.render(menuOptions[0]);
dropdown.render(menuOptions[1]);
})
},
//如果w=0 则是100%的宽度.
openLayer: function (uri, name, w, h) {
//console.log(uri, name);
if (w == 0)
w = window.innerWidth;
if (w == undefined)
w = window.innerWidth / 1.5;
if (h == undefined)
h = window.innerHeight;
layer.open({
type: 2,
title: name,
content: [uri, 'no'],
area: [w + 'px', h + 'px'],
offset: 'rb',
shadeClose: true
})
},
///新建系统.
NewSystem: function () {
NewSys();
},
NewMenu: function (moduleNo) {
var url = "../GPM/CreateMenu/Dict.htm?ModuleNo=" + moduleNo;
var en = new Entity("BP.CCFast.CCMenu.Module", moduleNo);
var systemNo = en.SystemNo;
var reoadUrl = "Menus.htm?SystemNo=" + systemNo;
OpenLayuiDialog(url, "", 90000, false, false, true, false, true, false, false, reoadUrl);
},
CopyLink: function (no) {
var menu = new Entity("BP.CCFast.CCMenu.Menu", no);
var url = menu.UrlExt;
if (menu.MenuModel == "Dict")
url = '../CCBill/SearchDict.htm?FrmID=' + menu.UrlExt;
if (menu.MenuModel == "Bill")
url = '../CCBill/SearchBill.htm?FrmID=' + menu.UrlExt;
alert("您可以把如下链接绑定您的菜单上. \t\n" + url);
},
Exp: function (systemNo) {
if (systemNo == "" || systemNo == undefined) {
alert("系统编号错误,无法创建模块:" + systemNo);
return;
}
var webUser = new WebUser();
if (webUser.No != 'admin') {
alert("只有超级用户才能执行此操作.");
return;
}
if (window.confirm("您确定要导出吗? 导出到xml需要一定的时间,请耐心等待.") == false)
return;
var ens = new Entity("BP.CCFast.CCMenu.MySystem", systemNo);
var data = ens.DoMethodReturnString("DoExp");
alert(data);
// var url = menu.UrlExt;
//layer.prompt({
// value: '',
// title: '请输入模块名称,比如:车辆报表、统计分析、系统管理',
//}, function (value, index, elem) {
// layer.close(index);
// var en = new Entity("BP.CCFast.CCMenu.Module");
// en.Name = value;
// en.SystemNo = systemNo;
// en.IsEnable = 1;
// en.Insert();
// layer.msg("创建成功");
// setTimeout(function () {
// SetHref( "Menus.htm?SystemNo=" + en.No + "&ModuleNo=" + en.No;
// // window.location.reload();
// }, 1000);
//});
},
NewModule: function (systemNo) {
if (systemNo == "" || systemNo == undefined) {
alert("系统编号错误,无法创建模块:" + systemNo);
return;
}
layer.prompt({
value: '',
title: '请输入模块名称,比如:车辆报表、统计分析、系统管理',
}, function (value, index, elem) {
layer.close(index)
var en = new Entity("BP.CCFast.CCMenu.Module");
en.Name = value;
en.SystemNo = systemNo;
en.IsEnable = 1;
en.Insert();
layer.msg("创建成功");
setTimeout(function () {
SetHref("Menus.htm?SystemNo=" + en.No + "&ModuleNo=" + en.No);
// window.location.reload();
}, 1000);
});
},
DeleteNode: function (no, enName) {
console.log(no, enName)
layer.confirm('您确定要删除吗?', { icon: 3, title: '提示' }, function (index) {
var en = new Entity(enName, no);
en.Delete();
if (enName == "BP.CCFast.CCMenu.Module") {
var url = "Menus.htm?SystemNo=" + en.SystemNo;
SetHref(url);
return;
}
if (enName == "BP.CCFast.CCMenu.Menu") {
var model = new Entity("BP.CCFast.CCMenu.Module", en.ModuleNo);
var url = "Menus.htm?SystemNo=" + model.SystemNo;
SetHref(url);
return;
}
layer.msg("删除成功")
// 此处刷新页面更好
setTimeout(function () {
window.location.reload();
}, 1500)
}, function (index) {
layer.msg("已取消删除");
})
},
Edit: function (no, name, enName, systemNo) {
var url = "../Comm/EnOnly.htm?EnName=" + enName + "&No=" + no;
if (enName.indexOf('Menu') > 0)
url = "../Comm/En.htm?EnName=" + enName + "&No=" + no;
// var en = new Entity("BP.CCFast.CCMenu.Module", moduleNo);
// var systemNo = en.SystemNo;
if (systemNo == null || systemNo == undefined || systemNo == '')
systemNo = GetQueryString("SystemNo");
var reoadUrl = "Menus.htm?SystemNo=" + systemNo;
OpenLayuiDialog(url, "", 90000, false, false, true, false, true, false, false, reoadUrl);
// this.openLayer(url, );
// OpenLayuiDialog(url, "", 0, 0, null, false, false, true, false, , reoadUrl);
// OpenLayuiDialog(url,);
},
initSortArea: function () {
var _this = this
this.$nextTick(function () {
var mainContainer = this.$refs['container']
new Sortable(mainContainer, {
animation: 150,
dataIdAttr: 'data-id',
ghostClass: 'blue-background-class',
onStart: function ( /**Event*/ evt) {
_this.loadingDialog = layer.msg('正在移动...', {
timeout: 900 * 1000
})
},
onEnd: function (evt) {
layer.close(_this.loadingDialog)
var currentNodeArrStr = Array.from(evt.to.querySelectorAll('div[data-sysid]')).map(function (item) {
return item.dataset.sysid
}).join(',');
console.log(currentNodeArrStr);
_this.updateSystemSort(currentNodeArrStr);
}
});
var sortContainer = this.$refs['sort-main']
sortContainer.forEach(function (item) {
new Sortable(item, {
group: {
name: 'modules'
},
animation: 150,
dataIdAttr: 'data-moduleid',
ghostClass: 'blue-background-class',
onStart: function ( /**Event*/ evt) {
_this.loadingDialog = layer.msg('正在移动...', {
timeout: 900 * 1000
})
},
onEnd: function (evt) {
layer.close(_this.loadingDialog)
var currentNodeArrStr = Array.from(evt.to.querySelectorAll('div[data-moduleid]')).map(function (item) {
return item.dataset.moduleid
}).join(',')
var currentNodeId = evt.to.dataset.pid
_this.updateModuleSort(currentNodeArrStr, currentNodeId)
// var oldSysIndex = evt.item.dataset.sysidx
// var newSysIndex = evt.to.dataset.sysidx
// var item = _this.flowNodes[oldSysIndex].children.splice(evt.oldDraggableIndex, 1)[0]
// _this.flowNodes[newSysIndex].children.splice(evt.newDraggableIndex, 0, item)
}
});
})
var childSortableContainers = this.$refs['child-row']
for (var i = 0; i < childSortableContainers.length; i++) {
var csc = childSortableContainers[i]
new Sortable(csc, {
group: {
name: 'menus'
},
animation: 150,
dataIdAttr: 'data-id',
ghostClass: 'blue-background-class',
onStart: function ( /**Event*/ evt) {
_this.loadingDialog = layer.msg('正在移动...', {
timeout: 900 * 1000
})
},
onEnd: function (evt) {
layer.close(_this.loadingDialog)
var pastNodeArrStr = Array.from(evt.from.querySelectorAll('div.row[data-id]')).map(function (item) {
return item.dataset.id
}).join(',')
var pastNodeId = evt.from.dataset.pid
var currentNodeArrStr = Array.from(evt.to.querySelectorAll('div.row[data-id]')).map(function (item) {
return item.dataset.id
}).join(',')
var currentNodeId = evt.to.dataset.pid;
_this.updateMenuSort(pastNodeArrStr, pastNodeId, currentNodeArrStr, currentNodeId)
// var oldSysIndex = evt.item.dataset.sysidx;
// var oldModuleIndex = evt.item.dataset.moduleidx;
// var newSysIndex = evt.to.dataset.sysidx;
// var newModuleIndex = evt.to.dataset.moduleidx;
// if (oldSysIndex === newSysIndex && oldModuleIndex === newModuleIndex) return
// var item = _this.flowNodes[oldSysIndex].children[oldModuleIndex].children.splice(evt.oldDraggableIndex, 1)[0]
// _this.flowNodes[newSysIndex].children[newModuleIndex].children.splice(evt.newDraggableIndex, 0, item)
}
})
}
})
},
updateMenuSort: function (pastNodeArrStr, pastNodeId, currentMenus, currentModuleNo) {
// 菜单排序..
var handler = new HttpHandler("BP.WF.HttpHandler.WF_GPM");
handler.AddPara("RootNo", currentModuleNo); //移动到的目录ID.
handler.AddPara("EnNos", currentMenus); //目录下的 菜单IDs
var data = handler.DoMethodReturnString("Menu_Move");
layer.msg(data)
// alert(data);
// 无需刷新页面,此时页面节点已经更新.
},
updateModuleSort: function (moduleNos, systemNo) {
// todo 实现模块在系统之间的排序(非跨系统)
// 同无需刷新页面
// 目录排序..
var handler = new HttpHandler("BP.WF.HttpHandler.WF_GPM");
handler.AddPara("RootNo", systemNo); // 移动到的目录ID.
handler.AddPara("EnNos", moduleNos); //目录下的 菜单IDs
var data = handler.DoMethodReturnString("Module_Move");
layer.msg(data)
},
updateSystemSort: function (systemNos) {
// todo 系统排序
// 同无需刷新页面
// 目录排序..
// 目录排序..
var handler = new HttpHandler("BP.WF.HttpHandler.WF_GPM");
handler.AddPara("EnNos", systemNos); //目录下的 菜单IDs
var data = handler.DoMethodReturnString("System_Move");
},
// 是否启用
changeSystemEnableStatus(system, ctrl) {
// 当前启用状态
var en = new Entity("BP.CCFast.CCMenu.MySystem", system.No);
if (en.IsEnable == 0)
en.IsEnable = 1; // method.IsEnable;
else
en.IsEnable = 0; // method.IsEnable;
en.Update();
console.log("更新成功..");
},
// 是否启用
changeMethodEnableStatus(method, ctrl) {
// 当前启用状态
var en = new Entity("BP.CCFast.CCMenu.Module", method.No);
if (en.IsEnable == 0)
en.IsEnable = 1; // method.IsEnable;
else
en.IsEnable = 0; // method.IsEnable;
// alert(en.IsEnable );
en.Update();
console.log("更新成功..");
},
// 是否启用
changeMenuEnableStatus(menu, ctrl) {
// 当前启用状态
var en = new Entity("BP.CCFast.CCMenu.Menu", menu.No);
if (en.IsEnable == 0)
en.IsEnable = 1; // method.IsEnable;
else
en.IsEnable = 0; // method.IsEnable;
en.Update();
console.log("更新成功..");
}
},
mounted: function () {
// fix firefox bug
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
}
var systems = new Entities("BP.CCFast.CCMenu.MySystems");
systems.RetrieveAll();
systems = obj2arr(systems)
//模块.
var modules = new Entities("BP.CCFast.CCMenu.Modules");
modules.RetrieveAll();
for (var i = 0; i < modules.length; i++) {
var en = modules[i];
if (en.Icon === "")
modules[i].Icon = "icon-folder";
}
modules = obj2arr(modules);
//菜单.
var menus = new Entities("BP.CCFast.CCMenu.Menus");
menus.RetrieveAll();
menus = obj2arr(menus);
var btnStyle = "class='layui-btn layui-btn-primary layui-border-blue layui-btn-xs'";
menus.forEach(function (menu) {
var docs = "";
if (menu.MenuModel == "SingleDictGenerWorkFlows") {
menu.MenuModel = "单实体流程列表";
if (menu.Icon === "") menu.Icon = "icon-notebook";
menu.Docs = "一个实体所有发起的流程列表.";
}
if (menu.Mark === "WorkRec") {
menu.Docs = "打开";
}
//独立流程
if (menu.MenuModel == "FlowNewEntity" || menu.MenuModel == "FlowEtc" || menu.MenuModel == "FlowBaseData") {
if (menu.MenuModel == "FlowNewEntity") menu.MenuModel = "新建实体类";
if (menu.MenuModel == "FlowBaseData") menu.MenuModel = "基础资料修改类";
if (menu.MenuModel == "FlowEtc") menu.MenuModel = "实体其他业务类";
if (menu.Mark === "StartFlow") menu.Icon = "icon-paper-plane";
if (menu.Mark === "Todolist") menu.Icon = "icon-bell";
if (menu.Mark === "Runing") menu.Icon = "icon-clock";
if (menu.Mark === "Group") menu.Icon = "icon-chart";
if (menu.Mark === "Search") menu.Icon = "icon-grid";
var doc = "设计流程";
//var html = "启动流程";
var html = "";
if (menu.Mark === "StartFlow") {
html += "属性";
}
menu.Docs = html + doc;
}
//修改基础数据.
if (menu.MenuModel === "FlowBaseData") {
menu.MenuModel = "流程";
var btn = "流程设计";
if (menu.Mark === "Start") {
menu.MenuModel = "发起流程";
if (menu.Icon === "") menu.Icon = "icon-paper-plane";
menu.Docs = "发起流程" + menu.Tag1 + ",把实体数据传入表单." + btn;
}
if (menu.Mark === "Todolist") {
menu.MenuModel = "流程:待办";
if (menu.Icon === "") menu.Icon = "icon-bell";
menu.Docs = "流程:" + menu.Tag1 + ",待办." + btn;
}
if (menu.Mark === "Runing") {
menu.MenuModel = "流程:未完成的";
if (menu.Icon === "") menu.Icon = "icon-clock";
menu.Docs = "流程:" + menu.Tag1 + ",未完成的." + btn;
}
if (menu.Mark === "Search") {
menu.MenuModel = "实体资料变更";
if (menu.Icon === "") menu.Icon = "icon-magnifier";
menu.Docs = "流程:" + menu.Tag1 + ",查询." + btn;
}
if (menu.Mark === "FlowGroup") {
menu.MenuModel = "流程:分析";
if (menu.Icon === "") menu.Icon = "icon-chart";
menu.Docs = "流程:" + menu.Tag1 + ",分析." + btn;
}
}
if (menu.MenuModel === "Dict" || menu.MenuModel === "DBList") {
var html = "";
if (menu.MenuModel === "DBList") {
html += "打开";
}
if (menu.MenuModel === "Dict") {
if (menu.Icon === "") menu.Icon = "icon-notebook";
html += "打开";
}
// var url = "../CCBill/Admin/SearchCond.htm?FrmID=" + menu.UrlExt;
//OpenLayuiDialog(url, title, 5000, 0, null, false);
// html += "条件";
//html += "列表组件";
// html += "列表组件";
html += "列表组件";
html += "实体组件";
html += "属性";
if (menu.MenuModel === "DBList") {
menu.MenuModel = "数据源实体";
html += "数据源";
}
if (menu.MenuModel === "Dict") {
menu.MenuModel = "实体";
html += "表单设计";
html += " ";
}
menu.Docs = html;
}
if (menu.MenuModel == "FlowUrl") {
if (menu.Icon === "") menu.Icon = "icon-heart";
var html = "" + menu.Name + "";
menu.Docs = html;
}
if (menu.MenuModel == "Rpt3D" || menu.MenuModel == "Rpt3D") {
if (menu.Icon === "") menu.Icon = "icon-heart";
var url = basePath + "/CCFast/Rpt/Rpt3D.htm?RptNo=" + menu.No;
var html = "运行";
url = basePath + '/WF/Comm/En.htm?EnName=BP.CCFast.Rpt.Rpt3D&No=' + menu.No;
// url = basePath + '/WF/Comm/En.htm?EnName=BP.CCFast.Rpt.Rpt3D&No=' + menu.No;
html += "属性";
menu.Docs = html;
}
//发起指定的流程的时候.
if (menu.MenuModel == "StartSpecFlow") {
if (menu.Icon === "") menu.Icon = "icon-heart";
var html = "发起:" + menu.Name + "";
html += "|测试容器";
html += "设计流程";
menu.Docs = html;
}
if (menu.MenuModel == "" || menu.MenuModel === "SelfUrl") {
menu.MenuModel = "自定义菜单";
if (menu.Icon === "") menu.Icon = "icon-user";
var html = "打开 : " + menu.UrlExt;
menu.Docs = html;
}
if (menu.MenuModel == "DictTable") {
menu.MenuModel = "字典表";
if (menu.Icon === "") menu.Icon = "icon-control-pause";
var url = "../Admin/FoolFormDesigner/SFTableEditData.htm?FK_SFTable=" + menu.UrlExt + "&QueryType=Dict";
var html = "打开字典:" + menu.UrlExt + "";
menu.Docs = html;
}
if (menu.MenuModel == "Func") {
menu.MenuModel = "独立功能";
//if (menu.Icon === "") menu.Icon = "icon-energy";
//var html = "功能属性";
//var url = "../CCBill/Func/Func.htm?MyPK=" + menu.UrlExt + "&From=Desinger";
//html += "功能执行";
// menu.Docs = html;
var url = "../CCBill/Sys/Func.htm?MyPK=" + menu.UrlExt + "&From=Desinger";
doc = "打开";
// doc += "功能属性";
var url = "../CCBill/Admin/MethodDocSys/Default.htm?No=" + menu.UrlExt;
doc += "编写脚本";
menu.Docs = doc;
}
if (menu.MenuModel == "Windows") {
menu.MenuModel = "统计分析";
if (menu.Icon === "") menu.Icon = "icon-energy";
if (menu.Tag1 == "" || menu.Tag1.length == 0)
menu.Tag1 = "RptWhite";
var url = "../Portal/" + menu.Tag1 + ".htm?PageID=" + menu.No;
var html = "打开";
// url = "../GPM/Window/Default.htm?PageID=" + menu.No;
// WF / Portal / Home.htm ? PageID = 48339c5c - a264 - 43d4 - 841c - 79b46fbfda3d & viewid=Edit
url = "../Portal/" + menu.Tag1+".htm?viewid=Edit&PageID=" + menu.No;
html += "编辑窗体";
menu.Docs = html;
}
//独立流程
if (menu.MenuModel == "StandAloneFlow") {
menu.MenuModel = "独立流程";
if (menu.Mark === "StartFlow") menu.Icon = "icon-paper-plane";
if (menu.Mark === "Todolist") menu.Icon = "icon-bell";
if (menu.Mark === "Runing") menu.Icon = "icon-clock";
if (menu.Mark === "Group") menu.Icon = "icon-chart";
if (menu.Mark === "Search") menu.Icon = "icon-grid"; //magnifier
//var html = "功能属性";
var html = "执行";
var url = basePath + "/CCFast/StandAloneFlow/Admin/Default.htm?FlowNo=" + menu.Tag1;
html += "设置";
// html += "设置";
var doc = " 设计流程" + menu.Tag1 + "";
menu.Docs = html + doc;
}
if (menu.MenuModel === "Bill") {
menu.MenuModel = "单据";
var html = "";
html += "打开";
html += "列表组件";
html += "实体组件";
html += "单据属性";
html += "表单设计";
menu.Docs = html;
}
if (menu.MenuModel === "Tabs") {
menu.MenuModel = "标签容器";
var url = "../Portal/Tabs.htm?PageID=" + menu.No;
var html = "打开";
url = "../GPM/Tabs/Default.htm?RefMenuNo=" + menu.No + "&SystemNo=" + menu.SystemNo + "&MoudleNo=" + menu.ModuleNo;
html += "设计容器";
menu.Docs = html;
}
var url = "../GPM/PowerCenter.htm?CtrlObj=Menu&CtrlPKVal=" + menu.No + "&CtrlGroup=Menu";
menu.MenuCtrlWayText = "权限";
// item.Docs = GenerDoc(item);
//if (menu.MenuModel == "Dict") menu.MenuModel = "实体";
//if (menu.MenuModel == "DictTable") menu.MenuModel = "字典表";
//if (menu.MenuModel == "Bill") menu.MenuModel = "单据";
//if (menu.MenuModel == "SelfUrl") menu.MenuModel = "自定义";
//if (menu.MenuModel == "Search") menu.MenuModel = "查询";
//if (menu.MenuModel == "Start") menu.MenuModel = "发起";
//if (menu.MenuModel == "Todolist") menu.MenuModel = "待办";
// item.Doc = "ssssssss";SSS
})
for (var i = 0; i < systems.length; i++) {
var sys = systems[i];
sys.open = false
sys.children = [];
var sysurl = "../GPM/PowerCenter.htm?CtrlObj=MenuSystem&CtrlPKVal=" + sys.No + "&CtrlGroup=Menu";
sys.itemCtrlWayText = "权限";
var childModules = modules.filter(function (module) {
// return module.SystemNo === ''
return module.SystemNo === sys.No
})
for (var j = 0; j < childModules.length; j++) {
var module = childModules[j]
module.open = false
var moduleurl = "../GPM/PowerCenter.htm?CtrlObj=MenuModule&CtrlPKVal=" + module.No + "&CtrlGroup=Menu";
module.moduleCtrlWayText = "权限";
module.children = menus.filter(function (menu) {
return menu.ModuleNo == module.No
})
}
sys.children = childModules;
}
console.log(systems)
this.flowNodes = systems;
this.bindMenu();
this.initSortArea();
this.expandAssignMenu()
}
})
//实体属性.
function EnDotHtml(enName, pkVal, title, width) {
var url = "../Comm/En.htm?EnName=" + enName + "&PKVal=" + pkVal;
if (title == undefined)
title = "";
if (width == undefined)
width = 500;
OpenLayuiDialog(url, title, width, 0, null, false);
}
function NewSys() {
var url = "NewSystem.htm";
// OpenLayuiDialog(url,"新增系统");
// this.openLayer(url, '新增系统');
OpenLayuiDialog(url, "", 0, 0, null, true);
}
function ImpSys() {
var url = "ImpSystem.htm";
// OpenLayuiDialog(url,"新增系统");
// this.openLayer(url, '新增系统');
OpenLayuiDialog(url, "", 0, 0, null, true);
}
function ManageSys() {
var url = "SystemList.htm";
// OpenLayuiDialog(url,"新增系统");
// this.openLayer(url, '新增系统');
OpenLayuiDialog(url, "", 0, 0, null, true);
}
function DictCopy(frmID, menuID) {
var handler = new HttpHandler("BP.CCBill.WF_CCBill_Admin_Method");
handler.AddPara("FrmID", frmID);
handler.AddPara("MenuID", menuID);
handler.DoMethodReturnJSON("");
}
function DesignerFlow(no, name) {
var sid = GetQueryString("Token");
var webUser = new WebUser();
var url = "../Admin/CCBPMDesigner/Designer.htm?FK_Flow=" + no + "&UserNo=" + webUser.No + "&Token=" + sid + "&OrgNo=" + webUser.OrgNo + "&From=Ver2021";
window.top.vm.openTab(name, url, true);
}
function obj2arr(obj) {
delete obj.Paras
delete obj.ensName
delete obj.length
var arr = []
for (var key in obj) {
if (Object.hasOwnProperty.call(obj, key)) {
arr.push(obj[key]);
}
}
return arr
}