提交 fbcdea81 编写于 作者: U unknown

【内容管理】修复视图范围选择人员、组织、身份保存出错的问题

上级 3ad5e503
......@@ -450,7 +450,7 @@ MWF.xApplication.query.ViewDesigner.Property = MWF.FVProperty = new Class({
personUnitNodes.each(function(node){
new MWF.xApplication.process.ProcessDesigner.widget.PersonSelector(node, this.view.designer, {
"type": "unit",
"names": (this.data.data.where) ? this.data.data.where.unitList : [],
"names": (this.data.data.where) ? this.data.data.where.creatorUnitList : [],
"onChange": function(ids){this.savePersonSelectItem(node, ids);}.bind(this)
});
}.bind(this));
......@@ -458,7 +458,7 @@ MWF.xApplication.query.ViewDesigner.Property = MWF.FVProperty = new Class({
personNodes.each(function(node){
new MWF.xApplication.process.ProcessDesigner.widget.PersonSelector(node, this.view.designer, {
"type": "person",
"names": (this.data.data.where) ? this.data.data.where.personList : [],
"names": (this.data.data.where) ? this.data.data.where.creatorPersonList : [],
"onChange": function(ids){this.savePersonSelectItem(node, ids);}.bind(this)
});
}.bind(this));
......@@ -466,7 +466,7 @@ MWF.xApplication.query.ViewDesigner.Property = MWF.FVProperty = new Class({
identityNodes.each(function(node){
new MWF.xApplication.process.ProcessDesigner.widget.PersonSelector(node, this.view.designer, {
"type": "identity",
"names": (this.data.data.where) ? this.data.data.where.identityList : [],
"names": (this.data.data.where) ? this.data.data.where.creatorIdentityList : [],
"onChange": function(ids){this.savePersonSelectItem(node, ids);}.bind(this)
});
}.bind(this));
......
......@@ -628,6 +628,28 @@ MWF.xApplication.query.ViewDesigner.View = new Class({
return false;
}
var list;
if( this.data.data && this.data.data.where ){
if( this.data.data.where.creatorIdentityList ){
list = this.data.data.where.creatorIdentityList;
for( var i=0; i< list.length ; i++){
if( typeOf( list[i] ) === "object" )list[i] = list[i].name || "";
}
}
if( this.data.data.where.creatorPersonList ){
list = this.data.data.where.creatorPersonList;
for( var i=0; i< list.length ; i++){
if( typeOf( list[i] ) === "object" )list[i] = list[i].name || "";
}
}
if( this.data.data.where.creatorUnitList ){
list = this.data.data.where.creatorIdentityList;
for( var i=0; i< list.length ; i++){
if( typeOf( list[i] ) === "object" )list[i] = list[i].name || "";
}
}
}
this.designer.actions.saveView(this.data, function(json){
this.data.id = json.data.id;
this.isNewView = false;
......@@ -645,6 +667,30 @@ MWF.xApplication.query.ViewDesigner.View = new Class({
return false;
}
//}
debugger;
var list;
if( this.data.data && this.data.data.where ){
if( this.data.data.where.creatorIdentityList ){
list = this.data.data.where.creatorIdentityList;
for( var i=0; i< list.length ; i++){
if( typeOf( list[i] ) === "object" )list[i] = list[i].name || "";
}
}
if( this.data.data.where.creatorPersonList ){
list = this.data.data.where.creatorPersonList;
for( var i=0; i< list.length ; i++){
if( typeOf( list[i] ) === "object" )list[i] = list[i].name || "";
}
}
if( this.data.data.where.creatorUnitList ){
list = this.data.data.where.creatorUnitList;
for( var i=0; i< list.length ; i++){
if( typeOf( list[i] ) === "object" )list[i] = list[i].name || "";
}
}
}
this.designer.actions.saveView(this.data, function(json){
this.designer.notice(this.designer.lp.notice.save_success, "success", this.node, {"x": "left", "y": "bottom"});
this.isNewView = false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册