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

表单设计第一版修改

上级 a7f8c256
...@@ -17,34 +17,8 @@ layui.config({ ...@@ -17,34 +17,8 @@ layui.config({
// 加载图标信息 // 加载图标信息
systemCommonUtil.initIconChooseHtml('iconMation', form, colorpicker, 17); systemCommonUtil.initIconChooseHtml('iconMation', form, colorpicker, 17);
// 初始化动态表单
showGrid({
id: "dsFormId",
url: flowableBasePath + "actmodletype020",
params: {},
pagination: false,
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendAfter: function (json) {
form.render('select');
}
})
textool.init({eleId: 'remark', maxlength: 200}); textool.init({eleId: 'remark', maxlength: 200});
// 页面类型变化事件
form.on('radio(pageTypes)', function (data) {
var val = data.value;
if (val == 1) {
// 指定页面
$(".TypeIsTwo").addClass("layui-hide");
$(".TypeIsOne").removeClass("layui-hide");
} else if (val == 2) {
// 动态表单
$(".TypeIsTwo").removeClass("layui-hide");
$(".TypeIsOne").addClass("layui-hide");
}
});
matchingLanguage(); matchingLanguage();
form.render(); form.render();
form.on('submit(formAddBean)', function (data) { form.on('submit(formAddBean)', function (data) {
...@@ -52,40 +26,14 @@ layui.config({ ...@@ -52,40 +26,14 @@ layui.config({
var params = { var params = {
typeId: parent.rowId, typeId: parent.rowId,
title: $("#typeName").val(), title: $("#typeName").val(),
pageTypes: data.field.pageTypes,
tokenUrl: $("#tokenUrl").val(), tokenUrl: $("#tokenUrl").val(),
remark: $("#remark").val(), remark: $("#remark").val(),
commonUsed: data.field.commonUsed, commonUsed: data.field.commonUsed,
actFlowId: $("#actFlowId").attr("actFlowId") actFlowId: $("#actFlowId").attr("actFlowId"),
addPageUrl: $("#addPageUrl").val(),
editPageUrl: $("#editPageUrl").val(),
revokeMapping: $("#revokeMapping").val()
}; };
if (params.pageTypes == 1) {
params.addPageUrl = $("#addPageUrl").val();
params.editPageUrl = $("#editPageUrl").val();
params.revokeMapping = $("#revokeMapping").val();
if (isNull(params.addPageUrl)) {
winui.window.msg("请输入新增页面地址", {icon: 2, time: 2000});
return false;
}
if (isNull(params.editPageUrl)) {
winui.window.msg("请输入编辑页面地址", {icon: 2, time: 2000});
return false;
}
if (isNull(params.revokeMapping)) {
winui.window.msg("请输入撤销接口", {icon: 2, time: 2000});
return false;
}
params.dsFormId = "";
} else if (params.pageTypes == 2) {
params.addPageUrl = "";
params.editPageUrl = "";
params.revokeMapping = "";
params.dsFormId = $("#dsFormId").val();
if (isNull(params.dsFormId)) {
winui.window.msg("请选择表单页面", {icon: 2, time: 2000});
return false;
}
}
// 获取图标信息 // 获取图标信息
params = systemCommonUtil.getIconChoose(params); params = systemCommonUtil.getIconChoose(params);
if (!params["iconChooseResult"]) { if (!params["iconChooseResult"]) {
......
...@@ -18,16 +18,6 @@ layui.config({ ...@@ -18,16 +18,6 @@ layui.config({
method: 'GET', method: 'GET',
template: $("#beanTemplate").html(), template: $("#beanTemplate").html(),
ajaxSendAfter:function (json) { ajaxSendAfter:function (json) {
if(json.bean.pageTypes == 1){
$("#pageTypes").html('指定业务');
$(".TypeIsTwo").addClass("layui-hide");
$(".TypeIsOne").removeClass("layui-hide");
} else {
$("#pageTypes").html('动态表单');
$(".TypeIsTwo").removeClass("layui-hide");
$(".TypeIsOne").addClass("layui-hide");
}
if(json.bean.iconType == 1){ if(json.bean.iconType == 1){
$("#iconType").html('Icon'); $("#iconType").html('Icon');
$(".iconTypeIsTwo").addClass("layui-hide"); $(".iconTypeIsTwo").addClass("layui-hide");
......
...@@ -27,44 +27,6 @@ layui.config({ ...@@ -27,44 +27,6 @@ layui.config({
textool.init({eleId: 'remark', maxlength: 200}); textool.init({eleId: 'remark', maxlength: 200});
// 初始化动态表单
showGrid({
id: "dsFormId",
url: flowableBasePath + "actmodletype020",
params: {},
pagination: false,
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendAfter: function (data) {
form.render('select');
$("#dsFormId").val(json.bean.dsFormId);
}
})
// 设置页面类型
$("input:radio[name=pageTypes][value=" + json.bean.pageTypes + "]").attr("checked", true);
if (json.bean.pageTypes == 1) {
$(".TypeIsTwo").addClass("layui-hide");
$(".TypeIsOne").removeClass("layui-hide");
} else {
$(".TypeIsTwo").removeClass("layui-hide");
$(".TypeIsOne").addClass("layui-hide");
}
// 页面类型变化事件
form.on('radio(pageTypes)', function (data) {
var val = data.value;
if (val == 1) {
// 指定页面
$(".TypeIsTwo").addClass("layui-hide");
$(".TypeIsOne").removeClass("layui-hide");
} else if (val == 2) {
// 动态表单
$(".TypeIsTwo").removeClass("layui-hide");
$(".TypeIsOne").addClass("layui-hide");
}
});
matchingLanguage(); matchingLanguage();
form.render(); form.render();
form.on('submit(formEditBean)', function (data) { form.on('submit(formEditBean)', function (data) {
...@@ -72,39 +34,14 @@ layui.config({ ...@@ -72,39 +34,14 @@ layui.config({
var params = { var params = {
id: parent.rowId, id: parent.rowId,
title: $("#title").val(), title: $("#title").val(),
pageTypes: data.field.pageTypes,
tokenUrl: $("#tokenUrl").val(), tokenUrl: $("#tokenUrl").val(),
remark: $("#remark").val(), remark: $("#remark").val(),
commonUsed: data.field.commonUsed, commonUsed: data.field.commonUsed,
actFlowId: $("#actFlowId").attr("actFlowId") actFlowId: $("#actFlowId").attr("actFlowId"),
addPageUrl: $("#addPageUrl").val(),
editPageUrl: $("#editPageUrl").val(),
revokeMapping: $("#revokeMapping").val()
}; };
if (params.pageTypes == 1) {
params.addPageUrl = $("#addPageUrl").val();
params.editPageUrl = $("#editPageUrl").val();
params.revokeMapping = $("#revokeMapping").val();
if (isNull(params.addPageUrl)) {
winui.window.msg("请输入新增页面地址", {icon: 2, time: 2000});
return false;
}
if (isNull(params.editPageUrl)) {
winui.window.msg("请输入编辑页面地址", {icon: 2, time: 2000});
return false;
}
if (isNull(params.revokeMapping)) {
winui.window.msg("请输入撤销接口", {icon: 2, time: 2000});
return false;
}
params.dsFormId = "";
} else if (params.pageTypes == 2) {
params.addPageUrl = "";
params.editPageUrl = "";
params.revokeMapping = "";
params.dsFormId = $("#dsFormId").val();
if (isNull(params.dsFormId)) {
winui.window.msg("请选择表单页面", {icon: 2, time: 2000});
return false;
}
}
// 获取图标信息 // 获取图标信息
params = systemCommonUtil.getIconChoose(params); params = systemCommonUtil.getIconChoose(params);
if (!params["iconChooseResult"]) { if (!params["iconChooseResult"]) {
......
...@@ -265,13 +265,6 @@ layui.config({ ...@@ -265,13 +265,6 @@ layui.config({
return '<a lay-event="dedails" class="notice-title-click">' + d.title + '</a>'; return '<a lay-event="dedails" class="notice-title-click">' + d.title + '</a>';
}}, }},
{ field: 'actFlowName', title: '工作流模型', align: 'left', width: 120}, { field: 'actFlowName', title: '工作流模型', align: 'left', width: 120},
{ field: 'pageTypes', title: '流程类型', align: 'center', width: 120, templet: function (d) {
if (d.pageTypes == 1) {
return "指定业务";
} else if (d.pageTypes == 2) {
return "动态表单";
}
}},
{ field: 'addPageUrl', title: '新增页面', align: 'left', width: 200 }, { field: 'addPageUrl', title: '新增页面', align: 'left', width: 200 },
{ field: 'editPageUrl', title: '编辑页面', align: 'left', width: 200 }, { field: 'editPageUrl', title: '编辑页面', align: 'left', width: 200 },
{ field: 'iconBg', title: '背景', align: 'center', width: 80 }, { field: 'iconBg', title: '背景', align: 'center', width: 80 },
......
...@@ -2,9 +2,6 @@ ...@@ -2,9 +2,6 @@
var jsonArray = [];//表单项 var jsonArray = [];//表单项
var layedit, form; var layedit, form;
// 当前审批的表单是动态表单还是静态页面
var pageTypes = "";
layui.config({ layui.config({
base: basePath, base: basePath,
version: skyeyeVersion version: skyeyeVersion
...@@ -37,7 +34,6 @@ layui.config({ ...@@ -37,7 +34,6 @@ layui.config({
voucherTemplate = $("#voucherTemplate").html();//凭证展示 voucherTemplate = $("#voucherTemplate").html();//凭证展示
AjaxPostUtil.request({url: flowableBasePath + "activitimode016", params: {taskId: taskId, processInstanceId: processInstanceId}, type: 'json', method: 'GET', callback: function(j){ AjaxPostUtil.request({url: flowableBasePath + "activitimode016", params: {taskId: taskId, processInstanceId: processInstanceId}, type: 'json', method: 'GET', callback: function(j){
pageTypes = isNull(j.bean.pageTypes) ? '1' : j.bean.pageTypes;
var jsonStr = "";//实体json对象 var jsonStr = "";//实体json对象
var str = ""; var str = "";
//获取该节点的id和名称 //获取该节点的id和名称
...@@ -340,7 +336,6 @@ layui.config({ ...@@ -340,7 +336,6 @@ layui.config({
flag: $("input[name='flag']:checked").val(), flag: $("input[name='flag']:checked").val(),
processInstanceId: processInstanceId, processInstanceId: processInstanceId,
editStr: (params.length > 0) ? JSON.stringify(params) : "", editStr: (params.length > 0) ? JSON.stringify(params) : "",
pageTypes: pageTypes,
approverId: activitiUtil.getApprovalPersonId() approverId: activitiUtil.getApprovalPersonId()
}; };
AjaxPostUtil.request({url: flowableBasePath + "activitimode005", params: jStr, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "activitimode005", params: jStr, type: 'json', callback: function (json) {
......
var layedit, form;
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui'].concat(dsFormUtil.mastHaveImport), function (exports) {
winui.renderColor();
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$;
layedit = layui.layedit,
form = layui.form;
var actFlowId = parent.actFlowId;
// 加载动态表单页
AjaxPostUtil.request({url: flowableBasePath + "dsformpage004", params: {pageId: parent.dsFormId}, type: 'json', method: 'GET', callback: function (json) {
dsFormUtil.loadDsFormItemToEdit("showForm", json.rows);
$("#showForm").append('<div class="layui-form-item layui-col-xs12"><div class="layui-input-block">' +
'<button class="winui-btn" id="cancle">' + systemLanguage["com.skyeye.cancel"][languageType] + '</button>' +
'<button class="winui-btn" lay-submit="" lay-filter="formAddBean">提交审批</button>' +
'</div></div>');
matchingLanguage();
form.render();
}});
form.on('submit(formAddBean)', function (data) {
if (winui.verifyForm(data.elem)) {
activitiUtil.startProcess(actFlowId, null, function (approvalId) {
if(isNull(actFlowId)){
winui.window.msg('流程对象为空,无法启动.', {icon: 2, time: 2000});
return false;
}
var jStr = {
actFlowId: actFlowId,
jsonStr: JSON.stringify(dsFormUtil.getPageData($("#showForm"))),
pageId: parent.dsFormId,
approvalId: approvalId
};
AjaxPostUtil.request({url: flowableBasePath + "activitimode022", params: jStr, type: 'json', callback: function (json) {
winui.window.msg("申请提交成功,等待审核...", {icon: 1, time: 2000}, function() {
parent.layer.close(index);
parent.refreshCode = '0';
});
}});
});
}
return false;
});
// 取消
$("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', 'table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor();
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
form = layui.form,
table = layui.table;
// 动态表单草稿状态下的详情
var rowId = parent.rowId;
AjaxPostUtil.request({url: flowableBasePath + "pagesequence006", params: {rowId: rowId}, type: 'json', callback: function(j){
dsFormUtil.initSequenceDataDetails("showForm", j.rows);
matchingLanguage();
}});
exports('dsFormPageSequenceDraftProcessDetail', {});
});
var layedit, form;
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui'].concat(dsFormUtil.mastHaveImport), function (exports) {
winui.renderColor();
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$;
layedit = layui.layedit,
form = layui.form;
// 编辑动态表单时进行回显
AjaxPostUtil.request({url: flowableBasePath + "pagesequence003", params: {rowId: parent.rowId}, type: 'json', callback: function (json) {
dsFormUtil.loadDsFormItemToEdit("showForm", json.rows);
$("#showForm").append('<div class="layui-form-item layui-col-xs12"><div class="layui-input-block">' +
'<button class="winui-btn" id="cancle">' + systemLanguage["com.skyeye.cancel"][languageType] + '</button>' +
'<button class="winui-btn" lay-submit="" lay-filter="formAddBean">' + systemLanguage["com.skyeye.save"][languageType] + '</button>' +
'</div></div>');
matchingLanguage();
form.render();
}});
form.on('submit(formAddBean)', function (data) {
if (winui.verifyForm(data.elem)) {
var params = dsFormUtil.getPageData($("#showForm"));
AjaxPostUtil.request({url: flowableBasePath + "pagesequence004", params: {jsonStr: JSON.stringify(params)}, type: 'json', callback: function (json) {
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
});
// 取消
$("body").on("click", "#cancle", function() {
parent.layer.close(index);
});
});
\ No newline at end of file
var layedit, form;
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui'].concat(dsFormUtil.mastHaveImport), function (exports) {
winui.renderColor();
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$;
layedit = layui.layedit,
form = layui.form;
// 获取动态表单内容用于编辑申请类型实体
AjaxPostUtil.request({url: flowableBasePath + "activitimode023", params: {rowId: parent.sequenceId}, type: 'json', callback: function (json) {
dsFormUtil.loadDsFormItemToEdit("showForm", json.rows);
$("#showForm").append('<div class="layui-form-item layui-col-xs12"><div class="layui-input-block">' +
'<button class="winui-btn" id="cancle">' + systemLanguage["com.skyeye.cancel"][languageType] + '</button>' +
'<button class="winui-btn" lay-submit="" lay-filter="formAddBean">' + systemLanguage["com.skyeye.save"][languageType] + '</button>' +
'</div></div>');
form.render();
matchingLanguage();
}});
form.on('submit(formAddBean)', function (data) {
if (winui.verifyForm(data.elem)) {
var jStr = {
jsonStr: JSON.stringify(dsFormUtil.getPageData($("#showForm"))),
taskId: parent.taskId,
processInstanceId: parent.processInstanceId
};
AjaxPostUtil.request({url: flowableBasePath + "activitimode024", params: jStr, type: 'json', callback: function (json) {
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
});
// 取消
$("body").on("click", "#cancle", function() {
parent.layer.close(index);
});
});
\ No newline at end of file
var rowId = "";//用户提交的表单数据的id
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form', 'laydate'], function (exports) {
winui.renderColor();
var $ = layui.$,
table = layui.table,
laydate = layui.laydate,
form = layui.form;
// '申请时间'页面的选取时间段表格
laydate.render({elem: '#createTime', range: '~'});
// 我启动的流程
table.render({
id: 'messageMyStartTable',
elem: '#messageMyStartTable',
method: 'post',
url: flowableBasePath + 'pagesequence001',
where: getTableParams(),
even: true,
page: true,
limits: getLimits(),
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'title', title: '流程名称', width: 100 },
{ field: 'createTime', title: '申请时间', align: 'center', width: 140},
{ field: 'state', title: '状态', align: 'center', width: 80, templet: function (d) {
if(d.state == 1){
return "<span class='state-down'>草稿</span>";
} else {
return "<span class='state-up'>正常</span>";
}
}},
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 240, toolbar: '#myStartTableBar'}
]],
done: function(json) {
matchingLanguage();
}
});
table.on('tool(messageMyStartTable)', function (obj) {
var data = obj.data;
var layEvent = obj.event;
if (layEvent === 'edit') { //编辑
edit(data);
} else if (layEvent === 'details') { //详情
details(data);
} else if (layEvent === 'subApproval') { //提交审批
subApproval(data);
} else if (layEvent === 'deleteRow') { //删除
deleteRow(data);
}
});
// 编辑
function edit(data) {
rowId = data.id;
_openNewWindows({
url: '../../tpl/dsFormPageSequence/dsFormPageSequenceDraftProcessEdit.html',
title: systemLanguage["com.skyeye.editPageTitle"][languageType],
pageId: "dsFormPageSequenceDraftProcessEdit",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
}
});
}
// 表单详情
function details(data) {
rowId = data.id;
_openNewWindows({
url: "../../tpl/dsFormPageSequence/dsFormPageSequenceDraftProcessDetail.html",
title: systemLanguage["com.skyeye.detailsPageTitle"][languageType],
pageId: "dsFormPageSequenceDraftProcessDetail",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
}
});
}
// 提交审批
function subApproval(data) {
layer.confirm('确认提交进行审批吗?', { icon: 3, title: '提交审批' }, function (i) {
layer.close(i);
activitiUtil.startProcess(data.pageId, null, function (approvalId) {
var params = {
rowId: data.id,
approvalId: approvalId
};
AjaxPostUtil.request({url: flowableBasePath + "pagesequence005", params: params, type: 'json', callback: function (json) {
winui.window.msg("申请提交成功,等待审核...", {icon: 1, time: 2000});
reloadMyStartTable();
}});
});
});
}
// 删除
function deleteRow(data) {
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) {
layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "pagesequence002", params: {rowId: data.id}, type: 'json', callback: function (json) {
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
reloadMyStartTable();
}});
});
}
form.render();
form.on('submit(formSearch)', function (data) {
if (winui.verifyForm(data.elem)) {
searchMyStartTable();
}
return false;
});
// 刷新表单草稿列表
$("body").on("click", "#reloadMyStartTable", function() {
reloadMyStartTable();
});
function reloadMyStartTable(){
table.reloadData("messageMyStartTable", {where: getTableParams()});
}
function searchMyStartTable(){
table.reloadData("messageMyStartTable", {page: {curr: 1}, where: getTableParams()});
}
function getTableParams() {
var startTime = "";
var endTime = "";
if (!isNull($("#createTime").val())) {//一定要记得,当createTime为空时
startTime = $("#createTime").val().split('~')[0].trim() + ' 00:00:00';
endTime = $("#createTime").val().split('~')[1].trim() + ' 23:59:59';
}
return {
startTime: startTime,
endTime: endTime
};
}
exports('dsFormPageSequenceDraftProcessList', {});
});
...@@ -22,44 +22,28 @@ ...@@ -22,44 +22,28 @@
<i class="fa fa-user-plus input-icon" id="actFlowIdSel"></i> <i class="fa fa-user-plus input-icon" id="actFlowIdSel"></i>
</div> </div>
</div> </div>
<div class="layui-form-item layui-col-xs12"> <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="pageTypes" value="1" title="指定业务" lay-filter="pageTypes" checked/>
<input type="radio" name="pageTypes" value="2" title="动态表单" lay-filter="pageTypes" />
</div>
</div>
<div class="layui-form-item TypeIsOne layui-col-xs12">
<label class="layui-form-label">新增页面<i class="red">*</i></label> <label class="layui-form-label">新增页面<i class="red">*</i></label>
<div class="layui-input-block"> <div class="layui-input-block">
<input type="text" id="addPageUrl" name="addPageUrl" placeholder="请输入页面URL" class="layui-input"/> <input type="text" id="addPageUrl" name="addPageUrl" win-verify="required" placeholder="请输入页面URL" class="layui-input"/>
<div class="layui-form-mid layui-word-aux">格式为:../../tpl/model/modelAdd.html</div> <div class="layui-form-mid layui-word-aux">格式为:../../tpl/model/modelAdd.html</div>
</div> </div>
</div> </div>
<div class="layui-form-item TypeIsOne layui-col-xs12"> <div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">编辑页面<i class="red">*</i></label> <label class="layui-form-label">编辑页面<i class="red">*</i></label>
<div class="layui-input-block"> <div class="layui-input-block">
<input type="text" id="editPageUrl" name="editPageUrl" placeholder="请输入页面URL" class="layui-input"/> <input type="text" id="editPageUrl" name="editPageUrl" win-verify="required" placeholder="请输入页面URL" class="layui-input"/>
<div class="layui-form-mid layui-word-aux">格式为:../../tpl/model/modelEdit.html</div> <div class="layui-form-mid layui-word-aux">格式为:../../tpl/model/modelEdit.html</div>
</div> </div>
</div> </div>
<div class="layui-form-item TypeIsOne layui-col-xs12"> <div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">撤销接口<i class="red">*</i></label> <label class="layui-form-label">撤销接口<i class="red">*</i></label>
<div class="layui-input-block"> <div class="layui-input-block">
<input type="text" id="revokeMapping" name="revokeMapping" placeholder="请输入撤销接口" class="layui-input"/> <input type="text" id="revokeMapping" name="revokeMapping" win-verify="required" placeholder="请输入撤销接口" class="layui-input"/>
<div class="layui-form-mid layui-word-aux">格式为:bbb001;直接填写接口名即可</div> <div class="layui-form-mid layui-word-aux">格式为:bbb001;直接填写接口名即可</div>
</div> </div>
</div> </div>
<div class="layui-form-item TypeIsTwo layui-hide layui-col-xs12">
<label class="layui-form-label">表单页面<i class="red">*</i></label>
<div class="layui-input-block">
<select lay-filter="dsFormId" lay-search="" id="dsFormId" name="dsFormId">
</select>
</div>
</div>
<div class="layui-form-item layui-col-xs12" id="iconMation"> <div class="layui-form-item layui-col-xs12" id="iconMation">
</div> </div>
......
...@@ -28,38 +28,24 @@ ...@@ -28,38 +28,24 @@
</div> </div>
</div> </div>
<div class="layui-form-item layui-col-xs12"> <div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">流程类型</label>
<div class="layui-input-block ver-center" id="pageTypes">
</div>
</div>
<div class="layui-form-item TypeIsOne layui-col-xs12">
<label class="layui-form-label">新增页面</label> <label class="layui-form-label">新增页面</label>
<div class="layui-input-block ver-center"> <div class="layui-input-block ver-center">
{{addPageUrl}} {{addPageUrl}}
</div> </div>
</div> </div>
<div class="layui-form-item TypeIsOne layui-col-xs12"> <div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">编辑页面</label> <label class="layui-form-label">编辑页面</label>
<div class="layui-input-block ver-center"> <div class="layui-input-block ver-center">
{{editPageUrl}} {{editPageUrl}}
</div> </div>
</div> </div>
<div class="layui-form-item TypeIsOne layui-col-xs6"> <div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">撤销接口</label> <label class="layui-form-label">撤销接口</label>
<div class="layui-input-block ver-center"> <div class="layui-input-block ver-center">
{{revokeMapping}}<br> {{revokeMapping}}<br>
</div> </div>
</div> </div>
<div class="layui-form-item TypeIsTwo layui-col-xs12">
<label class="layui-form-label">表单页面</label>
<div class="layui-input-block ver-center">
{{dsFormName}}
</div>
</div>
<div class="layui-form-item layui-col-xs12"> <div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">图标类型</label> <label class="layui-form-label">图标类型</label>
<div class="layui-input-block ver-center" id="iconType"> <div class="layui-input-block ver-center" id="iconType">
......
...@@ -30,41 +30,26 @@ ...@@ -30,41 +30,26 @@
</div> </div>
</div> </div>
<div class="layui-form-item layui-col-xs12"> <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="pageTypes" value="1" title="指定业务" lay-filter="pageTypes"/>
<input type="radio" name="pageTypes" value="2" title="动态表单" lay-filter="pageTypes"/>
</div>
</div>
<div class="layui-form-item TypeIsOne layui-col-xs12">
<label class="layui-form-label">新增页面<i class="red">*</i></label> <label class="layui-form-label">新增页面<i class="red">*</i></label>
<div class="layui-input-block"> <div class="layui-input-block">
<input type="text" id="addPageUrl" name="addPageUrl" placeholder="请输入页面URL" class="layui-input" value="{{addPageUrl}}"/> <input type="text" id="addPageUrl" name="addPageUrl" win-verify="required" placeholder="请输入页面URL" class="layui-input" value="{{addPageUrl}}"/>
<div class="layui-form-mid layui-word-aux">格式为../../tpl/model/modelAdd.html</div> <div class="layui-form-mid layui-word-aux">格式为../../tpl/model/modelAdd.html</div>
</div> </div>
</div> </div>
<div class="layui-form-item TypeIsOne layui-col-xs12"> <div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">编辑页面<i class="red">*</i></label> <label class="layui-form-label">编辑页面<i class="red">*</i></label>
<div class="layui-input-block"> <div class="layui-input-block">
<input type="text" id="editPageUrl" name="editPageUrl" placeholder="请输入页面URL" class="layui-input" value="{{editPageUrl}}"/> <input type="text" id="editPageUrl" name="editPageUrl" win-verify="required" placeholder="请输入页面URL" class="layui-input" value="{{editPageUrl}}"/>
<div class="layui-form-mid layui-word-aux">格式为../../tpl/model/modelEdit.html</div> <div class="layui-form-mid layui-word-aux">格式为../../tpl/model/modelEdit.html</div>
</div> </div>
</div> </div>
<div class="layui-form-item TypeIsOne layui-col-xs12"> <div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">撤销接口<i class="red">*</i></label> <label class="layui-form-label">撤销接口<i class="red">*</i></label>
<div class="layui-input-block"> <div class="layui-input-block">
<input type="text" id="revokeMapping" name="revokeMapping" placeholder="请输入撤销接口" class="layui-input" value="{{revokeMapping}}"/> <input type="text" id="revokeMapping" name="revokeMapping" win-verify="required" placeholder="请输入撤销接口" class="layui-input" value="{{revokeMapping}}"/>
<div class="layui-form-mid layui-word-aux">格式为bbb001直接填写接口名即可</div> <div class="layui-form-mid layui-word-aux">格式为bbb001直接填写接口名即可</div>
</div> </div>
</div> </div>
<div class="layui-form-item TypeIsTwo layui-col-xs12">
<label class="layui-form-label">表单页面<i class="red">*</i></label>
<div class="layui-input-block">
<select lay-filter="dsFormId" lay-search="" id="dsFormId" name="dsFormId">
</select>
</div>
</div>
<div class="layui-form-item layui-col-xs12" id="iconMation"> <div class="layui-form-item layui-col-xs12" id="iconMation">
</div> </div>
......
<!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" />
<link href="../../assets/lib/layui/css/codemirror.css" rel="stylesheet" />
</head>
<body>
<div style="float: left; min-height: 100%;">
<form class="layui-form" action="" id="showForm" autocomplete="off" style="float: left; width: calc(100% - 20px); height: 100%; background-color: white; margin-top: 10px; padding: 10px;">
</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/dsFormPageSequence/'}).use('dsFormPageSequenceDraftProcessAdd');
</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="margin:0 auto; height: 100%; overflow: hidden;">
<div id="showForm" style="height: auto; width: 100%; float: left;">
</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/dsFormPageSequence/'}).use('dsFormPageSequenceDraftProcessDetail');
</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" />
<link href="../../assets/lib/layui/css/codemirror.css" rel="stylesheet" />
</head>
<body>
<div style="float: left; min-height: 100%;">
<form class="layui-form" action="" id="showForm" autocomplete="off" style="float: left; width: calc(100% - 20px); height: 100%; background-color: white; margin-top: 10px; padding: 10px;">
</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/dsFormPageSequence/'}).use('dsFormPageSequenceDraftProcessEdit');
</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" />
<link href="../../assets/lib/layui/css/codemirror.css" rel="stylesheet" />
</head>
<body>
<div style="float: left; min-height: 100%;">
<form class="layui-form" action="" id="showForm" autocomplete="off" style="float: left; width: calc(100% - 20px); height: 100%; background-color: white; margin-top: 10px; padding: 10px;">
</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/dsFormPageSequence/'}).use('dsFormPageSequenceDraftProcessEditToAct');
</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="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="createTime" name="createTime" 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="reloadMyStartTable" class="winui-toolbtn"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
</div>
</div>
<div style="margin:auto 10px;">
<table id="messageMyStartTable" lay-filter="messageMyStartTable"></table>
<script type="text/html" id="myStartTableBar">
<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a>
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="deleteRow"><language showName="com.skyeye.deleteBtn"></language></a>
<a class="layui-btn layui-btn-xs" lay-event="details">详情</a>
<a class="layui-btn layui-btn-xs" lay-event="subApproval">提交审批</a>
</script>
</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/dsFormPageSequence/'}).use('dsFormPageSequenceDraftProcessList');
</script>
</body>
</html>
\ No newline at end of file
...@@ -27,7 +27,7 @@ layui.config({ ...@@ -27,7 +27,7 @@ layui.config({
addRow(); addRow();
$("#dsFormChooseList" + (rowNum - 1)).val(item.pageNum); $("#dsFormChooseList" + (rowNum - 1)).val(item.pageNum);
$("#dsFormChooseList" + (rowNum - 1)).attr("dataId", item.id); $("#dsFormChooseList" + (rowNum - 1)).attr("dataId", item.id);
$("#pageName" + (rowNum - 1)).html(item.pageName); $("#name" + (rowNum - 1)).html(item.name);
}) })
} else { } else {
addRow(); addRow();
...@@ -75,7 +75,7 @@ layui.config({ ...@@ -75,7 +75,7 @@ layui.config({
id: "row" + rowNum.toString(), //checkbox的id id: "row" + rowNum.toString(), //checkbox的id
trId: "tr" + rowNum.toString(), //行的id trId: "tr" + rowNum.toString(), //行的id
dsFormChooseList: "dsFormChooseList" + rowNum.toString(), // 动态表单选择id dsFormChooseList: "dsFormChooseList" + rowNum.toString(), // 动态表单选择id
pageName: "pageName" + rowNum.toString() // 动态表单页面名称id name: "name" + rowNum.toString() // 动态表单页面名称id
}; };
$("#useTable").append(getDataUseHandlebars(usetableTemplate, par)); $("#useTable").append(getDataUseHandlebars(usetableTemplate, par));
form.render('checkbox'); form.render('checkbox');
...@@ -86,9 +86,9 @@ layui.config({ ...@@ -86,9 +86,9 @@ layui.config({
$("body").on("click", "#" + btnId, function (e) { $("body").on("click", "#" + btnId, function (e) {
dsFormUtil.chooseType = false; // 单选 dsFormUtil.chooseType = false; // 单选
dsFormUtil.openDsFormPageChoosePage(function (){ dsFormUtil.openDsFormPageChoosePage(function (){
$("#" + par.dsFormChooseList).val(dsFormUtil.dsFormChooseMation.pageNum); $("#" + par.dsFormChooseList).val(dsFormUtil.dsFormChooseMation.numCode);
$("#" + par.dsFormChooseList).attr("dataId", dsFormUtil.dsFormChooseMation.id); $("#" + par.dsFormChooseList).attr("dataId", dsFormUtil.dsFormChooseMation.id);
$("#" + par.pageName).html(dsFormUtil.dsFormChooseMation.pageName); $("#" + par.name).html(dsFormUtil.dsFormChooseMation.name);
}); });
}); });
} }
......
...@@ -35,16 +35,17 @@ layui.config({ ...@@ -35,16 +35,17 @@ layui.config({
if(typeof item.aData == 'string'){ if(typeof item.aData == 'string'){
obj = JSON.parse(item.aData); obj = JSON.parse(item.aData);
} }
item.context = getDataUseHandlebars(item.templateContent, obj); item.context = getDataUseHandlebars(item.dsFormComponent.templateContent, obj);
} else if (item.associatedDataTypes == 2){//接口 } else if (item.associatedDataTypes == 2){//接口
AjaxPostUtil.request({url: flowableBasePath + "dsformpage011", params: {interfa: item.aData}, type: 'json', callback: function(j){ AjaxPostUtil.request({url: flowableBasePath + "dsformpage011", params: {interfa: item.aData}, type: 'json', callback: function(j){
var obj = JSON.parse(j.bean.aData); var obj = JSON.parse(j.bean.aData);
item.context = getDataUseHandlebars(item.templateContent, obj); item.context = getDataUseHandlebars(item.dsFormComponent.templateContent, obj);
}, async: false}); }, async: false});
} }
item.value = item.defaultValue;
var jsonStr = {bean: item}; var jsonStr = {bean: item};
var html = getDataUseHandlebars('{{#bean}}' + item.htmlContent + '{{/bean}}', jsonStr); var html = getDataUseHandlebars('{{#bean}}' + item.dsFormComponent.htmlContent + '{{/bean}}', jsonStr);
var html_js = getDataUseHandlebars('{{#bean}}' + item.jsContent + '{{/bean}}', jsonStr); var html_js = getDataUseHandlebars('{{#bean}}' + item.dsFormComponent.jsContent + '{{/bean}}', jsonStr);
var jsCon = '<script>layui.define(["jquery"], function(exports) {var jQuery = layui.jquery;(function($) {' + html_js + '})(jQuery);});</script>'; var jsCon = '<script>layui.define(["jquery"], function(exports) {var jQuery = layui.jquery;(function($) {' + html_js + '})(jQuery);});</script>';
$(html).appendTo($("#showForm").get(0)).attr("rowid", item.id); $(html).appendTo($("#showForm").get(0)).attr("rowid", item.id);
$("#showForm").append(jsCon); $("#showForm").append(jsCon);
...@@ -54,12 +55,7 @@ layui.config({ ...@@ -54,12 +55,7 @@ layui.config({
function loadPageMation(json){ function loadPageMation(json){
$.each(json.rows, function(i, item) { $.each(json.rows, function(i, item) {
if(parseInt(item.state) == 1){ loadNewControl(item);
// 加载非删除状态的数据
loadNewControl(item);
} else {
jsonArray.push(item);
}
}); });
loadFormItemDrop(); loadFormItemDrop();
matchingLanguage(); matchingLanguage();
...@@ -96,11 +92,11 @@ layui.config({ ...@@ -96,11 +92,11 @@ layui.config({
$.each(json.bean, function (key, value) { $.each(json.bean, function (key, value) {
$.each(value, function (j, bean) { $.each(value, function (j, bean) {
bean.logo = systemCommonUtil.initIconShow(bean); bean.logo = systemCommonUtil.initIconShow(bean);
formPageControl.push(bean);
}); });
}); });
}, },
ajaxSendAfter:function (json) { ajaxSendAfter:function (json) {
formPageControl = [].concat(json.rows);
form.render(); form.render();
} }
}); });
...@@ -110,12 +106,8 @@ layui.config({ ...@@ -110,12 +106,8 @@ layui.config({
$(".draggable").draggable({ $(".draggable").draggable({
appendTo: "body", appendTo: "body",
helper: "clone", helper: "clone",
drag: function (event, ui) { drag: function (event, ui) {},
stop: function () {}
},
stop: function () {
}
}); });
$(".droppable").droppable({ $(".droppable").droppable({
accept: ".draggable", accept: ".draggable",
...@@ -157,16 +149,14 @@ layui.config({ ...@@ -157,16 +149,14 @@ layui.config({
}); });
var params = { var params = {
pageId: rowId, pageId: rowId,
defaultWidth: 'layui-col-xs12', width: 'layui-col-xs12',
title: '标题', title: '标题',
linkedData: linkedData, linkedData: linkedData,
require: '', require: '',
placeholder: '', placeholder: '',
defaultValue: '', defaultValue: '',
formContentId: id, formContentId: id,
editableNodeId: '', attrKey: ''
editableNodeName: '',
keyId: ''
}; };
if(linkedData == 1){ if(linkedData == 1){
...@@ -183,28 +173,15 @@ layui.config({ ...@@ -183,28 +173,15 @@ layui.config({
params.associatedDataTypes = ""; params.associatedDataTypes = "";
params.aData = ""; params.aData = "";
} }
params = getDataScript(params);
// 保存控件 // 保存控件
reqSaveData(params, templateContent); reqSaveData(params, templateContent);
} }
// 获取该控件的脚本信息
function getDataScript(params){
AjaxPostUtil.request({url: flowableBasePath + "queryDsFormContentMationById", params: {id: params.formContentId}, type: 'json', method: 'GET', callback: function (json) {
params.htmlContent = encodeURIComponent(json.bean.htmlContent);
params.jsContent = encodeURIComponent(json.bean.jsContent);
}, async: false});
return params;
}
// 保存“新增控件” // 保存“新增控件”
function reqSaveData(params, templateContent){ function reqSaveData(params, templateContent){
AjaxPostUtil.request({url: flowableBasePath + "dsformpage003", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "dsformpage003", params: params, type: 'json', callback: function (json) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
var templateJson = json.bean; loadNewControl(json.bean);
templateJson.biaoJi = "1";
templateJson.templateContent = templateContent;
loadNewControl(templateJson);
loadFormItemDrop(); loadFormItemDrop();
}, async: false}); }, async: false});
} }
...@@ -230,14 +207,14 @@ layui.config({ ...@@ -230,14 +207,14 @@ layui.config({
obj = JSON.stringify(item.aData); obj = JSON.stringify(item.aData);
} }
// json串 // json串
$("#JsonData").val(obj); $("#jsonData").val(obj);
} else if (associatedDataTypes == "2") { } else if (associatedDataTypes == "2") {
// 接口 // 接口
$("#nterfac").val(item.aData); $("#interfa").val(item.aData);
} }
$("input:radio[name=associatedDataTypes][value=" + associatedDataTypes + "]").attr("checked", true); $("input:radio[name=associatedDataTypes][value=" + associatedDataTypes + "]").attr("checked", true);
} }
$("#defaultWidth").val(item.defaultWidth); $("#width").val(item.width);
form.render(); form.render();
form.on('submit(formAddBean)', function (data) { form.on('submit(formAddBean)', function (data) {
if (winui.verifyForm(data.elem)) { if (winui.verifyForm(data.elem)) {
...@@ -251,16 +228,11 @@ layui.config({ ...@@ -251,16 +228,11 @@ layui.config({
form.on('select(require)',function(data) { form.on('select(require)',function(data) {
arr = data.value; arr = data.value;
}); });
if (!isNull(item.require)) {
arr = item.require.split(",");
}
// 可编辑节点Id
$('#editableNodeId').tagEditor({
placeholder: '请输入可编辑节点Id'
});
// 可编辑节点名称
$('#editableNodeName').tagEditor({
placeholder: '请输入可编辑节点名称'
});
initRequire(item); initRequire(item);
matchingLanguage(); matchingLanguage();
return; return;
...@@ -274,7 +246,7 @@ layui.config({ ...@@ -274,7 +246,7 @@ layui.config({
$("#showForm div[rowid='" + rowid + "']").remove(); $("#showForm div[rowid='" + rowid + "']").remove();
$.each(jsonArray, function(i, item) { $.each(jsonArray, function(i, item) {
if(item.id === rowid){ if(item.id === rowid){
jsonArray[i].state = 0; jsonArray[i].deleteFlag = 1;
} }
}); });
$("#btnBoxDesignForm").empty(); $("#btnBoxDesignForm").empty();
...@@ -291,14 +263,12 @@ layui.config({ ...@@ -291,14 +263,12 @@ layui.config({
return; return;
} }
var newParams = jsonArray[inDataIndex]; var newParams = jsonArray[inDataIndex];
newParams.labelContent = $("#title").val(); newParams.title = $("#title").val();
newParams.placeholder = $("#placeholder").val(); newParams.placeholder = $("#placeholder").val();
newParams.require = arr.join(","); newParams.require = arr.join(",");
newParams.value = $("#defaultValue").val(); newParams.defaultValue = $("#defaultValue").val();
newParams.defaultWidth = $("#defaultWidth").val(); newParams.width = $("#width").val();
newParams.keyId = $("#keyId").val(); newParams.attrKey = $("#attrKey").val();
newParams.editableNodeId = data.field.editableNodeId;
newParams.editableNodeName = data.field.editableNodeName;
var linkedData; //控件关联的数据 var linkedData; //控件关联的数据
var defaultData; //选择事件的默认数据 var defaultData; //选择事件的默认数据
var tplContentVal; //数据展示模板的内容的值 var tplContentVal; //数据展示模板的内容的值
...@@ -320,7 +290,7 @@ layui.config({ ...@@ -320,7 +290,7 @@ layui.config({
if (newParams.linkedData == 1) { if (newParams.linkedData == 1) {
newParams.associatedDataTypes = data.field.associatedDataTypes; newParams.associatedDataTypes = data.field.associatedDataTypes;
if (newParams.associatedDataTypes == 1) { if (newParams.associatedDataTypes == 1) {
var defaultDataStr = $("#JsonData").val(); var defaultDataStr = $("#jsonData").val();
if (isNull(defaultDataStr)) { if (isNull(defaultDataStr)) {
winui.window.msg("请填写Json串!", {icon: 2, time: 2000}); winui.window.msg("请填写Json串!", {icon: 2, time: 2000});
return false; return false;
...@@ -339,7 +309,7 @@ layui.config({ ...@@ -339,7 +309,7 @@ layui.config({
} }
} }
} else if (newParams.associatedDataTypes == 2) { } else if (newParams.associatedDataTypes == 2) {
var interfa = $("#nterfac").val(); var interfa = $("#interfa").val();
if (interfa.length == 0) { if (interfa.length == 0) {
winui.window.msg("请填写接口!", {icon: 2, time: 2000}); winui.window.msg("请填写接口!", {icon: 2, time: 2000});
return false; return false;
...@@ -368,18 +338,16 @@ layui.config({ ...@@ -368,18 +338,16 @@ layui.config({
// 对控件进行排序 // 对控件进行排序
sortNodeData(); sortNodeData();
$("#showForm").empty(); $("#showForm").empty();
jsonArray.sort(getSortFun('asc','orderBy')); jsonArray.sort(getSortFun('asc', 'orderBy'));
var newJson = [].concat(jsonArray); var newJson = [].concat(jsonArray);
jsonArray = []; jsonArray = [];
loadPageMation({rows: newJson}); loadPageMation({rows: newJson});
} }
function sortNodeData(){ function sortNodeData() {
$.each(jsonArray, function(i, item) { $.each(jsonArray, function(i, item) {
if(parseInt(item.state) == 1){ var inIndex = $("#showForm div[rowid='" + item.id + "']").index();
var inIndex = $("#showForm div[rowid='" + item.id + "']").index(); jsonArray[i].orderBy = inIndex;
jsonArray[i].orderBy = inIndex / 2 + 1;
}
}); });
} }
...@@ -407,14 +375,10 @@ layui.config({ ...@@ -407,14 +375,10 @@ layui.config({
form.render(); form.render();
} }
$("body").on("keyup", ".keyIdName", function() { // 保存
$(this).val($(this).val().replace(/[^\w\.\/]/ig,''));
});
//保存
$("body").on("click", "#save", function() { $("body").on("click", "#save", function() {
sortDataIn(); sortDataIn();
if(jsonArray.length == 0){ if (jsonArray.length == 0) {
winui.window.msg('保存页面不能为空!', {icon: 2, time: 2000}); winui.window.msg('保存页面不能为空!', {icon: 2, time: 2000});
return; return;
} }
......
...@@ -47,9 +47,9 @@ layui.config({ ...@@ -47,9 +47,9 @@ layui.config({
limit: getLimit(), limit: getLimit(),
cols: [[ cols: [[
{ type: parent.dsFormUtil.chooseType ? 'checkbox' : 'radio', fixed: 'left'}, { type: parent.dsFormUtil.chooseType ? 'checkbox' : 'radio', fixed: 'left'},
{ field: 'pageName', title: '页面名称', align: 'left', width: 120 }, { field: 'name', title: '名称', align: 'left', width: 120 },
{ field: 'pageDesc', title: '页面简介', align: 'left', width: 350 }, { field: 'remark', title: '简介', align: 'left', width: 350 },
{ field: 'pageNum', title: '页面编号', align: 'center', width: 150 }, { field: 'numCode', title: '页面编号', align: 'center', width: 150 },
]], ]],
done: function(res, curr, count){ done: function(res, curr, count){
matchingLanguage(); matchingLanguage();
...@@ -85,6 +85,10 @@ layui.config({ ...@@ -85,6 +85,10 @@ layui.config({
form.render(); form.render();
}); });
} }
initTableSearchUtil.initAdvancedSearch(this, res.searchFilter, form, "请输入名称", function () {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
});
} }
}); });
...@@ -108,21 +112,16 @@ layui.config({ ...@@ -108,21 +112,16 @@ layui.config({
}); });
form.render(); form.render();
form.on('submit(formSearch)', function (data) {
if (winui.verifyForm(data.elem)) {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
}
return false;
});
$("body").on("click", "#reloadTable", function() { $("body").on("click", "#reloadTable", function() {
loadTable();
});
function loadTable() {
table.reloadData("messageTable", {where: getTableParams()}); table.reloadData("messageTable", {where: getTableParams()});
}); }
function getTableParams() { function getTableParams() {
return { return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable"));
pageName: $("#pageName").val()
};
} }
exports('dsFormPageListChoose', {}); exports('dsFormPageListChoose', {});
......
...@@ -15,10 +15,10 @@ layui.config({ ...@@ -15,10 +15,10 @@ layui.config({
form.on('submit(formAddBean)', function (data) { form.on('submit(formAddBean)', function (data) {
if (winui.verifyForm(data.elem)) { if (winui.verifyForm(data.elem)) {
var params = { var params = {
pageName: $("#pageName").val(), name: $("#name").val(),
pageDesc: $("#pageDesc").val() remark: $("#remark").val()
}; };
AjaxPostUtil.request({url: flowableBasePath + "dsformpage002", params: params, type: 'json', method: "POST", callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "writeDsFormPage", params: params, type: 'json', method: "POST", callback: function (json) {
parent.layer.close(index); parent.layer.close(index);
parent.refreshCode = '0'; parent.refreshCode = '0';
}}); }});
......
...@@ -13,7 +13,7 @@ layui.config({ ...@@ -13,7 +13,7 @@ layui.config({
showGrid({ showGrid({
id: "showForm", id: "showForm",
url: flowableBasePath + "dsformpage006", url: flowableBasePath + "dsformpage006",
params: {rowId:parent.rowId}, params: {id: parent.rowId},
pagination: false, pagination: false,
method: "GET", method: "GET",
template: $("#showTemplate").html(), template: $("#showTemplate").html(),
...@@ -24,11 +24,11 @@ layui.config({ ...@@ -24,11 +24,11 @@ layui.config({
form.on('submit(formEditBean)', function (data) { form.on('submit(formEditBean)', function (data) {
if (winui.verifyForm(data.elem)) { if (winui.verifyForm(data.elem)) {
var params = { var params = {
rowId: parent.rowId, id: parent.rowId,
pageName: $("#pageName").val(), name: $("#name").val(),
pageDesc: $("#pageDesc").val() remark: $("#remark").val()
}; };
AjaxPostUtil.request({url: flowableBasePath + "dsformpage007", params: params, type: 'json', method: "PUT", callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "writeDsFormPage", params: params, type: 'json', method: "POST", callback: function (json) {
parent.layer.close(index); parent.layer.close(index);
parent.refreshCode = '0'; parent.refreshCode = '0';
}}); }});
......
...@@ -25,13 +25,16 @@ layui.config({ ...@@ -25,13 +25,16 @@ layui.config({
limit: getLimit(), limit: getLimit(),
cols: [[ cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'pageName', title: '页面名称', align: 'left', width: 120 }, { field: 'name', title: '名称', align: 'left', width: 120 },
{ field: 'pageDesc', title: '页面简介', align: 'left', width: 350 }, { field: 'remark', title: '简介', align: 'left', width: 350 },
{ field: 'pageNum', title: '页面编号', align: 'center', width: 150 }, { field: 'numCode', title: '编号', align: 'center', width: 150 },
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 200, toolbar: '#tableBar'} { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 200, toolbar: '#tableBar'}
]], ]],
done: function(json) { done: function(json) {
matchingLanguage(); matchingLanguage();
initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入名称", function () {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
});
} }
}); });
...@@ -60,7 +63,7 @@ layui.config({ ...@@ -60,7 +63,7 @@ layui.config({
}}); }});
}); });
// 表单控件 // 表单设计
function control(data) { function control(data) {
rowId = data.id; rowId = data.id;
_openNewWindows({ _openNewWindows({
...@@ -76,7 +79,7 @@ layui.config({ ...@@ -76,7 +79,7 @@ layui.config({
function delet(data) { function delet(data) {
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) { layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "dsformpage005", params: {rowId: data.id}, type: 'json', method: "DELETE", callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "deleteDsFormPage", params: {id: data.id}, type: 'json', method: "DELETE", callback: function (json) {
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
loadTable(); loadTable();
}}); }});
...@@ -98,26 +101,16 @@ layui.config({ ...@@ -98,26 +101,16 @@ layui.config({
} }
form.render(); form.render();
form.on('submit(formSearch)', function (data) { $("body").on("click", "#reloadTable", function() {
if (winui.verifyForm(data.elem)) { loadTable();
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
}
return false;
}); });
// 刷新数据 function loadTable() {
$("body").on("click", "#reloadTable", function() { table.reloadData("messageTable", {where: getTableParams()});
loadTable(); }
});
function loadTable() {
table.reloadData("messageTable", {where: getTableParams()});
}
function getTableParams() { function getTableParams() {
return { return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable"));
pageName: $("#pageName").val()
};
} }
exports('pageList', {}); exports('pageList', {});
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<div class="layui-form-item layui-col-xs12"> <div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">名称<i class="red">*</i></label> <label class="layui-form-label">名称<i class="red">*</i></label>
<div class="layui-input-block"> <div class="layui-input-block">
<input type="text" id="title" name="title" win-verify="required" placeholder="请输入控件名称" class="layui-input" maxlength="18" value="{{labelContent}}"/> <input type="text" id="title" name="title" win-verify="required" placeholder="请输入控件名称" class="layui-input" maxlength="18" value="{{title}}"/>
</div> </div>
</div> </div>
<div id="isAssociated" class="layui-hide"> <div id="isAssociated" class="layui-hide">
...@@ -66,13 +66,13 @@ ...@@ -66,13 +66,13 @@
<div class="layui-form-item layui-col-xs12 TypeIsOne"> <div class="layui-form-item layui-col-xs12 TypeIsOne">
<label class="layui-form-label">Json串<i class="red">*</i></label> <label class="layui-form-label">Json串<i class="red">*</i></label>
<div class="layui-input-block"> <div class="layui-input-block">
<textarea id="JsonData" name="JsonData" class="layui-textarea"></textarea> <textarea id="jsonData" name="jsonData" class="layui-textarea"></textarea>
</div> </div>
</div> </div>
<div class="layui-form-item layui-col-xs12 TypeIsTwo layui-hide"> <div class="layui-form-item layui-col-xs12 TypeIsTwo layui-hide">
<label class="layui-form-label">接口<i class="red">*</i></label> <label class="layui-form-label">接口<i class="red">*</i></label>
<div class="layui-input-block"> <div class="layui-input-block">
<input type="text" id="nterfac" name="nterfac" class="layui-input" placeholder="例如:http://localhost:8081/queryDsFormComponentMationToShow"/> <input type="text" id="interfa" name="interfa" class="layui-input" placeholder="例如:http://localhost:8081/queryDsFormComponentMationToShow"/>
</div> </div>
</div> </div>
</div> </div>
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
<div class="layui-form-item layui-col-xs12"> <div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">宽度<i class="red">*</i></label> <label class="layui-form-label">宽度<i class="red">*</i></label>
<div class="layui-input-block"> <div class="layui-input-block">
<select lay-filter="defaultWidth" lay-search="" id="defaultWidth" name="defaultWidth"> <select lay-filter="width" lay-search="" id="width" name="width">
<option value="layui-col-xs9">3/4</option> <option value="layui-col-xs9">3/4</option>
<option value="layui-col-xs4">1/3</option> <option value="layui-col-xs4">1/3</option>
<option value="layui-col-xs6">1/2</option> <option value="layui-col-xs6">1/2</option>
...@@ -108,21 +108,9 @@ ...@@ -108,21 +108,9 @@
</div> </div>
</div> </div>
<div class="layui-form-item layui-col-xs12"> <div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">控件Id</label> <label class="layui-form-label">属性</label>
<div class="layui-input-block"> <div class="layui-input-block">
<input type="text" id="keyId" name="keyId" placeholder="只接受英文、数字" onkeyup="value=value.replace(/[^\w\.\/]/ig,'')" class="layui-input" maxlength="30" value="{{keyId}}"/> <input type="text" id="attrKey" name="attrKey" placeholder="只接受英文、数字" onkeyup="value=value.replace(/[^\w\.\/]/ig,'')" class="layui-input" maxlength="30" value="{{attrKey}}"/>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">可编辑节点Id</label>
<div class="layui-input-block">
<input type="text" id="editableNodeId" name="editableNodeId" placeholder="可编辑节点Id" class="layui-input" value="{{editableNodeId}}" />
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">可编辑节点名称</label>
<div class="layui-input-block">
<input type="text" id="editableNodeName" name="editableNodeName" placeholder="可编辑节点名称" class="layui-input" value="{{editableNodeName}}" />
</div> </div>
</div> </div>
<div class="layui-form-item layui-col-xs12"> <div class="layui-form-item layui-col-xs12">
......
...@@ -7,34 +7,15 @@ ...@@ -7,34 +7,15 @@
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" /> <link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head> </head>
<body> <body>
<div class="txtcenter" style="margin:0 auto;padding-top: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="pageName" name="pageName" 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-toolbar">
<div class="winui-tool"> <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="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 class="layui-btn layui-btn-sm layui-btn-normal" type="button" id="saveCheckBox" style="float: right;"> <button class="layui-btn layui-btn-sm layui-btn-normal search-table-btn-right" type="button" id="saveCheckBox"><i class="fa fa-save" aria-hidden="true" style="margin-right: 5px"></i><language showName="com.skyeye.save"></language></button>
<i class="fa fa-save" aria-hidden="true" style="margin-right: 5px"></i>
<language showName="com.skyeye.save"></language>
</button>
</div> </div>
</div> </div>
<div style="margin:auto 10px;"> <div style="margin: auto 10px;">
<div style="margin:auto 10px;"> <table id="messageTable" lay-filter="messageTable"></table>
<table id="messageTable" lay-filter="messageTable"></table> </div>
</div>
</div>
<script src="../../assets/lib/layui/layui.js"></script> <script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script> <script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript"> <script type="text/javascript">
......
...@@ -13,15 +13,15 @@ ...@@ -13,15 +13,15 @@
<span class="hr-title">基本信息</span><hr> <span class="hr-title">基本信息</span><hr>
</div> </div>
<div class="layui-form-item layui-col-xs12"> <div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">页面名称<i class="red">*</i></label> <label class="layui-form-label">名称<i class="red">*</i></label>
<div class="layui-input-block"> <div class="layui-input-block">
<input type="text" id="pageName" name="pageName" win-verify="required" placeholder="请输入页面名称" class="layui-input"/> <input type="text" id="name" name="name" win-verify="required" placeholder="请输入名称" class="layui-input"/>
</div> </div>
</div> </div>
<div class="layui-form-item layui-col-xs12"> <div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">页面简介</label> <label class="layui-form-label">简介</label>
<div class="layui-input-block"> <div class="layui-input-block">
<textarea id="pageDesc" name="pageDesc" placeholder="请输入页面简介" class="layui-textarea"></textarea> <textarea id="remark" name="remark" placeholder="请输入简介" class="layui-textarea"></textarea>
</div> </div>
</div> </div>
<div class="layui-form-item layui-col-xs12"> <div class="layui-form-item layui-col-xs12">
......
...@@ -19,15 +19,15 @@ ...@@ -19,15 +19,15 @@
<span class="hr-title">基本信息</span><hr> <span class="hr-title">基本信息</span><hr>
</div> </div>
<div class="layui-form-item layui-col-xs12"> <div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">页面名称<i class="red">*</i></label> <label class="layui-form-label">名称<i class="red">*</i></label>
<div class="layui-input-block"> <div class="layui-input-block">
<input type="text" id="pageName" name="pageName" win-verify="required" placeholder="请输入页面名称" class="layui-input" value="{{pageName}}"/> <input type="text" id="name" name="name" win-verify="required" placeholder="请输入名称" class="layui-input" value="{{name}}"/>
</div> </div>
</div> </div>
<div class="layui-form-item layui-col-xs12"> <div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">页面简介</label> <label class="layui-form-label">页面简介</label>
<div class="layui-input-block"> <div class="layui-input-block">
<textarea id="pageDesc" name="pageDesc" placeholder="请输入页面简介" class="layui-textarea">{{pageDesc}}</textarea> <textarea id="remark" name="remark" placeholder="请输入页面简介" class="layui-textarea">{{remark}}</textarea>
</div> </div>
</div> </div>
<div class="layui-form-item layui-col-xs12"> <div class="layui-form-item layui-col-xs12">
......
...@@ -7,24 +7,10 @@ ...@@ -7,24 +7,10 @@
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" /> <link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head> </head>
<body> <body>
<div class="txtcenter" style="margin:0 auto;padding-top: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="pageName" name="pageName" 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-toolbar">
<div class="winui-tool"> <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="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" auth="1567731484858"><i class="fa fa-plus" aria-hidden="true"></i><language showName="com.skyeye.addBtn"></language></button> <button id="addBean" class="winui-toolbtn search-table-btn-right" auth="1567731484858"><i class="fa fa-plus" aria-hidden="true"></i><language showName="com.skyeye.addBtn"></language></button>
</div> </div>
</div> </div>
<div style="margin:auto 10px;"> <div style="margin:auto 10px;">
...@@ -36,7 +22,7 @@ ...@@ -36,7 +22,7 @@
{{# if(auth('1567731612592')){ }} {{# if(auth('1567731612592')){ }}
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="delet"><language showName="com.skyeye.deleteBtn"></language></a> <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="delet"><language showName="com.skyeye.deleteBtn"></language></a>
{{# } }} {{# } }}
{{# if(auth('1567731583583')){ }} {{# if(auth('1567731484858')){ }}
<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a> <a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a>
{{# } }} {{# } }}
</script> </script>
......
...@@ -118,7 +118,6 @@ layui.config({ ...@@ -118,7 +118,6 @@ layui.config({
} }
form.render(); form.render();
// 刷新数据
$("body").on("click", "#reloadTable", function() { $("body").on("click", "#reloadTable", function() {
loadTable(); loadTable();
}); });
......
...@@ -8,7 +8,7 @@ var dsFormUtil = { ...@@ -8,7 +8,7 @@ var dsFormUtil = {
dsFormDataKey: "initData", dsFormDataKey: "initData",
dsFormBtnTemplate: '<button type="button" class="layui-btn layui-btn-primary layui-btn-xs" id="{{btnId}}">表单选择</button>', dsFormBtnTemplate: '<button type="button" class="layui-btn layui-btn-primary layui-btn-xs" id="{{btnId}}">表单选择</button>',
customDsFormBox: '<div class="layui-form-item layui-col-xs12"><span class="hr-title">{{pageName}}</span><hr></div><div id="{{id}}" class="ds-form-page layui-col-xs12"></div>', customDsFormBox: '<div class="layui-form-item layui-col-xs12"><span class="hr-title">{{dsFormPage.name}}</span><hr></div><div id="{{dsFormPage.id}}" class="ds-form-page layui-col-xs12"></div>',
// 必须包含的包 // 必须包含的包
mastHaveImport: ['laydate', 'layedit', 'colorpicker', 'slider', 'fileUpload', 'codemirror', 'xml', 'clike', 'css', 'htmlmixed', 'javascript', 'nginx', 'solr', 'sql', 'vue', mastHaveImport: ['laydate', 'layedit', 'colorpicker', 'slider', 'fileUpload', 'codemirror', 'xml', 'clike', 'css', 'htmlmixed', 'javascript', 'nginx', 'solr', 'sql', 'vue',
'matchbrackets', 'closebrackets', 'showHint', 'anywordHint', 'lint', 'jsonLint', 'foldcode', 'foldgutter', 'braceFold', 'commentFold', 'form'], 'matchbrackets', 'closebrackets', 'showHint', 'anywordHint', 'lint', 'jsonLint', 'foldcode', 'foldgutter', 'braceFold', 'commentFold', 'form'],
...@@ -41,7 +41,7 @@ var dsFormUtil = { ...@@ -41,7 +41,7 @@ var dsFormUtil = {
}, },
/** /**
* 初始化表单选择按钮信息 * 初始化表单选择按钮信息 todo 目前没有用到
* *
* @param id dom对象的id * @param id dom对象的id
*/ */
...@@ -86,7 +86,7 @@ var dsFormUtil = { ...@@ -86,7 +86,7 @@ var dsFormUtil = {
}, },
/** /**
* 加载动态表单到页面 * 加载动态表单(新增操作)
* *
* @param showBoxId 要追加的boxid后面 * @param showBoxId 要追加的boxid后面
* @param code 动态表单-----业务逻辑表单关联表中的code * @param code 动态表单-----业务逻辑表单关联表中的code
...@@ -103,7 +103,7 @@ var dsFormUtil = { ...@@ -103,7 +103,7 @@ var dsFormUtil = {
loadDsFormItem: function(showBoxId, json) { loadDsFormItem: function(showBoxId, json) {
$.each(json.rows, function(j, bean){ $.each(json.rows, function(j, bean){
var customBoxId = bean.id; var customBoxId = bean.dsFormPage.id;
$("#" + showBoxId).append(getDataUseHandlebars(dsFormUtil.customDsFormBox, bean)); $("#" + showBoxId).append(getDataUseHandlebars(dsFormUtil.customDsFormBox, bean));
dsFormUtil.loadDsFormItemToEdit(customBoxId, bean.content); dsFormUtil.loadDsFormItemToEdit(customBoxId, bean.content);
}); });
...@@ -264,7 +264,7 @@ var dsFormUtil = { ...@@ -264,7 +264,7 @@ var dsFormUtil = {
}, },
/** /**
* 加载动态表单详情到页面 * 加载动态表单详情
* *
* @param showBoxId要追加的boxid后面 * @param showBoxId要追加的boxid后面
* @param objectId 绑定的objectId * @param objectId 绑定的objectId
...@@ -272,7 +272,7 @@ var dsFormUtil = { ...@@ -272,7 +272,7 @@ var dsFormUtil = {
loadPageShowDetailsByObjectId: function(showBoxId, objectId) { loadPageShowDetailsByObjectId: function(showBoxId, objectId) {
AjaxPostUtil.request({url: flowableBasePath + "dsformpage015", params: {objectId: objectId}, method: "GET", type: 'json', callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "dsformpage015", params: {objectId: objectId}, method: "GET", type: 'json', callback: function(json) {
$.each(json.rows, function(j, bean) { $.each(json.rows, function(j, bean) {
var customBoxId = bean.id; var customBoxId = bean.dsFormPage.id;
$("#" + showBoxId).append(getDataUseHandlebars(dsFormUtil.customDsFormBox, bean)); $("#" + showBoxId).append(getDataUseHandlebars(dsFormUtil.customDsFormBox, bean));
dsFormUtil.initSequenceDataDetails(customBoxId, bean.content); dsFormUtil.initSequenceDataDetails(customBoxId, bean.content);
}); });
...@@ -336,7 +336,7 @@ var dsFormUtil = { ...@@ -336,7 +336,7 @@ var dsFormUtil = {
}, },
/** /**
* 加载动态表单详情到编辑 * 加载动态表单(编辑操作)
* *
* @param showBoxId要追加的boxid后面 * @param showBoxId要追加的boxid后面
* @param objectId 绑定的objectId * @param objectId 绑定的objectId
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册