diff --git a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/js/coe.pal.processlevel.create.js b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/js/coe.pal.processlevel.create.js index 3d7150db..db943bd4 100755 --- a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/js/coe.pal.processlevel.create.js +++ b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/js/coe.pal.processlevel.create.js @@ -612,7 +612,7 @@ function saveDialogTableValue(tableValue,id,dom) { } function saveContent(obj) { - debugger; + // debugger; var sid = $("#sid").val(); var uuid = $("#id").val(); var id = obj.attr("id"); @@ -902,10 +902,10 @@ function showTableDialog(obj,value,id) { let str = '' + '' - + '' + + '' + '' + '' - + '' + + '' + '' + '删除' +'' @@ -921,7 +921,7 @@ function showTableDialog(obj,value,id) { handler : function() { // let name = parent.$("#attribute-title-content1").val() // $("#" + id).val(name) - let inputs = parent.$('#attribute-table-content1').find('input') + let inputs = parent.$('#attribute-table-content1').find('textarea') for (let i = 1; i < parent.operateList.length; i++) { parent.operateList[i].name = inputs[2*(i-1)].value parent.operateList[i].desc = inputs[2*(i-1) + 1].value @@ -950,8 +950,8 @@ function addTr() { let newTrId = Date.now().toString(36) let defaultStr = ' ' - + '' - + '' + + '' + + '' + '删除' + '' operateList.push({ id: newTrId ,name: '',desc: ''}) 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 e5a1ec72..b7f3a0ed 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 = []; + addr = new Array(); } - var links_file = []; - var links_custom = []; + var links_file = new Array(); + var links_custom = new Array(); 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 = []; + linkArr = new Array(); 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 selectAttrTabTag2(showContent, selfObj) { +function selectAttrTabTag(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,8 @@ 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) + 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 +1597,7 @@ Array.prototype.unique = function(){ } } return res; -}; +} // 得到不同属性值关联的形状 @@ -1655,7 +1654,7 @@ Array.prototype.notDistinct = function() { } } return newArr; -}; +} // 删除掉关联形状 function removeTrRelevanceShapes(obj) { @@ -1666,7 +1665,7 @@ function removeTrRelevanceShapes(obj) { onConfirm : function() { // 确定删除 var shape = Utils.getSelected()[0]; - var tempArray = []; + var tempArray = new Array(); var count = 0; if (shape) { var relevanceShapes = []; @@ -1784,7 +1783,7 @@ function updateModelElementsAttribute(selectedShape, nodes) { } if (arrJsontemp.length != 0) { var tempArr = removeShepeAttributeAndReturnDifferent(arrJsontemp, filterNotCheckedAttribute(nodes, arrJsontemp)); - var tempArray = []; + var tempArray = new Array(); for (var e = 0; e < tempArr.length; e++) { if (tempArr[e] != 0 && tempArr[e] != "0") { removeNotCheckedAttribute(shape, tempArr[e]); @@ -1873,7 +1872,7 @@ function removeShepeAttributeAndReturnDifferent(exitObj, newObj1) { // 删除没有选中的元素 function removeNotCheckedAttribute(shape, obj1) { - var tempArray = []; + var tempArray = new Array(); var attributesJsonArray1 = []; for (var i = 0; i < shape.dataAttributes.length; i++) { var attr = shape.dataAttributes[i]; @@ -1949,7 +1948,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 +1990,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 +2003,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 +2025,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 +2045,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 +2065,8 @@ function openTableDialog(obj,value) { } } } - $('#attribute-table-content').empty(); - $('#attribute-add-content').empty(); + $('#attribute-table-content').empty() + $('#attribute-add-content').empty() var thead = '' + '' @@ -2077,22 +2076,23 @@ 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 = '' + '' - + '' + + '' + '' + '' - + '' + + '' + '' + '删除' - +''; + +'' $('#attribute-table-content').append(str) } - $('#attribute-add-content').append(''); + $('#attribute-add-content').append('') + // tableInputHeight() $("#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('textarea') 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'); } @@ -2122,22 +2122,34 @@ function openTableDialog(obj,value) { }) } +// function tableInputHeight() { +// var input = $("#attribute-table-content").find(".dialog_table_input_css"); +// input.each(function () { +// $(this).on('input', function(){ +// if(this.scrollHeight > $(this).height()) { +// var curRow = parseInt($(this).attr('rows')) +// $(this).attr('rows',curRow + 1) +// } +// }); +// }) +// } + 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 +2163,7 @@ function updateAttributeById(objId, va, shapeId) { shape = Utils.getSelected()[0]; selectShape = shape; } - var tempArray = []; + var tempArray = new Array(); var count = 0; if (shape) { /* @@ -2208,7 +2220,7 @@ function removeTrAttribute(obj) { onConfirm : function() { // 确定删除 var shape = Utils.getSelected()[0]; - var tempArray = []; + var tempArray = new Array(); var count = 0; if (shape) { // shape.attributesContent = $("#tagContentTable0").html(); @@ -2365,8 +2377,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 +2790,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 +2847,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 +2871,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 +3120,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 +3272,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 +3328,7 @@ function saveRelevanceAwsOrgShapesTODB1(shapesObj, shapeId, shapeName, fileName, relationShapeIds = relationShapeIds.split(","); } //修改文件中保存的属性值 - var tempArray = []; + var tempArray = new Array(); var count = 0; var attributesJsonArray = []; for (var i = 0; i < shape.dataAttributes.length; i++) { @@ -3682,7 +3694,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 +3773,7 @@ function saveRelevanceShapesTODB(shapesObj, shapeId, shapeName, fileName, // $("input[objid='" + objId + "']").val(shapeNames.join(",")); // } //修改文件中保存的属性值 - var tempArray = []; + var tempArray = new Array(); var count = 0; var attributesJsonArray = []; for (var i = 0; i < shape.dataAttributes.length; i++) { @@ -4039,7 +4051,7 @@ UI.doOutputProcess = function() { } } }); -}; +} //导出流程手册 function outputReport() { @@ -4105,7 +4117,7 @@ UI.showImportShapeDlg = function() { ], onClose:delShapeFiles }); -}; +} var updatedShapeFileList = [];// 已上传的附件列表名称