mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2026-05-15 11:41:26 +08:00
routine update
This commit is contained in:
@@ -1,101 +0,0 @@
|
||||
layui.config({
|
||||
base: "/js/"
|
||||
}).use(['form', 'vue', 'layer', 'jquery', 'table', 'flow-ui/gooflow', 'utils/flowlayout', 'droptree', 'queryString'], function () {
|
||||
var form = layui.form,
|
||||
element = layui.element,
|
||||
//layer = (parent == undefined || parent.layer === undefined )? layui.layer : parent.layer,
|
||||
layer = layui.layer,
|
||||
$ = layui.jquery;
|
||||
|
||||
var postData = {};//提交数据
|
||||
var flowData = {};
|
||||
var frmData = {};
|
||||
var SchemeContentOld;
|
||||
var frmapp;
|
||||
var shcemeAuthorizeData = "";
|
||||
var AllAuthorizeCheckData = {};
|
||||
|
||||
|
||||
/*=========流程设计(begin)======================*/
|
||||
var FlowDesignPanel;
|
||||
var FlowDesignObject;//
|
||||
var LineId;
|
||||
var nodePramData = [];
|
||||
FlowDesignPanel = $('#flowPanel').flowdesign({
|
||||
height: ($(window).height() - 87),
|
||||
widht: 1000,
|
||||
OpenNode: function (object) {
|
||||
FlowDesignObject = object;
|
||||
if (object.$nodeData[object.$focus].type == 'startround') {
|
||||
return false;
|
||||
}
|
||||
|
||||
layer.open({
|
||||
type: 2,
|
||||
skin: 'layui-layer-rim', //加上边框
|
||||
area: ['800px', '450px'], //宽高
|
||||
maxmin: true, //开启最大化最小化按钮
|
||||
title: '节点设置【' + object.$nodeData[object.$focus].name + '】',
|
||||
content: '/FlowManage/FlowDesign/FlowNodeForm',
|
||||
btn: ['保存', '关闭'],
|
||||
yes: function (index, layero) {
|
||||
var body = layer.getChildFrame('body', index);
|
||||
var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
|
||||
iframeWin.AcceptClick();
|
||||
},
|
||||
cancel: function (index) {
|
||||
layer.close(index);
|
||||
}
|
||||
});
|
||||
},
|
||||
OpenLine: function (id, object) {
|
||||
FlowDesignObject = object;
|
||||
LineId = id;
|
||||
var _line = object.$lineData[id];
|
||||
var _fromNode = object.$nodeData[_line.from];
|
||||
if (_fromNode.type == "shuntnode") {
|
||||
dialogTop("前一个节点是分流节点无法设置流转条件", "error");
|
||||
return false;
|
||||
}
|
||||
|
||||
layer.open({
|
||||
type: 2,
|
||||
skin: 'layui-layer-rim', //加上边框
|
||||
area: ['800px', '450px'], //宽高
|
||||
maxmin: true, //开启最大化最小化按钮
|
||||
title: '流转条件设置',
|
||||
content: '/FlowManage/FlowDesign/FlowLineForm',
|
||||
btn: ['保存', '关闭'],
|
||||
yes: function (index, layero) {
|
||||
var body = layer.getChildFrame('body', index);
|
||||
var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
|
||||
iframeWin.AcceptClick();
|
||||
},
|
||||
cancel: function (index) {
|
||||
layer.close(index);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
function setFlowInfo(data) {
|
||||
FlowDesignPanel.loadData(data);
|
||||
}
|
||||
function callBackNode(id, data, _nodePramData) {
|
||||
nodePramData = _nodePramData;
|
||||
FlowDesignPanel.SetNodeEx(id, data);
|
||||
}
|
||||
function callBackLine(id, data) {
|
||||
FlowDesignPanel.SetLineEx(id, data);
|
||||
}
|
||||
function bindingFlow() {
|
||||
var _content = FlowDesignPanel.exportDataEx();
|
||||
if (_content == -1) {
|
||||
return false;
|
||||
}
|
||||
flowData["SchemeContent"] = JSON.stringify({ "Frm": frmData, "Flow": _content });
|
||||
return true;
|
||||
}
|
||||
/*=========流程设计(end)=====================*/
|
||||
|
||||
})
|
||||
@@ -1,6 +1,6 @@
|
||||
layui.config({
|
||||
base: "/js/"
|
||||
}).use(['form','vue', 'ztree', 'layer','element', 'jquery', 'table','droptree','openauth'], function () {
|
||||
}).use(['form', 'vue', 'ztree', 'layer', 'element', 'jquery', 'table', 'droptree', 'openauth', 'flow-ui/gooflow', 'utils/flowlayout'], function () {
|
||||
var form = layui.form, element = layui.element,
|
||||
//layer = (parent == undefined || parent.layer === undefined )? layui.layer : parent.layer,
|
||||
layer = layui.layer,
|
||||
@@ -66,6 +66,55 @@
|
||||
}
|
||||
}();
|
||||
|
||||
/*=========流程设计(begin)======================*/
|
||||
var flowData = {};
|
||||
var frmData = {};
|
||||
var nodePramData = [];
|
||||
var flowDesignPanel = $('#flowPanel').flowdesign({
|
||||
height: 500,
|
||||
widht: 700,
|
||||
OpenNode: function (object) {
|
||||
if (object.$nodeData[object.$focus].type == 'startround') {
|
||||
return false;
|
||||
}
|
||||
|
||||
layer.open({
|
||||
type: 2,
|
||||
area: ['500px', '450px'], //宽高
|
||||
maxmin: true, //开启最大化最小化按钮
|
||||
title: '节点设置【' + object.$nodeData[object.$focus].name + '】',
|
||||
content: '/flowschemes/nodeInfo',
|
||||
btn: ['保存', '关闭'],
|
||||
yes: function (index, layero) {
|
||||
var body = layer.getChildFrame('body', index);
|
||||
var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
|
||||
var nodedata = iframeWin.getVal();
|
||||
flowDesignPanel.SetNodeEx(object.$focus, nodedata);
|
||||
},
|
||||
cancel: function (index) {
|
||||
layer.close(index);
|
||||
}
|
||||
});
|
||||
},
|
||||
OpenLine: function (id, object) {
|
||||
lay.msg("暂不能设置分支条件");
|
||||
return;
|
||||
}
|
||||
});
|
||||
function setFlowInfo(data) {
|
||||
flowDesignPanel.loadData(data);
|
||||
}
|
||||
|
||||
function bindingFlow() {
|
||||
var _content = flowDesignPanel.exportDataEx();
|
||||
if (_content == -1) {
|
||||
return false;
|
||||
}
|
||||
flowData["SchemeContent"] = JSON.stringify({ "Frm": frmData, "Flow": _content });
|
||||
return true;
|
||||
}
|
||||
/*=========流程设计(end)=====================*/
|
||||
|
||||
//添加(编辑)对话框
|
||||
var editDlg = function() {
|
||||
var vm = new Vue({
|
||||
@@ -90,7 +139,8 @@
|
||||
}
|
||||
//提交数据
|
||||
form.on('submit(formSubmit)',
|
||||
function(data) {
|
||||
function (data) {
|
||||
$.exentd(data.field, flowData);
|
||||
$.post(url,
|
||||
data.field,
|
||||
function(data) {
|
||||
@@ -158,8 +208,4 @@
|
||||
});
|
||||
|
||||
//监听页面主按钮操作 end
|
||||
|
||||
|
||||
|
||||
|
||||
})
|
||||
129
OpenAuth.Mvc/userJs/nodeInfo.js
Normal file
129
OpenAuth.Mvc/userJs/nodeInfo.js
Normal file
@@ -0,0 +1,129 @@
|
||||
layui.config({
|
||||
base: "/js/"
|
||||
}).use(['form', 'vue', 'ztree', 'layer', 'element', 'jquery', 'queryString'], function () {
|
||||
var //layer = (parent == undefined || parent.layer === undefined )? layui.layer : parent.layer,
|
||||
layer = layui.layer,
|
||||
$ = layui.jquery;
|
||||
|
||||
var users = [];
|
||||
|
||||
//菜单列表
|
||||
var menucon = {}; //table的参数,如搜索key,点击tree的id
|
||||
//菜单树状列表,等lay table没问题了,可以换成table
|
||||
var menutree = function () {
|
||||
var url = '/UserManager/Load';
|
||||
var menuTree;
|
||||
var setting = {
|
||||
view: { selectedMulti: true },
|
||||
check: {
|
||||
enable: true,
|
||||
chkStyle: "checkbox",
|
||||
chkboxType: { "Y": "", "N": "" } //去掉勾选时级联
|
||||
},
|
||||
data: {
|
||||
key: {
|
||||
name: 'Name',
|
||||
title: 'Name'
|
||||
},
|
||||
simpleData: {
|
||||
enable: true,
|
||||
idKey: 'Id',
|
||||
pIdKey: 'ParentId',
|
||||
rootPId: 'null'
|
||||
}
|
||||
},
|
||||
callback: {
|
||||
onCheck: function (event, treeId, treeNode) {
|
||||
users.push(treeNode.Id);
|
||||
}
|
||||
}
|
||||
};
|
||||
var load = function (options) {
|
||||
if (options != undefined) {
|
||||
$.extend(menucon, options);
|
||||
}
|
||||
|
||||
$.getJSON(url, menucon, function (json) {
|
||||
menuTree = $.fn.zTree.init($("#menutree"), setting);
|
||||
menuTree.addNodes(null, json.data);
|
||||
//如果已经分配了用户,则设置相应的状态
|
||||
|
||||
$.each(users,
|
||||
function (i) {
|
||||
var that = this;
|
||||
var node = menuTree.getNodeByParam("Id", that, null);
|
||||
menuTree.checkNode(node, true, false);
|
||||
});
|
||||
menuTree.expandAll(true);
|
||||
});
|
||||
};
|
||||
return {
|
||||
load: load
|
||||
}
|
||||
}();
|
||||
|
||||
//左边树状机构列表
|
||||
var ztree = function () {
|
||||
var url = '/UserSession/GetOrgs';
|
||||
var zTreeObj;
|
||||
var setting = {
|
||||
view: { selectedMulti: false },
|
||||
data: {
|
||||
key: {
|
||||
name: 'Name',
|
||||
title: 'Name'
|
||||
},
|
||||
simpleData: {
|
||||
enable: true,
|
||||
idKey: 'Id',
|
||||
pIdKey: 'ParentId',
|
||||
rootPId: 'null'
|
||||
}
|
||||
},
|
||||
callback: {
|
||||
onClick: function (event, treeId, treeNode) {
|
||||
menutree.load({ orgId: treeNode.Id });
|
||||
}
|
||||
}
|
||||
};
|
||||
var load = function () {
|
||||
$.getJSON(url, function (json) {
|
||||
zTreeObj = $.fn.zTree.init($("#tree"), setting);
|
||||
var newNode = { Name: "全部", Id: null, ParentId: "" };
|
||||
json.push(newNode);
|
||||
zTreeObj.addNodes(null, json);
|
||||
menutree.load({ orgId: '' });
|
||||
zTreeObj.expandAll(true);
|
||||
});
|
||||
};
|
||||
load();
|
||||
return {
|
||||
reload: load
|
||||
}
|
||||
}();
|
||||
|
||||
var vm = new Vue({
|
||||
el: "#formEdit"
|
||||
});
|
||||
|
||||
var _FlowDesignObject = parent.FlowDesignObject;
|
||||
node = _FlowDesignObject.$nodeData[_FlowDesignObject.$focus];
|
||||
node.id = _FlowDesignObject.$focus;
|
||||
vm.set($data.node.setInfo);
|
||||
|
||||
//提供给上父页面调用
|
||||
getVal = function () {
|
||||
var result = {
|
||||
NodeDesignateData: { //节点指定操作人
|
||||
users: users,
|
||||
role: [],
|
||||
org:[]
|
||||
}
|
||||
};
|
||||
$.extend(result, vm.$data);
|
||||
|
||||
console.log(JSON.stringify(result));
|
||||
return result;
|
||||
}
|
||||
|
||||
})
|
||||
Reference in New Issue
Block a user