diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java index b7bcd9c6..c00937c3 100755 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java @@ -2665,9 +2665,9 @@ public class CoeProcessLevelWeb extends ActionWeb { String tableInput = subTableSize > 1 ? "请查看" : "请输入"; String attrRef = attributeModel.getRef(); JSONObject refValue = JSON.parseObject(attrRef); + String tableTitle = attributeModel.getTitle(); - - input = "" + input = "" + "" + "" + " " 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 5b1e60f8..213f8cc5 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 @@ -2758,7 +2758,6 @@
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 0e36fac9..84febd9c 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 @@ -588,6 +588,11 @@ function saveDialogTableValue(tableValue,id,dom) { if(awsui.decode(msg).result == "ok") { let tableEvent = "showTableDialog($(this)," + JSON.stringify(tableValue).replace(/\"/g,"'") +", '"+id+"')" dom.attr('onclick',tableEvent) + if (tableValue.table.length > 1) { + $("#" + id).val('请查看') + } else { + $("#" + id).val('请输入') + } } if (msg == "true") { // 发送"修改属性"监听事件 @@ -866,30 +871,31 @@ function openTextareaDialog(obj, title,id) { // 打开文件属性表格弹框 function showTableDialog(obj,value,id) { + let tableRef = JSON.parse($(obj).attr('ref')) + let tableName = $(obj).attr('tableTitle') let tableList = [] if (JSON.stringify(value) == '{}') { tableList = [ - { id: 'table_head' ,name: '命名', desc: '描述'} + { id: 'table_head' ,name: tableRef.firstColumn, desc: tableRef.secondColumn} ] } else { tableList = value.table + tableList[0] = { id: 'table_head' ,name: tableRef.firstColumn, desc: tableRef.secondColumn} } parent.operateList = tableList - let defaultTitle = $("#" + id).val() || '未命名表单' var thead = '' + '' - + '' + + tableList[0].name + '' - + '' - + '' + + '' + + tableList[0].desc + '' - + '操作' + + '操作' + '' if (parent.isParentShow) { parent.$('#attribute-table-content1').empty() parent.$('#attribute-add-content1').empty() - parent.$("#attribute-title-content1").val(defaultTitle) parent.$('#attribute-table-content1').append(thead) for ( let i = 1; i < tableList.length; i++) { let str = @@ -897,29 +903,30 @@ function showTableDialog(obj,value,id) { + '' + '' + '' - + '' + + '' + '' + '' - + '删除' + + '删除' +'' parent.$('#attribute-table-content1').append(str) } parent.$('#attribute-add-content1').append('') parent.$("#attribute-table-window1").dialog({ draggable: true, + title: tableName, buttons : [{ text : '确定', cls : "blue", handler : function() { - let name = parent.$("#attribute-title-content1").val() - $("#" + id).val(name) + // let name = parent.$("#attribute-title-content1").val() + // $("#" + id).val(name) let inputs = parent.$('#attribute-table-content1').find('input') - parent.operateList.forEach((item,index) => { - item.name = inputs[2*index].value - item.desc = inputs[2*index+1].value - }) + 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 + } let value = { - name: name, + name: tableName, table: parent.operateList } saveDialogTableValue(value,id,obj) @@ -942,11 +949,11 @@ function addTr() { let newTrId = Date.now().toString(36) let defaultStr = ' ' - + '' - + '' - + '删除' + + '' + + '' + + '删除' + '' - operateList.push({ id: newTrId ,name: '命名',desc: '描述'}) + operateList.push({ id: newTrId ,name: '',desc: ''}) $('#attribute-table-content1').append(defaultStr) } diff --git a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/extend/css/designer.extend.css b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/extend/css/designer.extend.css index 3aeaf005..77070269 100755 --- a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/extend/css/designer.extend.css +++ b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/extend/css/designer.extend.css @@ -373,6 +373,7 @@ height: 25px; .dialogTableHead { font-size: 15px; font-weight: bold; + text-align: center } .dialogTableTbody .dialogTableDelete { color: red; @@ -404,16 +405,17 @@ background-color: rgb(255, 255, 255); color: red; } .dialog_table_input_css { - border-bottom-width: 0; - border-left-width: 0; - border-right-width: 0; - border-top-width: 0; - height: 22px; + border: none; + min-height: 22px; width: 100%; - padding-left:0; + padding:0; + margin: 0; float: left; background-color: rgb(255, 255, 255); - text-overflow: ellipsis; + word-wrap:break-word; + word-break:break-all; + white-space: normal; + overflow-wrap: break-word; cursor: pointer; } 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 bc8e0305..857be1ad 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 @@ -1432,7 +1432,7 @@ function getPrivateAttributeHtml(attributesJsonArray, tbodyId, shape) { } var requiredSpan = '' if(obj.isRequired !== null && obj.isRequired) { - requiredSpan = '*' + requiredSpan = '*' } var constr = '' @@ -1525,25 +1525,27 @@ function getPrivateAttributeHtml(attributesJsonArray, tbodyId, shape) { //+ '
' + ''; } else if (!objReadonly && objType == "DateTimePicker") { - constr = '' - + ' ' + objName + requiredSpan + '' - + ' ' - + ' ' - + ' '; - } else if (!objReadonly && objType == "table") { - let objTableName = obj.value.name == undefined ? '未命名表单' : obj.value.name; - dialogTableList = obj.value.table == undefined ? [ { id: Utils.newId() ,name: '命名', desc: '描述'} ] : obj.value.table; - constr = '' - + ' ' + objName + requiredSpan + '' - + ' ' - + '' - + ' ' - + ' ' - + ' ' - + ' ' - + '' - + ' '; - } + constr = '' + + ' ' + objName + requiredSpan + '' + + ' ' + + ' ' + + ' '; + } 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 ? '请查看' : '请输入' + dialogTableList = obj.value.table == undefined ? [ { id: Utils.newId() ,name: objRef.firstColumn, desc: objRef.secondColumn} ] : obj.value.table; + constr = '' + + ' ' + objName + requiredSpan + '' + + ' ' + + '' + + ' ' + + ' ' + + ' ' + + ' ' + + '' + + ' '; + } $("#" + tbodyId).append(constr); $("#dateTimePicker_" + obj.id).datepicker({dateFmt:"yyyy-MM-dd HH:mm:ss"}); } @@ -1946,9 +1948,9 @@ function saveInputContent(obj,value) { return; } if(value !== undefined && value.isRequired && objValue == '') { - $(obj).attr('placeholder',value.name + '不能为空') - $(obj).addClass("required_input_css"); - return; + $(obj).attr('placeholder',value.name + '不能为空') + $(obj).addClass("required_input_css"); + return; } if ($(obj).attr("inputType") == "number") { var val = $(obj).val(); @@ -2001,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); @@ -2023,10 +2025,10 @@ function showAttributedEditWindow(obj) { return; } if(objValue.isRequired && str == '') { - $("#attribute-edit-content").attr('placeholder',objValue.name + '不能为空') - $("#attribute-edit-content").addClass("required_input_css"); - return - } + $("#attribute-edit-content").attr('placeholder',objValue.name + '不能为空') + $("#attribute-edit-content").addClass("required_input_css"); + return + } updateAttributeById($(obj).attr("objid"), str); $(obj).val(str); $("#attribute-edit-window").dialog('close'); @@ -2042,22 +2044,39 @@ function showAttributedEditWindow(obj) { } // table表格 -function openTableDialog(obj) { - let inputId = $(obj).attr('objid') - let tableName = $("#"+ inputId).val() || '未命名表单' - $("#attribute-title-content").val(tableName) +function openTableDialog(obj,value) { + let tableName = '提示' + let objId = $(obj).attr("objid"); + let shape = Utils.getSelected()[0]; + if (shape) { + let attributesJsonArray = []; + for (let i = 0; i < shape.dataAttributes.length; i++) { + var attr = shape.dataAttributes[i]; + if (attr.attributesJsonArray) { + attributesJsonArray = attr.attributesJsonArray; + break; + } + } + for (let index = 0; index < attributesJsonArray.length; index++) { + var tempObj = attributesJsonArray[index]; + if (tempObj.id == objId) { + tableName = tempObj.name; + break; + } + } + } $('#attribute-table-content').empty() $('#attribute-add-content').empty() - var thead = - '' - + '' - + '' - + '' - + '' - + '' - + '' - + '操作' - + '' + var thead = + '' + + '' + + dialogTableList[0].name + + '' + + '' + + dialogTableList[0].desc + + '' + + '操作' + + '' $('#attribute-table-content').append(thead) for ( let i = 1; i < dialogTableList.length; i++) { let str = @@ -2065,53 +2084,52 @@ function openTableDialog(obj) { + '' + '' + '' - + '' + + '' + '' + '' - + '删除' + + '删除' +'' $('#attribute-table-content').append(str) } $('#attribute-add-content').append('') - $("#attribute-table-window").dialog({ - draggable: true, - buttons : [{ - text : '确定', - cls : "blue", - handler : function() { - var title = $("#attribute-title-content").val() - $("#" + inputId).val(title) + $("#attribute-table-window").dialog({ + draggable: true, + title: tableName, + buttons : [{ + text : '确定', + cls : "blue", + handler : function() { let inputs = $('#attribute-table-content').find('input') - dialogTableList.forEach((item,index) => { - item.name = inputs[2*index].value - item.desc = inputs[2*index+1].value - }) + for (let i = 1; i < dialogTableList.length; i++) { + dialogTableList[i].name = inputs[2*(i-1)].value + dialogTableList[i].desc = inputs[2*(i-1) +1].value + } let tableObj = { - name: title, + name: tableName, table: dialogTableList } updateAttributeById($(obj).attr("objid"), tableObj); $("#attribute-table-window").dialog('close'); - } - }, { - text : '取消', - handler : function() { - $("#attribute-table-window").dialog('close'); - } - }] - }) + } + }, { + text : '取消', + handler : function() { + $("#attribute-table-window").dialog('close'); + } + }] + }) } function addTableTr(obj) { let newTrId = Utils.newId() let defaultStr = ' ' - + '' - + '' - + '删除' + + '' + + '' + + '删除' + '' - dialogTableList.push({ id: newTrId ,name: '命名',desc: '描述'}) + dialogTableList.push({ id: newTrId ,name: '',desc: ''}) $('#attribute-table-content').append(defaultStr) } diff --git a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/extend/js/designer.extend.link.view.portal.js b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/extend/js/designer.extend.link.view.portal.js index 44bb5453..58a29759 100755 --- a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/extend/js/designer.extend.link.view.portal.js +++ b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/extend/js/designer.extend.link.view.portal.js @@ -388,9 +388,13 @@ function getPrivateAttributeHtml(attributesJsonArray, tbodyId, shape) { //+ '
' + ''; } else if (obj.type == "table") { + let tableInput = '请输入' + if(obj.value.table.length > 1) { + tableInput = '请查看' + } constr = ''; constr += '' + obj.name + ''; - constr += '' + ' ' + obj.value.name + '' + ''; + constr += '' + ' ' + tableInput + '' + ''; constr += ''; } $('#' + tbodyId + ' table[name=' + shape.id + ']').append(constr); @@ -402,38 +406,38 @@ function getPrivateAttributeHtml(attributesJsonArray, tbodyId, shape) { } // table表格 -function openTableDialog(obj) { +function openDialog(obj) { let tableName = obj.name let dialogTable = obj.table - $("#attribute-table-content").empty() + $("#attribute-table-content2").empty() let thead = '' + '' + dialogTable[0].name + '' + '' + dialogTable[0].desc + '' +'' - $('#attribute-table-content').append(thead) + $('#attribute-table-content2').append(thead) for ( let i = 1; i < dialogTable.length; i++) { let str = '' + '' + dialogTable[i].name + '' + '' + dialogTable[i].desc + '' +'' - $('#attribute-table-content').append(str) + $('#attribute-table-content2').append(str) } - $("#attribute-table-window").dialog({ + $("#attribute-table-window2").dialog({ title: tableName, draggable: true, buttons : [{ text : '确定', cls : "blue", handler : function() { - $("#attribute-table-window").dialog('close'); + $("#attribute-table-window2").dialog('close'); } }, { text : '取消', handler : function() { - $("#attribute-table-window").dialog('close'); + $("#attribute-table-window2").dialog('close'); } }] }) @@ -1450,11 +1454,24 @@ function initProcessDesc() { var value = obj.value; if (value == undefined) { value = ''; - } else { - value = value.replace(/\n/g,'
') + t += '' + value + ''; + t += ''; + } else if(obj.type == 'table') { + let tableValue = JSON.parse(value.replace(/"/g,'\"')) + let tableFlag = '请输入' + if (tableValue.table.length > 1) { + tableFlag = '请查看' + } + t += '' + tableFlag + ''; + t += ''; } - t += '' + value + ''; - t += ''; + else { + value = value.replace(/\n/g,'
') + t += '' + value + ''; + t += ''; + } + // t += '' + value + ''; + // t += ''; } $('#portalDescDock').find('table').append(t); // $('#portalDescDock').append('
 
');