layui.config({ base: basePath, version: skyeyeVersion }).extend({ window: 'js/winui.window' }).define(['window', 'table', 'jquery', 'winui', 'form', 'flow'], function (exports) { winui.renderColor(); var $ = layui.$, form = layui.form, table = layui.table, flow = layui.flow; //流程详情 var processInstanceId = parent.processInstanceId; var taskType = parent.taskType; $("#activitiTitle").html(taskType); //时间线审批历史列表模板 var timeTreeApprovalHistory = $("#timeTreeApprovalHistory").html(); var textTemplate = $("#textTemplate").html(),//文本展示 enclosureTemplate = $("#enclosureTemplate").html(),//附件展示 eichTextTemplate = $("#eichTextTemplate").html(),//富文本展示 picTemplate = $("#picTemplate").html(),//图片展示 tableTemplate = $("#tableTemplate").html(),//表格展示 voucherTemplate = $("#voucherTemplate").html();//凭证展示 AjaxPostUtil.request({url: flowableBasePath + "queryBusinessData", params: {processInstanceId: processInstanceId}, type: 'json', method: 'POST', callback: function(json) { console.log(json); dsFormUtil.initSequenceDataDetails('showForm', json.rows); var jsonStr = "";//实体json对象 var str = ""; $.each(j.rows, function(i, item) { //如果展示文本不为空,则展示展示文本 if (!isNull(item.text)) item.value = item.text; jsonStr = { bean: item }; if(item.showType == 1){//文本展示 str = getDataUseHandlebars(textTemplate, jsonStr); } else if (item.showType == 2){//附件展示 str = getDataUseHandlebars(enclosureTemplate, jsonStr); } else if (item.showType == 3){//富文本展示 str = getDataUseHandlebars(eichTextTemplate, jsonStr); } else if (item.showType == 4){//图片展示 var photoValue = []; if (!isNull(jsonStr.bean.value)){ photoValue = item.value.split(","); } var rows = []; $.each(photoValue, function(j, row){ rows.push({photoValue: row}); }); jsonStr.bean.photo = rows; str = getDataUseHandlebars(picTemplate, jsonStr); } else if (item.showType == 5){//表格展示 str = getDataUseHandlebars(tableTemplate, jsonStr); var tableId = "messageTable" + item.orderBy;//表格id var tableBoxId = "showTable" + item.orderBy;//表格外部div盒子id $("#showForm").append(str); $("#" + tableBoxId).html('