master
关凯 2023-04-10 11:59:27 +08:00
parent d53ae78d43
commit 153035718d
20 changed files with 440 additions and 113 deletions

View File

@ -52,12 +52,12 @@
<dependency>
<groupId>com.kdayun</groupId>
<artifactId>kdayun-wechat</artifactId>
<version>1.0.2</version>
<version>1.0.4</version>
</dependency>
<dependency>
<groupId>com.kdayun</groupId>
<artifactId>kdayun-wecom</artifactId>
<version>1.0.2</version>
<version>1.0.4</version>
</dependency>
<dependency>
<groupId>com.kdayun</groupId>

View File

@ -0,0 +1,8 @@
apidoc:
#启动在线api文档
enabled: false
docket:
user:
title: 平台模块API
base-package: com.kdayun.bbjc.controller

View File

@ -7,7 +7,8 @@ spring:
config: "classpath:ehcache.xml"
# redis 的配置
redis:
host: 127.0.0.1
enable: false
host: 127.0.0.2
port: 6379
timeout: 5000
jedis:

View File

@ -5,3 +5,10 @@ wx:
mchId: 1622320307
mchKey: 0C4857A6FC5B4597A8350C34794D56C0
keyPath: classpath:wx.p12
miniapp:
configs:
- appid: #微信小程序的appid
secret: #微信小程序的Secret
token: #微信小程序消息服务器配置的token
aesKey: #微信小程序消息服务器配置的EncodingAESKey
msgDataFormat: JSON

View File

@ -2,7 +2,7 @@
spring:
profiles:
#引用多个application-开头的yml文件 多个以逗号隔开
include: db,logger,cache,upload,freemarker,druid,mybatis,baidu,server,cloud,wechat,security,proxy,xss,encryption
include: db,logger,cache,upload,freemarker,druid,mybatis,baidu,server,cloud,wechat,security,proxy,xss,encryption,apidoc
devtools:
restart:
ebabled: false

View File

@ -733,6 +733,48 @@ layui.define(['layer', 'form', 'zlmessenger', 'messenger', 'zlConfig', 'util'],
$("#downloadform").prop('action', url);
$("#downloadform").submit();
},
/**
* 下载函数
* @param {*} url 下载地址
* @param {*} paramObj 参数对象 注意只支持 {xxx:yyy }不支持数组
* @param {*} method post,get ...
*/
downloadEx: function (url, paramObj, method) {
let _downloadid = new Date().getTime();
let formId = "downloadEx-downloadform"
let iframeId = "downloadEx-Iframe-downloadform"
if ($("#" + formId).length > 0) {
$("#" + formId).remove();
}
if ($("#" + iframeId).length > 0) {
$("#" + iframeId).remove();
}
let $iframe = $(`<iframe id="${iframeId}" name="${iframeId}"></iframe>`);
$('body').append($iframe)
let $form = $(`<form id="${formId}" action="${url}" method="${method}" target="${iframeId}">`);
$('body').append($form)
$form.append($('<input type="hidden" name="_downloadid" />').val(_downloadid))
for (let pro in paramObj) {
$form.append($(`<input type="hidden" name="${pro}" />`).val(paramObj[pro]));
}
$form.submit();
let iframe = document.getElementById(iframeId);
iframe.onload = iframe.onreadystatechange = function () {
if (!iframe.readyState || iframe.readyState == "complete") {
var iframeText = document.getElementById(iframeId).contentWindow.document;
iframeText = $(iframeText).text();
if (iframeText) {
var obj = JSON.parse(iframeText);
if (obj && obj['state'] == 'OK') {
layer.close(index);
} else {
zlContext.errorMsg(obj.msg);
}
}
}
};
},
/**
* countTime 倒计的时间单位秒
* elemId 显示倒计时的元素id

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -3913,6 +3913,14 @@ appendChildCmp(childCmp: ComponentBase): void
*/
appendChildHtmlElemt(childCmp: ComponentBase): void
/**
* 给子组件广播发送消息
* @param msg 消息
* @param param 跟随消息传递的参数
*/
borcast(msg: string,param: any): void
/**
* 释放资源析构函数.组件移除之前会调用
一般不要主动调用. 该函数并没有删除和释放组件.只是调用了组件的资源释放函数
@ -4130,6 +4138,16 @@ onLeftDown(clickHandle: onClickHandle): void
*/
onLeftUp(clickHandle: onClickHandle): void
/**
* 组件注册消息处理
* @param msg 处理的消息
* @param callback 处理函数
* @param override 是否覆盖原来注册的处理函数
* @param isGlobal 是否全局监听(跨域iframe监听) 默认值 = false
*/
onMessage(msg: any,callback: OnMessageHandle,override: boolean,isGlobal: boolean): void
/**
* 注册组件的鼠标移动
* @param mouseHandle 事件回调函数
@ -4818,6 +4836,12 @@ parentCmp: ComponentBase
*/
xtype: string
}
/**
* 消息处理类型
*@param param 传递的参数
*/
declare type OnMessageHandle = (param: object) => void
/**
*点击回调
*@param e 事件对象
@ -9462,19 +9486,17 @@ quickQuery: field1: {
type:'like'
val:value1
},
advQuery:{
field1: {
advQuery:[
{
name: field1
type:'equeal'
val:value1
},
field2: {
type:'equeal'
{
name: field2
type:'in'
val:value2
},
}
}
})
```
* @param paramObj 可选 参数对象
*/
@ -17454,6 +17476,7 @@ static doError(xhr: any,textStatus: any): void
/**
* 下载文件
该函数是使用了Iframe来简单下载文件 与 downloadFile 函数有区别. downloadFile可以获取到下载进度等参数
* @param url 下载地址
* @param completeCallback 完成回调函数
* @param paramobj 参数对象
@ -17463,7 +17486,8 @@ static download(url: string,completeCallback: DownloadHandle,paramobj: object):
/**
* 下载文件
注意:这个函数中文文件名存在乱码现象
注意:这个函数中文文件名可能存在乱码现象
该函数是使用了FileDownloader 来下载,如果需要下载进度可以使用这个函数
* @param url 下载的文件地址
* @param paramObj 参数对象
* @param onStarCallBack 开始下载回调函数
@ -20120,6 +20144,19 @@ class SqlDataSetBase extends DataSourceBase {
*/
async: boolean
/**
* 加载对应的Field存在的数据行,注意值为空时候条件忽略
相当于: "select * from table where field in(values)" 的效果
例子:
```javascript
page.components.dsRes.loadByFieldValues('field',['123','456','789'])
```
* @param field 字段编号
* @param values 字段的值数组
*/
loadByFieldValues(field: string,values: any[]): void
/**
* 设置数据是否异步请求
* @param val true 异步请求,false同步请求
@ -23521,6 +23558,12 @@ item = "item",
*什么都不触发。
*/
none = "none"
}
/**
*图表组件-饼状图
*/
class BsEcPieChart extends BsEcCommonChartBase {
}
/**
*对齐方式

View File

@ -1507,11 +1507,11 @@ layui.config({
, data: data
, dataType: 'json'
, success: function (res) {
if (!res[response.dataName]) {//返回是未定义或null时转成[]
if (res[response.statusName]=='ERROR') {//返回是未定义或null时转成[]
res[response.dataName] = []
res[response.statusName] = 0;
//res[response.statusName] = 0;
res[response.countName] = 0;
res[response.msgName] = '返回的数据状态异常';
//res[response.msgName] = '返回的数据状态异常';
};
that.resetDataresetRoot = true;
//如果有数据解析的回调,则获得其返回的数据

View File

@ -96,6 +96,7 @@ layui.define('layer', function (exports) {
if (next.hasClass(ELEM_FILE) || next.hasClass(ELEM_FORM)) {
next.remove();
options.elem.data('haveEvents', false);
}
//包裹ie8/9容器
@ -493,11 +494,11 @@ layui.define('layer', function (exports) {
//防止事件重复绑定
if (options.elem.data('haveEvents')) return;
that.elemFile.on('change', function () {
that.elemFile.off('change').on('change', function () {
$(this).trigger('upload.change');
});
options.elem.on('click', function () {
options.elem.off('click').on('click', function () {
if (that.isFile()) return;
$(this).trigger('upload.start');
});

View File

@ -6,7 +6,7 @@
* @Last Modified time: 2019-09-23 14:45:22
*/
layui.config({
}).use(['element', 'zlConfig', 'zlContext', 'zlSelectEx', 'zltreemenu', 'zlSelectMultiple', 'table', 'layer', 'form', 'zlPinYin', 'laydate', 'theme'], function (exports) {
}).use(['element', 'zlConfig', 'zlContext', 'zlSelectEx', 'zltreemenu', 'zlSelectMultiple', 'table', 'layer', 'form', 'zlPinYin', 'laydate', 'theme', 'upload'], function (exports) {
var $ = layui.$
, zlContext = layui.zlContext
, zltreemenu = layui.zltreemenu
@ -23,7 +23,8 @@ layui.config({
, fullheight = 'full-305'
, exportData = {}
, loadingLayer
, intervalId = undefined;
, intervalId = undefined
, upload = layui.upload;
// layui.use('laydate', function(exports){
// element.render();
@ -848,6 +849,79 @@ layui.config({
}
});
},
// 导出选择的模型
exportModels: function () {
let html = `
<div id="exportModels" class="layui-form-item " style="margin-bottom: 0;width:100%">
<ul id="tablemodetree" class="ztree" url="${layui.cache['contentPath']}/manager/coretables/query"></ul>
</div>
`,
exptreeObj = null,
url = layui.cache['contentPath'] + '/manager/coretables/exportmodel';
let exportFunc = function (con) {
var nodes = exptreeObj.getCheckedNodes(true);
nodes = $.grep(nodes, function (obj) {
return obj.check_Child_State == -1;
});
if (nodes.length <= 0) {
zlContext.warnMsg('请选择需要导出的表模型!');
return;
}
let param = [];
for (let i = 0; i < nodes.length; i++) {
const node = nodes[i];
param.push({
RWID: node["RWID"],
dataFilterCnd: con
});
}
zlContext.downloadEx(url, { tbids: JSON.stringify(param) }, 'post');
};
layer.open({
type: 1
, id: 'exportModels'
, title: "选择需要导出的表模型"
, area: ["600px", "80%"]
, content: html
, btn: ['含数据导出', '不含数据导出', '取消']
, success: function () {
exptreeObj = zltreemenu.render('tablemodetree', {
dataurl: $('#tablemodetree').attr('url'),
type: 'get',
name: 'MX_MINGC',
checkEnable: true
}, {}, null, function (node) {
let searchVal = zltreemenu.getSerachValue('tablemodetree');
return node['MX_MINGC'].indexOf(searchVal) != -1 || node['MX_BIANH'].indexOf(searchVal) != -1;
})
}
, yes: function (index, layero) {
exportFunc("1=1");
},
btn2: function (index, layero) {
exportFunc("1!=1");
},
cancel: function (index, layero) {
layer.close(index);
}
});
},
getSelectNodeRwid: function () {
var nodes = treeObj.getSelectedNodes();
if (nodes.length <= 0) {
return [];
}
return nodes[0].RWID;
},
// 导入模型
importModels: function () {
var nodes = treeObj.getSelectedNodes();
if (nodes.length <= 0) {
zlContext.warnMsg('请选择需要导出的表模型!');
return;
}
},
exportField: function () {
//导出表结构
var nodes = treeObj.getSelectedNodes();
@ -1076,6 +1150,13 @@ layui.config({
$('#btnSeacherField').trigger('click');
}
});
$('#btnExport').on('click', function (e) {
fieldGridAction.exportModels();
});
$('#btnImport').on('click', function (e) {
fieldGridAction.importModels();
});
table.on('toolbar(tbField)', function (obj) {
var checkStatus = table.checkStatus(obj.config.id);
switch (obj.event) {
@ -1404,6 +1485,35 @@ layui.config({
}
return indexGridAction.sumbit(frm.field);
});
upload.render({
elem: '#btnImport'
, accept: 'file'
, acceptMime: 'application/zip'
, url: layui.cache['contentPath'] + '/manager/coretables/importmodel'
, data: {
parent_tbid: fieldGridAction.getSelectNodeRwid()
}
, exts: 'zip'
, before: function () {
winIndex = layer.msg('模型上传中,请稍候...', { icon: 16, time: false, shade: 0.1 });
}
, done: function (res, index, upload) {
if (res.state == 'OK') {
zlContext.successMsg('模型上传完毕');
} else {
zlContext.errorMsg(res.msg);
}
var nodes = treeObj.getSelectedNodes();
if (nodes.length > 0) {
newAddTableId = nodes[0].RWID;
}
treeAction.loadTree();
layer.close(winIndex);
}, error: function (index, upload) {
zlContext.successMsg('模型上传失败:' + upload);
}
})
//监听刷新的事件
layui.event('WM_USERDEF', zlConfig.global.WM_USERDEF.REFRESHDATA_DATA, null, function (rwid) {

View File

@ -485,7 +485,7 @@ layui.config({
}
, accept: 'file'
, exts: 'xml'
, acceptMime: 'file/xml'
, acceptMime: 'text/xml'
, before: function () {
winIndex = layer.msg('文件上传中,请稍候...', { icon: 16, time: false, shade: 0.1 });
}

View File

@ -33,24 +33,6 @@ layui.extend({
});
});
$('.admin-side-cacheclear').on('click', function () {
$.ajax({
url: layui.cache['contentPath'] + '/core/cache/clear',
type: 'get',
async: false,
dataType: 'json',
contentType: "application/json",
success: function (result) {
if (result.state == 'OK')
alert('清理服务器缓存完毕!');
else
alert('清理服务器缓存出错:' + result.msg)
},
error: function (xhr, textStatus, errorThrown) {
alert('请求异常! ' + xhr.responseText);
}
});
});
//获取当前用户信息并填充

View File

@ -228,6 +228,24 @@ layui.define(['view', 'theme', 'common'], function (exports) {
isSpread = iconElem.hasClass(ICON_SPREAD);
admin.sideFlexible(isSpread ? 'spread' : null);
},
clearCache:function(){
$.ajax({
url: layui.cache['contentPath'] + '/core/cache/clear',
type: 'get',
async: false,
dataType: 'json',
contentType: "application/json",
success: function (result) {
if (result.state == 'OK')
alert('清理服务器缓存完毕!');
else
alert('清理服务器缓存出错:' + result.msg)
},
error: function (xhr, textStatus, errorThrown) {
alert('请求异常! ' + xhr.responseText);
}
});
},
/**
* 刷新
*/

View File

@ -23536,7 +23536,7 @@ Ext.form.StrategysEditor = Ext.extend(Ext.form.ComboBox, {
*/
initEditorPanel: function (type) {
var record = this.getRecord();
if (record.data['task_listener_stype'] == 'selPer' || record.data['task_listener_stype'] == 'selHuiq') {
if (record.data['task_listener_stype'] == 'selPer' || record.data['task_listener_stype'] == 'selHuiq' || record.data['task_listener_stype'] == 'selHuiqSeral') {
return new Ext.SelectPersonStrategysEditor(this.config, this.getGrid(), record.data['task_listener_stype'], this.propertywindow);
} else if (record.data['task_listener_stype'] == 'selTemp') {
return new Ext.SelectTempleteStrategysEditor(this.config, this.getGrid(), record.data['task_listener_stype'], this.propertywindow, record);
@ -23559,7 +23559,7 @@ Ext.form.StrategysEditor = Ext.extend(Ext.form.ComboBox, {
var dialog = new Ext.Window({
layout: 'anchor',
autoCreate: true,
title: '策略设置选择',
title: '策略设置',
height: popItem.initHeight,
width: popItem.initWidth,
modal: true,
@ -24087,13 +24087,17 @@ Ext.SelectPersonStrategysEditor = Ext.extend(Ext.StrategysEditorPanelBase, {
selecthuiq.push(obj);
});
record.set('task_listener_class', 'com.kdayun.z1.core.workflow.listerner.usertask.PersonRoleDeptListenerImpl');
if (datatype == 'selHuiq') {
var datastring = "users" + new Date().getTime();
//会签
if (datatype == 'selHuiq' || datatype == 'selHuiqSeral') {
var datastring = "countersignUser";
record.set('task_listener_class', 'com.kdayun.z1.core.workflow.listerner.usertask.CountersignListener');
if (record.data.task_listener_stype == 'selHuiqSeral') {
this.propertywindow.editDirectly('oryx-multiinstance_sequential', 'Yes');
} else {
this.propertywindow.editDirectly('oryx-multiinstance_sequential', 'No');
this.propertywindow.editDirectly('oryx-multiinstance_cardinality', selecthuiq.length);
}
this.propertywindow.editDirectly('oryx-multiinstance_cardinality', '');
this.propertywindow.editDirectly('oryx-multiinstance_variable', datastring);
this.propertywindow.editDirectly('oryx-multiinstance_collection', '${CountersignListener.getUsers(execution)}');
tmpfield = {
totalCount: 1
, items: [{ 'assignment_type': 'assignee', 'resourceassignmentexpr': '${' + datastring + '}' }]
@ -24101,6 +24105,11 @@ Ext.SelectPersonStrategysEditor = Ext.extend(Ext.StrategysEditorPanelBase, {
this.propertywindow.editDirectly('oryx-usertaskassignment', Ext.encode(tmpfield));
} else {
this.propertywindow.editDirectly('oryx-multiinstance_condition', '');
this.propertywindow.editDirectly('oryx-multiinstance_sequential', '');
this.propertywindow.editDirectly('oryx-multiinstance_cardinality', '');
this.propertywindow.editDirectly('oryx-multiinstance_variable', '');
this.propertywindow.editDirectly('oryx-multiinstance_collection', '');
this.propertywindow.editDirectly('oryx-usertaskassignment', '');
}
tmpfield = {
totalCount: 1,
@ -24520,7 +24529,7 @@ Ext.UserDefinedStrategysEditor = Ext.extend(Ext.StrategysEditorPanelBase, {
});
}
this.editformPanel.getForm().findField('name').setValue(tmp.name);
this.editformPanel.getForm().findField('value').setValue(Ext.encode(tmp));
this.editformPanel.getForm().findField('value').setValue(JSON.stringify(JSON.parse(Ext.encode(tmp)), null, 2));
},
okCallBack: function () {
var record = this.getRecord();
@ -24736,19 +24745,24 @@ Ext.UserTaskCommonEditor = Ext.extend(Ext.AbstractCommonEditorPanel, {
var completecontion = this.propertywindow.shapeSelection.commonPropertiesValues['oryx-multiinstance_condition'];
var huiq_stype = 'selAll', huiqset = '';
if (completecontion) {
huiqset = completecontion.substring(completecontion.lastIndexOf('=') + 1, completecontion.lastIndexOf('}'));
if (completecontion.indexOf('/') > -1) {
huiqset = completecontion.substring(completecontion.indexOf(',') + 1, completecontion.indexOf(')'));
huiqset = huiqset.replaceAll('"', '')
huiqset == "null" && (huiqset = "")
if (completecontion.indexOf('${cxt.getCounterSignService(2') > -1) {
huiq_stype = 'selRate';
} else if (completecontion.indexOf('${nrOfCompletedInstances==') > -1) {
} else if (completecontion.indexOf('${cxt.getCounterSignService(1') > -1) {
huiq_stype = 'selNum'
} else {
huiq_stype = 'selUserdef';
huiqset = completecontion;
} else if (completecontion.indexOf('${cxt.getCounterSignService(0') > -1) {
huiq_stype = 'selAll'
} else if (completecontion.indexOf('${cxt.getCounterSignService(3') > -1) {
huiq_stype = 'selNO'
} else if (completecontion.indexOf('${cxt.getCounterSignService(4') > -1) {
huiq_stype = 'selUserdef'
}
};
if (items) {
items.each(function (item) {
if (item.task_listener_stype == 'selHuiq') {
items.each && items.each(function (item) {
if (item.task_listener_stype == 'selHuiq' || item.task_listener_stype == 'selHuiqSeral') {
item.task_listener_huiq_stype = huiq_stype;
item.task_listener_huiqset = huiqset;
}
@ -24780,14 +24794,14 @@ Ext.UserTaskCommonEditor = Ext.extend(Ext.AbstractCommonEditorPanel, {
{ name: 'value' }
, { name: 'title' }
],
data: [['selPer', '特定人'], ['selTemp', '策略模板'], ['userdef', '自定义'], ['selHuiq', '会签']]
data: [['selPer', '特定人'], ['selTemp', '策略模板'], ['userdef', '自定义'], ['selHuiq', '并行会签'], ['selHuiqSeral', '串行会签']]
});
var guizStore = new Ext.data.SimpleStore({
fields: [
{ name: 'value' }
, { name: 'title' }
],
data: [['selAll', '会签全部通过'], ['selNum', '会签通过人数'], ['selRate', '会签通过占比(小数)'], ['selUserdef', '用户自定义']]
data: [['selAll', '全部同意'], ['selNum', '同意人数'], ['selRate', '同意占比(小数)'], ['selNo', '一票否决'], ['selUserdef', '自定义']]
});
var sStore = new Ext.data.SimpleStore({
fields: [
@ -24845,7 +24859,7 @@ Ext.UserTaskCommonEditor = Ext.extend(Ext.AbstractCommonEditorPanel, {
{
header: '策略类型',
dataIndex: 'task_listener_stype',
width: 100,
width: 60,
sortable: true,
editor: new Ext.form.ComboBox({
id: 'cmbtask_listener_stype'
@ -24867,16 +24881,38 @@ Ext.UserTaskCommonEditor = Ext.extend(Ext.AbstractCommonEditorPanel, {
record.data['task_listener_fields'] = '';
record.data['task_listener_displaytitle'] = '';
record.data['task_listener_huiqset'] = '';
//record.commit();
if (cmb.value == 'selHuiq') {
record.data['task_listener_stype'] = cmb.value;
let setColumnTitle = (field, title) => {
for (let i = 0; i < this.StrategyGrid.colModel.config.length; i++) {
const col = this.StrategyGrid.colModel.config[i];
if (col.dataIndex == field) {
this.StrategyGrid.colModel.setColumnHeader(i, title);
}
}
}
if (cmb.value == 'selHuiq' || cmb.value == 'selHuiqSeral') {
record.data['task_listener_huiq_stype'] = 'selAll';
setColumnTitle('task_listener_displaytitle', '会签参与人')
if (record.data.task_listener_stype == 'selHuiqSeral') {
that.propertywindow.editDirectly('oryx-multiinstance_sequential', 'Yes');
} else {
that.propertywindow.editDirectly('oryx-multiinstance_sequential', 'No');
}
// this.StrategyGrid.getColumnModel().setHidden(3,false);
// this.StrategyGrid.getColumnModel().setHidden(2,false);
} else {
setColumnTitle('task_listener_displaytitle', '处理策略')
record.data['task_listener_huiq_stype'] = '';
that.propertywindow.editDirectly('oryx-multiinstance_condition', '');
that.propertywindow.editDirectly('oryx-multiinstance_cardinality', '');
that.propertywindow.editDirectly('oryx-multiinstance_sequential', '');
that.propertywindow.editDirectly('oryx-multiinstance_variable', '');
that.propertywindow.editDirectly('oryx-multiinstance_collection', '');
// this.StrategyGrid.getColumnModel().setHidden(3,true);
// this.StrategyGrid.getColumnModel().setHidden(2,true);
}
record.commit();
}
}.bind(this)
@ -24892,6 +24928,7 @@ Ext.UserTaskCommonEditor = Ext.extend(Ext.AbstractCommonEditorPanel, {
}
return displayText;
}
}, {
header: '处理策略'
, dataIndex: 'task_listener_displaytitle'
@ -24949,7 +24986,7 @@ Ext.UserTaskCommonEditor = Ext.extend(Ext.AbstractCommonEditorPanel, {
}
},
{
header: '会签规则设置'
header: '会签完成参数'
, dataIndex: 'task_listener_huiqset'
, width: 120
, editor: new Ext.form.TextField({ allowBlank: true, disabled: false })
@ -24964,7 +25001,7 @@ Ext.UserTaskCommonEditor = Ext.extend(Ext.AbstractCommonEditorPanel, {
, listeners: {
beforeedit: function (e) {
if (e.field == 'task_listener_huiqset' || e.field == 'task_listener_huiq_stype') {
if (e.record.data.task_listener_stype == 'selHuiq') {
if (e.record.data.task_listener_stype == 'selHuiq' || e.record.data.task_listener_stype == 'selHuiqSeral') {
return true;
} else {
return false;
@ -24972,35 +25009,99 @@ Ext.UserTaskCommonEditor = Ext.extend(Ext.AbstractCommonEditorPanel, {
}
},
afterEdit: function (e) {
if (e.record.data.task_listener_huiq_stype == 'selAll' || !e.record.data.task_listener_huiq_stype || e.field != 'task_listener_huiqset') {
that.propertywindow.editDirectly('oryx-multiinstance_condition', '');
return;
let value = e.value,
clearFile = () => {
e.field != 'task_listener_huiq_stype' && e.record.set(e.field, '');
}, setColumnTitle = (field, title) => {
for (let i = 0; i < e.grid.colModel.config.length; i++) {
const col = e.grid.colModel.config[i];
if (col.dataIndex == field) {
e.grid.colModel.setColumnHeader(i, title);
}
}
};
var value = e.value;
if (e.record.data.task_listener_huiq_stype == 'selNum') {
var re = /^[1-9]+[0-9]*]*$/;
if (!re.test(value)) {
Ext.Msg.alert('错误', '错误的整数,请重新输入!');
if (e.record.data.task_listener_stype == 'selHuiq' || e.record.data.task_listener_stype == 'selHuiqSeral') {
if (e.record.data.task_listener_stype == 'selHuiqSeral') {
that.propertywindow.editDirectly('oryx-multiinstance_sequential', 'Yes');
} else {
that.propertywindow.editDirectly('oryx-multiinstance_sequential', 'No');
}
e.record.set('task_listener_class', 'com.kdayun.z1.core.workflow.listerner.usertask.CountersignListener');
e.record.set('task_listener_event_type', 'complete');
that.propertywindow.editDirectly('oryx-multiinstance_collection', '${cxt.getCounterSignService().getUsers(execution)}');
let datastring = "countersignUser";
that.propertywindow.editDirectly('oryx-multiinstance_variable', datastring);
let tmpfield = {
totalCount: 1
, items: [{ 'assignment_type': 'assignee', 'resourceassignmentexpr': '${' + datastring + '}' }]
}
that.propertywindow.editDirectly('oryx-usertaskassignment', Ext.encode(tmpfield));
let paramValue = e.record.data.task_listener_huiqset;
if (e.record.data.task_listener_huiq_stype == 'selAll') {
setColumnTitle('task_listener_huiqset', '')
that.propertywindow.editDirectly('oryx-multiinstance_condition', '${cxt.getCounterSignService(0,null).isComplete(execution)}');
} else if (e.record.data.task_listener_huiq_stype == 'selNum') {
setColumnTitle('task_listener_huiqset', '同意人数(整数)')
if (paramValue == undefined || paramValue == '' || paramValue == null) {
Ext.Msg.alert('提示', '请输入重新输入同意人数!');
return;
}
let re = /^[1-9]+[0-9]*]*$/;
if (!re.test(paramValue)) {
Ext.Msg.alert('提示', '错误的整数,请重新输入!');
e.value = '';
e.record.set(e.field, '');
clearFile();
return;
}
that.propertywindow.editDirectly('oryx-multiinstance_condition', '${nrOfCompletedInstances==' + value + '}');
that.propertywindow.editDirectly('oryx-multiinstance_condition', '${cxt.getCounterSignService(1,' + paramValue + ').isComplete(execution)}');
} else if (e.record.data.task_listener_huiq_stype == 'selRate') {
var re = /1|0\.[1-9]*$/;
if (!re.test(value)) {
Ext.Msg.alert('错误', '错误的数据格式,请重新输入正确的百分比小数!如: 0.5 ');
e.record.set(e.field, '');
setColumnTitle('task_listener_huiqset', '同意人数百分比(小数)')
if (paramValue == undefined || paramValue == '' || paramValue == null) {
Ext.Msg.alert('提示', '请输入同意人数百分比(小数)');
return;
}
if (value > 1) {
Ext.Msg.alert('错误', '会签通过占比不能超过1请重新输入');
e.record.set(e.field, '');
let re = /1|0\.[1-9]*$/;
if (!re.test(paramValue)) {
Ext.Msg.alert('提示', '错误的数据格式,请重新输入[0~1]之间的小数!如: 0.8 ');
clearFile();
return;
}
that.propertywindow.editDirectly('oryx-multiinstance_condition', '${nrOfCompletedInstances/nrOfInstances>=' + value + '}');
if (paramValue > 1) {
Ext.Msg.alert('提示', '会签通过占比不能超过1请重新输入');
clearFile();
return;
}
that.propertywindow.editDirectly('oryx-multiinstance_condition', '${cxt.getCounterSignService(2,' + paramValue + ').isComplete(execution)}');
} else if (e.record.data.task_listener_huiq_stype == 'selNo') {
setColumnTitle('task_listener_huiqset', '')
that.propertywindow.editDirectly('oryx-multiinstance_condition', '${cxt.getCounterSignService(3,null).isComplete(execution)}');
} else if (e.record.data.task_listener_huiq_stype == 'selUserdef') {
that.propertywindow.editDirectly('oryx-multiinstance_condition', value);
let classname = '', param = 'null'
if (paramValue == undefined || paramValue == '' || paramValue == null) {
Ext.Msg.alert('提示', '请输入自定义的参数. 格式如下: com.xxx.yyy.CounterSignVoteResult,param');
return;
}
if (paramValue) {
if (paramValue.split(',').length != 2) {
Ext.Msg.alert('提示', '自定义的参数格式有误. 格式如下: com.xxx.yyy.CounterSignVoteResult,param \n 其中com.xxx.yyy.CounterSignVoteResult 为自定义的类名;param为参数值');
clearFile();
return;
}
classname = paramValue.split(',')[0];
param = paramValue.split(',')[1];
}
that.propertywindow.editDirectly('oryx-multiinstance_condition', '${cxt.getCounterSignService(4,"' + classname + '",' + param + ').isComplete(execution)}');
}
that.propertywindow.editDirectly('oryx-multiinstance_cardinality', '');
e.record.commit();
} else {
setColumnTitle('task_listener_huiqset', '')
that.propertywindow.editDirectly('oryx-usertaskassignment', '');
}
}
}

View File

@ -71,13 +71,14 @@ Object.extend(Object, {
if (object === null) return 'null';
if (object.toJSON) return object.toJSON();
if (object.ownerDocument === document) return;
var results = [];
for (var property in object) {
var value = Object.toJSON(object[property]);
if (value !== undefined)
results.push(property.toJSON() + ': ' + value);
}
return '{' + results.join(', ') + '}';
// var results = [];
// for (var property in object) {
// var value = Object.toJSON(object[property]);
// if (value !== undefined)
// results.push(property.toJSON() + ': ' + value);
// }
return JSON.stringify(object);
},
keys: function (object) {
@ -368,7 +369,7 @@ Object.extend(String.prototype, {
var json = this.unfilterJSON();
try {
if (!sanitize || (/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/.test(json)))
return JSON.parse(json);
return eval('(' + json + ')');
} catch (e) { }
throw new SyntaxError('Badly formed JSON string: ' + this.inspect());
},

View File

@ -62,6 +62,17 @@
.w640{
width: 640px
}
#btnExport ,#btnImport{
margin-right: 4px;
margin-top: 4px;
position:absolute;
}
#btnImport{
right:0px;
}
#btnExport{
right:30px;
}
</style>
</head>
@ -73,7 +84,9 @@
<div class="layui-card docking-left">
<div class="layui-card-header zltree-header">
<div class="kd-coretable-menu-title" >
<img src="${request.contextPath}/static/image/mouse.png" alt="" >鼠标右键可编辑模型信息
<img src="${request.contextPath}/static/image/mouse.png" alt="" >右键编辑模型
<button id="btnExport" class="layui-btn layui-btn-xs" title="批量导出表模型" lay-event="exportModel" ><i class="fa fa-cloud-download"></i></button>
<button id="btnImport" class="layui-btn layui-btn-xs" title="批量导入表模型" lay-event="importModel"><i class="fa fa-cloud-upload"></i></button>
</div>
</div>
<div class="layui-card-body zltree-body">

View File

@ -97,7 +97,7 @@
<i class="fa fa-home" aria-hidden="true"></i>
</a>
</li>
<li class="layui-nav-item admin-side-cacheclear" lay-unselect>
<li class="layui-nav-item admin-side-cacheclear" layadmin-event="clearCache" lay-unselect>
<a href="javascript:;" title="清除服务器缓存">
<i class="fa fa-trash-o" aria-hidden="true"></i>
</a>

View File

@ -23,7 +23,7 @@
<!-- jdk版本 -->
<jdk.version>1.8</jdk.version>
<!-- 平台版本 -->
<base.version>5.0.224</base.version>
<base.version>5.0.225</base.version>
<!-- Spring 版本号 -->
<spring.version>5.1.2.RELEASE</spring.version>