From 2af24dff4647357576f60da678f8c019e2af2e56 Mon Sep 17 00:00:00 2001 From: "446052889@qq.com" <446052889@qq.com> Date: Thu, 7 Jul 2022 19:11:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BD=A2=E7=8A=B6=E5=B1=9E=E6=80=A7tab?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../page/pal.pl.repository.designer.htm | 60 ++++----- .../extend/js/designer.extend.link.js | 118 +++++++++--------- 2 files changed, 89 insertions(+), 89 deletions(-) diff --git a/com.actionsoft.apps.coe.pal/template/page/pal.pl.repository.designer.htm b/com.actionsoft.apps.coe.pal/template/page/pal.pl.repository.designer.htm index 9ddb828e..a9dc68d8 100755 --- a/com.actionsoft.apps.coe.pal/template/page/pal.pl.repository.designer.htm +++ b/com.actionsoft.apps.coe.pal/template/page/pal.pl.repository.designer.htm @@ -99,17 +99,17 @@ var type = "<#type>"; var chartId = "<#charId>"; var ruuid = "<#uuid>"; - var definition = <#define> ; + var definition =; <#define> ; var userId = "<#uid>"; var userName = "<#userName>"; var methodId = "<#methodId>"; - var isPalManage = <#isPalManage>; - var isExistCopy=<#isExistCopy>; - var isAppearCopy=<#isAppearCopy>; - var isAdmin = <#isAdmin>; + var isPalManage =; <#isPalManage>; + var isExistCopy=;<#isExistCopy>; + var isAppearCopy=;<#isAppearCopy>; + var isAdmin =; <#isAdmin>; var isCustomDefine = "<#isCustomDefine>"; - var isLaneAttrConfig = <#isLaneAttrConfig>; - var isLaneForceRefreshShapeAttr = <#isLaneForceRefreshShapeAttr>; + var isLaneAttrConfig =; <#isLaneAttrConfig>; + var isLaneForceRefreshShapeAttr =; <#isLaneForceRefreshShapeAttr>; //检查用户所需参数 var checkoutstate = "<#checkoutstate>"; var checkoutuser = "<#checkoutuser>"; @@ -171,13 +171,13 @@ var schemeId = "<#schemeId>"; var frmFileName = "<#processName>"; //平台的流程名称 var BPMInstanceName = "<#BPMInstanceName>"; // 节点名称 - var isView = <#isView>; //是否只读模式打开 - var isPublish = <#isPublish>; //是否是已发布流程(已发布流程不允许修改) - var isStop = <#isStop>; //是否是已停用流程(已停用流程不允许修改) - var isApproval = <#isApproval>;// 是否是审核中流程(审核中流程不允许修改) + var isView =; <#isView>; //是否只读模式打开 + var isPublish =; <#isPublish>; //是否是已发布流程(已发布流程不允许修改) + var isStop =; <#isStop>; //是否是已停用流程(已停用流程不允许修改) + var isApproval =; <#isApproval>;// 是否是审核中流程(审核中流程不允许修改) var isAutoSave = "<#isAutoSave>"; //是否允许实时保存 - var isMarked = <#isMarked>;// // PAL推送至BPMS,但BPMS端未分配 - var isCorrelateBpms = <#isCorrelateBpms>;// 是否与BPM有关系的流程 + var isMarked =; <#isMarked>;// // PAL推送至BPMS,但BPMS端未分配 + var isCorrelateBpms =; <#isCorrelateBpms>;// 是否与BPM有关系的流程 var perms = "<#perms>"; //该流程权限 var filePerms = "<#filePerms>"; //所有有权限的文件 //角色类型,owner-编辑,viewer-只读 @@ -191,16 +191,16 @@ var ext4 = "<#ext4>"; // 帮助工具栏扩展url - var customHelpToolExtMenuUrl = <#customHelpToolExtMenuUrl>; + var customHelpToolExtMenuUrl =; <#customHelpToolExtMenuUrl>; // 图形定义 - var methodObjectDesc = <#methodObjectDesc>; + var methodObjectDesc =; <#methodObjectDesc>; //是否需要保存提示 var isSave = true; var isNeedPutMessage = true; - var isCollaboration = <#isCollaborationSwitch> ? ((isView == true || isPublish == true) ? false : true) : false; //是否进行协作 - var sameNameCheck = <#sameNameCheck>; - var processOutput = <#processOutput>; + var isCollaboration =; <#isCollaborationSwitch> ? ((isView == true || isPublish == true) ? false : true) : false; //是否进行协作 + var sameNameCheck =; <#sameNameCheck>; + var processOutput =; <#processOutput>; var openAppType = "<#openAppType>"; //打开设计器的app类型, 暂时用于判断留言 var operateType = "<#operateType>"; @@ -216,10 +216,10 @@ var processDefVersionId = "<#processDefVersionId>"; var processVersion = "<#processVersion>"; var selectedElementId="<#selectedElementId>" - <#schema> + <#schema>; //图形之间的关系定义json数组 - var linkerRelationship = <#linkerRelationship> ; + var linkerRelationship =; <#linkerRelationship> ; var isParentShow = true; /* var relationObj = <#relationObj>; */ //visio 导入相关 @@ -233,12 +233,12 @@ var BPMNLevel0 = "<#BPMNLevel0>"; var BPMNLevel1 = "<#BPMNLevel1>"; var BPMNLevel2 = "<#BPMNLevel2>"; - var relationShapesObject = <#relationShapes>; - var relationShapeModelObject = <#relationShapeModels>; + var relationShapesObject =; <#relationShapes>; + var relationShapeModelObject =; <#relationShapeModels>; var moreShapeButton = "<#btnShapeStyle>"; - var installBatch = <#installBatch>; + var installBatch =; <#installBatch>; - var attrDefineObj = <#attrDefineObj>; + var attrDefineObj =; <#attrDefineObj>; @@ -314,7 +314,7 @@ liHtml += '
  • ' + children[j].name + '
  • '; } } - liHtml += '' + liHtml += ''; liHtml += ''; } else {// 只有第一层菜单 liHtml += '
  • ' + firstLevelObj.name + '
  • '; @@ -366,7 +366,7 @@ }); } //流程版本对比 - var verArray = <#verArray>; + var verArray =; <#verArray>; var verHtml = ""; for (var i = 0; i < verArray.length; i++) { var tmp = verArray[i]; @@ -1196,13 +1196,13 @@
    diff --git a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/extend/js/designer.extend.link.js b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/extend/js/designer.extend.link.js index 48394bdd..e5a1ec72 100755 --- a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/extend/js/designer.extend.link.js +++ b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/extend/js/designer.extend.link.js @@ -214,10 +214,10 @@ UI.showInsertLink = function() { } } if (!addr) { - addr = new Array(); + addr = []; } - var links_file = new Array(); - var links_custom = new Array(); + var links_file = []; + var links_custom = []; for (var i = 0; i < addr.length; i++) { var link = addr[i]; if (link.type == "file") { @@ -278,7 +278,7 @@ UI.showRiskDlg = function(){ url:"./w?sid=" + $("#sid").val() + "&cmd=com.actionsoft.apps.coe.pal.risk_pal_designer_risk", data:{"plId":ruuid, "taskId": shape.id, "taskNum": number} }); -} +}; //流程节点的风险控制不为空,重新渲染shape function renderShapeRisks(risk, control) { @@ -330,7 +330,7 @@ UI.showImportDlg = function() { {text:'取消',handler:function(){$("#visio_import_dlg").dialog("close");}} ] }); -} +}; //初始化visio导入的fileupload组件 function initVisioImportFileUpload() { $("#visio_import_upfile").upfile({ @@ -518,7 +518,7 @@ function openLinkUrlRewrite(type, url, target, uuid, obj, fileName, inspected) { cmd: "com.actionsoft.apps.coe.pal_pl_repository_designer_viewer_link_perm", uuids: uuid, filePerms: filePerms - } + }; if (window.opener) { params.modelType = "used"; } else if (openerAppId != undefined && openerAppId != "com.actionsoft.apps.coe.pal" && openerAppId != "") { @@ -667,7 +667,7 @@ UI.setLink = function() { for (var i = 0; i < shape.dataAttributes.length; i++) { var attr = shape.dataAttributes[i]; if (attr.linksArray) { - linkArr = new Array(); + linkArr = []; break; } } @@ -881,7 +881,7 @@ function openLink(obj) { + '" onclick="openLinkUrlRewrite(\'' + array_element.type + '\',\'' + array_element.url + '\',\'' + array_element.target + '\',\'' - + array_element.uuid + '\',\'' + + array_element.uuid + '\',\''; '\',\'' + array_element.name + '\')">' @@ -1006,7 +1006,7 @@ function deleteTheLinkNode(str, index) { function removeLinkHistoryByLink(obj) { var linkType = $("#link_dialog div.awsui-simple-tab").find("a.active").attr("tit"); window.top.$.mask(); - myshapeLink = Utils.getSelected()[0] + myshapeLink = Utils.getSelected()[0]; var options = { title : "提示", content : "确定删除所选链接吗?", @@ -1116,7 +1116,7 @@ function getLinkFileValue(treeNode) { // 数属性tab页面效果js -function selectAttrTabTag(showContent, selfObj) { +function selectAttrTabTag2(showContent, selfObj) { // 操作标签 var tag = $("#tabUlContainer li"); var taglength = tag.length; @@ -1261,7 +1261,7 @@ function showRelevanceShapesContent() { var obj = { id: shapesObj[i].fileId, processDefId: '' - } + }; onclick = 'window.opener.openDesginer({id:\'' + shapesObj[i].fileId + '\', processDefId:\'\'})'; }else if (parent.openLinkUrl){ if (shapesObj[i].url){ @@ -1342,7 +1342,7 @@ function attributeShowTabContent(currentShape) { } else { if (shape.text.length > 15) { var tempText = shape.text; - tempText = tempText.substring(0, 15) + tempText = tempText.substring(0, 15); $("span[name=attribute_desc_input]").text(shape.text).attr( "awsui-qtip", shape.text); } else { @@ -1361,7 +1361,7 @@ function attributeShowTabContent(currentShape) { } if (shape.text.length > 15) { var tempText = shape.text; - tempText = tempText.substring(0, 15) + tempText = tempText.substring(0, 15); $("span[name=attribute_desc_input]").text(shape.text).attr( "awsui-qtip", shape.text); } else { @@ -1374,7 +1374,7 @@ function attributeShowTabContent(currentShape) { $("#dock_view_header_title").html("数据属性"); } -var dialogTableList = [] +var dialogTableList = []; function getPrivateAttributeHtml(attributesJsonArray, tbodyId, shape) { // 属性排序 var defaultMoreAttr = $('#defaultMoreAttrSort').val(); @@ -1431,7 +1431,7 @@ function getPrivateAttributeHtml(attributesJsonArray, tbodyId, shape) { objReadonly = attr.readonly; objRequired = attr.readonly; } - var requiredSpan = '' + var requiredSpan = ''; if(obj.isRequired !== null && obj.isRequired) { requiredSpan = '*' } @@ -1532,9 +1532,9 @@ function getPrivateAttributeHtml(attributesJsonArray, tbodyId, shape) { + ' ' + ' '; } else if (!objReadonly && objType == "table") { - let objRef = JSON.parse(obj.ref) - console.log('ref',objRef) - let objTableInput = obj.value.table !== undefined && obj.value.table.length > 1 ? '请查看' : '请输入' + let objRef = JSON.parse(obj.ref); + console.log('ref',objRef); + let objTableInput = obj.value.table !== undefined && obj.value.table.length > 1 ? '请查看' : '请输入'; dialogTableList = obj.value.table == undefined ? [ { id: Utils.newId() ,name: objRef.firstColumn, desc: objRef.secondColumn} ] : obj.value.table; constr = '' + ' ' + objName + requiredSpan + '' @@ -1598,7 +1598,7 @@ Array.prototype.unique = function(){ } } return res; -} +}; // 得到不同属性值关联的形状 @@ -1655,7 +1655,7 @@ Array.prototype.notDistinct = function() { } } return newArr; -} +}; // 删除掉关联形状 function removeTrRelevanceShapes(obj) { @@ -1666,7 +1666,7 @@ function removeTrRelevanceShapes(obj) { onConfirm : function() { // 确定删除 var shape = Utils.getSelected()[0]; - var tempArray = new Array(); + var tempArray = []; var count = 0; if (shape) { var relevanceShapes = []; @@ -1784,7 +1784,7 @@ function updateModelElementsAttribute(selectedShape, nodes) { } if (arrJsontemp.length != 0) { var tempArr = removeShepeAttributeAndReturnDifferent(arrJsontemp, filterNotCheckedAttribute(nodes, arrJsontemp)); - var tempArray = new Array(); + var tempArray = []; for (var e = 0; e < tempArr.length; e++) { if (tempArr[e] != 0 && tempArr[e] != "0") { removeNotCheckedAttribute(shape, tempArr[e]); @@ -1873,7 +1873,7 @@ function removeShepeAttributeAndReturnDifferent(exitObj, newObj1) { // 删除没有选中的元素 function removeNotCheckedAttribute(shape, obj1) { - var tempArray = new Array(); + var tempArray = []; var attributesJsonArray1 = []; for (var i = 0; i < shape.dataAttributes.length; i++) { var attr = shape.dataAttributes[i]; @@ -1949,7 +1949,7 @@ function saveInputContent(obj,value) { return; } if(value !== undefined && value.isRequired && objValue == '') { - $(obj).attr('placeholder',value.name + '不能为空') + $(obj).attr('placeholder',value.name + '不能为空'); $(obj).addClass("required_input_css"); return; } @@ -1991,7 +1991,7 @@ function showAttributedEditWindow(obj) { var objId = $(obj).attr("objid"); var shape = Utils.getSelected()[0]; var windowTitle = '提示'; - let objValue = {} + let objValue = {}; if (shape) { var attributesJsonArray = []; for (var i = 0; i < shape.dataAttributes.length; i++) { @@ -2004,7 +2004,7 @@ function showAttributedEditWindow(obj) { for (var index = 0; index < attributesJsonArray.length; index++) { var tempObj = attributesJsonArray[index]; if (tempObj.id == objId) { - objValue = tempObj + objValue = tempObj; windowTitle = tempObj.name; // $("#attribute-edit-title").text(tempObj.name); $("#attribute-edit-content").val(tempObj.value); @@ -2026,7 +2026,7 @@ function showAttributedEditWindow(obj) { return; } if(objValue.isRequired && str == '') { - $("#attribute-edit-content").attr('placeholder',objValue.name + '不能为空') + $("#attribute-edit-content").attr('placeholder',objValue.name + '不能为空'); $("#attribute-edit-content").addClass("required_input_css"); return } @@ -2046,7 +2046,7 @@ function showAttributedEditWindow(obj) { // table表格 function openTableDialog(obj,value) { - let tableName = '提示' + let tableName = '提示'; let objId = $(obj).attr("objid"); let shape = Utils.getSelected()[0]; if (shape) { @@ -2066,8 +2066,8 @@ function openTableDialog(obj,value) { } } } - $('#attribute-table-content').empty() - $('#attribute-add-content').empty() + $('#attribute-table-content').empty(); + $('#attribute-add-content').empty(); var thead = '' + '' @@ -2077,8 +2077,8 @@ function openTableDialog(obj,value) { + dialogTableList[0].desc + '' + '操作' - + '' - $('#attribute-table-content').append(thead) + + ''; + $('#attribute-table-content').append(thead); for ( let i = 1; i < dialogTableList.length; i++) { let str = '' @@ -2089,10 +2089,10 @@ function openTableDialog(obj,value) { + '' + '' + '删除' - +'' + +''; $('#attribute-table-content').append(str) } - $('#attribute-add-content').append('') + $('#attribute-add-content').append(''); $("#attribute-table-window").dialog({ draggable: true, @@ -2101,15 +2101,15 @@ function openTableDialog(obj,value) { text : '确定', cls : "blue", handler : function() { - let inputs = $('#attribute-table-content').find('input') + let inputs = $('#attribute-table-content').find('input'); for (let i = 1; i < dialogTableList.length; i++) { - dialogTableList[i].name = inputs[2*(i-1)].value + dialogTableList[i].name = inputs[2*(i-1)].value; dialogTableList[i].desc = inputs[2*(i-1) +1].value } let tableObj = { name: tableName, table: dialogTableList - } + }; updateAttributeById($(obj).attr("objid"), tableObj); $("#attribute-table-window").dialog('close'); } @@ -2123,21 +2123,21 @@ function openTableDialog(obj,value) { } function addTableTr(obj) { - let newTrId = Utils.newId() + let newTrId = Utils.newId(); let defaultStr = ' ' + '' + '' + '删除' - + '' - dialogTableList.push({ id: newTrId ,name: '',desc: ''}) + + ''; + dialogTableList.push({ id: newTrId ,name: '',desc: ''}); $('#attribute-table-content').append(defaultStr) } function removeTableTr(obj) { - let removeId = obj.parentNode.getAttribute('id') - dialogTableList.splice(dialogTableList.findIndex(item => item.id == removeId), 1) - let tr = obj.parentNode + let removeId = obj.parentNode.getAttribute('id'); + dialogTableList.splice(dialogTableList.findIndex(item => item.id == removeId), 1); + let tr = obj.parentNode; tr.remove() } @@ -2151,7 +2151,7 @@ function updateAttributeById(objId, va, shapeId) { shape = Utils.getSelected()[0]; selectShape = shape; } - var tempArray = new Array(); + var tempArray = []; var count = 0; if (shape) { /* @@ -2208,7 +2208,7 @@ function removeTrAttribute(obj) { onConfirm : function() { // 确定删除 var shape = Utils.getSelected()[0]; - var tempArray = new Array(); + var tempArray = []; var count = 0; if (shape) { // shape.attributesContent = $("#tagContentTable0").html(); @@ -2365,8 +2365,8 @@ Designer.events.addEventListener("linkerCreated", function(linker) { * 图形创建后重写 */ Designer.events.addEventListener("created", function(shape) { - let shapePosition = shape.props - let pageSize = Model.define.page + let shapePosition = shape.props; + let pageSize = Model.define.page; if (shapePosition.x + shapePosition.w > pageSize.width - pageSize.padding) { Designer.setPageStyle({ width: shapePosition.x + shapePosition.w + pageSize.padding + 30, @@ -2778,10 +2778,10 @@ function changeArributeByShape() { $("#dock_content_attribute").hide(); $("#attr_no_more_attribute_id").show(); var iframeDocument=$("#file_attribute")[0].contentWindow.document; - var body = $(iframeDocument).find('body') - var pickerNum = $(body).find('input[name="dateTimePicker"]').length + var body = $(iframeDocument).find('body'); + var pickerNum = $(body).find('input[name="dateTimePicker"]').length; if (pickerNum > 0) { - var height = $(body).find('#frmMain').height() + 300 + var height = $(body).find('#frmMain').height() + 300; $("#file_attribute").height(height) } } else { @@ -2835,7 +2835,7 @@ function changeArributeByShape() { var newAttrArray = []; newAttrArray = tempAttrArray.concat(attributesJsonArrayT).filter(function(v, i, arr) { return arr.indexOf(v) === arr.lastIndexOf(v); - });; + }); attributesJsonArrayT = tempAttrArray.concat(newAttrArray); } } @@ -2859,7 +2859,7 @@ function changeArributeByShape() { } else { if (shape.text.length > 15) { var tempText = shape.text; - tempText = tempText.substring(0, 15) + tempText = tempText.substring(0, 15); $("span[name=attribute_desc_input]").text(shape.text).attr( "awsui-qtip", shape.text); } else { @@ -3108,7 +3108,7 @@ function getRelevanceShapeNameByShapeId(objIds, shapeId) { var shapeNames = []; var shapeRelationValue = []; var ref = shapeRefObj[objId]; - var relationType = ref.type + var relationType = ref.type; for (var j = 0; j < list.length; j++) { if (list[j].attrId == objId) { shapeNames.push(list[j].relationShapeText); @@ -3260,7 +3260,7 @@ function getAwsOrgAttributeByAttrId(shape, objId, checkedOrgList) { function saveRelevanceAwsOrgShapesTODB1(shapesObj, shapeId, shapeName, fileName, shapeGroupId, objId, shape,attributeValue) { if (attributeValue.isRequired && shapesObj.length == 0) { $("input[objid='" + objId + "']").val(''); - $("input[objid='" + objId + "']").attr('placeholder',attributeValue.name + '不能为空') + $("input[objid='" + objId + "']").attr('placeholder',attributeValue.name + '不能为空'); $("input[objid='" + objId + "']").addClass("required_input_css"); return; } @@ -3316,7 +3316,7 @@ function saveRelevanceAwsOrgShapesTODB1(shapesObj, shapeId, shapeName, fileName, relationShapeIds = relationShapeIds.split(","); } //修改文件中保存的属性值 - var tempArray = new Array(); + var tempArray = []; var count = 0; var attributesJsonArray = []; for (var i = 0; i < shape.dataAttributes.length; i++) { @@ -3682,7 +3682,7 @@ function saveRelevanceShapesTODB(shapesObj, shapeId, shapeName, fileName, //添加关联属性时,更新relationShapeModelObject的值 if (attributeValue.isRequired && shapesObj.length == 0) { $("input[objid='" + objId + "']").val(''); - $("input[objid='" + objId + "']").attr('placeholder',attributeValue.name + '不能为空') + $("input[objid='" + objId + "']").attr('placeholder',attributeValue.name + '不能为空'); $("input[objid='" + objId + "']").addClass("required_input_css"); return; } @@ -3761,7 +3761,7 @@ function saveRelevanceShapesTODB(shapesObj, shapeId, shapeName, fileName, // $("input[objid='" + objId + "']").val(shapeNames.join(",")); // } //修改文件中保存的属性值 - var tempArray = new Array(); + var tempArray = []; var count = 0; var attributesJsonArray = []; for (var i = 0; i < shape.dataAttributes.length; i++) { @@ -4039,7 +4039,7 @@ UI.doOutputProcess = function() { } } }); -} +}; //导出流程手册 function outputReport() { @@ -4105,7 +4105,7 @@ UI.showImportShapeDlg = function() { ], onClose:delShapeFiles }); -} +}; var updatedShapeFileList = [];// 已上传的附件列表名称