Skip to content

Commit

Permalink
修复设计器单元格自定义分组保存后无法编辑的BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
youseries committed Jun 26, 2018
1 parent 0502fc7 commit dc6d477
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions ureport2-js/src/Utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,13 @@ export function tableToXml(context){
for(let groupItem of groupItems){
cellXml+=`<group-item name="${groupItem.name}">`;
for(let condition of groupItem.conditions){
cellXml+=`<condition property="${condition.leftProperty}" op="${encode(condition.op)}" id="${condition.id}"`;
cellXml+=`<condition property="${condition.left}" op="${encode(condition.op)}" id="${condition.id}"`;
if(condition.join){
cellXml+=` join="${condition.join}">`;
}else{
cellXml+=`>`;
}
cellXml+=`<value><![CDATA[${condition.rightExpression}]]></value>`;
cellXml+=`<value><![CDATA[${condition.right}]]></value>`;
cellXml+=`</condition>`;
}
cellXml+='</group-item>';
Expand Down
8 changes: 4 additions & 4 deletions ureport2-js/src/dialog/CustomGroupDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export default class CustomGroupDialog{
const conditions=selectionOption.data().conditions;
let index=0;
for(let condition of conditions){
let text=condition.leftProperty+" "+condition.op+" "+condition.rightExpression;
let text=condition.left+" "+condition.op+" "+condition.right;
const join=condition.join;
if(index>0 && join){
text=join+" "+text;
Expand Down Expand Up @@ -151,7 +151,7 @@ export default class CustomGroupDialog{
const conditions=groupItem.conditions;
const conditionDialog=new ConditionDialog(conditions);
conditionDialog.show(function(leftProperty,op,rightExpression,join){
const c={leftProperty,op,rightExpression,join,id:uuid.v1()};
const c={left:leftProperty,op,right:rightExpression,join,id:uuid.v1()};
conditions.push(c);
let text=leftProperty+" "+op+" "+rightExpression;
if(join){
Expand Down Expand Up @@ -188,9 +188,9 @@ export default class CustomGroupDialog{
break;
}
}
targetCondition.leftProperty=leftProperty;
targetCondition.left=leftProperty;
targetCondition.op=op;
targetCondition.rightExpression=rightExpression;
targetCondition.right=rightExpression;
targetCondition.join=join;
let text=leftProperty+" "+op+" "+rightExpression;
if(join){
Expand Down

0 comments on commit dc6d477

Please sign in to comment.