提交 b3a4b001 编写于 作者: doc_wei's avatar doc_wei

工作流流程模型管理功能整改完成

上级 95a4da48
// 关联的工作流业务模型
var skyeyeClassFlowableMation = {};
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor();
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
form = layui.form;
form.on('radio(businessLinkType)', function (data) {
var val = data.value;
if (val == '1') {
// 不关联业务数据
$(".business").addClass("layui-hide");
} else if (val == '2') {
// 关联业务数据
$(".business").removeClass("layui-hide");
}
});
matchingLanguage();
form.render();
form.on('submit(formAddBean)', function (data) {
if (winui.verifyForm(data.elem)) {
var params = {
flowName: $("#flowName").val(),
modelKey: $("#modelKey").val(),
businessLinkType: data.field.businessLinkType
};
if (params.businessLinkType == 2) {
params.serviceClassName = $("#serviceClassName").attr("className");
params.businessKey = $("#businessKey").val();
params.businessData = $("#businessData").val();
if (isNull(params.serviceClassName)) {
winui.window.msg("请选择工作流业务模型", {icon: 2, time: 2000});
return false;
}
if (isNull(params.businessKey)) {
winui.window.msg("请输入属性字段", {icon: 2, time: 2000});
return false;
}
if (isNull(params.businessData)) {
winui.window.msg("请输入属性值", {icon: 2, time: 2000});
return false;
}
params.dsFormId = "";
}
AjaxPostUtil.request({url: flowableBasePath + "writeActFlowMation", params: params, type: 'json', method: 'POST', callback: function (json) {
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
});
// 工作流业务模型选择
$("body").on("click", "#serviceClassNameSel", function (e) {
_openNewWindows({
url: "../../tpl/skyeyeClassFlowable/skyeyeClassFlowableChoose.html",
title: "工作流业务模型选择",
pageId: "skyeyeClassFlowableChoose",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
$("#serviceClassName").val(skyeyeClassFlowableMation.serviceName);
$("#serviceClassName").attr("className", skyeyeClassFlowableMation.className);
}});
});
$("body").on("click", "#cancle", function() {
parent.layer.close(index);
});
});
\ No newline at end of file
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor();
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
form = layui.form;
showGrid({
id: "showForm",
url: flowableBasePath + "queryActFlowMationById",
params: {id: parent.rowId},
method: 'GET',
pagination: false,
template: $("#beanTemplate").html(),
ajaxSendAfter:function (json) {
if (json.bean.businessLinkType == 1) {
// 不关联业务数据
$("#businessLinkType").html('');
$(".business").addClass("layui-hide");
} else if (json.bean.businessLinkType == 2) {
// 关联业务数据
$("#businessLinkType").html('');
$(".business").removeClass("layui-hide");
}
matchingLanguage();
form.render();
form.on('submit(formEditBean)', function (data) {
if (winui.verifyForm(data.elem)) {
var params = {
id: parent.rowId,
flowName: $("#flowName").val(),
modelKey: $("#modelKey").val(),
businessLinkType: json.bean.businessLinkType
};
if (params.businessLinkType == 2) {
params.serviceClassName = $("#serviceClassName").attr("className");
params.businessKey = $("#businessKey").val();
params.businessData = $("#businessData").val();
if (isNull(params.serviceClassName)) {
winui.window.msg("请选择工作流业务模型", {icon: 2, time: 2000});
return false;
}
if (isNull(params.businessKey)) {
winui.window.msg("请输入属性字段", {icon: 2, time: 2000});
return false;
}
if (isNull(params.businessData)) {
winui.window.msg("请输入属性值", {icon: 2, time: 2000});
return false;
}
params.dsFormId = "";
}
AjaxPostUtil.request({url: flowableBasePath + "writeActFlowMation", params: params, type: 'json', method: 'POST', callback: function (json) {
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
});
}
});
// 工作流业务模型选择
$("body").on("click", "#serviceClassNameSel", function (e) {
_openNewWindows({
url: "../../tpl/skyeyeClassFlowable/skyeyeClassFlowableChoose.html",
title: "工作流业务模型选择",
pageId: "skyeyeClassFlowableChoose",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
$("#serviceClassName").val(skyeyeClassFlowableMation.serviceName);
$("#serviceClassName").attr("className", skyeyeClassFlowableMation.className);
}});
});
$("body").on("click", "#cancle", function() {
parent.layer.close(index);
});
});
\ No newline at end of file
......@@ -10,40 +10,51 @@ layui.config({
form = layui.form,
table = layui.table;
// 流程设计列表
// 流程模型列表
authBtn('1552960740348');
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: flowableBasePath + 'activitimode002',
url: flowableBasePath + 'queryActFlowList',
where: getTableParams(),
even: true,
page: true,
limits: getLimits(),
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'id', title: '模型编号', width: 100 },
{ field: 'name', title: '模型名称', width: 150 },
{ field: 'key', title: '编码', width: 120 },
{ field: 'processKey', title: 'key', width: 250 },
{ field: 'version', title: '版本', width: 80},
{ field: 'deploymentId', title: '发布状态', align: "center", width: 80, templet: function (d) {
if(isNull(d.deploymentId)){
return "<span class='state-new'>未发布</span>";
} else {
return "<span class='state-up'>已发布</span>";
}
}},
{ field: 'deploymentId', title: '部署id', width: 100},
{ field: 'processDefinitionVersion', title: '部署版本', width: 100},
{ field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 },
{ field: 'metaInfo', title: '元数据', width: 120},
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 340, toolbar: '#tableBar'}
]],
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers', rowspan: '2' },
{ colspan: '4', title: '模型信息', align: 'center'},
{ colspan: '2', title: '发布信息', align: 'center'},
{ field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], width: 120, rowspan: '2' },
{ field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150, rowspan: '2' },
{ field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120, rowspan: '2' },
{ field: 'lastUpdateTime', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], align: 'center', width: 150, rowspan: '2' },
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 340, toolbar: '#tableBar', rowspan: '2' }
], [
{ field: 'flowName', title: '模型名称', width: 150 },
{ field: 'modelId', title: '模型ID', width: 100 },
{ field: 'modelKey', title: '模型key', width: 250 },
{ field: 'version', title: '版本', width: 80, templet: function (d) {return d.model.version}},
{ field: 'deploymentId', title: '发布状态', align: "center", width: 80, templet: function (d) {
if (isNull(d.model.deploymentId)) {
return "<span class='state-new'>未发布</span>";
} else {
return "<span class='state-up'>已发布</span>";
}
}},
{ field: 'processDefinitionVersion', title: '版本', width: 100, templet: function (d) {
if (isNull(d.procdef) || isNull(d.procdef.version)) {
return '';
}
return d.procdef.version
}}
]],
done: function(json) {
matchingLanguage();
initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入名称,模型key", function () {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
});
}
});
......@@ -54,8 +65,8 @@ layui.config({
del(data, obj);
} else if (layEvent === 'edit') { //编辑
edit(data);
} else if (layEvent === 'copyModel') { //模型拷贝
copyModel(data);
} else if (layEvent === 'modelDesign') { // 流程设计
modelDesign(data);
} else if (layEvent === 'fb') { //发布
fb(data);
} else if (layEvent === 'versionLevel') { //版本升级
......@@ -67,65 +78,33 @@ layui.config({
}
});
form.render();
form.on('submit(formSearch)', function (data) {
if (winui.verifyForm(data.elem)) {
refreshTable();
}
return false;
});
// 刷新数据
$("body").on("click", "#reloadTable", function() {
loadTable();
});
//删除
// 删除
function del(data, obj) {
var msg = obj ? '确认删除模型【' + obj.data.name + '】吗?' : '确认删除选中数据吗?';
layer.confirm(msg, { icon: 3, title: '删除模型' }, function (index) {
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) {
layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "activitimode006", params: {rowId: data.id}, type: 'json', callback: function (json) {
AjaxPostUtil.request({url: flowableBasePath + "deleteActFlowMationById", params: {id: data.id}, type: 'json', method: 'DELETE', callback: function (json) {
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
}
//编辑
function edit(data) {
rowId = data.id;
_openNewWindows({
url: "../../static/modeler.html?modelId=" + rowId,
title: "绘制流程",
pageId: "canveractivitimodeledit",
area: ['100vw', '100vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
}
//发布
// 发布
function fb(data) {
rowId = data.id;
var msg = data ? '确认发布模型【' + data.name + '】吗?' : '确认发布选中数据吗?';
layer.confirm(msg, { icon: 3, title: '发布模型' }, function (index) {
layer.confirm('确认发布选中数据吗?', { icon: 3, title: '发布模型' }, function (index) {
layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "activitimode003", params: {modelId: rowId}, type: 'json', callback: function (json) {
AjaxPostUtil.request({url: flowableBasePath + "activitimode003", params: {modelId: data.modelId}, type: 'json', callback: function (json) {
winui.window.msg("发布成功", {icon: 1, time: 2000});
loadTable();
}});
});
}
//版本升级
// 版本升级
function versionLevel(data) {
rowId = data.id;
var msg = data ? '确认升级模型【' + data.name + '】版本吗?' : '确认升级选中数据吗?';
layer.confirm(msg, { icon: 3, title: '版本升级' }, function (index) {
layer.confirm('确认升级选中数据吗?', { icon: 3, title: '版本升级' }, function (index) {
layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "activitimode003", params: {modelId: rowId}, type: 'json', callback: function (json) {
AjaxPostUtil.request({url: flowableBasePath + "activitimode003", params: {modelId: data.modelId}, type: 'json', callback: function (json) {
winui.window.msg("升级成功", {icon: 1, time: 2000});
loadTable();
}});
......@@ -133,9 +112,8 @@ layui.config({
}
// 取消发布
function qxfb(data, obj){
var msg = obj ? '确认取消发布【' + obj.data.name + '】吗?' : '确认取消发布选中数据吗?';
layer.confirm(msg, { icon: 3, title: '取消发布' }, function (index) {
function qxfb(data){
layer.confirm('确认取消发布选中数据吗?', { icon: 3, title: '取消发布' }, function (index) {
layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "activitimode007", params: {deploymentId: data.deploymentId}, type: 'json', callback: function (json) {
winui.window.msg("取消发布成功", {icon: 1, time: 2000});
......@@ -144,51 +122,63 @@ layui.config({
});
}
// 拷贝模型
function copyModel(data) {
layer.confirm('确认拷贝选中数据吗?', { icon: 3, title: '模型拷贝' }, function (index) {
layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "activitimode028", params: {modelId: data.id}, type: 'json', callback: function (json) {
winui.window.msg("拷贝成功", {icon: 1, time: 2000});
loadTable();
}});
});
}
// 导出xml
function ecportXML(data) {
window.open(flowableBasePath + "activitimode010?modelId=" + data.id);
window.open(flowableBasePath + "activitimode010?modelId=" + data.modelId);
}
//新增
// 新增
$("body").on("click", "#addBean", function() {
AjaxPostUtil.request({url: flowableBasePath + "activitimode001", params: {}, type: 'json', callback: function (json) {
_openNewWindows({
url: "../../static/modeler.html?modelId=" + json.bean.id,
title: "绘制流程",
pageId: "canveractivitimodel",
area: ['100vw', '100vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
}});
_openNewWindows({
url: "../../tpl/actFlow/actFlowAdd.html",
title: systemLanguage["com.skyeye.addPageTitle"][languageType],
pageId: "actFlowAdd",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
// 编辑
function edit(data) {
rowId = data.id;
_openNewWindows({
url: "../../tpl/actFlow/actFlowEdit.html",
title: systemLanguage["com.skyeye.editPageTitle"][languageType],
pageId: "actFlowEdit",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
}
// 流程设计
function modelDesign(data) {
_openNewWindows({
url: "../../static/modeler.html?modelId=" + data.modelId,
title: "绘制流程",
pageId: "canverActivitiModel",
area: ['100vw', '100vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}
});
}
form.render();
$("body").on("click", "#reloadTable", function() {
loadTable();
});
function loadTable() {
table.reloadData("messageTable", {where: getTableParams()});
}
// 搜索
function refreshTable(){
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()})
}
function getTableParams() {
return {
modelName: $("#modelName").val()
};
return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable"));
}
exports('codemodellist', {});
exports('actFlowList', {});
});
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor();
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
form = layui.form,
table = layui.table;
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: reqBasePath + 'queryClassFlowableDataList',
where: getTableParams(),
even: true,
page: true,
limits: getLimits(),
limit: getLimit(),
cols: [[
{ type: 'radio', fixed: 'left'},
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], fixed: 'left', type: 'numbers' },
{ field: 'serviceName', title: '服务名', align: 'center', width: 150},
{ field: 'className', title: '服务', width: 400}
]],
done: function(res) {
matchingLanguage();
initTableSearchUtil.initAdvancedSearch(this, res.searchFilter, form, "请输入服务名", function () {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
});
$('#messageTable').next().find('.layui-table-body').find("table" ).find("tbody").children("tr").on('dblclick',function() {
var dubClick = $('#messageTable').next().find('.layui-table-body').find("table").find("tbody").find(".layui-table-hover");
dubClick.find("input[type='radio']").prop("checked", true);
form.render();
var chooseIndex = JSON.stringify(dubClick.data('index'));
var obj = res.rows[chooseIndex];
parent.skyeyeClassFlowableMation = obj;
parent.refreshCode = '0';
parent.layer.close(index);
});
$('#messageTable').next().find('.layui-table-body').find("table" ).find("tbody").children("tr").on('click',function() {
var click = $('#messageTable').next().find('.layui-table-body').find("table").find("tbody").find(".layui-table-hover");
click.find("input[type='radio']").prop("checked", true);
form.render();
});
}
});
form.render();
$("body").on("click", "#reloadTable", function() {
loadTable();
});
function loadTable() {
table.reloadData("messageTable", {where: getTableParams()});
}
function getTableParams() {
return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable"));
}
exports('skyeyeClassFlowableChoose', {});
});
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div style="margin:0 auto;padding:20px;">
<form class="layui-form" action="" id="showForm" autocomplete="off">
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">模型名称<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="flowName" name="flowName" win-verify="required" placeholder="请输入模型名称" class="layui-input"/>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">模型Key<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="modelKey" name="modelKey" win-verify="required" placeholder="请输入模型Key" class="layui-input"/>
<div class="layui-form-mid layui-word-aux">在系统中保持唯一。</div>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">绑定业务模型<i class="red">*</i></label>
<div class="layui-input-block winui-radio">
<input type="radio" name="businessLinkType" value="2" title="是" lay-filter="businessLinkType" checked/>
<input type="radio" name="businessLinkType" value="1" title="否" lay-filter="businessLinkType" />
<div class="layui-form-mid layui-word-aux" style="width: 100%;">该选项确定后无法更换</div>
</div>
</div>
<div class="layui-form-item layui-col-xs12 business">
<label class="layui-form-label">工作流业务模型<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="serviceClassName" name="serviceClassName" placeholder="请选择工作流业务模型" class="layui-input" readonly/>
<i class="fa fa-user-plus input-icon" id="serviceClassNameSel"></i>
</div>
</div>
<div class="layui-form-item layui-col-xs12 business">
<label class="layui-form-label">属性字段<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="businessKey" name="businessKey" placeholder="请输入属性字段" class="layui-input"/>
</div>
</div>
<div class="layui-form-item layui-col-xs12 business">
<label class="layui-form-label">属性值<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="businessData" name="businessData" placeholder="请输入属性值" class="layui-input"/>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<div class="layui-input-block">
<button class="winui-btn" id="cancle"><language showName="com.skyeye.cancel"></language></button>
<button class="winui-btn" lay-submit lay-filter="formAddBean"><language showName="com.skyeye.save"></language></button>
</div>
</div>
</form>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/actFlow/'}).use('actFlowAdd');
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div style="padding:20px; margin:0 auto;">
<form class="layui-form" action="" id="showForm">
</form>
</div>
<script type="text/x-handlebars-template" id="beanTemplate">
{{#bean}}
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">模型名称<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="flowName" name="flowName" win-verify="required" placeholder="请输入模型名称" class="layui-input" value="{{flowName}}"/>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">模型Key<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="modelKey" name="modelKey" win-verify="required" placeholder="请输入模型Key" class="layui-input" value="{{modelKey}}"/>
<div class="layui-form-mid layui-word-aux">在系统中保持唯一</div>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">绑定业务模型<i class="red">*</i></label>
<div class="layui-input-block ver-center" id="businessLinkType">
</div>
</div>
<div class="layui-form-item layui-col-xs12 business">
<label class="layui-form-label">工作流业务模型<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="serviceClassName" name="serviceClassName" placeholder="请选择工作流业务模型" class="layui-input" readonly
value="{{serviceName}}" className="{{serviceClassName}}"/>
<i class="fa fa-user-plus input-icon" id="serviceClassNameSel"></i>
</div>
</div>
<div class="layui-form-item layui-col-xs12 business">
<label class="layui-form-label">属性字段<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="businessKey" name="businessKey" placeholder="请输入属性字段" class="layui-input" value="{{businessKey}}"/>
</div>
</div>
<div class="layui-form-item layui-col-xs12 business">
<label class="layui-form-label">属性值<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="businessData" name="businessData" placeholder="请输入属性值" class="layui-input" value="{{businessData}}"/>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<div class="layui-input-block">
<button class="winui-btn" id="cancle"><language showName="com.skyeye.cancel"></language></button>
<button class="winui-btn" lay-submit lay-filter="formEditBean"><language showName="com.skyeye.save"></language></button>
</div>
</div>
{{/bean}}
</script>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/actFlow/'}).use('actFlowEdit');
</script>
</body>
</html>
\ No newline at end of file
......@@ -8,35 +8,21 @@
<link href="../../assets/lib/layui/css/codemirror.css" rel="stylesheet" />
</head>
<body>
<div class="txtcenter" style="margin:0 auto;padding:10px;">
<form class="layui-form layui-form-pane" action="" autocomplete="off">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">模型名称</label>
<div class="layui-input-inline">
<input type="text" id="modelName" name="modelName" placeholder="请输入模型名称" class="layui-input" />
</div>
<button type="reset" class="layui-btn layui-btn-primary list-form-search"><language showName="com.skyeye.reset"></language></button>
<button class="layui-btn list-form-search" lay-submit lay-filter="formSearch"><language showName="com.skyeye.search2"></language></button>
</div>
</div>
</form>
</div>
<div class="winui-toolbar">
<div class="winui-tool">
<button id="reloadTable" class="winui-toolbtn"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
<button id="addBean" class="winui-toolbtn" auth="1552960740348"><i class="fa fa-plus" aria-hidden="true"></i>绘制流程</button>
<button id="reloadTable" class="winui-toolbtn search-table-btn-right"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
<button id="addBean" class="winui-toolbtn search-table-btn-right" auth="1552960740348"><i class="fa fa-plus" aria-hidden="true"></i>新增流程</button>
</div>
</div>
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
<script type="text/html" id="tableBar">
{{# if(auth('1552960943886')){ }}
{{# if(auth('1552960740348')){ }}
<a class="layui-btn layui-btn-xs" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a>
{{# } }}
{{# if(auth('1629206178423')){ }}
<a class="layui-btn layui-btn-xs" lay-event="copyModel">拷贝</a>
{{# if(auth('1552960943886')){ }}
<a class="layui-btn layui-btn-xs" lay-event="modelDesign">流程设计</a>
{{# } }}
{{# if(isNull(d.deploymentId)){ }}
{{# if(auth('1552960701288')){ }}
......@@ -59,7 +45,7 @@
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/activitimodel/'}).use('activitimodellist');
layui.config({base: '../../js/actFlow/'}).use('actFlowList');
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div class="winui-tip alert-info" id="showInfo">双击要选择的数据即可选中。</div>
<div class="winui-toolbar">
<div class="winui-tool">
<button id="reloadTable" class="winui-toolbtn search-table-btn-right"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
</div>
</div>
<div style="margin:auto 10px;">
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
</div>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/skyeyeClassFlowable/'}).use('skyeyeClassFlowableChoose');
</script>
</body>
</html>
\ No newline at end of file
......@@ -55,8 +55,8 @@ layui.config({
limits: getLimits(),
limit: getLimit(),
cols: [[
{ type: assetCheckType ? 'checkbox' : 'radio', rowspan: '3', fixed: 'left'},
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], rowspan: '3', fixed: 'left', type: 'numbers' },
{ type: assetCheckType ? 'checkbox' : 'radio', fixed: 'left'},
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], fixed: 'left', type: 'numbers' },
{ field: 'assetName', title: '资产名称', width: 120, templet: function (d) {
return '<a lay-event="assetlistdetails" class="notice-title-click">' + d.assetName + '</a>';
}},
......
......@@ -67,7 +67,7 @@ layui.config({
pageId: "reportModelTypeEdit",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg("操作成功", {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
}
......@@ -80,7 +80,7 @@ layui.config({
pageId: "reportModelTypeAdd",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg("操作成功", {icon: 1, time: 2000});
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
......
......@@ -23,11 +23,11 @@
var propertiesMultipes = '0';
var propertiesIds = '0';
var KisBpmAssignmentCtrl = [ '$scope', '$modal', function($scope, $modal) {
var KisBpmAssignmentCtrl = ['$scope', '$modal', function ($scope, $modal) {
// Config for the modal window
var opts = {
template: 'editor-app/configuration/properties/assignment-popup.html?version=' + Date.now(),
template: 'editor-app/configuration/properties/assignment-popup.html?version=' + Date.now(),
scope: $scope
};
......@@ -35,66 +35,63 @@ var KisBpmAssignmentCtrl = [ '$scope', '$modal', function($scope, $modal) {
$modal(opts);
}];
var KisBpmAssignmentPopupCtrl = [ '$scope', function($scope) {
var KisBpmAssignmentPopupCtrl = ['$scope', function ($scope) {
// Put json representing assignment on scope
if ($scope.property.value !== undefined && $scope.property.value !== null
&& $scope.property.value.assignment !== undefined
&& $scope.property.value.assignment !== null)
{
&& $scope.property.value.assignment !== null) {
$scope.assignment = $scope.property.value.assignment;
} else {
$scope.assignment = {};
}
if ($scope.assignment.candidateUsers == undefined || $scope.assignment.candidateUsers.length == 0)
{
$scope.assignment.candidateUsers = [{value: '', name: ''}];
if ($scope.assignment.candidateUsers == undefined || $scope.assignment.candidateUsers.length == 0) {
$scope.assignment.candidateUsers = [{value: '', name: ''}];
}
// Click handler for + button after enum value
var userValueIndex = 1;
$scope.addCandidateUserValue = function(index) {
$scope.addCandidateUserValue = function (index) {
$scope.assignment.candidateUsers.splice(index + 1, 0, {value: 'value ' + userValueIndex++});
};
// Click handler for - button after enum value
$scope.removeCandidateUserValue = function(index) {
$scope.removeCandidateUserValue = function (index) {
$scope.assignment.candidateUsers.splice(index, 1);
};
if ($scope.assignment.candidateGroups == undefined || $scope.assignment.candidateGroups.length == 0)
{
$scope.assignment.candidateGroups = [{value: '', name: ''}];
if ($scope.assignment.candidateGroups == undefined || $scope.assignment.candidateGroups.length == 0) {
$scope.assignment.candidateGroups = [{value: '', name: ''}];
}
var groupValueIndex = 1;
$scope.addCandidateGroupValue = function(index) {
$scope.addCandidateGroupValue = function (index) {
$scope.assignment.candidateGroups.splice(index + 1, 0, {value: 'value ' + groupValueIndex++});
};
// Click handler for - button after enum value
$scope.removeCandidateGroupValue = function(index) {
$scope.removeCandidateGroupValue = function (index) {
$scope.assignment.candidateGroups.splice(index, 1);
};
$scope.save = function() {
$scope.save = function () {
$scope.property.value = {};
handleAssignmentInput($scope);
$scope.property.value.assignment = $scope.assignment;
$scope.updatePropertyInModel($scope.property);
$scope.close();
};
// Close button handler
$scope.close = function() {
handleAssignmentInput($scope);
$scope.property.mode = 'read';
$scope.$hide();
$scope.close = function () {
handleAssignmentInput($scope);
$scope.property.mode = 'read';
$scope.$hide();
};
//-----------add select User/Group button handler By billJiang--------------
//代理人(审批人)/候选人
$scope.selectUser = function (multiple) {
......@@ -104,7 +101,7 @@ var KisBpmAssignmentPopupCtrl = [ '$scope', function($scope) {
title = "选择候选人(多选)";
//候选人id
ids = 0;
if($scope.assignment.candidateUsers) {
if ($scope.assignment.candidateUsers) {
var idsArr = [];
//alert( $scope.assignment.candidateUsers.length);
for (var i = 0; i < $scope.assignment.candidateUsers.length; i++) {
......@@ -120,7 +117,7 @@ var KisBpmAssignmentPopupCtrl = [ '$scope', function($scope) {
propertiesIds = ids;
modals.openWin({
winId: 'userSelectWin',
url: basePath + '/tpl/activitimodel/chooseagentpeople.html',
url: basePath + '/tpl/actFlow/chooseAgentPeople.html',
width: '800px',
title: title,
})
......@@ -129,7 +126,7 @@ var KisBpmAssignmentPopupCtrl = [ '$scope', function($scope) {
//候选组
$scope.selectGroup = function () {
var ids = 0;
if($scope.assignment.candidateGroups) {
if ($scope.assignment.candidateGroups) {
var idsArr = [];
for (var i = 0; i < $scope.assignment.candidateGroups.length; i++) {
if ($scope.assignment.candidateGroups[i].value)
......@@ -142,7 +139,7 @@ var KisBpmAssignmentPopupCtrl = [ '$scope', function($scope) {
propertiesIds = ids;
modals.openWin({
winId: 'groupSelectWin',
url: basePath + '/tpl/activitimodel/chooseagentgroup.html?ids=' + ids,
url: basePath + '/tpl/actFlow/chooseAgentGroup.html?ids=' + ids,
width: '1200px',
title: '选择候选组(多选)'
})
......@@ -197,60 +194,46 @@ var KisBpmAssignmentPopupCtrl = [ '$scope', function($scope) {
//加上这句话回填后界面立即生效
$scope.$apply();
};
var handleAssignmentInput = function($scope) {
if ($scope.assignment.candidateUsers)
{
var emptyUsers = true;
var toRemoveIndexes = [];
for (var i = 0; i < $scope.assignment.candidateUsers.length; i++)
{
if ($scope.assignment.candidateUsers[i].value != '')
{
emptyUsers = false;
}
else
{
toRemoveIndexes[toRemoveIndexes.length] = i;
}
}
for (var i = 0; i < toRemoveIndexes.length; i++)
{
$scope.assignment.candidateUsers.splice(toRemoveIndexes[i], 1);
}
if (emptyUsers)
{
$scope.assignment.candidateUsers = undefined;
}
}
if ($scope.assignment.candidateGroups)
{
var emptyGroups = true;
var toRemoveIndexes = [];
for (var i = 0; i < $scope.assignment.candidateGroups.length; i++)
{
if ($scope.assignment.candidateGroups[i].value != '')
{
emptyGroups = false;
}
else
{
toRemoveIndexes[toRemoveIndexes.length] = i;
}
}
for (var i = 0; i < toRemoveIndexes.length; i++)
{
$scope.assignment.candidateGroups.splice(toRemoveIndexes[i], 1);
}
if (emptyGroups)
{
$scope.assignment.candidateGroups = undefined;
}
}
var handleAssignmentInput = function ($scope) {
if ($scope.assignment.candidateUsers) {
var emptyUsers = true;
var toRemoveIndexes = [];
for (var i = 0; i < $scope.assignment.candidateUsers.length; i++) {
if ($scope.assignment.candidateUsers[i].value != '') {
emptyUsers = false;
} else {
toRemoveIndexes[toRemoveIndexes.length] = i;
}
}
for (var i = 0; i < toRemoveIndexes.length; i++) {
$scope.assignment.candidateUsers.splice(toRemoveIndexes[i], 1);
}
if (emptyUsers) {
$scope.assignment.candidateUsers = undefined;
}
}
if ($scope.assignment.candidateGroups) {
var emptyGroups = true;
var toRemoveIndexes = [];
for (var i = 0; i < $scope.assignment.candidateGroups.length; i++) {
if ($scope.assignment.candidateGroups[i].value != '') {
emptyGroups = false;
} else {
toRemoveIndexes[toRemoveIndexes.length] = i;
}
}
for (var i = 0; i < toRemoveIndexes.length; i++) {
$scope.assignment.candidateGroups.splice(toRemoveIndexes[i], 1);
}
if (emptyGroups) {
$scope.assignment.candidateGroups = undefined;
}
}
};
}];
\ No newline at end of file
......@@ -119,11 +119,13 @@
<span class="title-removed" ng-if="property.hidden"><i>{{ property.title }}&nbsp;({{'PROPERTY.REMOVED' | translate}})&nbsp;:</i></span>
<span class="value">
<ng-include
src="getPropertyTemplateUrl($index)" ng-if="!property.hasReadWriteMode"></ng-include>
src="getPropertyTemplateUrl($index)" ng-if="!property.hasReadWriteMode && !property.readOnly"></ng-include>
<ng-include src="getPropertyReadModeTemplateUrl($index)"
ng-if="property.hasReadWriteMode && property.mode == 'read'"></ng-include>
ng-if="property.hasReadWriteMode && property.mode == 'read' && !property.readOnly"></ng-include>
<ng-include src="getPropertyWriteModeTemplateUrl($index)"
ng-if="property.hasReadWriteMode && property.mode == 'write'"></ng-include>
ng-if="property.hasReadWriteMode && property.mode == 'write' && !property.readOnly"></ng-include>
<ng-include src="getPropertyReadModeTemplateUrl($index)"
ng-if="property.readOnly"></ng-include>
</span>
</div>
</div>
......
......@@ -15,7 +15,7 @@
class="form-control"
ng-model="saveDialog.name"
ui-keypress="{13:'save()'}"
auto-focus />
auto-focus readonly/>
</div>
<div class="form-group">
<label for="docTextArea">{{'MODEL.DESCRIPTION' | translate}}</label>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册