5.0.230 版本发布

master
关凯 2023-08-14 17:06:43 +08:00
parent fbe85d1566
commit 0a2d5516c3
20 changed files with 10742 additions and 361 deletions

View File

@ -1,5 +1,5 @@
layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (exports) { layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (exports) {
var $ = layui.$ let $ = layui.$
, zlContext = layui.zlContext , zlContext = layui.zlContext
, table = layui.table , table = layui.table
, layer = layui.layer , layer = layui.layer
@ -20,7 +20,7 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
zlPopSourceExt = { zlPopSourceExt = {
$elem: null, $elem: null,
getSettings: function () { getSettings: function () {
var ret = {}; let ret = {};
ret = obj.$elem.attr('settings'); ret = obj.$elem.attr('settings');
if (ret) { if (ret) {
return JSON.parse(ret); return JSON.parse(ret);
@ -35,12 +35,12 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
} }
}, },
render: function ($elem, value, text) { render: function ($elem, value, text) {
var showvalue = (value == undefined ? ($elem.attr('value') == undefined ? "" : $elem.attr('value')) : value); let showvalue = (value == undefined ? ($elem.attr('value') == undefined ? "" : $elem.attr('value')) : value);
if ($elem.attr('loaded') && ($elem.attr('value') == undefined ? "" : $elem.attr('value')) == showvalue) { if ($elem.attr('loaded') && ($elem.attr('value') == undefined ? "" : $elem.attr('value')) == showvalue) {
return; return;
} }
text = text ? text : ''; text = text ? text : '';
var defaultsetting = { let defaultsetting = {
multselect: true multselect: true
, formtitle: "选择树节点" , formtitle: "选择树节点"
, ischeckleaf: false , ischeckleaf: false
@ -61,8 +61,8 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
type: 'get', type: 'get',
dataFilter: function ajaxDataFilter(treeId, parentNode, responseData) { dataFilter: function ajaxDataFilter(treeId, parentNode, responseData) {
if (responseData[zlConfig.global.result.statusName] == 'OK') { if (responseData[zlConfig.global.result.statusName] == 'OK') {
var data = responseData[zlConfig.global.result.dataName]; let data = responseData[zlConfig.global.result.dataName];
for (var i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
if (data[i].EXPANDPROPERTY == "org") { if (data[i].EXPANDPROPERTY == "org") {
data[i].icon = layui.cache['contentPath'] + "/static/image/org.png"; data[i].icon = layui.cache['contentPath'] + "/static/image/org.png";
} else { } else {
@ -97,13 +97,15 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
} }
} }
, tabs: [ , tabs: [
{ name: '角色', url: '/kdayun/manager/coreroleauth/queryRole', method: 'get', entryname: 'ROLEID', tableUrl: '/kdayun/admin/coreuser/queryusersbydeptrole', tbmethod: 'post' }, { name: '角色', url: layui.cache['contentPath'] + '/manager/coreroleauth/queryRole', method: 'get', entryname: 'ROLEID', tableUrl: layui.cache['contentPath'] + '/admin/coreuser/queryusersbydeptrole', tbmethod: 'post' },
{ name: '机构部门', url: '/kdayun/manager/coreroleauth/queryOrgddata', method: 'get', tableUrl: '/kdayun/admin/coreuser/queryusersbydeptrole', tbmethod: 'post' } { name: '机构部门', url: layui.cache['contentPath'] + '/admin/coreorg/queryOrgddata', method: 'get', tableUrl: layui.cache['contentPath'] + '/admin/coreuser/queryusersbydeptrole', tbmethod: 'post' }
] ]
, cols: [[{ type: 'numbers', fixed: 'left', title: '#' }, , cols: [[{ type: 'numbers', fixed: 'left', title: '#' },
{ type: 'radio', fixed: 'left' }, { type: 'radio', fixed: 'left' },
{ field: 'OBJNAME', title: '名称', width: 140 }, { field: 'OBJNAME', title: '名称', width: 140 },
{ field: 'OBJCODE', title: '编号', width: 140 } { field: 'OBJCODE', title: '编号', width: 140 },
{ field: 'DEPTNAME', title: '部门', width: 140 },
{ field: 'ROLENAME', title: '角色', width: 140 }
]] ]]
, page: false , page: false
, limit: 20 , limit: 20
@ -122,9 +124,9 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
options.setvalue = data[0][options.id]; options.setvalue = data[0][options.id];
//$('input[name="' + options.inputtreehiddename + '"]').val(treedata[0][options.id]); //$('input[name="' + options.inputtreehiddename + '"]').val(treedata[0][options.id]);
} else { } else {
var id = "" let id = ""
, name = ""; , name = "";
for (var i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
id = id + "," + data[i][options.id]; id = id + "," + data[i][options.id];
name = name + "," + data[i][options.name]; name = name + "," + data[i][options.name];
} }
@ -135,8 +137,8 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
$('input[name="' + options.inputhiddename + '"]').val(id); $('input[name="' + options.inputhiddename + '"]').val(id);
options.setvalue = id; options.setvalue = id;
} }
var noselectid = ""; let noselectid = "";
for (var b = 0; b < norow.length; b++) { for (let b = 0; b < norow.length; b++) {
noselectid = noselectid + "," + norow[b][options.id]; noselectid = noselectid + "," + norow[b][options.id];
} }
$('input[name="' + options.inputhiddenameno + '"]').val(noselectid); $('input[name="' + options.inputhiddenameno + '"]').val(noselectid);
@ -189,7 +191,7 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
newoptions.inputhiddenameno = inputhiddenameno; newoptions.inputhiddenameno = inputhiddenameno;
if (zlContext.isEmpty(text) && !zlContext.isEmpty(value)) { if (zlContext.isEmpty(text) && !zlContext.isEmpty(value)) {
if (!zlContext.isEmpty(url)) { if (!zlContext.isEmpty(url)) {
var valuelist = new Array() let valuelist = new Array()
, tempvalue = value; , tempvalue = value;
newoptions.async.otherParam = (newoptions.async.otherParam == undefined ? {} : newoptions.async.otherParam) newoptions.async.otherParam = (newoptions.async.otherParam == undefined ? {} : newoptions.async.otherParam)
newoptions.async.otherParam[newoptions.id] = tempvalue; newoptions.async.otherParam[newoptions.id] = tempvalue;
@ -200,8 +202,8 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
data: newoptions.async.otherParam, data: newoptions.async.otherParam,
dataType: 'json', dataType: 'json',
success: function (result) { success: function (result) {
var sourcedata = result.obj; let sourcedata = result.obj;
for (var i = 0; i < sourcedata.length; i++) { for (let i = 0; i < sourcedata.length; i++) {
if (tempvalue.indexOf(sourcedata[i][newoptions.id]) > -1) { if (tempvalue.indexOf(sourcedata[i][newoptions.id]) > -1) {
objname = objname + "," + sourcedata[i][newoptions.data.key.name] objname = objname + "," + sourcedata[i][newoptions.data.key.name]
} }
@ -216,7 +218,7 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
} }
}); });
} else { } else {
for (var i = 0; i < newoptions.sourcedata.length; i++) { for (let i = 0; i < newoptions.sourcedata.length; i++) {
if (tempvalue.indexOf((newoptions.sourcedata)[i][newoptions.id] > -1)) { if (tempvalue.indexOf((newoptions.sourcedata)[i][newoptions.id] > -1)) {
objname = objname + "," + (newoptions.sourcedata)[i][newoptions.data.key.name] objname = objname + "," + (newoptions.sourcedata)[i][newoptions.data.key.name]
} }
@ -232,7 +234,7 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
} }
, initspans: function (options, addspanid, delspanid, divname) { , initspans: function (options, addspanid, delspanid, divname) {
var $input = $('input[name="' + options.inputname + '"]'); let $input = $('input[name="' + options.inputname + '"]');
$('#' + delspanid).on('click', function () { $('#' + delspanid).on('click', function () {
$('.layui-input').val(""); $('.layui-input').val("");
}); });
@ -253,7 +255,7 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
$('#' + delspanid).hide(); $('#' + delspanid).hide();
}); });
$('#' + addspanid).on('click', function () { $('#' + addspanid).on('click', function () {
var $this = $(this), let $this = $(this),
//获取弹出框拼接内容 //获取弹出框拼接内容
html = zlPopSourceExt.concatenationStr(options); html = zlPopSourceExt.concatenationStr(options);
layer.open({ layer.open({
@ -265,10 +267,10 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
content: html.join(''), content: html.join(''),
btn: ['确定', '取消'], btn: ['确定', '取消'],
success: function (index) { success: function (index) {
var layercontentH = index.find(".layui-layer-content").height(); let layercontentH = index.find(".layui-layer-content").height();
var seacherbox = $("#seacher-box").height()+parseFloat($("#seacher-box").css('margin-top')); let seacherbox = $("#seacher-box").height() + parseFloat($("#seacher-box").css('margin-top'));
var tabtitleH = $("#tab-title").height(); let tabtitleH = $("#tab-title").height();
var poptreeboxH = $("#poptree-box"); let poptreeboxH = $("#poptree-box");
poptreeboxH.height(layercontentH - tabtitleH - seacherbox - 28).css('box-sizing', 'border-box'); poptreeboxH.height(layercontentH - tabtitleH - seacherbox - 28).css('box-sizing', 'border-box');
tbFileresH = layercontentH - 15; tbFileresH = layercontentH - 15;
tbSelectedH = layercontentH - 64 tbSelectedH = layercontentH - 64
@ -287,7 +289,7 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
selectionType = 'radio' selectionType = 'radio'
} }
table.on(selectionType + '(tbDatagrid)', function (obj) { table.on(selectionType + '(tbDatagrid)', function (obj) {
var bbb = table.checkStatus('tbFileres').data let bbb = table.checkStatus('tbFileres').data
if (obj.checked == true) { if (obj.checked == true) {
if (selectionType == 'radio') { if (selectionType == 'radio') {
checkdatas = []; checkdatas = [];
@ -296,7 +298,7 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
if (obj.type == 'one') { if (obj.type == 'one') {
checkdatas.push(obj.data); checkdatas.push(obj.data);
} else { } else {
for (var i = 0; i < table_data.length; i++) { for (let i = 0; i < table_data.length; i++) {
checkdatas.push(table_data[i]); checkdatas.push(table_data[i]);
} }
} }
@ -304,26 +306,26 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
} }
} else { } else {
if (obj.type == 'one') { if (obj.type == 'one') {
for (var i = 0; i < checkdatas.length; i++) { for (let i = 0; i < checkdatas.length; i++) {
if (checkdatas[i][options.id] == obj.data[options.id]) { if (checkdatas[i][options.id] == obj.data[options.id]) {
checkdatas.remove(i); checkdatas.remove(i);
} }
} }
for (var m = 0; m < selListIds.length; m++) { for (let m = 0; m < selListIds.length; m++) {
if (selListIds[m][options.id] == obj.data[options.id]) { if (selListIds[m][options.id] == obj.data[options.id]) {
// 如果选中数据为空则已选择列表中选中的数据清空 // 如果选中数据为空则已选择列表中选中的数据清空
selListIds.remove(m); selListIds.remove(m);
} }
} }
} else { } else {
for (var j = 0; j < table_data.length; j++) { for (let j = 0; j < table_data.length; j++) {
for (var i = 0; i < checkdatas.length; i++) { for (let i = 0; i < checkdatas.length; i++) {
if (checkdatas[i][options.id] == table_data[j][options.id]) { if (checkdatas[i][options.id] == table_data[j][options.id]) {
checkdatas.remove(i); checkdatas.remove(i);
} }
} }
// 如果选中数据为空则已选择列表中选中的数据清空 // 如果选中数据为空则已选择列表中选中的数据清空
for (var i = 0; i < selListIds.length; i++) { for (let i = 0; i < selListIds.length; i++) {
if (selListIds[i][options.id] == table_data[j][options.id]) { if (selListIds[i][options.id] == table_data[j][options.id]) {
selListIds.remove(i); selListIds.remove(i);
} }
@ -350,10 +352,10 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
}); });
} }
, resizing: function (index) { , resizing: function (index) {
var layercontentH = index.find(".layui-layer-content").height(); let layercontentH = index.find(".layui-layer-content").height();
var seacherbox = $("#seacher-box").height(); let seacherbox = $("#seacher-box").height();
var tabtitleH = $("#tab-title").height(); let tabtitleH = $("#tab-title").height();
var poptreeboxH = $("#poptree-box"); let poptreeboxH = $("#poptree-box");
poptreeboxH.height(layercontentH - tabtitleH - seacherbox - 50); poptreeboxH.height(layercontentH - tabtitleH - seacherbox - 50);
tbFileresH = layercontentH - 20; tbFileresH = layercontentH - 20;
tbSelectedH = layercontentH - 64 tbSelectedH = layercontentH - 64
@ -366,7 +368,7 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
}); });
} }
, yes: function (index) { , yes: function (index) {
var rows = layui.table.cache['tbSelected'] let rows = layui.table.cache['tbSelected']
, norow = [] , norow = []
, treedata = roletree.getSelectedNodes(); , treedata = roletree.getSelectedNodes();
if (rows.length == 0) { if (rows.length == 0) {
@ -387,8 +389,8 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
}); });
} }
// 默认树和表头的设置 // 默认树和表头的设置
, initialization: function (options, treeUrl, treeMethod,treeparams) { , initTree: function (options, treeUrl, treeMethod, treeparams) {
var setting = { let setting = {
multselect: true, multselect: true,
formtitle: "选择树节点", formtitle: "选择树节点",
ischeckleaf: false, ischeckleaf: false,
@ -411,8 +413,8 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
otherParam: treeparams ? treeparams : [], otherParam: treeparams ? treeparams : [],
dataFilter: function ajaxDataFilter(treeId, parentNode, responseData) { dataFilter: function ajaxDataFilter(treeId, parentNode, responseData) {
if (responseData[zlConfig.global.result.statusName] == 'OK') { if (responseData[zlConfig.global.result.statusName] == 'OK') {
var data = responseData[zlConfig.global.result.dataName]; let data = responseData[zlConfig.global.result.dataName];
for (var i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
if (data[i].EXPANDPROPERTY == "org") { if (data[i].EXPANDPROPERTY == "org") {
data[i].icon = layui.cache['contentPath'] + "/static/image/org.png"; data[i].icon = layui.cache['contentPath'] + "/static/image/org.png";
} else { } else {
@ -442,7 +444,14 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
onAsyncSuccess: function (event, treeId, treeNode, msg) { onAsyncSuccess: function (event, treeId, treeNode, msg) {
}, },
onClick: function (event, treeId, treeNode) { onClick: function (event, treeId, treeNode) {
zlPopSourceExt.reloadTable(options); let param
if (treeNode.EXPANDPROPERTY == 'org') {
param = { ORGID: treeNode.RWID }
}
if (treeNode.EXPANDPROPERTY == 'dept') {
param = { DEPTID: treeNode.RWID }
}
zlPopSourceExt.reloadTable(options, param);
} }
} }
, cols: [[{ type: 'numbers', fixed: 'left', title: '#' }, , cols: [[{ type: 'numbers', fixed: 'left', title: '#' },
@ -463,9 +472,9 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
zlContext.errorMsg("请配置tabs页签参数"); zlContext.errorMsg("请配置tabs页签参数");
return; return;
} }
var objlist = "", let objlist = "",
tabsbox = new Array(); tabsbox = new Array();
for (var b = 0; b < options.tabs.length; b++) { for (let b = 0; b < options.tabs.length; b++) {
treeUrl = options.tabs[b].url; treeUrl = options.tabs[b].url;
treeMethod = (options.tabs[b].method == undefined ? 'get' : options.tabs[b].method); treeMethod = (options.tabs[b].method == undefined ? 'get' : options.tabs[b].method);
tableUrl = (options.tabs[b].tableUrl == undefined ? '' : options.tabs[b].tableUrl); tableUrl = (options.tabs[b].tableUrl == undefined ? '' : options.tabs[b].tableUrl);
@ -484,7 +493,7 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
, ' <div class="layui-row" style="padding: 10px 0;">' , ' <div class="layui-row" style="padding: 10px 0;">'
, ' <div class="layui-col-xs3">' , ' <div class="layui-col-xs3">'
, ' <div id="seacher-box" class="layui-form" style="overflow: hidden; position: relative;">' , ' <div id="seacher-box" class="layui-form" style="overflow: hidden; position: relative;">'
, ' <input type="text" placeholder="请输入查找的节点值" id="keyvalue" autocomplete="on" class="layui-input" style="width:100%;float:left;margin-left:0px;height:30px;padding-right: 40px;">' , ' <input type="text" placeholder="请输入查找的人员信息" id="PopSourcekeyvalue" autocomplete="on" class="layui-input" style="width:100%;float:left;margin-left:0px;height:30px;padding-right: 40px;">'
, ' <button class="layui-btn layui-btn-sm layui-btn-normal" id="seacher" style="float:left;height:30px;position: absolute;right: 0;">' , ' <button class="layui-btn layui-btn-sm layui-btn-normal" id="seacher" style="float:left;height:30px;position: absolute;right: 0;">'
, ' <i class="layui-icon">&#xe615;</i>' , ' <i class="layui-icon">&#xe615;</i>'
, ' </button>' , ' </button>'
@ -516,7 +525,7 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
} }
//数据表格渲染 //数据表格渲染
, loadTable: function (options, tbFileresH) { , loadTable: function (options, tbFileresH) {
var tbUrl = $(".layui-tab-title li.layui-this").attr("lay-tableurl"), let
tbmethod = $(".layui-tab-title li.layui-this").attr("lay-tbmethod"), tbmethod = $(".layui-tab-title li.layui-this").attr("lay-tbmethod"),
params = $(".layui-tab-title li.layui-this").attr("lay-params"); params = $(".layui-tab-title li.layui-this").attr("lay-params");
tableIns = table.render({ tableIns = table.render({
@ -525,7 +534,7 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
, height: tbFileresH , height: tbFileresH
, response: zlConfig.global.gridResponse , response: zlConfig.global.gridResponse
, page: options.page , page: options.page
, cols: options.cols , cols: options.coltitle == undefined ? options.cols : options.coltitle
, method: tbmethod , method: tbmethod
, limit: options.limit , limit: options.limit
, where: params , where: params
@ -544,27 +553,33 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
elem: '#tbSelected' elem: '#tbSelected'
, cellMinWidth: 75 , cellMinWidth: 75
, height: tbSelectedH , height: tbSelectedH
, cols: options.checkcols == undefined ? options.cols : options.checkcols , cols: options.chosencoltitle == undefined ? options.cols : options.chosencoltitle
, done: function (res, curr, count) { , done: function (res, curr, count) {
$('.layui-none').width($('.layui-table-header table').width() + 'px'); $('.layui-none').width($('.layui-table-header table').width() + 'px');
$('.empty-data').width($('.layui-table-body').width() + 'px'); $('.empty-data').width($('.layui-table-body').width() + 'px');
} }
}); });
} }
, getCondition() {
let tabsLi = $(".layui-tab-title li.layui-this");
return tabsLi.attr("lay-params") == '' ? {} : JSON.parse(tabsLi.attr("lay-params"));
}
//数据列表要重新载入 //数据列表要重新载入
, reloadTable: function (options, tbFileresH) { , reloadTable: function (options, filterParam) {
var tabsLi = $(".layui-tab-title li.layui-this"), let tabsLi = $(".layui-tab-title li.layui-this"),
sNodes = roletree.getSelectedNodes(), sNodes = roletree.getSelectedNodes(),
paramname = tabsLi.attr('entryname') == undefined ? 'ORGID' : tabsLi.attr('entryname'), paramname = tabsLi.attr('entryname') == undefined ? 'ORGID' : tabsLi.attr('entryname'),
tabsUrl = tabsLi.attr("lay-tableurl"), tabsUrl = tabsLi.attr("lay-tableurl"),
params = tabsLi.attr("lay-params") == '' ? {} : JSON.parse(tabsLi.attr("lay-params")); params = this.getCondition();
if (sNodes.length > 0) { if (sNodes.length > 0) {
var paramname1 = sNodes[0].RWID; let paramname1 = sNodes[0].RWID;
params[paramname] = paramname1; params[paramname] = paramname1;
} else { } else {
var paramname1 = ""; let paramname1 = "";
params = ""; params = "";
} }
params = filterParam || params
this.options.onSearchData && (param = this.options.onSearchData(params, sNodes[0]))
tableIns.reload( tableIns.reload(
{ {
url: params == '' ? '' : tabsUrl url: params == '' ? '' : tabsUrl
@ -582,7 +597,7 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
//选中数据表格重新载入 //选中数据表格重新载入
, reloadSelTable: function (selectedData, options, tbSelectedH) { , reloadSelTable: function (selectedData, options, tbSelectedH) {
if (selectedData.length > 0) { if (selectedData.length > 0) {
for (var i = 0; i < selectedData.length; i++) { for (let i = 0; i < selectedData.length; i++) {
if (selectedData[i].LAY_CHECKED != undefined) { if (selectedData[i].LAY_CHECKED != undefined) {
delete selectedData[i].LAY_CHECKED delete selectedData[i].LAY_CHECKED
} }
@ -599,11 +614,11 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
, tabsFun: function (options) { , tabsFun: function (options) {
$(".layui-tab-title li").on('click', function () { $(".layui-tab-title li").on('click', function () {
selListIds = table.checkStatus('tbSelected').data; selListIds = table.checkStatus('tbSelected').data;
var treeUrl = $(this).attr("lay-url"), let treeUrl = $(this).attr("lay-url"),
treeMethod = $(this).attr("lay-method"), treeMethod = $(this).attr("lay-method"),
treeparams = $(this).attr("lay-treeparams"), treeparams = $(this).attr("lay-treeparams"),
//创建zTree组件 //创建zTree组件
setting = zlPopSourceExt.initialization(options, treeUrl, treeMethod,treeparams); setting = zlPopSourceExt.initTree(options, treeUrl, treeMethod, treeparams);
roletree = $.fn.zTree.init($("#" + options.name + "poptree"), setting, null); roletree = $.fn.zTree.init($("#" + options.name + "poptree"), setting, null);
zlPopSourceExt.reloadTable(options); zlPopSourceExt.reloadTable(options);
}) })
@ -611,25 +626,54 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
// 搜索按钮事件 // 搜索按钮事件
, seacherFun: function () { , seacherFun: function () {
$('#seacher').on('click', function () { $('#seacher').on('click', function () {
var text = $('#keyvalue').val(); let text = $('#PopSourcekeyvalue').val();
zlPopSourceExt.searchNode(text); zlPopSourceExt.searchData(text);
}); });
} }
// 搜索输入框回车事件 // 搜索输入框回车事件
, keyvalueFun: function () { , keyvalueFun: function () {
$("#keyvalue").keydown(function () { $("#PopSourcekeyvalue").keydown(function () {
var e = event || window.event; let e = event || window.event;
if (e.keyCode == 13) { if (e.keyCode == 13) {
var text = $('#keyvalue').val(); let text = $('#PopSourcekeyvalue').val();
zlPopSourceExt.searchNode(text); zlPopSourceExt.searchData(text);
} }
}); });
} }
,
//搜索人员
searchData: function (value) {
let param, nodes = roletree.getSelectedNodes();
if (nodes.length > 0) {
let node = nodes[0];
if (node.EXPANDPROPERTY) {
if (node.EXPANDPROPERTY == 'org') {
param = { ORGID: node.RWID }
}
if (node.EXPANDPROPERTY == 'dept') {
param = { DEPTID: node.RWID, ORGID: node.ORGID }
}
} else {
if (node.MAINTABLENAME_ZLFW == 'BD_DEPT') {
param = { DEPTID: node.RWID, ORGID: node.ORGID }
}
param = $.extend(param, { ORGID: node.ORGID })
}
}
if (value) {
param = $.extend(param, { keyvalue: value })
}
params = $.extend(param, this.getCondition())
//给一次修改参数的机会
zlPopSourceExt.reloadTable({}, param);
}
//搜索节点事件 //搜索节点事件
, searchNode: function (value) { , searchNode: function (value) {
var keyType = "OBJNAME"; let keyType = "OBJNAME";
if (value === "") { if (value === "") {
var allNode = roletree.transformToArray(roletree.getNodes()); let allNode = roletree.transformToArray(roletree.getNodes());
roletree.showNodes(allNode); roletree.showNodes(allNode);
return; return;
} }
@ -639,14 +683,14 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
} }
//搜索完更新树内容 //搜索完更新树内容
, updateNodes: function (highlight, value, keyType) { , updateNodes: function (highlight, value, keyType) {
var allNode = roletree.transformToArray(roletree.getNodes()); let allNode = roletree.transformToArray(roletree.getNodes());
roletree.hideNodes(allNode); roletree.hideNodes(allNode);
for (var n = 0; n < nodeList.length; n++) { for (let n = 0; n < nodeList.length; n++) {
zlPopSourceExt.findParent(roletree, nodeList[n]); zlPopSourceExt.findParent(roletree, nodeList[n]);
} }
roletree.showNodes(nodeList); roletree.showNodes(nodeList);
nodeList = roletree.getNodesByParamFuzzy(keyType, value); nodeList = roletree.getNodesByParamFuzzy(keyType, value);
for (var i = 0; i < nodeList.length; i++) { for (let i = 0; i < nodeList.length; i++) {
roletree.updateNode(nodeList[i]); roletree.updateNode(nodeList[i]);
} }
@ -654,7 +698,7 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
// 查找父级节点 // 查找父级节点
, findParent: function (zTree, node) { , findParent: function (zTree, node) {
zTree.expandNode(node, true, false, false); zTree.expandNode(node, true, false, false);
var pNode = node.getParentNode(); let pNode = node.getParentNode();
if (pNode != null) { if (pNode != null) {
nodeList.push(pNode); nodeList.push(pNode);
zlPopSourceExt.findParent(zTree, pNode); zlPopSourceExt.findParent(zTree, pNode);
@ -663,7 +707,7 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
// 已选列表移除事件 // 已选列表移除事件
, removeFun: function (checkdatas, options) { , removeFun: function (checkdatas, options) {
// 获取移除选中的数据 // 获取移除选中的数据
var checkdata = table.checkStatus('tbSelected').data; let checkdata = table.checkStatus('tbSelected').data;
if (checkdata.length == 0) { if (checkdata.length == 0) {
zlContext.errorMsg(options.errmsg == undefined ? "请选择记录" : options.errmsg); zlContext.errorMsg(options.errmsg == undefined ? "请选择记录" : options.errmsg);
return return
@ -671,8 +715,8 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
//添加去掉勾选状态 //添加去掉勾选状态
zt = "1" zt = "1"
table.deleteCheckRows('tbSelected'); table.deleteCheckRows('tbSelected');
for (var i = 0; i < checkdatas.length; i++) { for (let i = 0; i < checkdatas.length; i++) {
for (var j = 0; j < checkdata.length; j++) { for (let j = 0; j < checkdata.length; j++) {
if (checkdatas[i][options.id] == checkdata[j][options.id]) { if (checkdatas[i][options.id] == checkdata[j][options.id]) {
checkdatas.splice(i, 1) checkdatas.splice(i, 1)
} }
@ -685,27 +729,28 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
if (res.state != 'OK') { if (res.state != 'OK') {
return; return;
} }
let ids
if (options.setvalue != undefined) { if (options.setvalue != undefined) {
var ids = options.setvalue ids = options.setvalue
} else { } else {
var ids = $('input[name="' + options.inputhiddenameno + '"]').val() ids = $('input[name="' + options.inputhiddenameno + '"]').val()
} }
res = res.obj; res = res.obj;
if (ids != undefined) { if (ids != undefined) {
for (var i = 0; i < res.length; i++) { for (let i = 0; i < res.length; i++) {
if (ids.indexOf(res[i][options.id]) > -1 && zt == "") { if (ids.indexOf(res[i][options.id]) > -1 && zt == "") {
recorddata.push(res[i]); recorddata.push(res[i]);
res[i]['LAY_CHECKED'] = 'true'; res[i]['LAY_CHECKED'] = 'true';
var index = res[i]['LAY_TABLE_INDEX']; let index = res[i]['LAY_TABLE_INDEX'];
var el = $('#tbFileres'); let el = $('#tbFileres');
zlPopSourceExt.checkStyle(el, index); zlPopSourceExt.checkStyle(el, index);
} }
if (recorddata.length > 0) { if (recorddata.length > 0) {
for (var n = 0; n < recorddata.length; n++) { for (let n = 0; n < recorddata.length; n++) {
if (res[i][options.id] == recorddata[n][options.id]) { if (res[i][options.id] == recorddata[n][options.id]) {
res[i]['LAY_CHECKED'] = 'true'; res[i]['LAY_CHECKED'] = 'true';
var index = res[i]['LAY_TABLE_INDEX']; let index = res[i]['LAY_TABLE_INDEX'];
var el = $('#tbFileres'); let el = $('#tbFileres');
zlPopSourceExt.checkStyle(el, index); zlPopSourceExt.checkStyle(el, index);
} }
} }
@ -724,25 +769,25 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
return; return;
} }
if (options.setvalue != undefined) { if (options.setvalue != undefined) {
var ids = options.setvalue let ids = options.setvalue
} else { } else {
var ids = $('input[name="' + options.inputhiddename + '"]').val() let ids = $('input[name="' + options.inputhiddename + '"]').val()
} }
res = res.data res = res.data
if (ids != undefined) { if (ids != undefined) {
for (var i = 0; i < res.length; i++) { for (let i = 0; i < res.length; i++) {
if (ids.indexOf(res[i][options.id]) > -1 && zt == "") { if (ids.indexOf(res[i][options.id]) > -1 && zt == "") {
res[i]['LAY_CHECKED'] = 'true'; res[i]['LAY_CHECKED'] = 'true';
var index = res[i]['LAY_TABLE_INDEX']; let index = res[i]['LAY_TABLE_INDEX'];
var el = $('#tbSelected'); let el = $('#tbSelected');
zlPopSourceExt.checkStyle(el, index); zlPopSourceExt.checkStyle(el, index);
} }
if (selListIds.length > 0) { if (selListIds.length > 0) {
for (var n = 0; n < selListIds.length; n++) { for (let n = 0; n < selListIds.length; n++) {
if (res[i][options.id] == selListIds[n][options.id]) { if (res[i][options.id] == selListIds[n][options.id]) {
res[i]['LAY_CHECKED'] = 'true'; res[i]['LAY_CHECKED'] = 'true';
var index = res[i]['LAY_TABLE_INDEX']; let index = res[i]['LAY_TABLE_INDEX'];
var el = $('#tbSelected'); let el = $('#tbSelected');
zlPopSourceExt.checkStyle(el, index); zlPopSourceExt.checkStyle(el, index);
} }
} }
@ -766,7 +811,7 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
} }
//判断全选状态 //判断全选状态
, checkAll: function (obj) { , checkAll: function (obj) {
var checkStatus = table.checkStatus(obj); let checkStatus = table.checkStatus(obj);
if (checkStatus.isAll) { if (checkStatus.isAll) {
$('#' + obj).next('div').find(' .layui-table-header th[data-field="1"] input[type="checkbox"]').prop('checked', true); $('#' + obj).next('div').find(' .layui-table-header th[data-field="1"] input[type="checkbox"]').prop('checked', true);
$('#' + obj).next('div').find('.layui-table-header th[data-field="1"] input[type="checkbox"]').next().addClass('layui-form-checked'); $('#' + obj).next('div').find('.layui-table-header th[data-field="1"] input[type="checkbox"]').next().addClass('layui-form-checked');
@ -799,13 +844,14 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
} }
//数组去重 //数组去重
, diff: function (arr, options) { , diff: function (arr, options) {
let res
if (arr.length == 0) { if (arr.length == 0) {
var res = arr; res = arr;
} else { } else {
var res = [arr[0]]; res = [arr[0]];
for (var i = 1; i < arr.length; i++) { for (let i = 1; i < arr.length; i++) {
var repeat = false; let repeat = false;
for (var j = 0; j < res.length; j++) { for (let j = 0; j < res.length; j++) {
if (arr[i][options.id] == res[j][options.id]) { if (arr[i][options.id] == res[j][options.id]) {
repeat = true; repeat = true;
break; break;
@ -820,13 +866,13 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
} }
// 只弹出框选择,不赋值 // 只弹出框选择,不赋值
, onlyshow: function (options, requestEvent) { , onlyshow: function (options, requestEvent) {
this.options = options;
options.inputhiddenameno = 'no' + options.name; options.inputhiddenameno = 'no' + options.name;
var html = zlPopSourceExt.concatenationStr(options), let html = zlPopSourceExt.concatenationStr(options),
treeUrl = options.tabs[0].url, treeUrl = options.tabs[0].url,
treeMethod = options.tabs[0].method, treeMethod = options.tabs[0].method,
treeparams = options.tabs[0].params, treeparams = options.tabs[0].params,
//创建zTree\和table组件 setting = zlPopSourceExt.initTree(options, treeUrl, treeMethod, treeparams)
setting = zlPopSourceExt.initialization(options, treeUrl, treeMethod,treeparams)
options = $.extend({}, setting, options); options = $.extend({}, setting, options);
layer.open({ layer.open({
@ -839,10 +885,10 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
btn: ['确定', '取消'], btn: ['确定', '取消'],
success: function (index) { success: function (index) {
$("#zlpopSourceext-box").append('<input type="hidden" class="layui-input" name="' + options.inputhiddenameno + '" value="">'); $("#zlpopSourceext-box").append('<input type="hidden" class="layui-input" name="' + options.inputhiddenameno + '" value="">');
var layercontentH = index.find(".layui-layer-content").height(); let layercontentH = index.find(".layui-layer-content").height();
var seacherbox = $("#seacher-box").height(); let seacherbox = $("#seacher-box").height();
var tabtitleH = $("#tab-title").height(); let tabtitleH = $("#tab-title").height();
var poptreeboxH = $("#poptree-box"); let poptreeboxH = $("#poptree-box");
poptreeboxH.height(layercontentH - tabtitleH - seacherbox - 53); poptreeboxH.height(layercontentH - tabtitleH - seacherbox - 53);
tbFileresH = layercontentH - 20; tbFileresH = layercontentH - 20;
tbSelectedH = layercontentH - 69 tbSelectedH = layercontentH - 69
@ -869,7 +915,7 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
if (obj.type == 'one') { if (obj.type == 'one') {
checkdatas.push(obj.data); checkdatas.push(obj.data);
} else { } else {
for (var i = 0; i < table_data.length; i++) { for (let i = 0; i < table_data.length; i++) {
checkdatas.push(table_data[i]); checkdatas.push(table_data[i]);
} }
} }
@ -877,26 +923,26 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
} }
} else { } else {
if (obj.type == 'one') { if (obj.type == 'one') {
for (var i = 0; i < checkdatas.length; i++) { for (let i = 0; i < checkdatas.length; i++) {
if (checkdatas[i][options.id] == obj.data[options.id]) { if (checkdatas[i][options.id] == obj.data[options.id]) {
checkdatas.remove(i); checkdatas.remove(i);
} }
} }
for (var m = 0; m < selListIds.length; m++) { for (let m = 0; m < selListIds.length; m++) {
if (selListIds[m][options.id] == obj.data[options.id]) { if (selListIds[m][options.id] == obj.data[options.id]) {
// 如果选中数据为空则已选择列表中选中的数据清空 // 如果选中数据为空则已选择列表中选中的数据清空
selListIds.remove(m); selListIds.remove(m);
} }
} }
} else { } else {
for (var j = 0; j < table_data.length; j++) { for (let j = 0; j < table_data.length; j++) {
for (var i = 0; i < checkdatas.length; i++) { for (let i = 0; i < checkdatas.length; i++) {
if (checkdatas[i][options.id] == table_data[j][options.id]) { if (checkdatas[i][options.id] == table_data[j][options.id]) {
checkdatas.remove(i); checkdatas.remove(i);
} }
} }
// 如果选中数据为空则已选择列表中选中的数据清空 // 如果选中数据为空则已选择列表中选中的数据清空
for (var i = 0; i < selListIds.length; i++) { for (let i = 0; i < selListIds.length; i++) {
if (selListIds[i][options.id] == table_data[j][options.id]) { if (selListIds[i][options.id] == table_data[j][options.id]) {
selListIds.remove(i); selListIds.remove(i);
} }
@ -925,10 +971,10 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
}); });
} }
, resizing: function (index) { , resizing: function (index) {
var layercontentH = index.find(".layui-layer-content").height(); let layercontentH = index.find(".layui-layer-content").height();
var seacherbox = $("#seacher-box").height(); let seacherbox = $("#seacher-box").height();
var tabtitleH = $("#tab-title").height(); let tabtitleH = $("#tab-title").height();
var poptreeboxH = $("#poptree-box"); let poptreeboxH = $("#poptree-box");
poptreeboxH.height(layercontentH - tabtitleH - seacherbox - 53); poptreeboxH.height(layercontentH - tabtitleH - seacherbox - 53);
tbFileresH = layercontentH - 20; tbFileresH = layercontentH - 20;
tbSelectedH = layercontentH - 69 tbSelectedH = layercontentH - 69
@ -941,7 +987,7 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
}); });
} }
, yes: function (index) { , yes: function (index) {
var rows = layui.table.cache['tbSelected']; let rows = layui.table.cache['tbSelected'];
if (rows.length == 0) { if (rows.length == 0) {
zlContext.errorMsg(options.errmsg == undefined ? "请选择记录" : options.errmsg); zlContext.errorMsg(options.errmsg == undefined ? "请选择记录" : options.errmsg);
return; return;
@ -959,7 +1005,7 @@ layui.define(['zlContext', 'table', 'layer', 'zlConfig', 'tree'], function (expo
//删除数组自定义函数 //删除数组自定义函数
, Array.prototype.remove = function (dx) { , Array.prototype.remove = function (dx) {
if (isNaN(dx) || dx > this.length) { return false; } if (isNaN(dx) || dx > this.length) { return false; }
for (var i = 0, n = 0; i < this.length; i++) { for (let i = 0, n = 0; i < this.length; i++) {
if (this[i] != this[dx]) { if (this[i] != this[dx]) {
this[n++] = this[i] this[n++] = this[i]
} }

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -2872,13 +2872,6 @@ getLngLat(): any
*/ */
getMapValue(): string getMapValue(): string
/**
* 获取搜索列表
* @returns 返回搜索列表
*/
getSearchListHtml(): string
} }
/** /**
*卡片内容的标题组件 *卡片内容的标题组件
@ -10049,7 +10042,7 @@ sum(field: string,start: number,end: number): number
* @param callback 提交完成回调 * @param callback 提交完成回调
*/ */
unionPost(dss: DataSourceBase[],callback: DataSourcePostHandle): void unionPost(dss: ITransaction[],callback: DataSourcePostHandle): void
/** /**
* 把修改的数据更新到数据源,只是更新本地数据 更新完可以调用post来提交到后台 * 把修改的数据更新到数据源,只是更新本地数据 更新完可以调用post来提交到后台
@ -17310,7 +17303,7 @@ declare type MsgBoxSuccessHandel = (text: string,callBackFunc: ConfirmCallBackHa
*错误消息回调类型 *错误消息回调类型
*/ */
declare type MsgErrorHandel = (err: string) => number declare type MsgErrorHandel = (err: string,ishtml: boolean) => number
/** /**
*信息消息回调类型 *信息消息回调类型
@ -17330,7 +17323,7 @@ declare type MsgWarnHandel = (text: string) => number
*错误通知回调类型 *错误通知回调类型
*/ */
declare type NofErrorHandel = (err: string) => number declare type NofErrorHandel = (err: string,ishtml: boolean) => number
/** /**
*信息通知回调类型 *信息通知回调类型
@ -17991,6 +17984,17 @@ Form.Nt("您好!")
*/ */
static Nt(text: string): number static Nt(text: string): number
/**
* 在id为elemId 内渲染QRcode二维码
* @param value 需要编码的值
* @param elemId html元素的id
* @param width 二维码宽度 默认值:100 像素
* @param height 二维码高度 默认值:100 像素
* @param correctLevel 二维码容错级别 默认值:3
*/
static QrCode(value: string,elemId: string,width: number,height: number,correctLevel: number): void
/** /**
* 添加script标签并执行代码 * 添加script标签并执行代码
* @param id 唯一字符串 * @param id 唯一字符串
@ -18213,17 +18217,19 @@ static error(msg: any): void
/** /**
* 弹出错误提示信息框. * 弹出错误提示信息框.
* @param errorTxt 提示的信息* @returns 返回弹出层的唯一index . 关闭可使用 Common.closeForm(index). * @param errorTxt 提示的信息
* @param ishtml 默认值 false 是否显示html的元素.否则会被_.escape 格式化后再显示* @returns 返回弹出层的唯一index . 关闭可使用 Common.closeForm(index).
*/ */
static errorMsg(errorTxt: string): number static errorMsg(errorTxt: string,ishtml: boolean): number
/** /**
* 弹出错误通知提示信息框. * 弹出错误通知提示信息框.
* @param errorTxt 提示的信息* @returns 返回弹出层的唯一index . 关闭可使用 Common.closeForm(index). * @param errorTxt 提示的信息
* @param ishtml 是否显示html源码* @returns 返回弹出层的唯一index . 关闭可使用 Common.closeForm(index).
*/ */
static errorNt(errorTxt: string): number static errorNt(errorTxt: string,ishtml: boolean): number
/** /**
* 解析typeScript/javascript脚本 * 解析typeScript/javascript脚本
@ -18300,8 +18306,7 @@ static fullForm(index: number): void
static fullScreenByElement(id: string): void static fullScreenByElement(id: string): void
/** /**
* 生成一个全球唯一id * 生成一个全球唯一id 缺点就是比较长
注意:这个与uuid有差别,全局全球唯一,缺点就是比较长
* @returns 全球唯一的id字符串 * @returns 全球唯一的id字符串
*/ */
@ -18398,7 +18403,7 @@ static getEncryptUtils(): EncryptUtils
/** /**
* 获取完整url的路径包含http,https * 获取完整url的路径包含http,https
* @param url 相对路径/绝对路径* @returns 返回处理过的路径.没有contextpath就加上,完整的路径http,https开头的原返回 * @param url 相对路径/绝对路径* @returns 返回处理过的路径.没有contextpath就加上,完整的路径http,https开头的原返回
*/ */
static getFullUrl(url: string): string static getFullUrl(url: string): string
@ -18449,7 +18454,7 @@ static getTxtFile(url: string,callback: any): void
/** /**
* 获取url的路径 * 获取url的路径
* @param url 相对路径/绝对路径* @returns 返回处理过的路径.没有contextpath就加上,完整的路径http,https开头的原返回 * @param url 相对路径/绝对路径* @returns 返回处理过的路径.没有contextpath就加上,完整的路径http,https开头的原返回
*/ */
static getUrl(url: string): string static getUrl(url: string): string
@ -18667,6 +18672,16 @@ static off(cmpId: string,msgFilter: string,callback: Function): void
*/ */
static on(cmpId: string | IComponent,msgName: string,callback: Function,override: boolean,isGlobal: boolean): void static on(cmpId: string | IComponent,msgName: string,callback: Function,override: boolean,isGlobal: boolean): void
/**
* 监听服务器消息
一般用于全局监听整个平台的消息
* @param msgId 消息唯一ID 接收sendServerMsg 发出消息唯一ID的消息
* @param callback 回调函数
* @param timeout 消息的存活时间后释放. 默认 300秒* @returns 返回消息服务对象实例
*/
static onServerMsg(msgId: string,callback: ServerMsgCallback,timeout: number): SseMsg
/** /**
* 展示相册 * 展示相册
例子: 例子:
@ -18770,6 +18785,14 @@ static requires(jsUrls: string[],onFinishCallBack: Function,attrs: object,isSequ
*/ */
static send(cmpId: string | IComponent,msgName: string,params: any,doMsgCallback: MessageCallbackhandle): void static send(cmpId: string | IComponent,msgName: string,params: any,doMsgCallback: MessageCallbackhandle): void
/**
* 向服务器发生消息
* @param msgId 消息唯一ID
* @param msg 消息常量值
*/
static sendServerMsg(msgId: string,msg: string): void
/** /**
* 保存用户信息 * 保存用户信息
* @param userInfo * @param userInfo
@ -18958,6 +18981,10 @@ isIOSChrome: boolean
*/ */
isSafari: boolean isSafari: boolean
/** /**
*是否手机端
*/
mobile: boolean
/**
*操作系统 *操作系统
*/ */
os: string os: string
@ -19158,6 +19185,11 @@ declare type DownloadOnStartHandle = () => void
*/ */
declare type DownloadProcessHandle = (progress: number) => void declare type DownloadProcessHandle = (progress: number) => void
/**
*服务端消息回调
*/
declare type ServerMsgCallback = (data: any) => void
/** /**
*加密辅助类 *加密辅助类
*/ */
@ -19521,6 +19553,25 @@ static getInstance(): ScriptContext
} }
/** /**
*sse 服务端消息管理类
*/
class SseMsg {
/**
* 给指定的msgId 发送服务端消息
* @param msgId 服务端消息id
* @param message 消息内容
*/
static sendTo(msgId: string,message: any): void
}
/**
*sse消息回调
*/
declare type SseMsgCallback = (data: any) => void
/**
*共用函数 *共用函数
*/ */
class Utils { class Utils {
@ -20250,6 +20301,10 @@ class Label extends FieldDbComponentBase {
*点击事件js脚本字符串 *点击事件js脚本字符串
*/ */
onClickScript: string onClickScript: string
/**
*静态文字内容
*/
staticText: string
/** /**
* 点击事件 * 点击事件
@ -20715,6 +20770,10 @@ exts: string
*/ */
headers: any headers: any
/** /**
*是否加密上传的文件
*/
isEncrypt: boolean
/**
*设置文件最大可允许上传的大小,组织机构 KB *设置文件最大可允许上传的大小,组织机构 KB
默认值 200kb 默认值 200kb
*/ */
@ -20926,7 +20985,7 @@ class LayoutSider extends LayoutItemBase {
*/ */
class SqlCommand extends InvisibleBase { class SqlCommand extends InvisibleBase {
/** /**
*参数对象 *设置脚本提交的参数对象
例如{param1:value1,param2:value2} 例如{param1:value1,param2:value2}
*/ */
param: object param: object
@ -23117,6 +23176,7 @@ class DataExport extends InvisibleBase {
/** /**
* 导出数据 * 导出数据
* @param params 参数数组或者参数对象 * @param params 参数数组或者参数对象
* @param filename 导出的文件名
``` javascript ``` javascript
function Button1_onClickScript(cxt:ScriptContext,btn:Button){ function Button1_onClickScript(cxt:ScriptContext,btn:Button){
//方法1 参数对象 //方法1 参数对象
@ -23127,13 +23187,17 @@ btn.getPage().components.DataExport1.export([{name:'param1',value:'paramValue1'}
``` ```
*/ */
export(params: Object | IParam[]): void export(params: Object | IParam[],filename: string): void
} }
/** /**
*数据导入组件 *数据导入组件
*/ */
class DataImport extends InvisibleBase { class DataImport extends InvisibleBase {
/**
*导入的参数
*/
params: object
/** /**
* 下载数据导入的模板文件 * 下载数据导入的模板文件
@ -23144,9 +23208,10 @@ downloadTemplte(): void
/** /**
* 导入数据 * 导入数据
* @param finishCallback 完成回调 * @param finishCallback 完成回调
* @param params 传递参数到模板内
*/ */
importData(finishCallback: DataImportCallBack): void importData(finishCallback: DataImportCallBack,params: object): void
} }
/** /**
@ -23293,7 +23358,7 @@ post(finishcallback: DataSourcePostHandle,beforePostCallBack: EditorPagePostHand
* @param callback 完成提交数据到后台后的回调 * @param callback 完成提交数据到后台后的回调
*/ */
unionPost(dss: DataSourceBase[],callback: DataSourcePostHandle): void unionPost(dss: ITransaction[],callback: DataSourcePostHandle): void
} }
/** /**
@ -23559,7 +23624,7 @@ script: string
/** /**
*权限值 *权限值
*/ */
value: boolean value: string | boolean
} }
/** /**
* 组件参数操作的属性编辑器 * 组件参数操作的属性编辑器
@ -25258,6 +25323,140 @@ verify: string
*/ */
declare type FormVerifyCallBack = (value: any) => string declare type FormVerifyCallBack = (value: any) => string
/** /**
*拍照的格式
*/
enum Cameraformat {
jpg = "jpeg",png = "png"
}
/**
*H5摄像头组件 手机,平板 浏览器调用摄像头
*/
class Camera extends ContainerBase {
/**
* 注册拍照事件
* @param handle 事件回调
*/
onSnap(handle: onSnapHandle): void
/**
* 设置摄像头的参数
* @param options
*/
set(options: CameraOptions): void
/**
* 启动摄像头
*/
setup(): void
/**
* 拍照
* @param callback onSnapCallback类型回调函数
*/
snapshot(callback: onSnapCallback): void
/**
* 拍照并上传
* @param callback 回调 完成拍照并上传后的文件路径信息
*/
snapshotAndUpload(callback: onUploadCallback): void
/**
* 停止摄像头
*/
stop(): void
/**
* 切换前后镜头
*/
switch(): void
/**
* 上传拍照的图片
* @param imgBase64 图片的base64字符串
* @param callback onUploadCallback类型回调函数
*/
upload(imgBase64: string,callback: onUploadCallback): void
}
/**
*摄像头的设置项
*/
interface CameraOptions {
/**
*拍照的分辨率 高度
*/
crop_height: number
/**
*拍照的分辨率 宽度
*/
crop_width: number
/**
*镜头分辨率 高度
*/
dest_height: number
/**
*镜头分辨率 宽度
*/
dest_width: number
/**
*拍照的
*/
flip_horiz: boolean
/**
*摄像的每秒帧数(默认30)
*/
fps: number
/**
** 预览的分辨率 高度
*/
height: number
/**
*拍照的图片格式
*/
image_format: Cameraformat
/**
* jepg的质量 (0~100)
*/
jpeg_quality: number
/**
*用户自定义函数
*/
user_callback: any
/**
*用户自定义画布对象
*/
user_canvas: any
/**
*预览的分辨率 宽度
*/
width: number
}
/**
*拍照回调
*/
declare type onSnapCallback = (base64: string) => void
/**
*拍照事件
*/
declare type onSnapHandle = (cmp: Camera,base64: string) => void
/**
*上传回调
*/
declare type onUploadCallback = (res: IUploadFile,err: string) => void
/**
*移动端的表单处理类 *移动端的表单处理类
功能: 按表单的编号打开页面,并传递参数 功能: 按表单的编号打开页面,并传递参数
*/ */
@ -25290,6 +25489,25 @@ openPageByPageModelCode(pageModelCode: string,param: object): void
} }
/** /**
*移动端的表单处理类
功能: 按表单的编号打开页面,并传递参数
*/
class QrScaner extends InvisibleBase {
/**
* 扫描二维码
* @param callback 回调函数 函数内的函数code 返回扫描的结果
*/
scan(callback: QrScanerCallbackHandle): void
}
/**
*二维码扫描的回调
*/
declare type QrScanerCallbackHandle = (code: string,err: string) => void
/**
*移动端 头像/图片 上传选择组件 *移动端 头像/图片 上传选择组件
*/ */
class MAvatar extends MInputBase { class MAvatar extends MInputBase {

View File

@ -58,7 +58,7 @@ layui.use(['element', 'table', 'layer', 'form', 'zltreemenu', 'upload', 'zlPinYi
}); });
}, },
refreshselectnode: function (treeNode) { refreshselectnode: function (treeNode) {
treeObj.setting.async.url = layui.cache['contentPath'] + '/admin/coreorg/queryorgdepttreelistbyparentid'; treeObj.setting.async.url = layui.cache['contentPath'] + '/admin/coreorg/queryorgdepttreelistbyparentid?isallorg=false';
treeObj.reAsyncChildNodes(treeNode, "refresh"); //异步刷新,清空后加载,加载后打开 treeObj.reAsyncChildNodes(treeNode, "refresh"); //异步刷新,清空后加载,加载后打开
treeNode['isloaded'] = true; treeNode['isloaded'] = true;
// treeObj.selectNode(treeNode); // treeObj.selectNode(treeNode);
@ -67,7 +67,7 @@ layui.use(['element', 'table', 'layer', 'form', 'zltreemenu', 'upload', 'zlPinYi
//加载树 //加载树
// treeAction.loadTree(); // treeAction.loadTree();
zltreemenu.render('orgTreeId', { zltreemenu.render('orgTreeId', {
dataurl: layui.cache['contentPath'] + '/admin/coreorg/queryorgdepttreelistbyparentid', dataurl: layui.cache['contentPath'] + '/admin/coreorg/queryorgdepttreelistbyparentid?isallorg=false',
searchurl: layui.cache['contentPath'] + '/admin/coreorg/queryorgdepttree', searchurl: layui.cache['contentPath'] + '/admin/coreorg/queryorgdepttree',
searchKey: 'keyvalue', // 搜索时传给后台的 对象属性名 searchKey: 'keyvalue', // 搜索时传给后台的 对象属性名
inner: true, // 拖拽到目标节点时,设置是否允许成为目标节点的子节点 inner: true, // 拖拽到目标节点时,设置是否允许成为目标节点的子节点

View File

@ -46,7 +46,7 @@ layui.config({}).use(['element', 'laydate', 'zlConfig', 'zltreemenu', 'upload',
loadTree: function () { loadTree: function () {
//创建zTree组件 //创建zTree组件
treeObj = zltreemenu.render('orgTreeId', { treeObj = zltreemenu.render('orgTreeId', {
dataurl: layui.cache['contentPath'] + '/admin/coreorg/queryorgtreelistbyparentid', dataurl: layui.cache['contentPath'] + '/admin/coreorg/queryorgtreelistbyparentid?isallorg=false',
autoParam: ["RWID"], autoParam: ["RWID"],
tableId: 'tbOrg', tableId: 'tbOrg',
dataFilter: function (treeId, parentNode, responseData) { dataFilter: function (treeId, parentNode, responseData) {

View File

@ -76,7 +76,7 @@ layui.config({}).use(['element', 'zlExcel', 'zlConfig', 'zlContext', 'zltreemenu
loadTree: function () { loadTree: function () {
//创建zTree组件 //创建zTree组件
treeObj = zltreemenu.render('orgTreeId', { treeObj = zltreemenu.render('orgTreeId', {
dataurl: layui.cache['contentPath'] + '/admin/coreorg/queryorgdepttreelistbyparentid?keyvalue=%' + $("input[name=search]").val() + '%', dataurl: layui.cache['contentPath'] + '/admin/coreorg/queryorgdepttreelistbyparentid?isallorg=false',
// isMove: false, // isMove: false,
inner: true, inner: true,
autoParam: ["RWID"], autoParam: ["RWID"],

View File

@ -25,7 +25,7 @@ layui.config({}).use(['element', 'zlConfig', 'zltreemenu', 'zlContext', 'table',
loadTree: function () { loadTree: function () {
//创建zTree组件 //创建zTree组件
treeObj = zltreemenu.render('orgTreeId', { treeObj = zltreemenu.render('orgTreeId', {
dataurl: layui.cache['contentPath'] + '/manager/corefunction/queryorgddata', dataurl: layui.cache['contentPath'] + '/manager/corefunction/queryorgddata?isallorg=false',
autoParam: ["RWID"], autoParam: ["RWID"],
tableId: 'tbUser', tableId: 'tbUser',
type: 'get', type: 'get',

View File

@ -15,7 +15,7 @@ layui.use(['element', 'tree', 'zltreemenu', 'zlContext', 'zlConfig', 'theme'], f
// 机构区域 目录树渲染 // 机构区域 目录树渲染
var orgtreeObj = zltreemenu.render('orgtree', { var orgtreeObj = zltreemenu.render('orgtree', {
dataurl: layui.cache['contentPath'] + "/manager/coreroleauth/queryOrgddata", dataurl: layui.cache['contentPath'] + "/admin/coreorg/queryOrgddata",
type: "get", type: "get",
tableId: 'tbField', tableId: 'tbField',
isMove: false isMove: false

View File

@ -25,7 +25,7 @@ layui.use(['element', 'table', 'tree', 'zltreemenu', 'zlSelectEx', 'zlpoptree',
// 机构区域 目录树渲染 // 机构区域 目录树渲染
var orgtreeObj = zltreemenu.render('orgtree', { var orgtreeObj = zltreemenu.render('orgtree', {
dataurl: layui.cache['contentPath'] + "/manager/coreroleauth/queryOrgddata", dataurl: layui.cache['contentPath'] + "/admin/coreorg/queryOrgddata",
type: "get", type: "get",
tableId: 'tbField', tableId: 'tbField',
isMove: false isMove: false
@ -456,7 +456,7 @@ layui.use(['element', 'table', 'tree', 'zltreemenu', 'zlSelectEx', 'zlpoptree',
, rows = checkStatus.data; , rows = checkStatus.data;
if (rows.length == 0) { if (rows.length == 0) {
zlContext.warnMsg("请先选择记录!"); zlContext.warnMsg("请先选择记录!");
retrun; return;
} }
layer.confirm('确定移除选择的人员角色吗?', function (index) { layer.confirm('确定移除选择的人员角色吗?', function (index) {
@ -492,9 +492,11 @@ layui.use(['element', 'table', 'tree', 'zltreemenu', 'zlSelectEx', 'zlpoptree',
entryname: 'DEPTID', name: '部门', entryname: 'DEPTID', name: '部门',
tableUrl: layui.cache['contentPath'] + '/admin/coreuser/querydeptuser', tbmethod: 'post', tableUrl: layui.cache['contentPath'] + '/admin/coreuser/querydeptuser', tbmethod: 'post',
url: layui.cache['contentPath'] + '/admin/bddept/querydeptuser?ORGID=' + orgNode[0].RWID, url: layui.cache['contentPath'] + '/admin/bddept/querydeptuser?ORGID=' + orgNode[0].RWID,
method: 'post' method: 'post',
ORGID: orgNode[0].RWID
} }
], ],
formtitle: '选择人员',
id: 'RWID', id: 'RWID',
name: 'OBJNAME', name: 'OBJNAME',
page: 'true', page: 'true',
@ -506,37 +508,33 @@ layui.use(['element', 'table', 'tree', 'zltreemenu', 'zlSelectEx', 'zlpoptree',
, { type: 'checkbox', fixed: 'left' } , { type: 'checkbox', fixed: 'left' }
, { field: 'OBJNAME', title: '姓名', width: 100 } , { field: 'OBJNAME', title: '姓名', width: 100 }
, { field: 'ZHANGHM', title: '账号', width: 100 } , { field: 'ZHANGHM', title: '账号', width: 100 }
, { field: 'OBJCODE', title: '编号', width: 100 }]] , { field: 'OBJCODE', title: '编号', width: 100 }]],
onSearchData: function (param) {
return $.extend(param, { ORGID: orgNode[0].RWID });
}
} }
zlPopSourceExt.onlyshow(settings, function (data) { zlPopSourceExt.onlyshow(settings, function (data) {
var newdata = {}; let param = {};
newdata.ORGID = orgNode[0].RWID; let userids = []
newdata.ROLEID = roleNode[0].RWID; , roleids = []
newdata.ROLENAME = roleNode[0].OBJNAME; , rolenames = []
var useridslist = data , deptids = [];
, userids = '' for (let i = 0; data && i < data.length; i++) {
, roleids = '' userids.push(data[i].RWID);
, rolenames = '' roleids.push(data[i].ROLEIDS);
, deptids = '' rolenames.push(data[i].ROLENS);
, url = layui.cache['contentPath'] + "/manager/coreroleauth/addUser"; deptids.push(data[i].MNGDEPIDS);
for (var i = 0; i < useridslist.length; i++) {
userids = userids + ';' + useridslist[i].RWID;
roleids = roleids + ';' + useridslist[i].ROLEIDS;
rolenames = rolenames + ';' + useridslist[i].ROLENS;
deptids = deptids + ';' + useridslist[i].MNGDEPIDS;
} }
userids = userids.substr(1, userids.length); param.ORGID = orgNode[0].RWID;
roleids = roleids.substr(1, roleids.length); param.ROLEID = roleNode[0].RWID;
rolenames = rolenames.substr(1, rolenames.length); param.ROLENAME = roleNode[0].OBJNAME;
deptids = deptids.substr(1, deptids.length); param.USERIDS = userids.join(';');
param.ROLEIDS = roleids.join(';');
newdata.USERIDS = userids; param.ROLENAMES = rolenames.join(';');
newdata.ROLEIDS = roleids; param.DEPTIDS = deptids.join(';');
newdata.ROLENAMES = rolenames;
newdata.DEPTIDS = deptids;
$.post( $.post(
url, layui.cache['contentPath'] + "/manager/coreroleauth/addUser",
newdata, param,
function (data) { function (data) {
data = JSON.parse(data); data = JSON.parse(data);
if (data.state == 'OK') { if (data.state == 'OK') {

View File

@ -21,7 +21,7 @@ layui.use(['element', 'table', 'tree', 'zlpoptree', 'zlContext', 'zlConfig', 'tr
}, },
async: { async: {
enable: true, enable: true,
url: layui.cache['contentPath'] + "/manager/corefunction/queryOrgddata", url: layui.cache['contentPath'] + "/admin/coreorg/queryOrgddata",
type: "get", type: "get",
dataFilter: function ajaxDataFilter(treeId, parentNode, responseData) { dataFilter: function ajaxDataFilter(treeId, parentNode, responseData) {
if (responseData[statusName] == OK) { if (responseData[statusName] == OK) {

View File

@ -25,7 +25,7 @@ layui.use(['element', 'table', 'tree', 'zlpoptree', 'zlContext', 'zlConfig', 'tr
}, },
async: { async: {
enable: true, enable: true,
url: layui.cache['contentPath'] + "/manager/corefunction/queryOrgddata", url: layui.cache['contentPath'] + "/admin/coreorg/queryOrgddata",
type: "get", type: "get",
dataFilter: function ajaxDataFilter(treeId, parentNode, responseData) { dataFilter: function ajaxDataFilter(treeId, parentNode, responseData) {
if (responseData[statusName] == OK) { if (responseData[statusName] == OK) {

View File

@ -254,7 +254,6 @@ layui.config({}).use(['element', 'zlConfig', 'zlContext', 'zltreemenu', 'zlSelec
success: function (layero, index) { success: function (layero, index) {
table.render({ table.render({
elem: '#tbFindWorkflow', elem: '#tbFindWorkflow',
height: 'full-65',
page: false, page: false,
sortload: false, sortload: false,
cols: [ cols: [
@ -263,9 +262,19 @@ layui.config({}).use(['element', 'zlConfig', 'zlContext', 'zltreemenu', 'zlSelec
type: 'numbers', type: 'numbers',
fixed: 'left', fixed: 'left',
title: '#' title: '#'
}, {
field: 'AUDITPATH',
title: '流程节点',
width: 300,
sort: true
}, {
field: 'AUDITRLT',
title: '审批结果',
width: 300,
sort: true
}, { }, {
field: 'AUDITUSER', field: 'AUDITUSER',
title: '审核人', title: '审核用户',
width: 300, width: 300,
sort: true sort: true
}, { }, {
@ -273,11 +282,6 @@ layui.config({}).use(['element', 'zlConfig', 'zlContext', 'zltreemenu', 'zlSelec
title: '审核时间', title: '审核时间',
width: 300, width: 300,
sort: true sort: true
}, {
field: 'AUDITRLT',
title: '操作',
width: 300,
sort: true
}, { }, {
field: 'AUDITMEMO', field: 'AUDITMEMO',
title: '审核意见', title: '审核意见',
@ -302,8 +306,8 @@ layui.config({}).use(['element', 'zlConfig', 'zlContext', 'zltreemenu', 'zlSelec
name: '机构部门', name: '机构部门',
tableUrl: layui.cache['contentPath'] + '/admin/coreuser/queryusersbydeptrole', tableUrl: layui.cache['contentPath'] + '/admin/coreuser/queryusersbydeptrole',
tbmethod: 'post', tbmethod: 'post',
url: layui.cache['contentPath'] + '/manager/coreroleauth/queryOrgddata', url: layui.cache['contentPath'] + '/admin/coreorg/queryorgdepttree?isallorg=false',
method: 'get' method: 'post',
}], }],
id: 'RWID', id: 'RWID',
name: 'OBJNAME', name: 'OBJNAME',
@ -329,7 +333,7 @@ layui.config({}).use(['element', 'zlConfig', 'zlContext', 'zltreemenu', 'zlSelec
}, { }, {
field: 'OBJNAME', field: 'OBJNAME',
title: '姓名', title: '姓名',
width: 100 width: 80
}, { }, {
field: 'DEPTNAME', field: 'DEPTNAME',
title: '部门', title: '部门',
@ -338,10 +342,6 @@ layui.config({}).use(['element', 'zlConfig', 'zlContext', 'zltreemenu', 'zlSelec
field: 'ROLENAME', field: 'ROLENAME',
title: '角色', title: '角色',
width: 100 width: 100
}, {
field: 'ORGNAME',
title: '机构',
width: 100
}] }]
], ],
chosencoltitle: [ chosencoltitle: [
@ -355,7 +355,7 @@ layui.config({}).use(['element', 'zlConfig', 'zlContext', 'zltreemenu', 'zlSelec
}, { }, {
field: 'OBJNAME', field: 'OBJNAME',
title: '姓名', title: '姓名',
width: 100 width: 80
}, { }, {
field: 'DEPTNAME', field: 'DEPTNAME',
title: '部门', title: '部门',
@ -363,13 +363,16 @@ layui.config({}).use(['element', 'zlConfig', 'zlContext', 'zltreemenu', 'zlSelec
}, { }, {
field: 'ROLENAME', field: 'ROLENAME',
title: '角色', title: '角色',
width: 100 width: 90
}, {
field: 'ORGNAME',
title: '机构',
width: 100
}] }]
] ],
onSearchData: function (param, node) {
if (node && node.ORGID) {
return $.extend(param, { ORGID: node.ORGID });
} else {
return param;
}
}
} }
zlPopSourceExt.onlyshow(settings, function (data) { zlPopSourceExt.onlyshow(settings, function (data) {
if (data.length == 0) { if (data.length == 0) {

View File

@ -5471,6 +5471,17 @@ if (!ORYX) { var ORYX = {}; }
if (!ORYX.Core) { ORYX.Core = {}; } if (!ORYX.Core) { ORYX.Core = {}; }
if (!ORYX.Core.Math) { ORYX.Core.Math = {}; } if (!ORYX.Core.Math) { ORYX.Core.Math = {}; }
/**
* 生成唯一id
* @returns
*/
let generalGUID = function () {
return 'zxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16);
});
}
/** /**
* Calculate the middle point between two given points * Calculate the middle point between two given points
* @param {x:double, y:double} point1 * @param {x:double, y:double} point1
@ -23622,8 +23633,8 @@ Ext.form.StrategysEditor = Ext.extend(Ext.form.ComboBox, {
*/ */
Ext.StrategysEditorPanelBase = Ext.extend(Ext.Panel, { Ext.StrategysEditorPanelBase = Ext.extend(Ext.Panel, {
anchor: '100%,100%' anchor: '100%,100%'
, initWidth: 1024 //初始化的窗口宽度 , initWidth: 1024
, initHeight: 768 //初始化的窗口高度 , initHeight: 500
, constructor: function (config, grid) { , constructor: function (config, grid) {
this.grid = grid; this.grid = grid;
Ext.StrategysEditorPanelBase.superclass.constructor.call(this, config); Ext.StrategysEditorPanelBase.superclass.constructor.call(this, config);
@ -23652,8 +23663,8 @@ Ext.StrategysEditorPanelBase = Ext.extend(Ext.Panel, {
}); });
//选择人员策略 //选择人员策略
Ext.SelectPersonStrategysEditor = Ext.extend(Ext.StrategysEditorPanelBase, { Ext.SelectPersonStrategysEditor = Ext.extend(Ext.StrategysEditorPanelBase, {
initWidth: 1224 initWidth: 1024
, initHeight: 768 , initHeight: 500
, pageSize: 100 , pageSize: 100
, constructor: function (config, grid, datatype, propertywindow) { , constructor: function (config, grid, datatype, propertywindow) {
this.propertywindow = propertywindow; this.propertywindow = propertywindow;
@ -23695,13 +23706,13 @@ Ext.SelectPersonStrategysEditor = Ext.extend(Ext.StrategysEditorPanelBase, {
, items: [this.centerGrid] , items: [this.centerGrid]
}, { }, {
region: 'west' region: 'west'
, width: 300 , width: 260
, items: [this.westTab] , items: [this.westTab]
}, { }, {
title: '已选择' title: '已选择'
, region: 'east' , region: 'east'
, layout: 'fit' , layout: 'fit'
, width: 400 , width: 360
, collapsible: false , collapsible: false
, items: [this.eastGrid] , items: [this.eastGrid]
}] }]
@ -23712,25 +23723,25 @@ Ext.SelectPersonStrategysEditor = Ext.extend(Ext.StrategysEditorPanelBase, {
let that = this; let that = this;
let buildTreeData = function (data) { let buildTreeData = function (data) {
data.each(function (item) { data.each(function (item) {
item.id = item['RWID']; item.id = item.RWID;
item.text = item['OBJNAME']; item.text = item.OBJNAME;
item.pid = item['SYS_PARENTID'] || ''; item.pid = item.SYS_PARENTID || '';
Object.extend(item, item); Object.extend(item, item);
}.bind(this)) }.bind(this))
return toTreeData(data) return toTreeData(data)
}.bind(this); }.bind(this);
let buildTreeNodes = function (data) { let buildTreeNodes = function (data) {
data.each(function (item) { data.each(function (item) {
item.id = item['RWID']; item.id = item.RWID;
item.text = item['OBJNAME']; item.text = item.OBJNAME;
item.pid = item['SYS_PARENTID'] || ''; item.pid = item.SYS_PARENTID || '';
Object.extend(item, item); Object.extend(item, item);
}.bind(this)) }.bind(this))
return toTreeNodes(data) return toTreeNodes(data)
}.bind(this); }.bind(this);
if (!this.roleData) { if (!this.roleData) {
Ext.Ajax.request({ Ext.Ajax.request({
url: getContextPath() + "/manager/coreroleauth/queryRole?ORGID=" + getCurrentOrgId() url: getContextPath() + "/manager/coreroleauth/queryorgRole?isallorg=false&ORGID=" + getCurrentOrgId()
, async: false , async: false
, method: 'GET' , method: 'GET'
, success: function (response) { , success: function (response) {
@ -23746,7 +23757,7 @@ Ext.SelectPersonStrategysEditor = Ext.extend(Ext.StrategysEditorPanelBase, {
} }
if (!this.deptData) { if (!this.deptData) {
Ext.Ajax.request({ Ext.Ajax.request({
url: getContextPath() + "/admin/coreorg/queryorgdepttreelistbyparentid?ORGID=" + getCurrentOrgId() url: getContextPath() + "/admin/coreorg/queryorgdepttree?isallorg=false&ORGID=" + getCurrentOrgId()
, async: false , async: false
, method: 'POST' , method: 'POST'
, success: function (response) { , success: function (response) {
@ -23762,7 +23773,7 @@ Ext.SelectPersonStrategysEditor = Ext.extend(Ext.StrategysEditorPanelBase, {
} }
let roleRoot = new Ext.tree.AsyncTreeNode({ let roleRoot = new Ext.tree.AsyncTreeNode({
text: '所有角色' text: '所有机构角色'
, id: 'roleroot' , id: 'roleroot'
, expanded: true , expanded: true
, children: this.roletreeData , children: this.roletreeData
@ -23770,7 +23781,7 @@ Ext.SelectPersonStrategysEditor = Ext.extend(Ext.StrategysEditorPanelBase, {
addDept = function (orgNode) { addDept = function (orgNode) {
if (!orgNode.hasChildNodes()) { if (!orgNode.hasChildNodes()) {
Ext.Ajax.request({ Ext.Ajax.request({
url: getContextPath() + '/admin/coreorg/queryorgdepttreelistbyparentid?RWID=' + orgNode.id url: getContextPath() + '/admin/coreorg/queryorgdepttreelistbyparentid?RWID=' + orgNode.attributes.data.RWID
, async: false , async: false
, method: 'POST' , method: 'POST'
, success: function (response) { , success: function (response) {
@ -23799,16 +23810,23 @@ Ext.SelectPersonStrategysEditor = Ext.extend(Ext.StrategysEditorPanelBase, {
if (!node) { if (!node) {
return false; return false;
} }
let actTabId = tabs.getActiveTab().getId(); let actTabId = tabs.getActiveTab().getId(),
attr = node.attributes.data,
pAttr = node.parentNode && node.parentNode.attributes.data;
if (actTabId == 'tabRole') { if (actTabId == 'tabRole') {
this.dsUser.load({ params: { start: 0, limit: this.pageSize, ORGID: getCurrentOrgId(), ROLEID: node.id } }) let parentId = pAttr && pAttr.RWID
if (attr && attr.TYPE == 'ROLE') {
this.dsUser.load({ params: { start: 0, limit: this.pageSize, ORGID: parentId, ROLEID: attr.ROLEID } })
} else if (attr && attr.TYPE == 'ORG') {
this.dsUser.load({ params: { start: 0, limit: this.pageSize, ORGID: attr.RWID } })
}
} else if (actTabId == 'tabDept') { } else if (actTabId == 'tabDept') {
if (node.attributes.data && node.attributes.data.EXPANDPROPERTY && node.attributes.data.EXPANDPROPERTY == 'org') { if (attr.data && attr.EXPANDPROPERTY && attr.EXPANDPROPERTY == 'org') {
this.dsUser.load({ params: { start: 0, limit: this.pageSize, ORGID: node.id } }) this.dsUser.load({ params: { start: 0, limit: this.pageSize, ORGID: attr.RWID } })
addDept(node); // addDept(node);
} else { } else {
this.dsUser.load({ params: { start: 0, limit: this.pageSize, DEPTID: node.id } }) this.dsUser.load({ params: { start: 0, limit: this.pageSize, DEPTID: attr.RWID } })
addDept(node); // addDept(node);
} }
} }
return true; return true;
@ -23825,7 +23843,7 @@ Ext.SelectPersonStrategysEditor = Ext.extend(Ext.StrategysEditorPanelBase, {
}); });
let deptRoot = new Ext.tree.AsyncTreeNode({ let deptRoot = new Ext.tree.AsyncTreeNode({
text: '所有部门' text: '所有机构部门'
, id: 'deptroot' , id: 'deptroot'
, expanded: true , expanded: true
, children: this.depttreeData , children: this.depttreeData
@ -23851,7 +23869,7 @@ Ext.SelectPersonStrategysEditor = Ext.extend(Ext.StrategysEditorPanelBase, {
deptTreeLoader.on('beforeload', function (loader, node) { deptTreeLoader.on('beforeload', function (loader, node) {
this.baseParams.id = node.id; //通过这个传递参数,这样就可以点一个节点出来它的子节点来实现异步加载 this.baseParams.id = node.attributes.data.RWID; //通过这个传递参数,这样就可以点一个节点出来它的子节点来实现异步加载
}, deptTreeLoader); }, deptTreeLoader);
let tabs = new Ext.TabPanel({ let tabs = new Ext.TabPanel({
@ -24726,12 +24744,6 @@ Ext.UserTaskCommonEditor = Ext.extend(Ext.AbstractCommonEditorPanel, {
}); });
Ext.UserTaskCommonEditor.superclass.constructor.call(this, initconfig, this.propertywindow); Ext.UserTaskCommonEditor.superclass.constructor.call(this, initconfig, this.propertywindow);
}, },
generalGUID: function () {
return 'zxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16);
});
},
/** /**
* 得到formData对象 * 得到formData对象
*/ */
@ -25231,7 +25243,7 @@ Ext.UserTaskCommonEditor = Ext.extend(Ext.AbstractCommonEditorPanel, {
var grid = Ext.getCmp('aduRightGrid'); var grid = Ext.getCmp('aduRightGrid');
var rectype = grid.store.recordType; var rectype = grid.store.recordType;
var r = { var r = {
formproperty_id: this.generalGUID(), formproperty_id: generalGUID(),
formproperty_name: '审核操作', formproperty_name: '审核操作',
formproperty_value: 99, formproperty_value: 99,
formproperty_visiable: true, formproperty_visiable: true,

10
pom.xml
View File

@ -23,7 +23,7 @@
<!-- jdk版本 --> <!-- jdk版本 -->
<jdk.version>1.8</jdk.version> <jdk.version>1.8</jdk.version>
<!-- 平台版本 --> <!-- 平台版本 -->
<base.version>5.0.228</base.version> <base.version>5.0.230</base.version>
<!-- Spring 版本号 --> <!-- Spring 版本号 -->
<spring.version>5.1.2.RELEASE</spring.version> <spring.version>5.1.2.RELEASE</spring.version>
@ -81,11 +81,11 @@
<!-- POI 版本号 --> <!-- POI 版本号 -->
<poi.version>3.15</poi.version> <poi.version>3.15</poi.version>
<!-- kdayun-jxls 版本号(已进行改造,现可以被 JDK 1.6 支持 --> <!-- kdayun-jxls 版本号(已进行改造 -->
<kdayun-jxls.version>2.3.3</kdayun-jxls.version> <kdayun-jxls.version>2.3.4</kdayun-jxls.version>
<!-- kdayun-jxls-poi 版本号(已进行改造,现可以被 JDK 1.6 支持 --> <!-- kdayun-jxls-poi 版本号(已进行改造 -->
<kdayun-jxls-poi.version>1.1.1</kdayun-jxls-poi.version> <kdayun-jxls-poi.version>1.1.2</kdayun-jxls-poi.version>
<!-- kdayun-jsql版本号 --> <!-- kdayun-jsql版本号 -->
<kdayun-jsql.version>1.0</kdayun-jsql.version> <kdayun-jsql.version>1.0</kdayun-jsql.version>
<kdayun.pdf.version>1.0.0</kdayun.pdf.version> <kdayun.pdf.version>1.0.0</kdayun.pdf.version>